(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[743],{28187:function(Ee,te,J){"use strict";var ct=J(67294),wt=J(1034),Kt=J(29640),Bt=J(79360),It=J(24770),ot=J(27681),ut=function(St,jt){var Nt={};for(var _t in St)Object.prototype.hasOwnProperty.call(St,_t)&&jt.indexOf(_t)<0&&(Nt[_t]=St[_t]);if(St!=null&&typeof Object.getOwnPropertySymbols=="function")for(var bt=0,_t=Object.getOwnPropertySymbols(St);bt<_t.length;bt++)jt.indexOf(_t[bt])<0&&Object.prototype.propertyIsEnumerable.call(St,_t[bt])&&(Nt[_t[bt]]=St[_t[bt]]);return Nt},mt=(0,ct.forwardRef)(function(St,jt){var Nt=St.chartRef,_t=St.style,bt=_t===void 0?{height:"inherit"}:_t,p=St.className,c=St.loading,tt=St.loadingTemplate,K=St.errorTemplate,Ct=ut(St,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),Mt=(0,Kt.Z)(wt.VT,Ct),z=Mt.chart,W=Mt.container;return(0,ct.useEffect)(function(){(0,Bt.J)(Nt,z.current)},[z.current]),(0,ct.useImperativeHandle)(jt,function(){return{getChart:function(){return z.current}}}),ct.createElement(It.Z,{errorTemplate:K},c&&ct.createElement(ot.Z,{loadingTemplate:tt,theme:St.theme}),ct.createElement("div",{className:p,style:bt,ref:W}))});te.Z=mt},80652:function(Ee,te,J){"use strict";var ct=J(67294),wt=J(1034),Kt=J(29640),Bt=J(79360),It=J(24770),ot=J(27681),ut=function(St,jt){var Nt={};for(var _t in St)Object.prototype.hasOwnProperty.call(St,_t)&&jt.indexOf(_t)<0&&(Nt[_t]=St[_t]);if(St!=null&&typeof Object.getOwnPropertySymbols=="function")for(var bt=0,_t=Object.getOwnPropertySymbols(St);bt<_t.length;bt++)jt.indexOf(_t[bt])<0&&Object.prototype.propertyIsEnumerable.call(St,_t[bt])&&(Nt[_t[bt]]=St[_t[bt]]);return Nt},mt=(0,ct.forwardRef)(function(St,jt){var Nt=St.chartRef,_t=St.style,bt=_t===void 0?{height:"inherit"}:_t,p=St.className,c=St.loading,tt=St.loadingTemplate,K=St.errorTemplate,Ct=ut(St,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),Mt=(0,Kt.Z)(wt.x1,Ct),z=Mt.chart,W=Mt.container;return(0,ct.useEffect)(function(){(0,Bt.J)(Nt,z.current)},[z.current]),(0,ct.useImperativeHandle)(jt,function(){return{getChart:function(){return z.current}}}),ct.createElement(It.Z,{errorTemplate:K},c&&ct.createElement(ot.Z,{loadingTemplate:tt,theme:St.theme}),ct.createElement("div",{className:p,style:bt,ref:W}))});te.Z=mt},24770:function(Ee,te,J){"use strict";var ct=J(67294),wt=function(){var Bt=function(It,ot){return Bt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ut,mt){ut.__proto__=mt}||function(ut,mt){for(var St in mt)Object.prototype.hasOwnProperty.call(mt,St)&&(ut[St]=mt[St])},Bt(It,ot)};return function(It,ot){if(typeof ot!="function"&&ot!==null)throw new TypeError("Class extends value "+String(ot)+" is not a constructor or null");Bt(It,ot);function ut(){this.constructor=It}It.prototype=ot===null?Object.create(ot):(ut.prototype=ot.prototype,new ut)}}(),Kt=function(Bt){wt(It,Bt);function It(){var ot=Bt!==null&&Bt.apply(this,arguments)||this;return ot.state={hasError:!1},ot.renderError=function(ut){var mt=ot.props.errorTemplate;switch(ut){default:return typeof mt=="function"?mt(ut):mt||ct.createElement("h5",null,"\u7EC4\u4EF6\u51FA\u9519\u4E86\uFF0C\u8BF7\u6838\u67E5\u540E\u91CD\u8BD5\uFF1A ",ut.message)}},ot}return It.getDerivedStateFromError=function(ot){return{hasError:!0,error:ot}},It.getDerivedStateFromProps=function(ot,ut){return ut.children!==ot.children?{children:ot.children,hasError:!1,error:void 0}:null},It.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):ct.createElement(ct.Fragment,null,this.props.children)},It}(ct.Component);te.Z=Kt},29640:function(Ee,te,J){"use strict";J.d(te,{Z:function(){return Ot}});var ct=J(67294),wt=J(41694),Kt=J(73935),Bt=J.t(Kt,2),It=function(){return It=Object.assign||function(it){for(var yt,M=1,O=arguments.length;M0&&D[D.length-1])&&(E[0]===6||E[0]===2)){M=0;continue}if(E[0]===3&&(!D||E[1]>D[0]&&E[1]=18&&(_t=mt.createRoot)}catch(it){}function p(it){var yt=mt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;yt&&typeof yt=="object"&&(yt.usingClientEntryPoint=it)}var c="__rc_react_root__";function tt(it,yt){p(!0);var M=yt[c]||_t(yt);p(!1),M.render(it),yt[c]=M}function K(it,yt){jt(it,yt)}function Ct(it,yt){}function Mt(it,yt){if(_t){tt(it,yt);return}K(it,yt)}function z(it){return ot(this,void 0,void 0,function(){return ut(this,function(yt){return[2,Promise.resolve().then(function(){var M;(M=it[c])===null||M===void 0||M.unmount(),delete it[c]})]})})}function W(it){Nt(it)}function gt(it){}function At(it){return ot(this,void 0,void 0,function(){return ut(this,function(yt){return _t!==void 0?[2,z(it)]:(W(it),[2])})})}var Lt=new Map,Vt=function(it,yt,M){var O=document.createElement("div");return yt==="tooltip"&&(O.setAttribute("data-uuid",M),Lt.has(M)?O=Lt.get(M):Lt.set(M,O),O.className="g2-tooltip"),Mt(it,O),O},re=Vt,st=function(it,yt){var M={}.toString;return M.call(it)==="[object ".concat(yt,"]")},G=function(it){if(!it)return it;var yt={};for(var M in it)yt[M]=it[M];return yt},nt=function(it){return Object.prototype.toString.call(it).slice(8,-1)},j=function(it){if(!it||typeof it!="object")return it;var yt;return Array.isArray(it)?yt=it.map(function(M){return j(M)}):(yt={},Object.keys(it).forEach(function(M){return yt[M]=j(it[M])})),yt},X=function(it,yt){for(var M=it,O=0;O=0&&V._call.call(null,_),V=V._next;--ot}function gt(){bt=(_t=c.now())+p,ot=ut=0;try{W()}finally{ot=0,Lt(),bt=0}}function At(){var V=c.now(),_=V-_t;_>St&&(p-=_,_t=V)}function Lt(){for(var V,_=jt,H,ht=Infinity;_;)_._call?(ht>_._time&&(ht=_._time),V=_,_=_._next):(H=_._next,_._next=null,_=V?V._next=H:jt=H);Nt=V,Vt(ht)}function Vt(V){if(!ot){ut&&(ut=clearTimeout(ut));var _=V-bt;_>24?(V>8&15|_>>4&240,_>>4&15|_&240,(_&15)<<4|_&15,1):H===8?w(_>>24&255,_>>16&255,_>>8&255,(_&255)/255):H===4?w(_>>12&15|_>>8&240,_>>8&15|_>>4&240,_>>4&15|_&240,((_&15)<<4|_&15)/255):null):(_=pt.exec(V))?new N(_[1],_[2],_[3],1):(_=Ot.exec(V))?new N(_[1]*255/100,_[2]*255/100,_[3]*255/100,1):(_=it.exec(V))?w(_[1],_[2],_[3],_[4]):(_=yt.exec(V))?w(_[1]*255/100,_[2]*255/100,_[3]*255/100,_[4]):(_=M.exec(V))?Tt(_[1],_[2]/100,_[3]/100,1):(_=O.exec(V))?Tt(_[1],_[2]/100,_[3]/100,_[4]):U.hasOwnProperty(V)?E(U[V]):V==="transparent"?new N(NaN,NaN,NaN,0):null}function E(V){return new N(V>>16&255,V>>8&255,V&255,1)}function w(V,_,H,ht){return ht<=0&&(V=_=H=NaN),new N(V,_,H,ht)}function T(V){return V instanceof G||(V=L(V)),V?(V=V.rgb(),new N(V.r,V.g,V.b,V.opacity)):new N}function F(V,_,H,ht){return arguments.length===1?T(V):new N(V,_,H,ht==null?1:ht)}function N(V,_,H,ht){this.r=+V,this.g=+_,this.b=+H,this.opacity=+ht}re(N,F,st(G,{brighter:function(V){return V=V==null?j:Math.pow(j,V),new N(this.r*V,this.g*V,this.b*V,this.opacity)},darker:function(V){return V=V==null?nt:Math.pow(nt,V),new N(this.r*V,this.g*V,this.b*V,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:k,formatHex:k,formatRgb:q,toString:q}));function k(){return"#"+Q(this.r)+Q(this.g)+Q(this.b)}function q(){var V=this.opacity;return V=isNaN(V)?1:Math.max(0,Math.min(1,V)),(V===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(V===1?")":", "+V+")")}function Q(V){return V=Math.max(0,Math.min(255,Math.round(V)||0)),(V<16?"0":"")+V.toString(16)}function Tt(V,_,H,ht){return ht<=0?V=_=H=NaN:H<=0||H>=1?V=_=NaN:_<=0&&(V=NaN),new ne(V,_,H,ht)}function qt(V){if(V instanceof ne)return new ne(V.h,V.s,V.l,V.opacity);if(V instanceof G||(V=L(V)),!V)return new ne;if(V instanceof ne)return V;V=V.rgb();var _=V.r/255,H=V.g/255,ht=V.b/255,zt=Math.min(_,H,ht),ie=Math.max(_,H,ht),ue=NaN,oe=ie-zt,Pe=(ie+zt)/2;return oe?(_===ie?ue=(H-ht)/oe+(H0&&Pe<1?0:ue,new ne(ue,oe,Pe,V.opacity)}function Wt(V,_,H,ht){return arguments.length===1?qt(V):new ne(V,_,H,ht==null?1:ht)}function ne(V,_,H,ht){this.h=+V,this.s=+_,this.l=+H,this.opacity=+ht}re(ne,Wt,st(G,{brighter:function(V){return V=V==null?j:Math.pow(j,V),new ne(this.h,this.s,this.l*V,this.opacity)},darker:function(V){return V=V==null?nt:Math.pow(nt,V),new ne(this.h,this.s,this.l*V,this.opacity)},rgb:function(){var V=this.h%360+(this.h<0)*360,_=isNaN(V)||isNaN(this.s)?0:this.s,H=this.l,ht=H+(H<.5?H:1-H)*_,zt=2*H-ht;return new N($t(V>=240?V-240:V+120,zt,ht),$t(V,zt,ht),$t(V<120?V+240:V-120,zt,ht),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var V=this.opacity;return V=isNaN(V)?1:Math.max(0,Math.min(1,V)),(V===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(V===1?")":", "+V+")")}}));function $t(V,_,H){return(V<60?_+(H-_)*V/60:V<180?H:V<240?_+(H-_)*(240-V)/60:_)*255}function Yt(V,_,H,ht,zt){var ie=V*V,ue=ie*V;return((1-3*V+3*ie-ue)*_+(4-6*ie+3*ue)*H+(1+3*V+3*ie-3*ue)*ht+ue*zt)/6}function R(V){var _=V.length-1;return function(H){var ht=H<=0?H=0:H>=1?(H=1,_-1):Math.floor(H*_),zt=V[ht],ie=V[ht+1],ue=ht>0?V[ht-1]:2*zt-ie,oe=ht<_-1?V[ht+2]:2*ie-zt;return Yt((H-ht/_)*_,ue,zt,ie,oe)}}function Y(V){var _=V.length;return function(H){var ht=Math.floor(((H%=1)<0?++H:H)*_),zt=V[(ht+_-1)%_],ie=V[ht%_],ue=V[(ht+1)%_],oe=V[(ht+2)%_];return Yt((H-ht/_)*_,zt,ie,ue,oe)}}var et=function(V){return function(){return V}};function dt(V,_){return function(H){return V+H*_}}function Rt(V,_,H){return V=Math.pow(V,H),_=Math.pow(_,H)-V,H=1/H,function(ht){return Math.pow(V+ht*_,H)}}function Ht(V,_){var H=_-V;return H?dt(V,H>180||H<-180?H-360*Math.round(H/360):H):constant(isNaN(V)?_:V)}function Gt(V){return(V=+V)==1?Ut:function(_,H){return H-_?Rt(_,H,V):et(isNaN(_)?H:_)}}function Ut(V,_){var H=_-V;return H?dt(V,H):et(isNaN(V)?_:V)}var Pt=function V(_){var H=Gt(_);function ht(zt,ie){var ue=H((zt=F(zt)).r,(ie=F(ie)).r),oe=H(zt.g,ie.g),Pe=H(zt.b,ie.b),tr=Ut(zt.opacity,ie.opacity);return function(dr){return zt.r=ue(dr),zt.g=oe(dr),zt.b=Pe(dr),zt.opacity=tr(dr),zt+""}}return ht.gamma=V,ht}(1);function ee(V){return function(_){var H=_.length,ht=new Array(H),zt=new Array(H),ie=new Array(H),ue,oe;for(ue=0;ueH&&(ie=_.slice(H,ie),oe[ue]?oe[ue]+=ie:oe[++ue]=ie),(ht=ht[0])===(zt=zt[0])?oe[ue]?oe[ue]+=zt:oe[++ue]=zt:(oe[++ue]=null,Pe.push({i:ue,x:le(ht,zt)})),H=Me.lastIndex;return H<_.length&&(ie=_.slice(H),oe[ue]?oe[ue]+=ie:oe[++ue]=ie),oe.length<2?Pe[0]?ze(Pe[0].x):De(_):(_=Pe.length,function(tr){for(var dr=0,Ir;dr<_;++dr)oe[(Ir=Pe[dr]).i]=Ir.x(tr);return oe.join("")})}function nr(V,_){var H=typeof _,ht;return _==null||H==="boolean"?et(_):(H==="number"?le:H==="string"?(ht=L(_))?(_=ht,Pt):Ue:_ instanceof L?Pt:_ instanceof Date?me:se(_)?ye:Array.isArray(_)?pe:typeof _.valueOf!="function"&&typeof _.toString!="function"||isNaN(_)?be:le)(V,_)}var br=J(97492),sr=J(47575),Qr=function(V){return["fill","stroke","fillStyle","strokeStyle"].includes(V)},sn=function(V){return/^[r,R,L,l]{1}[\s]*\(/.test(V)},ln=[1,0,0,0,1,0,0,0,1];function Cn(V,_,H){var ht={},zt=_.fromAttrs,ie=_.toAttrs;if(!V.destroyed){var ue;for(var oe in ie)if(!(0,It.Xy)(zt[oe],ie[oe]))if(oe==="path"){var Pe=ie[oe],tr=zt[oe];Pe.length>tr.length?(Pe=sr.parsePathString(ie[oe]),tr=sr.parsePathString(zt[oe]),tr=sr.fillPathByDiff(tr,Pe),tr=sr.formatPath(tr,Pe),_.fromAttrs.path=tr,_.toAttrs.path=Pe):_.pathFormatted||(Pe=sr.parsePathString(ie[oe]),tr=sr.parsePathString(zt[oe]),tr=sr.formatPath(tr,Pe),_.fromAttrs.path=tr,_.toAttrs.path=Pe,_.pathFormatted=!0),ht[oe]=[];for(var dr=0;dr0){for(var oe=_.animators.length-1;oe>=0;oe--){if(ht=_.animators[oe],ht.destroyed){_.removeAnimator(oe);continue}if(!ht.isAnimatePaused()){zt=ht.get("animations");for(var Pe=zt.length-1;Pe>=0;Pe--)ie=zt[Pe],H=un(ht,ie,ue),H&&(zt.splice(Pe,1),H=!1,ie.callback&&ie.callback())}zt.length===0&&_.removeAnimator(oe)}var tr=_.canvas.get("autoDraw");tr||_.canvas.draw()}})},V.prototype.addAnimator=function(_){this.animators.push(_)},V.prototype.removeAnimator=function(_){this.animators.splice(_,1)},V.prototype.isAnimating=function(){return!!this.animators.length},V.prototype.stop=function(){this.timer&&this.timer.stop()},V.prototype.stopAllAnimations=function(_){_===void 0&&(_=!0),this.animators.forEach(function(H){H.stopAnimate(_)}),this.animators=[],this.canvas.draw()},V.prototype.getTime=function(){return this.current},V}(),Xr=Mr,Fr=J(89473),An=40,Vn=0,ya=":",li=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function fl(V,_){for(var H in V)if(V.hasOwnProperty(H)&&H.indexOf(ya+_)>=0)return!0;return!1}function ma(V,_,H){H.name=_,H.target=V,H.currentTarget=V,H.delegateTarget=V,V.emit(_,H)}function yo(V,_,H){if(H.bubbles){var ht=void 0,zt=!1;if(_==="mouseenter"?(ht=H.fromShape,zt=!0):_==="mouseleave"&&(zt=!0,ht=H.toShape),V.isCanvas()&&zt)return;if(ht&&(0,Bt.UY)(V,ht)){H.bubbles=!1;return}H.name=_,H.currentTarget=V,H.delegateTarget=V,V.emit(_,H)}}var mo=function(){function V(_){var H=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(ht){var zt=ht.type;H._triggerEvent(zt,ht)},this._onDocumentMove=function(ht){var zt=H.canvas,ie=zt.get("el");if(ie!==ht.target&&(H.dragging||H.currentShape)){var ue=H._getPointInfo(ht);H.dragging&&H._emitEvent("drag",ht,ue,H.draggingShape)}},this._onDocumentMouseUp=function(ht){var zt=H.canvas,ie=zt.get("el");if(ie!==ht.target&&H.dragging){var ue=H._getPointInfo(ht);H.draggingShape&&H._emitEvent("drop",ht,ue,null),H._emitEvent("dragend",ht,ue,H.draggingShape),H._afterDrag(H.draggingShape,ue,ht)}},this.canvas=_.canvas}return V.prototype.init=function(){this._bindEvents()},V.prototype._bindEvents=function(){var _=this,H=this.canvas.get("el");(0,Bt.S6)(li,function(ht){H.addEventListener(ht,_._eventCallback)}),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},V.prototype._clearEvents=function(){var _=this,H=this.canvas.get("el");(0,Bt.S6)(li,function(ht){H.removeEventListener(ht,_._eventCallback)}),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},V.prototype._getEventObj=function(_,H,ht,zt,ie,ue){var oe=new Fr.Z(_,H);return oe.fromShape=ie,oe.toShape=ue,oe.x=ht.x,oe.y=ht.y,oe.clientX=ht.clientX,oe.clientY=ht.clientY,oe.propagationPath.push(zt),oe},V.prototype._getShape=function(_,H){return this.canvas.getShape(_.x,_.y,H)},V.prototype._getPointInfo=function(_){var H=this.canvas,ht=H.getClientByEvent(_),zt=H.getPointByEvent(_);return{x:zt.x,y:zt.y,clientX:ht.x,clientY:ht.y}},V.prototype._triggerEvent=function(_,H){var ht=this._getPointInfo(H),zt=this._getShape(ht,H),ie=this["_on"+_],ue=!1;if(ie)ie.call(this,ht,zt,H);else{var oe=this.currentShape;_==="mouseenter"||_==="dragenter"||_==="mouseover"?(this._emitEvent(_,H,ht,null,null,zt),zt&&this._emitEvent(_,H,ht,zt,null,zt),_==="mouseenter"&&this.draggingShape&&this._emitEvent("dragenter",H,ht,null)):_==="mouseleave"||_==="dragleave"||_==="mouseout"?(ue=!0,oe&&this._emitEvent(_,H,ht,oe,oe,null),this._emitEvent(_,H,ht,null,oe,null),_==="mouseleave"&&this.draggingShape&&this._emitEvent("dragleave",H,ht,null)):this._emitEvent(_,H,ht,zt,null,null)}if(ue||(this.currentShape=zt),zt&&!zt.get("destroyed")){var Pe=this.canvas,tr=Pe.get("el");tr.style.cursor=zt.attr("cursor")||Pe.get("cursor")}},V.prototype._onmousedown=function(_,H,ht){ht.button===Vn&&(this.mousedownShape=H,this.mousedownPoint=_,this.mousedownTimeStamp=ht.timeStamp),this._emitEvent("mousedown",ht,_,H,null,null)},V.prototype._emitMouseoverEvents=function(_,H,ht,zt){var ie=this.canvas.get("el");ht!==zt&&(ht&&(this._emitEvent("mouseout",_,H,ht,ht,zt),this._emitEvent("mouseleave",_,H,ht,ht,zt),(!zt||zt.get("destroyed"))&&(ie.style.cursor=this.canvas.get("cursor"))),zt&&(this._emitEvent("mouseover",_,H,zt,ht,zt),this._emitEvent("mouseenter",_,H,zt,ht,zt)))},V.prototype._emitDragoverEvents=function(_,H,ht,zt,ie){zt?(zt!==ht&&(ht&&this._emitEvent("dragleave",_,H,ht,ht,zt),this._emitEvent("dragenter",_,H,zt,ht,zt)),ie||this._emitEvent("dragover",_,H,zt)):ht&&this._emitEvent("dragleave",_,H,ht,ht,zt),ie&&this._emitEvent("dragover",_,H,zt)},V.prototype._afterDrag=function(_,H,ht){_&&(_.set("capture",!0),this.draggingShape=null),this.dragging=!1;var zt=this._getShape(H,ht);zt!==_&&this._emitMouseoverEvents(ht,H,_,zt),this.currentShape=zt},V.prototype._onmouseup=function(_,H,ht){if(ht.button===Vn){var zt=this.draggingShape;this.dragging?(zt&&this._emitEvent("drop",ht,_,H),this._emitEvent("dragend",ht,_,zt),this._afterDrag(zt,_,ht)):(this._emitEvent("mouseup",ht,_,H),H===this.mousedownShape&&this._emitEvent("click",ht,_,H),this.mousedownShape=null,this.mousedownPoint=null)}},V.prototype._ondragover=function(_,H,ht){ht.preventDefault();var zt=this.currentShape;this._emitDragoverEvents(ht,_,zt,H,!0)},V.prototype._onmousemove=function(_,H,ht){var zt=this.canvas,ie=this.currentShape,ue=this.draggingShape;if(this.dragging)ue&&this._emitDragoverEvents(ht,_,ie,H,!1),this._emitEvent("drag",ht,_,ue);else{var oe=this.mousedownPoint;if(oe){var Pe=this.mousedownShape,tr=ht.timeStamp,dr=tr-this.mousedownTimeStamp,Ir=oe.clientX-_.clientX,cn=oe.clientY-_.clientY,Tn=Ir*Ir+cn*cn;dr>120||Tn>An?Pe&&Pe.get("draggable")?(ue=this.mousedownShape,ue.set("capture",!1),this.draggingShape=ue,this.dragging=!0,this._emitEvent("dragstart",ht,_,ue),this.mousedownShape=null,this.mousedownPoint=null):!Pe&&zt.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",ht,_,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(ht,_,ie,H),this._emitEvent("mousemove",ht,_,H)):(this._emitMouseoverEvents(ht,_,ie,H),this._emitEvent("mousemove",ht,_,H))}else this._emitMouseoverEvents(ht,_,ie,H),this._emitEvent("mousemove",ht,_,H)}},V.prototype._emitEvent=function(_,H,ht,zt,ie,ue){var oe=this._getEventObj(_,H,ht,zt,ie,ue);if(zt){oe.shape=zt,ma(zt,_,oe);for(var Pe=zt.getParent();Pe;)Pe.emitDelegation(_,oe),oe.propagationStopped||yo(Pe,_,oe),oe.propagationPath.push(Pe),Pe=Pe.getParent()}else{var tr=this.canvas;ma(tr,_,oe)}},V.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},V}(),hl=mo,Ri="px",xa=(0,wt.qY)(),xo=xa&&xa.name==="firefox",wo=function(V){(0,ct.ZT)(_,V);function _(H){var ht=V.call(this,H)||this;return ht.initContainer(),ht.initDom(),ht.initEvents(),ht.initTimeline(),ht}return _.prototype.getDefaultCfg=function(){var H=V.prototype.getDefaultCfg.call(this);return H.cursor="default",H.supportCSSTransform=!1,H},_.prototype.initContainer=function(){var H=this.get("container");(0,Bt.HD)(H)&&(H=document.getElementById(H),this.set("container",H))},_.prototype.initDom=function(){var H=this.createDom();this.set("el",H);var ht=this.get("container");ht.appendChild(H),this.setDOMSize(this.get("width"),this.get("height"))},_.prototype.initEvents=function(){var H=new hl({canvas:this});H.init(),this.set("eventController",H)},_.prototype.initTimeline=function(){var H=new Xr(this);this.set("timeline",H)},_.prototype.setDOMSize=function(H,ht){var zt=this.get("el");Bt.jU&&(zt.style.width=H+Ri,zt.style.height=ht+Ri)},_.prototype.changeSize=function(H,ht){this.setDOMSize(H,ht),this.set("width",H),this.set("height",ht),this.onCanvasChange("changeSize")},_.prototype.getRenderer=function(){return this.get("renderer")},_.prototype.getCursor=function(){return this.get("cursor")},_.prototype.setCursor=function(H){this.set("cursor",H);var ht=this.get("el");Bt.jU&&ht&&(ht.style.cursor=H)},_.prototype.getPointByEvent=function(H){var ht=this.get("supportCSSTransform");if(ht){if(xo&&!(0,Bt.kK)(H.layerX)&&H.layerX!==H.offsetX)return{x:H.layerX,y:H.layerY};if(!(0,Bt.kK)(H.offsetX))return{x:H.offsetX,y:H.offsetY}}var zt=this.getClientByEvent(H),ie=zt.x,ue=zt.y;return this.getPointByClient(ie,ue)},_.prototype.getClientByEvent=function(H){var ht=H;return H.touches&&(H.type==="touchend"?ht=H.changedTouches[0]:ht=H.touches[0]),{x:ht.clientX,y:ht.clientY}},_.prototype.getPointByClient=function(H,ht){var zt=this.get("el"),ie=zt.getBoundingClientRect();return{x:H-ie.left,y:ht-ie.top}},_.prototype.getClientByPoint=function(H,ht){var zt=this.get("el"),ie=zt.getBoundingClientRect();return{x:H+ie.left,y:ht+ie.top}},_.prototype.draw=function(){},_.prototype.removeDom=function(){var H=this.get("el");H.parentNode.removeChild(H)},_.prototype.clearEvents=function(){var H=this.get("eventController");H.destroy()},_.prototype.isCanvas=function(){return!0},_.prototype.getParent=function(){return null},_.prototype.destroy=function(){var H=this.get("timeline");this.get("destroyed")||(this.clear(),H&&H.stop(),this.clearEvents(),this.removeDom(),V.prototype.destroy.call(this))},_}(Kt.Z),Gn=wo},37153:function(Ee,te,J){"use strict";var ct=J(70655),wt=J(41694),Kt=J(29881),Bt=J(77341),It={},ot="_INDEX";function ut(bt,p){if(bt.set("canvas",p),bt.isGroup()){var c=bt.get("children");c.length&&c.forEach(function(tt){ut(tt,p)})}}function mt(bt,p){if(bt.set("timeline",p),bt.isGroup()){var c=bt.get("children");c.length&&c.forEach(function(tt){mt(tt,p)})}}function St(bt,p){var c=bt.getChildren();return c.indexOf(p)>=0}function jt(bt,p,c){c===void 0&&(c=!0),c?p.destroy():(p.set("parent",null),p.set("canvas",null)),(0,Bt.As)(bt.getChildren(),p)}function Nt(bt){return function(p,c){var tt=bt(p,c);return tt===0?p[ot]-c[ot]:tt}}var _t=function(bt){(0,ct.ZT)(p,bt);function p(){return bt!==null&&bt.apply(this,arguments)||this}return p.prototype.isCanvas=function(){return!1},p.prototype.getBBox=function(){var c=Infinity,tt=-Infinity,K=Infinity,Ct=-Infinity,Mt=[],z=[],W=this.getChildren().filter(function(At){return At.get("visible")&&(!At.isGroup()||At.isGroup()&&At.getChildren().length>0)});W.length>0?((0,Bt.S6)(W,function(At){var Lt=At.getBBox();Mt.push(Lt.minX,Lt.maxX),z.push(Lt.minY,Lt.maxY)}),c=(0,wt.VV)(Mt),tt=(0,wt.Fp)(Mt),K=(0,wt.VV)(z),Ct=(0,wt.Fp)(z)):(c=0,tt=0,K=0,Ct=0);var gt={x:c,y:K,minX:c,minY:K,maxX:tt,maxY:Ct,width:tt-c,height:Ct-K};return gt},p.prototype.getCanvasBBox=function(){var c=Infinity,tt=-Infinity,K=Infinity,Ct=-Infinity,Mt=[],z=[],W=this.getChildren().filter(function(At){return At.get("visible")&&(!At.isGroup()||At.isGroup()&&At.getChildren().length>0)});W.length>0?((0,Bt.S6)(W,function(At){var Lt=At.getCanvasBBox();Mt.push(Lt.minX,Lt.maxX),z.push(Lt.minY,Lt.maxY)}),c=(0,wt.VV)(Mt),tt=(0,wt.Fp)(Mt),K=(0,wt.VV)(z),Ct=(0,wt.Fp)(z)):(c=0,tt=0,K=0,Ct=0);var gt={x:c,y:K,minX:c,minY:K,maxX:tt,maxY:Ct,width:tt-c,height:Ct-K};return gt},p.prototype.getDefaultCfg=function(){var c=bt.prototype.getDefaultCfg.call(this);return c.children=[],c},p.prototype.onAttrChange=function(c,tt,K){if(bt.prototype.onAttrChange.call(this,c,tt,K),c==="matrix"){var Ct=this.getTotalMatrix();this._applyChildrenMarix(Ct)}},p.prototype.applyMatrix=function(c){var tt=this.getTotalMatrix();bt.prototype.applyMatrix.call(this,c);var K=this.getTotalMatrix();K!==tt&&this._applyChildrenMarix(K)},p.prototype._applyChildrenMarix=function(c){var tt=this.getChildren();(0,Bt.S6)(tt,function(K){K.applyMatrix(c)})},p.prototype.addShape=function(){for(var c=[],tt=0;tt=0;z--){var W=c[z];if((0,Bt.pP)(W)&&(W.isGroup()?Mt=W.getShape(tt,K,Ct):W.isHit(tt,K)&&(Mt=W)),Mt)break}return Mt},p.prototype.add=function(c){var tt=this.getCanvas(),K=this.getChildren(),Ct=this.get("timeline"),Mt=c.getParent();Mt&&jt(Mt,c,!1),c.set("parent",this),tt&&ut(c,tt),Ct&&mt(c,Ct),K.push(c),c.onCanvasChange("add"),this._applyElementMatrix(c)},p.prototype._applyElementMatrix=function(c){var tt=this.getTotalMatrix();tt&&c.applyMatrix(tt)},p.prototype.getChildren=function(){return this.get("children")},p.prototype.sort=function(){var c=this.getChildren();(0,Bt.S6)(c,function(tt,K){return tt[ot]=K,tt}),c.sort(Nt(function(tt,K){return tt.get("zIndex")-K.get("zIndex")})),this.onCanvasChange("sort")},p.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var c=this.getChildren(),tt=c.length-1;tt>=0;tt--)c[tt].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},p.prototype.destroy=function(){this.get("destroyed")||(this.clear(),bt.prototype.destroy.call(this))},p.prototype.getFirst=function(){return this.getChildByIndex(0)},p.prototype.getLast=function(){var c=this.getChildren();return this.getChildByIndex(c.length-1)},p.prototype.getChildByIndex=function(c){var tt=this.getChildren();return tt[c]},p.prototype.getCount=function(){var c=this.getChildren();return c.length},p.prototype.contain=function(c){var tt=this.getChildren();return tt.indexOf(c)>-1},p.prototype.removeChild=function(c,tt){tt===void 0&&(tt=!0),this.contain(c)&&c.remove(tt)},p.prototype.findAll=function(c){var tt=[],K=this.getChildren();return(0,Bt.S6)(K,function(Ct){c(Ct)&&tt.push(Ct),Ct.isGroup()&&(tt=tt.concat(Ct.findAll(c)))}),tt},p.prototype.find=function(c){var tt=null,K=this.getChildren();return(0,Bt.S6)(K,function(Ct){if(c(Ct)?tt=Ct:Ct.isGroup()&&(tt=Ct.find(c)),tt)return!1}),tt},p.prototype.findById=function(c){return this.find(function(tt){return tt.get("id")===c})},p.prototype.findByClassName=function(c){return this.find(function(tt){return tt.get("className")===c})},p.prototype.findAllByName=function(c){return this.findAll(function(tt){return tt.get("name")===c})},p}(Kt.Z);te.Z=_t},29881:function(Ee,te,J){"use strict";var ct=J(70655),wt=J(41694),Kt=J(31506),Bt=J(77341),It=J(41482),ot=J(2667),ut=Kt.vs,mt="matrix",St=["zIndex","capture","visible","type"],jt=["repeat"],Nt=":",_t="*";function bt(Ct){for(var Mt=[],z=0;zLt.delay&&(0,wt.S6)(Mt.toAttrs,function(Vt,re){At.call(Lt.toAttrs,re)&&(delete Lt.toAttrs[re],delete Lt.fromAttrs[re])})}),Ct}var K=function(Ct){(0,ct.ZT)(Mt,Ct);function Mt(z){var W=Ct.call(this,z)||this;W.attrs={};var gt=W.getDefaultAttrs();return(0,wt.CD)(gt,z.attrs),W.attrs=gt,W.initAttrs(gt),W.initAnimate(),W}return Mt.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},Mt.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},Mt.prototype.onCanvasChange=function(z){},Mt.prototype.initAttrs=function(z){},Mt.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},Mt.prototype.isGroup=function(){return!1},Mt.prototype.getParent=function(){return this.get("parent")},Mt.prototype.getCanvas=function(){return this.get("canvas")},Mt.prototype.attr=function(){for(var z,W=[],gt=0;gt0?At=tt(At,yt):gt.addAnimator(this),At.push(yt),this.set("animations",At),this.set("_pause",{isPaused:!1})}},Mt.prototype.stopAnimate=function(z){var W=this;z===void 0&&(z=!0);var gt=this.get("animations");(0,wt.S6)(gt,function(At){z&&(At.onFrame?W.attr(At.onFrame(1)):W.attr(At.toAttrs)),At.callback&&At.callback()}),this.set("animating",!1),this.set("animations",[])},Mt.prototype.pauseAnimate=function(){var z=this.get("timeline"),W=this.get("animations"),gt=z.getTime();return(0,wt.S6)(W,function(At){At._paused=!0,At._pauseTime=gt,At.pauseCallback&&At.pauseCallback()}),this.set("_pause",{isPaused:!0,pauseTime:gt}),this},Mt.prototype.resumeAnimate=function(){var z=this.get("timeline"),W=z.getTime(),gt=this.get("animations"),At=this.get("_pause").pauseTime;return(0,wt.S6)(gt,function(Lt){Lt.startTime=Lt.startTime+(W-At),Lt._paused=!1,Lt._pauseTime=null,Lt.resumeCallback&&Lt.resumeCallback()}),this.set("_pause",{isPaused:!1}),this.set("animations",gt),this},Mt.prototype.emitDelegation=function(z,W){var gt=this,At=W.propagationPath,Lt=this.getEvents(),Vt;z==="mouseenter"?Vt=W.fromShape:z==="mouseleave"&&(Vt=W.toShape);for(var re=function(j){var X=At[j],Z=X.get("name");if(Z){if((X.isGroup()||X.isCanvas&&X.isCanvas())&&Vt&&(0,Bt.UY)(X,Vt))return"break";(0,wt.kJ)(Z)?(0,wt.S6)(Z,function(S){gt.emitDelegateEvent(X,S,W)}):st.emitDelegateEvent(X,Z,W)}},st=this,G=0;G=ut&&St.minY<=mt&&St.maxY>=mt},ot.prototype.afterAttrsChange=function(ut){It.prototype.afterAttrsChange.call(this,ut),this.clearCacheBBox()},ot.prototype.getBBox=function(){var ut=this.cfg.bbox;return ut||(ut=this.calculateBBox(),this.set("bbox",ut)),ut},ot.prototype.getCanvasBBox=function(){var ut=this.cfg.canvasBBox;return ut||(ut=this.calculateCanvasBBox(),this.set("canvasBBox",ut)),ut},ot.prototype.applyMatrix=function(ut){It.prototype.applyMatrix.call(this,ut),this.set("canvasBBox",null)},ot.prototype.calculateCanvasBBox=function(){var ut=this.getBBox(),mt=this.getTotalMatrix(),St=ut.minX,jt=ut.minY,Nt=ut.maxX,_t=ut.maxY;if(mt){var bt=(0,Kt.rG)(mt,[ut.minX,ut.minY]),p=(0,Kt.rG)(mt,[ut.maxX,ut.minY]),c=(0,Kt.rG)(mt,[ut.minX,ut.maxY]),tt=(0,Kt.rG)(mt,[ut.maxX,ut.maxY]);St=Math.min(bt[0],p[0],c[0],tt[0]),Nt=Math.max(bt[0],p[0],c[0],tt[0]),jt=Math.min(bt[1],p[1],c[1],tt[1]),_t=Math.max(bt[1],p[1],c[1],tt[1])}var K=this.attrs;if(K.shadowColor){var Ct=K.shadowBlur,Mt=Ct===void 0?0:Ct,z=K.shadowOffsetX,W=z===void 0?0:z,gt=K.shadowOffsetY,At=gt===void 0?0:gt,Lt=St-Mt+W,Vt=Nt+Mt+W,re=jt-Mt+At,st=_t+Mt+At;St=Math.min(St,Lt),Nt=Math.max(Nt,Vt),jt=Math.min(jt,re),_t=Math.max(_t,st)}return{x:St,y:jt,minX:St,minY:jt,maxX:Nt,maxY:_t,width:Nt-St,height:_t-jt}},ot.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBBox",null)},ot.prototype.isClipShape=function(){return this.get("isClipShape")},ot.prototype.isInShape=function(ut,mt){return!1},ot.prototype.isOnlyHitBox=function(){return!1},ot.prototype.isHit=function(ut,mt){var St=this.get("startArrowShape"),jt=this.get("endArrowShape"),Nt=[ut,mt,1];Nt=this.invertFromMatrix(Nt);var _t=Nt[0],bt=Nt[1],p=this._isInBBox(_t,bt);return this.isOnlyHitBox()?p:!!(p&&!this.isClipped(_t,bt)&&(this.isInShape(_t,bt)||St&&St.isHit(_t,bt)||jt&&jt.isHit(_t,bt)))},ot}(wt.Z);te.Z=Bt},97492:function(Ee,te,J){"use strict";J.d(te,{_:function(){return F},C:function(){return N}});var ct={};J.r(ct),J.d(ct,{easeBack:function(){return U},easeBackIn:function(){return M},easeBackInOut:function(){return U},easeBackOut:function(){return O},easeBounce:function(){return Ot},easeBounceIn:function(){return pt},easeBounceInOut:function(){return it},easeBounceOut:function(){return Ot},easeCircle:function(){return Lt},easeCircleIn:function(){return gt},easeCircleInOut:function(){return Lt},easeCircleOut:function(){return At},easeCubic:function(){return mt},easeCubicIn:function(){return ot},easeCubicInOut:function(){return mt},easeCubicOut:function(){return ut},easeElastic:function(){return E},easeElasticIn:function(){return L},easeElasticInOut:function(){return w},easeElasticOut:function(){return E},easeExp:function(){return W},easeExpIn:function(){return Mt},easeExpInOut:function(){return W},easeExpOut:function(){return z},easeLinear:function(){return wt},easePoly:function(){return _t},easePolyIn:function(){return jt},easePolyInOut:function(){return _t},easePolyOut:function(){return Nt},easeQuad:function(){return It},easeQuadIn:function(){return Kt},easeQuadInOut:function(){return It},easeQuadOut:function(){return Bt},easeSin:function(){return K},easeSinIn:function(){return c},easeSinInOut:function(){return K},easeSinOut:function(){return tt}});function wt(k){return+k}function Kt(k){return k*k}function Bt(k){return k*(2-k)}function It(k){return((k*=2)<=1?k*k:--k*(2-k)+1)/2}function ot(k){return k*k*k}function ut(k){return--k*k*k+1}function mt(k){return((k*=2)<=1?k*k*k:(k-=2)*k*k+2)/2}var St=3,jt=function k(q){q=+q;function Q(Tt){return Math.pow(Tt,q)}return Q.exponent=k,Q}(St),Nt=function k(q){q=+q;function Q(Tt){return 1-Math.pow(1-Tt,q)}return Q.exponent=k,Q}(St),_t=function k(q){q=+q;function Q(Tt){return((Tt*=2)<=1?Math.pow(Tt,q):2-Math.pow(2-Tt,q))/2}return Q.exponent=k,Q}(St),bt=Math.PI,p=bt/2;function c(k){return+k==1?1:1-Math.cos(k*p)}function tt(k){return Math.sin(k*p)}function K(k){return(1-Math.cos(bt*k))/2}function Ct(k){return(Math.pow(2,-10*k)-.0009765625)*1.0009775171065494}function Mt(k){return Ct(1-+k)}function z(k){return 1-Ct(k)}function W(k){return((k*=2)<=1?Ct(1-k):2-Ct(k-1))/2}function gt(k){return 1-Math.sqrt(1-k*k)}function At(k){return Math.sqrt(1- --k*k)}function Lt(k){return((k*=2)<=1?1-Math.sqrt(1-k*k):Math.sqrt(1-(k-=2)*k)+1)/2}var Vt=4/11,re=6/11,st=8/11,G=3/4,nt=9/11,j=10/11,X=15/16,Z=21/22,S=63/64,P=1/Vt/Vt;function pt(k){return 1-Ot(1-k)}function Ot(k){return(k=+k)Math.PI/2?Math.PI-nt:nt,j=j>Math.PI/2?Math.PI-j:j;var X={xExtra:Math.cos(G/2-nt)*(W/2*(1/Math.sin(G/2)))-W/2||0,yExtra:Math.cos(j-G/2)*(W/2*(1/Math.sin(G/2)))-W/2||0};return X}function K(z){var W=z.attr(),gt=W.path,At=W.stroke,Lt=At?W.lineWidth:0,Vt=z.get("segments")||(0,bt.zx)(gt),re=c(Vt,Lt),st=re.x,G=re.y,nt=re.width,j=re.height,X={minX:st,minY:G,maxX:st+nt,maxY:G+j};return X=mt(z,X),{x:X.minX,y:X.minY,width:X.maxX-X.minX,height:X.maxY-X.minY}}function Ct(z){var W=z.attr(),gt=W.x1,At=W.y1,Lt=W.x2,Vt=W.y2,re=Math.min(gt,Lt),st=Math.max(gt,Lt),G=Math.min(At,Vt),nt=Math.max(At,Vt),j={minX:re,maxX:st,minY:G,maxY:nt};return j=mt(z,j),{x:j.minX,y:j.minY,width:j.maxX-j.minX,height:j.maxY-j.minY}}function Mt(z){var W=z.attr(),gt=W.x,At=W.y,Lt=W.rx,Vt=W.ry;return{x:gt-Lt,y:At-Vt,width:Lt*2,height:Vt*2}}wt("rect",Bt),wt("image",Bt),wt("circle",It),wt("marker",It),wt("polyline",St),wt("polygon",jt),wt("text",_t),wt("path",K),wt("line",Ct),wt("ellipse",Mt)},89473:function(Ee,te){"use strict";var J=function(){function ct(wt,Kt){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=wt,this.name=wt,this.originalEvent=Kt,this.timeStamp=Kt.timeStamp}return ct.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},ct.prototype.stopPropagation=function(){this.propagationStopped=!0},ct.prototype.toString=function(){var wt=this.type;return"[Event (type="+wt+")]"},ct.prototype.save=function(){},ct.prototype.restore=function(){},ct}();te.Z=J},98190:function(Ee,te,J){"use strict";J.r(te),J.d(te,{Event:function(){return mt.Z},Base:function(){return St.Z},AbstractCanvas:function(){return jt.Z},AbstractGroup:function(){return Nt.Z},AbstractShape:function(){return _t.Z},PathUtil:function(){return ct},getBBoxMethod:function(){return bt.b},registerBBox:function(){return bt.W},getTextHeight:function(){return p.FE},assembleFont:function(){return p.$O},isAllowCapture:function(){return c.pP},multiplyVec2:function(){return tt.rG},invert:function(){return tt.U_},getOffScreenContext:function(){return K.L},registerEasing:function(){return Ct.C},version:function(){return Mt}});var ct=J(47575),wt=J(52),Kt=J.n(wt),Bt={};for(var It in wt)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","registerEasing","version"].indexOf(It)<0&&(Bt[It]=function(z){return wt[z]}.bind(0,It));J.d(te,Bt);var ot=J(15294),ut=J.n(ot),Bt={};for(var It in ot)["default","Event","Base","AbstractCanvas","AbstractGroup","AbstractShape","PathUtil","getBBoxMethod","registerBBox","getTextHeight","assembleFont","isAllowCapture","multiplyVec2","invert","getOffScreenContext","registerEasing","version"].indexOf(It)<0&&(Bt[It]=function(W){return ot[W]}.bind(0,It));J.d(te,Bt);var mt=J(89473),St=J(2667),jt=J(96298),Nt=J(31841),_t=J(15032),bt=J(78393),p=J(8723),c=J(77341),tt=J(41482),K=J(67052),Ct=J(97492),Mt="0.5.11"},15294:function(){},52:function(){},41482:function(Ee,te,J){"use strict";J.d(te,{xq:function(){return ct},rG:function(){return wt},U_:function(){return Kt}});function ct(Bt,It){var ot=[],ut=Bt[0],mt=Bt[1],St=Bt[2],jt=Bt[3],Nt=Bt[4],_t=Bt[5],bt=Bt[6],p=Bt[7],c=Bt[8],tt=It[0],K=It[1],Ct=It[2],Mt=It[3],z=It[4],W=It[5],gt=It[6],At=It[7],Lt=It[8];return ot[0]=tt*ut+K*jt+Ct*bt,ot[1]=tt*mt+K*Nt+Ct*p,ot[2]=tt*St+K*_t+Ct*c,ot[3]=Mt*ut+z*jt+W*bt,ot[4]=Mt*mt+z*Nt+W*p,ot[5]=Mt*St+z*_t+W*c,ot[6]=gt*ut+At*jt+Lt*bt,ot[7]=gt*mt+At*Nt+Lt*p,ot[8]=gt*St+At*_t+Lt*c,ot}function wt(Bt,It){var ot=[],ut=It[0],mt=It[1];return ot[0]=Bt[0]*ut+Bt[3]*mt+Bt[6],ot[1]=Bt[1]*ut+Bt[4]*mt+Bt[7],ot}function Kt(Bt){var It=[],ot=Bt[0],ut=Bt[1],mt=Bt[2],St=Bt[3],jt=Bt[4],Nt=Bt[5],_t=Bt[6],bt=Bt[7],p=Bt[8],c=p*jt-Nt*bt,tt=-p*St+Nt*_t,K=bt*St-jt*_t,Ct=ot*c+ut*tt+mt*K;return Ct?(Ct=1/Ct,It[0]=c*Ct,It[1]=(-p*ut+mt*bt)*Ct,It[2]=(Nt*ut-mt*jt)*Ct,It[3]=tt*Ct,It[4]=(p*ot-mt*_t)*Ct,It[5]=(-Nt*ot+mt*St)*Ct,It[6]=K*Ct,It[7]=(-bt*ot+ut*_t)*Ct,It[8]=(jt*ot-ut*St)*Ct,It):null}},67052:function(Ee,te,J){"use strict";J.d(te,{L:function(){return wt}});var ct=null;function wt(){if(!ct){var Kt=document.createElement("canvas");Kt.width=1,Kt.height=1,ct=Kt.getContext("2d")}return ct}},47575:function(Ee,te,J){"use strict";J.r(te),J.d(te,{catmullRomToBezier:function(){return ot},fillPath:function(){return X},fillPathByDiff:function(){return pt},formatPath:function(){return yt},intersection:function(){return st},parsePathArray:function(){return p},parsePathString:function(){return It},pathToAbsolute:function(){return mt},pathToCurve:function(){return _t},rectPath:function(){return z}});var ct=J(41694),wt=` \v\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029`,Kt=new RegExp("([a-z])["+wt+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+wt+"]*,?["+wt+"]*)+)","ig"),Bt=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+wt+"]*,?["+wt+"]*","ig"),It=function(M){if(!M)return null;if((0,ct.kJ)(M))return M;var O={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},U=[];return String(M).replace(Kt,function(D,at,ft){var L=[],E=at.toLowerCase();if(ft.replace(Bt,function(w,T){T&&L.push(+T)}),E==="m"&&L.length>2&&(U.push([at].concat(L.splice(0,2))),E="l",at=at==="m"?"l":"L"),E==="o"&&L.length===1&&U.push([at,L[0]]),E==="r")U.push([at].concat(L));else for(;L.length>=O[E]&&(U.push([at].concat(L.splice(0,O[E]))),!!O[E]););return M}),U},ot=function(M,O){for(var U=[],D=0,at=M.length;at-2*!O>D;D+=2){var ft=[{x:+M[D-2],y:+M[D-1]},{x:+M[D],y:+M[D+1]},{x:+M[D+2],y:+M[D+3]},{x:+M[D+4],y:+M[D+5]}];O?D?at-4===D?ft[3]={x:+M[0],y:+M[1]}:at-2===D&&(ft[2]={x:+M[0],y:+M[1]},ft[3]={x:+M[2],y:+M[3]}):ft[0]={x:+M[at-2],y:+M[at-1]}:at-4===D?ft[3]=ft[2]:D||(ft[0]={x:+M[D],y:+M[D+1]}),U.push(["C",(-ft[0].x+6*ft[1].x+ft[2].x)/6,(-ft[0].y+6*ft[1].y+ft[2].y)/6,(ft[1].x+6*ft[2].x-ft[3].x)/6,(ft[1].y+6*ft[2].y-ft[3].y)/6,ft[2].x,ft[2].y])}return U},ut=function(M,O,U,D,at){var ft=[];if(at===null&&D===null&&(D=U),M=+M,O=+O,U=+U,D=+D,at!==null){var L=Math.PI/180,E=M+U*Math.cos(-D*L),w=M+U*Math.cos(-at*L),T=O+U*Math.sin(-D*L),F=O+U*Math.sin(-at*L);ft=[["M",E,T],["A",U,U,0,+(at-D>180),0,w,F]]}else ft=[["M",M,O],["m",0,-D],["a",U,D,0,1,1,0,2*D],["a",U,D,0,1,1,0,-2*D],["z"]];return ft},mt=function(M){if(M=It(M),!M||!M.length)return[["M",0,0]];var O=[],U=0,D=0,at=0,ft=0,L=0,E,w;M[0][0]==="M"&&(U=+M[0][1],D=+M[0][2],at=U,ft=D,L++,O[0]=["M",U,D]);for(var T=M.length===3&&M[0][0]==="M"&&M[1][0].toUpperCase()==="R"&&M[2][0].toUpperCase()==="Z",F=void 0,N=void 0,k=L,q=M.length;k1&&(R=Math.sqrt(R),U=R*U,D=R*D);var Y=U*U,et=D*D,dt=(ft===L?-1:1)*Math.sqrt(Math.abs((Y*et-Y*Yt*Yt-et*$t*$t)/(Y*Yt*Yt+et*$t*$t)));qt=dt*U*Yt/D+(M+E)/2,Wt=dt*-D*$t/U+(O+w)/2,Q=Math.asin(((O-Wt)/D).toFixed(9)),Tt=Math.asin(((w-Wt)/D).toFixed(9)),Q=MTt&&(Q=Q-Math.PI*2),!L&&Tt>Q&&(Tt=Tt-Math.PI*2)}var Rt=Tt-Q;if(Math.abs(Rt)>F){var Ht=Tt,Gt=E,Ut=w;Tt=Q+F*(L&&Tt>Q?1:-1),E=qt+U*Math.cos(Tt),w=Wt+D*Math.sin(Tt),k=Nt(E,w,U,D,at,0,L,Gt,Ut,[Tt,Ht,qt,Wt])}Rt=Tt-Q;var Pt=Math.cos(Q),ee=Math.sin(Q),Jt=Math.cos(Tt),ce=Math.sin(Tt),ye=Math.tan(Rt/4),se=4/3*U*ye,de=4/3*D*ye,pe=[M,O],me=[M+se*ee,O-de*Pt],le=[E+se*ce,w-de*Jt],be=[E,w];if(me[0]=2*pe[0]-me[0],me[1]=2*pe[1]-me[1],T)return[me,le,be].concat(k);k=[me,le,be].concat(k).join().split(",");for(var Ie=[],Me=0,De=k.length;Me7){$t[Yt].shift();for(var R=$t[Yt];R.length;)L[Yt]="A",D&&(E[Yt]="A"),$t.splice(Yt++,0,["C"].concat(R.splice(0,6)));$t.splice(Yt,1),F=Math.max(U.length,D&&D.length||0)}},q=function($t,Yt,R,Y,et){$t&&Yt&&$t[et][0]==="M"&&Yt[et][0]!=="M"&&(Yt.splice(et,0,["M",Y.x,Y.y]),R.bx=0,R.by=0,R.x=$t[et][1],R.y=$t[et][2],F=Math.max(U.length,D&&D.length||0))};F=Math.max(U.length,D&&D.length||0);for(var Q=0;Q1?1:w<0?0:w;for(var T=w/2,F=12,N=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],k=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],q=0,Q=0;Q0&&q<1&&w.push(q);continue}var Tt=N*N-4*k*F,qt=Math.sqrt(Tt);if(!(Tt<0)){var Wt=(-N+qt)/(2*F);Wt>0&&Wt<1&&w.push(Wt);var ne=(-N-qt)/(2*F);ne>0&&ne<1&&w.push(ne)}}for(var $t=w.length,Yt=$t,R;$t--;)q=w[$t],R=1-q,T[0][$t]=R*R*R*M+3*R*R*q*U+3*R*q*q*at+q*q*q*L,T[1][$t]=R*R*R*O+3*R*R*q*D+3*R*q*q*ft+q*q*q*E;return T[0][Yt]=M,T[1][Yt]=O,T[0][Yt+1]=L,T[1][Yt+1]=E,T[0].length=T[1].length=Yt+2,{min:{x:Math.min.apply(0,T[0]),y:Math.min.apply(0,T[1])},max:{x:Math.max.apply(0,T[0]),y:Math.max.apply(0,T[1])}}},Ct=function(M,O,U,D,at,ft,L,E){if(!(Math.max(M,U)Math.max(at,L)||Math.max(O,D)Math.max(ft,E))){var w=(M*D-O*U)*(at-L)-(M-U)*(at*E-ft*L),T=(M*D-O*U)*(ft-E)-(O-D)*(at*E-ft*L),F=(M-U)*(ft-E)-(O-D)*(at-L);if(!!F){var N=w/F,k=T/F,q=+N.toFixed(2),Q=+k.toFixed(2);if(!(q<+Math.min(M,U).toFixed(2)||q>+Math.max(M,U).toFixed(2)||q<+Math.min(at,L).toFixed(2)||q>+Math.max(at,L).toFixed(2)||Q<+Math.min(O,D).toFixed(2)||Q>+Math.max(O,D).toFixed(2)||Q<+Math.min(ft,E).toFixed(2)||Q>+Math.max(ft,E).toFixed(2)))return{x:N,y:k}}}},Mt=function(M,O,U){return O>=M.x&&O<=M.x+M.width&&U>=M.y&&U<=M.y+M.height},z=function(M,O,U,D,at){if(at)return[["M",+M+ +at,O],["l",U-at*2,0],["a",at,at,0,0,1,at,at],["l",0,D-at*2],["a",at,at,0,0,1,-at,at],["l",at*2-U,0],["a",at,at,0,0,1,-at,-at],["l",0,at*2-D],["a",at,at,0,0,1,at,-at],["z"]];var ft=[["M",M,O],["l",U,0],["l",0,D],["l",-U,0],["z"]];return ft.parsePathArray=p,ft},W=function(M,O,U,D){return M===null&&(M=O=U=D=0),O===null&&(O=M.y,U=M.width,D=M.height,M=M.x),{x:M,y:O,width:U,w:U,height:D,h:D,x2:M+U,y2:O+D,cx:M+U/2,cy:O+D/2,r1:Math.min(U,D)/2,r2:Math.max(U,D)/2,r0:Math.sqrt(U*U+D*D)/2,path:z(M,O,U,D),vb:[M,O,U,D].join(" ")}},gt=function(M,O){return M=W(M),O=W(O),Mt(O,M.x,M.y)||Mt(O,M.x2,M.y)||Mt(O,M.x,M.y2)||Mt(O,M.x2,M.y2)||Mt(M,O.x,O.y)||Mt(M,O.x2,O.y)||Mt(M,O.x,O.y2)||Mt(M,O.x2,O.y2)||(M.xO.x||O.xM.x)&&(M.yO.y||O.yM.y)},At=function(M,O,U,D,at,ft,L,E){(0,ct.kJ)(M)||(M=[M,O,U,D,at,ft,L,E]);var w=K.apply(null,M);return W(w.min.x,w.min.y,w.max.x-w.min.x,w.max.y-w.min.y)},Lt=function(M,O,U,D,at,ft,L,E,w){var T=1-w,F=Math.pow(T,3),N=Math.pow(T,2),k=w*w,q=k*w,Q=F*M+N*3*w*U+T*3*w*w*at+q*L,Tt=F*O+N*3*w*D+T*3*w*w*ft+q*E,qt=M+2*w*(U-M)+k*(at-2*U+M),Wt=O+2*w*(D-O)+k*(ft-2*D+O),ne=U+2*w*(at-U)+k*(L-2*at+U),$t=D+2*w*(ft-D)+k*(E-2*ft+D),Yt=T*M+w*U,R=T*O+w*D,Y=T*at+w*L,et=T*ft+w*E,dt=90-Math.atan2(qt-ne,Wt-$t)*180/Math.PI;return{x:Q,y:Tt,m:{x:qt,y:Wt},n:{x:ne,y:$t},start:{x:Yt,y:R},end:{x:Y,y:et},alpha:dt}},Vt=function(M,O,U){var D=At(M),at=At(O);if(!gt(D,at))return U?0:[];for(var ft=tt.apply(0,M),L=tt.apply(0,O),E=~~(ft/8),w=~~(L/8),T=[],F=[],N={},k=U?0:[],q=0;q=0&&et<=1&&dt>=0&&dt<=1&&(U?k+=1:k.push({x:Y.x,y:Y.y,t1:et,t2:dt}))}}return k},re=function(M,O,U){M=_t(M),O=_t(O);for(var D,at,ft,L,E,w,T,F,N,k,q=U?0:[],Q=0,Tt=M.length;Q=3&&(N.length===3&&k.push("Q"),k=k.concat(N[1])),N.length===2&&k.push("L"),k=k.concat(N[N.length-1]),k});return F}var j=function(M,O,U){if(U===1)return[[].concat(M)];var D=[];if(O[0]==="L"||O[0]==="C"||O[0]==="Q")D=D.concat(nt(M,O,U));else{var at=[].concat(M);at[0]==="M"&&(at[0]="L");for(var ft=0;ft<=U-1;ft++)D.push(at)}return D},X=function(M,O){if(M.length===1)return M;var U=M.length-1,D=O.length-1,at=U/D,ft=[];if(M.length===1&&M[0][0]==="M"){for(var L=0;L=0;w--)L=ft[w].index,ft[w].type==="add"?M.splice(L,0,[].concat(M[L])):M.splice(L,1)}D=M.length;var N=at-D;if(D0)U=Ot(U,M[D-1],1);else{M[D]=O[D];break}M[D]=["Q"].concat(U.reduce(function(at,ft){return at.concat(ft)},[]));break;case"T":M[D]=["T"].concat(U[0]);break;case"C":if(U.length<3)if(D>0)U=Ot(U,M[D-1],2);else{M[D]=O[D];break}M[D]=["C"].concat(U.reduce(function(at,ft){return at.concat(ft)},[]));break;case"S":if(U.length<2)if(D>0)U=Ot(U,M[D-1],1);else{M[D]=O[D];break}M[D]=["S"].concat(U.reduce(function(at,ft){return at.concat(ft)},[]));break;default:M[D]=O[D]}return M}},8723:function(Ee,te,J){"use strict";J.d(te,{FE:function(){return Kt},mY:function(){return It},$O:function(){return ot}});var ct=J(77341),wt=J(67052);function Kt(ut,mt,St){var jt=1;if((0,ct.HD)(ut)&&(jt=ut.split(` `).length),jt>1){var Nt=Bt(mt,St);return mt*jt+Nt*(jt-1)}return mt}function Bt(ut,mt){return mt?mt-ut:ut*.14}function It(ut,mt){var St=(0,wt.L)(),jt=0;if((0,ct.kK)(ut)||ut==="")return jt;if(St.save(),St.font=mt,(0,ct.HD)(ut)&&ut.includes(` `)){var Nt=ut.split(` `);(0,ct.S6)(Nt,function(_t){var bt=St.measureText(_t).width;jtq?Kt(w,T,F,N):this.pointToLine(L,E,w,T,F,N)},pointToLine:function(L,E,w,T,F,N){var k=[w-L,T-E];if(mt.I6(k,[0,0]))return Math.sqrt((F-L)*(F-L)+(N-E)*(N-E));var q=[-k[1],k[0]];mt.Fv(q,q);var Q=[F-L,N-E];return Math.abs(mt.AK(Q,q))},tangentAngle:function(L,E,w,T){return Math.atan2(T-E,w-L)}},jt=1e-4;function Nt(L,E,w,T,F,N){var k,q=Infinity,Q=[w,T],Tt=20;N&&N>200&&(Tt=N/10);for(var qt=1/Tt,Wt=qt/10,ne=0;ne<=Tt;ne++){var $t=ne*qt,Yt=[F.apply(null,L.concat([$t])),F.apply(null,E.concat([$t]))],R=Kt(Q[0],Q[1],Yt[0],Yt[1]);R=0&&R=0?[F]:[]}function c(L,E,w,T){return 2*(1-T)*(E-L)+2*T*(w-E)}function tt(L,E,w,T,F,N,k){var q=bt(L,w,F,k),Q=bt(E,T,N,k),Tt=St.pointAt(L,E,w,T,k),qt=St.pointAt(w,T,F,N,k);return[[L,E,Tt.x,Tt.y,q,Q],[q,Q,qt.x,qt.y,F,N]]}function K(L,E,w,T,F,N,k){if(k===0)return(Kt(L,E,w,T)+Kt(w,T,F,N)+Kt(L,E,F,N))/2;var q=tt(L,E,w,T,F,N,.5),Q=q[0],Tt=q[1];return Q.push(k-1),Tt.push(k-1),K.apply(null,Q)+K.apply(null,Tt)}var Ct={box:function(L,E,w,T,F,N){var k=p(L,w,F)[0],q=p(E,T,N)[0],Q=[L,F],Tt=[E,N];return k!==void 0&&Q.push(bt(L,w,F,k)),q!==void 0&&Tt.push(bt(E,T,N,q)),It(Q,Tt)},length:function(L,E,w,T,F,N){return K(L,E,w,T,F,N,3)},nearestPoint:function(L,E,w,T,F,N,k,q){return Nt([L,w,F],[E,T,N],k,q,bt)},pointDistance:function(L,E,w,T,F,N,k,q){var Q=this.nearestPoint(L,E,w,T,F,N,k,q);return Kt(Q.x,Q.y,k,q)},interpolationAt:bt,pointAt:function(L,E,w,T,F,N,k){return{x:bt(L,w,F,k),y:bt(E,T,N,k)}},divide:function(L,E,w,T,F,N,k){return tt(L,E,w,T,F,N,k)},tangentAngle:function(L,E,w,T,F,N,k){var q=c(L,w,F,k),Q=c(E,T,N,k),Tt=Math.atan2(Q,q);return ut(Tt)}};function Mt(L,E,w,T,F){var N=1-F;return N*N*N*L+3*E*F*N*N+3*w*F*F*N+T*F*F*F}function z(L,E,w,T,F){var N=1-F;return 3*(N*N*(E-L)+2*N*F*(w-E)+F*F*(T-w))}function W(L,E,w,T){var F=-3*L+9*E-9*w+3*T,N=6*L-12*E+6*w,k=3*E-3*L,q=[],Q,Tt,qt;if(Bt(F,0))Bt(N,0)||(Q=-k/N,Q>=0&&Q<=1&&q.push(Q));else{var Wt=N*N-4*F*k;Bt(Wt,0)?q.push(-N/(2*F)):Wt>0&&(qt=Math.sqrt(Wt),Q=(-N+qt)/(2*F),Tt=(-N-qt)/(2*F),Q>=0&&Q<=1&&q.push(Q),Tt>=0&&Tt<=1&&q.push(Tt))}return q}function gt(L,E,w,T,F,N,k,q,Q){var Tt=Mt(L,w,F,k,Q),qt=Mt(E,T,N,q,Q),Wt=St.pointAt(L,E,w,T,Q),ne=St.pointAt(w,T,F,N,Q),$t=St.pointAt(F,N,k,q,Q),Yt=St.pointAt(Wt.x,Wt.y,ne.x,ne.y,Q),R=St.pointAt(ne.x,ne.y,$t.x,$t.y,Q);return[[L,E,Wt.x,Wt.y,Yt.x,Yt.y,Tt,qt],[Tt,qt,R.x,R.y,$t.x,$t.y,k,q]]}function At(L,E,w,T,F,N,k,q,Q){if(Q===0)return _t([L,w,F,k],[E,T,N,q]);var Tt=gt(L,E,w,T,F,N,k,q,.5),qt=Tt[0],Wt=Tt[1];return qt.push(Q-1),Wt.push(Q-1),At.apply(null,qt)+At.apply(null,Wt)}var Lt={extrema:W,box:function(L,E,w,T,F,N,k,q){for(var Q=[L,k],Tt=[E,q],qt=W(L,w,F,k),Wt=W(E,T,N,q),ne=0;ne0?w:w*-1}var re={box:function(L,E,w,T){return{x:L-w,y:E-T,width:w*2,height:T*2}},length:function(L,E,w,T){return Math.PI*(3*(w+T)-Math.sqrt((3*w+T)*(w+3*T)))},nearestPoint:function(L,E,w,T,F,N){var k=w,q=T;if(k===0||q===0)return{x:L,y:E};for(var Q=F-L,Tt=N-E,qt=Math.abs(Q),Wt=Math.abs(Tt),ne=k*k,$t=q*q,Yt=Math.PI/4,R,Y,et=0;et<4;et++){R=k*Math.cos(Yt),Y=q*Math.sin(Yt);var dt=(ne-$t)*Math.pow(Math.cos(Yt),3)/k,Rt=($t-ne)*Math.pow(Math.sin(Yt),3)/q,Ht=R-dt,Gt=Y-Rt,Ut=qt-dt,Pt=Wt-Rt,ee=Math.hypot(Gt,Ht),Jt=Math.hypot(Pt,Ut),ce=ee*Math.asin((Ht*Pt-Gt*Ut)/(ee*Jt)),ye=ce/Math.sqrt(ne+$t-R*R-Y*Y);Yt+=ye,Yt=Math.min(Math.PI/2,Math.max(0,Yt))}return{x:L+Vt(R,Q),y:E+Vt(Y,Tt)}},pointDistance:function(L,E,w,T,F,N){var k=this.nearestPoint(L,E,w,T,F,N);return Kt(k.x,k.y,F,N)},pointAt:function(L,E,w,T,F){var N=2*Math.PI*F;return{x:L+w*Math.cos(N),y:E+T*Math.sin(N)}},tangentAngle:function(L,E,w,T,F){var N=2*Math.PI*F,k=Math.atan2(T*Math.cos(N),-w*Math.sin(N));return ut(k)}};function st(L,E,w,T,F,N,k,q){return-1*w*Math.cos(F)*Math.sin(q)-T*Math.sin(F)*Math.cos(q)}function G(L,E,w,T,F,N,k,q){return-1*w*Math.sin(F)*Math.sin(q)+T*Math.cos(F)*Math.cos(q)}function nt(L,E,w){return Math.atan(-E/L*Math.tan(w))}function j(L,E,w){return Math.atan(E/(L*Math.tan(w)))}function X(L,E,w,T,F,N){return w*Math.cos(F)*Math.cos(N)-T*Math.sin(F)*Math.sin(N)+L}function Z(L,E,w,T,F,N){return w*Math.sin(F)*Math.cos(N)+T*Math.cos(F)*Math.sin(N)+E}function S(L,E,w,T){var F=Math.atan2(T*L,w*E);return(F+Math.PI*2)%(Math.PI*2)}function P(L,E,w){return{x:L*Math.cos(w),y:E*Math.sin(w)}}function pt(L,E,w){var T=Math.cos(w),F=Math.sin(w);return[L*T-E*F,L*F+E*T]}var Ot={box:function(L,E,w,T,F,N,k){for(var q=nt(w,T,F),Q=Infinity,Tt=-Infinity,qt=[N,k],Wt=-Math.PI*2;Wt<=Math.PI*2;Wt+=Math.PI){var ne=q+Wt;NTt&&(Tt=$t)}for(var Yt=j(w,T,F),R=Infinity,Y=-Infinity,et=[N,k],Wt=-Math.PI*2;Wt<=Math.PI*2;Wt+=Math.PI){var dt=Yt+Wt;NY&&(Y=Rt)}return{x:Q,y:R,width:Tt-Q,height:Y-R}},length:function(L,E,w,T,F,N,k){},nearestPoint:function(L,E,w,T,F,N,k,q,Q){var Tt=pt(q-L,Q-E,-F),qt=Tt[0],Wt=Tt[1],ne=re.nearestPoint(0,0,w,T,qt,Wt),$t=S(w,T,ne.x,ne.y);$tk&&(ne=P(w,T,k));var Yt=pt(ne.x,ne.y,F);return{x:Yt[0]+L,y:Yt[1]+E}},pointDistance:function(L,E,w,T,F,N,k,q,Q){var Tt=this.nearestPoint(L,E,w,T,q,Q);return Kt(Tt.x,Tt.y,q,Q)},pointAt:function(L,E,w,T,F,N,k,q){var Q=(k-N)*q+N;return{x:X(L,E,w,T,F,Q),y:Z(L,E,w,T,F,Q)}},tangentAngle:function(L,E,w,T,F,N,k,q){var Q=(k-N)*q+N,Tt=st(L,E,w,T,F,N,k,Q),qt=G(L,E,w,T,F,N,k,Q);return ut(Math.atan2(qt,Tt))}};function it(L){for(var E=0,w=[],T=0;T1||E<0||L.length<2)return null;var w=it(L),T=w.segments,F=w.totalLength;if(F===0)return{x:L[0][0],y:L[0][1]};for(var N=0,k=null,q=0;q=N&&E<=N+Wt){var ne=(E-N)/Wt;k=St.pointAt(Tt[0],Tt[1],qt[0],qt[1],ne);break}N+=Wt}return k}function O(L,E){if(E>1||E<0||L.length<2)return 0;for(var w=it(L),T=w.segments,F=w.totalLength,N=0,k=0,q=0;q=N&&E<=N+Wt){k=Math.atan2(qt[1]-Tt[1],qt[0]-Tt[0]);break}N+=Wt}return k}function U(L,E,w){for(var T=Infinity,F=0;F]*>/,pt={tr:document.createElement("tbody"),tbody:Z,thead:Z,tfoot:Z,td:S,th:S,"*":document.createElement("div")}}function it(r){Z||Ot();var e=P.test(r)&&RegExp.$1;(!e||!(e in pt))&&(e="*");var t=pt[e];r=typeof r=="string"?r.replace(/(^\s*)|(\s*$)/g,""):r,t.innerHTML=""+r;var n=t.childNodes[0];return n&&t.contains(n)&&t.removeChild(n),n}function yt(r,e){if(r)for(var t in e)e.hasOwnProperty(t)&&(r.style[t]=e[t]);return r}function M(r){var e=getComputedStyle(r);return{width:(r.clientWidth||parseInt(e.width,10))-parseInt(e.paddingLeft,10)-parseInt(e.paddingRight,10),height:(r.clientHeight||parseInt(e.height,10))-parseInt(e.paddingTop,10)-parseInt(e.paddingBottom,10)}}function O(r){return typeof r=="number"&&!isNaN(r)}function U(r,e,t,n){var i=t,a=n;if(e){var o=M(r);i=o.width?o.width:i,a=o.height?o.height:a}return{width:Math.max(O(i)?i:re,re),height:Math.max(O(a)?a:st,st)}}function D(r){var e=r.parentNode;e&&e.removeChild(r)}var at=J(90494),ft=function(r){(0,p.ZT)(e,r);function e(t){var n=r.call(this)||this;n.destroyed=!1;var i=t.visible,a=i===void 0?!0:i;return n.visible=a,n}return e.prototype.show=function(){var t=this.visible;t||this.changeVisible(!0)},e.prototype.hide=function(){var t=this.visible;t&&this.changeVisible(!1)},e.prototype.destroy=function(){this.off(),this.destroyed=!0},e.prototype.changeVisible=function(t){this.visible!==t&&(this.visible=t)},e}(at.Z),L=ft,E=J(98190),w=0,T=1/2,F=1/2,N=.05,k=function(){function r(e){var t=e.xField,n=e.yField,i=e.adjustNames,a=i===void 0?["x","y"]:i,o=e.dimValuesMap;this.adjustNames=a,this.xField=t,this.yField=n,this.dimValuesMap=o}return r.prototype.isAdjust=function(e){return this.adjustNames.indexOf(e)>=0},r.prototype.getAdjustRange=function(e,t,n){var i=this.yField,a=n.indexOf(t),o=n.length,s,l;return!i&&this.isAdjust("y")?(s=0,l=1):o>1?(s=n[a===0?0:a-1],l=n[a===o-1?o-1:a+1],a!==0?s+=(t-s)/2:s-=(l-t)/2,a!==o-1?l-=(l-t)/2:l+=(t-n[o-2])/2):(s=t===0?0:t-.5,l=t===0?1:t+.5),{pre:s,next:l}},r.prototype.adjustData=function(e,t){var n=this,i=this.getDimValues(t);c.S6(e,function(a,o){c.S6(i,function(s,l){n.adjustDim(l,s,a,o)})})},r.prototype.groupData=function(e,t){return c.S6(e,function(n){n[t]===void 0&&(n[t]=w)}),c.vM(e,t)},r.prototype.adjustDim=function(e,t,n,i){},r.prototype.getDimValues=function(e){var t=this,n=t.xField,i=t.yField,a=c.f0({},this.dimValuesMap),o=[];if(n&&this.isAdjust("x")&&o.push(n),i&&this.isAdjust("y")&&o.push(i),o.forEach(function(l){a&&a[l]||(a[l]=c.I(e,l).sort(function(u,f){return u-f}))}),!i&&this.isAdjust("y")){var s="y";a[s]=[w,1]}return a},r}(),q=k,Q={},Tt=function(r){return Q[r.toLowerCase()]},qt=function(r,e){if(Tt(r))throw new Error("Adjust type '"+r+"' existed.");Q[r.toLowerCase()]=e};/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var Wt=function(e,t){return Wt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)i.hasOwnProperty(a)&&(n[a]=i[a])},Wt(e,t)};function ne(r,e){Wt(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var $t=function(){return $t=Object.assign||function(t){for(var n,i=1,a=arguments.length;i=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a}function Y(r,e){return function(t,n){e(t,n,r)}}function et(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)}function dt(r,e,t,n){function i(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(f){try{u(n.next(f))}catch(h){o(h)}}function l(f){try{u(n.throw(f))}catch(h){o(h)}}function u(f){f.done?a(f.value):i(f.value).then(s,l)}u((n=n.apply(r,e||[])).next())})}function Rt(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(f){return l([u,f])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Pt(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return a}function ee(){for(var r=[],e=0;e1||s(v,d)})})}function s(v,d){try{l(n[v](d))}catch(g){h(a[0][3],g)}}function l(v){v.value instanceof ce?Promise.resolve(v.value.v).then(u,f):h(a[0][2],v)}function u(v){s("next",v)}function f(v){s("throw",v)}function h(v,d){v(d),a.shift(),a.length&&s(a[0][0],a[0][1])}}function se(r){var e,t;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,a){e[i]=r[i]?function(o){return(t=!t)?{value:ce(r[i](o)),done:i==="return"}:a?a(o):o}:a}}function de(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof Ut=="function"?Ut(r):r[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(a){t[a]=r[a]&&function(o){return new Promise(function(s,l){o=r[a](o),i(s,l,o.done,o.value)})}}function i(a,o,s,l){Promise.resolve(l).then(function(u){a({value:u,done:s})},o)}}function pe(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}function me(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)Object.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e.default=r,e}function le(r){return r&&r.__esModule?r:{default:r}}function be(r,e){if(!e.has(r))throw new TypeError("attempted to get private field on non-instance");return e.get(r)}function Ie(r,e,t){if(!e.has(r))throw new TypeError("attempted to set private field on non-instance");return e.set(r,t),t}var Me=function(r){ne(e,r);function e(t){var n=r.call(this,t)||this;n.cacheMap={},n.adjustDataArray=[],n.mergeData=[];var i=t.marginRatio,a=i===void 0?T:i,o=t.dodgeRatio,s=o===void 0?F:o,l=t.dodgeBy,u=t.intervalPadding,f=t.dodgePadding,h=t.xDimensionLength,v=t.groupNum,d=t.defaultSize,g=t.maxColumnWidth,y=t.minColumnWidth,m=t.columnWidthRatio,x=t.customOffset;return n.marginRatio=a,n.dodgeRatio=s,n.dodgeBy=l,n.intervalPadding=u,n.dodgePadding=f,n.xDimensionLegenth=h,n.groupNum=v,n.defaultSize=d,n.maxColumnWidth=g,n.minColumnWidth=y,n.columnWidthRatio=m,n.customOffset=x,n}return e.prototype.process=function(t){var n=c.d9(t),i=c.xH(n),a=this.dodgeBy,o=a?c.ru(i,a):n;return this.cacheMap={},this.adjustDataArray=o,this.mergeData=i,this.adjustData(o,i),this.adjustDataArray=[],this.mergeData=[],n},e.prototype.adjustDim=function(t,n,i,a){var o=this,s=this.customOffset,l=this.getDistribution(t),u=this.groupData(i,t);return c.S6(u,function(f,h){var v;n.length===1?v={pre:n[0]-1,next:n[0]+1}:v=o.getAdjustRange(t,parseFloat(h),n),c.S6(f,function(d){var g=d[t],y=l[g],m=y.indexOf(a);if(c.UM(s))d[t]=o.getDodgeOffset(v,m,y.length);else{var x=v.pre,b=v.next;d[t]=c.mf(s)?s(d,v):(x+b)/2+s}})}),[]},e.prototype.getDodgeOffset=function(t,n,i){var a=this,o=a.dodgeRatio,s=a.marginRatio,l=a.intervalPadding,u=a.dodgePadding,f=t.pre,h=t.next,v=h-f,d;if(!c.UM(l)&&c.UM(u)&&l>=0){var g=this.getIntervalOnlyOffset(i,n);d=f+g}else if(!c.UM(u)&&c.UM(l)&&u>=0){var g=this.getDodgeOnlyOffset(i,n);d=f+g}else if(!c.UM(l)&&!c.UM(u)&&l>=0&&u>=0){var g=this.getIntervalAndDodgeOffset(i,n);d=f+g}else{var y=v*o/i,m=s*y,g=1/2*(v-i*y-(i-1)*m)+((n+1)*y+n*m)-1/2*y-1/2*v;d=(f+h)/2+g}return d},e.prototype.getIntervalOnlyOffset=function(t,n){var i=this,a=i.defaultSize,o=i.intervalPadding,s=i.xDimensionLegenth,l=i.groupNum,u=i.dodgeRatio,f=i.maxColumnWidth,h=i.minColumnWidth,v=i.columnWidthRatio,d=o/s,g=(1-(l-1)*d)/l*u/(t-1),y=((1-d*(l-1))/l-g*(t-1))/t;if(y=c.UM(v)?y:1/l/t*v,!c.UM(f)){var m=f/s;y=Math.min(y,m)}if(!c.UM(h)){var x=h/s;y=Math.max(y,x)}y=a?a/s:y,g=((1-(l-1)*d)/l-t*y)/(t-1);var b=((1/2+n)*y+n*g+1/2*d)*l-d/2;return b},e.prototype.getDodgeOnlyOffset=function(t,n){var i=this,a=i.defaultSize,o=i.dodgePadding,s=i.xDimensionLegenth,l=i.groupNum,u=i.marginRatio,f=i.maxColumnWidth,h=i.minColumnWidth,v=i.columnWidthRatio,d=o/s,g=1*u/(l-1),y=((1-g*(l-1))/l-d*(t-1))/t;if(y=v?1/l/t*v:y,!c.UM(f)){var m=f/s;y=Math.min(y,m)}if(!c.UM(h)){var x=h/s;y=Math.max(y,x)}y=a?a/s:y,g=(1-(y*t+d*(t-1))*l)/(l-1);var b=((1/2+n)*y+n*d+1/2*g)*l-g/2;return b},e.prototype.getIntervalAndDodgeOffset=function(t,n){var i=this,a=i.intervalPadding,o=i.dodgePadding,s=i.xDimensionLegenth,l=i.groupNum,u=a/s,f=o/s,h=((1-u*(l-1))/l-f*(t-1))/t,v=((1/2+n)*h+n*f+1/2*u)*l-u/2;return v},e.prototype.getDistribution=function(t){var n=this.adjustDataArray,i=this.cacheMap,a=i[t];return a||(a={},c.S6(n,function(o,s){var l=c.I(o,t);l.length||l.push(0),c.S6(l,function(u){a[u]||(a[u]=[]),a[u].push(s)})}),i[t]=a),a},e}(q),De=Me;function ze(r,e){return(e-r)*Math.random()+r}var Ue=function(r){ne(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.process=function(t){var n=c.d9(t),i=c.xH(n);return this.adjustData(n,i),n},e.prototype.adjustDim=function(t,n,i){var a=this,o=this.groupData(i,t);return c.S6(o,function(s,l){return a.adjustGroup(s,t,parseFloat(l),n)})},e.prototype.getAdjustOffset=function(t){var n=t.pre,i=t.next,a=(i-n)*N;return ze(n+a,i-a)},e.prototype.adjustGroup=function(t,n,i,a){var o=this,s=this.getAdjustRange(n,i,a);return c.S6(t,function(l){l[n]=o.getAdjustOffset(s)}),t},e}(q),nr=Ue,br=c.Ct,sr=function(r){ne(e,r);function e(t){var n=r.call(this,t)||this,i=t.adjustNames,a=i===void 0?["y"]:i,o=t.height,s=o===void 0?NaN:o,l=t.size,u=l===void 0?10:l,f=t.reverseOrder,h=f===void 0?!1:f;return n.adjustNames=a,n.height=s,n.size=u,n.reverseOrder=h,n}return e.prototype.process=function(t){var n=this,i=n.yField,a=n.reverseOrder,o=i?this.processStack(t):this.processOneDimStack(t);return a?this.reverse(o):o},e.prototype.reverse=function(t){return t.slice(0).reverse()},e.prototype.processStack=function(t){var n=this,i=n.xField,a=n.yField,o=n.reverseOrder,s=o?this.reverse(t):t,l=new br,u=new br;return s.map(function(f){return f.map(function(h){var v,d=c.U2(h,i,0),g=c.U2(h,[a]),y=d.toString();if(g=c.kJ(g)?g[1]:g,!c.UM(g)){var m=g>=0?l:u;m.has(y)||m.set(y,0);var x=m.get(y),b=g+x;return m.set(y,b),$t($t({},h),(v={},v[a]=[x,b],v))}return h})})},e.prototype.processOneDimStack=function(t){var n=this,i=this,a=i.xField,o=i.height,s=i.reverseOrder,l="y",u=s?this.reverse(t):t,f=new br;return u.map(function(h){return h.map(function(v){var d,g=n.size,y=v[a],m=g*2/o;f.has(y)||f.set(y,m/2);var x=f.get(y);return f.set(y,x+m),$t($t({},v),(d={},d[l]=x,d))})})},e}(q),Qr=sr,sn=function(r){ne(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.process=function(t){var n=c.xH(t),i=this,a=i.xField,o=i.yField,s=this.getXValuesMaxMap(n),l=Math.max.apply(Math,Object.keys(s).map(function(u){return s[u]}));return c.UI(t,function(u){return c.UI(u,function(f){var h,v,d=f[o],g=f[a];if(c.kJ(d)){var y=(l-s[g])/2;return $t($t({},f),(h={},h[o]=c.UI(d,function(x){return y+x}),h))}var m=(l-d)/2;return $t($t({},f),(v={},v[o]=[m,d+m],v))})})},e.prototype.getXValuesMaxMap=function(t){var n=this,i=this,a=i.xField,o=i.yField,s=c.vM(t,function(l){return l[a]});return c.Q8(s,function(l){return n.getDimMaxValue(l,o)})},e.prototype.getDimMaxValue=function(t,n){var i=c.UI(t,function(o){return c.U2(o,n,[])}),a=c.xH(i);return Math.max.apply(Math,a)},e}(q),ln=sn;qt("Dodge",De),qt("Jitter",nr),qt("Stack",Qr),qt("Symmetric",ln);var Cn=function(r,e){return(0,c.HD)(e)?e:r.invert(r.scale(e))},un=function(){function r(e){this.names=[],this.scales=[],this.linear=!1,this.values=[],this.callback=function(){return[]},this._parseCfg(e)}return r.prototype.mapping=function(){for(var e=this,t=[],n=0;n=0;s--)(o=r[s])&&(a=(i<3?o(a):i>3?o(e,t,a):o(e,t))||a);return i>3&&a&&Object.defineProperty(e,t,a),a}function li(r,e){return function(t,n){e(t,n,r)}}function fl(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)}function ma(r,e,t,n){function i(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(f){try{u(n.next(f))}catch(h){o(h)}}function l(f){try{u(n.throw(f))}catch(h){o(h)}}function u(f){f.done?a(f.value):i(f.value).then(s,l)}u((n=n.apply(r,e||[])).next())})}function yo(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(f){return l([u,f])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function xa(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return a}function xo(){for(var r=[],e=0;e1||s(v,d)})})}function s(v,d){try{l(n[v](d))}catch(g){h(a[0][3],g)}}function l(v){v.value instanceof Gn?Promise.resolve(v.value.v).then(u,f):h(a[0][2],v)}function u(v){s("next",v)}function f(v){s("throw",v)}function h(v,d){v(d),a.shift(),a.length&&s(a[0][0],a[0][1])}}function _(r){var e,t;return e={},n("next"),n("throw",function(i){throw i}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(i,a){e[i]=r[i]?function(o){return(t=!t)?{value:Gn(r[i](o)),done:i==="return"}:a?a(o):o}:a}}function H(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof Ri=="function"?Ri(r):r[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(a){t[a]=r[a]&&function(o){return new Promise(function(s,l){o=r[a](o),i(s,l,o.done,o.value)})}}function i(a,o,s,l){Promise.resolve(l).then(function(u){a({value:u,done:s})},o)}}function ht(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}function zt(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)Object.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e.default=r,e}function ie(r){return r&&r.__esModule?r:{default:r}}function ue(r,e){if(!e.has(r))throw new TypeError("attempted to get private field on non-instance");return e.get(r)}function oe(r,e,t){if(!e.has(r))throw new TypeError("attempted to set private field on non-instance");return e.set(r,t),t}var Pe=/rgba?\(([\s.,0-9]+)\)/,tr=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,dr=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Ir=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,cn=function(r){return/^[r,R,L,l]{1}[\s]*\(/.test(r)},Tn=function(){var r=document.createElement("i");return r.title="Web Colour Picker",r.style.display="none",document.body.appendChild(r),r},Nr=function(r,e,t,n){return r[n]+(e[n]-r[n])*t};function Ni(r){return"#"+So(r[0])+So(r[1])+So(r[2])}var wa=function(r){return[parseInt(r.substr(1,2),16),parseInt(r.substr(3,2),16),parseInt(r.substr(5,2),16)]},So=function(r){var e=Math.round(r).toString(16);return e.length===1?"0"+e:e},vl=function(r,e){var t=isNaN(Number(e))||e<0?0:e>1?1:Number(e),n=r.length-1,i=Math.floor(n*t),a=n*t-i,o=r[i],s=i===n?o:r[i+1];return Ni([Nr(o,s,a,0),Nr(o,s,a,1),Nr(o,s,a,2)])},zi,bo=function(r){if(r[0]==="#"&&r.length===7)return r;zi||(zi=Tn()),zi.style.color=r;var e=document.defaultView.getComputedStyle(zi,"").getPropertyValue("color"),t=Pe.exec(e),n=t[1].split(/\s*,\s*/).map(function(i){return Number(i)});return e=Ni(n),e},pl=function(r){var e=(0,c.HD)(r)?r.split("-"):r,t=(0,c.UI)(e,function(n){return wa(n.indexOf("#")===-1?bo(n):n)});return function(n){return vl(t,n)}},nf=function(r){if(cn(r)){var e,t=void 0;if(r[0]==="l"){var n=tr.exec(r),i=+n[1]+90;t=n[2],e="linear-gradient("+i+"deg, "}else if(r[0]==="r"){e="radial-gradient(";var n=dr.exec(r);t=n[4]}var a=t.match(Ir);return(0,c.S6)(a,function(o,s){var l=o.split(":");e+=l[1]+" "+l[0]*100+"%",s!==a.length-1&&(e+=", ")}),e+=")",e}return r},En={rgb2arr:wa,gradient:pl,toRGB:(0,c.HP)(bo),toCSSGradient:nf},af=function(r){Fr(e,r);function e(t){var n=r.call(this,t)||this;return n.type="color",n.names=["color"],(0,c.HD)(n.values)&&(n.linear=!0),n.gradient=En.gradient(n.values),n}return e.prototype.getLinearValue=function(t){return this.gradient(t)},e}(Mr),dl=af,gl=function(r){Fr(e,r);function e(t){var n=r.call(this,t)||this;return n.type="opacity",n.names=["opacity"],n}return e}(Mr),yl=gl,ml=function(r){Fr(e,r);function e(t){var n=r.call(this,t)||this;return n.names=["x","y"],n.type="position",n}return e.prototype.mapping=function(t,n){var i=this.scales,a=i[0],o=i[1];return(0,c.UM)(t)||(0,c.UM)(n)?[]:[(0,c.kJ)(t)?t.map(function(s){return a.scale(s)}):a.scale(t),(0,c.kJ)(n)?n.map(function(s){return o.scale(s)}):o.scale(n)]},e}(Mr),xl=ml,of=function(r){Fr(e,r);function e(t){var n=r.call(this,t)||this;return n.type="shape",n.names=["shape"],n}return e.prototype.getLinearValue=function(t){var n=Math.round((this.values.length-1)*t);return this.values[n]},e}(Mr),sf=of,wl=function(r){Fr(e,r);function e(t){var n=r.call(this,t)||this;return n.type="size",n.names=["size"],n}return e}(Mr),Sl=wl,Mo={};function bl(r){return Mo[r]}function Wr(r,e){Mo[r]=e}var Ml=function(){function r(e){this.type="base",this.isCategory=!1,this.isLinear=!1,this.isContinuous=!1,this.isIdentity=!1,this.values=[],this.range=[0,1],this.ticks=[],this.__cfg__=e,this.initCfg(),this.init()}return r.prototype.translate=function(e){return e},r.prototype.change=function(e){(0,c.f0)(this.__cfg__,e),this.init()},r.prototype.clone=function(){return this.constructor(this.__cfg__)},r.prototype.getTicks=function(){var e=this;return(0,c.UI)(this.ticks,function(t,n){return(0,c.Kn)(t)?t:{text:e.getText(t,n),tickValue:t,value:e.scale(t)}})},r.prototype.getText=function(e,t){var n=this.formatter,i=n?n(e,t):e;return(0,c.UM)(i)||!(0,c.mf)(i.toString)?"":i.toString()},r.prototype.getConfig=function(e){return this.__cfg__[e]},r.prototype.init=function(){(0,c.f0)(this,this.__cfg__),this.setDomain(),(0,c.xb)(this.getConfig("ticks"))&&(this.ticks=this.calculateTicks())},r.prototype.initCfg=function(){},r.prototype.setDomain=function(){},r.prototype.calculateTicks=function(){var e=this.tickMethod,t=[];if((0,c.HD)(e)){var n=bl(e);if(!n)throw new Error("There is no method to to calculate ticks!");t=n(this)}else(0,c.mf)(e)&&(t=e(this));return t},r.prototype.rangeMin=function(){return this.range[0]},r.prototype.rangeMax=function(){return this.range[1]},r.prototype.calcPercent=function(e,t,n){return(0,c.hj)(e)?(e-t)/(n-t):NaN},r.prototype.calcValue=function(e,t,n){return t+e*(n-t)},r}(),Co=Ml,lf=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cat",t.isCategory=!0,t}return e.prototype.buildIndexMap=function(){if(!this.translateIndexMap){this.translateIndexMap=new Map;for(var t=0;tthis.max?NaN:this.values[a]},e.prototype.getText=function(t){for(var n=[],i=1;i1?t-1:t}this.translateIndexMap&&(this.translateIndexMap=void 0)},e}(Co),Hn=lf,Ao=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,fn="\\d\\d?",hn="\\d\\d",To="\\d{3}",Cl="\\d{4}",Yn="[^\\s]+",Eo=/\[([^]*?)\]/gm;function Fo(r,e){for(var t=[],n=0,i=r.length;n-1?i:null}};function Fn(r){for(var e=[],t=1;t3?0:(r-r%10!=10?1:0)*r%10]}},Xn=Fn({},Sa),Do=function(r){return Xn=Fn(Xn,r)},Fl=function(r){return r.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Cr=function(r,e){for(e===void 0&&(e=2),r=String(r);r.length0?"-":"+")+Cr(Math.floor(Math.abs(e)/60)*100+Math.abs(e)%60,4)},Z:function(r){var e=r.getTimezoneOffset();return(e>0?"-":"+")+Cr(Math.floor(Math.abs(e)/60),2)+":"+Cr(Math.abs(e)%60,2)}},Po=function(r){return+r-1},Oo=[null,fn],Ui=[null,Yn],ba=["isPm",Yn,function(r,e){var t=r.toLowerCase();return t===e.amPm[0]?0:t===e.amPm[1]?1:null}],ko=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(r){var e=(r+"").match(/([+-]|\d\d)/gi);if(e){var t=+e[1]*60+parseInt(e[2],10);return e[0]==="+"?t:-t}return 0}],Ll={D:["day",fn],DD:["day",hn],Do:["day",fn+Yn,function(r){return parseInt(r,10)}],M:["month",fn,Po],MM:["month",hn,Po],YY:["year",hn,function(r){var e=new Date,t=+(""+e.getFullYear()).substr(0,2);return+(""+(+r>68?t-1:t)+r)}],h:["hour",fn,void 0,"isPm"],hh:["hour",hn,void 0,"isPm"],H:["hour",fn],HH:["hour",hn],m:["minute",fn],mm:["minute",hn],s:["second",fn],ss:["second",hn],YYYY:["year",Cl],S:["millisecond","\\d",function(r){return+r*100}],SS:["millisecond",hn,function(r){return+r*10}],SSS:["millisecond",To],d:Oo,dd:Oo,ddd:Ui,dddd:Ui,MMM:["month",Yn,Al("monthNamesShort")],MMMM:["month",Yn,Al("monthNames")],a:ba,A:ba,ZZ:ko,Z:ko},Vi={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},_o=function(r){return Fn(Vi,r)},Bo=function(r,e,t){if(e===void 0&&(e=Vi.default),t===void 0&&(t={}),typeof r=="number"&&(r=new Date(r)),Object.prototype.toString.call(r)!=="[object Date]"||isNaN(r.getTime()))throw new Error("Invalid Date pass to format");e=Vi[e]||e;var n=[];e=e.replace(Eo,function(a,o){return n.push(o),"@@@"});var i=Fn(Fn({},Xn),t);return e=e.replace(Ao,function(a){return Il[a](r,i)}),e.replace(/@@@/g,function(){return n.shift()})};function Ro(r,e,t){if(t===void 0&&(t={}),typeof e!="string")throw new Error("Invalid format in fecha parse");if(e=Vi[e]||e,r.length>1e3)return null;var n=new Date,i={year:n.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},a=[],o=[],s=e.replace(Eo,function(A,B){return o.push(Fl(B)),"@@@"}),l={},u={};s=Fl(s).replace(Ao,function(A){var B=Ll[A],rt=B[0],lt=B[1],xt=B[3];if(l[rt])throw new Error("Invalid format. "+rt+" specified twice in format");return l[rt]=!0,xt&&(u[xt]=!0),a.push(B),"("+lt+")"}),Object.keys(u).forEach(function(A){if(!l[A])throw new Error("Invalid format. "+A+" is required in specified format")}),s=s.replace(/@@@/g,function(){return o.shift()});var f=r.match(new RegExp(s,"i"));if(!f)return null;for(var h=Fn(Fn({},Xn),t),v=1;v11||i.month<0||i.day>31||i.day<1||i.hour>23||i.hour<0||i.minute>59||i.minute<0||i.second>59||i.second<0)return null;return x}var Dl={format:Bo,parse:Ro,defaultI18n:Sa,setGlobalDateI18n:Do,setGlobalDateMasks:_o},ui=Dl;function Pl(r){return function(e,t,n,i){for(var a=(0,c.UM)(n)?0:n,o=(0,c.UM)(i)?e.length:i;a>>1;r(e[s])>t?o=s:a=s+1}return a}}var No="format";function zo(r,e){var t=ct[No]||ui[No];return t(r,e)}function Gi(r){return(0,c.HD)(r)&&(r.indexOf("T")>0?r=new Date(r).getTime():r=new Date(r.replace(/-/gi,"/")).getTime()),(0,c.J_)(r)&&(r=r.getTime()),r}var Ar=1e3,Zr=60*Ar,In=60*Zr,tn=24*In,ci=tn*31,I=tn*365,$=[["HH:mm:ss",Ar],["HH:mm:ss",Ar*10],["HH:mm:ss",Ar*30],["HH:mm",Zr],["HH:mm",Zr*10],["HH:mm",Zr*30],["HH",In],["HH",In*6],["HH",In*12],["YYYY-MM-DD",tn],["YYYY-MM-DD",tn*4],["YYYY-WW",tn*7],["YYYY-MM",ci],["YYYY-MM",ci*4],["YYYY-MM",ci*6],["YYYY",tn*380]];function vt(r,e,t){var n=(e-r)/t,i=Pl(function(o){return o[1]})($,n)-1,a=$[i];return i<0?a=$[0]:i>=$.length&&(a=(0,c.Z$)($)),a}var Et=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="timeCat",t}return e.prototype.translate=function(t){t=Gi(t);var n=this.values.indexOf(t);return n===-1&&((0,c.hj)(t)&&t-1){var a=this.values[i],o=this.formatter;return a=o?o(a,n):zo(a,this.mask),a}return t},e.prototype.initCfg=function(){this.tickMethod="time-cat",this.mask="YYYY-MM-DD",this.tickCount=7},e.prototype.setDomain=function(){var t=this.values;(0,c.S6)(t,function(n,i){t[i]=Gi(n)}),t.sort(function(n,i){return n-i}),r.prototype.setDomain.call(this)},e}(Hn),Zt=Et,fe=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.isContinuous=!0,t}return e.prototype.scale=function(t){if((0,c.UM)(t))return NaN;var n=this.rangeMin(),i=this.rangeMax(),a=this.max,o=this.min;if(a===o)return n;var s=this.getScalePercent(t);return n+s*(i-n)},e.prototype.init=function(){r.prototype.init.call(this);var t=this.ticks,n=(0,c.YM)(t),i=(0,c.Z$)(t);nthis.max&&(this.max=i),(0,c.UM)(this.minLimit)||(this.min=n),(0,c.UM)(this.maxLimit)||(this.max=i)},e.prototype.setDomain=function(){var t=(0,c.rx)(this.values),n=t.min,i=t.max;(0,c.UM)(this.min)&&(this.min=n),(0,c.UM)(this.max)&&(this.max=i),this.min>this.max&&(this.min=n,this.max=i)},e.prototype.calculateTicks=function(){var t=this,n=r.prototype.calculateTicks.call(this);return this.nice||(n=(0,c.hX)(n,function(i){return i>=t.min&&i<=t.max})),n},e.prototype.getScalePercent=function(t){var n=this.max,i=this.min;return(t-i)/(n-i)},e.prototype.getInvertPercent=function(t){return(t-this.rangeMin())/(this.rangeMax()-this.rangeMin())},e}(Co),Ce=fe,Ze=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="linear",t.isLinear=!0,t}return e.prototype.invert=function(t){var n=this.getInvertPercent(t);return this.min+n*(this.max-this.min)},e.prototype.initCfg=function(){this.tickMethod="wilkinson-extended",this.nice=!1},e}(Ce),gr=Ze;function vr(r,e){var t=Math.E,n;return e>=0?n=Math.pow(t,Math.log(e)/r):n=Math.pow(t,Math.log(-e)/r)*-1,n}function lr(r,e){return r===1?1:Math.log(e)/Math.log(r)}function Hi(r,e,t){(0,c.UM)(t)&&(t=Math.max.apply(null,r));var n=t;return(0,c.S6)(r,function(i){i>0&&i1&&(n=1),n}function uf(r){var e=r.toString().split(/[eE]/),t=(e[0].split(".")[1]||"").length-+(e[1]||0);return t>0?t:0}function Sk(r,e){var t=uf(r),n=uf(e),i=Math.pow(10,Math.max(t,n));return(r*i+e*i)/i}var g0=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t}return e.prototype.invert=function(t){var n=this.base,i=lr(n,this.max),a=this.rangeMin(),o=this.rangeMax()-a,s,l=this.positiveMin;if(l){if(t===0)return 0;s=lr(n,l/n);var u=1/(i-s)*o;if(t=0?1:-1;return Math.pow(s,i)*l},e.prototype.initCfg=function(){this.tickMethod="pow",this.exponent=2,this.tickCount=5,this.nice=!0},e.prototype.getScalePercent=function(t){var n=this.max,i=this.min;if(n===i)return 0;var a=this.exponent,o=(vr(a,t)-vr(a,i))/(vr(a,n)-vr(a,i));return o},e}(Ce),x0=m0,w0=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="time",t}return e.prototype.getText=function(t,n){var i=this.translate(t),a=this.formatter;return a?a(i,n):zo(i,this.mask)},e.prototype.scale=function(t){var n=t;return((0,c.HD)(n)||(0,c.J_)(n))&&(n=this.translate(n)),r.prototype.scale.call(this,n)},e.prototype.translate=function(t){return Gi(t)},e.prototype.initCfg=function(){this.tickMethod="time-pretty",this.mask="YYYY-MM-DD",this.tickCount=7,this.nice=!1},e.prototype.setDomain=function(){var t=this.values,n=this.getConfig("min"),i=this.getConfig("max");if((!(0,c.UM)(n)||!(0,c.hj)(n))&&(this.min=this.translate(this.min)),(!(0,c.UM)(i)||!(0,c.hj)(i))&&(this.max=this.translate(this.max)),t&&t.length){var a=[],o=Infinity,s=o,l=0;(0,c.S6)(t,function(u){var f=Gi(u);if(isNaN(f))throw new TypeError("Invalid Time: "+u+" in time scale!");o>f?(s=o,o=f):s>f&&(s=f),l1&&(this.minTickInterval=s-o),(0,c.UM)(n)&&(this.min=o),(0,c.UM)(i)&&(this.max=l)}},e}(gr),S0=w0,b0=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="quantize",t}return e.prototype.invert=function(t){var n=this.ticks,i=n.length,a=this.getInvertPercent(t),o=Math.floor(a*(i-1));if(o>=i-1)return(0,c.Z$)(n);if(o<0)return(0,c.YM)(n);var s=n[o],l=n[o+1],u=o/(i-1),f=(o+1)/(i-1);return s+(a-u)/(f-u)*(l-s)},e.prototype.initCfg=function(){this.tickMethod="r-pretty",this.tickCount=5,this.nice=!0},e.prototype.calculateTicks=function(){var t=r.prototype.calculateTicks.call(this);return this.nice||((0,c.Z$)(t)!==this.max&&t.push(this.max),(0,c.YM)(t)!==this.min&&t.unshift(this.min)),t},e.prototype.getScalePercent=function(t){var n=this.ticks;if(t<(0,c.YM)(n))return 0;if(t>(0,c.Z$)(n))return 1;var i=0;return(0,c.S6)(n,function(a,o){if(t>=a)i=o;else return!1}),i/(n.length-1)},e}(Ce),cf=b0,M0=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="quantile",t}return e.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},e}(cf),C0=M0,ff={};function Ol(r){return ff[r]}function vn(r,e){if(Ol(r))throw new Error("type '"+r+"' existed.");ff[r]=e}var A0=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="identity",t.isIdentity=!0,t}return e.prototype.calculateTicks=function(){return this.values},e.prototype.scale=function(t){return this.values[0]!==t&&(0,c.hj)(t)?t:this.range[0]},e.prototype.invert=function(t){var n=this.range;return tn[1]?NaN:this.values[0]},e}(Co),T0=A0;function hf(r){var e=r.values,t=r.tickInterval,n=r.tickCount,i=r.showLast;if((0,c.hj)(t)){var a=(0,c.hX)(e,function(g,y){return y%t==0}),o=(0,c.Z$)(e);return i&&(0,c.Z$)(a)!==o&&a.push(o),a}var s=e.length,l=r.min,u=r.max;if((0,c.UM)(l)&&(l=0),(0,c.UM)(u)&&(u=e.length-1),!(0,c.hj)(n)||n>=s)return e.slice(l,u+1);if(n<=0||u<=0)return[];for(var f=n===1?s:Math.floor(s/(n-1)),h=[],v=l,d=0;d=u);d++)v=Math.min(l+d*f,u),d===n-1&&i?h.push(e[u]):h.push(e[v]);return h}function E0(r){var e=r.min,t=r.max,n=r.nice,i=r.tickCount,a=new F0;return a.domain([e,t]),n&&a.nice(i),a.ticks(i)}var kl=5,vf=Math.sqrt(50),pf=Math.sqrt(10),df=Math.sqrt(2),F0=function(){function r(){this._domain=[0,1]}return r.prototype.domain=function(e){return e?(this._domain=Array.from(e,Number),this):this._domain.slice()},r.prototype.nice=function(e){var t,n;e===void 0&&(e=kl);var i=this._domain.slice(),a=0,o=this._domain.length-1,s=this._domain[a],l=this._domain[o],u;return l0?(s=Math.floor(s/u)*u,l=Math.ceil(l/u)*u,u=Uo(s,l,e)):u<0&&(s=Math.ceil(s*u)/u,l=Math.floor(l*u)/u,u=Uo(s,l,e)),u>0?(i[a]=Math.floor(s/u)*u,i[o]=Math.ceil(l/u)*u,this.domain(i)):u<0&&(i[a]=Math.ceil(s*u)/u,i[o]=Math.floor(l*u)/u,this.domain(i)),this},r.prototype.ticks=function(e){return e===void 0&&(e=kl),I0(this._domain[0],this._domain[this._domain.length-1],e||kl)},r}();function I0(r,e,t){var n,i=-1,a,o,s;if(e=+e,r=+r,t=+t,r===e&&t>0)return[r];if((n=e0)for(r=Math.ceil(r/s),e=Math.floor(e/s),o=new Array(a=Math.ceil(e-r+1));++i=0?(a>=vf?10:a>=pf?5:a>=df?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=vf?10:a>=pf?5:a>=df?2:1)}function gf(r,e,t){var n;return t==="ceil"?n=Math.ceil(r/e):t==="floor"?n=Math.floor(r/e):n=Math.round(r/e),n*e}function _l(r,e,t){var n=gf(r,t,"floor"),i=gf(e,t,"ceil");n=(0,c.ri)(n,t),i=(0,c.ri)(i,t);for(var a=[],o=Math.max((i-n)/(Math.pow(2,12)-1),t),s=n;s<=i;s=s+o){var l=(0,c.ri)(s,o);a.push(l)}return{min:n,max:i,ticks:a}}function Bl(r,e,t){var n,i=r.minLimit,a=r.maxLimit,o=r.min,s=r.max,l=r.tickCount,u=l===void 0?5:l,f=(0,c.UM)(i)?(0,c.UM)(e)?o:e:i,h=(0,c.UM)(a)?(0,c.UM)(t)?s:t:a;if(f>h&&(n=[f,h],h=n[0],f=n[1]),u<=2)return[f,h];for(var v=(h-f)/(u-1),d=[],g=0;g=0&&(l=1),1-s/(o-1)-t+l}function _0(r,e,t){var n=(0,c.dp)(e),i=(0,c.cq)(e,r),a=1;return 1-i/(n-1)-t+a}function B0(r,e,t,n,i,a){var o=(r-1)/(a-i),s=(e-1)/(Math.max(a,n)-Math.min(t,i));return 2-Math.max(o/s,s/o)}function R0(r,e){return r>=e?2-(r-1)/(e-1):1}function N0(r,e,t,n){var i=e-r;return 1-.5*(Math.pow(e-n,2)+Math.pow(r-t,2))/Math.pow(.1*i,2)}function z0(r,e,t){var n=e-r;if(t>n){var i=(t-n)/2;return 1-Math.pow(i,2)/Math.pow(.1*n,2)}return 1}function U0(){return 1}function V0(r,e,t,n,i,a){t===void 0&&(t=5),n===void 0&&(n=!0),i===void 0&&(i=D0),a===void 0&&(a=[.25,.2,.5,.05]);var o=t<0?0:Math.round(t);if(Number.isNaN(r)||Number.isNaN(e)||typeof r!="number"||typeof e!="number"||!o)return{min:0,max:0,ticks:[]};if(e-r<1e-15||o===1)return{min:r,max:e,ticks:[r]};if(e-r>1e148){var s=t||5,l=(e-r)/s;return{min:r,max:e,ticks:Array(s).fill(null).map(function(Te,Ne){return fi(r+l*Ne)})}}for(var u={score:-2,lmin:0,lmax:0,lstep:0},f=1;fu.score&&(!n||xt<=r&&kt>=e)&&(u.lmin=xt,u.lmax=kt,u.lstep=Ft,u.score=Re)}x+=1}g+=1}}f+=1}var Qt=fi(u.lmax),he=fi(u.lmin),xe=fi(u.lstep),ve=Math.floor(O0((Qt-he)/xe))+1,ge=new Array(ve);ge[0]=fi(he);for(var h=1;h0)o=Math.floor(lr(e,n));else{var l=Hi(a,e,i);o=Math.floor(lr(e,l))}for(var u=s-o,f=Math.ceil(u/t),h=[],v=o;v=0?1:-1;return Math.pow(o,e)*s})}function X0(r,e){var t=r.length*e;return e===1?r[r.length-1]:e===0?r[0]:t%1!=0?r[Math.ceil(t)-1]:r.length%2==0?(r[t-1]+r[t])/2:r[t]}function W0(r){var e=r.tickCount,t=r.values;if(!t||!t.length)return[];for(var n=t.slice().sort(function(s,l){return s-l}),i=[],a=0;a1&&(i=i*Math.ceil(s)),n&&iI)for(var l=Vo(t),u=Math.ceil(a/I),f=s;f<=l+u;f=f+u)o.push(q0(f));else if(a>ci)for(var h=Math.ceil(a/ci),v=Rl(e),d=K0(e,t),f=0;f<=d+h;f=f+h)o.push(J0(s,f+v));else if(a>tn)for(var g=new Date(e),y=g.getFullYear(),m=g.getMonth(),x=g.getDate(),b=Math.ceil(a/tn),C=Q0(e,t),f=0;fIn)for(var g=new Date(e),y=g.getFullYear(),m=g.getMonth(),b=g.getDate(),A=g.getHours(),B=Math.ceil(a/In),rt=ty(e,t),f=0;f<=rt+B;f=f+B)o.push(new Date(y,m,b,A+f).getTime());else if(a>Zr)for(var lt=ey(e,t),xt=Math.ceil(a/Zr),f=0;f<=lt+xt;f=f+xt)o.push(e+f*Zr);else{var kt=a;kt=512&&console.warn("Notice: current ticks length("+o.length+') >= 512, may cause performance issues, even out of memory. Because of the configure "tickInterval"(in milliseconds, current is '+a+") is too small, increase the value to solve the problem!"),o}Wr("cat",hf),Wr("time-cat",$0),Wr("wilkinson-extended",G0),Wr("r-pretty",Z0),Wr("time",j0),Wr("time-pretty",ry),Wr("log",H0),Wr("pow",Y0),Wr("quantile",W0),Wr("d3-linear",L0),vn("cat",Hn),vn("category",Hn),vn("identity",T0),vn("linear",gr),vn("log",y0),vn("pow",x0),vn("time",S0),vn("timeCat",Zt),vn("quantize",cf),vn("quantile",C0);var xf={},wf=function(r){return xf[r.toLowerCase()]},Ma=function(r,e){if(wf(r))throw new Error("Attribute type '"+r+"' existed.");xf[r.toLowerCase()]=e};Ma("Color",dl),Ma("Opacity",yl),Ma("Position",xl),Ma("Shape",sf),Ma("Size",Sl);var Sf=J(49685);function ny(){var r=new Sf.WT(3);return Sf.WT!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r}function Mk(r){var e=new glMatrix.ARRAY_TYPE(3);return e[0]=r[0],e[1]=r[1],e[2]=r[2],e}function Ck(r){var e=r[0],t=r[1],n=r[2];return Math.hypot(e,t,n)}function Ak(r,e,t){var n=new glMatrix.ARRAY_TYPE(3);return n[0]=r,n[1]=e,n[2]=t,n}function Tk(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}function Ek(r,e,t,n){return r[0]=e,r[1]=t,r[2]=n,r}function Fk(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r[2]=e[2]+t[2],r}function Ik(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r[2]=e[2]-t[2],r}function Lk(r,e,t){return r[0]=e[0]*t[0],r[1]=e[1]*t[1],r[2]=e[2]*t[2],r}function Dk(r,e,t){return r[0]=e[0]/t[0],r[1]=e[1]/t[1],r[2]=e[2]/t[2],r}function Pk(r,e){return r[0]=Math.ceil(e[0]),r[1]=Math.ceil(e[1]),r[2]=Math.ceil(e[2]),r}function Ok(r,e){return r[0]=Math.floor(e[0]),r[1]=Math.floor(e[1]),r[2]=Math.floor(e[2]),r}function kk(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.min(e[2],t[2]),r}function _k(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r[2]=Math.max(e[2],t[2]),r}function Bk(r,e){return r[0]=Math.round(e[0]),r[1]=Math.round(e[1]),r[2]=Math.round(e[2]),r}function Rk(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t,r}function Nk(r,e,t,n){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r[2]=e[2]+t[2]*n,r}function zk(r,e){var t=e[0]-r[0],n=e[1]-r[1],i=e[2]-r[2];return Math.hypot(t,n,i)}function Uk(r,e){var t=e[0]-r[0],n=e[1]-r[1],i=e[2]-r[2];return t*t+n*n+i*i}function Vk(r){var e=r[0],t=r[1],n=r[2];return e*e+t*t+n*n}function Gk(r,e){return r[0]=-e[0],r[1]=-e[1],r[2]=-e[2],r}function Hk(r,e){return r[0]=1/e[0],r[1]=1/e[1],r[2]=1/e[2],r}function Yk(r,e){var t=e[0],n=e[1],i=e[2],a=t*t+n*n+i*i;return a>0&&(a=1/Math.sqrt(a)),r[0]=e[0]*a,r[1]=e[1]*a,r[2]=e[2]*a,r}function iy(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function Xk(r,e,t){var n=e[0],i=e[1],a=e[2],o=t[0],s=t[1],l=t[2];return r[0]=i*l-a*s,r[1]=a*o-n*l,r[2]=n*s-i*o,r}function Wk(r,e,t,n){var i=e[0],a=e[1],o=e[2];return r[0]=i+n*(t[0]-i),r[1]=a+n*(t[1]-a),r[2]=o+n*(t[2]-o),r}function Zk(r,e,t,n,i,a){var o=a*a,s=o*(2*a-3)+1,l=o*(a-2)+a,u=o*(a-1),f=o*(3-2*a);return r[0]=e[0]*s+t[0]*l+n[0]*u+i[0]*f,r[1]=e[1]*s+t[1]*l+n[1]*u+i[1]*f,r[2]=e[2]*s+t[2]*l+n[2]*u+i[2]*f,r}function jk(r,e,t,n,i,a){var o=1-a,s=o*o,l=a*a,u=s*o,f=3*a*s,h=3*l*o,v=l*a;return r[0]=e[0]*u+t[0]*f+n[0]*h+i[0]*v,r[1]=e[1]*u+t[1]*f+n[1]*h+i[1]*v,r[2]=e[2]*u+t[2]*f+n[2]*h+i[2]*v,r}function $k(r,e){e=e||1;var t=glMatrix.RANDOM()*2*Math.PI,n=glMatrix.RANDOM()*2-1,i=Math.sqrt(1-n*n)*e;return r[0]=Math.cos(t)*i,r[1]=Math.sin(t)*i,r[2]=n*e,r}function qk(r,e,t){var n=e[0],i=e[1],a=e[2],o=t[3]*n+t[7]*i+t[11]*a+t[15];return o=o||1,r[0]=(t[0]*n+t[4]*i+t[8]*a+t[12])/o,r[1]=(t[1]*n+t[5]*i+t[9]*a+t[13])/o,r[2]=(t[2]*n+t[6]*i+t[10]*a+t[14])/o,r}function Ca(r,e,t){var n=e[0],i=e[1],a=e[2];return r[0]=n*t[0]+i*t[3]+a*t[6],r[1]=n*t[1]+i*t[4]+a*t[7],r[2]=n*t[2]+i*t[5]+a*t[8],r}function Kk(r,e,t){var n=t[0],i=t[1],a=t[2],o=t[3],s=e[0],l=e[1],u=e[2],f=i*u-a*l,h=a*s-n*u,v=n*l-i*s,d=i*v-a*h,g=a*f-n*v,y=n*h-i*f,m=o*2;return f*=m,h*=m,v*=m,d*=2,g*=2,y*=2,r[0]=s+f+d,r[1]=l+h+g,r[2]=u+v+y,r}function Jk(r,e,t,n){var i=[],a=[];return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),r[0]=a[0]+t[0],r[1]=a[1]+t[1],r[2]=a[2]+t[2],r}function Qk(r,e,t,n){var i=[],a=[];return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),r[0]=a[0]+t[0],r[1]=a[1]+t[1],r[2]=a[2]+t[2],r}function t_(r,e,t,n){var i=[],a=[];return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],r[0]=a[0]+t[0],r[1]=a[1]+t[1],r[2]=a[2]+t[2],r}function e_(r,e){var t=r[0],n=r[1],i=r[2],a=e[0],o=e[1],s=e[2],l=Math.sqrt(t*t+n*n+i*i),u=Math.sqrt(a*a+o*o+s*s),f=l*u,h=f&&iy(r,e)/f;return Math.acos(Math.min(Math.max(h,-1),1))}function r_(r){return r[0]=0,r[1]=0,r[2]=0,r}function n_(r){return"vec3("+r[0]+", "+r[1]+", "+r[2]+")"}function i_(r,e){return r[0]===e[0]&&r[1]===e[1]&&r[2]===e[2]}function a_(r,e){var t=r[0],n=r[1],i=r[2],a=e[0],o=e[1],s=e[2];return Math.abs(t-a)<=glMatrix.EPSILON*Math.max(1,Math.abs(t),Math.abs(a))&&Math.abs(n-o)<=glMatrix.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-s)<=glMatrix.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))}var o_=null,s_=null,l_=null,u_=null,c_=null,f_=null,h_=null,v_=function(){var r=ny();return function(e,t,n,i,a,o){var s,l;for(t||(t=3),n||(n=0),i?l=Math.min(i*t+n,e.length):l=e.length,s=n;s=0&&this.radius<=1&&(n=n*this.radius),this.d=Math.floor(n*(1-this.innerRadius)/t),this.a=this.d/(Math.PI*2),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*n,end:this.innerRadius*n+this.d*.99}},e.prototype.convertPoint=function(t){var n,i=t.x,a=t.y;this.isTransposed&&(n=[a,i],i=n[0],a=n[1]);var o=this.convertDim(i,"x"),s=this.a*o,l=this.convertDim(a,"y");return{x:this.center.x+Math.cos(o)*(s+l),y:this.center.y+Math.sin(o)*(s+l)}},e.prototype.invertPoint=function(t){var n,i=this.d+this.y.start,a=Le.$X([0,0],[t.x,t.y],[this.center.x,this.center.y]),o=Qe.Dg(a,[1,0],!0),s=o*this.a;Le.kE(a)this.width/n?(s=this.width/n,this.circleCenter={x:this.center.x-(.5-a)*this.width,y:this.center.y-(.5-o)*s*i}):(s=this.height/i,this.circleCenter={x:this.center.x-(.5-a)*s*n,y:this.center.y-(.5-o)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=s*this.radius:(this.radius<=0||this.radius>s)&&(this.polarRadius=s):this.polarRadius=s,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},e.prototype.getRadius=function(){return this.polarRadius},e.prototype.convertPoint=function(t){var n,i=this.getCenter(),a=t.x,o=t.y;return this.isTransposed&&(n=[o,a],a=n[0],o=n[1]),a=this.convertDim(a,"x"),o=this.convertDim(o,"y"),{x:i.x+Math.cos(a)*o,y:i.y+Math.sin(a)*o}},e.prototype.invertPoint=function(t){var n,i=this.getCenter(),a=[t.x-i.x,t.y-i.y],o=this,s=o.startAngle,l=o.endAngle;this.isReflect("x")&&(n=[l,s],s=n[0],l=n[1]);var u=[1,0,0,0,1,0,0,0,1];Qe.zu(u,u,s);var f=[1,0,0];Ca(f,f,u);var h=[f[0],f[1]],v=Qe.Dg(h,a,l0?g:-g;var y=this.invertDim(d,"y"),m={x:0,y:0};return m.x=this.isTransposed?y:g,m.y=this.isTransposed?g:y,m},e.prototype.getCenter=function(){return this.circleCenter},e.prototype.getOneBox=function(){var t=this.startAngle,n=this.endAngle;if(Math.abs(n-t)>=Math.PI*2)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var i=[0,Math.cos(t),Math.cos(n)],a=[0,Math.sin(t),Math.sin(n)],o=Math.min(t,n);o=0;n--)r.removeChild(e[n])}function dy(r,e){return!!r.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))}function Ta(r){var e=r.start,t=r.end,n=Math.min(e.x,t.x),i=Math.min(e.y,t.y),a=Math.max(e.x,t.x),o=Math.max(e.y,t.y);return{x:n,y:i,minX:n,minY:i,maxX:a,maxY:o,width:a-n,height:o-i}}function gy(r){var e=r.map(function(s){return s.x}),t=r.map(function(s){return s.y}),n=Math.min.apply(Math,e),i=Math.min.apply(Math,t),a=Math.max.apply(Math,e),o=Math.max.apply(Math,t);return{x:n,y:i,minX:n,minY:i,maxX:a,maxY:o,width:a-n,height:o-i}}function Ea(r,e,t,n){var i=r+t,a=e+n;return{x:r,y:e,width:t,height:n,minX:r,minY:e,maxX:isNaN(i)?0:i,maxY:isNaN(a)?0:a}}function vi(r,e,t){return(1-t)*r+e*t}function Yi(r,e,t){return{x:r.x+Math.cos(t)*e,y:r.y+Math.sin(t)*e}}function yy(r,e){var t=e.x-r.x,n=e.y-r.y;return Math.sqrt(t*t+n*n)}var p_=function(r){return new Promise(function(e){setTimeout(e,r)})},Xo=function(r,e,t){return t===void 0&&(t=Math.pow(Number.EPSILON,.5)),[r,e].includes(Infinity)?Math.abs(r)===Math.abs(e):Math.abs(r-e)0?(0,c.S6)(l,function(u){if(u.get("visible")){if(u.isGroup()&&u.get("children").length===0)return!0;var f=Ef(u),h=u.applyToMatrix([f.minX,f.minY,1]),v=u.applyToMatrix([f.minX,f.maxY,1]),d=u.applyToMatrix([f.maxX,f.minY,1]),g=u.applyToMatrix([f.maxX,f.maxY,1]),y=Math.min(h[0],v[0],d[0],g[0]),m=Math.max(h[0],v[0],d[0],g[0]),x=Math.min(h[1],v[1],d[1],g[1]),b=Math.max(h[1],v[1],d[1],g[1]);ya&&(a=m),xs&&(s=b)}}):(i=0,a=0,o=0,s=0),n=Ea(i,o,a-i,s-o)}return t?my(n,t):n}function xy(r,e){if(!(!r.getClip()&&!e.getClip())){var t=e.getClip();if(!t){r.setClip(null);return}var n={type:t.get("type"),attrs:t.attr()};r.setClip(n)}}function Lr(r){return r+"px"}function Ff(r,e,t,n){var i=yy(r,e),a=n/i,o=0;return t==="start"?o=0-a:t==="end"&&(o=1+a),{x:vi(r.x,e.x,o),y:vi(r.y,e.y,o)}}var wy={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},Sy=function(r){(0,p.ZT)(e,r);function e(t){var n=r.call(this,t)||this;return n.initCfg(),n}return e.prototype.getDefaultCfg=function(){return{id:"",name:"",type:"",locationType:"none",offsetX:0,offsetY:0,animate:!1,capture:!0,updateAutoRender:!1,animateOption:{appear:null,update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},events:null,defaultCfg:{},visible:!0}},e.prototype.clear=function(){},e.prototype.update=function(t){var n=this,i=this.get("defaultCfg")||{};(0,c.S6)(t,function(a,o){var s=n.get(o),l=a;s!==a&&((0,c.Kn)(a)&&i[o]&&(l=(0,c.b$)({},i[o],a)),n.set(o,l))}),this.updateInner(t),this.afterUpdate(t)},e.prototype.updateInner=function(t){},e.prototype.afterUpdate=function(t){(0,c.wH)(t,"visible")&&(t.visible?this.show():this.hide()),(0,c.wH)(t,"capture")&&this.setCapture(t.capture)},e.prototype.getLayoutBBox=function(){return this.getBBox()},e.prototype.getLocationType=function(){return this.get("locationType")},e.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},e.prototype.setOffset=function(t,n){this.update({offsetX:t,offsetY:n})},e.prototype.setLocation=function(t){var n=(0,p.pi)({},t);this.update(n)},e.prototype.getLocation=function(){var t=this,n={},i=this.get("locationType"),a=wy[i];return(0,c.S6)(a,function(o){n[o]=t.get(o)}),n},e.prototype.isList=function(){return!1},e.prototype.isSlider=function(){return!1},e.prototype.init=function(){},e.prototype.initCfg=function(){var t=this,n=this.get("defaultCfg");(0,c.S6)(n,function(i,a){var o=t.get(a);if((0,c.Kn)(o)){var s=(0,c.b$)({},i,o);t.set(a,s)}})},e}(E.Base),If=Sy,pi="update_status",by=["visible","tip","delegateObject"],My=["container","group","shapesMap","isRegister","isUpdating","destroyed"],Cy=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{container:null,shapesMap:{},group:null,capture:!0,isRegister:!1,isUpdating:!1,isInit:!0})},e.prototype.remove=function(){this.clear();var t=this.get("group");t.remove()},e.prototype.clear=function(){var t=this.get("group");t.clear(),this.set("shapesMap",{}),this.clearOffScreenCache(),this.set("isInit",!0)},e.prototype.getChildComponentById=function(t){var n=this.getElementById(t),i=n&&n.get("component");return i},e.prototype.getElementById=function(t){return this.get("shapesMap")[t]},e.prototype.getElementByLocalId=function(t){var n=this.getElementId(t);return this.getElementById(n)},e.prototype.getElementsByName=function(t){var n=[];return(0,c.S6)(this.get("shapesMap"),function(i){i.get("name")===t&&n.push(i)}),n},e.prototype.getContainer=function(){return this.get("container")},e.prototype.updateInner=function(t){this.offScreenRender(),this.get("updateAutoRender")&&this.render()},e.prototype.render=function(){var t=this.get("offScreenGroup");t||(t=this.offScreenRender());var n=this.get("group");this.updateElements(t,n),this.deleteElements(),this.applyOffset(),this.get("eventInitted")||(this.initEvent(),this.set("eventInitted",!0)),this.set("isInit",!1)},e.prototype.show=function(){var t=this.get("group");t.show(),this.set("visible",!0)},e.prototype.hide=function(){var t=this.get("group");t.hide(),this.set("visible",!1)},e.prototype.setCapture=function(t){var n=this.get("group");n.set("capture",t),this.set("capture",t)},e.prototype.destroy=function(){this.removeEvent(),this.remove(),r.prototype.destroy.call(this)},e.prototype.getBBox=function(){return this.get("group").getCanvasBBox()},e.prototype.getLayoutBBox=function(){var t=this.get("group"),n=this.getInnerLayoutBBox(),i=t.getTotalMatrix();return i&&(n=py(i,n)),n},e.prototype.on=function(t,n,i){var a=this.get("group");return a.on(t,n,i),this},e.prototype.off=function(t,n){var i=this.get("group");return i&&i.off(t,n),this},e.prototype.emit=function(t,n){var i=this.get("group");i.emit(t,n)},e.prototype.init=function(){r.prototype.init.call(this),this.get("group")||this.initGroup(),this.offScreenRender()},e.prototype.getInnerLayoutBBox=function(){return this.get("offScreenBBox")||this.get("group").getBBox()},e.prototype.delegateEmit=function(t,n){var i=this.get("group");n.target=i,i.emit(t,n),Cf(i,t,n)},e.prototype.createOffScreenGroup=function(){var t=this.get("group"),n=t.getGroupBase(),i=new n({delegateObject:this.getDelegateObject()});return i},e.prototype.applyOffset=function(){var t=this.get("offsetX"),n=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t,y:n})},e.prototype.initGroup=function(){var t=this.get("container");this.set("group",t.addGroup({id:this.get("id"),name:this.get("name"),capture:this.get("capture"),visible:this.get("visible"),isComponent:!0,component:this,delegateObject:this.getDelegateObject()}))},e.prototype.offScreenRender=function(){this.clearOffScreenCache();var t=this.createOffScreenGroup();return this.renderInner(t),this.set("offScreenGroup",t),this.set("offScreenBBox",Ef(t)),t},e.prototype.addGroup=function(t,n){this.appendDelegateObject(t,n);var i=t.addGroup(n);return this.get("isRegister")&&this.registerElement(i),i},e.prototype.addShape=function(t,n){this.appendDelegateObject(t,n);var i=t.addShape(n);return this.get("isRegister")&&this.registerElement(i),i},e.prototype.addComponent=function(t,n){var i=n.id,a=n.component,o=(0,p._T)(n,["id","component"]),s=new a((0,p.pi)((0,p.pi)({},o),{id:i,container:t,updateAutoRender:this.get("updateAutoRender")}));return s.init(),s.render(),this.get("isRegister")&&this.registerElement(s.get("group")),s},e.prototype.initEvent=function(){},e.prototype.removeEvent=function(){var t=this.get("group");t.off()},e.prototype.getElementId=function(t){var n=this.get("id"),i=this.get("name");return n+"-"+i+"-"+t},e.prototype.registerElement=function(t){var n=t.get("id");this.get("shapesMap")[n]=t},e.prototype.unregisterElement=function(t){var n=t.get("id");delete this.get("shapesMap")[n]},e.prototype.moveElementTo=function(t,n){var i=zl(n);t.attr("matrix",i)},e.prototype.addAnimation=function(t,n,i){var a=n.attr("opacity");(0,c.UM)(a)&&(a=1),n.attr("opacity",0),n.animate({opacity:a},i)},e.prototype.removeAnimation=function(t,n,i){n.animate({opacity:0},i)},e.prototype.updateAnimation=function(t,n,i,a){n.animate(i,a)},e.prototype.updateElements=function(t,n){var i=this,a=this.get("animate"),o=this.get("animateOption"),s=t.getChildren().slice(0),l;(0,c.S6)(s,function(u){var f=u.get("id"),h=i.getElementById(f),v=u.get("name");if(h)if(u.get("isComponent")){var d=u.get("component"),g=h.get("component"),y=(0,c.ei)(d.cfg,(0,c.e5)((0,c.XP)(d.cfg),My));g.update(y),h.set(pi,"update")}else{var m=i.getReplaceAttrs(h,u);a&&o.update?i.updateAnimation(v,h,m,o.update):h.attr(m),u.isGroup()&&i.updateElements(u,h),(0,c.S6)(by,function(A){h.set(A,u.get(A))}),xy(h,u),l=h,h.set(pi,"update")}else{n.add(u);var x=n.getChildren();if(x.splice(x.length-1,1),l){var b=x.indexOf(l);x.splice(b+1,0,u)}else x.unshift(u);if(i.registerElement(u),u.set(pi,"add"),u.get("isComponent")){var d=u.get("component");d.set("container",n)}else u.isGroup()&&i.registerNewGroup(u);if(l=u,a){var C=i.get("isInit")?o.appear:o.enter;C&&i.addAnimation(v,u,C)}}})},e.prototype.clearUpdateStatus=function(t){var n=t.getChildren();(0,c.S6)(n,function(i){i.set(pi,null)})},e.prototype.clearOffScreenCache=function(){var t=this.get("offScreenGroup");t&&t.destroy(),this.set("offScreenGroup",null),this.set("offScreenBBox",null)},e.prototype.getDelegateObject=function(){var t,n=this.get("name"),i=(t={},t[n]=this,t.component=this,t);return i},e.prototype.appendDelegateObject=function(t,n){var i=t.get("delegateObject");n.delegateObject||(n.delegateObject={}),(0,c.CD)(n.delegateObject,i)},e.prototype.getReplaceAttrs=function(t,n){var i=t.attr(),a=n.attr();return(0,c.S6)(i,function(o,s){a[s]===void 0&&(a[s]=void 0)}),a},e.prototype.registerNewGroup=function(t){var n=this,i=t.getChildren();(0,c.S6)(i,function(a){n.registerElement(a),a.set(pi,"add"),a.isGroup()&&n.registerNewGroup(a)})},e.prototype.deleteElements=function(){var t=this,n=this.get("shapesMap"),i=[];(0,c.S6)(n,function(s,l){!s.get(pi)||s.destroyed?i.push([l,s]):s.set(pi,null)});var a=this.get("animate"),o=this.get("animateOption");(0,c.S6)(i,function(s){var l=s[0],u=s[1];if(!u.destroyed){var f=u.get("name");if(a&&o.leave){var h=(0,c.CD)({callback:function(){t.removeElement(u)}},o.leave);t.removeAnimation(f,u,h)}else t.removeElement(u)}delete n[l]})},e.prototype.removeElement=function(t){if(t.get("isGroup")){var n=t.get("component");n&&n.destroy()}t.remove()},e}(If),xr=Cy,Vl="\u2026";function Ay(r){for(var e=0,t=0;t0&&r.charCodeAt(e)<128?1:2}function Ty(r,e,t){t===void 0&&(t="tail");var n=r.length,i="";if(t==="tail"){for(var a=0,o=0;a=19968&&s<=40869?a+=2:a+=1}a>t&&(t=a,n=i)}return r[n].getBBox().width}function Gl(r){if(r.length>Iy)return Ly(r);var e=0;return(0,c.S6)(r,function(t){var n=t.getBBox(),i=n.width;e=0?v=Ty(a,h,n):v=Ey,v&&(e.attr("text",v),f=!0)}return f?e.set("tip",a):e.set("tip",null),f}function Wo(r,e){var t=e.x,n=e.y,i=e.content,a=e.style,o=e.id,s=e.name,l=e.rotate,u=e.maxLength,f=e.autoEllipsis,h=e.isVertical,v=e.ellipsisPosition,d=e.background,g=r.addGroup({id:o+"-group",name:s+"-group",attrs:{x:t,y:n}}),y=g.addShape({type:"text",id:o,name:s,attrs:(0,p.pi)({x:0,y:0,text:i},a)}),m=Yo((0,c.U2)(d,"padding",0));if(u&&f){var x=u-(m[1]+m[3]);Fa(!h,y,x,v)}if(d){var b=(0,c.U2)(d,"style",{}),C=y.getCanvasBBox(),A=C.minX,B=C.minY,rt=C.width,lt=C.height,xt=g.addShape("rect",{id:o+"-bg",name:o+"-bg",attrs:(0,p.pi)({x:A-m[3],y:B-m[0],width:rt+m[1]+m[3],height:lt+m[0]+m[2]},b)});xt.toBack()}Aa(g,t,n),Tf(g,l,t,n)}var Ve={fontFamily:` BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimSun, "sans-serif"`,textColor:"#2C3542",activeTextColor:"#333333",uncheckedColor:"#D8D8D8",lineColor:"#416180",regionColor:"#CCD7EB",verticalAxisRotate:-Math.PI/4,horizontalAxisRotate:Math.PI/4,descriptionIconStroke:"#fff",descriptionIconFill:"rgba(58, 73, 101, .25)"},Py=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"annotation",type:"line",locationType:"region",start:null,end:null,style:{},text:null,defaultCfg:{style:{fill:Ve.textColor,fontSize:12,textAlign:"center",textBaseline:"bottom",fontFamily:Ve.fontFamily},text:{position:"center",autoRotate:!0,content:null,offsetX:0,offsetY:0,style:{stroke:Ve.lineColor,lineWidth:1}}}})},e.prototype.renderInner=function(t){this.renderLine(t),this.get("text")&&this.renderLabel(t)},e.prototype.renderLine=function(t){var n=this.get("start"),i=this.get("end"),a=this.get("style");this.addShape(t,{type:"line",id:this.getElementId("line"),name:"annotation-line",attrs:(0,p.pi)({x1:n.x,y1:n.y,x2:i.x,y2:i.y},a)})},e.prototype.getLabelPoint=function(t,n,i){var a;return i==="start"?a=0:i==="center"?a=.5:(0,c.HD)(i)&&i.indexOf("%")!==-1?a=parseInt(i,10)/100:(0,c.hj)(i)?a=i:a=1,(a>1||a<0)&&(a=1),{x:vi(t.x,n.x,a),y:vi(t.y,n.y,a)}},e.prototype.renderLabel=function(t){var n=this.get("text"),i=this.get("start"),a=this.get("end"),o=n.position,s=n.content,l=n.style,u=n.offsetX,f=n.offsetY,h=n.autoRotate,v=n.maxLength,d=n.autoEllipsis,g=n.ellipsisPosition,y=n.background,m=n.isVertical,x=m===void 0?!1:m,b=this.getLabelPoint(i,a,o),C=b.x+u,A=b.y+f,B={id:this.getElementId("line-text"),name:"annotation-line-text",x:C,y:A,content:s,style:l,maxLength:v,autoEllipsis:d,ellipsisPosition:g,background:y,isVertical:x};if(h){var rt=[a.x-i.x,a.y-i.y];B.rotate=Math.atan2(rt[1],rt[0])}Wo(t,B)},e}(xr),Oy=Py,ky=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"annotation",type:"text",locationType:"point",x:0,y:0,content:"",rotate:null,style:{},background:null,maxLength:null,autoEllipsis:!0,isVertical:!1,ellipsisPosition:"tail",defaultCfg:{style:{fill:Ve.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:Ve.fontFamily}}})},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.renderInner=function(t){var n=this.getLocation(),i=n.x,a=n.y,o=this.get("content"),s=this.get("style"),l=this.getElementId("text"),u=this.get("name")+"-text",f=this.get("maxLength"),h=this.get("autoEllipsis"),v=this.get("isVertical"),d=this.get("ellipsisPosition"),g=this.get("background"),y=this.get("rotate"),m={id:l,name:u,x:i,y:a,content:o,style:s,maxLength:f,autoEllipsis:h,isVertical:v,ellipsisPosition:d,background:g,rotate:y};Wo(t,m)},e.prototype.resetLocation=function(){var t=this.getElementByLocalId("text-group");if(t){var n=this.getLocation(),i=n.x,a=n.y,o=this.get("rotate");Aa(t,i,a),Tf(t,o,i,a)}},e}(xr),_y=ky,By=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"annotation",type:"arc",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:Math.PI*3/2,style:{stroke:"#999",lineWidth:1}})},e.prototype.renderInner=function(t){this.renderArc(t)},e.prototype.getArcPath=function(){var t=this.getLocation(),n=t.center,i=t.radius,a=t.startAngle,o=t.endAngle,s=Yi(n,i,a),l=Yi(n,i,o),u=o-a>Math.PI?1:0,f=[["M",s.x,s.y]];if(o-a==Math.PI*2){var h=Yi(n,i,a+Math.PI);f.push(["A",i,i,0,u,1,h.x,h.y]),f.push(["A",i,i,0,u,1,l.x,l.y])}else f.push(["A",i,i,0,u,1,l.x,l.y]);return f},e.prototype.renderArc=function(t){var n=this.getArcPath(),i=this.get("style");this.addShape(t,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:(0,p.pi)({path:n},i)})},e}(xr),Ry=By,Ny=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:Ve.regionColor,opacity:.4}}})},e.prototype.renderInner=function(t){this.renderRegion(t)},e.prototype.renderRegion=function(t){var n=this.get("start"),i=this.get("end"),a=this.get("style"),o=Ta({start:n,end:i});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:(0,p.pi)({x:o.x,y:o.y,width:o.width,height:o.height},a)})},e}(xr),zy=Ny,Uy=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"annotation",type:"image",locationType:"region",start:null,end:null,src:null,style:{}})},e.prototype.renderInner=function(t){this.renderImage(t)},e.prototype.getImageAttrs=function(){var t=this.get("start"),n=this.get("end"),i=this.get("style"),a=Ta({start:t,end:n}),o=this.get("src");return(0,p.pi)({x:a.x,y:a.y,img:o,width:a.width,height:a.height},i)},e.prototype.renderImage=function(t){this.addShape(t,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})},e}(xr),Vy=Uy,Gy=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"annotation",type:"dataMarker",locationType:"point",x:0,y:0,point:{},line:{},text:{},direction:"upward",autoAdjust:!0,coordinateBBox:null,defaultCfg:{point:{display:!0,style:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2}},line:{display:!0,length:20,style:{stroke:Ve.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:Ve.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:Ve.fontFamily}}}})},e.prototype.renderInner=function(t){(0,c.U2)(this.get("line"),"display")&&this.renderLine(t),(0,c.U2)(this.get("text"),"display")&&this.renderText(t),(0,c.U2)(this.get("point"),"display")&&this.renderPoint(t),this.get("autoAdjust")&&this.autoAdjust(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x")+this.get("offsetX"),y:this.get("y")+this.get("offsetY")})},e.prototype.renderPoint=function(t){var n=this.getShapeAttrs().point;this.addShape(t,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:n})},e.prototype.renderLine=function(t){var n=this.getShapeAttrs().line;this.addShape(t,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:n})},e.prototype.renderText=function(t){var n=this.getShapeAttrs().text,i=n.x,a=n.y,o=n.text,s=(0,p._T)(n,["x","y","text"]),l=this.get("text"),u=l.background,f=l.maxLength,h=l.autoEllipsis,v=l.isVertival,d=l.ellipsisPosition,g={x:i,y:a,id:this.getElementId("text"),name:"annotation-text",content:o,style:s,background:u,maxLength:f,autoEllipsis:h,isVertival:v,ellipsisPosition:d};Wo(t,g)},e.prototype.autoAdjust=function(t){var n=this.get("direction"),i=this.get("x"),a=this.get("y"),o=(0,c.U2)(this.get("line"),"length",0),s=this.get("coordinateBBox"),l=t.getBBox(),u=l.minX,f=l.maxX,h=l.minY,v=l.maxY,d=t.findById(this.getElementId("text-group")),g=t.findById(this.getElementId("text")),y=t.findById(this.getElementId("line"));if(!!s){if(d){if(i+u<=s.minX){var m=s.minX-(i+u);Aa(d,d.attr("x")+m,d.attr("y"))}if(i+f>=s.maxX){var m=i+f-s.maxX;Aa(d,d.attr("x")-m,d.attr("y"))}}if(n==="upward"&&a+h<=s.minY||n!=="upward"&&a+v>=s.maxY){var x=void 0,b=void 0;n==="upward"&&a+h<=s.minY?(x="top",b=1):(x="bottom",b=-1),g.attr("textBaseline",x),y&&y.attr("path",[["M",0,0],["L",0,o*b]]),Aa(d,d.attr("x"),(o+2)*b)}}},e.prototype.getShapeAttrs=function(){var t=(0,c.U2)(this.get("line"),"display"),n=(0,c.U2)(this.get("point"),"style",{}),i=(0,c.U2)(this.get("line"),"style",{}),a=(0,c.U2)(this.get("text"),"style",{}),o=this.get("direction"),s=t?(0,c.U2)(this.get("line"),"length",0):0,l=o==="upward"?-1:1;return{point:(0,p.pi)({x:0,y:0},n),line:(0,p.pi)({path:[["M",0,0],["L",0,s*l]]},i),text:(0,p.pi)({x:0,y:(s+2)*l,text:(0,c.U2)(this.get("text"),"content",""),textBaseline:o==="upward"?"bottom":"top"},a)}},e}(xr),Hy=Gy,Yy=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:Ve.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:Ve.textColor,fontFamily:Ve.fontFamily}}}})},e.prototype.renderInner=function(t){var n=(0,c.U2)(this.get("region"),"style",{}),i=(0,c.U2)(this.get("text"),"style",{}),a=this.get("lineLength")||0,o=this.get("points");if(!!o.length){var s=gy(o),l=[];l.push(["M",o[0].x,s.minY-a]),o.forEach(function(f){l.push(["L",f.x,f.y])}),l.push(["L",o[o.length-1].x,o[o.length-1].y-a]),this.addShape(t,{type:"path",id:this.getElementId("region"),name:"annotation-region",attrs:(0,p.pi)({path:l},n)});var u=(0,p.pi)({id:this.getElementId("text"),name:"annotation-text",x:(s.minX+s.maxX)/2,y:s.minY-a},this.get("text"));Wo(t,u)}},e}(xr),Xy=Yy,Wy=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},e.prototype.renderInner=function(t){var n=this,i=this.get("start"),a=this.get("end"),o=this.addGroup(t,{id:this.getElementId("region-filter"),capture:!1});(0,c.S6)(this.get("shapes"),function(l,u){var f=l.get("type"),h=(0,c.d9)(l.attr());n.adjustShapeAttrs(h),n.addShape(o,{id:n.getElementId("shape-"+f+"-"+u),capture:!1,type:f,attrs:h})});var s=Ta({start:i,end:a});o.setClip({type:"rect",attrs:{x:s.minX,y:s.minY,width:s.width,height:s.height}})},e.prototype.adjustShapeAttrs=function(t){var n=this.get("color");t.fill&&(t.fill=t.fillStyle=n),t.stroke=t.strokeStyle=n},e}(xr),Zy=Wy,jy=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"annotation",type:"shape",draw:c.ZT})},e.prototype.renderInner=function(t){var n=this.get("render");(0,c.mf)(n)&&n(t)},e}(xr),$y=jy;function Dr(r,e,t){var n;try{n=window.getComputedStyle?window.getComputedStyle(r,null)[e]:r.style[e]}catch(i){}finally{n=n===void 0?t:n}return n}function qy(r,e){var t=Dr(r,"width",e);return t==="auto"&&(t=r.offsetWidth),parseFloat(t)}function Ky(r,e){var t=qy(r,e),n=parseFloat(Dr(r,"borderLeftWidth"))||0,i=parseFloat(Dr(r,"paddingLeft"))||0,a=parseFloat(Dr(r,"paddingRight"))||0,o=parseFloat(Dr(r,"borderRightWidth"))||0,s=parseFloat(Dr(r,"marginRight"))||0,l=parseFloat(Dr(r,"marginLeft"))||0;return t+n+o+i+a+l+s}function Jy(r,e){var t=Dr(r,"height",e);return t==="auto"&&(t=r.offsetHeight),parseFloat(t)}function Qy(r,e){var t=Jy(r,e),n=parseFloat(Dr(r,"borderTopWidth"))||0,i=parseFloat(Dr(r,"paddingTop"))||0,a=parseFloat(Dr(r,"paddingBottom"))||0,o=parseFloat(Dr(r,"borderBottomWidth"))||0,s=parseFloat(Dr(r,"marginTop"))||0,l=parseFloat(Dr(r,"marginBottom"))||0;return t+n+o+i+a+s+l}var tm=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{container:null,containerTpl:"
",updateAutoRender:!0,containerClassName:"",parent:null})},e.prototype.getContainer=function(){return this.get("container")},e.prototype.show=function(){var t=this.get("container");t.style.display="",this.set("visible",!0)},e.prototype.hide=function(){var t=this.get("container");t.style.display="none",this.set("visible",!1)},e.prototype.setCapture=function(t){var n=this.getContainer(),i=t?"auto":"none";n.style.pointerEvents=i,this.set("capture",t)},e.prototype.getBBox=function(){var t=this.getContainer(),n=parseFloat(t.style.left)||0,i=parseFloat(t.style.top)||0;return Ea(n,i,t.clientWidth,t.clientHeight)},e.prototype.clear=function(){var t=this.get("container");Ul(t)},e.prototype.destroy=function(){this.removeEvent(),this.removeDom(),r.prototype.destroy.call(this)},e.prototype.init=function(){r.prototype.init.call(this),this.initContainer(),this.initDom(),this.resetStyles(),this.applyStyles(),this.initEvent(),this.initCapture(),this.initVisible()},e.prototype.initCapture=function(){this.setCapture(this.get("capture"))},e.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},e.prototype.initDom=function(){},e.prototype.initContainer=function(){var t=this.get("container");if((0,c.UM)(t)){t=this.createDom();var n=this.get("parent");(0,c.HD)(n)&&(n=document.getElementById(n),this.set("parent",n)),n.appendChild(t),this.get("containerId")&&t.setAttribute("id",this.get("containerId")),this.set("container",t)}else(0,c.HD)(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},e.prototype.resetStyles=function(){var t=this.get("domStyles"),n=this.get("defaultStyles");t?t=(0,c.b$)({},n,t):t=n,this.set("domStyles",t)},e.prototype.applyStyles=function(){var t=this.get("domStyles");if(!!t){var n=this.getContainer();this.applyChildrenStyles(n,t);var i=this.get("containerClassName");if(i&&dy(n,i)){var a=t[i];yt(n,a)}}},e.prototype.applyChildrenStyles=function(t,n){(0,c.S6)(n,function(i,a){var o=t.getElementsByClassName(a);(0,c.S6)(o,function(s){yt(s,i)})})},e.prototype.applyStyle=function(t,n){var i=this.get("domStyles");yt(n,i[t])},e.prototype.createDom=function(){var t=this.get("containerTpl");return it(t)},e.prototype.initEvent=function(){},e.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode&&t.parentNode.removeChild(t)},e.prototype.removeEvent=function(){},e.prototype.updateInner=function(t){(0,c.wH)(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},e.prototype.resetPosition=function(){},e}(If),Hl=tm,em=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"annotation",type:"html",locationType:"point",x:0,y:0,containerTpl:'
',alignX:"left",alignY:"top",html:"",zIndex:7})},e.prototype.render=function(){var t=this.getContainer(),n=this.get("html");Ul(t);var i=(0,c.mf)(n)?n(t):n;if((0,c.kK)(i))t.appendChild(i);else if((0,c.HD)(i)||(0,c.hj)(i)){var a=it(""+i);a&&t.appendChild(a)}this.resetPosition()},e.prototype.resetPosition=function(){var t=this.getContainer(),n=this.getLocation(),i=n.x,a=n.y,o=this.get("alignX"),s=this.get("alignY"),l=this.get("offsetX"),u=this.get("offsetY"),f=Ky(t),h=Qy(t),v={x:i,y:a};o==="middle"?v.x-=Math.round(f/2):o==="right"&&(v.x-=Math.round(f)),s==="middle"?v.y-=Math.round(h/2):s==="bottom"&&(v.y-=Math.round(h)),l&&(v.x+=l),u&&(v.y+=u),yt(t,{position:"absolute",left:v.x+"px",top:v.y+"px",zIndex:this.get("zIndex")})},e}(Hl),rm=em;function Ia(r,e,t){var n=e+"Style",i=null;return(0,c.S6)(t,function(a,o){r[o]&&a[n]&&(i||(i={}),(0,c.CD)(i,a[n]))}),i}var nm=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"axis",ticks:[],line:{},tickLine:{},subTickLine:null,title:null,label:{},verticalFactor:1,verticalLimitLength:null,overlapOrder:["autoRotate","autoEllipsis","autoHide"],tickStates:{},optimize:{},defaultCfg:{line:{style:{lineWidth:1,stroke:Ve.lineColor}},tickLine:{style:{lineWidth:1,stroke:Ve.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:Ve.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:Ve.textColor,fontFamily:Ve.fontFamily,fontWeight:"normal"},offset:10,offsetX:0,offsetY:0},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:Ve.textColor,textBaseline:"middle",fontFamily:Ve.fontFamily,textAlign:"center"},iconStyle:{fill:Ve.descriptionIconFill,stroke:Ve.descriptionIconStroke},description:""},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:Ve.uncheckedColor}}},optimize:{enable:!0,threshold:400}},theme:{}})},e.prototype.renderInner=function(t){this.get("line")&&this.drawLine(t),this.drawTicks(t),this.get("title")&&this.drawTitle(t)},e.prototype.isList=function(){return!0},e.prototype.getItems=function(){return this.get("ticks")},e.prototype.setItems=function(t){this.update({ticks:t})},e.prototype.updateItem=function(t,n){(0,c.CD)(t,n),this.clear(),this.render()},e.prototype.clearItems=function(){var t=this.getElementByLocalId("label-group");t&&t.clear()},e.prototype.setItemState=function(t,n,i){t[n]=i,this.updateTickStates(t)},e.prototype.hasState=function(t,n){return!!t[n]},e.prototype.getItemStates=function(t){var n=this.get("tickStates"),i=[];return(0,c.S6)(n,function(a,o){t[o]&&i.push(o)}),i},e.prototype.clearItemsState=function(t){var n=this,i=this.getItemsByState(t);(0,c.S6)(i,function(a){n.setItemState(a,t,!1)})},e.prototype.getItemsByState=function(t){var n=this,i=this.getItems();return(0,c.hX)(i,function(a){return n.hasState(a,t)})},e.prototype.getSidePoint=function(t,n){var i=this,a=i.getSideVector(n,t);return{x:t.x+a[0],y:t.y+a[1]}},e.prototype.getTextAnchor=function(t){var n;return(0,c.vQ)(t[0],0)?n="center":t[0]>0?n="start":t[0]<0&&(n="end"),n},e.prototype.getTextBaseline=function(t){var n;return(0,c.vQ)(t[1],0)?n="middle":t[1]>0?n="top":t[1]<0&&(n="bottom"),n},e.prototype.processOverlap=function(t){},e.prototype.drawLine=function(t){var n=this.getLinePath(),i=this.get("line");this.addShape(t,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:(0,c.CD)({path:n},i.style)})},e.prototype.getTickLineItems=function(t){var n=this,i=[],a=this.get("tickLine"),o=a.alignTick,s=a.length,l=1,u=t.length;return u>=2&&(l=t[1].value-t[0].value),(0,c.S6)(t,function(f){var h=f.point;o||(h=n.getTickPoint(f.value-l/2));var v=n.getSidePoint(h,s);i.push({startPoint:h,tickValue:f.value,endPoint:v,tickId:f.id,id:"tickline-"+f.id})}),i},e.prototype.getSubTickLineItems=function(t){var n=[],i=this.get("subTickLine"),a=i.count,o=t.length;if(o>=2)for(var s=0;s0){var i=(0,c.dp)(n);if(i>t.threshold){var a=Math.ceil(i/t.threshold),o=n.filter(function(s,l){return l%a==0});this.set("ticks",o),this.set("originalTicks",n)}}},e.prototype.getLabelAttrs=function(t,n,i){var a=this.get("label"),o=a.offset,s=a.offsetX,l=a.offsetY,u=a.rotate,f=a.formatter,h=this.getSidePoint(t.point,o),v=this.getSideVector(o,h),d=f?f(t.name,t,n):t.name,g=a.style;g=(0,c.mf)(g)?(0,c.U2)(this.get("theme"),["label","style"],{}):g;var y=(0,c.CD)({x:h.x+s,y:h.y+l,text:d,textAlign:this.getTextAnchor(v),textBaseline:this.getTextBaseline(v)},g);return u&&(y.matrix=hi(h,u)),y},e.prototype.drawLabels=function(t){var n=this,i=this.get("ticks"),a=this.addGroup(t,{name:"axis-label-group",id:this.getElementId("label-group")});(0,c.S6)(i,function(v,d){n.addShape(a,{type:"text",name:"axis-label",id:n.getElementId("label-"+v.id),attrs:n.getLabelAttrs(v,d,i),delegateObject:{tick:v,item:v,index:d}})}),this.processOverlap(a);var o=a.getChildren(),s=(0,c.U2)(this.get("theme"),["label","style"],{}),l=this.get("label"),u=l.style,f=l.formatter;if((0,c.mf)(u)){var h=o.map(function(v){return(0,c.U2)(v.get("delegateObject"),"tick")});(0,c.S6)(o,function(v,d){var g=v.get("delegateObject").tick,y=f?f(g.name,g,d):g.name,m=(0,c.CD)({},s,u(y,d,h));v.attr(m)})}},e.prototype.getTitleAttrs=function(){var t=this.get("title"),n=t.style,i=t.position,a=t.offset,o=t.spacing,s=o===void 0?0:o,l=t.autoRotate,u=n.fontSize,f=.5;i==="start"?f=0:i==="end"&&(f=1);var h=this.getTickPoint(f),v=this.getSidePoint(h,a||s+u/2),d=(0,c.CD)({x:v.x,y:v.y,text:t.text},n),g=t.rotate,y=g;if((0,c.UM)(g)&&l){var m=this.getAxisVector(h),x=[1,0];y=Qe.Dg(m,x,!0)}if(y){var b=hi(v,y);d.matrix=b}return d},e.prototype.drawTitle=function(t){var n,i=this.getTitleAttrs(),a=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"axis-title",attrs:i});((n=this.get("title"))===null||n===void 0?void 0:n.description)&&this.drawDescriptionIcon(t,a,i.matrix)},e.prototype.drawDescriptionIcon=function(t,n,i){var a=this.addGroup(t,{name:"axis-description",id:this.getElementById("description")}),o=n.getBBox(),s=o.maxX,l=o.maxY,u=o.height,f=this.get("title").iconStyle,h=4,v=u/2,d=v/6,g=s+h,y=l-u/2,m=[g+v,y-v],x=m[0],b=m[1],C=[x+v,b+v],A=C[0],B=C[1],rt=[x,B+v],lt=rt[0],xt=rt[1],kt=[g,b+v],Ft=kt[0],Xt=kt[1],ae=[g+v,y-u/4],we=ae[0],Se=ae[1],Re=[we,Se+d],Qt=Re[0],he=Re[1],xe=[Qt,he+d],ve=xe[0],ge=xe[1],Te=[ve,ge+v*3/4],Ne=Te[0],Ge=Te[1];this.addShape(a,{type:"path",id:this.getElementId("title-description-icon"),name:"axis-title-description-icon",attrs:(0,p.pi)({path:[["M",x,b],["A",v,v,0,0,1,A,B],["A",v,v,0,0,1,lt,xt],["A",v,v,0,0,1,Ft,Xt],["A",v,v,0,0,1,x,b],["M",we,Se],["L",Qt,he],["M",ve,ge],["L",Ne,Ge]],lineWidth:d,matrix:i},f)}),this.addShape(a,{type:"rect",id:this.getElementId("title-description-rect"),name:"axis-title-description-rect",attrs:{x:g,y:y-u/2,width:u,height:u,stroke:"#000",fill:"#000",opacity:0,matrix:i,cursor:"pointer"}})},e.prototype.applyTickStates=function(t,n){var i=this.getItemStates(t);if(i.length){var a=this.get("tickStates"),o=this.getElementId("label-"+t.id),s=n.findById(o);if(s){var l=Ia(t,"label",a);l&&s.attr(l)}var u=this.getElementId("tickline-"+t.id),f=n.findById(u);if(f){var h=Ia(t,"tickLine",a);h&&f.attr(h)}}},e.prototype.updateTickStates=function(t){var n=this.getItemStates(t),i=this.get("tickStates"),a=this.get("label"),o=this.getElementByLocalId("label-"+t.id),s=this.get("tickLine"),l=this.getElementByLocalId("tickline-"+t.id);if(n.length){if(o){var u=Ia(t,"label",i);u&&o.attr(u)}if(l){var f=Ia(t,"tickLine",i);f&&l.attr(f)}}else o&&o.attr(a.style),l&&l.attr(s.style)},e}(xr),Lf=nm;function Yl(r,e,t,n){var i=e.getChildren(),a=!1;return(0,c.S6)(i,function(o){var s=Fa(r,o,t,n);a=a||s}),a}function im(){return Df}function am(r,e,t){return Yl(r,e,t,"head")}function Df(r,e,t){return Yl(r,e,t,"tail")}function om(r,e,t){return Yl(r,e,t,"middle")}function sm(r){var e=r.attr("matrix");return e&&e[0]!==1}function Pf(r){var e=sm(r)?vy(r.attr("matrix")):0;return e%360}function Xl(r,e,t,n){var i=!1,a=Pf(e),o=Math.abs(r?t.attr("y")-e.attr("y"):t.attr("x")-e.attr("x")),s=(r?t.attr("y")>e.attr("y"):t.attr("x")>e.attr("x"))?e.getBBox():t.getBBox();if(r){var l=Math.abs(Math.cos(a));Xo(l,0,Math.PI/180)?i=s.width+n>o:i=s.height/l+n>o}else{var l=Math.abs(Math.sin(a));Xo(l,0,Math.PI/180)?i=s.width+n>o:i=s.height/l+n>o}return i}function La(r,e,t,n){var i=(n==null?void 0:n.minGap)||0,a=e.getChildren().slice().filter(function(g){return g.get("visible")});if(!a.length)return!1;var o=!1;t&&a.reverse();for(var s=a.length,l=a[0],u=l,f=1;f1){v=Math.ceil(v);for(var y=0;y2){var o=i[0],s=i[i.length-1];o.get("visible")||(o.show(),La(r,e,!1,n)&&(a=!0)),s.get("visible")||(s.show(),La(r,e,!0,n)&&(a=!0))}return a}function vm(r,e){(0,c.S6)(r,function(t){var n=t.attr("x"),i=t.attr("y"),a=hi({x:n,y:i},e);t.attr("matrix",a)})}function _f(r,e,t,n){var i=e.getChildren();if(!i.length||!r&&i.length<2)return!1;var a=Gl(i),o=!1;if(r)o=!!t&&a>t;else{var s=Math.abs(i[1].attr("x")-i[0].attr("x"));o=a>s}if(o){var l=n(t,a);vm(i,l)}return o}function pm(){return Bf}function Bf(r,e,t,n){return _f(r,e,t,function(){return(0,c.hj)(n)?n:r?Ve.verticalAxisRotate:Ve.horizontalAxisRotate})}function dm(r,e,t){return _f(r,e,t,function(n,i){if(!n)return r?Ve.verticalAxisRotate:Ve.horizontalAxisRotate;if(r)return-Math.acos(n/i);var a=0;return n>i?a=Math.PI/4:(a=Math.asin(n/i),a>Math.PI/4&&(a=Math.PI/4)),a})}var gm=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getLinePath=function(){var t=this.get("start"),n=this.get("end"),i=[];return i.push(["M",t.x,t.y]),i.push(["L",n.x,n.y]),i},e.prototype.getInnerLayoutBBox=function(){var t=this.get("start"),n=this.get("end"),i=r.prototype.getInnerLayoutBBox.call(this),a=Math.min(t.x,n.x,i.x),o=Math.min(t.y,n.y,i.y),s=Math.max(t.x,n.x,i.maxX),l=Math.max(t.y,n.y,i.maxY);return{x:a,y:o,minX:a,minY:o,maxX:s,maxY:l,width:s-a,height:l-o}},e.prototype.isVertical=function(){var t=this.get("start"),n=this.get("end");return(0,c.vQ)(t.x,n.x)},e.prototype.isHorizontal=function(){var t=this.get("start"),n=this.get("end");return(0,c.vQ)(t.y,n.y)},e.prototype.getTickPoint=function(t){var n=this,i=n.get("start"),a=n.get("end"),o=a.x-i.x,s=a.y-i.y;return{x:i.x+o*t,y:i.y+s*t}},e.prototype.getSideVector=function(t){var n=this.getAxisVector(),i=Le.Fv([0,0],n),a=this.get("verticalFactor"),o=[i[1],i[0]*-1];return Le.bA([0,0],o,t*a)},e.prototype.getAxisVector=function(){var t=this.get("start"),n=this.get("end");return[n.x-t.x,n.y-t.y]},e.prototype.processOverlap=function(t){var n=this,i=this.isVertical(),a=this.isHorizontal();if(!(!i&&!a)){var o=this.get("label"),s=this.get("title"),l=this.get("verticalLimitLength"),u=o.offset,f=l,h=0,v=0;s&&(h=s.style.fontSize,v=s.spacing),f&&(f=f-u-v-h);var d=this.get("overlapOrder");if((0,c.S6)(d,function(m){o[m]&&n.canProcessOverlap(m)&&n.autoProcessOverlap(m,o[m],t,f)}),s&&(0,c.UM)(s.offset)){var g=t.getCanvasBBox(),y=i?g.width:g.height;s.offset=u+y+v+h/2}}},e.prototype.canProcessOverlap=function(t){var n=this.get("label");return t==="autoRotate"?(0,c.UM)(n.rotate):!0},e.prototype.autoProcessOverlap=function(t,n,i,a){var o=this,s=this.isVertical(),l=!1,u=ot[t];if(n===!0){var f=this.get("label");l=u.getDefault()(s,i,a)}else if((0,c.mf)(n))l=n(s,i,a);else if((0,c.Kn)(n)){var h=n;u[h.type]&&(l=u[h.type](s,i,a,h.cfg))}else u[n]&&(l=u[n](s,i,a));if(t==="autoRotate"){if(l){var v=i.getChildren(),d=this.get("verticalFactor");(0,c.S6)(v,function(y){var m=y.attr("textAlign");if(m==="center"){var x=d>0?"end":"start";y.attr("textAlign",x)}})}}else if(t==="autoHide"){var g=i.getChildren().slice(0);(0,c.S6)(g,function(y){y.get("visible")||(o.get("isRegister")&&o.unregisterElement(y),y.remove())})}},e}(Lf),ym=gm,mm=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:Math.PI*3/2})},e.prototype.getLinePath=function(){var t=this.get("center"),n=t.x,i=t.y,a=this.get("radius"),o=a,s=this.get("startAngle"),l=this.get("endAngle"),u=[];if(Math.abs(l-s)===Math.PI*2)u=[["M",n,i-o],["A",a,o,0,1,1,n,i+o],["A",a,o,0,1,1,n,i-o],["Z"]];else{var f=this.getCirclePoint(s),h=this.getCirclePoint(l),v=Math.abs(l-s)>Math.PI?1:0,d=s>l?0:1;u=[["M",n,i],["L",f.x,f.y],["A",a,o,0,v,d,h.x,h.y],["L",n,i]]}return u},e.prototype.getTickPoint=function(t){var n=this.get("startAngle"),i=this.get("endAngle"),a=n+(i-n)*t;return this.getCirclePoint(a)},e.prototype.getSideVector=function(t,n){var i=this.get("center"),a=[n.x-i.x,n.y-i.y],o=this.get("verticalFactor"),s=Le.kE(a);return Le.bA(a,a,o*t/s),a},e.prototype.getAxisVector=function(t){var n=this.get("center"),i=[t.x-n.x,t.y-n.y];return[i[1],-1*i[0]]},e.prototype.getCirclePoint=function(t,n){var i=this.get("center");return n=n||this.get("radius"),{x:i.x+Math.cos(t)*n,y:i.y+Math.sin(t)*n}},e.prototype.canProcessOverlap=function(t){var n=this.get("label");return t==="autoRotate"?(0,c.UM)(n.rotate):!0},e.prototype.processOverlap=function(t){var n=this,i=this.get("label"),a=this.get("title"),o=this.get("verticalLimitLength"),s=i.offset,l=o,u=0,f=0;a&&(u=a.style.fontSize,f=a.spacing),l&&(l=l-s-f-u);var h=this.get("overlapOrder");if((0,c.S6)(h,function(d){i[d]&&n.canProcessOverlap(d)&&n.autoProcessOverlap(d,i[d],t,l)}),a&&(0,c.UM)(a.offset)){var v=t.getCanvasBBox().height;a.offset=s+v+f+u/2}},e.prototype.autoProcessOverlap=function(t,n,i,a){var o=this,s=!1,l=ot[t];if(a>0)if(n===!0)s=l.getDefault()(!1,i,a);else if((0,c.mf)(n))s=n(!1,i,a);else if((0,c.Kn)(n)){var u=n;l[u.type]&&(s=l[u.type](!1,i,a,u.cfg))}else l[n]&&(s=l[n](!1,i,a));if(t==="autoRotate"){if(s){var f=i.getChildren(),h=this.get("verticalFactor");(0,c.S6)(f,function(d){var g=d.attr("textAlign");if(g==="center"){var y=h>0?"end":"start";d.attr("textAlign",y)}})}}else if(t==="autoHide"){var v=i.getChildren().slice(0);(0,c.S6)(v,function(d){d.get("visible")||(o.get("isRegister")&&o.unregisterElement(d),d.remove())})}},e}(Lf),xm=mm,wm=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:Ve.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:Ve.textColor,textAlign:"center",textBaseline:"middle",fontFamily:Ve.fontFamily}},textBackground:{padding:5,style:{stroke:Ve.lineColor}}}})},e.prototype.renderInner=function(t){this.get("line")&&this.renderLine(t),this.get("text")&&(this.renderText(t),this.renderBackground(t))},e.prototype.renderText=function(t){var n=this.get("text"),i=n.style,a=n.autoRotate,o=n.content;if(!(0,c.UM)(o)){var s=this.getTextPoint(),l=null;if(a){var u=this.getRotateAngle();l=hi(s,u)}this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:(0,p.pi)((0,p.pi)((0,p.pi)({},s),{text:o,matrix:l}),i)})}},e.prototype.renderLine=function(t){var n=this.getLinePath(),i=this.get("line"),a=i.style;this.addShape(t,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:(0,p.pi)({path:n},a)})},e.prototype.renderBackground=function(t){var n=this.getElementId("text"),i=t.findById(n),a=this.get("textBackground");if(a&&i){var o=i.getBBox(),s=Yo(a.padding),l=a.style,u=this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:(0,p.pi)({x:o.x-s[3],y:o.y-s[0],width:o.width+s[1]+s[3],height:o.height+s[0]+s[2],matrix:i.attr("matrix")},l)});u.toBack()}},e}(xr),Wl=wm,Sm=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),n=t.start,i=t.end,a=this.get("text").position,o=Math.atan2(i.y-n.y,i.x-n.x),s=a==="start"?o-Math.PI/2:o+Math.PI/2;return s},e.prototype.getTextPoint=function(){var t=this.getLocation(),n=t.start,i=t.end,a=this.get("text"),o=a.position,s=a.offset;return Ff(n,i,o,s)},e.prototype.getLinePath=function(){var t=this.getLocation(),n=t.start,i=t.end;return[["M",n.x,n.y],["L",i.x,i.y]]},e}(Wl),Rf=Sm,bm=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:Math.PI*3/2})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),n=t.startAngle,i=t.endAngle,a=this.get("text").position,o=a==="start"?n+Math.PI/2:i-Math.PI/2;return o},e.prototype.getTextPoint=function(){var t=this.get("text"),n=t.position,i=t.offset,a=this.getLocation(),o=a.center,s=a.radius,l=a.startAngle,u=a.endAngle,f=n==="start"?l:u,h=this.getRotateAngle()-Math.PI,v=Yi(o,s,f),d=Math.cos(h)*i,g=Math.sin(h)*i;return{x:v.x+d,y:v.y+g}},e.prototype.getLinePath=function(){var t=this.getLocation(),n=t.center,i=t.radius,a=t.startAngle,o=t.endAngle,s=null;if(o-a==Math.PI*2){var l=n.x,u=n.y;s=[["M",l,u-i],["A",i,i,0,1,1,l,u+i],["A",i,i,0,1,1,l,u-i],["Z"]]}else{var f=Yi(n,i,a),h=Yi(n,i,o),v=Math.abs(o-a)>Math.PI?1:0,d=a>o?0:1;s=[["M",f.x,f.y],["A",i,i,0,v,d,h.x,h.y]]}return s},e}(Wl),Mm=bm,Da="g2-crosshair",Zl=Da+"-line",jl=Da+"-text",Pa,Cm=(Pa={},Pa[""+Da]={position:"relative"},Pa[""+Zl]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},Pa[""+jl]={position:"absolute",color:Ve.textColor,fontFamily:Ve.fontFamily},Pa),Am=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"crosshair",type:"html",locationType:"region",start:{x:0,y:0},end:{x:0,y:0},capture:!1,text:null,containerTpl:'
',crosshairTpl:'
',textTpl:'{content}',domStyles:null,containerClassName:Da,defaultStyles:Cm,defaultCfg:{text:{position:"start",content:null,align:"center",offset:10}}})},e.prototype.render=function(){this.resetText(),this.resetPosition()},e.prototype.initCrossHair=function(){var t=this.getContainer(),n=this.get("crosshairTpl"),i=it(n);t.appendChild(i),this.applyStyle(Zl,i),this.set("crosshairEl",i)},e.prototype.getTextPoint=function(){var t=this.getLocation(),n=t.start,i=t.end,a=this.get("text"),o=a.position,s=a.offset;return Ff(n,i,o,s)},e.prototype.resetText=function(){var t=this.get("text"),n=this.get("textEl");if(t){var i=t.content;if(!n){var a=this.getContainer(),o=(0,c.ng)(this.get("textTpl"),t);n=it(o),a.appendChild(n),this.applyStyle(jl,n),this.set("textEl",n)}n.innerHTML=i}else n&&n.remove()},e.prototype.isVertical=function(t,n){return t.x===n.x},e.prototype.resetPosition=function(){var t=this.get("crosshairEl");t||(this.initCrossHair(),t=this.get("crosshairEl"));var n=this.get("start"),i=this.get("end"),a=Math.min(n.x,i.x),o=Math.min(n.y,i.y);this.isVertical(n,i)?yt(t,{width:"1px",height:Lr(Math.abs(i.y-n.y))}):yt(t,{height:"1px",width:Lr(Math.abs(i.x-n.x))}),yt(t,{top:Lr(o),left:Lr(a)}),this.alignText()},e.prototype.alignText=function(){var t=this.get("textEl");if(t){var n=this.get("text").align,i=t.clientWidth,a=this.getTextPoint();switch(n){case"center":a.x=a.x-i/2;break;case"right":a.x=a.x-i;case"left":break}yt(t,{top:Lr(a.y),left:Lr(a.x)})}},e.prototype.updateInner=function(t){(0,c.wH)(t,"text")&&this.resetText(),r.prototype.updateInner.call(this,t)},e}(Hl),Tm=Am,Em=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:Ve.lineColor}}}})},e.prototype.getLineType=function(){var t=this.get("line")||this.get("defaultCfg").line;return t.type},e.prototype.renderInner=function(t){this.drawGrid(t)},e.prototype.getAlternatePath=function(t,n){var i=this.getGridPath(t),a=n.slice(0).reverse(),o=this.getGridPath(a,!0),s=this.get("closed");return s?i=i.concat(o):(o[0][0]="L",i=i.concat(o),i.push(["Z"])),i},e.prototype.getPathStyle=function(){return this.get("line").style},e.prototype.drawGrid=function(t){var n=this,i=this.get("line"),a=this.get("items"),o=this.get("alternateColor"),s=null;(0,c.S6)(a,function(l,u){var f=l.id||u;if(i){var h=n.getPathStyle();h=(0,c.mf)(h)?h(l,u,a):h;var v=n.getElementId("line-"+f),d=n.getGridPath(l.points);n.addShape(t,{type:"path",name:"grid-line",id:v,attrs:(0,c.CD)({path:d},h)})}if(o&&u>0){var g=n.getElementId("region-"+f),y=u%2==0;if((0,c.HD)(o))y&&n.drawAlternateRegion(g,t,s.points,l.points,o);else{var m=y?o[1]:o[0];n.drawAlternateRegion(g,t,s.points,l.points,m)}}s=l})},e.prototype.drawAlternateRegion=function(t,n,i,a,o){var s=this.getAlternatePath(i,a);this.addShape(n,{type:"path",id:t,name:"grid-region",attrs:{path:s,fill:o}})},e}(xr),Nf=Em;function Fm(r,e,t,n){var i=t-r,a=n-e;return Math.sqrt(i*i+a*a)}var Im=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{type:"circle",center:null,closed:!0})},e.prototype.getGridPath=function(t,n){var i=this.getLineType(),a=this.get("closed"),o=[];if(t.length)if(i==="circle"){var s=this.get("center"),l=t[0],u=Fm(s.x,s.y,l.x,l.y),f=n?0:1;a?(o.push(["M",s.x,s.y-u]),o.push(["A",u,u,0,0,f,s.x,s.y+u]),o.push(["A",u,u,0,0,f,s.x,s.y-u]),o.push(["Z"])):(0,c.S6)(t,function(h,v){v===0?o.push(["M",h.x,h.y]):o.push(["A",u,u,0,0,f,h.x,h.y])})}else(0,c.S6)(t,function(h,v){v===0?o.push(["M",h.x,h.y]):o.push(["L",h.x,h.y])}),a&&o.push(["Z"]);return o},e}(Nf),Lm=Im,Dm=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{type:"line"})},e.prototype.getGridPath=function(t){var n=[];return(0,c.S6)(t,function(i,a){a===0?n.push(["M",i.x,i.y]):n.push(["L",i.x,i.y])}),n},e}(Nf),Pm=Dm,Om=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},e.prototype.getLayoutBBox=function(){var t=r.prototype.getLayoutBBox.call(this),n=this.get("maxWidth"),i=this.get("maxHeight"),a=t.width,o=t.height;return n&&(a=Math.min(a,n)),i&&(o=Math.min(o,i)),Ea(t.minX,t.minY,a,o)},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.resetLocation=function(){var t=this.get("x"),n=this.get("y"),i=this.get("offsetX"),a=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+i,y:n+a})},e.prototype.applyOffset=function(){this.resetLocation()},e.prototype.getDrawPoint=function(){return this.get("currentPoint")},e.prototype.setDrawPoint=function(t){return this.set("currentPoint",t)},e.prototype.renderInner=function(t){this.resetDraw(),this.get("title")&&this.drawTitle(t),this.drawLegendContent(t),this.get("background")&&this.drawBackground(t)},e.prototype.drawBackground=function(t){var n=this.get("background"),i=t.getBBox(),a=Yo(n.padding),o=(0,p.pi)({x:0,y:0,width:i.width+a[1]+a[3],height:i.height+a[0]+a[2]},n.style),s=this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:o});s.toBack()},e.prototype.drawTitle=function(t){var n=this.get("currentPoint"),i=this.get("title"),a=i.spacing,o=i.style,s=i.text,l=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:(0,p.pi)({text:s,x:n.x,y:n.y},o)}),u=l.getBBox();this.set("currentPoint",{x:n.x,y:u.maxY+a})},e.prototype.resetDraw=function(){var t=this.get("background"),n={x:0,y:0};if(t){var i=Yo(t.padding);n.x=i[3],n.y=i[0]}this.set("currentPoint",n)},e}(xr),zf=Om,$l={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},Zo={fill:Ve.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:Ve.fontFamily,fontWeight:"normal",lineHeight:12},ql="navigation-arrow-right",Kl="navigation-arrow-left",Uf={right:90*Math.PI/180,left:(360-90)*Math.PI/180,up:0,down:180*Math.PI/180},km=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.currentPageIndex=1,t.totalPagesCnt=1,t.pageWidth=0,t.pageHeight=0,t.startX=0,t.startY=0,t.onNavigationBack=function(){var n=t.getElementByLocalId("item-group");if(t.currentPageIndex>1){t.currentPageIndex-=1,t.updateNavigation();var i=t.getCurrentNavigationMatrix();t.get("animate")?n.animate({matrix:i},100):n.attr({matrix:i})}},t.onNavigationAfter=function(){var n=t.getElementByLocalId("item-group");if(t.currentPageIndexm&&(m=lt),d==="horizontal"?(x&&xA&&(A=Xt.width)}),B=A,A+=v,u&&(A=Math.min(u,A),B=Math.min(u,B)),this.pageWidth=A,this.pageHeight=f-Math.max(m.height,d+rt);var kt=Math.floor(this.pageHeight/(d+rt));(0,c.S6)(l,function(Ft,Xt){Xt!==0&&Xt%kt==0&&(b+=1,x.x+=A,x.y=o),i.moveElementTo(Ft,x),Ft.getParent().setClip({type:"rect",attrs:{x:x.x,y:x.y,width:A,height:d}}),x.y+=d+rt}),this.totalPagesCnt=b,this.moveElementTo(y,{x:a+B/2-m.width/2-m.minX,y:f-m.height-m.minY})}this.pageHeight&&this.pageWidth&&n.getParent().setClip({type:"rect",attrs:{x:this.startX,y:this.startY,width:this.pageWidth,height:this.pageHeight}}),s==="horizontal"&&this.get("maxRow")?this.totalPagesCnt=Math.ceil(b/this.get("maxRow")):this.totalPagesCnt=b,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(y),n.attr("matrix",this.getCurrentNavigationMatrix())},e.prototype.drawNavigation=function(t,n,i,a){var o={x:0,y:0},s=this.addGroup(t,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),l=(0,c.U2)(a.marker,"style",{}),u=l.size,f=u===void 0?12:u,h=(0,p._T)(l,["size"]),v=this.drawArrow(s,o,Kl,n==="horizontal"?"up":"left",f,h);v.on("click",this.onNavigationBack);var d=v.getBBox();o.x+=d.width+2;var g=this.addShape(s,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:(0,p.pi)({x:o.x,y:o.y+f/2,text:i,textBaseline:"middle"},(0,c.U2)(a.text,"style"))}),y=g.getBBox();o.x+=y.width+2;var m=this.drawArrow(s,o,ql,n==="horizontal"?"down":"right",f,h);return m.on("click",this.onNavigationAfter),s},e.prototype.updateNavigation=function(t){var n=(0,c.b$)({},$l,this.get("pageNavigator")),i=n.marker.style,a=i.fill,o=i.opacity,s=i.inactiveFill,l=i.inactiveOpacity,u=this.currentPageIndex+"/"+this.totalPagesCnt,f=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),h=t?t.findById(this.getElementId(Kl)):this.getElementByLocalId(Kl),v=t?t.findById(this.getElementId(ql)):this.getElementByLocalId(ql);f.attr("text",u),h.attr("opacity",this.currentPageIndex===1?l:o),h.attr("fill",this.currentPageIndex===1?s:a),h.attr("cursor",this.currentPageIndex===1?"not-allowed":"pointer"),v.attr("opacity",this.currentPageIndex===this.totalPagesCnt?l:o),v.attr("fill",this.currentPageIndex===this.totalPagesCnt?s:a),v.attr("cursor",this.currentPageIndex===this.totalPagesCnt?"not-allowed":"pointer");var d=h.getBBox().maxX+2;f.attr("x",d),d+=f.getBBox().width+2,this.updateArrowPath(v,{x:d,y:0})},e.prototype.drawArrow=function(t,n,i,a,o,s){var l=n.x,u=n.y,f=this.addShape(t,{type:"path",id:this.getElementId(i),name:i,attrs:(0,p.pi)({size:o,direction:a,path:[["M",l+o/2,u],["L",l,u+o],["L",l+o,u+o],["Z"]],cursor:"pointer"},s)});return f.attr("matrix",hi({x:l+o/2,y:u+o/2},Uf[a])),f},e.prototype.updateArrowPath=function(t,n){var i=n.x,a=n.y,o=t.attr(),s=o.size,l=o.direction,u=hi({x:i+s/2,y:a+s/2},Uf[l]);t.attr("path",[["M",i+s/2,a],["L",i,a+s],["L",i+s,a+s],["Z"]]),t.attr("matrix",u)},e.prototype.getCurrentNavigationMatrix=function(){var t=this,n=t.currentPageIndex,i=t.pageWidth,a=t.pageHeight,o=this.get("layout"),s=o==="horizontal"?{x:0,y:a*(1-n)}:{x:i*(1-n),y:0};return zl(s)},e.prototype.applyItemStates=function(t,n){var i=this.getItemStates(t),a=i.length>0;if(a){var o=n.getChildren(),s=this.get("itemStates");(0,c.S6)(o,function(l){var u=l.get("name"),f=u.split("-")[2],h=Ia(t,f,s);h&&(l.attr(h),f==="marker"&&!(l.get("isStroke")&&l.get("isFill"))&&(l.get("isStroke")&&l.attr("fill",null),l.get("isFill")&&l.attr("stroke",null)))})}},e.prototype.getLimitItemWidth=function(){var t=this.get("itemWidth"),n=this.get("maxItemWidth");return n?t&&(n=t<=n?t:n):t&&(n=t),n},e}(zf),_m=km,Bm=1.4,Vf=.4,Rm=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{type:"continue",min:0,max:100,value:null,colors:[],track:{},rail:{},label:{},handler:{},slidable:!0,tip:null,step:null,maxWidth:null,maxHeight:null,defaultCfg:{label:{align:"rail",spacing:5,formatter:null,style:{fontSize:12,fill:Ve.textColor,textBaseline:"middle",fontFamily:Ve.fontFamily}},handler:{size:10,style:{fill:"#fff",stroke:"#333"}},track:{},rail:{type:"color",size:20,defaultLength:100,style:{fill:"#DCDEE2"}},title:{spacing:5,style:{fill:Ve.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}}}})},e.prototype.isSlider=function(){return!0},e.prototype.getValue=function(){return this.getCurrentValue()},e.prototype.getRange=function(){return{min:this.get("min"),max:this.get("max")}},e.prototype.setRange=function(t,n){this.update({min:t,max:n})},e.prototype.setValue=function(t){var n=this.getValue();this.set("value",t);var i=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(i),this.delegateEmit("valuechanged",{originValue:n,value:t})},e.prototype.initEvent=function(){var t=this.get("group");this.bindSliderEvent(t),this.bindRailEvent(t),this.bindTrackEvent(t)},e.prototype.drawLegendContent=function(t){this.drawRail(t),this.drawLabels(t),this.fixedElements(t),this.resetTrack(t),this.resetTrackClip(t),this.get("slidable")&&this.resetHandlers(t)},e.prototype.bindSliderEvent=function(t){this.bindHandlersEvent(t)},e.prototype.bindHandlersEvent=function(t){var n=this;t.on("legend-handler-min:drag",function(i){var a=n.getValueByCanvasPoint(i.x,i.y),o=n.getCurrentValue(),s=o[1];sa&&(s=a),n.setValue([s,a])})},e.prototype.bindRailEvent=function(t){},e.prototype.bindTrackEvent=function(t){var n=this,i=null;t.on("legend-track:dragstart",function(a){i={x:a.x,y:a.y}}),t.on("legend-track:drag",function(a){if(!!i){var o=n.getValueByCanvasPoint(i.x,i.y),s=n.getValueByCanvasPoint(a.x,a.y),l=n.getCurrentValue(),u=l[1]-l[0],f=n.getRange(),h=s-o;h<0?l[0]+h>f.min?n.setValue([l[0]+h,l[1]+h]):n.setValue([f.min,f.min+u]):h>0&&(h>0&&l[1]+ho&&(h=o),h0&&this.changeRailLength(a,s,i[s]-d)}},e.prototype.changeRailLength=function(t,n,i){var a=t.getBBox(),o;n==="height"?o=this.getRailPath(a.x,a.y,a.width,i):o=this.getRailPath(a.x,a.y,i,a.height),t.attr("path",o)},e.prototype.changeRailPosition=function(t,n,i){var a=t.getBBox(),o=this.getRailPath(n,i,a.width,a.height);t.attr("path",o)},e.prototype.fixedHorizontal=function(t,n,i,a){var o=this.get("label"),s=o.align,l=o.spacing,u=i.getBBox(),f=t.getBBox(),h=n.getBBox(),v=u.height;this.fitRailLength(f,h,u,i),u=i.getBBox(),s==="rail"?(t.attr({x:a.x,y:a.y+v/2}),this.changeRailPosition(i,a.x+f.width+l,a.y),n.attr({x:a.x+f.width+u.width+l*2,y:a.y+v/2})):s==="top"?(t.attr({x:a.x,y:a.y}),n.attr({x:a.x+u.width,y:a.y}),this.changeRailPosition(i,a.x,a.y+f.height+l)):(this.changeRailPosition(i,a.x,a.y),t.attr({x:a.x,y:a.y+u.height+l}),n.attr({x:a.x+u.width,y:a.y+u.height+l}))},e.prototype.fixedVertail=function(t,n,i,a){var o=this.get("label"),s=o.align,l=o.spacing,u=i.getBBox(),f=t.getBBox(),h=n.getBBox();if(this.fitRailLength(f,h,u,i),u=i.getBBox(),s==="rail")t.attr({x:a.x,y:a.y}),this.changeRailPosition(i,a.x,a.y+f.height+l),n.attr({x:a.x,y:a.y+f.height+u.height+l*2});else if(s==="right")t.attr({x:a.x+u.width+l,y:a.y}),this.changeRailPosition(i,a.x,a.y),n.attr({x:a.x+u.width+l,y:a.y+u.height});else{var v=Math.max(f.width,h.width);t.attr({x:a.x,y:a.y}),this.changeRailPosition(i,a.x+v+l,a.y),n.attr({x:a.x,y:a.y+u.height})}},e}(zf),Nm=Rm,Ln="g2-tooltip",Dn="g2-tooltip-title",Oa="g2-tooltip-list",jo="g2-tooltip-list-item",$o="g2-tooltip-marker",qo="g2-tooltip-value",Gf="g2-tooltip-name",Jl="g2-tooltip-crosshair-x",Ql="g2-tooltip-crosshair-y",pn,zm=(pn={},pn[""+Ln]={position:"absolute",visibility:"visible",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:Ve.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},pn[""+Dn]={marginBottom:"4px"},pn[""+Oa]={margin:"0px",listStyleType:"none",padding:"0px"},pn[""+jo]={listStyleType:"none",marginBottom:"4px"},pn[""+$o]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},pn[""+qo]={display:"inline-block",float:"right",marginLeft:"30px"},pn[""+Jl]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},pn[""+Ql]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},pn);function Um(r,e,t,n,i){var a={left:ri.x+i.width,top:ei.y+i.height};return a}function Vm(r,e,t,n,i,a){var o=r,s=e;switch(a){case"left":o=r-n-t,s=e-i/2;break;case"right":o=r+t,s=e-i/2;break;case"top":o=r-n/2,s=e-i-t;break;case"bottom":o=r-n/2,s=e+t;break;default:o=r+t,s=e-i-t;break}return{x:o,y:s}}function Gm(r,e,t,n,i,a,o){var s=Vm(r,e,t,n,i,a);if(o){var l=Um(s.x,s.y,n,i,o);a==="auto"?(l.right&&(s.x=Math.max(0,r-n-t)),l.top&&(s.y=Math.max(0,e-i-t))):a==="top"||a==="bottom"?(l.left&&(s.x=o.x),l.right&&(s.x=o.x+o.width-n),a==="top"&&l.top&&(s.y=e+t),a==="bottom"&&l.bottom&&(s.y=e-i-t)):(l.top&&(s.y=o.y),l.bottom&&(s.y=o.y+o.height-i),a==="left"&&l.left&&(s.x=r+t),a==="right"&&l.right&&(s.x=r-n-t))}return s}function Hm(r,e){var t=!1;return(0,c.S6)(e,function(n){if((0,c.wH)(r,n))return t=!0,!1}),t}var Ym=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"tooltip",type:"html",x:0,y:0,items:[],customContent:null,containerTpl:'
    ',itemTpl:'
  • {name}: {value}
  • `,xCrosshairTpl:'
    ',yCrosshairTpl:'
    ',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:Ln,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:zm})},e.prototype.render=function(){this.get("customContent")?this.renderCustomContent():(this.resetTitle(),this.renderItems()),this.resetPosition()},e.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},e.prototype.show=function(){var t=this.getContainer();!t||this.destroyed||(this.set("visible",!0),yt(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},e.prototype.hide=function(){var t=this.getContainer();!t||this.destroyed||(this.set("visible",!1),yt(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},e.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},e.prototype.setCrossHairsVisible=function(t){var n=t?"":"none",i=this.get("xCrosshairDom"),a=this.get("yCrosshairDom");i&&yt(i,{display:n}),a&&yt(a,{display:n})},e.prototype.initContainer=function(){if(r.prototype.initContainer.call(this),this.get("customContent")){this.get("container")&&this.get("container").remove();var t=this.getHtmlContentNode();this.get("parent").appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()}},e.prototype.updateInner=function(t){this.get("customContent")?this.renderCustomContent():(Hm(t,["title","showTitle"])&&this.resetTitle(),(0,c.wH)(t,"items")&&this.renderItems()),r.prototype.updateInner.call(this,t)},e.prototype.initDom=function(){this.cacheDoms()},e.prototype.removeDom=function(){r.prototype.removeDom.call(this),this.clearCrosshairs()},e.prototype.resetPosition=function(){var t=this.get("x"),n=this.get("y"),i=this.get("offset"),a=this.getOffset(),o=a.offsetX,s=a.offsetY,l=this.get("position"),u=this.get("region"),f=this.getContainer(),h=this.getBBox(),v=h.width,d=h.height,g;u&&(g=Ta(u));var y=Gm(t,n,i,v,d,l,g);yt(f,{left:Lr(y.x+o),top:Lr(y.y+s)}),this.resetCrosshairs()},e.prototype.renderCustomContent=function(){var t=this.getHtmlContentNode(),n=this.get("parent"),i=this.get("container");i&&i.parentNode===n?n.replaceChild(t,i):n.appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()},e.prototype.getHtmlContentNode=function(){var t,n=this.get("customContent");if(n){var i=n(this.get("title"),this.get("items"));(0,c.kK)(i)?t=i:t=it(i)}return t},e.prototype.cacheDoms=function(){var t=this.getContainer(),n=t.getElementsByClassName(Dn)[0],i=t.getElementsByClassName(Oa)[0];this.set("titleDom",n),this.set("listDom",i)},e.prototype.resetTitle=function(){var t=this.get("title"),n=this.get("showTitle");n&&t?this.setTitle(t):this.setTitle("")},e.prototype.setTitle=function(t){var n=this.get("titleDom");n&&(n.innerText=t)},e.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),n=this.get("crosshairs");if(!t||!n)this.clearCrosshairs();else{var i=Ta(t),a=this.get("xCrosshairDom"),o=this.get("yCrosshairDom");n==="x"?(this.resetCrosshair("x",i),o&&(o.remove(),this.set("yCrosshairDom",null))):n==="y"?(this.resetCrosshair("y",i),a&&(a.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",i),this.resetCrosshair("y",i)),this.setCrossHairsVisible(this.get("visible"))}},e.prototype.resetCrosshair=function(t,n){var i=this.checkCrosshair(t),a=this.get(t);t==="x"?yt(i,{left:Lr(a),top:Lr(n.y),height:Lr(n.height)}):yt(i,{top:Lr(a),left:Lr(n.x),width:Lr(n.width)})},e.prototype.checkCrosshair=function(t){var n=t+"CrosshairDom",i=t+"CrosshairTpl",a="CROSSHAIR_"+t.toUpperCase(),o=mt[a],s=this.get(n),l=this.get("parent");return s||(s=it(this.get(i)),this.applyStyle(o,s),l.appendChild(s),this.set(n,s)),s},e.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),n=this.get("itemTpl"),i=this.get("listDom");i&&((0,c.S6)(t,function(a){var o=En.toCSSGradient(a.color),s=(0,p.pi)((0,p.pi)({},a),{color:o}),l=(0,c.ng)(n,s),u=it(l);i.appendChild(u)}),this.applyChildrenStyles(i,this.get("domStyles")))},e.prototype.clearItemDoms=function(){this.get("listDom")&&Ul(this.get("listDom"))},e.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),n=this.get("yCrosshairDom");t&&t.remove(),n&&n.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},e}(Hl),Xm=Ym,Wm={opacity:0},Zm={stroke:"#C5C5C5",strokeOpacity:.85},jm={fill:"#CACED4",opacity:.85},gi=J(80389);function $m(r){return(0,c.UI)(r,function(e,t){var n=t===0?"M":"L",i=e[0],a=e[1];return[n,i,a]})}function Hf(r){return $m(r)}function qm(r){if(r.length<=2)return Hf(r);var e=[];(0,c.S6)(r,function(o){(0,c.Xy)(o,e.slice(e.length-2))||e.push(o[0],o[1])});var t=(0,gi.e9)(e,!1),n=(0,c.YM)(r),i=n[0],a=n[1];return t.unshift(["M",i,a]),t}function Km(r,e,t,n){n===void 0&&(n=!0);var i=new gr({values:r}),a=new Hn({values:(0,c.UI)(r,function(s,l){return l})}),o=(0,c.UI)(r,function(s,l){return[a.scale(l)*e,t-i.scale(s)*t]});return n?qm(o):Hf(o)}function Jm(r,e){var t=new gr({values:r}),n=t.max<0?t.max:Math.max(0,t.min);return e-t.scale(n)*e}function Qm(r,e,t,n){var i=(0,p.pr)(r),a=Jm(n,t);return i.push(["L",e,a]),i.push(["L",0,a]),i.push(["Z"]),i}var tx=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:Wm,lineStyle:Zm,areaStyle:jm})},e.prototype.renderInner=function(t){var n=this.cfg,i=n.width,a=n.height,o=n.data,s=n.smooth,l=n.isArea,u=n.backgroundStyle,f=n.lineStyle,h=n.areaStyle;this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,p.pi)({x:0,y:0,width:i,height:a},u)});var v=Km(o,i,a,s);if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:(0,p.pi)({path:v},f)}),l){var d=Qm(v,i,a,o);this.addShape(t,{id:this.getElementId("area"),type:"path",attrs:(0,p.pi)({path:d},h)})}},e.prototype.applyOffset=function(){var t=this.cfg,n=t.x,i=t.y;this.moveElementTo(this.get("group"),{x:n,y:i})},e}(xr),y_=null,Yf={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},Xf=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"handler",x:0,y:0,width:10,height:24,style:Yf})},e.prototype.renderInner=function(t){var n=this.cfg,i=n.width,a=n.height,o=n.style,s=o.fill,l=o.stroke,u=o.radius,f=o.opacity,h=o.cursor;this.addShape(t,{type:"rect",id:this.getElementId("background"),attrs:{x:0,y:0,width:i,height:a,fill:s,stroke:l,radius:u,opacity:f,cursor:h}});var v=1/3*i,d=2/3*i,g=1/4*a,y=3/4*a;this.addShape(t,{id:this.getElementId("line-left"),type:"line",attrs:{x1:v,y1:g,x2:v,y2:y,stroke:l,cursor:h}}),this.addShape(t,{id:this.getElementId("line-right"),type:"line",attrs:{x1:d,y1:g,x2:d,y2:y,stroke:l,cursor:h}})},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.bindEvents=function(){var t=this;this.get("group").on("mouseenter",function(){var n=t.get("style").highLightFill;t.getElementByLocalId("background").attr("fill",n),t.draw()}),this.get("group").on("mouseleave",function(){var n=t.get("style").fill;t.getElementByLocalId("background").attr("fill",n),t.draw()})},e.prototype.draw=function(){var t=this.get("container").get("canvas");t&&t.draw()},e}(xr),m_=null,ex={fill:"#416180",opacity:.05},rx={fill:"#5B8FF9",opacity:.15,cursor:"move"},Ko=10,nx={width:Ko,height:24},ix={textBaseline:"middle",fill:"#000",opacity:.45},ax="sliderchange",ox=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.onMouseDown=function(n){return function(i){t.currentTarget=n;var a=i.originalEvent;a.stopPropagation(),a.preventDefault(),t.prevX=(0,c.U2)(a,"touches.0.pageX",a.pageX),t.prevY=(0,c.U2)(a,"touches.0.pageY",a.pageY);var o=t.getContainerDOM();o.addEventListener("mousemove",t.onMouseMove),o.addEventListener("mouseup",t.onMouseUp),o.addEventListener("mouseleave",t.onMouseUp),o.addEventListener("touchmove",t.onMouseMove),o.addEventListener("touchend",t.onMouseUp),o.addEventListener("touchcancel",t.onMouseUp)}},t.onMouseMove=function(n){var i=t.cfg.width,a=[t.get("start"),t.get("end")];n.stopPropagation(),n.preventDefault();var o=(0,c.U2)(n,"touches.0.pageX",n.pageX),s=(0,c.U2)(n,"touches.0.pageY",n.pageY),l=o-t.prevX,u=t.adjustOffsetRange(l/i);t.updateStartEnd(u),t.updateUI(t.getElementByLocalId("foreground"),t.getElementByLocalId("minText"),t.getElementByLocalId("maxText")),t.prevX=o,t.prevY=s,t.draw(),t.emit(ax,[t.get("start"),t.get("end")].sort()),t.delegateEmit("valuechanged",{originValue:a,value:[t.get("start"),t.get("end")]})},t.onMouseUp=function(){t.currentTarget&&(t.currentTarget=void 0);var n=t.getContainerDOM();n&&(n.removeEventListener("mousemove",t.onMouseMove),n.removeEventListener("mouseup",t.onMouseUp),n.removeEventListener("mouseleave",t.onMouseUp),n.removeEventListener("touchmove",t.onMouseMove),n.removeEventListener("touchend",t.onMouseUp),n.removeEventListener("touchcancel",t.onMouseUp))},t}return e.prototype.setRange=function(t,n){this.set("minLimit",t),this.set("maxLimit",n);var i=this.get("start"),a=this.get("end"),o=(0,c.uZ)(i,t,n),s=(0,c.uZ)(a,t,n);!this.get("isInit")&&(i!==o||a!==s)&&this.setValue([o,s])},e.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},e.prototype.setValue=function(t){var n=this.getRange();if((0,c.kJ)(t)&&t.length===2){var i=[this.get("start"),this.get("end")];this.update({start:(0,c.uZ)(t[0],n.min,n.max),end:(0,c.uZ)(t[1],n.min,n.max)}),this.get("updateAutoRender")||this.render(),this.delegateEmit("valuechanged",{originValue:i,value:t})}},e.prototype.getValue=function(){return[this.get("start"),this.get("end")]},e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:ex,foregroundStyle:rx,handlerStyle:nx,textStyle:ix}})},e.prototype.update=function(t){var n=t.start,i=t.end,a=(0,p.pi)({},t);(0,c.UM)(n)||(a.start=(0,c.uZ)(n,0,1)),(0,c.UM)(i)||(a.end=(0,c.uZ)(i,0,1)),r.prototype.update.call(this,a),this.minHandler=this.getChildComponentById(this.getElementId("minHandler")),this.maxHandler=this.getChildComponentById(this.getElementId("maxHandler")),this.trend=this.getChildComponentById(this.getElementId("trend"))},e.prototype.init=function(){this.set("start",(0,c.uZ)(this.get("start"),0,1)),this.set("end",(0,c.uZ)(this.get("end"),0,1)),r.prototype.init.call(this)},e.prototype.render=function(){r.prototype.render.call(this),this.updateUI(this.getElementByLocalId("foreground"),this.getElementByLocalId("minText"),this.getElementByLocalId("maxText"))},e.prototype.renderInner=function(t){var n=this.cfg,i=n.start,a=n.end,o=n.width,s=n.height,l=n.trendCfg,u=l===void 0?{}:l,f=n.minText,h=n.maxText,v=n.backgroundStyle,d=v===void 0?{}:v,g=n.foregroundStyle,y=g===void 0?{}:g,m=n.textStyle,x=m===void 0?{}:m,b=(0,c.b$)({},Yf,this.cfg.handlerStyle),C=i*o,A=a*o;(0,c.dp)((0,c.U2)(u,"data"))&&(this.trend=this.addComponent(t,(0,p.pi)({component:tx,id:this.getElementId("trend"),x:0,y:0,width:o,height:s},u))),this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,p.pi)({x:0,y:0,width:o,height:s},d)});var B=this.addShape(t,{id:this.getElementId("minText"),type:"text",attrs:(0,p.pi)({y:s/2,textAlign:"right",text:f,silent:!1},x)}),rt=this.addShape(t,{id:this.getElementId("maxText"),type:"text",attrs:(0,p.pi)({y:s/2,textAlign:"left",text:h,silent:!1},x)}),lt=this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:(0,p.pi)({y:0,height:s},y)}),xt=(0,c.U2)(b,"width",Ko),kt=(0,c.U2)(b,"height",24);this.minHandler=this.addComponent(t,{component:Xf,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(s-kt)/2,width:xt,height:kt,cursor:"ew-resize",style:b}),this.maxHandler=this.addComponent(t,{component:Xf,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(s-kt)/2,width:xt,height:kt,cursor:"ew-resize",style:b})},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.updateUI=function(t,n,i){var a=this.cfg,o=a.start,s=a.end,l=a.width,u=a.minText,f=a.maxText,h=a.handlerStyle,v=a.height,d=o*l,g=s*l;this.trend&&(this.trend.update({width:l,height:v}),this.get("updateAutoRender")||this.trend.render()),t.attr("x",d),t.attr("width",g-d);var y=(0,c.U2)(h,"width",Ko);n.attr("text",u),i.attr("text",f);var m=this._dodgeText([d,g],n,i),x=m[0],b=m[1];this.minHandler&&(this.minHandler.update({x:d-y/2}),this.get("updateAutoRender")||this.minHandler.render()),(0,c.S6)(x,function(C,A){return n.attr(A,C)}),this.maxHandler&&(this.maxHandler.update({x:g-y/2}),this.get("updateAutoRender")||this.maxHandler.render()),(0,c.S6)(b,function(C,A){return i.attr(A,C)})},e.prototype.bindEvents=function(){var t=this.get("group");t.on("handler-min:mousedown",this.onMouseDown("minHandler")),t.on("handler-min:touchstart",this.onMouseDown("minHandler")),t.on("handler-max:mousedown",this.onMouseDown("maxHandler")),t.on("handler-max:touchstart",this.onMouseDown("maxHandler"));var n=t.findById(this.getElementId("foreground"));n.on("mousedown",this.onMouseDown("foreground")),n.on("touchstart",this.onMouseDown("foreground"))},e.prototype.adjustOffsetRange=function(t){var n=this.cfg,i=n.start,a=n.end;switch(this.currentTarget){case"minHandler":{var o=0-i,s=1-i;return Math.min(s,Math.max(o,t))}case"maxHandler":{var o=0-a,s=1-a;return Math.min(s,Math.max(o,t))}case"foreground":{var o=0-i,s=1-a;return Math.min(s,Math.max(o,t))}}},e.prototype.updateStartEnd=function(t){var n=this.cfg,i=n.start,a=n.end;switch(this.currentTarget){case"minHandler":i+=t;break;case"maxHandler":a+=t;break;case"foreground":i+=t,a+=t;break}this.set("start",i),this.set("end",a)},e.prototype._dodgeText=function(t,n,i){var a,o,s=this.cfg,l=s.handlerStyle,u=s.width,f=2,h=(0,c.U2)(l,"width",Ko),v=t[0],d=t[1],g=!1;v>d&&(a=[d,v],v=a[0],d=a[1],o=[i,n],n=o[0],i=o[1],g=!0);var y=n.getBBox(),m=i.getBBox(),x=y.width>v-f?{x:v+h/2+f,textAlign:"left"}:{x:v-h/2-f,textAlign:"right"},b=m.width>u-d-f?{x:d-h/2-f,textAlign:"right"}:{x:d+h/2+f,textAlign:"left"};return g?[b,x]:[x,b]},e.prototype.draw=function(){var t=this.get("container"),n=t&&t.get("canvas");n&&n.draw()},e.prototype.getContainerDOM=function(){var t=this.get("container"),n=t&&t.get("canvas");return n&&n.get("container")},e}(xr),x_=null;function Xi(r,e,t){if(r){if(typeof r.addEventListener=="function")return r.addEventListener(e,t,!1),{remove:function(){r.removeEventListener(e,t,!1)}};if(typeof r.attachEvent=="function")return r.attachEvent("on"+e,t),{remove:function(){r.detachEvent("on"+e,t)}}}}var sx={trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},tu={default:sx,hover:{thumbColor:"rgba(0,0,0,0.2)"}},lx=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.clearEvents=c.ZT,t.onStartEvent=function(n){return function(i){t.isMobile=n,i.originalEvent.preventDefault();var a=n?(0,c.U2)(i.originalEvent,"touches.0.clientX"):i.clientX,o=n?(0,c.U2)(i.originalEvent,"touches.0.clientY"):i.clientY;t.startPos=t.cfg.isHorizontal?a:o,t.bindLaterEvent()}},t.bindLaterEvent=function(){var n=t.getContainerDOM(),i=[];t.isMobile?i=[Xi(n,"touchmove",t.onMouseMove),Xi(n,"touchend",t.onMouseUp),Xi(n,"touchcancel",t.onMouseUp)]:i=[Xi(n,"mousemove",t.onMouseMove),Xi(n,"mouseup",t.onMouseUp),Xi(n,"mouseleave",t.onMouseUp)],t.clearEvents=function(){i.forEach(function(a){a.remove()})}},t.onMouseMove=function(n){var i=t.cfg,a=i.isHorizontal,o=i.thumbOffset;n.preventDefault();var s=t.isMobile?(0,c.U2)(n,"touches.0.clientX"):n.clientX,l=t.isMobile?(0,c.U2)(n,"touches.0.clientY"):n.clientY,u=a?s:l,f=u-t.startPos;t.startPos=u,t.updateThumbOffset(o+f)},t.onMouseUp=function(n){n.preventDefault(),t.clearEvents()},t.onTrackClick=function(n){var i=t.cfg,a=i.isHorizontal,o=i.x,s=i.y,l=i.thumbLen,u=t.getContainerDOM(),f=u.getBoundingClientRect(),h=n.clientX,v=n.clientY,d=a?h-f.left-o-l/2:v-f.top-s-l/2,g=t.validateRange(d);t.updateThumbOffset(g)},t.onThumbMouseOver=function(){var n=t.cfg.theme.hover.thumbColor;t.getElementByLocalId("thumb").attr("stroke",n),t.draw()},t.onThumbMouseOut=function(){var n=t.cfg.theme.default.thumbColor;t.getElementByLocalId("thumb").attr("stroke",n),t.draw()},t}return e.prototype.setRange=function(t,n){this.set("minLimit",t),this.set("maxLimit",n);var i=this.getValue(),a=(0,c.uZ)(i,t,n);i!==a&&!this.get("isInit")&&this.setValue(a)},e.prototype.getRange=function(){var t=this.get("minLimit")||0,n=this.get("maxLimit")||1;return{min:t,max:n}},e.prototype.setValue=function(t){var n=this.getRange(),i=this.getValue();this.update({thumbOffset:(this.get("trackLen")-this.get("thumbLen"))*(0,c.uZ)(t,n.min,n.max)}),this.delegateEmit("valuechange",{originalValue:i,value:this.getValue()})},e.prototype.getValue=function(){return(0,c.uZ)(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return(0,p.pi)((0,p.pi)({},t),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:tu})},e.prototype.renderInner=function(t){this.renderTrackShape(t),this.renderThumbShape(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.renderTrackShape=function(t){var n=this.cfg,i=n.trackLen,a=n.theme,o=a===void 0?{default:{}}:a,s=(0,c.b$)({},tu,o).default,l=s.lineCap,u=s.trackColor,f=s.size,h=(0,c.U2)(this.cfg,"size",f),v=this.get("isHorizontal")?{x1:0+h/2,y1:h/2,x2:i-h/2,y2:h/2,lineWidth:h,stroke:u,lineCap:l}:{x1:h/2,y1:0+h/2,x2:h/2,y2:i-h/2,lineWidth:h,stroke:u,lineCap:l};return this.addShape(t,{id:this.getElementId("track"),name:"track",type:"line",attrs:v})},e.prototype.renderThumbShape=function(t){var n=this.cfg,i=n.thumbOffset,a=n.thumbLen,o=n.theme,s=(0,c.b$)({},tu,o).default,l=s.size,u=s.lineCap,f=s.thumbColor,h=(0,c.U2)(this.cfg,"size",l),v=this.get("isHorizontal")?{x1:i+h/2,y1:h/2,x2:i+a-h/2,y2:h/2,lineWidth:h,stroke:f,lineCap:u,cursor:"default"}:{x1:h/2,y1:i+h/2,x2:h/2,y2:i+a-h/2,lineWidth:h,stroke:f,lineCap:u,cursor:"default"};return this.addShape(t,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:v})},e.prototype.bindEvents=function(){var t=this.get("group");t.on("mousedown",this.onStartEvent(!1)),t.on("mouseup",this.onMouseUp),t.on("touchstart",this.onStartEvent(!0)),t.on("touchend",this.onMouseUp);var n=t.findById(this.getElementId("track"));n.on("click",this.onTrackClick);var i=t.findById(this.getElementId("thumb"));i.on("mouseover",this.onThumbMouseOver),i.on("mouseout",this.onThumbMouseOut)},e.prototype.getContainerDOM=function(){var t=this.get("container"),n=t&&t.get("canvas");return n&&n.get("container")},e.prototype.validateRange=function(t){var n=this.cfg,i=n.thumbLen,a=n.trackLen,o=t;return t+i>a?o=a-i:t+ia.x?a.x:e,t=ta.y?a.y:n,i=i=n&&r<=i}function gx(r,e,t){if((0,c.HD)(r))return r.padEnd(e,t);if((0,c.kJ)(r)){var n=r.length;if(n=this.minX&&e.maxX<=this.maxX&&e.minY>=this.minY&&e.maxY<=this.maxY},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.add=function(){for(var e=[],t=0;te.minX&&this.minYe.minY},r.prototype.size=function(){return this.width*this.height},r.prototype.isPointIn=function(e){return e.x>=this.minX&&e.x<=this.maxX&&e.y>=this.minY&&e.y<=this.maxY},r}(),w_=function(r,e){var t=e.start,n=e.end;return new Tr(r.x+r.width*t.x,r.y+r.height*t.y,r.width*Math.abs(n.x-t.x),r.height*Math.abs(n.y-t.y))};function yx(r){return[[r.minX,r.minY],[r.maxX,r.minY],[r.maxX,r.maxY],[r.minX,r.maxY]]}function _a(r){if(r.isPolar&&!r.isTransposed)return(r.endAngle-r.startAngle)*r.getRadius();var e=r.convert({x:0,y:0}),t=r.convert({x:1,y:0});return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function mx(r){if(r.isPolar){var e=r.startAngle,t=r.endAngle;return t-e==Math.PI*2}return!1}function Qo(r,e){var t=r.getCenter();return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function xx(r,e){var t=!1;if(r)if(r.type==="theta"){var n=r.start,i=r.end;t=Wi(e.x,n.x,i.x)&&Wi(e.y,n.y,i.y)}else{var a=r.invert(e);t=Wi(a.x,0,1)&&Wi(a.y,0,1)}return t}function Zi(r,e){var t=r.getCenter();return Math.atan2(e.y-t.y,e.x-t.x)}function eu(r,e){e===void 0&&(e=0);var t=r.start,n=r.end,i=r.getWidth(),a=r.getHeight();if(r.isPolar){var o=r.startAngle,s=r.endAngle,l=r.getCenter(),u=r.getRadius();return{type:"path",startState:{path:Wn(l.x,l.y,u+e,o,o)},endState:function(h){var v=(s-o)*h+o,d=Wn(l.x,l.y,u+e,o,v);return{path:d}},attrs:{path:Wn(l.x,l.y,u+e,o,s)}}}var f;return r.isTransposed?f={height:a+e*2}:f={width:i+e*2},{type:"rect",startState:{x:t.x-e,y:n.y-e,width:r.isTransposed?i+e*2:0,height:r.isTransposed?0:a+e*2},endState:f,attrs:{x:t.x-e,y:n.y-e,width:i+e*2,height:a+e*2}}}function wx(r,e){e===void 0&&(e=0);var t=r.start,n=r.end,i=r.getWidth(),a=r.getHeight(),o=Math.min(t.x,n.x),s=Math.min(t.y,n.y);return Tr.fromRange(o-e,s-e,o+i+e,s+a+e)}var Sx=/^(?:(?!0000)[0-9]{4}([-/.]+)(?:(?:0?[1-9]|1[0-2])\1(?:0?[1-9]|1[0-9]|2[0-8])|(?:0?[13-9]|1[0-2])\1(?:29|30)|(?:0?[13578]|1[02])\1(?:31))|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)([-/.]+)0?2\2(?:29))(\s+([01]|([01][0-9]|2[0-3])):([0-9]|[0-5][0-9]):([0-9]|[0-5][0-9]))?$/;function bx(r){var e="linear";return Sx.test(r)?e="timeCat":(0,c.HD)(r)&&(e="cat"),e}function Kf(r,e,t,n){return e===void 0&&(e={}),e.type?e.type:r.type!=="identity"&&Lt.includes(t)&&["interval"].includes(n)||r.isCategory?"cat":r.type}function Mx(r,e,t){var n=e||[];if((0,c.hj)(r)||(0,c.UM)((0,c.Wx)(n,r))&&(0,c.xb)(t)){var i=Ol("identity");return new i({field:r.toString(),values:[r]})}var a=(0,c.I)(n,r),o=(0,c.U2)(t,"type",bx(a[0])),s=Ol(o);return new s((0,p.pi)({field:r,values:a},t))}function Cx(r,e){if(r.type!=="identity"&&e.type!=="identity"){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);r.change(t)}}function Ba(r){return r.alias||r.field}function Jf(r,e,t){var n=r.values,i=n.length,a;if(i===1)a=[.5,1];else{var o=1,s=0;mx(e)?e.isTransposed?(o=(0,c.U2)(t,"widthRatio.multiplePie",1/1.3),s=1/i*o,a=[s/2,1-s/2]):a=[0,1-1/i]:(s=1/i/2,a=[s,1-s])}return a}function Ax(r){var e=r.values.filter(function(t){return!(0,c.UM)(t)&&!isNaN(t)});return Math.max.apply(Math,(0,p.ev)((0,p.ev)([],(0,p.CR)(e),!1),[(0,c.UM)(r.max)?-Infinity:r.max],!1))}function Tx(r){var e,t;switch(r){case K.TOP:e={x:0,y:1},t={x:1,y:1};break;case K.RIGHT:e={x:1,y:0},t={x:1,y:1};break;case K.BOTTOM:e={x:0,y:0},t={x:1,y:0};break;case K.LEFT:e={x:0,y:0},t={x:0,y:1};break;default:e=t={x:0,y:0}}return{start:e,end:t}}function Ex(r){var e,t;return r.isTransposed?(e={x:0,y:0},t={x:1,y:0}):(e={x:0,y:0},t={x:0,y:1}),{start:e,end:t}}function ts(r,e){var t={start:{x:0,y:0},end:{x:0,y:0}};r.isRect?t=Tx(e):r.isPolar&&(t=Ex(r));var n=t.start,i=t.end;return{start:r.convert(n),end:r.convert(i)}}function S_(r,e){if(r.isRect)return r.isTransposed?[DIRECTION.RIGHT,DIRECTION.BOTTOM].includes(e)?1:-1:[DIRECTION.BOTTOM,DIRECTION.RIGHT].includes(e)?-1:1;if(r.isPolar){var t=r.x.start;return t<0?-1:1}return 1}function Qf(r){var e=r.start,t=r.end;return e.x===t.x}function th(r,e){var t=r.start,n=r.end,i=Qf(r);return i?(t.y-n.y)*(e.x-t.x)>0?1:-1:(n.x-t.x)*(t.y-e.y)>0?-1:1}function es(r,e){var t=(0,c.U2)(r,["components","axis"],{});return(0,c.b$)({},(0,c.U2)(t,["common"],{}),(0,c.b$)({},(0,c.U2)(t,[e],{})))}function eh(r,e,t){var n=(0,c.U2)(r,["components","axis"],{});return(0,c.b$)({},(0,c.U2)(n,["common","title"],{}),(0,c.b$)({},(0,c.U2)(n,[e,"title"],{})),t)}function ru(r){var e=r.x,t=r.y,n=r.circleCenter,i=t.start>t.end,a=r.isTransposed?r.convert({x:i?0:1,y:0}):r.convert({x:0,y:i?0:1}),o=[a.x-n.x,a.y-n.y],s=[1,0],l=a.y>n.y?Le.EU(o,s):Le.EU(o,s)*-1,u=l+(e.end-e.start),f=Math.sqrt(Math.pow(a.x-n.x,2)+Math.pow(a.y-n.y,2));return{center:n,radius:f,startAngle:l,endAngle:u}}function rs(r,e){return(0,c.jn)(r)?r===!1?!1:{}:(0,c.U2)(r,[e])}function rh(r,e){return(0,c.U2)(r,"position",e)}function nh(r,e){return(0,c.U2)(e,["title","text"],Ba(r))}var ji=function(){function r(e,t){this.destroyed=!1,this.facets=[],this.view=e,this.cfg=(0,c.b$)({},this.getDefaultCfg(),t)}return r.prototype.init=function(){this.container||(this.container=this.createContainer());var e=this.view.getData();this.facets=this.generateFacets(e)},r.prototype.render=function(){this.renderViews()},r.prototype.update=function(){},r.prototype.clear=function(){this.clearFacetViews()},r.prototype.destroy=function(){this.clear(),this.container&&(this.container.remove(!0),this.container=void 0),this.destroyed=!0,this.view=void 0,this.facets=[]},r.prototype.facetToView=function(e){var t=e.region,n=e.data,i=e.padding,a=i===void 0?this.cfg.padding:i,o=this.view.createView({region:t,padding:a});o.data(n||[]),e.view=o,this.beforeEachView(o,e);var s=this.cfg.eachView;return s&&s(o,e),this.afterEachView(o,e),o},r.prototype.createContainer=function(){var e=this.view.getLayer(tt.FORE);return e.addGroup()},r.prototype.renderViews=function(){this.createFacetViews()},r.prototype.createFacetViews=function(){var e=this;return this.facets.map(function(t){return e.facetToView(t)})},r.prototype.clearFacetViews=function(){var e=this;(0,c.S6)(this.facets,function(t){t.view&&(e.view.removeView(t.view),t.view=void 0)})},r.prototype.parseSpacing=function(){var e=this.view.viewBBox,t=e.width,n=e.height,i=this.cfg.spacing;return i.map(function(a,o){return(0,c.hj)(a)?a/(o===0?t:n):parseFloat(a)/100})},r.prototype.getFieldValues=function(e,t){var n=[],i={};return(0,c.S6)(e,function(a){var o=a[t];!(0,c.UM)(o)&&!i[o]&&(n.push(o),i[o]=!0)}),n},r.prototype.getRegion=function(e,t,n,i){var a=(0,p.CR)(this.parseSpacing(),2),o=a[0],s=a[1],l=(1+o)/(t===0?1:t)-o,u=(1+s)/(e===0?1:e)-s,f={x:(l+o)*n,y:(u+s)*i},h={x:f.x+l,y:f.y+u};return{start:f,end:h}},r.prototype.getDefaultCfg=function(){return{eachView:void 0,showTitle:!0,spacing:[0,0],padding:10,fields:[]}},r.prototype.getDefaultTitleCfg=function(){var e=this.view.getTheme().fontFamily;return{style:{fontSize:14,fill:"#666",fontFamily:e}}},r.prototype.processAxis=function(e,t){var n=e.getOptions(),i=n.coordinate,a=e.geometries,o=(0,c.U2)(i,"type","rect");if(o==="rect"&&a.length){(0,c.UM)(n.axes)&&(n.axes={});var s=n.axes,l=(0,p.CR)(a[0].getXYFields(),2),u=l[0],f=l[1],h=rs(s,u),v=rs(s,f);h!==!1&&(n.axes[u]=this.getXAxisOption(u,s,h,t)),v!==!1&&(n.axes[f]=this.getYAxisOption(f,s,v,t))}},r.prototype.getFacetDataFilter=function(e){return function(t){return(0,c.yW)(e,function(n){var i=n.field,a=n.value;return!(0,c.UM)(a)&&i?t[i]===a:!0})}},r}(),ih={},Fx=function(r){return ih[(0,c.vl)(r)]},$i=function(r,e){ih[(0,c.vl)(r)]=e},Ix=function(){function r(e,t){this.context=e,this.cfg=t,e.addAction(this)}return r.prototype.applyCfg=function(e){(0,c.f0)(this,e)},r.prototype.init=function(){this.applyCfg(this.cfg)},r.prototype.destroy=function(){this.context.removeAction(this),this.context=null},r}(),er=Ix,Lx=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.execute=function(){this.callback&&this.callback(this.context)},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.callback=null},e}(er),Dx=Lx,ns={};function Px(r,e){var t=ns[r],n=null;if(t){var i=t.ActionClass,a=t.cfg;n=new i(e,a),n.name=r,n.init()}return n}function is(r){var e=ns[r];return(0,c.U2)(e,"ActionClass")}function Ae(r,e,t){ns[r]={ActionClass:e,cfg:t}}function b_(r){delete ns[r]}function Ox(r,e){var t=new Dx(e);return t.callback=r,t.name="callback",t}function kx(r,e){var t=[];if(r.length){t.push(["M",r[0].x,r[0].y]);for(var n=1,i=r.length;n=o[u]?1:0,v=f>Math.PI?1:0,d=t.convert(s),g=Qo(t,d);if(g>=.5)if(f===Math.PI*2){var y={x:(s.x+o.x)/2,y:(s.y+o.y)/2},m=t.convert(y);l.push(["A",g,g,0,v,h,m.x,m.y]),l.push(["A",g,g,0,v,h,d.x,d.y])}else l.push(["A",g,g,0,v,h,d.x,d.y]);return l}function Bx(r){(0,c.S6)(r,function(e,t){var n=e;if(n[0].toLowerCase()==="a"){var i=r[t-1],a=r[t+1];a&&a[0].toLowerCase()==="a"?i&&i[0].toLowerCase()==="l"&&(i[0]="M"):i&&i[0].toLowerCase()==="a"&&a&&a[0].toLowerCase()==="l"&&(a[0]="M")}})}var Rx=function(r,e,t,n){var i,a=[],o=!!n,s,l,u,f,h,v,d;if(o){i=(0,p.CR)(n,2),u=i[0],f=i[1];for(var g=0,y=r.length;g=e||i.height>=e?i:null}function Ux(r,e){var t=r.event,n=t.target,i=n.getCanvasBBox();return i.width>=e||i.height>=e?n.attr("path"):null}function jn(r){var e=r.event,t,n=e.target;return n&&(t=n.get("element")),t}function yi(r){var e=r.event,t=e.target,n;return t&&(n=t.get("delegateObject")),n}function lh(r){var e=r.event.gEvent;return!(e&&e.fromShape&&e.toShape&&e.fromShape.get("element")===e.toShape.get("element"))}function Na(r){return r&&r.component&&r.component.isList()}function uh(r){return r&&r.component&&r.component.isSlider()}function za(r){var e=r.event,t=e.target;return t&&t.get("name")==="mask"}function iu(r,e){var t=r.event.target;if(t.get("type")==="path"){var n=Ux(r,e);return n?Hx(r.view,n):void 0}var i=sh(r,e);return i?au(r.view,i):null}function ch(r,e,t){var n=sh(r,t);if(!n)return null;var i=r.view,a=su(i,e,{x:n.x,y:n.y}),o=su(i,e,{x:n.maxX,y:n.maxY}),s={minX:a.x,minY:a.y,maxX:o.x,maxY:o.y};return au(e,s)}function mr(r){var e=r.geometries,t=[];return(0,c.S6)(e,function(n){var i=n.elements;t=t.concat(i)}),r.views&&r.views.length&&(0,c.S6)(r.views,function(n){t=t.concat(mr(n))}),t}function Vx(r,e,t){var n=mr(r);return n.filter(function(i){return en(i,e)===t})}function fh(r,e){var t=r.geometries,n=[];return(0,c.S6)(t,function(i){var a=i.getElementsBy(function(o){return o.hasState(e)});n=n.concat(a)}),n}function en(r,e){var t=r.getModel(),n=t.data,i;return(0,c.kJ)(n)?i=n[0][e]:i=n[e],i}function Gx(r,e){return!(e.minX>r.maxX||e.maxXr.maxY||e.maxY=e.x&&r.y<=e.y&&r.maxY>e.y}function dn(r){var e=r.parent,t=null;return e&&(t=e.views.filter(function(n){return n!==r})),t}function Xx(r,e){var t=r.getCoordinate();return t.invert(e)}function su(r,e,t){var n=Xx(r,t);return e.getCoordinate().convert(n)}function dh(r,e,t,n){var i=!1;return(0,c.S6)(r,function(a){if(a[t]===e[t]&&a[n]===e[n])return i=!0,!1}),i}function qi(r,e){var t=r.getScaleByField(e);return!t&&r.views&&(0,c.S6)(r.views,function(n){if(t=qi(n,e),t)return!1}),t}var Wx=function(){function r(e){this.actions=[],this.event=null,this.cacheMap={},this.view=e}return r.prototype.cache=function(){for(var e=[],t=0;t=0&&t.splice(n,1)},r.prototype.getCurrentPoint=function(){var e=this.event;if(e)if(e.target instanceof HTMLElement){var t=this.view.getCanvas(),n=t.getPointByClient(e.clientX,e.clientY);return n}else return{x:e.x,y:e.y};return null},r.prototype.getCurrentShape=function(){return(0,c.U2)(this.event,["gEvent","shape"])},r.prototype.isInPlot=function(){var e=this.getCurrentPoint();return e?this.view.isPointInPlot(e):!1},r.prototype.isInShape=function(e){var t=this.getCurrentShape();return t?t.get("name")===e:!1},r.prototype.isInComponent=function(e){var t=vh(this.view),n=this.getCurrentPoint();return n?!!t.find(function(i){var a=i.getBBox();return e?i.get("name")===e&&ph(a,n):ph(a,n)}):!1},r.prototype.destroy=function(){(0,c.S6)(this.actions.slice(),function(e){e.destroy()}),this.view=null,this.event=null,this.actions=null,this.cacheMap=null},r}(),Zx=Wx,jx=function(){function r(e,t){this.view=e,this.cfg=t}return r.prototype.init=function(){this.initEvents()},r.prototype.initEvents=function(){},r.prototype.clearEvents=function(){},r.prototype.destroy=function(){this.clearEvents()},r}(),$x=jx;function gh(r,e,t){var n=r.split(":"),i=n[0],a=e.getAction(i)||Px(i,e);if(!a)throw new Error("There is no action named ".concat(i));var o=n[1];return{action:a,methodName:o,arg:t}}function yh(r){var e=r.action,t=r.methodName,n=r.arg;if(e[t])e[t](n);else throw new Error("Action(".concat(e.name,") doesn't have a method called ").concat(t))}var zr={START:"start",SHOW_ENABLE:"showEnable",END:"end",ROLLBACK:"rollback",PROCESSING:"processing"},qx=function(r){(0,p.ZT)(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.callbackCaches={},i.emitCaches={},i.steps=n,i}return e.prototype.init=function(){this.initContext(),r.prototype.init.call(this)},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.steps=null,this.context&&(this.context.destroy(),this.context=null),this.callbackCaches=null,this.view=null},e.prototype.initEvents=function(){var t=this;(0,c.S6)(this.steps,function(n,i){(0,c.S6)(n,function(a){var o=t.getActionCallback(i,a);o&&t.bindEvent(a.trigger,o)})})},e.prototype.clearEvents=function(){var t=this;(0,c.S6)(this.steps,function(n,i){(0,c.S6)(n,function(a){var o=t.getActionCallback(i,a);o&&t.offEvent(a.trigger,o)})})},e.prototype.initContext=function(){var t=this.view,n=new Zx(t);this.context=n;var i=this.steps;(0,c.S6)(i,function(a){(0,c.S6)(a,function(o){if((0,c.mf)(o.action))o.actionObject={action:Ox(o.action,n),methodName:"execute"};else if((0,c.HD)(o.action))o.actionObject=gh(o.action,n,o.arg);else if((0,c.kJ)(o.action)){var s=o.action,l=(0,c.kJ)(o.arg)?o.arg:[o.arg];o.actionObject=[],(0,c.S6)(s,function(u,f){o.actionObject.push(gh(u,n,l[f]))})}})})},e.prototype.isAllowStep=function(t){var n=this.currentStepName,i=this.steps;if(n===t||t===zr.SHOW_ENABLE)return!0;if(t===zr.PROCESSING)return n===zr.START;if(t===zr.START)return n!==zr.PROCESSING;if(t===zr.END)return n===zr.PROCESSING||n===zr.START;if(t===zr.ROLLBACK){if(i[zr.END])return n===zr.END;if(n===zr.START)return!0}return!1},e.prototype.isAllowExecute=function(t,n){if(this.isAllowStep(t)){var i=this.getKey(t,n);return n.once&&this.emitCaches[i]?!1:n.isEnable?n.isEnable(this.context):!0}return!1},e.prototype.enterStep=function(t){this.currentStepName=t,this.emitCaches={}},e.prototype.afterExecute=function(t,n){t!==zr.SHOW_ENABLE&&this.currentStepName!==t&&this.enterStep(t);var i=this.getKey(t,n);this.emitCaches[i]=!0},e.prototype.getKey=function(t,n){return t+n.trigger+n.action},e.prototype.getActionCallback=function(t,n){var i=this,a=this.context,o=this.callbackCaches,s=n.actionObject;if(n.action&&s){var l=this.getKey(t,n);if(!o[l]){var u=function(f){a.event=f,i.isAllowExecute(t,n)?((0,c.kJ)(s)?(0,c.S6)(s,function(h){a.event=f,yh(h)}):(a.event=f,yh(s)),i.afterExecute(t,n),n.callback&&(a.event=f,n.callback(a))):a.event=null};n.debounce?o[l]=(0,c.Ds)(u,n.debounce.wait,n.debounce.immediate):n.throttle?o[l]=(0,c.P2)(u,n.throttle.wait,{leading:n.throttle.leading,trailing:n.throttle.trailing}):o[l]=u}return o[l]}return null},e.prototype.bindEvent=function(t,n){var i=t.split(":");i[0]==="window"?window.addEventListener(i[1],n):i[0]==="document"?document.addEventListener(i[1],n):this.view.on(t,n)},e.prototype.offEvent=function(t,n){var i=t.split(":");i[0]==="window"?window.removeEventListener(i[1],n):i[0]==="document"?document.removeEventListener(i[1],n):this.view.off(t,n)},e}($x),Kx=qx,mh={};function Jx(r){return mh[(0,c.vl)(r)]}function Oe(r,e){mh[(0,c.vl)(r)]=e}function Qx(r,e,t){var n=Jx(r);if(!n)return null;if((0,c.PO)(n)){var i=(0,c.CD)((0,c.d9)(n),t);return new Kx(e,i)}else{var a=n;return new a(e,t)}}function t1(r){return{title:{autoRotate:!0,position:"center",spacing:r.axisTitleSpacing,style:{fill:r.axisTitleTextFillColor,fontSize:r.axisTitleTextFontSize,lineHeight:r.axisTitleTextLineHeight,textBaseline:"middle",fontFamily:r.fontFamily},iconStyle:{fill:r.axisDescriptionIconFillColor}},label:{autoRotate:!1,autoEllipsis:!1,autoHide:{type:"equidistance",cfg:{minGap:6}},offset:r.axisLabelOffset,style:{fill:r.axisLabelFillColor,fontSize:r.axisLabelFontSize,lineHeight:r.axisLabelLineHeight,fontFamily:r.fontFamily}},line:{style:{lineWidth:r.axisLineBorder,stroke:r.axisLineBorderColor}},grid:{line:{type:"line",style:{stroke:r.axisGridBorderColor,lineWidth:r.axisGridBorder,lineDash:r.axisGridLineDash}},alignTick:!0,animate:!0},tickLine:{style:{lineWidth:r.axisTickLineBorder,stroke:r.axisTickLineBorderColor},alignTick:!0,length:r.axisTickLineLength},subTickLine:null,animate:!0}}function e1(r){return{title:null,marker:{symbol:"circle",spacing:r.legendMarkerSpacing,style:{r:r.legendCircleMarkerSize,fill:r.legendMarkerColor}},itemName:{spacing:5,style:{fill:r.legendItemNameFillColor,fontFamily:r.fontFamily,fontSize:r.legendItemNameFontSize,lineHeight:r.legendItemNameLineHeight,fontWeight:r.legendItemNameFontWeight,textAlign:"start",textBaseline:"middle"}},itemStates:{active:{nameStyle:{opacity:.8}},unchecked:{nameStyle:{fill:"#D8D8D8"},markerStyle:{fill:"#D8D8D8",stroke:"#D8D8D8"}},inactive:{nameStyle:{fill:"#D8D8D8"},markerStyle:{opacity:.2}}},flipPage:!0,pageNavigator:{marker:{style:{size:r.legendPageNavigatorMarkerSize,inactiveFill:r.legendPageNavigatorMarkerInactiveFillColor,inactiveOpacity:r.legendPageNavigatorMarkerInactiveFillOpacity,fill:r.legendPageNavigatorMarkerFillColor,opacity:r.legendPageNavigatorMarkerFillOpacity}},text:{style:{fill:r.legendPageNavigatorTextFillColor,fontSize:r.legendPageNavigatorTextFontSize}}},animate:!1,maxItemWidth:200,itemSpacing:r.legendItemSpacing,itemMarginBottom:r.legendItemMarginBottom,padding:r.legendPadding}}function xh(r){var e,t={point:{default:{fill:r.pointFillColor,r:r.pointSize,stroke:r.pointBorderColor,lineWidth:r.pointBorder,fillOpacity:r.pointFillOpacity},active:{stroke:r.pointActiveBorderColor,lineWidth:r.pointActiveBorder},selected:{stroke:r.pointSelectedBorderColor,lineWidth:r.pointSelectedBorder},inactive:{fillOpacity:r.pointInactiveFillOpacity,strokeOpacity:r.pointInactiveBorderOpacity}},hollowPoint:{default:{fill:r.hollowPointFillColor,lineWidth:r.hollowPointBorder,stroke:r.hollowPointBorderColor,strokeOpacity:r.hollowPointBorderOpacity,r:r.hollowPointSize},active:{stroke:r.hollowPointActiveBorderColor,strokeOpacity:r.hollowPointActiveBorderOpacity},selected:{lineWidth:r.hollowPointSelectedBorder,stroke:r.hollowPointSelectedBorderColor,strokeOpacity:r.hollowPointSelectedBorderOpacity},inactive:{strokeOpacity:r.hollowPointInactiveBorderOpacity}},area:{default:{fill:r.areaFillColor,fillOpacity:r.areaFillOpacity,stroke:null},active:{fillOpacity:r.areaActiveFillOpacity},selected:{fillOpacity:r.areaSelectedFillOpacity},inactive:{fillOpacity:r.areaInactiveFillOpacity}},hollowArea:{default:{fill:null,stroke:r.hollowAreaBorderColor,lineWidth:r.hollowAreaBorder,strokeOpacity:r.hollowAreaBorderOpacity},active:{fill:null,lineWidth:r.hollowAreaActiveBorder},selected:{fill:null,lineWidth:r.hollowAreaSelectedBorder},inactive:{strokeOpacity:r.hollowAreaInactiveBorderOpacity}},interval:{default:{fill:r.intervalFillColor,fillOpacity:r.intervalFillOpacity},active:{stroke:r.intervalActiveBorderColor,lineWidth:r.intervalActiveBorder},selected:{stroke:r.intervalSelectedBorderColor,lineWidth:r.intervalSelectedBorder},inactive:{fillOpacity:r.intervalInactiveFillOpacity,strokeOpacity:r.intervalInactiveBorderOpacity}},hollowInterval:{default:{fill:r.hollowIntervalFillColor,stroke:r.hollowIntervalBorderColor,lineWidth:r.hollowIntervalBorder,strokeOpacity:r.hollowIntervalBorderOpacity},active:{stroke:r.hollowIntervalActiveBorderColor,lineWidth:r.hollowIntervalActiveBorder,strokeOpacity:r.hollowIntervalActiveBorderOpacity},selected:{stroke:r.hollowIntervalSelectedBorderColor,lineWidth:r.hollowIntervalSelectedBorder,strokeOpacity:r.hollowIntervalSelectedBorderOpacity},inactive:{stroke:r.hollowIntervalInactiveBorderColor,lineWidth:r.hollowIntervalInactiveBorder,strokeOpacity:r.hollowIntervalInactiveBorderOpacity}},line:{default:{stroke:r.lineBorderColor,lineWidth:r.lineBorder,strokeOpacity:r.lineBorderOpacity,fill:null,lineAppendWidth:10,lineCap:"round",lineJoin:"round"},active:{lineWidth:r.lineActiveBorder},selected:{lineWidth:r.lineSelectedBorder},inactive:{strokeOpacity:r.lineInactiveBorderOpacity}}},n=t1(r),i=e1(r);return{background:r.backgroundColor,defaultColor:r.brandColor,subColor:r.subColor,semanticRed:r.paletteSemanticRed,semanticGreen:r.paletteSemanticGreen,padding:"auto",fontFamily:r.fontFamily,columnWidthRatio:1/2,maxColumnWidth:null,minColumnWidth:null,roseWidthRatio:.9999999,multiplePieWidthRatio:1/1.3,colors10:r.paletteQualitative10,colors20:r.paletteQualitative20,sequenceColors:r.paletteSequence,shapes:{point:["hollow-circle","hollow-square","hollow-bowtie","hollow-diamond","hollow-hexagon","hollow-triangle","hollow-triangle-down","circle","square","bowtie","diamond","hexagon","triangle","triangle-down","cross","tick","plus","hyphen","line"],line:["line","dash","dot","smooth"],area:["area","smooth","line","smooth-line"],interval:["rect","hollow-rect","line","tick"]},sizes:[1,10],geometries:{interval:{rect:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:function(a){var o=a.geometry.coordinate;if(o.isPolar&&o.isTransposed){var s=ka(a.getModel(),o),l=s.startAngle,u=s.endAngle,f=(l+u)/2,h=7.5,v=h*Math.cos(f),d=h*Math.sin(f);return{matrix:Qe.vs(null,[["t",v,d]])}}return t.interval.selected}}},"hollow-rect":{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},line:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},tick:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},funnel:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}},pyramid:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}}},line:{line:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},dot:{default:{style:(0,p.pi)((0,p.pi)({},t.line.default),{lineCap:null,lineDash:[1,1]})},active:{style:(0,p.pi)((0,p.pi)({},t.line.active),{lineCap:null,lineDash:[1,1]})},inactive:{style:(0,p.pi)((0,p.pi)({},t.line.inactive),{lineCap:null,lineDash:[1,1]})},selected:{style:(0,p.pi)((0,p.pi)({},t.line.selected),{lineCap:null,lineDash:[1,1]})}},dash:{default:{style:(0,p.pi)((0,p.pi)({},t.line.default),{lineCap:null,lineDash:[5.5,1]})},active:{style:(0,p.pi)((0,p.pi)({},t.line.active),{lineCap:null,lineDash:[5.5,1]})},inactive:{style:(0,p.pi)((0,p.pi)({},t.line.inactive),{lineCap:null,lineDash:[5.5,1]})},selected:{style:(0,p.pi)((0,p.pi)({},t.line.selected),{lineCap:null,lineDash:[5.5,1]})}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vh:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hvh:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vhv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}}},polygon:{polygon:{default:{style:t.interval.default},active:{style:t.interval.active},inactive:{style:t.interval.inactive},selected:{style:t.interval.selected}}},point:{circle:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},square:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},bowtie:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},diamond:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},hexagon:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},triangle:{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},"triangle-down":{default:{style:t.point.default},active:{style:t.point.active},inactive:{style:t.point.inactive},selected:{style:t.point.selected}},"hollow-circle":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-square":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-bowtie":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-diamond":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-hexagon":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-triangle":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},"hollow-triangle-down":{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},cross:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},tick:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},plus:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},hyphen:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}},line:{default:{style:t.hollowPoint.default},active:{style:t.hollowPoint.active},inactive:{style:t.hollowPoint.inactive},selected:{style:t.hollowPoint.selected}}},area:{area:{default:{style:t.area.default},active:{style:t.area.active},inactive:{style:t.area.inactive},selected:{style:t.area.selected}},smooth:{default:{style:t.area.default},active:{style:t.area.active},inactive:{style:t.area.inactive},selected:{style:t.area.selected}},line:{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}},"smooth-line":{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}}},schema:{candle:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}},box:{default:{style:t.hollowInterval.default},active:{style:t.hollowInterval.active},inactive:{style:t.hollowInterval.inactive},selected:{style:t.hollowInterval.selected}}},edge:{line:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},vhv:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},arc:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}}},violin:{violin:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},smooth:{default:{style:t.line.default},active:{style:t.line.active},inactive:{style:t.line.inactive},selected:{style:t.line.selected}},hollow:{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}},"hollow-smooth":{default:{style:t.hollowArea.default},active:{style:t.hollowArea.active},inactive:{style:t.hollowArea.inactive},selected:{style:t.hollowArea.selected}}}},components:{axis:{common:n,top:{position:"top",grid:null,title:null,verticalLimitLength:1/2},bottom:{position:"bottom",grid:null,title:null,verticalLimitLength:1/2},left:{position:"left",title:null,line:null,tickLine:null,verticalLimitLength:1/3},right:{position:"right",title:null,line:null,tickLine:null,verticalLimitLength:1/3},circle:{title:null,grid:(0,c.b$)({},n.grid,{line:{type:"line"}})},radius:{title:null,grid:(0,c.b$)({},n.grid,{line:{type:"circle"}})}},legend:{common:i,right:{layout:"vertical",padding:r.legendVerticalPadding},left:{layout:"vertical",padding:r.legendVerticalPadding},top:{layout:"horizontal",padding:r.legendHorizontalPadding},bottom:{layout:"horizontal",padding:r.legendHorizontalPadding},continuous:{title:null,background:null,track:{},rail:{type:"color",size:r.sliderRailHeight,defaultLength:r.sliderRailWidth,style:{fill:r.sliderRailFillColor,stroke:r.sliderRailBorderColor,lineWidth:r.sliderRailBorder}},label:{align:"rail",spacing:4,formatter:null,style:{fill:r.sliderLabelTextFillColor,fontSize:r.sliderLabelTextFontSize,lineHeight:r.sliderLabelTextLineHeight,textBaseline:"middle",fontFamily:r.fontFamily}},handler:{size:r.sliderHandlerWidth,style:{fill:r.sliderHandlerFillColor,stroke:r.sliderHandlerBorderColor}},slidable:!0,padding:i.padding}},tooltip:{showContent:!0,follow:!0,showCrosshairs:!1,showMarkers:!0,shared:!1,enterable:!1,position:"auto",marker:{symbol:"circle",stroke:"#fff",shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0,0,0,0.09)",lineWidth:2,r:4},crosshairs:{line:{style:{stroke:r.tooltipCrosshairsBorderColor,lineWidth:r.tooltipCrosshairsBorder}},text:null,textBackground:{padding:2,style:{fill:"rgba(0, 0, 0, 0.25)",lineWidth:0,stroke:null}},follow:!1},domStyles:(e={},e["".concat(Ln)]={position:"absolute",visibility:"hidden",zIndex:8,transition:"left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s",backgroundColor:r.tooltipContainerFillColor,opacity:r.tooltipContainerFillOpacity,boxShadow:r.tooltipContainerShadow,borderRadius:"".concat(r.tooltipContainerBorderRadius,"px"),color:r.tooltipTextFillColor,fontSize:"".concat(r.tooltipTextFontSize,"px"),fontFamily:r.fontFamily,lineHeight:"".concat(r.tooltipTextLineHeight,"px"),padding:"0 12px 0 12px"},e["".concat(Dn)]={marginBottom:"12px",marginTop:"12px"},e["".concat(Oa)]={margin:0,listStyleType:"none",padding:0},e["".concat(jo)]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},e["".concat($o)]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},e["".concat(qo)]={display:"inline-block",float:"right",marginLeft:"30px"},e)},annotation:{arc:{style:{stroke:r.annotationArcBorderColor,lineWidth:r.annotationArcBorder},animate:!0},line:{style:{stroke:r.annotationLineBorderColor,lineDash:r.annotationLineDash,lineWidth:r.annotationLineBorder},text:{position:"start",autoRotate:!0,style:{fill:r.annotationTextFillColor,stroke:r.annotationTextBorderColor,lineWidth:r.annotationTextBorder,fontSize:r.annotationTextFontSize,textAlign:"start",fontFamily:r.fontFamily,textBaseline:"bottom"}},animate:!0},text:{style:{fill:r.annotationTextFillColor,stroke:r.annotationTextBorderColor,lineWidth:r.annotationTextBorder,fontSize:r.annotationTextFontSize,textBaseline:"middle",textAlign:"start",fontFamily:r.fontFamily},animate:!0},region:{top:!1,style:{lineWidth:r.annotationRegionBorder,stroke:r.annotationRegionBorderColor,fill:r.annotationRegionFillColor,fillOpacity:r.annotationRegionFillOpacity},animate:!0},image:{top:!1,animate:!0},dataMarker:{top:!0,point:{style:{r:3,stroke:r.brandColor,lineWidth:2}},line:{style:{stroke:r.annotationLineBorderColor,lineWidth:r.annotationLineBorder},length:r.annotationDataMarkerLineLength},text:{style:{textAlign:"start",fill:r.annotationTextFillColor,stroke:r.annotationTextBorderColor,lineWidth:r.annotationTextBorder,fontSize:r.annotationTextFontSize,fontFamily:r.fontFamily}},direction:"upward",autoAdjust:!0,animate:!0},dataRegion:{style:{region:{fill:r.annotationRegionFillColor,fillOpacity:r.annotationRegionFillOpacity},text:{textAlign:"center",textBaseline:"bottom",fill:r.annotationTextFillColor,stroke:r.annotationTextBorderColor,lineWidth:r.annotationTextBorder,fontSize:r.annotationTextFontSize,fontFamily:r.fontFamily}},animate:!0}},slider:{common:{padding:[8,8,8,8],backgroundStyle:{fill:r.cSliderBackgroundFillColor,opacity:r.cSliderBackgroundFillOpacity},foregroundStyle:{fill:r.cSliderForegroundFillColor,opacity:r.cSliderForegroundFillOpacity},handlerStyle:{width:r.cSliderHandlerWidth,height:r.cSliderHandlerHeight,fill:r.cSliderHandlerFillColor,opacity:r.cSliderHandlerFillOpacity,stroke:r.cSliderHandlerBorderColor,lineWidth:r.cSliderHandlerBorder,radius:r.cSliderHandlerBorderRadius,highLightFill:r.cSliderHandlerHighlightFillColor},textStyle:{fill:r.cSliderTextFillColor,opacity:r.cSliderTextFillOpacity,fontSize:r.cSliderTextFontSize,lineHeight:r.cSliderTextLineHeight,fontWeight:r.cSliderTextFontWeight,stroke:r.cSliderTextBorderColor,lineWidth:r.cSliderTextBorder}}},scrollbar:{common:{padding:[8,8,8,8]},default:{style:{trackColor:r.scrollbarTrackFillColor,thumbColor:r.scrollbarThumbFillColor}},hover:{style:{thumbColor:r.scrollbarThumbHighlightFillColor}}}},labels:{offset:12,style:{fill:r.labelFillColor,fontSize:r.labelFontSize,fontFamily:r.fontFamily,stroke:r.labelBorderColor,lineWidth:r.labelBorder},fillColorDark:r.labelFillColorDark,fillColorLight:r.labelFillColorLight,autoRotate:!0},innerLabels:{style:{fill:r.innerLabelFillColor,fontSize:r.innerLabelFontSize,fontFamily:r.fontFamily,stroke:r.innerLabelBorderColor,lineWidth:r.innerLabelBorder},autoRotate:!0},overflowLabels:{style:{fill:r.overflowLabelFillColor,fontSize:r.overflowLabelFontSize,fontFamily:r.fontFamily,stroke:r.overflowLabelBorderColor,lineWidth:r.overflowLabelBorder}},pieLabels:{labelHeight:14,offset:10,labelLine:{style:{lineWidth:r.labelLineBorder}},autoRotate:!0}}}var je={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},Ki={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},r1=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],n1=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],i1=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],wh=function(r){r===void 0&&(r={});var e=r.paletteQualitative10,t=e===void 0?r1:e,n=r.paletteQualitative20,i=n===void 0?n1:n,a=r.brandColor,o=a===void 0?t[0]:a,s={backgroundColor:"transparent",brandColor:o,subColor:"rgba(0,0,0,0.05)",paletteQualitative10:t,paletteQualitative20:i,paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",paletteSequence:i1,fontFamily:`"Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,axisLineBorderColor:je[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:je[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:Ki[85],axisTickLineBorderColor:je[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:je[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:je[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:je[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:je[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:o,legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:je[65],legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",legendItemSpacing:24,legendItemMarginBottom:12,legendPadding:[8,8,8,8],legendHorizontalPadding:[8,0,8,0],legendVerticalPadding:[0,8,0,8],legendPageNavigatorMarkerSize:12,legendPageNavigatorMarkerInactiveFillColor:je[100],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:je[100],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:je[45],legendPageNavigatorTextFontSize:12,sliderRailFillColor:je[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:je[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:je[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:je[25],annotationArcBorderColor:je[15],annotationArcBorder:1,annotationLineBorderColor:je[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:je[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:je[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:je[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:je[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:je[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:Ki[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:je[65],overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:Ki[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:je[25],cSliderRailHieght:16,cSliderBackgroundFillColor:"#416180",cSliderBackgroundFillOpacity:.05,cSliderForegroundFillColor:"#5B8FF9",cSliderForegroundFillOpacity:.15,cSliderHandlerHeight:24,cSliderHandlerWidth:10,cSliderHandlerFillColor:"#F7F7F7",cSliderHandlerFillOpacity:1,cSliderHandlerHighlightFillColor:"#FFF",cSliderHandlerBorderColor:"#BFBFBF",cSliderHandlerBorder:1,cSliderHandlerBorderRadius:2,cSliderTextFillColor:"#000",cSliderTextFillOpacity:.45,cSliderTextFontSize:12,cSliderTextLineHeight:12,cSliderTextFontWeight:"normal",cSliderTextBorderColor:null,cSliderTextBorder:0,scrollbarTrackFillColor:"rgba(0,0,0,0)",scrollbarThumbFillColor:"rgba(0,0,0,0.15)",scrollbarThumbHighlightFillColor:"rgba(0,0,0,0.2)",pointFillColor:o,pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:Ki[100],pointBorderOpacity:1,pointActiveBorderColor:je[100],pointSelectedBorder:2,pointSelectedBorderColor:je[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:o,hollowPointBorderOpacity:.95,hollowPointFillColor:Ki[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:je[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:je[100],hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:o,lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:o,areaFillOpacity:.25,areaActiveFillColor:o,areaActiveFillOpacity:.5,areaSelectedFillColor:o,areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:o,hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:je[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:je[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:o,intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:je[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:je[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:o,hollowIntervalBorderOpacity:1,hollowIntervalFillColor:Ki[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:je[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:je[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3};return(0,p.pi)((0,p.pi)({},s),r)},M_=wh();function os(r){var e=r.styleSheet,t=e===void 0?{}:e,n=(0,p._T)(r,["styleSheet"]),i=wh(t);return(0,c.b$)({},xh(i),n)}var a1=os({}),lu={default:a1};function Ua(r){return(0,c.U2)(lu,(0,c.vl)(r),lu.default)}function o1(r,e){lu[(0,c.vl)(r)]=os(e)}function Sh(r,e,t){var n=t.translate(r),i=t.translate(e);return(0,c.vQ)(n,i)}function s1(r,e){var t=e.coordinate,n=e.getXScale(),i=n.range,a=i[i.length-1],o=i[0],s=t.invert(r),l=s.x;return t.isPolar&&l>(1+a)/2&&(l=o),n.translate(n.invert(l))}function bh(r,e,t){var n=t.coordinate,i=t.getYScale(),a=i.field,o=n.invert(e),s=i.invert(o.y),l=(0,c.sE)(r,function(u){var f=u[Vt];return f[a][0]<=s&&f[a][1]>=s});return l||r[r.length-1]}var l1=(0,c.HP)(function(r){if(r.isCategory)return 1;for(var e=r.values,t=e.length,n=r.translate(e[0]),i=n,a=0;ai&&(i=s)}return(i-n)/(t-1)});function u1(r,e,t){var n=e.getAttribute("position"),i=n.getFields(),a=e.scales,o=(0,c.mf)(t)||!t?i[0]:t,s=a[o],l=s?s.getText(r[o]):r[o]||o;return(0,c.mf)(t)?t(l,r):l}function c1(r){var e=(0,c.VO)(r.attributes);return(0,c.hX)(e,function(t){return(0,c.FX)(Lt,t.type)})}function Mh(r){var e,t,n=c1(r),i;try{for(var a=(0,p.XA)(n),o=a.next();!o.done;o=a.next()){var s=o.value,l=s.getScale(s.type);if(l&&l.isLinear){var u=(0,c.U2)(r.scaleDefs,l.field),f=Kf(l,u,s.type,r.type);if(f!=="cat"){i=l;break}}}}catch(d){e={error:d}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}var h=r.getXScale(),v=r.getYScale();return i||v||h}function f1(r,e){var t=e.field,n=r[t];if((0,c.kJ)(n)){var i=n.map(function(a){return e.getText(a)});return i.join("-")}return e.getText(n)}function h1(r,e){var t,n=e.getGroupScales();if(n.length&&(t=n[0]),t){var i=t.field;return t.getText(r[i])}var a=Mh(e);return Ba(a)}function Ch(r,e,t){if(e.length===0)return null;var n=t.type,i=t.getXScale(),a=t.getYScale(),o=i.field,s=a.field,l=null;if(n==="heatmap"||n==="point"){for(var u=t.coordinate,f=u.invert(r),h=i.invert(f.x),v=a.invert(f.y),d=Infinity,g=0;g=A)if(xt)(0,c.kJ)(l)||(l=[]),l.push(kt);else{l=kt;break}}(0,c.kJ)(l)&&(l=bh(l,r,t))}else{var Ft=void 0;if(!i.isLinear&&i.type!=="timeCat"){for(var g=0;gi.translate(lt)||Ai.max||AMath.abs(i.translate(Ft[Vt][o])-A)&&(C=Ft)}var Re=l1(t.getXScale());return!l&&Math.abs(i.translate(C[Vt][o])-A)<=Re/2&&(l=C),l}function uu(r,e,t,n){var i,a;t===void 0&&(t=""),n===void 0&&(n=!1);var o=r[Vt],s=u1(o,e,t),l=e.tooltipOption,u=e.theme.defaultColor,f=[],h,v;function d(kt,Ft){if(n||!(0,c.UM)(Ft)&&Ft!==""){var Xt={title:s,data:o,mappingData:r,name:kt,value:Ft,color:r.color||u,marker:!0};f.push(Xt)}}if((0,c.Kn)(l)){var g=l.fields,y=l.callback;if(y){var m=g.map(function(kt){return r[Vt][kt]}),x=y.apply(void 0,(0,p.ev)([],(0,p.CR)(m),!1)),b=(0,p.pi)({data:r[Vt],mappingData:r,title:s,color:r.color||u,marker:!0},x);f.push(b)}else{var C=e.scales;try{for(var A=(0,p.XA)(g),B=A.next();!B.done;B=A.next()){var rt=B.value;if(!(0,c.UM)(o[rt])){var lt=C[rt];h=Ba(lt),v=lt.getText(o[rt]),d(h,v)}}}catch(kt){i={error:kt}}finally{try{B&&!B.done&&(a=A.return)&&a.call(A)}finally{if(i)throw i.error}}}}else{var xt=Mh(e);v=f1(o,xt),h=h1(o,e),d(h,v)}return f}function Ah(r,e,t,n){var i,a,o=n.showNil,s=[],l=r.dataArray;if(!(0,c.xb)(l)){r.sort(l);try{for(var u=(0,p.XA)(l),f=u.next();!f.done;f=u.next()){var h=f.value,v=Ch(e,h,r);if(v){var d=r.getElementId(v),g=r.elementsMap[d];if(r.type==="heatmap"||g.visible){var y=uu(v,r,t,o);y.length&&s.push(y)}}}}catch(m){i={error:m}}finally{try{f&&!f.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}}return s}function Th(r,e,t,n){var i=n.showNil,a=[],o=r.container,s=o.getShape(e.x,e.y);if(s&&s.get("visible")&&s.get("origin")){var l=s.get("origin").mappingData,u=uu(l,r,t,i);u.length&&a.push(u)}return a}function cu(r,e,t){var n,i,a=[],o=r.geometries,s=t.shared,l=t.title,u=t.reversed;try{for(var f=(0,p.XA)(o),h=f.next();!h.done;h=f.next()){var v=h.value;if(v.visible&&v.tooltipOption!==!1){var d=v.type,g=void 0;["point","edge","polygon"].includes(d)?g=Th(v,e,l,t):["area","line","path","heatmap"].includes(d)||s!==!1?g=Ah(v,e,l,t):g=Th(v,e,l,t),g.length&&(u&&g.reverse(),a.push(g))}}}catch(y){n={error:y}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}return a}function v1(r,e,t){var n,i,a=cu(r,e,t);try{for(var o=(0,p.XA)(r.views),s=o.next();!s.done;s=o.next()){var l=s.value;a=a.concat(cu(l,e,t))}}catch(u){n={error:u}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return a}function p1(r){return!(0,c.hj)(r)&&!(0,c.kJ)(r)}function fu(r){r===void 0&&(r=0);var e=(0,c.kJ)(r)?r:[r];switch(e.length){case 0:e=[0,0,0,0];break;case 1:e=new Array(4).fill(e[0]);break;case 2:e=(0,p.ev)((0,p.ev)([],(0,p.CR)(e),!1),(0,p.CR)(e),!1);break;case 3:e=(0,p.ev)((0,p.ev)([],(0,p.CR)(e),!1),[e[1]],!1);break;default:e=e.slice(0,4);break}return e}var ss={};function mi(r,e){ss[r]=e}function C_(r){delete ss[r]}function d1(){return Object.keys(ss)}function g1(r){return ss[r]}var y1=function(){function r(e){this.option=this.wrapperOption(e)}return r.prototype.update=function(e){return this.option=this.wrapperOption(e),this},r.prototype.hasAction=function(e){var t=this.option.actions;return(0,c.G)(t,function(n){return n[0]===e})},r.prototype.create=function(e,t){var n=this.option,i=n.type,a=n.cfg,o=i==="theta",s=(0,p.pi)({start:e,end:t},a),l=hy(o?"polar":i);return this.coordinate=new l(s),this.coordinate.type=i,o&&(this.hasAction("transpose")||this.transpose()),this.execActions(),this.coordinate},r.prototype.adjust=function(e,t){return this.coordinate.update({start:e,end:t}),this.coordinate.resetMatrix(),this.execActions(["scale","rotate","translate"]),this.coordinate},r.prototype.rotate=function(e){return this.option.actions.push(["rotate",e]),this},r.prototype.reflect=function(e){return this.option.actions.push(["reflect",e]),this},r.prototype.scale=function(e,t){return this.option.actions.push(["scale",e,t]),this},r.prototype.transpose=function(){return this.option.actions.push(["transpose"]),this},r.prototype.getOption=function(){return this.option},r.prototype.getCoordinate=function(){return this.coordinate},r.prototype.wrapperOption=function(e){return(0,p.pi)({type:"rect",actions:[],cfg:{}},e)},r.prototype.execActions=function(e){var t=this,n=this.option.actions;(0,c.S6)(n,function(i){var a,o=(0,p.CR)(i),s=o[0],l=o.slice(1),u=(0,c.UM)(e)?!0:e.includes(s);u&&(a=t.coordinate)[s].apply(a,(0,p.ev)([],(0,p.CR)(l),!1))})},r}(),m1=y1,x1=function(){function r(e,t,n){this.view=e,this.gEvent=t,this.data=n,this.type=t.type}return r.fromData=function(e,t,n){return new r(e,new E.Event(t,{}),n)},Object.defineProperty(r.prototype,"target",{get:function(){return this.gEvent.target},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"event",{get:function(){return this.gEvent.originalEvent},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"x",{get:function(){return this.gEvent.x},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"y",{get:function(){return this.gEvent.y},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"clientX",{get:function(){return this.gEvent.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"clientY",{get:function(){return this.gEvent.clientY},enumerable:!1,configurable:!0}),r.prototype.toString=function(){return"[Event (type=".concat(this.type,")]")},r.prototype.clone=function(){return new r(this.view,this.gEvent,this.data)},r}(),ar=x1;function w1(r){var e=r.getController("axis"),t=r.getController("legend"),n=r.getController("annotation"),i=r.getController("slider"),a=r.getController("scrollbar");[e,i,a,t,n].forEach(function(o){o&&o.layout()})}var S1=function(){function r(){this.scales=new Map,this.syncScales=new Map}return r.prototype.createScale=function(e,t,n,i){var a=n,o=this.getScaleMeta(i);if(t.length===0&&o){var s=o.scale,l={type:s.type};s.isCategory&&(l.values=s.values),a=(0,c.b$)(l,o.scaleDef,n)}var u=Mx(e,t,a);return this.cacheScale(u,n,i),u},r.prototype.sync=function(e,t){var n=this;this.syncScales.forEach(function(i,a){var o=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,l=[];(0,c.S6)(i,function(u){var f=n.getScale(u);s=(0,c.hj)(f.max)?Math.max(s,f.max):s,o=(0,c.hj)(f.min)?Math.min(o,f.min):o,(0,c.S6)(f.values,function(h){l.includes(h)||l.push(h)})}),(0,c.S6)(i,function(u){var f=n.getScale(u);if(f.isContinuous)f.change({min:o,max:s,values:l});else if(f.isCategory){var h=f.range,v=n.getScaleMeta(u);l&&!(0,c.U2)(v,["scaleDef","range"])&&(h=Jf((0,c.b$)({},f,{values:l}),e,t)),f.change({values:l,range:h})}})})},r.prototype.cacheScale=function(e,t,n){var i=this.getScaleMeta(n);i&&i.scale.type===e.type?(Cx(i.scale,e),i.scaleDef=t):(i={key:n,scale:e,scaleDef:t},this.scales.set(n,i));var a=this.getSyncKey(i);if(i.syncKey=a,this.removeFromSyncScales(n),a){var o=this.syncScales.get(a);o||(o=[],this.syncScales.set(a,o)),o.push(n)}},r.prototype.getScale=function(e){var t=this.getScaleMeta(e);if(!t){var n=(0,c.Z$)(e.split("-")),i=this.syncScales.get(n);i&&i.length&&(t=this.getScaleMeta(i[0]))}return t&&t.scale},r.prototype.deleteScale=function(e){var t=this.getScaleMeta(e);if(t){var n=t.syncKey,i=this.syncScales.get(n);if(i&&i.length){var a=i.indexOf(e);a!==-1&&i.splice(a,1)}}this.scales.delete(e)},r.prototype.clear=function(){this.scales.clear(),this.syncScales.clear()},r.prototype.removeFromSyncScales=function(e){var t=this;this.syncScales.forEach(function(n,i){var a=n.indexOf(e);if(a!==-1)return n.splice(a,1),n.length===0&&t.syncScales.delete(i),!1})},r.prototype.getSyncKey=function(e){var t=e.scale,n=e.scaleDef,i=t.field,a=(0,c.U2)(n,["sync"]);return a===!0?i:a===!1?void 0:a},r.prototype.getScaleMeta=function(e){return this.scales.get(e)},r}(),ls=function(){function r(e,t,n,i){e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),i===void 0&&(i=0),this.top=e,this.right=t,this.bottom=n,this.left=i}return r.instance=function(e,t,n,i){return e===void 0&&(e=0),t===void 0&&(t=0),n===void 0&&(n=0),i===void 0&&(i=0),new r(e,t,n,i)},r.prototype.max=function(e){var t=(0,p.CR)(e,4),n=t[0],i=t[1],a=t[2],o=t[3];return this.top=Math.max(this.top,n),this.right=Math.max(this.right,i),this.bottom=Math.max(this.bottom,a),this.left=Math.max(this.left,o),this},r.prototype.shrink=function(e){var t=(0,p.CR)(e,4),n=t[0],i=t[1],a=t[2],o=t[3];return this.top+=n,this.right+=i,this.bottom+=a,this.left+=o,this},r.prototype.inc=function(e,t){var n=e.width,i=e.height;switch(t){case K.TOP:case K.TOP_LEFT:case K.TOP_RIGHT:this.top+=i;break;case K.RIGHT:case K.RIGHT_TOP:case K.RIGHT_BOTTOM:this.right+=n;break;case K.BOTTOM:case K.BOTTOM_LEFT:case K.BOTTOM_RIGHT:this.bottom+=i;break;case K.LEFT:case K.LEFT_TOP:case K.LEFT_BOTTOM:this.left+=n;break;default:break}return this},r.prototype.getPadding=function(){return[this.top,this.right,this.bottom,this.left]},r.prototype.clone=function(){return new(r.bind.apply(r,(0,p.ev)([void 0],(0,p.CR)(this.getPadding()),!1)))},r}();function b1(r){var e=r.padding;if(!p1(e))return new(ls.bind.apply(ls,(0,p.ev)([void 0],(0,p.CR)(fu(e)),!1)));var t=r.viewBBox,n=new ls,i=[],a=[],o=[];return(0,c.S6)(r.getComponents(),function(s){var l=s.type;l===Ct.AXIS?i.push(s):[Ct.LEGEND,Ct.SLIDER,Ct.SCROLLBAR].includes(l)?a.push(s):l!==Ct.GRID&&l!==Ct.TOOLTIP&&o.push(s)}),(0,c.S6)(i,function(s){var l=s.component,u=l.getLayoutBBox(),f=new Tr(u.x,u.y,u.width,u.height),h=f.exceed(t);n.max(h)}),(0,c.S6)(a,function(s){var l=s.component,u=s.direction,f=l.getLayoutBBox(),h=l.get("padding"),v=new Tr(f.x,f.y,f.width,f.height).expand(h);n.inc(v,u)}),(0,c.S6)(o,function(s){var l=s.component,u=s.direction,f=l.getLayoutBBox(),h=new Tr(f.x,f.y,f.width,f.height);n.inc(h,u)}),n}function M1(r,e,t){var n=t.instance();e.forEach(function(i){i.autoPadding=n.max(i.autoPadding.getPadding())})}var Eh=function(r){(0,p.ZT)(e,r);function e(t){var n=r.call(this,{visible:t.visible})||this;n.views=[],n.geometries=[],n.controllers=[],n.interactions={},n.limitInPlot=!1,n.options={data:[],animate:!0},n.usedControllers=d1(),n.scalePool=new S1,n.layoutFunc=w1,n.isPreMouseInPlot=!1,n.isDataChanged=!1,n.isCoordinateChanged=!1,n.createdScaleKeys=new Map,n.onCanvasEvent=function(C){var A=C.name;if(!A.includes(":")){var B=n.createViewEvent(C);n.doPlotEvent(B),n.emit(A,B)}},n.onDelegateEvents=function(C){var A=C.name;if(!!A.includes(":")){var B=n.createViewEvent(C);n.emit(A,B)}};var i=t.id,a=i===void 0?(0,c.EL)("view"):i,o=t.parent,s=t.canvas,l=t.backgroundGroup,u=t.middleGroup,f=t.foregroundGroup,h=t.region,v=h===void 0?{start:{x:0,y:0},end:{x:1,y:1}}:h,d=t.padding,g=t.appendPadding,y=t.theme,m=t.options,x=t.limitInPlot,b=t.syncViewPadding;return n.parent=o,n.canvas=s,n.backgroundGroup=l,n.middleGroup=u,n.foregroundGroup=f,n.region=v,n.padding=d,n.appendPadding=g,n.options=(0,p.pi)((0,p.pi)({},n.options),m),n.limitInPlot=x,n.id=a,n.syncViewPadding=b,n.themeObject=(0,c.Kn)(y)?(0,c.b$)({},Ua("default"),os(y)):Ua(y),n.init(),n}return e.prototype.setLayout=function(t){this.layoutFunc=t},e.prototype.init=function(){this.calculateViewBBox(),this.initEvents(),this.initComponentController(),this.initOptions()},e.prototype.render=function(t,n){t===void 0&&(t=!1),this.emit(z.BEFORE_RENDER,ar.fromData(this,z.BEFORE_RENDER,n)),this.paint(t),this.emit(z.AFTER_RENDER,ar.fromData(this,z.AFTER_RENDER,n)),this.visible===!1&&this.changeVisible(!1)},e.prototype.clear=function(){var t=this;this.emit(z.BEFORE_CLEAR),this.filteredData=[],this.coordinateInstance=void 0,this.isDataChanged=!1,this.isCoordinateChanged=!1;for(var n=this.geometries,i=0;i');Ft.appendChild(Xt);var ae=U(Ft,l,a,o),we=j(v),Se=new we.Canvas((0,p.pi)({container:Xt,pixelRatio:d,localRefresh:y,supportCSSTransform:C},ae));return n=r.call(this,{parent:null,canvas:Se,backgroundGroup:Se.addGroup({zIndex:Mt.BG}),middleGroup:Se.addGroup({zIndex:Mt.MID}),foregroundGroup:Se.addGroup({zIndex:Mt.FORE}),padding:u,appendPadding:f,visible:x,options:rt,limitInPlot:lt,theme:xt,syncViewPadding:kt})||this,n.onResize=(0,c.Ds)(function(){n.forceFit()},300),n.ele=Ft,n.canvas=Se,n.width=ae.width,n.height=ae.height,n.autoFit=l,n.localRefresh=y,n.renderer=v,n.wrapperElement=Xt,n.updateCanvasStyle(),n.bindAutoFit(),n.initDefaultInteractions(B),n}return e.prototype.initDefaultInteractions=function(t){var n=this;(0,c.S6)(t,function(i){n.interaction(i)})},e.prototype.aria=function(t){var n="aria-label";t===!1?this.ele.removeAttribute(n):this.ele.setAttribute(n,t.label)},e.prototype.changeSize=function(t,n){return this.width===t&&this.height===n?this:(this.emit(z.BEFORE_CHANGE_SIZE),this.width=t,this.height=n,this.canvas.changeSize(t,n),this.render(!0),this.emit(z.AFTER_CHANGE_SIZE),this)},e.prototype.clear=function(){r.prototype.clear.call(this),this.aria(!1)},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.unbindAutoFit(),this.canvas.destroy(),D(this.wrapperElement),this.wrapperElement=null},e.prototype.changeVisible=function(t){return r.prototype.changeVisible.call(this,t),this.wrapperElement.style.display=t?"":"none",this},e.prototype.forceFit=function(){if(!this.destroyed){var t=U(this.ele,!0,this.width,this.height),n=t.width,i=t.height;this.changeSize(n,i)}},e.prototype.updateCanvasStyle=function(){yt(this.canvas.get("el"),{display:"inline-block",verticalAlign:"middle"})},e.prototype.bindAutoFit=function(){this.autoFit&&window.addEventListener("resize",this.onResize)},e.prototype.unbindAutoFit=function(){this.autoFit&&window.removeEventListener("resize",this.onResize)},e}(C1),T1=A1,Ji=function(){function r(e){this.visible=!0,this.components=[],this.view=e}return r.prototype.clear=function(e){(0,c.S6)(this.components,function(t){t.component.destroy()}),this.components=[]},r.prototype.destroy=function(){this.clear()},r.prototype.getComponents=function(){return this.components},r.prototype.changeVisible=function(e){this.visible!==e&&(this.components.forEach(function(t){e?t.component.show():t.component.hide()}),this.visible=e)},r}();function E1(r){for(var e=[],t=function(i){var a=r[i],o=(0,c.sE)(e,function(s){return s.color===a.color&&s.name===a.name&&s.value===a.value&&s.title===a.title});o||e.push(a)},n=0;n1){var A=u[0],B=Math.abs(t.y-A[0].y);try{for(var rt=(0,p.XA)(u),lt=rt.next();!lt.done;lt=rt.next()){var xt=lt.value,kt=Math.abs(t.y-xt[0].y);kt<=B&&(A=xt,B=kt)}}catch(Ft){s={error:Ft}}finally{try{lt&&!lt.done&&(l=rt.return)&&l.call(rt)}finally{if(s)throw s.error}}u=[A]}return E1((0,c.xH)(u))}return[]},e.prototype.layout=function(){},e.prototype.update=function(){if(this.point&&this.showTooltip(this.point),this.tooltip){var t=this.view.getCanvas();this.tooltip.set("region",{start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}})}},e.prototype.isCursorEntered=function(t){if(this.tooltip){var n=this.tooltip.getContainer(),i=this.tooltip.get("capture");if(n&&i){var a=n.getBoundingClientRect(),o=a.x,s=a.y,l=a.width,u=a.height;return new Tr(o,s,l,u).isPointIn(t)}}return!1},e.prototype.getTooltipCfg=function(){var t=this.view,n=t.getOptions().tooltip,i=this.processCustomContent(n),a=t.getTheme(),o=(0,c.U2)(a,["components","tooltip"],{}),s=(0,c.U2)(i,"enterable",o.enterable);return(0,c.b$)({},o,i,{capture:!!(s||this.isLocked)})},e.prototype.processCustomContent=function(t){if((0,c.jn)(t)||!(0,c.U2)(t,"customContent"))return t;var n=t.customContent,i=function(a,o){var s=n(a,o)||"";return(0,c.HD)(s)?'
    '+s+"
    ":s};return(0,p.pi)((0,p.pi)({},t),{customContent:i})},e.prototype.getTitle=function(t){var n=t[0].title||t[0].name;return this.title=n,n},e.prototype.renderTooltip=function(){var t=this.view.getCanvas(),n={start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}},i=this.getTooltipCfg(),a=new Jo((0,p.pi)((0,p.pi)({parent:t.get("el").parentNode,region:n},i),{visible:!1,crosshairs:null}));a.init(),this.tooltip=a},e.prototype.renderTooltipMarkers=function(t,n){var i,a,o=this.getTooltipMarkersGroup(),s=this.view.getRootView(),l=s.limitInPlot;try{for(var u=(0,p.XA)(t),f=u.next();!f.done;f=u.next()){var h=f.value,v=h.x,d=h.y;if(l||(o==null?void 0:o.getClip())){var g=eu(s.getCoordinate()),y=g.type,m=g.attrs;o==null||o.setClip({type:y,attrs:m})}else o==null||o.setClip(void 0);var x=this.view.getTheme(),b=(0,c.U2)(x,["components","tooltip","marker"],{}),C=(0,p.pi)((0,p.pi)({fill:h.color,symbol:"circle",shadowColor:h.color},(0,c.mf)(n)?(0,p.pi)((0,p.pi)({},b),n(h)):n),{x:v,y:d});o.addShape("marker",{attrs:C})}}catch(A){i={error:A}}finally{try{f&&!f.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}},e.prototype.renderCrosshairs=function(t,n){var i=(0,c.U2)(n,["crosshairs","type"],"x");i==="x"?(this.yCrosshair&&this.yCrosshair.hide(),this.renderXCrosshairs(t,n)):i==="y"?(this.xCrosshair&&this.xCrosshair.hide(),this.renderYCrosshairs(t,n)):i==="xy"&&(this.renderXCrosshairs(t,n),this.renderYCrosshairs(t,n))},e.prototype.renderXCrosshairs=function(t,n){var i=this.getViewWithGeometry(this.view).getCoordinate(),a,o;if(i.isRect)i.isTransposed?(a={x:i.start.x,y:t.y},o={x:i.end.x,y:t.y}):(a={x:t.x,y:i.end.y},o={x:t.x,y:i.start.y});else{var s=Zi(i,t),l=i.getCenter(),u=i.getRadius();o=cr(l.x,l.y,u,s),a=l}var f=(0,c.b$)({start:a,end:o,container:this.getTooltipCrosshairsGroup()},(0,c.U2)(n,"crosshairs",{}),this.getCrosshairsText("x",t,n));delete f.type;var h=this.xCrosshair;h?h.update(f):(h=new Rf(f),h.init()),h.render(),h.show(),this.xCrosshair=h},e.prototype.renderYCrosshairs=function(t,n){var i=this.getViewWithGeometry(this.view).getCoordinate(),a,o;if(i.isRect){var s=void 0,l=void 0;i.isTransposed?(s={x:t.x,y:i.end.y},l={x:t.x,y:i.start.y}):(s={x:i.start.x,y:t.y},l={x:i.end.x,y:t.y}),a={start:s,end:l},o="Line"}else a={center:i.getCenter(),radius:Qo(i,t),startAngle:i.startAngle,endAngle:i.endAngle},o="Circle";a=(0,c.b$)({container:this.getTooltipCrosshairsGroup()},a,(0,c.U2)(n,"crosshairs",{}),this.getCrosshairsText("y",t,n)),delete a.type;var u=this.yCrosshair;u?i.isRect&&u.get("type")==="circle"||!i.isRect&&u.get("type")==="line"?(u=new ut[o](a),u.init()):u.update(a):(u=new ut[o](a),u.init()),u.render(),u.show(),this.yCrosshair=u},e.prototype.getCrosshairsText=function(t,n,i){var a=(0,c.U2)(i,["crosshairs","text"]),o=(0,c.U2)(i,["crosshairs","follow"]),s=this.items;if(a){var l=this.getViewWithGeometry(this.view),u=s[0],f=l.getXScale(),h=l.getYScales()[0],v=void 0,d=void 0;if(o){var g=this.view.getCoordinate().invert(n);v=f.invert(g.x),d=h.invert(g.y)}else v=u.data[f.field],d=u.data[h.field];var y=t==="x"?v:d;return(0,c.mf)(a)?a=a(t,y,s,n):a.content=y,{text:a}}},e.prototype.getGuideGroup=function(){if(!this.guideGroup){var t=this.view.foregroundGroup;this.guideGroup=t.addGroup({name:"tooltipGuide",capture:!1})}return this.guideGroup},e.prototype.getTooltipMarkersGroup=function(){var t=this.tooltipMarkersGroup;return t&&!t.destroyed?(t.clear(),t.show()):(t=this.getGuideGroup().addGroup({name:"tooltipMarkersGroup"}),t.toFront(),this.tooltipMarkersGroup=t),t},e.prototype.getTooltipCrosshairsGroup=function(){var t=this.tooltipCrosshairsGroup;return t||(t=this.getGuideGroup().addGroup({name:"tooltipCrosshairsGroup",capture:!1}),t.toBack(),this.tooltipCrosshairsGroup=t),t},e.prototype.findItemsFromView=function(t,n){var i,a;if(t.getOptions().tooltip===!1)return[];var o=this.getTooltipCfg(),s=cu(t,n,o);try{for(var l=(0,p.XA)(t.views),u=l.next();!u.done;u=l.next()){var f=u.value;s=s.concat(this.findItemsFromView(f,n))}}catch(h){i={error:h}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}return s},e.prototype.getViewWithGeometry=function(t){var n=this;return t.geometries.length?t:(0,c.sE)(t.views,function(i){return n.getViewWithGeometry(i)})},e.prototype.getItemsAfterProcess=function(t){var n=this.getTooltipCfg().customItems,i=n||function(a){return a};return i(t)},e}(Ji),Fh=F1,Ih={};function Lh(r){return Ih[r.toLowerCase()]}function Ur(r,e){Ih[r.toLowerCase()]=e}var Qi={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},I1={interval:function(r){return{enter:{animation:r.isRect?r.isTransposed?"scale-in-x":"scale-in-y":"fade-in"},update:{animation:r.isPolar&&r.isTransposed?"sector-path-update":null},leave:{animation:"fade-out"}}},line:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},path:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},point:{appear:{animation:"zoom-in"},enter:{animation:"zoom-in"},leave:{animation:"zoom-out"}},area:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},polygon:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},schema:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},edge:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},label:{appear:{animation:"fade-in",delay:450},enter:{animation:"fade-in"},update:{animation:"position-update"},leave:{animation:"fade-out"}}},Dh={line:function(){return{animation:"wave-in"}},area:function(){return{animation:"wave-in"}},path:function(){return{animation:"fade-in"}},interval:function(r){var e;return r.isRect?e=r.isTransposed?"grow-in-x":"grow-in-y":(e="grow-in-xy",r.isPolar&&r.isTransposed&&(e="wave-in")),{animation:e}},schema:function(r){var e;return r.isRect?e=r.isTransposed?"grow-in-x":"grow-in-y":e="grow-in-xy",{animation:e}},polygon:function(){return{animation:"fade-in",duration:500}},edge:function(){return{animation:"fade-in"}}};function L1(r,e){return{delay:(0,c.mf)(r.delay)?r.delay(e):r.delay,easing:(0,c.mf)(r.easing)?r.easing(e):r.easing,duration:(0,c.mf)(r.duration)?r.duration(e):r.duration,callback:r.callback,repeat:r.repeat}}function Ph(r,e,t){var n=I1[r];return n&&((0,c.mf)(n)&&(n=n(e)),n=(0,c.b$)({},Qi,n),t)?n[t]:n}function ta(r,e,t){var n=(0,c.U2)(r.get("origin"),"data",Vt),i=e.animation,a=L1(e,n);if(i){var o=Lh(i);o&&o(r,a,t)}else r.animate(t.toAttrs,a)}function D1(r,e,t,n,i){if(Dh[t]){var a=Dh[t](n),o=Lh((0,c.U2)(a,"animation",""));if(o){var s=(0,p.pi)((0,p.pi)((0,p.pi)({},Qi.appear),a),e);r.stopAnimate(),o(r,s,{coordinate:n,minYPoint:i,toAttrs:null})}}}var hu="element-background",P1=function(r){(0,p.ZT)(e,r);function e(t){var n=r.call(this,t)||this;n.labelShape=[],n.states=[];var i=t.shapeFactory,a=t.container,o=t.offscreenGroup,s=t.elementIndex,l=t.visible,u=l===void 0?!0:l;return n.shapeFactory=i,n.container=a,n.offscreenGroup=o,n.visible=u,n.elementIndex=s,n}return e.prototype.draw=function(t,n){n===void 0&&(n=!1),this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.drawShape(t,n),this.visible===!1&&this.changeVisible(!1)},e.prototype.update=function(t){var n=this,i=n.shapeFactory,a=n.shape;if(!!a){this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.setShapeInfo(a,t);var o=this.getOffscreenGroup(),s=i.drawShape(this.shapeType,t,o);s.cfg.data=this.data,s.cfg.origin=t,s.cfg.element=this,this.syncShapeStyle(a,s,this.getStates(),this.getAnimateCfg("update"))}},e.prototype.destroy=function(){var t=this,n=t.shapeFactory,i=t.shape;if(i){var a=this.getAnimateCfg("leave");a?ta(i,a,{coordinate:n.coordinate,toAttrs:(0,p.pi)({},i.attr())}):i.remove(!0)}this.states=[],this.shapeFactory=void 0,this.container=void 0,this.shape=void 0,this.animate=void 0,this.geometry=void 0,this.labelShape=[],this.model=void 0,this.data=void 0,this.offscreenGroup=void 0,this.statesStyle=void 0,r.prototype.destroy.call(this)},e.prototype.changeVisible=function(t){r.prototype.changeVisible.call(this,t),t?(this.shape&&this.shape.show(),this.labelShape&&this.labelShape.forEach(function(n){n.show()})):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach(function(n){n.hide()}))},e.prototype.setState=function(t,n){var i=this,a=i.states,o=i.shapeFactory,s=i.model,l=i.shape,u=i.shapeType,f=a.indexOf(t);if(n){if(f>-1)return;a.push(t),(t==="active"||t==="selected")&&(l==null||l.toFront())}else{if(f===-1)return;if(a.splice(f,1),t==="active"||t==="selected"){var h=this.geometry,v=h.sortZIndex,d=h.zIndexReversed,g=d?this.geometry.elements.length-this.elementIndex:this.elementIndex;v?l.setZIndex(g):l.set("zIndex",g)}}var y=o.drawShape(u,s,this.getOffscreenGroup());a.length?this.syncShapeStyle(l,y,a,null):this.syncShapeStyle(l,y,["reset"],null),y.remove(!0);var m={state:t,stateStatus:n,element:this,target:this.container};this.container.emit("statechange",m),Cf(this.shape,"statechange",m)},e.prototype.clearStates=function(){var t=this,n=this.states;(0,c.S6)(n,function(i){t.setState(i,!1)}),this.states=[]},e.prototype.hasState=function(t){return this.states.includes(t)},e.prototype.getStates=function(){return this.states},e.prototype.getData=function(){return this.data},e.prototype.getModel=function(){return this.model},e.prototype.getBBox=function(){var t=this,n=t.shape,i=t.labelShape,a={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return n&&(a=n.getCanvasBBox()),i&&i.forEach(function(o){var s=o.getCanvasBBox();a.x=Math.min(s.x,a.x),a.y=Math.min(s.y,a.y),a.minX=Math.min(s.minX,a.minX),a.minY=Math.min(s.minY,a.minY),a.maxX=Math.max(s.maxX,a.maxX),a.maxY=Math.max(s.maxY,a.maxY)}),a.width=a.maxX-a.minX,a.height=a.maxY-a.minY,a},e.prototype.getStatesStyle=function(){if(!this.statesStyle){var t=this,n=t.shapeType,i=t.geometry,a=t.shapeFactory,o=i.stateOption,s=a.defaultShapeType,l=a.theme[n]||a.theme[s];this.statesStyle=(0,c.b$)({},l,o)}return this.statesStyle},e.prototype.getStateStyle=function(t,n){var i=this.getStatesStyle(),a=(0,c.U2)(i,[t,"style"],{}),o=a[n]||a;return(0,c.mf)(o)?o(this):o},e.prototype.getAnimateCfg=function(t){var n=this,i=this.animate;if(i){var a=i[t];return a&&(0,p.pi)((0,p.pi)({},a),{callback:function(){var o;(0,c.mf)(a.callback)&&a.callback(),(o=n.geometry)===null||o===void 0||o.emit(W.AFTER_DRAW_ANIMATE)}})}return null},e.prototype.drawShape=function(t,n){var i;n===void 0&&(n=!1);var a=this,o=a.shapeFactory,s=a.container,l=a.shapeType;if(this.shape=o.drawShape(l,t,s),this.shape){this.setShapeInfo(this.shape,t);var u=this.shape.cfg.name;u?(0,c.HD)(u)&&(this.shape.cfg.name=["element",u]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var f=n?"enter":"appear",h=this.getAnimateCfg(f);h&&((i=this.geometry)===null||i===void 0||i.emit(W.BEFORE_DRAW_ANIMATE),ta(this.shape,h,{coordinate:o.coordinate,toAttrs:(0,p.pi)({},this.shape.attr())}))}},e.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},e.prototype.setShapeInfo=function(t,n){var i=this;if(t.cfg.origin=n,t.cfg.element=this,t.isGroup()){var a=t.get("children");a.forEach(function(o){i.setShapeInfo(o,n)})}},e.prototype.syncShapeStyle=function(t,n,i,a,o){var s=this,l;if(i===void 0&&(i=[]),o===void 0&&(o=0),!(!t||!n)){var u=t.get("clipShape"),f=n.get("clipShape");if(this.syncShapeStyle(u,f,i,a),t.isGroup())for(var h=t.get("children"),v=n.get("children"),d=0;d=0?a=n:i<=0?a=i:a=0,a},e.prototype.createAttrOption=function(t,n,i){if((0,c.UM)(n)||(0,c.Kn)(n))(0,c.Kn)(n)&&(0,c.Xy)(Object.keys(n),["values"])?(0,c.t8)(this.attributeOption,t,{fields:n.values}):(0,c.t8)(this.attributeOption,t,n);else{var a={};(0,c.hj)(n)?a.values=[n]:a.fields=Ga(n),i&&((0,c.mf)(i)?a.callback=i:a.values=i),(0,c.t8)(this.attributeOption,t,a)}},e.prototype.initAttributes=function(){var t=this,n=this,i=n.attributes,a=n.attributeOption,o=n.theme,s=n.shapeType;this.groupScales=[];var l={},u=function(v){if(a.hasOwnProperty(v)){var d=a[v];if(!d)return{value:void 0};var g=(0,p.pi)({},d),y=g.callback,m=g.values,x=g.fields,b=x===void 0?[]:x,C=b.map(function(B){var rt=t.scales[B];if(!l[B]&&Lt.includes(v)){var lt=Kf(rt,(0,c.U2)(t.scaleDefs,B),v,t.type);lt==="cat"&&(t.groupScales.push(rt),l[B]=!0)}return rt});g.scales=C,v!=="position"&&C.length===1&&C[0].type==="identity"?g.values=C[0].values:!y&&!m&&(v==="size"?g.values=o.sizes:v==="shape"?g.values=o.shapes[s]||[]:v==="color"&&(C.length?g.values=C[0].values.length<=10?o.colors10:o.colors20:g.values=o.colors10));var A=wf(v);i[v]=new A(g)}};for(var f in a){var h=u(f);if(typeof h=="object")return h.value}},e.prototype.processData=function(t){var n,i;this.hasSorted=!1;for(var a=this.getAttribute("position").scales,o=a.filter(function(lt){return lt.isCategory}),s=this.groupData(t),l=[],u=0,f=s.length;us&&(s=h)}var v=this.scaleDefs,d={};ot.max&&!(0,c.U2)(v,[a,"max"])&&(d.max=s),t.change(d)},e.prototype.beforeMapping=function(t){var n=t;if(this.sortable&&this.sort(n),this.generatePoints)for(var i=0,a=n.length;i1)for(var v=0;v0})}function Uh(r,e,t){var n=t.data,i=t.origin,a=t.animateCfg,o=t.coordinate,s=(0,c.U2)(a,"update");r.set("data",n),r.set("origin",i),r.set("animateCfg",a),r.set("coordinate",o),r.set("visible",e.get("visible")),(r.getChildren()||[]).forEach(function(l,u){var f=e.getChildByIndex(u);if(!f)r.removeChild(l),l.remove(!0);else{l.set("data",n),l.set("origin",i),l.set("animateCfg",a),l.set("coordinate",o);var h=qf(l,f);s?ta(l,s,{toAttrs:h,coordinate:o}):l.attr(h),f.isGroup()&&Uh(l,f,t)}}),(0,c.S6)(e.getChildren(),function(l,u){u>=r.getCount()&&(l.destroyed||r.add(l))})}var H1=function(){function r(e){this.shapesMap={};var t=e.layout,n=e.container;this.layout=t,this.container=n}return r.prototype.render=function(e,t,n){return n===void 0&&(n=!1),(0,p.mG)(this,void 0,void 0,function(){var i,a,o,s,l,u,f,h,v=this;return(0,p.Jh)(this,function(d){switch(d.label){case 0:if(i={},a=this.createOffscreenGroup(),!e.length)return[3,2];try{for(o=(0,p.XA)(e),s=o.next();!s.done;s=o.next())l=s.value,l&&(i[l.id]=this.renderLabel(l,a))}catch(g){f={error:g}}finally{try{s&&!s.done&&(h=o.return)&&h.call(o)}finally{if(f)throw f.error}}return[4,this.doLayout(e,t,i)];case 1:d.sent(),this.renderLabelLine(e,i),this.renderLabelBackground(e,i),this.adjustLabel(e,i),d.label=2;case 2:return u=this.shapesMap,(0,c.S6)(i,function(g,y){if(g.destroyed)delete i[y];else{if(u[y]){var m=g.get("data"),x=g.get("origin"),b=g.get("coordinate"),C=g.get("animateCfg"),A=u[y];Uh(A,i[y],{data:m,origin:x,animateCfg:C,coordinate:b}),i[y]=A}else{if(v.container.destroyed)return;v.container.add(g);var B=(0,c.U2)(g.get("animateCfg"),n?"enter":"appear");B&&ta(g,B,{toAttrs:(0,p.pi)({},g.attr()),coordinate:g.get("coordinate")})}delete u[y]}}),(0,c.S6)(u,function(g){var y=(0,c.U2)(g.get("animateCfg"),"leave");y?ta(g,y,{toAttrs:null,coordinate:g.get("coordinate")}):g.remove(!0)}),this.shapesMap=i,a.destroy(),[2]}})})},r.prototype.clear=function(){this.container.clear(),this.shapesMap={}},r.prototype.destroy=function(){this.container.destroy(),this.shapesMap=null},r.prototype.renderLabel=function(e,t){var n=e.id,i=e.elementId,a=e.data,o=e.mappingData,s=e.coordinate,l=e.animate,u=e.content,f=e.capture,h={id:n,elementId:i,capture:f,data:a,origin:(0,p.pi)((0,p.pi)({},o),{data:o[Vt]}),coordinate:s},v=t.addGroup((0,p.pi)({name:"label",animateCfg:this.animate===!1||l===null||l===!1?!1:(0,c.b$)({},this.animate,l)},h)),d;if(u.isGroup&&u.isGroup()||u.isShape&&u.isShape()){var g=u.getCanvasBBox(),y=g.width,m=g.height,x=(0,c.U2)(e,"textAlign","left"),b=e.x,C=e.y-m/2;x==="center"?b=b-y/2:(x==="right"||x==="end")&&(b=b-y),Ha(u,b,C),d=u,v.add(u)}else{var A=(0,c.U2)(e,["style","fill"]);d=v.addShape("text",(0,p.pi)({attrs:(0,p.pi)((0,p.pi)({x:e.x,y:e.y,textAlign:e.textAlign,textBaseline:(0,c.U2)(e,"textBaseline","middle"),text:e.content},e.style),{fill:(0,c.Ft)(A)?e.color:A})},h))}return e.rotate&&pu(d,e.rotate),v},r.prototype.doLayout=function(e,t,n){return(0,p.mG)(this,void 0,void 0,function(){var i,a=this;return(0,p.Jh)(this,function(o){switch(o.label){case 0:return this.layout?(i=(0,c.kJ)(this.layout)?this.layout:[this.layout],[4,Promise.all(i.map(function(s){var l=k1((0,c.U2)(s,"type",""));if(!!l){var u=[],f=[];return(0,c.S6)(n,function(h,v){u.push(h),f.push(t[h.get("elementId")])}),l(e,u,f,a.region,s.cfg)}}))]):[3,2];case 1:o.sent(),o.label=2;case 2:return[2]}})})},r.prototype.renderLabelLine=function(e,t){(0,c.S6)(e,function(n){var i=(0,c.U2)(n,"coordinate");if(!(!n||!i)){var a=i.getCenter(),o=i.getRadius();if(!!n.labelLine){var s=(0,c.U2)(n,"labelLine",{}),l=n.id,u=s.path;if(!u){var f=cr(a.x,a.y,o,n.angle);u=[["M",f.x,f.y],["L",n.x,n.y]]}var h=t[l];h.destroyed||h.addShape("path",{capture:!1,attrs:(0,p.pi)({path:u,stroke:n.color?n.color:(0,c.U2)(n,["style","fill"],"#000"),fill:null},s.style),id:l,origin:n.mappingData,data:n.data,coordinate:n.coordinate})}}})},r.prototype.renderLabelBackground=function(e,t){(0,c.S6)(e,function(n){var i=(0,c.U2)(n,"coordinate"),a=(0,c.U2)(n,"background");if(!(!a||!i)){var o=n.id,s=t[o];if(!s.destroyed){var l=s.getChildren()[0];if(l){var u=zh(s,n,a.padding),f=u.rotation,h=(0,p._T)(u,["rotation"]),v=s.addShape("rect",{attrs:(0,p.pi)((0,p.pi)({},h),a.style||{}),id:o,origin:n.mappingData,data:n.data,coordinate:n.coordinate});if(v.setZIndex(-1),f){var d=l.getMatrix();v.setMatrix(d)}}}}})},r.prototype.createOffscreenGroup=function(){var e=this.container,t=e.getGroupBase(),n=new t({});return n},r.prototype.adjustLabel=function(e,t){(0,c.S6)(e,function(n){if(n){var i=n.id,a=t[i];if(!a.destroyed){var o=a.findAll(function(s){return s.get("type")!=="path"});(0,c.S6)(o,function(s){s&&(n.offsetX&&s.attr("x",s.attr("x")+n.offsetX),n.offsetY&&s.attr("y",s.attr("y")+n.offsetY))})}}})},r}(),Y1=H1;function Vh(r){var e=0;return(0,c.S6)(r,function(t){e+=t}),e/r.length}var X1=function(){function r(e){this.geometry=e}return r.prototype.getLabelItems=function(e){var t=this,n=[],i=this.getLabelCfgs(e);return(0,c.S6)(e,function(a,o){var s=i[o];if(!s||(0,c.UM)(a.x)||(0,c.UM)(a.y)){n.push(null);return}var l=(0,c.kJ)(s.content)?s.content:[s.content];s.content=l;var u=l.length;(0,c.S6)(l,function(f,h){if((0,c.UM)(f)||f===""){n.push(null);return}var v=(0,p.pi)((0,p.pi)({},s),t.getLabelPoint(s,a,h));v.textAlign||(v.textAlign=t.getLabelAlign(v,h,u)),v.offset<=0&&(v.labelLine=null),n.push(v)})}),n},r.prototype.render=function(e,t){return t===void 0&&(t=!1),(0,p.mG)(this,void 0,void 0,function(){var n,i,a;return(0,p.Jh)(this,function(o){switch(o.label){case 0:return n=this.getLabelItems(e),i=this.getLabelsRenderer(),a=this.getGeometryShapes(),[4,i.render(n,a,t)];case 1:return o.sent(),[2]}})})},r.prototype.clear=function(){var e=this.labelsRenderer;e&&e.clear()},r.prototype.destroy=function(){var e=this.labelsRenderer;e&&e.destroy(),this.labelsRenderer=null},r.prototype.getCoordinate=function(){return this.geometry.coordinate},r.prototype.getDefaultLabelCfg=function(e,t){var n=this.geometry,i=n.type,a=n.theme;return i==="polygon"||i==="interval"&&t==="middle"||e<0&&!["line","point","path"].includes(i)?(0,c.U2)(a,"innerLabels",{}):(0,c.U2)(a,"labels",{})},r.prototype.getThemedLabelCfg=function(e){var t=this.geometry,n=this.getDefaultLabelCfg(),i=t.type,a=t.theme,o;return i==="polygon"||e.offset<0&&!["line","point","path"].includes(i)?o=(0,c.b$)({},n,a.innerLabels,e):o=(0,c.b$)({},n,a.labels,e),o},r.prototype.setLabelPosition=function(e,t,n,i){},r.prototype.getLabelOffset=function(e){var t=this.getCoordinate(),n=this.getOffsetVector(e);return t.isTransposed?n[0]:n[1]},r.prototype.getLabelOffsetPoint=function(e,t,n){var i=e.offset,a=this.getCoordinate(),o=a.isTransposed,s=o?"x":"y",l=o?1:-1,u={x:0,y:0};return t>0||n===1?u[s]=i*l:u[s]=i*l*-1,u},r.prototype.getLabelPoint=function(e,t,n){var i=this.getCoordinate(),a=e.content.length;function o(m,x,b){b===void 0&&(b=!1);var C=m;return(0,c.kJ)(C)&&(e.content.length===1?b?C=Vh(C):C.length<=2?C=C[m.length-1]:C=Vh(C):C=C[x]),C}var s={content:e.content[n],x:0,y:0,start:{x:0,y:0},color:"#fff"},l=(0,c.kJ)(t.shape)?t.shape[0]:t.shape,u=l==="funnel"||l==="pyramid";if(this.geometry.type==="polygon"){var f=dx(t.x,t.y);s.x=f[0],s.y=f[1]}else this.geometry.type==="interval"&&!u?(s.x=o(t.x,n,!0),s.y=o(t.y,n)):(s.x=o(t.x,n),s.y=o(t.y,n));if(u){var h=(0,c.U2)(t,"nextPoints"),v=(0,c.U2)(t,"points");if(h){var d=i.convert(v[1]),g=i.convert(h[1]);s.x=(d.x+g.x)/2,s.y=(d.y+g.y)/2}else if(l==="pyramid"){var d=i.convert(v[1]),g=i.convert(v[2]);s.x=(d.x+g.x)/2,s.y=(d.y+g.y)/2}}e.position&&this.setLabelPosition(s,t,n,e.position);var y=this.getLabelOffsetPoint(e,n,a);return s.start={x:s.x,y:s.y},s.x+=y.x,s.y+=y.y,s.color=t.color,s},r.prototype.getLabelAlign=function(e,t,n){var i="center",a=this.getCoordinate();if(a.isTransposed){var o=e.offset;o<0?i="right":o===0?i="center":i="left",n>1&&t===0&&(i==="right"?i="left":i==="left"&&(i="right"))}return i},r.prototype.getLabelId=function(e){var t=this.geometry,n=t.type,i=t.getXScale(),a=t.getYScale(),o=e[Vt],s=t.getElementId(e);return n==="line"||n==="area"?s+=" ".concat(o[i.field]):n==="path"&&(s+=" ".concat(o[i.field],"-").concat(o[a.field])),s},r.prototype.getLabelsRenderer=function(){var e=this.geometry,t=e.labelsContainer,n=e.labelOption,i=e.canvasRegion,a=e.animateOption,o=this.geometry.coordinate,s=this.labelsRenderer;return s||(s=new Y1({container:t,layout:(0,c.U2)(n,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=s),s.region=i,s.animate=a?Ph("label",o):!1,s},r.prototype.getLabelCfgs=function(e){var t=this,n=this.geometry,i=n.labelOption,a=n.scales,o=n.coordinate,s=i,l=s.fields,u=s.callback,f=s.cfg,h=l.map(function(d){return a[d]}),v=[];return(0,c.S6)(e,function(d,g){var y=d[Vt],m=t.getLabelText(y,h),x;if(u){var b=l.map(function(lt){return y[lt]});if(x=u.apply(void 0,(0,p.ev)([],(0,p.CR)(b),!1)),(0,c.UM)(x)){v.push(null);return}}var C=(0,p.pi)((0,p.pi)({id:t.getLabelId(d),elementId:t.geometry.getElementId(d),data:y,mappingData:d,coordinate:o},f),x);(0,c.mf)(C.position)&&(C.position=C.position(y,d,g));var A=t.getLabelOffset(C.offset||0),B=t.getDefaultLabelCfg(A,C.position);C=(0,c.b$)({},B,C),C.offset=t.getLabelOffset(C.offset||0);var rt=C.content;(0,c.mf)(rt)?C.content=rt(y,d,g):(0,c.o8)(rt)&&(C.content=m[0]),v.push(C)}),v},r.prototype.getLabelText=function(e,t){var n=[];return(0,c.S6)(t,function(i){var a=e[i.field];(0,c.kJ)(a)?a=a.map(function(o){return i.getText(o)}):a=i.getText(a),(0,c.UM)(a)||a===""?n.push(null):n.push(a)}),n},r.prototype.getOffsetVector=function(e){e===void 0&&(e=0);var t=this.getCoordinate(),n=0;return(0,c.hj)(e)&&(n=e),t.isTransposed?t.applyMatrix(n,0):t.applyMatrix(0,n)},r.prototype.getGeometryShapes=function(){var e=this.geometry,t={};return(0,c.S6)(e.elementsMap,function(n,i){t[i]=n.shape}),(0,c.S6)(e.getOffscreenGroup().getChildren(),function(n){var i=e.getElementId(n.get("origin").mappingData);t[i]=n}),t},r}(),cs=X1;function du(r,e,t){if(!r)return t;var n;if(r.callback&&r.callback.length>1){var i=Array(r.callback.length-1).fill("");n=r.mapping.apply(r,(0,p.ev)([e],(0,p.CR)(i),!1)).join("")}else n=r.mapping(e).join("");return n||t}var xi={hexagon:function(r,e,t){var n=t/2*Math.sqrt(3);return[["M",r,e-t],["L",r+n,e-t/2],["L",r+n,e+t/2],["L",r,e+t],["L",r-n,e+t/2],["L",r-n,e-t/2],["Z"]]},bowtie:function(r,e,t){var n=t-1.5;return[["M",r-t,e-n],["L",r+t,e+n],["L",r+t,e-n],["L",r-t,e+n],["Z"]]},cross:function(r,e,t){return[["M",r-t,e-t],["L",r+t,e+t],["M",r+t,e-t],["L",r-t,e+t]]},tick:function(r,e,t){return[["M",r-t/2,e-t],["L",r+t/2,e-t],["M",r,e-t],["L",r,e+t],["M",r-t/2,e+t],["L",r+t/2,e+t]]},plus:function(r,e,t){return[["M",r-t,e],["L",r+t,e],["M",r,e-t],["L",r,e+t]]},hyphen:function(r,e,t){return[["M",r-t,e],["L",r+t,e]]},line:function(r,e,t){return[["M",r,e-t],["L",r,e+t]]}},W1=["line","cross","tick","plus","hyphen"];function Z1(r,e){return(0,c.mf)(e)?e(r):(0,c.b$)({},r,e)}function j1(r,e){var t=r.symbol;if((0,c.HD)(t)&&W1.indexOf(t)!==-1){var n=(0,c.U2)(r,"style",{}),i=(0,c.U2)(n,"lineWidth",1),a=n.stroke||n.fill||e;r.style=(0,c.b$)({},r.style,{lineWidth:i,stroke:a,fill:null})}}function Gh(r){var e=r.symbol;(0,c.HD)(e)&&xi[e]&&(r.symbol=xi[e])}function gu(r){return r.startsWith(K.LEFT)||r.startsWith(K.RIGHT)?"vertical":"horizontal"}function Hh(r,e,t,n,i){var a=t.getScale(t.type);if(a.isCategory){var o=a.field,s=e.getAttribute("color"),l=e.getAttribute("shape"),u=r.getTheme().defaultColor,f=e.coordinate.isPolar;return a.getTicks().map(function(h,v){var d,g=h.text,y=h.value,m=g,x=a.invert(y),b=r.filterFieldData(o,[(d={},d[o]=x,d)]).length===0;(0,c.S6)(r.views,function(lt){var xt;lt.filterFieldData(o,[(xt={},xt[o]=x,xt)]).length||(b=!0)});var C=du(s,x,u),A=du(l,x,"point"),B=e.getShapeMarker(A,{color:C,isInPolar:f}),rt=i;return(0,c.mf)(rt)&&(rt=rt(m,v,(0,p.pi)({name:m,value:x},(0,c.b$)({},n,B)))),B=(0,c.b$)({},n,B,Pr((0,p.pi)({},rt),["style"])),j1(B,C),rt&&rt.style&&(B.style=Z1(B.style,rt.style)),Gh(B),{id:x,name:m,value:x,marker:B,unchecked:b}})}return[]}function $1(r,e,t){return t.map(function(n,i){var a=e;(0,c.mf)(a)&&(a=a(n.name,i,(0,c.b$)({},r,n)));var o=(0,c.mf)(n.marker)?n.marker(n.name,i,(0,c.b$)({},r,n)):n.marker,s=(0,c.b$)({},r,a,o);return Gh(s),n.marker=s,n})}function Yh(r,e){var t=(0,c.U2)(r,["components","legend"],{});return(0,c.b$)({},(0,c.U2)(t,["common"],{}),(0,c.b$)({},(0,c.U2)(t,[e],{})))}function yu(r){return r?!1:r==null||isNaN(r)}function Xh(r){if((0,c.kJ)(r))return yu(r[1].y);var e=r.y;return(0,c.kJ)(e)?yu(e[0]):yu(e)}function fs(r,e,t){if(e===void 0&&(e=!1),t===void 0&&(t=!0),!r.length||r.length===1&&!t)return[];if(e){for(var n=[],i=0,a=r.length;i=r&&i<=r+t&&a>=e&&a<=e+n}function Ya(r,e){return!(e.minX>r.maxX||e.maxXr.maxY||e.maxY=0&&i<1/2*Math.PI?(s={x:o.minX,y:o.minY},l={x:o.maxX,y:o.maxY}):1/2*Math.PI<=i&&i1&&(t*=Math.sqrt(d),n*=Math.sqrt(d));var g=t*t*(v*v)+n*n*(h*h),y=g?Math.sqrt((t*t*(n*n)-g)/g):1;a===o&&(y*=-1),isNaN(y)&&(y=0);var m=n?y*t*v/n:0,x=t?y*-n*h/t:0,b=(s+u)/2+Math.cos(i)*m-Math.sin(i)*x,C=(l+f)/2+Math.sin(i)*m+Math.cos(i)*x,A=[(h-m)/t,(v-x)/n],B=[(-1*h-m)/t,(-1*v-x)/n],rt=ev([1,0],A),lt=ev(A,B);return wu(A,B)<=-1&&(lt=Math.PI),wu(A,B)>=1&&(lt=0),o===0&<>0&&(lt=lt-2*Math.PI),o===1&<<0&&(lt=lt+2*Math.PI),{cx:b,cy:C,rx:Jh(r,[u,f])?0:t,ry:Jh(r,[u,f])?0:n,startAngle:rt,endAngle:rt+lt,xRotation:i,arcFlag:a,sweepFlag:o}}var ps=Math.sin,ds=Math.cos,Su=Math.atan2,gs=Math.PI;function rv(r,e,t,n,i,a,o){var s=e.stroke,l=e.lineWidth,u=t-i,f=n-a,h=Su(f,u),v=new Iu({type:"path",canvas:r.get("canvas"),isArrowShape:!0,attrs:{path:"M"+10*ds(gs/6)+","+10*ps(gs/6)+" L0,0 L"+10*ds(gs/6)+",-"+10*ps(gs/6),stroke:s,lineWidth:l}});v.translate(i,a),v.rotateAtPoint(i,a,h),r.set(o?"startArrowShape":"endArrowShape",v)}function nv(r,e,t,n,i,a,o){var s=e.startArrow,l=e.endArrow,u=e.stroke,f=e.lineWidth,h=o?s:l,v=h.d,d=h.fill,g=h.stroke,y=h.lineWidth,m=(0,p._T)(h,["d","fill","stroke","lineWidth"]),x=t-i,b=n-a,C=Su(b,x);v&&(i=i-ds(C)*v,a=a-ps(C)*v);var A=new Iu({type:"path",canvas:r.get("canvas"),isArrowShape:!0,attrs:(0,p.pi)((0,p.pi)({},m),{stroke:g||u,lineWidth:y||f,fill:d})});A.translate(i,a),A.rotateAtPoint(i,a,C),r.set(o?"startArrowShape":"endArrowShape",A)}function Si(r,e,t,n,i){var a=Su(n-e,t-r);return{dx:ds(a)*i,dy:ps(a)*i}}function bu(r,e,t,n,i,a){typeof e.startArrow=="object"?nv(r,e,t,n,i,a,!0):e.startArrow?rv(r,e,t,n,i,a,!0):r.set("startArrowShape",null)}function Mu(r,e,t,n,i,a){typeof e.endArrow=="object"?nv(r,e,t,n,i,a,!1):e.endArrow?rv(r,e,t,n,i,a,!1):r.set("startArrowShape",null)}var iv={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function ea(r,e){var t=e.attr();for(var n in t){var i=t[n],a=iv[n]?iv[n]:n;a==="matrix"&&i?r.transform(i[0],i[1],i[3],i[4],i[6],i[7]):a==="lineDash"&&r.setLineDash?(0,c.kJ)(i)&&r.setLineDash(i):(a==="strokeStyle"||a==="fillStyle"?i=fw(r,e,i):a==="globalAlpha"&&(i=i*r.globalAlpha),r[a]=i)}}function Cu(r,e,t){for(var n=0;nB?A:B,Xt=A>B?1:A/B,ae=A>B?B/A:1;e.translate(b,C),e.rotate(xt),e.scale(Xt,ae),e.arc(0,0,Ft,rt,lt,1-kt),e.scale(1/Xt,1/ae),e.rotate(-xt),e.translate(-b,-C)}break}case"Z":e.closePath();break;default:break}if(v==="Z")s=l;else{var we=h.length;s=[h[we-2],h[we-1]]}}}}function sv(r,e){var t=r.get("canvas");t&&(e==="remove"&&(r._cacheCanvasBBox=r.get("cacheCanvasBBox")),r.get("hasChanged")||(r.set("hasChanged",!0),r.cfg.parent&&r.cfg.parent.get("hasChanged")||(t.refreshElement(r,e,t),t.get("autoDraw")&&t.draw())))}function dw(r){var e;if(r.destroyed)e=r._cacheCanvasBBox;else{var t=r.get("cacheCanvasBBox"),n=t&&!!(t.width&&t.height),i=r.getCanvasBBox(),a=i&&!!(i.width&&i.height);n&&a?e=iw(t,i):n?e=t:a&&(e=i)}return e}function gw(r){if(!r.length)return null;var e=[],t=[],n=[],i=[];return(0,c.S6)(r,function(a){var o=dw(a);o&&(e.push(o.minX),t.push(o.minY),n.push(o.maxX),i.push(o.maxY))}),{minX:(0,c.VV)(e),minY:(0,c.VV)(t),maxX:(0,c.Fp)(n),maxY:(0,c.Fp)(i)}}function yw(r,e){return!r||!e||!Ya(r,e)?null:{minX:Math.max(r.minX,e.minX),minY:Math.max(r.minY,e.minY),maxX:Math.min(r.maxX,e.maxX),maxY:Math.min(r.maxY,e.maxY)}}var mw=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onCanvasChange=function(t){sv(this,t)},e.prototype.getShapeBase=function(){return St},e.prototype.getGroupBase=function(){return e},e.prototype._applyClip=function(t,n){n&&(t.save(),ea(t,n),n.createPath(t),t.restore(),t.clip(),n._afterDraw())},e.prototype.cacheCanvasBBox=function(){var t=this.cfg.children,n=[],i=[];(0,c.S6)(t,function(v){var d=v.cfg.cacheCanvasBBox;d&&v.cfg.isInView&&(n.push(d.minX,d.maxX),i.push(d.minY,d.maxY))});var a=null;if(n.length){var o=(0,c.VV)(n),s=(0,c.Fp)(n),l=(0,c.VV)(i),u=(0,c.Fp)(i);a={minX:o,minY:l,x:o,y:l,maxX:s,maxY:u,width:s-o,height:u-l};var f=this.cfg.canvas;if(f){var h=f.getViewRange();this.set("isInView",Ya(a,h))}}else this.set("isInView",!1);this.set("cacheCanvasBBox",a)},e.prototype.draw=function(t,n){var i=this.cfg.children,a=n?this.cfg.refresh:!0;i.length&&a&&(t.save(),ea(t,this),this._applyClip(t,this.getClip()),Cu(t,i,n),t.restore(),this.cacheCanvasBBox()),this.cfg.refresh=null,this.set("hasChanged",!1)},e.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("hasChanged",!1)},e}(E.AbstractGroup),Eu=mw,xw=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,p.pi)((0,p.pi)({},t),{lineWidth:1,lineAppendWidth:0,strokeOpacity:1,fillOpacity:1})},e.prototype.getShapeBase=function(){return St},e.prototype.getGroupBase=function(){return Eu},e.prototype.onCanvasChange=function(t){sv(this,t)},e.prototype.calculateBBox=function(){var t=this.get("type"),n=this.getHitLineWidth(),i=(0,E.getBBoxMethod)(t),a=i(this),o=n/2,s=a.x-o,l=a.y-o,u=a.x+a.width+o,f=a.y+a.height+o;return{x:s,minX:s,y:l,minY:l,width:a.width+n,height:a.height+n,maxX:u,maxY:f}},e.prototype.isFill=function(){return!!this.attrs.fill||this.isClipShape()},e.prototype.isStroke=function(){return!!this.attrs.stroke},e.prototype._applyClip=function(t,n){n&&(t.save(),ea(t,n),n.createPath(t),t.restore(),t.clip(),n._afterDraw())},e.prototype.draw=function(t,n){var i=this.cfg.clipShape;if(n){if(this.cfg.refresh===!1){this.set("hasChanged",!1);return}var a=this.getCanvasBBox();if(!Ya(n,a)){this.set("hasChanged",!1),this.cfg.isInView&&this._afterDraw();return}}t.save(),ea(t,this),this._applyClip(t,i),this.drawPath(t),t.restore(),this._afterDraw()},e.prototype.getCanvasViewBox=function(){var t=this.cfg.canvas;return t?t.getViewRange():null},e.prototype.cacheCanvasBBox=function(){var t=this.getCanvasViewBox();if(t){var n=this.getCanvasBBox(),i=Ya(n,t);this.set("isInView",i),i?this.set("cacheCanvasBBox",n):this.set("cacheCanvasBBox",null)}},e.prototype._afterDraw=function(){this.cacheCanvasBBox(),this.set("hasChanged",!1),this.set("refresh",null)},e.prototype.skipDraw=function(){this.set("cacheCanvasBBox",null),this.set("isInView",null),this.set("hasChanged",!1)},e.prototype.drawPath=function(t){this.createPath(t),this.strokeAndFill(t),this.afterDrawPath(t)},e.prototype.fill=function(t){t.fill()},e.prototype.stroke=function(t){t.stroke()},e.prototype.strokeAndFill=function(t){var n=this.attrs,i=n.lineWidth,a=n.opacity,o=n.strokeOpacity,s=n.fillOpacity;this.isFill()&&(!(0,c.UM)(s)&&s!==1?(t.globalAlpha=s,this.fill(t),t.globalAlpha=a):this.fill(t)),this.isStroke()&&i>0&&(!(0,c.UM)(o)&&o!==1&&(t.globalAlpha=o),this.stroke(t)),this.afterDrawPath(t)},e.prototype.createPath=function(t){},e.prototype.afterDrawPath=function(t){},e.prototype.isInShape=function(t,n){var i=this.isStroke(),a=this.isFill(),o=this.getHitLineWidth();return this.isInStrokeOrPath(t,n,i,a,o)},e.prototype.isInStrokeOrPath=function(t,n,i,a,o){return!1},e.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},e}(E.AbstractShape),nn=xw,ww=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,p.pi)((0,p.pi)({},t),{x:0,y:0,r:0})},e.prototype.isInStrokeOrPath=function(t,n,i,a,o){var s=this.attr(),l=s.x,u=s.y,f=s.r,h=o/2,v=Kh(l,u,t,n);return a&&i?v<=f+h:a?v<=f:i?v>=f-h&&v<=f+h:!1},e.prototype.createPath=function(t){var n=this.attr(),i=n.x,a=n.y,o=n.r;t.beginPath(),t.arc(i,a,o,0,Math.PI*2,!1),t.closePath()},e}(nn),Sw=ww;function ys(r,e,t,n){return r/(t*t)+e/(n*n)}var bw=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,p.pi)((0,p.pi)({},t),{x:0,y:0,rx:0,ry:0})},e.prototype.isInStrokeOrPath=function(t,n,i,a,o){var s=this.attr(),l=o/2,u=s.x,f=s.y,h=s.rx,v=s.ry,d=(t-u)*(t-u),g=(n-f)*(n-f);return a&&i?ys(d,g,h+l,v+l)<=1:a?ys(d,g,h,v)<=1:i?ys(d,g,h-l,v-l)>=1&&ys(d,g,h+l,v+l)<=1:!1},e.prototype.createPath=function(t){var n=this.attr(),i=n.x,a=n.y,o=n.rx,s=n.ry;if(t.beginPath(),t.ellipse)t.ellipse(i,a,o,s,0,0,Math.PI*2,!1);else{var l=o>s?o:s,u=o>s?1:o/s,f=o>s?s/o:1;t.save(),t.translate(i,a),t.scale(u,f),t.arc(0,0,l,0,Math.PI*2),t.restore(),t.closePath()}},e}(nn),Mw=bw;function lv(r){return r instanceof HTMLElement&&(0,c.HD)(r.nodeName)&&r.nodeName.toUpperCase()==="CANVAS"}var Cw=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,p.pi)((0,p.pi)({},t),{x:0,y:0,width:0,height:0})},e.prototype.initAttrs=function(t){this._setImage(t.img)},e.prototype.isStroke=function(){return!1},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._afterLoading=function(){if(this.get("toDraw")===!0){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},e.prototype._setImage=function(t){var n=this,i=this.attrs;if((0,c.HD)(t)){var a=new Image;a.onload=function(){if(n.destroyed)return!1;n.attr("img",a),n.set("loading",!1),n._afterLoading();var o=n.get("callback");o&&o.call(n)},a.crossOrigin="Anonymous",a.src=t,this.set("loading",!0)}else t instanceof Image?(i.width||(i.width=t.width),i.height||(i.height=t.height)):lv(t)&&(i.width||(i.width=Number(t.getAttribute("width"))),i.height||(i.height,Number(t.getAttribute("height"))))},e.prototype.onAttrChange=function(t,n,i){r.prototype.onAttrChange.call(this,t,n,i),t==="img"&&this._setImage(n)},e.prototype.createPath=function(t){if(this.get("loading")){this.set("toDraw",!0),this.set("context",t);return}var n=this.attr(),i=n.x,a=n.y,o=n.width,s=n.height,l=n.sx,u=n.sy,f=n.swidth,h=n.sheight,v=n.img;(v instanceof Image||lv(v))&&(!(0,c.UM)(l)&&!(0,c.UM)(u)&&!(0,c.UM)(f)&&!(0,c.UM)(h)?t.drawImage(v,l,u,f,h,i,a,o,s):t.drawImage(v,i,a,o,s))},e}(nn),Aw=Cw,Er=J(89838);function Qn(r,e,t,n,i,a,o){var s=Math.min(r,t),l=Math.max(r,t),u=Math.min(e,n),f=Math.max(e,n),h=i/2;return a>=s-h&&a<=l+h&&o>=u-h&&o<=f+h?Er.x1.pointToLine(r,e,t,n,a,o)<=i/2:!1}var Tw=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,p.pi)((0,p.pi)({},t),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.initAttrs=function(t){this.setArrow()},e.prototype.onAttrChange=function(t,n,i){r.prototype.onAttrChange.call(this,t,n,i),this.setArrow()},e.prototype.setArrow=function(){var t=this.attr(),n=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.startArrow,l=t.endArrow;s&&bu(this,t,a,o,n,i),l&&Mu(this,t,n,i,a,o)},e.prototype.isInStrokeOrPath=function(t,n,i,a,o){if(!i||!o)return!1;var s=this.attr(),l=s.x1,u=s.y1,f=s.x2,h=s.y2;return Qn(l,u,f,h,o,t,n)},e.prototype.createPath=function(t){var n=this.attr(),i=n.x1,a=n.y1,o=n.x2,s=n.y2,l=n.startArrow,u=n.endArrow,f={dx:0,dy:0},h={dx:0,dy:0};l&&l.d&&(f=Si(i,a,o,s,n.startArrow.d)),u&&u.d&&(h=Si(i,a,o,s,n.endArrow.d)),t.beginPath(),t.moveTo(i+f.dx,a+f.dy),t.lineTo(o-h.dx,s-h.dy)},e.prototype.afterDrawPath=function(t){var n=this.get("startArrowShape"),i=this.get("endArrowShape");n&&n.draw(t),i&&i.draw(t)},e.prototype.getTotalLength=function(){var t=this.attr(),n=t.x1,i=t.y1,a=t.x2,o=t.y2;return Er.x1.length(n,i,a,o)},e.prototype.getPoint=function(t){var n=this.attr(),i=n.x1,a=n.y1,o=n.x2,s=n.y2;return Er.x1.pointAt(i,a,o,s,t)},e}(nn),Ew=Tw,Fw={circle:function(r,e,t){return[["M",r-t,e],["A",t,t,0,1,0,r+t,e],["A",t,t,0,1,0,r-t,e]]},square:function(r,e,t){return[["M",r-t,e-t],["L",r+t,e-t],["L",r+t,e+t],["L",r-t,e+t],["Z"]]},diamond:function(r,e,t){return[["M",r-t,e],["L",r,e-t],["L",r+t,e],["L",r,e+t],["Z"]]},triangle:function(r,e,t){var n=t*Math.sin(1/3*Math.PI);return[["M",r-t,e+n],["L",r,e-n],["L",r+t,e+n],["Z"]]},"triangle-down":function(r,e,t){var n=t*Math.sin(1/3*Math.PI);return[["M",r-t,e-n],["L",r+t,e-n],["L",r,e+n],["Z"]]}},Iw=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.initAttrs=function(t){this._resetParamsCache()},e.prototype._resetParamsCache=function(){this.set("paramsCache",{})},e.prototype.onAttrChange=function(t,n,i){r.prototype.onAttrChange.call(this,t,n,i),["symbol","x","y","r","radius"].indexOf(t)!==-1&&this._resetParamsCache()},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._getR=function(t){return(0,c.UM)(t.r)?t.radius:t.r},e.prototype._getPath=function(){var t=this.attr(),n=t.x,i=t.y,a=t.symbol||"circle",o=this._getR(t),s,l;if((0,c.mf)(a))s=a,l=s(n,i,o),l=(0,gi.wb)(l);else{if(s=e.Symbols[a],!s)return console.warn(a+" marker is not supported."),null;l=s(n,i,o)}return l},e.prototype.createPath=function(t){var n=this._getPath(),i=this.get("paramsCache");ov(this,t,{path:n},i)},e.Symbols=Fw,e}(nn),Lw=Iw;function uv(r,e,t){var n=(0,E.getOffScreenContext)();return r.createPath(n),n.isPointInPath(e,t)}var Dw=1e-6;function Fu(r){return Math.abs(r)0!=Fu(s[1]-t)>0&&Fu(e-(t-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(n=!n)}return n}function Xa(r,e,t,n,i,a,o,s){var l=(Math.atan2(s-e,o-r)+Math.PI*2)%(Math.PI*2);if(li)return!1;var u={x:r+t*Math.cos(l),y:e+t*Math.sin(l)};return Kh(u.x,u.y,o,s)<=a/2}var Ow=Qe.vs;function kw(r){for(var e=!1,t=r.length,n=0;nC?b:C,kt=b>C?1:b/C,Ft=b>C?C/b:1,Xt=Ow(null,[["t",-m,-x],["r",-rt],["s",1/kt,1/Ft]]);Ca(lt,lt,Xt),a=Xa(0,0,xt,A,B,e,lt[0],lt[1]);break;default:break}if(a)break}}return a}function Bw(r){for(var e=r.length,t=[],n=[],i=[],a=0;a0&&n.push(i),{polygons:t,polylines:n}}var ms=(0,p.pi)({hasArc:kw,extractPolygons:Bw,isPointInStroke:_w},E.PathUtil);function fv(r,e,t){for(var n=!1,i=0;i=f[0]&&t<=f[1]&&(i=(t-f[0])/(f[1]-f[0]),a=h)});var s=o[a];if((0,c.UM)(s)||(0,c.UM)(a))return null;var l=s.length,u=o[a+1];return Er.Ll.pointAt(s[l-2],s[l-1],u[1],u[2],u[3],u[4],u[5],u[6],i)},e.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",ms.pathToCurve(t))},e.prototype._setTcache=function(){var t=0,n=0,i=[],a,o,s,l,u=this.get("curve");if(!!u){if((0,c.S6)(u,function(f,h){s=u[h+1],l=f.length,s&&(t+=Er.Ll.length(f[l-2],f[l-1],s[1],s[2],s[3],s[4],s[5],s[6])||0)}),this.set("totalLength",t),t===0){this.set("tCache",[]);return}(0,c.S6)(u,function(f,h){s=u[h+1],l=f.length,s&&(a=[],a[0]=n/t,o=Er.Ll.length(f[l-2],f[l-1],s[1],s[2],s[3],s[4],s[5],s[6]),n+=o||0,a[1]=n/t,i.push(a))}),this.set("tCache",i)}},e.prototype.getStartTangent=function(){var t=this.getSegments(),n;if(t.length>1){var i=t[0].currentPoint,a=t[1].currentPoint,o=t[1].startTangent;n=[],o?(n.push([i[0]-o[0],i[1]-o[1]]),n.push([i[0],i[1]])):(n.push([a[0],a[1]]),n.push([i[0],i[1]]))}return n},e.prototype.getEndTangent=function(){var t=this.getSegments(),n=t.length,i;if(n>1){var a=t[n-2].currentPoint,o=t[n-1].currentPoint,s=t[n-1].endTangent;i=[],s?(i.push([o[0]-s[0],o[1]-s[1]]),i.push([o[0],o[1]])):(i.push([a[0],a[1]]),i.push([o[0],o[1]]))}return i},e}(nn),Iu=Rw;function hv(r,e,t,n,i){var a=r.length;if(a<2)return!1;for(var o=0;o=s[0]&&t<=s[1]&&(a=(t-s[0])/(s[1]-s[0]),o=l)}),Er.x1.pointAt(n[o][0],n[o][1],n[o+1][0],n[o+1][1],a)},e.prototype._setTcache=function(){var t=this.attr().points;if(!(!t||t.length===0)){var n=this.getTotalLength();if(!(n<=0)){var i=0,a=[],o,s;(0,c.S6)(t,function(l,u){t[u+1]&&(o=[],o[0]=i/n,s=Er.x1.length(l[0],l[1],t[u+1][0],t[u+1][1]),i+=s,o[1]=i/n,a.push(o))}),this.set("tCache",a)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,n=[];return n.push([t[1][0],t[1][1]]),n.push([t[0][0],t[0][1]]),n},e.prototype.getEndTangent=function(){var t=this.attr().points,n=t.length-1,i=[];return i.push([t[n-1][0],t[n-1][1]]),i.push([t[n][0],t[n][1]]),i},e}(nn),Vw=Uw;function Gw(r,e,t,n,i,a,o){var s=i/2;return wi(r-s,e-s,t,i,a,o)||wi(r+t-s,e-s,i,n,a,o)||wi(r+s,e+n-s,t,i,a,o)||wi(r-s,e+s,i,n,a,o)}function Hw(r,e,t,n,i,a,o,s){var l=a/2;return Qn(r+i,e,r+t-i,e,a,o,s)||Qn(r+t,e+i,r+t,e+n-i,a,o,s)||Qn(r+t-i,e+n,r+i,e+n,a,o,s)||Qn(r,e+n-i,r,e+i,a,o,s)||Xa(r+t-i,e+i,i,1.5*Math.PI,2*Math.PI,a,o,s)||Xa(r+t-i,e+n-i,i,0,.5*Math.PI,a,o,s)||Xa(r+i,e+n-i,i,.5*Math.PI,Math.PI,a,o,s)||Xa(r+i,e+i,i,Math.PI,1.5*Math.PI,a,o,s)}var Yw=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,p.pi)((0,p.pi)({},t),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.isInStrokeOrPath=function(t,n,i,a,o){var s=this.attr(),l=s.x,u=s.y,f=s.width,h=s.height,v=s.radius;if(v){var g=!1;return i&&(g=Hw(l,u,f,h,v,o,t,n)),!g&&a&&(g=uv(this,t,n)),g}else{var d=o/2;if(a&&i)return wi(l-d,u-d,f+d,h+d,t,n);if(a)return wi(l,u,f,h,t,n);if(i)return Gw(l,u,f,h,o,t,n)}},e.prototype.createPath=function(t){var n=this.attr(),i=n.x,a=n.y,o=n.width,s=n.height,l=n.radius;if(t.beginPath(),l===0)t.rect(i,a,o,s);else{var u=hw(l),f=u[0],h=u[1],v=u[2],d=u[3];t.moveTo(i+f,a),t.lineTo(i+o-h,a),h!==0&&t.arc(i+o-h,a+h,h,-Math.PI/2,0),t.lineTo(i+o,a+s-v),v!==0&&t.arc(i+o-v,a+s-v,v,0,Math.PI/2),t.lineTo(i+d,a+s),d!==0&&t.arc(i+d,a+s-d,d,Math.PI/2,Math.PI),t.lineTo(i,a+f),f!==0&&t.arc(i+f,a+f,f,Math.PI,Math.PI*1.5),t.closePath()}},e}(nn),Xw=Yw,Ww=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,p.pi)((0,p.pi)({},t),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.isOnlyHitBox=function(){return!0},e.prototype.initAttrs=function(t){this._assembleFont(),t.text&&this._setText(t.text)},e.prototype._assembleFont=function(){var t=this.attrs;t.font=(0,E.assembleFont)(t)},e.prototype._setText=function(t){var n=null;(0,c.HD)(t)&&t.indexOf(` `)!==-1&&(n=t.split(` `)),this.set("textArr",n)},e.prototype.onAttrChange=function(t,n,i){r.prototype.onAttrChange.call(this,t,n,i),t.startsWith("font")&&this._assembleFont(),t==="text"&&this._setText(n)},e.prototype._getSpaceingY=function(){var t=this.attrs,n=t.lineHeight,i=t.fontSize*1;return n?n-i:i*.14},e.prototype._drawTextArr=function(t,n,i){var a=this.attrs,o=a.textBaseline,s=a.x,l=a.y,u=a.fontSize*1,f=this._getSpaceingY(),h=(0,E.getTextHeight)(a.text,a.fontSize,a.lineHeight),v;(0,c.S6)(n,function(d,g){v=l+g*(f+u)-h+u,o==="middle"&&(v+=h-u-(h-u)/2),o==="top"&&(v+=h-u),(0,c.UM)(d)||(i?t.fillText(d,s,v):t.strokeText(d,s,v))})},e.prototype._drawText=function(t,n){var i=this.attr(),a=i.x,o=i.y,s=this.get("textArr");if(s)this._drawTextArr(t,s,n);else{var l=i.text;(0,c.UM)(l)||(n?t.fillText(l,a,o):t.strokeText(l,a,o))}},e.prototype.strokeAndFill=function(t){var n=this.attrs,i=n.lineWidth,a=n.opacity,o=n.strokeOpacity,s=n.fillOpacity;this.isStroke()&&i>0&&(!(0,c.UM)(o)&&o!==1&&(t.globalAlpha=a),this.stroke(t)),this.isFill()&&(!(0,c.UM)(s)&&s!==1?(t.globalAlpha=s,this.fill(t),t.globalAlpha=a):this.fill(t)),this.afterDrawPath(t)},e.prototype.fill=function(t){this._drawText(t,!0)},e.prototype.stroke=function(t){this._drawText(t,!1)},e}(nn),Zw=Ww;function jw(r,e){if(e){var t=(0,E.invert)(e);return(0,E.multiplyVec2)(t,r)}return r}function vv(r,e,t){var n=r.getTotalMatrix();if(n){var i=jw([e,t,1],n),a=i[0],o=i[1];return[a,o]}return[e,t]}function pv(r,e,t){if(r.isCanvas&&r.isCanvas())return!0;if(!(0,E.isAllowCapture)(r)||r.cfg.isInView===!1)return!1;if(r.cfg.clipShape){var n=vv(r,e,t),i=n[0],a=n[1];if(r.isClipped(i,a))return!1}var o=r.cfg.cacheCanvasBBox||r.getCanvasBBox();return e>=o.minX&&e<=o.maxX&&t>=o.minY&&t<=o.maxY}function dv(r,e,t){if(!pv(r,e,t))return null;for(var n=null,i=r.getChildren(),a=i.length,o=a-1;o>=0;o--){var s=i[o];if(s.isGroup())n=dv(s,e,t);else if(pv(s,e,t)){var l=s,u=vv(s,e,t),f=u[0],h=u[1];l.isInShape(f,h)&&(n=s)}if(n)break}return n}var $w=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getDefaultCfg=function(){var t=r.prototype.getDefaultCfg.call(this);return t.renderer="canvas",t.autoDraw=!0,t.localRefresh=!0,t.refreshElements=[],t.clipView=!0,t.quickHit=!1,t},e.prototype.onCanvasChange=function(t){(t==="attr"||t==="sort"||t==="changeSize")&&(this.set("refreshElements",[this]),this.draw())},e.prototype.getShapeBase=function(){return St},e.prototype.getGroupBase=function(){return Eu},e.prototype.getPixelRatio=function(){var t=this.get("pixelRatio")||nw();return t>=1?Math.ceil(t):1},e.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.cfg.width,maxY:this.cfg.height}},e.prototype.createDom=function(){var t=document.createElement("canvas"),n=t.getContext("2d");return this.set("context",n),t},e.prototype.setDOMSize=function(t,n){r.prototype.setDOMSize.call(this,t,n);var i=this.get("context"),a=this.get("el"),o=this.getPixelRatio();a.width=o*t,a.height=o*n,o>1&&i.scale(o,o)},e.prototype.clear=function(){r.prototype.clear.call(this),this._clearFrame();var t=this.get("context"),n=this.get("el");t.clearRect(0,0,n.width,n.height)},e.prototype.getShape=function(t,n){var i;return this.get("quickHit")?i=dv(this,t,n):i=r.prototype.getShape.call(this,t,n,null),i},e.prototype._getRefreshRegion=function(){var t=this.get("refreshElements"),n=this.getViewRange(),i;if(t.length&&t[0]===this)i=n;else if(i=gw(t),i){i.minX=Math.floor(i.minX),i.minY=Math.floor(i.minY),i.maxX=Math.ceil(i.maxX),i.maxY=Math.ceil(i.maxY),i.maxY+=1;var a=this.get("clipView");a&&(i=yw(i,n))}return i},e.prototype.refreshElement=function(t){var n=this.get("refreshElements");n.push(t)},e.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&((0,c.VS)(t),this.set("drawFrame",null),this.set("refreshElements",[]))},e.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},e.prototype._drawAll=function(){var t=this.get("context"),n=this.get("el"),i=this.getChildren();t.clearRect(0,0,n.width,n.height),ea(t,this),Cu(t,i),this.set("refreshElements",[])},e.prototype._drawRegion=function(){var t=this.get("context"),n=this.get("refreshElements"),i=this.getChildren(),a=this._getRefreshRegion();a?(t.clearRect(a.minX,a.minY,a.maxX-a.minX,a.maxY-a.minY),t.save(),t.beginPath(),t.rect(a.minX,a.minY,a.maxX-a.minX,a.maxY-a.minY),t.clip(),ea(t,this),vw(this,i,a),Cu(t,i,a),t.restore()):n.length&&av(n),(0,c.S6)(n,function(o){o.get("hasChanged")&&o.set("hasChanged",!1)}),this.set("refreshElements",[])},e.prototype._startDraw=function(){var t=this,n=this.get("drawFrame");n||(n=(0,c.U7)(function(){t.get("localRefresh")?t._drawRegion():t._drawAll(),t.set("drawFrame",null)}),this.set("drawFrame",n))},e.prototype.skipDraw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.width=0,t.height=0,t.parentNode.removeChild(t)},e}(E.AbstractCanvas),qw=$w,Kw="0.5.12",Lu={rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polyline:"polyline",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject"},Xe={opacity:"opacity",fillStyle:"fill",fill:"fill",fillOpacity:"fill-opacity",strokeStyle:"stroke",strokeOpacity:"stroke-opacity",stroke:"stroke",x:"x",y:"y",r:"r",rx:"rx",ry:"ry",width:"width",height:"height",x1:"x1",x2:"x2",y1:"y1",y2:"y2",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",startArrow:"marker-start",endArrow:"marker-end",path:"d",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio"},I_=null;function jr(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function gv(r){var e=Lu[r.type],t=r.getParent();if(!e)throw new Error("the type "+r.type+" is not supported by svg");var n=jr(e);if(r.get("id")&&(n.id=r.get("id")),r.set("el",n),r.set("attrs",{}),t){var i=t.get("el");i||(i=t.createDom(),t.set("el",i)),i.appendChild(n)}return n}function yv(r,e){var t=r.get("el"),n=(0,c.qo)(t.children).sort(e),i=document.createDocumentFragment();n.forEach(function(a){i.appendChild(a)}),t.appendChild(i)}function Jw(r,e){var t=r.parentNode,n=Array.from(t.childNodes).filter(function(s){return s.nodeType===1&&s.nodeName.toLowerCase()!=="defs"}),i=n[e],a=n.indexOf(r);if(i){if(a>e)t.insertBefore(r,i);else if(a0&&(n?"stroke"in i?this._setColor(t,"stroke",s):"strokeStyle"in i&&this._setColor(t,"stroke",l):this._setColor(t,"stroke",s||l),f&&v.setAttribute(Xe.strokeOpacity,f),h&&v.setAttribute(Xe.lineWidth,h))},e.prototype._setColor=function(t,n,i){var a=this.get("el");if(!i){a.setAttribute(Xe[n],"none");return}if(i=i.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(i)){var o=t.find("gradient",i);o||(o=t.addGradient(i)),a.setAttribute(Xe[n],"url(#"+o+")")}else if(/^[p,P]{1}[\s]*\(/.test(i)){var o=t.find("pattern",i);o||(o=t.addPattern(i)),a.setAttribute(Xe[n],"url(#"+o+")")}else a.setAttribute(Xe[n],i)},e.prototype.shadow=function(t,n){var i=this.attr(),a=n||i,o=a.shadowOffsetX,s=a.shadowOffsetY,l=a.shadowBlur,u=a.shadowColor;(o||s||l||u)&&Qw(this,t)},e.prototype.transform=function(t){var n=this.attr(),i=(t||n).matrix;i&&Wa(this)},e.prototype.isInShape=function(t,n){return this.isPointInPath(t,n)},e.prototype.isPointInPath=function(t,n){var i=this.get("el"),a=this.get("canvas"),o=a.get("el").getBoundingClientRect(),s=t+o.left,l=n+o.top,u=document.elementFromPoint(s,l);return!!(u&&u.isEqualNode(i))},e.prototype.getHitLineWidth=function(){var t=this.attrs,n=t.lineWidth,i=t.lineAppendWidth;return this.isStroke()?n+i:0},e}(E.AbstractShape),$r=eS,rS=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="circle",t.canFill=!0,t.canStroke=!0,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,p.pi)((0,p.pi)({},t),{x:0,y:0,r:0})},e.prototype.createPath=function(t,n){var i=this.attr(),a=this.get("el");(0,c.S6)(n||i,function(o,s){s==="x"||s==="y"?a.setAttribute("c"+s,o):Xe[s]&&a.setAttribute(Xe[s],o)})},e}($r),nS=rS,iS=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dom",t.canFill=!1,t.canStroke=!1,t}return e.prototype.createPath=function(t,n){var i=this.attr(),a=this.get("el");if((0,c.S6)(n||i,function(u,f){Xe[f]&&a.setAttribute(Xe[f],u)}),typeof i.html=="function"){var o=i.html.call(this,i);if(o instanceof Element||o instanceof HTMLDocument){for(var s=a.childNodes,l=s.length-1;l>=0;l--)a.removeChild(s[l]);a.appendChild(o)}else a.innerHTML=o}else a.innerHTML=i.html},e}($r),aS=iS,oS=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="ellipse",t.canFill=!0,t.canStroke=!0,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,p.pi)((0,p.pi)({},t),{x:0,y:0,rx:0,ry:0})},e.prototype.createPath=function(t,n){var i=this.attr(),a=this.get("el");(0,c.S6)(n||i,function(o,s){s==="x"||s==="y"?a.setAttribute("c"+s,o):Xe[s]&&a.setAttribute(Xe[s],o)})},e}($r),sS=oS,lS=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="image",t.canFill=!1,t.canStroke=!1,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,p.pi)((0,p.pi)({},t),{x:0,y:0,width:0,height:0})},e.prototype.createPath=function(t,n){var i=this,a=this.attr(),o=this.get("el");(0,c.S6)(n||a,function(s,l){l==="img"?i._setImage(a.img):Xe[l]&&o.setAttribute(Xe[l],s)})},e.prototype.setAttr=function(t,n){this.attrs[t]=n,t==="img"&&this._setImage(n)},e.prototype._setImage=function(t){var n=this.attr(),i=this.get("el");if((0,c.HD)(t))i.setAttribute("href",t);else if(t instanceof window.Image)n.width||(i.setAttribute("width",t.width),this.attr("width",t.width)),n.height||(i.setAttribute("height",t.height),this.attr("height",t.height)),i.setAttribute("href",t.src);else if(t instanceof HTMLElement&&(0,c.HD)(t.nodeName)&&t.nodeName.toUpperCase()==="CANVAS")i.setAttribute("href",t.toDataURL());else if(t instanceof ImageData){var a=document.createElement("canvas");a.setAttribute("width",""+t.width),a.setAttribute("height",""+t.height),a.getContext("2d").putImageData(t,0,0),n.width||(i.setAttribute("width",""+t.width),this.attr("width",t.width)),n.height||(i.setAttribute("height",""+t.height),this.attr("height",t.height)),i.setAttribute("href",a.toDataURL())}},e}($r),uS=lS,cS=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="line",t.canFill=!1,t.canStroke=!0,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,p.pi)((0,p.pi)({},t),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.createPath=function(t,n){var i=this.attr(),a=this.get("el");(0,c.S6)(n||i,function(o,s){if(s==="startArrow"||s==="endArrow")if(o){var l=(0,c.Kn)(o)?t.addArrow(i,Xe[s]):t.getDefaultArrow(i,Xe[s]);a.setAttribute(Xe[s],"url(#"+l+")")}else a.removeAttribute(Xe[s]);else Xe[s]&&a.setAttribute(Xe[s],o)})},e.prototype.getTotalLength=function(){var t=this.attr(),n=t.x1,i=t.y1,a=t.x2,o=t.y2;return Er.x1.length(n,i,a,o)},e.prototype.getPoint=function(t){var n=this.attr(),i=n.x1,a=n.y1,o=n.x2,s=n.y2;return Er.x1.pointAt(i,a,o,s,t)},e}($r),fS=cS,xs={circle:function(r,e,t){return[["M",r,e],["m",-t,0],["a",t,t,0,1,0,t*2,0],["a",t,t,0,1,0,-t*2,0]]},square:function(r,e,t){return[["M",r-t,e-t],["L",r+t,e-t],["L",r+t,e+t],["L",r-t,e+t],["Z"]]},diamond:function(r,e,t){return[["M",r-t,e],["L",r,e-t],["L",r+t,e],["L",r,e+t],["Z"]]},triangle:function(r,e,t){var n=t*Math.sin(1/3*Math.PI);return[["M",r-t,e+n],["L",r,e-n],["L",r+t,e+n],["z"]]},triangleDown:function(r,e,t){var n=t*Math.sin(1/3*Math.PI);return[["M",r-t,e-n],["L",r+t,e-n],["L",r,e+n],["Z"]]}},wv={get:function(r){return xs[r]},register:function(r,e){xs[r]=e},remove:function(r){delete xs[r]},getAll:function(){return xs}},hS=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="marker",t.canFill=!0,t.canStroke=!0,t}return e.prototype.createPath=function(t){var n=this.get("el");n.setAttribute("d",this._assembleMarker())},e.prototype._assembleMarker=function(){var t=this._getPath();return(0,c.kJ)(t)?t.map(function(n){return n.join(" ")}).join(""):t},e.prototype._getPath=function(){var t=this.attr(),n=t.x,i=t.y,a=t.r||t.radius,o=t.symbol||"circle",s;return(0,c.mf)(o)?s=o:s=wv.get(o),s?s(n,i,a):(console.warn(s+" symbol is not exist."),null)},e.symbolsFactory=wv,e}($r),vS=hS,pS=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="path",t.canFill=!0,t.canStroke=!0,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,p.pi)((0,p.pi)({},t),{startArrow:!1,endArrow:!1})},e.prototype.createPath=function(t,n){var i=this,a=this.attr(),o=this.get("el");(0,c.S6)(n||a,function(s,l){if(l==="path"&&(0,c.kJ)(s))o.setAttribute("d",i._formatPath(s));else if(l==="startArrow"||l==="endArrow")if(s){var u=(0,c.Kn)(s)?t.addArrow(a,Xe[l]):t.getDefaultArrow(a,Xe[l]);o.setAttribute(Xe[l],"url(#"+u+")")}else o.removeAttribute(Xe[l]);else Xe[l]&&o.setAttribute(Xe[l],s)})},e.prototype._formatPath=function(t){var n=t.map(function(i){return i.join(" ")}).join("");return~n.indexOf("NaN")?"":n},e.prototype.getTotalLength=function(){var t=this.get("el");return t?t.getTotalLength():null},e.prototype.getPoint=function(t){var n=this.get("el"),i=this.getTotalLength();if(i===0)return null;var a=n?n.getPointAtLength(t*i):null;return a?{x:a.x,y:a.y}:null},e}($r),dS=pS,gS=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="polygon",t.canFill=!0,t.canStroke=!0,t}return e.prototype.createPath=function(t,n){var i=this.attr(),a=this.get("el");(0,c.S6)(n||i,function(o,s){s==="points"&&(0,c.kJ)(o)&&o.length>=2?a.setAttribute("points",o.map(function(l){return l[0]+","+l[1]}).join(" ")):Xe[s]&&a.setAttribute(Xe[s],o)})},e}($r),yS=gS,mS=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="polyline",t.canFill=!0,t.canStroke=!0,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,p.pi)((0,p.pi)({},t),{startArrow:!1,endArrow:!1})},e.prototype.onAttrChange=function(t,n,i){r.prototype.onAttrChange.call(this,t,n,i),["points"].indexOf(t)!==-1&&this._resetCache()},e.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},e.prototype.createPath=function(t,n){var i=this.attr(),a=this.get("el");(0,c.S6)(n||i,function(o,s){s==="points"&&(0,c.kJ)(o)&&o.length>=2?a.setAttribute("points",o.map(function(l){return l[0]+","+l[1]}).join(" ")):Xe[s]&&a.setAttribute(Xe[s],o)})},e.prototype.getTotalLength=function(){var t=this.attr().points,n=this.get("totalLength");return(0,c.UM)(n)?(this.set("totalLength",Er.aH.length(t)),this.get("totalLength")):n},e.prototype.getPoint=function(t){var n=this.attr().points,i=this.get("tCache");i||(this._setTcache(),i=this.get("tCache"));var a,o;return(0,c.S6)(i,function(s,l){t>=s[0]&&t<=s[1]&&(a=(t-s[0])/(s[1]-s[0]),o=l)}),Er.x1.pointAt(n[o][0],n[o][1],n[o+1][0],n[o+1][1],a)},e.prototype._setTcache=function(){var t=this.attr().points;if(!(!t||t.length===0)){var n=this.getTotalLength();if(!(n<=0)){var i=0,a=[],o,s;(0,c.S6)(t,function(l,u){t[u+1]&&(o=[],o[0]=i/n,s=Er.x1.length(l[0],l[1],t[u+1][0],t[u+1][1]),i+=s,o[1]=i/n,a.push(o))}),this.set("tCache",a)}}},e.prototype.getStartTangent=function(){var t=this.attr().points,n=[];return n.push([t[1][0],t[1][1]]),n.push([t[0][0],t[0][1]]),n},e.prototype.getEndTangent=function(){var t=this.attr().points,n=t.length-1,i=[];return i.push([t[n-1][0],t[n-1][1]]),i.push([t[n][0],t[n][1]]),i},e}($r),xS=mS,wS=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,SS=/[^\s,]+/gi;function bS(r){var e=0,t=0,n=0,i=0;return(0,c.kJ)(r)?r.length===1?e=t=n=i=r[0]:r.length===2?(e=n=r[0],t=i=r[1]):r.length===3?(e=r[0],t=i=r[1],n=r[2]):(e=r[0],t=r[1],n=r[2],i=r[3]):e=t=n=i=r,{r1:e,r2:t,r3:n,r4:i}}function L_(r){if(r=r||[],isArray(r))return r;if(isString(r))return r=r.match(wS),each(r,function(e,t){if(e=e.match(SS),e[0].length>1){var n=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=n}each(e,function(i,a){isNaN(i)||(e[a]=+i)}),r[t]=e}),r}var MS=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="rect",t.canFill=!0,t.canStroke=!0,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,p.pi)((0,p.pi)({},t),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.createPath=function(t,n){var i=this,a=this.attr(),o=this.get("el"),s=!1,l=["x","y","width","height","radius"];(0,c.S6)(n||a,function(u,f){l.indexOf(f)!==-1&&!s?(o.setAttribute("d",i._assembleRect(a)),s=!0):l.indexOf(f)===-1&&Xe[f]&&o.setAttribute(Xe[f],u)})},e.prototype._assembleRect=function(t){var n=t.x,i=t.y,a=t.width,o=t.height,s=t.radius;if(!s)return"M "+n+","+i+" l "+a+",0 l 0,"+o+" l"+-a+" 0 z";var l=bS(s);(0,c.kJ)(s)?s.length===1?l.r1=l.r2=l.r3=l.r4=s[0]:s.length===2?(l.r1=l.r3=s[0],l.r2=l.r4=s[1]):s.length===3?(l.r1=s[0],l.r2=l.r4=s[1],l.r3=s[2]):(l.r1=s[0],l.r2=s[1],l.r3=s[2],l.r4=s[3]):l.r1=l.r2=l.r3=l.r4=s;var u=[["M "+(n+l.r1)+","+i],["l "+(a-l.r1-l.r2)+",0"],["a "+l.r2+","+l.r2+",0,0,1,"+l.r2+","+l.r2],["l 0,"+(o-l.r2-l.r3)],["a "+l.r3+","+l.r3+",0,0,1,"+-l.r3+","+l.r3],["l "+(l.r3+l.r4-a)+",0"],["a "+l.r4+","+l.r4+",0,0,1,"+-l.r4+","+-l.r4],["l 0,"+(l.r4+l.r1-o)],["a "+l.r1+","+l.r1+",0,0,1,"+l.r1+","+-l.r1],["z"]];return u.join(" ")},e}($r),CS=MS,AS=J(43631),Sv=.3,TS={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},ES={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},FS={left:"left",start:"left",center:"middle",right:"end",end:"end"},IS=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="text",t.canFill=!0,t.canStroke=!0,t}return e.prototype.getDefaultAttrs=function(){var t=r.prototype.getDefaultAttrs.call(this);return(0,p.pi)((0,p.pi)({},t),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.createPath=function(t,n){var i=this,a=this.attr(),o=this.get("el");this._setFont(),(0,c.S6)(n||a,function(s,l){l==="text"?i._setText(""+s):l==="matrix"&&s?Wa(i):Xe[l]&&o.setAttribute(Xe[l],s)}),o.setAttribute("paint-order","stroke"),o.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},e.prototype._setFont=function(){var t=this.get("el"),n=this.attr(),i=n.textBaseline,a=n.textAlign,o=(0,AS.qY)();o&&o.name==="firefox"?t.setAttribute("dominant-baseline",ES[i]||"alphabetic"):t.setAttribute("alignment-baseline",TS[i]||"baseline"),t.setAttribute("text-anchor",FS[a]||"left")},e.prototype._setText=function(t){var n=this.get("el"),i=this.attr(),a=i.x,o=i.textBaseline,s=o===void 0?"bottom":o;if(!t)n.innerHTML="";else if(~t.indexOf(` `)){var l=t.split(` `),u=l.length-1,f="";(0,c.S6)(l,function(h,v){v===0?s==="alphabetic"?f+=''+h+"":s==="top"?f+=''+h+"":s==="middle"?f+=''+h+"":s==="bottom"?f+=''+h+"":s==="hanging"&&(f+=''+h+""):f+=''+h+""}),n.innerHTML=f}else n.innerHTML=t},e}($r),LS=IS,DS=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,PS=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,OS=/[\d.]+:(#[^\s]+|[^)]+\))/gi;function bv(r){var e=r.match(OS);if(!e)return"";var t="";return e.sort(function(n,i){return n=n.split(":"),i=i.split(":"),Number(n[0])-Number(i[0])}),(0,c.S6)(e,function(n){n=n.split(":"),t+=''}),t}function kS(r,e){var t=DS.exec(r),n=(0,c.wQ)((0,c.c$)(parseFloat(t[1])),Math.PI*2),i=t[2],a,o;n>=0&&n<.5*Math.PI?(a={x:0,y:0},o={x:1,y:1}):.5*Math.PI<=n&&n`;t.innerHTML=n},r}(),VS=US,GS=function(){function r(e,t){this.cfg={};var n=jr("marker"),i=(0,c.EL)("marker_");n.setAttribute("id",i);var a=jr("path");a.setAttribute("stroke",e.stroke||"none"),a.setAttribute("fill",e.fill||"none"),n.appendChild(a),n.setAttribute("overflow","visible"),n.setAttribute("orient","auto-start-reverse"),this.el=n,this.child=a,this.id=i;var o=e[t==="marker-start"?"startArrow":"endArrow"];return this.stroke=e.stroke||"#000",o===!0?this._setDefaultPath(t,a):(this.cfg=o,this._setMarker(e.lineWidth,a)),this}return r.prototype.match=function(){return!1},r.prototype._setDefaultPath=function(e,t){var n=this.el;t.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),n.setAttribute("refX",""+10*Math.cos(Math.PI/6)),n.setAttribute("refY",""+5)},r.prototype._setMarker=function(e,t){var n=this.el,i=this.cfg.path,a=this.cfg.d;(0,c.kJ)(i)&&(i=i.map(function(o){return o.join(" ")}).join("")),t.setAttribute("d",i),n.appendChild(t),a&&n.setAttribute("refX",""+a/e)},r.prototype.update=function(e){var t=this.child;t.attr?t.attr("fill",e):t.setAttribute("fill",e)},r}(),Mv=GS,HS=function(){function r(e){this.type="clip",this.cfg={};var t=jr("clipPath");this.el=t,this.id=(0,c.EL)("clip_"),t.id=this.id;var n=e.cfg.el;return t.appendChild(n),this.cfg=e,this}return r.prototype.match=function(){return!1},r.prototype.remove=function(){var e=this.el;e.parentNode.removeChild(e)},r}(),YS=HS,XS=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,WS=function(){function r(e){this.cfg={};var t=jr("pattern");t.setAttribute("patternUnits","userSpaceOnUse");var n=jr("image");t.appendChild(n);var i=(0,c.EL)("pattern_");t.id=i,this.el=t,this.id=i,this.cfg=e;var a=XS.exec(e),o=a[2];n.setAttribute("href",o);var s=new Image;o.match(/^data:/i)||(s.crossOrigin="Anonymous"),s.src=o;function l(){t.setAttribute("width",""+s.width),t.setAttribute("height",""+s.height)}return s.complete?l():(s.onload=l,s.src=s.src),this}return r.prototype.match=function(e,t){return this.cfg===t},r}(),ZS=WS,jS=function(){function r(e){var t=jr("defs"),n=(0,c.EL)("defs_");t.id=n,e.appendChild(t),this.children=[],this.defaultArrow={},this.el=t,this.canvas=e}return r.prototype.find=function(e,t){for(var n=this.children,i=null,a=0;a0&&(d[0][0]="L")),a=a.concat(d)}),a.push(["Z"])}return a}function ws(r,e,t,n,i){for(var a=ur(r,e,!e,"lineWidth"),o=r.connectNulls,s=r.isInCircle,l=r.points,u=r.showSinglePoint,f=fs(l,o,u),h=[],v=0,d=f.length;vo&&(o=l),l=n[0]}));var m=this.scales[g];try{for(var x=(0,p.XA)(t),b=x.next();!b.done;b=x.next()){var C=b.value,A=this.getDrawCfg(C),B=A.x,rt=A.y,lt=m.scale(C[Vt][g]);this.drawGrayScaleBlurredCircle(B-u.x,rt-f.y,i+a,lt,y)}}catch(Ft){o={error:Ft}}finally{try{b&&!b.done&&(s=x.return)&&s.call(x)}finally{if(o)throw o.error}}var xt=y.getImageData(0,0,h,v);this.clearShadowCanvasCtx(),this.colorize(xt),y.putImageData(xt,0,0);var kt=this.getImageShape();kt.attr("x",u.x),kt.attr("y",f.y),kt.attr("width",h),kt.attr("height",v),kt.attr("img",y.canvas),kt.set("origin",this.getShapeInfo(t))},e.prototype.getDefaultSize=function(){var t=this.getAttribute("position"),n=this.coordinate;return Math.min(n.getWidth()/(t.scales[0].ticks.length*4),n.getHeight()/(t.scales[1].ticks.length*4))},e.prototype.clearShadowCanvasCtx=function(){var t=this.getShadowCanvasCtx();t.clearRect(0,0,t.canvas.width,t.canvas.height)},e.prototype.getShadowCanvasCtx=function(){var t=this.shadowCanvas;return t||(t=document.createElement("canvas"),this.shadowCanvas=t),t.width=this.coordinate.getWidth(),t.height=this.coordinate.getHeight(),t.getContext("2d")},e.prototype.getGrayScaleBlurredCanvas=function(){return this.grayScaleBlurredCanvas||(this.grayScaleBlurredCanvas=document.createElement("canvas")),this.grayScaleBlurredCanvas},e.prototype.drawGrayScaleBlurredCircle=function(t,n,i,a,o){var s=this.getGrayScaleBlurredCanvas();o.globalAlpha=a,o.drawImage(s,t-i,n-i)},e.prototype.colorize=function(t){for(var n=this.getAttribute("color"),i=t.data,a=this.paletteCache,o=3;oe&&(t=t?e/(1+n/t):0,n=e-t),i+a>e&&(i=i?e/(1+a/i):0,a=e-i),[t||0,n||0,i||0,a||0]}function Tv(r,e,t){var n=[];if(t.isRect){var i=t.isTransposed?{x:t.start.x,y:e[0].y}:{x:e[0].x,y:t.start.y},a=t.isTransposed?{x:t.end.x,y:e[2].y}:{x:e[3].x,y:t.end.y},o=(0,c.U2)(r,["background","style","radius"]);if(o){var s=t.isTransposed?Math.abs(e[0].y-e[2].y):e[2].x-e[1].x,l=t.isTransposed?t.getWidth():t.getHeight(),u=(0,p.CR)(Av(o,Math.min(s,l)),4),f=u[0],h=u[1],v=u[2],d=u[3],g=t.isTransposed&&t.isReflect("y"),y=g?0:1,m=function(rt){return g?-rt:rt};n.push(["M",i.x,a.y+m(f)]),f!==0&&n.push(["A",f,f,0,0,y,i.x+f,a.y]),n.push(["L",a.x-h,a.y]),h!==0&&n.push(["A",h,h,0,0,y,a.x,a.y+m(h)]),n.push(["L",a.x,i.y-m(v)]),v!==0&&n.push(["A",v,v,0,0,y,a.x-v,i.y]),n.push(["L",i.x+d,i.y]),d!==0&&n.push(["A",d,d,0,0,y,i.x,i.y-m(d)])}else n.push(["M",i.x,i.y]),n.push(["L",a.x,i.y]),n.push(["L",a.x,a.y]),n.push(["L",i.x,a.y]),n.push(["L",i.x,i.y]);n.push(["z"])}if(t.isPolar){var x=t.getCenter(),b=ka(r,t),C=b.startAngle,A=b.endAngle;if(t.type!=="theta"&&!t.isTransposed)n=Wn(x.x,x.y,t.getRadius(),C,A);else{var B=function(xt){return Math.pow(xt,2)},f=Math.sqrt(B(x.x-e[0].x)+B(x.y-e[0].y)),h=Math.sqrt(B(x.x-e[2].x)+B(x.y-e[2].y));n=Wn(x.x,x.y,f,t.startAngle,t.endAngle,h)}}return n}function sb(r,e,t){var n=t.getWidth(),i=t.getHeight(),a=t.type==="rect",o=[],s=(r[2].x-r[1].x)/2,l=t.isTransposed?s*i/n:s*n/i;return e==="round"?(a?(o.push(["M",r[0].x,r[0].y+l]),o.push(["L",r[1].x,r[1].y-l]),o.push(["A",s,s,0,0,1,r[2].x,r[2].y-l]),o.push(["L",r[3].x,r[3].y+l]),o.push(["A",s,s,0,0,1,r[0].x,r[0].y+l])):(o.push(["M",r[0].x,r[0].y]),o.push(["L",r[1].x,r[1].y]),o.push(["A",s,s,0,0,1,r[2].x,r[2].y]),o.push(["L",r[3].x,r[3].y]),o.push(["A",s,s,0,0,1,r[0].x,r[0].y])),o.push(["z"])):o=ku(r),o}function Ev(r,e,t){var n=[];return(0,c.UM)(e)?t?n.push(["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["L",(r[2].x+r[3].x)/2,(r[2].y+r[3].y)/2],["Z"]):n.push(["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["L",r[2].x,r[2].y],["L",r[3].x,r[3].y],["Z"]):n.push(["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["L",e[1].x,e[1].y],["L",e[0].x,e[0].y],["Z"]),n}function ja(r,e){return[e,r]}function lb(r,e,t){var n,i,a,o,s,l,u,f=(0,p.CR)((0,p.ev)([],(0,p.CR)(r),!1),4),h=f[0],v=f[1],d=f[2],g=f[3],y=(0,p.CR)(typeof t=="number"?Array(4).fill(t):t,4),m=y[0],x=y[1],b=y[2],C=y[3];e.isTransposed&&(n=(0,p.CR)(ja(v,g),2),v=n[0],g=n[1]),e.isReflect("y")&&(i=(0,p.CR)(ja(h,v),2),h=i[0],v=i[1],a=(0,p.CR)(ja(d,g),2),d=a[0],g=a[1]),e.isReflect("x")&&(o=(0,p.CR)(ja(h,g),2),h=o[0],g=o[1],s=(0,p.CR)(ja(v,d),2),v=s[0],d=s[1]);var A=[],B=function(rt){return Math.abs(rt)};return l=(0,p.CR)(Av([m,x,b,C],Math.min(B(g.x-h.x),B(v.y-h.y))).map(function(rt){return B(rt)}),4),m=l[0],x=l[1],b=l[2],C=l[3],e.isTransposed&&(u=(0,p.CR)([C,m,x,b],4),m=u[0],x=u[1],b=u[2],C=u[3]),h.yo&&(i=o)}return i}function cb(r,e){if(e){var t=(0,c.xH)(r),n=(0,c.I)(t,e);return n.length}return r.length}function _u(r){var e=r.theme,t=r.coordinate,n=r.getXScale(),i=n.values,a=r.beforeMappingData,o=i.length,s=_a(r.coordinate),l=r.intervalPadding,u=r.dodgePadding,f=r.maxColumnWidth||e.maxColumnWidth,h=r.minColumnWidth||e.minColumnWidth,v=r.columnWidthRatio||e.columnWidthRatio,d=r.multiplePieWidthRatio||e.multiplePieWidthRatio,g=r.roseWidthRatio||e.roseWidthRatio;if(n.isLinear&&i.length>1){i.sort();var y=ub(i,n);o=(n.max-n.min)/y,i.length>o&&(o=i.length)}var m=n.range,x=1/o,b=1;if(t.isPolar?t.isTransposed&&o>1?b=d:b=g:(n.isLinear&&(x*=m[1]-m[0]),b=v),!(0,c.UM)(l)&&l>=0){var C=l/s;x=(1-(o-1)*C)/o}else x*=b;if(r.getAdjust("dodge")){var A=r.getAdjust("dodge"),B=A.dodgeBy,rt=cb(a,B);if(!(0,c.UM)(u)&&u>=0){var lt=u/s;x=(x-lt*(rt-1))/rt}else!(0,c.UM)(l)&&l>=0&&(x*=b),x=x/rt;x=x>=0?x:0}if(!(0,c.UM)(f)&&f>=0){var xt=f/s;x>xt&&(x=xt)}if(!(0,c.UM)(h)&&h>=0){var kt=h/s;x0&&!(0,c.U2)(n,[i,"min"])&&t.change({min:0}),o<=0&&!(0,c.U2)(n,[i,"max"])&&t.change({max:0}))}},e.prototype.getDrawCfg=function(t){var n=r.prototype.getDrawCfg.call(this,t);return n.background=this.background,n},e}(qn),hb=fb,vb=function(r){(0,p.ZT)(e,r);function e(t){var n=r.call(this,t)||this;n.type="line";var i=t.sortable,a=i===void 0?!1:i;return n.sortable=a,n}return e}(Pu),pb=vb,Fv=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"],db=["cross","tick","plus","hyphen","line"];function Bu(r,e,t,n,i){var a,o,s=ur(e,i,!i,"r"),l=r.parsePoints(e.points),u=l[0];if(e.isStack)u=l[1];else if(l.length>1){var f=t.addGroup();try{for(var h=(0,p.XA)(l),v=h.next();!v.done;v=h.next()){var d=v.value;f.addShape({type:"marker",attrs:(0,p.pi)((0,p.pi)((0,p.pi)({},s),{symbol:xi[n]||n}),d)})}}catch(g){a={error:g}}finally{try{v&&!v.done&&(o=h.return)&&o.call(h)}finally{if(a)throw a.error}}return f}return t.addShape({type:"marker",attrs:(0,p.pi)((0,p.pi)((0,p.pi)({},s),{symbol:xi[n]||n}),u)})}var R_=$n("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(r){return mu(r)}});(0,c.S6)(Fv,function(r){We("point","hollow-".concat(r),{draw:function(e,t){return Bu(this,e,t,r,!0)},getMarker:function(e){var t=e.color;return{symbol:xi[r]||r,style:{r:4.5,stroke:t,fill:null}}}})});var N_=null,gb=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="point",t.shapeType="point",t.generatePoints=!0,t}return e.prototype.getDrawCfg=function(t){var n=r.prototype.getDrawCfg.call(this,t);return(0,p.pi)((0,p.pi)({},n),{isStack:!!this.getAdjust("stack")})},e}(qn),yb=gb;function mb(r){for(var e=r[0],t=1,n=[["M",e.x,e.y]];t2?"weight":"normal",a;if(r.isInCircle){var o={x:0,y:1};return i==="normal"?a=Tb(n[0],n[1],o):(t.fill=t.stroke,a=Eb(n,o)),a=this.parsePath(a),e.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},t),{path:a})})}else{if(i==="normal")return n=this.parsePoints(n),a=$f((n[1].x+n[0].x)/2,n[0].y,Math.abs(n[1].x-n[0].x)/2,Math.PI,Math.PI*2),e.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},t),{path:a})});var s=Ru(n[1],n[3]),l=Ru(n[2],n[0]);return a=[["M",n[0].x,n[0].y],["L",n[1].x,n[1].y],s,["L",n[3].x,n[3].y],["L",n[2].x,n[2].y],l,["Z"]],a=this.parsePath(a),t.fill=t.stroke,e.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},t),{path:a})})}},getMarker:function(r){return{symbol:"circle",style:{r:4.5,fill:r.color}}}});function Fb(r,e){var t=Ru(r,e),n=[["M",r.x,r.y]];return n.push(t),n}We("edge","smooth",{draw:function(r,e){var t=ur(r,!0,!1,"lineWidth"),n=r.points,i=this.parsePath(Fb(n[0],n[1]));return e.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},t),{path:i})})},getMarker:function(r){return{symbol:"circle",style:{r:4.5,fill:r.color}}}});var Ss=1/3;function Ib(r,e){var t=[];t.push({x:r.x,y:r.y*(1-Ss)+e.y*Ss}),t.push({x:e.x,y:r.y*(1-Ss)+e.y*Ss}),t.push(e);var n=[["M",r.x,r.y]];return(0,c.S6)(t,function(i){n.push(["L",i.x,i.y])}),n}We("edge","vhv",{draw:function(r,e){var t=ur(r,!0,!1,"lineWidth"),n=r.points,i=this.parsePath(Ib(n[0],n[1]));return e.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},t),{path:i})})},getMarker:function(r){return{symbol:"circle",style:{r:4.5,fill:r.color}}}}),We("interval","funnel",{getPoints:function(r){return r.size=r.size*2,Ou(r)},draw:function(r,e){var t=ur(r,!1,!0),n=this.parsePath(Ev(r.points,r.nextPoints,!1)),i=e.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},t),{path:n}),name:"interval"});return i},getMarker:function(r){var e=r.color;return{symbol:"square",style:{r:4,fill:e}}}}),We("interval","hollow-rect",{draw:function(r,e){var t=ur(r,!0,!1),n=e,i=r==null?void 0:r.background;if(i){n=e.addGroup();var a=jh(r),o=Tv(r,this.parsePoints(r.points),this.coordinate);n.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},a),{path:o}),zIndex:-1,name:hu})}var s=this.parsePath(ku(r.points)),l=n.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},t),{path:s}),name:"interval"});return i?n:l},getMarker:function(r){var e=r.color,t=r.isInPolar;return t?{symbol:"circle",style:{r:4.5,stroke:e,fill:null}}:{symbol:"square",style:{r:4,stroke:e,fill:null}}}});function Lb(r){var e=r.x,t=r.y,n=r.y0;return(0,c.kJ)(t)?t.map(function(i,a){return{x:(0,c.kJ)(e)?e[a]:e,y:i}}):[{x:e,y:n},{x:e,y:t}]}We("interval","line",{getPoints:function(r){return Lb(r)},draw:function(r,e){var t=ur(r,!0,!1,"lineWidth"),n=Pr((0,p.pi)({},t),["fill"]),i=this.parsePath(ku(r.points,!1)),a=e.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},n),{path:i}),name:"interval"});return a},getMarker:function(r){var e=r.color;return{symbol:function(t,n,i){return[["M",t,n-i],["L",t,n+i]]},style:{r:5,stroke:e}}}}),We("interval","pyramid",{getPoints:function(r){return r.size=r.size*2,Ou(r)},draw:function(r,e){var t=ur(r,!1,!0),n=this.parsePath(Ev(r.points,r.nextPoints,!0)),i=e.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},t),{path:n}),name:"interval"});return i},getMarker:function(r){var e=r.color;return{symbol:"square",style:{r:4,fill:e}}}});function Db(r){var e,t=r.x,n=r.y,i=r.y0,a=r.size,o,s;(0,c.kJ)(n)?(e=(0,p.CR)(n,2),o=e[0],s=e[1]):(o=i,s=n);var l=t+a/2,u=t-a/2;return[{x:t,y:o},{x:t,y:s},{x:u,y:o},{x:l,y:o},{x:u,y:s},{x:l,y:s}]}function Pb(r){return[["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["M",r[2].x,r[2].y],["L",r[3].x,r[3].y],["M",r[4].x,r[4].y],["L",r[5].x,r[5].y]]}We("interval","tick",{getPoints:function(r){return Db(r)},draw:function(r,e){var t=ur(r,!0,!1),n=this.parsePath(Pb(r.points)),i=e.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},t),{path:n}),name:"interval"});return i},getMarker:function(r){var e=r.color;return{symbol:function(t,n,i){return[["M",t-i/2,n-i],["L",t+i/2,n-i],["M",t,n-i],["L",t,n+i],["M",t-i/2,n+i],["L",t+i/2,n+i]]},style:{r:5,stroke:e}}}});var Ob=function(r,e,t){var n=r.x,i=r.y,a=e.x,o=e.y,s;switch(t){case"hv":s=[{x:a,y:i}];break;case"vh":s=[{x:n,y:o}];break;case"hvh":var l=(a+n)/2;s=[{x:l,y:i},{x:l,y:o}];break;case"vhv":var u=(i+o)/2;s=[{x:n,y:u},{x:a,y:u}];break;default:break}return s};function kb(r,e){var t=[];return(0,c.S6)(r,function(n,i){var a=r[i+1];if(t.push(n),a){var o=Ob(n,a,e);t=t.concat(o)}}),t}function _b(r){return r.map(function(e,t){return t===0?["M",e.x,e.y]:["L",e.x,e.y]})}function Bb(r,e){var t=fs(r.points,r.connectNulls,r.showSinglePoint),n=[];return(0,c.S6)(t,function(i){var a=kb(i,e);n=n.concat(_b(a))}),(0,p.pi)((0,p.pi)({},ur(r,!0,!1,"lineWidth")),{path:n})}(0,c.S6)(["hv","vh","hvh","vhv"],function(r){We("line",r,{draw:function(e,t){var n=Bb(e,r),i=t.addShape({type:"path",attrs:n,name:"line"});return i},getMarker:function(e){return $h(e,r)}})}),(0,c.S6)(db,function(r){We("point",r,{draw:function(e,t){return Bu(this,e,t,r,!0)},getMarker:function(e){var t=e.color;return{symbol:xi[r],style:{r:4.5,stroke:t,fill:null}}}})}),We("point","image",{draw:function(r,e){var t,n,i=ur(r,!1,!1,"r").r,a=this.parsePoints(r.points),o=a[0];if(r.isStack)o=a[1];else if(a.length>1){var s=e.addGroup();try{for(var l=(0,p.XA)(a),u=l.next();!u.done;u=l.next()){var f=u.value;s.addShape("image",{attrs:{x:f.x-i/2,y:f.y-i,width:i,height:i,img:r.shape[1]}})}}catch(h){t={error:h}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(t)throw t.error}}return s}return e.addShape("image",{attrs:{x:o.x-i/2,y:o.y-i,width:i,height:i,img:r.shape[1]}})},getMarker:function(r){var e=r.color;return{symbol:"circle",style:{r:4.5,fill:e}}}}),(0,c.S6)(Fv,function(r){We("point",r,{draw:function(e,t){return Bu(this,e,t,r,!1)},getMarker:function(e){var t=e.color;return{symbol:xi[r]||r,style:{r:4.5,fill:t}}}})});function Iv(r){var e=(0,c.kJ)(r)?r:[r],t=e[0],n=e[e.length-1],i=e.length>1?e[1]:t,a=e.length>3?e[3]:n,o=e.length>2?e[2]:i;return{min:t,max:n,min1:i,max1:a,median:o}}function Lv(r,e,t){var n=t/2,i;if((0,c.kJ)(e)){var a=Iv(e),o=a.min,s=a.max,l=a.median,u=a.min1,f=a.max1,h=r-n,v=r+n;i=[[h,s],[v,s],[r,s],[r,f],[h,u],[h,f],[v,f],[v,u],[r,u],[r,o],[h,o],[v,o],[h,l],[v,l]]}else{e=(0,c.UM)(e)?.5:e;var d=Iv(r),o=d.min,s=d.max,l=d.median,u=d.min1,f=d.max1,g=e-n,y=e+n;i=[[o,g],[o,y],[o,e],[u,e],[u,g],[u,y],[f,y],[f,g],[f,e],[s,e],[s,g],[s,y],[l,g],[l,y]]}return i.map(function(m){return{x:m[0],y:m[1]}})}function Rb(r){return[["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["M",r[2].x,r[2].y],["L",r[3].x,r[3].y],["M",r[4].x,r[4].y],["L",r[5].x,r[5].y],["L",r[6].x,r[6].y],["L",r[7].x,r[7].y],["L",r[4].x,r[4].y],["Z"],["M",r[8].x,r[8].y],["L",r[9].x,r[9].y],["M",r[10].x,r[10].y],["L",r[11].x,r[11].y],["M",r[12].x,r[12].y],["L",r[13].x,r[13].y]]}We("schema","box",{getPoints:function(r){var e=r.x,t=r.y,n=r.size;return Lv(e,t,n)},draw:function(r,e){var t=ur(r,!0,!1),n=this.parsePath(Rb(r.points)),i=e.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},t),{path:n,name:"schema"})});return i},getMarker:function(r){var e=r.color;return{symbol:function(t,n,i){var a=[n-6,n-3,n,n+3,n+6],o=Lv(t,a,i);return[["M",o[0].x+1,o[0].y],["L",o[1].x-1,o[1].y],["M",o[2].x,o[2].y],["L",o[3].x,o[3].y],["M",o[4].x,o[4].y],["L",o[5].x,o[5].y],["L",o[6].x,o[6].y],["L",o[7].x,o[7].y],["L",o[4].x,o[4].y],["Z"],["M",o[8].x,o[8].y],["L",o[9].x,o[9].y],["M",o[10].x+1,o[10].y],["L",o[11].x-1,o[11].y],["M",o[12].x,o[12].y],["L",o[13].x,o[13].y]]},style:{r:6,lineWidth:1,stroke:e}}}});function Nb(r){var e=(0,c.kJ)(r)?r:[r],t=e.sort(function(n,i){return i-n});return gx(t,4,t[t.length-1])}function Dv(r,e,t){var n=Nb(e);return[{x:r,y:n[0]},{x:r,y:n[1]},{x:r-t/2,y:n[2]},{x:r-t/2,y:n[1]},{x:r+t/2,y:n[1]},{x:r+t/2,y:n[2]},{x:r,y:n[2]},{x:r,y:n[3]}]}function zb(r){return[["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["M",r[2].x,r[2].y],["L",r[3].x,r[3].y],["L",r[4].x,r[4].y],["L",r[5].x,r[5].y],["Z"],["M",r[6].x,r[6].y],["L",r[7].x,r[7].y]]}We("schema","candle",{getPoints:function(r){var e=r.x,t=r.y,n=r.size;return Dv(e,t,n)},draw:function(r,e){var t=ur(r,!0,!0),n=this.parsePath(zb(r.points)),i=e.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},t),{path:n,name:"schema"})});return i},getMarker:function(r){var e=r.color;return{symbol:function(t,n,i){var a=[n+7.5,n+3,n-3,n-7.5],o=Dv(t,a,i);return[["M",o[0].x,o[0].y],["L",o[1].x,o[1].y],["M",o[2].x,o[2].y],["L",o[3].x,o[3].y],["L",o[4].x,o[4].y],["L",o[5].x,o[5].y],["Z"],["M",o[6].x,o[6].y],["L",o[7].x,o[7].y]]},style:{lineWidth:1,stroke:e,fill:e,r:6}}}});function Ub(r,e){var t=Math.abs(r[0].x-r[2].x),n=Math.abs(r[0].y-r[2].y),i=Math.min(t,n);e&&(i=(0,c.uZ)(e,0,Math.min(t,n))),i=i/2;var a=(r[0].x+r[2].x)/2,o=(r[0].y+r[2].y)/2;return{x:a-i,y:o-i,width:i*2,height:i*2}}We("polygon","square",{draw:function(r,e){if(!(0,c.xb)(r.points)){var t=ur(r,!0,!0),n=this.parsePoints(r.points);return e.addShape("rect",{attrs:(0,p.pi)((0,p.pi)({},t),Ub(n,r.size)),name:"polygon"})}},getMarker:function(r){var e=r.color;return{symbol:"square",style:{r:4,fill:e}}}}),We("violin","smooth",{draw:function(r,e){var t=ur(r,!0,!0),n=this.parsePath(Zh(r.points));return e.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},t),{path:n})})},getMarker:function(r){var e=r.color;return{symbol:"circle",style:{stroke:null,r:4,fill:e}}}}),We("violin","hollow",{draw:function(r,e){var t=ur(r,!0,!1),n=this.parsePath(Wh(r.points));return e.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},t),{path:n})})},getMarker:function(r){var e=r.color;return{symbol:"circle",style:{r:4,fill:null,stroke:e}}}}),We("violin","hollow-smooth",{draw:function(r,e){var t=ur(r,!0,!1),n=this.parsePath(Zh(r.points));return e.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},t),{path:n})})},getMarker:function(r){var e=r.color;return{symbol:"circle",style:{r:4,fill:null,stroke:e}}}});var Vb=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getLabelValueDir=function(t){var n="y",i=t.points;return i[0][n]<=i[2][n]?1:-1},e.prototype.getLabelOffsetPoint=function(t,n,i,a){var o,s=r.prototype.getLabelOffsetPoint.call(this,t,n,i),l=this.getCoordinate(),u=l.isTransposed,f=u?"x":"y",h=this.getLabelValueDir(t.mappingData);return s=(0,p.pi)((0,p.pi)({},s),(o={},o[f]=s[f]*h,o)),l.isReflect("x")&&(s=(0,p.pi)((0,p.pi)({},s),{x:s.x*-1})),l.isReflect("y")&&(s=(0,p.pi)((0,p.pi)({},s),{y:s.y*-1})),s},e.prototype.getThemedLabelCfg=function(t){var n=this.geometry,i=this.getDefaultLabelCfg(),a=n.theme;return(0,c.b$)({},i,a.labels,t.position==="middle"?{offset:0}:{},t)},e.prototype.setLabelPosition=function(t,n,i,a){var o=this.getCoordinate(),s=o.isTransposed,l=n.points,u=o.convert(l[0]),f=o.convert(l[2]),h=this.getLabelValueDir(n),v,d,g,y,m=(0,c.kJ)(n.shape)?n.shape[0]:n.shape;if(m==="funnel"||m==="pyramid"){var x=(0,c.U2)(n,"nextPoints"),b=(0,c.U2)(n,"points");if(x){var C=o.convert(b[0]),A=o.convert(b[1]),B=o.convert(x[0]),rt=o.convert(x[1]);s?(v=Math.min(B.y,C.y),g=Math.max(B.y,C.y),d=(A.x+rt.x)/2,y=(C.x+B.x)/2):(v=Math.min((A.y+rt.y)/2,(C.y+B.y)/2),g=Math.max((A.y+rt.y)/2,(C.y+B.y)/2),d=rt.x,y=C.x)}else v=Math.min(f.y,u.y),g=Math.max(f.y,u.y),d=f.x,y=u.x}else v=Math.min(f.y,u.y),g=Math.max(f.y,u.y),d=f.x,y=u.x;switch(a){case"right":t.x=d,t.y=(v+g)/2,t.textAlign=(0,c.U2)(t,"textAlign",h>0?"left":"right");break;case"left":t.x=y,t.y=(v+g)/2,t.textAlign=(0,c.U2)(t,"textAlign",h>0?"left":"right");break;case"bottom":s&&(t.x=(d+y)/2),t.y=g,t.textAlign=(0,c.U2)(t,"textAlign","center"),t.textBaseline=(0,c.U2)(t,"textBaseline",h>0?"bottom":"top");break;case"middle":s&&(t.x=(d+y)/2),t.y=(v+g)/2,t.textAlign=(0,c.U2)(t,"textAlign","center"),t.textBaseline=(0,c.U2)(t,"textBaseline","middle");break;case"top":s&&(t.x=(d+y)/2),t.y=v,t.textAlign=(0,c.U2)(t,"textAlign","center"),t.textBaseline=(0,c.U2)(t,"textBaseline",h>0?"bottom":"top");break;default:break}},e}(cs),Gb=Vb,bs=Math.PI/2,Hb=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getLabelOffset=function(t){var n=this.getCoordinate(),i=0;if((0,c.hj)(t))i=t;else if((0,c.HD)(t)&&t.indexOf("%")!==-1){var a=n.getRadius();n.innerRadius>0&&(a=a*(1-n.innerRadius)),i=parseFloat(t)*.01*a}return i},e.prototype.getLabelItems=function(t){var n=r.prototype.getLabelItems.call(this,t),i=this.geometry.getYScale();return(0,c.UI)(n,function(a){if(a&&i){var o=i.scale((0,c.U2)(a.data,i.field));return(0,p.pi)((0,p.pi)({},a),{percent:o})}return a})},e.prototype.getLabelAlign=function(t){var n=this.getCoordinate(),i;if(t.labelEmit)i=t.angle<=Math.PI/2&&t.angle>=-Math.PI/2?"left":"right";else if(!n.isTransposed)i="center";else{var a=n.getCenter(),o=t.offset;Math.abs(t.x-a.x)<1?i="center":t.angle>Math.PI||t.angle<=0?i=o>0?"left":"right":i=o>0?"right":"left"}return i},e.prototype.getLabelPoint=function(t,n,i){var a=1,o,s=t.content[i];this.isToMiddle(n)?o=this.getMiddlePoint(n.points):(t.content.length===1&&i===0?i=1:i===0&&(a=-1),o=this.getArcPoint(n,i));var l=t.offset*a,u=this.getPointAngle(o),f=t.labelEmit,h=this.getCirclePoint(u,l,o,f);return h.r===0?h.content="":(h.content=s,h.angle=u,h.color=n.color),h.rotate=t.autoRotate?this.getLabelRotate(u,l,f):t.rotate,h.start={x:o.x,y:o.y},h},e.prototype.getArcPoint=function(t,n){return n===void 0&&(n=0),!(0,c.kJ)(t.x)&&!(0,c.kJ)(t.y)?{x:t.x,y:t.y}:{x:(0,c.kJ)(t.x)?t.x[n]:t.x,y:(0,c.kJ)(t.y)?t.y[n]:t.y}},e.prototype.getPointAngle=function(t){return Zi(this.getCoordinate(),t)},e.prototype.getCirclePoint=function(t,n,i,a){var o=this.getCoordinate(),s=o.getCenter(),l=Qo(o,i);if(l===0)return(0,p.pi)((0,p.pi)({},s),{r:l});var u=t;if(o.isTransposed&&l>n&&!a){var f=Math.asin(n/(2*l));u=t+f*2}else l=l+n;return{x:s.x+l*Math.cos(u),y:s.y+l*Math.sin(u),r:l}},e.prototype.getLabelRotate=function(t,n,i){var a=t+bs;return i&&(a-=bs),a&&(a>bs?a=a-Math.PI:a<-bs&&(a=a+Math.PI)),a},e.prototype.getMiddlePoint=function(t){var n=this.getCoordinate(),i=t.length,a={x:0,y:0};return(0,c.S6)(t,function(o){a.x+=o.x,a.y+=o.y}),a.x/=i,a.y/=i,a=n.convert(a),a},e.prototype.isToMiddle=function(t){return t.x.length>2},e}(cs),Pv=Hb,Yb=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.defaultLayout="distribute",t}return e.prototype.getDefaultLabelCfg=function(t,n){var i=r.prototype.getDefaultLabelCfg.call(this,t,n);return(0,c.b$)({},i,(0,c.U2)(this.geometry.theme,"pieLabels",{}))},e.prototype.getLabelOffset=function(t){return r.prototype.getLabelOffset.call(this,t)||0},e.prototype.getLabelRotate=function(t,n,i){var a;return n<0&&(a=t,a>Math.PI/2&&(a=a-Math.PI),a<-Math.PI/2&&(a=a+Math.PI)),a},e.prototype.getLabelAlign=function(t){var n=this.getCoordinate(),i=n.getCenter(),a;return t.angle<=Math.PI/2&&t.x>=i.x?a="left":a="right",t.offset<=0&&(a==="right"?a="left":a="right"),a},e.prototype.getArcPoint=function(t){return t},e.prototype.getPointAngle=function(t){var n=this.getCoordinate(),i={x:(0,c.kJ)(t.x)?t.x[0]:t.x,y:t.y[0]},a={x:(0,c.kJ)(t.x)?t.x[1]:t.x,y:t.y[1]},o,s=Zi(n,i);if(t.points&&t.points[0].y===t.points[1].y)o=s;else{var l=Zi(n,a);s>=l&&(l=l+Math.PI*2),o=s+(l-s)/2}return o},e.prototype.getCirclePoint=function(t,n){var i=this.getCoordinate(),a=i.getCenter(),o=i.getRadius()+n;return(0,p.pi)((0,p.pi)({},cr(a.x,a.y,o,t)),{angle:t,r:o})},e}(Pv),Xb=Yb,Ov=4;function Wb(r,e,t,n,i,a){var o,s,l=!0,u=n.start,f=n.end,h=Math.min(u.y,f.y),v=Math.abs(u.y-f.y),d,g=0,y=Number.MIN_VALUE,m=e.map(function(lt){return lt.y>g&&(g=lt.y),lt.yv&&(v=g-h);l;)for(m.forEach(function(lt){var xt=(Math.min.apply(y,lt.targets)+Math.max.apply(y,lt.targets))/2;lt.pos=Math.min(Math.max(y,xt-lt.size/2),v-lt.size)}),l=!1,d=m.length;d--;)if(d>0){var x=m[d-1],b=m[d];x.pos+x.size>b.pos&&(x.size+=b.size,x.targets=x.targets.concat(b.targets),x.pos+x.size>v&&(x.pos=v-x.size),m.splice(d,1),l=!0)}d=0,m.forEach(function(lt){var xt=h+t/2;lt.targets.forEach(function(){e[d].y=lt.pos+xt,xt+=t,d++})});var C={};try{for(var A=(0,p.XA)(r),B=A.next();!B.done;B=A.next()){var rt=B.value;C[rt.get("id")]=rt}}catch(lt){o={error:lt}}finally{try{B&&!B.done&&(s=A.return)&&s.call(A)}finally{if(o)throw o.error}}e.forEach(function(lt){var xt=lt.r*lt.r,kt=Math.pow(Math.abs(lt.y-i.y),2);if(xt0){var l=14,u=o+i,f=u*2+l*2,h={start:a.start,end:a.end},v=[[],[]];r.forEach(function(d){!d||(d.textAlign==="right"?v[0].push(d):v[1].push(d))}),v.forEach(function(d,g){var y=f/l;d.length>y&&(d.sort(function(m,x){return x["..percent"]-m["..percent"]}),d.splice(y,d.length-y)),d.sort(function(m,x){return m.y-x.y}),Wb(e,d,l,h,s,g)})}(0,c.S6)(r,function(d){if(d&&d.labelLine){var g=d.offset,y=d.angle,m=cr(s.x,s.y,o,y),x=cr(s.x,s.y,o+g/2,y),b=d.x+(0,c.U2)(d,"offsetX",0),C=d.y+(0,c.U2)(d,"offsetY",0),A={x:b-Math.cos(y)*Ov,y:C-Math.sin(y)*Ov};(0,c.Kn)(d.labelLine)||(d.labelLine={}),d.labelLine.path=["M ".concat(m.x),"".concat(m.y," Q").concat(x.x),"".concat(x.y," ").concat(A.x),A.y].join(",")}})}}function kv(r,e,t){var n=r.filter(function(g){return!g.invisible});n.sort(function(g,y){return g.y-y.y});var i=!0,a=t.minY,o=t.maxY,s=Math.abs(a-o),l,u=0,f=Number.MIN_VALUE,h=n.map(function(g){return g.y>u&&(u=g.y),g.ys&&(s=u-a);i;)for(h.forEach(function(g){var y=(Math.min.apply(f,g.targets)+Math.max.apply(f,g.targets))/2;g.pos=Math.min(Math.max(f,y-g.size/2),s-g.size),g.pos=Math.max(0,g.pos)}),i=!1,l=h.length;l--;)if(l>0){var v=h[l-1],d=h[l];v.pos+v.size>d.pos&&(v.size+=d.size,v.targets=v.targets.concat(d.targets),v.pos+v.size>s&&(v.pos=s-v.size),h.splice(l,1),i=!0)}l=0,h.forEach(function(g){var y=a+e/2;g.targets.forEach(function(){n[l].y=g.pos+y,y+=e,l++})})}var _v=4;function jb(r,e){var t=e.getCenter(),n=e.getRadius();if(r&&r.labelLine){var i=r.angle,a=r.offset,o=cr(t.x,t.y,n,i),s=r.x+(0,c.U2)(r,"offsetX",0)*(Math.cos(i)>0?1:-1),l=r.y+(0,c.U2)(r,"offsetY",0)*(Math.sin(i)>0?1:-1),u={x:s-Math.cos(i)*_v,y:l-Math.sin(i)*_v},f=r.labelLine.smooth,h=[],v=u.x-t.x,d=u.y-t.y,g=Math.atan(d/v);if(v<0&&(g+=Math.PI),f===!1){(0,c.Kn)(r.labelLine)||(r.labelLine={});var y=0;(i<0&&i>-Math.PI/2||i>Math.PI*1.5)&&u.y>o.y&&(y=1),i>=0&&io.y&&(y=1),i>=Math.PI/2&&iu.y&&(y=1),(i<-Math.PI/2||i>=Math.PI&&iu.y&&(y=1);var m=a/2>4?4:Math.max(a/2-1,0),x=cr(t.x,t.y,n+m,i),b=cr(t.x,t.y,n+a/2,g),C=0;h.push("M ".concat(o.x," ").concat(o.y)),h.push("L ".concat(x.x," ").concat(x.y)),h.push("A ".concat(t.x," ").concat(t.y," 0 ").concat(C," ").concat(y," ").concat(b.x," ").concat(b.y)),h.push("L ".concat(u.x," ").concat(u.y))}else{var x=cr(t.x,t.y,n+(a/2>4?4:Math.max(a/2-1,0)),i),A=o.xMath.pow(Math.E,-16)&&h.push.apply(h,["C",u.x+A*4,u.y,2*x.x-o.x,2*x.y-o.y,o.x,o.y]),h.push("L ".concat(o.x," ").concat(o.y))}r.labelLine.path=h.join(" ")}}function $b(r,e,t,n){var i,a,o=(0,c.hX)(r,function(xt){return!(0,c.UM)(xt)}),s=e[0]&&e[0].get("coordinate");if(!!s){var l=s.getCenter(),u=s.getRadius(),f={};try{for(var h=(0,p.XA)(e),v=h.next();!v.done;v=h.next()){var d=v.value;f[d.get("id")]=d}}catch(xt){i={error:xt}}finally{try{v&&!v.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}var g=(0,c.U2)(o[0],"labelHeight",14),y=(0,c.U2)(o[0],"offset",0);if(!(y<=0)){var m="left",x="right",b=(0,c.vM)(o,function(xt){return xt.xFt&&(xt.sort(function(Xt,ae){return ae.percent-Xt.percent}),(0,c.S6)(xt,function(Xt,ae){ae+1>Ft&&(f[Xt.id].set("visible",!1),Xt.invisible=!0)})),kv(xt,g,lt)}),(0,c.S6)(b,function(xt,kt){(0,c.S6)(xt,function(Ft){var Xt=kt===x,ae=f[Ft.id],we=ae.getChildByIndex(0);if(we){var Se=u+y,Re=Ft.y-l.y,Qt=Math.pow(Se,2),he=Math.pow(Re,2),xe=Qt-he>0?Qt-he:0,ve=Math.sqrt(xe),ge=Math.abs(Math.cos(Ft.angle)*Se);Xt?Ft.x=l.x+Math.max(ve,ge):Ft.x=l.x-Math.max(ve,ge)}we&&(we.attr("y",Ft.y),we.attr("x",Ft.x)),jb(Ft,s)})})}}}var zu=4,qb=4,Bv=4;function Kb(r,e,t){var n=e.getCenter(),i=e.getRadius(),a={x:r.x-(t?Bv:-Bv),y:r.y},o=cr(n.x,n.y,i+zu,r.angle),s={x:a.x,y:a.y},l={x:o.x,y:o.y},u=cr(n.x,n.y,i,r.angle),f="";if(a.y!==o.y){var h=t?4:-4;s.y=a.y,r.angle<0&&r.angle>=-Math.PI/2&&(s.x=Math.max(o.x,a.x-h),a.y0&&r.angleo.y?l.y=s.y:(l.y=o.y,l.x=Math.max(l.x,s.x-h))),r.angle>Math.PI/2&&(s.x=Math.min(o.x,a.x-h),a.y>o.y?l.y=s.y:(l.y=o.y,l.x=Math.min(l.x,s.x-h))),r.angle<-Math.PI/2&&(s.x=Math.min(o.x,a.x-h),a.ys.x||xt.x===s.x&&xt.y>s.y,Xt=(0,c.UM)(xt.offsetX)?qb:xt.offsetX,ae=cr(s.x,s.y,l+zu,xt.angle),we=g+Xt;xt.x=s.x+(Ft?1:-1)*(l+we),xt.y=ae.y}}});var y=o.start,m=o.end,x="left",b="right",C=(0,c.vM)(r,function(xt){return xt.xA&&(A=Math.min(kt,Math.abs(y.y-m.y)))});var B={minX:y.x,maxX:m.x,minY:s.y-A/2,maxY:s.y+A/2};(0,c.S6)(C,function(xt,kt){var Ft=A/d;xt.length>Ft&&(xt.sort(function(Xt,ae){return ae.percent-Xt.percent}),(0,c.S6)(xt,function(Xt,ae){ae>Ft&&(u[Xt.id].set("visible",!1),Xt.invisible=!0)})),kv(xt,d,B)});var rt=B.minY,lt=B.maxY;(0,c.S6)(C,function(xt,kt){var Ft=kt===b;(0,c.S6)(xt,function(Xt){var ae=(0,c.U2)(u,Xt&&[Xt.id]);if(!!ae){if(Xt.ylt){ae.set("visible",!1);return}var we=ae.getChildByIndex(0),Se=we.getCanvasBBox(),Re={x:Ft?Se.x:Se.maxX,y:Se.y+Se.height/2};Ha(we,Xt.x-Re.x,Xt.y-Re.y),Xt.labelLine&&Kb(Xt,o,Ft)}})})}}function Qb(r,e,t,n){(0,c.S6)(e,function(i){var a=n.minX,o=n.minY,s=n.maxX,l=n.maxY,u=i.getCanvasBBox(),f=u.minX,h=u.minY,v=u.maxX,d=u.maxY,g=u.x,y=u.y,m=u.width,x=u.height,b=g,C=y;(fs?b=s-m:v>s&&(b=b-(v-s)),h>l?C=l-x:d>l&&(C=C-(d-l)),(b!==g||C!==y)&&Ha(i,b-g,C-y)})}function tM(r,e,t,n){(0,c.S6)(e,function(i,a){var o=i.getCanvasBBox(),s=t[a].getBBox();(o.minXs.maxX||o.maxY>s.maxY)&&i.remove(!0)})}var eM=100,Rv=function(){function r(e){e===void 0&&(e={}),this.bitmap={};var t=e.xGap,n=t===void 0?1:t,i=e.yGap,a=i===void 0?8:i;this.xGap=n,this.yGap=a}return r.prototype.hasGap=function(e){for(var t=!0,n=this.bitmap,i=Math.round(e.minX),a=Math.round(e.maxX),o=Math.round(e.minY),s=Math.round(e.maxY),l=i;l<=a;l+=1){if(!n[l]){n[l]={};continue}if(l===i||l===a){for(var u=o;u<=s;u++)if(n[l][u]){t=!1;break}}else if(n[l][o]||n[l][s]){t=!1;break}}return t},r.prototype.fillGap=function(e){for(var t=this.bitmap,n=Math.round(e.minX),i=Math.round(e.maxX),a=Math.round(e.minY),o=Math.round(e.maxY),s=n;s<=i;s+=1)t[s]||(t[s]={});for(var s=n;s<=i;s+=this.xGap){for(var l=a;l<=o;l+=this.yGap)t[s][l]=!0;t[s][o]=!0}if(this.yGap!==1)for(var s=a;s<=o;s+=1)t[n][s]=!0,t[i][s]=!0;if(this.xGap!==1)for(var s=n;s<=i;s+=1)t[s][a]=!0,t[s][o]=!0},r.prototype.destroy=function(){this.bitmap={}},r}();function rM(r,e,t){t===void 0&&(t=eM);var n=-1,i=r.attr(),a=i.x,o=i.y,s=r.getCanvasBBox(),l=Math.sqrt(s.width*s.width+s.height*s.height),u,f=-n,h=0,v=0,d=function(x){var b=x*.1;return[b*Math.cos(b),b*Math.sin(b)]};if(e.hasGap(s))return e.fillGap(s),!0;for(var g=!1,y=0,m={};Math.min(Math.abs(h),Math.abs(v))4)return[];var e=function(i,a){return[a.x-i.x,a.y-i.y]},t=e(r[0],r[1]),n=e(r[1],r[2]);return[t,n]}function Ms(r,e,t){e===void 0&&(e=0),t===void 0&&(t={x:0,y:0});var n=r.x,i=r.y;return{x:(n-t.x)*Math.cos(-e)+(i-t.y)*Math.sin(-e)+t.x,y:(t.x-n)*Math.sin(-e)+(i-t.y)*Math.cos(-e)+t.y}}function zv(r){var e=[{x:r.x,y:r.y},{x:r.x+r.width,y:r.y},{x:r.x+r.width,y:r.y+r.height},{x:r.x,y:r.y+r.height}],t=r.rotation;return t?[Ms(e[0],t,e[0]),Ms(e[1],t,e[0]),Ms(e[2],t,e[0]),Ms(e[3],t,e[0])]:e}function Uv(r,e){if(r.length>4)return{min:0,max:0};var t=[];return r.forEach(function(n){t.push(oM([n.x,n.y],e))}),{min:Math.min.apply(Math,(0,p.ev)([],(0,p.CR)(t),!1)),max:Math.max.apply(Math,(0,p.ev)([],(0,p.CR)(t),!1))}}function sM(r,e){return r.max>e.min&&r.minr.x+r.width+t||e.x+e.widthr.y+r.height+t||e.y+e.height4)return[];var A=function(lt,xt){return[xt.x-lt.x,xt.y-lt.y]},B=A(C[0],C[1]),rt=A(C[1],C[2]);return[B,rt]}function h(C,A,B){A===void 0&&(A=0),B===void 0&&(B={x:0,y:0});var rt=C.x,lt=C.y;return{x:(rt-B.x)*Math.cos(-A)+(lt-B.y)*Math.sin(-A)+B.x,y:(B.x-rt)*Math.sin(-A)+(lt-B.y)*Math.cos(-A)+B.y}}function v(C){var A=[{x:C.x,y:C.y},{x:C.x+C.width,y:C.y},{x:C.x+C.width,y:C.y+C.height},{x:C.x,y:C.y+C.height}],B=C.rotation;return B?[h(A[0],B,A[0]),h(A[1],B,A[0]),h(A[2],B,A[0]),h(A[3],B,A[0])]:A}function d(C,A){if(C.length>4)return{min:0,max:0};var B=[];return C.forEach(function(rt){B.push(u([rt.x,rt.y],A))}),{min:Math.min.apply(null,B),max:Math.max.apply(null,B)}}function g(C,A){return C.max>A.min&&C.minC.x+C.width+B||A.x+A.widthC.y+C.height+B||A.y+A.height=a.height:o.width>=a.width}function xM(r,e,t){var n=!!r.getAdjust("stack");return n||e.every(function(i,a){var o=t[a];return mM(r,i,o)})}function wM(r,e,t){var n=r.coordinate,i=Tr.fromObject(t.getBBox()),a=Kn(e);n.isTransposed?a.attr({x:i.minX+i.width/2,textAlign:"center"}):a.attr({y:i.minY+i.height/2,textBaseline:"middle"})}function SM(r,e,t){var n;if(t.length!==0){var i=(n=t[0])===null||n===void 0?void 0:n.get("element"),a=i==null?void 0:i.geometry;if(!(!a||a.type!=="interval")){var o=xM(a,e,t);o&&t.forEach(function(s,l){var u=e[l];wM(a,u,s)})}}}function bM(r){var e=500,t=[],n=Math.max(Math.floor(r.length/e),1);return(0,c.S6)(r,function(i,a){a%n==0?t.push(i):i.set("visible",!1)}),t}function MM(r,e,t){var n;if(t.length!==0){var i=(n=t[0])===null||n===void 0?void 0:n.get("element"),a=i==null?void 0:i.geometry;if(!(!a||a.type!=="interval")){var o=bM(e),s=(0,p.CR)(a.getXYFields(),1),l=s[0],u=[],f=[],h=(0,c.vM)(o,function(m){return m.get("data")[l]}),v=(0,c.jj)((0,c.UI)(o,function(m){return m.get("data")[l]})),d;o.forEach(function(m){m.set("visible",!0)});var g=function(m){m&&(m.length&&f.push(m.pop()),f.push.apply(f,(0,p.ev)([],(0,p.CR)(m),!1)))};for((0,c.dp)(v)>0&&(d=v.shift(),g(h[d])),(0,c.dp)(v)>0&&(d=v.pop(),g(h[d])),(0,c.S6)(v.reverse(),function(m){g(h[m])});f.length>0;){var y=f.shift();y.get("visible")&&(G1(y,u)?y.set("visible",!1):u.push(y))}}}}function CM(r,e){var t=r.getXYFields()[1],n=[],i=e.sort(function(a,o){return a.get("data")[t]-a.get("data")[t]});return i.length>0&&n.push(i.shift()),i.length>0&&n.push(i.pop()),n.push.apply(n,(0,p.ev)([],(0,p.CR)(i),!1)),n}function Yv(r,e,t){return r.some(function(n){return t(n,e)})}function AM(r,e,t){t===void 0&&(t=0);var n=Math.max(0,Math.min(r.x+r.width+t,e.x+e.width+t)-Math.max(r.x-t,e.x-t)),i=Math.max(0,Math.min(r.y+r.height+t,e.y+e.height+t)-Math.max(r.y-t,e.y-t));return n*i}function Xv(r,e){return Yv(r,e,function(t,n){var i=Kn(t),a=Kn(n);return AM(i.getCanvasBBox(),a.getCanvasBBox(),2)>0})}function TM(r,e,t,n,i){var a,o;if(t.length!==0){var s=(a=t[0])===null||a===void 0?void 0:a.get("element"),l=s==null?void 0:s.geometry;if(!(!l||l.type!=="point")){var u=(0,p.CR)(l.getXYFields(),2),f=u[0],h=u[1],v=(0,c.vM)(e,function(y){return y.get("data")[f]}),d=[],g=i&&i.offset||((o=r[0])===null||o===void 0?void 0:o.offset)||12;(0,c.UI)((0,c.XP)(v).reverse(),function(y){for(var m=CM(l,v[y]);m.length;){var x=m.shift(),b=Kn(x);if(Yv(d,x,function(B,rt){return B.get("data")[f]===rt.get("data")[f]&&B.get("data")[h]===rt.get("data")[h]})){b.set("visible",!1);continue}var C=Xv(d,x),A=!1;if(C&&(b.attr("y",b.attr("y")+2*g),A=Xv(d,x)),A){b.set("visible",!1);continue}d.push(x)}})}}}function EM(r,e){var t=r.getXYFields()[1],n=[],i=e.sort(function(a,o){return a.get("data")[t]-a.get("data")[t]});return i.length>0&&n.push(i.shift()),i.length>0&&n.push(i.pop()),n.push.apply(n,(0,p.ev)([],(0,p.CR)(i),!1)),n}function Wv(r,e,t){return r.some(function(n){return t(n,e)})}function FM(r,e,t){t===void 0&&(t=0);var n=Math.max(0,Math.min(r.x+r.width+t,e.x+e.width+t)-Math.max(r.x-t,e.x-t)),i=Math.max(0,Math.min(r.y+r.height+t,e.y+e.height+t)-Math.max(r.y-t,e.y-t));return n*i}function Zv(r,e){return Wv(r,e,function(t,n){var i=Kn(t),a=Kn(n);return FM(i.getCanvasBBox(),a.getCanvasBBox(),2)>0})}function IM(r,e,t,n,i){var a,o;if(t.length!==0){var s=(a=t[0])===null||a===void 0?void 0:a.get("element"),l=s==null?void 0:s.geometry;if(!(!l||["path","line","area"].indexOf(l.type)<0)){var u=(0,p.CR)(l.getXYFields(),2),f=u[0],h=u[1],v=(0,c.vM)(e,function(y){return y.get("data")[f]}),d=[],g=i&&i.offset||((o=r[0])===null||o===void 0?void 0:o.offset)||12;(0,c.UI)((0,c.XP)(v).reverse(),function(y){for(var m=EM(l,v[y]);m.length;){var x=m.shift(),b=Kn(x);if(Wv(d,x,function(B,rt){return B.get("data")[f]===rt.get("data")[f]&&B.get("data")[h]===rt.get("data")[h]})){b.set("visible",!1);continue}var C=Zv(d,x),A=!1;if(C&&(b.attr("y",b.attr("y")+2*g),A=Zv(d,x)),A){b.set("visible",!1);continue}d.push(x)}})}}}var Gu;function LM(){return Gu||(Gu=document.createElement("canvas").getContext("2d")),Gu}var Cs=(0,c.HP)(function(r,e){e===void 0&&(e={});var t=e.fontSize,n=e.fontFamily,i=e.fontWeight,a=e.fontStyle,o=e.fontVariant,s=LM();return s.font=[a,o,i,"".concat(t,"px"),n].join(" "),s.measureText((0,c.HD)(r)?r:"").width},function(r,e){return e===void 0&&(e={}),(0,p.ev)([r],(0,p.CR)((0,c.VO)(e)),!1).join("")}),DM=function(r,e,t){var n=16,i=Cs("...",t),a;(0,c.HD)(r)?a=r:a=(0,c.BB)(r);var o=e,s=[],l,u;if(Cs(r,t)<=e)return r;for(;l=a.substr(0,n),u=Cs(l,t),!(u+i>o&&u>o);)if(s.push(l),o-=u,a=a.substr(n),!a)return s.join("");for(;l=a.substr(0,1),u=Cs(l,t),!(u+i>o);)if(s.push(l),o-=u,a=a.substr(1),!a)return s.join("");return"".concat(s.join(""),"...")};function PM(r,e,t,n,i){if(!(e.length<=0)){var a=(i==null?void 0:i.direction)||["top","right","bottom","left"],o=(i==null?void 0:i.action)||"translate",s=(i==null?void 0:i.margin)||0,l=e[0].get("coordinate");if(!!l){var u=wx(l,s),f=u.minX,h=u.minY,v=u.maxX,d=u.maxY;(0,c.S6)(e,function(g){var y=g.getCanvasBBox(),m=y.minX,x=y.minY,b=y.maxX,C=y.maxY,A=y.x,B=y.y,rt=y.width,lt=y.height,xt=A,kt=B;if(a.indexOf("left")>=0&&(m=0&&(x=0&&(m>v?xt=v-rt:b>v&&(xt=xt-(b-v))),a.indexOf("bottom")>=0&&(x>d?kt=d-lt:C>d&&(kt=kt-(C-d))),xt!==A||kt!==B){var Ft=xt-A;if(o==="translate")Ha(g,Ft,kt-B);else if(o==="ellipsis"){var Xt=g.findAll(function(ae){return ae.get("type")==="text"});Xt.forEach(function(ae){var we=(0,c.ei)(ae.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),Se=ae.getCanvasBBox(),Re=DM(ae.attr("text"),Se.width-Math.abs(Ft),we);ae.attr("text",Re)})}else g.hide()}})}}}function OM(r,e,t){var n={fillOpacity:(0,c.UM)(r.attr("fillOpacity"))?1:r.attr("fillOpacity"),strokeOpacity:(0,c.UM)(r.attr("strokeOpacity"))?1:r.attr("strokeOpacity"),opacity:(0,c.UM)(r.attr("opacity"))?1:r.attr("opacity")};r.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),r.animate(n,e)}function kM(r,e,t){var n={fillOpacity:0,strokeOpacity:0,opacity:0},i=e.easing,a=e.duration,o=e.delay;r.animate(n,a,i,function(){r.remove(!0)},o)}function _M(r,e,t){var n,i=(0,p.CR)(e,2),a=i[0],o=i[1];return r.applyToMatrix([a,o,1]),t==="x"?(r.setMatrix(Qe.vs(r.getMatrix(),[["t",-a,-o],["s",.01,1],["t",a,o]])),n=Qe.vs(r.getMatrix(),[["t",-a,-o],["s",100,1],["t",a,o]])):t==="y"?(r.setMatrix(Qe.vs(r.getMatrix(),[["t",-a,-o],["s",1,.01],["t",a,o]])),n=Qe.vs(r.getMatrix(),[["t",-a,-o],["s",1,100],["t",a,o]])):t==="xy"&&(r.setMatrix(Qe.vs(r.getMatrix(),[["t",-a,-o],["s",.01,.01],["t",a,o]])),n=Qe.vs(r.getMatrix(),[["t",-a,-o],["s",100,100],["t",a,o]])),n}function Hu(r,e,t,n,i){var a=t.start,o=t.end,s=t.getWidth(),l=t.getHeight(),u,f;i==="y"?(u=a.x+s/2,f=n.ya.x?n.x:a.x,f=a.y+l/2):i==="xy"&&(t.isPolar?(u=t.getCenter().x,f=t.getCenter().y):(u=(a.x+o.x)/2,f=(a.y+o.y)/2));var h=_M(r,[u,f],i);r.animate({matrix:h},e)}function BM(r,e,t){var n=t.coordinate,i=t.minYPoint;Hu(r,e,n,i,"x")}function RM(r,e,t){var n=t.coordinate,i=t.minYPoint;Hu(r,e,n,i,"y")}function NM(r,e,t){var n=t.coordinate,i=t.minYPoint;Hu(r,e,n,i,"xy")}function zM(r,e,t){var n=r.getTotalLength();r.attr("lineDash",[n]),r.animate(function(i){return{lineDashOffset:(1-i)*n}},e)}function UM(r,e,t){var n=t.toAttrs,i=n.x,a=n.y;delete n.x,delete n.y,r.attr(n),r.animate({x:i,y:a},e)}function VM(r,e,t){var n=r.getBBox(),i=r.get("origin").mappingData,a=i.points,o=a[0].y-a[1].y>0?n.maxX:n.minX,s=(n.minY+n.maxY)/2;r.applyToMatrix([o,s,1]);var l=Qe.vs(r.getMatrix(),[["t",-o,-s],["s",.01,1],["t",o,s]]);r.setMatrix(l),r.animate({matrix:Qe.vs(r.getMatrix(),[["t",-o,-s],["s",100,1],["t",o,s]])},e)}function GM(r,e,t){var n=r.getBBox(),i=r.get("origin").mappingData,a=(n.minX+n.maxX)/2,o=i.points,s=o[0].y-o[1].y<=0?n.maxY:n.minY;r.applyToMatrix([a,s,1]);var l=Qe.vs(r.getMatrix(),[["t",-a,-s],["s",1,.01],["t",a,s]]);r.setMatrix(l),r.animate({matrix:Qe.vs(r.getMatrix(),[["t",-a,-s],["s",1,100],["t",a,s]])},e)}function jv(r,e){var t,n=vs(r,e),i=n.startAngle,a=n.endAngle;return!(0,c.vQ)(i,-Math.PI*.5)&&i<-Math.PI*.5&&(i+=Math.PI*2),!(0,c.vQ)(a,-Math.PI*.5)&&a<-Math.PI*.5&&(a+=Math.PI*2),e[5]===0&&(t=(0,p.CR)([a,i],2),i=t[0],a=t[1]),(0,c.vQ)(i,Math.PI*1.5)&&(i=Math.PI*-.5),(0,c.vQ)(a,Math.PI*-.5)&&!(0,c.vQ)(i,a)&&(a=Math.PI*1.5),{startAngle:i,endAngle:a}}function $v(r){var e;return r[0]==="M"||r[0]==="L"?e=[r[1],r[2]]:(r[0]==="a"||r[0]==="A"||r[0]==="C")&&(e=[r[r.length-2],r[r.length-1]]),e}function qv(r){var e,t,n,i=r.filter(function(C){return C[0]==="A"||C[0]==="a"});if(i.length===0)return{startAngle:0,endAngle:0,radius:0,innerRadius:0};var a=i[0],o=i.length>1?i[1]:i[0],s=r.indexOf(a),l=r.indexOf(o),u=$v(r[s-1]),f=$v(r[l-1]),h=jv(u,a),v=h.startAngle,d=h.endAngle,g=jv(f,o),y=g.startAngle,m=g.endAngle;(0,c.vQ)(v,y)&&(0,c.vQ)(d,m)?(t=v,n=d):(t=Math.min(v,y),n=Math.max(d,m));var x=a[1],b=i[i.length-1][1];return x=0;u--){var f=this.getFacetsByLevel(t,u);try{for(var h=(n=void 0,(0,p.XA)(f)),v=h.next();!v.done;v=h.next()){var d=v.value;this.isLeaf(d)||(d.originColIndex=d.columnIndex,d.columnIndex=this.getRegionIndex(d.children),d.columnValuesLength=o.length)}}catch(g){n={error:g}}finally{try{v&&!v.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}}},e.prototype.getFacetsByLevel=function(t,n){var i=[];return t.forEach(function(a){a.rowIndex===n&&i.push(a)}),i},e.prototype.getRegionIndex=function(t){var n=t[0],i=t[t.length-1];return(i.columnIndex-n.columnIndex)/2+n.columnIndex},e.prototype.isLeaf=function(t){return!t.children||!t.children.length},e.prototype.getRows=function(){return this.cfg.fields.length+1},e.prototype.getChildFacets=function(t,n,i){var a=this,o=this.cfg.fields,s=o.length;if(!(s=d){var m=i.parsePosition([g[l],g[s.field]]);m&&v.push(m)}if(g[l]===h)return!1}),v},e.prototype.parsePercentPosition=function(t){var n=parseFloat(t[0])/100,i=parseFloat(t[1])/100,a=this.view.getCoordinate(),o=a.start,s=a.end,l={x:Math.min(o.x,s.x),y:Math.min(o.y,s.y)},u=a.getWidth()*n+l.x,f=a.getHeight()*i+l.y;return{x:u,y:f}},e.prototype.getCoordinateBBox=function(){var t=this.view.getCoordinate(),n=t.start,i=t.end,a=t.getWidth(),o=t.getHeight(),s={x:Math.min(n.x,i.x),y:Math.min(n.y,i.y)};return{x:s.x,y:s.y,minX:s.x,minY:s.y,maxX:s.x+a,maxY:s.y+o,width:a,height:o}},e.prototype.getAnnotationCfg=function(t,n,i){var a=this,o=this.view.getCoordinate(),s=this.view.getCanvas(),l={};if((0,c.UM)(n))return null;var u=n.start,f=n.end,h=n.position,v=this.parsePosition(u),d=this.parsePosition(f),g=this.parsePosition(h);if(["arc","image","line","region","regionFilter"].includes(t)&&(!v||!d))return null;if(["text","dataMarker","html"].includes(t)&&!g)return null;if(t==="arc"){var y=n,m=y.start,x=y.end,b=(0,p._T)(y,["start","end"]),C=Zi(o,v),A=Zi(o,d);C>A&&(A=Math.PI*2+A),l=(0,p.pi)((0,p.pi)({},b),{center:o.getCenter(),radius:Qo(o,v),startAngle:C,endAngle:A})}else if(t==="image"){var B=n,rt=B.start,lt=B.end,b=(0,p._T)(B,["start","end"]);l=(0,p.pi)((0,p.pi)({},b),{start:v,end:d,src:n.src})}else if(t==="line"){var xt=n,kt=xt.start,Ft=xt.end,b=(0,p._T)(xt,["start","end"]);l=(0,p.pi)((0,p.pi)({},b),{start:v,end:d,text:(0,c.U2)(n,"text",null)})}else if(t==="region"){var Xt=n,ae=Xt.start,we=Xt.end,b=(0,p._T)(Xt,["start","end"]);l=(0,p.pi)((0,p.pi)({},b),{start:v,end:d})}else if(t==="text"){var Se=this.view.getData(),Re=n,Qt=Re.position,he=Re.content,b=(0,p._T)(Re,["position","content"]),xe=he;(0,c.mf)(he)&&(xe=he(Se)),l=(0,p.pi)((0,p.pi)((0,p.pi)({},g),b),{content:xe})}else if(t==="dataMarker"){var ve=n,ge=ve.position,Te=ve.point,Ne=ve.line,Ge=ve.text,_e=ve.autoAdjust,He=ve.direction,b=(0,p._T)(ve,["position","point","line","text","autoAdjust","direction"]);l=(0,p.pi)((0,p.pi)((0,p.pi)({},b),g),{coordinateBBox:this.getCoordinateBBox(),point:Te,line:Ne,text:Ge,autoAdjust:_e,direction:He})}else if(t==="dataRegion"){var Ke=n,fr=Ke.start,hr=Ke.end,bn=Ke.region,Ge=Ke.text,Bi=Ke.lineLength,b=(0,p._T)(Ke,["start","end","region","text","lineLength"]);l=(0,p.pi)((0,p.pi)({},b),{points:this.getRegionPoints(fr,hr),region:bn,text:Ge,lineLength:Bi})}else if(t==="regionFilter"){var Un=n,da=Un.start,ga=Un.end,v0=Un.apply,dk=Un.color,b=(0,p._T)(Un,["start","end","apply","color"]),gk=this.view.geometries,p0=[],Qc=function(Mn){!Mn||(Mn.isGroup()?Mn.getChildren().forEach(function(go){return Qc(go)}):p0.push(Mn))};(0,c.S6)(gk,function(Mn){v0?(0,c.FX)(v0,Mn.type)&&(0,c.S6)(Mn.elements,function(go){Qc(go.shape)}):(0,c.S6)(Mn.elements,function(go){Qc(go.shape)})}),l=(0,p.pi)((0,p.pi)({},b),{color:dk,shapes:p0,start:v,end:d})}else if(t==="shape"){var d0=n,yk=d0.render,tf=(0,p._T)(d0,["render"]),mk=function(wk){if((0,c.mf)(n.render))return yk(wk,a.view,{parsePosition:a.parsePosition.bind(a)})};l=(0,p.pi)((0,p.pi)({},tf),{render:mk})}else if(t==="html"){var ef=n,rf=ef.html,xB=ef.position,tf=(0,p._T)(ef,["html","position"]),xk=function(Mn){return(0,c.mf)(rf)?rf(Mn,a.view):rf};l=(0,p.pi)((0,p.pi)((0,p.pi)({},tf),g),{parent:s.get("el").parentNode,html:xk})}var si=(0,c.b$)({},i,(0,p.pi)((0,p.pi)({},l),{top:n.top,style:n.style,offsetX:n.offsetX,offsetY:n.offsetY}));return t!=="html"&&(si.container=this.getComponentContainer(si)),si.animate=this.view.getOptions().animate&&si.animate&&(0,c.U2)(n,"animate",si.animate),si.animateOption=(0,c.b$)({},Qi,si.animateOption,n.animateOption),si},e.prototype.isTop=function(t){return(0,c.U2)(t,"top",!0)},e.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},e.prototype.getAnnotationTheme=function(t){return(0,c.U2)(this.view.getTheme(),["components","annotation",t],{})},e.prototype.updateOrCreate=function(t){var n=this.cache.get(this.getCacheKey(t));if(n){var i=t.type,a=this.getAnnotationTheme(i),o=this.getAnnotationCfg(i,t,a);o&&Pr(o,["container"]),n.component.update((0,p.pi)((0,p.pi)({},o||{}),{visible:!!o})),(0,c.q9)(Ts,t.type)&&n.component.render()}else n=this.createAnnotation(t),n&&(n.component.init(),(0,c.q9)(Ts,t.type)&&n.component.render());return n},e.prototype.syncCache=function(t){var n=this,i=new Map(this.cache);return t.forEach(function(a,o){i.set(o,a)}),i.forEach(function(a,o){(0,c.sE)(n.option,function(s){return o===n.getCacheKey(s)})||(a.component.destroy(),i.delete(o))}),i},e.prototype.getCacheKey=function(t){return t},e}(Ji),sC=oC;function Jv(r,e){var t=(0,c.b$)({},(0,c.U2)(r,["components","axis","common"]),(0,c.U2)(r,["components","axis",e]));return(0,c.U2)(t,["grid"],{})}function Es(r,e,t,n){var i=[],a=e.getTicks();return r.isPolar&&a.push({value:1,text:"",tickValue:""}),a.reduce(function(o,s,l){var u=s.value;if(n)i.push({points:[r.convert(t==="y"?{x:0,y:u}:{x:u,y:0}),r.convert(t==="y"?{x:1,y:u}:{x:u,y:1})]});else if(l){var f=o.value,h=(f+u)/2;i.push({points:[r.convert(t==="y"?{x:0,y:h}:{x:h,y:0}),r.convert(t==="y"?{x:1,y:h}:{x:h,y:1})]})}return s},a[0]),i}function Wu(r,e,t,n,i){var a=e.values.length,o=[],s=t.getTicks();return s.reduce(function(l,u){var f=l?l.value:u.value,h=u.value,v=(f+h)/2;return i==="x"?o.push({points:[r.convert({x:n?h:v,y:0}),r.convert({x:n?h:v,y:1})]}):o.push({points:(0,c.UI)(Array(a+1),function(d,g){return r.convert({x:g/a,y:n?h:v})})}),u},s[0]),o}function Qv(r,e){var t=(0,c.U2)(e,"grid");if(t===null)return!1;var n=(0,c.U2)(r,"grid");return!(t===void 0&&n===null)}var ti=["container"],tp=(0,p.pi)((0,p.pi)({},Qi),{appear:null}),lC=function(r){(0,p.ZT)(e,r);function e(t){var n=r.call(this,t)||this;return n.cache=new Map,n.gridContainer=n.view.getLayer(tt.BG).addGroup(),n.gridForeContainer=n.view.getLayer(tt.FORE).addGroup(),n.axisContainer=n.view.getLayer(tt.BG).addGroup(),n.axisForeContainer=n.view.getLayer(tt.FORE).addGroup(),n}return Object.defineProperty(e.prototype,"name",{get:function(){return"axis"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){this.update()},e.prototype.layout=function(){var t=this,n=this.view.getCoordinate();(0,c.S6)(this.getComponents(),function(i){var a=i.component,o=i.direction,s=i.type,l=i.extra,u=l.dim,f=l.scale,h=l.alignTick,v;if(s===Ct.AXIS)n.isPolar?u==="x"?v=n.isTransposed?ts(n,o):ru(n):u==="y"&&(v=n.isTransposed?ru(n):ts(n,o)):v=ts(n,o);else if(s===Ct.GRID)if(n.isPolar){var d=void 0;n.isTransposed?d=u==="x"?Wu(n,t.view.getYScales()[0],f,h,u):Es(n,f,u,h):d=u==="x"?Es(n,f,u,h):Wu(n,t.view.getXScale(),f,h,u),v={items:d,center:t.view.getCoordinate().getCenter()}}else v={items:Es(n,f,u,h)};a.update(v)})},e.prototype.update=function(){this.option=this.view.getOptions().axes;var t=new Map;this.updateXAxes(t),this.updateYAxes(t);var n=new Map;this.cache.forEach(function(i,a){t.has(a)?n.set(a,i):i.component.destroy()}),this.cache=n},e.prototype.clear=function(){r.prototype.clear.call(this),this.cache.clear(),this.gridContainer.clear(),this.gridForeContainer.clear(),this.axisContainer.clear(),this.axisForeContainer.clear()},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.gridContainer.remove(!0),this.gridForeContainer.remove(!0),this.axisContainer.remove(!0),this.axisForeContainer.remove(!0)},e.prototype.getComponents=function(){var t=[];return this.cache.forEach(function(n){t.push(n)}),t},e.prototype.updateXAxes=function(t){var n=this.view.getXScale();if(!(!n||n.isIdentity)){var i=rs(this.option,n.field);if(i!==!1){var a=rh(i,K.BOTTOM),o=tt.BG,s="x",l=this.view.getCoordinate(),u=this.getId("axis",n.field),f=this.getId("grid",n.field);if(l.isRect){var h=this.cache.get(u);if(h){var v=this.getLineAxisCfg(n,i,a);Pr(v,ti),h.component.update(v),t.set(u,h)}else h=this.createLineAxis(n,i,o,a,s),this.cache.set(u,h),t.set(u,h);var d=this.cache.get(f);if(d){var v=this.getLineGridCfg(n,i,a,s);Pr(v,ti),d.component.update(v),t.set(f,d)}else d=this.createLineGrid(n,i,o,a,s),d&&(this.cache.set(f,d),t.set(f,d))}else if(l.isPolar){var h=this.cache.get(u);if(h){var v=l.isTransposed?this.getLineAxisCfg(n,i,K.RADIUS):this.getCircleAxisCfg(n,i,a);Pr(v,ti),h.component.update(v),t.set(u,h)}else{if(l.isTransposed){if((0,c.o8)(i))return;h=this.createLineAxis(n,i,o,K.RADIUS,s)}else h=this.createCircleAxis(n,i,o,a,s);this.cache.set(u,h),t.set(u,h)}var d=this.cache.get(f);if(d){var v=l.isTransposed?this.getCircleGridCfg(n,i,K.RADIUS,s):this.getLineGridCfg(n,i,K.CIRCLE,s);Pr(v,ti),d.component.update(v),t.set(f,d)}else{if(l.isTransposed){if((0,c.o8)(i))return;d=this.createCircleGrid(n,i,o,K.RADIUS,s)}else d=this.createLineGrid(n,i,o,K.CIRCLE,s);d&&(this.cache.set(f,d),t.set(f,d))}}}}},e.prototype.updateYAxes=function(t){var n=this,i=this.view.getYScales();(0,c.S6)(i,function(a,o){if(!(!a||a.isIdentity)){var s=a.field,l=rs(n.option,s);if(l!==!1){var u=tt.BG,f="y",h=n.getId("axis",s),v=n.getId("grid",s),d=n.view.getCoordinate();if(d.isRect){var g=rh(l,o===0?K.LEFT:K.RIGHT),y=n.cache.get(h);if(y){var m=n.getLineAxisCfg(a,l,g);Pr(m,ti),y.component.update(m),t.set(h,y)}else y=n.createLineAxis(a,l,u,g,f),n.cache.set(h,y),t.set(h,y);var x=n.cache.get(v);if(x){var m=n.getLineGridCfg(a,l,g,f);Pr(m,ti),x.component.update(m),t.set(v,x)}else x=n.createLineGrid(a,l,u,g,f),x&&(n.cache.set(v,x),t.set(v,x))}else if(d.isPolar){var y=n.cache.get(h);if(y){var m=d.isTransposed?n.getCircleAxisCfg(a,l,K.CIRCLE):n.getLineAxisCfg(a,l,K.RADIUS);Pr(m,ti),y.component.update(m),t.set(h,y)}else{if(d.isTransposed){if((0,c.o8)(l))return;y=n.createCircleAxis(a,l,u,K.CIRCLE,f)}else y=n.createLineAxis(a,l,u,K.RADIUS,f);n.cache.set(h,y),t.set(h,y)}var x=n.cache.get(v);if(x){var m=d.isTransposed?n.getLineGridCfg(a,l,K.CIRCLE,f):n.getCircleGridCfg(a,l,K.RADIUS,f);Pr(m,ti),x.component.update(m),t.set(v,x)}else{if(d.isTransposed){if((0,c.o8)(l))return;x=n.createLineGrid(a,l,u,K.CIRCLE,f)}else x=n.createCircleGrid(a,l,u,K.RADIUS,f);x&&(n.cache.set(v,x),t.set(v,x))}}}}})},e.prototype.createLineAxis=function(t,n,i,a,o){var s={component:new ux(this.getLineAxisCfg(t,n,a)),layer:i,direction:a===K.RADIUS?K.NONE:a,type:Ct.AXIS,extra:{dim:o,scale:t}};return s.component.set("field",t.field),s.component.init(),s},e.prototype.createLineGrid=function(t,n,i,a,o){var s=this.getLineGridCfg(t,n,a,o);if(s){var l={component:new fx(s),layer:i,direction:K.NONE,type:Ct.GRID,extra:{dim:o,scale:t,alignTick:(0,c.U2)(s,"alignTick",!0)}};return l.component.init(),l}},e.prototype.createCircleAxis=function(t,n,i,a,o){var s={component:new cx(this.getCircleAxisCfg(t,n,a)),layer:i,direction:a,type:Ct.AXIS,extra:{dim:o,scale:t}};return s.component.set("field",t.field),s.component.init(),s},e.prototype.createCircleGrid=function(t,n,i,a,o){var s=this.getCircleGridCfg(t,n,a,o);if(s){var l={component:new hx(s),layer:i,direction:K.NONE,type:Ct.GRID,extra:{dim:o,scale:t,alignTick:(0,c.U2)(s,"alignTick",!0)}};return l.component.init(),l}},e.prototype.getLineAxisCfg=function(t,n,i){var a=(0,c.U2)(n,["top"])?this.axisForeContainer:this.axisContainer,o=this.view.getCoordinate(),s=ts(o,i),l=nh(t,n),u=es(this.view.getTheme(),i),f=(0,c.U2)(n,["title"])?(0,c.b$)({title:{style:{text:l}}},{title:eh(this.view.getTheme(),i,n.title)},n):n,h=(0,c.b$)((0,p.pi)((0,p.pi)({container:a},s),{ticks:t.getTicks().map(function(C){return{id:"".concat(C.tickValue),name:C.text,value:C.value}}),verticalFactor:o.isPolar?th(s,o.getCenter())*-1:th(s,o.getCenter()),theme:u}),u,f),v=this.getAnimateCfg(h),d=v.animate,g=v.animateOption;h.animateOption=g,h.animate=d;var y=Qf(s),m=(0,c.U2)(h,"verticalLimitLength",y?1/3:1/2);if(m<=1){var x=this.view.getCanvas().get("width"),b=this.view.getCanvas().get("height");h.verticalLimitLength=m*(y?x:b)}return h},e.prototype.getLineGridCfg=function(t,n,i,a){if(!!Qv(es(this.view.getTheme(),i),n)){var o=Jv(this.view.getTheme(),i),s=(0,c.b$)({container:(0,c.U2)(n,["top"])?this.gridForeContainer:this.gridContainer},o,(0,c.U2)(n,"grid"),this.getAnimateCfg(n));return s.items=Es(this.view.getCoordinate(),t,a,(0,c.U2)(s,"alignTick",!0)),s}},e.prototype.getCircleAxisCfg=function(t,n,i){var a=(0,c.U2)(n,["top"])?this.axisForeContainer:this.axisContainer,o=this.view.getCoordinate(),s=t.getTicks().map(function(y){return{id:"".concat(y.tickValue),name:y.text,value:y.value}});!t.isCategory&&Math.abs(o.endAngle-o.startAngle)===Math.PI*2&&s.pop();var l=nh(t,n),u=es(this.view.getTheme(),K.CIRCLE),f=(0,c.U2)(n,["title"])?(0,c.b$)({title:{style:{text:l}}},{title:eh(this.view.getTheme(),i,n.title)},n):n,h=(0,c.b$)((0,p.pi)((0,p.pi)({container:a},ru(this.view.getCoordinate())),{ticks:s,verticalFactor:1,theme:u}),u,f),v=this.getAnimateCfg(h),d=v.animate,g=v.animateOption;return h.animate=d,h.animateOption=g,h},e.prototype.getCircleGridCfg=function(t,n,i,a){if(!!Qv(es(this.view.getTheme(),i),n)){var o=Jv(this.view.getTheme(),K.RADIUS),s=(0,c.b$)({container:(0,c.U2)(n,["top"])?this.gridForeContainer:this.gridContainer,center:this.view.getCoordinate().getCenter()},o,(0,c.U2)(n,"grid"),this.getAnimateCfg(n)),l=(0,c.U2)(s,"alignTick",!0),u=a==="x"?this.view.getYScales()[0]:this.view.getXScale();return s.items=Wu(this.view.getCoordinate(),u,t,l,a),s}},e.prototype.getId=function(t,n){var i=this.view.getCoordinate();return"".concat(t,"-").concat(n,"-").concat(i.type)},e.prototype.getAnimateCfg=function(t){return{animate:this.view.getOptions().animate&&(0,c.U2)(t,"animate"),animateOption:t&&t.animateOption?(0,c.b$)({},tp,t.animateOption):tp}},e}(Ji),uC=lC;function ei(r,e,t){return t===K.TOP?[r.minX+r.width/2-e.width/2,r.minY]:t===K.BOTTOM?[r.minX+r.width/2-e.width/2,r.maxY-e.height]:t===K.LEFT?[r.minX,r.minY+r.height/2-e.height/2]:t===K.RIGHT?[r.maxX-e.width,r.minY+r.height/2-e.height/2]:t===K.TOP_LEFT||t===K.LEFT_TOP?[r.tl.x,r.tl.y]:t===K.TOP_RIGHT||t===K.RIGHT_TOP?[r.tr.x-e.width,r.tr.y]:t===K.BOTTOM_LEFT||t===K.LEFT_BOTTOM?[r.bl.x,r.bl.y-e.height]:t===K.BOTTOM_RIGHT||t===K.RIGHT_BOTTOM?[r.br.x-e.width,r.br.y-e.height]:[0,0]}function cC(r,e){if(e.isTransposed)switch(r){case DIRECTION.BOTTOM:return DIRECTION.LEFT;case DIRECTION.LEFT:return DIRECTION.BOTTOM;case DIRECTION.RIGHT:return DIRECTION.TOP;case DIRECTION.TOP:return DIRECTION.RIGHT}return r}function ep(r){return r===DIRECTION.LEFT?DIRECTION.RIGHT:r===DIRECTION.RIGHT?DIRECTION.LEFT:r}function rp(r){return r===DIRECTION.TOP?DIRECTION.BOTTOM:r===DIRECTION.BOTTOM?DIRECTION.TOP:r}function fC(r,e){var t=e.matrix[0],n=e.matrix[4],i=r;return t<0&&(i=ep(i)),n<0&&(i=rp(i)),i}function hC(r,e){var t=r;return e.isReflect("x")&&(t=ep(t)),e.isReflect("y")&&(t=rp(t)),t}function X_(r,e){var t=r;return t=cC(t,e),t=fC(t,e),t=hC(t,e),t}function np(r,e){return(0,c.jn)(r)?r===!1?!1:{}:(0,c.U2)(r,[e],r)}function Fs(r){return(0,c.U2)(r,"position",K.BOTTOM)}var vC=function(r){(0,p.ZT)(e,r);function e(t){var n=r.call(this,t)||this;return n.container=n.view.getLayer(tt.FORE).addGroup(),n}return Object.defineProperty(e.prototype,"name",{get:function(){return"legend"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){this.update()},e.prototype.layout=function(){var t=this;this.layoutBBox=this.view.viewBBox,(0,c.S6)(this.components,function(n){var i=n.component,a=n.direction,o=gu(a),s=i.get("maxWidthRatio"),l=i.get("maxHeightRatio"),u=t.getCategoryLegendSizeCfg(o,s,l),f=i.get("maxWidth"),h=i.get("maxHeight");i.update({maxWidth:Math.min(u.maxWidth,f||0),maxHeight:Math.min(u.maxHeight,h||0)});var v=i.get("padding"),d=i.getLayoutBBox(),g=new Tr(d.x,d.y,d.width,d.height).expand(v),y=(0,p.CR)(ei(t.view.viewBBox,g,a),2),m=y[0],x=y[1],b=(0,p.CR)(ei(t.layoutBBox,g,a),2),C=b[0],A=b[1],B=0,rt=0;a.startsWith("top")||a.startsWith("bottom")?(B=m,rt=A):(B=C,rt=x),i.setLocation({x:B+v[3],y:rt+v[0]}),t.layoutBBox=t.layoutBBox.cut(g,a)})},e.prototype.update=function(){var t=this;this.option=this.view.getOptions().legends;var n={},i=function(v,d,g){var y=t.getId(g.field),m=t.getComponentById(y);if(m){var x=void 0,b=np(t.option,g.field);b!==!1&&((0,c.U2)(b,"custom")?x=t.getCategoryCfg(v,d,g,b,!0):g.isLinear?x=t.getContinuousCfg(v,d,g,b):g.isCategory&&(x=t.getCategoryCfg(v,d,g,b))),x&&(Pr(x,["container"]),m.direction=Fs(b),m.component.update(x),n[y]=!0)}else{var C=t.createFieldLegend(v,d,g);C&&(C.component.init(),t.components.push(C),n[y]=!0)}};if((0,c.U2)(this.option,"custom")){var a="global-custom",o=this.getComponentById(a);if(o){var s=this.getCategoryCfg(void 0,void 0,void 0,this.option,!0);Pr(s,["container"]),o.component.update(s),n[a]=!0}else{var l=this.createCustomLegend(void 0,void 0,void 0,this.option);if(l){l.init();var u=tt.FORE,f=Fs(this.option);this.components.push({id:a,component:l,layer:u,direction:f,type:Ct.LEGEND,extra:void 0}),n[a]=!0}}}else this.loopLegends(i);var h=[];(0,c.S6)(this.getComponents(),function(v){n[v.id]?h.push(v):v.component.destroy()}),this.components=h},e.prototype.clear=function(){r.prototype.clear.call(this),this.container.clear()},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.container.remove(!0)},e.prototype.getGeometries=function(t){var n=this,i=t.geometries;return(0,c.S6)(t.views,function(a){i=i.concat(n.getGeometries(a))}),i},e.prototype.loopLegends=function(t){var n=this.view.getRootView()===this.view;if(!!n){var i=this.getGeometries(this.view),a={};(0,c.S6)(i,function(o){var s=o.getGroupAttributes();(0,c.S6)(s,function(l){var u=l.getScale(l.type);!u||u.type==="identity"||a[u.field]||(t(o,l,u),a[u.field]=!0)})})}},e.prototype.createFieldLegend=function(t,n,i){var a,o=np(this.option,i.field),s=tt.FORE,l=Fs(o);if(o!==!1&&((0,c.U2)(o,"custom")?a=this.createCustomLegend(t,n,i,o):i.isLinear?a=this.createContinuousLegend(t,n,i,o):i.isCategory&&(a=this.createCategoryLegend(t,n,i,o))),a)return a.set("field",i.field),{id:this.getId(i.field),component:a,layer:s,direction:l,type:Ct.LEGEND,extra:{scale:i}}},e.prototype.createCustomLegend=function(t,n,i,a){var o=this.getCategoryCfg(t,n,i,a,!0);return new Wf(o)},e.prototype.createContinuousLegend=function(t,n,i,a){var o=this.getContinuousCfg(t,n,i,Pr(a,["value"]));return new vx(o)},e.prototype.createCategoryLegend=function(t,n,i,a){var o=this.getCategoryCfg(t,n,i,a);return new Wf(o)},e.prototype.getContinuousCfg=function(t,n,i,a){var o=i.getTicks(),s=(0,c.sE)(o,function(y){return y.value===0}),l=(0,c.sE)(o,function(y){return y.value===1}),u=o.map(function(y){var m=y.value,x=y.tickValue,b=n.mapping(i.invert(m)).join("");return{value:x,attrValue:b,color:b,scaleValue:m}});s||u.push({value:i.min,attrValue:n.mapping(i.invert(0)).join(""),color:n.mapping(i.invert(0)).join(""),scaleValue:0}),l||u.push({value:i.max,attrValue:n.mapping(i.invert(1)).join(""),color:n.mapping(i.invert(1)).join(""),scaleValue:1}),u.sort(function(y,m){return y.value-m.value});var f={min:(0,c.YM)(u).value,max:(0,c.Z$)(u).value,colors:[],rail:{type:n.type},track:{}};n.type==="size"&&(f.track={style:{fill:n.type==="size"?this.view.getTheme().defaultColor:void 0}}),n.type==="color"&&(f.colors=u.map(function(y){return y.attrValue}));var h=this.container,v=Fs(a),d=gu(v),g=(0,c.U2)(a,"title");return g&&(g=(0,c.b$)({text:Ba(i)},g)),f.container=h,f.layout=d,f.title=g,f.animateOption=Qi,this.mergeLegendCfg(f,a,"continuous")},e.prototype.getCategoryCfg=function(t,n,i,a,o){var s=this.container,l=(0,c.U2)(a,"position",K.BOTTOM),u=Yh(this.view.getTheme(),l),f=(0,c.U2)(u,["marker"]),h=(0,c.U2)(a,"marker"),v=gu(l),d=(0,c.U2)(u,["pageNavigator"]),g=(0,c.U2)(a,"pageNavigator"),y=o?$1(f,h,a.items):Hh(this.view,t,n,f,h),m=(0,c.U2)(a,"title");m&&(m=(0,c.b$)({text:i?Ba(i):""},m));var x=(0,c.U2)(a,"maxWidthRatio"),b=(0,c.U2)(a,"maxHeightRatio"),C=this.getCategoryLegendSizeCfg(v,x,b);C.container=s,C.layout=v,C.items=y,C.title=m,C.animateOption=Qi,C.pageNavigator=(0,c.b$)({},d,g);var A=this.mergeLegendCfg(C,a,l);A.reversed&&A.items.reverse();var B=(0,c.U2)(A,"maxItemWidth");return B&&B<=1&&(A.maxItemWidth=this.view.viewBBox.width*B),A},e.prototype.mergeLegendCfg=function(t,n,i){var a=i.split("-")[0],o=Yh(this.view.getTheme(),a);return(0,c.b$)({},o,t,n)},e.prototype.getId=function(t){return"".concat(this.name,"-").concat(t)},e.prototype.getComponentById=function(t){return(0,c.sE)(this.components,function(n){return n.id===t})},e.prototype.getCategoryLegendSizeCfg=function(t,n,i){n===void 0&&(n=G),i===void 0&&(i=G);var a=this.view.viewBBox,o=a.width,s=a.height;return t==="vertical"?{maxWidth:o*n,maxHeight:s}:{maxWidth:o,maxHeight:s*i}},e}(Ji),pC=vC,dC=function(r){(0,p.ZT)(e,r);function e(t){var n=r.call(this,t)||this;return n.onChangeFn=c.ZT,n.resetMeasure=function(){n.clear()},n.onValueChange=function(i){var a=(0,p.CR)(i,2),o=a[0],s=a[1];n.start=o,n.end=s,n.changeViewData(o,s)},n.container=n.view.getLayer(tt.FORE).addGroup(),n.onChangeFn=(0,c.P2)(n.onValueChange,20,{leading:!0}),n.width=0,n.view.on(z.BEFORE_CHANGE_DATA,n.resetMeasure),n.view.on(z.BEFORE_CHANGE_SIZE,n.resetMeasure),n}return Object.defineProperty(e.prototype,"name",{get:function(){return"slider"},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){r.prototype.destroy.call(this),this.view.off(z.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(z.BEFORE_CHANGE_SIZE,this.resetMeasure)},e.prototype.init=function(){},e.prototype.render=function(){this.option=this.view.getOptions().slider;var t=this.getSliderCfg(),n=t.start,i=t.end;(0,c.UM)(this.start)&&(this.start=n,this.end=i);var a=this.view.getOptions().data;this.option&&!(0,c.xb)(a)?this.slider?this.slider=this.updateSlider():(this.slider=this.createSlider(),this.slider.component.on("sliderchange",this.onChangeFn)):this.slider&&(this.slider.component.destroy(),this.slider=void 0)},e.prototype.layout=function(){var t=this;if(this.option&&!this.width&&(this.measureSlider(),setTimeout(function(){t.view.destroyed||t.changeViewData(t.start,t.end)},0)),this.slider){var n=this.view.coordinateBBox.width,i=this.slider.component.get("padding"),a=(0,p.CR)(i,4),o=a[0],s=a[1],l=a[2],u=a[3],f=this.slider.component.getLayoutBBox(),h=new Tr(f.x,f.y,Math.min(f.width,n),f.height).expand(i),v=this.getMinMaxText(this.start,this.end),d=v.minText,g=v.maxText,y=(0,p.CR)(ei(this.view.viewBBox,h,K.BOTTOM),2),m=y[0],x=y[1],b=(0,p.CR)(ei(this.view.coordinateBBox,h,K.BOTTOM),2),C=b[0],A=b[1];this.slider.component.update((0,p.pi)((0,p.pi)({},this.getSliderCfg()),{x:C+u,y:x+o,width:this.width,start:this.start,end:this.end,minText:d,maxText:g})),this.view.viewBBox=this.view.viewBBox.cut(h,K.BOTTOM)}},e.prototype.update=function(){this.render()},e.prototype.createSlider=function(){var t=this.getSliderCfg(),n=new ox((0,p.pi)({container:this.container},t));return n.init(),{component:n,layer:tt.FORE,direction:K.BOTTOM,type:Ct.SLIDER}},e.prototype.updateSlider=function(){var t=this.getSliderCfg();if(this.width){var n=this.getMinMaxText(this.start,this.end),i=n.minText,a=n.maxText;t=(0,p.pi)((0,p.pi)({},t),{width:this.width,start:this.start,end:this.end,minText:i,maxText:a})}return this.slider.component.update(t),this.slider},e.prototype.measureSlider=function(){var t=this.getSliderCfg().width;this.width=t},e.prototype.getSliderCfg=function(){var t={height:16,start:0,end:1,minText:"",maxText:"",x:0,y:0,width:this.view.coordinateBBox.width};if((0,c.Kn)(this.option)){var n=(0,p.pi)({data:this.getData()},(0,c.U2)(this.option,"trendCfg",{}));t=(0,c.b$)({},t,this.getThemeOptions(),this.option),t=(0,p.pi)((0,p.pi)({},t),{trendCfg:n})}return t.start=(0,c.uZ)(Math.min((0,c.UM)(t.start)?0:t.start,(0,c.UM)(t.end)?1:t.end),0,1),t.end=(0,c.uZ)(Math.max((0,c.UM)(t.start)?0:t.start,(0,c.UM)(t.end)?1:t.end),0,1),t},e.prototype.getData=function(){var t=this.view.getOptions().data,n=(0,p.CR)(this.view.getYScales(),1),i=n[0],a=this.view.getGroupScales();if(a.length){var o=a[0],s=o.field,l=o.ticks;return t.reduce(function(u,f){return f[s]===l[0]&&u.push(f[i.field]),u},[])}return t.map(function(u){return u[i.field]||0})},e.prototype.getThemeOptions=function(){var t=this.view.getTheme();return(0,c.U2)(t,["components","slider","common"],{})},e.prototype.getMinMaxText=function(t,n){var i=this.view.getOptions().data,a=this.view.getXScale(),o=!0,s=(0,c.I)(i,a.field);a.isLinear&&(s=s.sort());var l=o?s:s.reverse(),u=(0,c.dp)(i);if(!a||!u)return{};var f=(0,c.dp)(l),h=Math.round(t*(f-1)),v=Math.round(n*(f-1)),d=(0,c.U2)(l,[h]),g=(0,c.U2)(l,[v]),y=this.getSliderCfg().formatter;return y&&(d=y(d,i[h],h),g=y(g,i[v],v)),{minText:d,maxText:g}},e.prototype.changeViewData=function(t,n){var i=this.view.getOptions().data,a=this.view.getXScale(),o=(0,c.dp)(i);if(!(!a||!o)){var s=!0,l=(0,c.I)(i,a.field),u=this.view.getXScale().isLinear?l.sort(function(g,y){return Number(g)-Number(y)}):l,f=s?u:u.reverse(),h=(0,c.dp)(f),v=Math.round(t*(h-1)),d=Math.round(n*(h-1));this.view.filter(a.field,function(g,y){var m=f.indexOf(g);return m>-1?Wi(m,v,d):!0}),this.view.render(!0)}},e.prototype.getComponents=function(){return this.slider?[this.slider]:[]},e.prototype.clear=function(){this.slider&&(this.slider.component.destroy(),this.slider=void 0),this.width=0,this.start=void 0,this.end=void 0},e}(Ji),gC=dC,Is=0,ip=8,yC=32,mC=20,xC=function(r){(0,p.ZT)(e,r);function e(t){var n=r.call(this,t)||this;return n.onChangeFn=c.ZT,n.resetMeasure=function(){n.clear()},n.onValueChange=function(i){var a=i.ratio,o=n.getValidScrollbarCfg().animate;n.ratio=(0,c.uZ)(a,0,1);var s=n.view.getOptions().animate;o||n.view.animate(!1),n.changeViewData(n.getScrollRange(),!0),n.view.animate(s)},n.container=n.view.getLayer(tt.FORE).addGroup(),n.onChangeFn=(0,c.P2)(n.onValueChange,20,{leading:!0}),n.trackLen=0,n.thumbLen=0,n.ratio=0,n.view.on(z.BEFORE_CHANGE_DATA,n.resetMeasure),n.view.on(z.BEFORE_CHANGE_SIZE,n.resetMeasure),n}return Object.defineProperty(e.prototype,"name",{get:function(){return"scrollbar"},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){r.prototype.destroy.call(this),this.view.off(z.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(z.BEFORE_CHANGE_SIZE,this.resetMeasure)},e.prototype.init=function(){},e.prototype.render=function(){this.option=this.view.getOptions().scrollbar,this.option?this.scrollbar?this.scrollbar=this.updateScrollbar():(this.scrollbar=this.createScrollbar(),this.scrollbar.component.on("scrollchange",this.onChangeFn)):this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0)},e.prototype.layout=function(){var t=this;if(this.option&&!this.trackLen&&(this.measureScrollbar(),setTimeout(function(){t.view.destroyed||t.changeViewData(t.getScrollRange(),!0)})),this.scrollbar){var n=this.view.coordinateBBox.width,i=this.scrollbar.component.get("padding"),a=this.scrollbar.component.getLayoutBBox(),o=new Tr(a.x,a.y,Math.min(a.width,n),a.height).expand(i),s=this.getScrollbarComponentCfg(),l=void 0,u=void 0;if(s.isHorizontal){var f=(0,p.CR)(ei(this.view.viewBBox,o,K.BOTTOM),2),h=f[0],v=f[1],d=(0,p.CR)(ei(this.view.coordinateBBox,o,K.BOTTOM),2),g=d[0],y=d[1];l=g,u=v}else{var m=(0,p.CR)(ei(this.view.viewBBox,o,K.RIGHT),2),h=m[0],v=m[1],x=(0,p.CR)(ei(this.view.viewBBox,o,K.RIGHT),2),g=x[0],y=x[1];l=g,u=v}l+=i[3],u+=i[0],this.trackLen?this.scrollbar.component.update((0,p.pi)((0,p.pi)({},s),{x:l,y:u,trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio})):this.scrollbar.component.update((0,p.pi)((0,p.pi)({},s),{x:l,y:u})),this.view.viewBBox=this.view.viewBBox.cut(o,s.isHorizontal?K.BOTTOM:K.RIGHT)}},e.prototype.update=function(){this.render()},e.prototype.getComponents=function(){return this.scrollbar?[this.scrollbar]:[]},e.prototype.clear=function(){this.scrollbar&&(this.scrollbar.component.destroy(),this.scrollbar=void 0),this.trackLen=0,this.thumbLen=0,this.ratio=0,this.cnt=0,this.step=0,this.data=void 0,this.xScaleCfg=void 0,this.yScalesCfg=[]},e.prototype.setValue=function(t){this.onValueChange({ratio:t})},e.prototype.getValue=function(){return this.ratio},e.prototype.getThemeOptions=function(){var t=this.view.getTheme();return(0,c.U2)(t,["components","scrollbar","common"],{})},e.prototype.getScrollbarTheme=function(t){var n=(0,c.U2)(this.view.getTheme(),["components","scrollbar"]),i=t||{},a=i.thumbHighlightColor,o=(0,p._T)(i,["thumbHighlightColor"]);return{default:(0,c.b$)({},(0,c.U2)(n,["default","style"],{}),o),hover:(0,c.b$)({},(0,c.U2)(n,["hover","style"],{}),{thumbColor:a})}},e.prototype.measureScrollbar=function(){var t=this.view.getXScale(),n=this.view.getYScales().slice();this.data=this.getScrollbarData(),this.step=this.getStep(),this.cnt=this.getCnt();var i=this.getScrollbarComponentCfg(),a=i.trackLen,o=i.thumbLen;this.trackLen=a,this.thumbLen=o,this.xScaleCfg={field:t.field,values:t.values||[]},this.yScalesCfg=n},e.prototype.getScrollRange=function(){var t=Math.floor((this.cnt-this.step)*(0,c.uZ)(this.ratio,0,1)),n=Math.min(t+this.step-1,this.cnt-1);return[t,n]},e.prototype.changeViewData=function(t,n){var i=this,a=(0,p.CR)(t,2),o=a[0],s=a[1],l=this.getValidScrollbarCfg().type,u=l!=="vertical",f=(0,c.I)(this.data,this.xScaleCfg.field),h=this.view.getXScale().isLinear?f.sort(function(d,g){return Number(d)-Number(g)}):f,v=u?h:h.reverse();this.yScalesCfg.forEach(function(d){i.view.scale(d.field,{formatter:d.formatter,type:d.type,min:d.min,max:d.max,tickMethod:d.tickMethod})}),this.view.filter(this.xScaleCfg.field,function(d){var g=v.indexOf(d);return g>-1?Wi(g,o,s):!0}),this.view.render(!0)},e.prototype.createScrollbar=function(){var t=this.getValidScrollbarCfg().type,n=t!=="vertical",i=new lx((0,p.pi)((0,p.pi)({container:this.container},this.getScrollbarComponentCfg()),{x:0,y:0}));return i.init(),{component:i,layer:tt.FORE,direction:n?K.BOTTOM:K.RIGHT,type:Ct.SCROLLBAR}},e.prototype.updateScrollbar=function(){var t=this.getScrollbarComponentCfg(),n=this.trackLen?(0,p.pi)((0,p.pi)({},t),{trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio}):(0,p.pi)({},t);return this.scrollbar.component.update(n),this.scrollbar},e.prototype.getStep=function(){if(this.step)return this.step;var t=this.view.coordinateBBox,n=this.getValidScrollbarCfg(),i=n.type,a=n.categorySize,o=i!=="vertical";return Math.floor((o?t.width:t.height)/a)},e.prototype.getCnt=function(){if(this.cnt)return this.cnt;var t=this.view.getXScale(),n=this.getScrollbarData(),i=(0,c.I)(n,t.field);return(0,c.dp)(i)},e.prototype.getScrollbarComponentCfg=function(){var t=this.view,n=t.coordinateBBox,i=t.viewBBox,a=this.getValidScrollbarCfg(),o=a.type,s=a.padding,l=a.width,u=a.height,f=a.style,h=o!=="vertical",v=(0,p.CR)(s,4),d=v[0],g=v[1],y=v[2],m=v[3],x=h?{x:n.minX+m,y:i.maxY-u-y}:{x:i.maxX-l-g,y:n.minY+d},b=this.getStep(),C=this.getCnt(),A=h?n.width-m-g:n.height-d-y,B=Math.max(A*(0,c.uZ)(b/C,0,1),mC);return(0,p.pi)((0,p.pi)({},this.getThemeOptions()),{x:x.x,y:x.y,size:h?u:l,isHorizontal:h,trackLen:A,thumbLen:B,thumbOffset:0,theme:this.getScrollbarTheme(f)})},e.prototype.getValidScrollbarCfg=function(){var t={type:"horizontal",categorySize:yC,width:ip,height:ip,padding:[0,0,0,0],animate:!0,style:{}};return(0,c.Kn)(this.option)&&(t=(0,p.pi)((0,p.pi)({},t),this.option)),(!(0,c.Kn)(this.option)||!this.option.padding)&&(t.padding=t.type==="horizontal"?[Is,0,Is,0]:[0,Is,0,Is]),t},e.prototype.getScrollbarData=function(){var t=this.view.getCoordinate(),n=this.getValidScrollbarCfg(),i=this.view.getOptions().data||[];return t.isReflect("y")&&n.type==="vertical"&&(i=(0,p.ev)([],(0,p.CR)(i),!1).reverse()),i},e}(Ji),wC=xC,SC={fill:"#CCD6EC",opacity:.3};function bC(r,e,t){var n,i,a,o,s,l,u=v1(r,e,t);if(u.length){u=(0,c.xH)(u);try{for(var f=(0,p.XA)(u),h=f.next();!h.done;h=f.next()){var v=h.value;try{for(var d=(a=void 0,(0,p.XA)(v)),g=d.next();!g.done;g=d.next()){var y=g.value,m=y.mappingData,x=m.x,b=m.y;y.x=(0,c.kJ)(x)?x[x.length-1]:x,y.y=(0,c.kJ)(b)?b[b.length-1]:b}}catch(Ft){a={error:Ft}}finally{try{g&&!g.done&&(o=d.return)&&o.call(d)}finally{if(a)throw a.error}}}}catch(Ft){n={error:Ft}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}var C=t.shared;if(C===!1&&u.length>1){var A=u[0],B=Math.abs(e.y-A[0].y);try{for(var rt=(0,p.XA)(u),lt=rt.next();!lt.done;lt=rt.next()){var xt=lt.value,kt=Math.abs(e.y-xt[0].y);kt<=B&&(A=xt,B=kt)}}catch(Ft){s={error:Ft}}finally{try{lt&&!lt.done&&(l=rt.return)&&l.call(rt)}finally{if(s)throw s.error}}u=[A]}return(0,c.jj)((0,c.xH)(u))}return[]}var MC=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.show=function(t){var n=this.context.view,i=this.context.event,a=n.getController("tooltip").getTooltipCfg(),o=bC(n,{x:i.x,y:i.y},a);if(!(0,c.Xy)(o,this.items)&&(this.items=o,o.length)){var s=n.getXScale().field,l=o[0].data[s],u=[],f=n.geometries;if((0,c.S6)(f,function(xe){if(xe.type==="interval"||xe.type==="schema"){var ve=xe.getElementsBy(function(ge){var Te=ge.getData();return Te[s]===l});u=u.concat(ve)}}),u.length){var h=n.getCoordinate(),v=u[0].shape.getCanvasBBox(),d=u[0].shape.getCanvasBBox(),g=v;(0,c.S6)(u,function(xe){var ve=xe.shape.getCanvasBBox();h.isTransposed?(ve.minYd.maxY&&(d=ve)):(ve.minXd.maxX&&(d=ve)),g.x=Math.min(ve.minX,g.minX),g.y=Math.min(ve.minY,g.minY),g.width=Math.max(ve.maxX,g.maxX)-g.x,g.height=Math.max(ve.maxY,g.maxY)-g.y});var y=n.backgroundGroup,m=n.coordinateBBox,x=void 0;if(h.isRect){var b=n.getXScale(),C=t||{},A=C.appendRatio,B=C.appendWidth;(0,c.UM)(B)&&(A=(0,c.UM)(A)?b.isLinear?0:.25:A,B=h.isTransposed?A*d.height:A*v.width);var rt=void 0,lt=void 0,xt=void 0,kt=void 0;h.isTransposed?(rt=m.minX,lt=Math.min(d.minY,v.minY)-B,xt=m.width,kt=g.height+B*2):(rt=Math.min(v.minX,d.minX)-B,lt=m.minY,xt=g.width+B*2,kt=m.height),x=[["M",rt,lt],["L",rt+xt,lt],["L",rt+xt,lt+kt],["L",rt,lt+kt],["Z"]]}else{var Ft=(0,c.YM)(u),Xt=(0,c.Z$)(u),ae=ka(Ft.getModel(),h).startAngle,we=ka(Xt.getModel(),h).endAngle,Se=h.getCenter(),Re=h.getRadius(),Qt=h.innerRadius*Re;x=Wn(Se.x,Se.y,Re,ae,we,Qt)}if(this.regionPath)this.regionPath.attr("path",x),this.regionPath.show();else{var he=(0,c.U2)(t,"style",SC);this.regionPath=y.addShape({type:"path",name:"active-region",capture:!1,attrs:(0,p.pi)((0,p.pi)({},he),{path:x})})}}}},e.prototype.hide=function(){this.regionPath&&this.regionPath.hide(),this.items=null},e.prototype.destroy=function(){this.hide(),this.regionPath&&this.regionPath.remove(!0),r.prototype.destroy.call(this)},e}(er),CC=MC,AC=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.timeStamp=0,t}return e.prototype.show=function(){var t=this.context,n=t.event,i=t.view,a=i.isTooltipLocked();if(!a){var o=this.timeStamp,s=+new Date,l=(0,c.U2)(t.view.getOptions(),"tooltip.showDelay",16);if(s-o>l){var u=this.location,f={x:n.x,y:n.y};(!u||!(0,c.Xy)(u,f))&&this.showTooltip(i,f),this.timeStamp=s,this.location=f}}},e.prototype.hide=function(){var t=this.context.view,n=t.getController("tooltip"),i=this.context.event,a=i.clientX,o=i.clientY;n.isCursorEntered({x:a,y:o})||t.isTooltipLocked()||(this.hideTooltip(t),this.location=null)},e.prototype.showTooltip=function(t,n){t.showTooltip(n)},e.prototype.hideTooltip=function(t){t.hideTooltip()},e}(er),ap=AC,TC=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.showTooltip=function(t,n){var i=dn(t);(0,c.S6)(i,function(a){var o=su(t,a,n);a.showTooltip(o)})},e.prototype.hideTooltip=function(t){var n=dn(t);(0,c.S6)(n,function(i){i.hideTooltip()})},e}(ap),EC=TC,FC=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.timeStamp=0,t}return e.prototype.destroy=function(){r.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.show=function(){var t=this.context,n=t.event,i=this.timeStamp,a=+new Date;if(a-i>16){var o=this.location,s={x:n.x,y:n.y};(!o||!(0,c.Xy)(o,s))&&this.showTooltip(s),this.timeStamp=a,this.location=s}},e.prototype.hide=function(){this.hideTooltip(),this.location=null},e.prototype.showTooltip=function(t){var n=this.context,i=n.event,a=i.target;if(a&&a.get("tip")){this.tooltip||this.renderTooltip();var o=a.get("tip");this.tooltip.update((0,p.pi)({title:o},t)),this.tooltip.show()}},e.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,n=this.context.view,i=n.canvas,a={start:{x:0,y:0},end:{x:i.get("width"),y:i.get("height")}},o=n.getTheme(),s=(0,c.U2)(o,["components","tooltip","domStyles"],{}),l=new Jo({parent:i.get("el").parentNode,region:a,visible:!1,crosshairs:null,domStyles:(0,p.pi)({},(0,c.b$)({},s,(t={},t[Ln]={"max-width":"50%"},t[Dn]={"word-break":"break-all"},t)))});l.init(),l.setCapture(!1),this.tooltip=l},e}(er),IC=FC,LC=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="",t}return e.prototype.hasState=function(t){return t.hasState(this.stateName)},e.prototype.setElementState=function(t,n){t.setState(this.stateName,n)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.clear=function(){var t=this.context.view;this.clearViewState(t)},e.prototype.clearViewState=function(t){var n=this,i=fh(t,this.stateName);(0,c.S6)(i,function(a){n.setElementState(a,!1)})},e}(er),Zu=LC;function op(r){return(0,c.U2)(r.get("delegateObject"),"item")}var DC=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.ignoreListItemStates=["unchecked"],t}return e.prototype.isItemIgnore=function(t,n){var i=this.ignoreListItemStates,a=i.filter(function(o){return n.hasState(t,o)});return!!a.length},e.prototype.setStateByComponent=function(t,n,i){var a=this.context.view,o=t.get("field"),s=mr(a);this.setElementsStateByItem(s,o,n,i)},e.prototype.setStateByElement=function(t,n){this.setElementState(t,n)},e.prototype.isMathItem=function(t,n,i){var a=this.context.view,o=qi(a,n),s=en(t,n);return!(0,c.UM)(s)&&i.name===o.getText(s)},e.prototype.setElementsStateByItem=function(t,n,i,a){var o=this;(0,c.S6)(t,function(s){o.isMathItem(s,n,i)&&s.setState(o.stateName,a)})},e.prototype.setStateEnable=function(t){var n=jn(this.context);if(n)lh(this.context)&&this.setStateByElement(n,t);else{var i=yi(this.context);if(Na(i)){var a=i.item,o=i.component;if(a&&o&&!this.isItemIgnore(a,o)){var s=this.context.event.gEvent;if(s&&s.fromShape&&s.toShape&&op(s.fromShape)===op(s.toShape))return;this.setStateByComponent(o,a,t)}}}},e.prototype.toggle=function(){var t=jn(this.context);if(t){var n=t.hasState(this.stateName);this.setElementState(t,!n)}},e.prototype.reset=function(){this.setStateEnable(!1)},e}(Zu),ju=DC,PC=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="active",t}return e.prototype.active=function(){this.setState()},e}(ju),OC=PC,kC=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.cache={},t}return e.prototype.getColorScale=function(t,n){var i=n.geometry.getAttribute("color");if(!i)return null;var a=t.getScaleByField(i.getFields()[0]);return a},e.prototype.getLinkPath=function(t,n){var i=this.context.view,a=i.getCoordinate().isTransposed,o=t.shape.getCanvasBBox(),s=n.shape.getCanvasBBox(),l=a?[["M",o.minX,o.minY],["L",s.minX,s.maxY],["L",s.maxX,s.maxY],["L",o.maxX,o.minY],["Z"]]:[["M",o.maxX,o.minY],["L",s.minX,s.minY],["L",s.minX,s.maxY],["L",o.maxX,o.maxY],["Z"]];return l},e.prototype.addLinkShape=function(t,n,i,a){var o={opacity:.4,fill:n.shape.attr("fill")};t.addShape({type:"path",attrs:(0,p.pi)((0,p.pi)({},(0,c.b$)({},o,(0,c.mf)(a)?a(o,n):a)),{path:this.getLinkPath(n,i)})})},e.prototype.linkByElement=function(t,n){var i=this,a=this.context.view,o=this.getColorScale(a,t);if(!!o){var s=en(t,o.field);if(!this.cache[s]){var l=Vx(a,o.field,s),u=this.linkGroup,f=u.addGroup();this.cache[s]=f;var h=l.length;(0,c.S6)(l,function(v,d){if(d=0},n)},e}($u),lp=ZC,jC=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="active",t}return e.prototype.highlight=function(){this.setState()},e.prototype.setElementState=function(t,n){var i=this.context.view,a=mr(i);sp(a,function(o){return t===o},n)},e.prototype.clear=function(){var t=this.context.view;Ku(t)},e}(qu),$C=jC,qC=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="selected",t}return e.prototype.selected=function(){this.setState()},e}($u),KC=qC,JC=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="selected",t}return e.prototype.selected=function(){this.setState()},e}(ju),QC=JC,tA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="selected",t}return e.prototype.selected=function(){this.setState()},e}(qu),eA=tA,rA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="",t.ignoreItemStates=[],t}return e.prototype.getTriggerListInfo=function(){var t=yi(this.context),n=null;return Na(t)&&(n={item:t.item,list:t.component}),n},e.prototype.getAllowComponents=function(){var t=this,n=this.context.view,i=vh(n),a=[];return(0,c.S6)(i,function(o){o.isList()&&t.allowSetStateByElement(o)&&a.push(o)}),a},e.prototype.hasState=function(t,n){return t.hasState(n,this.stateName)},e.prototype.clearAllComponentsState=function(){var t=this,n=this.getAllowComponents();(0,c.S6)(n,function(i){i.clearItemsState(t.stateName)})},e.prototype.allowSetStateByElement=function(t){var n=t.get("field");if(!n)return!1;if(this.cfg&&this.cfg.componentNames){var i=t.get("name");if(this.cfg.componentNames.indexOf(i)===-1)return!1}var a=this.context.view,o=qi(a,n);return o&&o.isCategory},e.prototype.allowSetStateByItem=function(t,n){var i=this.ignoreItemStates;if(i.length){var a=i.filter(function(o){return n.hasState(t,o)});return a.length===0}return!0},e.prototype.setStateByElement=function(t,n,i){var a=t.get("field"),o=this.context.view,s=qi(o,a),l=en(n,a),u=s.getText(l);this.setItemsState(t,u,i)},e.prototype.setStateEnable=function(t){var n=this,i=jn(this.context);if(i){var a=this.getAllowComponents();(0,c.S6)(a,function(u){n.setStateByElement(u,i,t)})}else{var o=yi(this.context);if(Na(o)){var s=o.item,l=o.component;this.allowSetStateByElement(l)&&this.allowSetStateByItem(s,l)&&this.setItemState(l,s,t)}}},e.prototype.setItemsState=function(t,n,i){var a=this,o=t.getItems();(0,c.S6)(o,function(s){s.name===n&&a.setItemState(t,s,i)})},e.prototype.setItemState=function(t,n,i){t.setItemState(n,this.stateName,i)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.reset=function(){this.setStateEnable(!1)},e.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var n=t.list,i=t.item,a=this.hasState(n,i);this.setItemState(n,i,!a)}},e.prototype.clear=function(){var t=this.getTriggerListInfo();t?t.list.clearItemsState(this.stateName):this.clearAllComponentsState()},e}(er),Mi=rA,nA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="active",t}return e.prototype.active=function(){this.setState()},e}(Mi),iA=nA,up="inactive",cp="active";function aA(r){var e=r.getItems();(0,c.S6)(e,function(t){r.hasState(t,cp)&&r.setItemState(t,cp,!1),r.hasState(t,up)&&r.setItemState(t,up,!1)})}var Ka="inactive",Ci="active",oA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName=Ci,t.ignoreItemStates=["unchecked"],t}return e.prototype.setItemsState=function(t,n,i){this.setHighlightBy(t,function(a){return a.name===n},i)},e.prototype.setItemState=function(t,n,i){var a=t.getItems();this.setHighlightBy(t,function(o){return o===n},i)},e.prototype.setHighlightBy=function(t,n,i){var a=t.getItems();if(i)(0,c.S6)(a,function(l){n(l)?(t.hasState(l,Ka)&&t.setItemState(l,Ka,!1),t.setItemState(l,Ci,!0)):t.hasState(l,Ci)||t.setItemState(l,Ka,!0)});else{var o=t.getItemsByState(Ci),s=!0;(0,c.S6)(o,function(l){if(!n(l))return s=!1,!1}),s?this.clear():(0,c.S6)(a,function(l){n(l)&&(t.hasState(l,Ci)&&t.setItemState(l,Ci,!1),t.setItemState(l,Ka,!0))})}},e.prototype.highlight=function(){this.setState()},e.prototype.clear=function(){var t=this.getTriggerListInfo();if(t)aA(t.list);else{var n=this.getAllowComponents();(0,c.S6)(n,function(i){i.clearItemsState(Ci),i.clearItemsState(Ka)})}},e}(Mi),Qu=oA,sA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="selected",t}return e.prototype.selected=function(){this.setState()},e}(Mi),lA=sA,uA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName="unchecked",t}return e.prototype.unchecked=function(){this.setState()},e}(Mi),cA=uA,ra="unchecked",Ls="checked",fA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.stateName=Ls,t}return e.prototype.setItemState=function(t,n,i){this.setCheckedBy(t,function(a){return a===n},i)},e.prototype.setCheckedBy=function(t,n,i){var a=t.getItems();i&&(0,c.S6)(a,function(o){n(o)?(t.hasState(o,ra)&&t.setItemState(o,ra,!1),t.setItemState(o,Ls,!0)):t.hasState(o,Ls)||t.setItemState(o,ra,!0)})},e.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var n=t.list,i=t.item,a=!(0,c.G)(n.getItems(),function(o){return n.hasState(o,ra)});a||n.hasState(i,ra)?this.setItemState(n,i,!0):this.reset()}},e.prototype.checked=function(){this.setState()},e.prototype.reset=function(){var t=this.getAllowComponents();(0,c.S6)(t,function(n){n.clearItemsState(Ls),n.clearItemsState(ra)})},e}(Mi),hA=fA,na="unchecked",vA=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.toggle=function(){var t,n,i,a,o,s,l,u,f=this.getTriggerListInfo();if(f==null?void 0:f.item){var h=f.list,v=f.item,d=h.getItems(),g=d.filter(function(Ft){return!h.hasState(Ft,na)}),y=d.filter(function(Ft){return h.hasState(Ft,na)}),m=g[0];if(d.length===g.length)try{for(var x=(0,p.XA)(d),b=x.next();!b.done;b=x.next()){var C=b.value;h.setItemState(C,na,C.id!==v.id)}}catch(Ft){t={error:Ft}}finally{try{b&&!b.done&&(n=x.return)&&n.call(x)}finally{if(t)throw t.error}}else if(d.length-y.length==1)if(m.id===v.id)try{for(var A=(0,p.XA)(d),B=A.next();!B.done;B=A.next()){var C=B.value;h.setItemState(C,na,!1)}}catch(Ft){i={error:Ft}}finally{try{B&&!B.done&&(a=A.return)&&a.call(A)}finally{if(i)throw i.error}}else try{for(var rt=(0,p.XA)(d),lt=rt.next();!lt.done;lt=rt.next()){var C=lt.value;h.setItemState(C,na,C.id!==v.id)}}catch(Ft){o={error:Ft}}finally{try{lt&&!lt.done&&(s=rt.return)&&s.call(rt)}finally{if(o)throw o.error}}else try{for(var xt=(0,p.XA)(d),kt=xt.next();!kt.done;kt=xt.next()){var C=kt.value;h.setItemState(C,na,C.id!==v.id)}}catch(Ft){l={error:Ft}}finally{try{kt&&!kt.done&&(u=xt.return)&&u.call(xt)}finally{if(l)throw l.error}}}},e}(Mi),pA=vA,fp="showRadio",tc="legend-radio-tip",dA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.timeStamp=0,t}return e.prototype.show=function(){var t=this.getTriggerListInfo();if(t==null?void 0:t.item){var n=t.list,i=t.item;n.setItemState(i,fp,!0)}},e.prototype.hide=function(){var t=this.getTriggerListInfo();if(t==null?void 0:t.item){var n=t.list,i=t.item;n.setItemState(i,fp,!1)}},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.showTip=function(){var t=this.context,n=t.event,i=this.timeStamp,a=+new Date,o=this.context.event.target;if(a-i>16&&o.get("name")==="legend-item-radio"){var s=this.location,l={x:n.x,y:n.y};this.timeStamp=a,this.location=l,(!s||!(0,c.Xy)(s,l))&&this.showTooltip(l)}},e.prototype.hideTip=function(){this.hideTooltip(),this.location=null},e.prototype.showTooltip=function(t){var n=this.context,i=n.event,a=i.target;if(a&&a.get("tip")){this.tooltip||this.renderTooltip();var o=n.view.getCanvas().get("el").getBoundingClientRect(),s=o.x,l=o.y;this.tooltip.update((0,p.pi)((0,p.pi)({title:a.get("tip")},t),{x:t.x+s,y:t.y+l})),this.tooltip.show()}},e.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,n=(t={},t[Ln]={padding:"6px 8px",transform:"translate(-50%, -80%)",background:"rgba(0,0,0,0.75)",color:"#fff","border-radius":"2px","z-index":100},t[Dn]={"font-size":"12px","line-height":"14px","margin-bottom":0,"word-break":"break-all"},t);document.getElementById(tc)&&document.body.removeChild(document.getElementById(tc));var i=new Jo({parent:document.body,region:null,visible:!1,crosshairs:null,domStyles:n,containerId:tc});i.init(),i.setCapture(!1),this.tooltip=i},e}(Mi),gA=dA,yA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.maskShape=null,t.points=[],t.starting=!1,t.moving=!1,t.preMovePoint=null,t.shapeType="path",t}return e.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},e.prototype.emitEvent=function(t){var n="mask:".concat(t),i=this.context.view,a=this.context.event;i.emit(n,{target:this.maskShape,shape:this.maskShape,points:this.points,x:a.x,y:a.y})},e.prototype.createMask=function(){var t=this.context.view,n=this.getMaskAttrs(),i=t.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:(0,p.pi)({fill:"#C5D4EB",opacity:.3},n)});return i},e.prototype.getMaskPath=function(){return[]},e.prototype.show=function(){this.maskShape&&(this.maskShape.show(),this.emitEvent("show"))},e.prototype.start=function(t){this.starting=!0,this.moving=!1,this.points=[this.getCurrentPoint()],this.maskShape||(this.maskShape=this.createMask(),this.maskShape.set("capture",!1)),this.updateMask(t==null?void 0:t.maskStyle),this.emitEvent("start")},e.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint()},e.prototype.move=function(){if(!(!this.moving||!this.maskShape)){var t=this.getCurrentPoint(),n=this.preMovePoint,i=t.x-n.x,a=t.y-n.y,o=this.points;(0,c.S6)(o,function(s){s.x+=i,s.y+=a}),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t}},e.prototype.updateMask=function(t){var n=(0,c.b$)({},this.getMaskAttrs(),t);this.maskShape.attr(n)},e.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null},e.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.maskShape&&this.maskShape.set("capture",!0)},e.prototype.hide=function(){this.maskShape&&(this.maskShape.hide(),this.emitEvent("hide"))},e.prototype.resize=function(){this.starting&&this.maskShape&&(this.points.push(this.getCurrentPoint()),this.updateMask(),this.emitEvent("change"))},e.prototype.destroy=function(){this.points=[],this.maskShape&&this.maskShape.remove(),this.maskShape=null,this.preMovePoint=null,r.prototype.destroy.call(this)},e}(er),ec=yA,mA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.shapeType="circle",t}return e.prototype.getMaskAttrs=function(){var t=this.points,n=(0,c.Z$)(this.points),i=0,a=0,o=0;if(t.length){var s=t[0];i=ou(s,n)/2,a=(n.x+s.x)/2,o=(n.y+s.y)/2}return{x:a,y:o,r:i}},e}(ec),xA=mA,wA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.shapeType="rect",t}return e.prototype.getRegion=function(){var t=this.points;return{start:(0,c.YM)(t),end:(0,c.Z$)(t)}},e.prototype.getMaskAttrs=function(){var t=this.getRegion(),n=t.start,i=t.end,a=Math.min(n.x,i.x),o=Math.min(n.y,i.y),s=Math.abs(i.x-n.x),l=Math.abs(i.y-n.y);return{x:a,y:o,width:s,height:l}},e}(ec),hp=wA;function vp(r){r.x=(0,c.uZ)(r.x,0,1),r.y=(0,c.uZ)(r.y,0,1)}var SA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.dim="x",t.inPlot=!0,t}return e.prototype.getRegion=function(){var t=null,n=null,i=this.points,a=this.dim,o=this.context.view.getCoordinate(),s=o.invert((0,c.YM)(i)),l=o.invert((0,c.Z$)(i));return this.inPlot&&(vp(s),vp(l)),a==="x"?(t=o.convert({x:s.x,y:0}),n=o.convert({x:l.x,y:1})):(t=o.convert({x:0,y:s.y}),n=o.convert({x:1,y:l.y})),{start:t,end:n}},e}(hp),pp=SA,bA=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getMaskPath=function(){var t=this.points,n=[];return t.length&&((0,c.S6)(t,function(i,a){a===0?n.push(["M",i.x,i.y]):n.push(["L",i.x,i.y])}),n.push(["L",t[0].x,t[0].y])),n},e.prototype.getMaskAttrs=function(){return{path:this.getMaskPath()}},e.prototype.addPoint=function(){this.resize()},e}(ec),dp=bA,MA=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getMaskPath=function(){var t=this.points;return Yx(t,!0)},e}(dp),CA=MA,AA=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.setCursor=function(t){var n=this.context.view;n.getCanvas().setCursor(t)},e.prototype.default=function(){this.setCursor("default")},e.prototype.pointer=function(){this.setCursor("pointer")},e.prototype.move=function(){this.setCursor("move")},e.prototype.crosshair=function(){this.setCursor("crosshair")},e.prototype.wait=function(){this.setCursor("wait")},e.prototype.help=function(){this.setCursor("help")},e.prototype.text=function(){this.setCursor("text")},e.prototype.eResize=function(){this.setCursor("e-resize")},e.prototype.wResize=function(){this.setCursor("w-resize")},e.prototype.nResize=function(){this.setCursor("n-resize")},e.prototype.sResize=function(){this.setCursor("s-resize")},e.prototype.neResize=function(){this.setCursor("ne-resize")},e.prototype.nwResize=function(){this.setCursor("nw-resize")},e.prototype.seResize=function(){this.setCursor("se-resize")},e.prototype.swResize=function(){this.setCursor("sw-resize")},e.prototype.nsResize=function(){this.setCursor("ns-resize")},e.prototype.ewResize=function(){this.setCursor("ew-resize")},e.prototype.zoomIn=function(){this.setCursor("zoom-in")},e.prototype.zoomOut=function(){this.setCursor("zoom-out")},e}(er),TA=AA,EA=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.filterView=function(t,n,i){var a=this;t.getScaleByField(n)&&t.filter(n,i),t.views&&t.views.length&&(0,c.S6)(t.views,function(o){a.filterView(o,n,i)})},e.prototype.filter=function(){var t=yi(this.context);if(t){var n=this.context.view,i=t.component,a=i.get("field");if(Na(t)){if(a){var o=i.getItemsByState("unchecked"),s=qi(n,a),l=o.map(function(d){return d.name});l.length?this.filterView(n,a,function(d){var g=s.getText(d);return!l.includes(g)}):this.filterView(n,a,null),n.render(!0)}}else if(uh(t)){var u=i.getValue(),f=(0,p.CR)(u,2),h=f[0],v=f[1];this.filterView(n,a,function(d){return d>=h&&d<=v}),n.render(!0)}}},e}(er),FA=EA;function gp(r,e,t,n){var i=Math.min(t[e],n[e]),a=Math.max(t[e],n[e]),o=(0,p.CR)(r.range,2),s=o[0],l=o[1];if(il&&(a=l),i===l&&a===l)return null;var u=r.invert(i),f=r.invert(a);if(r.isCategory){var h=r.values.indexOf(u),v=r.values.indexOf(f),d=r.values.slice(h,v+1);return function(g){return d.includes(g)}}else return function(g){return g>=u&&g<=f}}var _r;(function(r){r.FILTER="brush-filter-processing",r.RESET="brush-filter-reset",r.BEFORE_FILTER="brush-filter:beforefilter",r.AFTER_FILTER="brush-filter:afterfilter",r.BEFORE_RESET="brush-filter:beforereset",r.AFTER_RESET="brush-filter:afterreset"})(_r||(_r={}));var IA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.dims=["x","y"],t.startPoint=null,t.isStarted=!1,t}return e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.start=function(){var t=this.context;this.isStarted=!0,this.startPoint=t.getCurrentPoint()},e.prototype.filter=function(){var t,n;if(za(this.context)){var i=this.context.event.target,a=i.getCanvasBBox();t={x:a.x,y:a.y},n={x:a.maxX,y:a.maxY}}else{if(!this.isStarted)return;t=this.startPoint,n=this.context.getCurrentPoint()}if(!(Math.abs(t.x-n.x)<5||Math.abs(t.x-n.y)<5)){var o=this.context,s=o.view,l=o.event,u={view:s,event:l,dims:this.dims};s.emit(_r.BEFORE_FILTER,ar.fromData(s,_r.BEFORE_FILTER,u));var f=s.getCoordinate(),h=f.invert(n),v=f.invert(t);if(this.hasDim("x")){var d=s.getXScale(),g=gp(d,"x",h,v);this.filterView(s,d.field,g)}if(this.hasDim("y")){var y=s.getYScales()[0],g=gp(y,"y",h,v);this.filterView(s,y.field,g)}this.reRender(s,{source:_r.FILTER}),s.emit(_r.AFTER_FILTER,ar.fromData(s,_r.AFTER_FILTER,u))}},e.prototype.end=function(){this.isStarted=!1},e.prototype.reset=function(){var t=this.context.view;if(t.emit(_r.BEFORE_RESET,ar.fromData(t,_r.BEFORE_RESET,{})),this.isStarted=!1,this.hasDim("x")){var n=t.getXScale();this.filterView(t,n.field,null)}if(this.hasDim("y")){var i=t.getYScales()[0];this.filterView(t,i.field,null)}this.reRender(t,{source:_r.RESET}),t.emit(_r.AFTER_RESET,ar.fromData(t,_r.AFTER_RESET,{}))},e.prototype.filterView=function(t,n,i){t.filter(n,i)},e.prototype.reRender=function(t,n){t.render(!0,n)},e}(er),Ds=IA,LA=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.filterView=function(t,n,i){var a=dn(t);(0,c.S6)(a,function(o){o.filter(n,i)})},e.prototype.reRender=function(t){var n=dn(t);(0,c.S6)(n,function(i){i.render(!0)})},e}(Ds),rc=LA,DA=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.filter=function(){var t=yi(this.context),n=this.context.view,i=mr(n);if(za(this.context)){var a=iu(this.context,10);a&&(0,c.S6)(i,function(y){a.includes(y)?y.show():y.hide()})}else if(t){var o=t.component,s=o.get("field");if(Na(t)){if(s){var l=o.getItemsByState("unchecked"),u=qi(n,s),f=l.map(function(y){return y.name});(0,c.S6)(i,function(y){var m=en(y,s),x=u.getText(m);f.indexOf(x)>=0?y.hide():y.show()})}}else if(uh(t)){var h=o.getValue(),v=(0,p.CR)(h,2),d=v[0],g=v[1];(0,c.S6)(i,function(y){var m=en(y,s);m>=d&&m<=g?y.show():y.hide()})}}},e.prototype.clear=function(){var t=mr(this.context.view);(0,c.S6)(t,function(n){n.show()})},e.prototype.reset=function(){this.clear()},e}(er),PA=DA,OA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.byRecord=!1,t}return e.prototype.filter=function(){za(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},e.prototype.filterByRecord=function(){var t=this.context.view,n=iu(this.context,10);if(!!n){var i=t.getXScale().field,a=t.getYScales()[0].field,o=n.map(function(l){return l.getModel().data}),s=dn(t);(0,c.S6)(s,function(l){var u=mr(l);(0,c.S6)(u,function(f){var h=f.getModel().data;dh(o,h,i,a)?f.show():f.hide()})})}},e.prototype.filterByBBox=function(){var t=this,n=this.context.view,i=dn(n);(0,c.S6)(i,function(a){var o=ch(t.context,a,10),s=mr(a);o&&(0,c.S6)(s,function(l){o.includes(l)?l.show():l.hide()})})},e.prototype.reset=function(){var t=dn(this.context.view);(0,c.S6)(t,function(n){var i=mr(n);(0,c.S6)(i,function(a){a.show()})})},e}(er),yp=OA,kA=10,_A=5,BA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.buttonGroup=null,t.buttonCfg={name:"button",text:"button",textStyle:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"},padding:[8,10],style:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},activeStyle:{fill:"#e6e6e6"}},t}return e.prototype.getButtonCfg=function(){return(0,c.b$)(this.buttonCfg,this.cfg)},e.prototype.drawButton=function(){var t=this.getButtonCfg(),n=this.context.view.foregroundGroup.addGroup({name:t.name}),i=n.addShape({type:"text",name:"button-text",attrs:(0,p.pi)({text:t.text},t.textStyle)}),a=i.getBBox(),o=fu(t.padding),s=n.addShape({type:"rect",name:"button-rect",attrs:(0,p.pi)({x:a.x-o[3],y:a.y-o[0],width:a.width+o[1]+o[3],height:a.height+o[0]+o[2]},t.style)});s.toBack(),n.on("mouseenter",function(){s.attr(t.activeStyle)}),n.on("mouseleave",function(){s.attr(t.style)}),this.buttonGroup=n},e.prototype.resetPosition=function(){var t=this.context.view,n=t.getCoordinate(),i=n.convert({x:1,y:1}),a=this.buttonGroup,o=a.getBBox(),s=Qe.vs(null,[["t",i.x-o.width-kA,i.y+o.height+_A]]);a.setMatrix(s)},e.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},e.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},e.prototype.destroy=function(){var t=this.buttonGroup;t&&t.remove(),r.prototype.destroy.call(this)},e}(er),RA=BA,NA=4,zA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.starting=!1,t.dragStart=!1,t}return e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},e.prototype.drag=function(){if(!!this.startPoint){var t=this.context.getCurrentPoint(),n=this.context.view,i=this.context.event;this.dragStart?n.emit("drag",{target:i.target,x:i.x,y:i.y}):ou(t,this.startPoint)>NA&&(n.emit("dragstart",{target:i.target,x:i.x,y:i.y}),this.dragStart=!0)}},e.prototype.end=function(){if(this.dragStart){var t=this.context.view,n=this.context.event;t.emit("dragend",{target:n.target,x:n.x,y:n.y})}this.starting=!1,this.dragStart=!1},e}(er),UA=zA,VA=5,GA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.starting=!1,t.isMoving=!1,t.startPoint=null,t.startMatrix=null,t}return e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},e.prototype.move=function(){if(!!this.starting){var t=this.startPoint,n=this.context.getCurrentPoint(),i=ou(t,n);if(i>VA&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var a=this.context.view,o=Qe.vs(this.startMatrix,[["t",n.x-t.x,n.y-t.y]]);a.backgroundGroup.setMatrix(o),a.foregroundGroup.setMatrix(o),a.middleGroup.setMatrix(o)}}},e.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},e.prototype.reset=function(){this.starting=!1,this.startPoint=null,this.isMoving=!1;var t=this.context.view;t.backgroundGroup.resetMatrix(),t.foregroundGroup.resetMatrix(),t.middleGroup.resetMatrix(),this.isMoving=!1},e}(er),HA=GA,mp="x",xp="y",YA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.dims=[mp,xp],t.cfgFields=["dims"],t.cacheScaleDefs={},t}return e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.getScale=function(t){var n=this.context.view;return t==="x"?n.getXScale():n.getYScales()[0]},e.prototype.resetDim=function(t){var n=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var i=this.getScale(t);n.scale(i.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},e.prototype.reset=function(){this.resetDim(mp),this.resetDim(xp);var t=this.context.view;t.render(!0)},e}(er),wp=YA,XA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.startPoint=null,t.starting=!1,t.startCache={},t}return e.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0;var n=this.dims;(0,c.S6)(n,function(i){var a=t.getScale(i),o=a.min,s=a.max,l=a.values;t.startCache[i]={min:o,max:s,values:l}})},e.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},e.prototype.translate=function(){var t=this;if(!!this.starting){var n=this.startPoint,i=this.context.view.getCoordinate(),a=this.context.getCurrentPoint(),o=i.invert(n),s=i.invert(a),l=s.x-o.x,u=s.y-o.y,f=this.context.view,h=this.dims;(0,c.S6)(h,function(v){t.translateDim(v,{x:l*-1,y:u*-1})}),f.render(!0)}},e.prototype.translateDim=function(t,n){if(this.hasDim(t)){var i=this.getScale(t);i.isLinear&&this.translateLinear(t,i,n)}},e.prototype.translateLinear=function(t,n,i){var a=this.context.view,o=this.startCache[t],s=o.min,l=o.max,u=l-s,f=i[t]*u;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:n.nice,min:s,max:l}),a.scale(n.field,{nice:!1,min:s+f,max:l+f})},e.prototype.reset=function(){r.prototype.reset.call(this),this.startPoint=null,this.starting=!1},e}(wp),WA=XA,ZA=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.zoomRatio=.05,t}return e.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},e.prototype.zoom=function(t){var n=this,i=this.dims;(0,c.S6)(i,function(a){n.zoomDim(a,t)}),this.context.view.render(!0)},e.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},e.prototype.zoomDim=function(t,n){if(this.hasDim(t)){var i=this.getScale(t);i.isLinear&&this.zoomLinear(t,i,n)}},e.prototype.zoomLinear=function(t,n,i){var a=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:n.nice,min:n.min,max:n.max});var o=this.cacheScaleDefs[t],s=o.max-o.min,l=n.min,u=n.max,f=i*s,h=l-f,v=u+f,d=v-h,g=d/s;v>h&&g<100&&g>.01&&a.scale(n.field,{nice:!1,min:l-f,max:u+f})},e}(wp),jA=ZA;function $A(r){var e=r.gEvent.originalEvent;return e.deltaY>0}var qA=1,KA=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.scroll=function(t){var n=this.context,i=n.view,a=n.event;if(!!i.getOptions().scrollbar){var o=(t==null?void 0:t.wheelDelta)||qA,s=i.getController("scrollbar"),l=i.getXScale(),u=i.getOptions().data,f=(0,c.dp)((0,c.I)(u,l.field)),h=(0,c.dp)(l.values),v=s.getValue(),d=Math.floor((f-h)*v),g=d+($A(a)?o:-o),y=o/(f-h)/1e4,m=(0,c.uZ)(g/(f-h)+y,0,1);s.setValue(m)}},e}(er),JA=KA,QA="aixs-description-tooltip",t2=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.show=function(){var t=this.context,n=yi(t).axis,i=n.cfg.title,a=i.description,o=i.text,s=i.descriptionTooltipStyle,l=t.event,u=l.x,f=l.y;this.tooltip||this.renderTooltip(),this.tooltip.update({title:o||"",customContent:function(){return`
    \u5B57\u6BB5\u8BF4\u660E\uFF1A`).concat(a,`
    `)},x:u,y:f}),this.tooltip.show()},e.prototype.destroy=function(){r.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.hide=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t,n=this.context.view,i=n.canvas,a={start:{x:0,y:0},end:{x:i.get("width"),y:i.get("height")}},o=new Jo({parent:i.get("el").parentNode,region:a,visible:!1,containerId:QA,domStyles:(0,p.pi)({},(0,c.b$)({},(t={},t[Ln]={"max-width":"50%",padding:"10px","line-height":"15px","font-size":"12px",color:"rgba(0, 0, 0, .65)"},t[Dn]={"word-break":"break-all","margin-bottom":"3px"},t)))});o.init(),o.setCapture(!1),this.tooltip=o},e}(er),e2=t2;o1("dark",xh(rw)),X("canvas",jt),X("svg",_t),gn("Polygon",wb),gn("Interval",hb),gn("Schema",bb),gn("Path",Pu),gn("Point",yb),gn("Line",pb),gn("Area",rb),gn("Edge",ib),gn("Heatmap",ob),gn("Violin",Ab),Va("base",cs),Va("interval",Gb),Va("pie",Xb),Va("polar",Pv),Or("overlap",aM),Or("distribute",Zb),Or("fixed-overlap",iM),Or("hide-overlap",dM),Or("limit-in-shape",tM),Or("limit-in-canvas",Qb),Or("limit-in-plot",PM),Or("pie-outer",$b),Or("adjust-color",yM),Or("interval-adjust-position",SM),Or("interval-hide-overlap",MM),Or("point-adjust-position",TM),Or("pie-spider",Jb),Or("path-adjust-position",IM),Ur("fade-in",OM),Ur("fade-out",kM),Ur("grow-in-x",BM),Ur("grow-in-xy",NM),Ur("grow-in-y",RM),Ur("scale-in-x",VM),Ur("scale-in-y",GM),Ur("wave-in",YM),Ur("zoom-in",XM),Ur("zoom-out",WM),Ur("position-update",UM),Ur("sector-path-update",HM),Ur("path-in",zM),$i("rect",rC),$i("mirror",tC),$i("list",qM),$i("matrix",JM),$i("circle",jM),$i("tree",iC),mi("axis",uC),mi("legend",pC),mi("tooltip",Fh),mi("annotation",sC),mi("slider",gC),mi("scrollbar",wC),Ae("tooltip",ap),Ae("sibling-tooltip",EC),Ae("ellipsis-text",IC),Ae("element-active",OC),Ae("element-single-active",VC),Ae("element-range-active",NC),Ae("element-highlight",Ju),Ae("element-highlight-by-x",WC),Ae("element-highlight-by-color",YC),Ae("element-single-highlight",$C),Ae("element-range-highlight",lp),Ae("element-sibling-highlight",lp,{effectSiblings:!0,effectByRecord:!0}),Ae("element-selected",QC),Ae("element-single-selected",eA),Ae("element-range-selected",KC),Ae("element-link-by-color",_C),Ae("active-region",CC),Ae("list-active",iA),Ae("list-selected",lA),Ae("list-highlight",Qu),Ae("list-unchecked",cA),Ae("list-checked",hA),Ae("list-focus",pA),Ae("list-radio",gA),Ae("legend-item-highlight",Qu,{componentNames:["legend"]}),Ae("axis-label-highlight",Qu,{componentNames:["axis"]}),Ae("axis-description",e2),Ae("rect-mask",hp),Ae("x-rect-mask",pp,{dim:"x"}),Ae("y-rect-mask",pp,{dim:"y"}),Ae("circle-mask",xA),Ae("path-mask",dp),Ae("smooth-path-mask",CA),Ae("cursor",TA),Ae("data-filter",FA),Ae("brush",Ds),Ae("brush-x",Ds,{dims:["x"]}),Ae("brush-y",Ds,{dims:["y"]}),Ae("sibling-filter",rc),Ae("sibling-x-filter",rc),Ae("sibling-y-filter",rc),Ae("element-filter",PA),Ae("element-sibling-filter",yp),Ae("element-sibling-filter-record",yp,{byRecord:!0}),Ae("view-drag",UA),Ae("view-move",HA),Ae("scale-translate",WA),Ae("scale-zoom",jA),Ae("reset-button",RA,{name:"reset-button",text:"reset"}),Ae("mousewheel-scroll",JA);function ri(r){return r.isInPlot()}Oe("tooltip",{start:[{trigger:"plot:mousemove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"plot:touchmove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseleave",action:"tooltip:hide"},{trigger:"plot:leave",action:"tooltip:hide"},{trigger:"plot:touchend",action:"tooltip:hide"}]}),Oe("ellipsis-text",{start:[{trigger:"legend-item-name:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"legend-item-name:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"legend-item-name:mouseleave",action:"ellipsis-text:hide"},{trigger:"legend-item-name:touchend",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseleave",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseout",action:"ellipsis-text:hide"},{trigger:"axis-label:touchend",action:"ellipsis-text:hide"}]}),Oe("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),Oe("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),Oe("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),Oe("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),Oe("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),Oe("legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","element-active:reset"]}]}),Oe("legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","element-highlight:reset"]}]}),Oe("axis-label-highlight",{start:[{trigger:"axis-label:mouseenter",action:["axis-label-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"axis-label:mouseleave",action:["axis-label-highlight:reset","element-highlight:reset"]}]}),Oe("element-list-highlight",{start:[{trigger:"element:mouseenter",action:["list-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"element:mouseleave",action:["list-highlight:reset","element-highlight:reset"]}]}),Oe("element-range-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:function(r){return!r.isInShape("mask")},action:["rect-mask:start","rect-mask:show"]},{trigger:"mask:dragstart",action:["rect-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:drag",action:["rect-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end"]},{trigger:"mask:dragend",action:["rect-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(r){return!r.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]}),Oe("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:ri,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:ri,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:ri,action:["brush:filter","brush:end","rect-mask:end","rect-mask:hide","reset-button:show"]}],rollback:[{trigger:"reset-button:click",action:["brush:reset","reset-button:hide","cursor:crosshair"]}]}),Oe("brush-visible",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"plot:mousedown",action:["rect-mask:start","rect-mask:show"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end","rect-mask:hide","element-filter:filter","element-range-highlight:clear"]}],rollback:[{trigger:"dblclick",action:["element-filter:clear"]}]}),Oe("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:ri,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:ri,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:ri,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),Oe("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:ri,action:"path-mask:start"},{trigger:"mousedown",isEnable:ri,action:"path-mask:show"}],processing:[{trigger:"mousemove",action:"path-mask:addPoint"}],end:[{trigger:"mouseup",action:"path-mask:end"}],rollback:[{trigger:"dblclick",action:"path-mask:hide"}]}),Oe("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),Oe("legend-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:["cursor:pointer","list-radio:show"]},{trigger:"legend-item:mouseleave",action:["cursor:default","list-radio:hide"]}],start:[{trigger:"legend-item:click",isEnable:function(r){return!r.isInShape("legend-item-radio")},action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","data-filter:filter","list-radio:show"]},{trigger:"legend-item-radio:mouseenter",action:["list-radio:showTip"]},{trigger:"legend-item-radio:mouseleave",action:["list-radio:hideTip"]},{trigger:"legend-item-radio:click",action:["list-focus:toggle","data-filter:filter","list-radio:show"]}]}),Oe("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),Oe("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),Oe("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["legend-item-highlight:reset","element-highlight:reset","list-unchecked:toggle","element-filter:filter"]}]}),Oe("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),Oe("axis-description",{start:[{trigger:"axis-description:mousemove",action:"axis-description:show"}],end:[{trigger:"axis-description:mouseleave",action:"axis-description:hide"}]});function Sp(r){return r.gEvent.preventDefault(),r.gEvent.originalEvent.deltaY>0}Oe("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(r){return Sp(r.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(r){return!Sp(r.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),Oe("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),Oe("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]});var Br=["type","alias","tickCount","tickInterval","min","max","nice","minLimit","maxLimit","range","tickMethod","base","exponent","mask","sync"],an;(function(r){r.ERROR="error",r.WARN="warn",r.INFO="log"})(an||(an={}));var bp="AntV/G2Plot";function Mp(r){for(var e=[],t=1;t=0}),i=t.every(function(a){return(0,c.U2)(a,[e])<=0});return n?{min:0}:i?{max:0}:{}}function Cp(r,e,t,n,i){if(i===void 0&&(i=[]),!Array.isArray(r))return{nodes:[],links:[]};var a=[],o={},s=-1;return r.forEach(function(l){var u=l[e],f=l[t],h=l[n],v=$e(l,i);o[u]||(o[u]=(0,p.pi)({id:++s,name:u},v)),o[f]||(o[f]=(0,p.pi)({id:++s,name:f},v)),a.push((0,p.pi)({source:o[u].id,target:o[f].id,value:h},v))}),{nodes:Object.values(o).sort(function(l,u){return l.id-u.id}),links:a}}function ia(r,e){var t=(0,c.hX)(r,function(n){var i=n[e];return i===null||typeof i=="number"&&!isNaN(i)});return kn(an.WARN,t.length===r.length,"illegal data existed in chart data."),t}var r2=5,n2={}.toString,Ap=function(r,e){return n2.call(r)==="[object "+e+"]"},i2=function(r){return Ap(r,"Array")},a2=function(r){return typeof r=="object"&&r!==null},Tp=function(r){if(!a2(r)||!Ap(r,"Object"))return!1;for(var e=r;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(r)===e},Ep=function(r,e,t,n){t=t||0,n=n||r2;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=e[i];a?Tp(a)?(Tp(r[i])||(r[i]={}),t=n&&r<=i}function ni(r){if((0,c.hj)(r))return[r,r,r,r];if((0,c.kJ)(r)){var e=r.length;if(e===1)return[r[0],r[0],r[0],r[0]];if(e===2)return[r[0],r[1],r[0],r[1]];if(e===3)return[r[0],r[1],r[2],r[1]];if(e===4)return r}return[0,0,0,0]}function Os(r,e,t){e===void 0&&(e="bottom"),t===void 0&&(t=25);var n=ni(r),i=[e.startsWith("top")?t:0,e.startsWith("right")?t:0,e.startsWith("bottom")?t:0,e.startsWith("left")?t:0];return[n[0]+i[0],n[1]+i[1],n[2]+i[2],n[3]+i[3]]}function oc(r){var e=r.map(function(n){return ni(n)}),t=[0,0,0,0];return e.length>0&&(t=t.map(function(n,i){return e.forEach(function(a,o){n+=e[o][i]}),n})),t}function u2(r,e){var t=[];if(r.length){t.push(["M",r[0].x,r[0].y]);for(var n=1,i=r.length;n"},key:(l===0?"top":"bottom")+"-statistic"},$e(s,["offsetX","offsetY","rotate","style","formatter"])))}})},v2=function(r,e,t){var n=e.statistic,i=n.title,a=n.content;[i,a].forEach(function(o){if(!!o){var s=(0,c.mf)(o.style)?o.style(t):o.style;r.annotation().html((0,p.pi)({position:["50%","100%"],html:function(l,u){var f=u.getCoordinate(),h=u.views[0].getCoordinate(),v=h.getCenter(),d=h.getRadius(),g=Math.max(Math.sin(h.startAngle),Math.sin(h.endAngle))*d,y=v.y+g-f.y.start-parseFloat((0,c.U2)(s,"fontSize",0)),m=f.getRadius()*f.innerRadius*2;Lp(l,(0,p.pi)({width:m+"px",transform:"translate(-50%, "+y+"px)"},Ip(s)));var x=u.getData();if(o.customHtml)return o.customHtml(l,u,t,x);var b=o.content;return o.formatter&&(b=o.formatter(t,x)),b?(0,c.HD)(b)?b:""+b:"
    "}},$e(o,["offsetX","offsetY","rotate","style","formatter"])))}})};function Dp(r,e){return e?(0,c.u4)(e,function(t,n,i){return t.replace(new RegExp("{\\s*"+i+"\\s*}","g"),n)},r):r}function Be(r,e){return r.views.find(function(t){return t.id===e})}function Qa(r){var e=r.parent;return e?e.views:[]}function Pp(r){return Qa(r).filter(function(e){return e!==r})}function to(r,e,t){t===void 0&&(t=r.geometries),typeof e=="boolean"?r.animate(e):r.animate(!0),(0,c.S6)(t,function(n){var i;(0,c.mf)(e)?i=e(n.type||n.shapeType,n)||!0:i=e,n.animate(i)})}function _s(){return typeof window=="object"?window==null?void 0:window.devicePixelRatio:2}function sc(r,e){e===void 0&&(e=r);var t=document.createElement("canvas"),n=_s();t.width=r*n,t.height=e*n,t.style.width=r+"px",t.style.height=e+"px";var i=t.getContext("2d");return i.scale(n,n),t}function lc(r,e,t,n){n===void 0&&(n=t);var i=e.backgroundColor,a=e.opacity;r.globalAlpha=a,r.fillStyle=i,r.beginPath(),r.fillRect(0,0,t,n),r.closePath()}function Op(r,e,t){var n=r+e;return t?n*2:n}function kp(r,e){var t=e?[[r*(1/4),r*(1/4)],[r*(3/4),r*(3/4)]]:[[r*(1/2),r*(1/2)]];return t}function uc(r,e){var t=e*Math.PI/180,n={a:Math.cos(t)*(1/r),b:Math.sin(t)*(1/r),c:-Math.sin(t)*(1/r),d:Math.cos(t)*(1/r),e:0,f:0};return n}var p2={size:6,padding:2,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0,isStagger:!0};function d2(r,e,t,n){var i=e.size,a=e.fill,o=e.lineWidth,s=e.stroke,l=e.fillOpacity;r.beginPath(),r.globalAlpha=l,r.fillStyle=a,r.strokeStyle=s,r.lineWidth=o,r.arc(t,n,i/2,0,2*Math.PI,!1),r.fill(),o&&r.stroke(),r.closePath()}function g2(r){var e=Dt({},p2,r),t=e.size,n=e.padding,i=e.isStagger,a=e.rotation,o=Op(t,n,i),s=kp(o,i),l=sc(o,o),u=l.getContext("2d");lc(u,e,o);for(var f=0,h=s;fC){var B=A/y.length,rt=Math.max(1,Math.ceil(C/B)-1),lt=y.slice(0,rt)+"...";b.attr("text",lt)}}}}function Z2(r,e,t){X2(r,e,t),W2(r,e,t)}function j2(r,e,t){return e===void 0&&(e=!0),t===void 0&&(t=!1),function(n){var i=n.options,a=n.chart,o=i.conversionTag,s=i.theme;return o&&!t&&(a.theme(Dt({},(0,c.Kn)(s)?s:Ua(s),{columnWidthRatio:1/3})),a.annotation().shape({render:function(l,u){var f=l.addGroup({id:a.id+"-conversion-tag-group",name:"conversion-tag-group"}),h=(0,c.sE)(a.geometries,function(g){return g.type==="interval"}),v={view:u,geometry:h,group:f,field:r,horizontal:e,options:Y2(o,e)},d=h.elements;(0,c.S6)(d,function(g,y){y>0&&Z2(v,d[y-1],g)})}})),n}}function $2(r){var e=r.options,t=e.legend,n=e.seriesField,i=e.isStack;return n?t!==!1&&(t=(0,p.pi)({position:i?"right-top":"top-left"},t)):t=!1,r.options.legend=t,r}function q2(r){var e=r.chart,t=r.options,n=t.data,i=t.columnStyle,a=t.color,o=t.columnWidthRatio,s=t.isPercent,l=t.isGroup,u=t.isStack,f=t.xField,h=t.yField,v=t.seriesField,d=t.groupField,g=t.tooltip,y=t.shape,m=s&&l&&u?I2(n,h,[f,d],h):ro(n,h,f,h,s),x=[];u&&v&&!l?m.forEach(function(A){var B=x.find(function(rt){return rt[f]===A[f]&&rt[v]===A[v]});B?B[h]+=A[h]||0:x.push((0,p.pi)({},A))}):x=m,e.data(x);var b=s?(0,p.pi)({formatter:function(A){return{name:l&&u?A[v]+" - "+A[d]:A[v]||A[f],value:(Number(A[h])*100).toFixed(2)+"%"}}},g):g,C=Dt({},r,{options:{data:x,widthRatio:o,tooltip:b,interval:{shape:y,style:i,color:a}}});return Sr(C),C}function vc(r){var e,t,n=r.options,i=n.xAxis,a=n.yAxis,o=n.xField,s=n.yField,l=n.data,u=n.isPercent,f=u?{max:1,min:0,minLimit:0,maxLimit:1}:{};return Fe(or((e={},e[o]=i,e[s]=a,e),(t={},t[o]={type:"cat"},t[s]=(0,p.pi)((0,p.pi)({},nc(l,s)),f),t)))(r)}function K2(r){var e=r.chart,t=r.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return n===!1?e.axis(a,!1):e.axis(a,n),i===!1?e.axis(o,!1):e.axis(o,i),r}function J2(r){var e=r.chart,t=r.options,n=t.legend,i=t.seriesField;return n&&i?e.legend(i,n):n===!1&&e.legend(!1),r}function Q2(r){var e=r.chart,t=r.options,n=t.label,i=t.yField,a=t.isRange,o=wr(e,"interval");if(!n)o.label(!1);else{var s=n.callback,l=(0,p._T)(n,["callback"]);o.label({fields:[i],callback:s,cfg:(0,p.pi)({layout:(l==null?void 0:l.position)?void 0:[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}]},yr(a?(0,p.pi)({content:function(u){var f;return(f=u[i])===null||f===void 0?void 0:f.join("-")}},l):l))})}return r}function tT(r){var e=r.chart,t=r.options,n=t.tooltip,i=t.isGroup,a=t.isStack,o=t.groupField,s=t.data,l=t.xField,u=t.yField,f=t.seriesField;if(n===!1)e.tooltip(!1);else{var h=n;if(i&&a){var v=h.customItems,d=(h==null?void 0:h.formatter)||function(g){return{name:g[f]+" - "+g[o],value:g[u]}};h=(0,p.pi)((0,p.pi)({},h),{customItems:function(g){var y=[];return(0,c.S6)(g,function(m){var x=(0,c.hX)(s,function(b){return(0,c.BD)(b,$e(m.data,[l,f]))});x.forEach(function(b){y.push((0,p.pi)((0,p.pi)((0,p.pi)({},m),{value:b[u],data:b,mappingData:{_origin:b}}),d(b)))})}),v?v(y):y}})}e.tooltip(h)}return r}function Hs(r,e){e===void 0&&(e=!1);var t=r.options,n=t.seriesField;return Fe($2,Ye,Vr("columnStyle"),ii,_p("rect"),q2,vc,K2,J2,tT,eo,cc,Q2,Zp,rr,qe,ir(),j2(t.yField,!e,!!n),H2(!t.isStack),Ei)(r)}function eT(r){var e=r.options,t=e.xField,n=e.yField,i=e.xAxis,a=e.yAxis,o={left:"bottom",right:"top",top:"left",bottom:"right"},s=a!==!1?(0,p.pi)({position:o[(a==null?void 0:a.position)||"left"]},a):!1,l=i!==!1?(0,p.pi)({position:o[(i==null?void 0:i.position)||"bottom"]},i):!1;return(0,p.pi)((0,p.pi)({},r),{options:(0,p.pi)((0,p.pi)({},e),{xField:n,yField:t,xAxis:s,yAxis:l})})}function rT(r){var e=r.options,t=e.label;return t&&!t.position&&(t.position="left",t.layout||(t.layout=[{type:"interval-adjust-position"},{type:"interval-hide-overlap"},{type:"adjust-color"},{type:"limit-in-plot",cfg:{action:"hide"}}])),Dt({},r,{options:{label:t}})}function nT(r){var e=r.options,t=e.seriesField,n=e.isStack,i=e.legend;return t?i!==!1&&(i=(0,p.pi)({position:n?"top-left":"right-top"},i||{})):i=!1,Dt({},r,{options:{legend:i}})}function iT(r){var e=r.options,t=[{type:"transpose"},{type:"reflectY"}].concat(e.coordinate||[]);return Dt({},r,{options:{coordinate:t}})}function aT(r){var e=r.chart,t=r.options,n=t.barStyle,i=t.barWidthRatio,a=t.minBarWidth,o=t.maxBarWidth,s=t.barBackground;return Hs({chart:e,options:(0,p.pi)((0,p.pi)({},t),{columnStyle:n,columnWidthRatio:i,minColumnWidth:a,maxColumnWidth:o,columnBackground:s})},!0)}function $p(r){return Fe(eT,rT,nT,pr,iT,aT)(r)}var oT=Dt({},ke.getDefaultOptions(),{barWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),sT=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="bar",t}return e.getDefaultOptions=function(){return oT},e.prototype.changeData=function(t){var n,i;this.updateOption({data:t});var a=this,o=a.chart,s=a.options,l=s.isPercent,u=s.xField,f=s.yField,h=s.xAxis,v=s.yAxis;n=[f,u],u=n[0],f=n[1],i=[v,h],h=i[0],v=i[1];var d=(0,p.pi)((0,p.pi)({},s),{xField:u,yField:f,yAxis:v,xAxis:h});vc({chart:o,options:d}),o.changeData(ro(t,u,f,u,l))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return $p},e}(ke),lT=Dt({},ke.getDefaultOptions(),{columnWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),uT=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="column",t}return e.getDefaultOptions=function(){return lT},e.prototype.changeData=function(t){this.updateOption({data:t});var n=this.options,i=n.yField,a=n.xField,o=n.isPercent,s=this,l=s.chart,u=s.options;vc({chart:l,options:u}),this.chart.changeData(ro(t,i,a,i,o))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Hs},e}(ke),pc,ai="$$percentage$$",oi="$$mappingValue$$",Bn="$$conversion$$",dc="$$totalPercentage$$",no="$$x$$",io="$$y$$",cT={appendPadding:[0,80],minSize:0,maxSize:1,meta:(pc={},pc[oi]={min:0,max:1,nice:!1},pc),label:{style:{fill:"#fff",fontSize:12}},tooltip:{showTitle:!1,showMarkers:!1,shared:!1},conversionTag:{offsetX:10,offsetY:0,style:{fontSize:12,fill:"rgba(0,0,0,0.45)"}}},qp="CONVERSION_TAG_NAME";function gc(r,e,t){var n=[],i=t.yField,a=t.maxSize,o=t.minSize,s=(0,c.U2)((0,c.UT)(e,i),[i]),l=(0,c.hj)(a)?a:1,u=(0,c.hj)(o)?o:0;return n=(0,c.UI)(r,function(f,h){var v=(f[i]||0)/s;return f[ai]=v,f[oi]=(l-u)*v+u,f[Bn]=[(0,c.U2)(r,[h-1,i]),f[i]],f}),n}function yc(r){return function(e){var t=e.chart,n=e.options,i=n.conversionTag,a=n.filteredData,o=a||t.getOptions().data;if(i){var s=i.formatter;o.forEach(function(l,u){if(!(u<=0||Number.isNaN(l[oi]))){var f=r(l,u,o,{top:!0,name:qp,text:{content:(0,c.mf)(s)?s(l,o):s,offsetX:i.offsetX,offsetY:i.offsetY,position:"end",autoRotate:!1,style:(0,p.pi)({textAlign:"start",textBaseline:"middle"},i.style)}});t.annotation().line(f)}})}return e}}function fT(r){var e=r.chart,t=r.options,n=t.data,i=n===void 0?[]:n,a=t.yField,o=t.maxSize,s=t.minSize,l=gc(i,i,{yField:a,maxSize:o,minSize:s});return e.data(l),r}function hT(r){var e=r.chart,t=r.options,n=t.xField,i=t.yField,a=t.color,o=t.tooltip,s=t.label,l=t.shape,u=l===void 0?"funnel":l,f=t.funnelStyle,h=t.state,v=qr(o,[n,i]),d=v.fields,g=v.formatter;Rr({chart:e,options:{type:"interval",xField:n,yField:oi,colorField:n,tooltipFields:(0,c.kJ)(d)&&d.concat([ai,Bn]),mapping:{shape:u,tooltip:g,color:a,style:f},label:s,state:h}});var y=wr(r.chart,"interval");return y.adjust("symmetric"),r}function vT(r){var e=r.chart,t=r.options,n=t.isTransposed;return e.coordinate({type:"rect",actions:n?[]:[["transpose"],["scale",1,-1]]}),r}function Kp(r){var e=r.options,t=r.chart,n=e.maxSize,i=(0,c.U2)(t,["geometries","0","dataArray"],[]),a=(0,c.U2)(t,["options","data","length"]),o=(0,c.UI)(i,function(l){return(0,c.U2)(l,["0","nextPoints","0","x"])*a-.5}),s=function(l,u,f,h){var v=n-(n-l[oi])/2;return(0,p.pi)((0,p.pi)({},h),{start:[o[u-1]||u-.5,v],end:[o[u-1]||u-.5,v+.05]})};return yc(s)(r),r}function Jp(r){return Fe(fT,hT,vT,Kp)(r)}function pT(r){var e,t=r.chart,n=r.options,i=n.data,a=i===void 0?[]:i,o=n.yField;return t.data(a),t.scale((e={},e[o]={sync:!0},e)),r}function dT(r){var e=r.chart,t=r.options,n=t.data,i=t.xField,a=t.yField,o=t.color,s=t.compareField,l=t.isTransposed,u=t.tooltip,f=t.maxSize,h=t.minSize,v=t.label,d=t.funnelStyle,g=t.state,y=t.showFacetTitle;return e.facet("mirror",{fields:[s],transpose:!l,padding:l?0:[32,0,0,0],showTitle:y,eachView:function(m,x){var b=l?x.rowIndex:x.columnIndex;l||m.coordinate({type:"rect",actions:[["transpose"],["scale",b===0?-1:1,-1]]});var C=gc(x.data,n,{yField:a,maxSize:f,minSize:h});m.data(C);var A=qr(u,[i,a,s]),B=A.fields,rt=A.formatter,lt=l?{offset:b===0?10:-23,position:b===0?"bottom":"top"}:{offset:10,position:"left",style:{textAlign:b===0?"end":"start"}};Rr({chart:m,options:{type:"interval",xField:i,yField:oi,colorField:i,tooltipFields:(0,c.kJ)(B)&&B.concat([ai,Bn]),mapping:{shape:"funnel",tooltip:rt,color:o,style:d},label:v===!1?!1:Dt({},lt,v),state:g}})}}),r}function Qp(r){var e=r.chart,t=r.index,n=r.options,i=n.conversionTag,a=n.isTransposed;((0,c.hj)(t)?[e]:e.views).forEach(function(o,s){var l=(0,c.U2)(o,["geometries","0","dataArray"],[]),u=(0,c.U2)(o,["options","data","length"]),f=(0,c.UI)(l,function(v){return(0,c.U2)(v,["0","nextPoints","0","x"])*u-.5}),h=function(v,d,g,y){var m=(t||s)===0?-1:1;return Dt({},y,{start:[f[d-1]||d-.5,v[oi]],end:[f[d-1]||d-.5,v[oi]+.05],text:a?{style:{textAlign:"start"}}:{offsetX:i!==!1?m*i.offsetX:0,style:{textAlign:(t||s)===0?"end":"start"}}})};yc(h)(Dt({},{chart:o,options:n}))})}function gT(r){var e=r.chart;return e.once("beforepaint",function(){return Qp(r)}),r}function yT(r){return Fe(pT,dT,gT)(r)}function mT(r){var e=r.chart,t=r.options,n=t.data,i=n===void 0?[]:n,a=t.yField,o=(0,c.u4)(i,function(u,f){return u+(f[a]||0)},0),s=(0,c.UT)(i,a)[a],l=(0,c.UI)(i,function(u,f){var h=[],v=[];if(u[dc]=(u[a]||0)/o,f){var d=i[f-1][no],g=i[f-1][io];h[0]=d[3],v[0]=g[3],h[1]=d[2],v[1]=g[2]}else h[0]=-.5,v[0]=1,h[1]=.5,v[1]=1;return v[2]=v[1]-u[dc],h[2]=(v[2]+1)/4,v[3]=v[2],h[3]=-h[2],u[no]=h,u[io]=v,u[ai]=(u[a]||0)/s,u[Bn]=[(0,c.U2)(i,[f-1,a]),u[a]],u});return e.data(l),r}function xT(r){var e=r.chart,t=r.options,n=t.xField,i=t.yField,a=t.color,o=t.tooltip,s=t.label,l=t.funnelStyle,u=t.state,f=qr(o,[n,i]),h=f.fields,v=f.formatter;return Rr({chart:e,options:{type:"polygon",xField:no,yField:io,colorField:n,tooltipFields:(0,c.kJ)(h)&&h.concat([ai,Bn]),label:s,state:u,mapping:{tooltip:v,color:a,style:l}}}),r}function wT(r){var e=r.chart,t=r.options,n=t.isTransposed;return e.coordinate({type:"rect",actions:n?[["transpose"],["reflect","x"]]:[]}),r}function ST(r){var e=function(t,n,i,a){return(0,p.pi)((0,p.pi)({},a),{start:[t[no][1],t[io][1]],end:[t[no][1]+.05,t[io][1]]})};return yc(e)(r),r}function bT(r){return Fe(mT,xT,wT,ST)(r)}function MT(r){var e,t=r.chart,n=r.options,i=n.data,a=i===void 0?[]:i,o=n.yField;return t.data(a),t.scale((e={},e[o]={sync:!0},e)),r}function CT(r){var e=r.chart,t=r.options,n=t.seriesField,i=t.isTransposed,a=t.showFacetTitle;return e.facet("rect",{fields:[n],padding:[i?0:32,10,0,10],showTitle:a,eachView:function(o,s){Jp(Dt({},r,{chart:o,options:{data:s.data}}))}}),r}function AT(r){return Fe(MT,CT)(r)}var TT=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.rendering=!1,t}return e.prototype.change=function(t){var n=this;if(!this.rendering){var i=t.seriesField,a=t.compareField,o=a?Qp:Kp,s=this.context.view,l=i||a?s.views:[s];(0,c.UI)(l,function(u,f){var h=u.getController("annotation"),v=(0,c.hX)((0,c.U2)(h,["option"],[]),function(g){var y=g.name;return y!==qp});h.clear(!0),(0,c.S6)(v,function(g){typeof g=="object"&&u.annotation()[g.type](g)});var d=(0,c.U2)(u,["filteredData"],u.getOptions().data);o({chart:u,index:f,options:(0,p.pi)((0,p.pi)({},t),{filteredData:gc(d,d,t)})}),u.filterData(d),n.rendering=!0,u.render(!0)})}this.rendering=!1},e}(er),td="funnel-conversion-tag",mc="funnel-afterrender",ed={trigger:"afterrender",action:td+":change"};Ae(td,TT),Oe(mc,{start:[ed]});function ET(r){var e=r.options,t=e.compareField,n=e.xField,i=e.yField,a=e.locale,o=e.funnelStyle,s=e.data,l=Rs(a),u={label:t?{fields:[n,i,t,ai,Bn],formatter:function(h){return""+h[i]}}:{fields:[n,i,ai,Bn],offset:0,position:"middle",formatter:function(h){return h[n]+" "+h[i]}},tooltip:{title:n,formatter:function(h){return{name:h[n],value:h[i]}}},conversionTag:{formatter:function(h){return l.get(["conversionTag","label"])+": "+jp.apply(void 0,h[Bn])}}},f;return(t||o)&&(f=function(h){return Dt({},t&&{lineWidth:1,stroke:"#fff"},(0,c.mf)(o)?o(h):o)}),Dt({options:u},r,{options:{funnelStyle:f,data:(0,c.d9)(s)}})}function FT(r){var e=r.options,t=e.compareField,n=e.dynamicHeight,i=e.seriesField;return i?AT(r):t?yT(r):n?bT(r):Jp(r)}function IT(r){var e,t=r.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return Fe(or((e={},e[a]=n,e[o]=i,e)))(r)}function LT(r){var e=r.chart;return e.axis(!1),r}function DT(r){var e=r.chart,t=r.options,n=t.legend;return n===!1?e.legend(!1):e.legend(n),r}function PT(r){var e=r.chart,t=r.options,n=t.interactions,i=t.dynamicHeight;return(0,c.S6)(n,function(a){a.enable===!1?e.removeInteraction(a.type):e.interaction(a.type,a.cfg||{})}),i?e.removeInteraction(mc):e.interaction(mc,{start:[(0,p.pi)((0,p.pi)({},ed),{arg:t})]}),r}function rd(r){return Fe(ET,FT,IT,LT,pr,PT,DT,qe,Ye,ir())(r)}var OT=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="funnel",t}return e.getDefaultOptions=function(){return cT},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return rd},e.prototype.setState=function(t,n,i){i===void 0&&(i=!0);var a=Ja(this.chart);(0,c.S6)(a,function(o){n(o.getData())&&o.setState(t,i)})},e.prototype.getStates=function(){var t=Ja(this.chart),n=[];return(0,c.S6)(t,function(i){var a=i.getData(),o=i.getStates();(0,c.S6)(o,function(s){n.push({data:a,state:s,geometry:i.geometry,element:i})})}),n},e.CONVERSATION_FIELD=Bn,e.PERCENT_FIELD=ai,e.TOTAL_PERCENT_FIELD=dc,e}(ke),Ys,xc="range",nd="type",Rn="percent",kT="#f0f0f0",id="indicator-view",ad="range-view",_T={percent:0,range:{ticks:[]},innerRadius:.9,radius:.95,startAngle:-7/6*Math.PI,endAngle:1/6*Math.PI,syncViewPadding:!0,axis:{line:null,label:{offset:-24,style:{textAlign:"center",textBaseline:"middle"}},subTickLine:{length:-8},tickLine:{length:-12},grid:null},indicator:{pointer:{style:{lineWidth:5,lineCap:"round"}},pin:{style:{r:9.75,lineWidth:4.5,fill:"#fff"}}},statistic:{title:!1},meta:(Ys={},Ys[xc]={sync:"v"},Ys[Rn]={sync:"v",tickCount:5,tickInterval:.2},Ys),animation:!1};function BT(r,e){return r.map(function(t,n){var i;return i={},i[xc]=t-(r[n-1]||0),i[nd]=""+n,i[Rn]=e,i})}function od(r){var e;return[(e={},e[Rn]=(0,c.uZ)(r,0,1),e)]}function sd(r,e){var t=(0,c.U2)(e,["ticks"],[]),n=(0,c.dp)(t)?(0,c.jj)(t):[0,(0,c.uZ)(r,0,1),1];return n[0]||n.shift(),BT(n,r)}function RT(r){var e=r.chart,t=r.options,n=t.percent,i=t.range,a=t.radius,o=t.innerRadius,s=t.startAngle,l=t.endAngle,u=t.axis,f=t.indicator,h=t.gaugeStyle,v=t.type,d=t.meter,g=i.color,y=i.width;if(f){var m=od(n),x=e.createView({id});x.data(m),x.point().position(Rn+"*1").shape(f.shape||"gauge-indicator").customInfo({defaultColor:e.getTheme().defaultColor,indicator:f}),x.coordinate("polar",{startAngle:s,endAngle:l,radius:o*a}),x.axis(Rn,u),x.scale(Rn,$e(u,Br))}var b=sd(n,t.range),C=e.createView({id:ad});C.data(b);var A=(0,c.HD)(g)?[g,kT]:g,B=Sr({chart:C,options:{xField:"1",yField:xc,seriesField:nd,rawFields:[Rn],isStack:!0,interval:{color:A,style:h,shape:v==="meter"?"meter-gauge":null},args:{zIndexReversed:!0,sortZIndex:!0},minColumnWidth:y,maxColumnWidth:y}}).ext,rt=B.geometry;return rt.customInfo({meter:d}),C.coordinate("polar",{innerRadius:o,radius:a,startAngle:s,endAngle:l}).transpose(),r}function NT(r){var e;return Fe(or((e={range:{min:0,max:1,maxLimit:1,minLimit:0}},e[Rn]={},e)))(r)}function ld(r,e){var t=r.chart,n=r.options,i=n.statistic,a=n.percent;if(t.getController("annotation").clear(!0),i){var o=i.content,s=void 0;o&&(s=Dt({},{content:(a*100).toFixed(2)+"%",style:{opacity:.75,fontSize:"30px",lineHeight:1,textAlign:"center",color:"rgba(44,53,66,0.85)"}},o)),v2(t,{statistic:(0,p.pi)((0,p.pi)({},i),{content:s})},{percent:a})}return e&&t.render(!0),r}function zT(r){var e=r.chart,t=r.options,n=t.tooltip;return n?e.tooltip(Dt({showTitle:!1,showMarkers:!1,containerTpl:'
    ',domStyles:{"g2-tooltip":{padding:"4px 8px",fontSize:"10px"}},customContent:function(i,a){var o=(0,c.U2)(a,[0,"data",Rn],0);return(o*100).toFixed(2)+"%"}},n)):e.tooltip(!1),r}function UT(r){var e=r.chart;return e.legend(!1),r}function ud(r){return Fe(Ye,qe,RT,NT,zT,ld,rr,ir(),UT)(r)}We("point","gauge-indicator",{draw:function(r,e){var t=r.customInfo,n=t.indicator,i=t.defaultColor,a=n,o=a.pointer,s=a.pin,l=e.addGroup(),u=this.parsePoint({x:0,y:0});return o&&l.addShape("line",{name:"pointer",attrs:(0,p.pi)({x1:u.x,y1:u.y,x2:r.x,y2:r.y,stroke:i},o.style)}),s&&l.addShape("circle",{name:"pin",attrs:(0,p.pi)({x:u.x,y:u.y,stroke:i},s.style)}),l}}),We("interval","meter-gauge",{draw:function(r,e){var t=r.customInfo.meter,n=t===void 0?{}:t,i=n.steps,a=i===void 0?50:i,o=n.stepRatio,s=o===void 0?.5:o;a=a<1?1:a,s=(0,c.uZ)(s,0,1);var l=this.coordinate,u=l.startAngle,f=l.endAngle,h=0;if(s>0&&s<1){var v=f-u;h=v/a/(s/(1-s)+1-1/a)}for(var d=h/(1-s)*s,g=e.addGroup(),y=this.coordinate.getCenter(),m=this.coordinate.getRadius(),x=kr.getAngle(r,this.coordinate),b=x.startAngle,C=x.endAngle,A=b;A1?l/(n-1):s.max),!t&&!n){var f=GT(o);u=l/f}var h={},v=(0,c.vM)(a,i);(0,c.xb)(v)?(0,c.S6)(a,function(g){var y=g[e],m=cd(y,u,n),x=m[0]+"-"+m[1];(0,c.wH)(h,x)||(h[x]={range:m,count:0}),h[x].count+=1}):Object.keys(v).forEach(function(g){(0,c.S6)(v[g],function(y){var m=y[e],x=cd(m,u,n),b=x[0]+"-"+x[1],C=b+"-"+g;(0,c.wH)(h,C)||(h[C]={range:x,count:0},h[C][i]=g),h[C].count+=1})});var d=[];return(0,c.S6)(h,function(g){d.push(g)}),d}var Xs="range",ao="count",HT=Dt({},ke.getDefaultOptions(),{columnStyle:{stroke:"#FFFFFF"},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});function YT(r){var e=r.chart,t=r.options,n=t.data,i=t.binField,a=t.binNumber,o=t.binWidth,s=t.color,l=t.stackField,u=t.legend,f=t.columnStyle,h=fd(n,i,o,a,l);e.data(h);var v=Dt({},r,{options:{xField:Xs,yField:ao,seriesField:l,isStack:!0,interval:{color:s,style:f}}});return Sr(v),u&&l?e.legend(l,u):e.legend(!1),r}function XT(r){var e,t=r.options,n=t.xAxis,i=t.yAxis;return Fe(or((e={},e[Xs]=n,e[ao]=i,e)))(r)}function WT(r){var e=r.chart,t=r.options,n=t.xAxis,i=t.yAxis;return n===!1?e.axis(Xs,!1):e.axis(Xs,n),i===!1?e.axis(ao,!1):e.axis(ao,i),r}function ZT(r){var e=r.chart,t=r.options,n=t.label,i=wr(e,"interval");if(!n)i.label(!1);else{var a=n.callback,o=(0,p._T)(n,["callback"]);i.label({fields:[ao],callback:a,cfg:yr(o)})}return r}function hd(r){return Fe(Ye,Vr("columnStyle"),YT,XT,WT,ii,ZT,pr,rr,qe)(r)}var jT=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="histogram",t}return e.getDefaultOptions=function(){return HT},e.prototype.changeData=function(t){this.updateOption({data:t});var n=this.options,i=n.binField,a=n.binNumber,o=n.binWidth,s=n.stackField;this.chart.changeData(fd(t,i,o,a,s))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return hd},e}(ke),$T=Dt({},ke.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},legend:{position:"top-left",radio:{}},isStack:!1}),qT=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.active=function(){var t=this.getView(),n=this.context.event;if(n.data){var i=n.data.items,a=t.geometries.filter(function(o){return o.type==="point"});(0,c.S6)(a,function(o){(0,c.S6)(o.elements,function(s){var l=(0,c.cx)(i,function(u){return u.data===s.data})!==-1;s.setState("active",l)})})}},e.prototype.reset=function(){var t=this.getView(),n=t.geometries.filter(function(i){return i.type==="point"});(0,c.S6)(n,function(i){(0,c.S6)(i.elements,function(a){a.setState("active",!1)})})},e.prototype.getView=function(){return this.context.view},e}(er);Ae("marker-active",qT),Oe("marker-active",{start:[{trigger:"tooltip:show",action:"marker-active:active"}],end:[{trigger:"tooltip:hide",action:"marker-active:reset"}]});var vd=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="line",t}return e.getDefaultOptions=function(){return $T},e.prototype.changeData=function(t){this.updateOption({data:t});var n=this,i=n.chart,a=n.options;Vs({chart:i,options:a}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Yp},e}(ke),pd=Dt({},ke.getDefaultOptions(),{legend:{position:"right",radio:{}},tooltip:{shared:!1,showTitle:!1,showMarkers:!1},label:{layout:{type:"limit-in-plot",cfg:{action:"ellipsis"}}},pieStyle:{stroke:"white",lineWidth:1},statistic:{title:{style:{fontWeight:300,color:"#4B535E",textAlign:"center",fontSize:"20px",lineHeight:1}},content:{style:{fontWeight:"bold",color:"rgba(44,53,66,0.85)",textAlign:"center",fontSize:"32px",lineHeight:1}}},theme:{components:{annotation:{text:{animate:!1}}}}}),KT=[1,0,0,0,1,0,0,0,1];function wc(r,e){var t=e?(0,p.pr)(e):(0,p.pr)(KT);return kr.transform(t,r)}var JT=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getActiveElements=function(){var t=kr.getDelegationObject(this.context);if(t){var n=this.context.view,i=t.component,a=t.item,o=i.get("field");if(o){var s=n.geometries[0].elements;return s.filter(function(l){return l.getModel().data[o]===a.value})}}return[]},e.prototype.getActiveElementLabels=function(){var t=this.context.view,n=this.getActiveElements(),i=t.geometries[0].labelsContainer.getChildren();return i.filter(function(a){return n.find(function(o){return(0,c.Xy)(o.getData(),a.get("data"))})})},e.prototype.transfrom=function(t){t===void 0&&(t=7.5);var n=this.getActiveElements(),i=this.getActiveElementLabels();n.forEach(function(a,o){var s=i[o],l=a.geometry.coordinate;if(l.isPolar&&l.isTransposed){var u=kr.getAngle(a.getModel(),l),f=u.startAngle,h=u.endAngle,v=(f+h)/2,d=t,g=d*Math.cos(v),y=d*Math.sin(v);a.shape.setMatrix(wc([["t",g,y]])),s.setMatrix(wc([["t",g,y]]))}})},e.prototype.active=function(){this.transfrom()},e.prototype.reset=function(){this.transfrom(0)},e}(er);function QT(r){var e=r.event,t,n=e.target;return n&&(t=n.get("element")),t}var tE=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getAnnotations=function(t){var n=t||this.context.view;return n.getController("annotation").option},e.prototype.getInitialAnnotation=function(){return this.initialAnnotation},e.prototype.init=function(){var t=this,n=this.context.view;n.removeInteraction("tooltip"),n.on("afterchangesize",function(){var i=t.getAnnotations(n);t.initialAnnotation=i})},e.prototype.change=function(t){var n=this.context,i=n.view,a=n.event;this.initialAnnotation||(this.initialAnnotation=this.getAnnotations());var o=(0,c.U2)(a,["data","data"]);if(a.type.match("legend-item")){var s=kr.getDelegationObject(this.context),l=i.getGroupedFields()[0];if(s&&l){var u=s.item;o=i.getData().find(function(d){return d[l]===u.value})}}if(o){var f=(0,c.U2)(t,"annotations",[]),h=(0,c.U2)(t,"statistic",{});i.getController("annotation").clear(!0),(0,c.S6)(f,function(d){typeof d=="object"&&i.annotation()[d.type](d)}),ks(i,{statistic:h,plotType:"pie"},o),i.render(!0)}var v=QT(this.context);v&&v.shape.toFront()},e.prototype.reset=function(){var t=this.context.view,n=t.getController("annotation");n.clear(!0);var i=this.getInitialAnnotation();(0,c.S6)(i,function(a){t.annotation()[a.type](a)}),t.render(!0)},e}(er),dd="pie-statistic";Ae(dd,tE),Oe("pie-statistic-active",{start:[{trigger:"element:mouseenter",action:"pie-statistic:change"}],end:[{trigger:"element:mouseleave",action:"pie-statistic:reset"}]}),Ae("pie-legend",JT),Oe("pie-legend-active",{start:[{trigger:"legend-item:mouseenter",action:"pie-legend:active"}],end:[{trigger:"legend-item:mouseleave",action:"pie-legend:reset"}]});function eE(r,e){var t=null;return(0,c.S6)(r,function(n){typeof n[e]=="number"&&(t+=n[e])}),t}function rE(r,e){var t;switch(r){case"inner":return t="-30%",(0,c.HD)(e)&&e.endsWith("%")?parseFloat(e)*.01>0?t:e:e<0?e:t;case"outer":return t=12,(0,c.HD)(e)&&e.endsWith("%")?parseFloat(e)*.01<0?t:e:e>0?e:t;default:return e}}function Ws(r,e){return(0,c.yW)(ia(r,e),function(t){return t[e]===0})}function nE(r){var e=r.chart,t=r.options,n=t.data,i=t.angleField,a=t.colorField,o=t.color,s=t.pieStyle,l=t.shape,u=ia(n,i);if(Ws(u,i)){var f="$$percentage$$";u=u.map(function(v){var d;return(0,p.pi)((0,p.pi)({},v),(d={},d[f]=1/u.length,d))}),e.data(u);var h=Dt({},r,{options:{xField:"1",yField:f,seriesField:a,isStack:!0,interval:{color:o,shape:l,style:s},args:{zIndexReversed:!0,sortZIndex:!0}}});Sr(h)}else{e.data(u);var h=Dt({},r,{options:{xField:"1",yField:i,seriesField:a,isStack:!0,interval:{color:o,shape:l,style:s},args:{zIndexReversed:!0,sortZIndex:!0}}});Sr(h)}return r}function iE(r){var e,t=r.chart,n=r.options,i=n.meta,a=n.colorField,o=Dt({},i);return t.scale(o,(e={},e[a]={type:"cat"},e)),r}function aE(r){var e=r.chart,t=r.options,n=t.radius,i=t.innerRadius,a=t.startAngle,o=t.endAngle;return e.coordinate({type:"theta",cfg:{radius:n,innerRadius:i,startAngle:a,endAngle:o}}),r}function oE(r){var e=r.chart,t=r.options,n=t.label,i=t.colorField,a=t.angleField,o=e.geometries[0];if(!n)o.label(!1);else{var s=n.callback,l=(0,p._T)(n,["callback"]),u=yr(l);if(u.content){var f=u.content;u.content=function(g,y,m){var x=g[i],b=g[a],C=e.getScaleByField(a),A=C==null?void 0:C.scale(b);return(0,c.mf)(f)?f((0,p.pi)((0,p.pi)({},g),{percent:A}),y,m):(0,c.HD)(f)?Dp(f,{value:b,name:x,percentage:(0,c.hj)(A)&&!(0,c.UM)(b)?(A*100).toFixed(2)+"%":null}):f}}var h={inner:"",outer:"pie-outer",spider:"pie-spider"},v=u.type?h[u.type]:"pie-outer",d=u.layout?(0,c.kJ)(u.layout)?u.layout:[u.layout]:[];u.layout=(v?[{type:v}]:[]).concat(d),o.label({fields:i?[a,i]:[a],callback:s,cfg:(0,p.pi)((0,p.pi)({},u),{offset:rE(u.type,u.offset),type:"pie"})})}return r}function gd(r){var e=r.innerRadius,t=r.statistic,n=r.angleField,i=r.colorField,a=r.meta,o=r.locale,s=Rs(o);if(e&&t){var l=Dt({},pd.statistic,t),u=l.title,f=l.content;return u!==!1&&(u=Dt({},{formatter:function(h){var v=h?h[i]:(0,c.UM)(u.content)?s.get(["statistic","total"]):u.content,d=(0,c.U2)(a,[i,"formatter"])||function(g){return g};return d(v)}},u)),f!==!1&&(f=Dt({},{formatter:function(h,v){var d=h?h[n]:eE(v,n),g=(0,c.U2)(a,[n,"formatter"])||function(y){return y};return h||(0,c.UM)(f.content)?g(d):f.content}},f)),Dt({},{statistic:{title:u,content:f}},r)}return r}function yd(r){var e=r.chart,t=r.options,n=gd(t),i=n.innerRadius,a=n.statistic;return e.getController("annotation").clear(!0),Fe(ir())(r),i&&a&&ks(e,{statistic:a,plotType:"pie"}),r}function sE(r){var e=r.chart,t=r.options,n=t.tooltip,i=t.colorField,a=t.angleField,o=t.data;if(n===!1)e.tooltip(n);else if(e.tooltip(Dt({},n,{shared:!1})),Ws(o,a)){var s=(0,c.U2)(n,"fields"),l=(0,c.U2)(n,"formatter");(0,c.xb)((0,c.U2)(n,"fields"))&&(s=[i,a],l=l||function(u){return{name:u[i],value:(0,c.BB)(u[a])}}),e.geometries[0].tooltip(s.join("*"),aa(s,l))}return r}function lE(r){var e=r.chart,t=r.options,n=gd(t),i=n.interactions,a=n.statistic,o=n.annotations;return(0,c.S6)(i,function(s){var l,u;if(s.enable===!1)e.removeInteraction(s.type);else if(s.type==="pie-statistic-active"){var f=[];((l=s.cfg)===null||l===void 0?void 0:l.start)||(f=[{trigger:"element:mouseenter",action:dd+":change",arg:{statistic:a,annotations:o}}]),(0,c.S6)((u=s.cfg)===null||u===void 0?void 0:u.start,function(h){f.push((0,p.pi)((0,p.pi)({},h),{arg:{statistic:a,annotations:o}}))}),e.interaction(s.type,Dt({},s.cfg,{start:f}))}else e.interaction(s.type,s.cfg||{})}),r}function md(r){return Fe(Vr("pieStyle"),nE,iE,Ye,aE,Ti,sE,oE,ii,yd,lE,qe)(r)}var uE=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="pie",t}return e.getDefaultOptions=function(){return pd},e.prototype.changeData=function(t){this.chart.emit(z.BEFORE_CHANGE_DATA,ar.fromData(this.chart,z.BEFORE_CHANGE_DATA,null));var n=this.options,i=this.options.angleField,a=ia(n.data,i),o=ia(t,i);Ws(a,i)||Ws(o,i)?this.update({data:t}):(this.updateOption({data:t}),this.chart.data(o),yd({chart:this.chart,options:this.options}),this.chart.render(!0)),this.chart.emit(z.AFTER_CHANGE_DATA,ar.fromData(this.chart,z.AFTER_CHANGE_DATA,null))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return md},e}(ke),xd=["#FAAD14","#E8EDF3"],cE={percent:.2,color:xd,animation:{}};function Sc(r){var e=(0,c.uZ)(Ai(r)?r:0,0,1);return[{current:""+e,type:"current",percent:e},{current:""+e,type:"target",percent:1}]}function wd(r){var e=r.chart,t=r.options,n=t.percent,i=t.progressStyle,a=t.color,o=t.barWidthRatio;e.data(Sc(n));var s=Dt({},r,{options:{xField:"current",yField:"percent",seriesField:"type",widthRatio:o,interval:{style:i,color:(0,c.HD)(a)?[a,xd[1]]:a},args:{zIndexReversed:!0,sortZIndex:!0}}});return Sr(s),e.tooltip(!1),e.axis(!1),e.legend(!1),r}function fE(r){var e=r.chart;return e.coordinate("rect").transpose(),r}function Sd(r){return Fe(wd,or({}),fE,qe,Ye,ir())(r)}var hE=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="process",t}return e.getDefaultOptions=function(){return cE},e.prototype.changeData=function(t){this.updateOption({percent:t}),this.chart.changeData(Sc(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Sd},e}(ke);function vE(r){var e=r.chart,t=r.options,n=t.innerRadius,i=t.radius;return e.coordinate("theta",{innerRadius:n,radius:i}),r}function bd(r,e){var t=r.chart,n=r.options,i=n.innerRadius,a=n.statistic,o=n.percent,s=n.meta;if(t.getController("annotation").clear(!0),i&&a){var l=(0,c.U2)(s,["percent","formatter"])||function(f){return(f*100).toFixed(2)+"%"},u=a.content;u&&(u=Dt({},u,{content:(0,c.UM)(u.content)?l(o):u.content})),ks(t,{statistic:(0,p.pi)((0,p.pi)({},a),{content:u}),plotType:"ring-progress"},{percent:o})}return e&&t.render(!0),r}function Md(r){return Fe(wd,or({}),vE,bd,qe,Ye,ir())(r)}var pE={percent:.2,innerRadius:.8,radius:.98,color:["#FAAD14","#E8EDF3"],statistic:{title:!1,content:{style:{fontSize:"14px",fontWeight:300,fill:"#4D4D4D",textAlign:"center",textBaseline:"middle"}}},animation:{}},dE=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="ring-process",t}return e.getDefaultOptions=function(){return pE},e.prototype.changeData=function(t){this.chart.emit(z.BEFORE_CHANGE_DATA,ar.fromData(this.chart,z.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(Sc(t)),bd({chart:this.chart,options:this.options},!0),this.chart.emit(z.AFTER_CHANGE_DATA,ar.fromData(this.chart,z.AFTER_CHANGE_DATA,null))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Md},e}(ke),Li=J(56645),gE={exp:Li.regressionExp,linear:Li.regressionLinear,loess:Li.regressionLoess,log:Li.regressionLog,poly:Li.regressionPoly,pow:Li.regressionPow,quad:Li.regressionQuad};function yE(r,e){var t=10,n={regionStyle:[{position:{start:[r,"max"],end:["max",e]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:["min","max"],end:[r,e]},style:{fill:"#a3dda1",opacity:.4}},{position:{start:["min",e],end:[r,"min"]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:[r,e],end:["max","min"]},style:{fill:"#a3dda1",opacity:.4}}],lineStyle:{stroke:"#9ba29a",lineWidth:1},labelStyle:[{position:["max",e],offsetX:-t,offsetY:-t,style:{textAlign:"right",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",e],offsetX:t,offsetY:-t,style:{textAlign:"left",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",e],offsetX:t,offsetY:t,style:{textAlign:"left",textBaseline:"top",fontSize:14,fill:"#ccc"}},{position:["max",e],offsetX:-t,offsetY:t,style:{textAlign:"right",textBaseline:"top",fontSize:14,fill:"#ccc"}}]};return n}var mE=function(r,e){var t=e.view,n=e.options,i=n.xField,a=n.yField,o=t.getScaleByField(i),s=t.getScaleByField(a),l=r.map(function(u){return t.getCoordinate().convert({x:o.scale(u[0]),y:s.scale(u[1])})});return h2(l,!1)},xE=function(r){var e=r.options,t=e.xField,n=e.yField,i=e.data,a=e.regressionLine,o=a.type,s=o===void 0?"linear":o,l=a.algorithm,u;if(l)u=(0,c.kJ)(l)?l:l(i);else{var f=gE[s]().x(function(h){return h[t]}).y(function(h){return h[n]});u=f(i)}return mE(u,r)},wE=function(r){var e,t=r.meta,n=t===void 0?{}:t,i=r.xField,a=r.yField,o=r.data,s=o[0][i],l=o[0][a],u=s>0,f=l>0;function h(v,d){var g=(0,c.U2)(n,[v]);function y(x){return(0,c.U2)(g,x)}var m={};return d==="x"?((0,c.hj)(s)&&((0,c.hj)(y("min"))||(m.min=u?0:s*2),(0,c.hj)(y("max"))||(m.max=u?s*2:0)),m):((0,c.hj)(l)&&((0,c.hj)(y("min"))||(m.min=f?0:l*2),(0,c.hj)(y("max"))||(m.max=f?l*2:0)),m)}return(0,p.pi)((0,p.pi)({},n),(e={},e[i]=(0,p.pi)((0,p.pi)({},n[i]),h(i,"x")),e[a]=(0,p.pi)((0,p.pi)({},n[a]),h(a,"y")),e))};function Cd(r){var e=r.data,t=e===void 0?[]:e,n=r.xField,i=r.yField;if(t.length){for(var a=!0,o=!0,s=t[0],l=void 0,u=1;u
    ',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}},showCrosshairs:!0,crosshairs:{type:"x"}},NE={appendPadding:2,tooltip:(0,p.pi)({},Ld),animation:{}};function zE(r){var e=r.chart,t=r.options,n=t.data,i=t.color,a=t.areaStyle,o=t.point,s=t.line,l=o==null?void 0:o.state,u=Di(n);e.data(u);var f=Dt({},r,{options:{xField:so,yField:sa,area:{color:i,style:a},line:s,point:o}}),h=Dt({},f,{options:{tooltip:!1}}),v=Dt({},f,{options:{tooltip:!1,state:l}});return zs(f),oa(h),Gr(v),e.axis(!1),e.legend(!1),r}function la(r){var e,t,n=r.options,i=n.xAxis,a=n.yAxis,o=n.data,s=Di(o);return Fe(or((e={},e[so]=i,e[sa]=a,e),(t={},t[so]={type:"cat"},t[sa]=nc(s,sa),t)))(r)}function Dd(r){return Fe(Vr("areaStyle"),zE,la,pr,Ye,qe,ir())(r)}var UE={appendPadding:2,tooltip:(0,p.pi)({},Ld),color:"l(90) 0:#E5EDFE 1:#ffffff",areaStyle:{fillOpacity:.6},line:{size:1,color:"#5B8FF9"},animation:{}},VE=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="tiny-area",t}return e.getDefaultOptions=function(){return UE},e.prototype.changeData=function(t){this.updateOption({data:t});var n=this,i=n.chart,a=n.options;la({chart:i,options:a}),i.changeData(Di(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Dd},e}(ke);function GE(r){var e=r.chart,t=r.options,n=t.data,i=t.color,a=t.columnStyle,o=t.columnWidthRatio,s=Di(n);e.data(s);var l=Dt({},r,{options:{xField:so,yField:sa,widthRatio:o,interval:{style:a,color:i}}});return Sr(l),e.axis(!1),e.legend(!1),e.interaction("element-active"),r}function Pd(r){return Fe(Ye,Vr("columnStyle"),GE,la,pr,qe,ir())(r)}var HE={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(r,e){return""+(0,c.U2)(e,[0,"data","y"],0)},containerTpl:'
    ',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}}},YE={appendPadding:2,tooltip:(0,p.pi)({},HE),animation:{}},XE=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="tiny-column",t}return e.getDefaultOptions=function(){return YE},e.prototype.changeData=function(t){this.updateOption({data:t});var n=this,i=n.chart,a=n.options;la({chart:i,options:a}),i.changeData(Di(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Pd},e}(ke);function WE(r){var e=r.chart,t=r.options,n=t.data,i=t.color,a=t.lineStyle,o=t.point,s=o==null?void 0:o.state,l=Di(n);e.data(l);var u=Dt({},r,{options:{xField:so,yField:sa,line:{color:i,style:a},point:o}}),f=Dt({},u,{options:{tooltip:!1,state:s}});return oa(u),Gr(f),e.axis(!1),e.legend(!1),r}function Od(r){return Fe(WE,la,Ye,pr,qe,ir())(r)}var ZE=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="tiny-line",t}return e.getDefaultOptions=function(){return NE},e.prototype.changeData=function(t){this.updateOption({data:t});var n=this,i=n.chart,a=n.options;la({chart:i,options:a}),i.changeData(Di(t))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Od},e}(ke),jE={line:Yp,pie:md,column:Hs,bar:$p,area:Xp,gauge:ud,"tiny-line":Od,"tiny-column":Pd,"tiny-area":Dd,"ring-progress":Md,progress:Sd,scatter:Ad,histogram:hd,funnel:rd,stock:Id},$E={line:vd,pie:uE,column:uT,bar:sT,area:N2,gauge:VT,"tiny-line":ZE,"tiny-column":XE,"tiny-area":VE,"ring-progress":dE,progress:hE,scatter:IE,histogram:jT,funnel:OT,stock:RE},qE={pie:{label:!1},column:{tooltip:{showMarkers:!1}},bar:{tooltip:{showMarkers:!1}}};function bc(r,e,t){var n=$E[r];if(!n){console.error("could not find "+r+" plot");return}var i=jE[r];i({chart:e,options:Dt({},n.getDefaultOptions(),(0,c.U2)(qE,r,{}),t)})}function KE(r){var e=r.chart,t=r.options,n=t.views,i=t.legend;return(0,c.S6)(n,function(a){var o=a.region,s=a.data,l=a.meta,u=a.axes,f=a.coordinate,h=a.interactions,v=a.annotations,d=a.tooltip,g=a.geometries,y=e.createView({region:o});y.data(s);var m={};u&&(0,c.S6)(u,function(x,b){m[b]=$e(x,Br)}),m=Dt({},l,m),y.scale(m),u?(0,c.S6)(u,function(x,b){y.axis(b,x)}):y.axis(!1),y.coordinate(f),(0,c.S6)(g,function(x){var b=Rr({chart:y,options:x}).ext,C=x.adjust;C&&b.geometry.adjust(C)}),(0,c.S6)(h,function(x){x.enable===!1?y.removeInteraction(x.type):y.interaction(x.type,x.cfg)}),(0,c.S6)(v,function(x){y.annotation()[x.type]((0,p.pi)({},x))}),typeof a.animation=="boolean"?y.animate(!1):(y.animate(!0),(0,c.S6)(y.geometries,function(x){x.animate(a.animation)})),d&&(y.interaction("tooltip"),y.tooltip(d))}),i?(0,c.S6)(i,function(a,o){e.legend(o,a)}):e.legend(!1),e.tooltip(t.tooltip),r}function JE(r){var e=r.chart,t=r.options,n=t.plots,i=t.data,a=i===void 0?[]:i;return(0,c.S6)(n,function(o){var s=o.type,l=o.region,u=o.options,f=u===void 0?{}:u,h=o.top,v=f.tooltip;if(h){bc(s,e,(0,p.pi)((0,p.pi)({},f),{data:a}));return}var d=e.createView((0,p.pi)({region:l},$e(f,Up)));v&&d.interaction("tooltip"),bc(s,d,(0,p.pi)({data:a},f))}),r}function QE(r){var e=r.chart,t=r.options;return e.option("slider",t.slider),r}function tF(r){return Fe(qe,KE,JE,rr,qe,Ye,pr,QE,ir())(r)}function eF(r,e){var t=r.getModel(),n=t.data,i;return(0,c.kJ)(n)?i=n[0][e]:i=n[e],i}function rF(r){var e=Ps(r);(0,c.S6)(e,function(t){t.hasState("active")&&t.setState("active",!1),t.hasState("selected")&&t.setState("selected",!1),t.hasState("inactive")&&t.setState("inactive",!1)})}var nF=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getAssociationItems=function(t,n){var i,a=this.context.event,o=n||{},s=o.linkField,l=o.dim,u=[];if((i=a.data)===null||i===void 0?void 0:i.data){var f=a.data.data;(0,c.S6)(t,function(h){var v,d,g=s;if(l==="x"?g=h.getXScale().field:l==="y"?g=(v=h.getYScales().find(function(m){return m.field===g}))===null||v===void 0?void 0:v.field:g||(g=(d=h.getGroupScales()[0])===null||d===void 0?void 0:d.field),!!g){var y=(0,c.UI)(Ps(h),function(m){var x=!1,b=!1,C=(0,c.kJ)(f)?(0,c.U2)(f[0],g):(0,c.U2)(f,g);return eF(m,g)===C?x=!0:b=!0,{element:m,view:h,active:x,inactive:b}});u.push.apply(u,y)}})}return u},e.prototype.showTooltip=function(t){var n=Pp(this.context.view),i=this.getAssociationItems(n,t);(0,c.S6)(i,function(a){if(a.active){var o=a.element.shape.getCanvasBBox();a.view.showTooltip({x:o.minX+o.width/2,y:o.minY+o.height/2})}})},e.prototype.hideTooltip=function(){var t=Pp(this.context.view);(0,c.S6)(t,function(n){n.hideTooltip()})},e.prototype.active=function(t){var n=Qa(this.context.view),i=this.getAssociationItems(n,t);(0,c.S6)(i,function(a){var o=a.active,s=a.element;o&&s.setState("active",!0)})},e.prototype.selected=function(t){var n=Qa(this.context.view),i=this.getAssociationItems(n,t);(0,c.S6)(i,function(a){var o=a.active,s=a.element;o&&s.setState("selected",!0)})},e.prototype.highlight=function(t){var n=Qa(this.context.view),i=this.getAssociationItems(n,t);(0,c.S6)(i,function(a){var o=a.inactive,s=a.element;o&&s.setState("inactive",!0)})},e.prototype.reset=function(){var t=Qa(this.context.view);(0,c.S6)(t,function(n){rF(n)})},e}(er);Ae("association",nF),Oe("association-active",{start:[{trigger:"element:mouseenter",action:"association:active"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Oe("association-selected",{start:[{trigger:"element:mouseenter",action:"association:selected"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Oe("association-highlight",{start:[{trigger:"element:mouseenter",action:"association:highlight"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Oe("association-tooltip",{start:[{trigger:"element:mousemove",action:"association:showTooltip"}],end:[{trigger:"element:mouseleave",action:"association:hideTooltip"}]});var iF=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="mix",t}return e.prototype.getSchemaAdaptor=function(){return tF},e}(ke),ua;(function(r){r.DEV="DEV",r.BETA="BETA",r.STABLE="STABLE"})(ua||(ua={}));function aF(r,e){console.warn(r===ua.DEV?"Plot '"+e+"' is in DEV stage, just give us issues.":r===ua.BETA?"Plot '"+e+"' is in BETA stage, DO NOT use it in production env.":r===ua.STABLE?"Plot '"+e+`' is in STABLE stage, import it by "import { `+e+` } from '@antv/g2plot'".`:"invalid Stage type.")}var $_=function(){function r(){}return Object.defineProperty(r,"MultiView",{get:function(){return aF(ua.STABLE,"MultiView"),iF},enumerable:!1,configurable:!0}),r}(),mn="first-axes-view",xn="second-axes-view",Pi="series-field-key";function kd(r,e,t,n,i){var a=[];e.forEach(function(h){n.forEach(function(v){var d,g=(d={},d[r]=v[r],d[t]=h,d[h]=v[h],d);a.push(g)})});var o=Object.values((0,c.vM)(a,t)),s=o[0],l=s===void 0?[]:s,u=o[1],f=u===void 0?[]:u;return i?[l.reverse(),f.reverse()]:[l,f]}function Nn(r){return r!=="vertical"}function oF(r,e,t){var n=e[0],i=e[1],a=n.autoPadding,o=i.autoPadding,s=r.__axisPosition,l=s.layout,u=s.position;if(Nn(l)&&u==="top"&&(n.autoPadding=t.instance(a.top,0,a.bottom,a.left),i.autoPadding=t.instance(o.top,a.left,o.bottom,0)),Nn(l)&&u==="bottom"&&(n.autoPadding=t.instance(a.top,a.right/2+5,a.bottom,a.left),i.autoPadding=t.instance(o.top,o.right,o.bottom,a.right/2+5)),!Nn(l)&&u==="bottom"){var f=a.left>=o.left?a.left:o.left;n.autoPadding=t.instance(a.top,a.right,a.bottom/2+5,f),i.autoPadding=t.instance(a.bottom/2+5,o.right,o.bottom,f)}if(!Nn(l)&&u==="top"){var f=a.left>=o.left?a.left:o.left;n.autoPadding=t.instance(a.top,a.right,0,f),i.autoPadding=t.instance(0,o.right,a.top,f)}}function sF(r){var e=r.chart,t=r.options,n=t.data,i=t.xField,a=t.yField,o=t.color,s=t.barStyle,l=t.widthRatio,u=t.legend,f=t.layout,h=kd(i,a,Pi,n,Nn(f));u?e.legend(Pi,u):u===!1&&e.legend(!1);var v,d,g=h[0],y=h[1];Nn(f)?(v=e.createView({region:{start:{x:0,y:0},end:{x:.5,y:1}},id:mn}),v.coordinate().transpose().reflect("x"),d=e.createView({region:{start:{x:.5,y:0},end:{x:1,y:1}},id:xn}),d.coordinate().transpose(),v.data(g),d.data(y)):(v=e.createView({region:{start:{x:0,y:0},end:{x:1,y:.5}},id:mn}),d=e.createView({region:{start:{x:0,y:.5},end:{x:1,y:1}},id:xn}),d.coordinate().reflect("y"),v.data(g),d.data(y));var m=Dt({},r,{chart:v,options:{widthRatio:l,xField:i,yField:a[0],seriesField:Pi,interval:{color:o,style:s}}});Sr(m);var x=Dt({},r,{chart:d,options:{xField:i,yField:a[1],seriesField:Pi,widthRatio:l,interval:{color:o,style:s}}});return Sr(x),r}function lF(r){var e,t,n,i=r.options,a=r.chart,o=i.xAxis,s=i.yAxis,l=i.xField,u=i.yField,f=Be(a,mn),h=Be(a,xn),v={};return(0,c.XP)((i==null?void 0:i.meta)||{}).map(function(d){(0,c.U2)(i==null?void 0:i.meta,[d,"alias"])&&(v[d]=i.meta[d].alias)}),a.scale((e={},e[Pi]={sync:!0,formatter:function(d){return(0,c.U2)(v,d,d)}},e)),or((t={},t[l]=o,t[u[0]]=s[u[0]],t))(Dt({},r,{chart:f})),or((n={},n[l]=o,n[u[1]]=s[u[1]],n))(Dt({},r,{chart:h})),r}function uF(r){var e=r.chart,t=r.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField,s=t.layout,l=Be(e,mn),u=Be(e,xn);return(n==null?void 0:n.position)==="bottom"?u.axis(a,(0,p.pi)((0,p.pi)({},n),{label:{formatter:function(){return""}}})):u.axis(a,!1),n===!1?l.axis(a,!1):l.axis(a,(0,p.pi)({position:Nn(s)?"top":"bottom"},n)),i===!1?(l.axis(o[0],!1),u.axis(o[1],!1)):(l.axis(o[0],i[o[0]]),u.axis(o[1],i[o[1]])),e.__axisPosition={position:l.getOptions().axes[a].position,layout:s},r}function cF(r){var e=r.chart;return rr(Dt({},r,{chart:Be(e,mn)})),rr(Dt({},r,{chart:Be(e,xn)})),r}function fF(r){var e=r.chart,t=r.options,n=t.yField,i=t.yAxis;return Ei(Dt({},r,{chart:Be(e,mn),options:{yAxis:i[n[0]]}})),Ei(Dt({},r,{chart:Be(e,xn),options:{yAxis:i[n[1]]}})),r}function hF(r){var e=r.chart;return Ye(Dt({},r,{chart:Be(e,mn)})),Ye(Dt({},r,{chart:Be(e,xn)})),Ye(r),r}function vF(r){var e=r.chart;return qe(Dt({},r,{chart:Be(e,mn)})),qe(Dt({},r,{chart:Be(e,xn)})),r}function pF(r){var e=this,t,n,i=r.chart,a=r.options,o=a.label,s=a.yField,l=a.layout,u=Be(i,mn),f=Be(i,xn),h=wr(u,"interval"),v=wr(f,"interval");if(!o)h.label(!1),v.label(!1);else{var d=o.callback,g=(0,p._T)(o,["callback"]);g.position||(g.position="middle"),g.offset===void 0&&(g.offset=2);var y=(0,p.pi)({},g);if(Nn(l)){var m=((t=y.style)===null||t===void 0?void 0:t.textAlign)||(g.position==="middle"?"center":"left");g.style=Dt({},g.style,{textAlign:m});var x={left:"right",right:"left",center:"center"};y.style=Dt({},y.style,{textAlign:x[m]})}else{var b={top:"bottom",bottom:"top",middle:"middle"};typeof g.position=="string"?g.position=b[g.position]:typeof g.position=="function"&&(g.position=function(){for(var B=[],rt=0;rt1?e+"_"+t:""+e}function Nd(r){var e=r.data,t=r.xField,n=r.measureField,i=r.rangeField,a=r.targetField,o=r.layout,s=[],l=[];e.forEach(function(h,v){var d=[h[i]].flat();d.sort(function(m,x){return m-x}),d.forEach(function(m,x){var b,C=x===0?m:d[x]-d[x-1];s.push((b={rKey:i+"_"+x},b[t]=t?h[t]:String(v),b[i]=C,b))});var g=[h[n]].flat();g.forEach(function(m,x){var b;s.push((b={mKey:Rd(g,n,x)},b[t]=t?h[t]:String(v),b[n]=m,b))});var y=[h[a]].flat();y.forEach(function(m,x){var b;s.push((b={tKey:Rd(y,a,x)},b[t]=t?h[t]:String(v),b[a]=m,b))}),l.push(h[i],h[n],h[a])});var u=Math.min.apply(Math,l.flat(Infinity)),f=Math.max.apply(Math,l.flat(Infinity));return u=u>0?0:u,o==="vertical"&&s.reverse(),{min:u,max:f,ds:s}}function AF(r){var e=r.chart,t=r.options,n=t.bulletStyle,i=t.targetField,a=t.rangeField,o=t.measureField,s=t.xField,l=t.color,u=t.layout,f=t.size,h=t.label,v=Nd(t),d=v.min,g=v.max,y=v.ds;e.data(y);var m=Dt({},r,{options:{xField:s,yField:a,seriesField:"rKey",isStack:!0,label:(0,c.U2)(h,"range"),interval:{color:(0,c.U2)(l,"range"),style:(0,c.U2)(n,"range"),size:(0,c.U2)(f,"range")}}});Sr(m),e.geometries[0].tooltip(!1);var x=Dt({},r,{options:{xField:s,yField:o,seriesField:"mKey",isStack:!0,label:(0,c.U2)(h,"measure"),interval:{color:(0,c.U2)(l,"measure"),style:(0,c.U2)(n,"measure"),size:(0,c.U2)(f,"measure")}}});Sr(x);var b=Dt({},r,{options:{xField:s,yField:i,seriesField:"tKey",label:(0,c.U2)(h,"target"),point:{color:(0,c.U2)(l,"target"),style:(0,c.U2)(n,"target"),size:(0,c.mf)((0,c.U2)(f,"target"))?function(C){return(0,c.U2)(f,"target")(C)/2}:(0,c.U2)(f,"target")/2,shape:u==="horizontal"?"line":"hyphen"}}});return Gr(b),u==="horizontal"&&e.coordinate().transpose(),(0,p.pi)((0,p.pi)({},r),{ext:{data:{min:d,max:g}}})}function zd(r){var e,t,n=r.options,i=r.ext,a=n.xAxis,o=n.yAxis,s=n.targetField,l=n.rangeField,u=n.measureField,f=n.xField,h=i.data;return Fe(or((e={},e[f]=a,e[u]=o,e),(t={},t[u]={min:h==null?void 0:h.min,max:h==null?void 0:h.max,sync:!0},t[s]={sync:""+u},t[l]={sync:""+u},t)))(r)}function TF(r){var e=r.chart,t=r.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.measureField,s=t.rangeField,l=t.targetField;return e.axis(""+s,!1),e.axis(""+l,!1),n===!1?e.axis(""+a,!1):e.axis(""+a,n),i===!1?e.axis(""+o,!1):e.axis(""+o,i),r}function EF(r){var e=r.chart,t=r.options,n=t.legend;return e.removeInteraction("legend-filter"),e.legend(n),e.legend("rKey",!1),e.legend("mKey",!1),e.legend("tKey",!1),r}function FF(r){var e=r.chart,t=r.options,n=t.label,i=t.measureField,a=t.targetField,o=t.rangeField,s=e.geometries,l=s[0],u=s[1],f=s[2];return(0,c.U2)(n,"range")?l.label(""+o,(0,p.pi)({layout:[{type:"limit-in-plot"}]},yr(n.range))):l.label(!1),(0,c.U2)(n,"measure")?u.label(""+i,(0,p.pi)({layout:[{type:"limit-in-plot"}]},yr(n.measure))):u.label(!1),(0,c.U2)(n,"target")?f.label(""+a,(0,p.pi)({layout:[{type:"limit-in-plot"}]},yr(n.target))):f.label(!1),r}function IF(r){Fe(AF,zd,TF,EF,Ye,FF,pr,rr,qe)(r)}var LF=Dt({},ke.getDefaultOptions(),{layout:"horizontal",size:{range:30,measure:20,target:20},xAxis:{tickLine:!1,line:null},bulletStyle:{range:{fillOpacity:.5}},label:{measure:{position:"right"}},tooltip:{showMarkers:!1}}),J_=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="bullet",t}return e.getDefaultOptions=function(){return LF},e.prototype.changeData=function(t){this.updateOption({data:t});var n=Nd(this.options),i=n.min,a=n.max,o=n.ds;zd({options:this.options,ext:{data:{min:i,max:a}},chart:this.chart}),this.chart.changeData(o)},e.prototype.getSchemaAdaptor=function(){return IF},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e}(ke),DF={y:0,nodeWidthRatio:.05,weight:!1,nodePaddingRatio:.1,id:function(r){return r.id},source:function(r){return r.source},target:function(r){return r.target},sourceWeight:function(r){return r.value||1},targetWeight:function(r){return r.value||1},sortBy:null};function PF(r,e,t){(0,c.U5)(r,function(n,i){n.inEdges=e.filter(function(a){return""+t.target(a)==""+i}),n.outEdges=e.filter(function(a){return""+t.source(a)==""+i}),n.edges=n.outEdges.concat(n.inEdges),n.frequency=n.edges.length,n.value=0,n.inEdges.forEach(function(a){n.value+=t.targetWeight(a)}),n.outEdges.forEach(function(a){n.value+=t.sourceWeight(a)})})}function OF(r,e){var t={weight:function(i,a){return a.value-i.value},frequency:function(i,a){return a.frequency-i.frequency},id:function(i,a){return(""+e.id(i)).localeCompare(""+e.id(a))}},n=t[e.sortBy];!n&&(0,c.mf)(e.sortBy)&&(n=e.sortBy),n&&r.sort(n)}function kF(r,e){var t=r.length;if(!t)throw new TypeError("Invalid nodes: it's empty!");if(e.weight){var n=e.nodePaddingRatio;if(n<0||n>=1)throw new TypeError("Invalid nodePaddingRatio: it must be in range [0, 1)!");var i=n/(2*t),a=e.nodeWidthRatio;if(a<=0||a>=1)throw new TypeError("Invalid nodeWidthRatio: it must be in range (0, 1)!");var o=0;r.forEach(function(l){o+=l.value}),r.forEach(function(l){l.weight=l.value/o,l.width=l.weight*(1-n),l.height=a}),r.forEach(function(l,u){for(var f=0,h=u-1;h>=0;h--)f+=r[h].width+2*i;var v=l.minX=i+f,d=l.maxX=l.minX+l.width,g=l.minY=e.y-a/2,y=l.maxY=g+a;l.x=[v,d,d,v],l.y=[g,g,y,y]})}else{var s=1/t;r.forEach(function(l,u){l.x=(u+.5)*s,l.y=e.y})}return r}function _F(r,e,t){if(t.weight){var n={};(0,c.U5)(r,function(i,a){n[a]=i.value}),e.forEach(function(i){var a=t.source(i),o=t.target(i),s=r[a],l=r[o];if(s&&l){var u=n[a],f=t.sourceWeight(i),h=s.minX+(s.value-u)/s.value*s.width,v=h+f/s.value*s.width;n[a]-=f;var d=n[o],g=t.targetWeight(i),y=l.minX+(l.value-d)/l.value*l.width,m=y+g/l.value*l.width;n[o]-=g;var x=t.y;i.x=[h,v,y,m],i.y=[x,x,x,x],i.source=s,i.target=l}})}else e.forEach(function(i){var a=r[t.source(i)],o=r[t.target(i)];a&&o&&(i.x=[a.x,o.x],i.y=[a.y,o.y],i.source=a,i.target=o)});return e}function BF(r){return(0,c.f0)({},DF,r)}function RF(r,e){var t=BF(r),n={},i=e.nodes,a=e.links;i.forEach(function(l){var u=t.id(l);n[u]=l}),PF(n,a,t),OF(i,t);var o=kF(i,t),s=_F(n,a,t);return{nodes:o,links:s}}var Ud="x",Vd="y",Gd="name",Hd="source",NF={nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.5,lineWidth:2},label:{fields:["x","name"],callback:function(r,e){var t=(r[0]+r[1])/2,n=t>.5?-4:4;return{offsetX:n,content:e}},labelEmit:!0,style:{fill:"#8c8c8c"}},tooltip:{showTitle:!1,showMarkers:!1,fields:["source","target","value","isNode"],showContent:function(r){return!(0,c.U2)(r,[0,"data","isNode"])},formatter:function(r){var e=r.source,t=r.target,n=r.value;return{name:e+" -> "+t,value:n}}},interactions:[{type:"element-active"}],weight:!0,nodePaddingRatio:.1,nodeWidthRatio:.05};function zF(r){var e=r.options,t=e.data,n=e.sourceField,i=e.targetField,a=e.weightField,o=e.nodePaddingRatio,s=e.nodeWidthRatio,l=e.rawFields,u=l===void 0?[]:l,f=Cp(t,n,i,a),h=RF({weight:!0,nodePaddingRatio:o,nodeWidthRatio:s},f),v=h.nodes,d=h.links,g=v.map(function(m){return(0,p.pi)((0,p.pi)({},$e(m,(0,p.pr)(["id","x","y","name"],u))),{isNode:!0})}),y=d.map(function(m){return(0,p.pi)((0,p.pi)({source:m.source.name,target:m.target.name,name:m.source.name||m.target.name},$e(m,(0,p.pr)(["x","y","value"],u))),{isNode:!1})});return(0,p.pi)((0,p.pi)({},r),{ext:(0,p.pi)((0,p.pi)({},r.ext),{chordData:{nodesData:g,edgesData:y}})})}function UF(r){var e,t=r.chart;return t.scale((e={x:{sync:!0,nice:!0},y:{sync:!0,nice:!0,max:1}},e[Gd]={sync:"color"},e[Hd]={sync:"color"},e)),r}function VF(r){var e=r.chart;return e.axis(!1),r}function GF(r){var e=r.chart;return e.legend(!1),r}function HF(r){var e=r.chart,t=r.options,n=t.tooltip;return e.tooltip(n),r}function YF(r){var e=r.chart;return e.coordinate("polar").reflect("y"),r}function XF(r){var e=r.chart,t=r.options,n=r.ext.chordData.nodesData,i=t.nodeStyle,a=t.label,o=t.tooltip,s=e.createView();return s.data(n),Us({chart:s,options:{xField:Ud,yField:Vd,seriesField:Gd,polygon:{style:i},label:a,tooltip:o}}),r}function WF(r){var e=r.chart,t=r.options,n=r.ext.chordData.edgesData,i=t.edgeStyle,a=t.tooltip,o=e.createView();o.data(n);var s={xField:Ud,yField:Vd,seriesField:Hd,edge:{style:i,shape:"arc"},tooltip:a};return Np({chart:o,options:s}),r}function ZF(r){var e=r.chart,t=r.options,n=t.animation;return to(e,n,o2(e)),r}function jF(r){return Fe(Ye,zF,YF,UF,VF,GF,HF,WF,XF,rr,ii,ZF)(r)}var Q_=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="chord",t}return e.getDefaultOptions=function(){return NF},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return jF},e}(ke),$F=["x","y","r","name","value","path","depth"],qF={colorField:"name",autoFit:!0,pointStyle:{lineWidth:0,stroke:"#fff"},legend:!1,hierarchyConfig:{size:[1,1],padding:0},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1}},Yd=4,KF=0,Xd=5,Wd="drilldown-bread-crumb",JF={position:"top-left",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}},lo="hierarchy-data-transform-params",QF=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.name="drill-down",t.historyCache=[],t.breadCrumbGroup=null,t.breadCrumbCfg=JF,t}return e.prototype.click=function(){var t=(0,c.U2)(this.context,["event","data","data"]);if(!t)return!1;this.drill(t),this.drawBreadCrumb()},e.prototype.resetPosition=function(){if(!!this.breadCrumbGroup){var t=this.context.view.getCoordinate(),n=this.breadCrumbGroup,i=n.getBBox(),a=this.getButtonCfg().position,o={x:t.start.x,y:t.end.y-(i.height+Xd*2)};t.isPolar&&(o={x:0,y:0}),a==="bottom-left"&&(o={x:t.start.x,y:t.start.y});var s=kr.transform(null,[["t",o.x+KF,o.y+i.height+Xd]]);n.setMatrix(s)}},e.prototype.back=function(){(0,c.dp)(this.historyCache)&&this.backTo(this.historyCache.slice(0,-1))},e.prototype.reset=function(){this.historyCache[0]&&this.backTo(this.historyCache.slice(0,1)),this.historyCache=[],this.hideCrumbGroup()},e.prototype.drill=function(t){var n=this.context.view,i=(0,c.U2)(n,["interactions","drill-down","cfg","transformData"],function(u){return u}),a=i((0,p.pi)({data:t.data},t[lo]));n.changeData(a);for(var o=[],s=t;s;){var l=s.data;o.unshift({id:l.name+"_"+s.height+"_"+s.depth,name:l.name,children:i((0,p.pi)({data:l},t[lo]))}),s=s.parent}this.historyCache=(this.historyCache||[]).slice(0,-1).concat(o)},e.prototype.backTo=function(t){if(!(!t||t.length<=0)){var n=this.context.view,i=(0,c.Z$)(t).children;n.changeData(i),t.length>1?(this.historyCache=t,this.drawBreadCrumb()):(this.historyCache=[],this.hideCrumbGroup())}},e.prototype.getButtonCfg=function(){var t=this.context.view,n=(0,c.U2)(t,["interactions","drill-down","cfg","drillDownConfig"]);return Dt(this.breadCrumbCfg,n==null?void 0:n.breadCrumb,this.cfg)},e.prototype.drawBreadCrumb=function(){this.drawBreadCrumbGroup(),this.resetPosition(),this.breadCrumbGroup.show()},e.prototype.drawBreadCrumbGroup=function(){var t=this,n=this.getButtonCfg(),i=this.historyCache;this.breadCrumbGroup?this.breadCrumbGroup.clear():this.breadCrumbGroup=this.context.view.foregroundGroup.addGroup({name:Wd});var a=0;i.forEach(function(o,s){var l=t.breadCrumbGroup.addShape({type:"text",id:o.id,name:Wd+"_"+o.name+"_text",attrs:(0,p.pi)((0,p.pi)({text:s===0&&!(0,c.UM)(n.rootText)?n.rootText:o.name},n.textStyle),{x:a,y:0})}),u=l.getBBox();if(a+=u.width+Yd,l.on("click",function(v){var d,g=v.target.get("id");if(g!==((d=(0,c.Z$)(i))===null||d===void 0?void 0:d.id)){var y=i.slice(0,i.findIndex(function(m){return m.id===g})+1);t.backTo(y)}}),l.on("mouseenter",function(v){var d,g=v.target.get("id");g!==((d=(0,c.Z$)(i))===null||d===void 0?void 0:d.id)?l.attr(n.activeTextStyle):l.attr({cursor:"default"})}),l.on("mouseleave",function(){l.attr(n.textStyle)}),s0&&t*t>n*n+i*i}function Cc(r,e){for(var t=0;tl?(i=(u+l-a)/(2*u),s=Math.sqrt(Math.max(0,l/u-i*i)),t.x=r.x-i*n-s*o,t.y=r.y-i*o+s*n):(i=(u+a-l)/(2*u),s=Math.sqrt(Math.max(0,a/u-i*i)),t.x=e.x+i*n-s*o,t.y=e.y+i*o+s*n)):(t.x=e.x+t.r,t.y=e.y)}function Kd(r,e){var t=r.r+e.r-1e-6,n=e.x-r.x,i=e.y-r.y;return t>0&&t*t>n*n+i*i}function Jd(r){var e=r._,t=r.next._,n=e.r+t.r,i=(e.x*t.r+t.x*e.r)/n,a=(e.y*t.r+t.y*e.r)/n;return i*i+a*a}function qs(r){this._=r,this.next=null,this.previous=null}function Qd(r){if(!(i=(r=tI(r)).length))return 0;var e,t,n,i,a,o,s,l,u,f,h;if(e=r[0],e.x=0,e.y=0,!(i>1))return e.r;if(t=r[1],e.x=-t.r,t.x=e.r,t.y=0,!(i>2))return e.r+t.r;qd(t,e,n=r[2]),e=new qs(e),t=new qs(t),n=new qs(n),e.next=n.previous=t,t.next=e.previous=n,n.next=t.previous=e;t:for(s=3;s=0;)e+=t[n].value;r.value=e}function cI(){return this.eachAfter(uI)}var fI=J(64254);function ng(r,e){var t=typeof Symbol!="undefined"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=(0,fI.Z)(r))||e&&r&&typeof r.length=="number"){t&&(r=t);var n=0,i=function(){};return{s:i,n:function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}},e:function(u){throw u},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return a=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!a&&t.return!=null&&t.return()}finally{if(o)throw s}}}}function hI(r,e){var t=-1,n=ng(this),i;try{for(n.s();!(i=n.n()).done;){var a=i.value;r.call(e,a,++t,this)}}catch(o){n.e(o)}finally{n.f()}return this}function vI(r,e){for(var t=this,n=[t],i,a,o=-1;t=n.pop();)if(r.call(e,t,++o,this),i=t.children)for(a=i.length-1;a>=0;--a)n.push(i[a]);return this}function pI(r,e){for(var t=this,n=[t],i=[],a,o,s,l=-1;t=n.pop();)if(i.push(t),a=t.children)for(o=0,s=a.length;o=0;)t+=n[i].value;e.value=t})}function yI(r){return this.eachBefore(function(e){e.children&&e.children.sort(r)})}function mI(r){for(var e=this,t=xI(e,r),n=[e];e!==t;)e=e.parent,n.push(e);for(var i=n.length;r!==t;)n.splice(i,0,r),r=r.parent;return n}function xI(r,e){if(r===e)return r;var t=r.ancestors(),n=e.ancestors(),i=null;for(r=t.pop(),e=n.pop();r===e;)i=r,r=t.pop(),e=n.pop();return i}function wI(){for(var r=this,e=[r];r=r.parent;)e.push(r);return e}function SI(){return Array.from(this)}function bI(){var r=[];return this.eachBefore(function(e){e.children||r.push(e)}),r}function MI(){var r=this,e=[];return r.each(function(t){t!==r&&e.push({source:t.parent,target:t})}),e}var ig=J(39428),CI=(0,ig.Z)().mark(ag);function ag(){var r,e,t,n,i,a;return(0,ig.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:r=this,t=[r];case 1:e=t.reverse(),t=[];case 2:if(!(r=e.pop())){s.next=8;break}return s.next=5,r;case 5:if(n=r.children)for(i=0,a=n.length;i=0;--s)i.push(a=o[s]=new va(o[s])),a.parent=n,a.depth=n.depth+1;return t.eachBefore(og)}function AI(){return ha(this).eachBefore(FI)}function TI(r){return r.children}function EI(r){return Array.isArray(r)?r[1]:null}function FI(r){r.data.value!==void 0&&(r.value=r.data.value),r.data=r.data.data}function og(r){var e=0;do r.height=e;while((r=r.parent)&&r.height<++e)}function va(r){this.data=r,this.depth=this.height=0,this.parent=null}va.prototype=ha.prototype=(0,lI.Z)({constructor:va,count:cI,each:hI,eachAfter:pI,eachBefore:vI,find:dI,sum:gI,sort:yI,path:mI,ancestors:wI,descendants:SI,leaves:bI,links:MI,copy:AI},Symbol.iterator,ag);var sg="nodeIndex",lg="childNodeCount",Tc="nodeAncestor",Ec="Invalid field: it must be a string!";function Fc(r,e){var t=r.field,n=r.fields;if((0,c.HD)(t))return t;if((0,c.kJ)(t))return console.warn(Ec),t[0];if(console.warn(Ec+" will try to get fields instead."),(0,c.HD)(n))return n;if((0,c.kJ)(n)&&n.length)return n[0];if(e)return e;throw new TypeError(Ec)}function Ic(r){var e=[];if(r&&r.each){var t,n;r.each(function(i){var a,o;i.parent!==t?(t=i.parent,n=0):n+=1;var s=(0,c.hX)((((a=i.ancestors)===null||a===void 0?void 0:a.call(i))||[]).map(function(l){return e.find(function(u){return u.name===l.name})||l}),function(l){var u=l.depth;return u>0&&u1;)f=((u=h.parent.data)===null||u===void 0?void 0:u.name)+" / "+f,h=h.parent;if(a&&l.depth>2)return null;var v=Dt({},l.data,(0,p.pi)((0,p.pi)((0,p.pi)({},$e(l.data,i)),{path:f}),l));v.ext=t,v[lo]={hierarchyConfig:t,rawFields:i,enableDrillDown:a},s.push(v)}),s}function cg(r,e,t){var n=oc([r,e]),i=n[0],a=n[1],o=n[2],s=n[3],l=t.width,u=t.height,f=l-(s+a),h=u-(i+o),v=Math.min(f,h),d=(f-v)/2,g=(h-v)/2,y=i+g,m=a+d,x=o+g,b=s+d,C=[y,m,x,b],A=v<0?0:v;return{finalPadding:C,finalSize:A}}function DI(r){var e=r.chart,t=Math.min(e.viewBBox.width,e.viewBBox.height);return Dt({options:{size:function(n){var i=n.r;return i*t}}},r)}function PI(r){var e=r.options,t=r.chart,n=t.viewBBox,i=e.padding,a=e.appendPadding,o=e.drilldown,s=a;if(o==null?void 0:o.enabled){var l=Os(t.appendPadding,(0,c.U2)(o,["breadCrumb","position"]));s=oc([l,a])}var u=cg(i,s,n).finalPadding;return t.padding=u,t.appendPadding=0,r}function OI(r){var e=r.chart,t=r.options,n=e.padding,i=e.appendPadding,a=t.color,o=t.colorField,s=t.pointStyle,l=t.hierarchyConfig,u=t.sizeField,f=t.rawFields,h=f===void 0?[]:f,v=t.drilldown,d=ug({data:t.data,hierarchyConfig:l,enableDrillDown:v==null?void 0:v.enabled,rawFields:h});e.data(d);var g=e.viewBBox,y=cg(n,i,g).finalSize,m=function(x){var b=x.r;return b*y};return u&&(m=function(x){return x[u]*y}),Gr(Dt({},r,{options:{xField:"x",yField:"y",seriesField:o,sizeField:u,rawFields:(0,p.pr)($F,h),point:{color:a,style:s,shape:"circle",size:m}}})),r}function kI(r){return Fe(or({},{x:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0},y:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0}}))(r)}function _I(r){var e=r.chart,t=r.options,n=t.tooltip;if(n===!1)e.tooltip(!1);else{var i=n;(0,c.U2)(n,"fields")||(i=Dt({},{customItems:function(a){return a.map(function(o){var s=(0,c.U2)(e.getOptions(),"scales"),l=(0,c.U2)(s,["name","formatter"],function(f){return f}),u=(0,c.U2)(s,["value","formatter"],function(f){return f});return(0,p.pi)((0,p.pi)({},o),{name:l(o.data.name),value:u(o.data.value)})})}},i)),e.tooltip(i)}return r}function BI(r){var e=r.chart;return e.axis(!1),r}function RI(r){var e=r.drilldown,t=r.interactions,n=t===void 0?[]:t;return(e==null?void 0:e.enabled)?Dt({},r,{interactions:(0,p.pr)(n,[{type:"drill-down",cfg:{drillDownConfig:e,transformData:ug,enableDrillDown:!0}}])}):r}function NI(r){var e=r.chart,t=r.options;return rr({chart:e,options:RI(t)}),r}function zI(r){return Fe(Vr("pointStyle"),DI,PI,Ye,kI,OI,BI,Ti,_I,NI,qe,ir())(r)}function fg(r){var e=(0,c.U2)(r,["event","data","data"],{});return(0,c.kJ)(e.children)&&e.children.length>0}function hg(r){var e=r.view.getCoordinate(),t=e.innerRadius;if(t){var n=r.event,i=n.x,a=n.y,o=e.center,s=o.x,l=o.y,u=e.getRadius()*t,f=Math.sqrt(Math.pow(s-i,2)+Math.pow(l-a,2));return f-1?l2(g,h,v):!0}),r.getRootView().render(!0)}};function HI(r){var e,t=r.options,n=t.geometryOptions,i=n===void 0?[]:n,a=t.xField,o=t.yField,s=(0,c.yW)(i,function(l){var u=l.geometry;return u===ki.Line||u===void 0});return Dt({},{options:{geometryOptions:[],meta:(e={},e[a]={type:"cat",sync:!0,range:s?[0,1]:void 0},e),tooltip:{showMarkers:s,showCrosshairs:s,shared:!0,crosshairs:{type:"x"}},interactions:s?[{type:"legend-visible-filter"}]:[{type:"legend-visible-filter"},{type:"active-region"}],legend:{position:"top-left"}}},r,{options:{yAxis:dg(o,t.yAxis),geometryOptions:[pg(a,o[0],i[0]),pg(a,o[1],i[1])],annotations:dg(o,t.annotations)}})}function YI(r){var e,t,n=r.chart,i=r.options,a=i.geometryOptions,o={line:0,column:1},s=[{type:(e=a[0])===null||e===void 0?void 0:e.geometry,id:Hr},{type:(t=a[1])===null||t===void 0?void 0:t.geometry,id:Yr}];return s.sort(function(l,u){return-o[l.type]+o[u.type]}).forEach(function(l){return n.createView({id:l.id})}),r}function XI(r){var e=r.chart,t=r.options,n=t.xField,i=t.yField,a=t.geometryOptions,o=t.data,s=t.tooltip,l=[(0,p.pi)((0,p.pi)({},a[0]),{id:Hr,data:o[0],yField:i[0]}),(0,p.pi)((0,p.pi)({},a[1]),{id:Yr,data:o[1],yField:i[1]})];return l.forEach(function(u){var f=u.id,h=u.data,v=u.yField,d=Dc(u)&&u.isPercent,g=d?Vp(h,v,n,v):h,y=Be(e,f).data(g),m=d?(0,p.pi)({formatter:function(x){return{name:x[u.seriesField]||v,value:(Number(x[v])*100).toFixed(2)+"%"}}},s):s;GI({chart:y,options:{xField:n,yField:v,tooltip:m,geometryOption:u}})}),r}function WI(r){var e,t=r.chart,n=r.options,i=n.geometryOptions,a=((e=t.getTheme())===null||e===void 0?void 0:e.colors10)||[],o=0;return t.once("beforepaint",function(){(0,c.S6)(i,function(s,l){var u=Be(t,l===0?Hr:Yr);if(!s.color){var f=u.getGroupScales(),h=(0,c.U2)(f,[0,"values","length"],1),v=a.slice(o,o+h).concat(l===0?[]:a);u.geometries.forEach(function(d){s.seriesField?d.color(s.seriesField,v):d.color(v[0])}),o+=h}}),t.render(!0)}),r}function ZI(r){var e,t,n=r.chart,i=r.options,a=i.xAxis,o=i.yAxis,s=i.xField,l=i.yField;return or((e={},e[s]=a,e[l[0]]=o[0],e))(Dt({},r,{chart:Be(n,Hr)})),or((t={},t[s]=a,t[l[1]]=o[1],t))(Dt({},r,{chart:Be(n,Yr)})),r}function jI(r){var e=r.chart,t=r.options,n=Be(e,Hr),i=Be(e,Yr),a=t.xField,o=t.yField,s=t.xAxis,l=t.yAxis;return e.axis(a,!1),e.axis(o[0],!1),e.axis(o[1],!1),n.axis(a,s),n.axis(o[0],gg(l[0],pa.Left)),i.axis(a,!1),i.axis(o[1],gg(l[1],pa.Right)),r}function $I(r){var e=r.chart,t=r.options,n=t.tooltip,i=Be(e,Hr),a=Be(e,Yr);return e.tooltip(n),i.tooltip({shared:!0}),a.tooltip({shared:!0}),r}function qI(r){var e=r.chart;return rr(Dt({},r,{chart:Be(e,Hr)})),rr(Dt({},r,{chart:Be(e,Yr)})),r}function KI(r){var e=r.chart,t=r.options,n=t.annotations,i=(0,c.U2)(n,[0]),a=(0,c.U2)(n,[1]);return ir(i)(Dt({},r,{chart:Be(e,Hr),options:{annotations:i}})),ir(a)(Dt({},r,{chart:Be(e,Yr),options:{annotations:a}})),r}function JI(r){var e=r.chart;return Ye(Dt({},r,{chart:Be(e,Hr)})),Ye(Dt({},r,{chart:Be(e,Yr)})),Ye(r),r}function QI(r){var e=r.chart;return qe(Dt({},r,{chart:Be(e,Hr)})),qe(Dt({},r,{chart:Be(e,Yr)})),r}function tL(r){var e=r.chart,t=r.options,n=t.yAxis;return Ei(Dt({},r,{chart:Be(e,Hr),options:{yAxis:n[0]}})),Ei(Dt({},r,{chart:Be(e,Yr),options:{yAxis:n[1]}})),r}function eL(r){var e=r.chart,t=r.options,n=t.legend,i=t.geometryOptions,a=t.yField,o=t.data,s=Be(e,Hr),l=Be(e,Yr);if(n===!1)e.legend(!1);else if((0,c.Kn)(n)&&n.custom===!0)e.legend(n);else{var u=(0,c.U2)(i,[0,"legend"],n),f=(0,c.U2)(i,[1,"legend"],n);e.once("beforepaint",function(){var h=o[0].length?yg({view:s,geometryOption:i[0],yField:a[0],legend:u}):[],v=o[1].length?yg({view:l,geometryOption:i[1],yField:a[1],legend:f}):[];e.legend(Dt({},n,{custom:!0,items:h.concat(v)}))}),i[0].seriesField&&s.legend(i[0].seriesField,u),i[1].seriesField&&l.legend(i[1].seriesField,f),e.on("legend-item:click",function(h){var v=(0,c.U2)(h,"gEvent.delegateObject",{});if(v&&v.item){var d=v.item,g=d.value,y=d.isGeometry,m=d.viewId;if(y){var x=(0,c.cx)(a,function(A){return A===g});if(x>-1){var b=(0,c.U2)(Be(e,m),"geometries");(0,c.S6)(b,function(A){A.changeVisible(!v.item.unchecked)})}}else{var C=(0,c.U2)(e.getController("legend"),"option.items",[]);(0,c.S6)(e.views,function(A){var B=A.getGroupScales();(0,c.S6)(B,function(rt){rt.values&&rt.values.indexOf(g)>-1&&A.filter(rt.field,function(lt){var xt=(0,c.sE)(C,function(kt){return kt.value===lt});return!xt.unchecked})}),e.render(!0)})}}})}return r}function rL(r){var e=r.chart,t=r.options,n=t.slider,i=Be(e,Hr),a=Be(e,Yr);return n&&(i.option("slider",n),i.on("slider:valuechanged",function(o){var s=o.event,l=s.value,u=s.originValue;(0,c.Xy)(l,u)||mg(a,l)}),e.once("afterpaint",function(){if(!(0,c.jn)(n)){var o=n.start,s=n.end;(o||s)&&mg(a,[o,s])}})),r}function nL(r){return Fe(HI,YI,JI,XI,ZI,jI,tL,$I,qI,KI,QI,WI,eL,rL)(r)}var iL=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dual-axes",t}return e.prototype.getDefaultOptions=function(){return Dt({},r.prototype.getDefaultOptions.call(this),{yAxis:[],syncViewPadding:!0})},e.prototype.getSchemaAdaptor=function(){return nL},e}(ke);function aL(r,e){var t=e.data,n=e.coordinate,i=e.interactions,a=e.annotations,o=e.animation,s=e.tooltip,l=e.axes,u=e.meta,f=e.geometries;t&&r.data(t);var h={};l&&(0,c.S6)(l,function(v,d){h[d]=$e(v,Br)}),h=Dt({},u,h),r.scale(h),n&&r.coordinate(n),l===!1?r.axis(!1):(0,c.S6)(l,function(v,d){r.axis(d,v)}),(0,c.S6)(f,function(v){var d=Rr({chart:r,options:v}).ext,g=v.adjust;g&&d.geometry.adjust(g)}),(0,c.S6)(i,function(v){v.enable===!1?r.removeInteraction(v.type):r.interaction(v.type,v.cfg)}),(0,c.S6)(a,function(v){r.annotation()[v.type]((0,p.pi)({},v))}),to(r,o),s?(r.interaction("tooltip"),r.tooltip(s)):s===!1&&r.removeInteraction("tooltip")}function oL(r){var e=r.chart,t=r.options,n=t.type,i=t.data,a=t.fields,o=t.eachView,s=(0,c.CE)(t,["type","data","fields","eachView","axes","meta","tooltip","coordinate","theme","legend","interactions","annotations"]);return e.data(i),e.facet(n,(0,p.pi)((0,p.pi)({},s),{fields:a,eachView:function(l,u){var f=o(l,u);if(f.geometries)aL(l,f);else{var h=f,v=h.options;v.tooltip&&l.interaction("tooltip"),bc(h.type,l,v)}}})),r}function sL(r){var e=r.chart,t=r.options,n=t.axes,i=t.meta,a=t.tooltip,o=t.coordinate,s=t.theme,l=t.legend,u=t.interactions,f=t.annotations,h={};return n&&(0,c.S6)(n,function(v,d){h[d]=$e(v,Br)}),h=Dt({},i,h),e.scale(h),e.coordinate(o),n?(0,c.S6)(n,function(v,d){e.axis(d,v)}):e.axis(!1),a?(e.interaction("tooltip"),e.tooltip(a)):a===!1&&e.removeInteraction("tooltip"),e.legend(l),s&&e.theme(s),(0,c.S6)(u,function(v){v.enable===!1?e.removeInteraction(v.type):e.interaction(v.type,v.cfg)}),(0,c.S6)(f,function(v){e.annotation()[v.type]((0,p.pi)({},v))}),r}function lL(r){return Fe(Ye,oL,sL)(r)}var uL={title:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},rowTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}},columnTitle:{style:{fontSize:12,fill:"rgba(0,0,0,0.65)"}}},eB=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="area",t}return e.getDefaultOptions=function(){return uL},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return lL},e}(ke);function cL(r){var e=r.chart,t=r.options,n=t.data,i=t.type,a=t.xField,o=t.yField,s=t.colorField,l=t.sizeField,u=t.sizeRatio,f=t.shape,h=t.color,v=t.tooltip,d=t.heatmapStyle,g=t.meta;e.data(n);var y="polygon";i==="density"&&(y="heatmap");var m=qr(v,[a,o,s]),x=m.fields,b=m.formatter,C=1;return(u||u===0)&&(!f&&!l?console.warn("sizeRatio is not in effect: Must define shape or sizeField first"):u<0||u>1?console.warn("sizeRatio is not in effect: It must be a number in [0,1]"):C=u),Rr(Dt({},r,{options:{type:y,colorField:s,tooltipFields:x,shapeField:l||"",label:void 0,mapping:{tooltip:b,shape:f&&(l?function(A){var B=n.map(function(kt){return kt[l]}),rt=(g==null?void 0:g[l])||{},lt=rt.min,xt=rt.max;return lt=(0,c.hj)(lt)?lt:Math.min.apply(Math,B),xt=(0,c.hj)(xt)?xt:Math.max.apply(Math,B),[f,((0,c.U2)(A,l)-lt)/(xt-lt),C]}:function(){return[f,1,C]}),color:h||s&&e.getTheme().sequenceColors.join("-"),style:d}}})),r}function fL(r){var e,t=r.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return Fe(or((e={},e[a]=n,e[o]=i,e)))(r)}function hL(r){var e=r.chart,t=r.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return n===!1?e.axis(a,!1):e.axis(a,n),i===!1?e.axis(o,!1):e.axis(o,i),r}function vL(r){var e=r.chart,t=r.options,n=t.legend,i=t.colorField,a=t.sizeField,o=t.sizeLegend,s=n!==!1;return i&&e.legend(i,s?n:!1),a&&e.legend(a,o===void 0?n:o),!s&&!o&&e.legend(!1),r}function pL(r){var e=r.chart,t=r.options,n=t.label,i=t.colorField,a=t.type,o=wr(e,a==="density"?"heatmap":"polygon");if(!n)o.label(!1);else if(i){var s=n.callback,l=(0,p._T)(n,["callback"]);o.label({fields:[i],callback:s,cfg:yr(l)})}return r}function dL(r){var e,t,n=r.chart,i=r.options,a=i.coordinate,o=i.reflect,s=Dt({actions:[]},a!=null?a:{type:"rect"});return o&&((t=(e=s.actions)===null||e===void 0?void 0:e.push)===null||t===void 0||t.call(e,["reflect",o])),n.coordinate(s),r}function gL(r){return Fe(Ye,Vr("heatmapStyle"),fL,dL,cL,hL,vL,pr,pL,ir(),rr,qe,ii)(r)}var yL=Dt({},ke.getDefaultOptions(),{type:"polygon",legend:!1,coordinate:{type:"rect"},xAxis:{tickLine:null,line:null,grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}},yAxis:{grid:{alignTick:!1,line:{style:{lineWidth:1,lineDash:null,stroke:"#f0f0f0"}}}}});We("polygon","circle",{draw:function(r,e){var t,n,i=r.x,a=r.y,o=this.parsePoints(r.points),s=Math.abs(o[2].x-o[1].x),l=Math.abs(o[1].y-o[0].y),u=Math.min(s,l)/2,f=Number(r.shape[1]),h=Number(r.shape[2]),v=Math.sqrt(h),d=u*v*Math.sqrt(f),g=((t=r.style)===null||t===void 0?void 0:t.fill)||r.color||((n=r.defaultStyle)===null||n===void 0?void 0:n.fill),y=e.addShape("circle",{attrs:(0,p.pi)((0,p.pi)((0,p.pi)({x:i,y:a,r:d},r.defaultStyle),r.style),{fill:g})});return y}}),We("polygon","square",{draw:function(r,e){var t,n,i=r.x,a=r.y,o=this.parsePoints(r.points),s=Math.abs(o[2].x-o[1].x),l=Math.abs(o[1].y-o[0].y),u=Math.min(s,l),f=Number(r.shape[1]),h=Number(r.shape[2]),v=Math.sqrt(h),d=u*v*Math.sqrt(f),g=((t=r.style)===null||t===void 0?void 0:t.fill)||r.color||((n=r.defaultStyle)===null||n===void 0?void 0:n.fill),y=e.addShape("rect",{attrs:(0,p.pi)((0,p.pi)((0,p.pi)({x:i-d/2,y:a-d/2,width:d,height:d},r.defaultStyle),r.style),{fill:g})});return y}});var rB=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="heatmap",t}return e.getDefaultOptions=function(){return yL},e.prototype.getSchemaAdaptor=function(){return gL},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e}(ke),mL="liquid";function xg(r){return[{percent:r,type:mL}]}function xL(r){var e=r.chart,t=r.options,n=t.percent,i=t.liquidStyle,a=t.radius,o=t.outline,s=t.wave,l=t.shape,u=t.shapeStyle,f=t.animation;e.scale({percent:{min:0,max:1}}),e.data(xg(n));var h=t.color||e.getTheme().defaultColor,v=Dt({},r,{options:{xField:"type",yField:"percent",widthRatio:a,interval:{color:h,style:i,shape:"liquid-fill-gauge"}}}),d=Sr(v).ext,g=d.geometry,y=e.getTheme().background,m={radius:a,outline:o,wave:s,shape:l,shapeStyle:u,background:y,animation:f};return g.customInfo(m),e.legend(!1),e.axis(!1),e.tooltip(!1),r}function wg(r,e){var t=r.chart,n=r.options,i=n.statistic,a=n.percent,o=n.meta;t.getController("annotation").clear(!0);var s=(0,c.U2)(o,["percent","formatter"])||function(u){return(u*100).toFixed(2)+"%"},l=i.content;return l&&(l=Dt({},l,{content:(0,c.UM)(l.content)?s(a):l.content})),ks(t,{statistic:(0,p.pi)((0,p.pi)({},i),{content:l}),plotType:"liquid"},{percent:a}),e&&t.render(!0),r}function wL(r){return Fe(Ye,Vr("liquidStyle"),xL,wg,or({}),qe,rr)(r)}var SL={radius:.9,statistic:{title:!1,content:{style:{opacity:.75,fontSize:"30px",lineHeight:"30px",textAlign:"center"}}},outline:{border:2,distance:0},wave:{count:3,length:192},shape:"circle"},Sg=5e3;function bg(r,e,t){return r+(e-r)*t}function bL(r){var e=(0,p.pi)({opacity:1},r.style);return r.color&&!e.fill&&(e.fill=r.color),e}function ML(r){var e={fill:"#fff",fillOpacity:0,lineWidth:4},t=(0,c.CD)({},e,r.style);return r.color&&!t.stroke&&(t.stroke=r.color),(0,c.hj)(r.opacity)&&(t.opacity=t.strokeOpacity=r.opacity),t}function CL(r,e,t,n){return e===0?[[r+1/2*t/Math.PI/2,n/2],[r+1/2*t/Math.PI,n],[r+t/4,n]]:e===1?[[r+1/2*t/Math.PI/2*(Math.PI-2),n],[r+1/2*t/Math.PI/2*(Math.PI-1),n/2],[r+t/4,0]]:e===2?[[r+1/2*t/Math.PI/2,-n/2],[r+1/2*t/Math.PI,-n],[r+t/4,-n]]:[[r+1/2*t/Math.PI/2*(Math.PI-2),-n],[r+1/2*t/Math.PI/2*(Math.PI-1),-n/2],[r+t/4,0]]}function AL(r,e,t,n,i,a,o){for(var s=Math.ceil(2*r/t*4)*4,l=[],u=n;u<-Math.PI*2;)u+=Math.PI*2;for(;u>0;)u-=Math.PI*2;u=u/Math.PI/2*t;var f=a-r+u-r*2;l.push(["M",f,e]);for(var h=0,v=0;v0){var s=this.view.geometries[0],l=s.dataArray,u=o[0].name,f=[];return l.forEach(function(h){h.forEach(function(v){var d=kr.getTooltipItems(v,s),g=d[0];if(!i&&g&&g.name===u){var y=(0,c.UM)(a)?u:a;f.push((0,p.pi)((0,p.pi)({},g),{name:g.title,title:y}))}else if(i&&g){var y=(0,c.UM)(a)?g.name||u:a;f.push((0,p.pi)((0,p.pi)({},g),{name:g.title,title:y}))}})}),f}return[]},e}(Fh);mi("radar-tooltip",NL);var zL=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(){var t=this.context.view;t.removeInteraction("tooltip")},e.prototype.show=function(){var t=this.context.event,n=this.getTooltipController();n.showTooltip({x:t.x,y:t.y})},e.prototype.hide=function(){var t=this.getTooltipController();t.hideTooltip()},e.prototype.getTooltipController=function(){var t=this.context.view;return t.getController("radar-tooltip")},e}(er);Ae("radar-tooltip",zL),Oe("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]});var iB=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="radar",t}return e.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return Dt({},r.prototype.getDefaultOptions.call(this),{xAxis:{label:{offset:15},grid:{line:{type:"line"}}},yAxis:{grid:{line:{type:"circle"}}},legend:{position:"top"},tooltip:{shared:!0,showCrosshairs:!0,showMarkers:!0,crosshairs:{type:"xy",line:{style:{stroke:"#565656",lineDash:[4]}},follow:!0}}})},e.prototype.getSchemaAdaptor=function(){return RL},e}(ke);function UL(r,e,t){var n=t.map(function(o){return o[e]}).filter(function(o){return o!==void 0}),i=n.length>0?Math.max.apply(Math,n):0,a=Math.abs(r)%360;return a?i*360/a:i}function VL(r,e,t){var n=[];return r.forEach(function(i){var a=n.find(function(o){return o[e]===i[e]});a?a[t]+=i[t]||null:n.push((0,p.pi)({},i))}),n}function GL(r){var e=r.chart,t=r.options,n=t.barStyle,i=t.color,a=t.tooltip,o=t.colorField,s=t.type,l=t.xField,u=t.yField,f=t.data,h=ia(f,u);e.data(h);var v=Dt({},r,{options:{tooltip:a,seriesField:o,interval:{style:n,color:i,shape:s==="line"?"line":"intervel"},minColumnWidth:t.minBarWidth,maxColumnWidth:t.maxBarWidth,columnBackground:t.barBackground}});return Sr(v),s==="line"&&Gr({chart:e,options:{xField:l,yField:u,seriesField:o,point:{shape:"circle",color:i}}}),r}function Cg(r){var e,t=r.options,n=t.yField,i=t.xField,a=t.data,o=t.isStack,s=t.isGroup,l=t.colorField,u=t.maxAngle,f=o&&!s&&l?VL(a,i,n):a,h=ia(f,n);return Fe(or((e={},e[n]={min:0,max:UL(u,n,h)},e)))(r)}function HL(r){var e=r.chart,t=r.options,n=t.radius,i=t.innerRadius,a=t.startAngle,o=t.endAngle;return e.coordinate({type:"polar",cfg:{radius:n,innerRadius:i,startAngle:a,endAngle:o}}).transpose(),r}function YL(r){var e=r.chart,t=r.options,n=t.xField,i=t.xAxis;return e.axis(n,i),r}function XL(r){var e=r.chart,t=r.options,n=t.label,i=t.yField,a=wr(e,"interval");if(!n)a.label(!1);else{var o=n.callback,s=(0,p._T)(n,["callback"]);a.label({fields:[i],callback:o,cfg:(0,p.pi)((0,p.pi)({},yr(s)),{type:"polar"})})}return r}function WL(r){return Fe(Vr("barStyle"),GL,Cg,YL,HL,rr,qe,Ye,pr,Ti,ir(),XL)(r)}var ZL=Dt({},ke.getDefaultOptions(),{interactions:[{type:"element-active"}],legend:!1,tooltip:{showMarkers:!1},xAxis:{grid:null,tickLine:null,line:null},maxAngle:240}),aB=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="radial-bar",t}return e.getDefaultOptions=function(){return ZL},e.prototype.changeData=function(t){this.updateOption({data:t}),Cg({chart:this.chart,options:this.options}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return WL},e}(ke);function jL(r){var e=r.chart,t=r.options,n=t.data,i=t.sectorStyle,a=t.color;return e.data(n),Fe(Sr)(Dt({},r,{options:{marginRatio:1,interval:{style:i,color:a}}})),r}function $L(r){var e=r.chart,t=r.options,n=t.label,i=t.xField,a=wr(e,"interval");if(n===!1)a.label(!1);else if((0,c.Kn)(n)){var o=n.callback,s=n.fields,l=(0,p._T)(n,["callback","fields"]),u=l.offset,f=l.layout;(u===void 0||u>=0)&&(f=f?(0,c.kJ)(f)?f:[f]:[],l.layout=(0,c.hX)(f,function(h){return h.type!=="limit-in-shape"}),l.layout.length||delete l.layout),a.label({fields:s||[i],callback:o,cfg:yr(l)})}else kn(an.WARN,n===null,"the label option must be an Object."),a.label({fields:[i]});return r}function qL(r){var e=r.chart,t=r.options,n=t.legend,i=t.seriesField;return n===!1?e.legend(!1):i&&e.legend(i,n),r}function KL(r){var e=r.chart,t=r.options,n=t.radius,i=t.innerRadius,a=t.startAngle,o=t.endAngle;return e.coordinate({type:"polar",cfg:{radius:n,innerRadius:i,startAngle:a,endAngle:o}}),r}function JL(r){var e,t=r.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return Fe(or((e={},e[a]=n,e[o]=i,e)))(r)}function QL(r){var e=r.chart,t=r.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return n?e.axis(a,n):e.axis(a,!1),i?e.axis(o,i):e.axis(o,!1),r}function tD(r){Fe(Vr("sectorStyle"),jL,JL,$L,KL,QL,qL,pr,rr,qe,Ye,ir(),ii)(r)}var eD=Dt({},ke.getDefaultOptions(),{xAxis:!1,yAxis:!1,legend:{position:"right",radio:{}},sectorStyle:{stroke:"#fff",lineWidth:1},label:{layout:{type:"limit-in-shape"}},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]}),oB=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="rose",t}return e.getDefaultOptions=function(){return eD},e.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return tD},e}(ke),Ag="x",Tg="y",Eg="name",Js="nodes",Qs="edges";function rD(r,e,t){var n=[];return r.forEach(function(i){var a=i[e],o=i[t];n.includes(a)||n.push(a),n.includes(o)||n.push(o)}),n}function nD(r,e,t,n){var i={};return e.forEach(function(a){i[a]={},e.forEach(function(o){i[a][o]=0})}),r.forEach(function(a){i[a[t]][a[n]]=1}),i}function iD(r,e,t){if(!(0,c.kJ)(r))return[];var n=[],i=rD(r,e,t),a=nD(r,i,e,t),o={};i.forEach(function(l){o[l]=0});function s(l){o[l]=1,i.forEach(function(u){if(a[l][u]!=0)if(o[u]==1)n.push(l+"_"+u);else{if(o[u]==-1)return;s(u)}}),o[l]=-1}return i.forEach(function(l){o[l]!=-1&&s(l)}),n.length!==0&&console.warn("sankey data contains circle, "+n.length+" records removed.",n),r.filter(function(l){return n.findIndex(function(u){return u===l[e]+"_"+l[t]})<0})}function aD(r){return r.target.depth}function oD(r){return r.depth}function sD(r,e){return e-1-r.height}function Pc(r,e){return r.sourceLinks.length?r.depth:e-1}function lD(r){return r.targetLinks.length?r.depth:r.sourceLinks.length?(0,c.F)(r.sourceLinks,aD)-1:0}function tl(r){return function(){return r}}function Oc(r,e){for(var t=0,n=0;nxe)throw new Error("circular link");ve=ge,ge=new Set}if(u)for(var Ne=Math.max(kc(he,function(He){return He.depth})+1,0),Ge=void 0,_e=0;_exe)throw new Error("circular link");ve=ge,ge=new Set}}function A(Qt){for(var he=Qt.nodes,xe=Math.max(kc(he,function(hr){return hr.depth})+1,0),ve=(t-r-i)/(xe-1),ge=new Array(xe).fill(0).map(function(){return[]}),Te=0,Ne=he;Te0){var ga=(He/Ke-_e.y0)*he;_e.y0+=ga,_e.y1+=ga,ae(_e)}}f===void 0&&Te.sort(el),Te.length&&kt(Te,xe)}}function xt(Qt,he,xe){for(var ve=Qt.length,ge=ve-2;ge>=0;--ge){for(var Te=Qt[ge],Ne=0,Ge=Te;Ne0){var ga=(He/Ke-_e.y0)*he;_e.y0+=ga,_e.y1+=ga,ae(_e)}}f===void 0&&Te.sort(el),Te.length&&kt(Te,xe)}}function kt(Qt,he){var xe=Qt.length>>1,ve=Qt[xe];Xt(Qt,ve.y0-o,xe-1,he),Ft(Qt,ve.y1+o,xe+1,he),Xt(Qt,n,Qt.length-1,he),Ft(Qt,e,0,he)}function Ft(Qt,he,xe,ve){for(;xe1e-6&&(ge.y0+=Te,ge.y1+=Te),he=ge.y1+o}}function Xt(Qt,he,xe,ve){for(;xe>=0;--xe){var ge=Qt[xe],Te=(ge.y1-he)*ve;Te>1e-6&&(ge.y0-=Te,ge.y1-=Te),he=ge.y0-o}}function ae(Qt){var he=Qt.sourceLinks,xe=Qt.targetLinks;if(h===void 0){for(var ve=0,ge=xe;ve "+i,value:a}}},nodeWidthRatio:.008,nodePaddingRatio:.01,animation:{appear:{animation:"wave-in"},enter:{animation:"wave-in"}}}},e.prototype.changeData=function(t){this.updateOption({data:t});var n=Pg(this.options,this.chart.width,this.chart.height),i=n.nodes,a=n.edges,o=Be(this.chart,Js),s=Be(this.chart,Qs);o.changeData(i),s.changeData(a)},e.prototype.getSchemaAdaptor=function(){return ED},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e}(ke),Bc="ancestor-node",Og="value",co="path",ID=[co,sg,Tc,lg,"name","depth","height"],LD=Dt({},ke.getDefaultOptions(),{innerRadius:0,radius:.85,hierarchyConfig:{field:"value"},tooltip:{shared:!0,showMarkers:!1,offset:20,showTitle:!1},legend:!1,sunburstStyle:{lineWidth:.5,stroke:"#FFF"},drilldown:{enabled:!0}});function kg(r){r.x0=Math.round(r.x0),r.y0=Math.round(r.y0),r.x1=Math.round(r.x1),r.y1=Math.round(r.y1)}function fo(r,e,t,n,i){for(var a=r.children,o,s=-1,l=a.length,u=r.value&&(n-e)/r.value;++s0)throw new Error("cycle");return l}return t.id=function(n){return arguments.length?(r=Ks(n),t):r},t.parentId=function(n){return arguments.length?(e=Ks(n),t):e},t}function XD(r,e){return r.parent===e.parent?1:2}function Rc(r){var e=r.children;return e?e[0]:r.t}function Nc(r){var e=r.children;return e?e[e.length-1]:r.t}function WD(r,e,t){var n=t/(e.i-r.i);e.c-=n,e.s+=t,r.c+=n,e.z+=t,e.m+=t}function ZD(r){for(var e=0,t=0,n=r.children,i=n.length,a;--i>=0;)a=n[i],a.z+=e,a.m+=e,e+=a.s+(t+=a.c)}function jD(r,e,t){return r.a.parent===e.parent?r.a:t}function rl(r,e){this._=r,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}rl.prototype=Object.create(va.prototype);function $D(r){for(var e=new rl(r,0),t,n=[e],i,a,o,s;t=n.pop();)if(a=t._.children)for(t.children=new Array(s=a.length),o=s-1;o>=0;--o)n.push(i=t.children[o]=new rl(a[o],o)),i.parent=t;return(e.parent=new rl(null,0)).children=[e],e}function qD(){var r=XD,e=1,t=1,n=null;function i(u){var f=$D(u);if(f.eachAfter(a),f.parent.m=-f.z,f.eachBefore(o),n)u.eachBefore(l);else{var h=u,v=u,d=u;u.eachBefore(function(b){b.xv.x&&(v=b),b.depth>d.depth&&(d=b)});var g=h===v?1:r(h,v)/2,y=g-h.x,m=e/(v.x+g+y),x=t/(d.depth||1);u.eachBefore(function(b){b.x=(b.x+y)*m,b.y=b.depth*x})}return u}function a(u){var f=u.children,h=u.parent.children,v=u.i?h[u.i-1]:null;if(f){ZD(u);var d=(f[0].z+f[f.length-1].z)/2;v?(u.z=v.z+r(u._,v._),u.m=u.z-d):u.z=d}else v&&(u.z=v.z+r(u._,v._));u.parent.A=s(u,v,u.parent.A||h[0])}function o(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,f,h){if(f){for(var v=u,d=u,g=f,y=v.parent.children[0],m=v.m,x=d.m,b=g.m,C=y.m,A;g=Nc(g),v=Rc(v),g&&v;)y=Rc(y),d=Nc(d),d.a=u,A=g.z+b-v.z-m+r(g._,v._),A>0&&(WD(jD(g,u,h),u,A),m+=A,x+=A),b+=g.m,m+=v.m,C+=y.m,x+=d.m;g&&!Nc(d)&&(d.t=g,d.m+=b-x),v&&!Rc(y)&&(y.t=v,y.m+=m-C,h=u)}return h}function l(u){u.x*=e,u.y=u.depth*t}return i.separation=function(u){return arguments.length?(r=u,i):r},i.size=function(u){return arguments.length?(n=!1,e=+u[0],t=+u[1],i):n?null:[e,t]},i.nodeSize=function(u){return arguments.length?(n=!0,e=+u[0],t=+u[1],i):n?[e,t]:null},i}function nl(r,e,t,n,i){for(var a=r.children,o,s=-1,l=a.length,u=r.value&&(i-t)/r.value;++sb&&(b=u),rt=m*m*B,C=Math.max(b/rt,rt/x),C>A){m-=u;break}A=C}o.push(l={value:m,dice:d1?n:1)},t}(Rg);function Ug(){var r=zg,e=!1,t=1,n=1,i=[0],a=Oi,o=Oi,s=Oi,l=Oi,u=Oi;function f(v){return v.x0=v.y0=0,v.x1=t,v.y1=n,v.eachBefore(h),i=[0],e&&v.eachBefore(kg),v}function h(v){var d=i[v.depth],g=v.x0+d,y=v.y0+d,m=v.x1-d,x=v.y1-d;m=v-1){var b=a[h];b.x0=g,b.y0=y,b.x1=m,b.y1=x;return}for(var C=u[h],A=d/2+C,B=h+1,rt=v-1;B>>1;u[lt]x-y){var Ft=d?(g*kt+m*xt)/d:m;f(h,B,xt,g,y,Ft,x),f(B,v,kt,Ft,y,m,x)}else{var Xt=d?(y*kt+x*xt)/d:x;f(h,B,xt,g,y,m,Xt),f(B,v,kt,g,Xt,m,x)}}}function JD(r,e,t,n,i){(r.depth&1?nl:fo)(r,e,t,n,i)}var QD=function r(e){function t(n,i,a,o,s){if((l=n._squarify)&&l.ratio===e)for(var l,u,f,h,v=-1,d,g=l.length,y=n.value;++v1?n:1)},t}(Rg),tP={field:"value",tile:"treemapSquarify",size:[1,1],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,as:["x","y"],sort:function(r,e){return e.value-r.value},ratio:.5*(1+Math.sqrt(5))};function eP(r,e){return r==="treemapSquarify"?bt[r].ratio(e):bt[r]}function Vg(r,e){e=(0,c.f0)({},tP,e);var t=e.as;if(!(0,c.kJ)(t)||t.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var n;try{n=Fc(e)}catch(u){console.warn(u)}var i=eP(e.tile,e.ratio),a=function(u){return Ug().tile(i).size(e.size).round(e.round).padding(e.padding).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(ha(u).sum(function(f){return e.ignoreParentValue&&f.children?0:f[n]}).sort(e.sort))},o=a(r),s=t[0],l=t[1];return o.each(function(u){u[s]=[u.x0,u.x1,u.x1,u.x0],u[l]=[u.y1,u.y1,u.y0,u.y0],["x0","x1","y0","y1"].forEach(function(f){t.indexOf(f)===-1&&delete u[f]})}),Ic(o)}function Gg(r){var e=r.data,t=r.colorField,n=r.rawFields,i=r.hierarchyConfig,a=i===void 0?{}:i,o=a.activeDepth,s={partition:PD,treemap:Vg},l=r.seriesField,u=r.type||"partition",f=s[u](e,(0,p.pi)((0,p.pi)({field:l||"value"},(0,c.CE)(a,["activeDepth"])),{type:"hierarchy."+u,as:["x","y"]})),h=[];return f.forEach(function(v){var d,g,y,m,x,b;if(v.depth===0||o>0&&v.depth>o)return null;for(var C=v.data.name,A=(0,p.pi)({},v);A.depth>1;)C=((g=A.parent.data)===null||g===void 0?void 0:g.name)+" / "+C,A=A.parent;var B=(0,p.pi)((0,p.pi)((0,p.pi)({},$e(v.data,(0,p.pr)(n||[],[a.field]))),(d={},d[co]=C,d[Bc]=A.data.name,d)),v);l&&(B[l]=v.data[l]||((m=(y=v.parent)===null||y===void 0?void 0:y.data)===null||m===void 0?void 0:m[l])),t&&(B[t]=v.data[t]||((b=(x=v.parent)===null||x===void 0?void 0:x.data)===null||b===void 0?void 0:b[t])),B.ext=a,B[lo]={hierarchyConfig:a,colorField:t,rawFields:n},h.push(B)}),h}function rP(r){var e=r.chart,t=r.options,n=t.color,i=t.colorField,a=i===void 0?Bc:i,o=t.sunburstStyle,s=t.rawFields,l=s===void 0?[]:s,u=Gg(t);e.data(u);var f;return o&&(f=function(h){return Dt({},{fillOpacity:Math.pow(.85,h.depth)},(0,c.mf)(o)?o(h):o)}),Us(Dt({},r,{options:{xField:"x",yField:"y",seriesField:a,rawFields:(0,c.jj)((0,p.pr)(ID,l)),polygon:{color:n,style:f}}})),r}function nP(r){var e=r.chart;return e.axis(!1),r}function iP(r){var e=r.chart,t=r.options,n=t.label,i=wr(e,"polygon");if(!n)i.label(!1);else{var a=n.fields,o=a===void 0?["name"]:a,s=n.callback,l=(0,p._T)(n,["fields","callback"]);i.label({fields:o,callback:s,cfg:yr(l)})}return r}function aP(r){var e=r.chart,t=r.options,n=t.innerRadius,i=t.radius,a=t.reflect,o=e.coordinate({type:"polar",cfg:{innerRadius:n,radius:i}});return a&&o.reflect(a),r}function oP(r){var e,t=r.options,n=t.hierarchyConfig,i=t.meta;return Fe(or({},(e={},e[Og]=(0,c.U2)(i,(0,c.U2)(n,["field"],"value")),e)))(r)}function sP(r){var e=r.chart,t=r.options,n=t.tooltip;if(n===!1)e.tooltip(!1);else{var i=n;(0,c.U2)(n,"fields")||(i=Dt({},{customItems:function(a){return a.map(function(o){var s=(0,c.U2)(e.getOptions(),"scales"),l=(0,c.U2)(s,[co,"formatter"],function(f){return f}),u=(0,c.U2)(s,[Og,"formatter"],function(f){return f});return(0,p.pi)((0,p.pi)({},o),{name:l(o.data[co]),value:u(o.data.value)})})}},i)),e.tooltip(i)}return r}function lP(r){var e=r.drilldown,t=r.interactions,n=t===void 0?[]:t;return(e==null?void 0:e.enabled)?Dt({},r,{interactions:(0,p.pr)(n,[{type:"drill-down",cfg:{drillDownConfig:e,transformData:Gg}}])}):r}function uP(r){var e=r.chart,t=r.options,n=t.drilldown;return rr({chart:e,options:lP(t)}),(n==null?void 0:n.enabled)&&(e.appendPadding=Os(e.appendPadding,(0,c.U2)(n,["breadCrumb","position"]))),r}function cP(r){return Fe(Ye,Vr("sunburstStyle"),rP,nP,oP,Ti,aP,sP,iP,uP,qe,ir())(r)}var lB=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="sunburst",t}return e.getDefaultOptions=function(){return LD},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return cP},e.SUNBURST_ANCESTOR_FIELD=Bc,e.SUNBURST_PATH_FIELD=co,e.NODE_ANCESTORS_FIELD=Tc,e}(ke);function Hg(r,e){if(!!(0,c.kJ)(r))return r.find(function(t){return t.type===e})}function Yg(r,e){var t=Hg(r,e);return t&&t.enable!==!1}function zc(r){var e=r.interactions,t=r.drilldown;return(0,c.U2)(t,"enabled")||Yg(e,"treemap-drill-down")}function fP(r){var e=r.interactions["drill-down"];if(!!e){var t=e.context.actions.find(function(n){return n.name==="drill-down-action"});t.reset()}}function Uc(r){var e=r.data,t=r.colorField,n=r.enableDrillDown,i=r.hierarchyConfig,a=Vg(e,(0,p.pi)((0,p.pi)({},i),{type:"hierarchy.treemap",field:"value",as:["x","y"]})),o=[];return a.forEach(function(s){if(s.depth===0||n&&s.depth!==1||!n&&s.children)return null;var l=s.ancestors().map(function(v){return{data:v.data,height:v.height,value:v.value}}),u=n&&(0,c.kJ)(e.path)?l.concat(e.path.slice(1)):l,f=Object.assign({},s.data,(0,p.pi)({x:s.x,y:s.y,depth:s.depth,value:s.value,path:u},s));if(!s.data[t]&&s.parent){var h=s.ancestors().find(function(v){return v.data[t]});f[t]=h==null?void 0:h.data[t]}else f[t]=s.data[t];f[lo]={hierarchyConfig:i,colorField:t,enableDrillDown:n},o.push(f)}),o}function hP(r){var e=r.options,t=e.colorField;return Dt({options:{rawFields:["value"],tooltip:{fields:["name","value",t,"path"],formatter:function(n){return{name:n.name,value:n.value}}}}},r)}function vP(r){var e=r.chart,t=r.options,n=t.color,i=t.colorField,a=t.rectStyle,o=t.hierarchyConfig,s=t.rawFields,l=Uc({data:t.data,colorField:t.colorField,enableDrillDown:zc(t),hierarchyConfig:o});return e.data(l),Us(Dt({},r,{options:{xField:"x",yField:"y",seriesField:i,rawFields:s,polygon:{color:n,style:a}}})),e.coordinate().reflect("y"),r}function pP(r){var e=r.chart;return e.axis(!1),r}function dP(r){var e=r.drilldown,t=r.interactions,n=t===void 0?[]:t,i=zc(r);return i?Dt({},r,{interactions:(0,p.pr)(n,[{type:"drill-down",cfg:{drillDownConfig:e,transformData:Uc}}])}):r}function gP(r){var e=r.chart,t=r.options,n=t.interactions,i=t.drilldown;rr({chart:e,options:dP(t)});var a=Hg(n,"view-zoom");a&&(a.enable!==!1?e.getCanvas().on("mousewheel",function(s){s.preventDefault()}):e.getCanvas().off("mousewheel"));var o=zc(t);return o&&(e.appendPadding=Os(e.appendPadding,(0,c.U2)(i,["breadCrumb","position"]))),r}function yP(r){return Fe(hP,Ye,Vr("rectStyle"),vP,pP,Ti,pr,gP,qe,ir())(r)}var mP={colorField:"name",rectStyle:{lineWidth:1,stroke:"#fff"},hierarchyConfig:{tile:"treemapSquarify"},label:{fields:["name"],layout:{type:"limit-in-shape"}},tooltip:{showMarkers:!1,showTitle:!1},drilldown:{enabled:!1,breadCrumb:{position:"bottom-left",rootText:"\u521D\u59CB",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}}}},uB=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="treemap",t}return e.getDefaultOptions=function(){return mP},e.prototype.changeData=function(t){var n=this.options,i=n.colorField,a=n.interactions,o=n.hierarchyConfig;this.updateOption({data:t});var s=Uc({data:t,colorField:i,enableDrillDown:Yg(a,"treemap-drill-down"),hierarchyConfig:o});this.chart.changeData(s),fP(this.chart)},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return yP},e}(ke),zn="id",Vc="path",xP={appendPadding:[10,0,20,0],blendMode:"multiply",tooltip:{showTitle:!1,showMarkers:!1,fields:["id","size"],formatter:function(r){return{name:r.id,value:r.size}}},legend:{position:"top-left"},label:{style:{textAlign:"center",fill:"#fff"}},interactions:[{type:"legend-filter",enable:!1}],state:{active:{style:{stroke:"#000"}},selected:{style:{stroke:"#000",lineWidth:2}},inactive:{style:{fillOpacity:.3,strokeOpacity:.3}}},defaultInteractions:["tooltip","venn-legend-active"]};function il(r){if(!!r){var e=r.geometries[0].elements;e.forEach(function(t){t.shape.toFront()})}}var wP=is("element-active"),SP=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.syncElementsPos=function(){il(this.context.view)},e.prototype.active=function(){r.prototype.active.call(this),this.syncElementsPos()},e.prototype.toggle=function(){r.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.reset=function(){r.prototype.reset.call(this),this.syncElementsPos()},e}(wP),bP=is("element-highlight"),MP=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.syncElementsPos=function(){il(this.context.view)},e.prototype.highlight=function(){r.prototype.highlight.call(this),this.syncElementsPos()},e.prototype.toggle=function(){r.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.clear=function(){r.prototype.clear.call(this),this.syncElementsPos()},e.prototype.reset=function(){r.prototype.reset.call(this),this.syncElementsPos()},e}(bP),CP=is("element-selected"),AP=is("element-single-selected"),TP=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.syncElementsPos=function(){il(this.context.view)},e.prototype.selected=function(){r.prototype.selected.call(this),this.syncElementsPos()},e.prototype.toggle=function(){r.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.reset=function(){r.prototype.reset.call(this),this.syncElementsPos()},e}(CP),EP=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.syncElementsPos=function(){il(this.context.view)},e.prototype.selected=function(){r.prototype.selected.call(this),this.syncElementsPos()},e.prototype.toggle=function(){r.prototype.toggle.call(this),this.syncElementsPos()},e.prototype.reset=function(){r.prototype.reset.call(this),this.syncElementsPos()},e}(AP);Ae("venn-element-active",SP),Ae("venn-element-highlight",MP),Ae("venn-element-selected",TP),Ae("venn-element-single-selected",EP),Oe("venn-element-active",{start:[{trigger:"element:mouseenter",action:"venn-element-active:active"}],end:[{trigger:"element:mouseleave",action:"venn-element-active:reset"}]}),Oe("venn-element-highlight",{start:[{trigger:"element:mouseenter",action:"venn-element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"venn-element-highlight:reset"}]}),Oe("venn-element-selected",{start:[{trigger:"element:click",action:"venn-element-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-selected:reset"]}]}),Oe("venn-element-single-selected",{start:[{trigger:"element:click",action:"venn-element-single-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-single-selected:reset"]}]}),Oe("venn-legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","venn-element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","venn-element-active:reset"]}]}),Oe("venn-legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","venn-element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","venn-element-highlight:reset"]}]});var FP=function(r){(0,p.ZT)(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getLabelPoint=function(t,n,i){var a=t.data,o=a.x,s=a.y,l=t.customLabelInfo,u=l.offsetX,f=l.offsetY;return{content:t.content[i],x:o+u,y:s+f}},e}(cs);Va("venn",FP);function IP(r){return Dt({},r.defaultStyle,{fill:r.color},r.style)}We("schema","venn",{draw:function(r,e){var t=r.data,n=(0,gi.tr)(t[Vc]),i=IP(r),a=e.addGroup({name:"venn-shape"});a.addShape("path",{attrs:(0,p.pi)((0,p.pi)({},i),{path:n}),name:"venn-path"});var o=r.customInfo,s=o.offsetX,l=o.offsetY,u=kr.transform(null,[["t",s,l]]);return a.setMatrix(u),a},getMarker:function(r){var e=r.color;return{symbol:"circle",style:{lineWidth:0,stroke:e,fill:e,r:4}}}});var LP=function(r){return function(e,t){var n=[];return n[0]=r(e[0],t[0]),n[1]=r(e[1],t[1]),n[2]=r(e[2],t[2]),n}},Xg={normal:function(r){return r},multiply:function(r,e){return r*e/255},screen:function(r,e){return 255*(1-(1-r/255)*(1-e/255))},overlay:function(r,e){return e<128?2*r*e/255:255*(1-2*(1-r/255)*(1-e/255))},darken:function(r,e){return r>e?e:r},lighten:function(r,e){return r>e?r:e},dodge:function(r,e){return r===255?255:(r=255*(e/255)/(1-r/255),r>255?255:r)},burn:function(r,e){return e===255?255:r===0?0:255*(1-Math.min(1,(1-e/255)/(r/255)))}},DP=function(r){if(!Xg[r])throw new Error("unknown blend mode "+r);return Xg[r]};function PP(r,e,t){t===void 0&&(t="normal");var n=LP(DP(t))(al(r),al(e)),i=al(r),a=i[0],o=i[1],s=i[2],l=i[3],u=al(e),f=u[0],h=u[1],v=u[2],d=u[3],g=Number((l+d*(1-l)).toFixed(2)),y=Math.round((l*(1-d)*(a/255)+l*d*(n[0]/255)+(1-l)*d*(f/255))/g*255),m=Math.round((l*(1-d)*(o/255)+l*d*(n[1]/255)+(1-l)*d*(h/255))/g*255),x=Math.round((l*(1-d)*(s/255)+l*d*(n[2]/255)+(1-l)*d*(v/255))/g*255);return"rgba("+y+", "+m+", "+x+", "+g+")"}function al(r){var e=r.replace("/s+/g",""),t;return typeof e=="string"&&!e.startsWith("rgba")&&!e.startsWith("#")?t=En.rgb2arr(En.toRGB(e)).concat([1]):(e.startsWith("rgba")&&(t=e.replace("rgba(","").replace(")","").split(",")),e.startsWith("#")&&(t=En.rgb2arr(e).concat([1])),t.map(function(n,i){return i===3?Number(n):n|0}))}var wn=J(87026),Wg=1e-10;function Gc(r,e){var t=kP(r),n=t.filter(function(lt){return OP(lt,r)}),i=0,a=0,o,s=[];if(n.length>1){var l=$g(n);for(o=0;o-1){var y=r[h.parentIndex[g]],m=Math.atan2(h.x-y.x,h.y-y.y),x=Math.atan2(f.x-y.x,f.y-y.y),b=x-m;b<0&&(b+=2*Math.PI);var C=x-b/2,A=on(v,{x:y.x+y.radius*Math.sin(C),y:y.y+y.radius*Math.cos(C)});A>y.radius*2&&(A=y.radius*2),(d===null||d.width>A)&&(d={circle:y,width:A,p1:h,p2:f})}d!==null&&(s.push(d),i+=Hc(d.circle.radius,d.width),f=h)}}else{var B=r[0];for(o=1;oMath.abs(B.radius-r[o].radius)){rt=!0;break}rt?i=a=0:(i=B.radius*B.radius*Math.PI,s.push({circle:B,p1:{x:B.x,y:B.y+B.radius},p2:{x:B.x-Wg,y:B.y+B.radius},width:B.radius*2}))}return a/=2,e&&(e.area=i+a,e.arcArea=i,e.polygonArea=a,e.arcs=s,e.innerPoints=n,e.intersectionPoints=t),i+a}function OP(r,e){for(var t=0;te[t].radius+Wg)return!1;return!0}function kP(r){for(var e=[],t=0;t=r+e)return 0;if(t<=Math.abs(r-e))return Math.PI*Math.min(r,e)*Math.min(r,e);var n=r-(t*t-e*e+r*r)/(2*t),i=e-(t*t-r*r+e*e)/(2*t);return Hc(r,n)+Hc(e,i)}function jg(r,e){var t=on(r,e),n=r.radius,i=e.radius;if(t>=n+i||t<=Math.abs(n-i))return[];var a=(n*n-i*i+t*t)/(2*t),o=Math.sqrt(n*n-a*a),s=r.x+a*(e.x-r.x)/t,l=r.y+a*(e.y-r.y)/t,u=-(e.y-r.y)*(o/t),f=-(e.x-r.x)*(o/t);return[{x:s+u,y:l-f},{x:s-u,y:l+f}]}function $g(r){for(var e={x:0,y:0},t=0;t=o&&(a=t[n],o=s)}var l=(0,wn.nelderMead)(function(v){return-1*Yc({x:v[0],y:v[1]},r,e)},[a.x,a.y],{maxIterations:500,minErrorDelta:1e-10}).x,u={x:l[0],y:l[1]},f=!0;for(n=0;nr[n].radius){f=!1;break}for(n=0;n0&&console.log("WARNING: area "+a+" not represented on screen")}return t}function RP(r,e,t){var n=[],i=r-t,a=e;return n.push("M",i,a),n.push("A",t,t,0,1,0,i+2*t,a),n.push("A",t,t,0,1,0,i,a),n.join(" ")}function cB(r){var e=r.split(" ");return{x:parseFloat(e[1]),y:parseFloat(e[2]),radius:-parseFloat(e[4])}}function NP(r){var e={};Gc(r,e);var t=e.arcs;if(t.length===0)return"M 0 0";if(t.length==1){var n=t[0].circle;return RP(n.x,n.y,n.radius)}else{for(var i=[` M`,t[0].p2.x,t[0].p2.y],a=0;as;i.push(` A`,s,s,0,l?1:0,1,o.p1.x,o.p1.y)}return i.join(" ")}}function zP(r,e){e=e||{},e.maxIterations=e.maxIterations||500;var t=e.initialLayout||HP,n=e.lossFunction||Wc;r=UP(r);var i=t(r,e),a=[],o=[],s;for(s in i)i.hasOwnProperty(s)&&(a.push(i[s].x),a.push(i[s].y),o.push(s));for(var l=(0,wn.nelderMead)(function(h){for(var v={},d=0;du?1:-1}),n=0;n=Math.min(e[o].size,e[s].size)?h=1:a.size<=1e-10&&(h=-1),i[o][s]=i[s][o]=h}),{distances:n,constraints:i}}function GP(r,e,t,n){var i=0,a;for(a=0;a0&&g<=h||v<0&&g>=h||(i+=2*y*y,e[2*a]+=4*y*(o-u),e[2*a+1]+=4*y*(s-f),e[2*l]+=4*y*(u-o),e[2*l+1]+=4*y*(f-s))}return i}function HP(r,e){var t=XP(r,e),n=e.lossFunction||Wc;if(r.length>=8){var i=YP(r,e),a=n(i,r),o=n(t,r);a+1e-8=Math.min(n[f].size,n[h].size)&&(u=0),i[f].push({set:h,size:l.size,weight:u}),i[h].push({set:f,size:l.size,weight:u})}var v=[];for(a in i)if(i.hasOwnProperty(a)){for(var d=0,o=0;o0){var i=r[0].x,a=r[0].y;for(n=0;n1){var s=Math.atan2(r[1].x,r[1].y)-e,l=void 0,u=void 0,f=Math.cos(s),h=Math.sin(s);for(n=0;n2){for(var v=Math.atan2(r[2].x,r[2].y)-e;v<0;)v+=2*Math.PI;for(;v>2*Math.PI;)v-=2*Math.PI;if(v>Math.PI){var d=r[1].y/(1e-10+r[1].x);for(n=0;n1)throw new Error("quantiles must be between 0 and 1");return e===1?r[r.length-1]:e===0?r[0]:t%1!=0?r[Math.ceil(t)-1]:r.length%2==0?(r[t-1]+r[t])/2:r[t]}function ho(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function ol(r,e,t,n){for(t=t||0,n=n||r.length-1;n>t;){if(n-t>600){var i=n-t+1,a=e-t+1,o=Math.log(i),s=.5*Math.exp(2*o/3),l=.5*Math.sqrt(o*s*(i-s)/i);a-i/2<0&&(l*=-1);var u=Math.max(t,Math.floor(e-a*s/i+l)),f=Math.min(n,Math.floor(e+(i-a)*s/i+l));ol(r,e,u,f)}var h=r[e],v=t,d=n;for(ho(r,t,e),r[n]>h&&ho(r,t,n);vh;)d--}r[t]===h?ho(r,t,d):(d++,ho(r,d,n)),d<=e&&(t=d+1),e<=d&&(n=d-1)}}function vo(r,e){var t=r.slice();if(Array.isArray(e)){dO(t,e);for(var n=[],i=0;i0?f:h},g=Dt({},r,{options:{xField:i,yField:Jr,seriesField:i,rawFields:[a,ul,qc,Jr],widthRatio:l,interval:{style:u,shape:"waterfall",color:d}}}),y=Sr(g).ext,m=y.geometry;return m.customInfo({leaderLine:s}),r}function PO(r){var e,t,n=r.options,i=n.xAxis,a=n.yAxis,o=n.xField,s=n.yField,l=n.meta,u=Dt({},{alias:s},(0,c.U2)(l,s));return Fe(or((e={},e[o]=i,e[s]=a,e[Jr]=a,e),Dt({},l,(t={},t[Jr]=u,t[ul]=u,t[$c]=u,t))))(r)}function OO(r){var e=r.chart,t=r.options,n=t.xAxis,i=t.yAxis,a=t.xField,o=t.yField;return n===!1?e.axis(a,!1):e.axis(a,n),i===!1?(e.axis(o,!1),e.axis(Jr,!1)):(e.axis(o,i),e.axis(Jr,i)),r}function kO(r){var e=r.chart,t=r.options,n=t.legend,i=t.total,a=t.risingFill,o=t.fallingFill,s=t.locale,l=Rs(s);if(n===!1)e.legend(!1);else{var u=[{name:l.get(["general","increase"]),value:"increase",marker:{symbol:"square",style:{r:5,fill:a}}},{name:l.get(["general","decrease"]),value:"decrease",marker:{symbol:"square",style:{r:5,fill:o}}}];i&&u.push({name:i.label||"",value:"total",marker:{symbol:"square",style:Dt({},{r:5},(0,c.U2)(i,"style"))}}),e.legend(Dt({},{custom:!0,position:"top",items:u},n)),e.removeInteraction("legend-filter")}return r}function _O(r){var e=r.chart,t=r.options,n=t.label,i=t.labelMode,a=t.xField,o=wr(e,"interval");if(!n)o.label(!1);else{var s=n.callback,l=(0,p._T)(n,["callback"]);o.label({fields:i==="absolute"?[$c,a]:[ul,a],callback:s,cfg:yr(l)})}return r}function BO(r){var e=r.chart,t=r.options,n=t.tooltip,i=t.xField,a=t.yField;if(n!==!1){e.tooltip((0,p.pi)({showCrosshairs:!1,showMarkers:!1,shared:!0,fields:[a]},n));var o=e.geometries[0];(n==null?void 0:n.formatter)?o.tooltip(i+"*"+a,n.formatter):o.tooltip(a)}else e.tooltip(!1);return r}function RO(r){return Fe(LO,Ye,DO,PO,OO,kO,BO,_O,ii,rr,qe,ir())(r)}var pB=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="waterfall",t}return e.getDefaultOptions=function(){return TO},e.prototype.changeData=function(t){var n=this.options,i=n.xField,a=n.yField,o=n.total;this.updateOption({data:t}),this.chart.changeData(l0(t,i,a,o))},e.prototype.getSchemaAdaptor=function(){return RO},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e}(ke),Kc="color",NO=Dt({},ke.getDefaultOptions(),{timeInterval:2e3,legend:!1,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!1,fields:["text","value",Kc],formatter:function(r){return{name:r.text,value:r.value}}},wordStyle:{fontFamily:"Verdana",fontWeight:"normal",padding:1,fontSize:[12,60],rotation:[0,90],rotationSteps:2,rotateRatio:.5}}),zO={font:function(){return"serif"},padding:1,size:[500,500],spiral:"archimedean",timeInterval:3e3};function UO(r,e){return e=(0,c.f0)({},zO,e),VO(r,e)}function VO(r,e){var t=tk();["font","fontSize","fontWeight","padding","rotate","size","spiral","timeInterval","random"].forEach(function(l){(0,c.UM)(e[l])||t[l](e[l])}),t.words(r),e.imageMask&&t.createMask(e.imageMask);var n=t.start(),i=n._tags;i.forEach(function(l){l.x+=e.size[0]/2,l.y+=e.size[1]/2});var a=e.size,o=a[0],s=a[1];return i.push({text:"",value:0,x:0,y:0,opacity:0}),i.push({text:"",value:0,x:o,y:s,opacity:0}),i}var Jc=Math.PI/180,po=1<<11>>5,cl=1<<11;function GO(r){return r.text}function HO(){return"serif"}function u0(){return"normal"}function YO(r){return r.value}function XO(){return~~(Math.random()*2)*90}function WO(){return 1}function ZO(r,e,t,n){if(!e.sprite){var i=r.context,a=r.ratio;i.clearRect(0,0,(po<<5)/a,cl/a);var o=0,s=0,l=0,u=t.length;for(--n;++n>5<<5,h=~~Math.max(Math.abs(y+m),Math.abs(y-m))}else f=f+31>>5<<5;if(h>l&&(l=h),o+f>=po<<5&&(o=0,s+=l,l=0),s+h>=cl)break;i.translate((o+(f>>1))/a,(s+(h>>1))/a),e.rotate&&i.rotate(e.rotate*Jc),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=f,e.height=h,e.xoff=o,e.yoff=s,e.x1=f>>1,e.y1=h>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,o+=f}for(var b=i.getImageData(0,0,(po<<5)/a,cl/a).data,C=[];--n>=0;)if(e=t[n],!!e.hasText){for(var f=e.width,A=f>>5,h=e.y1-e.y0,B=0;B>5),Ft=b[(s+xt)*(po<<5)+(o+B)<<2]?1<<31-B%32:0;C[kt]|=Ft,rt|=Ft}rt?lt=xt:(e.y0++,h--,xt--,s++)}e.y1=e.y0+lt,e.sprite=C.slice(0,(e.y1-e.y0)*A)}}}function jO(r,e,t){t>>=5;for(var n=r.sprite,i=r.width>>5,a=r.x-(i<<4),o=a&127,s=32-o,l=r.y1-r.y0,u=(r.y+r.y0)*t+(a>>5),f,h=0;h>>o:0))&e[u+v])return!0;u+=t}return!1}function $O(r,e){var t=r[0],n=r[1];e.x+e.x0n.x&&(n.x=e.x+e.x1),e.y+e.y1>n.y&&(n.y=e.y+e.y1)}function qO(r,e){return r.x+r.x1>e[0].x&&r.x+r.x0e[0].y&&r.y+r.y0>5)*r[1]),A=l.length,B=[],rt=l.map(function(Ft,Xt,ae){return Ft.text=f.call(this,Ft,Xt,ae),Ft.font=e.call(this,Ft,Xt,ae),Ft.style=h.call(this,Ft,Xt,ae),Ft.weight=n.call(this,Ft,Xt,ae),Ft.rotate=i.call(this,Ft,Xt,ae),Ft.size=~~t.call(this,Ft,Xt,ae),Ft.padding=a.call(this,Ft,Xt,ae),Ft}).sort(function(Ft,Xt){return Xt.size-Ft.size}),lt=-1,xt=d.board?[{x:0,y:0},{x:m,y:x}]:null;kt();function kt(){for(var Ft=Date.now();Date.now()-Ft>1,Xt.y=x*(s()+.5)>>1,ZO(b,Xt,rt,lt),Xt.hasText&&y(C,Xt,xt)&&(B.push(Xt),xt?d.hasImage||$O(xt,Xt):xt=[{x:Xt.x+Xt.x0,y:Xt.y+Xt.y0},{x:Xt.x+Xt.x1,y:Xt.y+Xt.y1}],Xt.x-=r[0]>>1,Xt.y-=r[1]>>1)}d._tags=B,d._bounds=xt}return d};function g(m){m.width=m.height=1;var x=Math.sqrt(m.getContext("2d").getImageData(0,0,1,1).data.length>>2);m.width=(po<<5)/x,m.height=cl/x;var b=m.getContext("2d");return b.fillStyle=b.strokeStyle="red",b.textAlign="center",{context:b,ratio:x}}function y(m,x,b){for(var C=x.x,A=x.y,B=Math.sqrt(r[0]*r[0]+r[1]*r[1]),rt=o(r),lt=s()<.5?1:-1,xt,kt=-lt,Ft,Xt;(xt=rt(kt+=lt))&&(Ft=~~xt[0],Xt=~~xt[1],!(Math.min(Math.abs(Ft),Math.abs(Xt))>=B));)if(x.x=C+Ft,x.y=A+Xt,!(x.x+x.x0<0||x.y+x.y0<0||x.x+x.x1>r[0]||x.y+x.y1>r[1])&&(!b||!jO(x,m,r[0]))&&(!b||qO(x,b))){for(var ae=x.sprite,we=x.width>>5,Se=r[0]>>5,Re=x.x-(we<<4),Qt=Re&127,he=32-Qt,xe=x.y1-x.y0,ve=void 0,ge=(x.y+x.y0)*Se+(Re>>5),Te=0;Te>>Qt:0);ge+=Se}return delete x.sprite,!0}return!1}return d.createMask=function(m){var x=document.createElement("canvas"),b=r[0],C=r[1];if(!(!b||!C)){var A=b>>5,B=f0((b>>5)*C);x.width=b,x.height=C;var rt=x.getContext("2d");rt.drawImage(m,0,0,m.width,m.height,0,0,b,C);for(var lt=rt.getImageData(0,0,b,C).data,xt=0;xt>5),Xt=xt*b+kt<<2,ae=lt[Xt]>=250&<[Xt+1]>=250&<[Xt+2]>=250,we=ae?1<<31-kt%32:0;B[Ft]|=we}d.board=B,d.hasImage=!0}},d.timeInterval=function(m){u=m==null?Infinity:m},d.words=function(m){l=m},d.size=function(m){r=[+m[0],+m[1]]},d.font=function(m){e=Sn(m)},d.fontWeight=function(m){n=Sn(m)},d.rotate=function(m){i=Sn(m)},d.spiral=function(m){o=QO[m]||m},d.fontSize=function(m){t=Sn(m)},d.padding=function(m){a=Sn(m)},d.random=function(m){s=Sn(m)},d}function h0(r){var e=r.options,t=r.chart,n=t,i=n.width,a=n.height,o=n.padding,s=n.appendPadding,l=n.ele,u=e.data,f=e.imageMask,h=e.wordField,v=e.weightField,d=e.colorField,g=e.wordStyle,y=e.timeInterval,m=e.random,x=e.spiral,b=e.autoFit,C=b===void 0?!0:b,A=e.placementStrategy;if(!u||!u.length)return[];var B=g.fontFamily,rt=g.fontWeight,lt=g.padding,xt=g.fontSize,kt=ak(u,v),Ft=[lk(kt),uk(kt)],Xt=u.map(function(Se){return{text:Se[h],value:Se[v],color:Se[d],datum:Se}}),ae={imageMask:f,font:B,fontSize:ik(xt,Ft),fontWeight:rt,size:ek({width:i,height:a,padding:o,appendPadding:s,autoFit:C,container:l}),padding:lt,timeInterval:y,random:m,spiral:x,rotate:ok(e)};if((0,c.mf)(A)){var we=Xt.map(function(Se,Re,Qt){return(0,p.pi)((0,p.pi)((0,p.pi)({},Se),{hasText:!!Se.text,font:Sn(ae.font)(Se,Re,Qt),weight:Sn(ae.fontWeight)(Se,Re,Qt),rotate:Sn(ae.rotate)(Se,Re,Qt),size:Sn(ae.fontSize)(Se,Re,Qt),style:"normal"}),A.call(t,Se,Re,Qt))});return we.push({text:"",value:0,x:0,y:0,opacity:0}),we.push({text:"",value:0,x:ae.size[0],y:ae.size[1],opacity:0}),we}return UO(Xt,ae)}function ek(r){var e=r.width,t=r.height,n=r.container,i=r.autoFit,a=r.padding,o=r.appendPadding;if(i){var s=ic(n);e=s.width,t=s.height}e=e||400,t=t||400;var l=rk({padding:a,appendPadding:o}),u=l[0],f=l[1],h=l[2],v=l[3],d=[e-(v+f),t-(u+h)];return d}function rk(r){var e=ni(r.padding),t=ni(r.appendPadding),n=e[0]+t[0],i=e[1]+t[1],a=e[2]+t[2],o=e[3]+t[3];return[n,i,a,o]}function nk(r){return new Promise(function(e,t){if(r instanceof HTMLImageElement){e(r);return}if((0,c.HD)(r)){var n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=function(){e(n)},n.onerror=function(){kn(an.ERROR,!1,"image %s load failed !!!",r),t()};return}kn(an.WARN,r===void 0,"The type of imageMask option must be String or HTMLImageElement."),t()})}function ik(r,e){if((0,c.mf)(r))return r;if((0,c.kJ)(r)){var t=r[0],n=r[1];if(!e)return function(){return(n+t)/2};var i=e[0],a=e[1];return a===i?function(){return(n+t)/2}:function(s){var l=s.value;return(n-t)/(a-i)*(l-i)+t}}return function(){return r}}function ak(r,e){return r.map(function(t){return t[e]}).filter(function(t){return typeof t=="number"&&!isNaN(t)})}function ok(r){var e=sk(r),t=e.rotation,n=e.rotationSteps;if(!(0,c.kJ)(t))return t;var i=t[0],a=t[1],o=n===1?0:(a-i)/(n-1);return function(){return a===i?a:Math.floor(Math.random()*n)*o}}function sk(r){var e=r.wordStyle.rotationSteps;return e<1&&(kn(an.WARN,!1,"The rotationSteps option must be greater than or equal to 1."),e=1),{rotation:r.wordStyle.rotation,rotationSteps:e}}function lk(r){return Math.min.apply(Math,r)}function uk(r){return Math.max.apply(Math,r)}function ck(r){var e=r.chart,t=r.options,n=t.colorField,i=t.color,a=h0(r);e.data(a);var o=Dt({},r,{options:{xField:"x",yField:"y",seriesField:n&&Kc,rawFields:(0,c.mf)(i)&&(0,p.pr)((0,c.U2)(t,"rawFields",[]),["datum"]),point:{color:i,shape:"word-cloud"}}}),s=Gr(o).ext;return s.geometry.label(!1),e.coordinate().reflect("y"),e.axis(!1),r}function fk(r){return Fe(or({x:{nice:!1},y:{nice:!1}}))(r)}function hk(r){var e=r.chart,t=r.options,n=t.legend,i=t.colorField;return n===!1?e.legend(!1):i&&e.legend(Kc,n),r}function vk(r){Fe(ck,fk,pr,hk,rr,qe,Ye,ii)(r)}We("point","word-cloud",{draw:function(r,e){var t=r.x,n=r.y,i=e.addShape("text",{attrs:(0,p.pi)((0,p.pi)({},pk(r)),{x:t,y:n})}),a=r.data.rotate;return typeof a=="number"&&kr.rotate(i,a*Math.PI/180),i}});function pk(r){return{fontSize:r.data.size,text:r.data.text,textAlign:"center",fontFamily:r.data.font,fontWeight:r.data.weight,fill:r.color||r.defaultStyle.stroke,textBaseline:"alphabetic"}}var dB=function(r){(0,p.ZT)(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="word-cloud",t}return e.getDefaultOptions=function(){return NO},e.prototype.changeData=function(t){this.updateOption({data:t}),this.options.imageMask?this.render():this.chart.changeData(h0({chart:this.chart,options:this.options}))},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.render=function(){var t=this;return new Promise(function(n){var i=t.options.imageMask;if(!i){r.prototype.render.call(t),n();return}var a=function(o){t.options=(0,p.pi)((0,p.pi)({},t.options),{imageMask:o||null}),r.prototype.render.call(t),n()};nk(i).then(a).catch(a)})},e.prototype.getSchemaAdaptor=function(){return vk},e.prototype.triggerResize=function(){var t=this;this.chart.destroyed||(this.execAdaptor(),window.setTimeout(function(){r.prototype.triggerResize.call(t)}))},e}(ke),gB=function(r){(0,p.ZT)(e,r);function e(t,n,i,a){var o=r.call(this,t,Dt({},a,n))||this;return o.type="g2-plot",o.defaultOptions=a,o.adaptor=i,o}return e.prototype.getDefaultOptions=function(){return this.defaultOptions},e.prototype.getSchemaAdaptor=function(){return this.adaptor},e}(ke),yB="2.4.23";Rp("en-US",C2),Rp("zh-CN",A2);var mB={scale:or,legend:Ti,tooltip:pr,annotation:ir,interaction:rr,theme:Ye,animation:qe}},31506:function(Ee,te,J){"use strict";J.d(te,{m$:function(){return Kt},zu:function(){return Bt},lh:function(){return It},vs:function(){return ut},Dg:function(){return St}});var ct=J(35600),wt=J(31437);function Kt(Nt,_t,bt){var p=[0,0,0,0,0,0,0,0,0];return ct.vc(p,bt),ct.Jp(Nt,p,_t)}function Bt(Nt,_t,bt){var p=[0,0,0,0,0,0,0,0,0];return ct.Us(p,bt),ct.Jp(Nt,p,_t)}function It(Nt,_t,bt){var p=[0,0,0,0,0,0,0,0,0];return ct.xJ(p,bt),ct.Jp(Nt,p,_t)}function ot(Nt,_t,bt){return ct.Jp(Nt,bt,_t)}function ut(Nt,_t){for(var bt=Nt?[].concat(Nt):[1,0,0,0,1,0,0,0,1],p=0,c=_t.length;p=0;return bt?c?Math.PI*2-p:p:c?p:Math.PI*2-p}function jt(Nt,_t,bt){return bt?(Nt[0]=_t[1],Nt[1]=-1*_t[0]):(Nt[0]=-1*_t[1],Nt[1]=_t[0]),Nt}},80389:function(Ee,te,J){"use strict";J.d(te,{e9:function(){return St},Wq:function(){return Yt},tr:function(){return tt},wb:function(){return Mt},zx:function(){return T}});var ct=J(41694),wt=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/ig,Kt=/[^\s\,]+/ig;function Bt(R){var Y=R||[];if((0,ct.kJ)(Y))return Y;if((0,ct.HD)(Y))return Y=Y.match(wt),(0,ct.S6)(Y,function(et,dt){if(et=et.match(Kt),et[0].length>1){var Rt=et[0].charAt(0);et.splice(1,0,et[0].substr(1)),et[0]=Rt}(0,ct.S6)(et,function(Ht,Gt){isNaN(Ht)||(et[Gt]=+Ht)}),Y[dt]=et}),Y}var It=Bt,ot=J(31437);function ut(R,Y,et,dt){var Rt=[],Ht=!!dt,Gt,Ut,Pt,ee,Jt,ce,ye;if(Ht){Pt=dt[0],ee=dt[1];for(var se=0,de=R.length;se=0;Pt--)Gt=Ht[Pt].index,Ht[Pt].type==="add"?R.splice(Gt,0,[].concat(R[Gt])):R.splice(Gt,1)}if(dt=R.length,dt2&&(et.push([Rt].concat(Gt.splice(0,2))),Ut="l",Rt=Rt==="m"?"l":"L"),Ut==="o"&&Gt.length===1&&et.push([Rt,Gt[0]]),Ut==="r")et.push([Rt].concat(Gt));else for(;Gt.length>=Y[Ut]&&(et.push([Rt].concat(Gt.splice(0,Y[Ut]))),!!Y[Ut]););return""}),et}var K=/[a-z]/;function Ct(R,Y){return[Y[0]+(Y[0]-R[0]),Y[1]+(Y[1]-R[1])]}function Mt(R){var Y=tt(R);if(!Y||!Y.length)return[["M",0,0]];for(var et=!1,dt=0;dt=0){et=!0;break}}if(!et)return Y;var Ht=[],Gt=0,Ut=0,Pt=0,ee=0,Jt=0,ce,ye,se=Y[0];(se[0]==="M"||se[0]==="m")&&(Gt=+se[1],Ut=+se[2],Pt=Gt,ee=Ut,Jt++,Ht[0]=["M",Gt,Ut]);for(var dt=Jt,de=Y.length;dt1&&(Ht=1),Ht<-1&&(Ht=-1),Rt*Math.acos(Ht)},Lt=function(R,Y,et,dt,Rt,Ht,Gt,Ut,Pt,ee,Jt,ce){var ye=Math.pow(Rt,2),se=Math.pow(Ht,2),de=Math.pow(Jt,2),pe=Math.pow(ce,2),me=ye*se-ye*pe-se*de;me<0&&(me=0),me/=ye*pe+se*de,me=Math.sqrt(me)*(Gt===Ut?-1:1);var le=me*Rt/Ht*ce,be=me*-Ht/Rt*Jt,Ie=ee*le-Pt*be+(R+et)/2,Me=Pt*le+ee*be+(Y+dt)/2,De=(Jt-le)/Rt,ze=(ce-be)/Ht,Ue=(-Jt-le)/Rt,nr=(-ce-be)/Ht,br=At(1,0,De,ze),sr=At(De,ze,Ue,nr);return Ut===0&&sr>0&&(sr-=z),Ut===1&&sr<0&&(sr+=z),[Ie,Me,br,sr]},Vt=function(R){var Y=R.px,et=R.py,dt=R.cx,Rt=R.cy,Ht=R.rx,Gt=R.ry,Ut=R.xAxisRotation,Pt=Ut===void 0?0:Ut,ee=R.largeArcFlag,Jt=ee===void 0?0:ee,ce=R.sweepFlag,ye=ce===void 0?0:ce,se=[];if(Ht===0||Gt===0)return[{x1:0,y1:0,x2:0,y2:0,x:dt,y:Rt}];var de=Math.sin(Pt*z/360),pe=Math.cos(Pt*z/360),me=pe*(Y-dt)/2+de*(et-Rt)/2,le=-de*(Y-dt)/2+pe*(et-Rt)/2;if(me===0&&le===0)return[{x1:0,y1:0,x2:0,y2:0,x:dt,y:Rt}];Ht=Math.abs(Ht),Gt=Math.abs(Gt);var be=Math.pow(me,2)/Math.pow(Ht,2)+Math.pow(le,2)/Math.pow(Gt,2);be>1&&(Ht*=Math.sqrt(be),Gt*=Math.sqrt(be));var Ie=Lt(Y,et,dt,Rt,Ht,Gt,Jt,ye,de,pe,me,le),Me=Ie[0],De=Ie[1],ze=Ie[2],Ue=Ie[3],nr=Math.abs(Ue)/(z/4);Math.abs(1-nr)<1e-7&&(nr=1);var br=Math.max(Math.ceil(nr),1);Ue/=br;for(var sr=0;sr7){R[et].shift();for(var dt=R[et],Rt=et;dt.length;)Y[et]="A",R.splice(Rt+=1,0,["C"].concat(dt.splice(0,6)));R.splice(et,1)}}var j=function(R,Y,et,dt,Rt){var Ht=-3*Y+9*et-9*dt+3*Rt,Gt=R*Ht+6*Y-12*et+6*dt;return R*Gt-3*Y+3*et},X=function(R,Y,et,dt,Rt,Ht,Gt,Ut,Pt){Pt===null&&(Pt=1),Pt=Pt>1?1:Pt<0?0:Pt;for(var ee=Pt/2,Jt=12,ce=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],ye=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],se=0,de=0;de0&&se<1&&Pt.push(se);continue}var pe=ce*ce-4*ye*Jt,me=Math.sqrt(pe);if(!(pe<0)){var le=(-ce+me)/(2*Jt);le>0&&le<1&&Pt.push(le);var be=(-ce-me)/(2*Jt);be>0&&be<1&&Pt.push(be)}}for(var Ie=Pt.length,Me=Ie,De;Ie--;)se=Pt[Ie],De=1-se,ee[0][Ie]=De*De*De*R+3*De*De*se*et+3*De*se*se*Rt+se*se*se*Gt,ee[1][Ie]=De*De*De*Y+3*De*De*se*dt+3*De*se*se*Ht+se*se*se*Ut;return ee[0][Me]=R,ee[1][Me]=Y,ee[0][Me+1]=Gt,ee[1][Me+1]=Ut,ee[0].length=ee[1].length=Me+2,{min:{x:Math.min.apply(0,ee[0]),y:Math.min.apply(0,ee[1])},max:{x:Math.max.apply(0,ee[0]),y:Math.max.apply(0,ee[1])}}},S=function(R,Y,et,dt,Rt,Ht,Gt,Ut){if(!(Math.max(R,et)Math.max(Rt,Gt)||Math.max(Y,dt)Math.max(Ht,Ut))){var Pt=(R*dt-Y*et)*(Rt-Gt)-(R-et)*(Rt*Ut-Ht*Gt),ee=(R*dt-Y*et)*(Ht-Ut)-(Y-dt)*(Rt*Ut-Ht*Gt),Jt=(R-et)*(Ht-Ut)-(Y-dt)*(Rt-Gt);if(!!Jt){var ce=Pt/Jt,ye=ee/Jt,se=+ce.toFixed(2),de=+ye.toFixed(2);if(!(se<+Math.min(R,et).toFixed(2)||se>+Math.max(R,et).toFixed(2)||se<+Math.min(Rt,Gt).toFixed(2)||se>+Math.max(Rt,Gt).toFixed(2)||de<+Math.min(Y,dt).toFixed(2)||de>+Math.max(Y,dt).toFixed(2)||de<+Math.min(Ht,Ut).toFixed(2)||de>+Math.max(Ht,Ut).toFixed(2)))return{x:ce,y:ye}}}},P=function(R,Y,et){return Y>=R.x&&Y<=R.x+R.width&&et>=R.y&&et<=R.y+R.height},pt=function(R,Y,et,dt){return R===null&&(R=Y=et=dt=0),Y===null&&(Y=R.y,et=R.width,dt=R.height,R=R.x),{x:R,y:Y,width:et,w:et,height:dt,h:dt,x2:R+et,y2:Y+dt,cx:R+et/2,cy:Y+dt/2,r1:Math.min(et,dt)/2,r2:Math.max(et,dt)/2,r0:Math.sqrt(et*et+dt*dt)/2,path:rectPath(R,Y,et,dt),vb:[R,Y,et,dt].join(" ")}},Ot=function(R,Y){return R=pt(R),Y=pt(Y),P(Y,R.x,R.y)||P(Y,R.x2,R.y)||P(Y,R.x,R.y2)||P(Y,R.x2,R.y2)||P(R,Y.x,Y.y)||P(R,Y.x2,Y.y)||P(R,Y.x,Y.y2)||P(R,Y.x2,Y.y2)||(R.xY.x||Y.xR.x)&&(R.yY.y||Y.yR.y)},it=function(R,Y,et,dt,Rt,Ht,Gt,Ut){isArray(R)||(R=[R,Y,et,dt,Rt,Ht,Gt,Ut]);var Pt=Z.apply(null,R);return pt(Pt.min.x,Pt.min.y,Pt.max.x-Pt.min.x,Pt.max.y-Pt.min.y)},yt=function(R,Y,et,dt,Rt,Ht,Gt,Ut,Pt){var ee=1-Pt,Jt=Math.pow(ee,3),ce=Math.pow(ee,2),ye=Pt*Pt,se=ye*Pt,de=Jt*R+ce*3*Pt*et+ee*3*Pt*Pt*Rt+se*Gt,pe=Jt*Y+ce*3*Pt*dt+ee*3*Pt*Pt*Ht+se*Ut,me=R+2*Pt*(et-R)+ye*(Rt-2*et+R),le=Y+2*Pt*(dt-Y)+ye*(Ht-2*dt+Y),be=et+2*Pt*(Rt-et)+ye*(Gt-2*Rt+et),Ie=dt+2*Pt*(Ht-dt)+ye*(Ut-2*Ht+dt),Me=ee*R+Pt*et,De=ee*Y+Pt*dt,ze=ee*Rt+Pt*Gt,Ue=ee*Ht+Pt*Ut,nr=90-Math.atan2(me-be,le-Ie)*180/Math.PI;return{x:de,y:pe,m:{x:me,y:le},n:{x:be,y:Ie},start:{x:Me,y:De},end:{x:ze,y:Ue},alpha:nr}},M=function(R,Y,et){var dt=it(R),Rt=it(Y);if(!Ot(dt,Rt))return et?0:[];for(var Ht=X.apply(0,R),Gt=X.apply(0,Y),Ut=~~(Ht/8),Pt=~~(Gt/8),ee=[],Jt=[],ce={},ye=et?0:[],se=0;se=0&&Ue<=1&&nr>=0&&nr<=1&&(et?ye++:ye.push({x:ze.x,y:ze.y,t1:Ue,t2:nr}))}}return ye},O=function(R,Y,et){R=path2Curve(R),Y=path2Curve(Y);for(var dt,Rt,Ht,Gt,Ut,Pt,ee,Jt,ce,ye,se=et?0:[],de=0,pe=R.length;de1&&(et*=Math.sqrt(se),dt*=Math.sqrt(se));var de=et*et*(ye*ye)+dt*dt*(ce*ce),pe=de?Math.sqrt((et*et*(dt*dt)-de)/de):1;Ht===Gt&&(pe*=-1),isNaN(pe)&&(pe=0);var me=dt?pe*et*ye/dt:0,le=et?pe*-dt*ce/et:0,be=(Ut+ee)/2+Math.cos(Rt)*me-Math.sin(Rt)*le,Ie=(Pt+Jt)/2+Math.sin(Rt)*me+Math.cos(Rt)*le,Me=[(ce-me)/et,(ye-le)/dt],De=[(-1*ce-me)/et,(-1*ye-le)/dt],ze=ft([1,0],Me),Ue=ft(Me,De);return at(Me,De)<=-1&&(Ue=Math.PI),at(Me,De)>=1&&(Ue=0),Gt===0&&Ue>0&&(Ue=Ue-2*Math.PI),Gt===1&&Ue<0&&(Ue=Ue+2*Math.PI),{cx:be,cy:Ie,rx:L(R,[ee,Jt])?0:et,ry:L(R,[ee,Jt])?0:dt,startAngle:ze,endAngle:ze+Ue,xRotation:Rt,arcFlag:Ht,sweepFlag:Gt}}function w(R,Y){return[Y[0]+(Y[0]-R[0]),Y[1]+(Y[1]-R[1])]}function T(R){R=It(R);for(var Y=[],et=null,dt=null,Rt=null,Ht=0,Gt=R.length,Ut=0;Ut0!=N(Ut[1]-et)>0&&N(Y-(et-Gt[1])*(Gt[0]-Ut[0])/(Gt[1]-Ut[1])-Gt[0])<0&&(dt=!dt)}return dt}var Q=function(R,Y,et){return R>=Y&&R<=et};function Tt(R,Y,et,dt){var Rt=.001,Ht={x:et.x-R.x,y:et.y-R.y},Gt={x:Y.x-R.x,y:Y.y-R.y},Ut={x:dt.x-et.x,y:dt.y-et.y},Pt=Gt.x*Ut.y-Gt.y*Ut.x,ee=Pt*Pt,Jt=Gt.x*Gt.x+Gt.y*Gt.y,ce=Ut.x*Ut.x+Ut.y*Ut.y,ye=null;if(ee>Rt*Jt*ce){var se=(Ht.x*Ut.y-Ht.y*Ut.x)/Pt,de=(Ht.x*Gt.y-Ht.y*Gt.x)/Pt;Q(se,0,1)&&Q(de,0,1)&&(ye={x:R.x+se*Gt.x,y:R.y+se*Gt.y})}return ye}function qt(R){for(var Y=[],et=R.length,dt=0;dt1){var Gt=R[0],Ut=R[et-1];Y.push({from:{x:Ut[0],y:Ut[1]},to:{x:Gt[0],y:Gt[1]}})}return Y}function Wt(R,Y){var et=!1;return(0,ct.S6)(R,function(dt){if(Tt(dt.from,dt.to,Y.from,Y.to))return et=!0,!1}),et}function ne(R){var Y=R.map(function(dt){return dt[0]}),et=R.map(function(dt){return dt[1]});return{minX:Math.min.apply(null,Y),maxX:Math.max.apply(null,Y),minY:Math.min.apply(null,et),maxY:Math.max.apply(null,et)}}function $t(R,Y){return!(Y.minX>R.maxX||Y.maxXR.maxY||Y.maxY-1:!1},Bt=Kt,It=function(I,$){if(!wt(I))return I;for(var vt=[],Et=0;Et-1;)D.call(I,fe,1);return I},L=null,E=Array.prototype.splice,w=function($,vt){if(!wt($))return[];for(var Et=$?vt.length:0,Zt=Et-1;Et--;){var fe=void 0,Ce=vt[Et];(Et===Zt||Ce!==fe)&&(fe=Ce,E.call($,Ce,1))}return $},T=w,F=function(I,$,vt){if(!c(I)&&!re(I))return I;var Et=vt;return Ct(I,function(Zt,fe){Et=$(Et,Zt,fe)}),Et},N=F,k=function(I,$){var vt=[];if(!wt(I))return vt;for(var Et=-1,Zt=[],fe=I.length;++Etfe[Ze])return 1;if(Zt[Ze]vt?vt:I},Ie=be,Me=function(I,$){var vt=$.toString(),Et=vt.indexOf(".");if(Et===-1)return Math.round(I);var Zt=vt.substr(Et+1).length;return Zt>20&&(Zt=20),parseFloat(I.toFixed(Zt))},De=Me,ze=function(I){return Nt(I,"Number")},Ue=ze,nr=function(I){return isNumber(I)&&I%1!=0},br=null,sr=function(I){return isNumber(I)&&I%2==0},Qr=null,sn=Number.isInteger?Number.isInteger:function(I){return Ue(I)&&I%1==0},ln=null,Cn=function(I){return isNumber(I)&&I<0},un=null,Mr=1e-5;function Xr(I,$,vt){return vt===void 0&&(vt=Mr),Math.abs(I-$)0},ya=null,li=function(I,$){if(!!c(I)){for(var vt,Et=-Infinity,Zt=0;ZtEt&&(vt=fe,Et=Ce)}return vt}},fl=function(I,$){if(!!c(I)){for(var vt,Et=Infinity,Zt=0;Zt$?(Et&&(clearTimeout(Et),Et=null),Ze=lr,Ce=I.apply(Zt,fe),Et||(Zt=fe=null)):!Et&&vt.trailing!==!1&&(Et=setTimeout(gr,Hi)),Ce};return vr.cancel=function(){clearTimeout(Et),Ze=0,Et=Zt=fe=null},vr},Dl=function(I){return wt(I)?Array.prototype.slice.call(I):[]},ui={},Pl=function(I){return I=I||"g",ui[I]?ui[I]+=1:ui[I]=1,I+ui[I]},No=function(){};function zo(I){return p(I)?0:wt(I)?I.length:Object.keys(I).length}var Gi=J(70655),Ar,Zr=To(function(I,$){$===void 0&&($={});var vt=$.fontSize,Et=$.fontFamily,Zt=$.fontWeight,fe=$.fontStyle,Ce=$.fontVariant;return Ar||(Ar=document.createElement("canvas").getContext("2d")),Ar.font=[fe,Ce,Zt,vt+"px",Et].join(" "),Ar.measureText(Q(I)?I:"").width},function(I,$){return $===void 0&&($={}),(0,Gi.pr)([I],zt($)).join("")}),In=function(I,$,vt,Et){Et===void 0&&(Et="...");var Zt=16,fe=Zr(Et,vt),Ce=Q(I)?I:ue(I),Ze=$,gr=[],vr,lr;if(Zr(I,vt)<=$)return I;for(;vr=Ce.substr(0,Zt),lr=Zr(vr,vt),!(lr+fe>Ze&&lr>Ze);)if(gr.push(vr),Ze-=lr,Ce=Ce.substr(Zt),!Ce)return gr.join("");for(;vr=Ce.substr(0,1),lr=Zr(vr,vt),!(lr+fe>Ze);)if(gr.push(vr),Ze-=lr,Ce=Ce.substr(1),!Ce)return gr.join("");return""+gr.join("")+Et},tn=function(){function I(){this.map={}}return I.prototype.has=function($){return this.map[$]!==void 0},I.prototype.get=function($,vt){var Et=this.map[$];return Et===void 0?vt:Et},I.prototype.set=function($,vt){this.map[$]=vt},I.prototype.clear=function(){this.map={}},I.prototype.delete=function($){delete this.map[$]},I.prototype.size=function(){return Object.keys(this.map).length},I}(),ci=tn},31808:function(Ee,te,J){"use strict";J.d(te,{jD:function(){return wt},fk:function(){return Bt}});var ct=J(98924),wt=function(){return(0,ct.Z)()&&window.document.documentElement},Kt,Bt=function(){if(!wt())return!1;if(Kt!==void 0)return Kt;var ot=document.createElement("div");return ot.style.display="flex",ot.style.flexDirection="column",ot.style.rowGap="1px",ot.appendChild(document.createElement("div")),ot.appendChild(document.createElement("div")),document.body.appendChild(ot),Kt=ot.scrollHeight===1,document.body.removeChild(ot),Kt}},56645:function(Ee,te){(function(J,ct){ct(te)})(this,function(J){"use strict";function ct(st,G){return wt(st)||Kt(st,G)||Bt()}function wt(st){if(Array.isArray(st))return st}function Kt(st,G){var nt=[],j=!0,X=!1,Z=void 0;try{for(var S=st[Symbol.iterator](),P;!(j=(P=S.next()).done)&&(nt.push(P.value),!(G&&nt.length===G));j=!0);}catch(pt){X=!0,Z=pt}finally{try{!j&&S.return!=null&&S.return()}finally{if(X)throw Z}}return nt}function Bt(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function It(st,G,nt,j){st=st.filter(function(U,D){var at=G(U,D),ft=nt(U,D);return at!=null&&isFinite(at)&&ft!=null&&isFinite(ft)}),j&&st.sort(function(U,D){return G(U)-G(D)});for(var X=st.length,Z=new Float64Array(X),S=new Float64Array(X),P=0,pt=0,Ot,it,yt,M=0;MX&&(it.splice(O+1,0,ft),M=!0)}return M}}function Nt(st,G,nt,j){var X=j-st*st,Z=Math.abs(X)<1e-24?0:(nt-st*G)/X,S=G-Z*st;return[S,Z]}function _t(){var st=function(Z){return Z[0]},G=function(Z){return Z[1]},nt;function j(X){var Z=0,S=0,P=0,pt=0,Ot=0,it=0,yt=nt?+nt[0]:Infinity,M=nt?+nt[1]:-Infinity;ot(X,st,G,function(E,w){var T=Math.log(w),F=E*w;++Z,S+=(w-S)/Z,pt+=(F-pt)/Z,it+=(E*F-it)/Z,P+=(w*T-P)/Z,Ot+=(F*T-Ot)/Z,nt||(EM&&(M=E))});var O=Nt(pt/S,P/S,Ot/S,it/S),U=ct(O,2),D=U[0],at=U[1];D=Math.exp(D);var ft=function(w){return D*Math.exp(at*w)},L=jt(yt,M,ft);return L.a=D,L.b=at,L.predict=ft,L.rSquared=ut(X,st,G,S,ft),L}return j.domain=function(X){return arguments.length?(nt=X,j):nt},j.x=function(X){return arguments.length?(st=X,j):st},j.y=function(X){return arguments.length?(G=X,j):G},j}function bt(){var st=function(Z){return Z[0]},G=function(Z){return Z[1]},nt;function j(X){var Z=0,S=0,P=0,pt=0,Ot=0,it=nt?+nt[0]:Infinity,yt=nt?+nt[1]:-Infinity;ot(X,st,G,function(L,E){++Z,S+=(L-S)/Z,P+=(E-P)/Z,pt+=(L*E-pt)/Z,Ot+=(L*L-Ot)/Z,nt||(Lyt&&(yt=L))});var M=Nt(S,P,pt,Ot),O=ct(M,2),U=O[0],D=O[1],at=function(E){return D*E+U},ft=[[it,at(it)],[yt,at(yt)]];return ft.a=D,ft.b=U,ft.predict=at,ft.rSquared=ut(X,st,G,P,at),ft}return j.domain=function(X){return arguments.length?(nt=X,j):nt},j.x=function(X){return arguments.length?(st=X,j):st},j.y=function(X){return arguments.length?(G=X,j):G},j}function p(st){st.sort(function(nt,j){return nt-j});var G=st.length/2;return G%1==0?(st[G-1]+st[G])/2:st[Math.floor(G)]}var c=2,tt=1e-12;function K(){var st=function(Z){return Z[0]},G=function(Z){return Z[1]},nt=.3;function j(X){for(var Z=It(X,st,G,!0),S=ct(Z,4),P=S[0],pt=S[1],Ot=S[2],it=S[3],yt=P.length,M=Math.max(2,~~(nt*yt)),O=new Float64Array(yt),U=new Float64Array(yt),D=new Float64Array(yt).fill(1),at=-1;++at<=c;){for(var ft=[0,M-1],L=0;LP[T]-E?w:T,N=0,k=0,q=0,Q=0,Tt=0,qt=1/Math.abs(P[F]-E||1),Wt=w;Wt<=T;++Wt){var ne=P[Wt],$t=pt[Wt],Yt=Ct(Math.abs(E-ne)*qt)*D[Wt],R=ne*Yt;N+=Yt,k+=R,q+=$t*Yt,Q+=$t*R,Tt+=ne*R}var Y=Nt(k/N,q/N,Q/N,Tt/N),et=ct(Y,2),dt=et[0],Rt=et[1];O[L]=dt+Rt*E,U[L]=Math.abs(pt[L]-O[L]),Mt(P,L+1,ft)}if(at===c)break;var Ht=p(U);if(Math.abs(Ht)=1?tt:(Pt=1-Ut*Ut)*Pt}return z(P,O,Ot,it)}return j.bandwidth=function(X){return arguments.length?(nt=X,j):nt},j.x=function(X){return arguments.length?(st=X,j):st},j.y=function(X){return arguments.length?(G=X,j):G},j}function Ct(st){return(st=1-st*st*st)*st*st}function Mt(st,G,nt){var j=st[G],X=nt[0],Z=nt[1]+1;if(!(Z>=st.length))for(;G>X&&st[Z]-j<=j-st[X];)nt[0]=++X,nt[1]=Z,++Z}function z(st,G,nt,j){for(var X=st.length,Z=[],S=0,P=0,pt=[],Ot;SM&&(M=w))});var U=Nt(P,pt,Ot,it),D=ct(U,2),at=D[0],ft=D[1],L=function(T){return ft*Math.log(T)/O+at},E=jt(yt,M,L);return E.a=ft,E.b=at,E.predict=L,E.rSquared=ut(Z,st,G,pt,L),E}return X.domain=function(Z){return arguments.length?(j=Z,X):j},X.x=function(Z){return arguments.length?(st=Z,X):st},X.y=function(Z){return arguments.length?(G=Z,X):G},X.base=function(Z){return arguments.length?(nt=Z,X):nt},X}function gt(){var st=function(Z){return Z[0]},G=function(Z){return Z[1]},nt;function j(X){var Z=It(X,st,G),S=ct(Z,4),P=S[0],pt=S[1],Ot=S[2],it=S[3],yt=P.length,M=0,O=0,U=0,D=0,at=0,ft,L,E,w;for(ft=0;ftk&&(k=Yt))});var q=U-M*M,Q=M*q-O*O,Tt=(at*M-D*O)/Q,qt=(D*q-at*O)/Q,Wt=-Tt*M,ne=function(R){return R=R-Ot,Tt*R*R+qt*R+Wt+it},$t=jt(N,k,ne);return $t.a=Tt,$t.b=qt-2*Tt*Ot,$t.c=Wt-qt*Ot+Tt*Ot*Ot+it,$t.predict=ne,$t.rSquared=ut(X,st,G,T,ne),$t}return j.domain=function(X){return arguments.length?(nt=X,j):nt},j.x=function(X){return arguments.length?(st=X,j):st},j.y=function(X){return arguments.length?(G=X,j):G},j}function At(){var st=function(S){return S[0]},G=function(S){return S[1]},nt=3,j;function X(Z){if(nt===1){var S=bt().x(st).y(G).domain(j)(Z);return S.coefficients=[S.b,S.a],delete S.a,delete S.b,S}if(nt===2){var P=gt().x(st).y(G).domain(j)(Z);return P.coefficients=[P.c,P.b,P.a],delete P.a,delete P.b,delete P.c,P}var pt=It(Z,st,G),Ot=ct(pt,4),it=Ot[0],yt=Ot[1],M=Ot[2],O=Ot[3],U=it.length,D=[],at=[],ft=nt+1,L=0,E=0,w=j?+j[0]:Infinity,T=j?+j[1]:-Infinity;ot(Z,st,G,function(ne,$t){++E,L+=($t-L)/E,j||(neT&&(T=ne))});var F,N,k,q,Q;for(F=0;F=0;--Z)for(P=G[Z],pt=1,X[Z]+=P,S=1;S<=Z;++S)pt*=(Z+1-S)/S,X[Z-S]+=P*Math.pow(nt,S)*pt;return X[0]+=j,X}function Vt(st){var G=st.length-1,nt=[],j,X,Z,S,P;for(j=0;jMath.abs(st[j][S])&&(S=X);for(Z=j;Z=j;Z--)st[Z][X]-=st[Z][j]*st[j][X]/st[j][j]}for(X=G-1;X>=0;--X){for(P=0,Z=X+1;ZM&&(M=E))});var O=Nt(S,P,pt,Ot),U=ct(O,2),D=U[0],at=U[1];D=Math.exp(D);var ft=function(w){return D*Math.pow(w,at)},L=jt(yt,M,ft);return L.a=D,L.b=at,L.predict=ft,L.rSquared=ut(X,st,G,it,ft),L}return j.domain=function(X){return arguments.length?(nt=X,j):nt},j.x=function(X){return arguments.length?(st=X,j):st},j.y=function(X){return arguments.length?(G=X,j):G},j}J.regressionExp=_t,J.regressionLinear=bt,J.regressionLoess=K,J.regressionLog=W,J.regressionPoly=At,J.regressionPow=re,J.regressionQuad=gt,Object.defineProperty(J,"__esModule",{value:!0})})},43631:function(Ee,te,J){"use strict";J.d(te,{qY:function(){return bt}});var ct=J(34155),wt=function(z,W,gt){if(gt||arguments.length===2)for(var At=0,Lt=W.length,Vt;At0)throw"Initial bisect points must have opposite signs";if(Mt===0)return p;if(z===0)return c;for(var gt=0;gt=0&&(p=At),Math.abs(W)=st[re-1].fx){var O=!1;if(S.fx>M.fx?(ut(P,1+At,Z,-At,M),P.fx=bt(P),P.fx=1)break;for(G=1;Gz+Ct*K*W||gt>=j)nt=K;else{if(Math.abs(Lt)<=-Mt*W)return K;Lt*(nt-G)>=0&&(nt=G),G=K,j=gt}return 0}for(var st=0;st<10;++st){if(ut(tt.x,1,c.x,K,p),gt=tt.fx=bt(tt.x,tt.fxprime),Lt=Bt(tt.fxprime,p),gt>z+Ct*K*W||st&>>=At)return re(Vt,K,At);if(Math.abs(Lt)<=-Mt*W)return K;if(Lt>=0)return re(K,Vt,gt);At=gt,Vt=K,K*=2}return K}function jt(bt,p,c){var tt={x:p.slice(),fx:0,fxprime:p.slice()},K={x:p.slice(),fx:0,fxprime:p.slice()},Ct=p.slice(),Mt,z,W=1,gt;c=c||{},gt=c.maxIterations||p.length*20,tt.fx=bt(tt.x,tt.fxprime),Mt=tt.fxprime.slice(),ot(Mt,tt.fxprime,-1);for(var At=0;At0&&(k=1/Math.sqrt(k)),w[0]=T[0]*k,w[1]=T[1]*k,w}function Vt(w,T){return w[0]*T[0]+w[1]*T[1]}function re(w,T,F){var N=T[0]*F[1]-T[1]*F[0];return w[0]=w[1]=0,w[2]=N,w}function st(w,T,F,N){var k=T[0],q=T[1];return w[0]=k+N*(F[0]-k),w[1]=q+N*(F[1]-q),w}function G(w,T){T=T||1;var F=glMatrix.RANDOM()*2*Math.PI;return w[0]=Math.cos(F)*T,w[1]=Math.sin(F)*T,w}function nt(w,T,F){var N=T[0],k=T[1];return w[0]=F[0]*N+F[2]*k,w[1]=F[1]*N+F[3]*k,w}function j(w,T,F){var N=T[0],k=T[1];return w[0]=F[0]*N+F[2]*k+F[4],w[1]=F[1]*N+F[3]*k+F[5],w}function X(w,T,F){var N=T[0],k=T[1];return w[0]=F[0]*N+F[3]*k+F[6],w[1]=F[1]*N+F[4]*k+F[7],w}function Z(w,T,F){var N=T[0],k=T[1];return w[0]=F[0]*N+F[4]*k+F[12],w[1]=F[1]*N+F[5]*k+F[13],w}function S(w,T,F,N){var k=T[0]-F[0],q=T[1]-F[1],Q=Math.sin(N),Tt=Math.cos(N);return w[0]=k*Tt-q*Q+F[0],w[1]=k*Q+q*Tt+F[1],w}function P(w,T){var F=w[0],N=w[1],k=T[0],q=T[1],Q=Math.sqrt(F*F+N*N)*Math.sqrt(k*k+q*q),Tt=Q&&(F*k+N*q)/Q;return Math.acos(Math.min(Math.max(Tt,-1),1))}function pt(w){return w[0]=0,w[1]=0,w}function Ot(w){return"vec2("+w[0]+", "+w[1]+")"}function it(w,T){return w[0]===T[0]&&w[1]===T[1]}function yt(w,T){var F=w[0],N=w[1],k=T[0],q=T[1];return Math.abs(F-k)<=glMatrix.EPSILON*Math.max(1,Math.abs(F),Math.abs(k))&&Math.abs(N-q)<=glMatrix.EPSILON*Math.max(1,Math.abs(N),Math.abs(q))}var M=null,O=mt,U=null,D=null,at=null,ft=null,L=null,E=function(){var w=wt();return function(T,F,N,k,q,Q){var Tt,qt;for(F||(F=2),N||(N=0),k?qt=Math.min(k*F+N,T.length):qt=T.length,Tt=N;Tt=K.length)){var nt=Math.max(G-Nt,0),j=G,X=Math.min(G+Nt,K.length-1),Z=nt-(G-Nt),S=G+Nt-X,P=z[-Nt-1+Z]||0,pt=z[-Nt-1+S]||0,Ot=W/(W-P-pt);Z>0&&(At+=Ot*(Z-1)*gt);var it=Math.max(0,G-Nt+1);It.inside(0,K.length-1,it)&&(K[it].y+=Ot*1*gt),It.inside(0,K.length-1,j+1)&&(K[j+1].y-=Ot*2*gt),It.inside(0,K.length-1,X+1)&&(K[X+1].y+=Ot*1*gt)}});var Lt=At,Vt=0,re=0;return K.forEach(function(st){Vt+=st.y,Lt+=Vt,st.y=Lt,re+=Lt}),re>0&&K.forEach(function(st){st.y/=re}),K};function ut(mt,St){for(var jt={},Nt=0,_t=-St;_t<=St;_t++)Nt+=mt(_t/St),jt[_t]=Nt;return jt}Ee.exports.getExpectedValueFromPdf=function(mt){if(!(!mt||mt.length===0)){var St=0;return mt.forEach(function(jt){St+=jt.x*jt.y}),St}},Ee.exports.getXWithLeftTailArea=function(mt,St){if(!(!mt||mt.length===0)){for(var jt=0,Nt=0,_t=0;_t=St));_t++);return mt[Nt].x}},Ee.exports.getPerplexity=function(mt){if(!(!mt||mt.length===0)){var St=0;return mt.forEach(function(jt){var Nt=Math.log(jt.y);isFinite(Nt)&&(St+=jt.y*Nt)}),St=-St/Kt,Math.pow(2,St)}}},74204:function(Ee,te,J){"use strict";J.d(te,{Z:function(){return wt},o:function(){return Bt}});var ct;function wt(It){if(typeof document=="undefined")return 0;if(It||ct===void 0){var ot=document.createElement("div");ot.style.width="100%",ot.style.height="200px";var ut=document.createElement("div"),mt=ut.style;mt.position="absolute",mt.top="0",mt.left="0",mt.pointerEvents="none",mt.visibility="hidden",mt.width="200px",mt.height="150px",mt.overflow="hidden",ut.appendChild(ot),document.body.appendChild(ut);var St=ot.offsetWidth;ut.style.overflow="scroll";var jt=ot.offsetWidth;St===jt&&(jt=ut.clientWidth),document.body.removeChild(ut),ct=St-jt}return ct}function Kt(It){var ot=It.match(/^(.*)px$/),ut=Number(ot==null?void 0:ot[1]);return Number.isNaN(ut)?wt():ut}function Bt(It){if(typeof document=="undefined"||!It||!(It instanceof Element))return{width:0,height:0};var ot=getComputedStyle(It,"::-webkit-scrollbar"),ut=ot.width,mt=ot.height;return{width:Kt(ut),height:Kt(mt)}}},55168:function(Ee,te){"use strict";Object.defineProperty(te,"__esModule",{value:!0}),te.SensorTabIndex=te.SensorClassName=te.SizeSensorId=void 0;var J="size-sensor-id";te.SizeSensorId=J;var ct="size-sensor-object";te.SensorClassName=ct;var wt="-1";te.SensorTabIndex=wt},12177:function(Ee,te){"use strict";Object.defineProperty(te,"__esModule",{value:!0}),te.default=void 0;var J=function(wt){var Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,Bt=null;return function(){for(var It=this,ot=arguments.length,ut=new Array(ot),mt=0;mt=0;pt--)(P=G[pt])&&(S=(Z<3?P(S):Z>3?P(nt,j,S):P(nt,j))||S);return Z>3&&S&&Object.defineProperty(nt,j,S),S}function ot(G,nt){return function(j,X){nt(j,X,G)}}function ut(G,nt){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(G,nt)}function mt(G,nt,j,X){function Z(S){return S instanceof j?S:new j(function(P){P(S)})}return new(j||(j=Promise))(function(S,P){function pt(yt){try{it(X.next(yt))}catch(M){P(M)}}function Ot(yt){try{it(X.throw(yt))}catch(M){P(M)}}function it(yt){yt.done?S(yt.value):Z(yt.value).then(pt,Ot)}it((X=X.apply(G,nt||[])).next())})}function St(G,nt){var j={label:0,sent:function(){if(S[0]&1)throw S[1];return S[1]},trys:[],ops:[]},X,Z,S,P;return P={next:pt(0),throw:pt(1),return:pt(2)},typeof Symbol=="function"&&(P[Symbol.iterator]=function(){return this}),P;function pt(it){return function(yt){return Ot([it,yt])}}function Ot(it){if(X)throw new TypeError("Generator is already executing.");for(;P&&(P=0,it[0]&&(j=0)),j;)try{if(X=1,Z&&(S=it[0]&2?Z.return:it[0]?Z.throw||((S=Z.return)&&S.call(Z),0):Z.next)&&!(S=S.call(Z,it[1])).done)return S;switch(Z=0,S&&(it=[it[0]&2,S.value]),it[0]){case 0:case 1:S=it;break;case 4:return j.label++,{value:it[1],done:!1};case 5:j.label++,Z=it[1],it=[0];continue;case 7:it=j.ops.pop(),j.trys.pop();continue;default:if(S=j.trys,!(S=S.length>0&&S[S.length-1])&&(it[0]===6||it[0]===2)){j=0;continue}if(it[0]===3&&(!S||it[1]>S[0]&&it[1]=G.length&&(G=void 0),{value:G&&G[X++],done:!G}}};throw new TypeError(nt?"Object is not iterable.":"Symbol.iterator is not defined.")}function bt(G,nt){var j=typeof Symbol=="function"&&G[Symbol.iterator];if(!j)return G;var X=j.call(G),Z,S=[],P;try{for(;(nt===void 0||nt-- >0)&&!(Z=X.next()).done;)S.push(Z.value)}catch(pt){P={error:pt}}finally{try{Z&&!Z.done&&(j=X.return)&&j.call(X)}finally{if(P)throw P.error}}return S}function p(){for(var G=[],nt=0;nt1||pt(O,U)})})}function pt(O,U){try{Ot(X[O](U))}catch(D){M(S[0][3],D)}}function Ot(O){O.value instanceof K?Promise.resolve(O.value.v).then(it,yt):M(S[0][2],O)}function it(O){pt("next",O)}function yt(O){pt("throw",O)}function M(O,U){O(U),S.shift(),S.length&&pt(S[0][0],S[0][1])}}function Mt(G){var nt,j;return nt={},X("next"),X("throw",function(Z){throw Z}),X("return"),nt[Symbol.iterator]=function(){return this},nt;function X(Z,S){nt[Z]=G[Z]?function(P){return(j=!j)?{value:K(G[Z](P)),done:Z==="return"}:S?S(P):P}:S}}function z(G){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var nt=G[Symbol.asyncIterator],j;return nt?nt.call(G):(G=typeof _t=="function"?_t(G):G[Symbol.iterator](),j={},X("next"),X("throw"),X("return"),j[Symbol.asyncIterator]=function(){return this},j);function X(S){j[S]=G[S]&&function(P){return new Promise(function(pt,Ot){P=G[S](P),Z(pt,Ot,P.done,P.value)})}}function Z(S,P,pt,Ot){Promise.resolve(Ot).then(function(it){S({value:it,done:pt})},P)}}function W(G,nt){return Object.defineProperty?Object.defineProperty(G,"raw",{value:nt}):G.raw=nt,G}var gt=Object.create?function(G,nt){Object.defineProperty(G,"default",{enumerable:!0,value:nt})}:function(G,nt){G.default=nt};function At(G){if(G&&G.__esModule)return G;var nt={};if(G!=null)for(var j in G)j!=="default"&&Object.prototype.hasOwnProperty.call(G,j)&&jt(nt,G,j);return gt(nt,G),nt}function Lt(G){return G&&G.__esModule?G:{default:G}}function Vt(G,nt,j,X){if(j==="a"&&!X)throw new TypeError("Private accessor was defined without a getter");if(typeof nt=="function"?G!==nt||!X:!nt.has(G))throw new TypeError("Cannot read private member from an object whose class did not declare it");return j==="m"?X:j==="a"?X.call(G):X?X.value:nt.get(G)}function re(G,nt,j,X,Z){if(X==="m")throw new TypeError("Private method is not writable");if(X==="a"&&!Z)throw new TypeError("Private accessor was defined without a setter");if(typeof nt=="function"?G!==nt||!Z:!nt.has(G))throw new TypeError("Cannot write private member to an object whose class did not declare it");return X==="a"?Z.call(G,j):Z?Z.value=j:nt.set(G,j),j}function st(G,nt){if(nt===null||typeof nt!="object"&&typeof nt!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof G=="function"?nt===G:G.has(nt)}}}]);