Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

69 linhas
715 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7679],{64183:function(Pt,st,M){"use strict";var B=M(67294),it=M(47663),wt=M(29640),_t=M(79360),ft=M(24770),ct=M(80803),et=function(g,h){var J={};for(var E in g)Object.prototype.hasOwnProperty.call(g,E)&&h.indexOf(E)<0&&(J[E]=g[E]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var N=0,E=Object.getOwnPropertySymbols(g);N<E.length;N++)h.indexOf(E[N])<0&&Object.prototype.propertyIsEnumerable.call(g,E[N])&&(J[E[N]]=g[E[N]]);return J},K=(0,B.forwardRef)(function(g,h){var J=g.chartRef,E=g.style,N=E===void 0?{height:"inherit"}:E,$=g.className,L=g.loading,X=g.loadingTemplate,ot=g.errorTemplate,ht=et(g,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),bt=(0,wt.Z)(it.uN,ht),rt=bt.chart,Mt=bt.container;return(0,B.useEffect)(function(){(0,_t.J)(J,rt.current)},[rt.current]),(0,B.useImperativeHandle)(h,function(){return{getChart:function(){return rt.current}}}),B.createElement(ft.Z,{errorTemplate:ot},L&&B.createElement(ct.Z,{loadingTemplate:X,theme:g.theme}),B.createElement("div",{className:$,style:N,ref:Mt}))});st.Z=K},78677:function(Pt,st,M){"use strict";var B=M(67294),it=M(47663),wt=M(29640),_t=M(79360),ft=M(24770),ct=M(80803),et=function(g,h){var J={};for(var E in g)Object.prototype.hasOwnProperty.call(g,E)&&h.indexOf(E)<0&&(J[E]=g[E]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var N=0,E=Object.getOwnPropertySymbols(g);N<E.length;N++)h.indexOf(E[N])<0&&Object.prototype.propertyIsEnumerable.call(g,E[N])&&(J[E[N]]=g[E[N]]);return J},K=(0,B.forwardRef)(function(g,h){var J=g.chartRef,E=g.style,N=E===void 0?{height:"inherit"}:E,$=g.className,L=g.loading,X=g.loadingTemplate,ot=g.errorTemplate,ht=et(g,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),bt=(0,wt.Z)(it.sg,ht),rt=bt.chart,Mt=bt.container;return(0,B.useEffect)(function(){(0,_t.J)(J,rt.current)},[rt.current]),(0,B.useImperativeHandle)(h,function(){return{getChart:function(){return rt.current}}}),B.createElement(ft.Z,{errorTemplate:ot},L&&B.createElement(ct.Z,{loadingTemplate:X,theme:g.theme}),B.createElement("div",{className:$,style:N,ref:Mt}))});st.Z=K},80652:function(Pt,st,M){"use strict";var B=M(67294),it=M(47663),wt=M(29640),_t=M(79360),ft=M(24770),ct=M(80803),et=function(g,h){var J={};for(var E in g)Object.prototype.hasOwnProperty.call(g,E)&&h.indexOf(E)<0&&(J[E]=g[E]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var N=0,E=Object.getOwnPropertySymbols(g);N<E.length;N++)h.indexOf(E[N])<0&&Object.prototype.propertyIsEnumerable.call(g,E[N])&&(J[E[N]]=g[E[N]]);return J},K=(0,B.forwardRef)(function(g,h){var J=g.chartRef,E=g.style,N=E===void 0?{height:"inherit"}:E,$=g.className,L=g.loading,X=g.loadingTemplate,ot=g.errorTemplate,ht=et(g,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),bt=(0,wt.Z)(it.x1,ht),rt=bt.chart,Mt=bt.container;return(0,B.useEffect)(function(){(0,_t.J)(J,rt.current)},[rt.current]),(0,B.useImperativeHandle)(h,function(){return{getChart:function(){return rt.current}}}),B.createElement(ft.Z,{errorTemplate:ot},L&&B.createElement(ct.Z,{loadingTemplate:X,theme:g.theme}),B.createElement("div",{className:$,style:N,ref:Mt}))});st.Z=K},63430:function(Pt,st,M){"use strict";var B=M(67294),it=M(47663),wt=M(29640),_t=M(79360),ft=M(24770),ct=M(80803),et=function(g,h){var J={};for(var E in g)Object.prototype.hasOwnProperty.call(g,E)&&h.indexOf(E)<0&&(J[E]=g[E]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var N=0,E=Object.getOwnPropertySymbols(g);N<E.length;N++)h.indexOf(E[N])<0&&Object.prototype.propertyIsEnumerable.call(g,E[N])&&(J[E[N]]=g[E[N]]);return J},K=(0,B.forwardRef)(function(g,h){var J=g.chartRef,E=g.style,N=E===void 0?{height:"inherit"}:E,$=g.className,L=g.loading,X=g.loadingTemplate,ot=g.errorTemplate,ht=et(g,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),bt=(0,wt.Z)(it.by,ht),rt=bt.chart,Mt=bt.container;return(0,B.useEffect)(function(){(0,_t.J)(J,rt.current)},[rt.current]),(0,B.useImperativeHandle)(h,function(){return{getChart:function(){return rt.current}}}),B.createElement(ft.Z,{errorTemplate:ot},L&&B.createElement(ct.Z,{loadingTemplate:X,theme:g.theme}),B.createElement("div",{className:$,style:N,ref:Mt}))});st.Z=K},24770:function(Pt,st,M){"use strict";var B=M(67294),it=function(){var _t=function(ft,ct){return _t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(et,K){et.__proto__=K}||function(et,K){for(var g in K)Object.prototype.hasOwnProperty.call(K,g)&&(et[g]=K[g])},_t(ft,ct)};return function(ft,ct){if(typeof ct!="function"&&ct!==null)throw new TypeError("Class extends value "+String(ct)+" is not a constructor or null");_t(ft,ct);function et(){this.constructor=ft}ft.prototype=ct===null?Object.create(ct):(et.prototype=ct.prototype,new et)}}(),wt=function(_t){it(ft,_t);function ft(){var ct=_t!==null&&_t.apply(this,arguments)||this;return ct.state={hasError:!1},ct.renderError=function(et){var K=ct.props.errorTemplate;switch(et){default:return typeof K=="function"?K(et):K||B.createElement("h5",null,"\u7EC4\u4EF6\u51FA\u9519\u4E86\uFF0C\u8BF7\u6838\u67E5\u540E\u91CD\u8BD5\uFF1A ",et.message)}},ct}return ft.getDerivedStateFromError=function(ct){return{hasError:!0,error:ct}},ft.getDerivedStateFromProps=function(ct,et){return et.children!==ct.children?{children:ct.children,hasError:!1,error:void 0}:null},ft.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):B.createElement(B.Fragment,null,this.props.children)},ft}(B.Component);st.Z=wt},29640:function(Pt,st,M){"use strict";M.d(st,{Z:function(){return St}});var B=M(67294),it=M(49242),wt=M(73935),_t=M.t(wt,2),ft=function(){return ft=Object.assign||function(W){for(var H,z=1,Q=arguments.length;z<Q;z++){H=arguments[z];for(var nt in H)Object.prototype.hasOwnProperty.call(H,nt)&&(W[nt]=H[nt])}return W},ft.apply(this,arguments)},ct=function(W,H,z,Q){function nt(U){return U instanceof z?U:new z(function(It){It(U)})}return new(z||(z=Promise))(function(U,It){function Tt(Ct){try{lt(Q.next(Ct))}catch(gt){It(gt)}}function Ft(Ct){try{lt(Q.throw(Ct))}catch(gt){It(gt)}}function lt(Ct){Ct.done?U(Ct.value):nt(Ct.value).then(Tt,Ft)}lt((Q=Q.apply(W,H||[])).next())})},et=function(W,H){var z={label:0,sent:function(){if(U[0]&1)throw U[1];return U[1]},trys:[],ops:[]},Q,nt,U,It;return It={next:Tt(0),throw:Tt(1),return:Tt(2)},typeof Symbol=="function"&&(It[Symbol.iterator]=function(){return this}),It;function Tt(lt){return function(Ct){return Ft([lt,Ct])}}function Ft(lt){if(Q)throw new TypeError("Generator is already executing.");for(;It&&(It=0,lt[0]&&(z=0)),z;)try{if(Q=1,nt&&(U=lt[0]&2?nt.return:lt[0]?nt.throw||((U=nt.return)&&U.call(nt),0):nt.next)&&!(U=U.call(nt,lt[1])).done)return U;switch(nt=0,U&&(lt=[lt[0]&2,U.value]),lt[0]){case 0:case 1:U=lt;break;case 4:return z.label++,{value:lt[1],done:!1};case 5:z.label++,nt=lt[1],lt=[0];continue;case 7:lt=z.ops.pop(),z.trys.pop();continue;default:if(U=z.trys,!(U=U.length>0&&U[U.length-1])&&(lt[0]===6||lt[0]===2)){z=0;continue}if(lt[0]===3&&(!U||lt[1]>U[0]&&lt[1]<U[3])){z.label=lt[1];break}if(lt[0]===6&&z.label<U[1]){z.label=U[1],U=lt;break}if(U&&z.label<U[2]){z.label=U[2],z.ops.push(lt);break}U[2]&&z.ops.pop(),z.trys.pop();continue}lt=H.call(W,z)}catch(Ct){lt=[6,Ct],nt=0}finally{Q=U=0}if(lt[0]&5)throw lt[1];return{value:lt[0]?lt[1]:void 0,done:!0}}},K=ft({},_t),g=K.version,h=K.render,J=K.unmountComponentAtNode,E;try{var N=Number((g||"").split(".")[0]);N>=18&&(E=K.createRoot)}catch(W){}function $(W){var H=K.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;H&&typeof H=="object"&&(H.usingClientEntryPoint=W)}var L="__rc_react_root__";function X(W,H){$(!0);var z=H[L]||E(H);$(!1),z.render(W),H[L]=z}function ot(W,H){h(W,H)}function ht(W,H){}function bt(W,H){if(E){X(W,H);return}ot(W,H)}function rt(W){return ct(this,void 0,void 0,function(){return et(this,function(H){return[2,Promise.resolve().then(function(){var z;(z=W[L])===null||z===void 0||z.unmount(),delete W[L]})]})})}function Mt(W){J(W)}function zt(W){}function qt(W){return ct(this,void 0,void 0,function(){return et(this,function(H){return E!==void 0?[2,rt(W)]:(Mt(W),[2])})})}var Yt=new Map,se=function(W,H,z){var Q=document.createElement("div");return H==="tooltip"&&(Q.setAttribute("data-uuid",z),Yt.has(z)?Q=Yt.get(z):Yt.set(z,Q),Q.className="g2-tooltip"),bt(W,Q),Q},jt=se,T=function(W,H){var z={}.toString;return z.call(W)==="[object ".concat(H,"]")},k=function(W){if(!W)return W;var H={};for(var z in W)H[z]=W[z];return H},tt=function(W){return Object.prototype.toString.call(W).slice(8,-1)},Y=function(W){if(!W||typeof W!="object")return W;var H;return Array.isArray(W)?H=W.map(function(z){return Y(z)}):(H={},Object.keys(W).forEach(function(z){return H[z]=Y(W[z])})),H},R=function(W,H){for(var z=W,Q=0;Q<H.length;Q+=1)if(z==null?void 0:z[H[Q]])z=z[H[Q]];else{z=void 0;break}return z},D=function(W,H,z){if(!W)return W;var Q=W;return H.forEach(function(nt,U){U<H.length-1?Q=Q[nt]:Q[nt]=z}),W},j=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(W){var H=Math.random()*16|0,z=W=="x"?H:H&3|8;return z.toString(16)})},q=function(){return q=Object.assign||function(W){for(var H,z=1,Q=arguments.length;z<Q;z++){H=arguments[z];for(var nt in H)Object.prototype.hasOwnProperty.call(H,nt)&&(W[nt]=H[nt])}return W},q.apply(this,arguments)},dt=function(W,H){var z={};for(var Q in W)Object.prototype.hasOwnProperty.call(W,Q)&&H.indexOf(Q)<0&&(z[Q]=W[Q]);if(W!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,Q=Object.getOwnPropertySymbols(W);nt<Q.length;nt++)H.indexOf(Q[nt])<0&&Object.prototype.propertyIsEnumerable.call(W,Q[nt])&&(z[Q[nt]]=W[Q[nt]]);return z};function St(W,H){var z=(0,B.useRef)(),Q=(0,B.useRef)(),nt=(0,B.useRef)(null),U=H.onReady,It=H.onEvent,Tt=function(gt,Rt){var Ut;return gt===void 0&&(gt="image/png"),(Ut=z.current)===null||Ut===void 0?void 0:Ut.chart.canvas.cfg.el.toDataURL(gt,Rt)},Ft=function(gt,Rt,Ut){var te;gt===void 0&&(gt="download"),Rt===void 0&&(Rt="image/png");var ae=gt;gt.indexOf(".")===-1&&(ae="".concat(gt,".").concat(Rt.split("/")[1]));var we=(te=z.current)===null||te===void 0?void 0:te.chart.canvas.cfg.el.toDataURL(Rt,Ut),re=document.createElement("a");return re.href=we,re.download=ae,document.body.appendChild(re),re.click(),document.body.removeChild(re),re=null,ae},lt=function(gt,Rt,Ut,te){var ae=R(gt,Rt);D(gt,Rt,function(){for(var we=[],re=0;re<arguments.length;re++)we[re]=arguments[re];var xe=T(ae,"Function")?ae.apply(void 0,we):ae;return T(xe,"String")||T(xe,"Number")||T(xe,"HTMLDivElement")?xe:jt(xe,Ut,te)})},Ct=function(){var gt=j();R(H,["statistic","content","customHtml"])&&lt(H,["statistic","content","customHtml"]),R(H,["statistic","title","customHtml"])&&lt(H,["statistic","title","customHtml"]),typeof H.tooltip=="object"&&(R(H,["tooltip","container"])&&lt(H,["tooltip","container"],"tooltip",gt),R(H,["tooltip","customContent"])&&lt(H,["tooltip","customContent"],"tooltip",gt))};return(0,B.useEffect)(function(){if(z.current&&!(0,it.isEqual)(Q.current,H)){var gt=!1;if(Q.current){var Rt=Q.current,Ut=Rt.data,te=Rt.value,ae=Rt.percent,we=dt(Rt,["data","value","percent"]),re=H.data,xe=H.value,Se=H.percent,_e=dt(H,["data","value","percent"]);gt=(0,it.isEqual)(we,_e)}if(Q.current=Y(H),gt&&(0,it.get)(H,"chartType")!=="Mix"){var ce="data",ve=["percent"],de=Object.keys(H);ve.forEach(function(Te){de.includes(Te)&&(ce=Te)}),z.current.changeData((H==null?void 0:H[ce])||[]),z.current.render()}else Ct(),z.current.update(H)}},[H]),(0,B.useEffect)(function(){if(!nt.current)return function(){return null};Q.current||(Q.current=Y(H)),Ct();var gt=new W(nt.current,q({},H));gt.toDataURL=function(Ut,te){return Tt(Ut,te)},gt.downloadImage=function(Ut,te,ae){return Ft(Ut,te,ae)},gt.render(),z.current=k(gt),U&&U(gt);var Rt=function(Ut){It&&It(gt,Ut)};return gt.on("*",Rt),function(){z.current&&(z.current.destroy(),z.current.off("*",Rt),z.current=void 0)}},[]),{chart:z,container:nt}}},80803:function(Pt,st,M){"use strict";var B=M(67294),it=M(24561),wt=function(_t){var ft=_t.loadingTemplate,ct=_t.theme,et=ct===void 0?"light":ct,K=function(){return ft||B.createElement(it.ZP,{viewBox:"0 0 400 180",width:200,height:90,speed:1,backgroundColor:et==="dark"?"#262626":"#D9D9D9"},B.createElement("rect",{x:"20",y:"5",rx:"0",ry:"0",width:"1",height:"170"}),B.createElement("rect",{x:"20",y:"175",rx:"0",ry:"0",width:"360",height:"1"}),B.createElement("rect",{x:"40",y:"75",rx:"0",ry:"0",width:"35",height:"100"}),B.createElement("rect",{x:"80",y:"125",rx:"0",ry:"0",width:"35",height:"50"}),B.createElement("rect",{x:"120",y:"105",rx:"0",ry:"0",width:"35",height:"70"}),B.createElement("rect",{x:"160",y:"35",rx:"0",ry:"0",width:"35",height:"140"}),B.createElement("rect",{x:"200",y:"55",rx:"0",ry:"0",width:"35",height:"120"}),B.createElement("rect",{x:"240",y:"15",rx:"0",ry:"0",width:"35",height:"160"}),B.createElement("rect",{x:"280",y:"135",rx:"0",ry:"0",width:"35",height:"40"}),B.createElement("rect",{x:"320",y:"85",rx:"0",ry:"0",width:"35",height:"90"}))};return B.createElement("div",{className:"charts-loading-container",style:{position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",left:0,top:0,zIndex:99,backgroundColor:et==="dark"?"rgb(20, 20, 20)":"rgb(255, 255, 255)"}},K())};st.Z=wt},79360:function(Pt,st,M){"use strict";M.d(st,{J:function(){return it}});var B=M(49242),it=function(wt,_t){!wt||((0,B.isFunction)(wt)?wt(_t):wt.current=_t)}},47663:function(Pt,st,M){"use strict";M.d(st,{uN:function(){return Th},sg:function(){return kh},x1:function(){return Qh},by:function(){return af}});var B={};M.r(B),M.d(B,{Arc:function(){return pg},DataMarker:function(){return bg},DataRegion:function(){return Cg},Html:function(){return Dg},Image:function(){return _g},Line:function(){return fg},Region:function(){return mg},RegionFilter:function(){return Mg},Shape:function(){return Eg},Text:function(){return dg}});var it={};M.r(it),M.d(it,{ellipsisHead:function(){return Ng},ellipsisMiddle:function(){return zg},ellipsisTail:function(){return Al},getDefault:function(){return Rg}});var wt={};M.r(wt),M.d(wt,{equidistance:function(){return El},equidistanceWithReverseBoth:function(){return Xg},getDefault:function(){return Gg},reserveBoth:function(){return Yg},reserveFirst:function(){return Wg},reserveLast:function(){return Hg}});var _t={};M.r(_t),M.d(_t,{fixedAngle:function(){return Ll},getDefault:function(){return jg},unfixedAngle:function(){return Zg}});var ft={};M.r(ft),M.d(ft,{autoEllipsis:function(){return it},autoHide:function(){return wt},autoRotate:function(){return _t}});var ct={};M.r(ct),M.d(ct,{Base:function(){return ao},Circle:function(){return rp},Html:function(){return ap},Line:function(){return Il}});var et={};M.r(et),M.d(et,{CONTAINER_CLASS:function(){return sr},CROSSHAIR_X:function(){return ho},CROSSHAIR_Y:function(){return fo},LIST_CLASS:function(){return Yi},LIST_ITEM_CLASS:function(){return kn},MARKER_CLASS:function(){return Dn},NAME_CLASS:function(){return Bl},TITLE_CLASS:function(){return lr},VALUE_CLASS:function(){return Bn}});var K={};M.r(K),M.d(K,{cluster:function(){return IE},hierarchy:function(){return Fi},pack:function(){return Gf},packEnclose:function(){return kf},packSiblings:function(){return $A},partition:function(){return bv},stratify:function(){return DE},tree:function(){return GE},treemap:function(){return Fv},treemapBinary:function(){return WE},treemapDice:function(){return xn},treemapResquarify:function(){return YE},treemapSlice:function(){return Ra},treemapSliceDice:function(){return HE},treemapSquarify:function(){return Mv}});var g=M(70655),h=M(49242),J;(function(e){e.FORE="fore",e.MID="mid",e.BG="bg"})(J||(J={}));var E;(function(e){e.TOP="top",e.TOP_LEFT="top-left",e.TOP_RIGHT="top-right",e.RIGHT="right",e.RIGHT_TOP="right-top",e.RIGHT_BOTTOM="right-bottom",e.LEFT="left",e.LEFT_TOP="left-top",e.LEFT_BOTTOM="left-bottom",e.BOTTOM="bottom",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_RIGHT="bottom-right",e.RADIUS="radius",e.CIRCLE="circle",e.NONE="none"})(E||(E={}));var N;(function(e){e.AXIS="axis",e.GRID="grid",e.LEGEND="legend",e.TOOLTIP="tooltip",e.ANNOTATION="annotation",e.SLIDER="slider",e.SCROLLBAR="scrollbar",e.OTHER="other"})(N||(N={}));var $={FORE:3,MID:2,BG:1},L;(function(e){e.BEFORE_RENDER="beforerender",e.AFTER_RENDER="afterrender",e.BEFORE_PAINT="beforepaint",e.AFTER_PAINT="afterpaint",e.BEFORE_CHANGE_DATA="beforechangedata",e.AFTER_CHANGE_DATA="afterchangedata",e.BEFORE_CLEAR="beforeclear",e.AFTER_CLEAR="afterclear",e.BEFORE_DESTROY="beforedestroy",e.BEFORE_CHANGE_SIZE="beforechangesize",e.AFTER_CHANGE_SIZE="afterchangesize"})(L||(L={}));var X;(function(e){e.BEFORE_DRAW_ANIMATE="beforeanimate",e.AFTER_DRAW_ANIMATE="afteranimate",e.BEFORE_RENDER_LABEL="beforerenderlabel",e.AFTER_RENDER_LABEL="afterrenderlabel"})(X||(X={}));var ot;(function(e){e.MOUSE_ENTER="plot:mouseenter",e.MOUSE_DOWN="plot:mousedown",e.MOUSE_MOVE="plot:mousemove",e.MOUSE_UP="plot:mouseup",e.MOUSE_LEAVE="plot:mouseleave",e.TOUCH_START="plot:touchstart",e.TOUCH_MOVE="plot:touchmove",e.TOUCH_END="plot:touchend",e.TOUCH_CANCEL="plot:touchcancel",e.CLICK="plot:click",e.DBLCLICK="plot:dblclick",e.CONTEXTMENU="plot:contextmenu",e.LEAVE="plot:leave",e.ENTER="plot:enter"})(ot||(ot={}));var ht;(function(e){e.ACTIVE="active",e.INACTIVE="inactive",e.SELECTED="selected",e.DEFAULT="default"})(ht||(ht={}));var bt=["color","shape","size"],rt="_origin",Mt=1,zt=1,qt=.25,Yt={};function se(e){var r=Yt[e];if(!r)throw new Error("G engine '".concat(e,"' is not exist, please register it at first."));return r}function jt(e,r){Yt[e]=r}var T=M(6056),k=M(45442);function tt(e){var r=getComputedStyle(e);return{width:(e.clientWidth||parseInt(r.width,10))-parseInt(r.paddingLeft,10)-parseInt(r.paddingRight,10),height:(e.clientHeight||parseInt(r.height,10))-parseInt(r.paddingTop,10)-parseInt(r.paddingBottom,10)}}function Y(e){return typeof e=="number"&&!isNaN(e)}function R(e,r,t,i){var n=t,a=i;if(r){var o=tt(e);n=o.width?o.width:n,a=o.height?o.height:a}return{width:Math.max(Y(n)?n:Mt,Mt),height:Math.max(Y(a)?a:zt,zt)}}function D(e){var r=e.parentNode;r&&r.removeChild(e)}var j=M(90494),q=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this)||this;i.destroyed=!1;var n=t.visible,a=n===void 0?!0:n;return i.visible=a,i}return r.prototype.show=function(){var t=this.visible;t||this.changeVisible(!0)},r.prototype.hide=function(){var t=this.visible;t&&this.changeVisible(!1)},r.prototype.destroy=function(){this.off(),this.destroyed=!0},r.prototype.changeVisible=function(t){this.visible!==t&&(this.visible=t)},r}(j.Z),dt=q,St=M(98190),W=0,H=1/2,z=1/2,Q=.05,nt=function(){function e(r){var t=r.xField,i=r.yField,n=r.adjustNames,a=n===void 0?["x","y"]:n,o=r.dimValuesMap;this.adjustNames=a,this.xField=t,this.yField=i,this.dimValuesMap=o}return e.prototype.isAdjust=function(r){return this.adjustNames.indexOf(r)>=0},e.prototype.getAdjustRange=function(r,t,i){var n=this.yField,a=i.indexOf(t),o=i.length,s,l;return!n&&this.isAdjust("y")?(s=0,l=1):o>1?(s=i[a===0?0:a-1],l=i[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-i[o-2])/2):(s=t===0?0:t-.5,l=t===0?1:t+.5),{pre:s,next:l}},e.prototype.adjustData=function(r,t){var i=this,n=this.getDimValues(t);h.each(r,function(a,o){h.each(n,function(s,l){i.adjustDim(l,s,a,o)})})},e.prototype.groupData=function(r,t){return h.each(r,function(i){i[t]===void 0&&(i[t]=W)}),h.groupBy(r,t)},e.prototype.adjustDim=function(r,t,i,n){},e.prototype.getDimValues=function(r){var t=this,i=t.xField,n=t.yField,a=h.assign({},this.dimValuesMap),o=[];if(i&&this.isAdjust("x")&&o.push(i),n&&this.isAdjust("y")&&o.push(n),o.forEach(function(l){a&&a[l]||(a[l]=h.valuesOfKey(r,l).sort(function(u,c){return u-c}))}),!n&&this.isAdjust("y")){var s="y";a[s]=[W,1]}return a},e}(),U=nt,It={},Tt=function(e){return It[e.toLowerCase()]},Ft=function(e,r){if(Tt(e))throw new Error("Adjust type '"+e+"' existed.");It[e.toLowerCase()]=r};/*! *****************************************************************************
  2. Copyright (c) Microsoft Corporation.
  3. Permission to use, copy, modify, and/or distribute this software for any
  4. purpose with or without fee is hereby granted.
  5. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  6. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  7. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  8. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  9. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  10. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  11. PERFORMANCE OF THIS SOFTWARE.
  12. ***************************************************************************** */var lt=function(r,t){return lt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var a in n)n.hasOwnProperty(a)&&(i[a]=n[a])},lt(r,t)};function Ct(e,r){lt(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}var gt=function(){return gt=Object.assign||function(t){for(var i,n=1,a=arguments.length;n<a;n++){i=arguments[n];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},gt.apply(this,arguments)};function Rt(e,r){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.indexOf(i)<0&&(t[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)r.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(t[i[n]]=e[i[n]]);return t}function Ut(e,r,t,i){var n=arguments.length,a=n<3?r:i===null?i=Object.getOwnPropertyDescriptor(r,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,r,t,i);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(r,t,a):o(r,t))||a);return n>3&&a&&Object.defineProperty(r,t,a),a}function te(e,r){return function(t,i){r(t,i,e)}}function ae(e,r){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,r)}function we(e,r,t,i){function n(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(c){try{u(i.next(c))}catch(f){o(f)}}function l(c){try{u(i.throw(c))}catch(f){o(f)}}function u(c){c.done?a(c.value):n(c.value).then(s,l)}u((i=i.apply(e,r||[])).next())})}function re(e,r){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,n,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(c){return l([u,c])}}function l(u){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(a=u[0]&2?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=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++,n=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]<a[3])){t.label=u[1];break}if(u[0]===6&&t.label<a[1]){t.label=a[1],a=u;break}if(a&&t.label<a[2]){t.label=a[2],t.ops.push(u);break}a[2]&&t.ops.pop(),t.trys.pop();continue}u=r.call(e,t)}catch(c){u=[6,c],n=0}finally{i=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function xe(e,r,t,i){i===void 0&&(i=t),e[i]=r[t]}function Se(e,r){for(var t in e)t!=="default"&&!r.hasOwnProperty(t)&&(r[t]=e[t])}function _e(e){var r=typeof Symbol=="function"&&Symbol.iterator,t=r&&e[r],i=0;if(t)return t.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function ce(e,r){var t=typeof Symbol=="function"&&e[Symbol.iterator];if(!t)return e;var i=t.call(e),n,a=[],o;try{for(;(r===void 0||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return a}function ve(){for(var e=[],r=0;r<arguments.length;r++)e=e.concat(ce(arguments[r]));return e}function de(){for(var e=0,r=0,t=arguments.length;r<t;r++)e+=arguments[r].length;for(var i=Array(e),n=0,r=0;r<t;r++)for(var a=arguments[r],o=0,s=a.length;o<s;o++,n++)i[n]=a[o];return i}function Te(e){return this instanceof Te?(this.v=e,this):new Te(e)}function ii(e,r,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t.apply(e,r||[]),n,a=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(v){i[v]&&(n[v]=function(d){return new Promise(function(p,y){a.push([v,d,p,y])>1||s(v,d)})})}function s(v,d){try{l(i[v](d))}catch(p){f(a[0][3],p)}}function l(v){v.value instanceof Te?Promise.resolve(v.value.v).then(u,c):f(a[0][2],v)}function u(v){s("next",v)}function c(v){s("throw",v)}function f(v,d){v(d),a.shift(),a.length&&s(a[0][0],a[0][1])}}function ni(e){var r,t;return r={},i("next"),i("throw",function(n){throw n}),i("return"),r[Symbol.iterator]=function(){return this},r;function i(n,a){r[n]=e[n]?function(o){return(t=!t)?{value:Te(e[n](o)),done:n==="return"}:a?a(o):o}:a}}function ai(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=e[Symbol.asyncIterator],t;return r?r.call(e):(e=typeof _e=="function"?_e(e):e[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(a){t[a]=e[a]&&function(o){return new Promise(function(s,l){o=e[a](o),n(s,l,o.done,o.value)})}}function n(a,o,s,l){Promise.resolve(l).then(function(u){a({value:u,done:s})},o)}}function Xa(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}function Oi(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var t in e)Object.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}function Pi(e){return e&&e.__esModule?e:{default:e}}function Ua(e,r){if(!r.has(e))throw new TypeError("attempted to get private field on non-instance");return r.get(e)}function FL(e,r,t){if(!r.has(e))throw new TypeError("attempted to set private field on non-instance");return r.set(e,t),t}var ud=function(e){Ct(r,e);function r(t){var i=e.call(this,t)||this;i.cacheMap={},i.adjustDataArray=[],i.mergeData=[];var n=t.marginRatio,a=n===void 0?H:n,o=t.dodgeRatio,s=o===void 0?z:o,l=t.dodgeBy,u=t.intervalPadding,c=t.dodgePadding,f=t.xDimensionLength,v=t.groupNum,d=t.defaultSize,p=t.maxColumnWidth,y=t.minColumnWidth,m=t.columnWidthRatio,x=t.customOffset;return i.marginRatio=a,i.dodgeRatio=s,i.dodgeBy=l,i.intervalPadding=u,i.dodgePadding=c,i.xDimensionLegenth=f,i.groupNum=v,i.defaultSize=d,i.maxColumnWidth=p,i.minColumnWidth=y,i.columnWidthRatio=m,i.customOffset=x,i}return r.prototype.process=function(t){var i=h.clone(t),n=h.flatten(i),a=this.dodgeBy,o=a?h.group(n,a):i;return this.cacheMap={},this.adjustDataArray=o,this.mergeData=n,this.adjustData(o,n),this.adjustDataArray=[],this.mergeData=[],i},r.prototype.adjustDim=function(t,i,n,a){var o=this,s=this.customOffset,l=this.getDistribution(t),u=this.groupData(n,t);return h.each(u,function(c,f){var v;i.length===1?v={pre:i[0]-1,next:i[0]+1}:v=o.getAdjustRange(t,parseFloat(f),i),h.each(c,function(d){var p=d[t],y=l[p],m=y.indexOf(a);if(h.isNil(s))d[t]=o.getDodgeOffset(v,m,y.length);else{var x=v.pre,_=v.next;d[t]=h.isFunction(s)?s(d,v):(x+_)/2+s}})}),[]},r.prototype.getDodgeOffset=function(t,i,n){var a=this,o=a.dodgeRatio,s=a.marginRatio,l=a.intervalPadding,u=a.dodgePadding,c=t.pre,f=t.next,v=f-c,d;if(!h.isNil(l)&&h.isNil(u)&&l>=0){var p=this.getIntervalOnlyOffset(n,i);d=c+p}else if(!h.isNil(u)&&h.isNil(l)&&u>=0){var p=this.getDodgeOnlyOffset(n,i);d=c+p}else if(!h.isNil(l)&&!h.isNil(u)&&l>=0&&u>=0){var p=this.getIntervalAndDodgeOffset(n,i);d=c+p}else{var y=v*o/n,m=s*y,p=1/2*(v-n*y-(n-1)*m)+((i+1)*y+i*m)-1/2*y-1/2*v;d=(c+f)/2+p}return d},r.prototype.getIntervalOnlyOffset=function(t,i){var n=this,a=n.defaultSize,o=n.intervalPadding,s=n.xDimensionLegenth,l=n.groupNum,u=n.dodgeRatio,c=n.maxColumnWidth,f=n.minColumnWidth,v=n.columnWidthRatio,d=o/s,p=(1-(l-1)*d)/l*u/(t-1),y=((1-d*(l-1))/l-p*(t-1))/t;if(y=h.isNil(v)?y:1/l/t*v,!h.isNil(c)){var m=c/s;y=Math.min(y,m)}if(!h.isNil(f)){var x=f/s;y=Math.max(y,x)}y=a?a/s:y,p=((1-(l-1)*d)/l-t*y)/(t-1);var _=((1/2+i)*y+i*p+1/2*d)*l-d/2;return _},r.prototype.getDodgeOnlyOffset=function(t,i){var n=this,a=n.defaultSize,o=n.dodgePadding,s=n.xDimensionLegenth,l=n.groupNum,u=n.marginRatio,c=n.maxColumnWidth,f=n.minColumnWidth,v=n.columnWidthRatio,d=o/s,p=1*u/(l-1),y=((1-p*(l-1))/l-d*(t-1))/t;if(y=v?1/l/t*v:y,!h.isNil(c)){var m=c/s;y=Math.min(y,m)}if(!h.isNil(f)){var x=f/s;y=Math.max(y,x)}y=a?a/s:y,p=(1-(y*t+d*(t-1))*l)/(l-1);var _=((1/2+i)*y+i*d+1/2*p)*l-p/2;return _},r.prototype.getIntervalAndDodgeOffset=function(t,i){var n=this,a=n.intervalPadding,o=n.dodgePadding,s=n.xDimensionLegenth,l=n.groupNum,u=a/s,c=o/s,f=((1-u*(l-1))/l-c*(t-1))/t,v=((1/2+i)*f+i*c+1/2*u)*l-u/2;return v},r.prototype.getDistribution=function(t){var i=this.adjustDataArray,n=this.cacheMap,a=n[t];return a||(a={},h.each(i,function(o,s){var l=h.valuesOfKey(o,t);l.length||l.push(0),h.each(l,function(u){a[u]||(a[u]=[]),a[u].push(s)})}),n[t]=a),a},r}(U),cd=ud;function hd(e,r){return(r-e)*Math.random()+e}var fd=function(e){Ct(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.process=function(t){var i=h.clone(t),n=h.flatten(i);return this.adjustData(i,n),i},r.prototype.adjustDim=function(t,i,n){var a=this,o=this.groupData(n,t);return h.each(o,function(s,l){return a.adjustGroup(s,t,parseFloat(l),i)})},r.prototype.getAdjustOffset=function(t){var i=t.pre,n=t.next,a=(n-i)*Q;return hd(i+a,n-a)},r.prototype.adjustGroup=function(t,i,n,a){var o=this,s=this.getAdjustRange(i,n,a);return h.each(t,function(l){l[i]=o.getAdjustOffset(s)}),t},r}(U),vd=fd,ja=h.Cache,dd=function(e){Ct(r,e);function r(t){var i=e.call(this,t)||this,n=t.adjustNames,a=n===void 0?["y"]:n,o=t.height,s=o===void 0?NaN:o,l=t.size,u=l===void 0?10:l,c=t.reverseOrder,f=c===void 0?!1:c;return i.adjustNames=a,i.height=s,i.size=u,i.reverseOrder=f,i}return r.prototype.process=function(t){var i=this,n=i.yField,a=i.reverseOrder,o=n?this.processStack(t):this.processOneDimStack(t);return a?this.reverse(o):o},r.prototype.reverse=function(t){return t.slice(0).reverse()},r.prototype.processStack=function(t){var i=this,n=i.xField,a=i.yField,o=i.reverseOrder,s=o?this.reverse(t):t,l=new ja,u=new ja;return s.map(function(c){return c.map(function(f){var v,d=h.get(f,n,0),p=h.get(f,[a]),y=d.toString();if(p=h.isArray(p)?p[1]:p,!h.isNil(p)){var m=p>=0?l:u;m.has(y)||m.set(y,0);var x=m.get(y),_=p+x;return m.set(y,_),gt(gt({},f),(v={},v[a]=[x,_],v))}return f})})},r.prototype.processOneDimStack=function(t){var i=this,n=this,a=n.xField,o=n.height,s=n.reverseOrder,l="y",u=s?this.reverse(t):t,c=new ja;return u.map(function(f){return f.map(function(v){var d,p=i.size,y=v[a],m=p*2/o;c.has(y)||c.set(y,m/2);var x=c.get(y);return c.set(y,x+m),gt(gt({},v),(d={},d[l]=x,d))})})},r}(U),gd=dd,pd=function(e){Ct(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.process=function(t){var i=h.flatten(t),n=this,a=n.xField,o=n.yField,s=this.getXValuesMaxMap(i),l=Math.max.apply(Math,Object.keys(s).map(function(u){return s[u]}));return h.map(t,function(u){return h.map(u,function(c){var f,v,d=c[o],p=c[a];if(h.isArray(d)){var y=(l-s[p])/2;return gt(gt({},c),(f={},f[o]=h.map(d,function(x){return y+x}),f))}var m=(l-d)/2;return gt(gt({},c),(v={},v[o]=[m,d+m],v))})})},r.prototype.getXValuesMaxMap=function(t){var i=this,n=this,a=n.xField,o=n.yField,s=h.groupBy(t,function(l){return l[a]});return h.mapValues(s,function(l){return i.getDimMaxValue(l,o)})},r.prototype.getDimMaxValue=function(t,i){var n=h.map(t,function(o){return h.get(o,i,[])}),a=h.flatten(n);return Math.max.apply(Math,a)},r}(U),yd=pd;Ft("Dodge",cd),Ft("Jitter",vd),Ft("Stack",gd),Ft("Symmetric",yd);var cl=function(e,r){return(0,h.isString)(r)?r:e.invert(e.scale(r))},md=function(){function e(r){this.names=[],this.scales=[],this.linear=!1,this.values=[],this.callback=function(){return[]},this._parseCfg(r)}return e.prototype.mapping=function(){for(var r=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n=t.map(function(a,o){return r._toOriginParam(a,r.scales[o])});return this.callback.apply(this,n)},e.prototype.getLinearValue=function(r){var t=this.values.length-1,i=Math.floor(t*r),n=t*r-i,a=this.values[i],o=i===t?a:this.values[i+1];return a+(o-a)*n},e.prototype.getNames=function(){for(var r=this.scales,t=this.names,i=Math.min(r.length,t.length),n=[],a=0;a<i;a+=1)n.push(t[a]);return n},e.prototype.getFields=function(){return this.scales.map(function(r){return r.field})},e.prototype.getScale=function(r){return this.scales[this.names.indexOf(r)]},e.prototype.defaultCallback=function(){for(var r=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return t.length===0?this.values:t.map(function(n,a){var o=r.scales[a];return o.type==="identity"?o.values[0]:r._getAttributeValue(o,n)})},e.prototype._parseCfg=function(r){var t=this,i=r.type,n=i===void 0?"base":i,a=r.names,o=a===void 0?[]:a,s=r.scales,l=s===void 0?[]:s,u=r.values,c=u===void 0?[]:u,f=r.callback;this.type=n,this.scales=l,this.values=c,this.names=o,this.callback=function(){for(var v=[],d=0;d<arguments.length;d++)v[d]=arguments[d];if(f){var p=f.apply(void 0,v);if(!(0,h.isNil)(p))return[p]}return t.defaultCallback.apply(t,v)}},e.prototype._getAttributeValue=function(r,t){if(r.isCategory&&!this.linear){var i=r.translate(t);return this.values[i%this.values.length]}var n=r.scale(t);return this.getLinearValue(n)},e.prototype._toOriginParam=function(r,t){return t.isLinear?r:(0,h.isArray)(r)?r.map(function(i){return cl(t,i)}):cl(t,r)},e}(),ki=md,xd=/rgba?\(([\s.,0-9]+)\)/,_d=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,wd=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,bd=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,Sd=function(e){return/^[r,R,L,l]{1}[\s]*\(/.test(e)},Cd=function(){var e=document.createElement("i");return e.title="Web Colour Picker",e.style.display="none",document.body.appendChild(e),e},Za=function(e,r,t,i){return e[i]+(r[i]-e[i])*t};function hl(e){return"#"+qa(e[0])+qa(e[1])+qa(e[2])}var fl=function(e){return[parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16)]},qa=function(e){var r=Math.round(e).toString(16);return r.length===1?"0"+r:r},Ad=function(e,r){var t=isNaN(Number(r))||r<0?0:r>1?1:Number(r),i=e.length-1,n=Math.floor(i*t),a=i*t-n,o=e[n],s=n===i?o:e[n+1];return hl([Za(o,s,a,0),Za(o,s,a,1),Za(o,s,a,2)])},Mn,vl=function(e){if(e[0]==="#"&&e.length===7)return e;Mn||(Mn=Cd()),Mn.style.color=e;var r=document.defaultView.getComputedStyle(Mn,"").getPropertyValue("color"),t=xd.exec(r),i=t[1].split(/\s*,\s*/).map(function(n){return Number(n)});return r=hl(i),r},Md=function(e){var r=(0,h.isString)(e)?e.split("-"):e,t=(0,h.map)(r,function(i){return fl(i.indexOf("#")===-1?vl(i):i)});return function(i){return Ad(t,i)}},Fd=function(e){if(Sd(e)){var r,t=void 0;if(e[0]==="l"){var i=_d.exec(e),n=+i[1]+90;t=i[2],r="linear-gradient("+n+"deg, "}else if(e[0]==="r"){r="radial-gradient(";var i=wd.exec(e);t=i[4]}var a=t.match(bd);return(0,h.each)(a,function(o,s){var l=o.split(":");r+=l[1]+" "+l[0]*100+"%",s!==a.length-1&&(r+=", ")}),r+=")",r}return e},xr={rgb2arr:fl,gradient:Md,toRGB:(0,h.memoize)(vl),toCSSGradient:Fd},Ed=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.type="color",i.names=["color"],(0,h.isString)(i.values)&&(i.linear=!0),i.gradient=xr.gradient(i.values),i}return r.prototype.getLinearValue=function(t){return this.gradient(t)},r}(ki),Td=Ed,Ld=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.type="opacity",i.names=["opacity"],i}return r}(ki),Id=Ld,Od=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.names=["x","y"],i.type="position",i}return r.prototype.mapping=function(t,i){var n=this.scales,a=n[0],o=n[1];return(0,h.isNil)(t)||(0,h.isNil)(i)?[]:[(0,h.isArray)(t)?t.map(function(s){return a.scale(s)}):a.scale(t),(0,h.isArray)(i)?i.map(function(s){return o.scale(s)}):o.scale(i)]},r}(ki),Pd=Od,kd=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.type="shape",i.names=["shape"],i}return r.prototype.getLinearValue=function(t){var i=Math.round((this.values.length-1)*t);return this.values[i]},r}(ki),Dd=kd,Bd=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.type="size",i.names=["size"],i}return r}(ki),Rd=Bd,Di=M(86429),dl={},gl=function(e){return dl[e.toLowerCase()]},Bi=function(e,r){if(gl(e))throw new Error("Attribute type '".concat(e,"' existed."));dl[e.toLowerCase()]=r};Bi("Color",Td),Bi("Opacity",Id),Bi("Position",Pd),Bi("Shape",Dd),Bi("Size",Rd);var Fn=M(77160),Nd=M(35600),ie=M(31506),zd=function(){function e(r){this.type="coordinate",this.isRect=!1,this.isHelix=!1,this.isPolar=!1,this.isReflectX=!1,this.isReflectY=!1;var t=r.start,i=r.end,n=r.matrix,a=n===void 0?[1,0,0,0,1,0,0,0,1]:n,o=r.isTransposed,s=o===void 0?!1:o;this.start=t,this.end=i,this.matrix=a,this.originalMatrix=(0,g.__spreadArray)([],a),this.isTransposed=s}return e.prototype.initial=function(){this.center={x:(this.start.x+this.end.x)/2,y:(this.start.y+this.end.y)/2},this.width=Math.abs(this.end.x-this.start.x),this.height=Math.abs(this.end.y-this.start.y)},e.prototype.update=function(r){(0,h.assign)(this,r),this.initial()},e.prototype.convertDim=function(r,t){var i,n=this[t],a=n.start,o=n.end;return this.isReflect(t)&&(i=[o,a],a=i[0],o=i[1]),a+r*(o-a)},e.prototype.invertDim=function(r,t){var i,n=this[t],a=n.start,o=n.end;return this.isReflect(t)&&(i=[o,a],a=i[0],o=i[1]),(r-a)/(o-a)},e.prototype.applyMatrix=function(r,t,i){i===void 0&&(i=0);var n=this.matrix,a=[r,t,i];return Fn.transformMat3(a,a,n),a},e.prototype.invertMatrix=function(r,t,i){i===void 0&&(i=0);var n=this.matrix,a=Nd.invert([0,0,0,0,0,0,0,0,0],n),o=[r,t,i];return a&&Fn.transformMat3(o,o,a),o},e.prototype.convert=function(r){var t=this.convertPoint(r),i=t.x,n=t.y,a=this.applyMatrix(i,n,1);return{x:a[0],y:a[1]}},e.prototype.invert=function(r){var t=this.invertMatrix(r.x,r.y,1);return this.invertPoint({x:t[0],y:t[1]})},e.prototype.rotate=function(r){var t=this.matrix,i=this.center;return ie.m$(t,t,[-i.x,-i.y]),ie.zu(t,t,r),ie.m$(t,t,[i.x,i.y]),this},e.prototype.reflect=function(r){return r==="x"?this.isReflectX=!this.isReflectX:this.isReflectY=!this.isReflectY,this},e.prototype.scale=function(r,t){var i=this.matrix,n=this.center;return ie.m$(i,i,[-n.x,-n.y]),ie.lh(i,i,[r,t]),ie.m$(i,i,[n.x,n.y]),this},e.prototype.translate=function(r,t){var i=this.matrix;return ie.m$(i,i,[r,t]),this},e.prototype.transpose=function(){return this.isTransposed=!this.isTransposed,this},e.prototype.getCenter=function(){return this.center},e.prototype.getWidth=function(){return this.width},e.prototype.getHeight=function(){return this.height},e.prototype.getRadius=function(){return this.radius},e.prototype.isReflect=function(r){return r==="x"?this.isReflectX:this.isReflectY},e.prototype.resetMatrix=function(r){this.matrix=r||(0,g.__spreadArray)([],this.originalMatrix)},e}(),Ka=zd,Vd=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.isRect=!0,i.type="cartesian",i.initial(),i}return r.prototype.initial=function(){e.prototype.initial.call(this);var t=this.start,i=this.end;this.x={start:t.x,end:i.x},this.y={start:t.y,end:i.y}},r.prototype.convertPoint=function(t){var i,n=t.x,a=t.y;return this.isTransposed&&(i=[a,n],n=i[0],a=i[1]),{x:this.convertDim(n,"x"),y:this.convertDim(a,"y")}},r.prototype.invertPoint=function(t){var i,n=this.invertDim(t.x,"x"),a=this.invertDim(t.y,"y");return this.isTransposed&&(i=[a,n],n=i[0],a=i[1]),{x:n,y:a}},r}(Ka),pl=Vd,Lt=M(31437),Gd=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.isHelix=!0,i.type="helix";var n=t.startAngle,a=n===void 0?1.25*Math.PI:n,o=t.endAngle,s=o===void 0?7.25*Math.PI:o,l=t.innerRadius,u=l===void 0?0:l,c=t.radius;return i.startAngle=a,i.endAngle=s,i.innerRadius=u,i.radius=c,i.initial(),i}return r.prototype.initial=function(){e.prototype.initial.call(this);var t=(this.endAngle-this.startAngle)/(2*Math.PI)+1,i=Math.min(this.width,this.height)/2;this.radius&&this.radius>=0&&this.radius<=1&&(i=i*this.radius),this.d=Math.floor(i*(1-this.innerRadius)/t),this.a=this.d/(Math.PI*2),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*i,end:this.innerRadius*i+this.d*.99}},r.prototype.convertPoint=function(t){var i,n=t.x,a=t.y;this.isTransposed&&(i=[a,n],n=i[0],a=i[1]);var o=this.convertDim(n,"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)}},r.prototype.invertPoint=function(t){var i,n=this.d+this.y.start,a=Lt.subtract([0,0],[t.x,t.y],[this.center.x,this.center.y]),o=ie.Dg(a,[1,0],!0),s=o*this.a;Lt.length(a)<s&&(s=Lt.length(a));var l=Math.floor((Lt.length(a)-s)/n);o=2*l*Math.PI+o;var u=this.a*o,c=Lt.length(a)-u;c=(0,h.isNumberEqual)(c,0)?0:c;var f=this.invertDim(o,"x"),v=this.invertDim(c,"y");return f=(0,h.isNumberEqual)(f,0)?0:f,v=(0,h.isNumberEqual)(v,0)?0:v,this.isTransposed&&(i=[v,f],f=i[0],v=i[1]),{x:f,y:v}},r}(Ka),Wd=Gd,Hd=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.isPolar=!0,i.type="polar";var n=t.startAngle,a=n===void 0?-Math.PI/2:n,o=t.endAngle,s=o===void 0?Math.PI*3/2:o,l=t.innerRadius,u=l===void 0?0:l,c=t.radius;return i.startAngle=a,i.endAngle=s,i.innerRadius=u,i.radius=c,i.initial(),i}return r.prototype.initial=function(){for(e.prototype.initial.call(this);this.endAngle<this.startAngle;)this.endAngle+=Math.PI*2;var t=this.getOneBox(),i=t.maxX-t.minX,n=t.maxY-t.minY,a=Math.abs(t.minX)/i,o=Math.abs(t.minY)/n,s;this.height/n>this.width/i?(s=this.width/i,this.circleCenter={x:this.center.x-(.5-a)*this.width,y:this.center.y-(.5-o)*s*n}):(s=this.height/n,this.circleCenter={x:this.center.x-(.5-a)*s*i,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}},r.prototype.getRadius=function(){return this.polarRadius},r.prototype.convertPoint=function(t){var i,n=this.getCenter(),a=t.x,o=t.y;return this.isTransposed&&(i=[o,a],a=i[0],o=i[1]),a=this.convertDim(a,"x"),o=this.convertDim(o,"y"),{x:n.x+Math.cos(a)*o,y:n.y+Math.sin(a)*o}},r.prototype.invertPoint=function(t){var i,n=this.getCenter(),a=[t.x-n.x,t.y-n.y],o=this,s=o.startAngle,l=o.endAngle;this.isReflect("x")&&(i=[l,s],s=i[0],l=i[1]);var u=[1,0,0,0,1,0,0,0,1];ie.zu(u,u,s);var c=[1,0,0];Fn.transformMat3(c,c,u);var f=[c[0],c[1]],v=ie.Dg(f,a,l<s);(0,h.isNumberEqual)(v,Math.PI*2)&&(v=0);var d=Lt.length(a),p=v/(l-s);p=l-s>0?p:-p;var y=this.invertDim(d,"y"),m={x:0,y:0};return m.x=this.isTransposed?y:p,m.y=this.isTransposed?p:y,m},r.prototype.getCenter=function(){return this.circleCenter},r.prototype.getOneBox=function(){var t=this.startAngle,i=this.endAngle;if(Math.abs(i-t)>=Math.PI*2)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var n=[0,Math.cos(t),Math.cos(i)],a=[0,Math.sin(t),Math.sin(i)],o=Math.min(t,i);o<Math.max(t,i);o+=Math.PI/18)n.push(Math.cos(o)),a.push(Math.sin(o));return{minX:Math.min.apply(Math,n),maxX:Math.max.apply(Math,n),minY:Math.min.apply(Math,a),maxY:Math.max.apply(Math,a)}},r}(Ka),Yd=Hd,yl={},Xd=function(e){return yl[e.toLowerCase()]},En=function(e,r){yl[e.toLowerCase()]=r};En("rect",pl),En("cartesian",pl),En("polar",Yd),En("helix",Wd);function ml(e,r,t){var i=new St.Event(r,t);i.target=e,i.propagationPath.push(e),e.emitDelegation(r,i);for(var n=e.getParent();n;)n.emitDelegation(r,i),i.propagationPath.push(n),n=n.getParent()}var xl=[1,0,0,0,1,0,0,0,1];function Dr(e,r,t){if(t===void 0&&(t=xl),!r)return null;var i=ie.vs(t,[["t",-e.x,-e.y],["r",r],["t",e.x,e.y]]);return i}function $a(e,r){return!e.x&&!e.y?null:ie.vs(r||xl,[["t",e.x,e.y]])}function Ud(e){var r=[1,0,0],t=[0,0,0];return Fn.transformMat3(t,r,e),Math.atan2(t[1],t[0])}function Tn(e,r){var t=[0,0];return Lt.transformMat3(t,r,e),t}function jd(e,r){var t=Tn(e,[r.minX,r.minY]),i=Tn(e,[r.maxX,r.minY]),n=Tn(e,[r.minX,r.maxY]),a=Tn(e,[r.maxX,r.maxY]),o=Math.min(t[0],i[0],n[0],a[0]),s=Math.max(t[0],i[0],n[0],a[0]),l=Math.min(t[1],i[1],n[1],a[1]),u=Math.max(t[1],i[1],n[1],a[1]);return{x:o,y:l,minX:o,minY:l,maxX:s,maxY:u,width:s-o,height:u-l}}function _l(e,r,t,i){if(r){var n=Dr({x:t,y:i},r,e.getMatrix());e.setMatrix(n)}}function Qa(e,r,t){var i=$a({x:r,y:t});e.attr("matrix",i)}function Ln(e){var r=0,t=0,i=0,n=0;return(0,h.isNumber)(e)?r=t=i=n=e:(0,h.isArray)(e)&&(r=e[0],i=(0,h.isNil)(e[1])?e[0]:e[1],n=(0,h.isNil)(e[2])?e[0]:e[2],t=(0,h.isNil)(e[3])?i:e[3]),[r,i,n,t]}function Ja(e){for(var r=e.childNodes,t=r.length,i=t-1;i>=0;i--)e.removeChild(r[i])}function Zd(e,r){return!!e.className.match(new RegExp("(\\s|^)"+r+"(\\s|$)"))}function Ri(e){var r=e.start,t=e.end,i=Math.min(r.x,t.x),n=Math.min(r.y,t.y),a=Math.max(r.x,t.x),o=Math.max(r.y,t.y);return{x:i,y:n,minX:i,minY:n,maxX:a,maxY:o,width:a-i,height:o-n}}function qd(e){var r=e.map(function(s){return s.x}),t=e.map(function(s){return s.y}),i=Math.min.apply(Math,r),n=Math.min.apply(Math,t),a=Math.max.apply(Math,r),o=Math.max.apply(Math,t);return{x:i,y:n,minX:i,minY:n,maxX:a,maxY:o,width:a-i,height:o-n}}function Ni(e,r,t,i){var n=e+t,a=r+i;return{x:e,y:r,width:t,height:i,minX:e,minY:r,maxX:isNaN(n)?0:n,maxY:isNaN(a)?0:a}}function Br(e,r,t){return(1-t)*e+r*t}function oi(e,r,t){return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}}function Kd(e,r){var t=r.x-e.x,i=r.y-e.y;return Math.sqrt(t*t+i*i)}var EL=function(e){return new Promise(function(r){setTimeout(r,e)})},In=function(e,r,t){return t===void 0&&(t=Math.pow(Number.EPSILON,.5)),[e,r].includes(Infinity)?Math.abs(e)===Math.abs(r):Math.abs(e-r)<t};function $d(e,r){var t=Math.max(e.minX,r.minX),i=Math.max(e.minY,r.minY),n=Math.min(e.maxX,r.maxX),a=Math.min(e.maxY,r.maxY);return Ni(t,i,n-t,a-i)}function TL(e,r){var t=Math.min(e.minX,r.minX),i=Math.min(e.minY,r.minY),n=Math.max(e.maxX,r.maxX),a=Math.max(e.maxY,r.maxY);return Ni(t,i,n-t,a-i)}function wl(e){var r=e.getClip(),t=r&&r.getBBox(),i;if(!e.isGroup())i=e.getBBox();else{var n=Infinity,a=-Infinity,o=Infinity,s=-Infinity,l=e.getChildren();l.length>0?(0,h.each)(l,function(u){if(u.get("visible")){if(u.isGroup()&&u.get("children").length===0)return!0;var c=wl(u),f=u.applyToMatrix([c.minX,c.minY,1]),v=u.applyToMatrix([c.minX,c.maxY,1]),d=u.applyToMatrix([c.maxX,c.minY,1]),p=u.applyToMatrix([c.maxX,c.maxY,1]),y=Math.min(f[0],v[0],d[0],p[0]),m=Math.max(f[0],v[0],d[0],p[0]),x=Math.min(f[1],v[1],d[1],p[1]),_=Math.max(f[1],v[1],d[1],p[1]);y<n&&(n=y),m>a&&(a=m),x<o&&(o=x),_>s&&(s=_)}}):(n=0,a=0,o=0,s=0),i=Ni(n,o,a-n,s-o)}return t?$d(i,t):i}function Qd(e,r){if(!(!e.getClip()&&!r.getClip())){var t=r.getClip();if(!t){e.setClip(null);return}var i={type:t.get("type"),attrs:t.attr()};e.setClip(i)}}function Le(e){return e+"px"}function bl(e,r,t,i){var n=Kd(e,r),a=i/n,o=0;return t==="start"?o=0-a:t==="end"&&(o=1+a),{x:Br(e.x,r.x,o),y:Br(e.y,r.y,o)}}var Jd={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},tg=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.initCfg(),i}return r.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}},r.prototype.clear=function(){},r.prototype.update=function(t){var i=this,n=this.get("defaultCfg")||{};(0,h.each)(t,function(a,o){var s=i.get(o),l=a;s!==a&&((0,h.isObject)(a)&&n[o]&&(l=(0,h.deepMix)({},n[o],a)),i.set(o,l))}),this.updateInner(t),this.afterUpdate(t)},r.prototype.updateInner=function(t){},r.prototype.afterUpdate=function(t){(0,h.hasKey)(t,"visible")&&(t.visible?this.show():this.hide()),(0,h.hasKey)(t,"capture")&&this.setCapture(t.capture)},r.prototype.getLayoutBBox=function(){return this.getBBox()},r.prototype.getLocationType=function(){return this.get("locationType")},r.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},r.prototype.setOffset=function(t,i){this.update({offsetX:t,offsetY:i})},r.prototype.setLocation=function(t){var i=(0,g.__assign)({},t);this.update(i)},r.prototype.getLocation=function(){var t=this,i={},n=this.get("locationType"),a=Jd[n];return(0,h.each)(a,function(o){i[o]=t.get(o)}),i},r.prototype.isList=function(){return!1},r.prototype.isSlider=function(){return!1},r.prototype.init=function(){},r.prototype.initCfg=function(){var t=this,i=this.get("defaultCfg");(0,h.each)(i,function(n,a){var o=t.get(a);if((0,h.isObject)(o)){var s=(0,h.deepMix)({},n,o);t.set(a,s)}})},r}(St.Base),Sl=tg,Rr="update_status",eg=["visible","tip","delegateObject"],rg=["container","group","shapesMap","isRegister","isUpdating","destroyed"],ig=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{container:null,shapesMap:{},group:null,capture:!0,isRegister:!1,isUpdating:!1,isInit:!0})},r.prototype.remove=function(){this.clear();var t=this.get("group");t.remove()},r.prototype.clear=function(){var t=this.get("group");t.clear(),this.set("shapesMap",{}),this.clearOffScreenCache(),this.set("isInit",!0)},r.prototype.getChildComponentById=function(t){var i=this.getElementById(t),n=i&&i.get("component");return n},r.prototype.getElementById=function(t){return this.get("shapesMap")[t]},r.prototype.getElementByLocalId=function(t){var i=this.getElementId(t);return this.getElementById(i)},r.prototype.getElementsByName=function(t){var i=[];return(0,h.each)(this.get("shapesMap"),function(n){n.get("name")===t&&i.push(n)}),i},r.prototype.getContainer=function(){return this.get("container")},r.prototype.updateInner=function(t){this.offScreenRender(),this.get("updateAutoRender")&&this.render()},r.prototype.render=function(){var t=this.get("offScreenGroup");t||(t=this.offScreenRender());var i=this.get("group");this.updateElements(t,i),this.deleteElements(),this.applyOffset(),this.get("eventInitted")||(this.initEvent(),this.set("eventInitted",!0)),this.set("isInit",!1)},r.prototype.show=function(){var t=this.get("group");t.show(),this.set("visible",!0)},r.prototype.hide=function(){var t=this.get("group");t.hide(),this.set("visible",!1)},r.prototype.setCapture=function(t){var i=this.get("group");i.set("capture",t),this.set("capture",t)},r.prototype.destroy=function(){this.removeEvent(),this.remove(),e.prototype.destroy.call(this)},r.prototype.getBBox=function(){return this.get("group").getCanvasBBox()},r.prototype.getLayoutBBox=function(){var t=this.get("group"),i=this.getInnerLayoutBBox(),n=t.getTotalMatrix();return n&&(i=jd(n,i)),i},r.prototype.on=function(t,i,n){var a=this.get("group");return a.on(t,i,n),this},r.prototype.off=function(t,i){var n=this.get("group");return n&&n.off(t,i),this},r.prototype.emit=function(t,i){var n=this.get("group");n.emit(t,i)},r.prototype.init=function(){e.prototype.init.call(this),this.get("group")||this.initGroup(),this.offScreenRender()},r.prototype.getInnerLayoutBBox=function(){return this.get("offScreenBBox")||this.get("group").getBBox()},r.prototype.delegateEmit=function(t,i){var n=this.get("group");i.target=n,n.emit(t,i),ml(n,t,i)},r.prototype.createOffScreenGroup=function(){var t=this.get("group"),i=t.getGroupBase(),n=new i({delegateObject:this.getDelegateObject()});return n},r.prototype.applyOffset=function(){var t=this.get("offsetX"),i=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t,y:i})},r.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()}))},r.prototype.offScreenRender=function(){this.clearOffScreenCache();var t=this.createOffScreenGroup();return this.renderInner(t),this.set("offScreenGroup",t),this.set("offScreenBBox",wl(t)),t},r.prototype.addGroup=function(t,i){this.appendDelegateObject(t,i);var n=t.addGroup(i);return this.get("isRegister")&&this.registerElement(n),n},r.prototype.addShape=function(t,i){this.appendDelegateObject(t,i);var n=t.addShape(i);return this.get("isRegister")&&this.registerElement(n),n},r.prototype.addComponent=function(t,i){var n=i.id,a=i.component,o=(0,g.__rest)(i,["id","component"]),s=new a((0,g.__assign)((0,g.__assign)({},o),{id:n,container:t,updateAutoRender:this.get("updateAutoRender")}));return s.init(),s.render(),this.get("isRegister")&&this.registerElement(s.get("group")),s},r.prototype.initEvent=function(){},r.prototype.removeEvent=function(){var t=this.get("group");t.off()},r.prototype.getElementId=function(t){var i=this.get("id"),n=this.get("name");return i+"-"+n+"-"+t},r.prototype.registerElement=function(t){var i=t.get("id");this.get("shapesMap")[i]=t},r.prototype.unregisterElement=function(t){var i=t.get("id");delete this.get("shapesMap")[i]},r.prototype.moveElementTo=function(t,i){var n=$a(i);t.attr("matrix",n)},r.prototype.addAnimation=function(t,i,n){var a=i.attr("opacity");(0,h.isNil)(a)&&(a=1),i.attr("opacity",0),i.animate({opacity:a},n)},r.prototype.removeAnimation=function(t,i,n){i.animate({opacity:0},n)},r.prototype.updateAnimation=function(t,i,n,a){i.animate(n,a)},r.prototype.updateElements=function(t,i){var n=this,a=this.get("animate"),o=this.get("animateOption"),s=t.getChildren().slice(0),l;(0,h.each)(s,function(u){var c=u.get("id"),f=n.getElementById(c),v=u.get("name");if(f)if(u.get("isComponent")){var d=u.get("component"),p=f.get("component"),y=(0,h.pick)(d.cfg,(0,h.difference)((0,h.keys)(d.cfg),rg));p.update(y),f.set(Rr,"update")}else{var m=n.getReplaceAttrs(f,u);a&&o.update?n.updateAnimation(v,f,m,o.update):f.attr(m),u.isGroup()&&n.updateElements(u,f),(0,h.each)(eg,function(b){f.set(b,u.get(b))}),Qd(f,u),l=f,f.set(Rr,"update")}else{i.add(u);var x=i.getChildren();if(x.splice(x.length-1,1),l){var _=x.indexOf(l);x.splice(_+1,0,u)}else x.unshift(u);if(n.registerElement(u),u.set(Rr,"add"),u.get("isComponent")){var d=u.get("component");d.set("container",i)}else u.isGroup()&&n.registerNewGroup(u);if(l=u,a){var w=n.get("isInit")?o.appear:o.enter;w&&n.addAnimation(v,u,w)}}})},r.prototype.clearUpdateStatus=function(t){var i=t.getChildren();(0,h.each)(i,function(n){n.set(Rr,null)})},r.prototype.clearOffScreenCache=function(){var t=this.get("offScreenGroup");t&&t.destroy(),this.set("offScreenGroup",null),this.set("offScreenBBox",null)},r.prototype.getDelegateObject=function(){var t,i=this.get("name"),n=(t={},t[i]=this,t.component=this,t);return n},r.prototype.appendDelegateObject=function(t,i){var n=t.get("delegateObject");i.delegateObject||(i.delegateObject={}),(0,h.mix)(i.delegateObject,n)},r.prototype.getReplaceAttrs=function(t,i){var n=t.attr(),a=i.attr();return(0,h.each)(n,function(o,s){a[s]===void 0&&(a[s]=void 0)}),a},r.prototype.registerNewGroup=function(t){var i=this,n=t.getChildren();(0,h.each)(n,function(a){i.registerElement(a),a.set(Rr,"add"),a.isGroup()&&i.registerNewGroup(a)})},r.prototype.deleteElements=function(){var t=this,i=this.get("shapesMap"),n=[];(0,h.each)(i,function(s,l){!s.get(Rr)||s.destroyed?n.push([l,s]):s.set(Rr,null)});var a=this.get("animate"),o=this.get("animateOption");(0,h.each)(n,function(s){var l=s[0],u=s[1];if(!u.destroyed){var c=u.get("name");if(a&&o.leave){var f=(0,h.mix)({callback:function(){t.removeElement(u)}},o.leave);t.removeAnimation(c,u,f)}else t.removeElement(u)}delete i[l]})},r.prototype.removeElement=function(t){if(t.get("isGroup")){var i=t.get("component");i&&i.destroy()}t.remove()},r}(Sl),Ae=ig,to="\u2026";function ng(e){for(var r=0,t=0;t<e.length;t++)r+=Nr(e,t);return r}function Nr(e,r){return e.charCodeAt(r)>0&&e.charCodeAt(r)<128?1:2}function ag(e,r,t){t===void 0&&(t="tail");var i=e.length,n="";if(t==="tail"){for(var a=0,o=0;a<r;){var s=Nr(e,o);if(a+s<=r)n+=e[o],a+=Nr(e,o),o++;else break}n+=to}else if(t==="head"){for(var a=0,o=i-1;a<r;){var s=Nr(e,o);if(a+s<=r)n+=e[o],a+=Nr(e,o),o--;else break}n=to+n}else{for(var l="",u="",a=0,c=0,f=i-1;a<r;){var v=Nr(e,c),d=!1;v+a<=r&&(l+=e[c],c++,a+=v,d=!0);var p=Nr(e,f);if(p+a<=r&&(u=e[f]+u,a+=p,f--,d=!0),!d)break}n=l+to+u}return n}var og="\u2026",sg=2,lg=400;function ug(e){for(var r=e.map(function(l){var u=l.attr("text");return(0,h.isNil)(u)?"":""+u}),t=0,i=0,n=0;n<r.length;n+=1){for(var a=0,o=0;o<=r[n].length;o+=1){var s=r[n].charCodeAt(o);s>=19968&&s<=40869?a+=2:a+=1}a>t&&(t=a,i=n)}return e[i].getBBox().width}function eo(e){if(e.length>lg)return ug(e);var r=0;return(0,h.each)(e,function(t){var i=t.getBBox(),n=i.width;r<n&&(r=n)}),r}function cg(e,r){var t=r.getCanvasBBox();return e?t.width:t.height}function LL(e,r){return e.getBBox().width<r}function zi(e,r,t,i){var n;i===void 0&&(i="tail");var a=(n=r.attr("text"))!==null&&n!==void 0?n:"";if(i==="tail"){var o=(0,h.pick)(r.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),s=(0,h.getEllipsisText)(a,t,o,"\u2026");return a!==s?(r.attr("text",s),r.set("tip",a),!0):(r.set("tip",null),!1)}var l=cg(e,r),u=ng(a),c=!1;if(t<l){var f=Math.floor(t/l*u)-sg,v=void 0;f>=0?v=ag(a,f,i):v=og,v&&(r.attr("text",v),c=!0)}return c?r.set("tip",a):r.set("tip",null),c}function On(e,r){var t=r.x,i=r.y,n=r.content,a=r.style,o=r.id,s=r.name,l=r.rotate,u=r.maxLength,c=r.autoEllipsis,f=r.isVertical,v=r.ellipsisPosition,d=r.background,p=e.addGroup({id:o+"-group",name:s+"-group",attrs:{x:t,y:i}}),y=p.addShape({type:"text",id:o,name:s,attrs:(0,g.__assign)({x:0,y:0,text:n},a)}),m=Ln((0,h.get)(d,"padding",0));if(u&&c){var x=u-(m[1]+m[3]);zi(!f,y,x,v)}if(d){var _=(0,h.get)(d,"style",{}),w=y.getCanvasBBox(),b=w.minX,S=w.minY,C=w.width,A=w.height,F=p.addShape("rect",{id:o+"-bg",name:o+"-bg",attrs:(0,g.__assign)({x:b-m[3],y:S-m[0],width:C+m[1]+m[3],height:A+m[0]+m[2]},_)});F.toBack()}Qa(p,t,i),_l(p,l,t,i)}var Vt={fontFamily:`
  13. BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue",
  14. Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
  15. 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)"},hg=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"annotation",type:"line",locationType:"region",start:null,end:null,style:{},text:null,defaultCfg:{style:{fill:Vt.textColor,fontSize:12,textAlign:"center",textBaseline:"bottom",fontFamily:Vt.fontFamily},text:{position:"center",autoRotate:!0,content:null,offsetX:0,offsetY:0,style:{stroke:Vt.lineColor,lineWidth:1}}}})},r.prototype.renderInner=function(t){this.renderLine(t),this.get("text")&&this.renderLabel(t)},r.prototype.renderLine=function(t){var i=this.get("start"),n=this.get("end"),a=this.get("style");this.addShape(t,{type:"line",id:this.getElementId("line"),name:"annotation-line",attrs:(0,g.__assign)({x1:i.x,y1:i.y,x2:n.x,y2:n.y},a)})},r.prototype.getLabelPoint=function(t,i,n){var a;return n==="start"?a=0:n==="center"?a=.5:(0,h.isString)(n)&&n.indexOf("%")!==-1?a=parseInt(n,10)/100:(0,h.isNumber)(n)?a=n:a=1,(a>1||a<0)&&(a=1),{x:Br(t.x,i.x,a),y:Br(t.y,i.y,a)}},r.prototype.renderLabel=function(t){var i=this.get("text"),n=this.get("start"),a=this.get("end"),o=i.position,s=i.content,l=i.style,u=i.offsetX,c=i.offsetY,f=i.autoRotate,v=i.maxLength,d=i.autoEllipsis,p=i.ellipsisPosition,y=i.background,m=i.isVertical,x=m===void 0?!1:m,_=this.getLabelPoint(n,a,o),w=_.x+u,b=_.y+c,S={id:this.getElementId("line-text"),name:"annotation-line-text",x:w,y:b,content:s,style:l,maxLength:v,autoEllipsis:d,ellipsisPosition:p,background:y,isVertical:x};if(f){var C=[a.x-n.x,a.y-n.y];S.rotate=Math.atan2(C[1],C[0])}On(t,S)},r}(Ae),fg=hg,vg=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},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:Vt.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:Vt.fontFamily}}})},r.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},r.prototype.renderInner=function(t){var i=this.getLocation(),n=i.x,a=i.y,o=this.get("content"),s=this.get("style"),l=this.getElementId("text"),u=this.get("name")+"-text",c=this.get("maxLength"),f=this.get("autoEllipsis"),v=this.get("isVertical"),d=this.get("ellipsisPosition"),p=this.get("background"),y=this.get("rotate"),m={id:l,name:u,x:n,y:a,content:o,style:s,maxLength:c,autoEllipsis:f,isVertical:v,ellipsisPosition:d,background:p,rotate:y};On(t,m)},r.prototype.resetLocation=function(){var t=this.getElementByLocalId("text-group");if(t){var i=this.getLocation(),n=i.x,a=i.y,o=this.get("rotate");Qa(t,n,a),_l(t,o,n,a)}},r}(Ae),dg=vg,gg=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},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}})},r.prototype.renderInner=function(t){this.renderArc(t)},r.prototype.getArcPath=function(){var t=this.getLocation(),i=t.center,n=t.radius,a=t.startAngle,o=t.endAngle,s=oi(i,n,a),l=oi(i,n,o),u=o-a>Math.PI?1:0,c=[["M",s.x,s.y]];if(o-a==Math.PI*2){var f=oi(i,n,a+Math.PI);c.push(["A",n,n,0,u,1,f.x,f.y]),c.push(["A",n,n,0,u,1,l.x,l.y])}else c.push(["A",n,n,0,u,1,l.x,l.y]);return c},r.prototype.renderArc=function(t){var i=this.getArcPath(),n=this.get("style");this.addShape(t,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:(0,g.__assign)({path:i},n)})},r}(Ae),pg=gg,yg=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:Vt.regionColor,opacity:.4}}})},r.prototype.renderInner=function(t){this.renderRegion(t)},r.prototype.renderRegion=function(t){var i=this.get("start"),n=this.get("end"),a=this.get("style"),o=Ri({start:i,end:n});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:(0,g.__assign)({x:o.x,y:o.y,width:o.width,height:o.height},a)})},r}(Ae),mg=yg,xg=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"annotation",type:"image",locationType:"region",start:null,end:null,src:null,style:{}})},r.prototype.renderInner=function(t){this.renderImage(t)},r.prototype.getImageAttrs=function(){var t=this.get("start"),i=this.get("end"),n=this.get("style"),a=Ri({start:t,end:i}),o=this.get("src");return(0,g.__assign)({x:a.x,y:a.y,img:o,width:a.width,height:a.height},n)},r.prototype.renderImage=function(t){this.addShape(t,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})},r}(Ae),_g=xg,wg=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},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:Vt.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:Vt.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:Vt.fontFamily}}}})},r.prototype.renderInner=function(t){(0,h.get)(this.get("line"),"display")&&this.renderLine(t),(0,h.get)(this.get("text"),"display")&&this.renderText(t),(0,h.get)(this.get("point"),"display")&&this.renderPoint(t),this.get("autoAdjust")&&this.autoAdjust(t)},r.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x")+this.get("offsetX"),y:this.get("y")+this.get("offsetY")})},r.prototype.renderPoint=function(t){var i=this.getShapeAttrs().point;this.addShape(t,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:i})},r.prototype.renderLine=function(t){var i=this.getShapeAttrs().line;this.addShape(t,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:i})},r.prototype.renderText=function(t){var i=this.getShapeAttrs().text,n=i.x,a=i.y,o=i.text,s=(0,g.__rest)(i,["x","y","text"]),l=this.get("text"),u=l.background,c=l.maxLength,f=l.autoEllipsis,v=l.isVertival,d=l.ellipsisPosition,p={x:n,y:a,id:this.getElementId("text"),name:"annotation-text",content:o,style:s,background:u,maxLength:c,autoEllipsis:f,isVertival:v,ellipsisPosition:d};On(t,p)},r.prototype.autoAdjust=function(t){var i=this.get("direction"),n=this.get("x"),a=this.get("y"),o=(0,h.get)(this.get("line"),"length",0),s=this.get("coordinateBBox"),l=t.getBBox(),u=l.minX,c=l.maxX,f=l.minY,v=l.maxY,d=t.findById(this.getElementId("text-group")),p=t.findById(this.getElementId("text")),y=t.findById(this.getElementId("line"));if(!!s&&d){var m=d.attr("x"),x=d.attr("y"),_=void 0,w=void 0,b=0,S=0;if(n+u<=s.minX)if(i==="leftward")w="start",b=1;else{var C=s.minX-(n+u);m=d.attr("x")+C}else if(n+c>=s.maxX)if(i==="rightward")w="end",b=-1;else{var C=n+c-s.maxX;m=d.attr("x")-C}if(!!b&&w&&(p.attr("textAlign",w),y&&y.attr("path",[["M",0,0],["L",o*b,0]]),m=(o+2)*b),a+f<=s.minY)if(i==="upward")_="top",S=1;else{var C=s.minY-(a+f);x=d.attr("y")+C}else if(a+v>=s.maxY)if(i==="downward")_="bottom",S=-1;else{var C=a+v-s.maxY;x=d.attr("y")-C}!!S&&_&&(p.attr("textBaseline",_),y&&y.attr("path",[["M",0,0],["L",0,o*S]]),x=(o+2)*S),(m!==d.attr("x")||x!==d.attr("y"))&&Qa(d,m,x)}},r.prototype.getShapeAttrs=function(){var t=(0,h.get)(this.get("line"),"display"),i=(0,h.get)(this.get("point"),"style",{}),n=(0,h.get)(this.get("line"),"style",{}),a=(0,h.get)(this.get("text"),"style",{}),o=this.get("direction"),s=t?(0,h.get)(this.get("line"),"length",0):0,l=0,u=0,c="top",f="start";switch(o){case"upward":u=-1,c="bottom";break;case"downward":u=1,c="top";break;case"leftward":l=-1,f="end";break;case"rightward":l=1,f="start";break}return{point:(0,g.__assign)({x:0,y:0},i),line:(0,g.__assign)({path:[["M",0,0],["L",0,s*l,s*u]]},n),text:(0,g.__assign)({x:(s+2)*l,y:(s+2)*u,text:(0,h.get)(this.get("text"),"content",""),textBaseline:c,textAlign:f},a)}},r}(Ae),bg=wg,Sg=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:Vt.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:Vt.textColor,fontFamily:Vt.fontFamily}}}})},r.prototype.renderInner=function(t){var i=(0,h.get)(this.get("region"),"style",{}),n=(0,h.get)(this.get("text"),"style",{}),a=this.get("lineLength")||0,o=this.get("points");if(!!o.length){var s=qd(o),l=[];l.push(["M",o[0].x,s.minY-a]),o.forEach(function(c){l.push(["L",c.x,c.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,g.__assign)({path:l},i)});var u=(0,g.__assign)({id:this.getElementId("text"),name:"annotation-text",x:(s.minX+s.maxX)/2,y:s.minY-a},this.get("text"));On(t,u)}},r}(Ae),Cg=Sg,Ag=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},r.prototype.renderInner=function(t){var i=this,n=this.get("start"),a=this.get("end"),o=this.addGroup(t,{id:this.getElementId("region-filter"),capture:!1});(0,h.each)(this.get("shapes"),function(l,u){var c=l.get("type"),f=(0,h.clone)(l.attr());i.adjustShapeAttrs(f),i.addShape(o,{id:i.getElementId("shape-"+c+"-"+u),capture:!1,type:c,attrs:f})});var s=Ri({start:n,end:a});o.setClip({type:"rect",attrs:{x:s.minX,y:s.minY,width:s.width,height:s.height}})},r.prototype.adjustShapeAttrs=function(t){var i=this.get("color");t.fill&&(t.fill=t.fillStyle=i),t.stroke=t.strokeStyle=i},r}(Ae),Mg=Ag,Fg=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"annotation",type:"shape",draw:h.noop})},r.prototype.renderInner=function(t){var i=this.get("render");(0,h.isFunction)(i)&&i(t)},r}(Ae),Eg=Fg;function Ie(e,r,t){var i;try{i=window.getComputedStyle?window.getComputedStyle(e,null)[r]:e.style[r]}catch(n){}finally{i=i===void 0?t:i}return i}function Tg(e,r){var t=Ie(e,"width",r);return t==="auto"&&(t=e.offsetWidth),parseFloat(t)}function Lg(e,r){var t=Tg(e,r),i=parseFloat(Ie(e,"borderLeftWidth"))||0,n=parseFloat(Ie(e,"paddingLeft"))||0,a=parseFloat(Ie(e,"paddingRight"))||0,o=parseFloat(Ie(e,"borderRightWidth"))||0,s=parseFloat(Ie(e,"marginRight"))||0,l=parseFloat(Ie(e,"marginLeft"))||0;return t+i+o+n+a+l+s}function Ig(e,r){var t=Ie(e,"height",r);return t==="auto"&&(t=e.offsetHeight),parseFloat(t)}function Og(e,r){var t=Ig(e,r),i=parseFloat(Ie(e,"borderTopWidth"))||0,n=parseFloat(Ie(e,"paddingTop"))||0,a=parseFloat(Ie(e,"paddingBottom"))||0,o=parseFloat(Ie(e,"borderBottomWidth"))||0,s=parseFloat(Ie(e,"marginTop"))||0,l=parseFloat(Ie(e,"marginBottom"))||0;return t+i+o+n+a+s+l}var Pg=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{container:null,containerTpl:"<div></div>",updateAutoRender:!0,containerClassName:"",parent:null})},r.prototype.getContainer=function(){return this.get("container")},r.prototype.show=function(){var t=this.get("container");t.style.display="",this.set("visible",!0)},r.prototype.hide=function(){var t=this.get("container");t.style.display="none",this.set("visible",!1)},r.prototype.setCapture=function(t){var i=this.getContainer(),n=t?"auto":"none";i.style.pointerEvents=n,this.set("capture",t)},r.prototype.getBBox=function(){var t=this.getContainer(),i=parseFloat(t.style.left)||0,n=parseFloat(t.style.top)||0;return Ni(i,n,t.clientWidth,t.clientHeight)},r.prototype.clear=function(){var t=this.get("container");Ja(t)},r.prototype.destroy=function(){this.removeEvent(),this.removeDom(),e.prototype.destroy.call(this)},r.prototype.init=function(){e.prototype.init.call(this),this.initContainer(),this.initDom(),this.resetStyles(),this.applyStyles(),this.initEvent(),this.initCapture(),this.initVisible()},r.prototype.initCapture=function(){this.setCapture(this.get("capture"))},r.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},r.prototype.initDom=function(){},r.prototype.initContainer=function(){var t=this.get("container");if((0,h.isNil)(t)){t=this.createDom();var i=this.get("parent");(0,h.isString)(i)&&(i=document.getElementById(i),this.set("parent",i)),i.appendChild(t),this.get("containerId")&&t.setAttribute("id",this.get("containerId")),this.set("container",t)}else(0,h.isString)(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},r.prototype.resetStyles=function(){var t=this.get("domStyles"),i=this.get("defaultStyles");t?t=(0,h.deepMix)({},i,t):t=i,this.set("domStyles",t)},r.prototype.applyStyles=function(){var t=this.get("domStyles");if(!!t){var i=this.getContainer();this.applyChildrenStyles(i,t);var n=this.get("containerClassName");if(n&&Zd(i,n)){var a=t[n];(0,k.Z)(i,a)}}},r.prototype.applyChildrenStyles=function(t,i){(0,h.each)(i,function(n,a){var o=t.getElementsByClassName(a);(0,h.each)(o,function(s){(0,k.Z)(s,n)})})},r.prototype.applyStyle=function(t,i){var n=this.get("domStyles");(0,k.Z)(i,n[t])},r.prototype.createDom=function(){var t=this.get("containerTpl");return(0,T.Z)(t)},r.prototype.initEvent=function(){},r.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode&&t.parentNode.removeChild(t)},r.prototype.removeEvent=function(){},r.prototype.updateInner=function(t){(0,h.hasKey)(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},r.prototype.resetPosition=function(){},r}(Sl),ro=Pg,kg=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"annotation",type:"html",locationType:"point",x:0,y:0,containerTpl:'<div class="g2-html-annotation" style="position:absolute"></div>',alignX:"left",alignY:"top",html:"",zIndex:7})},r.prototype.render=function(){var t=this.getContainer(),i=this.get("html");Ja(t);var n=(0,h.isFunction)(i)?i(t):i;if((0,h.isElement)(n))t.appendChild(n);else if((0,h.isString)(n)||(0,h.isNumber)(n)){var a=(0,T.Z)(""+n);a&&t.appendChild(a)}this.resetPosition()},r.prototype.resetPosition=function(){var t=this.getContainer(),i=this.getLocation(),n=i.x,a=i.y,o=this.get("alignX"),s=this.get("alignY"),l=this.get("offsetX"),u=this.get("offsetY"),c=Lg(t),f=Og(t),v={x:n,y:a};o==="middle"?v.x-=Math.round(c/2):o==="right"&&(v.x-=Math.round(c)),s==="middle"?v.y-=Math.round(f/2):s==="bottom"&&(v.y-=Math.round(f)),l&&(v.x+=l),u&&(v.y+=u),(0,k.Z)(t,{position:"absolute",left:v.x+"px",top:v.y+"px",zIndex:this.get("zIndex")})},r}(ro),Dg=kg;function Vi(e,r,t){var i=r+"Style",n=null;return(0,h.each)(t,function(a,o){e[o]&&a[i]&&(n||(n={}),(0,h.mix)(n,a[i]))}),n}var Bg=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},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:Vt.lineColor}},tickLine:{style:{lineWidth:1,stroke:Vt.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:Vt.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:Vt.textColor,fontFamily:Vt.fontFamily,fontWeight:"normal"},offset:10,offsetX:0,offsetY:0},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:Vt.textColor,textBaseline:"middle",fontFamily:Vt.fontFamily,textAlign:"center"},iconStyle:{fill:Vt.descriptionIconFill,stroke:Vt.descriptionIconStroke},description:""},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:Vt.uncheckedColor}}},optimize:{enable:!0,threshold:400}},theme:{}})},r.prototype.renderInner=function(t){this.get("line")&&this.drawLine(t),this.drawTicks(t),this.get("title")&&this.drawTitle(t)},r.prototype.isList=function(){return!0},r.prototype.getItems=function(){return this.get("ticks")},r.prototype.setItems=function(t){this.update({ticks:t})},r.prototype.updateItem=function(t,i){(0,h.mix)(t,i),this.clear(),this.render()},r.prototype.clearItems=function(){var t=this.getElementByLocalId("label-group");t&&t.clear()},r.prototype.setItemState=function(t,i,n){t[i]=n,this.updateTickStates(t)},r.prototype.hasState=function(t,i){return!!t[i]},r.prototype.getItemStates=function(t){var i=this.get("tickStates"),n=[];return(0,h.each)(i,function(a,o){t[o]&&n.push(o)}),n},r.prototype.clearItemsState=function(t){var i=this,n=this.getItemsByState(t);(0,h.each)(n,function(a){i.setItemState(a,t,!1)})},r.prototype.getItemsByState=function(t){var i=this,n=this.getItems();return(0,h.filter)(n,function(a){return i.hasState(a,t)})},r.prototype.getSidePoint=function(t,i){var n=this,a=n.getSideVector(i,t);return{x:t.x+a[0],y:t.y+a[1]}},r.prototype.getTextAnchor=function(t){var i;return(0,h.isNumberEqual)(t[0],0)?i="center":t[0]>0?i="start":t[0]<0&&(i="end"),i},r.prototype.getTextBaseline=function(t){var i;return(0,h.isNumberEqual)(t[1],0)?i="middle":t[1]>0?i="top":t[1]<0&&(i="bottom"),i},r.prototype.processOverlap=function(t){},r.prototype.drawLine=function(t){var i=this.getLinePath(),n=this.get("line");this.addShape(t,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:(0,h.mix)({path:i},n.style)})},r.prototype.getTickLineItems=function(t){var i=this,n=[],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,h.each)(t,function(c){var f=c.point;o||(f=i.getTickPoint(c.value-l/2));var v=i.getSidePoint(f,s);n.push({startPoint:f,tickValue:c.value,endPoint:v,tickId:c.id,id:"tickline-"+c.id})}),n},r.prototype.getSubTickLineItems=function(t){var i=[],n=this.get("subTickLine"),a=n.count,o=t.length;if(o>=2)for(var s=0;s<o-1;s++)for(var l=t[s],u=t[s+1],c=0;c<a;c++){var f=(c+1)/(a+1),v=(1-f)*l.tickValue+f*u.tickValue,d=this.getTickPoint(v),p=this.getSidePoint(d,n.length);i.push({startPoint:d,endPoint:p,tickValue:v,id:"sub-"+l.id+"-"+c})}return i},r.prototype.getTickLineAttrs=function(t,i,n,a){var o=this.get(i).style,s={points:[t.startPoint,t.endPoint]},l=(0,h.get)(this.get("theme"),["tickLine","style"],{});o=(0,h.isFunction)(o)?(0,h.mix)({},l,o(s,n,a)):o;var u=t.startPoint,c=t.endPoint;return(0,g.__assign)({x1:u.x,y1:u.y,x2:c.x,y2:c.y},o)},r.prototype.drawTick=function(t,i,n,a,o){this.addShape(i,{type:"line",id:this.getElementId(t.id),name:"axis-"+n,attrs:this.getTickLineAttrs(t,n,a,o)})},r.prototype.drawTickLines=function(t){var i=this,n=this.get("ticks"),a=this.get("subTickLine"),o=this.getTickLineItems(n),s=this.addGroup(t,{name:"axis-tickline-group",id:this.getElementId("tickline-group")}),l=this.get("tickLine");if((0,h.each)(o,function(c,f){if(l.displayWithLabel){var v=i.getElementId("label-"+c.tickId);t.findById(v)&&i.drawTick(c,s,"tickLine",f,o)}else i.drawTick(c,s,"tickLine",f,o)}),a){var u=this.getSubTickLineItems(o);(0,h.each)(u,function(c,f){i.drawTick(c,s,"subTickLine",f,u)})}},r.prototype.processTicks=function(){var t=this,i=this.get("ticks");(0,h.each)(i,function(n){n.point=t.getTickPoint(n.value),(0,h.isNil)(n.id)&&(n.id=n.name)})},r.prototype.drawTicks=function(t){var i=this;this.optimizeTicks(),this.processTicks(),this.get("label")&&this.drawLabels(t),this.get("tickLine")&&this.drawTickLines(t);var n=this.get("ticks");(0,h.each)(n,function(a){i.applyTickStates(a,t)})},r.prototype.optimizeTicks=function(){var t=this.get("optimize"),i=this.get("ticks");if(t&&t.enable&&t.threshold>0){var n=(0,h.size)(i);if(n>t.threshold){var a=Math.ceil(n/t.threshold),o=i.filter(function(s,l){return l%a==0});this.set("ticks",o),this.set("originalTicks",i)}}},r.prototype.getLabelAttrs=function(t,i,n){var a=this.get("label"),o=a.offset,s=a.offsetX,l=a.offsetY,u=a.rotate,c=a.formatter,f=this.getSidePoint(t.point,o),v=this.getSideVector(o,f),d=c?c(t.name,t,i):t.name,p=a.style;p=(0,h.isFunction)(p)?(0,h.get)(this.get("theme"),["label","style"],{}):p;var y=(0,h.mix)({x:f.x+s,y:f.y+l,text:d,textAlign:this.getTextAnchor(v),textBaseline:this.getTextBaseline(v)},p);return u&&(y.matrix=Dr(f,u)),y},r.prototype.drawLabels=function(t){var i=this,n=this.get("ticks"),a=this.addGroup(t,{name:"axis-label-group",id:this.getElementId("label-group")});(0,h.each)(n,function(v,d){i.addShape(a,{type:"text",name:"axis-label",id:i.getElementId("label-"+v.id),attrs:i.getLabelAttrs(v,d,n),delegateObject:{tick:v,item:v,index:d}})}),this.processOverlap(a);var o=a.getChildren(),s=(0,h.get)(this.get("theme"),["label","style"],{}),l=this.get("label"),u=l.style,c=l.formatter;if((0,h.isFunction)(u)){var f=o.map(function(v){return(0,h.get)(v.get("delegateObject"),"tick")});(0,h.each)(o,function(v,d){var p=v.get("delegateObject").tick,y=c?c(p.name,p,d):p.name,m=(0,h.mix)({},s,u(y,d,f));v.attr(m)})}},r.prototype.getTitleAttrs=function(){var t=this.get("title"),i=t.style,n=t.position,a=t.offset,o=t.spacing,s=o===void 0?0:o,l=t.autoRotate,u=i.fontSize,c=.5;n==="start"?c=0:n==="end"&&(c=1);var f=this.getTickPoint(c),v=this.getSidePoint(f,a||s+u/2),d=(0,h.mix)({x:v.x,y:v.y,text:t.text},i),p=t.rotate,y=p;if((0,h.isNil)(p)&&l){var m=this.getAxisVector(f),x=[1,0];y=ie.Dg(m,x,!0)}if(y){var _=Dr(v,y);d.matrix=_}return d},r.prototype.drawTitle=function(t){var i,n=this.getTitleAttrs(),a=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"axis-title",attrs:n});((i=this.get("title"))===null||i===void 0?void 0:i.description)&&this.drawDescriptionIcon(t,a,n.matrix)},r.prototype.drawDescriptionIcon=function(t,i,n){var a=this.addGroup(t,{name:"axis-description",id:this.getElementById("description")}),o=i.getBBox(),s=o.maxX,l=o.maxY,u=o.height,c=this.get("title").iconStyle,f=4,v=u/2,d=v/6,p=s+f,y=l-u/2,m=[p+v,y-v],x=m[0],_=m[1],w=[x+v,_+v],b=w[0],S=w[1],C=[x,S+v],A=C[0],F=C[1],P=[p,_+v],I=P[0],V=P[1],Z=[p+v,y-u/4],vt=Z[0],yt=Z[1],Bt=[vt,yt+d],G=Bt[0],at=Bt[1],mt=[G,at+d],ut=mt[0],pt=mt[1],At=[ut,pt+v*3/4],Gt=At[0],Wt=At[1];this.addShape(a,{type:"path",id:this.getElementId("title-description-icon"),name:"axis-title-description-icon",attrs:(0,g.__assign)({path:[["M",x,_],["A",v,v,0,0,1,b,S],["A",v,v,0,0,1,A,F],["A",v,v,0,0,1,I,V],["A",v,v,0,0,1,x,_],["M",vt,yt],["L",G,at],["M",ut,pt],["L",Gt,Wt]],lineWidth:d,matrix:n},c)}),this.addShape(a,{type:"rect",id:this.getElementId("title-description-rect"),name:"axis-title-description-rect",attrs:{x:p,y:y-u/2,width:u,height:u,stroke:"#000",fill:"#000",opacity:0,matrix:n,cursor:"pointer"}})},r.prototype.applyTickStates=function(t,i){var n=this.getItemStates(t);if(n.length){var a=this.get("tickStates"),o=this.getElementId("label-"+t.id),s=i.findById(o);if(s){var l=Vi(t,"label",a);l&&s.attr(l)}var u=this.getElementId("tickline-"+t.id),c=i.findById(u);if(c){var f=Vi(t,"tickLine",a);f&&c.attr(f)}}},r.prototype.updateTickStates=function(t){var i=this.getItemStates(t),n=this.get("tickStates"),a=this.get("label"),o=this.getElementByLocalId("label-"+t.id),s=this.get("tickLine"),l=this.getElementByLocalId("tickline-"+t.id);if(i.length){if(o){var u=Vi(t,"label",n);u&&o.attr(u)}if(l){var c=Vi(t,"tickLine",n);c&&l.attr(c)}}else o&&o.attr(a.style),l&&l.attr(s.style)},r}(Ae),Cl=Bg;function io(e,r,t,i){var n=r.getChildren(),a=!1;return(0,h.each)(n,function(o){var s=zi(e,o,t,i);a=a||s}),a}function Rg(){return Al}function Ng(e,r,t){return io(e,r,t,"head")}function Al(e,r,t){return io(e,r,t,"tail")}function zg(e,r,t){return io(e,r,t,"middle")}function Vg(e){var r=e.attr("matrix");return r&&r[0]!==1}function Ml(e){var r=Vg(e)?Ud(e.attr("matrix")):0;return r%360}function no(e,r,t,i){var n=!1,a=Ml(r),o=Math.abs(e?t.attr("y")-r.attr("y"):t.attr("x")-r.attr("x")),s=(e?t.attr("y")>r.attr("y"):t.attr("x")>r.attr("x"))?r.getBBox():t.getBBox();if(e){var l=Math.abs(Math.cos(a));In(l,0,Math.PI/180)?n=s.width+i>o:n=s.height/l+i>o}else{var l=Math.abs(Math.sin(a));In(l,0,Math.PI/180)?n=s.width+i>o:n=s.height/l+i>o}return n}function Gi(e,r,t,i){var n=(i==null?void 0:i.minGap)||0,a=r.getChildren().slice().filter(function(p){return p.get("visible")});if(!a.length)return!1;var o=!1;t&&a.reverse();for(var s=a.length,l=a[0],u=l,c=1;c<s;c++){var f=a[c],v=f.getBBox(),d=no(e,u,f,n);d?(f.hide(),o=!0):u=f}return o}function Fl(e,r,t){var i=(t==null?void 0:t.minGap)||0,n=r.getChildren().slice();if(n.length<2)return!1;var a=!1,o=n[0],s=o.getBBox(),l=n[1],u=n.length,c=Ml(o),f=Math.abs(e?l.attr("y")-o.attr("y"):l.attr("x")-o.attr("x")),v=0;if(e){var d=Math.abs(Math.cos(c));if(In(d,0,Math.PI/180)){var p=eo(n);v=(p+i)/f}else v=(s.height/d+i)/f}else{var d=Math.abs(Math.sin(c));if(In(d,0,Math.PI/180)){var p=eo(n);v=(p+i)/f}else v=(s.height/d+i)/f}if(v>1){v=Math.ceil(v);for(var y=0;y<u;y++)y%v!=0&&(n[y].hide(),a=!0)}return a}function Gg(){return El}function Wg(e,r,t,i){return Gi(e,r,!1,i)}function Hg(e,r,t,i){return Gi(e,r,!0,i)}function Yg(e,r,t,i){var n=(i==null?void 0:i.minGap)||0,a=r.getChildren().slice();if(a.length<=2)return!1;for(var o=!1,s=a.length,l=a[0],u=a[s-1],c=l,f=1;f<s-1;f++){var v=a[f],d=v.getBBox(),p=no(e,c,v,n);p?(v.hide(),o=!0):c=v}var y=no(e,c,u,n);return y&&(c.hide(),o=!0),o}function El(e,r,t,i){var n=Fl(e,r,i);return Gi(e,r,!1)&&(n=!0),n}function Xg(e,r,t,i){var n=r.getChildren().slice(),a=Fl(e,r,i);if(n.length>2){var o=n[0],s=n[n.length-1];o.get("visible")||(o.show(),Gi(e,r,!1,i)&&(a=!0)),s.get("visible")||(s.show(),Gi(e,r,!0,i)&&(a=!0))}return a}function Ug(e,r){(0,h.each)(e,function(t){var i=t.attr("x"),n=t.attr("y"),a=Dr({x:i,y:n},r);t.attr("matrix",a)})}function Tl(e,r,t,i){var n=r.getChildren();if(!n.length||!e&&n.length<2)return!1;var a=eo(n),o=!1;if(e)o=!!t&&a>t;else{var s=Math.abs(n[1].attr("x")-n[0].attr("x"));o=a>s}if(o){var l=i(t,a);Ug(n,l)}return o}function jg(){return Ll}function Ll(e,r,t,i){return Tl(e,r,t,function(){return(0,h.isNumber)(i)?i:e?Vt.verticalAxisRotate:Vt.horizontalAxisRotate})}function Zg(e,r,t){return Tl(e,r,t,function(i,n){if(!i)return e?Vt.verticalAxisRotate:Vt.horizontalAxisRotate;if(e)return-Math.acos(i/n);var a=0;return i>n?a=Math.PI/4:(a=Math.asin(i/n),a>Math.PI/4&&(a=Math.PI/4)),a})}var qg=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{type:"line",locationType:"region",start:null,end:null})},r.prototype.getLinePath=function(){var t=this.get("start"),i=this.get("end"),n=[];return n.push(["M",t.x,t.y]),n.push(["L",i.x,i.y]),n},r.prototype.getInnerLayoutBBox=function(){var t=this.get("start"),i=this.get("end"),n=e.prototype.getInnerLayoutBBox.call(this),a=Math.min(t.x,i.x,n.x),o=Math.min(t.y,i.y,n.y),s=Math.max(t.x,i.x,n.maxX),l=Math.max(t.y,i.y,n.maxY);return{x:a,y:o,minX:a,minY:o,maxX:s,maxY:l,width:s-a,height:l-o}},r.prototype.isVertical=function(){var t=this.get("start"),i=this.get("end");return(0,h.isNumberEqual)(t.x,i.x)},r.prototype.isHorizontal=function(){var t=this.get("start"),i=this.get("end");return(0,h.isNumberEqual)(t.y,i.y)},r.prototype.getTickPoint=function(t){var i=this,n=i.get("start"),a=i.get("end"),o=a.x-n.x,s=a.y-n.y;return{x:n.x+o*t,y:n.y+s*t}},r.prototype.getSideVector=function(t){var i=this.getAxisVector(),n=Lt.normalize([0,0],i),a=this.get("verticalFactor"),o=[n[1],n[0]*-1];return Lt.scale([0,0],o,t*a)},r.prototype.getAxisVector=function(){var t=this.get("start"),i=this.get("end");return[i.x-t.x,i.y-t.y]},r.prototype.processOverlap=function(t){var i=this,n=this.isVertical(),a=this.isHorizontal();if(!(!n&&!a)){var o=this.get("label"),s=this.get("title"),l=this.get("verticalLimitLength"),u=o.offset,c=l,f=0,v=0;s&&(f=s.style.fontSize,v=s.spacing),c&&(c=c-u-v-f);var d=this.get("overlapOrder");if((0,h.each)(d,function(m){o[m]&&i.canProcessOverlap(m)&&i.autoProcessOverlap(m,o[m],t,c)}),s&&(0,h.isNil)(s.offset)){var p=t.getCanvasBBox(),y=n?p.width:p.height;s.offset=u+y+v+f/2}}},r.prototype.canProcessOverlap=function(t){var i=this.get("label");return t==="autoRotate"?(0,h.isNil)(i.rotate):!0},r.prototype.autoProcessOverlap=function(t,i,n,a){var o=this,s=this.isVertical(),l=!1,u=ft[t];if(i===!0){var c=this.get("label");l=u.getDefault()(s,n,a)}else if((0,h.isFunction)(i))l=i(s,n,a);else if((0,h.isObject)(i)){var f=i;u[f.type]&&(l=u[f.type](s,n,a,f.cfg))}else u[i]&&(l=u[i](s,n,a));if(t==="autoRotate"){if(l){var v=n.getChildren(),d=this.get("verticalFactor");(0,h.each)(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 p=n.getChildren().slice(0);(0,h.each)(p,function(y){y.get("visible")||(o.get("isRegister")&&o.unregisterElement(y),y.remove())})}},r}(Cl),Kg=qg,$g=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:Math.PI*3/2})},r.prototype.getLinePath=function(){var t=this.get("center"),i=t.x,n=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",i,n-o],["A",a,o,0,1,1,i,n+o],["A",a,o,0,1,1,i,n-o],["Z"]];else{var c=this.getCirclePoint(s),f=this.getCirclePoint(l),v=Math.abs(l-s)>Math.PI?1:0,d=s>l?0:1;u=[["M",i,n],["L",c.x,c.y],["A",a,o,0,v,d,f.x,f.y],["L",i,n]]}return u},r.prototype.getTickPoint=function(t){var i=this.get("startAngle"),n=this.get("endAngle"),a=i+(n-i)*t;return this.getCirclePoint(a)},r.prototype.getSideVector=function(t,i){var n=this.get("center"),a=[i.x-n.x,i.y-n.y],o=this.get("verticalFactor"),s=Lt.length(a);return Lt.scale(a,a,o*t/s),a},r.prototype.getAxisVector=function(t){var i=this.get("center"),n=[t.x-i.x,t.y-i.y];return[n[1],-1*n[0]]},r.prototype.getCirclePoint=function(t,i){var n=this.get("center");return i=i||this.get("radius"),{x:n.x+Math.cos(t)*i,y:n.y+Math.sin(t)*i}},r.prototype.canProcessOverlap=function(t){var i=this.get("label");return t==="autoRotate"?(0,h.isNil)(i.rotate):!0},r.prototype.processOverlap=function(t){var i=this,n=this.get("label"),a=this.get("title"),o=this.get("verticalLimitLength"),s=n.offset,l=o,u=0,c=0;a&&(u=a.style.fontSize,c=a.spacing),l&&(l=l-s-c-u);var f=this.get("overlapOrder");if((0,h.each)(f,function(d){n[d]&&i.canProcessOverlap(d)&&i.autoProcessOverlap(d,n[d],t,l)}),a&&(0,h.isNil)(a.offset)){var v=t.getCanvasBBox().height;a.offset=s+v+c+u/2}},r.prototype.autoProcessOverlap=function(t,i,n,a){var o=this,s=!1,l=ft[t];if(a>0)if(i===!0)s=l.getDefault()(!1,n,a);else if((0,h.isFunction)(i))s=i(!1,n,a);else if((0,h.isObject)(i)){var u=i;l[u.type]&&(s=l[u.type](!1,n,a,u.cfg))}else l[i]&&(s=l[i](!1,n,a));if(t==="autoRotate"){if(s){var c=n.getChildren(),f=this.get("verticalFactor");(0,h.each)(c,function(d){var p=d.attr("textAlign");if(p==="center"){var y=f>0?"end":"start";d.attr("textAlign",y)}})}}else if(t==="autoHide"){var v=n.getChildren().slice(0);(0,h.each)(v,function(d){d.get("visible")||(o.get("isRegister")&&o.unregisterElement(d),d.remove())})}},r}(Cl),Qg=$g,Jg=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:Vt.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:Vt.textColor,textAlign:"center",textBaseline:"middle",fontFamily:Vt.fontFamily}},textBackground:{padding:5,style:{stroke:Vt.lineColor}}}})},r.prototype.renderInner=function(t){this.get("line")&&this.renderLine(t),this.get("text")&&(this.renderText(t),this.renderBackground(t))},r.prototype.renderText=function(t){var i=this.get("text"),n=i.style,a=i.autoRotate,o=i.content;if(!(0,h.isNil)(o)){var s=this.getTextPoint(),l=null;if(a){var u=this.getRotateAngle();l=Dr(s,u)}this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:(0,g.__assign)((0,g.__assign)((0,g.__assign)({},s),{text:o,matrix:l}),n)})}},r.prototype.renderLine=function(t){var i=this.getLinePath(),n=this.get("line"),a=n.style;this.addShape(t,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:(0,g.__assign)({path:i},a)})},r.prototype.renderBackground=function(t){var i=this.getElementId("text"),n=t.findById(i),a=this.get("textBackground");if(a&&n){var o=n.getBBox(),s=Ln(a.padding),l=a.style,u=this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:(0,g.__assign)({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:n.attr("matrix")},l)});u.toBack()}},r}(Ae),ao=Jg,tp=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{type:"line",locationType:"region",start:null,end:null})},r.prototype.getRotateAngle=function(){var t=this.getLocation(),i=t.start,n=t.end,a=this.get("text").position,o=Math.atan2(n.y-i.y,n.x-i.x),s=a==="start"?o-Math.PI/2:o+Math.PI/2;return s},r.prototype.getTextPoint=function(){var t=this.getLocation(),i=t.start,n=t.end,a=this.get("text"),o=a.position,s=a.offset;return bl(i,n,o,s)},r.prototype.getLinePath=function(){var t=this.getLocation(),i=t.start,n=t.end;return[["M",i.x,i.y],["L",n.x,n.y]]},r}(ao),Il=tp,ep=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:Math.PI*3/2})},r.prototype.getRotateAngle=function(){var t=this.getLocation(),i=t.startAngle,n=t.endAngle,a=this.get("text").position,o=a==="start"?i+Math.PI/2:n-Math.PI/2;return o},r.prototype.getTextPoint=function(){var t=this.get("text"),i=t.position,n=t.offset,a=this.getLocation(),o=a.center,s=a.radius,l=a.startAngle,u=a.endAngle,c=i==="start"?l:u,f=this.getRotateAngle()-Math.PI,v=oi(o,s,c),d=Math.cos(f)*n,p=Math.sin(f)*n;return{x:v.x+d,y:v.y+p}},r.prototype.getLinePath=function(){var t=this.getLocation(),i=t.center,n=t.radius,a=t.startAngle,o=t.endAngle,s=null;if(o-a==Math.PI*2){var l=i.x,u=i.y;s=[["M",l,u-n],["A",n,n,0,1,1,l,u+n],["A",n,n,0,1,1,l,u-n],["Z"]]}else{var c=oi(i,n,a),f=oi(i,n,o),v=Math.abs(o-a)>Math.PI?1:0,d=a>o?0:1;s=[["M",c.x,c.y],["A",n,n,0,v,d,f.x,f.y]]}return s},r}(ao),rp=ep,Wi="g2-crosshair",oo=Wi+"-line",so=Wi+"-text",Hi,ip=(Hi={},Hi[""+Wi]={position:"relative"},Hi[""+oo]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},Hi[""+so]={position:"absolute",color:Vt.textColor,fontFamily:Vt.fontFamily},Hi),np=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"crosshair",type:"html",locationType:"region",start:{x:0,y:0},end:{x:0,y:0},capture:!1,text:null,containerTpl:'<div class="'+Wi+'"></div>',crosshairTpl:'<div class="'+oo+'"></div>',textTpl:'<span class="'+so+'">{content}</span>',domStyles:null,containerClassName:Wi,defaultStyles:ip,defaultCfg:{text:{position:"start",content:null,align:"center",offset:10}}})},r.prototype.render=function(){this.resetText(),this.resetPosition()},r.prototype.initCrossHair=function(){var t=this.getContainer(),i=this.get("crosshairTpl"),n=(0,T.Z)(i);t.appendChild(n),this.applyStyle(oo,n),this.set("crosshairEl",n)},r.prototype.getTextPoint=function(){var t=this.getLocation(),i=t.start,n=t.end,a=this.get("text"),o=a.position,s=a.offset;return bl(i,n,o,s)},r.prototype.resetText=function(){var t=this.get("text"),i=this.get("textEl");if(t){var n=t.content;if(!i){var a=this.getContainer(),o=(0,h.substitute)(this.get("textTpl"),t);i=(0,T.Z)(o),a.appendChild(i),this.applyStyle(so,i),this.set("textEl",i)}i.innerHTML=n}else i&&i.remove()},r.prototype.isVertical=function(t,i){return t.x===i.x},r.prototype.resetPosition=function(){var t=this.get("crosshairEl");t||(this.initCrossHair(),t=this.get("crosshairEl"));var i=this.get("start"),n=this.get("end"),a=Math.min(i.x,n.x),o=Math.min(i.y,n.y);this.isVertical(i,n)?(0,k.Z)(t,{width:"1px",height:Le(Math.abs(n.y-i.y))}):(0,k.Z)(t,{height:"1px",width:Le(Math.abs(n.x-i.x))}),(0,k.Z)(t,{top:Le(o),left:Le(a)}),this.alignText()},r.prototype.alignText=function(){var t=this.get("textEl");if(t){var i=this.get("text").align,n=t.clientWidth,a=this.getTextPoint();switch(i){case"center":a.x=a.x-n/2;break;case"right":a.x=a.x-n;case"left":break}(0,k.Z)(t,{top:Le(a.y),left:Le(a.x)})}},r.prototype.updateInner=function(t){(0,h.hasKey)(t,"text")&&this.resetText(),e.prototype.updateInner.call(this,t)},r}(ro),ap=np,op=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:Vt.lineColor}}}})},r.prototype.getLineType=function(){var t=this.get("line")||this.get("defaultCfg").line;return t.type},r.prototype.renderInner=function(t){this.drawGrid(t)},r.prototype.getAlternatePath=function(t,i){var n=this.getGridPath(t),a=i.slice(0).reverse(),o=this.getGridPath(a,!0),s=this.get("closed");return s?n=n.concat(o):(o[0][0]="L",n=n.concat(o),n.push(["Z"])),n},r.prototype.getPathStyle=function(){return this.get("line").style},r.prototype.drawGrid=function(t){var i=this,n=this.get("line"),a=this.get("items"),o=this.get("alternateColor"),s=null;(0,h.each)(a,function(l,u){var c=l.id||u;if(n){var f=i.getPathStyle();f=(0,h.isFunction)(f)?f(l,u,a):f;var v=i.getElementId("line-"+c),d=i.getGridPath(l.points);i.addShape(t,{type:"path",name:"grid-line",id:v,attrs:(0,h.mix)({path:d},f)})}if(o&&u>0){var p=i.getElementId("region-"+c),y=u%2==0;if((0,h.isString)(o))y&&i.drawAlternateRegion(p,t,s.points,l.points,o);else{var m=y?o[1]:o[0];i.drawAlternateRegion(p,t,s.points,l.points,m)}}s=l})},r.prototype.drawAlternateRegion=function(t,i,n,a,o){var s=this.getAlternatePath(n,a);this.addShape(i,{type:"path",id:t,name:"grid-region",attrs:{path:s,fill:o}})},r}(Ae),Ol=op;function sp(e,r,t,i){var n=t-e,a=i-r;return Math.sqrt(n*n+a*a)}var lp=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{type:"circle",center:null,closed:!0})},r.prototype.getGridPath=function(t,i){var n=this.getLineType(),a=this.get("closed"),o=[];if(t.length)if(n==="circle"){var s=this.get("center"),l=t[0],u=sp(s.x,s.y,l.x,l.y),c=i?0:1;a?(o.push(["M",s.x,s.y-u]),o.push(["A",u,u,0,0,c,s.x,s.y+u]),o.push(["A",u,u,0,0,c,s.x,s.y-u]),o.push(["Z"])):(0,h.each)(t,function(f,v){v===0?o.push(["M",f.x,f.y]):o.push(["A",u,u,0,0,c,f.x,f.y])})}else(0,h.each)(t,function(f,v){v===0?o.push(["M",f.x,f.y]):o.push(["L",f.x,f.y])}),a&&o.push(["Z"]);return o},r}(Ol),up=lp,cp=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{type:"line"})},r.prototype.getGridPath=function(t){var i=[];return(0,h.each)(t,function(n,a){a===0?i.push(["M",n.x,n.y]):i.push(["L",n.x,n.y])}),i},r}(Ol),hp=cp,fp=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},r.prototype.getLayoutBBox=function(){var t=e.prototype.getLayoutBBox.call(this),i=this.get("maxWidth"),n=this.get("maxHeight"),a=t.width,o=t.height;return i&&(a=Math.min(a,i)),n&&(o=Math.min(o,n)),Ni(t.minX,t.minY,a,o)},r.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},r.prototype.resetLocation=function(){var t=this.get("x"),i=this.get("y"),n=this.get("offsetX"),a=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+n,y:i+a})},r.prototype.applyOffset=function(){this.resetLocation()},r.prototype.getDrawPoint=function(){return this.get("currentPoint")},r.prototype.setDrawPoint=function(t){return this.set("currentPoint",t)},r.prototype.renderInner=function(t){this.resetDraw(),this.get("title")&&this.drawTitle(t),this.drawLegendContent(t),this.get("background")&&this.drawBackground(t)},r.prototype.drawBackground=function(t){var i=this.get("background"),n=t.getBBox(),a=Ln(i.padding),o=(0,g.__assign)({x:0,y:0,width:n.width+a[1]+a[3],height:n.height+a[0]+a[2]},i.style),s=this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:o});s.toBack()},r.prototype.drawTitle=function(t){var i=this.get("currentPoint"),n=this.get("title"),a=n.spacing,o=n.style,s=n.text,l=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:(0,g.__assign)({text:s,x:i.x,y:i.y},o)}),u=l.getBBox();this.set("currentPoint",{x:i.x,y:u.maxY+a})},r.prototype.resetDraw=function(){var t=this.get("background"),i={x:0,y:0};if(t){var n=Ln(t.padding);i.x=n[3],i.y=n[0]}this.set("currentPoint",i)},r}(Ae),Pl=fp,lo={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},Pn={fill:Vt.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:Vt.fontFamily,fontWeight:"normal",lineHeight:12},uo="navigation-arrow-right",co="navigation-arrow-left",kl={right:90*Math.PI/180,left:(360-90)*Math.PI/180,up:0,down:180*Math.PI/180},vp=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.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 i=t.getElementByLocalId("item-group");if(t.currentPageIndex>1){t.currentPageIndex-=1,t.updateNavigation();var n=t.getCurrentNavigationMatrix();t.get("animate")?i.animate({matrix:n},100):i.attr({matrix:n})}},t.onNavigationAfter=function(){var i=t.getElementByLocalId("item-group");if(t.currentPageIndex<t.totalPagesCnt){t.currentPageIndex+=1,t.updateNavigation();var n=t.getCurrentNavigationMatrix();t.get("animate")?i.animate({matrix:n},100):i.attr({matrix:n})}},t}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"legend",type:"category",itemSpacing:24,itemMarginBottom:8,maxItemWidth:null,itemWidth:null,itemHeight:null,itemName:{},itemValue:null,maxWidth:null,maxHeight:null,marker:{},radio:null,items:[],itemStates:{},itemBackground:{},pageNavigator:{},defaultCfg:{title:{spacing:5,style:{fill:Vt.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}},background:{padding:5,style:{stroke:Vt.lineColor}},itemBackground:{style:{opacity:0,fill:"#fff"}},pageNavigator:lo,itemName:{spacing:16,style:Pn},marker:{spacing:8,style:{r:6,symbol:"circle"}},itemValue:{alignRight:!1,formatter:null,style:Pn,spacing:6},itemStates:{active:{nameStyle:{opacity:.8}},unchecked:{nameStyle:{fill:Vt.uncheckedColor},markerStyle:{fill:Vt.uncheckedColor,stroke:Vt.uncheckedColor}},inactive:{nameStyle:{fill:Vt.uncheckedColor},markerStyle:{opacity:.2}}}}})},r.prototype.isList=function(){return!0},r.prototype.getItems=function(){return this.get("items")},r.prototype.setItems=function(t){this.update({items:t})},r.prototype.updateItem=function(t,i){(0,h.mix)(t,i),this.clear(),this.render()},r.prototype.clearItems=function(){var t=this.getElementByLocalId("item-group");t&&t.clear()},r.prototype.setItemState=function(t,i,n){t[i]=n;var a=this.getElementByLocalId("item-"+t.id);if(a){var o=this.getItems(),s=o.indexOf(t),l=this.createOffScreenGroup(),u=this.drawItem(t,s,this.getItemHeight(),l);this.updateElements(u,a),this.clearUpdateStatus(a)}},r.prototype.hasState=function(t,i){return!!t[i]},r.prototype.getItemStates=function(t){var i=this.get("itemStates"),n=[];return(0,h.each)(i,function(a,o){t[o]&&n.push(o)}),n},r.prototype.clearItemsState=function(t){var i=this,n=this.getItemsByState(t);(0,h.each)(n,function(a){i.setItemState(a,t,!1)})},r.prototype.getItemsByState=function(t){var i=this,n=this.getItems();return(0,h.filter)(n,function(a){return i.hasState(a,t)})},r.prototype.drawLegendContent=function(t){this.processItems(),this.drawItems(t)},r.prototype.processItems=function(){var t=this.get("items");(0,h.each)(t,function(i){i.id||(i.id=i.name)})},r.prototype.drawItems=function(t){var i=this,n=this.addGroup(t,{id:this.getElementId("item-container-group"),name:"legend-item-container-group"}),a=this.addGroup(n,{id:this.getElementId("item-group"),name:"legend-item-group"}),o=this.getItemHeight(),s=this.get("itemWidth"),l=this.get("itemSpacing"),u=this.get("itemMarginBottom"),c=this.get("currentPoint"),f=c.x,v=c.y,d=this.get("layout"),p=this.get("items"),y=!1,m=0,x=this.get("maxWidth"),_=this.get("maxHeight");(0,h.each)(p,function(w,b){var S=i.drawItem(w,b,o,a),C=S.getBBox(),A=s||C.width;A>m&&(m=A),d==="horizontal"?(x&&x<c.x+A-f&&(y=!0,c.x=f,c.y+=o+u),i.moveElementTo(S,c),c.x+=A+l):(_&&_<c.y+o+u-v&&(y=!0,c.x+=m+l,c.y=v,m=0),i.moveElementTo(S,c),c.y+=o+u)}),y&&this.get("flipPage")&&(this.pageHeight=0,this.pageWidth=0,this.totalPagesCnt=1,this.startX=f,this.startY=v,this.adjustNavigation(t,a))},r.prototype.getItemHeight=function(){var t=this.get("itemHeight");if(!t){var i=(this.get("itemName")||{}).style;if((0,h.isFunction)(i)){var n=this.getItems();n.forEach(function(a,o){var s=(0,g.__assign)((0,g.__assign)({},Pn),i(a,o,n)).fontSize;t<s&&(t=s)})}else i&&(t=i.fontSize)}return t},r.prototype.drawMarker=function(t,i,n,a){var o=(0,g.__assign)((0,g.__assign)((0,g.__assign)({x:0,y:a/2},i.style),{symbol:(0,h.get)(n.marker,"symbol","circle")}),(0,h.get)(n.marker,"style",{})),s=this.addShape(t,{type:"marker",id:this.getElementId("item-"+n.id+"-marker"),name:"legend-item-marker",attrs:o}),l=s.getBBox();s.attr("x",l.width/2);var u=s.attr(),c=u.stroke,f=u.fill;return c&&s.set("isStroke",!0),f&&s.set("isFill",!0),s},r.prototype.drawItemText=function(t,i,n,a,o,s,l){var u=n.formatter,c=n.style,f=(0,g.__assign)((0,g.__assign)({x:s,y:o/2,text:u?u(a[i],a,l):a[i]},Pn),(0,h.isFunction)(c)?c(a,l,this.getItems()):c);return this.addShape(t,{type:"text",id:this.getElementId("item-"+a.id+"-"+i),name:"legend-item-"+i,attrs:f})},r.prototype.drawRadio=function(t,i,n,a,o){var s,l,u=i.style||{},c=(s=u.r)!==null&&s!==void 0?s:a/2,f=c*3.6/8,v=[o+c,a/2-c],d=v[0],p=v[1],y=[d+c,p+c],m=y[0],x=y[1],_=[d,x+c],w=_[0],b=_[1],S=[o,p+c],C=S[0],A=S[1],F=n.showRadio,P=(0,g.__assign)((0,g.__assign)({path:[["M",d,p],["A",c,c,0,0,1,m,x],["L",m-f,x],["L",m,x],["A",c,c,0,0,1,w,b],["L",w,b-f],["L",w,b],["A",c,c,0,0,1,C,A],["L",C+f,A],["L",C,A],["A",c,c,0,0,1,d,p],["L",d,p+f]],stroke:"#000000",fill:"#ffffff"},u),{opacity:F?(l=u==null?void 0:u.opacity)!==null&&l!==void 0?l:.45:0}),I=this.addShape(t,{type:"path",id:this.getElementId("item-"+n.id+"-radio"),name:"legend-item-radio",attrs:P});return I.set("tip",i.tip),I},r.prototype.drawItem=function(t,i,n,a){var o="item-"+t.id,s=this.addGroup(a,{name:"legend-item-container",id:this.getElementId("item-container-"+o),delegateObject:{item:t,index:i}}),l=this.addGroup(s,{name:"legend-item",id:this.getElementId(o),delegateObject:{item:t,index:i}}),u=this.get("marker"),c=this.get("itemName"),f=this.get("itemValue"),v=this.get("itemBackground"),d=this.get("radio"),p=this.getLimitItemWidth(),y=0;if(u){var m=this.drawMarker(l,u,t,n),x=u.spacing,_=(0,h.get)(t,["marker","spacing"]);(0,h.isNumber)(_)&&(x=_),y=m.getBBox().maxX+x}if(c){var w=this.drawItemText(l,"name",c,t,n,y,i);p&&zi(!0,w,(0,h.clamp)(p-y,0,p)),y=w.getBBox().maxX+c.spacing}if(f){var b=this.drawItemText(l,"value",f,t,n,y,i);p&&(f.alignRight?(b.attr({textAlign:"right",x:p}),zi(!0,b,(0,h.clamp)(p-y,0,p),"head")):zi(!0,b,(0,h.clamp)(p-y,0,p))),y=b.getBBox().maxX+f.spacing}if(d&&this.drawRadio(l,d,t,n,y),v){var S=l.getBBox(),C=this.addShape(l,{type:"rect",name:"legend-item-background",id:this.getElementId(o+"-background"),attrs:(0,g.__assign)({x:0,y:0,width:S.width,height:n},v.style)});C.toBack()}return this.applyItemStates(t,l),l},r.prototype.adjustNavigation=function(t,i){var n=this,a=this.startX,o=this.startY,s=this.get("layout"),l=i.findAll(function(Z){return Z.get("name")==="legend-item"}),u=this.get("maxWidth"),c=this.get("maxHeight"),f=this.get("itemWidth"),v=this.get("itemSpacing"),d=this.getItemHeight(),p=(0,h.deepMix)({},lo,this.get("pageNavigator")),y=this.drawNavigation(t,s,"00/00",p),m=y.getBBox(),x={x:a,y:o},_=1,w=0,b=0,S=0,C=this.get("itemMarginBottom");function A(Z,vt){var yt=Z.getBBox(),Bt=f||yt.width,G=vt.x+Bt+v+m.width;return G>u}if(s==="horizontal"){var F=this.get("maxRow")||1,P=d+(F===1?0:C),I=u-v-m.width-m.minX;this.pageHeight=P*F,this.pageWidth=I,(0,h.each)(l,function(Z){var vt=Z.getBBox(),yt=f||vt.width;(w&&w<x.x+yt+v||A(Z,x))&&(_===1&&(w=x.x+v,n.moveElementTo(y,{x:I,y:x.y+d/2-m.height/2-m.minY})),_+=1,x.x=a,x.y+=P),n.moveElementTo(Z,x),Z.getParent().setClip({type:"rect",attrs:{x:x.x,y:x.y,width:yt+v,height:d}}),x.x+=yt+v})}else{(0,h.each)(l,function(Z){var vt=Z.getBBox();vt.width>b&&(b=vt.width)}),S=b,b+=v,u&&(b=Math.min(u,b),S=Math.min(u,S)),this.pageWidth=b,this.pageHeight=c-Math.max(m.height,d+C);var V=Math.floor(this.pageHeight/(d+C));(0,h.each)(l,function(Z,vt){vt!==0&&vt%V==0&&(_+=1,x.x+=b,x.y=o),n.moveElementTo(Z,x),Z.getParent().setClip({type:"rect",attrs:{x:x.x,y:x.y,width:b,height:d}}),x.y+=d+C}),this.totalPagesCnt=_,this.moveElementTo(y,{x:a+S/2-m.width/2-m.minX,y:c-m.height-m.minY})}this.pageHeight&&this.pageWidth&&i.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(_/this.get("maxRow")):this.totalPagesCnt=_,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(y),i.attr("matrix",this.getCurrentNavigationMatrix())},r.prototype.drawNavigation=function(t,i,n,a){var o={x:0,y:0},s=this.addGroup(t,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),l=(0,h.get)(a.marker,"style",{}),u=l.size,c=u===void 0?12:u,f=(0,g.__rest)(l,["size"]),v=this.drawArrow(s,o,co,i==="horizontal"?"up":"left",c,f);v.on("click",this.onNavigationBack);var d=v.getBBox();o.x+=d.width+2;var p=this.addShape(s,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:(0,g.__assign)({x:o.x,y:o.y+c/2,text:n,textBaseline:"middle"},(0,h.get)(a.text,"style"))}),y=p.getBBox();o.x+=y.width+2;var m=this.drawArrow(s,o,uo,i==="horizontal"?"down":"right",c,f);return m.on("click",this.onNavigationAfter),s},r.prototype.updateNavigation=function(t){var i=(0,h.deepMix)({},lo,this.get("pageNavigator")),n=i.marker.style,a=n.fill,o=n.opacity,s=n.inactiveFill,l=n.inactiveOpacity,u=this.currentPageIndex+"/"+this.totalPagesCnt,c=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),f=t?t.findById(this.getElementId(co)):this.getElementByLocalId(co),v=t?t.findById(this.getElementId(uo)):this.getElementByLocalId(uo);c.attr("text",u),f.attr("opacity",this.currentPageIndex===1?l:o),f.attr("fill",this.currentPageIndex===1?s:a),f.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=f.getBBox().maxX+2;c.attr("x",d),d+=c.getBBox().width+2,this.updateArrowPath(v,{x:d,y:0})},r.prototype.drawArrow=function(t,i,n,a,o,s){var l=i.x,u=i.y,c=this.addShape(t,{type:"path",id:this.getElementId(n),name:n,attrs:(0,g.__assign)({size:o,direction:a,path:[["M",l+o/2,u],["L",l,u+o],["L",l+o,u+o],["Z"]],cursor:"pointer"},s)});return c.attr("matrix",Dr({x:l+o/2,y:u+o/2},kl[a])),c},r.prototype.updateArrowPath=function(t,i){var n=i.x,a=i.y,o=t.attr(),s=o.size,l=o.direction,u=Dr({x:n+s/2,y:a+s/2},kl[l]);t.attr("path",[["M",n+s/2,a],["L",n,a+s],["L",n+s,a+s],["Z"]]),t.attr("matrix",u)},r.prototype.getCurrentNavigationMatrix=function(){var t=this,i=t.currentPageIndex,n=t.pageWidth,a=t.pageHeight,o=this.get("layout"),s=o==="horizontal"?{x:0,y:a*(1-i)}:{x:n*(1-i),y:0};return $a(s)},r.prototype.applyItemStates=function(t,i){var n=this.getItemStates(t),a=n.length>0;if(a){var o=i.getChildren(),s=this.get("itemStates");(0,h.each)(o,function(l){var u=l.get("name"),c=u.split("-")[2],f=Vi(t,c,s);f&&(l.attr(f),c==="marker"&&!(l.get("isStroke")&&l.get("isFill"))&&(l.get("isStroke")&&l.attr("fill",null),l.get("isFill")&&l.attr("stroke",null)))})}},r.prototype.getLimitItemWidth=function(){var t=this.get("itemWidth"),i=this.get("maxItemWidth");return i?t&&(i=t<=i?t:i):t&&(i=t),i},r}(Pl),dp=vp,gp=1.4,Dl=.4,pp=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},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:Vt.textColor,textBaseline:"middle",fontFamily:Vt.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:Vt.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}}}})},r.prototype.isSlider=function(){return!0},r.prototype.getValue=function(){return this.getCurrentValue()},r.prototype.getRange=function(){return{min:this.get("min"),max:this.get("max")}},r.prototype.setRange=function(t,i){this.update({min:t,max:i})},r.prototype.setValue=function(t){var i=this.getValue();this.set("value",t);var n=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(n),this.delegateEmit("valuechanged",{originValue:i,value:t})},r.prototype.initEvent=function(){var t=this.get("group");this.bindSliderEvent(t),this.bindRailEvent(t),this.bindTrackEvent(t)},r.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)},r.prototype.bindSliderEvent=function(t){this.bindHandlersEvent(t)},r.prototype.bindHandlersEvent=function(t){var i=this;t.on("legend-handler-min:drag",function(n){var a=i.getValueByCanvasPoint(n.x,n.y),o=i.getCurrentValue(),s=o[1];s<a&&(s=a),i.setValue([a,s])}),t.on("legend-handler-max:drag",function(n){var a=i.getValueByCanvasPoint(n.x,n.y),o=i.getCurrentValue(),s=o[0];s>a&&(s=a),i.setValue([s,a])})},r.prototype.bindRailEvent=function(t){},r.prototype.bindTrackEvent=function(t){var i=this,n=null;t.on("legend-track:dragstart",function(a){n={x:a.x,y:a.y}}),t.on("legend-track:drag",function(a){if(!!n){var o=i.getValueByCanvasPoint(n.x,n.y),s=i.getValueByCanvasPoint(a.x,a.y),l=i.getCurrentValue(),u=l[1]-l[0],c=i.getRange(),f=s-o;f<0?l[0]+f>c.min?i.setValue([l[0]+f,l[1]+f]):i.setValue([c.min,c.min+u]):f>0&&(f>0&&l[1]+f<c.max?i.setValue([l[0]+f,l[1]+f]):i.setValue([c.max-u,c.max])),n={x:a.x,y:a.y}}}),t.on("legend-track:dragend",function(a){n=null})},r.prototype.drawLabels=function(t){this.drawLabel("min",t),this.drawLabel("max",t)},r.prototype.drawLabel=function(t,i){var n=this.get("label"),a=n.style,o=n.align,s=n.formatter,l=this.get(t),u=this.getLabelAlignAttrs(t,o),c="label-"+t;this.addShape(i,{type:"text",id:this.getElementId(c),name:"legend-label-"+t,attrs:(0,g.__assign)((0,g.__assign)({x:0,y:0,text:(0,h.isFunction)(s)?s(l):l},a),u)})},r.prototype.getLabelAlignAttrs=function(t,i){var n=this.isVertical(),a="center",o="middle";return n?(a="start",i!=="rail"?t==="min"?o="top":o="bottom":o="top"):i!=="rail"?(o="top",t==="min"?a="start":a="end"):(a="start",o="middle"),{textAlign:a,textBaseline:o}},r.prototype.getRailPath=function(t,i,n,a){var o=this.get("rail"),s=o.size,l=o.defaultLength,u=o.type,c=this.isVertical(),f=l,v=n,d=a;v||(v=c?s:f),d||(d=c?f:s);var p=[];return u==="color"?(p.push(["M",t,i]),p.push(["L",t+v,i]),p.push(["L",t+v,i+d]),p.push(["L",t,i+d]),p.push(["Z"])):(p.push(["M",t+v,i]),p.push(["L",t+v,i+d]),p.push(["L",t,i+d]),p.push(["Z"])),p},r.prototype.drawRail=function(t){var i=this.get("rail"),n=i.style;this.addShape(t,{type:"path",id:this.getElementId("rail"),name:"legend-rail",attrs:(0,g.__assign)({path:this.getRailPath(0,0)},n)})},r.prototype.getTrackColor=function(t){var i=t.length;if(!i)return null;if(i===1)return t[0];var n;this.isVertical()?n="l(90)":n="l(0)";for(var a=0;a<i;a++){var o=a/(i-1);n+=" "+o+":"+t[a]}return n},r.prototype.getTrackPath=function(t){var i=this.getRailShape(t),n=i.attr("path");return(0,h.clone)(n)},r.prototype.getClipTrackAttrs=function(t){var i=this.getCurrentValue(),n=i[0],a=i[1],o=this.getRailBBox(t),s=this.getPointByValue(n,t),l=this.getPointByValue(a,t),u=this.isVertical(),c,f,v,d;return u?(c=o.minX,f=s.y,v=o.width,d=l.y-s.y):(c=s.x,f=o.minY,v=l.x-s.x,d=o.height),{x:c,y:f,width:v,height:d}},r.prototype.getTrackAttrs=function(t){var i=this.get("track"),n=this.get("colors"),a=this.getTrackPath(t);return(0,h.mix)({path:a,fill:this.getTrackColor(n)},i.style)},r.prototype.resetTrackClip=function(t){var i=t||this.get("group"),n=this.getElementId("track"),a=i.findById(n),o=a.getClip(),s=this.getClipTrackAttrs(t);o?o.attr(s):a.setClip({type:"rect",attrs:s})},r.prototype.resetTrack=function(t){var i=this.getElementId("track"),n=t.findById(i),a=this.getTrackAttrs(t);n?n.attr(a):this.addShape(t,{type:"path",id:i,draggable:this.get("slidable"),name:"legend-track",attrs:a})},r.prototype.getPointByValue=function(t,i){var n=this.getRange(),a=n.min,o=n.max,s=(t-a)/(o-a),l=this.getRailBBox(i),u=this.isVertical(),c={x:0,y:0};return u?(c.x=l.minX+l.width/2,c.y=Br(l.minY,l.maxY,s)):(c.x=Br(l.minX,l.maxX,s),c.y=l.minY+l.height/2),c},r.prototype.getRailShape=function(t){var i=t||this.get("group");return i.findById(this.getElementId("rail"))},r.prototype.getRailBBox=function(t){var i=this.getRailShape(t),n=i.getBBox();return n},r.prototype.getRailCanvasBBox=function(){var t=this.get("group"),i=t.findById(this.getElementId("rail")),n=i.getCanvasBBox();return n},r.prototype.isVertical=function(){return this.get("layout")==="vertical"},r.prototype.getValueByCanvasPoint=function(t,i){var n=this.getRange(),a=n.min,o=n.max,s=this.getRailCanvasBBox(),l=this.isVertical(),u=this.get("step"),c;l?c=(i-s.minY)/s.height:c=(t-s.minX)/s.width;var f=Br(a,o,c);if(u){var v=Math.round((f-a)/u);f=a+v*u}return f>o&&(f=o),f<a&&(f=a),f},r.prototype.getCurrentValue=function(){var t=this.get("value");if(!t){var i=this.get("values");return i?[Math.max(Math.min.apply(Math,(0,g.__spreadArrays)(i,[this.get("max")])),this.get("min")),Math.min(Math.max.apply(Math,(0,g.__spreadArrays)(i,[this.get("min")])),this.get("max"))]:[this.get("min"),this.get("max")]}return t},r.prototype.resetHandlers=function(t){var i=this.getCurrentValue(),n=i[0],a=i[1];this.resetHandler(t,"min",n),this.resetHandler(t,"max",a)},r.prototype.getHandlerPath=function(t,i){var n=this.isVertical(),a=[],o=t.size,s=i.x,l=i.y,u=o*gp,c=o/2,f=o/6;if(n){var v=s+u*Dl;a.push(["M",s,l]),a.push(["L",v,l+c]),a.push(["L",s+u,l+c]),a.push(["L",s+u,l-c]),a.push(["L",v,l-c]),a.push(["Z"]),a.push(["M",v,l+f]),a.push(["L",s+u-2,l+f]),a.push(["M",v,l-f]),a.push(["L",s+u-2,l-f])}else{var d=l+u*Dl;a.push(["M",s,l]),a.push(["L",s-c,d]),a.push(["L",s-c,l+u]),a.push(["L",s+c,l+u]),a.push(["L",s+c,d]),a.push(["Z"]),a.push(["M",s-f,d]),a.push(["L",s-f,l+u-2]),a.push(["M",s+f,d]),a.push(["L",s+f,l+u-2])}return a},r.prototype.resetHandler=function(t,i,n){var a=this.getPointByValue(n,t),o=this.get("handler"),s=this.getHandlerPath(o,a),l=this.getElementId("handler-"+i),u=t.findById(l),c=this.isVertical();u?u.attr("path",s):this.addShape(t,{type:"path",name:"legend-handler-"+i,draggable:!0,id:l,attrs:(0,g.__assign)((0,g.__assign)({path:s},o.style),{cursor:c?"ns-resize":"ew-resize"})})},r.prototype.fixedElements=function(t){var i=t.findById(this.getElementId("rail")),n=t.findById(this.getElementId("label-min")),a=t.findById(this.getElementId("label-max")),o=this.getDrawPoint();this.isVertical()?this.fixedVertail(n,a,i,o):this.fixedHorizontal(n,a,i,o)},r.prototype.fitRailLength=function(t,i,n,a){var o=this.isVertical(),s=o?"height":"width",l=this.get("label"),u=l.align,c=l.spacing,f=this.get("max"+(0,h.upperFirst)(s));if(f){var v=u==="rail"?n[s]+t[s]+i[s]+c*2:n[s],d=v-f;d>0&&this.changeRailLength(a,s,n[s]-d)}},r.prototype.changeRailLength=function(t,i,n){var a=t.getBBox(),o;i==="height"?o=this.getRailPath(a.x,a.y,a.width,n):o=this.getRailPath(a.x,a.y,n,a.height),t.attr("path",o)},r.prototype.changeRailPosition=function(t,i,n){var a=t.getBBox(),o=this.getRailPath(i,n,a.width,a.height);t.attr("path",o)},r.prototype.fixedHorizontal=function(t,i,n,a){var o=this.get("label"),s=o.align,l=o.spacing,u=n.getBBox(),c=t.getBBox(),f=i.getBBox(),v=u.height;this.fitRailLength(c,f,u,n),u=n.getBBox(),s==="rail"?(t.attr({x:a.x,y:a.y+v/2}),this.changeRailPosition(n,a.x+c.width+l,a.y),i.attr({x:a.x+c.width+u.width+l*2,y:a.y+v/2})):s==="top"?(t.attr({x:a.x,y:a.y}),i.attr({x:a.x+u.width,y:a.y}),this.changeRailPosition(n,a.x,a.y+c.height+l)):(this.changeRailPosition(n,a.x,a.y),t.attr({x:a.x,y:a.y+u.height+l}),i.attr({x:a.x+u.width,y:a.y+u.height+l}))},r.prototype.fixedVertail=function(t,i,n,a){var o=this.get("label"),s=o.align,l=o.spacing,u=n.getBBox(),c=t.getBBox(),f=i.getBBox();if(this.fitRailLength(c,f,u,n),u=n.getBBox(),s==="rail")t.attr({x:a.x,y:a.y}),this.changeRailPosition(n,a.x,a.y+c.height+l),i.attr({x:a.x,y:a.y+c.height+u.height+l*2});else if(s==="right")t.attr({x:a.x+u.width+l,y:a.y}),this.changeRailPosition(n,a.x,a.y),i.attr({x:a.x+u.width+l,y:a.y+u.height});else{var v=Math.max(c.width,f.width);t.attr({x:a.x,y:a.y}),this.changeRailPosition(n,a.x+v+l,a.y),i.attr({x:a.x,y:a.y+u.height})}},r}(Pl),yp=pp,sr="g2-tooltip",lr="g2-tooltip-title",Yi="g2-tooltip-list",kn="g2-tooltip-list-item",Dn="g2-tooltip-marker",Bn="g2-tooltip-value",Bl="g2-tooltip-name",ho="g2-tooltip-crosshair-x",fo="g2-tooltip-crosshair-y",$e,mp=($e={},$e[""+sr]={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:Vt.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},$e[""+lr]={marginBottom:"4px"},$e[""+Yi]={margin:"0px",listStyleType:"none",padding:"0px"},$e[""+kn]={listStyleType:"none",marginBottom:"4px"},$e[""+Dn]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},$e[""+Bn]={display:"inline-block",float:"right",marginLeft:"30px"},$e[""+ho]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},$e[""+fo]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},$e);function xp(e,r,t,i,n){var a={left:e<n.x,right:e+t>n.x+n.width,top:r<n.y,bottom:r+i>n.y+n.height};return a}function _p(e,r,t,i,n,a){var o=e,s=r;switch(a){case"left":o=e-i-t,s=r-n/2;break;case"right":o=e+t,s=r-n/2;break;case"top":o=e-i/2,s=r-n-t;break;case"bottom":o=e-i/2,s=r+t;break;default:o=e+t,s=r-n-t;break}return{x:o,y:s}}function wp(e,r,t,i,n,a,o){var s=_p(e,r,t,i,n,a);if(o){var l=xp(s.x,s.y,i,n,o);a==="auto"?(l.right&&(s.x=Math.max(0,e-i-t)),l.top&&(s.y=Math.max(0,r-n-t))):a==="top"||a==="bottom"?(l.left&&(s.x=o.x),l.right&&(s.x=o.x+o.width-i),a==="top"&&l.top&&(s.y=r+t),a==="bottom"&&l.bottom&&(s.y=r-n-t)):(l.top&&(s.y=o.y),l.bottom&&(s.y=o.y+o.height-n),a==="left"&&l.left&&(s.x=e+t),a==="right"&&l.right&&(s.x=e-i-t))}return s}function bp(e,r){var t=!1;return(0,h.each)(r,function(i){if((0,h.hasKey)(e,i))return t=!0,!1}),t}var Sp=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"tooltip",type:"html",x:0,y:0,items:[],customContent:null,containerTpl:'<div class="'+sr+'"><div class="'+lr+'"></div><ul class="'+Yi+'"></ul></div>',itemTpl:'<li class="'+kn+`" data-index={index}>
  16. <span class="`+Dn+`" style="background:{color}"></span>
  17. <span class="`+Bl+`">{name}</span>:
  18. <span class="`+Bn+`">{value}</span>
  19. </li>`,xCrosshairTpl:'<div class="'+ho+'"></div>',yCrosshairTpl:'<div class="'+fo+'"></div>',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:sr,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:mp})},r.prototype.render=function(){this.get("customContent")?this.renderCustomContent():(this.resetTitle(),this.renderItems()),this.resetPosition()},r.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},r.prototype.show=function(){var t=this.getContainer();!t||this.destroyed||(this.set("visible",!0),(0,k.Z)(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},r.prototype.hide=function(){var t=this.getContainer();!t||this.destroyed||(this.set("visible",!1),(0,k.Z)(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},r.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},r.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},r.prototype.setCrossHairsVisible=function(t){var i=t?"":"none",n=this.get("xCrosshairDom"),a=this.get("yCrosshairDom");n&&(0,k.Z)(n,{display:i}),a&&(0,k.Z)(a,{display:i})},r.prototype.initContainer=function(){if(e.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()}},r.prototype.updateInner=function(t){this.get("customContent")?this.renderCustomContent():(bp(t,["title","showTitle"])&&this.resetTitle(),(0,h.hasKey)(t,"items")&&this.renderItems()),e.prototype.updateInner.call(this,t)},r.prototype.initDom=function(){this.cacheDoms()},r.prototype.removeDom=function(){e.prototype.removeDom.call(this),this.clearCrosshairs()},r.prototype.resetPosition=function(){var t=this.get("x"),i=this.get("y"),n=this.get("offset"),a=this.getOffset(),o=a.offsetX,s=a.offsetY,l=this.get("position"),u=this.get("region"),c=this.getContainer(),f=this.getBBox(),v=f.width,d=f.height,p;u&&(p=Ri(u));var y=wp(t,i,n,v,d,l,p);(0,k.Z)(c,{left:Le(y.x+o),top:Le(y.y+s)}),this.resetCrosshairs()},r.prototype.renderCustomContent=function(){var t=this.getHtmlContentNode(),i=this.get("parent"),n=this.get("container");n&&n.parentNode===i?i.replaceChild(t,n):i.appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()},r.prototype.getHtmlContentNode=function(){var t,i=this.get("customContent");if(i){var n=i(this.get("title"),this.get("items"));(0,h.isElement)(n)?t=n:t=(0,T.Z)(n)}return t},r.prototype.cacheDoms=function(){var t=this.getContainer(),i=t.getElementsByClassName(lr)[0],n=t.getElementsByClassName(Yi)[0];this.set("titleDom",i),this.set("listDom",n)},r.prototype.resetTitle=function(){var t=this.get("title"),i=this.get("showTitle");i&&t?this.setTitle(t):this.setTitle("")},r.prototype.setTitle=function(t){var i=this.get("titleDom");i&&(i.innerText=t)},r.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),i=this.get("crosshairs");if(!t||!i)this.clearCrosshairs();else{var n=Ri(t),a=this.get("xCrosshairDom"),o=this.get("yCrosshairDom");i==="x"?(this.resetCrosshair("x",n),o&&(o.remove(),this.set("yCrosshairDom",null))):i==="y"?(this.resetCrosshair("y",n),a&&(a.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",n),this.resetCrosshair("y",n)),this.setCrossHairsVisible(this.get("visible"))}},r.prototype.resetCrosshair=function(t,i){var n=this.checkCrosshair(t),a=this.get(t);t==="x"?(0,k.Z)(n,{left:Le(a),top:Le(i.y),height:Le(i.height)}):(0,k.Z)(n,{top:Le(a),left:Le(i.x),width:Le(i.width)})},r.prototype.checkCrosshair=function(t){var i=t+"CrosshairDom",n=t+"CrosshairTpl",a="CROSSHAIR_"+t.toUpperCase(),o=et[a],s=this.get(i),l=this.get("parent");return s||(s=(0,T.Z)(this.get(n)),this.applyStyle(o,s),l.appendChild(s),this.set(i,s)),s},r.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),i=this.get("itemTpl"),n=this.get("listDom");n&&((0,h.each)(t,function(a){var o=xr.toCSSGradient(a.color),s=(0,g.__assign)((0,g.__assign)({},a),{color:o}),l=(0,h.substitute)(i,s),u=(0,T.Z)(l);n.appendChild(u)}),this.applyChildrenStyles(n,this.get("domStyles")))},r.prototype.clearItemDoms=function(){this.get("listDom")&&Ja(this.get("listDom"))},r.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),i=this.get("yCrosshairDom");t&&t.remove(),i&&i.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},r}(ro),Cp=Sp,Ap={opacity:0},Mp={stroke:"#C5C5C5",strokeOpacity:.85},Fp={fill:"#CACED4",opacity:.85},vo=M(80389);function Ep(e){return(0,h.map)(e,function(r,t){var i=t===0?"M":"L",n=r[0],a=r[1];return[i,n,a]})}function Rl(e){return Ep(e)}function Tp(e){if(e.length<=2)return Rl(e);var r=[];(0,h.each)(e,function(o){(0,h.isEqual)(o,r.slice(r.length-2))||r.push(o[0],o[1])});var t=(0,vo.e9)(r,!1),i=(0,h.head)(e),n=i[0],a=i[1];return t.unshift(["M",n,a]),t}function Lp(e,r,t,i){i===void 0&&(i=!0);var n=new Di.bJ({values:e}),a=new Di.WD({values:(0,h.map)(e,function(s,l){return l})}),o=(0,h.map)(e,function(s,l){return[a.scale(l)*r,t-n.scale(s)*t]});return i?Tp(o):Rl(o)}function Ip(e,r){var t=new Di.bJ({values:e}),i=t.max<0?t.max:Math.max(0,t.min);return r-t.scale(i)*r}function Op(e,r,t,i){var n=(0,g.__spreadArrays)(e),a=Ip(i,t);return n.push(["L",r,a]),n.push(["L",0,a]),n.push(["Z"]),n}var Pp=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:Ap,lineStyle:Mp,areaStyle:Fp})},r.prototype.renderInner=function(t){var i=this.cfg,n=i.width,a=i.height,o=i.data,s=i.smooth,l=i.isArea,u=i.backgroundStyle,c=i.lineStyle,f=i.areaStyle;this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,g.__assign)({x:0,y:0,width:n,height:a},u)});var v=Lp(o,n,a,s);if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:(0,g.__assign)({path:v},c)}),l){var d=Op(v,n,a,o);this.addShape(t,{id:this.getElementId("area"),type:"path",attrs:(0,g.__assign)({path:d},f)})}},r.prototype.applyOffset=function(){var t=this.cfg,i=t.x,n=t.y;this.moveElementTo(this.get("group"),{x:i,y:n})},r}(Ae),IL=null,Nl={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},zl=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"handler",x:0,y:0,width:10,height:24,style:Nl})},r.prototype.renderInner=function(t){var i=this.cfg,n=i.width,a=i.height,o=i.style,s=o.fill,l=o.stroke,u=o.radius,c=o.opacity,f=o.cursor;this.addShape(t,{type:"rect",id:this.getElementId("background"),attrs:{x:0,y:0,width:n,height:a,fill:s,stroke:l,radius:u,opacity:c,cursor:f}});var v=1/3*n,d=2/3*n,p=1/4*a,y=3/4*a;this.addShape(t,{id:this.getElementId("line-left"),type:"line",attrs:{x1:v,y1:p,x2:v,y2:y,stroke:l,cursor:f}}),this.addShape(t,{id:this.getElementId("line-right"),type:"line",attrs:{x1:d,y1:p,x2:d,y2:y,stroke:l,cursor:f}})},r.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},r.prototype.initEvent=function(){this.bindEvents()},r.prototype.bindEvents=function(){var t=this;this.get("group").on("mouseenter",function(){var i=t.get("style").highLightFill;t.getElementByLocalId("background").attr("fill",i),t.draw()}),this.get("group").on("mouseleave",function(){var i=t.get("style").fill;t.getElementByLocalId("background").attr("fill",i),t.draw()})},r.prototype.draw=function(){var t=this.get("container").get("canvas");t&&t.draw()},r}(Ae),OL=null,kp={fill:"#416180",opacity:.05},Dp={fill:"#5B8FF9",opacity:.15,cursor:"move"},Rn=10,Bp={width:Rn,height:24},Rp={textBaseline:"middle",fill:"#000",opacity:.45},Np="sliderchange",zp=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.onMouseDown=function(i){return function(n){t.currentTarget=i;var a=n.originalEvent;a.stopPropagation(),a.preventDefault(),t.prevX=(0,h.get)(a,"touches.0.pageX",a.pageX),t.prevY=(0,h.get)(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(i){var n=t.cfg.width,a=[t.get("start"),t.get("end")];i.stopPropagation(),i.preventDefault();var o=(0,h.get)(i,"touches.0.pageX",i.pageX),s=(0,h.get)(i,"touches.0.pageY",i.pageY),l=o-t.prevX,u=t.adjustOffsetRange(l/n);t.updateStartEnd(u),t.updateUI(t.getElementByLocalId("foreground"),t.getElementByLocalId("minText"),t.getElementByLocalId("maxText")),t.prevX=o,t.prevY=s,t.draw(),t.emit(Np,[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 i=t.getContainerDOM();i&&(i.removeEventListener("mousemove",t.onMouseMove),i.removeEventListener("mouseup",t.onMouseUp),i.removeEventListener("mouseleave",t.onMouseUp),i.removeEventListener("touchmove",t.onMouseMove),i.removeEventListener("touchend",t.onMouseUp),i.removeEventListener("touchcancel",t.onMouseUp))},t}return r.prototype.setRange=function(t,i){this.set("minLimit",t),this.set("maxLimit",i);var n=this.get("start"),a=this.get("end"),o=(0,h.clamp)(n,t,i),s=(0,h.clamp)(a,t,i);!this.get("isInit")&&(n!==o||a!==s)&&this.setValue([o,s])},r.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},r.prototype.setValue=function(t){var i=this.getRange();if((0,h.isArray)(t)&&t.length===2){var n=[this.get("start"),this.get("end")];this.update({start:(0,h.clamp)(t[0],i.min,i.max),end:(0,h.clamp)(t[1],i.min,i.max)}),this.get("updateAutoRender")||this.render(),this.delegateEmit("valuechanged",{originValue:n,value:t})}},r.prototype.getValue=function(){return[this.get("start"),this.get("end")]},r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:kp,foregroundStyle:Dp,handlerStyle:Bp,textStyle:Rp}})},r.prototype.update=function(t){var i=t.start,n=t.end,a=(0,g.__assign)({},t);(0,h.isNil)(i)||(a.start=(0,h.clamp)(i,0,1)),(0,h.isNil)(n)||(a.end=(0,h.clamp)(n,0,1)),e.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"))},r.prototype.init=function(){this.set("start",(0,h.clamp)(this.get("start"),0,1)),this.set("end",(0,h.clamp)(this.get("end"),0,1)),e.prototype.init.call(this)},r.prototype.render=function(){e.prototype.render.call(this),this.updateUI(this.getElementByLocalId("foreground"),this.getElementByLocalId("minText"),this.getElementByLocalId("maxText"))},r.prototype.renderInner=function(t){var i=this.cfg,n=i.start,a=i.end,o=i.width,s=i.height,l=i.trendCfg,u=l===void 0?{}:l,c=i.minText,f=i.maxText,v=i.backgroundStyle,d=v===void 0?{}:v,p=i.foregroundStyle,y=p===void 0?{}:p,m=i.textStyle,x=m===void 0?{}:m,_=(0,h.deepMix)({},Nl,this.cfg.handlerStyle),w=n*o,b=a*o;(0,h.size)((0,h.get)(u,"data"))&&(this.trend=this.addComponent(t,(0,g.__assign)({component:Pp,id:this.getElementId("trend"),x:0,y:0,width:o,height:s},u))),this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,g.__assign)({x:0,y:0,width:o,height:s},d)});var S=this.addShape(t,{id:this.getElementId("minText"),type:"text",attrs:(0,g.__assign)({y:s/2,textAlign:"right",text:c,silent:!1},x)}),C=this.addShape(t,{id:this.getElementId("maxText"),type:"text",attrs:(0,g.__assign)({y:s/2,textAlign:"left",text:f,silent:!1},x)}),A=this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:(0,g.__assign)({y:0,height:s},y)}),F=(0,h.get)(_,"width",Rn),P=(0,h.get)(_,"height",24);this.minHandler=this.addComponent(t,{component:zl,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(s-P)/2,width:F,height:P,cursor:"ew-resize",style:_}),this.maxHandler=this.addComponent(t,{component:zl,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(s-P)/2,width:F,height:P,cursor:"ew-resize",style:_})},r.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},r.prototype.initEvent=function(){this.bindEvents()},r.prototype.updateUI=function(t,i,n){var a=this.cfg,o=a.start,s=a.end,l=a.width,u=a.minText,c=a.maxText,f=a.handlerStyle,v=a.height,d=o*l,p=s*l;this.trend&&(this.trend.update({width:l,height:v}),this.get("updateAutoRender")||this.trend.render()),t.attr("x",d),t.attr("width",p-d);var y=(0,h.get)(f,"width",Rn);i.attr("text",u),n.attr("text",c);var m=this._dodgeText([d,p],i,n),x=m[0],_=m[1];this.minHandler&&(this.minHandler.update({x:d-y/2}),this.get("updateAutoRender")||this.minHandler.render()),(0,h.each)(x,function(w,b){return i.attr(b,w)}),this.maxHandler&&(this.maxHandler.update({x:p-y/2}),this.get("updateAutoRender")||this.maxHandler.render()),(0,h.each)(_,function(w,b){return n.attr(b,w)})},r.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 i=t.findById(this.getElementId("foreground"));i.on("mousedown",this.onMouseDown("foreground")),i.on("touchstart",this.onMouseDown("foreground"))},r.prototype.adjustOffsetRange=function(t){var i=this.cfg,n=i.start,a=i.end;switch(this.currentTarget){case"minHandler":{var o=0-n,s=1-n;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-n,s=1-a;return Math.min(s,Math.max(o,t))}}},r.prototype.updateStartEnd=function(t){var i=this.cfg,n=i.start,a=i.end;switch(this.currentTarget){case"minHandler":n+=t;break;case"maxHandler":a+=t;break;case"foreground":n+=t,a+=t;break}this.set("start",n),this.set("end",a)},r.prototype._dodgeText=function(t,i,n){var a,o,s=this.cfg,l=s.handlerStyle,u=s.width,c=2,f=(0,h.get)(l,"width",Rn),v=t[0],d=t[1],p=!1;v>d&&(a=[d,v],v=a[0],d=a[1],o=[n,i],i=o[0],n=o[1],p=!0);var y=i.getBBox(),m=n.getBBox(),x=y.width>v-c?{x:v+f/2+c,textAlign:"left"}:{x:v-f/2-c,textAlign:"right"},_=m.width>u-d-c?{x:d-f/2-c,textAlign:"right"}:{x:d+f/2+c,textAlign:"left"};return p?[_,x]:[x,_]},r.prototype.draw=function(){var t=this.get("container"),i=t&&t.get("canvas");i&&i.draw()},r.prototype.getContainerDOM=function(){var t=this.get("container"),i=t&&t.get("canvas");return i&&i.get("container")},r}(Ae),PL=null,si=M(57817),Vp={trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},go={default:Vp,hover:{thumbColor:"rgba(0,0,0,0.2)"}},Gp=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.clearEvents=h.noop,t.onStartEvent=function(i){return function(n){t.isMobile=i,n.originalEvent.preventDefault();var a=i?(0,h.get)(n.originalEvent,"touches.0.clientX"):n.clientX,o=i?(0,h.get)(n.originalEvent,"touches.0.clientY"):n.clientY;t.startPos=t.cfg.isHorizontal?a:o,t.bindLaterEvent()}},t.bindLaterEvent=function(){var i=t.getContainerDOM(),n=[];t.isMobile?n=[(0,si.Z)(i,"touchmove",t.onMouseMove),(0,si.Z)(i,"touchend",t.onMouseUp),(0,si.Z)(i,"touchcancel",t.onMouseUp)]:n=[(0,si.Z)(i,"mousemove",t.onMouseMove),(0,si.Z)(i,"mouseup",t.onMouseUp),(0,si.Z)(i,"mouseleave",t.onMouseUp)],t.clearEvents=function(){n.forEach(function(a){a.remove()})}},t.onMouseMove=function(i){var n=t.cfg,a=n.isHorizontal,o=n.thumbOffset;i.preventDefault();var s=t.isMobile?(0,h.get)(i,"touches.0.clientX"):i.clientX,l=t.isMobile?(0,h.get)(i,"touches.0.clientY"):i.clientY,u=a?s:l,c=u-t.startPos;t.startPos=u,t.updateThumbOffset(o+c)},t.onMouseUp=function(i){i.preventDefault(),t.clearEvents()},t.onTrackClick=function(i){var n=t.cfg,a=n.isHorizontal,o=n.x,s=n.y,l=n.thumbLen,u=t.getContainerDOM(),c=u.getBoundingClientRect(),f=i.clientX,v=i.clientY,d=a?f-c.left-o-l/2:v-c.top-s-l/2,p=t.validateRange(d);t.updateThumbOffset(p)},t.onThumbMouseOver=function(){var i=t.cfg.theme.hover.thumbColor;t.getElementByLocalId("thumb").attr("stroke",i),t.draw()},t.onThumbMouseOut=function(){var i=t.cfg.theme.default.thumbColor;t.getElementByLocalId("thumb").attr("stroke",i),t.draw()},t}return r.prototype.setRange=function(t,i){this.set("minLimit",t),this.set("maxLimit",i);var n=this.getValue(),a=(0,h.clamp)(n,t,i);n!==a&&!this.get("isInit")&&this.setValue(a)},r.prototype.getRange=function(){var t=this.get("minLimit")||0,i=this.get("maxLimit")||1;return{min:t,max:i}},r.prototype.setValue=function(t){var i=this.getRange(),n=this.getValue();this.update({thumbOffset:(this.get("trackLen")-this.get("thumbLen"))*(0,h.clamp)(t,i.min,i.max)}),this.delegateEmit("valuechange",{originalValue:n,value:this.getValue()})},r.prototype.getValue=function(){return(0,h.clamp)(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},r.prototype.getDefaultCfg=function(){var t=e.prototype.getDefaultCfg.call(this);return(0,g.__assign)((0,g.__assign)({},t),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:go})},r.prototype.renderInner=function(t){this.renderTrackShape(t),this.renderThumbShape(t)},r.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},r.prototype.initEvent=function(){this.bindEvents()},r.prototype.renderTrackShape=function(t){var i=this.cfg,n=i.trackLen,a=i.theme,o=a===void 0?{default:{}}:a,s=(0,h.deepMix)({},go,o).default,l=s.lineCap,u=s.trackColor,c=s.size,f=(0,h.get)(this.cfg,"size",c),v=this.get("isHorizontal")?{x1:0+f/2,y1:f/2,x2:n-f/2,y2:f/2,lineWidth:f,stroke:u,lineCap:l}:{x1:f/2,y1:0+f/2,x2:f/2,y2:n-f/2,lineWidth:f,stroke:u,lineCap:l};return this.addShape(t,{id:this.getElementId("track"),name:"track",type:"line",attrs:v})},r.prototype.renderThumbShape=function(t){var i=this.cfg,n=i.thumbOffset,a=i.thumbLen,o=i.theme,s=(0,h.deepMix)({},go,o).default,l=s.size,u=s.lineCap,c=s.thumbColor,f=(0,h.get)(this.cfg,"size",l),v=this.get("isHorizontal")?{x1:n+f/2,y1:f/2,x2:n+a-f/2,y2:f/2,lineWidth:f,stroke:c,lineCap:u,cursor:"default"}:{x1:f/2,y1:n+f/2,x2:f/2,y2:n+a-f/2,lineWidth:f,stroke:c,lineCap:u,cursor:"default"};return this.addShape(t,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:v})},r.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 i=t.findById(this.getElementId("track"));i.on("click",this.onTrackClick);var n=t.findById(this.getElementId("thumb"));n.on("mouseover",this.onThumbMouseOver),n.on("mouseout",this.onThumbMouseOut)},r.prototype.getContainerDOM=function(){var t=this.get("container"),i=t&&t.get("canvas");return i&&i.get("container")},r.prototype.validateRange=function(t){var i=this.cfg,n=i.thumbLen,a=i.trackLen,o=t;return t+n>a?o=a-n:t+n<n&&(o=0),o},r.prototype.draw=function(){var t=this.get("container"),i=t&&t.get("canvas");i&&i.draw()},r.prototype.updateThumbOffset=function(t){var i=this.cfg,n=i.thumbOffset,a=i.isHorizontal,o=i.thumbLen,s=i.size,l=this.validateRange(t);if(l!==n){var u=this.getElementByLocalId("thumb");a?u.attr({x1:l+s/2,x2:l+o-s/2}):u.attr({y1:l+s/2,y2:l+o-s/2}),this.emitOffsetChange(l)}},r.prototype.emitOffsetChange=function(t){var i=this.cfg,n=i.thumbOffset,a=i.trackLen,o=i.thumbLen;this.cfg.thumbOffset=t,this.emit("scrollchange",{thumbOffset:t,ratio:(0,h.clamp)(t/(a-o),0,1)}),this.delegateEmit("valuechange",{originalValue:n,value:t})},r}(Ae),Wp=Kg,Hp=Qg,Yp=hp,Xp=up,Vl=dp,Up=yp,Nn=Cp;function jp(e){if((0,h.isEmpty)(e))return null;var r=e[0].x,t=e[0].x,i=e[0].y,n=e[0].y;return(0,h.each)(e,function(a){r=r>a.x?a.x:r,t=t<a.x?a.x:t,i=i>a.y?a.y:i,n=n<a.y?a.y:n}),{minX:r,maxX:t,minY:i,maxY:n,centerX:(r+t)/2,centerY:(i+n)/2}}function Gl(e){return Array.from(new Set(e)).length===1}function Wl(e){return((0,h.min)(e)+(0,h.max)(e))/2}function ge(e,r,t,i){return{x:e+t*Math.cos(i),y:r+t*Math.sin(i)}}function _r(e,r,t,i,n,a){a===void 0&&(a=0);var o=ge(e,r,t,i),s=ge(e,r,t,n),l=ge(e,r,a,i),u=ge(e,r,a,n);if(n-i==Math.PI*2){var c=ge(e,r,t,i+Math.PI),f=ge(e,r,a,i+Math.PI),v=[["M",o.x,o.y],["A",t,t,0,1,1,c.x,c.y],["A",t,t,0,1,1,s.x,s.y],["M",l.x,l.y]];return a&&(v.push(["A",a,a,0,1,0,f.x,f.y]),v.push(["A",a,a,0,1,0,u.x,u.y])),v.push(["M",o.x,o.y]),v.push(["Z"]),v}var d=n-i<=Math.PI?0:1,p=[["M",o.x,o.y],["A",t,t,0,d,1,s.x,s.y],["L",u.x,u.y]];return a&&p.push(["A",a,a,0,d,0,l.x,l.y]),p.push(["L",o.x,o.y]),p.push(["Z"]),p}function Hl(e,r,t,i,n){var a=ge(e,r,t,i),o=ge(e,r,t,n);if((0,h.isNumberEqual)(n-i,Math.PI*2)){var s=ge(e,r,t,i+Math.PI);return[["M",a.x,a.y],["A",t,t,0,1,1,s.x,s.y],["A",t,t,0,1,1,a.x,a.y],["A",t,t,0,1,0,s.x,s.y],["A",t,t,0,1,0,a.x,a.y],["Z"]]}var l=n-i<=Math.PI?0:1;return[["M",a.x,a.y],["A",t,t,0,l,1,o.x,o.y]]}function Xi(e,r){var t=e.points,i=jp(t),n,a,o=r.startAngle,s=r.endAngle,l=s-o;return r.isTransposed?(n=i.maxY*l,a=i.minY*l):(n=i.maxX*l,a=i.minX*l),n+=o,a+=o,{startAngle:a,endAngle:n}}function Zp(e,r){if((0,h.isNumber)(e)&&(0,h.isNumber)(r))return[e,r];if(e=e,r=r,Gl(e)||Gl(r))return[Wl(e),Wl(r)];for(var t=-1,i=0,n=0,a,o=e.length-1,s,l=0;++t<e.length;)a=o,o=t,l+=s=e[a]*r[o]-e[o]*r[a],i+=(e[a]+e[o])*s,n+=(r[a]+r[o])*s;return l*=3,[i/l,n/l]}function Yl(e,r){var t=e.attr(),i=r.attr();return(0,h.each)(t,function(n,a){i[a]===void 0&&(i[a]=void 0)}),i}function li(e,r,t){var i=Math.min(r,t),n=Math.max(r,t);return e>=i&&e<=n}function qp(e,r,t){if((0,h.isString)(e))return e.padEnd(r,t);if((0,h.isArray)(e)){var i=e.length;if(i<r)for(var n=r-i,a=0;a<n;a++)e.push(t)}return e}function Oe(e,r){return typeof e=="object"&&r.forEach(function(t){delete e[t]}),e}function wr(e,r,t){var i,n;r===void 0&&(r=[]),t===void 0&&(t=new Map);try{for(var a=(0,g.__values)(e),o=a.next();!o.done;o=a.next()){var s=o.value;t.has(s)||(r.push(s),t.set(s,!0))}}catch(l){i={error:l}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return r}var Ee=function(){function e(r,t,i,n){r===void 0&&(r=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),this.x=r,this.y=t,this.height=n,this.width=i}return e.fromRange=function(r,t,i,n){return new e(r,t,i-r,n-t)},e.fromObject=function(r){return new e(r.minX,r.minY,r.width,r.height)},Object.defineProperty(e.prototype,"minX",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxX",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minY",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxY",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tl",{get:function(){return{x:this.x,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tr",{get:function(){return{x:this.maxX,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bl",{get:function(){return{x:this.x,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"br",{get:function(){return{x:this.maxX,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"top",{get:function(){return{x:this.x+this.width/2,y:this.minY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"right",{get:function(){return{x:this.maxX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottom",{get:function(){return{x:this.x+this.width/2,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"left",{get:function(){return{x:this.minX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),e.prototype.isEqual=function(r){return this.x===r.x&&this.y===r.y&&this.width===r.width&&this.height===r.height},e.prototype.contains=function(r){return r.minX>=this.minX&&r.maxX<=this.maxX&&r.minY>=this.minY&&r.maxY<=this.maxY},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.add=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var i=this.clone();return(0,h.each)(r,function(n){i.x=Math.min(n.x,i.x),i.y=Math.min(n.y,i.y),i.width=Math.max(n.maxX,i.maxX)-i.x,i.height=Math.max(n.maxY,i.maxY)-i.y}),i},e.prototype.merge=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var i=this.clone();return(0,h.each)(r,function(n){i.x=Math.max(n.x,i.x),i.y=Math.max(n.y,i.y),i.width=Math.min(n.maxX,i.maxX)-i.x,i.height=Math.min(n.maxY,i.maxY)-i.y}),i},e.prototype.cut=function(r,t){var i=r.width,n=r.height;switch(t){case E.TOP:case E.TOP_LEFT:case E.TOP_RIGHT:return e.fromRange(this.minX,this.minY+n,this.maxX,this.maxY);case E.RIGHT:case E.RIGHT_TOP:case E.RIGHT_BOTTOM:return e.fromRange(this.minX,this.minY,this.maxX-i,this.maxY);case E.BOTTOM:case E.BOTTOM_LEFT:case E.BOTTOM_RIGHT:return e.fromRange(this.minX,this.minY,this.maxX,this.maxY-n);case E.LEFT:case E.LEFT_TOP:case E.LEFT_BOTTOM:return e.fromRange(this.minX+i,this.minY,this.maxX,this.maxY);default:return this}},e.prototype.shrink=function(r){var t=(0,g.__read)(r,4),i=t[0],n=t[1],a=t[2],o=t[3];return new e(this.x+o,this.y+i,this.width-o-n,this.height-i-a)},e.prototype.expand=function(r){var t=(0,g.__read)(r,4),i=t[0],n=t[1],a=t[2],o=t[3];return new e(this.x-o,this.y-i,this.width+o+n,this.height+i+a)},e.prototype.exceed=function(r){return[Math.max(-this.minY+r.minY,0),Math.max(this.maxX-r.maxX,0),Math.max(this.maxY-r.maxY,0),Math.max(-this.minX+r.minX,0)]},e.prototype.collide=function(r){return this.minX<r.maxX&&this.maxX>r.minX&&this.minY<r.maxY&&this.maxY>r.minY},e.prototype.size=function(){return this.width*this.height},e.prototype.isPointIn=function(r){return r.x>=this.minX&&r.x<=this.maxX&&r.y>=this.minY&&r.y<=this.maxY},e}(),kL=function(e,r){var t=r.start,i=r.end;return new Ee(e.x+e.width*t.x,e.y+e.height*t.y,e.width*Math.abs(i.x-t.x),e.height*Math.abs(i.y-t.y))};function Kp(e){return[[e.minX,e.minY],[e.maxX,e.minY],[e.maxX,e.maxY],[e.minX,e.maxY]]}function Ui(e){if(e.isPolar&&!e.isTransposed)return(e.endAngle-e.startAngle)*e.getRadius();var r=e.convert({x:0,y:0}),t=e.convert({x:1,y:0});return Math.sqrt(Math.pow(t.x-r.x,2)+Math.pow(t.y-r.y,2))}function $p(e){if(e.isPolar){var r=e.startAngle,t=e.endAngle;return t-r==Math.PI*2}return!1}function zn(e,r){var t=e.getCenter();return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))}function Qp(e,r){var t=!1;if(e)if(e.type==="theta"){var i=e.start,n=e.end;t=li(r.x,i.x,n.x)&&li(r.y,i.y,n.y)}else{var a=e.invert(r);t=li(a.x,0,1)&&li(a.y,0,1)}return t}function ui(e,r){var t=e.getCenter();return Math.atan2(r.y-t.y,r.x-t.x)}function po(e,r){r===void 0&&(r=0);var t=e.start,i=e.end,n=e.getWidth(),a=e.getHeight();if(e.isPolar){var o=e.startAngle,s=e.endAngle,l=e.getCenter(),u=e.getRadius();return{type:"path",startState:{path:_r(l.x,l.y,u+r,o,o)},endState:function(f){var v=(s-o)*f+o,d=_r(l.x,l.y,u+r,o,v);return{path:d}},attrs:{path:_r(l.x,l.y,u+r,o,s)}}}var c;return e.isTransposed?c={height:a+r*2}:c={width:n+r*2},{type:"rect",startState:{x:t.x-r,y:i.y-r,width:e.isTransposed?n+r*2:0,height:e.isTransposed?0:a+r*2},endState:c,attrs:{x:t.x-r,y:i.y-r,width:n+r*2,height:a+r*2}}}function Jp(e,r){r===void 0&&(r=0);var t=e.start,i=e.end,n=e.getWidth(),a=e.getHeight(),o=Math.min(t.x,i.x),s=Math.min(t.y,i.y);return Ee.fromRange(o-r,s-r,o+n+r,s+a+r)}var ty=/^(?:(?!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 ey(e){var r="linear";return ty.test(e)?r="timeCat":(0,h.isString)(e)&&(r="cat"),r}function Xl(e,r,t,i){return r===void 0&&(r={}),r.type?r.type:e.type!=="identity"&&bt.includes(t)&&["interval"].includes(i)||e.isCategory?"cat":e.type}function ry(e,r,t){var i=r||[];if((0,h.isNumber)(e)||(0,h.isNil)((0,h.firstValue)(i,e))&&(0,h.isEmpty)(t)){var n=(0,Di.yZ)("identity");return new n({field:e.toString(),values:[e]})}var a=(0,h.valuesOfKey)(i,e),o=(0,h.get)(t,"type",ey(a[0])),s=(0,Di.yZ)(o);return new s((0,g.__assign)({field:e,values:a},t))}function iy(e,r){if(e.type!=="identity"&&r.type!=="identity"){var t={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);e.change(t)}}function ji(e){return e.alias||e.field}function Ul(e,r,t){var i=e.values,n=i.length,a;if(n===1)a=[.5,1];else{var o=1,s=0;$p(r)?r.isTransposed?(o=(0,h.get)(t,"widthRatio.multiplePie",1/1.3),s=1/n*o,a=[s/2,1-s/2]):a=[0,1-1/n]:(s=1/n/2,a=[s,1-s])}return a}function ny(e){var r=e.values.filter(function(t){return!(0,h.isNil)(t)&&!isNaN(t)});return Math.max.apply(Math,(0,g.__spreadArray)((0,g.__spreadArray)([],(0,g.__read)(r),!1),[(0,h.isNil)(e.max)?-Infinity:e.max],!1))}function ay(e){var r,t;switch(e){case E.TOP:r={x:0,y:1},t={x:1,y:1};break;case E.RIGHT:r={x:1,y:0},t={x:1,y:1};break;case E.BOTTOM:r={x:0,y:0},t={x:1,y:0};break;case E.LEFT:r={x:0,y:0},t={x:0,y:1};break;default:r=t={x:0,y:0}}return{start:r,end:t}}function oy(e){var r,t;return e.isTransposed?(r={x:0,y:0},t={x:1,y:0}):(r={x:0,y:0},t={x:0,y:1}),{start:r,end:t}}function Vn(e,r){var t={start:{x:0,y:0},end:{x:0,y:0}};e.isRect?t=ay(r):e.isPolar&&(t=oy(e));var i=t.start,n=t.end;return{start:e.convert(i),end:e.convert(n)}}function DL(e,r){if(e.isRect)return e.isTransposed?[DIRECTION.RIGHT,DIRECTION.BOTTOM].includes(r)?1:-1:[DIRECTION.BOTTOM,DIRECTION.RIGHT].includes(r)?-1:1;if(e.isPolar){var t=e.x.start;return t<0?-1:1}return 1}function jl(e){var r=e.start,t=e.end;return r.x===t.x}function Zl(e,r){var t=e.start,i=e.end,n=jl(e);return n?(t.y-i.y)*(r.x-t.x)>0?1:-1:(i.x-t.x)*(t.y-r.y)>0?-1:1}function Gn(e,r){var t=(0,h.get)(e,["components","axis"],{});return(0,h.deepMix)({},(0,h.get)(t,["common"],{}),(0,h.deepMix)({},(0,h.get)(t,[r],{})))}function ql(e,r,t){var i=(0,h.get)(e,["components","axis"],{});return(0,h.deepMix)({},(0,h.get)(i,["common","title"],{}),(0,h.deepMix)({},(0,h.get)(i,[r,"title"],{})),t)}function yo(e){var r=e.x,t=e.y,i=e.circleCenter,n=t.start>t.end,a=e.isTransposed?e.convert({x:n?0:1,y:0}):e.convert({x:0,y:n?0:1}),o=[a.x-i.x,a.y-i.y],s=[1,0],l=a.y>i.y?Lt.angle(o,s):Lt.angle(o,s)*-1,u=l+(r.end-r.start),c=Math.sqrt(Math.pow(a.x-i.x,2)+Math.pow(a.y-i.y,2));return{center:i,radius:c,startAngle:l,endAngle:u}}function Wn(e,r){return(0,h.isBoolean)(e)?e===!1?!1:{}:(0,h.get)(e,[r])}function Kl(e,r){return(0,h.get)(e,"position",r)}function $l(e,r){return(0,h.get)(r,["title","text"],ji(e))}var ci=function(){function e(r,t){this.destroyed=!1,this.facets=[],this.view=r,this.cfg=(0,h.deepMix)({},this.getDefaultCfg(),t)}return e.prototype.init=function(){this.container||(this.container=this.createContainer());var r=this.view.getData();this.facets=this.generateFacets(r)},e.prototype.render=function(){this.renderViews()},e.prototype.update=function(){},e.prototype.clear=function(){this.clearFacetViews()},e.prototype.destroy=function(){this.clear(),this.container&&(this.container.remove(!0),this.container=void 0),this.destroyed=!0,this.view=void 0,this.facets=[]},e.prototype.facetToView=function(r){var t=r.region,i=r.data,n=r.padding,a=n===void 0?this.cfg.padding:n,o=this.view.createView({region:t,padding:a});o.data(i||[]),r.view=o,this.beforeEachView(o,r);var s=this.cfg.eachView;return s&&s(o,r),this.afterEachView(o,r),o},e.prototype.createContainer=function(){var r=this.view.getLayer(J.FORE);return r.addGroup()},e.prototype.renderViews=function(){this.createFacetViews()},e.prototype.createFacetViews=function(){var r=this;return this.facets.map(function(t){return r.facetToView(t)})},e.prototype.clearFacetViews=function(){var r=this;(0,h.each)(this.facets,function(t){t.view&&(r.view.removeView(t.view),t.view=void 0)})},e.prototype.parseSpacing=function(){var r=this.view.viewBBox,t=r.width,i=r.height,n=this.cfg.spacing;return n.map(function(a,o){return(0,h.isNumber)(a)?a/(o===0?t:i):parseFloat(a)/100})},e.prototype.getFieldValues=function(r,t){var i=[],n={};return(0,h.each)(r,function(a){var o=a[t];!(0,h.isNil)(o)&&!n[o]&&(i.push(o),n[o]=!0)}),i},e.prototype.getRegion=function(r,t,i,n){var a=(0,g.__read)(this.parseSpacing(),2),o=a[0],s=a[1],l=(1+o)/(t===0?1:t)-o,u=(1+s)/(r===0?1:r)-s,c={x:(l+o)*i,y:(u+s)*n},f={x:c.x+l,y:c.y+u};return{start:c,end:f}},e.prototype.getDefaultCfg=function(){return{eachView:void 0,showTitle:!0,spacing:[0,0],padding:10,fields:[]}},e.prototype.getDefaultTitleCfg=function(){var r=this.view.getTheme().fontFamily;return{style:{fontSize:14,fill:"#666",fontFamily:r}}},e.prototype.processAxis=function(r,t){var i=r.getOptions(),n=i.coordinate,a=r.geometries,o=(0,h.get)(n,"type","rect");if(o==="rect"&&a.length){(0,h.isNil)(i.axes)&&(i.axes={});var s=i.axes,l=(0,g.__read)(a[0].getXYFields(),2),u=l[0],c=l[1],f=Wn(s,u),v=Wn(s,c);f!==!1&&(i.axes[u]=this.getXAxisOption(u,s,f,t)),v!==!1&&(i.axes[c]=this.getYAxisOption(c,s,v,t))}},e.prototype.getFacetDataFilter=function(r){return function(t){return(0,h.every)(r,function(i){var n=i.field,a=i.value;return!(0,h.isNil)(a)&&n?t[n]===a:!0})}},e}(),Ql={},sy=function(e){return Ql[(0,h.lowerCase)(e)]},hi=function(e,r){Ql[(0,h.lowerCase)(e)]=r},ly=function(){function e(r,t){this.context=r,this.cfg=t,r.addAction(this)}return e.prototype.applyCfg=function(r){(0,h.assign)(this,r)},e.prototype.init=function(){this.applyCfg(this.cfg)},e.prototype.destroy=function(){this.context.removeAction(this),this.context=null},e}(),ne=ly,uy=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.execute=function(){this.callback&&this.callback(this.context)},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.callback=null},r}(ne),cy=uy,Hn={};function hy(e,r){var t=Hn[e],i=null;if(t){var n=t.ActionClass,a=t.cfg;i=new n(r,a),i.name=e,i.init()}return i}function Yn(e){var r=Hn[e];return(0,h.get)(r,"ActionClass")}function xt(e,r,t){Hn[e]={ActionClass:r,cfg:t}}function BL(e){delete Hn[e]}function fy(e,r){var t=new cy(r);return t.callback=e,t.name="callback",t}function vy(e,r){var t=[];if(e.length){t.push(["M",e[0].x,e[0].y]);for(var i=1,n=e.length;i<n;i+=1){var a=e[i];t.push(["L",a.x,a.y])}r&&t.push(["Z"])}return t}function mo(e,r){for(var t=[e[0]],i=1,n=e.length;i<n;i=i+2){var a=r.convert({x:e[i],y:e[i+1]});t.push(a.x,a.y)}return t}function Jl(e,r){var t=r.isTransposed,i=e[1],n=e[6],a=e[7],o=r.convert({x:n,y:a}),s=t?0:1;return["A",i,i,0,0,s,o.x,o.y]}function dy(e,r,t){var i=t.isTransposed,n=t.startAngle,a=t.endAngle,o=e[0].toLowerCase()==="a"?{x:e[6],y:e[7]}:{x:e[1],y:e[2]},s={x:r[1],y:r[2]},l=[],u=i?"y":"x",c=Math.abs(s[u]-o[u])*(a-n),f=s[u]>=o[u]?1:0,v=c>Math.PI?1:0,d=t.convert(s),p=zn(t,d);if(p>=.5)if(c===Math.PI*2){var y={x:(s.x+o.x)/2,y:(s.y+o.y)/2},m=t.convert(y);l.push(["A",p,p,0,v,f,m.x,m.y]),l.push(["A",p,p,0,v,f,d.x,d.y])}else l.push(["A",p,p,0,v,f,d.x,d.y]);return l}function gy(e){(0,h.each)(e,function(r,t){var i=r;if(i[0].toLowerCase()==="a"){var n=e[t-1],a=e[t+1];a&&a[0].toLowerCase()==="a"?n&&n[0].toLowerCase()==="l"&&(n[0]="M"):n&&n[0].toLowerCase()==="a"&&a&&a[0].toLowerCase()==="l"&&(a[0]="M")}})}var py=function(e,r,t,i){var n,a=[],o=!!i,s,l,u,c,f,v,d;if(o){n=(0,g.__read)(i,2),u=n[0],c=n[1];for(var p=0,y=e.length;p<y;p++){var m=e[p];u=Lt.min([0,0],u,m),c=Lt.max([0,0],c,m)}}for(var p=0,x=e.length;p<x;p++){var m=e[p];if(p===0&&!t)d=m;else if(p===x-1&&!t)v=m,a.push(d),a.push(v);else{s=e[t?p?p-1:x-1:p-1],l=e[t?(p+1)%x:p+1];var _=[0,0];_=Lt.sub(_,l,s),_=Lt.scale(_,_,r);var w=Lt.distance(m,s),b=Lt.distance(m,l),S=w+b;S!==0&&(w/=S,b/=S);var C=Lt.scale([0,0],_,-w),A=Lt.scale([0,0],_,b);v=Lt.add([0,0],m,C),f=Lt.add([0,0],m,A),f=Lt.min([0,0],f,Lt.max([0,0],l,m)),f=Lt.max([0,0],f,Lt.min([0,0],l,m)),C=Lt.sub([0,0],f,m),C=Lt.scale([0,0],C,-w/b),v=Lt.add([0,0],m,C),v=Lt.min([0,0],v,Lt.max([0,0],s,m)),v=Lt.max([0,0],v,Lt.min([0,0],s,m)),A=Lt.sub([0,0],m,v),A=Lt.scale([0,0],A,b/w),f=Lt.add([0,0],m,A),o&&(v=Lt.max([0,0],v,u),v=Lt.min([0,0],v,c),f=Lt.max([0,0],f,u),f=Lt.min([0,0],f,c)),a.push(d),a.push(v),d=f}}return t&&a.push(a.shift()),a};function tu(e,r,t){for(var i=!!r,n=[],a=0,o=e.length;a<o;a+=2)n.push([e[a],e[a+1]]);for(var s=py(n,.4,i,t),l=n.length,u=[],c,f,v,a=0;a<l-1;a++)c=s[a*2],f=s[a*2+1],v=n[a+1],u.push(["C",c[0],c[1],f[0],f[1],v[0],v[1]]);return i&&(c=s[l],f=s[l+1],v=n[0],u.push(["C",c[0],c[1],f[0],f[1],v[0],v[1]])),u}function Zi(e,r){return vy(e,r)}function Xn(e,r,t){var i=[],n=e[0],a=null;if(e.length<=2)return Zi(e,r);for(var o=0,s=e.length;o<s;o++){var l=e[o];(!a||!(a.x===l.x&&a.y===l.y))&&(i.push(l.x),i.push(l.y),a=l)}var u=t||[[0,0],[1,1]],c=tu(i,r,u);return c.unshift(["M",n.x,n.y]),c}function yy(e,r){var t=[];return(0,h.each)(r,function(i){var n=i[0];switch(n.toLowerCase()){case"m":case"l":case"c":t.push(mo(i,e));break;case"a":t.push(Jl(i,e));break;case"z":default:t.push(i);break}}),t}function my(e,r){var t=[],i,n,a,o;return(0,h.each)(r,function(s,l){var u=s[0];switch(u.toLowerCase()){case"m":case"c":case"q":t.push(mo(s,e));break;case"l":i=r[l-1],n=s,a=e.isTransposed,o=a?i[i.length-2]===n[1]:i[i.length-1]===n[2],o?t=t.concat(dy(i,n,e)):t.push(mo(s,e));break;case"a":t.push(Jl(s,e));break;case"z":default:t.push(s);break}}),gy(t),t}function eu(e,r){var t=e.event,i=t.target;return iu(i,r)}function ru(e,r){var t=e.getCanvasBBox(),i=t.width,n=t.height;return i>0&&n>0&&(i>=r||n>=r)}function iu(e,r){var t=e.getCanvasBBox();return ru(e,r)?t:null}function nu(e,r){var t=e.event.maskShapes;return t.map(function(i){return iu(i,r)}).filter(function(i){return!!i})}function xy(e,r){var t=e.event,i=t.target;return au(i,r)}function au(e,r){return ru(e,r)?e.attr("path"):null}function _y(e,r){var t=e.event.maskShapes;return t.map(function(i){return au(i,r)})}function br(e){var r=e.event,t,i=r.target;return i&&(t=i.get("element")),t}function zr(e){var r=e.event,t=r.target,i;return t&&(i=t.get("delegateObject")),i}function ou(e){var r=e.event.gEvent;return!(r&&r.fromShape&&r.toShape&&r.fromShape.get("element")===r.toShape.get("element"))}function qi(e){return e&&e.component&&e.component.isList()}function su(e){return e&&e.component&&e.component.isSlider()}function Ki(e){var r=e.event,t=r.target;return t&&(t==null?void 0:t.get("name"))==="mask"||Un(e)}function Un(e){var r;return((r=e.event.target)===null||r===void 0?void 0:r.get("name"))==="multi-mask"}function xo(e,r){var t=e.event.target;if(Un(e))return wy(e,r);if(t.get("type")==="path"){var i=xy(e,r);return i?fu(e.view,i):void 0}var n=eu(e,r);return n?jn(e.view,n):null}function wy(e,r){var t=e.event.target;if(t.get("type")==="path"){var i=_y(e,r);return i.length>0?i.flatMap(function(a){return fu(e.view,a)}):null}var n=nu(e,r);return n.length>0?n.flatMap(function(a){return jn(e.view,a)}):null}function lu(e,r,t){if(Un(e))return by(e,r,t);var i=eu(e,t);return i?uu(i,e,r):null}function uu(e,r,t){var i=r.view,n=wo(i,t,{x:e.x,y:e.y}),a=wo(i,t,{x:e.maxX,y:e.maxY}),o={minX:n.x,minY:n.y,maxX:a.x,maxY:a.y};return jn(t,o)}function by(e,r,t){var i=nu(e,t);return i.length>0?i.flatMap(function(n){return uu(n,e,r)}):null}function Ce(e){var r=e.geometries,t=[];return(0,h.each)(r,function(i){var n=i.elements;t=t.concat(n)}),e.views&&e.views.length&&(0,h.each)(e.views,function(i){t=t.concat(Ce(i))}),t}function Sy(e,r,t){var i=Ce(e);return i.filter(function(n){return je(n,r)===t})}function cu(e,r){var t=e.geometries,i=[];return(0,h.each)(t,function(n){var a=n.getElementsBy(function(o){return o.hasState(r)});i=i.concat(a)}),i}function je(e,r){var t=e.getModel(),i=t.data,n;return(0,h.isArray)(i)?n=i[0][r]:n=i[r],n}function Cy(e,r){return!(r.minX>e.maxX||r.maxX<e.minX||r.minY>e.maxY||r.maxY<e.minY)}function jn(e,r){var t=Ce(e),i=[];return(0,h.each)(t,function(n){var a=n.shape,o=a.getCanvasBBox();Cy(r,o)&&i.push(n)}),i}function hu(e){var r=[];return(0,h.each)(e,function(t){var i=t[0];if(i!=="A")for(var n=1;n<t.length;n=n+2)r.push([t[n],t[n+1]]);else{var a=t.length;r.push([t[a-2],t[a-1]])}}),r}function fu(e,r){var t=Ce(e),i=hu(r),n=t.filter(function(a){var o=a.shape,s;if(o.get("type")==="path")s=hu(o.attr("path"));else{var l=o.getCanvasBBox();s=Kp(l)}return(0,vo.Wq)(i,s)});return n}function vu(e){return e.getComponents().map(function(r){return r.component})}function _o(e,r){var t=r.x-e.x,i=r.y-e.y;return Math.sqrt(t*t+i*i)}function Ay(e,r){if(e.length<=2)return Zi(e,!1);var t=e[0],i=[];(0,h.each)(e,function(a){i.push(a.x),i.push(a.y)});var n=tu(i,r,null);return n.unshift(["M",t.x,t.y]),n}function du(e,r){return e.x<=r.x&&e.maxX>=r.x&&e.y<=r.y&&e.maxY>r.y}function Qe(e){var r=e.parent,t=null;return r&&(t=r.views.filter(function(i){return i!==e})),t}function My(e,r){var t=e.getCoordinate();return t.invert(r)}function wo(e,r,t){var i=My(e,t);return r.getCoordinate().convert(i)}function gu(e,r,t,i){var n=!1;return(0,h.each)(e,function(a){if(a[t]===r[t]&&a[i]===r[i])return n=!0,!1}),n}function fi(e,r){var t=e.getScaleByField(r);return!t&&e.views&&(0,h.each)(e.views,function(i){if(t=fi(i,r),t)return!1}),t}var Fy=function(){function e(r){this.actions=[],this.event=null,this.cacheMap={},this.view=r}return e.prototype.cache=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];if(r.length===1)return this.cacheMap[r[0]];r.length===2&&(this.cacheMap[r[0]]=r[1])},e.prototype.getAction=function(r){return this.actions.find(function(t){return t.name===r})},e.prototype.addAction=function(r){this.actions.push(r)},e.prototype.removeAction=function(r){var t=this.actions,i=this.actions.indexOf(r);i>=0&&t.splice(i,1)},e.prototype.getCurrentPoint=function(){var r=this.event;if(r)if(r.target instanceof HTMLElement){var t=this.view.getCanvas(),i=t.getPointByClient(r.clientX,r.clientY);return i}else return{x:r.x,y:r.y};return null},e.prototype.getCurrentShape=function(){return(0,h.get)(this.event,["gEvent","shape"])},e.prototype.isInPlot=function(){var r=this.getCurrentPoint();return r?this.view.isPointInPlot(r):!1},e.prototype.isInShape=function(r){var t=this.getCurrentShape();return t?t.get("name")===r:!1},e.prototype.isInComponent=function(r){var t=vu(this.view),i=this.getCurrentPoint();return i?!!t.find(function(n){var a=n.getBBox();return r?n.get("name")===r&&du(a,i):du(a,i)}):!1},e.prototype.destroy=function(){(0,h.each)(this.actions.slice(),function(r){r.destroy()}),this.view=null,this.event=null,this.actions=null,this.cacheMap=null},e}(),Ey=Fy,Ty=function(){function e(r,t){this.view=r,this.cfg=t}return e.prototype.init=function(){this.initEvents()},e.prototype.initEvents=function(){},e.prototype.clearEvents=function(){},e.prototype.destroy=function(){this.clearEvents()},e}(),Ly=Ty;function pu(e,r,t){var i=e.split(":"),n=i[0],a=r.getAction(n)||hy(n,r);if(!a)throw new Error("There is no action named ".concat(n));var o=i[1];return{action:a,methodName:o,arg:t}}function yu(e){var r=e.action,t=e.methodName,i=e.arg;if(r[t])r[t](i);else throw new Error("Action(".concat(r.name,") doesn't have a method called ").concat(t))}var Ne={START:"start",SHOW_ENABLE:"showEnable",END:"end",ROLLBACK:"rollback",PROCESSING:"processing"},Iy=function(e){(0,g.__extends)(r,e);function r(t,i){var n=e.call(this,t,i)||this;return n.callbackCaches={},n.emitCaches={},n.steps=i,n}return r.prototype.init=function(){this.initContext(),e.prototype.init.call(this)},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.steps=null,this.context&&(this.context.destroy(),this.context=null),this.callbackCaches=null,this.view=null},r.prototype.initEvents=function(){var t=this;(0,h.each)(this.steps,function(i,n){(0,h.each)(i,function(a){var o=t.getActionCallback(n,a);o&&t.bindEvent(a.trigger,o)})})},r.prototype.clearEvents=function(){var t=this;(0,h.each)(this.steps,function(i,n){(0,h.each)(i,function(a){var o=t.getActionCallback(n,a);o&&t.offEvent(a.trigger,o)})})},r.prototype.initContext=function(){var t=this.view,i=new Ey(t);this.context=i;var n=this.steps;(0,h.each)(n,function(a){(0,h.each)(a,function(o){if((0,h.isFunction)(o.action))o.actionObject={action:fy(o.action,i),methodName:"execute"};else if((0,h.isString)(o.action))o.actionObject=pu(o.action,i,o.arg);else if((0,h.isArray)(o.action)){var s=o.action,l=(0,h.isArray)(o.arg)?o.arg:[o.arg];o.actionObject=[],(0,h.each)(s,function(u,c){o.actionObject.push(pu(u,i,l[c]))})}})})},r.prototype.isAllowStep=function(t){var i=this.currentStepName,n=this.steps;if(i===t||t===Ne.SHOW_ENABLE)return!0;if(t===Ne.PROCESSING)return i===Ne.START;if(t===Ne.START)return i!==Ne.PROCESSING;if(t===Ne.END)return i===Ne.PROCESSING||i===Ne.START;if(t===Ne.ROLLBACK){if(n[Ne.END])return i===Ne.END;if(i===Ne.START)return!0}return!1},r.prototype.isAllowExecute=function(t,i){if(this.isAllowStep(t)){var n=this.getKey(t,i);return i.once&&this.emitCaches[n]?!1:i.isEnable?i.isEnable(this.context):!0}return!1},r.prototype.enterStep=function(t){this.currentStepName=t,this.emitCaches={}},r.prototype.afterExecute=function(t,i){t!==Ne.SHOW_ENABLE&&this.currentStepName!==t&&this.enterStep(t);var n=this.getKey(t,i);this.emitCaches[n]=!0},r.prototype.getKey=function(t,i){return t+i.trigger+i.action},r.prototype.getActionCallback=function(t,i){var n=this,a=this.context,o=this.callbackCaches,s=i.actionObject;if(i.action&&s){var l=this.getKey(t,i);if(!o[l]){var u=function(c){a.event=c,n.isAllowExecute(t,i)?((0,h.isArray)(s)?(0,h.each)(s,function(f){a.event=c,yu(f)}):(a.event=c,yu(s)),n.afterExecute(t,i),i.callback&&(a.event=c,i.callback(a))):a.event=null};i.debounce?o[l]=(0,h.debounce)(u,i.debounce.wait,i.debounce.immediate):i.throttle?o[l]=(0,h.throttle)(u,i.throttle.wait,{leading:i.throttle.leading,trailing:i.throttle.trailing}):o[l]=u}return o[l]}return null},r.prototype.bindEvent=function(t,i){var n=t.split(":");n[0]==="window"?window.addEventListener(n[1],i):n[0]==="document"?document.addEventListener(n[1],i):this.view.on(t,i)},r.prototype.offEvent=function(t,i){var n=t.split(":");n[0]==="window"?window.removeEventListener(n[1],i):n[0]==="document"?document.removeEventListener(n[1],i):this.view.off(t,i)},r}(Ly),Oy=Iy,mu={};function Py(e){return mu[(0,h.lowerCase)(e)]}function Ot(e,r){mu[(0,h.lowerCase)(e)]=r}function ky(e,r,t){var i=Py(e);if(!i)return null;if((0,h.isPlainObject)(i)){var n=(0,h.mix)((0,h.clone)(i),t);return new Oy(r,n)}else{var a=i;return new a(r,t)}}function Dy(e){return{title:{autoRotate:!0,position:"center",spacing:e.axisTitleSpacing,style:{fill:e.axisTitleTextFillColor,fontSize:e.axisTitleTextFontSize,lineHeight:e.axisTitleTextLineHeight,textBaseline:"middle",fontFamily:e.fontFamily},iconStyle:{fill:e.axisDescriptionIconFillColor}},label:{autoRotate:!1,autoEllipsis:!1,autoHide:{type:"equidistance",cfg:{minGap:6}},offset:e.axisLabelOffset,style:{fill:e.axisLabelFillColor,fontSize:e.axisLabelFontSize,lineHeight:e.axisLabelLineHeight,fontFamily:e.fontFamily}},line:{style:{lineWidth:e.axisLineBorder,stroke:e.axisLineBorderColor}},grid:{line:{type:"line",style:{stroke:e.axisGridBorderColor,lineWidth:e.axisGridBorder,lineDash:e.axisGridLineDash}},alignTick:!0,animate:!0},tickLine:{style:{lineWidth:e.axisTickLineBorder,stroke:e.axisTickLineBorderColor},alignTick:!0,length:e.axisTickLineLength},subTickLine:null,animate:!0}}function By(e){return{title:null,marker:{symbol:"circle",spacing:e.legendMarkerSpacing,style:{r:e.legendCircleMarkerSize,fill:e.legendMarkerColor}},itemName:{spacing:5,style:{fill:e.legendItemNameFillColor,fontFamily:e.fontFamily,fontSize:e.legendItemNameFontSize,lineHeight:e.legendItemNameLineHeight,fontWeight:e.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:e.legendPageNavigatorMarkerSize,inactiveFill:e.legendPageNavigatorMarkerInactiveFillColor,inactiveOpacity:e.legendPageNavigatorMarkerInactiveFillOpacity,fill:e.legendPageNavigatorMarkerFillColor,opacity:e.legendPageNavigatorMarkerFillOpacity}},text:{style:{fill:e.legendPageNavigatorTextFillColor,fontSize:e.legendPageNavigatorTextFontSize}}},animate:!1,maxItemWidth:200,itemSpacing:e.legendItemSpacing,itemMarginBottom:e.legendItemMarginBottom,padding:e.legendPadding}}function xu(e){var r,t={point:{default:{fill:e.pointFillColor,r:e.pointSize,stroke:e.pointBorderColor,lineWidth:e.pointBorder,fillOpacity:e.pointFillOpacity},active:{stroke:e.pointActiveBorderColor,lineWidth:e.pointActiveBorder},selected:{stroke:e.pointSelectedBorderColor,lineWidth:e.pointSelectedBorder},inactive:{fillOpacity:e.pointInactiveFillOpacity,strokeOpacity:e.pointInactiveBorderOpacity}},hollowPoint:{default:{fill:e.hollowPointFillColor,lineWidth:e.hollowPointBorder,stroke:e.hollowPointBorderColor,strokeOpacity:e.hollowPointBorderOpacity,r:e.hollowPointSize},active:{stroke:e.hollowPointActiveBorderColor,strokeOpacity:e.hollowPointActiveBorderOpacity},selected:{lineWidth:e.hollowPointSelectedBorder,stroke:e.hollowPointSelectedBorderColor,strokeOpacity:e.hollowPointSelectedBorderOpacity},inactive:{strokeOpacity:e.hollowPointInactiveBorderOpacity}},area:{default:{fill:e.areaFillColor,fillOpacity:e.areaFillOpacity,stroke:null},active:{fillOpacity:e.areaActiveFillOpacity},selected:{fillOpacity:e.areaSelectedFillOpacity},inactive:{fillOpacity:e.areaInactiveFillOpacity}},hollowArea:{default:{fill:null,stroke:e.hollowAreaBorderColor,lineWidth:e.hollowAreaBorder,strokeOpacity:e.hollowAreaBorderOpacity},active:{fill:null,lineWidth:e.hollowAreaActiveBorder},selected:{fill:null,lineWidth:e.hollowAreaSelectedBorder},inactive:{strokeOpacity:e.hollowAreaInactiveBorderOpacity}},interval:{default:{fill:e.intervalFillColor,fillOpacity:e.intervalFillOpacity},active:{stroke:e.intervalActiveBorderColor,lineWidth:e.intervalActiveBorder},selected:{stroke:e.intervalSelectedBorderColor,lineWidth:e.intervalSelectedBorder},inactive:{fillOpacity:e.intervalInactiveFillOpacity,strokeOpacity:e.intervalInactiveBorderOpacity}},hollowInterval:{default:{fill:e.hollowIntervalFillColor,stroke:e.hollowIntervalBorderColor,lineWidth:e.hollowIntervalBorder,strokeOpacity:e.hollowIntervalBorderOpacity},active:{stroke:e.hollowIntervalActiveBorderColor,lineWidth:e.hollowIntervalActiveBorder,strokeOpacity:e.hollowIntervalActiveBorderOpacity},selected:{stroke:e.hollowIntervalSelectedBorderColor,lineWidth:e.hollowIntervalSelectedBorder,strokeOpacity:e.hollowIntervalSelectedBorderOpacity},inactive:{stroke:e.hollowIntervalInactiveBorderColor,lineWidth:e.hollowIntervalInactiveBorder,strokeOpacity:e.hollowIntervalInactiveBorderOpacity}},line:{default:{stroke:e.lineBorderColor,lineWidth:e.lineBorder,strokeOpacity:e.lineBorderOpacity,fill:null,lineAppendWidth:10,lineCap:"round",lineJoin:"round"},active:{lineWidth:e.lineActiveBorder},selected:{lineWidth:e.lineSelectedBorder},inactive:{strokeOpacity:e.lineInactiveBorderOpacity}}},i=Dy(e),n=By(e);return{background:e.backgroundColor,defaultColor:e.brandColor,subColor:e.subColor,semanticRed:e.paletteSemanticRed,semanticGreen:e.paletteSemanticGreen,padding:"auto",fontFamily:e.fontFamily,columnWidthRatio:1/2,maxColumnWidth:null,minColumnWidth:null,roseWidthRatio:.9999999,multiplePieWidthRatio:1/1.3,colors10:e.paletteQualitative10,colors20:e.paletteQualitative20,sequenceColors:e.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=Xi(a.getModel(),o),l=s.startAngle,u=s.endAngle,c=(l+u)/2,f=7.5,v=f*Math.cos(c),d=f*Math.sin(c);return{matrix:ie.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,g.__assign)((0,g.__assign)({},t.line.default),{lineCap:null,lineDash:[1,1]})},active:{style:(0,g.__assign)((0,g.__assign)({},t.line.active),{lineCap:null,lineDash:[1,1]})},inactive:{style:(0,g.__assign)((0,g.__assign)({},t.line.inactive),{lineCap:null,lineDash:[1,1]})},selected:{style:(0,g.__assign)((0,g.__assign)({},t.line.selected),{lineCap:null,lineDash:[1,1]})}},dash:{default:{style:(0,g.__assign)((0,g.__assign)({},t.line.default),{lineCap:null,lineDash:[5.5,1]})},active:{style:(0,g.__assign)((0,g.__assign)({},t.line.active),{lineCap:null,lineDash:[5.5,1]})},inactive:{style:(0,g.__assign)((0,g.__assign)({},t.line.inactive),{lineCap:null,lineDash:[5.5,1]})},selected:{style:(0,g.__assign)((0,g.__assign)({},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:i,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,h.deepMix)({},i.grid,{line:{type:"line"}})},radius:{title:null,grid:(0,h.deepMix)({},i.grid,{line:{type:"circle"}})}},legend:{common:n,right:{layout:"vertical",padding:e.legendVerticalPadding},left:{layout:"vertical",padding:e.legendVerticalPadding},top:{layout:"horizontal",padding:e.legendHorizontalPadding},bottom:{layout:"horizontal",padding:e.legendHorizontalPadding},continuous:{title:null,background:null,track:{},rail:{type:"color",size:e.sliderRailHeight,defaultLength:e.sliderRailWidth,style:{fill:e.sliderRailFillColor,stroke:e.sliderRailBorderColor,lineWidth:e.sliderRailBorder}},label:{align:"rail",spacing:4,formatter:null,style:{fill:e.sliderLabelTextFillColor,fontSize:e.sliderLabelTextFontSize,lineHeight:e.sliderLabelTextLineHeight,textBaseline:"middle",fontFamily:e.fontFamily}},handler:{size:e.sliderHandlerWidth,style:{fill:e.sliderHandlerFillColor,stroke:e.sliderHandlerBorderColor}},slidable:!0,padding:n.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:e.tooltipCrosshairsBorderColor,lineWidth:e.tooltipCrosshairsBorder}},text:null,textBackground:{padding:2,style:{fill:"rgba(0, 0, 0, 0.25)",lineWidth:0,stroke:null}},follow:!1},domStyles:(r={},r["".concat(sr)]={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:e.tooltipContainerFillColor,opacity:e.tooltipContainerFillOpacity,boxShadow:e.tooltipContainerShadow,borderRadius:"".concat(e.tooltipContainerBorderRadius,"px"),color:e.tooltipTextFillColor,fontSize:"".concat(e.tooltipTextFontSize,"px"),fontFamily:e.fontFamily,lineHeight:"".concat(e.tooltipTextLineHeight,"px"),padding:"0 12px 0 12px"},r["".concat(lr)]={marginBottom:"12px",marginTop:"12px"},r["".concat(Yi)]={margin:0,listStyleType:"none",padding:0},r["".concat(kn)]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},r["".concat(Dn)]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},r["".concat(Bn)]={display:"inline-block",float:"right",marginLeft:"30px"},r)},annotation:{arc:{style:{stroke:e.annotationArcBorderColor,lineWidth:e.annotationArcBorder},animate:!0},line:{style:{stroke:e.annotationLineBorderColor,lineDash:e.annotationLineDash,lineWidth:e.annotationLineBorder},text:{position:"start",autoRotate:!0,style:{fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,textAlign:"start",fontFamily:e.fontFamily,textBaseline:"bottom"}},animate:!0},text:{style:{fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,textBaseline:"middle",textAlign:"start",fontFamily:e.fontFamily},animate:!0},region:{top:!1,style:{lineWidth:e.annotationRegionBorder,stroke:e.annotationRegionBorderColor,fill:e.annotationRegionFillColor,fillOpacity:e.annotationRegionFillOpacity},animate:!0},image:{top:!1,animate:!0},dataMarker:{top:!0,point:{style:{r:3,stroke:e.brandColor,lineWidth:2}},line:{style:{stroke:e.annotationLineBorderColor,lineWidth:e.annotationLineBorder},length:e.annotationDataMarkerLineLength},text:{style:{textAlign:"start",fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,fontFamily:e.fontFamily}},direction:"upward",autoAdjust:!0,animate:!0},dataRegion:{style:{region:{fill:e.annotationRegionFillColor,fillOpacity:e.annotationRegionFillOpacity},text:{textAlign:"center",textBaseline:"bottom",fill:e.annotationTextFillColor,stroke:e.annotationTextBorderColor,lineWidth:e.annotationTextBorder,fontSize:e.annotationTextFontSize,fontFamily:e.fontFamily}},animate:!0}},slider:{common:{padding:[8,8,8,8],backgroundStyle:{fill:e.cSliderBackgroundFillColor,opacity:e.cSliderBackgroundFillOpacity},foregroundStyle:{fill:e.cSliderForegroundFillColor,opacity:e.cSliderForegroundFillOpacity},handlerStyle:{width:e.cSliderHandlerWidth,height:e.cSliderHandlerHeight,fill:e.cSliderHandlerFillColor,opacity:e.cSliderHandlerFillOpacity,stroke:e.cSliderHandlerBorderColor,lineWidth:e.cSliderHandlerBorder,radius:e.cSliderHandlerBorderRadius,highLightFill:e.cSliderHandlerHighlightFillColor},textStyle:{fill:e.cSliderTextFillColor,opacity:e.cSliderTextFillOpacity,fontSize:e.cSliderTextFontSize,lineHeight:e.cSliderTextLineHeight,fontWeight:e.cSliderTextFontWeight,stroke:e.cSliderTextBorderColor,lineWidth:e.cSliderTextBorder}}},scrollbar:{common:{padding:[8,8,8,8]},default:{style:{trackColor:e.scrollbarTrackFillColor,thumbColor:e.scrollbarThumbFillColor}},hover:{style:{thumbColor:e.scrollbarThumbHighlightFillColor}}}},labels:{offset:12,style:{fill:e.labelFillColor,fontSize:e.labelFontSize,fontFamily:e.fontFamily,stroke:e.labelBorderColor,lineWidth:e.labelBorder},fillColorDark:e.labelFillColorDark,fillColorLight:e.labelFillColorLight,autoRotate:!0},innerLabels:{style:{fill:e.innerLabelFillColor,fontSize:e.innerLabelFontSize,fontFamily:e.fontFamily,stroke:e.innerLabelBorderColor,lineWidth:e.innerLabelBorder},autoRotate:!0},overflowLabels:{style:{fill:e.overflowLabelFillColor,fontSize:e.overflowLabelFontSize,fontFamily:e.fontFamily,stroke:e.overflowLabelBorderColor,lineWidth:e.overflowLabelBorder}},pieLabels:{labelHeight:14,offset:10,labelLine:{style:{lineWidth:e.labelLineBorder}},autoRotate:!0}}}var Kt={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},vi={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},Ry=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],Ny=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],zy=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],_u=function(e){e===void 0&&(e={});var r=e.paletteQualitative10,t=r===void 0?Ry:r,i=e.paletteQualitative20,n=i===void 0?Ny:i,a=e.brandColor,o=a===void 0?t[0]:a,s={backgroundColor:"transparent",brandColor:o,subColor:"rgba(0,0,0,0.05)",paletteQualitative10:t,paletteQualitative20:n,paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",paletteSequence:zy,fontFamily:`"Segoe UI", Roboto, "Helvetica Neue", Arial,
  20. "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
  21. "Noto Color Emoji"`,axisLineBorderColor:Kt[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:Kt[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:vi[85],axisTickLineBorderColor:Kt[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:Kt[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:Kt[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:Kt[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:Kt[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:o,legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:Kt[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:Kt[100],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:Kt[100],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:Kt[45],legendPageNavigatorTextFontSize:12,sliderRailFillColor:Kt[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:Kt[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:Kt[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:Kt[25],annotationArcBorderColor:Kt[15],annotationArcBorder:1,annotationLineBorderColor:Kt[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:Kt[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:Kt[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:Kt[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:Kt[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:Kt[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:vi[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:Kt[65],overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:vi[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:Kt[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:vi[100],pointBorderOpacity:1,pointActiveBorderColor:Kt[100],pointSelectedBorder:2,pointSelectedBorderColor:Kt[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:o,hollowPointBorderOpacity:.95,hollowPointFillColor:vi[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:Kt[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:Kt[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:Kt[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:Kt[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:o,intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:Kt[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:Kt[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:o,hollowIntervalBorderOpacity:1,hollowIntervalFillColor:vi[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:Kt[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:Kt[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3};return(0,g.__assign)((0,g.__assign)({},s),e)},RL=_u();function Zn(e){var r=e.styleSheet,t=r===void 0?{}:r,i=(0,g.__rest)(e,["styleSheet"]),n=_u(t);return(0,h.deepMix)({},xu(n),i)}var Vy=Zn({}),bo={default:Vy};function $i(e){return(0,h.get)(bo,(0,h.lowerCase)(e),bo.default)}function Gy(e,r){bo[(0,h.lowerCase)(e)]=Zn(r)}function wu(e,r,t){var i=t.translate(e),n=t.translate(r);return(0,h.isNumberEqual)(i,n)}function Wy(e,r){var t=r.coordinate,i=r.getXScale(),n=i.range,a=n[n.length-1],o=n[0],s=t.invert(e),l=s.x;return t.isPolar&&l>(1+a)/2&&(l=o),i.translate(i.invert(l))}function bu(e,r,t){var i=t.coordinate,n=t.getYScale(),a=n.field,o=i.invert(r),s=n.invert(o.y),l=(0,h.find)(e,function(u){var c=u[rt];return c[a][0]<=s&&c[a][1]>=s});return l||e[e.length-1]}var Hy=(0,h.memoize)(function(e){if(e.isCategory)return 1;for(var r=e.values,t=r.length,i=e.translate(r[0]),n=i,a=0;a<t;a++){var o=r[a],s=e.translate(o);s<i&&(i=s),s>n&&(n=s)}return(n-i)/(t-1)});function Yy(e,r,t){var i=r.getAttribute("position"),n=i.getFields(),a=r.scales,o=(0,h.isFunction)(t)||!t?n[0]:t,s=a[o],l=s?s.getText(e[o]):e[o]||o;return(0,h.isFunction)(t)?t(l,e):l}function Xy(e){var r=(0,h.values)(e.attributes);return(0,h.filter)(r,function(t){return(0,h.contains)(bt,t.type)})}function Su(e){var r,t,i=Xy(e),n;try{for(var a=(0,g.__values)(i),o=a.next();!o.done;o=a.next()){var s=o.value,l=s.getScale(s.type);if(l&&l.isLinear){var u=(0,h.get)(e.scaleDefs,l.field),c=Xl(l,u,s.type,e.type);if(c!=="cat"){n=l;break}}}}catch(d){r={error:d}}finally{try{o&&!o.done&&(t=a.return)&&t.call(a)}finally{if(r)throw r.error}}var f=e.getXScale(),v=e.getYScale();return n||v||f}function Uy(e,r){var t=r.field,i=e[t];if((0,h.isArray)(i)){var n=i.map(function(a){return r.getText(a)});return n.join("-")}return r.getText(i)}function jy(e,r){var t,i=r.getGroupScales();if(i.length&&(t=i[0]),t){var n=t.field;return t.getText(e[n])}var a=Su(r);return ji(a)}function Cu(e,r,t){if(r.length===0)return null;var i=t.type,n=t.getXScale(),a=t.getYScale(),o=n.field,s=a.field,l=null;if(i==="heatmap"||i==="point"){for(var u=t.coordinate,c=u.invert(e),f=n.invert(c.x),v=a.invert(c.y),d=Infinity,p=0;p<r.length;p++){var y=r[p],m=y[rt],x=Math.pow(m[o]-f,2)+Math.pow(m[s]-v,2);x<d&&(d=x,l=y)}return l}var _=r[0],w=r[r.length-1],b=Wy(e,t),S=_[rt][o],C=_[rt][s],A=w[rt][o],F=a.isLinear&&(0,h.isArray)(C);if((0,h.isArray)(S)){for(var p=0;p<r.length;p++){var P=r[p],m=P[rt];if(n.translate(m[o][0])<=b&&n.translate(m[o][1])>=b)if(F)(0,h.isArray)(l)||(l=[]),l.push(P);else{l=P;break}}(0,h.isArray)(l)&&(l=bu(l,e,t))}else{var I=void 0;if(!n.isLinear&&n.type!=="timeCat"){for(var p=0;p<r.length;p++){var P=r[p],m=P[rt];if(wu(m[o],b,n))if(F)(0,h.isArray)(l)||(l=[]),l.push(P);else{l=P;break}else n.translate(m[o])<=b&&(w=P,I=r[p+1])}(0,h.isArray)(l)&&(l=bu(l,e,t))}else{if((b>n.translate(A)||b<n.translate(S))&&(b>n.max||b<n.min))return null;for(var V=0,Z=r.length-1,vt=void 0;V<=Z;){vt=Math.floor((V+Z)/2);var yt=r[vt][rt][o];if(wu(yt,b,n))return r[vt];n.translate(yt)<=n.translate(b)?(V=vt+1,w=r[vt],I=r[vt+1]):(Z===0&&(w=r[0]),Z=vt-1)}}w&&I&&Math.abs(n.translate(w[rt][o])-b)>Math.abs(n.translate(I[rt][o])-b)&&(w=I)}var Bt=Hy(t.getXScale());return!l&&Math.abs(n.translate(w[rt][o])-b)<=Bt/2&&(l=w),l}function So(e,r,t,i){var n,a;t===void 0&&(t=""),i===void 0&&(i=!1);var o=e[rt],s=Yy(o,r,t),l=r.tooltipOption,u=r.theme.defaultColor,c=[],f,v;function d(P,I){if(i||!(0,h.isNil)(I)&&I!==""){var V={title:s,data:o,mappingData:e,name:P,value:I,color:e.color||u,marker:!0};c.push(V)}}if((0,h.isObject)(l)){var p=l.fields,y=l.callback;if(y){var m=p.map(function(P){return e[rt][P]}),x=y.apply(void 0,(0,g.__spreadArray)([],(0,g.__read)(m),!1)),_=(0,g.__assign)({data:e[rt],mappingData:e,title:s,color:e.color||u,marker:!0},x);c.push(_)}else{var w=r.scales;try{for(var b=(0,g.__values)(p),S=b.next();!S.done;S=b.next()){var C=S.value;if(!(0,h.isNil)(o[C])){var A=w[C];f=ji(A),v=A.getText(o[C]),d(f,v)}}}catch(P){n={error:P}}finally{try{S&&!S.done&&(a=b.return)&&a.call(b)}finally{if(n)throw n.error}}}}else{var F=Su(r);v=Uy(o,F),f=jy(o,r),d(f,v)}return c}function Au(e,r,t,i){var n,a,o=i.showNil,s=[],l=e.dataArray;if(!(0,h.isEmpty)(l)){e.sort(l);try{for(var u=(0,g.__values)(l),c=u.next();!c.done;c=u.next()){var f=c.value,v=Cu(r,f,e);if(v){var d=e.getElementId(v),p=e.elementsMap[d];if(e.type==="heatmap"||p.visible){var y=So(v,e,t,o);y.length&&s.push(y)}}}}catch(m){n={error:m}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}}return s}function Mu(e,r,t,i){var n=i.showNil,a=[],o=e.container,s=o.getShape(r.x,r.y);if(s&&s.get("visible")&&s.get("origin")){var l=s.get("origin").mappingData,u=So(l,e,t,n);u.length&&a.push(u)}return a}function Co(e,r,t){var i,n,a=[],o=e.geometries,s=t.shared,l=t.title,u=t.reversed;try{for(var c=(0,g.__values)(o),f=c.next();!f.done;f=c.next()){var v=f.value;if(v.visible&&v.tooltipOption!==!1){var d=v.type,p=void 0;["point","edge","polygon"].includes(d)?p=Mu(v,r,l,t):["area","line","path","heatmap"].includes(d)||s!==!1?p=Au(v,r,l,t):p=Mu(v,r,l,t),p.length&&(u&&p.reverse(),a.push(p))}}}catch(y){i={error:y}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}return a}function Zy(e,r,t){var i,n,a=Co(e,r,t);try{for(var o=(0,g.__values)(e.views),s=o.next();!s.done;s=o.next()){var l=s.value;a=a.concat(Co(l,r,t))}}catch(u){i={error:u}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function qy(e){return!(0,h.isNumber)(e)&&!(0,h.isArray)(e)}function Ao(e){e===void 0&&(e=0);var r=(0,h.isArray)(e)?e:[e];switch(r.length){case 0:r=[0,0,0,0];break;case 1:r=new Array(4).fill(r[0]);break;case 2:r=(0,g.__spreadArray)((0,g.__spreadArray)([],(0,g.__read)(r),!1),(0,g.__read)(r),!1);break;case 3:r=(0,g.__spreadArray)((0,g.__spreadArray)([],(0,g.__read)(r),!1),[r[1]],!1);break;default:r=r.slice(0,4);break}return r}var qn={};function Vr(e,r){qn[e]=r}function NL(e){delete qn[e]}function Ky(){return Object.keys(qn)}function $y(e){return qn[e]}var Qy=function(){function e(r){this.option=this.wrapperOption(r)}return e.prototype.update=function(r){return this.option=this.wrapperOption(r),this},e.prototype.hasAction=function(r){var t=this.option.actions;return(0,h.some)(t,function(i){return i[0]===r})},e.prototype.create=function(r,t){var i=this.option,n=i.type,a=i.cfg,o=n==="theta",s=(0,g.__assign)({start:r,end:t},a),l=Xd(o?"polar":n);return this.coordinate=new l(s),this.coordinate.type=n,o&&(this.hasAction("transpose")||this.transpose()),this.execActions(),this.coordinate},e.prototype.adjust=function(r,t){return this.coordinate.update({start:r,end:t}),this.coordinate.resetMatrix(),this.execActions(["scale","rotate","translate"]),this.coordinate},e.prototype.rotate=function(r){return this.option.actions.push(["rotate",r]),this},e.prototype.reflect=function(r){return this.option.actions.push(["reflect",r]),this},e.prototype.scale=function(r,t){return this.option.actions.push(["scale",r,t]),this},e.prototype.transpose=function(){return this.option.actions.push(["transpose"]),this},e.prototype.getOption=function(){return this.option},e.prototype.getCoordinate=function(){return this.coordinate},e.prototype.wrapperOption=function(r){return(0,g.__assign)({type:"rect",actions:[],cfg:{}},r)},e.prototype.execActions=function(r){var t=this,i=this.option.actions;(0,h.each)(i,function(n){var a,o=(0,g.__read)(n),s=o[0],l=o.slice(1),u=(0,h.isNil)(r)?!0:r.includes(s);u&&(a=t.coordinate)[s].apply(a,(0,g.__spreadArray)([],(0,g.__read)(l),!1))})},e}(),Jy=Qy,t0=function(){function e(r,t,i){this.view=r,this.gEvent=t,this.data=i,this.type=t.type}return e.fromData=function(r,t,i){return new e(r,new St.Event(t,{}),i)},Object.defineProperty(e.prototype,"target",{get:function(){return this.gEvent.target},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"event",{get:function(){return this.gEvent.originalEvent},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return this.gEvent.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.gEvent.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientX",{get:function(){return this.gEvent.clientX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.gEvent.clientY},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"[Event (type=".concat(this.type,")]")},e.prototype.clone=function(){return new e(this.view,this.gEvent,this.data)},e}(),ue=t0;function e0(e){var r=e.getController("axis"),t=e.getController("legend"),i=e.getController("annotation"),n=e.getController("slider"),a=e.getController("scrollbar");[r,n,a,t,i].forEach(function(o){o&&o.layout()})}var r0=function(){function e(){this.scales=new Map,this.syncScales=new Map}return e.prototype.createScale=function(r,t,i,n){var a=i,o=this.getScaleMeta(n);if(t.length===0&&o){var s=o.scale,l={type:s.type};s.isCategory&&(l.values=s.values),a=(0,h.deepMix)(l,o.scaleDef,i)}var u=ry(r,t,a);return this.cacheScale(u,i,n),u},e.prototype.sync=function(r,t){var i=this;this.syncScales.forEach(function(n,a){var o=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER,l=[];(0,h.each)(n,function(u){var c=i.getScale(u);s=(0,h.isNumber)(c.max)?Math.max(s,c.max):s,o=(0,h.isNumber)(c.min)?Math.min(o,c.min):o,(0,h.each)(c.values,function(f){l.includes(f)||l.push(f)})}),(0,h.each)(n,function(u){var c=i.getScale(u);if(c.isContinuous)c.change({min:o,max:s,values:l});else if(c.isCategory){var f=c.range,v=i.getScaleMeta(u);l&&!(0,h.get)(v,["scaleDef","range"])&&(f=Ul((0,h.deepMix)({},c,{values:l}),r,t)),c.change({values:l,range:f})}})})},e.prototype.cacheScale=function(r,t,i){var n=this.getScaleMeta(i);n&&n.scale.type===r.type?(iy(n.scale,r),n.scaleDef=t):(n={key:i,scale:r,scaleDef:t},this.scales.set(i,n));var a=this.getSyncKey(n);if(n.syncKey=a,this.removeFromSyncScales(i),a){var o=this.syncScales.get(a);o||(o=[],this.syncScales.set(a,o)),o.push(i)}},e.prototype.getScale=function(r){var t=this.getScaleMeta(r);if(!t){var i=(0,h.last)(r.split("-")),n=this.syncScales.get(i);n&&n.length&&(t=this.getScaleMeta(n[0]))}return t&&t.scale},e.prototype.deleteScale=function(r){var t=this.getScaleMeta(r);if(t){var i=t.syncKey,n=this.syncScales.get(i);if(n&&n.length){var a=n.indexOf(r);a!==-1&&n.splice(a,1)}}this.scales.delete(r)},e.prototype.clear=function(){this.scales.clear(),this.syncScales.clear()},e.prototype.removeFromSyncScales=function(r){var t=this;this.syncScales.forEach(function(i,n){var a=i.indexOf(r);if(a!==-1)return i.splice(a,1),i.length===0&&t.syncScales.delete(n),!1})},e.prototype.getSyncKey=function(r){var t=r.scale,i=r.scaleDef,n=t.field,a=(0,h.get)(i,["sync"]);return a===!0?n:a===!1?void 0:a},e.prototype.getScaleMeta=function(r){return this.scales.get(r)},e}(),Kn=function(){function e(r,t,i,n){r===void 0&&(r=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),this.top=r,this.right=t,this.bottom=i,this.left=n}return e.instance=function(r,t,i,n){return r===void 0&&(r=0),t===void 0&&(t=0),i===void 0&&(i=0),n===void 0&&(n=0),new e(r,t,i,n)},e.prototype.max=function(r){var t=(0,g.__read)(r,4),i=t[0],n=t[1],a=t[2],o=t[3];return this.top=Math.max(this.top,i),this.right=Math.max(this.right,n),this.bottom=Math.max(this.bottom,a),this.left=Math.max(this.left,o),this},e.prototype.shrink=function(r){var t=(0,g.__read)(r,4),i=t[0],n=t[1],a=t[2],o=t[3];return this.top+=i,this.right+=n,this.bottom+=a,this.left+=o,this},e.prototype.inc=function(r,t){var i=r.width,n=r.height;switch(t){case E.TOP:case E.TOP_LEFT:case E.TOP_RIGHT:this.top+=n;break;case E.RIGHT:case E.RIGHT_TOP:case E.RIGHT_BOTTOM:this.right+=i;break;case E.BOTTOM:case E.BOTTOM_LEFT:case E.BOTTOM_RIGHT:this.bottom+=n;break;case E.LEFT:case E.LEFT_TOP:case E.LEFT_BOTTOM:this.left+=i;break;default:break}return this},e.prototype.getPadding=function(){return[this.top,this.right,this.bottom,this.left]},e.prototype.clone=function(){return new(e.bind.apply(e,(0,g.__spreadArray)([void 0],(0,g.__read)(this.getPadding()),!1)))},e}();function i0(e){var r=e.padding;if(!qy(r))return new(Kn.bind.apply(Kn,(0,g.__spreadArray)([void 0],(0,g.__read)(Ao(r)),!1)));var t=e.viewBBox,i=new Kn,n=[],a=[],o=[];return(0,h.each)(e.getComponents(),function(s){var l=s.type;l===N.AXIS?n.push(s):[N.LEGEND,N.SLIDER,N.SCROLLBAR].includes(l)?a.push(s):l!==N.GRID&&l!==N.TOOLTIP&&o.push(s)}),(0,h.each)(n,function(s){var l=s.component,u=l.getLayoutBBox(),c=new Ee(u.x,u.y,u.width,u.height),f=c.exceed(t);i.max(f)}),(0,h.each)(a,function(s){var l=s.component,u=s.direction,c=l.getLayoutBBox(),f=l.get("padding"),v=new Ee(c.x,c.y,c.width,c.height).expand(f);i.inc(v,u)}),(0,h.each)(o,function(s){var l=s.component,u=s.direction,c=l.getLayoutBBox(),f=new Ee(c.x,c.y,c.width,c.height);i.inc(f,u)}),i}function n0(e,r,t){var i=t.instance();r.forEach(function(n){n.autoPadding=i.max(n.autoPadding.getPadding())})}var Fu=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,{visible:t.visible})||this;i.views=[],i.geometries=[],i.controllers=[],i.interactions={},i.limitInPlot=!1,i.options={data:[],animate:!0},i.usedControllers=Ky(),i.scalePool=new r0,i.layoutFunc=e0,i.isPreMouseInPlot=!1,i.isDataChanged=!1,i.isCoordinateChanged=!1,i.createdScaleKeys=new Map,i.onCanvasEvent=function(w){var b=w.name;if(!b.includes(":")){var S=i.createViewEvent(w);i.doPlotEvent(S),i.emit(b,S)}},i.onDelegateEvents=function(w){var b=w.name;if(!!b.includes(":")){var S=i.createViewEvent(w);i.emit(b,S)}};var n=t.id,a=n===void 0?(0,h.uniqueId)("view"):n,o=t.parent,s=t.canvas,l=t.backgroundGroup,u=t.middleGroup,c=t.foregroundGroup,f=t.region,v=f===void 0?{start:{x:0,y:0},end:{x:1,y:1}}:f,d=t.padding,p=t.appendPadding,y=t.theme,m=t.options,x=t.limitInPlot,_=t.syncViewPadding;return i.parent=o,i.canvas=s,i.backgroundGroup=l,i.middleGroup=u,i.foregroundGroup=c,i.region=v,i.padding=d,i.appendPadding=p,i.options=(0,g.__assign)((0,g.__assign)({},i.options),m),i.limitInPlot=x,i.id=a,i.syncViewPadding=_,i.themeObject=(0,h.isObject)(y)?(0,h.deepMix)({},$i("default"),Zn(y)):$i(y),i.init(),i}return r.prototype.setLayout=function(t){this.layoutFunc=t},r.prototype.init=function(){this.calculateViewBBox(),this.initEvents(),this.initComponentController(),this.initOptions()},r.prototype.render=function(t,i){t===void 0&&(t=!1),this.emit(L.BEFORE_RENDER,ue.fromData(this,L.BEFORE_RENDER,i)),this.paint(t),this.emit(L.AFTER_RENDER,ue.fromData(this,L.AFTER_RENDER,i)),this.visible===!1&&this.changeVisible(!1)},r.prototype.clear=function(){var t=this;this.emit(L.BEFORE_CLEAR),this.filteredData=[],this.coordinateInstance=void 0,this.isDataChanged=!1,this.isCoordinateChanged=!1;for(var i=this.geometries,n=0;n<i.length;n++)i[n].clear(),i[n].container.remove(!0),i[n].labelsContainer.remove(!0);this.geometries=[];for(var a=this.controllers,n=0;n<a.length;n++)a[n].name==="annotation"?a[n].clear(!0):a[n].clear();this.createdScaleKeys.forEach(function(s,l){t.getRootView().scalePool.deleteScale(l)}),this.createdScaleKeys.clear();for(var o=this.views,n=0;n<o.length;n++)o[n].clear();this.emit(L.AFTER_CLEAR)},r.prototype.destroy=function(){this.emit(L.BEFORE_DESTROY);var t=this.interactions;(0,h.each)(t,function(s){s&&s.destroy()}),this.clear();for(var i=this.controllers,n=0,a=i.length;n<a;n++){var o=i[n];o.destroy()}this.backgroundGroup.remove(!0),this.middleGroup.remove(!0),this.foregroundGroup.remove(!0),e.prototype.destroy.call(this)},r.prototype.changeVisible=function(t){e.prototype.changeVisible.call(this,t);for(var i=this.geometries,n=0,a=i.length;n<a;n++){var o=i[n];o.changeVisible(t)}for(var s=this.controllers,n=0,a=s.length;n<a;n++){var l=s[n];l.changeVisible(t)}return this.foregroundGroup.set("visible",t),this.middleGroup.set("visible",t),this.backgroundGroup.set("visible",t),this.getCanvas().draw(),this},r.prototype.data=function(t){return(0,h.set)(this.options,"data",t),this.isDataChanged=!0,this},r.prototype.source=function(t){return console.warn("This method will be removed at G2 V4.1. Please use chart.data() instead."),this.data(t)},r.prototype.filter=function(t,i){return(0,h.isFunction)(i)?((0,h.set)(this.options,["filters",t],i),this):(!i&&(0,h.get)(this.options,["filters",t])&&delete this.options.filters[t],this)},r.prototype.axis=function(t,i){return(0,h.isBoolean)(t)?(0,h.set)(this.options,["axes"],t):(0,h.set)(this.options,["axes",t],i),this},r.prototype.legend=function(t,i){return(0,h.isBoolean)(t)?(0,h.set)(this.options,["legends"],t):(0,h.isString)(t)?((0,h.set)(this.options,["legends",t],i),(0,h.isPlainObject)(i)&&(i==null?void 0:i.selected)&&(0,h.set)(this.options,["filters",t],function(n){var a;return(a=i==null?void 0:i.selected[n])!==null&&a!==void 0?a:!0})):(0,h.set)(this.options,["legends"],t),this},r.prototype.scale=function(t,i){var n=this;return(0,h.isString)(t)?(0,h.set)(this.options,["scales",t],i):(0,h.isObject)(t)&&(0,h.each)(t,function(a,o){(0,h.set)(n.options,["scales",o],a)}),this},r.prototype.tooltip=function(t){return(0,h.set)(this.options,"tooltip",t),this},r.prototype.annotation=function(){return this.getController("annotation")},r.prototype.guide=function(){return console.warn("This method will be removed at G2 V4.1. Please use chart.annotation() instead."),this.annotation()},r.prototype.coordinate=function(t,i){return(0,h.isString)(t)?(0,h.set)(this.options,"coordinate",{type:t,cfg:i}):(0,h.set)(this.options,"coordinate",t),this.coordinateController.update(this.options.coordinate),this.coordinateController},r.prototype.coord=function(t,i){return console.warn("This method will be removed at G2 V4.1. Please use chart.coordinate() instead."),this.coordinate(t,i)},r.prototype.facet=function(t,i){this.facetInstance&&this.facetInstance.destroy();var n=sy(t);if(!n)throw new Error("facet '".concat(t,"' is not exist!"));return this.facetInstance=new n(this,(0,g.__assign)((0,g.__assign)({},i),{type:t})),this},r.prototype.animate=function(t){return(0,h.set)(this.options,"animate",t),this},r.prototype.updateOptions=function(t){return this.clear(),(0,h.mix)(this.options,t),this.views.forEach(function(i){return i.destroy()}),this.views=[],this.initOptions(),this.coordinateBBox=this.viewBBox,this},r.prototype.option=function(t,i){if(r.prototype[t])throw new Error(`Can't use built in variable name "`.concat(t,'", please change another one.'));return(0,h.set)(this.options,t,i),this},r.prototype.theme=function(t){return this.themeObject=(0,h.isObject)(t)?(0,h.deepMix)({},this.themeObject,Zn(t)):$i(t),this},r.prototype.interaction=function(t,i){var n=this.interactions[t];n&&n.destroy();var a=ky(t,this,i);return a&&(a.init(),this.interactions[t]=a),this},r.prototype.removeInteraction=function(t){var i=this.interactions[t];i&&(i.destroy(),this.interactions[t]=void 0)},r.prototype.changeData=function(t){this.isDataChanged=!0,this.emit(L.BEFORE_CHANGE_DATA,ue.fromData(this,L.BEFORE_CHANGE_DATA,null)),this.data(t),this.paint(!0);for(var i=this.views,n=0,a=i.length;n<a;n++){var o=i[n];o.changeData(t)}this.emit(L.AFTER_CHANGE_DATA,ue.fromData(this,L.AFTER_CHANGE_DATA,null))},r.prototype.createView=function(t){this.parent&&this.parent.parent&&console.warn("The view nesting recursive feature will be removed at G2 V4.1. Please avoid to use it.");var i={data:this.options.data,scales:(0,h.clone)(this.options.scales),axes:(0,h.clone)(this.options.axes),coordinate:(0,h.clone)(this.coordinateController.getOption()),tooltip:(0,h.clone)(this.options.tooltip),legends:(0,h.clone)(this.options.legends),animate:this.options.animate,visible:this.visible},n=new r((0,g.__assign)((0,g.__assign)({parent:this,canvas:this.canvas,backgroundGroup:this.backgroundGroup.addGroup({zIndex:$.BG}),middleGroup:this.middleGroup.addGroup({zIndex:$.MID}),foregroundGroup:this.foregroundGroup.addGroup({zIndex:$.FORE}),theme:this.themeObject,padding:this.padding},t),{options:(0,g.__assign)((0,g.__assign)({},i),(0,h.get)(t,"options",{}))}));return this.views.push(n),n},r.prototype.view=function(t){return console.warn("This method will be removed at G2 V4.1. Please use chart.createView() instead."),this.createView(t)},r.prototype.removeView=function(t){var i=(0,h.remove)(this.views,function(n){return n===t})[0];return i&&i.destroy(),i},r.prototype.getCoordinate=function(){return this.coordinateInstance},r.prototype.getTheme=function(){return this.themeObject},r.prototype.getXScale=function(){var t=this.geometries[0];return t?t.getXScale():null},r.prototype.getYScales=function(){var t={},i=[];return this.geometries.forEach(function(n){var a=n.getYScale(),o=a.field;t[o]||(t[o]=!0,i.push(a))}),i},r.prototype.getScalesByDim=function(t){for(var i=this.geometries,n={},a=0,o=i.length;a<o;a++){var s=i[a],l=t==="x"?s.getXScale():s.getYScale();l&&!n[l.field]&&(n[l.field]=l)}return n},r.prototype.getScale=function(t,i){var n=i||this.getScaleKey(t);return this.getRootView().scalePool.getScale(n)},r.prototype.getScaleByField=function(t,i){return this.getScale(t,i)},r.prototype.getOptions=function(){return this.options},r.prototype.getData=function(){return this.filteredData},r.prototype.getOriginalData=function(){return this.options.data},r.prototype.getPadding=function(){return this.autoPadding.getPadding()},r.prototype.getGeometries=function(){return this.geometries},r.prototype.getElements=function(){return(0,h.reduce)(this.geometries,function(t,i){return t.concat(i.getElements())},[])},r.prototype.getElementsBy=function(t){return this.getElements().filter(function(i){return t(i)})},r.prototype.getLayer=function(t){return t===J.BG?this.backgroundGroup:t===J.MID?this.middleGroup:t===J.FORE?this.foregroundGroup:this.foregroundGroup},r.prototype.isPointInPlot=function(t){return Qp(this.getCoordinate(),t)},r.prototype.getLegendAttributes=function(){return(0,h.flatten)(this.geometries.map(function(t){return t.getGroupAttributes()}))},r.prototype.getGroupScales=function(){var t=this.geometries.map(function(i){return i.getGroupScales()});return wr((0,h.flatten)(t))},r.prototype.getCanvas=function(){return this.getRootView().canvas},r.prototype.getRootView=function(){for(var t=this;;){if(t.parent){t=t.parent;continue}break}return t},r.prototype.getXY=function(t){var i=this.getCoordinate(),n=this.getScalesByDim("x"),a=this.getScalesByDim("y"),o,s;if((0,h.each)(t,function(l,u){n[u]&&(o=n[u].scale(l)),a[u]&&(s=a[u].scale(l))}),!(0,h.isNil)(o)&&!(0,h.isNil)(s))return i.convert({x:o,y:s})},r.prototype.getController=function(t){return(0,h.find)(this.controllers,function(i){return i.name===t})},r.prototype.showTooltip=function(t){var i=this.getController("tooltip");return i&&i.showTooltip(t),this},r.prototype.hideTooltip=function(){var t=this.getController("tooltip");return t&&t.hideTooltip(),this},r.prototype.lockTooltip=function(){var t=this.getController("tooltip");return t&&t.lockTooltip(),this},r.prototype.unlockTooltip=function(){var t=this.getController("tooltip");return t&&t.unlockTooltip(),this},r.prototype.isTooltipLocked=function(){var t=this.getController("tooltip");return t&&t.isTooltipLocked()},r.prototype.getTooltipItems=function(t){var i=this.getController("tooltip");return i?i.getTooltipItems(t):[]},r.prototype.getSnapRecords=function(t){for(var i=this.geometries,n=[],a=0,o=i.length;a<o;a++){var s=i[a],l=s.dataArray;s.sort(l);for(var u=void 0,c=0,f=l.length;c<f;c++){var v=l[c];u=Cu(t,v,s),u&&n.push(u)}}for(var d=this.views,a=0,o=d.length;a<o;a++){var p=d[a],y=p.getSnapRecords(t);n=n.concat(y)}return n},r.prototype.getComponents=function(){for(var t=[],i=this.controllers,n=0,a=i.length;n<a;n++){var o=i[n];t=t.concat(o.getComponents())}return t},r.prototype.filterData=function(t){var i=this.options.filters;return(0,h.size)(i)===0?t:(0,h.filter)(t,function(n,a){var o=Object.keys(i);return o.every(function(s){var l=i[s];return l(n[s],n,a)})})},r.prototype.filterFieldData=function(t,i){var n=this.options.filters,a=(0,h.get)(n,t);return(0,h.isUndefined)(a)?i:i.filter(function(o,s){return a(o[t],o,s)})},r.prototype.adjustCoordinate=function(){var t=this.getCoordinate(),i=t.start,n=t.end,a=this.coordinateBBox.bl,o=this.coordinateBBox.tr;if((0,h.isEqual)(i,a)&&(0,h.isEqual)(n,o)){this.isCoordinateChanged=!1;return}this.isCoordinateChanged=!0,this.coordinateInstance=this.coordinateController.adjust(a,o)},r.prototype.paint=function(t){this.renderDataRecursive(t),this.syncScale(),this.emit(L.BEFORE_PAINT),this.renderPaddingRecursive(t),this.renderLayoutRecursive(t),this.renderBackgroundStyleShape(),this.renderPaintRecursive(t),this.emit(L.AFTER_PAINT),this.isDataChanged=!1},r.prototype.renderBackgroundStyleShape=function(){if(!this.parent){var t=(0,h.get)(this.themeObject,"background");if(t){this.backgroundStyleRectShape||(this.backgroundStyleRectShape=this.backgroundGroup.addShape("rect",{attrs:{},zIndex:-1,capture:!1}),this.backgroundStyleRectShape.toBack());var i=this.viewBBox,n=i.x,a=i.y,o=i.width,s=i.height;this.backgroundStyleRectShape.attr({fill:t,x:n,y:a,width:o,height:s})}else this.backgroundStyleRectShape&&(this.backgroundStyleRectShape.remove(!0),this.backgroundStyleRectShape=void 0)}},r.prototype.renderPaddingRecursive=function(t){this.calculateViewBBox(),this.adjustCoordinate(),this.initComponents(t),this.autoPadding=i0(this).shrink(Ao(this.appendPadding)),this.coordinateBBox=this.viewBBox.shrink(this.autoPadding.getPadding()),this.adjustCoordinate();var i=this.controllers.find(function(l){return l.name==="tooltip"});i.update();for(var n=this.views,a=0,o=n.length;a<o;a++){var s=n[a];s.renderPaddingRecursive(t)}},r.prototype.renderLayoutRecursive=function(t){var i=this.syncViewPadding===!0?n0:(0,h.isFunction)(this.syncViewPadding)?this.syncViewPadding:void 0;i&&(i(this,this.views,Kn),this.views.forEach(function(l){l.coordinateBBox=l.viewBBox.shrink(l.autoPadding.getPadding()),l.adjustCoordinate()})),this.doLayout();for(var n=this.views,a=0,o=n.length;a<o;a++){var s=n[a];s.renderLayoutRecursive(t)}},r.prototype.renderPaintRecursive=function(t){var i=this.middleGroup;if(this.limitInPlot){var n=po(this.coordinateInstance),a=n.type,o=n.attrs;i.setClip({type:a,attrs:o})}else i.setClip(void 0);this.paintGeometries(t),this.renderComponents(t);for(var s=this.views,l=0,u=s.length;l<u;l++){var c=s[l];c.renderPaintRecursive(t)}},r.prototype.createScale=function(t,i,n,a){var o=(0,h.get)(this.options.scales,[t]),s=(0,g.__assign)((0,g.__assign)({},o),n);return this.parent?this.parent.createScale(t,i,s,a):this.scalePool.createScale(t,i,s,a)},r.prototype.renderDataRecursive=function(t){this.doFilterData(),this.createCoordinate(),this.initGeometries(t),this.renderFacet(t);for(var i=this.views,n=0,a=i.length;n<a;n++){var o=i[n];o.renderDataRecursive(t)}},r.prototype.calculateViewBBox=function(){var t,i,n,a;if(this.parent){var o=this.parent.coordinateBBox;t=o.x,i=o.y,n=o.width,a=o.height}else t=0,i=0,n=this.canvas.get("width"),a=this.canvas.get("height");var s=this.region,l=s.start,u=s.end,c=new Ee(t+n*l.x,i+a*l.y,n*(u.x-l.x),a*(u.y-l.y));(!this.viewBBox||!this.viewBBox.isEqual(c))&&(this.viewBBox=new Ee(t+n*l.x,i+a*l.y,n*(u.x-l.x),a*(u.y-l.y))),this.coordinateBBox=this.viewBBox},r.prototype.initEvents=function(){this.foregroundGroup.on("*",this.onDelegateEvents),this.middleGroup.on("*",this.onDelegateEvents),this.backgroundGroup.on("*",this.onDelegateEvents),this.canvas.on("*",this.onCanvasEvent)},r.prototype.initComponentController=function(){for(var t=this.usedControllers,i=0,n=t.length;i<n;i++){var a=t[i],o=$y(a);o&&this.controllers.push(new o(this))}},r.prototype.createViewEvent=function(t){var i=t.shape,n=t.name,a=i?i.get("origin"):null,o=new ue(this,t,a);return o.type=n,o},r.prototype.doPlotEvent=function(t){var i=t.type,n=t.x,a=t.y,o={x:n,y:a},s=["mousedown","mouseup","mousemove","mouseleave","mousewheel","touchstart","touchmove","touchend","touchcancel","click","dblclick","contextmenu"];if(s.includes(i)){var l=this.isPointInPlot(o),u=t.clone();if(l){var c="plot:".concat(i);u.type=c,this.emit(c,u),(i==="mouseleave"||i==="touchend")&&(this.isPreMouseInPlot=!1)}i==="mousemove"||i==="touchmove"?(this.isPreMouseInPlot&&!l?(i==="mousemove"&&(u.type=ot.MOUSE_LEAVE,this.emit(ot.MOUSE_LEAVE,u)),u.type=ot.LEAVE,this.emit(ot.LEAVE,u)):!this.isPreMouseInPlot&&l&&(i==="mousemove"&&(u.type=ot.MOUSE_ENTER,this.emit(ot.MOUSE_ENTER,u)),u.type=ot.ENTER,this.emit(ot.ENTER,u)),this.isPreMouseInPlot=l):(i==="mouseleave"||i==="touchend")&&this.isPreMouseInPlot&&(i==="mouseleave"&&(u.type=ot.MOUSE_LEAVE,this.emit(ot.MOUSE_LEAVE,u)),u.type=ot.LEAVE,this.emit(ot.LEAVE,u),this.isPreMouseInPlot=!1)}},r.prototype.doFilterData=function(){var t=this.options.data;this.filteredData=this.filterData(t)},r.prototype.initGeometries=function(t){this.createOrUpdateScales();for(var i=this.getCoordinate(),n=(0,h.get)(this.options,"scales",{}),a=this.geometries,o=0,s=a.length;o<s;o++){var l=a[o];l.scales=this.getGeometryScales();var u={coordinate:i,scaleDefs:n,data:this.filteredData,theme:this.themeObject,isDataChanged:this.isDataChanged,isCoordinateChanged:this.isCoordinateChanged};t?l.update(u):l.init(u)}this.adjustScales()},r.prototype.createOrUpdateScales=function(){for(var t=this.getScaleFields(),i=this.getGroupedFields(),n=this.getOptions(),a=n.data,o=n.scales,s=o===void 0?{}:o,l=this.filteredData,u=0,c=t.length;u<c;u++){var f=t[u],v=s[f],d=this.getScaleKey(f);this.createScale(f,i.includes(f)?a:l,v,d),this.createdScaleKeys.set(d,!0)}},r.prototype.syncScale=function(){this.getRootView().scalePool.sync(this.getCoordinate(),this.theme)},r.prototype.getGeometryScales=function(){for(var t=this.getScaleFields(),i={},n=0;n<t.length;n++){var a=t[n];i[a]=this.getScaleByField(a)}return i},r.prototype.getScaleFields=function(){for(var t=[],i=new Map,n=this.geometries,a=0;a<n.length;a++){var o=n[a],s=o.getScaleFields();wr(s,t,i)}return t},r.prototype.getGroupedFields=function(){for(var t=[],i=new Map,n=this.geometries,a=0;a<n.length;a++){var o=n[a],s=o.getGroupFields();wr(s,t,i)}return t},r.prototype.adjustScales=function(){this.adjustCategoryScaleRange()},r.prototype.adjustCategoryScaleRange=function(){var t=this,i=(0,g.__spreadArray)([this.getXScale()],(0,g.__read)(this.getYScales()),!1).filter(function(o){return!!o}),n=this.getCoordinate(),a=this.options.scales;(0,h.each)(i,function(o){var s=o.field,l=o.values,u=o.isCategory,c=o.isIdentity;(u||c)&&l&&!(0,h.get)(a,[s,"range"])&&(o.range=Ul(o,n,t.theme))})},r.prototype.initComponents=function(t){for(var i=this.controllers,n=0;n<i.length;n++){var a=i[n];t?a.update():(a.clear(),a.render())}},r.prototype.doLayout=function(){this.layoutFunc(this)},r.prototype.createCoordinate=function(){var t=this.coordinateBBox.bl,i=this.coordinateBBox.tr;this.coordinateInstance=this.coordinateController.create(t,i)},r.prototype.paintGeometries=function(t){for(var i=this.options.animate,n=this.getCoordinate(),a={x:this.viewBBox.x,y:this.viewBBox.y,minX:this.viewBBox.minX,minY:this.viewBBox.minY,maxX:this.viewBBox.maxX,maxY:this.viewBBox.maxY,width:this.viewBBox.width,height:this.viewBBox.height},o=this.geometries,s=0;s<o.length;s++){var l=o[s];l.coordinate=n,l.canvasRegion=a,i||l.animate(!1),l.paint(t)}},r.prototype.renderComponents=function(t){for(var i=this.getComponents(),n=0;n<i.length;n++){var a=i[n];a.component.render()}},r.prototype.renderFacet=function(t){this.facetInstance&&(t?this.facetInstance.update():(this.facetInstance.clear(),this.facetInstance.init(),this.facetInstance.render()))},r.prototype.initOptions=function(){var t=this,i=this.options,n=i.geometries,a=n===void 0?[]:n,o=i.interactions,s=o===void 0?[]:o,l=i.views,u=l===void 0?[]:l,c=i.annotations,f=c===void 0?[]:c,v=i.coordinate,d=i.events,p=i.facets;this.coordinateController?v&&this.coordinateController.update(v):this.coordinateController=new Jy(v);for(var y=0;y<a.length;y++){var m=a[y];this.createGeometry(m)}for(var x=0;x<s.length;x++){var _=s[x],w=_.type,b=_.cfg;this.interaction(w,b)}for(var S=0;S<u.length;S++){var C=u[S];this.createView(C)}for(var A=this.getController("annotation"),F=0;F<f.length;F++){var P=f[F];A.annotation(P)}d&&(0,h.each)(d,function(I,V){t.on(V,I)}),p&&(0,h.each)(p,function(I){var V=I.type,Z=(0,g.__rest)(I,["type"]);t.facet(V,Z)})},r.prototype.createGeometry=function(t){var i=t.type,n=t.cfg,a=n===void 0?{}:n;if(this[i]){var o=this[i](a);(0,h.each)(t,function(s,l){(0,h.isFunction)(o[l])&&o[l](s)})}},r.prototype.getScaleKey=function(t){return"".concat(this.id,"-").concat(t)},r}(dt);function Je(e,r){Fu.prototype[e.toLowerCase()]=function(t){t===void 0&&(t={});var i=(0,g.__assign)({container:this.middleGroup.addGroup(),labelsContainer:this.foregroundGroup.addGroup()},t),n=new r(i);return this.geometries.push(n),n}}var a0=Fu,o0=function(e){(0,g.__extends)(r,e);function r(t){var i=this,n=t.container,a=t.width,o=t.height,s=t.autoFit,l=s===void 0?!1:s,u=t.padding,c=t.appendPadding,f=t.renderer,v=f===void 0?"canvas":f,d=t.pixelRatio,p=t.localRefresh,y=p===void 0?!0:p,m=t.visible,x=m===void 0?!0:m,_=t.supportCSSTransform,w=_===void 0?!1:_,b=t.defaultInteractions,S=b===void 0?["tooltip","legend-filter","legend-active","continuous-filter","ellipsis-text","axis-description"]:b,C=t.options,A=t.limitInPlot,F=t.theme,P=t.syncViewPadding,I=(0,h.isString)(n)?document.getElementById(n):n,V=(0,T.Z)('<div style="position:relative;"></div>');I.appendChild(V);var Z=R(I,l,a,o),vt=se(v),yt=new vt.Canvas((0,g.__assign)({container:V,pixelRatio:d,localRefresh:y,supportCSSTransform:w},Z));return i=e.call(this,{parent:null,canvas:yt,backgroundGroup:yt.addGroup({zIndex:$.BG}),middleGroup:yt.addGroup({zIndex:$.MID}),foregroundGroup:yt.addGroup({zIndex:$.FORE}),padding:u,appendPadding:c,visible:x,options:C,limitInPlot:A,theme:F,syncViewPadding:P})||this,i.onResize=(0,h.debounce)(function(){i.forceFit()},300),i.ele=I,i.canvas=yt,i.width=Z.width,i.height=Z.height,i.autoFit=l,i.localRefresh=y,i.renderer=v,i.wrapperElement=V,i.updateCanvasStyle(),i.bindAutoFit(),i.initDefaultInteractions(S),i}return r.prototype.initDefaultInteractions=function(t){var i=this;(0,h.each)(t,function(n){i.interaction(n)})},r.prototype.aria=function(t){var i="aria-label";t===!1?this.ele.removeAttribute(i):this.ele.setAttribute(i,t.label)},r.prototype.changeSize=function(t,i){return this.width===t&&this.height===i?this:(this.emit(L.BEFORE_CHANGE_SIZE),this.width=t,this.height=i,this.canvas.changeSize(t,i),this.render(!0),this.emit(L.AFTER_CHANGE_SIZE),this)},r.prototype.clear=function(){e.prototype.clear.call(this),this.aria(!1)},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.unbindAutoFit(),this.canvas.destroy(),D(this.wrapperElement),this.wrapperElement=null},r.prototype.changeVisible=function(t){return e.prototype.changeVisible.call(this,t),this.wrapperElement.style.display=t?"":"none",this},r.prototype.forceFit=function(){if(!this.destroyed){var t=R(this.ele,!0,this.width,this.height),i=t.width,n=t.height;this.changeSize(i,n)}},r.prototype.updateCanvasStyle=function(){(0,k.Z)(this.canvas.get("el"),{display:"inline-block",verticalAlign:"middle"})},r.prototype.bindAutoFit=function(){this.autoFit&&window.addEventListener("resize",this.onResize)},r.prototype.unbindAutoFit=function(){this.autoFit&&window.removeEventListener("resize",this.onResize)},r}(a0),s0=o0,di=function(){function e(r){this.visible=!0,this.components=[],this.view=r}return e.prototype.clear=function(r){(0,h.each)(this.components,function(t){t.component.destroy()}),this.components=[]},e.prototype.destroy=function(){this.clear()},e.prototype.getComponents=function(){return this.components},e.prototype.changeVisible=function(r){this.visible!==r&&(this.components.forEach(function(t){r?t.component.show():t.component.hide()}),this.visible=r)},e}();function l0(e){for(var r=[],t=function(n){var a=e[n],o=(0,h.find)(r,function(s){return s.color===a.color&&s.name===a.name&&s.value===a.value&&s.title===a.title});o||r.push(a)},i=0;i<e.length;i++)t(i);return r}var u0=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.isLocked=!1,t}return Object.defineProperty(r.prototype,"name",{get:function(){return"tooltip"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.isVisible=function(){var t=this.view.getOptions().tooltip;return t!==!1},r.prototype.render=function(){},r.prototype.showTooltip=function(t){if(this.point=t,!!this.isVisible()){var i=this.view,n=this.getTooltipItems(t);if(!n.length){this.hideTooltip();return}var a=this.getTitle(n),o={x:n[0].x,y:n[0].y};i.emit("tooltip:show",ue.fromData(i,"tooltip:show",(0,g.__assign)({items:n,title:a},t)));var s=this.getTooltipCfg(),l=s.follow,u=s.showMarkers,c=s.showCrosshairs,f=s.showContent,v=s.marker,d=this.items,p=this.title;if(!(0,h.isEqual)(p,a)||!(0,h.isEqual)(d,n)?(i.emit("tooltip:change",ue.fromData(i,"tooltip:change",(0,g.__assign)({items:n,title:a},t))),((0,h.isFunction)(f)?f(n):f)&&(this.tooltip||this.renderTooltip(),this.tooltip.update((0,h.mix)({},s,{items:this.getItemsAfterProcess(n),title:a},l?t:{})),this.tooltip.show()),u&&this.renderTooltipMarkers(n,v)):(this.tooltip&&l&&(this.tooltip.update(t),this.tooltip.show()),this.tooltipMarkersGroup&&this.tooltipMarkersGroup.show()),this.items=n,this.title=a,c){var y=(0,h.get)(s,["crosshairs","follow"],!1);this.renderCrosshairs(y?t:o,s)}}},r.prototype.hideTooltip=function(){var t=this.getTooltipCfg().follow;if(!t){this.point=null;return}var i=this.tooltipMarkersGroup;i&&i.hide();var n=this.xCrosshair,a=this.yCrosshair;n&&n.hide(),a&&a.hide();var o=this.tooltip;o&&o.hide(),this.view.emit("tooltip:hide",ue.fromData(this.view,"tooltip:hide",{})),this.point=null},r.prototype.lockTooltip=function(){this.isLocked=!0,this.tooltip&&this.tooltip.setCapture(!0)},r.prototype.unlockTooltip=function(){this.isLocked=!1;var t=this.getTooltipCfg();this.tooltip&&this.tooltip.setCapture(t.capture)},r.prototype.isTooltipLocked=function(){return this.isLocked},r.prototype.clear=function(){var t=this,i=t.tooltip,n=t.xCrosshair,a=t.yCrosshair,o=t.tooltipMarkersGroup;i&&(i.hide(),i.clear()),n&&n.clear(),a&&a.clear(),o&&o.clear(),(i==null?void 0:i.get("customContent"))&&(this.tooltip.destroy(),this.tooltip=null),this.title=null,this.items=null},r.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),this.xCrosshair&&this.xCrosshair.destroy(),this.yCrosshair&&this.yCrosshair.destroy(),this.guideGroup&&this.guideGroup.remove(!0),this.reset()},r.prototype.reset=function(){this.items=null,this.title=null,this.tooltipMarkersGroup=null,this.tooltipCrosshairsGroup=null,this.xCrosshair=null,this.yCrosshair=null,this.tooltip=null,this.guideGroup=null,this.isLocked=!1,this.point=null},r.prototype.changeVisible=function(t){if(this.visible!==t){var i=this,n=i.tooltip,a=i.tooltipMarkersGroup,o=i.xCrosshair,s=i.yCrosshair;t?(n&&n.show(),a&&a.show(),o&&o.show(),s&&s.show()):(n&&n.hide(),a&&a.hide(),o&&o.hide(),s&&s.hide()),this.visible=t}},r.prototype.getTooltipItems=function(t){var i,n,a,o,s,l,u=this.findItemsFromView(this.view,t);if(u.length){u=(0,h.flatten)(u);try{for(var c=(0,g.__values)(u),f=c.next();!f.done;f=c.next()){var v=f.value;try{for(var d=(a=void 0,(0,g.__values)(v)),p=d.next();!p.done;p=d.next()){var y=p.value,m=y.mappingData,x=m.x,_=m.y;y.x=(0,h.isArray)(x)?x[x.length-1]:x,y.y=(0,h.isArray)(_)?_[_.length-1]:_}}catch(I){a={error:I}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(a)throw a.error}}}}catch(I){i={error:I}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}var w=this.getTooltipCfg().shared;if(w===!1&&u.length>1){var b=u[0],S=Math.abs(t.y-b[0].y);try{for(var C=(0,g.__values)(u),A=C.next();!A.done;A=C.next()){var F=A.value,P=Math.abs(t.y-F[0].y);P<=S&&(b=F,S=P)}}catch(I){s={error:I}}finally{try{A&&!A.done&&(l=C.return)&&l.call(C)}finally{if(s)throw s.error}}u=[b]}return l0((0,h.flatten)(u))}return[]},r.prototype.layout=function(){},r.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")}})}},r.prototype.isCursorEntered=function(t){if(this.tooltip){var i=this.tooltip.getContainer(),n=this.tooltip.get("capture");if(i&&n){var a=i.getBoundingClientRect(),o=a.x,s=a.y,l=a.width,u=a.height;return new Ee(o,s,l,u).isPointIn(t)}}return!1},r.prototype.getTooltipCfg=function(){var t=this.view,i=t.getOptions().tooltip,n=this.processCustomContent(i),a=t.getTheme(),o=(0,h.get)(a,["components","tooltip"],{}),s=(0,h.get)(n,"enterable",o.enterable);return(0,h.deepMix)({},o,n,{capture:!!(s||this.isLocked)})},r.prototype.processCustomContent=function(t){if((0,h.isBoolean)(t)||!(0,h.get)(t,"customContent"))return t;var i=t.customContent,n=function(a,o){var s=i(a,o)||"";return(0,h.isString)(s)?'<div class="g2-tooltip">'+s+"</div>":s};return(0,g.__assign)((0,g.__assign)({},t),{customContent:n})},r.prototype.getTitle=function(t){var i=t[0].title||t[0].name;return this.title=i,i},r.prototype.renderTooltip=function(){var t=this.view.getCanvas(),i={start:{x:0,y:0},end:{x:t.get("width"),y:t.get("height")}},n=this.getTooltipCfg(),a=new Nn((0,g.__assign)((0,g.__assign)({parent:t.get("el").parentNode,region:i},n),{visible:!1,crosshairs:null}));a.init(),this.tooltip=a},r.prototype.renderTooltipMarkers=function(t,i){var n,a,o=this.getTooltipMarkersGroup(),s=this.view.getRootView(),l=s.limitInPlot;try{for(var u=(0,g.__values)(t),c=u.next();!c.done;c=u.next()){var f=c.value,v=f.x,d=f.y;if(l||(o==null?void 0:o.getClip())){var p=po(s.getCoordinate()),y=p.type,m=p.attrs;o==null||o.setClip({type:y,attrs:m})}else o==null||o.setClip(void 0);var x=this.view.getTheme(),_=(0,h.get)(x,["components","tooltip","marker"],{}),w=(0,g.__assign)((0,g.__assign)({fill:f.color,symbol:"circle",shadowColor:f.color},(0,h.isFunction)(i)?(0,g.__assign)((0,g.__assign)({},_),i(f)):i),{x:v,y:d});o.addShape("marker",{attrs:w})}}catch(b){n={error:b}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}},r.prototype.renderCrosshairs=function(t,i){var n=(0,h.get)(i,["crosshairs","type"],"x");n==="x"?(this.yCrosshair&&this.yCrosshair.hide(),this.renderXCrosshairs(t,i)):n==="y"?(this.xCrosshair&&this.xCrosshair.hide(),this.renderYCrosshairs(t,i)):n==="xy"&&(this.renderXCrosshairs(t,i),this.renderYCrosshairs(t,i))},r.prototype.renderXCrosshairs=function(t,i){var n=this.getViewWithGeometry(this.view).getCoordinate(),a,o;if(n.isRect)n.isTransposed?(a={x:n.start.x,y:t.y},o={x:n.end.x,y:t.y}):(a={x:t.x,y:n.end.y},o={x:t.x,y:n.start.y});else{var s=ui(n,t),l=n.getCenter(),u=n.getRadius();o=ge(l.x,l.y,u,s),a=l}var c=(0,h.deepMix)({start:a,end:o,container:this.getTooltipCrosshairsGroup()},(0,h.get)(i,"crosshairs",{}),this.getCrosshairsText("x",t,i));delete c.type;var f=this.xCrosshair;f?f.update(c):(f=new Il(c),f.init()),f.render(),f.show(),this.xCrosshair=f},r.prototype.renderYCrosshairs=function(t,i){var n=this.getViewWithGeometry(this.view).getCoordinate(),a,o;if(n.isRect){var s=void 0,l=void 0;n.isTransposed?(s={x:t.x,y:n.end.y},l={x:t.x,y:n.start.y}):(s={x:n.start.x,y:t.y},l={x:n.end.x,y:t.y}),a={start:s,end:l},o="Line"}else a={center:n.getCenter(),radius:zn(n,t),startAngle:n.startAngle,endAngle:n.endAngle},o="Circle";a=(0,h.deepMix)({container:this.getTooltipCrosshairsGroup()},a,(0,h.get)(i,"crosshairs",{}),this.getCrosshairsText("y",t,i)),delete a.type;var u=this.yCrosshair;u?n.isRect&&u.get("type")==="circle"||!n.isRect&&u.get("type")==="line"?(u=new ct[o](a),u.init()):u.update(a):(u=new ct[o](a),u.init()),u.render(),u.show(),this.yCrosshair=u},r.prototype.getCrosshairsText=function(t,i,n){var a=(0,h.get)(n,["crosshairs","text"]),o=(0,h.get)(n,["crosshairs","follow"]),s=this.items;if(a){var l=this.getViewWithGeometry(this.view),u=s[0],c=l.getXScale(),f=l.getYScales()[0],v=void 0,d=void 0;if(o){var p=this.view.getCoordinate().invert(i);v=c.invert(p.x),d=f.invert(p.y)}else v=u.data[c.field],d=u.data[f.field];var y=t==="x"?v:d;return(0,h.isFunction)(a)?a=a(t,y,s,i):a.content=y,{text:a}}},r.prototype.getGuideGroup=function(){if(!this.guideGroup){var t=this.view.foregroundGroup;this.guideGroup=t.addGroup({name:"tooltipGuide",capture:!1})}return this.guideGroup},r.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},r.prototype.getTooltipCrosshairsGroup=function(){var t=this.tooltipCrosshairsGroup;return t||(t=this.getGuideGroup().addGroup({name:"tooltipCrosshairsGroup",capture:!1}),t.toBack(),this.tooltipCrosshairsGroup=t),t},r.prototype.findItemsFromView=function(t,i){var n,a;if(t.getOptions().tooltip===!1)return[];var o=this.getTooltipCfg(),s=Co(t,i,o);try{for(var l=(0,g.__values)(t.views),u=l.next();!u.done;u=l.next()){var c=u.value;s=s.concat(this.findItemsFromView(c,i))}}catch(f){n={error:f}}finally{try{u&&!u.done&&(a=l.return)&&a.call(l)}finally{if(n)throw n.error}}return s},r.prototype.getViewWithGeometry=function(t){var i=this;return t.geometries.length?t:(0,h.find)(t.views,function(n){return i.getViewWithGeometry(n)})},r.prototype.getItemsAfterProcess=function(t){var i=this.getTooltipCfg().customItems,n=i||function(a){return a};return n(t)},r}(di),Eu=u0,Tu={};function Lu(e){return Tu[e.toLowerCase()]}function ze(e,r){Tu[e.toLowerCase()]=r}var gi={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},c0={interval:function(e){return{enter:{animation:e.isRect?e.isTransposed?"scale-in-x":"scale-in-y":"fade-in"},update:{animation:e.isPolar&&e.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"}}},Iu={line:function(){return{animation:"wave-in"}},area:function(){return{animation:"wave-in"}},path:function(){return{animation:"fade-in"}},interval:function(e){var r;return e.isRect?r=e.isTransposed?"grow-in-x":"grow-in-y":(r="grow-in-xy",e.isPolar&&e.isTransposed&&(r="wave-in")),{animation:r}},schema:function(e){var r;return e.isRect?r=e.isTransposed?"grow-in-x":"grow-in-y":r="grow-in-xy",{animation:r}},polygon:function(){return{animation:"fade-in",duration:500}},edge:function(){return{animation:"fade-in"}}};function h0(e,r){return{delay:(0,h.isFunction)(e.delay)?e.delay(r):e.delay,easing:(0,h.isFunction)(e.easing)?e.easing(r):e.easing,duration:(0,h.isFunction)(e.duration)?e.duration(r):e.duration,callback:e.callback,repeat:e.repeat}}function Ou(e,r,t){var i=c0[e];return i&&((0,h.isFunction)(i)&&(i=i(r)),i=(0,h.deepMix)({},gi,i),t)?i[t]:i}function pi(e,r,t){var i=(0,h.get)(e.get("origin"),"data",rt),n=r.animation,a=h0(r,i);if(n){var o=Lu(n);o&&o(e,a,t)}else e.animate(t.toAttrs,a)}function f0(e,r,t,i,n){if(Iu[t]){var a=Iu[t](i),o=Lu((0,h.get)(a,"animation",""));if(o){var s=(0,g.__assign)((0,g.__assign)((0,g.__assign)({},gi.appear),a),r);e.stopAnimate(),o(e,s,{coordinate:i,minYPoint:n,toAttrs:null})}}}var Mo="element-background",v0=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.labelShape=[],i.states=[];var n=t.shapeFactory,a=t.container,o=t.offscreenGroup,s=t.elementIndex,l=t.visible,u=l===void 0?!0:l;return i.shapeFactory=n,i.container=a,i.offscreenGroup=o,i.visible=u,i.elementIndex=s,i}return r.prototype.draw=function(t,i){i===void 0&&(i=!1),this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.drawShape(t,i),this.visible===!1&&this.changeVisible(!1)},r.prototype.update=function(t){var i=this,n=i.shapeFactory,a=i.shape;if(!!a){this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.setShapeInfo(a,t);var o=this.getOffscreenGroup(),s=n.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"))}},r.prototype.destroy=function(){var t=this,i=t.shapeFactory,n=t.shape;if(n){var a=this.getAnimateCfg("leave");a?pi(n,a,{coordinate:i.coordinate,toAttrs:(0,g.__assign)({},n.attr())}):n.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,e.prototype.destroy.call(this)},r.prototype.changeVisible=function(t){e.prototype.changeVisible.call(this,t),t?(this.shape&&this.shape.show(),this.labelShape&&this.labelShape.forEach(function(i){i.show()})):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach(function(i){i.hide()}))},r.prototype.setState=function(t,i){var n=this,a=n.states,o=n.shapeFactory,s=n.model,l=n.shape,u=n.shapeType,c=a.indexOf(t);if(i){if(c>-1)return;a.push(t),(t==="active"||t==="selected")&&(l==null||l.toFront())}else{if(c===-1)return;if(a.splice(c,1),t==="active"||t==="selected"){var f=this.geometry,v=f.sortZIndex,d=f.zIndexReversed,p=d?this.geometry.elements.length-this.elementIndex:this.elementIndex;v?l.setZIndex(p):l.set("zIndex",p)}}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:i,element:this,target:this.container};this.container.emit("statechange",m),ml(this.shape,"statechange",m)},r.prototype.clearStates=function(){var t=this,i=this.states;(0,h.each)(i,function(n){t.setState(n,!1)}),this.states=[]},r.prototype.hasState=function(t){return this.states.includes(t)},r.prototype.getStates=function(){return this.states},r.prototype.getData=function(){return this.data},r.prototype.getModel=function(){return this.model},r.prototype.getBBox=function(){var t=this,i=t.shape,n=t.labelShape,a={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return i&&(a=i.getCanvasBBox()),n&&n.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},r.prototype.getStatesStyle=function(){if(!this.statesStyle){var t=this,i=t.shapeType,n=t.geometry,a=t.shapeFactory,o=n.stateOption,s=a.defaultShapeType,l=a.theme[i]||a.theme[s];this.statesStyle=(0,h.deepMix)({},l,o)}return this.statesStyle},r.prototype.getStateStyle=function(t,i){var n=this.getStatesStyle(),a=(0,h.get)(n,[t,"style"],{}),o=a[i]||a;return(0,h.isFunction)(o)?o(this):o},r.prototype.getAnimateCfg=function(t){var i=this,n=this.animate;if(n){var a=n[t];return a&&(0,g.__assign)((0,g.__assign)({},a),{callback:function(){var o;(0,h.isFunction)(a.callback)&&a.callback(),(o=i.geometry)===null||o===void 0||o.emit(X.AFTER_DRAW_ANIMATE)}})}return null},r.prototype.drawShape=function(t,i){var n;i===void 0&&(i=!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,h.isString)(u)&&(this.shape.cfg.name=["element",u]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var c=i?"enter":"appear",f=this.getAnimateCfg(c);f&&((n=this.geometry)===null||n===void 0||n.emit(X.BEFORE_DRAW_ANIMATE),pi(this.shape,f,{coordinate:o.coordinate,toAttrs:(0,g.__assign)({},this.shape.attr())}))}},r.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},r.prototype.setShapeInfo=function(t,i){var n=this;if(t.cfg.origin=i,t.cfg.element=this,t.isGroup()){var a=t.get("children");a.forEach(function(o){n.setShapeInfo(o,i)})}},r.prototype.syncShapeStyle=function(t,i,n,a,o){var s=this,l;if(n===void 0&&(n=[]),o===void 0&&(o=0),!(!t||!i)){var u=t.get("clipShape"),c=i.get("clipShape");if(this.syncShapeStyle(u,c,n,a),t.isGroup())for(var f=t.get("children"),v=i.get("children"),d=0;d<f.length;d++)this.syncShapeStyle(f[d],v[d],n,a,o+d);else{if(!(0,h.isEmpty)(n)&&!(0,h.isEqual)(n,["reset"])){var p=t.get("name");(0,h.isArray)(p)&&(p=p[1]),(0,h.each)(n,function(m){if(i.get("name")!==Mo){var x=s.getStateStyle(m,p||o);i.attr(x)}})}var y=Yl(t,i);this.animate?a?((l=this.geometry)===null||l===void 0||l.emit(X.BEFORE_DRAW_ANIMATE),pi(t,a,{coordinate:this.shapeFactory.coordinate,toAttrs:y,shapeModel:this.model})):(0,h.isEmpty)(n)?t.attr(y):(t.stopAnimate(),t.animate(y,{duration:300})):t.attr(y)}}},r.prototype.getShapeType=function(t){var i=(0,h.get)(t,"shape");return(0,h.isArray)(i)?i[0]:i},r}(dt),Pu=v0,ku={},Du={};function d0(e){return ku[e.toLowerCase()]}function Qi(e,r){ku[e.toLowerCase()]=r}function g0(e){return Du[e.toLowerCase()]}function Pe(e,r){Du[e.toLowerCase()]=r}var p0={coordinate:null,defaultShapeType:null,theme:null,getShapePoints:function(e,r){var t=this.getShape(e);return t.getPoints?t.getPoints(r):this.getDefaultPoints(r)},getShape:function(e){var r=this[e]||this[this.defaultShapeType];return r.coordinate=this.coordinate,r},getDefaultPoints:function(){return[]},getDefaultStyle:function(e){return(0,h.get)(e,[this.defaultShapeType,"default","style"],{})},getMarker:function(e,r){var t=this.getShape(e);if(!t.getMarker){var i=this.defaultShapeType;t=this.getShape(i)}var n=this.theme,a=(0,h.get)(n,[e,"default"],{}),o=t.getMarker(r);return(0,h.deepMix)({},a,o)},drawShape:function(e,r,t){var i=this.getShape(e);return i.draw(r,t)}},y0={coordinate:null,parsePath:function(e){var r=this.coordinate,t=(0,vo.tr)(e);return r.isPolar?t=my(r,t):t=yy(r,t),t},parsePoint:function(e){var r=this.coordinate;return r.convert(e)},parsePoints:function(e){var r=this.coordinate;return e.map(function(t){return r.convert(t)})},draw:function(e,r){}},Fo={};function Sr(e,r){var t=(0,h.upperFirst)(e),i=(0,g.__assign)((0,g.__assign)((0,g.__assign)({},p0),r),{geometryType:e});return Fo[t]=i,i}function Zt(e,r,t){var i=(0,h.upperFirst)(e),n=Fo[i],a=(0,g.__assign)((0,g.__assign)({},y0),t);return n[r]=a,a}function Bu(e){var r=(0,h.upperFirst)(e);return Fo[r]}function m0(e,r,t){var i,n;if(t===void 0&&(t={}),!r)return[e];var a=(0,h.groupToMap)(e,r),o=[];if(r.length===1&&t[r[0]]){var s=t[r[0]];try{for(var l=(0,g.__values)(s),u=l.next();!u.done;u=l.next()){var c=u.value,f=a["_".concat(c)];f&&o.push(f)}}catch(p){i={error:p}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(i)throw i.error}}}else for(var v in a)if(a.hasOwnProperty(v)){var d=a[v];o.push(d)}return o}function Ru(e,r){return(0,h.some)(["color","shape","size","x","y","isInCircle","data","style","defaultStyle","points","mappingData"],function(t){return!(0,h.isEqual)(e[t],r[t])})}function Ji(e){return(0,h.isArray)(e)?e:e.split("*")}function Nu(e,r){for(var t=[],i=[],n=[],a=new Map,o=0;o<r.length;o++){var s=r[o];e[s]?i.push(s):t.push(s),a.set(s,!0)}return Object.keys(e).forEach(function(l){a.has(l)||n.push(l)}),{added:t,updated:i,removed:n}}var x0=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.type="base",i.attributes={},i.elements=[],i.elementsMap={},i.animateOption=!0,i.attributeOption={},i.lastElementsMap={},i.generatePoints=!1,i.beforeMappingData=null,i.adjusts={},i.idFields=[],i.hasSorted=!1,i.isCoordinateChanged=!1;var n=t.container,a=t.labelsContainer,o=t.coordinate,s=t.data,l=t.sortable,u=l===void 0?!1:l,c=t.visible,f=c===void 0?!0:c,v=t.theme,d=t.scales,p=d===void 0?{}:d,y=t.scaleDefs,m=y===void 0?{}:y,x=t.intervalPadding,_=t.dodgePadding,w=t.maxColumnWidth,b=t.minColumnWidth,S=t.columnWidthRatio,C=t.roseWidthRatio,A=t.multiplePieWidthRatio,F=t.zIndexReversed,P=t.sortZIndex,I=t.useDeferredLabel;return i.container=n,i.labelsContainer=a,i.coordinate=o,i.data=s,i.sortable=u,i.visible=f,i.userTheme=v,i.scales=p,i.scaleDefs=m,i.intervalPadding=x,i.dodgePadding=_,i.maxColumnWidth=w,i.minColumnWidth=b,i.columnWidthRatio=S,i.roseWidthRatio=C,i.multiplePieWidthRatio=A,i.zIndexReversed=F,i.sortZIndex=P,i.useDeferredLabel=I?typeof I=="number"?I:Infinity:null,i}return r.prototype.position=function(t){var i=t;(0,h.isPlainObject)(t)||(i={fields:Ji(t)});var n=(0,h.get)(i,"fields");return n.length===1&&(n.unshift("1"),(0,h.set)(i,"fields",n)),(0,h.set)(this.attributeOption,"position",i),this},r.prototype.color=function(t,i){return this.createAttrOption("color",t,i),this},r.prototype.shape=function(t,i){return this.createAttrOption("shape",t,i),this},r.prototype.size=function(t,i){return this.createAttrOption("size",t,i),this},r.prototype.adjust=function(t){var i=t;return((0,h.isString)(t)||(0,h.isPlainObject)(t))&&(i=[t]),(0,h.each)(i,function(n,a){(0,h.isObject)(n)||(i[a]={type:n})}),this.adjustOption=i,this},r.prototype.style=function(t,i){if((0,h.isString)(t)){var n=Ji(t);this.styleOption={fields:n,callback:i}}else{var a=t,n=a.fields,o=a.callback,s=a.cfg;n||o||s?this.styleOption=t:this.styleOption={cfg:t}}return this},r.prototype.tooltip=function(t,i){if((0,h.isString)(t)){var n=Ji(t);this.tooltipOption={fields:n,callback:i}}else this.tooltipOption=t;return this},r.prototype.animate=function(t){return this.animateOption=t,this},r.prototype.label=function(t,i,n){if((0,h.isString)(t)){var a={},o=Ji(t);a.fields=o,(0,h.isFunction)(i)?a.callback=i:(0,h.isPlainObject)(i)&&(a.cfg=i),n&&(a.cfg=n),this.labelOption=a}else this.labelOption=t;return this},r.prototype.state=function(t){return this.stateOption=t,this},r.prototype.customInfo=function(t){return this.customOption=t,this},r.prototype.init=function(t){t===void 0&&(t={}),this.setCfg(t),this.initAttributes(),this.processData(this.data),this.adjustScale()},r.prototype.update=function(t){t===void 0&&(t={});var i=t.data,n=t.isDataChanged,a=t.isCoordinateChanged,o=this,s=o.attributeOption,l=o.lastAttributeOption;(0,h.isEqual)(s,l)?i&&(n||!(0,h.isEqual)(i,this.data))?(this.setCfg(t),this.initAttributes(),this.processData(i)):this.setCfg(t):this.init(t),this.adjustScale(),this.isCoordinateChanged=a},r.prototype.paint=function(t){var i=this;t===void 0&&(t=!1),this.animateOption&&(this.animateOption=(0,h.deepMix)({},Ou(this.type,this.coordinate),this.animateOption)),this.defaultSize=void 0,this.elementsMap={},this.elements=[];var n=this.getOffscreenGroup();n.clear();var a=this.beforeMappingData,o=this.beforeMapping(a);this.dataArray=new Array(o.length);for(var s=0;s<o.length;s++){var l=o[s];this.dataArray[s]=this.mapping(l)}if(this.updateElements(this.dataArray,t),this.lastElementsMap=this.elementsMap,this.canDoGroupAnimation(t)){var u=this.container,c=this.type,f=this.coordinate,v=(0,h.get)(this.animateOption,"appear"),d=this.getYScale(),p=f.convert({x:0,y:d.scale(this.getYMinValue())});f0(u,v,c,f,p)}if(this.labelOption){var y=this.useDeferredLabel,m=function(){return i.renderLabels((0,h.flatten)(i.dataArray),t)}.bind(this);if(typeof y=="number"){var x=typeof y=="number"&&y!==Infinity?y:0;if(!window.requestIdleCallback)setTimeout(m,x);else{var _=x&&x!==Infinity?{timeout:x}:void 0;window.requestIdleCallback(m,_)}}else m()}this.lastAttributeOption=(0,g.__assign)({},this.attributeOption),this.visible===!1&&this.changeVisible(!1)},r.prototype.clear=function(){var t=this,i=t.container,n=t.geometryLabel,a=t.offscreenGroup;i&&i.clear(),n&&n.clear(),a&&a.clear(),this.scaleDefs=void 0,this.attributes={},this.scales={},this.elementsMap={},this.lastElementsMap={},this.elements=[],this.adjusts={},this.dataArray=null,this.beforeMappingData=null,this.lastAttributeOption=void 0,this.defaultSize=void 0,this.idFields=[],this.groupScales=void 0,this.hasSorted=!1,this.isCoordinateChanged=!1},r.prototype.destroy=function(){this.clear();var t=this.container;t.remove(!0),this.offscreenGroup&&(this.offscreenGroup.remove(!0),this.offscreenGroup=null),this.geometryLabel&&(this.geometryLabel.destroy(),this.geometryLabel=null),this.theme=void 0,this.shapeFactory=void 0,e.prototype.destroy.call(this)},r.prototype.getGroupScales=function(){return this.groupScales},r.prototype.getAttribute=function(t){return this.attributes[t]},r.prototype.getXScale=function(){return this.getAttribute("position").scales[0]},r.prototype.getYScale=function(){return this.getAttribute("position").scales[1]},r.prototype.getGroupAttributes=function(){var t=[];return(0,h.each)(this.attributes,function(i){bt.includes(i.type)&&t.push(i)}),t},r.prototype.getDefaultValue=function(t){var i,n=this.getAttribute(t);return n&&(0,h.isEmpty)(n.scales)&&(i=n.values[0]),i},r.prototype.getAttributeValues=function(t,i){for(var n=[],a=t.scales,o=0,s=a.length;o<s;o++){var l=a[o],u=l.field;l.isIdentity?n.push(l.values):n.push(i[u])}return t.mapping.apply(t,(0,g.__spreadArray)([],(0,g.__read)(n),!1))},r.prototype.getAdjust=function(t){return this.adjusts[t]},r.prototype.getCoordinate=function(){return this.coordinate},r.prototype.getData=function(){return this.data},r.prototype.getShapeMarker=function(t,i){var n=this.getShapeFactory();return n.getMarker(t,i)},r.prototype.getElementsBy=function(t){return this.elements.filter(function(i){return t(i)})},r.prototype.getElements=function(){return this.elements},r.prototype.getElementId=function(t){t=(0,h.isArray)(t)?t[0]:t;var i=t[rt];if(this.idFields.length){for(var n=i[this.idFields[0]],a=1;a<this.idFields.length;a++)n+="-"+i[this.idFields[a]];return n}var o=this.type,s=this.getXScale(),l=this.getYScale(),u=s.field||"x",c=l.field||"y",f=i[c],v;s.type==="identity"?v=s.values[0]:v=i[u];var d;o==="interval"||o==="schema"?d="".concat(v):o==="line"||o==="area"||o==="path"?d=o:d="".concat(v,"-").concat(f);for(var p=this.groupScales,a=0,y=p.length;a<y;a++){var m=p[a],x=m.field;d="".concat(d,"-").concat(i[x])}var _=this.getAdjust("dodge");if(_){var w=_.dodgeBy;w&&(d="".concat(d,"-").concat(i[w]))}return this.getAdjust("jitter")&&(d="".concat(d,"-").concat(t.x,"-").concat(t.y)),d},r.prototype.getScaleFields=function(){var t=[],i=new Map,n=this,a=n.attributeOption,o=n.labelOption,s=n.tooltipOption;for(var l in a)if(a.hasOwnProperty(l)){var u=a[l];u.fields?wr(u.fields,t,i):u.values&&wr(u.values,t,i)}return o&&o.fields&&wr(o.fields,t,i),(0,h.isObject)(s)&&s.fields&&wr(s.fields,t,i),t},r.prototype.changeVisible=function(t){e.prototype.changeVisible.call(this,t);for(var i=this.elements,n=0,a=i.length;n<a;n++){var o=i[n];o.changeVisible(t)}t?(this.container&&this.container.show(),this.labelsContainer&&this.labelsContainer.show()):(this.container&&this.container.hide(),this.labelsContainer&&this.labelsContainer.hide())},r.prototype.getFields=function(){var t=new Map,i=[];return Object.values(this.attributeOption).forEach(function(n){var a=(n==null?void 0:n.fields)||[];a.forEach(function(o){t.has(o)||i.push(o),t.set(o,!0)})},[]),i},r.prototype.getGroupFields=function(){for(var t=[],i=new Map,n=0,a=bt.length;n<a;n++){var o=bt[n],s=this.attributeOption[o];s&&s.fields&&wr(s.fields,t,i)}return t},r.prototype.getXYFields=function(){var t=(0,g.__read)(this.attributeOption.position.fields,2),i=t[0],n=t[1];return[i,n]},r.prototype.getXField=function(){return(0,h.get)(this.getXYFields(),[0])},r.prototype.getYField=function(){return(0,h.get)(this.getXYFields(),[1])},r.prototype.getShapes=function(){return this.elements.map(function(t){return t.shape})},r.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},r.prototype.sort=function(t){if(!this.hasSorted)for(var i=this.getXScale(),n=i.field,a=0;a<t.length;a++){var o=t[a];o.sort(function(s,l){return i.translate(s[rt][n])-i.translate(l[rt][n])})}this.hasSorted=!0},r.prototype.adjustScale=function(){var t=this.getYScale();t&&this.getAdjust("stack")&&this.updateStackRange(t,this.beforeMappingData)},r.prototype.getShapeFactory=function(){var t=this.shapeType;if(!!Bu(t))return this.shapeFactory||(this.shapeFactory=(0,h.clone)(Bu(t))),this.shapeFactory.coordinate=this.coordinate,this.shapeFactory.theme=this.theme.geometries[t]||{},this.shapeFactory},r.prototype.createShapePointsCfg=function(t){var i=this.getXScale(),n=this.getYScale(),a=this.normalizeValues(t[i.field],i),o;return n?o=this.normalizeValues(t[n.field],n):o=t.y?t.y:.1,{x:a,y:o,y0:n?n.scale(this.getYMinValue()):void 0}},r.prototype.createElement=function(t,i,n){n===void 0&&(n=!1);var a=this.container,o=this.getDrawCfg(t),s=this.getShapeFactory(),l=new Pu({shapeFactory:s,container:a,offscreenGroup:this.getOffscreenGroup(),elementIndex:i});return l.animate=this.animateOption,l.geometry=this,l.draw(o,n),l},r.prototype.getDrawCfg=function(t){var i=t[rt],n={mappingData:t,data:i,x:t.x,y:t.y,color:t.color,size:t.size,isInCircle:this.coordinate.isPolar,customInfo:this.customOption},a=t.shape;!a&&this.getShapeFactory()&&(a=this.getShapeFactory().defaultShapeType),n.shape=a;var o=this.theme.geometries[this.shapeType];n.defaultStyle=(0,h.get)(o,[a,"default"],{}).style,!n.defaultStyle&&this.getShapeFactory()&&(n.defaultStyle=this.getShapeFactory().getDefaultStyle(o));var s=this.styleOption;return s&&(n.style=this.getStyleCfg(s,i)),this.generatePoints&&(n.points=t.points,n.nextPoints=t.nextPoints),n},r.prototype.updateElements=function(t,i){var n,a,o,s,l,u;i===void 0&&(i=!1);for(var c=new Map,f=[],v=new Map,d=0,p=0;p<t.length;p++)for(var y=t[p],m=0;m<y.length;m++){var x=y[m],_=this.getElementId(x),w=c.has(_)?"".concat(_,"-").concat(p,"-").concat(m):_;f.push(w),c.set(w,x),v.set(w,d),d++}this.elements=new Array(d);var b=Nu(this.lastElementsMap,f),S=b.added,C=b.updated,A=b.removed;try{for(var F=(0,g.__values)(S),P=F.next();!P.done;P=F.next()){var _=P.value,x=c.get(_),p=v.get(_),I=this.createElement(x,p,i);this.elements[p]=I,this.elementsMap[_]=I,I.shape&&I.shape.set("zIndex",this.zIndexReversed?this.elements.length-p:p)}}catch(at){n={error:at}}finally{try{P&&!P.done&&(a=F.return)&&a.call(F)}finally{if(n)throw n.error}}try{for(var V=(0,g.__values)(C),Z=V.next();!Z.done;Z=V.next()){var _=Z.value,I=this.lastElementsMap[_],x=c.get(_),vt=this.getDrawCfg(x),yt=I.getModel(),p=v.get(_);(this.isCoordinateChanged||Ru(vt,yt))&&(I.animate=this.animateOption,I.update(vt)),this.elements[p]=I,this.elementsMap[_]=I,I.shape&&I.shape.set("zIndex",this.zIndexReversed?this.elements.length-p:p)}}catch(at){o={error:at}}finally{try{Z&&!Z.done&&(s=V.return)&&s.call(V)}finally{if(o)throw o.error}}this.container&&this.container.sort();try{for(var Bt=(0,g.__values)(A),G=Bt.next();!G.done;G=Bt.next()){var _=G.value,I=this.lastElementsMap[_];I.animate=this.animateOption,I.destroy()}}catch(at){l={error:at}}finally{try{G&&!G.done&&(u=Bt.return)&&u.call(Bt)}finally{if(l)throw l.error}}},r.prototype.getLabelType=function(){var t=this,i=t.labelOption,n=t.coordinate,a=t.type,o=n.type,s=n.isTransposed,l=(0,h.get)(i,["cfg","type"]);return l||(o==="polar"?l=s?"pie":"polar":o==="theta"?l="pie":a==="interval"||a==="polygon"?l="interval":l="base"),l},r.prototype.getYMinValue=function(){var t=this.getYScale(),i=t.min,n=t.max,a;return i>=0?a=i:n<=0?a=n:a=0,a},r.prototype.createAttrOption=function(t,i,n){if((0,h.isNil)(i)||(0,h.isObject)(i))(0,h.isObject)(i)&&(0,h.isEqual)(Object.keys(i),["values"])?(0,h.set)(this.attributeOption,t,{fields:i.values}):(0,h.set)(this.attributeOption,t,i);else{var a={};(0,h.isNumber)(i)?a.values=[i]:a.fields=Ji(i),n&&((0,h.isFunction)(n)?a.callback=n:a.values=n),(0,h.set)(this.attributeOption,t,a)}},r.prototype.initAttributes=function(){var t=this,i=this,n=i.attributes,a=i.attributeOption,o=i.theme,s=i.shapeType;this.groupScales=[];var l={},u=function(v){if(a.hasOwnProperty(v)){var d=a[v];if(!d)return{value:void 0};var p=(0,g.__assign)({},d),y=p.callback,m=p.values,x=p.fields,_=x===void 0?[]:x,w=_.map(function(S){var C=t.scales[S];if(!l[S]&&bt.includes(v)){var A=Xl(C,(0,h.get)(t.scaleDefs,S),v,t.type);A==="cat"&&(t.groupScales.push(C),l[S]=!0)}return C});p.scales=w,v!=="position"&&w.length===1&&w[0].type==="identity"?p.values=w[0].values:!y&&!m&&(v==="size"?p.values=o.sizes:v==="shape"?p.values=o.shapes[s]||[]:v==="color"&&(w.length?p.values=w[0].values.length<=10?o.colors10:o.colors20:p.values=o.colors10));var b=gl(v);n[v]=new b(p)}};for(var c in a){var f=u(c);if(typeof f=="object")return f.value}},r.prototype.processData=function(t){var i,n;this.hasSorted=!1;for(var a=this.getAttribute("position").scales,o=a.filter(function(A){return A.isCategory}),s=this.groupData(t),l=[],u=0,c=s.length;u<c;u++){for(var f=s[u],v=[],d=0,p=f.length;d<p;d++){var y=f[d],m={};for(var x in y)m[x]=y[x];m[rt]=y;try{for(var _=(i=void 0,(0,g.__values)(o)),w=_.next();!w.done;w=_.next()){var b=w.value,S=b.field;m[S]=b.translate(m[S])}}catch(A){i={error:A}}finally{try{w&&!w.done&&(n=_.return)&&n.call(_)}finally{if(i)throw i.error}}v.push(m)}l.push(v)}var C=this.adjustData(l);return this.beforeMappingData=C,C},r.prototype.adjustData=function(t){var i=this.adjustOption,n=this,a=n.intervalPadding,o=n.dodgePadding,s=n.theme,l=this.maxColumnWidth||s.maxColumnWidth,u=this.minColumnWidth||s.minColumnWidth,c=this.columnWidthRatio||s.columnWidthRatio,f=t;if(i){var v=this.getXScale(),d=this.getYScale(),p=v.field,y=d?d.field:null,m=Ui(this.coordinate),x=v.values.length,_=this.getAttribute("size"),w=void 0;_&&(w=_.values[0]);for(var b=0,S=i.length;b<S;b++){var C=i[b],A=(0,g.__assign)({xField:p,yField:y,intervalPadding:a,dodgePadding:o,xDimensionLength:m,groupNum:x,defaultSize:w,maxColumnWidth:l,minColumnWidth:u,columnWidthRatio:c},C),F=C.type;if(F==="dodge"){var P=[];if(v.isCategory||v.type==="identity")P.push("x");else if(!d)P.push("y");else throw new Error("dodge is not support linear attribute, please use category attribute!");A.adjustNames=P,A.dodgeRatio=c}else if(F==="stack"){var I=this.coordinate;if(!d){A.height=I.getHeight();var V=this.getDefaultValue("size")||3;A.size=V}!I.isTransposed&&(0,h.isNil)(A.reverseOrder)&&(A.reverseOrder=!0)}var Z=Tt(F);A.dimValuesMap={},v&&v.values&&(A.dimValuesMap[v.field]=v.values.map(function(yt){return v.translate(yt)}));var vt=new Z(A);f=vt.process(f),this.adjusts[F]=vt}}return f},r.prototype.groupData=function(t){for(var i=this.getGroupScales(),n=this.scaleDefs,a={},o=[],s=0;s<i.length;s++){var l=i[s],u=l.field;o.push(u),(0,h.get)(n,[u,"values"])&&(a[u]=n[u].values)}return m0(t,o,a)},r.prototype.updateStackRange=function(t,i){for(var n=(0,h.flatten)(i),a=t.field,o=t.min,s=t.max,l=0;l<n.length;l++){var u=n[l],c=Math.min.apply(null,u[a]),f=Math.max.apply(null,u[a]);c<o&&(o=c),f>s&&(s=f)}var v=this.scaleDefs,d={};o<t.min&&!(0,h.get)(v,[a,"min"])&&(d.min=o),s>t.max&&!(0,h.get)(v,[a,"max"])&&(d.max=s),t.change(d)},r.prototype.beforeMapping=function(t){var i=t;if(this.sortable&&this.sort(i),this.generatePoints)for(var n=0,a=i.length;n<a;n++){var o=i[n];this.generateShapePoints(o);var s=i[n+1];s&&(this.generateShapePoints(s),o[0].nextPoints=s[0].points)}return i},r.prototype.generateShapePoints=function(t){for(var i=this.getShapeFactory(),n=this.getAttribute("shape"),a=0;a<t.length;a++){var o=t[a],s=this.createShapePointsCfg(o),l=n?this.getAttributeValues(n,o):null,u=i.getShapePoints(l,s);o.points=u}},r.prototype.normalizeValues=function(t,i){var n=[];if((0,h.isArray)(t))for(var a=0;a<t.length;a++){var o=t[a];n.push(i.scale(o))}else n=i.scale(t);return n},r.prototype.mapping=function(t){for(var i=this.attributes,n=[],a=0;a<t.length;a++){var o=t[a],s={_origin:o[rt],points:o.points,nextPoints:o.nextPoints};for(var l in i)if(i.hasOwnProperty(l)){var u=i[l],c=u.names,f=this.getAttributeValues(u,o);if(c.length>1)for(var v=0;v<f.length;v+=1){var d=f[v],p=c[v];s[p]=(0,h.isArray)(d)&&d.length===1?d[0]:d}else s[c[0]]=f.length===1?f[0]:f}this.convertPoint(s),n.push(s)}return n},r.prototype.convertPoint=function(t){var i=t.x,n=t.y,a,o,s,l=this.coordinate;if((0,h.isArray)(i)&&(0,h.isArray)(n)){a=[],o=[];for(var u=0,c=0,f=i.length,v=n.length;u<f&&c<v;u+=1,c+=1)s=l.convert({x:i[u],y:n[c]}),a.push(s.x),o.push(s.y)}else if((0,h.isArray)(n)){o=[];for(var d=0;d<n.length;d++){var p=n[d];s=l.convert({x:i,y:p}),a&&a!==s.x?((0,h.isArray)(a)||(a=[a]),a.push(s.x)):a=s.x,o.push(s.y)}}else if((0,h.isArray)(i)){a=[];for(var d=0;d<i.length;d++){var y=i[d];s=l.convert({x:y,y:n}),o&&o!==s.y?((0,h.isArray)(o)||(o=[o]),o.push(s.y)):o=s.y,a.push(s.x)}}else{var m=l.convert({x:i,y:n});a=m.x,o=m.y}t.x=a,t.y=o},r.prototype.getStyleCfg=function(t,i){var n=t.fields,a=n===void 0?[]:n,o=t.callback,s=t.cfg;if(s)return s;var l=a.map(function(u){return i[u]});return o.apply(void 0,(0,g.__spreadArray)([],(0,g.__read)(l),!1))},r.prototype.setCfg=function(t){var i=this,n=t.coordinate,a=t.data,o=t.theme,s=t.scaleDefs;n&&(this.coordinate=n),a&&(this.data=a),s&&(this.scaleDefs=s,this.idFields=[],(0,h.each)(s,function(l,u){l&&l.key&&i.idFields.push(u)})),o&&(this.theme=this.userTheme?(0,h.deepMix)({},o,this.userTheme):o)},r.prototype.renderLabels=function(t,i){return i===void 0&&(i=!1),(0,g.__awaiter)(this,void 0,void 0,function(){var n,a,o,s,l,u,c,f,v,d,p,y,m=this;return(0,g.__generator)(this,function(x){switch(x.label){case 0:return n=this.geometryLabel,this.emit(X.BEFORE_RENDER_LABEL),n||(a=this.getLabelType(),o=d0(a),n=new o(this),this.geometryLabel=n),[4,n.render(t,i)];case 1:x.sent(),s=n.labelsRenderer.shapesMap,l=new Map,(0,h.each)(s,function(_,w){for(var b=_.getChildren()||[],S=0;S<b.length;S++){var C=b[S],A=m.elementsMap[C.get("elementId")||w.split(" ")[0]];if(A){C.cfg.name=["element","label"],C.cfg.element=A;var F=l.get(A)||new Set;F.add(_),l.set(A,F)}}});try{for(u=(0,g.__values)(l.entries()),c=u.next();!c.done;c=u.next())f=(0,g.__read)(c.value,2),v=f[0],d=f[1],v.labelShape=(0,g.__spreadArray)([],(0,g.__read)(d),!1)}catch(_){p={error:_}}finally{try{c&&!c.done&&(y=u.return)&&y.call(u)}finally{if(p)throw p.error}}return this.emit(X.AFTER_RENDER_LABEL),[2]}})})},r.prototype.canDoGroupAnimation=function(t){return!t&&this.animateOption&&((0,h.get)(this.animateOption,"appear")===void 0||(0,h.get)(this.animateOption,"appear")&&(0,h.get)(this.animateOption,["appear","animation"])===void 0)},r}(dt),Cr=x0,$n=ie.vs;function tn(e,r,t){var i=$n(e.getMatrix(),[["t",r,t]]);e.setMatrix(i)}function _0(e,r){var t=e.attr(),i=t.x,n=t.y,a=$n(e.getMatrix(),[["t",-i,-n],["r",r],["t",i,n]]);return a}function Eo(e,r){var t=_0(e,r);e.setMatrix(t)}function zL(){return[1,0,0,0,1,0,0,0,1]}function w0(e,r){var t=e.getBBox(),i=(t.minX+t.maxX)/2,n=(t.minY+t.maxY)/2;e.applyToMatrix([i,n,1]);var a=$n(e.getMatrix(),[["t",-i,-n],["s",r,r],["t",i,n]]);e.setMatrix(a)}function Ar(e){return e.find(function(r){return r.get("type")==="text"})}function zu(e,r,t){t===void 0&&(t=[0,0,0,0]);var i=e&&e.getChildren()[0];if(i){var n=i.clone();(r==null?void 0:r.rotate)&&Eo(n,-r.rotate);var a=n.getCanvasBBox(),o=a.x,s=a.y,l=a.width,u=a.height;n.destroy();var c=t;return(0,h.isNil)(c)?c=[2,2,2,2]:(0,h.isNumber)(c)&&(c=new Array(4).fill(c)),{x:o-c[3],y:s-c[0],width:l+c[1]+c[3],height:u+c[0]+c[2],rotation:(r==null?void 0:r.rotate)||0}}return{x:0,y:0,width:0,height:0,rotation:0}}function b0(e,r,t){t===void 0&&(t=0);var i=Math.max(0,Math.min(e.x+e.width+t,r.x+r.width+t)-Math.max(e.x-t,r.x-t)),n=Math.max(0,Math.min(e.y+e.height+t,r.y+r.height+t)-Math.max(e.y-t,r.y-t));return i*n}function S0(e,r){var t=e.getBBox();return(0,h.some)(r,function(i){var n=i.getBBox();return b0(t,n,2)>0})}function Vu(e,r,t){var i=t.data,n=t.origin,a=t.animateCfg,o=t.coordinate,s=(0,h.get)(a,"update");e.set("data",i),e.set("origin",n),e.set("animateCfg",a),e.set("coordinate",o),e.set("visible",r.get("visible")),(e.getChildren()||[]).forEach(function(l,u){var c=r.getChildByIndex(u);if(!c)e.removeChild(l),l.remove(!0);else{l.set("data",i),l.set("origin",n),l.set("animateCfg",a),l.set("coordinate",o);var f=Yl(l,c);s?pi(l,s,{toAttrs:f,coordinate:o}):l.attr(f),c.isGroup()&&Vu(l,c,t)}}),(0,h.each)(r.getChildren(),function(l,u){u>=e.getCount()&&(l.destroyed||e.add(l))})}var C0=function(){function e(r){this.shapesMap={};var t=r.layout,i=r.container;this.layout=t,this.container=i}return e.prototype.render=function(r,t,i){return i===void 0&&(i=!1),(0,g.__awaiter)(this,void 0,void 0,function(){var n,a,o,s,l,u,c,f,v=this;return(0,g.__generator)(this,function(d){switch(d.label){case 0:if(n={},a=this.createOffscreenGroup(),!r.length)return[3,2];try{for(o=(0,g.__values)(r),s=o.next();!s.done;s=o.next())l=s.value,l&&(n[l.id]=this.renderLabel(l,a))}catch(p){c={error:p}}finally{try{s&&!s.done&&(f=o.return)&&f.call(o)}finally{if(c)throw c.error}}return[4,this.doLayout(r,t,n)];case 1:d.sent(),this.renderLabelLine(r,n),this.renderLabelBackground(r,n),this.adjustLabel(r,n),d.label=2;case 2:return u=this.shapesMap,(0,h.each)(n,function(p,y){if(p.destroyed)delete n[y];else{if(u[y]){var m=p.get("data"),x=p.get("origin"),_=p.get("coordinate"),w=p.get("animateCfg"),b=u[y];Vu(b,n[y],{data:m,origin:x,animateCfg:w,coordinate:_}),n[y]=b}else{if(v.container.destroyed)return;v.container.add(p);var S=(0,h.get)(p.get("animateCfg"),i?"enter":"appear");S&&pi(p,S,{toAttrs:(0,g.__assign)({},p.attr()),coordinate:p.get("coordinate")})}delete u[y]}}),(0,h.each)(u,function(p){var y=(0,h.get)(p.get("animateCfg"),"leave");y?pi(p,y,{toAttrs:null,coordinate:p.get("coordinate")}):p.remove(!0)}),this.shapesMap=n,a.destroy(),[2]}})})},e.prototype.clear=function(){this.container.clear(),this.shapesMap={}},e.prototype.destroy=function(){this.container.destroy(),this.shapesMap=null},e.prototype.renderLabel=function(r,t){var i=r.id,n=r.elementId,a=r.data,o=r.mappingData,s=r.coordinate,l=r.animate,u=r.content,c=r.capture,f={id:i,elementId:n,capture:c,data:a,origin:(0,g.__assign)((0,g.__assign)({},o),{data:o[rt]}),coordinate:s},v=t.addGroup((0,g.__assign)({name:"label",animateCfg:this.animate===!1||l===null||l===!1?!1:(0,h.deepMix)({},this.animate,l)},f)),d;if(u.isGroup&&u.isGroup()||u.isShape&&u.isShape()){var p=u.getCanvasBBox(),y=p.width,m=p.height,x=(0,h.get)(r,"textAlign","left"),_=r.x,w=r.y-m/2;x==="center"?_=_-y/2:(x==="right"||x==="end")&&(_=_-y),tn(u,_,w),d=u,v.add(u)}else{var b=(0,h.get)(r,["style","fill"]);d=v.addShape("text",(0,g.__assign)({attrs:(0,g.__assign)((0,g.__assign)({x:r.x,y:r.y,textAlign:r.textAlign,textBaseline:(0,h.get)(r,"textBaseline","middle"),text:r.content},r.style),{fill:(0,h.isNull)(b)?r.color:b})},f))}return r.rotate&&Eo(d,r.rotate),v},e.prototype.doLayout=function(r,t,i){return(0,g.__awaiter)(this,void 0,void 0,function(){var n,a=this;return(0,g.__generator)(this,function(o){switch(o.label){case 0:return this.layout?(n=(0,h.isArray)(this.layout)?this.layout:[this.layout],[4,Promise.all(n.map(function(s){var l=g0((0,h.get)(s,"type",""));if(!!l){var u=[],c=[];return(0,h.each)(i,function(f,v){u.push(f),c.push(t[f.get("elementId")])}),l(r,u,c,a.region,s.cfg)}}))]):[3,2];case 1:o.sent(),o.label=2;case 2:return[2]}})})},e.prototype.renderLabelLine=function(r,t){(0,h.each)(r,function(i){var n=(0,h.get)(i,"coordinate");if(!(!i||!n)){var a=n.getCenter(),o=n.getRadius();if(!!i.labelLine){var s=(0,h.get)(i,"labelLine",{}),l=i.id,u=s.path;if(!u){var c=ge(a.x,a.y,o,i.angle);u=[["M",c.x,c.y],["L",i.x,i.y]]}var f=t[l];f.destroyed||f.addShape("path",{capture:!1,attrs:(0,g.__assign)({path:u,stroke:i.color?i.color:(0,h.get)(i,["style","fill"],"#000"),fill:null},s.style),id:l,origin:i.mappingData,data:i.data,coordinate:i.coordinate})}}})},e.prototype.renderLabelBackground=function(r,t){(0,h.each)(r,function(i){var n=(0,h.get)(i,"coordinate"),a=(0,h.get)(i,"background");if(!(!a||!n)){var o=i.id,s=t[o];if(!s.destroyed){var l=s.getChildren()[0];if(l){var u=zu(s,i,a.padding),c=u.rotation,f=(0,g.__rest)(u,["rotation"]),v=s.addShape("rect",{attrs:(0,g.__assign)((0,g.__assign)({},f),a.style||{}),id:o,origin:i.mappingData,data:i.data,coordinate:i.coordinate});if(v.setZIndex(-1),c){var d=l.getMatrix();v.setMatrix(d)}}}}})},e.prototype.createOffscreenGroup=function(){var r=this.container,t=r.getGroupBase(),i=new t({});return i},e.prototype.adjustLabel=function(r,t){(0,h.each)(r,function(i){if(i){var n=i.id,a=t[n];if(!a.destroyed){var o=a.findAll(function(s){return s.get("type")!=="path"});(0,h.each)(o,function(s){s&&(i.offsetX&&s.attr("x",s.attr("x")+i.offsetX),i.offsetY&&s.attr("y",s.attr("y")+i.offsetY))})}}})},e}(),A0=C0;function Gu(e){var r=0;return(0,h.each)(e,function(t){r+=t}),r/e.length}var M0=function(){function e(r){this.geometry=r}return e.prototype.getLabelItems=function(r){var t=this,i=[],n=this.getLabelCfgs(r);return(0,h.each)(r,function(a,o){var s=n[o];if(!s||(0,h.isNil)(a.x)||(0,h.isNil)(a.y)){i.push(null);return}var l=(0,h.isArray)(s.content)?s.content:[s.content];s.content=l;var u=l.length;(0,h.each)(l,function(c,f){if((0,h.isNil)(c)||c===""){i.push(null);return}var v=(0,g.__assign)((0,g.__assign)({},s),t.getLabelPoint(s,a,f));v.textAlign||(v.textAlign=t.getLabelAlign(v,f,u)),v.offset<=0&&(v.labelLine=null),i.push(v)})}),i},e.prototype.render=function(r,t){return t===void 0&&(t=!1),(0,g.__awaiter)(this,void 0,void 0,function(){var i,n,a;return(0,g.__generator)(this,function(o){switch(o.label){case 0:return i=this.getLabelItems(r),n=this.getLabelsRenderer(),a=this.getGeometryShapes(),[4,n.render(i,a,t)];case 1:return o.sent(),[2]}})})},e.prototype.clear=function(){var r=this.labelsRenderer;r&&r.clear()},e.prototype.destroy=function(){var r=this.labelsRenderer;r&&r.destroy(),this.labelsRenderer=null},e.prototype.getCoordinate=function(){return this.geometry.coordinate},e.prototype.getDefaultLabelCfg=function(r,t){var i=this.geometry,n=i.type,a=i.theme;return n==="polygon"||n==="interval"&&t==="middle"||r<0&&!["line","point","path"].includes(n)?(0,h.get)(a,"innerLabels",{}):(0,h.get)(a,"labels",{})},e.prototype.getThemedLabelCfg=function(r){var t=this.geometry,i=this.getDefaultLabelCfg(),n=t.type,a=t.theme,o;return n==="polygon"||r.offset<0&&!["line","point","path"].includes(n)?o=(0,h.deepMix)({},i,a.innerLabels,r):o=(0,h.deepMix)({},i,a.labels,r),o},e.prototype.setLabelPosition=function(r,t,i,n){},e.prototype.getLabelOffset=function(r){var t=this.getCoordinate(),i=this.getOffsetVector(r);return t.isTransposed?i[0]:i[1]},e.prototype.getLabelOffsetPoint=function(r,t,i){var n=r.offset,a=this.getCoordinate(),o=a.isTransposed,s=o?"x":"y",l=o?1:-1,u={x:0,y:0};return t>0||i===1?u[s]=n*l:u[s]=n*l*-1,u},e.prototype.getLabelPoint=function(r,t,i){var n=this.getCoordinate(),a=r.content.length;function o(m,x,_){_===void 0&&(_=!1);var w=m;return(0,h.isArray)(w)&&(r.content.length===1?_?w=Gu(w):w.length<=2?w=w[m.length-1]:w=Gu(w):w=w[x]),w}var s={content:r.content[i],x:0,y:0,start:{x:0,y:0},color:"#fff"},l=(0,h.isArray)(t.shape)?t.shape[0]:t.shape,u=l==="funnel"||l==="pyramid";if(this.geometry.type==="polygon"){var c=Zp(t.x,t.y);s.x=c[0],s.y=c[1]}else this.geometry.type==="interval"&&!u?(s.x=o(t.x,i,!0),s.y=o(t.y,i)):(s.x=o(t.x,i),s.y=o(t.y,i));if(u){var f=(0,h.get)(t,"nextPoints"),v=(0,h.get)(t,"points");if(f){var d=n.convert(v[1]),p=n.convert(f[1]);s.x=(d.x+p.x)/2,s.y=(d.y+p.y)/2}else if(l==="pyramid"){var d=n.convert(v[1]),p=n.convert(v[2]);s.x=(d.x+p.x)/2,s.y=(d.y+p.y)/2}}r.position&&this.setLabelPosition(s,t,i,r.position);var y=this.getLabelOffsetPoint(r,i,a);return s.start={x:s.x,y:s.y},s.x+=y.x,s.y+=y.y,s.color=t.color,s},e.prototype.getLabelAlign=function(r,t,i){var n="center",a=this.getCoordinate();if(a.isTransposed){var o=r.offset;o<0?n="right":o===0?n="center":n="left",i>1&&t===0&&(n==="right"?n="left":n==="left"&&(n="right"))}return n},e.prototype.getLabelId=function(r){var t=this.geometry,i=t.type,n=t.getXScale(),a=t.getYScale(),o=r[rt],s=t.getElementId(r);return i==="line"||i==="area"?s+=" ".concat(o[n.field]):i==="path"&&(s+=" ".concat(o[n.field],"-").concat(o[a.field])),s},e.prototype.getLabelsRenderer=function(){var r=this.geometry,t=r.labelsContainer,i=r.labelOption,n=r.canvasRegion,a=r.animateOption,o=this.geometry.coordinate,s=this.labelsRenderer;return s||(s=new A0({container:t,layout:(0,h.get)(i,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=s),s.region=n,s.animate=a?Ou("label",o):!1,s},e.prototype.getLabelCfgs=function(r){var t=this,i=this.geometry,n=i.labelOption,a=i.scales,o=i.coordinate,s=n,l=s.fields,u=s.callback,c=s.cfg,f=l.map(function(d){return a[d]}),v=[];return(0,h.each)(r,function(d,p){var y=d[rt],m=t.getLabelText(y,f),x;if(u){var _=l.map(function(A){return y[A]});if(x=u.apply(void 0,(0,g.__spreadArray)([],(0,g.__read)(_),!1)),(0,h.isNil)(x)){v.push(null);return}}var w=(0,g.__assign)((0,g.__assign)({id:t.getLabelId(d),elementId:t.geometry.getElementId(d),data:y,mappingData:d,coordinate:o},c),x);(0,h.isFunction)(w.position)&&(w.position=w.position(y,d,p));var b=t.getLabelOffset(w.offset||0),S=t.getDefaultLabelCfg(b,w.position);w=(0,h.deepMix)({},S,w),w.offset=t.getLabelOffset(w.offset||0);var C=w.content;(0,h.isFunction)(C)?w.content=C(y,d,p):(0,h.isUndefined)(C)&&(w.content=m[0]),v.push(w)}),v},e.prototype.getLabelText=function(r,t){var i=[];return(0,h.each)(t,function(n){var a=r[n.field];(0,h.isArray)(a)?a=a.map(function(o){return n.getText(o)}):a=n.getText(a),(0,h.isNil)(a)||a===""?i.push(null):i.push(a)}),i},e.prototype.getOffsetVector=function(r){r===void 0&&(r=0);var t=this.getCoordinate(),i=0;return(0,h.isNumber)(r)&&(i=r),t.isTransposed?t.applyMatrix(i,0):t.applyMatrix(0,i)},e.prototype.getGeometryShapes=function(){var r=this.geometry,t={};return(0,h.each)(r.elementsMap,function(i,n){t[n]=i.shape}),(0,h.each)(r.getOffscreenGroup().getChildren(),function(i){var n=r.getElementId(i.get("origin").mappingData);t[n]=i}),t},e}(),Qn=M0;function To(e,r,t){if(!e)return t;var i;if(e.callback&&e.callback.length>1){var n=Array(e.callback.length-1).fill("");i=e.mapping.apply(e,(0,g.__spreadArray)([r],(0,g.__read)(n),!1)).join("")}else i=e.mapping(r).join("");return i||t}var Gr={hexagon:function(e,r,t){var i=t/2*Math.sqrt(3);return[["M",e,r-t],["L",e+i,r-t/2],["L",e+i,r+t/2],["L",e,r+t],["L",e-i,r+t/2],["L",e-i,r-t/2],["Z"]]},bowtie:function(e,r,t){var i=t-1.5;return[["M",e-t,r-i],["L",e+t,r+i],["L",e+t,r-i],["L",e-t,r+i],["Z"]]},cross:function(e,r,t){return[["M",e-t,r-t],["L",e+t,r+t],["M",e+t,r-t],["L",e-t,r+t]]},tick:function(e,r,t){return[["M",e-t/2,r-t],["L",e+t/2,r-t],["M",e,r-t],["L",e,r+t],["M",e-t/2,r+t],["L",e+t/2,r+t]]},plus:function(e,r,t){return[["M",e-t,r],["L",e+t,r],["M",e,r-t],["L",e,r+t]]},hyphen:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},line:function(e,r,t){return[["M",e,r-t],["L",e,r+t]]}},F0=["line","cross","tick","plus","hyphen"];function E0(e,r){return(0,h.isFunction)(r)?r(e):(0,h.deepMix)({},e,r)}function T0(e,r){var t=e.symbol;if((0,h.isString)(t)&&F0.indexOf(t)!==-1){var i=(0,h.get)(e,"style",{}),n=(0,h.get)(i,"lineWidth",1),a=i.stroke||i.fill||r;e.style=(0,h.deepMix)({},e.style,{lineWidth:n,stroke:a,fill:null})}}function Wu(e){var r=e.symbol;(0,h.isString)(r)&&Gr[r]&&(e.symbol=Gr[r])}function Lo(e){return e.startsWith(E.LEFT)||e.startsWith(E.RIGHT)?"vertical":"horizontal"}function Hu(e,r,t,i,n){var a=t.getScale(t.type);if(a.isCategory){var o=a.field,s=r.getAttribute("color"),l=r.getAttribute("shape"),u=e.getTheme().defaultColor,c=r.coordinate.isPolar;return a.getTicks().map(function(f,v){var d,p=f.text,y=f.value,m=p,x=a.invert(y),_=e.filterFieldData(o,[(d={},d[o]=x,d)]).length===0;(0,h.each)(e.views,function(A){var F;A.filterFieldData(o,[(F={},F[o]=x,F)]).length||(_=!0)});var w=To(s,x,u),b=To(l,x,"point"),S=r.getShapeMarker(b,{color:w,isInPolar:c}),C=n;return(0,h.isFunction)(C)&&(C=C(m,v,(0,g.__assign)({name:m,value:x},(0,h.deepMix)({},i,S)))),S=(0,h.deepMix)({},i,S,Oe((0,g.__assign)({},C),["style"])),T0(S,w),C&&C.style&&(S.style=E0(S.style,C.style)),Wu(S),{id:x,name:m,value:x,marker:S,unchecked:_}})}return[]}function L0(e,r,t){return t.map(function(i,n){var a=r;(0,h.isFunction)(a)&&(a=a(i.name,n,(0,h.deepMix)({},e,i)));var o=(0,h.isFunction)(i.marker)?i.marker(i.name,n,(0,h.deepMix)({},e,i)):i.marker,s=(0,h.deepMix)({},e,a,o);return Wu(s),i.marker=s,i})}function Yu(e,r){var t=(0,h.get)(e,["components","legend"],{});return(0,h.deepMix)({},(0,h.get)(t,["common"],{}),(0,h.deepMix)({},(0,h.get)(t,[r],{})))}function Io(e){return e?!1:e==null||isNaN(e)}function Xu(e){if((0,h.isArray)(e))return Io(e[1].y);var r=e.y;return(0,h.isArray)(r)?Io(r[0]):Io(r)}function Jn(e,r,t){if(r===void 0&&(r=!1),t===void 0&&(t=!0),!e.length||e.length===1&&!t)return[];if(r){for(var i=[],n=0,a=e.length;n<a;n++){var o=e[n];Xu(o)||i.push(o)}return[i]}for(var s=[],l=[],n=0,a=e.length;n<a;n++){var o=e[n];Xu(o)?l.length&&(l.length===1&&!t||s.push(l),l=[]):l.push(o)}return l.length&&s.push(l),s}function Uu(e){for(var r=[],t=0;t<e.length;t++){var i=e[t];if(i){var n=t===0?"M":"L";r.push([n,i.x,i.y])}}var a=e[0];return a&&(r.push(["L",a.x,a.y]),r.push(["z"])),r}function ju(e){for(var r=e.length/2,t=[],i=[],n=0;n<e.length;n++)n<r?t.push(e[n]):i.push(e[n]);var a=Xn(t,!1),o=Xn(i,!1);i.length&&a.push(["L",i[0].x,i[0].y]),o.shift();var s=a.concat(o);return t.length&&s.push(["L",t[0].x,t[0].y]),s.push(["z"]),s}function fe(e,r,t,i){i===void 0&&(i="");var n=e.style,a=n===void 0?{}:n,o=e.defaultStyle,s=e.color,l=e.size,u=(0,g.__assign)((0,g.__assign)({},o),a);return s&&(r&&(a.stroke||(u.stroke=s)),t&&(a.fill||(u.fill=s))),i&&(0,h.isNil)(a[i])&&!(0,h.isNil)(l)&&(u[i]=l),u}function Zu(e){return(0,h.deepMix)({},{fill:"#CCD6EC",fillOpacity:.3},(0,h.get)(e,["background","style"]))}function Oo(e){var r=e.x,t=(0,h.isArray)(e.y)?e.y:[e.y];return t.map(function(i,n){return{x:(0,h.isArray)(r)?r[n]:r,y:i}})}var I0={line:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},dot:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},dash:function(e,r,t){return[["M",e-t,r],["L",e+t,r]]},smooth:function(e,r,t){return[["M",e-t,r],["A",t/2,t/2,0,1,1,e,r],["A",t/2,t/2,0,1,0,e+t,r]]},hv:function(e,r,t){return[["M",e-t-1,r-2.5],["L",e,r-2.5],["L",e,r+2.5],["L",e+t+1,r+2.5]]},vh:function(e,r,t){return[["M",e-t-1,r+2.5],["L",e,r+2.5],["L",e,r-2.5],["L",e+t+1,r-2.5]]},hvh:function(e,r,t){return[["M",e-(t+1),r+2.5],["L",e-t/2,r+2.5],["L",e-t/2,r-2.5],["L",e+t/2,r-2.5],["L",e+t/2,r+2.5],["L",e+t+1,r+2.5]]},vhv:function(e,r){return[["M",e-5,r+2.5],["L",e-5,r],["L",e,r],["L",e,r-3],["L",e,r+3],["L",e+6.5,r+3]]}};function qu(e,r){var t=e.color;return{symbol:I0[r],style:{lineWidth:2,r:6,stroke:t}}}function O0(e,r,t){for(var i=e.isStack,n=e.connectNulls,a=e.isInCircle,o=e.showSinglePoint,s=fe(e,!0,!1,"lineWidth"),l=Jn(e.points,n,o),u=[],c=0,f=l.length;c<f;c++){var v=l[c];u=u.concat(Ku(v,a,i,r,t,s))}return s.path=u,s}function Po(e,r,t,i,n){if(e.length===1)return[["M",e[0].x,e[0].y-n.lineWidth/2],["L",e[0].x,e[0].y],["L",e[0].x,e[0].y+n.lineWidth/2]];var a;return t?(r&&e.length&&e.push({x:e[0].x,y:e[0].y}),a=Xn(e,!1,i)):(a=Zi(e,!1),r&&a.push(["Z"])),a}function P0(e,r,t,i,n,a){var o=[],s=[];(0,h.each)(e,function(c){var f=Oo(c);o.push(f[1]),s.push(f[0])});var l=Po(o,r,i,n,a),u=Po(s,r,i,n,a);return t?l:l.concat(u)}function Ku(e,r,t,i,n,a){if(e.length){var o=e[0];return(0,h.isArray)(o.y)?P0(e,r,t,i,n,a):Po(e,r,i,n,a)}return[]}var VL=Sr("line",{defaultShapeType:"line"});(0,h.each)(["line","dot","dash","smooth"],function(e){Zt("line",e,{draw:function(r,t){var i=e==="smooth",n;if(i){var a=this.coordinate,o=a.start,s=a.end;n=[[o.x,s.y],[s.x,o.y]]}var l=O0(r,i,n),u=t.addShape({type:"path",attrs:l,name:"line",capture:!i});return u},getMarker:function(r){return qu(r,e)}})});var GL=null,WL="4.2.10",ke={getLegendItems:Hu,translate:tn,rotate:Eo,zoom:w0,transform:$n,getAngle:Xi,getSectorPath:_r,polarToCartesian:ge,getDelegationObject:zr,getTooltipItems:So,getMappingValue:To,getPath:Ku,getPathPoints:Jn},Mr={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},ee={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},Ze=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E86452","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],k0=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#E86452","#F8D0CB","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],D0=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],B0=function(e){e===void 0&&(e={});var r=e.paletteQualitative10,t=r===void 0?Ze:r,i=e.paletteQualitative20,n=i===void 0?k0:i,a=e.brandColor,o=a===void 0?t[0]:a,s={backgroundColor:"#141414",brandColor:o,subColor:"rgba(255,255,255,0.05)",paletteQualitative10:t,paletteQualitative20:n,paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",paletteSequence:D0,fontFamily:`"Segoe UI", Roboto, "Helvetica Neue", Arial,
  22. "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
  23. "Noto Color Emoji"`,axisLineBorderColor:ee[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:ee[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:Mr[85],axisTickLineBorderColor:ee[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:ee[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:ee[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:ee[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:ee[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:Ze[0],legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:ee[65],legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",legendItemSpacing:24,legendItemMarginBottom:12,legendSpacing:16,legendPadding:[8,8,8,8],legendHorizontalPadding:[8,0,8,0],legendVerticalPadding:[0,8,0,8],legendPageNavigatorMarkerSize:12,legendPageNavigatorMarkerInactiveFillColor:ee[45],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:ee[45],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:ee[65],legendPageNavigatorTextFontSize:12,sliderRailFillColor:ee[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:ee[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:Mr[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:Mr[25],annotationArcBorderColor:ee[15],annotationArcBorder:1,annotationLineBorderColor:ee[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:ee[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:ee[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:ee[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"#1f1f1f",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 2px 4px rgba(0,0,0,.5)",tooltipContainerBorderRadius:3,tooltipTextFillColor:ee[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:ee[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:Mr[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:ee[65],overflowLabelFillColorDark:"#2c3542",overflowLabelFillColorLight:"#ffffff",overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:Mr[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:ee[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:"#fff",cSliderTextFillOpacity:.45,cSliderTextFontSize:12,cSliderTextLineHeight:12,cSliderTextFontWeight:"normal",cSliderTextBorderColor:null,cSliderTextBorder:0,scrollbarTrackFillColor:"rgba(255,255,255,0.65)",scrollbarThumbFillColor:"rgba(0,0,0,0.35)",scrollbarThumbHighlightFillColor:"rgba(0,0,0,0.45)",pointFillColor:Ze[0],pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:Mr[100],pointBorderOpacity:1,pointActiveBorderColor:ee[100],pointSelectedBorder:2,pointSelectedBorderColor:ee[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:Ze[0],hollowPointBorderOpacity:.95,hollowPointFillColor:Mr[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:ee[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:ee[100],hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:Ze[0],lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:Ze[0],areaFillOpacity:.25,areaActiveFillColor:Ze[0],areaActiveFillOpacity:.5,areaSelectedFillColor:Ze[0],areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:Ze[0],hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:ee[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:ee[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:Ze[0],intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:ee[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:ee[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:Ze[0],hollowIntervalBorderOpacity:1,hollowIntervalFillColor:Mr[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:ee[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:ee[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3};return(0,g.__assign)((0,g.__assign)({},s),e)},R0=B0(),$u=M(70375),N0=M(71597),z0=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.type="path",i.shapeType="line";var n=t.connectNulls,a=n===void 0?!1:n,o=t.showSinglePoint,s=o===void 0?!0:o;return i.connectNulls=a,i.showSinglePoint=s,i}return r.prototype.updateElements=function(t,i){var n,a,o,s,l,u;i===void 0&&(i=!1);for(var c=new Map,f=new Map,v=[],d=0,p=0;p<t.length;p++){var y=t[p],m=this.getElementId(y);v.push(m),c.set(m,y),f.set(m,d),d++}this.elements=new Array(d);var x=Nu(this.lastElementsMap,v),_=x.added,w=x.updated,b=x.removed;try{for(var S=(0,g.__values)(_),C=S.next();!C.done;C=S.next()){var m=C.value,y=c.get(m),A=this.getShapeFactory(),F=this.getShapeInfo(y),p=f.get(m),P=new Pu({shapeFactory:A,container:this.container,offscreenGroup:this.getOffscreenGroup(),elementIndex:p});P.geometry=this,P.animate=this.animateOption,P.draw(F,i),this.elementsMap[m]=P,this.elements[p]=P}}catch(Bt){n={error:Bt}}finally{try{C&&!C.done&&(a=S.return)&&a.call(S)}finally{if(n)throw n.error}}try{for(var I=(0,g.__values)(w),V=I.next();!V.done;V=I.next()){var m=V.value,y=c.get(m),P=this.lastElementsMap[m],p=f.get(m),F=this.getShapeInfo(y),Z=P.getModel();(this.isCoordinateChanged||Ru(Z,F))&&(P.animate=this.animateOption,P.update(F)),this.elementsMap[m]=P,this.elements[p]=P}}catch(Bt){o={error:Bt}}finally{try{V&&!V.done&&(s=I.return)&&s.call(I)}finally{if(o)throw o.error}}try{for(var vt=(0,g.__values)(b),yt=vt.next();!yt.done;yt=vt.next()){var m=yt.value,P=this.lastElementsMap[m];P.animate=this.animateOption,P.destroy()}}catch(Bt){l={error:Bt}}finally{try{yt&&!yt.done&&(u=vt.return)&&u.call(vt)}finally{if(l)throw l.error}}},r.prototype.getPointsAndData=function(t){for(var i=[],n=[],a=0,o=t.length;a<o;a++){var s=t[a];i.push({x:s.x,y:s.y}),n.push(s[rt])}return{points:i,data:n}},r.prototype.getShapeInfo=function(t){var i=this.getDrawCfg(t[0]),n=this.getPointsAndData(t),a=n.points,o=n.data;return i.mappingData=t,i.data=o,i.isStack=!!this.getAdjust("stack"),i.points=a,i.connectNulls=this.connectNulls,i.showSinglePoint=this.showSinglePoint,i},r}(Cr),ko=z0;function V0(e,r,t,i,n){var a=[];if(e.length){for(var o=[],s=[],l=0,u=e.length;l<u;l++){var c=e[l];o.push(c[1]),s.push(c[0])}s=s.reverse(),(0,h.each)([o,s],function(f,v){var d=[],p=i.parsePoints(f),y=p[0];o.length===1&&s.length===1?d=v===0?[["M",y.x-.5,y.y],["L",y.x+.5,y.y]]:[["L",y.x+.5,y.y],["L",y.x-.5,y.y]]:(r&&p.push({x:y.x,y:y.y}),t?d=Xn(p,!1,n):d=Zi(p,!1),v>0&&(d[0][0]="L")),a=a.concat(d)}),a.push(["Z"])}return a}function ta(e,r,t,i,n){for(var a=fe(e,r,!r,"lineWidth"),o=e.connectNulls,s=e.isInCircle,l=e.points,u=e.showSinglePoint,c=Jn(l,o,u),f=[],v=0,d=c.length;v<d;v++){var p=c[v];f=f.concat(V0(p,s,t,i,n))}return a.path=f,a}function Qu(e){var r=e.start,t=e.end;return[[r.x,t.y],[t.x,r.y]]}var HL=Sr("area",{defaultShapeType:"area",getDefaultPoints:function(e){var r=e.x,t=e.y0,i=(0,h.isArray)(e.y)?e.y:[t,e.y];return i.map(function(n){return{x:r,y:n}})}});Zt("area","area",{draw:function(e,r){var t=ta(e,!1,!1,this),i=r.addShape({type:"path",attrs:t,name:"area"});return i},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,fill:r,fillOpacity:1}}}});var YL=null,G0=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.type="area",i.shapeType="area",i.generatePoints=!0,i.startOnZero=!0;var n=t.startOnZero,a=n===void 0?!0:n,o=t.sortable,s=o===void 0?!1:o,l=t.showSinglePoint,u=l===void 0?!1:l;return i.startOnZero=a,i.sortable=s,i.showSinglePoint=u,i}return r.prototype.getPointsAndData=function(t){for(var i=[],n=[],a=0,o=t.length;a<o;a++){var s=t[a];i.push(s.points),n.push(s[rt])}return{points:i,data:n}},r.prototype.getYMinValue=function(){if(this.startOnZero)return e.prototype.getYMinValue.call(this);var t=this.getYScale();return t.min},r}(ko),W0=G0,XL=Sr("edge",{defaultShapeType:"line",getDefaultPoints:function(e){return Oo(e)}});Zt("edge","line",{draw:function(e,r){var t=fe(e,!0,!1,"lineWidth"),i=Zi(this.parsePoints(e.points),this.coordinate.isPolar);return r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:i})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});var UL=null,H0=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="edge",t.shapeType="edge",t.generatePoints=!0,t}return r}(Cr),Y0=H0,X0=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="heatmap",t.paletteCache={},t}return r.prototype.updateElements=function(t,i){i===void 0&&(i=!1);for(var n=0;n<t.length;n++){var a=t[n],o=this.prepareRange(a),s=this.prepareSize(),l=(0,h.get)(this.styleOption,["cfg","shadowBlur"]);(0,h.isNumber)(l)||(l=s/2),this.prepareGreyScaleBlurredCircle(s,l),this.drawWithRange(a,o,s,l)}},r.prototype.color=function(t,i){return this.createAttrOption("color",t,typeof i!="function"?i:""),this},r.prototype.clear=function(){e.prototype.clear.call(this),this.clearShadowCanvasCtx(),this.paletteCache={}},r.prototype.prepareRange=function(t){var i=this.getAttribute("color"),n=i.getFields()[0],a=Infinity,o=-Infinity;return t.forEach(function(s){var l=s[rt][n];l>o&&(o=l),l<a&&(a=l)}),a===o&&(a=o-1),[a,o]},r.prototype.prepareSize=function(){var t=this.getDefaultValue("size");return(0,h.isNumber)(t)||(t=this.getDefaultSize()),t},r.prototype.prepareGreyScaleBlurredCircle=function(t,i){var n=this.getGrayScaleBlurredCanvas(),a=t+i,o=n.getContext("2d");n.width=n.height=a*2,o.clearRect(0,0,n.width,n.height),o.shadowOffsetX=o.shadowOffsetY=a*2,o.shadowBlur=i,o.shadowColor="black",o.beginPath(),o.arc(-a,-a,t,0,Math.PI*2,!0),o.closePath(),o.fill()},r.prototype.drawWithRange=function(t,i,n,a){var o,s,l=this.coordinate,u=l.start,c=l.end,f=this.coordinate.getWidth(),v=this.coordinate.getHeight(),d=this.getAttribute("color"),p=d.getFields()[0];this.clearShadowCanvasCtx();var y=this.getShadowCanvasCtx();i&&(t=t.filter(function(I){return I[rt][p]<=i[1]&&I[rt][p]>=i[0]}));var m=this.scales[p];try{for(var x=(0,g.__values)(t),_=x.next();!_.done;_=x.next()){var w=_.value,b=this.getDrawCfg(w),S=b.x,C=b.y,A=m.scale(w[rt][p]);this.drawGrayScaleBlurredCircle(S-u.x,C-c.y,n+a,A,y)}}catch(I){o={error:I}}finally{try{_&&!_.done&&(s=x.return)&&s.call(x)}finally{if(o)throw o.error}}var F=y.getImageData(0,0,f,v);this.clearShadowCanvasCtx(),this.colorize(F),y.putImageData(F,0,0);var P=this.getImageShape();P.attr("x",u.x),P.attr("y",c.y),P.attr("width",f),P.attr("height",v),P.attr("img",y.canvas),P.set("origin",this.getShapeInfo(t))},r.prototype.getDefaultSize=function(){var t=this.getAttribute("position"),i=this.coordinate;return Math.min(i.getWidth()/(t.scales[0].ticks.length*4),i.getHeight()/(t.scales[1].ticks.length*4))},r.prototype.clearShadowCanvasCtx=function(){var t=this.getShadowCanvasCtx();t.clearRect(0,0,t.canvas.width,t.canvas.height)},r.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")},r.prototype.getGrayScaleBlurredCanvas=function(){return this.grayScaleBlurredCanvas||(this.grayScaleBlurredCanvas=document.createElement("canvas")),this.grayScaleBlurredCanvas},r.prototype.drawGrayScaleBlurredCircle=function(t,i,n,a,o){var s=this.getGrayScaleBlurredCanvas();o.globalAlpha=a,o.drawImage(s,t-n,i-n)},r.prototype.colorize=function(t){for(var i=this.getAttribute("color"),n=t.data,a=this.paletteCache,o=3;o<n.length;o+=4){var s=n[o];if((0,h.isNumber)(s)){var l=a[s]?a[s]:xr.rgb2arr(i.gradient(s/256));n[o-3]=l[0],n[o-2]=l[1],n[o-1]=l[2],n[o]=s}}},r.prototype.getImageShape=function(){var t=this.imageShape;if(t)return t;var i=this.container;return t=i.addShape({type:"image",attrs:{}}),this.imageShape=t,t},r.prototype.getShapeInfo=function(t){var i=this.getDrawCfg(t[0]),n=t.map(function(a){return a[rt]});return(0,g.__assign)((0,g.__assign)({},i),{mappingData:t,data:n})},r}(Cr),U0=X0;function Do(e){var r,t,i=e.x,n=e.y,a=e.y0,o=e.size,s,l;(0,h.isArray)(n)?(r=(0,g.__read)(n,2),s=r[0],l=r[1]):(s=a,l=n);var u,c;(0,h.isArray)(i)?(t=(0,g.__read)(i,2),u=t[0],c=t[1]):(u=i-o/2,c=i+o/2);var f=[{x:u,y:s},{x:u,y:l}];return f.push({x:c,y:l},{x:c,y:s}),f}function Bo(e,r){r===void 0&&(r=!0);var t=[],i=e[0];t.push(["M",i.x,i.y]);for(var n=1,a=e.length;n<a;n++)t.push(["L",e[n].x,e[n].y]);return r&&(t.push(["L",i.x,i.y]),t.push(["z"])),t}function Ju(e,r){var t=0,i=0,n=0,a=0;return(0,h.isArray)(e)?e.length===1?t=i=n=a=e[0]:e.length===2?(t=n=e[0],i=a=e[1]):e.length===3?(t=e[0],i=a=e[1],n=e[2]):(t=e[0],i=e[1],n=e[2],a=e[3]):t=i=n=a=e,t+i>r&&(t=t?r/(1+i/t):0,i=r-t),n+a>r&&(n=n?r/(1+a/n):0,a=r-n),[t||0,i||0,n||0,a||0]}function tc(e,r,t){var i=[];if(t.isRect){var n=t.isTransposed?{x:t.start.x,y:r[0].y}:{x:r[0].x,y:t.start.y},a=t.isTransposed?{x:t.end.x,y:r[2].y}:{x:r[3].x,y:t.end.y},o=(0,h.get)(e,["background","style","radius"]);if(o){var s=t.isTransposed?Math.abs(r[0].y-r[2].y):r[2].x-r[1].x,l=t.isTransposed?t.getWidth():t.getHeight(),u=(0,g.__read)(Ju(o,Math.min(s,l)),4),c=u[0],f=u[1],v=u[2],d=u[3],p=t.isTransposed&&t.isReflect("y"),y=p?0:1,m=function(C){return p?-C:C};i.push(["M",n.x,a.y+m(c)]),c!==0&&i.push(["A",c,c,0,0,y,n.x+c,a.y]),i.push(["L",a.x-f,a.y]),f!==0&&i.push(["A",f,f,0,0,y,a.x,a.y+m(f)]),i.push(["L",a.x,n.y-m(v)]),v!==0&&i.push(["A",v,v,0,0,y,a.x-v,n.y]),i.push(["L",n.x+d,n.y]),d!==0&&i.push(["A",d,d,0,0,y,n.x,n.y-m(d)])}else i.push(["M",n.x,n.y]),i.push(["L",a.x,n.y]),i.push(["L",a.x,a.y]),i.push(["L",n.x,a.y]),i.push(["L",n.x,n.y]);i.push(["z"])}if(t.isPolar){var x=t.getCenter(),_=Xi(e,t),w=_.startAngle,b=_.endAngle;if(t.type!=="theta"&&!t.isTransposed)i=_r(x.x,x.y,t.getRadius(),w,b);else{var S=function(F){return Math.pow(F,2)},c=Math.sqrt(S(x.x-r[0].x)+S(x.y-r[0].y)),f=Math.sqrt(S(x.x-r[2].x)+S(x.y-r[2].y));i=_r(x.x,x.y,c,t.startAngle,t.endAngle,f)}}return i}function j0(e,r,t){var i=t.getWidth(),n=t.getHeight(),a=t.type==="rect",o=[],s=(e[2].x-e[1].x)/2,l=t.isTransposed?s*n/i:s*i/n;return r==="round"?(a?(o.push(["M",e[0].x,e[0].y+l]),o.push(["L",e[1].x,e[1].y-l]),o.push(["A",s,s,0,0,1,e[2].x,e[2].y-l]),o.push(["L",e[3].x,e[3].y+l]),o.push(["A",s,s,0,0,1,e[0].x,e[0].y+l])):(o.push(["M",e[0].x,e[0].y]),o.push(["L",e[1].x,e[1].y]),o.push(["A",s,s,0,0,1,e[2].x,e[2].y]),o.push(["L",e[3].x,e[3].y]),o.push(["A",s,s,0,0,1,e[0].x,e[0].y])),o.push(["z"])):o=Bo(e),o}function ec(e,r,t){var i=[];return(0,h.isNil)(r)?t?i.push(["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["L",(e[2].x+e[3].x)/2,(e[2].y+e[3].y)/2],["Z"]):i.push(["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["L",e[2].x,e[2].y],["L",e[3].x,e[3].y],["Z"]):i.push(["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["L",r[1].x,r[1].y],["L",r[0].x,r[0].y],["Z"]),i}function en(e,r){return[r,e]}function Z0(e,r,t){var i,n,a,o,s,l,u,c=(0,g.__read)((0,g.__spreadArray)([],(0,g.__read)(e),!1),4),f=c[0],v=c[1],d=c[2],p=c[3],y=(0,g.__read)(typeof t=="number"?Array(4).fill(t):t,4),m=y[0],x=y[1],_=y[2],w=y[3];r.isTransposed&&(i=(0,g.__read)(en(v,p),2),v=i[0],p=i[1]),r.isReflect("y")&&(n=(0,g.__read)(en(f,v),2),f=n[0],v=n[1],a=(0,g.__read)(en(d,p),2),d=a[0],p=a[1]),r.isReflect("x")&&(o=(0,g.__read)(en(f,p),2),f=o[0],p=o[1],s=(0,g.__read)(en(v,d),2),v=s[0],d=s[1]);var b=[],S=function(C){return Math.abs(C)};return l=(0,g.__read)(Ju([m,x,_,w],Math.min(S(p.x-f.x),S(v.y-f.y))).map(function(C){return S(C)}),4),m=l[0],x=l[1],_=l[2],w=l[3],r.isTransposed&&(u=(0,g.__read)([w,m,x,_],4),m=u[0],x=u[1],_=u[2],w=u[3]),f.y<v.y?(b.push(["M",p.x,p.y+_]),_!==0&&b.push(["A",_,_,0,0,0,p.x-_,p.y]),b.push(["L",f.x+w,f.y]),w!==0&&b.push(["A",w,w,0,0,0,f.x,f.y+w]),b.push(["L",v.x,v.y-m]),m!==0&&b.push(["A",m,m,0,0,0,v.x+m,v.y]),b.push(["L",d.x-x,d.y]),x!==0&&b.push(["A",x,x,0,0,0,d.x,d.y-x]),b.push(["L",p.x,p.y+_]),b.push(["z"])):p.x<f.x?(b.push(["M",d.x+x,d.y]),x!==0&&b.push(["A",x,x,0,0,0,d.x,d.y+x]),b.push(["L",p.x,p.y-_]),_!==0&&b.push(["A",_,_,0,0,0,p.x+_,p.y]),b.push(["L",f.x-w,f.y]),w!==0&&b.push(["A",w,w,0,0,0,f.x,f.y-w]),b.push(["L",v.x,v.y+m]),m!==0&&b.push(["A",m,m,0,0,0,v.x-m,v.y]),b.push(["L",d.x+x,d.y]),b.push(["z"])):(b.push(["M",v.x,v.y+m]),m!==0&&b.push(["A",m,m,0,0,1,v.x+m,v.y]),b.push(["L",d.x-x,d.y]),x!==0&&b.push(["A",x,x,0,0,1,d.x,d.y+x]),b.push(["L",p.x,p.y-_]),_!==0&&b.push(["A",_,_,0,0,1,p.x-_,p.y]),b.push(["L",f.x+w,f.y]),w!==0&&b.push(["A",w,w,0,0,1,f.x,f.y-w]),b.push(["L",v.x,v.y+m]),b.push(["z"])),b}var jL=Sr("interval",{defaultShapeType:"rect",getDefaultPoints:function(e){return Do(e)}});Zt("interval","rect",{draw:function(e,r){var t=fe(e,!1,!0),i=r,n=e==null?void 0:e.background;if(n){i=r.addGroup({name:"interval-group"});var a=Zu(e),o=tc(e,this.parsePoints(e.points),this.coordinate);i.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},a),{path:o}),capture:!1,zIndex:-1,name:Mo})}var s;t.radius&&this.coordinate.isRect?s=Z0(this.parsePoints(e.points),this.coordinate,t.radius):s=this.parsePath(j0(e.points,t.lineCap,this.coordinate));var l=i.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:s}),name:"interval"});return n?i:l},getMarker:function(e){var r=e.color,t=e.isInPolar;return t?{symbol:"circle",style:{r:4.5,fill:r}}:{symbol:"square",style:{r:4,fill:r}}}});var ZL=null;function q0(e,r){var t=e.length,i=e;(0,h.isString)(i[0])&&(i=e.map(function(s){return r.translate(s)}));for(var n=i[1]-i[0],a=2;a<t;a++){var o=i[a]-i[a-1];n>o&&(n=o)}return n}function K0(e,r){if(r){var t=(0,h.flatten)(e),i=(0,h.valuesOfKey)(t,r);return i.length}return e.length}function Ro(e){var r=e.theme,t=e.coordinate,i=e.getXScale(),n=i.values,a=e.beforeMappingData,o=n.length,s=Ui(e.coordinate),l=e.intervalPadding,u=e.dodgePadding,c=e.maxColumnWidth||r.maxColumnWidth,f=e.minColumnWidth||r.minColumnWidth,v=e.columnWidthRatio||r.columnWidthRatio,d=e.multiplePieWidthRatio||r.multiplePieWidthRatio,p=e.roseWidthRatio||r.roseWidthRatio;if(i.isLinear&&n.length>1){n.sort();var y=q0(n,i);o=(i.max-i.min)/y,n.length>o&&(o=n.length)}var m=i.range,x=1/o,_=1;if(t.isPolar?t.isTransposed&&o>1?_=d:_=p:(i.isLinear&&(x*=m[1]-m[0]),_=v),!(0,h.isNil)(l)&&l>=0){var w=l/s;x=(1-(o-1)*w)/o}else x*=_;if(e.getAdjust("dodge")){var b=e.getAdjust("dodge"),S=b.dodgeBy,C=K0(a,S);if(!(0,h.isNil)(u)&&u>=0){var A=u/s;x=(x-A*(C-1))/C}else!(0,h.isNil)(l)&&l>=0&&(x*=_),x=x/C;x=x>=0?x:0}if(!(0,h.isNil)(c)&&c>=0){var F=c/s;x>F&&(x=F)}if(!(0,h.isNil)(f)&&f>=0){var P=f/s;x<P&&(x=P)}return x}var $0=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.type="interval",i.shapeType="interval",i.generatePoints=!0;var n=t.background;return i.background=n,i}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n,a=this.getAttribute("size");if(a){n=this.getAttributeValues(a,t)[0];var o=this.coordinate,s=Ui(o);n=n/s}else this.defaultSize||(this.defaultSize=Ro(this)),n=this.defaultSize;return i.size=n,i},r.prototype.adjustScale=function(){e.prototype.adjustScale.call(this);var t=this.getYScale();if(this.coordinate.type==="theta")t.change({nice:!1,min:0,max:ny(t)});else{var i=this.scaleDefs,n=t.field,a=t.min,o=t.max,s=t.type;s!=="time"&&(a>0&&!(0,h.get)(i,[n,"min"])&&t.change({min:0}),o<=0&&!(0,h.get)(i,[n,"max"])&&t.change({max:0}))}},r.prototype.getDrawCfg=function(t){var i=e.prototype.getDrawCfg.call(this,t);return i.background=this.background,i},r}(Cr),Q0=$0,J0=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;i.type="line";var n=t.sortable,a=n===void 0?!1:n;return i.sortable=a,i}return r}(ko),tm=J0,rc=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"],em=["cross","tick","plus","hyphen","line"];function No(e,r,t,i,n){var a,o,s=fe(r,n,!n,"r"),l=e.parsePoints(r.points),u=l[0];if(r.isStack)u=l[1];else if(l.length>1){var c=t.addGroup();try{for(var f=(0,g.__values)(l),v=f.next();!v.done;v=f.next()){var d=v.value;c.addShape({type:"marker",attrs:(0,g.__assign)((0,g.__assign)((0,g.__assign)({},s),{symbol:Gr[i]||i}),d)})}}catch(p){a={error:p}}finally{try{v&&!v.done&&(o=f.return)&&o.call(f)}finally{if(a)throw a.error}}return c}return t.addShape({type:"marker",attrs:(0,g.__assign)((0,g.__assign)((0,g.__assign)({},s),{symbol:Gr[i]||i}),u)})}var qL=Sr("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(e){return Oo(e)}});(0,h.each)(rc,function(e){Zt("point","hollow-".concat(e),{draw:function(r,t){return No(this,r,t,e,!0)},getMarker:function(r){var t=r.color;return{symbol:Gr[e]||e,style:{r:4.5,stroke:t,fill:null}}}})});var KL=null,rm=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="point",t.shapeType="point",t.generatePoints=!0,t}return r.prototype.getDrawCfg=function(t){var i=e.prototype.getDrawCfg.call(this,t);return(0,g.__assign)((0,g.__assign)({},i),{isStack:!!this.getAdjust("stack")})},r}(Cr),im=rm;function nm(e){for(var r=e[0],t=1,i=[["M",r.x,r.y]];t<e.length;){var n=e[t];(n.x!==e[t-1].x||n.y!==e[t-1].y)&&(i.push(["L",n.x,n.y]),n.x===r.x&&n.y===r.y&&t<e.length-1&&(r=e[t+1],i.push(["Z"]),i.push(["M",r.x,r.y]),t++)),t++}return(0,h.isEqual)((0,h.last)(i),r)||i.push(["L",r.x,r.y]),i.push(["Z"]),i}var $L=Sr("polygon",{defaultShapeType:"polygon",getDefaultPoints:function(e){var r=[];return(0,h.each)(e.x,function(t,i){var n=e.y[i];r.push({x:t,y:n})}),r}});Zt("polygon","polygon",{draw:function(e,r){if(!(0,h.isEmpty)(e.points)){var t=fe(e,!0,!0),i=this.parsePath(nm(e.points));return r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:i}),name:"polygon"})}},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}});var QL=null,am=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="polygon",t.shapeType="polygon",t.generatePoints=!0,t}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n=i.x,a=i.y,o;if(!((0,h.isArray)(n)&&(0,h.isArray)(a))){var s=this.getXScale(),l=this.getYScale(),u=s.values.length,c=l.values.length,f=.5*1/u,v=.5*1/c;s.isCategory&&l.isCategory?(n=[n-f,n-f,n+f,n+f],a=[a-v,a+v,a+v,a-v]):(0,h.isArray)(n)?(o=n,n=[o[0],o[0],o[1],o[1]],a=[a-v/2,a+v/2,a+v/2,a-v/2]):(0,h.isArray)(a)&&(o=a,a=[o[0],o[1],o[1],o[0]],n=[n-f/2,n-f/2,n+f/2,n+f/2]),i.x=n,i.y=a}return i},r}(Cr),om=am,JL=Sr("schema",{defaultShapeType:""}),tI=null,sm=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="schema",t.shapeType="schema",t.generatePoints=!0,t}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n,a=this.getAttribute("size");if(a){n=this.getAttributeValues(a,t)[0];var o=this.coordinate,s=Ui(o);n=n/s}else this.defaultSize||(this.defaultSize=Ro(this)),n=this.defaultSize;return i.size=n,i},r}(Cr),lm=sm;function um(e){if(!(0,h.isArray)(e))return[];var r=(0,h.max)(e);return(0,h.map)(e,function(t){return t/r})}var eI=Sr("violin",{defaultShapeType:"violin",getDefaultPoints:function(e){var r=e.size/2,t=[],i=um(e._size);return(0,h.each)(e.y,function(n,a){var o=i[a]*r,s=a===0,l=a===e.y.length-1;t.push({isMin:s,isMax:l,x:e.x-o,y:n}),t.unshift({isMin:s,isMax:l,x:e.x+o,y:n})}),t}});Zt("violin","violin",{draw:function(e,r){var t=fe(e,!0,!0),i=this.parsePath(Uu(e.points));return r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:i}),name:"violin"})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4,fill:r}}}});var rI=null,cm=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="violin",t.shapeType="violin",t.generatePoints=!0,t}return r.prototype.createShapePointsCfg=function(t){var i=e.prototype.createShapePointsCfg.call(this,t),n,a=this.getAttribute("size");if(a){n=this.getAttributeValues(a,t)[0];var o=this.coordinate,s=Ui(o);n=n/s}else this.defaultSize||(this.defaultSize=Ro(this)),n=this.defaultSize;return i.size=n,i._size=(0,h.get)(t[rt],[this._sizeField]),i},r.prototype.initAttributes=function(){var t=this.attributeOption,i=t.size?t.size.fields[0]:this._sizeField?this._sizeField:"size";this._sizeField=i,delete t.size,e.prototype.initAttributes.call(this)},r}(Cr),hm=cm;Zt("area","line",{draw:function(e,r){var t=ta(e,!0,!1,this),i=r.addShape({type:"path",attrs:t,name:"area"});return i},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,stroke:r,fill:null}}}}),Zt("area","smooth",{draw:function(e,r){var t=this.coordinate,i=ta(e,!1,!0,this,Qu(t)),n=r.addShape({type:"path",attrs:i,name:"area"});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,fill:r,fillOpacity:1}}}}),Zt("area","smooth-line",{draw:function(e,r){var t=this.coordinate,i=ta(e,!0,!0,this,Qu(t)),n=r.addShape({type:"path",attrs:i,name:"area"});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return n===void 0&&(n=5.5),[["M",t-n,i-4],["L",t+n,i-4],["L",t+n,i+4],["L",t-n,i+4],["Z"]]},style:{r:5,stroke:r,fill:null}}}});function zo(e,r){return["C",e.x*1/2+r.x*1/2,e.y,e.x*1/2+r.x*1/2,r.y,r.x,r.y]}function Vo(e,r){var t=[];t.push({x:r.x,y:r.y}),t.push(e);var i=["Q"];return(0,h.each)(t,function(n){i.push(n.x,n.y)}),i}function fm(e,r,t){var i=Vo(r,t),n=[["M",e.x,e.y]];return n.push(i),n}function vm(e,r){var t=Vo(e[1],r),i=Vo(e[3],r),n=[["M",e[0].x,e[0].y]];return n.push(i),n.push(["L",e[3].x,e[3].y]),n.push(["L",e[2].x,e[2].y]),n.push(t),n.push(["L",e[1].x,e[1].y]),n.push(["L",e[0].x,e[0].y]),n.push(["Z"]),n}Zt("edge","arc",{draw:function(e,r){var t=fe(e,!0,!1,"lineWidth"),i=e.points,n=i.length>2?"weight":"normal",a;if(e.isInCircle){var o={x:0,y:1};return n==="normal"?a=fm(i[0],i[1],o):(t.fill=t.stroke,a=vm(i,o)),a=this.parsePath(a),r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:a})})}else{if(n==="normal")return i=this.parsePoints(i),a=Hl((i[1].x+i[0].x)/2,i[0].y,Math.abs(i[1].x-i[0].x)/2,Math.PI,Math.PI*2),r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:a})});var s=zo(i[1],i[3]),l=zo(i[2],i[0]);return a=[["M",i[0].x,i[0].y],["L",i[1].x,i[1].y],s,["L",i[3].x,i[3].y],["L",i[2].x,i[2].y],l,["Z"]],a=this.parsePath(a),t.fill=t.stroke,r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:a})})}},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});function dm(e,r){var t=zo(e,r),i=[["M",e.x,e.y]];return i.push(t),i}Zt("edge","smooth",{draw:function(e,r){var t=fe(e,!0,!1,"lineWidth"),i=e.points,n=this.parsePath(dm(i[0],i[1]));return r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:n})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});var ea=1/3;function gm(e,r){var t=[];t.push({x:e.x,y:e.y*(1-ea)+r.y*ea}),t.push({x:r.x,y:e.y*(1-ea)+r.y*ea}),t.push(r);var i=[["M",e.x,e.y]];return(0,h.each)(t,function(n){i.push(["L",n.x,n.y])}),i}Zt("edge","vhv",{draw:function(e,r){var t=fe(e,!0,!1,"lineWidth"),i=e.points,n=this.parsePath(gm(i[0],i[1]));return r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:n})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}}),Zt("interval","funnel",{getPoints:function(e){return e.size=e.size*2,Do(e)},draw:function(e,r){var t=fe(e,!1,!0),i=this.parsePath(ec(e.points,e.nextPoints,!1)),n=r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:i}),name:"interval"});return n},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}}),Zt("interval","hollow-rect",{draw:function(e,r){var t=fe(e,!0,!1),i=r,n=e==null?void 0:e.background;if(n){i=r.addGroup();var a=Zu(e),o=tc(e,this.parsePoints(e.points),this.coordinate);i.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},a),{path:o}),capture:!1,zIndex:-1,name:Mo})}var s=this.parsePath(Bo(e.points)),l=i.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:s}),name:"interval"});return n?i:l},getMarker:function(e){var r=e.color,t=e.isInPolar;return t?{symbol:"circle",style:{r:4.5,stroke:r,fill:null}}:{symbol:"square",style:{r:4,stroke:r,fill:null}}}});function pm(e){var r=e.x,t=e.y,i=e.y0;return(0,h.isArray)(t)?t.map(function(n,a){return{x:(0,h.isArray)(r)?r[a]:r,y:n}}):[{x:r,y:i},{x:r,y:t}]}Zt("interval","line",{getPoints:function(e){return pm(e)},draw:function(e,r){var t=fe(e,!0,!1,"lineWidth"),i=Oe((0,g.__assign)({},t),["fill"]),n=this.parsePath(Bo(e.points,!1)),a=r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},i),{path:n}),name:"interval"});return a},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return[["M",t,i-n],["L",t,i+n]]},style:{r:5,stroke:r}}}}),Zt("interval","pyramid",{getPoints:function(e){return e.size=e.size*2,Do(e)},draw:function(e,r){var t=fe(e,!1,!0),i=this.parsePath(ec(e.points,e.nextPoints,!0)),n=r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:i}),name:"interval"});return n},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}});function ym(e){var r,t=e.x,i=e.y,n=e.y0,a=e.size,o,s;(0,h.isArray)(i)?(r=(0,g.__read)(i,2),o=r[0],s=r[1]):(o=n,s=i);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 mm(e){return[["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["M",e[2].x,e[2].y],["L",e[3].x,e[3].y],["M",e[4].x,e[4].y],["L",e[5].x,e[5].y]]}Zt("interval","tick",{getPoints:function(e){return ym(e)},draw:function(e,r){var t=fe(e,!0,!1),i=this.parsePath(mm(e.points)),n=r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:i}),name:"interval"});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){return[["M",t-n/2,i-n],["L",t+n/2,i-n],["M",t,i-n],["L",t,i+n],["M",t-n/2,i+n],["L",t+n/2,i+n]]},style:{r:5,stroke:r}}}});var xm=function(e,r,t){var i=e.x,n=e.y,a=r.x,o=r.y,s;switch(t){case"hv":s=[{x:a,y:n}];break;case"vh":s=[{x:i,y:o}];break;case"hvh":var l=(a+i)/2;s=[{x:l,y:n},{x:l,y:o}];break;case"vhv":var u=(n+o)/2;s=[{x:i,y:u},{x:a,y:u}];break;default:break}return s};function _m(e,r){var t=[];return(0,h.each)(e,function(i,n){var a=e[n+1];if(t.push(i),a){var o=xm(i,a,r);t=t.concat(o)}}),t}function wm(e){return e.map(function(r,t){return t===0?["M",r.x,r.y]:["L",r.x,r.y]})}function bm(e,r){var t=Jn(e.points,e.connectNulls,e.showSinglePoint),i=[];return(0,h.each)(t,function(n){var a=_m(n,r);i=i.concat(wm(a))}),(0,g.__assign)((0,g.__assign)({},fe(e,!0,!1,"lineWidth")),{path:i})}(0,h.each)(["hv","vh","hvh","vhv"],function(e){Zt("line",e,{draw:function(r,t){var i=bm(r,e),n=t.addShape({type:"path",attrs:i,name:"line"});return n},getMarker:function(r){return qu(r,e)}})}),(0,h.each)(em,function(e){Zt("point",e,{draw:function(r,t){return No(this,r,t,e,!0)},getMarker:function(r){var t=r.color;return{symbol:Gr[e],style:{r:4.5,stroke:t,fill:null}}}})}),Zt("point","image",{draw:function(e,r){var t,i,n=fe(e,!1,!1,"r").r,a=this.parsePoints(e.points),o=a[0];if(e.isStack)o=a[1];else if(a.length>1){var s=r.addGroup();try{for(var l=(0,g.__values)(a),u=l.next();!u.done;u=l.next()){var c=u.value;s.addShape("image",{attrs:{x:c.x-n/2,y:c.y-n,width:n,height:n,img:e.shape[1]}})}}catch(f){t={error:f}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(t)throw t.error}}return s}return r.addShape("image",{attrs:{x:o.x-n/2,y:o.y-n,width:n,height:n,img:e.shape[1]}})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4.5,fill:r}}}}),(0,h.each)(rc,function(e){Zt("point",e,{draw:function(r,t){return No(this,r,t,e,!1)},getMarker:function(r){var t=r.color;return{symbol:Gr[e]||e,style:{r:4.5,fill:t}}}})});function ic(e){var r=(0,h.isArray)(e)?e:[e],t=r[0],i=r[r.length-1],n=r.length>1?r[1]:t,a=r.length>3?r[3]:i,o=r.length>2?r[2]:n;return{min:t,max:i,min1:n,max1:a,median:o}}function nc(e,r,t){var i=t/2,n;if((0,h.isArray)(r)){var a=ic(r),o=a.min,s=a.max,l=a.median,u=a.min1,c=a.max1,f=e-i,v=e+i;n=[[f,s],[v,s],[e,s],[e,c],[f,u],[f,c],[v,c],[v,u],[e,u],[e,o],[f,o],[v,o],[f,l],[v,l]]}else{r=(0,h.isNil)(r)?.5:r;var d=ic(e),o=d.min,s=d.max,l=d.median,u=d.min1,c=d.max1,p=r-i,y=r+i;n=[[o,p],[o,y],[o,r],[u,r],[u,p],[u,y],[c,y],[c,p],[c,r],[s,r],[s,p],[s,y],[l,p],[l,y]]}return n.map(function(m){return{x:m[0],y:m[1]}})}function Sm(e){return[["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["M",e[2].x,e[2].y],["L",e[3].x,e[3].y],["M",e[4].x,e[4].y],["L",e[5].x,e[5].y],["L",e[6].x,e[6].y],["L",e[7].x,e[7].y],["L",e[4].x,e[4].y],["Z"],["M",e[8].x,e[8].y],["L",e[9].x,e[9].y],["M",e[10].x,e[10].y],["L",e[11].x,e[11].y],["M",e[12].x,e[12].y],["L",e[13].x,e[13].y]]}Zt("schema","box",{getPoints:function(e){var r=e.x,t=e.y,i=e.size;return nc(r,t,i)},draw:function(e,r){var t=fe(e,!0,!1),i=this.parsePath(Sm(e.points)),n=r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:i,name:"schema"})});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){var a=[i-6,i-3,i,i+3,i+6],o=nc(t,a,n);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:r}}}});function Cm(e){var r=(0,h.isArray)(e)?e:[e],t=r.sort(function(i,n){return n-i});return qp(t,4,t[t.length-1])}function ac(e,r,t){var i=Cm(r);return[{x:e,y:i[0]},{x:e,y:i[1]},{x:e-t/2,y:i[2]},{x:e-t/2,y:i[1]},{x:e+t/2,y:i[1]},{x:e+t/2,y:i[2]},{x:e,y:i[2]},{x:e,y:i[3]}]}function Am(e){return[["M",e[0].x,e[0].y],["L",e[1].x,e[1].y],["M",e[2].x,e[2].y],["L",e[3].x,e[3].y],["L",e[4].x,e[4].y],["L",e[5].x,e[5].y],["Z"],["M",e[6].x,e[6].y],["L",e[7].x,e[7].y]]}Zt("schema","candle",{getPoints:function(e){var r=e.x,t=e.y,i=e.size;return ac(r,t,i)},draw:function(e,r){var t=fe(e,!0,!0),i=this.parsePath(Am(e.points)),n=r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:i,name:"schema"})});return n},getMarker:function(e){var r=e.color;return{symbol:function(t,i,n){var a=[i+7.5,i+3,i-3,i-7.5],o=ac(t,a,n);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:r,fill:r,r:6}}}});function Mm(e,r){var t=Math.abs(e[0].x-e[2].x),i=Math.abs(e[0].y-e[2].y),n=Math.min(t,i);r&&(n=(0,h.clamp)(r,0,Math.min(t,i))),n=n/2;var a=(e[0].x+e[2].x)/2,o=(e[0].y+e[2].y)/2;return{x:a-n,y:o-n,width:n*2,height:n*2}}Zt("polygon","square",{draw:function(e,r){if(!(0,h.isEmpty)(e.points)){var t=fe(e,!0,!0),i=this.parsePoints(e.points);return r.addShape("rect",{attrs:(0,g.__assign)((0,g.__assign)({},t),Mm(i,e.size)),name:"polygon"})}},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}}),Zt("violin","smooth",{draw:function(e,r){var t=fe(e,!0,!0),i=this.parsePath(ju(e.points));return r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:i})})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{stroke:null,r:4,fill:r}}}}),Zt("violin","hollow",{draw:function(e,r){var t=fe(e,!0,!1),i=this.parsePath(Uu(e.points));return r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:i})})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4,fill:null,stroke:r}}}}),Zt("violin","hollow-smooth",{draw:function(e,r){var t=fe(e,!0,!1),i=this.parsePath(ju(e.points));return r.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},t),{path:i})})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4,fill:null,stroke:r}}}});var Fm=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getLabelValueDir=function(t){var i="y",n=t.points;return n[0][i]<=n[2][i]?1:-1},r.prototype.getLabelOffsetPoint=function(t,i,n,a){var o,s=e.prototype.getLabelOffsetPoint.call(this,t,i,n),l=this.getCoordinate(),u=l.isTransposed,c=u?"x":"y",f=this.getLabelValueDir(t.mappingData);return s=(0,g.__assign)((0,g.__assign)({},s),(o={},o[c]=s[c]*f,o)),l.isReflect("x")&&(s=(0,g.__assign)((0,g.__assign)({},s),{x:s.x*-1})),l.isReflect("y")&&(s=(0,g.__assign)((0,g.__assign)({},s),{y:s.y*-1})),s},r.prototype.getThemedLabelCfg=function(t){var i=this.geometry,n=this.getDefaultLabelCfg(),a=i.theme;return(0,h.deepMix)({},n,a.labels,t.position==="middle"?{offset:0}:{},t)},r.prototype.setLabelPosition=function(t,i,n,a){var o=this.getCoordinate(),s=o.isTransposed,l=i.points,u=o.convert(l[0]),c=o.convert(l[2]),f=this.getLabelValueDir(i),v,d,p,y,m=(0,h.isArray)(i.shape)?i.shape[0]:i.shape;if(m==="funnel"||m==="pyramid"){var x=(0,h.get)(i,"nextPoints"),_=(0,h.get)(i,"points");if(x){var w=o.convert(_[0]),b=o.convert(_[1]),S=o.convert(x[0]),C=o.convert(x[1]);s?(v=Math.min(S.y,w.y),p=Math.max(S.y,w.y),d=(b.x+C.x)/2,y=(w.x+S.x)/2):(v=Math.min((b.y+C.y)/2,(w.y+S.y)/2),p=Math.max((b.y+C.y)/2,(w.y+S.y)/2),d=C.x,y=w.x)}else v=Math.min(c.y,u.y),p=Math.max(c.y,u.y),d=c.x,y=u.x}else v=Math.min(c.y,u.y),p=Math.max(c.y,u.y),d=c.x,y=u.x;switch(a){case"right":t.x=d,t.y=(v+p)/2,t.textAlign=(0,h.get)(t,"textAlign",f>0?"left":"right");break;case"left":t.x=y,t.y=(v+p)/2,t.textAlign=(0,h.get)(t,"textAlign",f>0?"left":"right");break;case"bottom":s&&(t.x=(d+y)/2),t.y=p,t.textAlign=(0,h.get)(t,"textAlign","center"),t.textBaseline=(0,h.get)(t,"textBaseline",f>0?"bottom":"top");break;case"middle":s&&(t.x=(d+y)/2),t.y=(v+p)/2,t.textAlign=(0,h.get)(t,"textAlign","center"),t.textBaseline=(0,h.get)(t,"textBaseline","middle");break;case"top":s&&(t.x=(d+y)/2),t.y=v,t.textAlign=(0,h.get)(t,"textAlign","center"),t.textBaseline=(0,h.get)(t,"textBaseline",f>0?"bottom":"top");break;default:break}},r}(Qn),Em=Fm,ra=Math.PI/2,Tm=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getLabelOffset=function(t){var i=this.getCoordinate(),n=0;if((0,h.isNumber)(t))n=t;else if((0,h.isString)(t)&&t.indexOf("%")!==-1){var a=i.getRadius();i.innerRadius>0&&(a=a*(1-i.innerRadius)),n=parseFloat(t)*.01*a}return n},r.prototype.getLabelItems=function(t){var i=e.prototype.getLabelItems.call(this,t),n=this.geometry.getYScale();return(0,h.map)(i,function(a){if(a&&n){var o=n.scale((0,h.get)(a.data,n.field));return(0,g.__assign)((0,g.__assign)({},a),{percent:o})}return a})},r.prototype.getLabelAlign=function(t){var i=this.getCoordinate(),n;if(t.labelEmit)n=t.angle<=Math.PI/2&&t.angle>=-Math.PI/2?"left":"right";else if(!i.isTransposed)n="center";else{var a=i.getCenter(),o=t.offset;Math.abs(t.x-a.x)<1?n="center":t.angle>Math.PI||t.angle<=0?n=o>0?"left":"right":n=o>0?"right":"left"}return n},r.prototype.getLabelPoint=function(t,i,n){var a=1,o,s=t.content[n];this.isToMiddle(i)?o=this.getMiddlePoint(i.points):(t.content.length===1&&n===0?n=1:n===0&&(a=-1),o=this.getArcPoint(i,n));var l=t.offset*a,u=this.getPointAngle(o),c=t.labelEmit,f=this.getCirclePoint(u,l,o,c);return f.r===0?f.content="":(f.content=s,f.angle=u,f.color=i.color),f.rotate=t.autoRotate?this.getLabelRotate(u,l,c):t.rotate,f.start={x:o.x,y:o.y},f},r.prototype.getArcPoint=function(t,i){return i===void 0&&(i=0),!(0,h.isArray)(t.x)&&!(0,h.isArray)(t.y)?{x:t.x,y:t.y}:{x:(0,h.isArray)(t.x)?t.x[i]:t.x,y:(0,h.isArray)(t.y)?t.y[i]:t.y}},r.prototype.getPointAngle=function(t){return ui(this.getCoordinate(),t)},r.prototype.getCirclePoint=function(t,i,n,a){var o=this.getCoordinate(),s=o.getCenter(),l=zn(o,n);if(l===0)return(0,g.__assign)((0,g.__assign)({},s),{r:l});var u=t;if(o.isTransposed&&l>i&&!a){var c=Math.asin(i/(2*l));u=t+c*2}else l=l+i;return{x:s.x+l*Math.cos(u),y:s.y+l*Math.sin(u),r:l}},r.prototype.getLabelRotate=function(t,i,n){var a=t+ra;return n&&(a-=ra),a&&(a>ra?a=a-Math.PI:a<-ra&&(a=a+Math.PI)),a},r.prototype.getMiddlePoint=function(t){var i=this.getCoordinate(),n=t.length,a={x:0,y:0};return(0,h.each)(t,function(o){a.x+=o.x,a.y+=o.y}),a.x/=n,a.y/=n,a=i.convert(a),a},r.prototype.isToMiddle=function(t){return t.x.length>2},r}(Qn),oc=Tm,Lm=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.defaultLayout="distribute",t}return r.prototype.getDefaultLabelCfg=function(t,i){var n=e.prototype.getDefaultLabelCfg.call(this,t,i);return(0,h.deepMix)({},n,(0,h.get)(this.geometry.theme,"pieLabels",{}))},r.prototype.getLabelOffset=function(t){return e.prototype.getLabelOffset.call(this,t)||0},r.prototype.getLabelRotate=function(t,i,n){var a;return i<0&&(a=t,a>Math.PI/2&&(a=a-Math.PI),a<-Math.PI/2&&(a=a+Math.PI)),a},r.prototype.getLabelAlign=function(t){var i=this.getCoordinate(),n=i.getCenter(),a;return t.angle<=Math.PI/2&&t.x>=n.x?a="left":a="right",t.offset<=0&&(a==="right"?a="left":a="right"),a},r.prototype.getArcPoint=function(t){return t},r.prototype.getPointAngle=function(t){var i=this.getCoordinate(),n={x:(0,h.isArray)(t.x)?t.x[0]:t.x,y:t.y[0]},a={x:(0,h.isArray)(t.x)?t.x[1]:t.x,y:t.y[1]},o,s=ui(i,n);if(t.points&&t.points[0].y===t.points[1].y)o=s;else{var l=ui(i,a);s>=l&&(l=l+Math.PI*2),o=s+(l-s)/2}return o},r.prototype.getCirclePoint=function(t,i){var n=this.getCoordinate(),a=n.getCenter(),o=n.getRadius()+i;return(0,g.__assign)((0,g.__assign)({},ge(a.x,a.y,o,t)),{angle:t,r:o})},r}(oc),Im=Lm,sc=4;function Om(e,r,t,i,n,a){var o,s,l=!0,u=i.start,c=i.end,f=Math.min(u.y,c.y),v=Math.abs(u.y-c.y),d,p=0,y=Number.MIN_VALUE,m=r.map(function(A){return A.y>p&&(p=A.y),A.y<y&&(y=A.y),{size:t,targets:[A.y-f]}});for(y-=f,p-f>v&&(v=p-f);l;)for(m.forEach(function(A){var F=(Math.min.apply(y,A.targets)+Math.max.apply(y,A.targets))/2;A.pos=Math.min(Math.max(y,F-A.size/2),v-A.size)}),l=!1,d=m.length;d--;)if(d>0){var x=m[d-1],_=m[d];x.pos+x.size>_.pos&&(x.size+=_.size,x.targets=x.targets.concat(_.targets),x.pos+x.size>v&&(x.pos=v-x.size),m.splice(d,1),l=!0)}d=0,m.forEach(function(A){var F=f+t/2;A.targets.forEach(function(){r[d].y=A.pos+F,F+=t,d++})});var w={};try{for(var b=(0,g.__values)(e),S=b.next();!S.done;S=b.next()){var C=S.value;w[C.get("id")]=C}}catch(A){o={error:A}}finally{try{S&&!S.done&&(s=b.return)&&s.call(b)}finally{if(o)throw o.error}}r.forEach(function(A){var F=A.r*A.r,P=Math.pow(Math.abs(A.y-n.y),2);if(F<P)A.x=n.x;else{var I=Math.sqrt(F-P);a?A.x=n.x+I:A.x=n.x-I}var V=w[A.id];V.attr("x",A.x),V.attr("y",A.y);var Z=(0,h.find)(V.getChildren(),function(vt){return vt.get("type")==="text"});Z&&(Z.attr("y",A.y),Z.attr("x",A.x))})}function Pm(e,r,t,i){if(!(!e.length||!r.length)){var n=e[0]?e[0].offset:0,a=r[0].get("coordinate"),o=a.getRadius(),s=a.getCenter();if(n>0){var l=14,u=o+n,c=u*2+l*2,f={start:a.start,end:a.end},v=[[],[]];e.forEach(function(d){!d||(d.textAlign==="right"?v[0].push(d):v[1].push(d))}),v.forEach(function(d,p){var y=c/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}),Om(r,d,l,f,s,p)})}(0,h.each)(e,function(d){if(d&&d.labelLine){var p=d.offset,y=d.angle,m=ge(s.x,s.y,o,y),x=ge(s.x,s.y,o+p/2,y),_=d.x+(0,h.get)(d,"offsetX",0),w=d.y+(0,h.get)(d,"offsetY",0),b={x:_-Math.cos(y)*sc,y:w-Math.sin(y)*sc};(0,h.isObject)(d.labelLine)||(d.labelLine={}),d.labelLine.path=["M ".concat(m.x),"".concat(m.y," Q").concat(x.x),"".concat(x.y," ").concat(b.x),b.y].join(",")}})}}function lc(e,r,t){var i=e.filter(function(p){return!p.invisible});i.sort(function(p,y){return p.y-y.y});var n=!0,a=t.minY,o=t.maxY,s=Math.abs(a-o),l,u=0,c=Number.MIN_VALUE,f=i.map(function(p){return p.y>u&&(u=p.y),p.y<c&&(c=p.y),{content:p.content,size:r,targets:[p.y-a],pos:null}});for(c-=a,u-a>s&&(s=u-a);n;)for(f.forEach(function(p){var y=(Math.min.apply(c,p.targets)+Math.max.apply(c,p.targets))/2;p.pos=Math.min(Math.max(c,y-p.size/2),s-p.size),p.pos=Math.max(0,p.pos)}),n=!1,l=f.length;l--;)if(l>0){var v=f[l-1],d=f[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),f.splice(l,1),n=!0)}l=0,f.forEach(function(p){var y=a+r/2;p.targets.forEach(function(){i[l].y=p.pos+y,y+=r,l++})})}var uc=4;function km(e,r){var t=r.getCenter(),i=r.getRadius();if(e&&e.labelLine){var n=e.angle,a=e.offset,o=ge(t.x,t.y,i,n),s=e.x+(0,h.get)(e,"offsetX",0)*(Math.cos(n)>0?1:-1),l=e.y+(0,h.get)(e,"offsetY",0)*(Math.sin(n)>0?1:-1),u={x:s-Math.cos(n)*uc,y:l-Math.sin(n)*uc},c=e.labelLine.smooth,f=[],v=u.x-t.x,d=u.y-t.y,p=Math.atan(d/v);if(v<0&&(p+=Math.PI),c===!1){(0,h.isObject)(e.labelLine)||(e.labelLine={});var y=0;(n<0&&n>-Math.PI/2||n>Math.PI*1.5)&&u.y>o.y&&(y=1),n>=0&&n<Math.PI/2&&u.y>o.y&&(y=1),n>=Math.PI/2&&n<Math.PI&&o.y>u.y&&(y=1),(n<-Math.PI/2||n>=Math.PI&&n<Math.PI*1.5)&&o.y>u.y&&(y=1);var m=a/2>4?4:Math.max(a/2-1,0),x=ge(t.x,t.y,i+m,n),_=ge(t.x,t.y,i+a/2,p),w=0;f.push("M ".concat(o.x," ").concat(o.y)),f.push("L ".concat(x.x," ").concat(x.y)),f.push("A ".concat(t.x," ").concat(t.y," 0 ").concat(w," ").concat(y," ").concat(_.x," ").concat(_.y)),f.push("L ".concat(u.x," ").concat(u.y))}else{var x=ge(t.x,t.y,i+(a/2>4?4:Math.max(a/2-1,0)),n),b=o.x<t.x?1:-1;f.push("M ".concat(u.x," ").concat(u.y));var S=(o.y-t.y)/(o.x-t.x),C=(u.y-t.y)/(u.x-t.x);Math.abs(S-C)>Math.pow(Math.E,-16)&&f.push.apply(f,["C",u.x+b*4,u.y,2*x.x-o.x,2*x.y-o.y,o.x,o.y]),f.push("L ".concat(o.x," ").concat(o.y))}e.labelLine.path=f.join(" ")}}function Dm(e,r,t,i){var n,a,o=(0,h.filter)(e,function(F){return!(0,h.isNil)(F)}),s=r[0]&&r[0].get("coordinate");if(!!s){var l=s.getCenter(),u=s.getRadius(),c={};try{for(var f=(0,g.__values)(r),v=f.next();!v.done;v=f.next()){var d=v.value;c[d.get("id")]=d}}catch(F){n={error:F}}finally{try{v&&!v.done&&(a=f.return)&&a.call(f)}finally{if(n)throw n.error}}var p=(0,h.get)(o[0],"labelHeight",14),y=(0,h.get)(o[0],"offset",0);if(!(y<=0)){var m="left",x="right",_=(0,h.groupBy)(o,function(F){return F.x<l.x?m:x}),w=s.start,b=s.end,S=Math.min((u+y+p)*2,s.getHeight()),C=S/2,A={minX:w.x,maxX:b.x,minY:l.y-C,maxY:l.y+C};(0,h.each)(_,function(F,P){var I=Math.floor(S/p);F.length>I&&(F.sort(function(V,Z){return Z.percent-V.percent}),(0,h.each)(F,function(V,Z){Z+1>I&&(c[V.id].set("visible",!1),V.invisible=!0)})),lc(F,p,A)}),(0,h.each)(_,function(F,P){(0,h.each)(F,function(I){var V=P===x,Z=c[I.id],vt=Z.getChildByIndex(0);if(vt){var yt=u+y,Bt=I.y-l.y,G=Math.pow(yt,2),at=Math.pow(Bt,2),mt=G-at>0?G-at:0,ut=Math.sqrt(mt),pt=Math.abs(Math.cos(I.angle)*yt);V?I.x=l.x+Math.max(ut,pt):I.x=l.x-Math.max(ut,pt)}vt&&(vt.attr("y",I.y),vt.attr("x",I.x)),km(I,s)})})}}}var Go=4,Bm=4,cc=4;function Rm(e,r,t){var i=r.getCenter(),n=r.getRadius(),a={x:e.x-(t?cc:-cc),y:e.y},o=ge(i.x,i.y,n+Go,e.angle),s={x:a.x,y:a.y},l={x:o.x,y:o.y},u=ge(i.x,i.y,n,e.angle),c="";if(a.y!==o.y){var f=t?4:-4;s.y=a.y,e.angle<0&&e.angle>=-Math.PI/2&&(s.x=Math.max(o.x,a.x-f),a.y<o.y?l.y=s.y:(l.y=o.y,l.x=Math.max(l.x,s.x-f))),e.angle>0&&e.angle<Math.PI/2&&(s.x=Math.max(o.x,a.x-f),a.y>o.y?l.y=s.y:(l.y=o.y,l.x=Math.max(l.x,s.x-f))),e.angle>Math.PI/2&&(s.x=Math.min(o.x,a.x-f),a.y>o.y?l.y=s.y:(l.y=o.y,l.x=Math.min(l.x,s.x-f))),e.angle<-Math.PI/2&&(s.x=Math.min(o.x,a.x-f),a.y<o.y?l.y=s.y:(l.y=o.y,l.x=Math.min(l.x,s.x-f)))}c=["M ".concat(a.x,",").concat(a.y),"L ".concat(s.x,",").concat(s.y),"L ".concat(l.x,",").concat(l.y),"L ".concat(o.x,",").concat(o.y),"L ".concat(u.x,",").concat(u.y)].join(" "),e.labelLine=(0,h.deepMix)({},e.labelLine,{path:c})}function Nm(e,r,t,i){var n,a,o=r[0]&&r[0].get("coordinate");if(!!o){var s=o.getCenter(),l=o.getRadius(),u={};try{for(var c=(0,g.__values)(r),f=c.next();!f.done;f=c.next()){var v=f.value;u[v.get("id")]=v}}catch(F){n={error:F}}finally{try{f&&!f.done&&(a=c.return)&&a.call(c)}finally{if(n)throw n.error}}var d=(0,h.get)(e[0],"labelHeight",14),p=Math.max((0,h.get)(e[0],"offset",0),Go);(0,h.each)(e,function(F){if(!!F){var P=(0,h.get)(u,[F.id]);if(!!P){var I=F.x>s.x||F.x===s.x&&F.y>s.y,V=(0,h.isNil)(F.offsetX)?Bm:F.offsetX,Z=ge(s.x,s.y,l+Go,F.angle),vt=p+V;F.x=s.x+(I?1:-1)*(l+vt),F.y=Z.y}}});var y=o.start,m=o.end,x="left",_="right",w=(0,h.groupBy)(e,function(F){return F.x<s.x?x:_}),b=(l+p)*2+d;(0,h.each)(w,function(F){var P=F.length*d;P>b&&(b=Math.min(P,Math.abs(y.y-m.y)))});var S={minX:y.x,maxX:m.x,minY:s.y-b/2,maxY:s.y+b/2};(0,h.each)(w,function(F,P){var I=b/d;F.length>I&&(F.sort(function(V,Z){return Z.percent-V.percent}),(0,h.each)(F,function(V,Z){Z>I&&(u[V.id].set("visible",!1),V.invisible=!0)})),lc(F,d,S)});var C=S.minY,A=S.maxY;(0,h.each)(w,function(F,P){var I=P===_;(0,h.each)(F,function(V){var Z=(0,h.get)(u,V&&[V.id]);if(!!Z){if(V.y<C||V.y>A){Z.set("visible",!1);return}var vt=Z.getChildByIndex(0),yt=vt.getCanvasBBox(),Bt={x:I?yt.x:yt.maxX,y:yt.y+yt.height/2};tn(vt,V.x-Bt.x,V.y-Bt.y),V.labelLine&&Rm(V,o,I)}})})}}function zm(e,r,t,i){(0,h.each)(r,function(n){var a=i.minX,o=i.minY,s=i.maxX,l=i.maxY,u=n.getCanvasBBox(),c=u.minX,f=u.minY,v=u.maxX,d=u.maxY,p=u.x,y=u.y,m=u.width,x=u.height,_=p,w=y;(c<a||v<a)&&(_=a),(f<o||d<o)&&(w=o),c>s?_=s-m:v>s&&(_=_-(v-s)),f>l?w=l-x:d>l&&(w=w-(d-l)),(_!==p||w!==y)&&tn(n,_-p,w-y)})}function Vm(e,r,t,i){(0,h.each)(r,function(n,a){var o=n.getCanvasBBox(),s=t[a].getBBox();(o.minX<s.minX||o.minY<s.minY||o.maxX>s.maxX||o.maxY>s.maxY)&&n.remove(!0)})}var Gm=100,hc=function(){function e(r){r===void 0&&(r={}),this.bitmap={};var t=r.xGap,i=t===void 0?1:t,n=r.yGap,a=n===void 0?8:n;this.xGap=i,this.yGap=a}return e.prototype.hasGap=function(r){for(var t=!0,i=this.bitmap,n=Math.round(r.minX),a=Math.round(r.maxX),o=Math.round(r.minY),s=Math.round(r.maxY),l=n;l<=a;l+=1){if(!i[l]){i[l]={};continue}if(l===n||l===a){for(var u=o;u<=s;u++)if(i[l][u]){t=!1;break}}else if(i[l][o]||i[l][s]){t=!1;break}}return t},e.prototype.fillGap=function(r){for(var t=this.bitmap,i=Math.round(r.minX),n=Math.round(r.maxX),a=Math.round(r.minY),o=Math.round(r.maxY),s=i;s<=n;s+=1)t[s]||(t[s]={});for(var s=i;s<=n;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[i][s]=!0,t[n][s]=!0;if(this.xGap!==1)for(var s=i;s<=n;s+=1)t[s][a]=!0,t[s][o]=!0},e.prototype.destroy=function(){this.bitmap={}},e}();function Wm(e,r,t){t===void 0&&(t=Gm);var i=-1,n=e.attr(),a=n.x,o=n.y,s=e.getCanvasBBox(),l=Math.sqrt(s.width*s.width+s.height*s.height),u,c=-i,f=0,v=0,d=function(x){var _=x*.1;return[_*Math.cos(_),_*Math.sin(_)]};if(r.hasGap(s))return r.fillGap(s),!0;for(var p=!1,y=0,m={};Math.min(Math.abs(f),Math.abs(v))<l&&y<t;)if(u=d(c+=i),f=~~u[0],v=~~u[1],!(!f&&!v||m["".concat(f,"-").concat(v)])&&(e.attr({x:a+f,y:o+v}),f+v<0&&e.attr("textAlign","right"),y++,r.hasGap(e.getCanvasBBox()))){r.fillGap(e.getCanvasBBox()),p=!0,m["".concat(f,"-").concat(v)]=!0;break}return p}function Hm(e,r,t,i){var n=e.getCanvasBBox(),a=n.width,o=n.height,s={x:r,y:t,textAlign:"center"};switch(i){case 0:s.y-=o+1,s.x+=1,s.textAlign="left";break;case 1:s.y-=o+1,s.x-=1,s.textAlign="right";break;case 2:s.y+=o+1,s.x-=1,s.textAlign="right";break;case 3:s.y+=o+1,s.x+=1,s.textAlign="left";break;case 5:s.y-=o*2+2;break;case 6:s.y+=o*2+2;break;case 7:s.x+=a+1,s.textAlign="left";break;case 8:s.x-=a+1,s.textAlign="right";break;default:break}return e.attr(s),e.getCanvasBBox()}function Ym(e,r,t,i){var n=new hc;(0,h.each)(r,function(a){var o=a.find(function(s){return s.get("type")==="text"});Wm(o,n)||a.remove(!0)}),n.destroy()}function Xm(e,r,t,i){var n=new hc;(0,h.each)(r,function(a){for(var o=a.find(function(d){return d.get("type")==="text"}),s=o.attr(),l=s.x,u=s.y,c=!1,f=0;f<=8;f++){var v=Hm(o,l,u,f);if(n.hasGap(v)){n.fillGap(v),c=!0;break}}c||a.remove(!0)}),n.destroy()}function Um(e,r){return(e[0]||0)*(r[0]||0)+(e[1]||0)*(r[1]||0)+(e[2]||0)*(r[2]||0)}function fc(e){if(e.length>4)return[];var r=function(n,a){return[a.x-n.x,a.y-n.y]},t=r(e[0],e[1]),i=r(e[1],e[2]);return[t,i]}function ia(e,r,t){r===void 0&&(r=0),t===void 0&&(t={x:0,y:0});var i=e.x,n=e.y;return{x:(i-t.x)*Math.cos(-r)+(n-t.y)*Math.sin(-r)+t.x,y:(t.x-i)*Math.sin(-r)+(n-t.y)*Math.cos(-r)+t.y}}function vc(e){var r=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],t=e.rotation;return t?[ia(r[0],t,r[0]),ia(r[1],t,r[0]),ia(r[2],t,r[0]),ia(r[3],t,r[0])]:r}function dc(e,r){if(e.length>4)return{min:0,max:0};var t=[];return e.forEach(function(i){t.push(Um([i.x,i.y],r))}),{min:Math.min.apply(Math,(0,g.__spreadArray)([],(0,g.__read)(t),!1)),max:Math.max.apply(Math,(0,g.__spreadArray)([],(0,g.__read)(t),!1))}}function jm(e,r){return e.max>r.min&&e.min<r.max}function Zm(e){return typeof e=="number"&&!Number.isNaN(e)&&e!==Infinity&&e!==-Infinity}function gc(e){return["x","y","width","height"].every(function(r){return Zm(e[r])})}function qm(e,r,t){return t===void 0&&(t=0),!(r.x>e.x+e.width+t||r.x+r.width<e.x-t||r.y>e.y+e.height+t||r.y+r.height<e.y-t)}function Km(e,r,t){if(t===void 0&&(t=0),!gc(e)||!gc(r))return!1;if(!e.rotation&&!r.rotation)return qm(e,r,t);for(var i=vc(e),n=vc(r),a=fc(i).concat(fc(n)),o=0;o<a.length;o++){var s=a[o],l=dc(i,s),u=dc(n,s);if(!jm(l,u))return!1}return!0}var $m=function(){function e(r){var t=this;this.queue=[],this.worker=new Worker(r),this.worker.onmessage=function(i){var n;(n=t.queue.shift())===null||n===void 0||n.resolve(i)},this.worker.onmessageerror=function(i){var n;console.warn("[AntV G2] Web worker is not available"),(n=t.queue.shift())===null||n===void 0||n.reject(i)}}return e.prototype.post=function(r,t){var i=this;return new Promise(function(n,a){i.queue.push({resolve:n,reject:a});try{i.worker.postMessage(r)}catch(o){console.warn("[AntV G2] Web worker is not available"),(0,h.isFunction)(t)&&t()}})},e.prototype.destroy=function(){this.worker.terminate()},e}();function Qm(e){if(typeof window!="undefined"){var r;try{r=new Blob([e.toString()],{type:"application/javascript"})}catch(t){r=new window.BlobBuilder,r.append(e.toString()),r=r.getBlob()}return new $m(URL.createObjectURL(r))}}var Jm=function(e){function r(){function u(w,b){return(w[0]||0)*(b[0]||0)+(w[1]||0)*(b[1]||0)+(w[2]||0)*(b[2]||0)}function c(w){if(w.length>4)return[];var b=function(A,F){return[F.x-A.x,F.y-A.y]},S=b(w[0],w[1]),C=b(w[1],w[2]);return[S,C]}function f(w,b,S){b===void 0&&(b=0),S===void 0&&(S={x:0,y:0});var C=w.x,A=w.y;return{x:(C-S.x)*Math.cos(-b)+(A-S.y)*Math.sin(-b)+S.x,y:(S.x-C)*Math.sin(-b)+(A-S.y)*Math.cos(-b)+S.y}}function v(w){var b=[{x:w.x,y:w.y},{x:w.x+w.width,y:w.y},{x:w.x+w.width,y:w.y+w.height},{x:w.x,y:w.y+w.height}],S=w.rotation;return S?[f(b[0],S,b[0]),f(b[1],S,b[0]),f(b[2],S,b[0]),f(b[3],S,b[0])]:b}function d(w,b){if(w.length>4)return{min:0,max:0};var S=[];return w.forEach(function(C){S.push(u([C.x,C.y],b))}),{min:Math.min.apply(null,S),max:Math.max.apply(null,S)}}function p(w,b){return w.max>b.min&&w.min<b.max}function y(w){return typeof w=="number"&&!Number.isNaN(w)&&w!==Infinity&&w!==-Infinity}function m(w){return["x","y","width","height"].every(function(b){return y(w[b])})}function x(w,b,S){return S===void 0&&(S=0),!(b.x>w.x+w.width+S||b.x+b.width<w.x-S||b.y>w.y+w.height+S||b.y+b.height<w.y-S)}function _(w,b,S){if(S===void 0&&(S=0),!m(w)||!m(b))return!1;if(!w.rotation&&!b.rotation)return x(w,b,S);for(var C=v(w),A=v(b),F=c(C).concat(c(A)),P=0;P<F.length;P++){var I=F[P],V=d(C,I),Z=d(A,I);if(!p(V,Z))return!1}return!0}return{intersect:_}}var t=r().intersect;function i(u){for(var c=u.slice(),f=0;f<c.length;f++){var v=c[f];if(v.visible)for(var d=f+1;d<c.length;d++){var p=c[d];v!==p&&p.visible&&t(v,p)&&(p.visible=!1)}}return c}var n={"hide-overlap":i};try{var a=JSON.parse(e.data);if(!a||!a.type||!n[a.type])return;var o=a.type,s=a.items,l=n[o](s);self.postMessage(l)}catch(u){throw u}},tx=`
  24. self.onmessage = `.concat(Jm.toString(),`
  25. `),Wo=function(e){for(var r=e.slice(),t=0;t<r.length;t++){var i=r[t];if(i.visible)for(var n=t+1;n<r.length;n++){var a=r[n];i!==a&&a.visible&&Km(i,a)&&(a.visible=!1)}}return r},Ho=new Map,pc=Qm(tx);function ex(e,r,t,i){return(0,g.__awaiter)(this,void 0,void 0,function(){var n,a,o,s,l,u;return(0,g.__generator)(this,function(c){switch(c.label){case 0:return n=r.map(function(f,v){return(0,g.__assign)((0,g.__assign)({},zu(f,e[v],(0,h.get)(e[v],"background.padding"))),{visible:!0})}),a=JSON.stringify(n),o=function(f){return Ho.set(a,f),(0,h.each)(f,function(v,d){var p=v.visible,y=r[d];p?y==null||y.show():y==null||y.hide()}),f},Ho.get(a)?(o(Ho.get(a)),[3,7]):[3,1];case 1:if(!pc)return[3,6];c.label=2;case 2:return c.trys.push([2,4,,5]),s=JSON.stringify({type:"hide-overlap",items:n}),[4,pc.post(s,function(){return o(Wo(n))})];case 3:return l=c.sent(),o(Array.isArray(l.data)?l.data:[]),[3,5];case 4:return u=c.sent(),console.error(u),o(Wo(n)),[3,5];case 5:return[3,7];case 6:o(Wo(n)),c.label=7;case 7:return[2]}})})}var yc={"#5B8FF9":!0},rx=function(e){var r=xr.toRGB(e).toUpperCase();if(yc[r])return yc[r];var t=(0,g.__read)(xr.rgb2arr(r),3),i=t[0],n=t[1],a=t[2],o=(i*299+n*587+a*114)/1e3<128;return o};function ix(e,r,t){if(t.length!==0){var i=t[0].get("element"),n=i.geometry.theme,a=n.labels||{},o=a.fillColorLight,s=a.fillColorDark;t.forEach(function(l,u){var c=r[u],f=c.find(function(x){return x.get("type")==="text"}),v=Ee.fromObject(l.getBBox()),d=Ee.fromObject(f.getCanvasBBox()),p=!v.contains(d),y=l.attr("fill"),m=rx(y);p?f.attr(n.overflowLabels.style):m?o&&f.attr("fill",o):s&&f.attr("fill",s)})}}function nx(e,r,t){var i=e.coordinate,n=Ar(r),a=Ee.fromObject(n.getCanvasBBox()),o=Ee.fromObject(t.getBBox());return i.isTransposed?o.height>=a.height:o.width>=a.width}function ax(e,r,t){var i=!!e.getAdjust("stack");return i||r.every(function(n,a){var o=t[a];return nx(e,n,o)})}function ox(e,r,t){var i=e.coordinate,n=Ee.fromObject(t.getBBox()),a=Ar(r);i.isTransposed?a.attr({x:n.minX+n.width/2,textAlign:"center"}):a.attr({y:n.minY+n.height/2,textBaseline:"middle"})}function sx(e,r,t){var i;if(t.length!==0){var n=(i=t[0])===null||i===void 0?void 0:i.get("element"),a=n==null?void 0:n.geometry;if(!(!a||a.type!=="interval")){var o=ax(a,r,t);o&&t.forEach(function(s,l){var u=r[l];ox(a,u,s)})}}}function lx(e){var r=500,t=[],i=Math.max(Math.floor(e.length/r),1);return(0,h.each)(e,function(n,a){a%i==0?t.push(n):n.set("visible",!1)}),t}function ux(e,r,t){var i;if(t.length!==0){var n=(i=t[0])===null||i===void 0?void 0:i.get("element"),a=n==null?void 0:n.geometry;if(!(!a||a.type!=="interval")){var o=lx(r),s=(0,g.__read)(a.getXYFields(),1),l=s[0],u=[],c=[],f=(0,h.groupBy)(o,function(m){return m.get("data")[l]}),v=(0,h.uniq)((0,h.map)(o,function(m){return m.get("data")[l]})),d;o.forEach(function(m){m.set("visible",!0)});var p=function(m){m&&(m.length&&c.push(m.pop()),c.push.apply(c,(0,g.__spreadArray)([],(0,g.__read)(m),!1)))};for((0,h.size)(v)>0&&(d=v.shift(),p(f[d])),(0,h.size)(v)>0&&(d=v.pop(),p(f[d])),(0,h.each)(v.reverse(),function(m){p(f[m])});c.length>0;){var y=c.shift();y.get("visible")&&(S0(y,u)?y.set("visible",!1):u.push(y))}}}}function cx(e,r){var t=e.getXYFields()[1],i=[],n=r.sort(function(a,o){return a.get("data")[t]-a.get("data")[t]});return n.length>0&&i.push(n.shift()),n.length>0&&i.push(n.pop()),i.push.apply(i,(0,g.__spreadArray)([],(0,g.__read)(n),!1)),i}function mc(e,r,t){return e.some(function(i){return t(i,r)})}function hx(e,r,t){t===void 0&&(t=0);var i=Math.max(0,Math.min(e.x+e.width+t,r.x+r.width+t)-Math.max(e.x-t,r.x-t)),n=Math.max(0,Math.min(e.y+e.height+t,r.y+r.height+t)-Math.max(e.y-t,r.y-t));return i*n}function xc(e,r){return mc(e,r,function(t,i){var n=Ar(t),a=Ar(i);return hx(n.getCanvasBBox(),a.getCanvasBBox(),2)>0})}function fx(e,r,t,i,n){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,g.__read)(l.getXYFields(),2),c=u[0],f=u[1],v=(0,h.groupBy)(r,function(y){return y.get("data")[c]}),d=[],p=n&&n.offset||((o=e[0])===null||o===void 0?void 0:o.offset)||12;(0,h.map)((0,h.keys)(v).reverse(),function(y){for(var m=cx(l,v[y]);m.length;){var x=m.shift(),_=Ar(x);if(mc(d,x,function(S,C){return S.get("data")[c]===C.get("data")[c]&&S.get("data")[f]===C.get("data")[f]})){_.set("visible",!1);continue}var w=xc(d,x),b=!1;if(w&&(_.attr("y",_.attr("y")+2*p),b=xc(d,x)),b){_.set("visible",!1);continue}d.push(x)}})}}}function vx(e,r){var t=e.getXYFields()[1],i=[],n=r.sort(function(a,o){return a.get("data")[t]-a.get("data")[t]});return n.length>0&&i.push(n.shift()),n.length>0&&i.push(n.pop()),i.push.apply(i,(0,g.__spreadArray)([],(0,g.__read)(n),!1)),i}function _c(e,r,t){return e.some(function(i){return t(i,r)})}function dx(e,r,t){t===void 0&&(t=0);var i=Math.max(0,Math.min(e.x+e.width+t,r.x+r.width+t)-Math.max(e.x-t,r.x-t)),n=Math.max(0,Math.min(e.y+e.height+t,r.y+r.height+t)-Math.max(e.y-t,r.y-t));return i*n}function wc(e,r){return _c(e,r,function(t,i){var n=Ar(t),a=Ar(i);return dx(n.getCanvasBBox(),a.getCanvasBBox(),2)>0})}function gx(e,r,t,i,n){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,g.__read)(l.getXYFields(),2),c=u[0],f=u[1],v=(0,h.groupBy)(r,function(y){return y.get("data")[c]}),d=[],p=n&&n.offset||((o=e[0])===null||o===void 0?void 0:o.offset)||12;(0,h.map)((0,h.keys)(v).reverse(),function(y){for(var m=vx(l,v[y]);m.length;){var x=m.shift(),_=Ar(x);if(_c(d,x,function(S,C){return S.get("data")[c]===C.get("data")[c]&&S.get("data")[f]===C.get("data")[f]})){_.set("visible",!1);continue}var w=wc(d,x),b=!1;if(w&&(_.attr("y",_.attr("y")+2*p),b=wc(d,x)),b){_.set("visible",!1);continue}d.push(x)}})}}}var Yo;function px(){return Yo||(Yo=document.createElement("canvas").getContext("2d")),Yo}var na=(0,h.memoize)(function(e,r){r===void 0&&(r={});var t=r.fontSize,i=r.fontFamily,n=r.fontWeight,a=r.fontStyle,o=r.fontVariant,s=px();return s.font=[a,o,n,"".concat(t,"px"),i].join(" "),s.measureText((0,h.isString)(e)?e:"").width},function(e,r){return r===void 0&&(r={}),(0,g.__spreadArray)([e],(0,g.__read)((0,h.values)(r)),!1).join("")}),yx=function(e,r,t){var i=16,n=na("...",t),a;(0,h.isString)(e)?a=e:a=(0,h.toString)(e);var o=r,s=[],l,u;if(na(e,t)<=r)return e;for(;l=a.substr(0,i),u=na(l,t),!(u+n>o&&u>o);)if(s.push(l),o-=u,a=a.substr(i),!a)return s.join("");for(;l=a.substr(0,1),u=na(l,t),!(u+n>o);)if(s.push(l),o-=u,a=a.substr(1),!a)return s.join("");return"".concat(s.join(""),"...")};function mx(e,r,t,i,n){if(!(r.length<=0)){var a=(n==null?void 0:n.direction)||["top","right","bottom","left"],o=(n==null?void 0:n.action)||"translate",s=(n==null?void 0:n.margin)||0,l=r[0].get("coordinate");if(!!l){var u=Jp(l,s),c=u.minX,f=u.minY,v=u.maxX,d=u.maxY;(0,h.each)(r,function(p){var y=p.getCanvasBBox(),m=y.minX,x=y.minY,_=y.maxX,w=y.maxY,b=y.x,S=y.y,C=y.width,A=y.height,F=b,P=S;if(a.indexOf("left")>=0&&(m<c||_<c)&&(F=c),a.indexOf("top")>=0&&(x<f||w<f)&&(P=f),a.indexOf("right")>=0&&(m>v?F=v-C:_>v&&(F=F-(_-v))),a.indexOf("bottom")>=0&&(x>d?P=d-A:w>d&&(P=P-(w-d))),F!==b||P!==S){var I=F-b;if(o==="translate")tn(p,I,P-S);else if(o==="ellipsis"){var V=p.findAll(function(Z){return Z.get("type")==="text"});V.forEach(function(Z){var vt=(0,h.pick)(Z.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),yt=Z.getCanvasBBox(),Bt=yx(Z.attr("text"),yt.width-Math.abs(I),vt);Z.attr("text",Bt)})}else p.hide()}})}}}function xx(e,r,t){var i={fillOpacity:(0,h.isNil)(e.attr("fillOpacity"))?1:e.attr("fillOpacity"),strokeOpacity:(0,h.isNil)(e.attr("strokeOpacity"))?1:e.attr("strokeOpacity"),opacity:(0,h.isNil)(e.attr("opacity"))?1:e.attr("opacity")};e.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),e.animate(i,r)}function _x(e,r,t){var i={fillOpacity:0,strokeOpacity:0,opacity:0},n=r.easing,a=r.duration,o=r.delay;e.animate(i,a,n,function(){e.remove(!0)},o)}function wx(e,r,t){var i,n=(0,g.__read)(r,2),a=n[0],o=n[1];return e.applyToMatrix([a,o,1]),t==="x"?(e.setMatrix(ie.vs(e.getMatrix(),[["t",-a,-o],["s",.01,1],["t",a,o]])),i=ie.vs(e.getMatrix(),[["t",-a,-o],["s",100,1],["t",a,o]])):t==="y"?(e.setMatrix(ie.vs(e.getMatrix(),[["t",-a,-o],["s",1,.01],["t",a,o]])),i=ie.vs(e.getMatrix(),[["t",-a,-o],["s",1,100],["t",a,o]])):t==="xy"&&(e.setMatrix(ie.vs(e.getMatrix(),[["t",-a,-o],["s",.01,.01],["t",a,o]])),i=ie.vs(e.getMatrix(),[["t",-a,-o],["s",100,100],["t",a,o]])),i}function Xo(e,r,t,i,n){var a=t.start,o=t.end,s=t.getWidth(),l=t.getHeight(),u,c;n==="y"?(u=a.x+s/2,c=i.y<a.y?i.y:a.y):n==="x"?(u=i.x>a.x?i.x:a.x,c=a.y+l/2):n==="xy"&&(t.isPolar?(u=t.getCenter().x,c=t.getCenter().y):(u=(a.x+o.x)/2,c=(a.y+o.y)/2));var f=wx(e,[u,c],n);e.animate({matrix:f},r)}function bx(e,r,t){var i=t.coordinate,n=t.minYPoint;Xo(e,r,i,n,"x")}function Sx(e,r,t){var i=t.coordinate,n=t.minYPoint;Xo(e,r,i,n,"y")}function Cx(e,r,t){var i=t.coordinate,n=t.minYPoint;Xo(e,r,i,n,"xy")}function Ax(e,r,t){var i=e.getTotalLength();e.attr("lineDash",[i]),e.animate(function(n){return{lineDashOffset:(1-n)*i}},r)}function Mx(e,r,t){var i=t.toAttrs,n=i.x,a=i.y;delete i.x,delete i.y,e.attr(i),e.animate({x:n,y:a},r)}function Fx(e,r,t){var i=e.getBBox(),n=e.get("origin").mappingData,a=n.points,o=a[0].y-a[1].y>0?i.maxX:i.minX,s=(i.minY+i.maxY)/2;e.applyToMatrix([o,s,1]);var l=ie.vs(e.getMatrix(),[["t",-o,-s],["s",.01,1],["t",o,s]]);e.setMatrix(l),e.animate({matrix:ie.vs(e.getMatrix(),[["t",-o,-s],["s",100,1],["t",o,s]])},r)}function Ex(e,r,t){var i=e.getBBox(),n=e.get("origin").mappingData,a=(i.minX+i.maxX)/2,o=n.points,s=o[0].y-o[1].y<=0?i.maxY:i.minY;e.applyToMatrix([a,s,1]);var l=ie.vs(e.getMatrix(),[["t",-a,-s],["s",1,.01],["t",a,s]]);e.setMatrix(l),e.animate({matrix:ie.vs(e.getMatrix(),[["t",-a,-s],["s",1,100],["t",a,s]])},r)}function bc(e,r){var t,i=(0,$u.getArcParams)(e,r),n=i.startAngle,a=i.endAngle;return!(0,h.isNumberEqual)(n,-Math.PI*.5)&&n<-Math.PI*.5&&(n+=Math.PI*2),!(0,h.isNumberEqual)(a,-Math.PI*.5)&&a<-Math.PI*.5&&(a+=Math.PI*2),r[5]===0&&(t=(0,g.__read)([a,n],2),n=t[0],a=t[1]),(0,h.isNumberEqual)(n,Math.PI*1.5)&&(n=Math.PI*-.5),(0,h.isNumberEqual)(a,Math.PI*-.5)&&!(0,h.isNumberEqual)(n,a)&&(a=Math.PI*1.5),{startAngle:n,endAngle:a}}function Sc(e){var r;return e[0]==="M"||e[0]==="L"?r=[e[1],e[2]]:(e[0]==="a"||e[0]==="A"||e[0]==="C")&&(r=[e[e.length-2],e[e.length-1]]),r}function Cc(e){var r,t,i,n=e.filter(function(w){return w[0]==="A"||w[0]==="a"});if(n.length===0)return{startAngle:0,endAngle:0,radius:0,innerRadius:0};var a=n[0],o=n.length>1?n[1]:n[0],s=e.indexOf(a),l=e.indexOf(o),u=Sc(e[s-1]),c=Sc(e[l-1]),f=bc(u,a),v=f.startAngle,d=f.endAngle,p=bc(c,o),y=p.startAngle,m=p.endAngle;(0,h.isNumberEqual)(v,y)&&(0,h.isNumberEqual)(d,m)?(t=v,i=d):(t=Math.min(v,y),i=Math.max(d,m));var x=a[1],_=n[n.length-1][1];return x<_?(r=(0,g.__read)([_,x],2),x=r[0],_=r[1]):x===_&&(_=0),{startAngle:t,endAngle:i,radius:x,innerRadius:_}}function Tx(e,r,t){var i=t.toAttrs,n=t.coordinate,a=i.path||[],o=a.map(function(_){return _[0]});if(!(a.length<1)){var s=Cc(a),l=s.startAngle,u=s.endAngle,c=s.radius,f=s.innerRadius,v=Cc(e.attr("path")),d=v.startAngle,p=v.endAngle,y=n.getCenter(),m=l-d,x=u-p;if(m===0&&x===0){e.attr("path",a);return}e.animate(function(_){var w=d+_*m,b=p+_*x;return(0,g.__assign)((0,g.__assign)({},i),{path:(0,h.isEqual)(o,["M","A","A","Z"])?Hl(y.x,y.y,c,w,b):_r(y.x,y.y,c,w,b,f)})},(0,g.__assign)((0,g.__assign)({},r),{callback:function(){e.attr("path",a),(0,h.isFunction)(r.callback)&&r.callback()}}))}}function Lx(e,r,t){var i=po(t.coordinate,20),n=i.type,a=i.startState,o=i.endState,s=e.setClip({type:n,attrs:a});t.toAttrs&&e.attr(t.toAttrs),s.animate(o,(0,g.__assign)((0,g.__assign)({},r),{callback:function(){e&&!e.get("destroyed")&&e.set("clipShape",null),s.remove(!0),(0,h.isFunction)(r.callback)&&r.callback()}}))}function Uo(e,r,t){if(e.isGroup())(0,h.each)(e.getChildren(),function(s){Uo(s,r,t)});else{var i=e.getBBox(),n=(i.minX+i.maxX)/2,a=(i.minY+i.maxY)/2;if(e.applyToMatrix([n,a,1]),t==="zoomIn"){var o=ie.vs(e.getMatrix(),[["t",-n,-a],["s",.01,.01],["t",n,a]]);e.setMatrix(o),e.animate({matrix:ie.vs(e.getMatrix(),[["t",-n,-a],["s",100,100],["t",n,a]])},r)}else e.animate({matrix:ie.vs(e.getMatrix(),[["t",-n,-a],["s",.01,.01],["t",n,a]])},(0,g.__assign)((0,g.__assign)({},r),{callback:function(){e.remove(!0),(0,h.isFunction)(r.callback)&&r.callback()}}))}}function Ix(e,r,t){Uo(e,r,"zoomIn")}function Ox(e,r,t){Uo(e,r,"zoomOut")}function ur(e){return[E.TOP,E.BOTTOM].includes(e)?{offsetX:0,offsetY:e===E.TOP?-8:8,style:{textAlign:"center",textBaseline:e===E.TOP?"bottom":"top"}}:[E.LEFT,E.RIGHT].includes(e)?{offsetX:e===E.LEFT?-8:8,offsetY:0,style:{textAlign:e===E.LEFT?"right":"left",textBaseline:"middle",rotate:Math.PI/2}}:{}}function jo(e,r,t){return{x:e.x+r*Math.cos(t),y:e.y+r*Math.sin(t)}}var Px=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return(0,h.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"circle",showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this)})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.getRegion=function(t,i){var n=1/2,a={x:.5,y:.5},o=Math.PI*2/t,s=-1*Math.PI/2+o*i,l=n/(1+1/Math.sin(o/2)),u=jo(a,n-l,s),c=Math.PI*5/4,f=Math.PI*1/4;return{start:jo(u,l,c),end:jo(u,l,f)}},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.generateFacets=function(t){var i=this,n=this.cfg,a=n.fields,o=n.type,s=(0,g.__read)(a,1),l=s[0];if(!l)throw new Error("No `fields` specified!");var u=this.getFieldValues(t,l),c=u.length,f=[];return u.forEach(function(v,d){var p=[{field:l,value:v,values:u}],y=(0,h.filter)(t,i.getFacetDataFilter(p)),m={type:o,data:y,region:i.getRegion(c,d),columnValue:v,columnField:l,columnIndex:d,columnValuesLength:c,rowValue:null,rowField:null,rowIndex:0,rowValuesLength:1};f.push(m)}),f},r.prototype.getXAxisOption=function(t,i,n,a){return n},r.prototype.getYAxisOption=function(t,i,n,a){return n},r.prototype.renderTitle=function(){var t=this;(0,h.each)(this.facets,function(i){var n=i.columnValue,a=i.view,o=(0,h.get)(t.cfg.title,"formatter"),s=(0,h.deepMix)({position:["50%","0%"],content:o?o(n):n},ur(E.TOP),t.cfg.title);a.annotation().text(s)})},r}(ci),kx=Px,Dx=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return(0,h.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"list",cols:null,showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this)})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.generateFacets=function(t){var i=this,n=this.cfg.fields,a=this.cfg.cols,o=(0,g.__read)(n,1),s=o[0];if(!s)throw new Error("No `fields` specified!");var l=this.getFieldValues(t,s),u=l.length;a=a||u;var c=this.getPageCount(u,a),f=[];return l.forEach(function(v,d){var p=i.getRowCol(d,a),y=p.row,m=p.col,x=[{field:s,value:v,values:l}],_=(0,h.filter)(t,i.getFacetDataFilter(x)),w={type:i.cfg.type,data:_,region:i.getRegion(c,a,m,y),columnValue:v,rowValue:v,columnField:s,rowField:null,columnIndex:m,rowIndex:y,columnValuesLength:a,rowValuesLength:c,total:u};f.push(w)}),f},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1&&a.columnValuesLength*a.rowIndex+a.columnIndex+1+a.columnValuesLength<=a.total?(0,g.__assign)((0,g.__assign)({},n),{label:null,title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.columnIndex!==0?(0,g.__assign)((0,g.__assign)({},n),{title:null,label:null}):n},r.prototype.renderTitle=function(){var t=this;(0,h.each)(this.facets,function(i){var n=i.columnValue,a=i.view,o=(0,h.get)(t.cfg.title,"formatter"),s=(0,h.deepMix)({position:["50%","0%"],content:o?o(n):n},ur(E.TOP),t.cfg.title);a.annotation().text(s)})},r.prototype.getPageCount=function(t,i){return Math.floor((t+i-1)/i)},r.prototype.getRowCol=function(t,i){var n=Math.floor(t/i),a=t%i;return{row:n,col:a}},r}(ci),Bx=Dx,Rx=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return(0,h.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"matrix",showTitle:!1,columnTitle:(0,g.__assign)({},e.prototype.getDefaultTitleCfg.call(this)),rowTitle:(0,g.__assign)({},e.prototype.getDefaultTitleCfg.call(this))})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.generateFacets=function(t){for(var i=this.cfg,n=i.fields,a=i.type,o=n.length,s=o,l=[],u=0;u<s;u++)for(var c=n[u],f=0;f<o;f++){var v=n[f],d={type:a,data:t,region:this.getRegion(o,s,u,f),columnValue:c,rowValue:v,columnField:c,rowField:v,columnIndex:u,rowIndex:f,columnValuesLength:s,rowValuesLength:o};l.push(d)}return l},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1?(0,g.__assign)((0,g.__assign)({},n),{label:null,title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.columnIndex!==0?(0,g.__assign)((0,g.__assign)({},n),{title:null,label:null}):n},r.prototype.renderTitle=function(){var t=this;(0,h.each)(this.facets,function(i,n){var a=i.columnIndex,o=i.rowIndex,s=i.columnValuesLength,l=i.rowValuesLength,u=i.columnValue,c=i.rowValue,f=i.view;if(o===0){var v=(0,h.get)(t.cfg.columnTitle,"formatter"),d=(0,h.deepMix)({position:["50%","0%"],content:v?v(u):u},ur(E.TOP),t.cfg.columnTitle);f.annotation().text(d)}if(a===s-1){var v=(0,h.get)(t.cfg.rowTitle,"formatter"),d=(0,h.deepMix)({position:["100%","50%"],content:v?v(c):c},ur(E.RIGHT),t.cfg.rowTitle);f.annotation().text(d)}})},r}(ci),Nx=Rx,zx=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return(0,h.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"mirror",showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this),transpose:!1})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.beforeEachView=function(t,i){this.cfg.transpose?i.columnIndex%2==0?t.coordinate().transpose().reflect("x"):t.coordinate().transpose():i.rowIndex%2!=0&&t.coordinate().reflect("y")},r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.generateFacets=function(t){var i=this,n=(0,g.__read)(this.cfg.fields,1),a=n[0],o=[],s=1,l=1,u=[""],c=[""],f,v;return this.cfg.transpose?(f=a,u=this.getFieldValues(t,f).slice(0,2),s=u.length):(v=a,c=this.getFieldValues(t,v).slice(0,2),l=c.length),u.forEach(function(d,p){c.forEach(function(y,m){var x=[{field:f,value:d,values:u},{field:v,value:y,values:c}],_=(0,h.filter)(t,i.getFacetDataFilter(x)),w={type:i.cfg.type,data:_,region:i.getRegion(l,s,p,m),columnValue:d,rowValue:y,columnField:f,rowField:v,columnIndex:p,rowIndex:m,columnValuesLength:s,rowValuesLength:l};o.push(w)})}),o},r.prototype.getXAxisOption=function(t,i,n,a){return a.columnIndex===1||a.rowIndex===1?(0,g.__assign)((0,g.__assign)({},n),{label:null,title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return n},r.prototype.renderTitle=function(){var t=this;(0,h.each)(this.facets,function(i,n){var a=i.columnValue,o=i.rowValue,s=i.view,l=(0,h.get)(t.cfg.title,"formatter");if(t.cfg.transpose){var u=(0,h.deepMix)({position:["50%","0%"],content:l?l(a):a},ur(E.TOP),t.cfg.title);s.annotation().text(u)}else{var u=(0,h.deepMix)({position:["100%","50%"],content:l?l(o):o},ur(E.RIGHT),t.cfg.title);s.annotation().text(u)}})},r}(ci),Vx=zx,Gx=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.getDefaultCfg=function(){return(0,h.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"rect",columnTitle:(0,g.__assign)({},e.prototype.getDefaultTitleCfg.call(this)),rowTitle:(0,g.__assign)({},e.prototype.getDefaultTitleCfg.call(this))})},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.generateFacets=function(t){var i=this,n=(0,g.__read)(this.cfg.fields,2),a=n[0],o=n[1],s=[],l=1,u=1,c=[""],f=[""];return a&&(c=this.getFieldValues(t,a),l=c.length),o&&(f=this.getFieldValues(t,o),u=f.length),c.forEach(function(v,d){f.forEach(function(p,y){var m=[{field:a,value:v,values:c},{field:o,value:p,values:f}],x=(0,h.filter)(t,i.getFacetDataFilter(m)),_={type:i.cfg.type,data:x,region:i.getRegion(u,l,d,y),columnValue:v,rowValue:p,columnField:a,rowField:o,columnIndex:d,rowIndex:y,columnValuesLength:l,rowValuesLength:u};s.push(_)})}),s},r.prototype.renderTitle=function(){var t=this;(0,h.each)(this.facets,function(i,n){var a=i.columnIndex,o=i.rowIndex,s=i.columnValuesLength,l=i.columnValue,u=i.rowValue,c=i.view;if(o===0){var f=(0,h.get)(t.cfg.columnTitle,"formatter"),v=(0,h.deepMix)({position:["50%","0%"],content:f?f(l):l},ur(E.TOP),t.cfg.columnTitle);c.annotation().text(v)}if(a===s-1){var f=(0,h.get)(t.cfg.rowTitle,"formatter"),v=(0,h.deepMix)({position:["100%","50%"],content:f?f(u):u},ur(E.RIGHT),t.cfg.rowTitle);c.annotation().text(v)}})},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1?(0,g.__assign)((0,g.__assign)({},n),{title:null,label:null}):a.columnIndex!==Math.floor((a.columnValuesLength-1)/2)?(0,g.__assign)((0,g.__assign)({},n),{title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.columnIndex!==0?(0,g.__assign)((0,g.__assign)({},n),{title:null,label:null}):a.rowIndex!==Math.floor((a.rowValuesLength-1)/2)?(0,g.__assign)((0,g.__assign)({},n),{title:null}):n},r}(ci),Wx=Gx,Hx=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.afterChartRender=function(){t.facets&&t.cfg.line&&(t.container.clear(),t.drawLines(t.facets))},t}return r.prototype.afterEachView=function(t,i){this.processAxis(t,i)},r.prototype.beforeEachView=function(t,i){},r.prototype.init=function(){e.prototype.init.call(this),this.view.on(L.AFTER_RENDER,this.afterChartRender)},r.prototype.getDefaultCfg=function(){return(0,h.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"tree",line:{style:{lineWidth:1,stroke:"#ddd"},smooth:!1},showTitle:!0,title:e.prototype.getDefaultTitleCfg.call(this)})},r.prototype.generateFacets=function(t){var i=this.cfg.fields;if(!i.length)throw new Error("Please specify for the fields for rootFacet!");var n=[],a={type:this.cfg.type,data:t,region:null,rowValuesLength:this.getRows(),columnValuesLength:1,rowIndex:0,columnIndex:0,rowField:"",columnField:"",rowValue:"",columnValue:""};return n.push(a),a.children=this.getChildFacets(t,1,n),this.setRegion(n),n},r.prototype.setRegion=function(t){var i=this;this.forceColIndex(t),t.forEach(function(n){n.region=i.getRegion(n.rowValuesLength,n.columnValuesLength,n.columnIndex,n.rowIndex)})},r.prototype.getRegion=function(t,i,n,a){var o=1/i,s=1/t,l={x:o*n,y:s*a},u={x:l.x+o,y:l.y+s*2/3};return{start:l,end:u}},r.prototype.forceColIndex=function(t){var i,n,a=this,o=[],s=0;t.forEach(function(p){a.isLeaf(p)&&(o.push(p),p.columnIndex=s,s++)}),o.forEach(function(p){p.columnValuesLength=o.length});for(var l=this.cfg.fields.length,u=l-1;u>=0;u--){var c=this.getFacetsByLevel(t,u);try{for(var f=(i=void 0,(0,g.__values)(c)),v=f.next();!v.done;v=f.next()){var d=v.value;this.isLeaf(d)||(d.originColIndex=d.columnIndex,d.columnIndex=this.getRegionIndex(d.children),d.columnValuesLength=o.length)}}catch(p){i={error:p}}finally{try{v&&!v.done&&(n=f.return)&&n.call(f)}finally{if(i)throw i.error}}}},r.prototype.getFacetsByLevel=function(t,i){var n=[];return t.forEach(function(a){a.rowIndex===i&&n.push(a)}),n},r.prototype.getRegionIndex=function(t){var i=t[0],n=t[t.length-1];return(n.columnIndex-i.columnIndex)/2+i.columnIndex},r.prototype.isLeaf=function(t){return!t.children||!t.children.length},r.prototype.getRows=function(){return this.cfg.fields.length+1},r.prototype.getChildFacets=function(t,i,n){var a=this,o=this.cfg.fields,s=o.length;if(!(s<i)){var l=[],u=o[i-1],c=this.getFieldValues(t,u);return c.forEach(function(f,v){var d=[{field:u,value:f,values:c}],p=t.filter(a.getFacetDataFilter(d));if(p.length){var y={type:a.cfg.type,data:p,region:null,columnValue:f,rowValue:"",columnField:u,rowField:"",columnIndex:v,rowValuesLength:a.getRows(),columnValuesLength:1,rowIndex:i,children:a.getChildFacets(p,i+1,n)};l.push(y),n.push(y)}}),l}},r.prototype.render=function(){e.prototype.render.call(this),this.cfg.showTitle&&this.renderTitle()},r.prototype.renderTitle=function(){var t=this;(0,h.each)(this.facets,function(i){var n=i.columnValue,a=i.view,o=(0,h.get)(t.cfg.title,"formatter"),s=(0,h.deepMix)({position:["50%","0%"],content:o?o(n):n},ur(E.TOP),t.cfg.title);a.annotation().text(s)})},r.prototype.drawLines=function(t){var i=this;t.forEach(function(n){if(!i.isLeaf(n)){var a=n.children;i.addFacetLines(n,a)}})},r.prototype.addFacetLines=function(t,i){var n=this,a=t.view,o=a.coordinateBBox,s={x:o.x+o.width/2,y:o.y+o.height};i.forEach(function(l){var u=l.view.coordinateBBox,c={x:u.bl.x+(u.tr.x-u.bl.x)/2,y:u.tr.y},f={x:s.x,y:s.y+(c.y-s.y)/2},v={x:c.x,y:f.y};n.drawLine([s,f,v,c])})},r.prototype.getPath=function(t){var i=[],n=this.cfg.line.smooth;return n?(i.push(["M",t[0].x,t[0].y]),i.push(["C",t[1].x,t[1].y,t[2].x,t[2].y,t[3].x,t[3].y])):t.forEach(function(a,o){o===0?i.push(["M",a.x,a.y]):i.push(["L",a.x,a.y])}),i},r.prototype.drawLine=function(t){var i=this.getPath(t),n=this.cfg.line.style;this.container.addShape("path",{attrs:(0,h.assign)({path:i},n)})},r.prototype.getXAxisOption=function(t,i,n,a){return a.rowIndex!==a.rowValuesLength-1?(0,g.__assign)((0,g.__assign)({},n),{title:null,label:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.originColIndex!==0&&a.columnIndex!==0?(0,g.__assign)((0,g.__assign)({},n),{title:null,label:null}):n},r}(ci),Yx=Hx;function Ac(e){var r=(0,g.__spreadArray)([],(0,g.__read)(e),!1);r.sort(function(i,n){return i-n});var t=r.length;return t===0?0:t%2==1?r[(t-1)/2]:(r[t/2]+r[t/2-1])/2}function Xx(e){var r=(0,h.reduce)(e,function(t,i){return t+=isNaN(i)||!(0,h.isNumber)(i)?0:i},0);return e.length===0?0:r/e.length}function aa(e,r){if(!r)return null;var t;switch(e){case"start":return 0;case"center":return .5;case"end":return 1;case"median":{t=r.isCategory?Ac(r.values.map(function(i,n){return n})):Ac(r.values);break}case"mean":{t=r.isCategory?(r.values.length-1)/2:Xx(r.values);break}case"min":t=r.isCategory?0:r[e];break;case"max":t=r.isCategory?r.values.length-1:r[e];break;default:t=e;break}return r.scale(t)}var oa=["regionFilter","shape"],Ux=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.cache=new Map,i.foregroundContainer=i.view.getLayer(J.FORE).addGroup(),i.backgroundContainer=i.view.getLayer(J.BG).addGroup(),i.option=[],i}return Object.defineProperty(r.prototype,"name",{get:function(){return"annotation"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.layout=function(){this.update()},r.prototype.render=function(){},r.prototype.update=function(){var t=this;this.onAfterRender(function(){var n=new Map;(0,h.each)(t.option,function(a){if((0,h.includes)(oa,a.type)){var o=t.updateOrCreate(a);o&&n.set(t.getCacheKey(a),o)}}),t.cache=t.syncCache(n)});var i=new Map;(0,h.each)(this.option,function(n){if(!(0,h.includes)(oa,n.type)){var a=t.updateOrCreate(n);a&&i.set(t.getCacheKey(n),a)}}),this.cache=this.syncCache(i)},r.prototype.clear=function(t){t===void 0&&(t=!1),e.prototype.clear.call(this),this.clearComponents(),this.foregroundContainer.clear(),this.backgroundContainer.clear(),t&&(this.option=[])},r.prototype.destroy=function(){this.clear(!0),this.foregroundContainer.remove(!0),this.backgroundContainer.remove(!0)},r.prototype.getComponents=function(){var t=[];return this.cache.forEach(function(i){t.push(i)}),t},r.prototype.clearComponents=function(){this.getComponents().forEach(function(t){t.component.destroy()}),this.cache.clear()},r.prototype.onAfterRender=function(t){var i=!1;this.view.getOptions().animate&&this.view.geometries.forEach(function(n){n.animateOption&&(n.once(X.AFTER_DRAW_ANIMATE,function(){t()}),i=!0)}),i||this.view.getRootView().once(L.AFTER_RENDER,function(){t()})},r.prototype.createAnnotation=function(t){var i=t.type,n=B[(0,h.upperFirst)(i)];if(n){var a=this.getAnnotationTheme(i),o=this.getAnnotationCfg(i,t,a);if(!o)return null;var s=new n(o);return{component:s,layer:this.isTop(o)?J.FORE:J.BG,direction:E.NONE,type:N.ANNOTATION,extra:t}}},r.prototype.annotation=function(t){this.option.push(t)},r.prototype.arc=function(t){return this.annotation((0,g.__assign)({type:"arc"},t)),this},r.prototype.image=function(t){return this.annotation((0,g.__assign)({type:"image"},t)),this},r.prototype.line=function(t){return this.annotation((0,g.__assign)({type:"line"},t)),this},r.prototype.region=function(t){return this.annotation((0,g.__assign)({type:"region"},t)),this},r.prototype.text=function(t){return this.annotation((0,g.__assign)({type:"text"},t)),this},r.prototype.dataMarker=function(t){return this.annotation((0,g.__assign)({type:"dataMarker"},t)),this},r.prototype.dataRegion=function(t){this.annotation((0,g.__assign)({type:"dataRegion"},t))},r.prototype.regionFilter=function(t){this.annotation((0,g.__assign)({type:"regionFilter"},t))},r.prototype.shape=function(t){this.annotation((0,g.__assign)({type:"shape"},t))},r.prototype.html=function(t){this.annotation((0,g.__assign)({type:"html"},t))},r.prototype.parsePosition=function(t){var i,n,a=this.view.getXScale(),o=this.view.getScalesByDim("y"),s=(0,h.isFunction)(t)?t.call(null,a,o):t,l=0,u=0;if((0,h.isArray)(s)){var c=(0,g.__read)(s,2),f=c[0],v=c[1];if((0,h.isString)(f)&&f.indexOf("%")!==-1&&!isNaN(f.slice(0,-1)))return this.parsePercentPosition(s);l=aa(f,a),u=aa(v,Object.values(o)[0])}else if(!(0,h.isNil)(s))try{for(var d=(0,g.__values)((0,h.keys)(s)),p=d.next();!p.done;p=d.next()){var y=p.value,m=s[y];y===a.field&&(l=aa(m,a)),o[y]&&(u=aa(m,o[y]))}}catch(x){i={error:x}}finally{try{p&&!p.done&&(n=d.return)&&n.call(d)}finally{if(i)throw i.error}}return isNaN(l)||isNaN(u)?null:this.view.getCoordinate().convert({x:l,y:u})},r.prototype.getRegionPoints=function(t,i){var n=this,a=this.view.getXScale(),o=this.view.getScalesByDim("y"),s=Object.values(o)[0],l=a.field,u=this.view.getData(),c=(0,h.isArray)(t)?t[0]:t[l],f=(0,h.isArray)(i)?i[0]:i[l],v=[],d;return(0,h.each)(u,function(p,y){if(p[l]===c&&(d=y),y>=d){var m=n.parsePosition([p[l],p[s.field]]);m&&v.push(m)}if(p[l]===f)return!1}),v},r.prototype.parsePercentPosition=function(t){var i=parseFloat(t[0])/100,n=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()*i+l.x,c=a.getHeight()*n+l.y;return{x:u,y:c}},r.prototype.getCoordinateBBox=function(){var t=this.view.getCoordinate(),i=t.start,n=t.end,a=t.getWidth(),o=t.getHeight(),s={x:Math.min(i.x,n.x),y:Math.min(i.y,n.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}},r.prototype.getAnnotationCfg=function(t,i,n){var a=this,o=this.view.getCoordinate(),s=this.view.getCanvas(),l={};if((0,h.isNil)(i))return null;var u=i.start,c=i.end,f=i.position,v=this.parsePosition(u),d=this.parsePosition(c),p=this.parsePosition(f);if(["arc","image","line","region","regionFilter"].includes(t)&&(!v||!d))return null;if(["text","dataMarker","html"].includes(t)&&!p)return null;if(t==="arc"){var y=i,m=y.start,x=y.end,_=(0,g.__rest)(y,["start","end"]),w=ui(o,v),b=ui(o,d);w>b&&(b=Math.PI*2+b),l=(0,g.__assign)((0,g.__assign)({},_),{center:o.getCenter(),radius:zn(o,v),startAngle:w,endAngle:b})}else if(t==="image"){var S=i,C=S.start,A=S.end,_=(0,g.__rest)(S,["start","end"]);l=(0,g.__assign)((0,g.__assign)({},_),{start:v,end:d,src:i.src})}else if(t==="line"){var F=i,P=F.start,I=F.end,_=(0,g.__rest)(F,["start","end"]);l=(0,g.__assign)((0,g.__assign)({},_),{start:v,end:d,text:(0,h.get)(i,"text",null)})}else if(t==="region"){var V=i,Z=V.start,vt=V.end,_=(0,g.__rest)(V,["start","end"]);l=(0,g.__assign)((0,g.__assign)({},_),{start:v,end:d})}else if(t==="text"){var yt=this.view.getData(),Bt=i,G=Bt.position,at=Bt.content,_=(0,g.__rest)(Bt,["position","content"]),mt=at;(0,h.isFunction)(at)&&(mt=at(yt)),l=(0,g.__assign)((0,g.__assign)((0,g.__assign)({},p),_),{content:mt})}else if(t==="dataMarker"){var ut=i,pt=ut.position,At=ut.point,Gt=ut.line,Wt=ut.text,Dt=ut.autoAdjust,Ht=ut.direction,_=(0,g.__rest)(ut,["position","point","line","text","autoAdjust","direction"]);l=(0,g.__assign)((0,g.__assign)((0,g.__assign)({},_),p),{coordinateBBox:this.getCoordinateBBox(),point:At,line:Gt,text:Wt,autoAdjust:Dt,direction:Ht})}else if(t==="dataRegion"){var Jt=i,pe=Jt.start,ye=Jt.end,ar=Jt.region,Wt=Jt.text,ri=Jt.lineLength,_=(0,g.__rest)(Jt,["start","end","region","text","lineLength"]);l=(0,g.__assign)((0,g.__assign)({},_),{points:this.getRegionPoints(pe,ye),region:ar,text:Wt,lineLength:ri})}else if(t==="regionFilter"){var mr=i,Li=mr.start,Ii=mr.end,od=mr.apply,wL=mr.color,_=(0,g.__rest)(mr,["start","end","apply","color"]),bL=this.view.geometries,sd=[],ol=function(or){!or||(or.isGroup()?or.getChildren().forEach(function(An){return ol(An)}):sd.push(or))};(0,h.each)(bL,function(or){od?(0,h.contains)(od,or.type)&&(0,h.each)(or.elements,function(An){ol(An.shape)}):(0,h.each)(or.elements,function(An){ol(An.shape)})}),l=(0,g.__assign)((0,g.__assign)({},_),{color:wL,shapes:sd,start:v,end:d})}else if(t==="shape"){var ld=i,SL=ld.render,sl=(0,g.__rest)(ld,["render"]),CL=function(ML){if((0,h.isFunction)(i.render))return SL(ML,a.view,{parsePosition:a.parsePosition.bind(a)})};l=(0,g.__assign)((0,g.__assign)({},sl),{render:CL})}else if(t==="html"){var ll=i,ul=ll.html,RI=ll.position,sl=(0,g.__rest)(ll,["html","position"]),AL=function(or){return(0,h.isFunction)(ul)?ul(or,a.view):ul};l=(0,g.__assign)((0,g.__assign)((0,g.__assign)({},sl),p),{parent:s.get("el").parentNode,html:AL})}var kr=(0,h.deepMix)({},n,(0,g.__assign)((0,g.__assign)({},l),{top:i.top,style:i.style,offsetX:i.offsetX,offsetY:i.offsetY}));return t!=="html"&&(kr.container=this.getComponentContainer(kr)),kr.animate=this.view.getOptions().animate&&kr.animate&&(0,h.get)(i,"animate",kr.animate),kr.animateOption=(0,h.deepMix)({},gi,kr.animateOption,i.animateOption),kr},r.prototype.isTop=function(t){return(0,h.get)(t,"top",!0)},r.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},r.prototype.getAnnotationTheme=function(t){return(0,h.get)(this.view.getTheme(),["components","annotation",t],{})},r.prototype.updateOrCreate=function(t){var i=this.cache.get(this.getCacheKey(t));if(i){var n=t.type,a=this.getAnnotationTheme(n),o=this.getAnnotationCfg(n,t,a);o&&Oe(o,["container"]),i.component.update((0,g.__assign)((0,g.__assign)({},o||{}),{visible:!!o})),(0,h.includes)(oa,t.type)&&i.component.render()}else i=this.createAnnotation(t),i&&(i.component.init(),(0,h.includes)(oa,t.type)&&i.component.render());return i},r.prototype.syncCache=function(t){var i=this,n=new Map(this.cache);return t.forEach(function(a,o){n.set(o,a)}),n.forEach(function(a,o){(0,h.find)(i.option,function(s){return o===i.getCacheKey(s)})||(a.component.destroy(),n.delete(o))}),n},r.prototype.getCacheKey=function(t){return t},r}(di),jx=Ux;function Mc(e,r){var t=(0,h.deepMix)({},(0,h.get)(e,["components","axis","common"]),(0,h.get)(e,["components","axis",r]));return(0,h.get)(t,["grid"],{})}function sa(e,r,t,i){var n=[],a=r.getTicks();return e.isPolar&&a.push({value:1,text:"",tickValue:""}),a.reduce(function(o,s,l){var u=s.value;if(i)n.push({points:[e.convert(t==="y"?{x:0,y:u}:{x:u,y:0}),e.convert(t==="y"?{x:1,y:u}:{x:u,y:1})]});else if(l){var c=o.value,f=(c+u)/2;n.push({points:[e.convert(t==="y"?{x:0,y:f}:{x:f,y:0}),e.convert(t==="y"?{x:1,y:f}:{x:f,y:1})]})}return s},a[0]),n}function Zo(e,r,t,i,n){var a=r.values.length,o=[],s=t.getTicks();return s.reduce(function(l,u){var c=l?l.value:u.value,f=u.value,v=(c+f)/2;return n==="x"?o.push({points:[e.convert({x:i?f:v,y:0}),e.convert({x:i?f:v,y:1})]}):o.push({points:(0,h.map)(Array(a+1),function(d,p){return e.convert({x:p/a,y:i?f:v})})}),u},s[0]),o}function Fc(e,r){var t=(0,h.get)(r,"grid");if(t===null)return!1;var i=(0,h.get)(e,"grid");return!(t===void 0&&i===null)}var Fr=["container"],Ec=(0,g.__assign)((0,g.__assign)({},gi),{appear:null}),Zx=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.cache=new Map,i.gridContainer=i.view.getLayer(J.BG).addGroup(),i.gridForeContainer=i.view.getLayer(J.FORE).addGroup(),i.axisContainer=i.view.getLayer(J.BG).addGroup(),i.axisForeContainer=i.view.getLayer(J.FORE).addGroup(),i}return Object.defineProperty(r.prototype,"name",{get:function(){return"axis"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.render=function(){this.update()},r.prototype.layout=function(){var t=this,i=this.view.getCoordinate();(0,h.each)(this.getComponents(),function(n){var a=n.component,o=n.direction,s=n.type,l=n.extra,u=l.dim,c=l.scale,f=l.alignTick,v;if(s===N.AXIS)i.isPolar?u==="x"?v=i.isTransposed?Vn(i,o):yo(i):u==="y"&&(v=i.isTransposed?yo(i):Vn(i,o)):v=Vn(i,o);else if(s===N.GRID)if(i.isPolar){var d=void 0;i.isTransposed?d=u==="x"?Zo(i,t.view.getYScales()[0],c,f,u):sa(i,c,u,f):d=u==="x"?sa(i,c,u,f):Zo(i,t.view.getXScale(),c,f,u),v={items:d,center:t.view.getCoordinate().getCenter()}}else v={items:sa(i,c,u,f)};a.update(v)})},r.prototype.update=function(){this.option=this.view.getOptions().axes;var t=new Map;this.updateXAxes(t),this.updateYAxes(t);var i=new Map;this.cache.forEach(function(n,a){t.has(a)?i.set(a,n):n.component.destroy()}),this.cache=i},r.prototype.clear=function(){e.prototype.clear.call(this),this.cache.clear(),this.gridContainer.clear(),this.gridForeContainer.clear(),this.axisContainer.clear(),this.axisForeContainer.clear()},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.gridContainer.remove(!0),this.gridForeContainer.remove(!0),this.axisContainer.remove(!0),this.axisForeContainer.remove(!0)},r.prototype.getComponents=function(){var t=[];return this.cache.forEach(function(i){t.push(i)}),t},r.prototype.updateXAxes=function(t){var i=this.view.getXScale();if(!(!i||i.isIdentity)){var n=Wn(this.option,i.field);if(n!==!1){var a=Kl(n,E.BOTTOM),o=J.BG,s="x",l=this.view.getCoordinate(),u=this.getId("axis",i.field),c=this.getId("grid",i.field);if(l.isRect){var f=this.cache.get(u);if(f){var v=this.getLineAxisCfg(i,n,a);Oe(v,Fr),f.component.update(v),t.set(u,f)}else f=this.createLineAxis(i,n,o,a,s),this.cache.set(u,f),t.set(u,f);var d=this.cache.get(c);if(d){var v=this.getLineGridCfg(i,n,a,s);Oe(v,Fr),d.component.update(v),t.set(c,d)}else d=this.createLineGrid(i,n,o,a,s),d&&(this.cache.set(c,d),t.set(c,d))}else if(l.isPolar){var f=this.cache.get(u);if(f){var v=l.isTransposed?this.getLineAxisCfg(i,n,E.RADIUS):this.getCircleAxisCfg(i,n,a);Oe(v,Fr),f.component.update(v),t.set(u,f)}else{if(l.isTransposed){if((0,h.isUndefined)(n))return;f=this.createLineAxis(i,n,o,E.RADIUS,s)}else f=this.createCircleAxis(i,n,o,a,s);this.cache.set(u,f),t.set(u,f)}var d=this.cache.get(c);if(d){var v=l.isTransposed?this.getCircleGridCfg(i,n,E.RADIUS,s):this.getLineGridCfg(i,n,E.CIRCLE,s);Oe(v,Fr),d.component.update(v),t.set(c,d)}else{if(l.isTransposed){if((0,h.isUndefined)(n))return;d=this.createCircleGrid(i,n,o,E.RADIUS,s)}else d=this.createLineGrid(i,n,o,E.CIRCLE,s);d&&(this.cache.set(c,d),t.set(c,d))}}}}},r.prototype.updateYAxes=function(t){var i=this,n=this.view.getYScales();(0,h.each)(n,function(a,o){if(!(!a||a.isIdentity)){var s=a.field,l=Wn(i.option,s);if(l!==!1){var u=J.BG,c="y",f=i.getId("axis",s),v=i.getId("grid",s),d=i.view.getCoordinate();if(d.isRect){var p=Kl(l,o===0?E.LEFT:E.RIGHT),y=i.cache.get(f);if(y){var m=i.getLineAxisCfg(a,l,p);Oe(m,Fr),y.component.update(m),t.set(f,y)}else y=i.createLineAxis(a,l,u,p,c),i.cache.set(f,y),t.set(f,y);var x=i.cache.get(v);if(x){var m=i.getLineGridCfg(a,l,p,c);Oe(m,Fr),x.component.update(m),t.set(v,x)}else x=i.createLineGrid(a,l,u,p,c),x&&(i.cache.set(v,x),t.set(v,x))}else if(d.isPolar){var y=i.cache.get(f);if(y){var m=d.isTransposed?i.getCircleAxisCfg(a,l,E.CIRCLE):i.getLineAxisCfg(a,l,E.RADIUS);Oe(m,Fr),y.component.update(m),t.set(f,y)}else{if(d.isTransposed){if((0,h.isUndefined)(l))return;y=i.createCircleAxis(a,l,u,E.CIRCLE,c)}else y=i.createLineAxis(a,l,u,E.RADIUS,c);i.cache.set(f,y),t.set(f,y)}var x=i.cache.get(v);if(x){var m=d.isTransposed?i.getLineGridCfg(a,l,E.CIRCLE,c):i.getCircleGridCfg(a,l,E.RADIUS,c);Oe(m,Fr),x.component.update(m),t.set(v,x)}else{if(d.isTransposed){if((0,h.isUndefined)(l))return;x=i.createLineGrid(a,l,u,E.CIRCLE,c)}else x=i.createCircleGrid(a,l,u,E.RADIUS,c);x&&(i.cache.set(v,x),t.set(v,x))}}}}})},r.prototype.createLineAxis=function(t,i,n,a,o){var s={component:new Wp(this.getLineAxisCfg(t,i,a)),layer:n,direction:a===E.RADIUS?E.NONE:a,type:N.AXIS,extra:{dim:o,scale:t}};return s.component.set("field",t.field),s.component.init(),s},r.prototype.createLineGrid=function(t,i,n,a,o){var s=this.getLineGridCfg(t,i,a,o);if(s){var l={component:new Yp(s),layer:n,direction:E.NONE,type:N.GRID,extra:{dim:o,scale:t,alignTick:(0,h.get)(s,"alignTick",!0)}};return l.component.init(),l}},r.prototype.createCircleAxis=function(t,i,n,a,o){var s={component:new Hp(this.getCircleAxisCfg(t,i,a)),layer:n,direction:a,type:N.AXIS,extra:{dim:o,scale:t}};return s.component.set("field",t.field),s.component.init(),s},r.prototype.createCircleGrid=function(t,i,n,a,o){var s=this.getCircleGridCfg(t,i,a,o);if(s){var l={component:new Xp(s),layer:n,direction:E.NONE,type:N.GRID,extra:{dim:o,scale:t,alignTick:(0,h.get)(s,"alignTick",!0)}};return l.component.init(),l}},r.prototype.getLineAxisCfg=function(t,i,n){var a=(0,h.get)(i,["top"])?this.axisForeContainer:this.axisContainer,o=this.view.getCoordinate(),s=Vn(o,n),l=$l(t,i),u=Gn(this.view.getTheme(),n),c=(0,h.get)(i,["title"])?(0,h.deepMix)({title:{style:{text:l}}},{title:ql(this.view.getTheme(),n,i.title)},i):i,f=(0,h.deepMix)((0,g.__assign)((0,g.__assign)({container:a},s),{ticks:t.getTicks().map(function(w){return{id:"".concat(w.tickValue),name:w.text,value:w.value}}),verticalFactor:o.isPolar?Zl(s,o.getCenter())*-1:Zl(s,o.getCenter()),theme:u}),u,c),v=this.getAnimateCfg(f),d=v.animate,p=v.animateOption;f.animateOption=p,f.animate=d;var y=jl(s),m=(0,h.get)(f,"verticalLimitLength",y?1/3:1/2);if(m<=1){var x=this.view.getCanvas().get("width"),_=this.view.getCanvas().get("height");f.verticalLimitLength=m*(y?x:_)}return f},r.prototype.getLineGridCfg=function(t,i,n,a){if(!!Fc(Gn(this.view.getTheme(),n),i)){var o=Mc(this.view.getTheme(),n),s=(0,h.deepMix)({container:(0,h.get)(i,["top"])?this.gridForeContainer:this.gridContainer},o,(0,h.get)(i,"grid"),this.getAnimateCfg(i));return s.items=sa(this.view.getCoordinate(),t,a,(0,h.get)(s,"alignTick",!0)),s}},r.prototype.getCircleAxisCfg=function(t,i,n){var a=(0,h.get)(i,["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.length&&(s[s.length-1].name="");var l=$l(t,i),u=Gn(this.view.getTheme(),E.CIRCLE),c=(0,h.get)(i,["title"])?(0,h.deepMix)({title:{style:{text:l}}},{title:ql(this.view.getTheme(),n,i.title)},i):i,f=(0,h.deepMix)((0,g.__assign)((0,g.__assign)({container:a},yo(this.view.getCoordinate())),{ticks:s,verticalFactor:1,theme:u}),u,c),v=this.getAnimateCfg(f),d=v.animate,p=v.animateOption;return f.animate=d,f.animateOption=p,f},r.prototype.getCircleGridCfg=function(t,i,n,a){if(!!Fc(Gn(this.view.getTheme(),n),i)){var o=Mc(this.view.getTheme(),E.RADIUS),s=(0,h.deepMix)({container:(0,h.get)(i,["top"])?this.gridForeContainer:this.gridContainer,center:this.view.getCoordinate().getCenter()},o,(0,h.get)(i,"grid"),this.getAnimateCfg(i)),l=(0,h.get)(s,"alignTick",!0),u=a==="x"?this.view.getYScales()[0]:this.view.getXScale();return s.items=Zo(this.view.getCoordinate(),u,t,l,a),s}},r.prototype.getId=function(t,i){var n=this.view.getCoordinate();return"".concat(t,"-").concat(i,"-").concat(n.type)},r.prototype.getAnimateCfg=function(t){return{animate:this.view.getOptions().animate&&(0,h.get)(t,"animate"),animateOption:t&&t.animateOption?(0,h.deepMix)({},Ec,t.animateOption):Ec}},r}(di),qx=Zx;function Er(e,r,t){return t===E.TOP?[e.minX+e.width/2-r.width/2,e.minY]:t===E.BOTTOM?[e.minX+e.width/2-r.width/2,e.maxY-r.height]:t===E.LEFT?[e.minX,e.minY+e.height/2-r.height/2]:t===E.RIGHT?[e.maxX-r.width,e.minY+e.height/2-r.height/2]:t===E.TOP_LEFT||t===E.LEFT_TOP?[e.tl.x,e.tl.y]:t===E.TOP_RIGHT||t===E.RIGHT_TOP?[e.tr.x-r.width,e.tr.y]:t===E.BOTTOM_LEFT||t===E.LEFT_BOTTOM?[e.bl.x,e.bl.y-r.height]:t===E.BOTTOM_RIGHT||t===E.RIGHT_BOTTOM?[e.br.x-r.width,e.br.y-r.height]:[0,0]}function Kx(e,r){if(r.isTransposed)switch(e){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 e}function Tc(e){return e===DIRECTION.LEFT?DIRECTION.RIGHT:e===DIRECTION.RIGHT?DIRECTION.LEFT:e}function Lc(e){return e===DIRECTION.TOP?DIRECTION.BOTTOM:e===DIRECTION.BOTTOM?DIRECTION.TOP:e}function $x(e,r){var t=r.matrix[0],i=r.matrix[4],n=e;return t<0&&(n=Tc(n)),i<0&&(n=Lc(n)),n}function Qx(e,r){var t=e;return r.isReflect("x")&&(t=Tc(t)),r.isReflect("y")&&(t=Lc(t)),t}function iI(e,r){var t=e;return t=Kx(t,r),t=$x(t,r),t=Qx(t,r),t}function Ic(e,r){return(0,h.isBoolean)(e)?e===!1?!1:{}:(0,h.get)(e,[r],e)}function la(e){return(0,h.get)(e,"position",E.BOTTOM)}var Jx=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.container=i.view.getLayer(J.FORE).addGroup(),i}return Object.defineProperty(r.prototype,"name",{get:function(){return"legend"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.render=function(){this.update()},r.prototype.layout=function(){var t=this;this.layoutBBox=this.view.viewBBox,(0,h.each)(this.components,function(i){var n=i.component,a=i.direction,o=Lo(a),s=n.get("maxWidthRatio"),l=n.get("maxHeightRatio"),u=t.getCategoryLegendSizeCfg(o,s,l),c=n.get("maxWidth"),f=n.get("maxHeight");n.update({maxWidth:Math.min(u.maxWidth,c||0),maxHeight:Math.min(u.maxHeight,f||0)});var v=n.get("padding"),d=n.getLayoutBBox(),p=new Ee(d.x,d.y,d.width,d.height).expand(v),y=(0,g.__read)(Er(t.view.viewBBox,p,a),2),m=y[0],x=y[1],_=(0,g.__read)(Er(t.layoutBBox,p,a),2),w=_[0],b=_[1],S=0,C=0;a.startsWith("top")||a.startsWith("bottom")?(S=m,C=b):(S=w,C=x),n.setLocation({x:S+v[3],y:C+v[0]}),t.layoutBBox=t.layoutBBox.cut(p,a)})},r.prototype.update=function(){var t=this;this.option=this.view.getOptions().legends;var i={},n=function(v,d,p){var y=t.getId(p.field),m=t.getComponentById(y);if(m){var x=void 0,_=Ic(t.option,p.field);_!==!1&&((0,h.get)(_,"custom")?x=t.getCategoryCfg(v,d,p,_,!0):p.isLinear?x=t.getContinuousCfg(v,d,p,_):p.isCategory&&(x=t.getCategoryCfg(v,d,p,_))),x&&(Oe(x,["container"]),m.direction=la(_),m.component.update(x),i[y]=!0)}else{var w=t.createFieldLegend(v,d,p);w&&(w.component.init(),t.components.push(w),i[y]=!0)}};if((0,h.get)(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);Oe(s,["container"]),o.component.update(s),i[a]=!0}else{var l=this.createCustomLegend(void 0,void 0,void 0,this.option);if(l){l.init();var u=J.FORE,c=la(this.option);this.components.push({id:a,component:l,layer:u,direction:c,type:N.LEGEND,extra:void 0}),i[a]=!0}}}else this.loopLegends(n);var f=[];(0,h.each)(this.getComponents(),function(v){i[v.id]?f.push(v):v.component.destroy()}),this.components=f},r.prototype.clear=function(){e.prototype.clear.call(this),this.container.clear()},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.container.remove(!0)},r.prototype.getGeometries=function(t){var i=this,n=t.geometries;return(0,h.each)(t.views,function(a){n=n.concat(i.getGeometries(a))}),n},r.prototype.loopLegends=function(t){var i=this.view.getRootView()===this.view;if(!!i){var n=this.getGeometries(this.view),a={};(0,h.each)(n,function(o){var s=o.getGroupAttributes();(0,h.each)(s,function(l){var u=l.getScale(l.type);!u||u.type==="identity"||a[u.field]||(t(o,l,u),a[u.field]=!0)})})}},r.prototype.createFieldLegend=function(t,i,n){var a,o=Ic(this.option,n.field),s=J.FORE,l=la(o);if(o!==!1&&((0,h.get)(o,"custom")?a=this.createCustomLegend(t,i,n,o):n.isLinear?a=this.createContinuousLegend(t,i,n,o):n.isCategory&&(a=this.createCategoryLegend(t,i,n,o))),a)return a.set("field",n.field),{id:this.getId(n.field),component:a,layer:s,direction:l,type:N.LEGEND,extra:{scale:n}}},r.prototype.createCustomLegend=function(t,i,n,a){var o=this.getCategoryCfg(t,i,n,a,!0);return new Vl(o)},r.prototype.createContinuousLegend=function(t,i,n,a){var o=this.getContinuousCfg(t,i,n,Oe(a,["value"]));return new Up(o)},r.prototype.createCategoryLegend=function(t,i,n,a){var o=this.getCategoryCfg(t,i,n,a);return new Vl(o)},r.prototype.getContinuousCfg=function(t,i,n,a){var o=n.getTicks(),s=(0,h.find)(o,function(y){return y.value===0}),l=(0,h.find)(o,function(y){return y.value===1}),u=o.map(function(y){var m=y.value,x=y.tickValue,_=i.mapping(n.invert(m)).join("");return{value:x,attrValue:_,color:_,scaleValue:m}});s||u.push({value:n.min,attrValue:i.mapping(n.invert(0)).join(""),color:i.mapping(n.invert(0)).join(""),scaleValue:0}),l||u.push({value:n.max,attrValue:i.mapping(n.invert(1)).join(""),color:i.mapping(n.invert(1)).join(""),scaleValue:1}),u.sort(function(y,m){return y.value-m.value});var c={min:(0,h.head)(u).value,max:(0,h.last)(u).value,colors:[],rail:{type:i.type},track:{}};i.type==="size"&&(c.track={style:{fill:i.type==="size"?this.view.getTheme().defaultColor:void 0}}),i.type==="color"&&(c.colors=u.map(function(y){return y.attrValue}));var f=this.container,v=la(a),d=Lo(v),p=(0,h.get)(a,"title");return p&&(p=(0,h.deepMix)({text:ji(n)},p)),c.container=f,c.layout=d,c.title=p,c.animateOption=gi,this.mergeLegendCfg(c,a,"continuous")},r.prototype.getCategoryCfg=function(t,i,n,a,o){var s=this.container,l=(0,h.get)(a,"position",E.BOTTOM),u=Yu(this.view.getTheme(),l),c=(0,h.get)(u,["marker"]),f=(0,h.get)(a,"marker"),v=Lo(l),d=(0,h.get)(u,["pageNavigator"]),p=(0,h.get)(a,"pageNavigator"),y=o?L0(c,f,a.items):Hu(this.view,t,i,c,f),m=(0,h.get)(a,"title");m&&(m=(0,h.deepMix)({text:n?ji(n):""},m));var x=(0,h.get)(a,"maxWidthRatio"),_=(0,h.get)(a,"maxHeightRatio"),w=this.getCategoryLegendSizeCfg(v,x,_);w.container=s,w.layout=v,w.items=y,w.title=m,w.animateOption=gi,w.pageNavigator=(0,h.deepMix)({},d,p);var b=this.mergeLegendCfg(w,a,l);b.reversed&&b.items.reverse();var S=(0,h.get)(b,"maxItemWidth");return S&&S<=1&&(b.maxItemWidth=this.view.viewBBox.width*S),b},r.prototype.mergeLegendCfg=function(t,i,n){var a=n.split("-")[0],o=Yu(this.view.getTheme(),a);return(0,h.deepMix)({},o,t,i)},r.prototype.getId=function(t){return"".concat(this.name,"-").concat(t)},r.prototype.getComponentById=function(t){return(0,h.find)(this.components,function(i){return i.id===t})},r.prototype.getCategoryLegendSizeCfg=function(t,i,n){i===void 0&&(i=qt),n===void 0&&(n=qt);var a=this.view.viewBBox,o=a.width,s=a.height;return t==="vertical"?{maxWidth:o*i,maxHeight:s}:{maxWidth:o,maxHeight:s*n}},r}(di),t_=Jx,e_=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.onChangeFn=h.noop,i.resetMeasure=function(){i.clear()},i.onValueChange=function(n){var a=(0,g.__read)(n,2),o=a[0],s=a[1];i.start=o,i.end=s,i.changeViewData(o,s)},i.container=i.view.getLayer(J.FORE).addGroup(),i.onChangeFn=(0,h.throttle)(i.onValueChange,20,{leading:!0}),i.width=0,i.view.on(L.BEFORE_CHANGE_DATA,i.resetMeasure),i.view.on(L.BEFORE_CHANGE_SIZE,i.resetMeasure),i}return Object.defineProperty(r.prototype,"name",{get:function(){return"slider"},enumerable:!1,configurable:!0}),r.prototype.destroy=function(){e.prototype.destroy.call(this),this.view.off(L.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(L.BEFORE_CHANGE_SIZE,this.resetMeasure)},r.prototype.init=function(){},r.prototype.render=function(){this.option=this.view.getOptions().slider;var t=this.getSliderCfg(),i=t.start,n=t.end;(0,h.isNil)(this.start)&&(this.start=i,this.end=n);var a=this.view.getOptions().data;this.option&&!(0,h.isEmpty)(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)},r.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 i=this.view.coordinateBBox.width,n=this.slider.component.get("padding"),a=(0,g.__read)(n,4),o=a[0],s=a[1],l=a[2],u=a[3],c=this.slider.component.getLayoutBBox(),f=new Ee(c.x,c.y,Math.min(c.width,i),c.height).expand(n),v=this.getMinMaxText(this.start,this.end),d=v.minText,p=v.maxText,y=(0,g.__read)(Er(this.view.viewBBox,f,E.BOTTOM),2),m=y[0],x=y[1],_=(0,g.__read)(Er(this.view.coordinateBBox,f,E.BOTTOM),2),w=_[0],b=_[1];this.slider.component.update((0,g.__assign)((0,g.__assign)({},this.getSliderCfg()),{x:w+u,y:x+o,width:this.width,start:this.start,end:this.end,minText:d,maxText:p})),this.view.viewBBox=this.view.viewBBox.cut(f,E.BOTTOM)}},r.prototype.update=function(){this.render()},r.prototype.createSlider=function(){var t=this.getSliderCfg(),i=new zp((0,g.__assign)({container:this.container},t));return i.init(),{component:i,layer:J.FORE,direction:E.BOTTOM,type:N.SLIDER}},r.prototype.updateSlider=function(){var t=this.getSliderCfg();if(this.width){var i=this.getMinMaxText(this.start,this.end),n=i.minText,a=i.maxText;t=(0,g.__assign)((0,g.__assign)({},t),{width:this.width,start:this.start,end:this.end,minText:n,maxText:a})}return this.slider.component.update(t),this.slider},r.prototype.measureSlider=function(){var t=this.getSliderCfg().width;this.width=t},r.prototype.getSliderCfg=function(){var t={height:16,start:0,end:1,minText:"",maxText:"",x:0,y:0,width:this.view.coordinateBBox.width};if((0,h.isObject)(this.option)){var i=(0,g.__assign)({data:this.getData()},(0,h.get)(this.option,"trendCfg",{}));t=(0,h.deepMix)({},t,this.getThemeOptions(),this.option),t=(0,g.__assign)((0,g.__assign)({},t),{trendCfg:i})}return t.start=(0,h.clamp)(Math.min((0,h.isNil)(t.start)?0:t.start,(0,h.isNil)(t.end)?1:t.end),0,1),t.end=(0,h.clamp)(Math.max((0,h.isNil)(t.start)?0:t.start,(0,h.isNil)(t.end)?1:t.end),0,1),t},r.prototype.getData=function(){var t=this.view.getOptions().data,i=(0,g.__read)(this.view.getYScales(),1),n=i[0],a=this.view.getGroupScales();if(a.length){var o=a[0],s=o.field,l=o.ticks;return t.reduce(function(u,c){return c[s]===l[0]&&u.push(c[n.field]),u},[])}return t.map(function(u){return u[n.field]||0})},r.prototype.getThemeOptions=function(){var t=this.view.getTheme();return(0,h.get)(t,["components","slider","common"],{})},r.prototype.getMinMaxText=function(t,i){var n=this.view.getOptions().data,a=this.view.getXScale(),o=!0,s=(0,h.valuesOfKey)(n,a.field);a.isLinear&&(s=s.sort());var l=o?s:s.reverse(),u=(0,h.size)(n);if(!a||!u)return{};var c=(0,h.size)(l),f=Math.round(t*(c-1)),v=Math.round(i*(c-1)),d=(0,h.get)(l,[f]),p=(0,h.get)(l,[v]),y=this.getSliderCfg().formatter;return y&&(d=y(d,n[f],f),p=y(p,n[v],v)),{minText:d,maxText:p}},r.prototype.changeViewData=function(t,i){var n=this.view.getOptions().data,a=this.view.getXScale(),o=(0,h.size)(n);if(!(!a||!o)){var s=!0,l=(0,h.valuesOfKey)(n,a.field),u=this.view.getXScale().isLinear?l.sort(function(p,y){return Number(p)-Number(y)}):l,c=s?u:u.reverse(),f=(0,h.size)(c),v=Math.round(t*(f-1)),d=Math.round(i*(f-1));this.view.filter(a.field,function(p,y){var m=c.indexOf(p);return m>-1?li(m,v,d):!0}),this.view.render(!0)}},r.prototype.getComponents=function(){return this.slider?[this.slider]:[]},r.prototype.clear=function(){this.slider&&(this.slider.component.destroy(),this.slider=void 0),this.width=0,this.start=void 0,this.end=void 0},r}(di),r_=e_,ua=0,Oc=8,i_=32,n_=20,a_=function(e){(0,g.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.onChangeFn=h.noop,i.resetMeasure=function(){i.clear()},i.onValueChange=function(n){var a=n.ratio,o=i.getValidScrollbarCfg().animate;i.ratio=(0,h.clamp)(a,0,1);var s=i.view.getOptions().animate;o||i.view.animate(!1),i.changeViewData(i.getScrollRange(),!0),i.view.animate(s)},i.container=i.view.getLayer(J.FORE).addGroup(),i.onChangeFn=(0,h.throttle)(i.onValueChange,20,{leading:!0}),i.trackLen=0,i.thumbLen=0,i.ratio=0,i.view.on(L.BEFORE_CHANGE_DATA,i.resetMeasure),i.view.on(L.BEFORE_CHANGE_SIZE,i.resetMeasure),i}return Object.defineProperty(r.prototype,"name",{get:function(){return"scrollbar"},enumerable:!1,configurable:!0}),r.prototype.destroy=function(){e.prototype.destroy.call(this),this.view.off(L.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(L.BEFORE_CHANGE_SIZE,this.resetMeasure)},r.prototype.init=function(){},r.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)},r.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 i=this.view.coordinateBBox.width,n=this.scrollbar.component.get("padding"),a=this.scrollbar.component.getLayoutBBox(),o=new Ee(a.x,a.y,Math.min(a.width,i),a.height).expand(n),s=this.getScrollbarComponentCfg(),l=void 0,u=void 0;if(s.isHorizontal){var c=(0,g.__read)(Er(this.view.viewBBox,o,E.BOTTOM),2),f=c[0],v=c[1],d=(0,g.__read)(Er(this.view.coordinateBBox,o,E.BOTTOM),2),p=d[0],y=d[1];l=p,u=v}else{var m=(0,g.__read)(Er(this.view.viewBBox,o,E.RIGHT),2),f=m[0],v=m[1],x=(0,g.__read)(Er(this.view.viewBBox,o,E.RIGHT),2),p=x[0],y=x[1];l=p,u=v}l+=n[3],u+=n[0],this.trackLen?this.scrollbar.component.update((0,g.__assign)((0,g.__assign)({},s),{x:l,y:u,trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio})):this.scrollbar.component.update((0,g.__assign)((0,g.__assign)({},s),{x:l,y:u})),this.view.viewBBox=this.view.viewBBox.cut(o,s.isHorizontal?E.BOTTOM:E.RIGHT)}},r.prototype.update=function(){this.render()},r.prototype.getComponents=function(){return this.scrollbar?[this.scrollbar]:[]},r.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=[]},r.prototype.setValue=function(t){this.onValueChange({ratio:t})},r.prototype.getValue=function(){return this.ratio},r.prototype.getThemeOptions=function(){var t=this.view.getTheme();return(0,h.get)(t,["components","scrollbar","common"],{})},r.prototype.getScrollbarTheme=function(t){var i=(0,h.get)(this.view.getTheme(),["components","scrollbar"]),n=t||{},a=n.thumbHighlightColor,o=(0,g.__rest)(n,["thumbHighlightColor"]);return{default:(0,h.deepMix)({},(0,h.get)(i,["default","style"],{}),o),hover:(0,h.deepMix)({},(0,h.get)(i,["hover","style"],{}),{thumbColor:a})}},r.prototype.measureScrollbar=function(){var t=this.view.getXScale(),i=this.view.getYScales().slice();this.data=this.getScrollbarData(),this.step=this.getStep(),this.cnt=this.getCnt();var n=this.getScrollbarComponentCfg(),a=n.trackLen,o=n.thumbLen;this.trackLen=a,this.thumbLen=o,this.xScaleCfg={field:t.field,values:t.values||[]},this.yScalesCfg=i},r.prototype.getScrollRange=function(){var t=Math.floor((this.cnt-this.step)*(0,h.clamp)(this.ratio,0,1)),i=Math.min(t+this.step-1,this.cnt-1);return[t,i]},r.prototype.changeViewData=function(t,i){var n=this,a=(0,g.__read)(t,2),o=a[0],s=a[1],l=this.getValidScrollbarCfg().type,u=l!=="vertical",c=(0,h.valuesOfKey)(this.data,this.xScaleCfg.field),f=this.view.getXScale().isLinear?c.sort(function(d,p){return Number(d)-Number(p)}):c,v=u?f:f.reverse();this.yScalesCfg.forEach(function(d){n.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 p=v.indexOf(d);return p>-1?li(p,o,s):!0}),this.view.render(!0)},r.prototype.createScrollbar=function(){var t=this.getValidScrollbarCfg().type,i=t!=="vertical",n=new Gp((0,g.__assign)((0,g.__assign)({container:this.container},this.getScrollbarComponentCfg()),{x:0,y:0}));return n.init(),{component:n,layer:J.FORE,direction:i?E.BOTTOM:E.RIGHT,type:N.SCROLLBAR}},r.prototype.updateScrollbar=function(){var t=this.getScrollbarComponentCfg(),i=this.trackLen?(0,g.__assign)((0,g.__assign)({},t),{trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio}):(0,g.__assign)({},t);return this.scrollbar.component.update(i),this.scrollbar},r.prototype.getStep=function(){if(this.step)return this.step;var t=this.view.coordinateBBox,i=this.getValidScrollbarCfg(),n=i.type,a=i.categorySize,o=n!=="vertical";return Math.floor((o?t.width:t.height)/a)},r.prototype.getCnt=function(){if(this.cnt)return this.cnt;var t=this.view.getXScale(),i=this.getScrollbarData(),n=(0,h.valuesOfKey)(i,t.field);return(0,h.size)(n)},r.prototype.getScrollbarComponentCfg=function(){var t=this.view,i=t.coordinateBBox,n=t.viewBBox,a=this.getValidScrollbarCfg(),o=a.type,s=a.padding,l=a.width,u=a.height,c=a.style,f=o!=="vertical",v=(0,g.__read)(s,4),d=v[0],p=v[1],y=v[2],m=v[3],x=f?{x:i.minX+m,y:n.maxY-u-y}:{x:n.maxX-l-p,y:i.minY+d},_=this.getStep(),w=this.getCnt(),b=f?i.width-m-p:i.height-d-y,S=Math.max(b*(0,h.clamp)(_/w,0,1),n_);return(0,g.__assign)((0,g.__assign)({},this.getThemeOptions()),{x:x.x,y:x.y,size:f?u:l,isHorizontal:f,trackLen:b,thumbLen:S,thumbOffset:0,theme:this.getScrollbarTheme(c)})},r.prototype.getValidScrollbarCfg=function(){var t={type:"horizontal",categorySize:i_,width:Oc,height:Oc,padding:[0,0,0,0],animate:!0,style:{}};return(0,h.isObject)(this.option)&&(t=(0,g.__assign)((0,g.__assign)({},t),this.option)),(!(0,h.isObject)(this.option)||!this.option.padding)&&(t.padding=t.type==="horizontal"?[ua,0,ua,0]:[0,ua,0,ua]),t},r.prototype.getScrollbarData=function(){var t=this.view.getCoordinate(),i=this.getValidScrollbarCfg(),n=this.view.getOptions().data||[];return t.isReflect("y")&&i.type==="vertical"&&(n=(0,g.__spreadArray)([],(0,g.__read)(n),!1).reverse()),n},r}(di),o_=a_,s_={fill:"#CCD6EC",opacity:.3};function l_(e,r,t){var i,n,a,o,s,l,u=Zy(e,r,t);if(u.length){u=(0,h.flatten)(u);try{for(var c=(0,g.__values)(u),f=c.next();!f.done;f=c.next()){var v=f.value;try{for(var d=(a=void 0,(0,g.__values)(v)),p=d.next();!p.done;p=d.next()){var y=p.value,m=y.mappingData,x=m.x,_=m.y;y.x=(0,h.isArray)(x)?x[x.length-1]:x,y.y=(0,h.isArray)(_)?_[_.length-1]:_}}catch(I){a={error:I}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(a)throw a.error}}}}catch(I){i={error:I}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(i)throw i.error}}var w=t.shared;if(w===!1&&u.length>1){var b=u[0],S=Math.abs(r.y-b[0].y);try{for(var C=(0,g.__values)(u),A=C.next();!A.done;A=C.next()){var F=A.value,P=Math.abs(r.y-F[0].y);P<=S&&(b=F,S=P)}}catch(I){s={error:I}}finally{try{A&&!A.done&&(l=C.return)&&l.call(C)}finally{if(s)throw s.error}}u=[b]}return(0,h.uniq)((0,h.flatten)(u))}return[]}var u_=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.show=function(t){var i=this.context.view,n=this.context.event,a=i.getController("tooltip").getTooltipCfg(),o=l_(i,{x:n.x,y:n.y},a);if(!(0,h.isEqual)(o,this.items)&&(this.items=o,o.length)){var s=i.getXScale().field,l=o[0].data[s],u=[],c=i.geometries;if((0,h.each)(c,function(mt){if(mt.type==="interval"||mt.type==="schema"){var ut=mt.getElementsBy(function(pt){var At=pt.getData();return At[s]===l});u=u.concat(ut)}}),u.length){var f=i.getCoordinate(),v=u[0].shape.getCanvasBBox(),d=u[0].shape.getCanvasBBox(),p=v;(0,h.each)(u,function(mt){var ut=mt.shape.getCanvasBBox();f.isTransposed?(ut.minY<v.minY&&(v=ut),ut.maxY>d.maxY&&(d=ut)):(ut.minX<v.minX&&(v=ut),ut.maxX>d.maxX&&(d=ut)),p.x=Math.min(ut.minX,p.minX),p.y=Math.min(ut.minY,p.minY),p.width=Math.max(ut.maxX,p.maxX)-p.x,p.height=Math.max(ut.maxY,p.maxY)-p.y});var y=i.backgroundGroup,m=i.coordinateBBox,x=void 0;if(f.isRect){var _=i.getXScale(),w=t||{},b=w.appendRatio,S=w.appendWidth;(0,h.isNil)(S)&&(b=(0,h.isNil)(b)?_.isLinear?0:.25:b,S=f.isTransposed?b*d.height:b*v.width);var C=void 0,A=void 0,F=void 0,P=void 0;f.isTransposed?(C=m.minX,A=Math.min(d.minY,v.minY)-S,F=m.width,P=p.height+S*2):(C=Math.min(v.minX,d.minX)-S,A=m.minY,F=p.width+S*2,P=m.height),x=[["M",C,A],["L",C+F,A],["L",C+F,A+P],["L",C,A+P],["Z"]]}else{var I=(0,h.head)(u),V=(0,h.last)(u),Z=Xi(I.getModel(),f).startAngle,vt=Xi(V.getModel(),f).endAngle,yt=f.getCenter(),Bt=f.getRadius(),G=f.innerRadius*Bt;x=_r(yt.x,yt.y,Bt,Z,vt,G)}if(this.regionPath)this.regionPath.attr("path",x),this.regionPath.show();else{var at=(0,h.get)(t,"style",s_);this.regionPath=y.addShape({type:"path",name:"active-region",capture:!1,attrs:(0,g.__assign)((0,g.__assign)({},at),{path:x})})}}}},r.prototype.hide=function(){this.regionPath&&this.regionPath.hide(),this.items=null},r.prototype.destroy=function(){this.hide(),this.regionPath&&this.regionPath.remove(!0),e.prototype.destroy.call(this)},r}(ne),c_=u_,h_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return r.prototype.show=function(){var t=this.context,i=t.event,n=t.view,a=n.isTooltipLocked();if(!a){var o=this.timeStamp,s=+new Date,l=(0,h.get)(t.view.getOptions(),"tooltip.showDelay",16);if(s-o>l){var u=this.location,c={x:i.x,y:i.y};(!u||!(0,h.isEqual)(u,c))&&this.showTooltip(n,c),this.timeStamp=s,this.location=c}}},r.prototype.hide=function(){var t=this.context.view,i=t.getController("tooltip"),n=this.context.event,a=n.clientX,o=n.clientY;i.isCursorEntered({x:a,y:o})||t.isTooltipLocked()||(this.hideTooltip(t),this.location=null)},r.prototype.showTooltip=function(t,i){t.showTooltip(i)},r.prototype.hideTooltip=function(t){t.hideTooltip()},r}(ne),Pc=h_,f_=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.showTooltip=function(t,i){var n=Qe(t);(0,h.each)(n,function(a){var o=wo(t,a,i);a.showTooltip(o)})},r.prototype.hideTooltip=function(t){var i=Qe(t);(0,h.each)(i,function(n){n.hideTooltip()})},r}(Pc),v_=f_,d_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return r.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},r.prototype.show=function(){var t=this.context,i=t.event,n=this.timeStamp,a=+new Date;if(a-n>16){var o=this.location,s={x:i.x,y:i.y};(!o||!(0,h.isEqual)(o,s))&&this.showTooltip(s),this.timeStamp=a,this.location=s}},r.prototype.hide=function(){this.hideTooltip(),this.location=null},r.prototype.showTooltip=function(t){var i=this.context,n=i.event,a=n.target;if(a&&a.get("tip")){this.tooltip||this.renderTooltip();var o=a.get("tip");this.tooltip.update((0,g.__assign)({title:o},t)),this.tooltip.show()}},r.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},r.prototype.renderTooltip=function(){var t,i=this.context.view,n=i.canvas,a={start:{x:0,y:0},end:{x:n.get("width"),y:n.get("height")}},o=i.getTheme(),s=(0,h.get)(o,["components","tooltip","domStyles"],{}),l=new Nn({parent:n.get("el").parentNode,region:a,visible:!1,crosshairs:null,domStyles:(0,g.__assign)({},(0,h.deepMix)({},s,(t={},t[sr]={"max-width":"50%"},t[lr]={"word-break":"break-all"},t)))});l.init(),l.setCapture(!1),this.tooltip=l},r}(ne),g_=d_,p_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="",t}return r.prototype.hasState=function(t){return t.hasState(this.stateName)},r.prototype.setElementState=function(t,i){t.setState(this.stateName,i)},r.prototype.setState=function(){this.setStateEnable(!0)},r.prototype.clear=function(){var t=this.context.view;this.clearViewState(t)},r.prototype.clearViewState=function(t){var i=this,n=cu(t,this.stateName);(0,h.each)(n,function(a){i.setElementState(a,!1)})},r}(ne),qo=p_;function kc(e){return(0,h.get)(e.get("delegateObject"),"item")}var y_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.ignoreListItemStates=["unchecked"],t}return r.prototype.isItemIgnore=function(t,i){var n=this.ignoreListItemStates,a=n.filter(function(o){return i.hasState(t,o)});return!!a.length},r.prototype.setStateByComponent=function(t,i,n){var a=this.context.view,o=t.get("field"),s=Ce(a);this.setElementsStateByItem(s,o,i,n)},r.prototype.setStateByElement=function(t,i){this.setElementState(t,i)},r.prototype.isMathItem=function(t,i,n){var a=this.context.view,o=fi(a,i),s=je(t,i);return!(0,h.isNil)(s)&&n.name===o.getText(s)},r.prototype.setElementsStateByItem=function(t,i,n,a){var o=this;(0,h.each)(t,function(s){o.isMathItem(s,i,n)&&s.setState(o.stateName,a)})},r.prototype.setStateEnable=function(t){var i=br(this.context);if(i)ou(this.context)&&this.setStateByElement(i,t);else{var n=zr(this.context);if(qi(n)){var a=n.item,o=n.component;if(a&&o&&!this.isItemIgnore(a,o)){var s=this.context.event.gEvent;if(s&&s.fromShape&&s.toShape&&kc(s.fromShape)===kc(s.toShape))return;this.setStateByComponent(o,a,t)}}}},r.prototype.toggle=function(){var t=br(this.context);if(t){var i=t.hasState(this.stateName);this.setElementState(t,!i)}},r.prototype.reset=function(){this.setStateEnable(!1)},r}(qo),Ko=y_,m_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.active=function(){this.setState()},r}(Ko),x_=m_,__=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.cache={},t}return r.prototype.getColorScale=function(t,i){var n=i.geometry.getAttribute("color");if(!n)return null;var a=t.getScaleByField(n.getFields()[0]);return a},r.prototype.getLinkPath=function(t,i){var n=this.context.view,a=n.getCoordinate().isTransposed,o=t.shape.getCanvasBBox(),s=i.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},r.prototype.addLinkShape=function(t,i,n,a){var o={opacity:.4,fill:i.shape.attr("fill")};t.addShape({type:"path",attrs:(0,g.__assign)((0,g.__assign)({},(0,h.deepMix)({},o,(0,h.isFunction)(a)?a(o,i):a)),{path:this.getLinkPath(i,n)})})},r.prototype.linkByElement=function(t,i){var n=this,a=this.context.view,o=this.getColorScale(a,t);if(!!o){var s=je(t,o.field);if(!this.cache[s]){var l=Sy(a,o.field,s),u=this.linkGroup,c=u.addGroup();this.cache[s]=c;var f=l.length;(0,h.each)(l,function(v,d){if(d<f-1){var p=l[d+1];n.addLinkShape(c,v,p,i)}})}}},r.prototype.removeLink=function(t){var i=this.getColorScale(this.context.view,t);if(!!i){var n=je(t,i.field);this.cache[n]&&(this.cache[n].remove(),this.cache[n]=null)}},r.prototype.link=function(t){var i=this.context;this.linkGroup||(this.linkGroup=i.view.foregroundGroup.addGroup({id:"link-by-color-group",capture:!1}));var n=br(i);n&&this.linkByElement(n,t==null?void 0:t.style)},r.prototype.unlink=function(){var t=br(this.context);t&&this.removeLink(t)},r.prototype.clear=function(){this.linkGroup&&this.linkGroup.clear(),this.cache={}},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.linkGroup&&this.linkGroup.remove()},r}(ne),w_=__,b_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.startPoint=null,t.endPoint=null,t.isStarted=!1,t.effectSiblings=!1,t.effectByRecord=!1,t}return r.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},r.prototype.start=function(){this.clear(),this.startPoint=this.getCurrentPoint(),this.isStarted=!0},r.prototype.getIntersectElements=function(){var t=null;if(Ki(this.context))t=xo(this.context,10);else{var i=this.startPoint,n=this.isStarted?this.getCurrentPoint():this.endPoint;if(!i||!n)return;var a={minX:Math.min(i.x,n.x),minY:Math.min(i.y,n.y),maxX:Math.max(i.x,n.x),maxY:Math.max(i.y,n.y)},o=this.context.view;t=jn(o,a)}return t},r.prototype.setStateEnable=function(t){if(this.effectSiblings&&!this.effectByRecord)this.setSiblingsState(t);else{var i=Ce(this.context.view),n=this.getIntersectElements();n&&n.length?this.effectByRecord?this.setSiblingsStateByRecord(n,t):this.setElementsState(n,t,i):this.clear()}},r.prototype.setSiblingsStateByRecord=function(t,i){var n=this,a=this.context.view,o=Qe(a),s=t.map(function(c){return c.getModel().data}),l=a.getXScale().field,u=a.getYScales()[0].field;(0,h.each)(o,function(c){var f=Ce(c),v=f.filter(function(d){var p=d.getModel().data;return gu(s,p,l,u)});n.setElementsState(v,i,f)})},r.prototype.setSiblingsState=function(t){var i=this,n=this.context.view,a=Qe(n);Ki(this.context)&&(0,h.each)(a,function(o){var s=Ce(o),l=lu(i.context,o,10);l&&l.length?i.setElementsState(l,t,s):i.clearViewState(o)})},r.prototype.setElementsState=function(t,i,n){var a=this;(0,h.each)(n,function(o){t.includes(o)?a.setElementState(o,i):a.setElementState(o,!1)})},r.prototype.end=function(){this.isStarted=!1,this.endPoint=this.getCurrentPoint()},r.prototype.clear=function(){var t=this,i=this.context.view;if(this.effectSiblings){var n=Qe(i);(0,h.each)(n,function(a){t.clearViewState(a)})}else this.clearViewState(i)},r}(qo),$o=b_,S_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.active=function(){this.setState()},r}($o),C_=S_,A_=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setStateEnable=function(t){var i=br(this.context);if(i){if(!ou(this.context))return;t?(this.clear(),this.setElementState(i,!0)):this.hasState(i)&&this.setElementState(i,!1)}},r.prototype.toggle=function(){var t=br(this.context);if(t){var i=this.hasState(t);i||this.clear(),this.setElementState(t,!i)}},r.prototype.reset=function(){this.setStateEnable(!1)},r}(qo),Qo=A_,M_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.active=function(){this.setState()},r}(Qo),F_=M_,rn="inactive",nn="active";function Jo(e){var r=Ce(e);(0,h.each)(r,function(t){t.hasState(nn)&&t.setState(nn,!1),t.hasState(rn)&&t.setState(rn,!1)})}function Dc(e,r,t){(0,h.each)(e,function(i){r(i)?(i.hasState(rn)&&i.setState(rn,!1),i.setState(nn,t)):(i.hasState(nn)&&i.setState(nn,!1),i.setState(rn,t))})}var Wr=ht.INACTIVE,cr=ht.ACTIVE,E_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName=cr,t}return r.prototype.setElementsStateByItem=function(t,i,n,a){var o=this,s=function(l){return o.isMathItem(l,i,n)};this.setHighlightBy(t,s,a)},r.prototype.setElementHighlight=function(t,i){i(t)?(t.hasState(Wr)&&t.setState(Wr,!1),t.setState(cr,!0)):t.hasState(cr)||t.setState(Wr,!0)},r.prototype.setHighlightBy=function(t,i,n){var a=this;if(n)(0,h.each)(t,function(l){a.setElementHighlight(l,i)});else{var o=cu(this.context.view,cr),s=!0;(0,h.each)(o,function(l){if(!i(l))return s=!1,!1}),s?this.clear():(0,h.each)(t,function(l){i(l)&&(l.hasState(cr)&&l.setState(cr,!1),l.setState(Wr,!0))})}},r.prototype.setElementState=function(t,i){var n=this.context.view,a=Ce(n);this.setHighlightBy(a,function(o){return t===o},i)},r.prototype.highlight=function(){this.setState()},r.prototype.clear=function(){var t=this.context.view;Jo(t)},r}(Ko),ts=E_,T_=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setStateByElement=function(t,i){var n=this.context.view,a=t.geometry.getAttribute("color");if(!!a){var o=n.getScaleByField(a.getFields()[0]),s=je(t,o.field),l=Ce(n),u=l.filter(function(c){return je(c,o.field)===s});this.setHighlightBy(l,function(c){return u.includes(c)},i)}},r}(ts),L_=T_,I_=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setElementHighlight=function(t,i){i(t)?(t.hasState(Wr)&&t.setState(Wr,!1),t.setState(cr,!0)):(t.setState(Wr,!0),t.hasState(cr)&&t.setState(cr,!1))},r.prototype.setStateByElement=function(t,i){var n=this.context.view,a=n.getXScale(),o=je(t,a.field),s=Ce(n),l=s.filter(function(u){return je(u,a.field)===o});this.setHighlightBy(s,function(u){return l.includes(u)},i)},r.prototype.toggle=function(){var t=br(this.context);if(t){var i=t.hasState(this.stateName);this.setStateByElement(t,!i)}},r}(ts),O_=I_,tr;(function(e){e.BEFORE_HIGHLIGHT="element-range-highlight:beforehighlight",e.AFTER_HIGHLIGHT="element-range-highlight:afterhighlight",e.BEFORE_CLEAR="element-range-highlight:beforeclear",e.AFTER_CLEAR="element-range-highlight:afterclear"})(tr||(tr={}));var P_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.clearViewState=function(t){Jo(t)},r.prototype.highlight=function(){var t=this.context,i=t.view,n=t.event,a=this.getIntersectElements(),o={view:i,event:n,highlightElements:a};i.emit(tr.BEFORE_HIGHLIGHT,ue.fromData(i,tr.BEFORE_HIGHLIGHT,o)),this.setState(),i.emit(tr.AFTER_HIGHLIGHT,ue.fromData(i,tr.AFTER_HIGHLIGHT,o))},r.prototype.clear=function(){var t=this.context.view;t.emit(tr.BEFORE_CLEAR,ue.fromData(t,tr.BEFORE_CLEAR,{})),e.prototype.clear.call(this),t.emit(tr.AFTER_CLEAR,ue.fromData(t,tr.AFTER_CLEAR,{}))},r.prototype.setElementsState=function(t,i,n){Dc(n,function(a){return t.indexOf(a)>=0},i)},r}($o),Bc=P_,k_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.highlight=function(){this.setState()},r.prototype.setElementState=function(t,i){var n=this.context.view,a=Ce(n);Dc(a,function(o){return t===o},i)},r.prototype.clear=function(){var t=this.context.view;Jo(t)},r}(Qo),D_=k_,B_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}($o),R_=B_,N_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}(Ko),z_=N_,V_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}(Qo),G_=V_,W_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="",t.ignoreItemStates=[],t}return r.prototype.getTriggerListInfo=function(){var t=zr(this.context),i=null;return qi(t)&&(i={item:t.item,list:t.component}),i},r.prototype.getAllowComponents=function(){var t=this,i=this.context.view,n=vu(i),a=[];return(0,h.each)(n,function(o){o.isList()&&t.allowSetStateByElement(o)&&a.push(o)}),a},r.prototype.hasState=function(t,i){return t.hasState(i,this.stateName)},r.prototype.clearAllComponentsState=function(){var t=this,i=this.getAllowComponents();(0,h.each)(i,function(n){n.clearItemsState(t.stateName)})},r.prototype.allowSetStateByElement=function(t){var i=t.get("field");if(!i)return!1;if(this.cfg&&this.cfg.componentNames){var n=t.get("name");if(this.cfg.componentNames.indexOf(n)===-1)return!1}var a=this.context.view,o=fi(a,i);return o&&o.isCategory},r.prototype.allowSetStateByItem=function(t,i){var n=this.ignoreItemStates;if(n.length){var a=n.filter(function(o){return i.hasState(t,o)});return a.length===0}return!0},r.prototype.setStateByElement=function(t,i,n){var a=t.get("field"),o=this.context.view,s=fi(o,a),l=je(i,a),u=s.getText(l);this.setItemsState(t,u,n)},r.prototype.setStateEnable=function(t){var i=this,n=br(this.context);if(n){var a=this.getAllowComponents();(0,h.each)(a,function(u){i.setStateByElement(u,n,t)})}else{var o=zr(this.context);if(qi(o)){var s=o.item,l=o.component;this.allowSetStateByElement(l)&&this.allowSetStateByItem(s,l)&&this.setItemState(l,s,t)}}},r.prototype.setItemsState=function(t,i,n){var a=this,o=t.getItems();(0,h.each)(o,function(s){s.name===i&&a.setItemState(t,s,n)})},r.prototype.setItemState=function(t,i,n){t.setItemState(i,this.stateName,n)},r.prototype.setState=function(){this.setStateEnable(!0)},r.prototype.reset=function(){this.setStateEnable(!1)},r.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var i=t.list,n=t.item,a=this.hasState(i,n);this.setItemState(i,n,!a)}},r.prototype.clear=function(){var t=this.getTriggerListInfo();t?t.list.clearItemsState(this.stateName):this.clearAllComponentsState()},r}(ne),Hr=W_,H_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="active",t}return r.prototype.active=function(){this.setState()},r}(Hr),Y_=H_,Rc="inactive",Nc="active";function X_(e){var r=e.getItems();(0,h.each)(r,function(t){e.hasState(t,Nc)&&e.setItemState(t,Nc,!1),e.hasState(t,Rc)&&e.setItemState(t,Rc,!1)})}var an="inactive",Yr="active",U_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName=Yr,t.ignoreItemStates=["unchecked"],t}return r.prototype.setItemsState=function(t,i,n){this.setHighlightBy(t,function(a){return a.name===i},n)},r.prototype.setItemState=function(t,i,n){var a=t.getItems();this.setHighlightBy(t,function(o){return o===i},n)},r.prototype.setHighlightBy=function(t,i,n){var a=t.getItems();if(n)(0,h.each)(a,function(l){i(l)?(t.hasState(l,an)&&t.setItemState(l,an,!1),t.setItemState(l,Yr,!0)):t.hasState(l,Yr)||t.setItemState(l,an,!0)});else{var o=t.getItemsByState(Yr),s=!0;(0,h.each)(o,function(l){if(!i(l))return s=!1,!1}),s?this.clear():(0,h.each)(a,function(l){i(l)&&(t.hasState(l,Yr)&&t.setItemState(l,Yr,!1),t.setItemState(l,an,!0))})}},r.prototype.highlight=function(){this.setState()},r.prototype.clear=function(){var t=this.getTriggerListInfo();if(t)X_(t.list);else{var i=this.getAllowComponents();(0,h.each)(i,function(n){n.clearItemsState(Yr),n.clearItemsState(an)})}},r}(Hr),es=U_,j_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="selected",t}return r.prototype.selected=function(){this.setState()},r}(Hr),Z_=j_,q_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName="unchecked",t}return r.prototype.unchecked=function(){this.setState()},r}(Hr),K_=q_,yi="unchecked",ca="checked",$_=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName=ca,t}return r.prototype.setItemState=function(t,i,n){this.setCheckedBy(t,function(a){return a===i},n)},r.prototype.setCheckedBy=function(t,i,n){var a=t.getItems();n&&(0,h.each)(a,function(o){i(o)?(t.hasState(o,yi)&&t.setItemState(o,yi,!1),t.setItemState(o,ca,!0)):t.hasState(o,ca)||t.setItemState(o,yi,!0)})},r.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var i=t.list,n=t.item,a=!(0,h.some)(i.getItems(),function(o){return i.hasState(o,yi)});a||i.hasState(n,yi)?this.setItemState(i,n,!0):this.reset()}},r.prototype.checked=function(){this.setState()},r.prototype.reset=function(){var t=this.getAllowComponents();(0,h.each)(t,function(i){i.clearItemsState(ca),i.clearItemsState(yi)})},r}(Hr),Q_=$_,mi="unchecked",J_=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.toggle=function(){var t,i,n,a,o,s,l,u,c=this.getTriggerListInfo();if(c==null?void 0:c.item){var f=c.list,v=c.item,d=f.getItems(),p=d.filter(function(I){return!f.hasState(I,mi)}),y=d.filter(function(I){return f.hasState(I,mi)}),m=p[0];if(d.length===p.length)try{for(var x=(0,g.__values)(d),_=x.next();!_.done;_=x.next()){var w=_.value;f.setItemState(w,mi,w.id!==v.id)}}catch(I){t={error:I}}finally{try{_&&!_.done&&(i=x.return)&&i.call(x)}finally{if(t)throw t.error}}else if(d.length-y.length==1)if(m.id===v.id)try{for(var b=(0,g.__values)(d),S=b.next();!S.done;S=b.next()){var w=S.value;f.setItemState(w,mi,!1)}}catch(I){n={error:I}}finally{try{S&&!S.done&&(a=b.return)&&a.call(b)}finally{if(n)throw n.error}}else try{for(var C=(0,g.__values)(d),A=C.next();!A.done;A=C.next()){var w=A.value;f.setItemState(w,mi,w.id!==v.id)}}catch(I){o={error:I}}finally{try{A&&!A.done&&(s=C.return)&&s.call(C)}finally{if(o)throw o.error}}else try{for(var F=(0,g.__values)(d),P=F.next();!P.done;P=F.next()){var w=P.value;f.setItemState(w,mi,w.id!==v.id)}}catch(I){l={error:I}}finally{try{P&&!P.done&&(u=F.return)&&u.call(F)}finally{if(l)throw l.error}}}},r}(Hr),tw=J_,zc="showRadio",rs="legend-radio-tip",ew=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.timeStamp=0,t}return r.prototype.show=function(){var t=this.getTriggerListInfo();if(t==null?void 0:t.item){var i=t.list,n=t.item;i.setItemState(n,zc,!0)}},r.prototype.hide=function(){var t=this.getTriggerListInfo();if(t==null?void 0:t.item){var i=t.list,n=t.item;i.setItemState(n,zc,!1)}},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},r.prototype.showTip=function(){var t=this.context,i=t.event,n=this.timeStamp,a=+new Date,o=this.context.event.target;if(a-n>16&&o.get("name")==="legend-item-radio"){var s=this.location,l={x:i.x,y:i.y};this.timeStamp=a,this.location=l,(!s||!(0,h.isEqual)(s,l))&&this.showTooltip(l)}},r.prototype.hideTip=function(){this.hideTooltip(),this.location=null},r.prototype.showTooltip=function(t){var i=this.context,n=i.event,a=n.target;if(a&&a.get("tip")){this.tooltip||this.renderTooltip();var o=i.view.getCanvas().get("el").getBoundingClientRect(),s=o.x,l=o.y;this.tooltip.update((0,g.__assign)((0,g.__assign)({title:a.get("tip")},t),{x:t.x+s,y:t.y+l})),this.tooltip.show()}},r.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},r.prototype.renderTooltip=function(){var t,i=(t={},t[sr]={padding:"6px 8px",transform:"translate(-50%, -80%)",background:"rgba(0,0,0,0.75)",color:"#fff","border-radius":"2px","z-index":100},t[lr]={"font-size":"12px","line-height":"14px","margin-bottom":0,"word-break":"break-all"},t);document.getElementById(rs)&&document.body.removeChild(document.getElementById(rs));var n=new Nn({parent:document.body,region:null,visible:!1,crosshairs:null,domStyles:i,containerId:rs});n.init(),n.setCapture(!1),this.tooltip=n},r}(Hr),rw=ew,iw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.maskShape=null,t.points=[],t.starting=!1,t.moving=!1,t.preMovePoint=null,t.shapeType="path",t}return r.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},r.prototype.emitEvent=function(t){var i="mask:".concat(t),n=this.context.view,a=this.context.event;n.emit(i,{target:this.maskShape,shape:this.maskShape,points:this.points,x:a.x,y:a.y})},r.prototype.createMask=function(){var t=this.context.view,i=this.getMaskAttrs(),n=t.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:(0,g.__assign)({fill:"#C5D4EB",opacity:.3},i)});return n},r.prototype.getMaskPath=function(){return[]},r.prototype.show=function(){this.maskShape&&(this.maskShape.show(),this.emitEvent("show"))},r.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")},r.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint()},r.prototype.move=function(){if(!(!this.moving||!this.maskShape)){var t=this.getCurrentPoint(),i=this.preMovePoint,n=t.x-i.x,a=t.y-i.y,o=this.points;(0,h.each)(o,function(s){s.x+=n,s.y+=a}),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t}},r.prototype.updateMask=function(t){var i=(0,h.deepMix)({},this.getMaskAttrs(),t);this.maskShape.attr(i)},r.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null},r.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.maskShape&&this.maskShape.set("capture",!0)},r.prototype.hide=function(){this.maskShape&&(this.maskShape.hide(),this.emitEvent("hide"))},r.prototype.resize=function(){this.starting&&this.maskShape&&(this.points.push(this.getCurrentPoint()),this.updateMask(),this.emitEvent("change"))},r.prototype.destroy=function(){this.points=[],this.maskShape&&this.maskShape.remove(),this.maskShape=null,this.preMovePoint=null,e.prototype.destroy.call(this)},r}(ne),is=iw;function Vc(e){var r=(0,h.last)(e),t=0,i=0,n=0;if(e.length){var a=e[0];t=_o(a,r)/2,i=(r.x+a.x)/2,n=(r.y+a.y)/2}return{x:i,y:n,r:t}}var nw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.shapeType="circle",t}return r.prototype.getMaskAttrs=function(){return Vc(this.points)},r}(is),aw=nw;function Gc(e){return{start:(0,h.head)(e),end:(0,h.last)(e)}}function Wc(e,r){var t=Math.min(e.x,r.x),i=Math.min(e.y,r.y),n=Math.abs(r.x-e.x),a=Math.abs(r.y-e.y);return{x:t,y:i,width:n,height:a}}var ow=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.shapeType="rect",t}return r.prototype.getRegion=function(){return Gc(this.points)},r.prototype.getMaskAttrs=function(){var t=this.getRegion(),i=t.start,n=t.end;return Wc(i,n)},r}(is),Hc=ow;function Yc(e){e.x=(0,h.clamp)(e.x,0,1),e.y=(0,h.clamp)(e.y,0,1)}function Xc(e,r,t,i){var n=null,a=null,o=i.invert((0,h.head)(e)),s=i.invert((0,h.last)(e));return t&&(Yc(o),Yc(s)),r==="x"?(n=i.convert({x:o.x,y:0}),a=i.convert({x:s.x,y:1})):(n=i.convert({x:0,y:o.y}),a=i.convert({x:1,y:s.y})),{start:n,end:a}}var sw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dim="x",t.inPlot=!0,t}return r.prototype.getRegion=function(){var t=this.context.view.getCoordinate();return Xc(this.points,this.dim,this.inPlot,t)},r}(Hc),Uc=sw;function ns(e){var r=[];return e.length&&((0,h.each)(e,function(t,i){i===0?r.push(["M",t.x,t.y]):r.push(["L",t.x,t.y])}),r.push(["L",e[0].x,e[0].y])),r}function jc(e){return{path:ns(e)}}var lw=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getMaskPath=function(){return ns(this.points)},r.prototype.getMaskAttrs=function(){return jc(this.points)},r.prototype.addPoint=function(){this.resize()},r}(is),Zc=lw;function as(e){return Ay(e,!0)}function qc(e){return{path:as(e)}}var uw=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getMaskPath=function(){return as(this.points)},r.prototype.getMaskAttrs=function(){return qc(this.points)},r}(Zc),cw=uw,hw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.maskShapes=[],t.starting=!1,t.moving=!1,t.recordPoints=null,t.preMovePoint=null,t.shapeType="path",t.maskType="multi-mask",t}return r.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},r.prototype.emitEvent=function(t){var i="".concat(this.maskType,":").concat(t),n=this.context.view,a=this.context.event,o={type:this.shapeType,name:this.maskType,get:function(s){return o.hasOwnProperty(s)?o[s]:void 0}};n.emit(i,{target:o,maskShapes:this.maskShapes,multiPoints:this.recordPoints,x:a.x,y:a.y})},r.prototype.createMask=function(t){var i=this.context.view,n=this.recordPoints[t],a=this.getMaskAttrs(n),o=i.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:(0,g.__assign)({fill:"#C5D4EB",opacity:.3},a)});this.maskShapes.push(o)},r.prototype.getMaskPath=function(t){return[]},r.prototype.show=function(){this.maskShapes.length>0&&(this.maskShapes.forEach(function(t){return t.show()}),this.emitEvent("show"))},r.prototype.start=function(t){this.recordPointStart(),this.starting=!0,this.moving=!1;var i=this.recordPoints.length-1;this.createMask(i),this.updateShapesCapture(!1),this.updateMask(t==null?void 0:t.maskStyle),this.emitEvent("start")},r.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint(),this.updateShapesCapture(!1)},r.prototype.move=function(){if(!(!this.moving||this.maskShapes.length===0)){var t=this.getCurrentPoint(),i=this.preMovePoint,n=t.x-i.x,a=t.y-i.y,o=this.getCurMaskShapeIndex();o>-1&&(this.recordPoints[o].forEach(function(s){s.x+=n,s.y+=a}),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t)}},r.prototype.updateMask=function(t){var i=this;this.recordPoints.forEach(function(n,a){var o=(0,h.deepMix)({},i.getMaskAttrs(n),t);i.maskShapes[a].attr(o)})},r.prototype.resize=function(){this.starting&&this.maskShapes.length>0&&(this.recordPointContinue(),this.updateMask(),this.emitEvent("change"))},r.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null,this.updateShapesCapture(!0)},r.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.updateShapesCapture(!0)},r.prototype.hide=function(){this.maskShapes.length>0&&(this.maskShapes.forEach(function(t){return t.hide()}),this.emitEvent("hide"))},r.prototype.remove=function(){var t=this.getCurMaskShapeIndex();t>-1&&(this.recordPoints.splice(t,1),this.maskShapes[t].remove(),this.maskShapes.splice(t,1),this.preMovePoint=null,this.updateShapesCapture(!0),this.emitEvent("change"))},r.prototype.clearAll=function(){this.recordPointClear(),this.maskShapes.forEach(function(t){return t.remove()}),this.maskShapes=[],this.preMovePoint=null},r.prototype.clear=function(){var t=this.getCurMaskShapeIndex();t===-1?(this.recordPointClear(),this.maskShapes.forEach(function(i){return i.remove()}),this.maskShapes=[],this.emitEvent("clearAll")):(this.recordPoints.splice(t,1),this.maskShapes[t].remove(),this.maskShapes.splice(t,1),this.preMovePoint=null,this.emitEvent("clearSingle")),this.preMovePoint=null},r.prototype.destroy=function(){this.clear(),e.prototype.destroy.call(this)},r.prototype.getRecordPoints=function(){var t;return(0,g.__spreadArray)([],(0,g.__read)((t=this.recordPoints)!==null&&t!==void 0?t:[]),!1)},r.prototype.recordPointStart=function(){var t=this.getRecordPoints(),i=this.getCurrentPoint();this.recordPoints=(0,g.__spreadArray)((0,g.__spreadArray)([],(0,g.__read)(t),!1),[[i]],!1)},r.prototype.recordPointContinue=function(){var t=this.getRecordPoints(),i=this.getCurrentPoint(),n=t.splice(-1,1)[0]||[];n.push(i),this.recordPoints=(0,g.__spreadArray)((0,g.__spreadArray)([],(0,g.__read)(t),!1),[n],!1)},r.prototype.recordPointClear=function(){this.recordPoints=[]},r.prototype.updateShapesCapture=function(t){this.maskShapes.forEach(function(i){return i.set("capture",t)})},r.prototype.getCurMaskShapeIndex=function(){var t=this.getCurrentPoint();return this.maskShapes.findIndex(function(i){var n=i.attrs,a=n.width,o=n.height,s=n.r,l=a===0||o===0||s===0;return!l&&i.isHit(t.x,t.y)})},r}(ne),os=hw,fw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.shapeType="rect",t}return r.prototype.getRegion=function(t){return Gc(t)},r.prototype.getMaskAttrs=function(t){var i=this.getRegion(t),n=i.start,a=i.end;return Wc(n,a)},r}(os),Kc=fw,vw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dim="x",t.inPlot=!0,t}return r.prototype.getRegion=function(t){var i=this.context.view.getCoordinate();return Xc(t,this.dim,this.inPlot,i)},r}(Kc),$c=vw,dw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.shapeType="circle",t.getMaskAttrs=Vc,t}return r}(os),gw=dw,pw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.getMaskPath=ns,t.getMaskAttrs=jc,t}return r.prototype.addPoint=function(){this.resize()},r}(os),Qc=pw,yw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.getMaskPath=as,t.getMaskAttrs=qc,t}return r}(Qc),mw=yw,xw=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.setCursor=function(t){var i=this.context.view;i.getCanvas().setCursor(t)},r.prototype.default=function(){this.setCursor("default")},r.prototype.pointer=function(){this.setCursor("pointer")},r.prototype.move=function(){this.setCursor("move")},r.prototype.crosshair=function(){this.setCursor("crosshair")},r.prototype.wait=function(){this.setCursor("wait")},r.prototype.help=function(){this.setCursor("help")},r.prototype.text=function(){this.setCursor("text")},r.prototype.eResize=function(){this.setCursor("e-resize")},r.prototype.wResize=function(){this.setCursor("w-resize")},r.prototype.nResize=function(){this.setCursor("n-resize")},r.prototype.sResize=function(){this.setCursor("s-resize")},r.prototype.neResize=function(){this.setCursor("ne-resize")},r.prototype.nwResize=function(){this.setCursor("nw-resize")},r.prototype.seResize=function(){this.setCursor("se-resize")},r.prototype.swResize=function(){this.setCursor("sw-resize")},r.prototype.nsResize=function(){this.setCursor("ns-resize")},r.prototype.ewResize=function(){this.setCursor("ew-resize")},r.prototype.zoomIn=function(){this.setCursor("zoom-in")},r.prototype.zoomOut=function(){this.setCursor("zoom-out")},r}(ne),_w=xw,ww=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.filterView=function(t,i,n){var a=this;t.getScaleByField(i)&&t.filter(i,n),t.views&&t.views.length&&(0,h.each)(t.views,function(o){a.filterView(o,i,n)})},r.prototype.filter=function(){var t=zr(this.context);if(t){var i=this.context.view,n=t.component,a=n.get("field");if(qi(t)){if(a){var o=n.getItemsByState("unchecked"),s=fi(i,a),l=o.map(function(d){return d.name});l.length?this.filterView(i,a,function(d){var p=s.getText(d);return!l.includes(p)}):this.filterView(i,a,null),i.render(!0)}}else if(su(t)){var u=n.getValue(),c=(0,g.__read)(u,2),f=c[0],v=c[1];this.filterView(i,a,function(d){return d>=f&&d<=v}),i.render(!0)}}},r}(ne),bw=ww;function Jc(e,r,t,i){var n=Math.min(t[r],i[r]),a=Math.max(t[r],i[r]),o=(0,g.__read)(e.range,2),s=o[0],l=o[1];if(n<s&&(n=s),a>l&&(a=l),n===l&&a===l)return null;var u=e.invert(n),c=e.invert(a);if(e.isCategory){var f=e.values.indexOf(u),v=e.values.indexOf(c),d=e.values.slice(f,v+1);return function(p){return d.includes(p)}}else return function(p){return p>=u&&p<=c}}var De;(function(e){e.FILTER="brush-filter-processing",e.RESET="brush-filter-reset",e.BEFORE_FILTER="brush-filter:beforefilter",e.AFTER_FILTER="brush-filter:afterfilter",e.BEFORE_RESET="brush-filter:beforereset",e.AFTER_RESET="brush-filter:afterreset"})(De||(De={}));var Sw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dims=["x","y"],t.startPoint=null,t.isStarted=!1,t}return r.prototype.hasDim=function(t){return this.dims.includes(t)},r.prototype.start=function(){var t=this.context;this.isStarted=!0,this.startPoint=t.getCurrentPoint()},r.prototype.filter=function(){var t,i;if(Ki(this.context)){var n=this.context.event.target,a=n.getCanvasBBox();t={x:a.x,y:a.y},i={x:a.maxX,y:a.maxY}}else{if(!this.isStarted)return;t=this.startPoint,i=this.context.getCurrentPoint()}if(!(Math.abs(t.x-i.x)<5||Math.abs(t.x-i.y)<5)){var o=this.context,s=o.view,l=o.event,u={view:s,event:l,dims:this.dims};s.emit(De.BEFORE_FILTER,ue.fromData(s,De.BEFORE_FILTER,u));var c=s.getCoordinate(),f=c.invert(i),v=c.invert(t);if(this.hasDim("x")){var d=s.getXScale(),p=Jc(d,"x",f,v);this.filterView(s,d.field,p)}if(this.hasDim("y")){var y=s.getYScales()[0],p=Jc(y,"y",f,v);this.filterView(s,y.field,p)}this.reRender(s,{source:De.FILTER}),s.emit(De.AFTER_FILTER,ue.fromData(s,De.AFTER_FILTER,u))}},r.prototype.end=function(){this.isStarted=!1},r.prototype.reset=function(){var t=this.context.view;if(t.emit(De.BEFORE_RESET,ue.fromData(t,De.BEFORE_RESET,{})),this.isStarted=!1,this.hasDim("x")){var i=t.getXScale();this.filterView(t,i.field,null)}if(this.hasDim("y")){var n=t.getYScales()[0];this.filterView(t,n.field,null)}this.reRender(t,{source:De.RESET}),t.emit(De.AFTER_RESET,ue.fromData(t,De.AFTER_RESET,{}))},r.prototype.filterView=function(t,i,n){t.filter(i,n)},r.prototype.reRender=function(t,i){t.render(!0,i)},r}(ne),ha=Sw,Cw=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.filterView=function(t,i,n){var a=Qe(t);(0,h.each)(a,function(o){o.filter(i,n)})},r.prototype.reRender=function(t){var i=Qe(t);(0,h.each)(i,function(n){n.render(!0)})},r}(ha),ss=Cw,Aw=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.filter=function(){var t=zr(this.context),i=this.context.view,n=Ce(i);if(Ki(this.context)){var a=xo(this.context,10);a&&(0,h.each)(n,function(y){a.includes(y)?y.show():y.hide()})}else if(t){var o=t.component,s=o.get("field");if(qi(t)){if(s){var l=o.getItemsByState("unchecked"),u=fi(i,s),c=l.map(function(y){return y.name});(0,h.each)(n,function(y){var m=je(y,s),x=u.getText(m);c.indexOf(x)>=0?y.hide():y.show()})}}else if(su(t)){var f=o.getValue(),v=(0,g.__read)(f,2),d=v[0],p=v[1];(0,h.each)(n,function(y){var m=je(y,s);m>=d&&m<=p?y.show():y.hide()})}}},r.prototype.clear=function(){var t=Ce(this.context.view);(0,h.each)(t,function(i){i.show()})},r.prototype.reset=function(){this.clear()},r}(ne),Mw=Aw,Fw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.byRecord=!1,t}return r.prototype.filter=function(){Ki(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},r.prototype.filterByRecord=function(){var t=this.context.view,i=xo(this.context,10);if(!!i){var n=t.getXScale().field,a=t.getYScales()[0].field,o=i.map(function(l){return l.getModel().data}),s=Qe(t);(0,h.each)(s,function(l){var u=Ce(l);(0,h.each)(u,function(c){var f=c.getModel().data;gu(o,f,n,a)?c.show():c.hide()})})}},r.prototype.filterByBBox=function(){var t=this,i=this.context.view,n=Qe(i);(0,h.each)(n,function(a){var o=lu(t.context,a,10),s=Ce(a);o&&(0,h.each)(s,function(l){o.includes(l)?l.show():l.hide()})})},r.prototype.reset=function(){var t=Qe(this.context.view);(0,h.each)(t,function(i){var n=Ce(i);(0,h.each)(n,function(a){a.show()})})},r}(ne),th=Fw,Ew=10,Tw=5,Lw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.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 r.prototype.getButtonCfg=function(){return(0,h.deepMix)(this.buttonCfg,this.cfg)},r.prototype.drawButton=function(){var t=this.getButtonCfg(),i=this.context.view.foregroundGroup.addGroup({name:t.name}),n=i.addShape({type:"text",name:"button-text",attrs:(0,g.__assign)({text:t.text},t.textStyle)}),a=n.getBBox(),o=Ao(t.padding),s=i.addShape({type:"rect",name:"button-rect",attrs:(0,g.__assign)({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(),i.on("mouseenter",function(){s.attr(t.activeStyle)}),i.on("mouseleave",function(){s.attr(t.style)}),this.buttonGroup=i},r.prototype.resetPosition=function(){var t=this.context.view,i=t.getCoordinate(),n=i.convert({x:1,y:1}),a=this.buttonGroup,o=a.getBBox(),s=ie.vs(null,[["t",n.x-o.width-Ew,n.y+o.height+Tw]]);a.setMatrix(s)},r.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},r.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},r.prototype.destroy=function(){var t=this.buttonGroup;t&&t.remove(),e.prototype.destroy.call(this)},r}(ne),Iw=Lw,Ow=4,Pw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.starting=!1,t.dragStart=!1,t}return r.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},r.prototype.drag=function(){if(!!this.startPoint){var t=this.context.getCurrentPoint(),i=this.context.view,n=this.context.event;this.dragStart?i.emit("drag",{target:n.target,x:n.x,y:n.y}):_o(t,this.startPoint)>Ow&&(i.emit("dragstart",{target:n.target,x:n.x,y:n.y}),this.dragStart=!0)}},r.prototype.end=function(){if(this.dragStart){var t=this.context.view,i=this.context.event;t.emit("dragend",{target:i.target,x:i.x,y:i.y})}this.starting=!1,this.dragStart=!1},r}(ne),kw=Pw,Dw=5,Bw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.starting=!1,t.isMoving=!1,t.startPoint=null,t.startMatrix=null,t}return r.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},r.prototype.move=function(){if(!!this.starting){var t=this.startPoint,i=this.context.getCurrentPoint(),n=_o(t,i);if(n>Dw&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var a=this.context.view,o=ie.vs(this.startMatrix,[["t",i.x-t.x,i.y-t.y]]);a.backgroundGroup.setMatrix(o),a.foregroundGroup.setMatrix(o),a.middleGroup.setMatrix(o)}}},r.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},r.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},r}(ne),Rw=Bw,eh="x",rh="y",Nw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dims=[eh,rh],t.cfgFields=["dims"],t.cacheScaleDefs={},t}return r.prototype.hasDim=function(t){return this.dims.includes(t)},r.prototype.getScale=function(t){var i=this.context.view;return t==="x"?i.getXScale():i.getYScales()[0]},r.prototype.resetDim=function(t){var i=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var n=this.getScale(t);i.scale(n.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},r.prototype.reset=function(){this.resetDim(eh),this.resetDim(rh);var t=this.context.view;t.render(!0)},r}(ne),ih=Nw,zw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.startPoint=null,t.starting=!1,t.startCache={},t}return r.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0;var i=this.dims;(0,h.each)(i,function(n){var a=t.getScale(n),o=a.min,s=a.max,l=a.values;t.startCache[n]={min:o,max:s,values:l}})},r.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},r.prototype.translate=function(){var t=this;if(!!this.starting){var i=this.startPoint,n=this.context.view.getCoordinate(),a=this.context.getCurrentPoint(),o=n.invert(i),s=n.invert(a),l=s.x-o.x,u=s.y-o.y,c=this.context.view,f=this.dims;(0,h.each)(f,function(v){t.translateDim(v,{x:l*-1,y:u*-1})}),c.render(!0)}},r.prototype.translateDim=function(t,i){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.translateLinear(t,n,i)}},r.prototype.translateLinear=function(t,i,n){var a=this.context.view,o=this.startCache[t],s=o.min,l=o.max,u=l-s,c=n[t]*u;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:i.nice,min:s,max:l}),a.scale(i.field,{nice:!1,min:s+c,max:l+c})},r.prototype.reset=function(){e.prototype.reset.call(this),this.startPoint=null,this.starting=!1},r}(ih),Vw=zw,Gw=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.zoomRatio=.05,t}return r.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},r.prototype.zoom=function(t){var i=this,n=this.dims;(0,h.each)(n,function(a){i.zoomDim(a,t)}),this.context.view.render(!0)},r.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},r.prototype.zoomDim=function(t,i){if(this.hasDim(t)){var n=this.getScale(t);n.isLinear&&this.zoomLinear(t,n,i)}},r.prototype.zoomLinear=function(t,i,n){var a=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:i.nice,min:i.min,max:i.max});var o=this.cacheScaleDefs[t],s=o.max-o.min,l=i.min,u=i.max,c=n*s,f=l-c,v=u+c,d=v-f,p=d/s;v>f&&p<100&&p>.01&&a.scale(i.field,{nice:!1,min:l-c,max:u+c})},r}(ih),Ww=Gw;function Hw(e){var r=e.gEvent.originalEvent;return r.deltaY>0}var Yw=1,Xw=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.scroll=function(t){var i=this.context,n=i.view,a=i.event;if(!!n.getOptions().scrollbar){var o=(t==null?void 0:t.wheelDelta)||Yw,s=n.getController("scrollbar"),l=n.getXScale(),u=n.getOptions().data,c=(0,h.size)((0,h.valuesOfKey)(u,l.field)),f=(0,h.size)(l.values),v=s.getValue(),d=Math.floor((c-f)*v),p=d+(Hw(a)?o:-o),y=o/(c-f)/1e4,m=(0,h.clamp)(p/(c-f)+y,0,1);s.setValue(m)}},r}(ne),Uw=Xw,jw="aixs-description-tooltip",Zw=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.show=function(){var t=this.context,i=zr(t).axis,n=i.cfg.title,a=n.description,o=n.text,s=n.descriptionTooltipStyle,l=t.event,u=l.x,c=l.y;this.tooltip||this.renderTooltip(),this.tooltip.update({title:o||"",customContent:function(){return`
  26. <div class="`.concat(sr,'" style={').concat(s,`}>
  27. <div class="`).concat(lr,`">
  28. \u5B57\u6BB5\u8BF4\u660E\uFF1A`).concat(a,`
  29. </div>
  30. </div>
  31. `)},x:u,y:c}),this.tooltip.show()},r.prototype.destroy=function(){e.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},r.prototype.hide=function(){this.tooltip&&this.tooltip.hide()},r.prototype.renderTooltip=function(){var t,i=this.context.view,n=i.canvas,a={start:{x:0,y:0},end:{x:n.get("width"),y:n.get("height")}},o=new Nn({parent:n.get("el").parentNode,region:a,visible:!1,containerId:jw,domStyles:(0,g.__assign)({},(0,h.deepMix)({},(t={},t[sr]={"max-width":"50%",padding:"10px","line-height":"15px","font-size":"12px",color:"rgba(0, 0, 0, .65)"},t[lr]={"word-break":"break-all","margin-bottom":"3px"},t)))});o.init(),o.setCapture(!1),this.tooltip=o},r}(ne),qw=Zw;Gy("dark",xu(R0)),jt("canvas",$u),jt("svg",N0),Je("Polygon",om),Je("Interval",Q0),Je("Schema",lm),Je("Path",ko),Je("Point",im),Je("Line",tm),Je("Area",W0),Je("Edge",Y0),Je("Heatmap",U0),Je("Violin",hm),Qi("base",Qn),Qi("interval",Em),Qi("pie",Im),Qi("polar",oc),Pe("overlap",Xm),Pe("distribute",Pm),Pe("fixed-overlap",Ym),Pe("hide-overlap",ex),Pe("limit-in-shape",Vm),Pe("limit-in-canvas",zm),Pe("limit-in-plot",mx),Pe("pie-outer",Dm),Pe("adjust-color",ix),Pe("interval-adjust-position",sx),Pe("interval-hide-overlap",ux),Pe("point-adjust-position",fx),Pe("pie-spider",Nm),Pe("path-adjust-position",gx),ze("fade-in",xx),ze("fade-out",_x),ze("grow-in-x",bx),ze("grow-in-xy",Cx),ze("grow-in-y",Sx),ze("scale-in-x",Fx),ze("scale-in-y",Ex),ze("wave-in",Lx),ze("zoom-in",Ix),ze("zoom-out",Ox),ze("position-update",Mx),ze("sector-path-update",Tx),ze("path-in",Ax),hi("rect",Wx),hi("mirror",Vx),hi("list",Bx),hi("matrix",Nx),hi("circle",kx),hi("tree",Yx),Vr("axis",qx),Vr("legend",t_),Vr("tooltip",Eu),Vr("annotation",jx),Vr("slider",r_),Vr("scrollbar",o_),xt("tooltip",Pc),xt("sibling-tooltip",v_),xt("ellipsis-text",g_),xt("element-active",x_),xt("element-single-active",F_),xt("element-range-active",C_),xt("element-highlight",ts),xt("element-highlight-by-x",O_),xt("element-highlight-by-color",L_),xt("element-single-highlight",D_),xt("element-range-highlight",Bc),xt("element-sibling-highlight",Bc,{effectSiblings:!0,effectByRecord:!0}),xt("element-selected",z_),xt("element-single-selected",G_),xt("element-range-selected",R_),xt("element-link-by-color",w_),xt("active-region",c_),xt("list-active",Y_),xt("list-selected",Z_),xt("list-highlight",es),xt("list-unchecked",K_),xt("list-checked",Q_),xt("list-focus",tw),xt("list-radio",rw),xt("legend-item-highlight",es,{componentNames:["legend"]}),xt("axis-label-highlight",es,{componentNames:["axis"]}),xt("axis-description",qw),xt("rect-mask",Hc),xt("x-rect-mask",Uc,{dim:"x"}),xt("y-rect-mask",Uc,{dim:"y"}),xt("circle-mask",aw),xt("path-mask",Zc),xt("smooth-path-mask",cw),xt("rect-multi-mask",Kc),xt("x-rect-multi-mask",$c,{dim:"x"}),xt("y-rect-multi-mask",$c,{dim:"y"}),xt("circle-multi-mask",gw),xt("path-multi-mask",Qc),xt("smooth-path-multi-mask",mw),xt("cursor",_w),xt("data-filter",bw),xt("brush",ha),xt("brush-x",ha,{dims:["x"]}),xt("brush-y",ha,{dims:["y"]}),xt("sibling-filter",ss),xt("sibling-x-filter",ss,{dims:"x"}),xt("sibling-y-filter",ss,{dims:"y"}),xt("element-filter",Mw),xt("element-sibling-filter",th),xt("element-sibling-filter-record",th,{byRecord:!0}),xt("view-drag",kw),xt("view-move",Rw),xt("scale-translate",Vw),xt("scale-zoom",Ww),xt("reset-button",Iw,{name:"reset-button",text:"reset"}),xt("mousewheel-scroll",Uw);function hr(e){return e.isInPlot()}Ot("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"}]}),Ot("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"}]}),Ot("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),Ot("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),Ot("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),Ot("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),Ot("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),Ot("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"]}]}),Ot("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"]}]}),Ot("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"]}]}),Ot("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"]}]}),Ot("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(e){return!e.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(e){return!e.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]}),Ot("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:hr,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:hr,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:hr,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"]}]}),Ot("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"]}]}),Ot("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:hr,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:hr,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:hr,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),Ot("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:hr,action:"path-mask:start"},{trigger:"mousedown",isEnable:hr,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"}]}),Ot("brush-x-multi",{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:"mousedown",isEnable:hr,action:["x-rect-multi-mask:start","x-rect-multi-mask:show"]},{trigger:"mask:dragstart",action:["x-rect-multi-mask:moveStart"]}],processing:[{trigger:"mousemove",isEnable:function(e){return!Un(e)},action:["x-rect-multi-mask:resize"]},{trigger:"multi-mask:change",action:"element-range-highlight:highlight"},{trigger:"mask:drag",action:["x-rect-multi-mask:move"]}],end:[{trigger:"mouseup",action:["x-rect-multi-mask:end"]},{trigger:"mask:dragend",action:["x-rect-multi-mask:moveEnd"]}],rollback:[{trigger:"dblclick",action:["x-rect-multi-mask:clear","cursor:crosshair"]},{trigger:"multi-mask:clearAll",action:["element-range-highlight:clear"]},{trigger:"multi-mask:clearSingle",action:["element-range-highlight:highlight"]}]}),Ot("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),Ot("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(e){return!e.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"]}]}),Ot("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),Ot("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),Ot("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"]}]}),Ot("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),Ot("axis-description",{start:[{trigger:"axis-description:mousemove",action:"axis-description:show"}],end:[{trigger:"axis-description:mouseleave",action:"axis-description:hide"}]});function nh(e){return e.gEvent.preventDefault(),e.gEvent.originalEvent.deltaY>0}Ot("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(e){return nh(e.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(e){return!nh(e.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),Ot("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),Ot("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]});var Be=["type","alias","tickCount","tickInterval","min","max","nice","minLimit","maxLimit","range","tickMethod","base","exponent","mask","sync"],qe;(function(e){e.ERROR="error",e.WARN="warn",e.INFO="log"})(qe||(qe={}));var ah="AntV/G2Plot";function oh(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];var i=0;return"".concat(ah,": ").concat(e.replace(/%s/g,function(){return"".concat(r[i++])}))}function nI(e,r){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];if(!e){var n=new Error(oh.apply(void 0,__spreadArray([r],t,!1)));throw n.name=ah,n}}function fr(e,r,t){for(var i=[],n=3;n<arguments.length;n++)i[n-3]=arguments[n];r||console[e](oh.apply(void 0,(0,g.__spreadArray)([t],i,!1)))}function $t(e,r){var t={};return e!==null&&typeof e=="object"&&r.forEach(function(i){var n=e[i];n!==void 0&&(t[i]=n)}),t}function ls(e,r){if(!e)return{};var t=e.filter(function(a){var o=(0,h.get)(a,[r]);return(0,h.isNumber)(o)&&!isNaN(o)}),i=t.every(function(a){return(0,h.get)(a,[r])>=0}),n=t.every(function(a){return(0,h.get)(a,[r])<=0});return i?{min:0}:n?{max:0}:{}}function sh(e,r,t,i,n){if(n===void 0&&(n=[]),!Array.isArray(e))return{nodes:[],links:[]};var a=[],o={},s=-1;return e.forEach(function(l){var u=l[r],c=l[t],f=l[i],v=$t(l,n);o[u]||(o[u]=(0,g.__assign)({id:++s,name:u},v)),o[c]||(o[c]=(0,g.__assign)({id:++s,name:c},v)),a.push((0,g.__assign)({source:o[u].id,target:o[c].id,value:f},v))}),{nodes:Object.values(o).sort(function(l,u){return l.id-u.id}),links:a}}function xi(e,r){var t=(0,h.filter)(e,function(i){var n=i[r];return n===null||typeof n=="number"&&!isNaN(n)});return fr(qe.WARN,t.length===e.length,"illegal data existed in chart data."),t}var Kw=5,$w={}.toString,lh=function(e,r){return $w.call(e)==="[object "+r+"]"},Qw=function(e){return lh(e,"Array")},Jw=function(e){return typeof e=="object"&&e!==null},uh=function(e){if(!Jw(e)||!lh(e,"Object"))return!1;for(var r=e;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r},ch=function(e,r,t,i){t=t||0,i=i||Kw;for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)){var a=r[n];a?uh(a)?(uh(e[n])||(e[n]={}),t<i?ch(e[n],a,t+1,i):e[n]=r[n]):Qw(a)?(e[n]=[],e[n]=e[n].concat(a)):e[n]=a:e[n]=a}},O=function(e){for(var r=[],t=1;t<arguments.length;t++)r[t-1]=arguments[t];for(var i=0;i<r.length;i+=1)ch(e,r[i]);return e};function us(e){if(!e)return{width:0,height:0};var r=getComputedStyle(e);return{width:(e.clientWidth||parseInt(r.width,10))-parseInt(r.paddingLeft,10)-parseInt(r.paddingRight,10),height:(e.clientHeight||parseInt(r.height,10))-parseInt(r.paddingTop,10)-parseInt(r.paddingBottom,10)}}function Et(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return function(t){return e.reduce(function(i,n){return n(i)},t)}}function Me(e,r){return e.geometries.find(function(t){return t.type===r})}function fa(e){return(0,h.reduce)(e.geometries,function(r,t){return r.concat(t.elements)},[])}function on(e){return(0,h.get)(e,["views","length"],0)<=0?fa(e):(0,h.reduce)(e.views,function(r,t){return r.concat(on(t))},fa(e))}function tb(e){return(0,h.get)(e,["views","length"],0)<=0?e.geometries:(0,h.reduce)(e.views,function(r,t){return r.concat(t.geometries)},e.geometries)}function be(e){if(!(0,h.isType)(e,"Object"))return e;var r=(0,g.__assign)({},e);return r.formatter&&!r.content&&(r.content=r.formatter),r}var cs;function eb(){return cs||(cs=document.createElement("canvas").getContext("2d")),cs}var aI=(0,h.memoize)(function(e,r){r===void 0&&(r={});var t=r.fontSize,i=r.fontFamily,n=i===void 0?"sans-serif":i,a=r.fontWeight,o=r.fontStyle,s=r.fontVariant,l=eb();l.font=[o,a,s,"".concat(t,"px"),n].join(" ");var u=l.measureText((0,h.isString)(e)?e:"");return u.width},function(e,r){return r===void 0&&(r={}),(0,g.__spreadArray)([e],(0,h.values)(r),!0).join("")});function Xr(e){return typeof e=="number"&&!isNaN(e)}function rb(e,r,t){var i=Math.min(r,t),n=Math.max(r,t);return e>=i&&e<=n}function Tr(e){if((0,h.isNumber)(e))return[e,e,e,e];if((0,h.isArray)(e)){var r=e.length;if(r===1)return[e[0],e[0],e[0],e[0]];if(r===2)return[e[0],e[1],e[0],e[1]];if(r===3)return[e[0],e[1],e[2],e[1]];if(r===4)return e}return[0,0,0,0]}function va(e,r,t){r===void 0&&(r="bottom"),t===void 0&&(t=25);var i=Tr(e),n=[r.startsWith("top")?t:0,r.startsWith("right")?t:0,r.startsWith("bottom")?t:0,r.startsWith("left")?t:0];return[i[0]+n[0],i[1]+n[1],i[2]+n[2],i[3]+n[3]]}function hs(e){var r=e.map(function(i){return Tr(i)}),t=[0,0,0,0];return r.length>0&&(t=t.map(function(i,n){return r.forEach(function(a,o){i+=r[o][n]}),i})),t}function ib(e,r){var t=[];if(e.length){t.push(["M",e[0].x,e[0].y]);for(var i=1,n=e.length;i<n;i+=1){var a=e[i];t.push(["L",a.x,a.y])}r&&t.push(["Z"])}return t}var nb=function(e,r,t,i){var n=[],a,o,s=!!i,l,u;if(s){l=[Infinity,Infinity],u=[-Infinity,-Infinity];for(var c=0,f=e.length;c<f;c++){var v=e[c];l=Lt.min([0,0],l,v),u=Lt.max([0,0],u,v)}l=Lt.min([0,0],l,i[0]),u=Lt.max([0,0],u,i[1])}for(var c=0,d=e.length;c<d;c++){var v=e[c];if(t)a=e[c?c-1:d-1],o=e[(c+1)%d];else if(c===0||c===d-1){n.push(v);continue}else a=e[c-1],o=e[c+1];var p=[0,0];p=Lt.sub(p,o,a),p=Lt.scale(p,p,r);var y=Lt.distance(v,a),m=Lt.distance(v,o),x=y+m;x!==0&&(y/=x,m/=x);var _=Lt.scale([0,0],p,-y),w=Lt.scale([0,0],p,m),b=Lt.add([0,0],v,_),S=Lt.add([0,0],v,w);s&&(b=Lt.max([0,0],b,l),b=Lt.min([0,0],b,u),S=Lt.max([0,0],S,l),S=Lt.min([0,0],S,u)),n.push(b),n.push(S)}return t&&n.push(n.shift()),n};function ab(e,r,t){for(var i=!!r,n=[],a=0,o=e.length;a<o;a+=2)n.push([e[a],e[a+1]]);for(var s=nb(n,.4,i,t),l=n.length,u=[],c,f,v,a=0;a<l-1;a++)c=s[a*2],f=s[a*2+1],v=n[a+1],u.push(["C",c[0],c[1],f[0],f[1],v[0],v[1]]);return i&&(c=s[l],f=s[l+1],v=n[0],u.push(["C",c[0],c[1],f[0],f[1],v[0],v[1]])),u}function ob(e,r,t){var i=[],n=e[0],a=null;if(e.length<=2)return ib(e,r);for(var o=0,s=e.length;o<s;o++){var l=e[o];(!a||!(a.x===l.x&&a.y===l.y))&&(i.push(l.x),i.push(l.y),a=l)}var u=t||[[0,0],[1,1]],c=ab(i,r,u);return c.unshift(["M",n.x,n.y]),c}function hh(e){if(!e)return e;var r=e.match(/(([A-Z]{0,1}[a-z]*[^A-Z])|([A-Z]{1}))/g);return r.map(function(t){return t.toLowerCase()}).join("-")}function fh(e){var r={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis",display:"flex",justifyContent:"center",alignItems:"center"},t=["stroke","lineWidth","shadowColor","strokeOpacity","shadowBlur","shadowOffsetX","shadowOffsetY","fill"];(0,h.get)(e,"fill")&&(r.color=e.fill);var i=$t(e,t),n=i.shadowColor,a=i.shadowBlur,o=a===void 0?0:a,s=i.shadowOffsetX,l=s===void 0?0:s,u=i.shadowOffsetY,c=u===void 0?0:u;r["text-shadow"]="".concat([n,"".concat(l,"px"),"".concat(c,"px"),"".concat(o,"px")].join(" "));var f=$t(e,t),v=f.stroke,d=f.lineWidth,p=d===void 0?0:d;return r["-webkit-text-stroke"]="".concat(["".concat(p,"px"),v].join(" ")),(0,h.each)(e,function(y,m){["fontSize"].includes(m)&&(0,h.isNumber)(y)?r[hh(m)]="".concat(y,"px"):m&&!t.includes(m)&&(r[hh(m)]="".concat(y))}),r}function vh(e,r){e.style["pointer-events"]="none",(0,h.each)(r,function(t,i){i&&t&&(e.style[i]=t)})}var da=function(e,r,t){var i=r.statistic,n=r.plotType,a=i.title,o=i.content;[a,o].forEach(function(s,l){if(!!s){var u="";l===0?u=o?"translate(-50%, -100%)":"translate(-50%, -50%)":u=a?"translate(-50%, 0)":"translate(-50%, -50%)";var c=(0,h.isFunction)(s.style)?s.style(t):s.style;e.annotation().html((0,g.__assign)({position:["50%","50%"],html:function(f,v){var d=v.getCoordinate(),p=0;if(n==="pie"||n==="ring-progress")p=d.getRadius()*d.innerRadius*2;else if(n==="liquid"){var y=(0,h.get)(v.geometries,[0,"elements",0,"shape"]);if(y){var m=y.find(function(b){return b.get("name")==="wrap"}),x=m.getCanvasBBox().width;p=x}}else p||(p=d.getWidth());vh(f,(0,g.__assign)({width:"".concat(p,"px"),transform:u},fh(c)));var _=v.getData();if(s.customHtml)return s.customHtml(f,v,t,_);var w=s.content;return s.formatter&&(w=s.formatter(t,_)),w?(0,h.isString)(w)?w:"".concat(w):"<div></div>"},key:"".concat(l===0?"top":"bottom","-statistic")},$t(s,["offsetX","offsetY","rotate","style","formatter"])))}})},sb=function(e,r,t){var i=r.statistic,n=i.title,a=i.content;[n,a].forEach(function(o){if(!!o){var s=(0,h.isFunction)(o.style)?o.style(t):o.style;e.annotation().html((0,g.__assign)({position:["50%","100%"],html:function(l,u){var c=u.getCoordinate(),f=u.views[0].getCoordinate(),v=f.getCenter(),d=f.getRadius(),p=Math.max(Math.sin(f.startAngle),Math.sin(f.endAngle))*d,y=v.y+p-c.y.start-parseFloat((0,h.get)(s,"fontSize",0)),m=c.getRadius()*c.innerRadius*2;vh(l,(0,g.__assign)({width:"".concat(m,"px"),transform:"translate(-50%, ".concat(y,"px)")},fh(s)));var x=u.getData();if(o.customHtml)return o.customHtml(l,u,t,x);var _=o.content;return o.formatter&&(_=o.formatter(t,x)),_?(0,h.isString)(_)?_:"".concat(_):"<div></div>"}},$t(o,["offsetX","offsetY","rotate","style","formatter"])))}})};function dh(e,r){return r?(0,h.reduce)(r,function(t,i,n){return t.replace(new RegExp("{\\s*".concat(n,"\\s*}"),"g"),i)},e):e}function Nt(e,r){return e.views.find(function(t){return t.id===r})}function sn(e){var r=e.parent;return r?r.views:[]}function gh(e){return sn(e).filter(function(r){return r!==e})}function ln(e,r,t){t===void 0&&(t=e.geometries),typeof r=="boolean"?e.animate(r):e.animate(!0),(0,h.each)(t,function(i){var n;(0,h.isFunction)(r)?n=r(i.type||i.shapeType,i)||!0:n=r,i.animate(n)})}function ga(){return typeof window=="object"?window==null?void 0:window.devicePixelRatio:2}function fs(e,r){r===void 0&&(r=e);var t=document.createElement("canvas"),i=ga();t.width=e*i,t.height=r*i,t.style.width="".concat(e,"px"),t.style.height="".concat(r,"px");var n=t.getContext("2d");return n.scale(i,i),t}function vs(e,r,t,i){i===void 0&&(i=t);var n=r.backgroundColor,a=r.opacity;e.globalAlpha=a,e.fillStyle=n,e.beginPath(),e.fillRect(0,0,t,i),e.closePath()}function ph(e,r,t){var i=e+r;return t?i*2:i}function yh(e,r){var t=r?[[e*(1/4),e*(1/4)],[e*(3/4),e*(3/4)]]:[[e*(1/2),e*(1/2)]];return t}function ds(e,r){var t=r*Math.PI/180,i={a:Math.cos(t)*(1/e),b:Math.sin(t)*(1/e),c:-Math.sin(t)*(1/e),d:Math.cos(t)*(1/e),e:0,f:0};return i}var lb={size:6,padding:2,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0,isStagger:!0};function ub(e,r,t,i){var n=r.size,a=r.fill,o=r.lineWidth,s=r.stroke,l=r.fillOpacity;e.beginPath(),e.globalAlpha=l,e.fillStyle=a,e.strokeStyle=s,e.lineWidth=o,e.arc(t,i,n/2,0,2*Math.PI,!1),e.fill(),o&&e.stroke(),e.closePath()}function cb(e){var r=O({},lb,e),t=r.size,i=r.padding,n=r.isStagger,a=r.rotation,o=ph(t,i,n),s=yh(o,n),l=fs(o,o),u=l.getContext("2d");vs(u,r,o);for(var c=0,f=s;c<f.length;c++){var v=f[c],d=v[0],p=v[1];ub(u,r,d,p)}var y=u.createPattern(l,"repeat");if(y){var m=ga(),x=ds(m,a);y.setTransform(x)}return y}var hb={rotation:45,spacing:5,opacity:1,backgroundColor:"transparent",strokeOpacity:.5,stroke:"#fff",lineWidth:2};function fb(e,r,t){var i=r.stroke,n=r.lineWidth,a=r.strokeOpacity,o=new Path2D(t);e.globalAlpha=a,e.lineCap="square",e.strokeStyle=n?i:"transparent",e.lineWidth=n,e.stroke(o)}function vb(e){var r=O({},hb,e),t=r.spacing,i=r.rotation,n=r.lineWidth,a=t+n||1,o=t+n||1,s=`
  32. M 0 0 L `.concat(a,` 0
  33. M 0 `).concat(o," L ").concat(a," ").concat(o,`
  34. `),l=fs(a,o),u=l.getContext("2d");vs(u,r,a,o),fb(u,r,s);var c=u.createPattern(l,"repeat");if(c){var f=ga(),v=ds(f,i);c.setTransform(v)}return c}var db={size:6,padding:1,isStagger:!0,backgroundColor:"transparent",opacity:1,rotation:0,fill:"#fff",fillOpacity:.5,stroke:"transparent",lineWidth:0};function gb(e,r,t,i){var n=r.stroke,a=r.size,o=r.fill,s=r.lineWidth,l=r.fillOpacity;e.globalAlpha=l,e.strokeStyle=n,e.lineWidth=s,e.fillStyle=o,e.strokeRect(t-a/2,i-a/2,a,a),e.fillRect(t-a/2,i-a/2,a,a)}function pb(e){var r=O({},db,e),t=r.size,i=r.padding,n=r.isStagger,a=r.rotation,o=ph(t,i,n),s=yh(o,n),l=fs(o,o),u=l.getContext("2d");vs(u,r,o);for(var c=0,f=s;c<f.length;c++){var v=f[c],d=v[0],p=v[1];gb(u,r,d,p)}var y=u.createPattern(l,"repeat");if(y){var m=ga(),x=ds(m,a);y.setTransform(x)}return y}function yb(e){var r=e.type,t=e.cfg,i;switch(r){case"dot":i=cb(t);break;case"line":i=vb(t);break;case"square":i=pb(t);break;default:break}return i}function Ve(e){var r=this;return function(t){var i,n=t.options,a=t.chart,o=n.pattern;if(!o)return t;var s=function(l){for(var u,c,f,v=[],d=1;d<arguments.length;d++)v[d-1]=arguments[d];var p=a.getTheme().defaultColor,y=p,m=(c=(u=a.geometries)===null||u===void 0?void 0:u[0])===null||c===void 0?void 0:c.getAttribute("color");if(m){var x=m.getFields()[0],_=(0,h.get)(l,x);y=ke.getMappingValue(m,_,((f=m.values)===null||f===void 0?void 0:f[0])||p)}var w=o;typeof o=="function"&&(w=o.call(r,l,y)),w instanceof CanvasPattern||(w=yb(O({},{cfg:{backgroundColor:y}},w)));var b=n[e];return(0,g.__assign)((0,g.__assign)({},typeof b=="function"?b.call.apply(b,(0,g.__spreadArray)([r,l],v,!1)):b||{}),{fill:w||y})};return O({},t,{options:(i={},i[e]=s,i)})}}function Ur(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField,a=t.seriesField;return i===!1?r.legend(!1):(n||a)&&r.legend(n||a,i),e}function me(e){var r=e.chart,t=e.options,i=t.tooltip;return i!==void 0&&r.tooltip(i),e}function oe(e){var r=e.chart,t=e.options,i=t.interactions;return(0,h.each)(i,function(n){n.enable===!1?r.removeInteraction(n.type):r.interaction(n.type,n.cfg||{})}),e}function Qt(e){var r=e.chart,t=e.options,i=t.animation;return ln(r,i),e}function Xt(e){var r=e.chart,t=e.options,i=t.theme;return i&&r.theme(i),e}function Lr(e){var r=e.chart,t=e.options,i=t.state;return i&&(0,h.each)(r.geometries,function(n){n.state(i)}),e}function un(e){var r=e.chart,t=e.options,i=t.slider;return r.option("slider",i),e}function gs(e){var r=e.chart,t=e.options,i=t.scrollbar;return r.option("scrollbar",i),e}function he(e,r){return function(t){var i=t.chart,n=t.options,a={};return(0,h.each)(e,function(o,s){a[s]=$t(o,Be)}),a=O({},r,n.meta,a),i.scale(a),t}}function le(e){return function(r){var t=r.chart,i=r.options,n=t.getController("annotation");return(0,h.each)((0,g.__spreadArray)((0,g.__spreadArray)([],i.annotations||[],!0),e||[],!0),function(a){n.annotation(a)}),r}}function jr(e){var r=e.chart,t=e.options,i=t.yAxis,n=t.limitInPlot,a=n;return(0,h.isObject)(i)&&(0,h.isNil)(n)&&(Object.values($t(i,["min","max","minLimit","maxLimit"])).some(function(o){return!(0,h.isNil)(o)})?a=!0:a=!1),r.limitInPlot=a,e}function mh(e){return e===void 0&&(e="rect"),function(r){var t=r.chart,i=r.options,n=i.coordinate,a=Array.from(n||[]).map(function(o){return o.type==="reflectX"?["reflect","x"]:o.type==="reflectY"?["reflect","y"]:o.type==="transpose"?["transpose"]:null}).filter(function(o){return!!o});return a.length!==0&&t.coordinate({type:e,actions:a}),r}}var xh={locale:"en-US"};function oI(e){each(e,function(r,t){return xh[t]=r})}var pa={};function _h(e,r){pa[e]=r}function ya(e){return{get:function(r,t){return dh((0,h.get)(pa[e],r)||(0,h.get)(pa[xh.locale],r)||(0,h.get)(pa["en-US"],r)||r,t)}}}var mb={locale:"en-US",general:{increase:"Increase",decrease:"Decrease",root:"Root"},statistic:{total:"Total"},conversionTag:{label:"Rate"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"Total"}},xb={locale:"zh-CN",general:{increase:"\u589E\u52A0",decrease:"\u51CF\u5C11",root:"\u521D\u59CB"},statistic:{total:"\u603B\u8BA1"},conversionTag:{label:"\u8F6C\u5316\u7387"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"\u603B\u8BA1"}};function Ye(e,r){if(e===!1)return{fields:!1};var t=(0,h.get)(e,"fields"),i=(0,h.get)(e,"formatter");return i&&!t&&(t=r),{fields:t,formatter:i}}function ma(e,r){var t=e.type,i=e.xField,n=e.yField,a=e.colorField,o=e.shapeField,s=e.sizeField,l=e.styleField,u=e.rawFields,c=[];if(u=((0,h.isFunction)(u)?u(t,r):u)||[],r==="color")c=(0,g.__spreadArray)([a||i],u,!0);else if(r==="shape")c=(0,g.__spreadArray)([o||i],u,!0);else if(r==="size")c=(0,g.__spreadArray)([s||i],u,!0);else{c=(0,g.__spreadArray)([i,n,a,o,s,l],u,!0);var f=["x","y","color","shape","size","style"].indexOf(r),v=c[f];c.splice(f,1),c.unshift(v)}var d=(0,h.uniq)(c.filter(function(y){return!!y})),p=t==="line"&&[i,n].includes(d.join("*"))?"":d.join("*");return{mappingFields:d,tileMappingField:p}}function _i(e,r){if(!!r)return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n={};return e.forEach(function(a,o){n[a]=t[o]}),delete n.undefined,r(n)}}function Re(e){var r=e.chart,t=e.options,i=t.type,n=t.args,a=t.mapping,o=t.xField,s=t.yField,l=t.colorField,u=t.shapeField,c=t.sizeField,f=t.tooltipFields,v=t.label,d=t.state,p=t.customInfo;if(!a)return e;var y=a.color,m=a.shape,x=a.size,_=a.style,w=a.tooltip,b=r[i](n).position("".concat(o,"*").concat(s));if((0,h.isString)(y))l?b.color(l,y):b.color(y);else if((0,h.isFunction)(y)){var S=ma(t,"color"),C=S.mappingFields,A=S.tileMappingField;b.color(A,_i(C,y))}else l&&b.color(l,y);if((0,h.isString)(m))u?b.shape(u,[m]):b.shape(m);else if((0,h.isFunction)(m)){var F=ma(t,"shape"),C=F.mappingFields,A=F.tileMappingField;b.shape(A,_i(C,m))}else u&&b.shape(u,m);if((0,h.isNumber)(x))c?b.size(c,x):b.size(x);else if((0,h.isFunction)(x)){var P=ma(t,"size"),C=P.mappingFields,A=P.tileMappingField;b.size(A,_i(C,x))}else c&&b.size(c,x);if((0,h.isFunction)(_)){var I=ma(t,"style"),C=I.mappingFields,A=I.tileMappingField;b.style(A,_i(C,_))}else(0,h.isObject)(_)&&b.style(_);if(f===!1?b.tooltip(!1):(0,h.isEmpty)(f)||b.tooltip(f.join("*"),_i(f,w)),v===!1)b.label(!1);else if(v){var V=v.callback,Z=v.fields,vt=(0,g.__rest)(v,["callback","fields"]);b.label({fields:Z||[s],callback:V,cfg:be(vt)})}return d&&b.state(d),p&&b.customInfo(p),[o,s].filter(function(yt){return yt!==l}).forEach(function(yt){r.legend(yt,!1)}),(0,g.__assign)((0,g.__assign)({},e),{ext:{geometry:b}})}function xa(e){var r=e.options,t=r.area,i=r.xField,n=r.yField,a=r.seriesField,o=r.smooth,s=r.tooltip,l=r.useDeferredLabel,u=Ye(s,[i,n,a]),c=u.fields,f=u.formatter;return t?Re(O({},e,{options:{type:"area",colorField:a,tooltipFields:c,mapping:(0,h.deepMix)({shape:o?"smooth":"area",tooltip:f},t),args:{useDeferredLabel:l}}})):e}function wh(e){var r=e.options,t=r.edge,i=r.xField,n=r.yField,a=r.seriesField,o=r.tooltip,s=r.useDeferredLabel,l=Ye(o,[i,n,a]),u=l.fields,c=l.formatter;return t?Re(O({},e,{options:{type:"edge",colorField:a,tooltipFields:u,mapping:(0,g.__assign)({tooltip:c},t),args:{useDeferredLabel:s}}})):e}function _b(e){var r=e.chart,t=e.options,i=e.ext,n=t.seriesField,a=t.isGroup,o=t.isStack,s=t.marginRatio,l=t.widthRatio,u=t.groupField,c=t.theme,f=[];if(n&&(a&&f.push({type:"dodge",dodgeBy:u||n,marginRatio:s}),o&&f.push({type:"stack",marginRatio:s})),f.length&&(i==null?void 0:i.geometry)){var v=i==null?void 0:i.geometry;v.adjust(f)}return(0,h.isNil)(l)||r.theme(O({},(0,h.isObject)(c)?c:$i(c),{columnWidthRatio:l})),e}function Fe(e){var r=e.options,t=r.xField,i=r.yField,n=r.interval,a=r.seriesField,o=r.tooltip,s=r.minColumnWidth,l=r.maxColumnWidth,u=r.columnBackground,c=r.dodgePadding,f=r.intervalPadding,v=r.useDeferredLabel,d=Ye(o,[t,i,a]),p=d.fields,y=d.formatter,m=(n?Re(O({},e,{options:{type:"interval",colorField:a,tooltipFields:p,mapping:(0,g.__assign)({tooltip:y},n),args:{dodgePadding:c,intervalPadding:f,minColumnWidth:s,maxColumnWidth:l,background:u,useDeferredLabel:v}}})):e).ext;return _b((0,g.__assign)((0,g.__assign)({},e),{ext:m}))}function wi(e){var r=e.options,t=r.line,i=r.stepType,n=r.xField,a=r.yField,o=r.seriesField,s=r.smooth,l=r.connectNulls,u=r.tooltip,c=r.useDeferredLabel,f=Ye(u,[n,a,o]),v=f.fields,d=f.formatter;return t?Re(O({},e,{options:{type:"line",colorField:o,tooltipFields:v,mapping:(0,h.deepMix)({shape:i||(s?"smooth":"line"),tooltip:d},t),args:{connectNulls:l,useDeferredLabel:c}}})):e}function Ge(e){var r=e.options,t=r.point,i=r.xField,n=r.yField,a=r.seriesField,o=r.sizeField,s=r.shapeField,l=r.tooltip,u=r.useDeferredLabel,c=Ye(l,[i,n,a,o,s]),f=c.fields,v=c.formatter;return t?Re(O({},e,{options:{type:"point",colorField:a,shapeField:s,tooltipFields:f,mapping:(0,g.__assign)({tooltip:v},t),args:{useDeferredLabel:u}}})):e}function _a(e){var r=e.options,t=r.polygon,i=r.xField,n=r.yField,a=r.seriesField,o=r.tooltip,s=r.useDeferredLabel,l=Ye(o,[i,n,a]),u=l.fields,c=l.formatter;return t?Re(O({},e,{options:{type:"polygon",colorField:a,tooltipFields:u,mapping:(0,g.__assign)({tooltip:c},t),args:{useDeferredLabel:s}}})):e}function ps(e){var r=e.options,t=r.schema,i=r.xField,n=r.yField,a=r.seriesField,o=r.tooltip,s=r.useDeferredLabel,l=Ye(o,[i,n,a]),u=l.fields,c=l.formatter;return t?Re(O({},e,{options:{type:"schema",colorField:a,tooltipFields:u,mapping:(0,g.__assign)({tooltip:c},t),args:{useDeferredLabel:s}}})):e}function wb(e){var r=e.options,t=r.violin,i=r.xField,n=r.yField,a=r.seriesField,o=r.sizeField,s=r.tooltip,l=Ye(s,[i,n,a,o]),u=l.fields,c=l.formatter;return t?Re(O({},e,{options:{type:"violin",colorField:a,tooltipFields:u,mapping:(0,g.__assign)({tooltip:c},t)}})):e}var bb=M(18587),bh="data-chart-source-type",Sh=["padding","appendPadding","renderer","pixelRatio","syncViewPadding","supportCSSTransform","limitInPlot"],kt=function(e){(0,g.__extends)(r,e);function r(t,i){var n=e.call(this)||this;return n.container=typeof t=="string"?document.getElementById(t):t,n.options=O({},n.getDefaultOptions(),i),n.createG2(),n.bindEvents(),n}return r.getDefaultOptions=function(){return{renderer:"canvas",xAxis:{nice:!0,label:{autoRotate:!1,autoHide:{type:"equidistance",cfg:{minGap:6}}}},yAxis:{nice:!0,label:{autoHide:!0,autoRotate:!1}},animation:!0}},r.prototype.createG2=function(){var t=this.options,i=t.width,n=t.height,a=t.defaultInteractions;this.chart=new s0((0,g.__assign)((0,g.__assign)((0,g.__assign)((0,g.__assign)({container:this.container,autoFit:!1},this.getChartSize(i,n)),{localRefresh:!1}),$t(this.options,Sh)),{defaultInteractions:a})),this.container.setAttribute(bh,"G2Plot")},r.prototype.getChartSize=function(t,i){var n=us(this.container);return{width:t||n.width||400,height:i||n.height||400}},r.prototype.bindEvents=function(){var t=this;this.chart&&this.chart.on("*",function(i){(i==null?void 0:i.type)&&t.emit(i.type,i)})},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.render=function(){this.chart.clear(),this.chart.options={data:[],animate:!0},this.chart.views=[],this.execAdaptor(),this.chart.render(),this.bindSizeSensor()},r.prototype.update=function(t){this.updateOption(t),this.render()},r.prototype.updateOption=function(t){this.options=O({},this.options,t)},r.prototype.setState=function(t,i,n){n===void 0&&(n=!0);var a=on(this.chart);(0,h.each)(a,function(o){i(o.getData())&&o.setState(t,n)})},r.prototype.getStates=function(){var t=on(this.chart),i=[];return(0,h.each)(t,function(n){var a=n.getData(),o=n.getStates();(0,h.each)(o,function(s){i.push({data:a,state:s,geometry:n.geometry,element:n})})}),i},r.prototype.changeData=function(t){this.update({data:t})},r.prototype.changeSize=function(t,i){this.chart.changeSize(t,i)},r.prototype.addAnnotations=function(t,i){i=i||this.chart;var n=(0,g.__spreadArray)([],t,!0),a=i.getController("annotation"),o=a.getComponents().map(function(u){return u.extra});a.clear(!0);for(var s=function(u){var c=o[u],f=n.findIndex(function(v){return v.id&&v.id===c.id});f!==-1&&(c=O({},c,n[f]),n.splice(f,1)),a.annotation(c)},l=0;l<o.length;l++)s(l);n.forEach(function(u){return a.annotation(u)}),i.render(!0)},r.prototype.removeAnnotations=function(t){var i=this.chart.getController("annotation"),n=i.getComponents().map(function(s){return s.extra});i.clear(!0);for(var a=function(s){var l=n[s];t.find(function(u){return u.id&&u.id===l.id})||i.annotation(l)},o=0;o<n.length;o++)a(o);this.chart.render(!0)},r.prototype.destroy=function(){this.unbindSizeSensor(),this.chart.destroy(),this.off(),this.container.removeAttribute(bh)},r.prototype.execAdaptor=function(){var t=this.getSchemaAdaptor(),i=this.options,n=i.padding,a=i.appendPadding;this.chart.padding=n,this.chart.appendPadding=a,t({chart:this.chart,options:this.options})},r.prototype.triggerResize=function(){this.chart.forceFit()},r.prototype.bindSizeSensor=function(){var t=this;if(!this.unbind){var i=this.options.autoFit,n=i===void 0?!0:i;n&&(this.unbind=(0,bb.ak)(this.container,function(){var a=us(t.container),o=a.width,s=a.height;(o!==t.chart.width||s!==t.chart.height)&&t.triggerResize()}))}},r.prototype.unbindSizeSensor=function(){this.unbind&&(this.unbind(),this.unbind=void 0)},r}(j.Z);function Ch(e,r,t,i){var n=(0,h.reduce)(e,function(a,o){var s=o[t],l=a.has(s)?a.get(s):0,u=o[r];return l=Xr(u)?l+u:l,a.set(s,l),a},new Map);return(0,h.map)(e,function(a){var o,s=a[r],l=a[t],u=Xr(s)&&n.get(l)!==0?s/n.get(l):0;return(0,g.__assign)((0,g.__assign)({},a),(o={},o[i]=u,o))})}function Sb(e,r,t,i){var n=(0,h.reduce)(e,function(a,o){var s=(0,h.reduce)(t,function(c,f){return"".concat(c).concat(o[f])},""),l=a.has(s)?a.get(s):0,u=o[r];return l=Xr(u)?l+u:l,a.set(s,l),a},new Map);return(0,h.map)(e,function(a){var o,s=a[r],l=(0,h.reduce)(t,function(c,f){return"".concat(c).concat(a[f])},""),u=Xr(s)&&n.get(l)!==0?s/n.get(l):0;return(0,g.__assign)((0,g.__assign)({},a),(o={},o[i]=u,o))})}function cn(e,r,t,i,n){return n?Ch(e,r,t,i):e}function Cb(e){var r=e.chart,t=e.options,i=t.data,n=t.color,a=t.lineStyle,o=t.lineShape,s=t.point,l=t.area,u=t.seriesField,c=s==null?void 0:s.state,f=l==null?void 0:l.state;r.data(i);var v=O({},e,{options:{shapeField:u,line:{color:n,style:a,shape:o},point:s&&(0,g.__assign)({color:n,shape:"circle"},s),area:l&&(0,g.__assign)({color:n},l),label:void 0}}),d=O({},v,{options:{tooltip:!1,state:c}}),p=O({},v,{options:{tooltip:!1,state:f}});return wi(v),Ge(d),xa(p),e}function wa(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.xField,s=i.yField,l=i.data;return Et(he((r={},r[o]=n,r[s]=a,r),(t={},t[o]={type:"cat"},t[s]=ls(l,s),t)))(e)}function Ab(e){var r=e.chart,t=e.options,i=t.reflect;if(i){var n=i;(0,h.isArray)(n)||(n=[n]);var a=n.map(function(o){return["reflect",o]});r.coordinate({type:"rect",actions:a})}return e}function Ah(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(o,!1):r.axis(o,n),e}function Mh(e){var r=e.chart,t=e.options,i=t.legend,n=t.seriesField;return i&&n?r.legend(n,i):i===!1&&r.legend(!1),e}function Mb(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Me(r,"line");if(!i)a.label(!1);else{var o=i.callback,s=(0,g.__rest)(i,["callback"]);a.label({fields:[n],callback:o,cfg:(0,g.__assign)({layout:[{type:"limit-in-plot"},{type:"path-adjust-position"},{type:"point-adjust-position"},{type:"limit-in-plot",cfg:{action:"hide"}}]},be(s))})}return e}function Fb(e){var r=e.chart,t=e.options,i=t.isStack;return i&&(0,h.each)(r.geometries,function(n){n.adjust("stack")}),e}function Fh(e){return Et(Cb,wa,Fb,Xt,Ab,Ah,Mh,me,Mb,un,gs,oe,Qt,le(),jr)(e)}function Eb(e){var r=e.chart,t=e.options,i=t.data,n=t.areaStyle,a=t.areaShape,o=t.color,s=t.point,l=t.line,u=t.isPercent,c=t.xField,f=t.yField,v=t.tooltip,d=t.seriesField,p=t.startOnZero,y=s==null?void 0:s.state,m=cn(i,f,c,f,u);r.data(m);var x=u?(0,g.__assign)({formatter:function(S){return{name:S[d]||S[c],value:(Number(S[f])*100).toFixed(2)+"%"}}},v):v,_=O({},e,{options:{area:{color:o,style:n,shape:a},point:s&&(0,g.__assign)({color:o},s),tooltip:x,label:void 0,args:{startOnZero:p}}}),w={chart:r,options:O({line:{size:2}},(0,h.omit)(t,["state"]),{line:l&&(0,g.__assign)({color:o},l),sizeField:d,state:l==null?void 0:l.state,tooltip:!1,label:void 0,args:{startOnZero:p}})},b=O({},_,{options:{tooltip:!1,state:y}});return xa(_),wi(w),Ge(b),e}function Tb(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Me(r,"area");if(!i)a.label(!1);else{var o=i.callback,s=(0,g.__rest)(i,["callback"]);a.label({fields:[n],callback:o,cfg:(0,g.__assign)({layout:[{type:"limit-in-plot"},{type:"path-adjust-position"},{type:"point-adjust-position"},{type:"limit-in-plot",cfg:{action:"hide"}}]},be(s))})}return e}function Lb(e){var r=e.chart,t=e.options,i=t.isStack,n=t.isPercent,a=t.seriesField;return(n||i)&&a&&(0,h.each)(r.geometries,function(o){o.adjust("stack")}),e}function Eh(e){return Et(Xt,Ve("areaStyle"),mh("rect"),Eb,wa,Lb,Ah,Mh,me,Tb,un,le(),oe,Qt,jr)(e)}var Ib=O({},kt.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},isStack:!0,line:{},legend:{position:"top-left",radio:{}}}),Th=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="area",t}return r.getDefaultOptions=function(){return Ib},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options,n=i.isPercent,a=i.xField,o=i.yField,s=this,l=s.chart,u=s.options;wa({chart:l,options:u}),this.chart.changeData(cn(t,o,a,o,n))},r.prototype.getSchemaAdaptor=function(){return Eh},r}(kt),Ob=10,Pb=5,kb={padding:[8,10],text:"reset",textStyle:{default:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"}},buttonStyle:{default:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},active:{fill:"#e6e6e6"}}},Db=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.buttonGroup=null,t.buttonCfg=(0,g.__assign)({name:"button"},kb),t}return r.prototype.getButtonCfg=function(){var t=this.context.view,i=(0,h.get)(t,["interactions","filter-action","cfg","buttonConfig"]);return O(this.buttonCfg,i,this.cfg)},r.prototype.drawButton=function(){var t=this.getButtonCfg(),i=this.context.view.foregroundGroup.addGroup({name:t.name}),n=this.drawText(i);this.drawBackground(i,n.getBBox()),this.buttonGroup=i},r.prototype.drawText=function(t){var i,n=this.getButtonCfg();return t.addShape({type:"text",name:"button-text",attrs:(0,g.__assign)({text:n.text},(i=n.textStyle)===null||i===void 0?void 0:i.default)})},r.prototype.drawBackground=function(t,i){var n,a=this.getButtonCfg(),o=Tr(a.padding),s=t.addShape({type:"rect",name:"button-rect",attrs:(0,g.__assign)({x:i.x-o[3],y:i.y-o[0],width:i.width+o[1]+o[3],height:i.height+o[0]+o[2]},(n=a.buttonStyle)===null||n===void 0?void 0:n.default)});return s.toBack(),t.on("mouseenter",function(){var l;s.attr((l=a.buttonStyle)===null||l===void 0?void 0:l.active)}),t.on("mouseleave",function(){var l;s.attr((l=a.buttonStyle)===null||l===void 0?void 0:l.default)}),s},r.prototype.resetPosition=function(){var t=this.context.view,i=t.getCoordinate(),n=i.convert({x:1,y:1}),a=this.buttonGroup,o=a.getBBox(),s=ke.transform(null,[["t",n.x-o.width-Ob,n.y+o.height+Pb]]);a.setMatrix(s)},r.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},r.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},r.prototype.destroy=function(){var t=this.buttonGroup;t&&t.remove(),e.prototype.destroy.call(this)},r}(ne);xt("brush-reset-button",Db,{name:"brush-reset-button"}),Ot("filter-action",{});function vr(e){return e.isInPlot()}function Zr(e,r,t){var i=t||{},n=i.mask,a=i.isStartEnable,o=r||"rect";switch(e){case"brush":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:a||vr,action:["brush:start","".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[null,{maskStyle:n==null?void 0:n.style}]}],processing:[{trigger:"mousemove",isEnable:vr,action:["".concat(o,"-mask:resize")]}],end:[{trigger:"mouseup",isEnable:vr,action:["brush:filter","brush:end","".concat(o,"-mask:end"),"".concat(o,"-mask:hide"),"brush-reset-button:show"]}],rollback:[{trigger:"brush-reset-button:click",action:["brush:reset","brush-reset-button:hide","cursor:crosshair"]}]};case"brush-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mousemove",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mousemove",action:"cursor:default",isEnable:function(s){return a?!a(s):!1}},{trigger:"mask:mouseenter",action:"cursor:move",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:a||function(s){return!s.isInShape("mask")},action:["".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[{maskStyle:n==null?void 0:n.style}]},{trigger:"mask:dragstart",action:["".concat(o,"-mask:moveStart")]}],processing:[{trigger:"plot:mousemove",action:["".concat(o,"-mask:resize")]},{trigger:"mask:drag",action:["".concat(o,"-mask:move")]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["".concat(o,"-mask:end")]},{trigger:"mask:dragend",action:["".concat(o,"-mask:moveEnd")]},{trigger:"document:mouseup",isEnable:function(s){return!s.isInPlot()},action:["element-range-highlight:clear","".concat(o,"-mask:end"),"".concat(o,"-mask:hide")]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","".concat(o,"-mask:hide")]}]};case"brush-x":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:a||vr,action:["brush-x:start","".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[null,{maskStyle:n==null?void 0:n.style}]}],processing:[{trigger:"mousemove",isEnable:vr,action:["".concat(o,"-mask:resize")]}],end:[{trigger:"mouseup",isEnable:vr,action:["brush-x:filter","brush-x:end","".concat(o,"-mask:end"),"".concat(o,"-mask:hide")]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]};case"brush-x-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"mask:mouseenter",action:"cursor:move",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:a||function(s){return!s.isInShape("mask")},action:["".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[{maskStyle:n==null?void 0:n.style}]},{trigger:"mask:dragstart",action:["".concat(o,"-mask:moveStart")]}],processing:[{trigger:"plot:mousemove",action:["".concat(o,"-mask:resize")]},{trigger:"mask:drag",action:["".concat(o,"-mask:move")]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["".concat(o,"-mask:end")]},{trigger:"mask:dragend",action:["".concat(o,"-mask:moveEnd")]},{trigger:"document:mouseup",isEnable:function(s){return!s.isInPlot()},action:["element-range-highlight:clear","".concat(o,"-mask:end"),"".concat(o,"-mask:hide")]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","".concat(o,"-mask:hide")]}]};case"brush-y":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:a||vr,action:["brush-y:start","".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[null,{maskStyle:n==null?void 0:n.style}]}],processing:[{trigger:"mousemove",isEnable:vr,action:["".concat(o,"-mask:resize")]}],end:[{trigger:"mouseup",isEnable:vr,action:["brush-y:filter","brush-y:end","".concat(o,"-mask:end"),"".concat(o,"-mask:hide")]}],rollback:[{trigger:"dblclick",action:["brush-y:reset"]}]};case"brush-y-highlight":return{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair",isEnable:a||function(){return!0}},{trigger:"mask:mouseenter",action:"cursor:move",isEnable:a||function(){return!0}},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:a||function(s){return!s.isInShape("mask")},action:["".concat(o,"-mask:start"),"".concat(o,"-mask:show")],arg:[{maskStyle:n==null?void 0:n.style}]},{trigger:"mask:dragstart",action:["".concat(o,"-mask:moveStart")]}],processing:[{trigger:"plot:mousemove",action:["".concat(o,"-mask:resize")]},{trigger:"mask:drag",action:["".concat(o,"-mask:move")]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["".concat(o,"-mask:end")]},{trigger:"mask:dragend",action:["".concat(o,"-mask:moveEnd")]},{trigger:"document:mouseup",isEnable:function(s){return!s.isInPlot()},action:["element-range-highlight:clear","".concat(o,"-mask:end"),"".concat(o,"-mask:hide")]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","".concat(o,"-mask:hide")]}]};default:return{}}}Ot("brush",Zr("brush")),Ot("brush-highlight",Zr("brush-highlight")),Ot("brush-x",Zr("brush-x","x-rect")),Ot("brush-y",Zr("brush-y","y-rect")),Ot("brush-x-highlight",Zr("brush-x-highlight","x-rect")),Ot("brush-y-highlight",Zr("brush-y-highlight","y-rect"));var Lh=["brush","brush-x","brush-y","brush-highlight","brush-x-highlight","brush-y-highlight"];function Ih(e){var r=e.options,t=r.brush,i=(0,h.filter)(r.interactions||[],function(n){return Lh.indexOf(n.type)===-1});return(t==null?void 0:t.enabled)&&(Lh.forEach(function(n){var a=!1;switch(t.type){case"x-rect":a=n===(t.action==="highlight"?"brush-x-highlight":"brush-x");break;case"y-rect":a=n===(t.action==="highlight"?"brush-y-highlight":"brush-y");break;default:a=n===(t.action==="highlight"?"brush-highlight":"brush");break}var o={type:n,enable:a};t&&(o.cfg=Zr(n,t.type,t)),i.push(o)}),(t==null?void 0:t.action)!=="highlight"&&i.push({type:"filter-action",cfg:{buttonConfig:t.button}})),O({},e,{options:{interactions:i}})}var qr={hover:"__interval-connected-area-hover__",click:"__interval-connected-area-click__"},ys=function(e,r){return e==="hover"?[{trigger:"interval:mouseenter",action:["element-highlight-by-color:highlight","element-link-by-color:link"],arg:[null,{style:r}]}]:[{trigger:"interval:click",action:["element-highlight-by-color:clear","element-highlight-by-color:highlight","element-link-by-color:clear","element-link-by-color:unlink","element-link-by-color:link"],arg:[null,null,null,null,{style:r}]}]};Ot(qr.hover,{start:ys(qr.hover),end:[{trigger:"interval:mouseleave",action:["element-highlight-by-color:reset","element-link-by-color:unlink"]}]}),Ot(qr.click,{start:ys(qr.click),end:[{trigger:"document:mousedown",action:["element-highlight-by-color:clear","element-link-by-color:clear"]}]});function Bb(e){return e===void 0&&(e=!1),function(r){var t=r.chart,i=r.options,n=i.connectedArea,a=function(){t.removeInteraction(qr.hover),t.removeInteraction(qr.click)};if(!e&&n){var o=n.trigger||"hover";a(),t.interaction(qr[o],{start:ys(o,n.style)})}else a();return r}}function Oh(e,r){return!(0,h.isNumber)(e)||!(0,h.isNumber)(r)||e===0&&r===0?"-":e===r?"100%":e===0?"\u221E":"".concat((100*r/e).toFixed(2),"%")}function Rb(e,r){return O({size:r?32:80,spacing:r?8:12,offset:r?32:0,arrow:e.arrow!==!1&&{headSize:12,style:{fill:"rgba(0, 0, 0, 0.05)"}},text:e.text!==!1&&{style:{fontSize:12,fill:"rgba(0, 0, 0, 0.85)",textAlign:"center",textBaseline:"middle"},formatter:Oh}},e)}function ba(e,r){return(0,h.map)(r.getModel().points,function(t){return e.convertPoint(t)})}function Nb(e,r,t){var i=e.view,n=e.geometry,a=e.group,o=e.options,s=e.horizontal,l=o.offset,u=o.size,c=o.arrow,f=i.getCoordinate(),v=ba(f,r)[3],d=ba(f,t)[0],p=d.y-v.y,y=d.x-v.x;if(typeof c!="boolean"){var m=c.headSize,x=o.spacing,_;s?(y-m)/2<x?(x=Math.max(1,(y-m)/2),_=[[v.x+x,v.y-l],[v.x+x,v.y-l-u],[d.x-x,d.y-l-u/2]]):_=[[v.x+x,v.y-l],[v.x+x,v.y-l-u],[d.x-x-m,d.y-l-u],[d.x-x,d.y-l-u/2],[d.x-x-m,d.y-l]]:(p-m)/2<x?(x=Math.max(1,(p-m)/2),_=[[v.x+l,v.y+x],[v.x+l+u,v.y+x],[d.x+l+u/2,d.y-x]]):_=[[v.x+l,v.y+x],[v.x+l+u,v.y+x],[d.x+l+u,d.y-x-m],[d.x+l+u/2,d.y-x],[d.x+l,d.y-x-m]],a.addShape("polygon",{id:"".concat(i.id,"-conversion-tag-arrow-").concat(n.getElementId(r.getModel().mappingData)),name:"conversion-tag-arrow",origin:{element:r,nextElement:t},attrs:(0,g.__assign)((0,g.__assign)({},c.style||{}),{points:_})})}}function zb(e,r,t){var i,n,a,o=e.view,s=e.geometry,l=e.group,u=e.options,c=e.field,f=e.horizontal,v=u.offset,d=u.size;if(typeof u.text!="boolean"){var p=o.getCoordinate(),y=((i=u.text)===null||i===void 0?void 0:i.formatter)&&((n=u.text)===null||n===void 0?void 0:n.formatter(r.getData()[c],t.getData()[c])),m=ba(p,r)[f?3:0],x=ba(p,t)[f?0:3],_=l.addShape("text",{id:"".concat(o.id,"-conversion-tag-text-").concat(s.getElementId(r.getModel().mappingData)),name:"conversion-tag-text",origin:{element:r,nextElement:t},attrs:(0,g.__assign)((0,g.__assign)({},((a=u.text)===null||a===void 0?void 0:a.style)||{}),{text:y,x:f?(m.x+x.x)/2:m.x+v+d/2,y:f?m.y-v-d/2:(m.y+x.y)/2})});if(f){var w=x.x-m.x,b=_.getBBox().width;if(b>w){var S=b/y.length,C=Math.max(1,Math.ceil(w/S)-1),A="".concat(y.slice(0,C),"...");_.attr("text",A)}}}}function Vb(e,r,t){Nb(e,r,t),zb(e,r,t)}function Gb(e,r,t){return r===void 0&&(r=!0),t===void 0&&(t=!1),function(i){var n=i.options,a=i.chart,o=n.conversionTag,s=n.theme;return o&&!t&&(a.theme(O({},(0,h.isObject)(s)?s:$i(s),{columnWidthRatio:1/3})),a.annotation().shape({render:function(l,u){var c=l.addGroup({id:"".concat(a.id,"-conversion-tag-group"),name:"conversion-tag-group"}),f=(0,h.find)(a.geometries,function(p){return p.type==="interval"}),v={view:u,geometry:f,group:c,field:e,horizontal:r,options:Rb(o,r)},d=f.elements;(0,h.each)(d,function(p,y){y>0&&Vb(v,d[y-1],p)})}})),i}}function Wb(e){var r=e.options,t=r.legend,i=r.seriesField,n=r.isStack;return i?t!==!1&&(t=(0,g.__assign)({position:n?"right-top":"top-left"},t)):t=!1,e.options.legend=t,e}function Hb(e){var r=e.chart,t=e.options,i=t.data,n=t.columnStyle,a=t.color,o=t.columnWidthRatio,s=t.isPercent,l=t.isGroup,u=t.isStack,c=t.xField,f=t.yField,v=t.seriesField,d=t.groupField,p=t.tooltip,y=t.shape,m=s&&l&&u?Sb(i,f,[c,d],f):cn(i,f,c,f,s),x=[];u&&v&&!l?m.forEach(function(b){var S=x.find(function(C){return C[c]===b[c]&&C[v]===b[v]});S?S[f]+=b[f]||0:x.push((0,g.__assign)({},b))}):x=m,r.data(x);var _=s?(0,g.__assign)({formatter:function(b){var S;return{name:l&&u?"".concat(b[v]," - ").concat(b[d]):(S=b[v])!==null&&S!==void 0?S:b[c],value:(Number(b[f])*100).toFixed(2)+"%"}}},p):p,w=O({},e,{options:{data:x,widthRatio:o,tooltip:_,interval:{shape:y,style:n,color:a}}});return Fe(w),w}function ms(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.xField,s=i.yField,l=i.data,u=i.isPercent,c=u?{max:1,min:0,minLimit:0,maxLimit:1}:{};return Et(he((r={},r[o]=n,r[s]=a,r),(t={},t[o]={type:"cat"},t[s]=(0,g.__assign)((0,g.__assign)({},ls(l,s)),c),t)))(e)}function Yb(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(o,!1):r.axis(o,n),e}function Xb(e){var r=e.chart,t=e.options,i=t.legend,n=t.seriesField;return i&&n?r.legend(n,i):i===!1&&r.legend(!1),e}function Ub(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=t.isRange,o=Me(r,"interval");if(!i)o.label(!1);else{var s=i.callback,l=(0,g.__rest)(i,["callback"]);o.label({fields:[n],callback:s,cfg:(0,g.__assign)({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"}}]},be(a?(0,g.__assign)({content:function(u){var c;return(c=u[n])===null||c===void 0?void 0:c.join("-")}},l):l))})}return e}function jb(e){var r=e.chart,t=e.options,i=t.tooltip,n=t.isGroup,a=t.isStack,o=t.groupField,s=t.data,l=t.xField,u=t.yField,c=t.seriesField;if(i===!1)r.tooltip(!1);else{var f=i;if(n&&a){var v=f.customItems,d=(f==null?void 0:f.formatter)||function(p){return{name:"".concat(p[c]," - ").concat(p[o]),value:p[u]}};f=(0,g.__assign)((0,g.__assign)({},f),{customItems:function(p){var y=[];return(0,h.each)(p,function(m){var x=(0,h.filter)(s,function(_){return(0,h.isMatch)(_,$t(m.data,[l,c]))});x.forEach(function(_){y.push((0,g.__assign)((0,g.__assign)((0,g.__assign)({},m),{value:_[u],data:_,mappingData:{_origin:_}}),d(_)))})}),v?v(y):y}})}r.tooltip(f)}return e}function Sa(e,r){r===void 0&&(r=!1);var t=e.options,i=t.seriesField;return Et(Wb,Xt,Ve("columnStyle"),Lr,mh("rect"),Hb,ms,Yb,Xb,jb,un,gs,Ub,Ih,oe,Qt,le(),Gb(t.yField,!r,!!i),Bb(!t.isStack),jr)(e)}function Zb(e){var r=e.options,t=r.xField,i=r.yField,n=r.xAxis,a=r.yAxis,o={left:"bottom",right:"top",top:"left",bottom:"right"},s=a!==!1?(0,g.__assign)({position:o[(a==null?void 0:a.position)||"left"]},a):!1,l=n!==!1?(0,g.__assign)({position:o[(n==null?void 0:n.position)||"bottom"]},n):!1;return(0,g.__assign)((0,g.__assign)({},e),{options:(0,g.__assign)((0,g.__assign)({},r),{xField:i,yField:t,xAxis:s,yAxis:l})})}function qb(e){var r=e.options,t=r.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"}}])),O({},e,{options:{label:t}})}function Kb(e){var r=e.options,t=r.seriesField,i=r.isStack,n=r.legend;return t?n!==!1&&(n=(0,g.__assign)({position:i?"top-left":"right-top"},n||{})):n=!1,O({},e,{options:{legend:n}})}function $b(e){var r=e.options,t=[{type:"transpose"},{type:"reflectY"}].concat(r.coordinate||[]);return O({},e,{options:{coordinate:t}})}function Qb(e){var r=e.chart,t=e.options,i=t.barStyle,n=t.barWidthRatio,a=t.minBarWidth,o=t.maxBarWidth,s=t.barBackground;return Sa({chart:r,options:(0,g.__assign)((0,g.__assign)({},t),{columnStyle:i,columnWidthRatio:n,minColumnWidth:a,maxColumnWidth:o,columnBackground:s})},!0)}function Ph(e){return Et(Zb,qb,Kb,me,$b,Qb)(e)}var Jb=O({},kt.getDefaultOptions(),{barWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),tS=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bar",t}return r.getDefaultOptions=function(){return Jb},r.prototype.changeData=function(t){var i,n;this.updateOption({data:t});var a=this,o=a.chart,s=a.options,l=s.isPercent,u=s.xField,c=s.yField,f=s.xAxis,v=s.yAxis;i=[c,u],u=i[0],c=i[1],n=[v,f],f=n[0],v=n[1];var d=(0,g.__assign)((0,g.__assign)({},s),{xField:u,yField:c,yAxis:v,xAxis:f});ms({chart:o,options:d}),o.changeData(cn(t,u,c,u,l))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Ph},r}(kt),eS=O({},kt.getDefaultOptions(),{columnWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),kh=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="column",t}return r.getDefaultOptions=function(){return eS},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options,n=i.yField,a=i.xField,o=i.isPercent,s=this,l=s.chart,u=s.options;ms({chart:l,options:u}),this.chart.changeData(cn(t,n,a,n,o))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Sa},r}(kt),xs,Ir="$$percentage$$",Or="$$mappingValue$$",dr="$$conversion$$",_s="$$totalPercentage$$",hn="$$x$$",fn="$$y$$",rS={appendPadding:[0,80],minSize:0,maxSize:1,meta:(xs={},xs[Or]={min:0,max:1,nice:!1},xs),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)"}}},Dh="CONVERSION_TAG_NAME";function ws(e,r,t){var i=[],n=t.yField,a=t.maxSize,o=t.minSize,s=(0,h.get)((0,h.maxBy)(r,n),[n]),l=(0,h.isNumber)(a)?a:1,u=(0,h.isNumber)(o)?o:0;return i=(0,h.map)(e,function(c,f){var v=(c[n]||0)/s;return c[Ir]=v,c[Or]=(l-u)*v+u,c[dr]=[(0,h.get)(e,[f-1,n]),c[n]],c}),i}function bs(e){return function(r){var t=r.chart,i=r.options,n=i.conversionTag,a=i.filteredData,o=a||t.getOptions().data;if(n){var s=n.formatter;o.forEach(function(l,u){if(!(u<=0||Number.isNaN(l[Or]))){var c=e(l,u,o,{top:!0,name:Dh,text:{content:(0,h.isFunction)(s)?s(l,o):s,offsetX:n.offsetX,offsetY:n.offsetY,position:"end",autoRotate:!1,style:(0,g.__assign)({textAlign:"start",textBaseline:"middle"},n.style)}});t.annotation().line(c)}})}return r}}function iS(e){var r=e.chart,t=e.options,i=t.data,n=i===void 0?[]:i,a=t.yField,o=t.maxSize,s=t.minSize,l=ws(n,n,{yField:a,maxSize:o,minSize:s});return r.data(l),e}function nS(e){var r=e.chart,t=e.options,i=t.xField,n=t.yField,a=t.color,o=t.tooltip,s=t.label,l=t.shape,u=l===void 0?"funnel":l,c=t.funnelStyle,f=t.state,v=Ye(o,[i,n]),d=v.fields,p=v.formatter;Re({chart:r,options:{type:"interval",xField:i,yField:Or,colorField:i,tooltipFields:(0,h.isArray)(d)&&d.concat([Ir,dr]),mapping:{shape:u,tooltip:p,color:a,style:c},label:s,state:f}});var y=Me(e.chart,"interval");return y.adjust("symmetric"),e}function aS(e){var r=e.chart,t=e.options,i=t.isTransposed;return r.coordinate({type:"rect",actions:i?[]:[["transpose"],["scale",1,-1]]}),e}function Bh(e){var r=e.options,t=e.chart,i=r.maxSize,n=(0,h.get)(t,["geometries","0","dataArray"],[]),a=(0,h.get)(t,["options","data","length"]),o=(0,h.map)(n,function(l){return(0,h.get)(l,["0","nextPoints","0","x"])*a-.5}),s=function(l,u,c,f){var v=i-(i-l[Or])/2;return(0,g.__assign)((0,g.__assign)({},f),{start:[o[u-1]||u-.5,v],end:[o[u-1]||u-.5,v+.05]})};return bs(s)(e),e}function Rh(e){return Et(iS,nS,aS,Bh)(e)}function oS(e){var r,t=e.chart,i=e.options,n=i.data,a=n===void 0?[]:n,o=i.yField;return t.data(a),t.scale((r={},r[o]={sync:!0},r)),e}function sS(e){var r=e.chart,t=e.options,i=t.data,n=t.xField,a=t.yField,o=t.color,s=t.compareField,l=t.isTransposed,u=t.tooltip,c=t.maxSize,f=t.minSize,v=t.label,d=t.funnelStyle,p=t.state,y=t.showFacetTitle;return r.facet("mirror",{fields:[s],transpose:!l,padding:l?0:[32,0,0,0],showTitle:y,eachView:function(m,x){var _=l?x.rowIndex:x.columnIndex;l||m.coordinate({type:"rect",actions:[["transpose"],["scale",_===0?-1:1,-1]]});var w=ws(x.data,i,{yField:a,maxSize:c,minSize:f});m.data(w);var b=Ye(u,[n,a,s]),S=b.fields,C=b.formatter,A=l?{offset:_===0?10:-23,position:_===0?"bottom":"top"}:{offset:10,position:"left",style:{textAlign:_===0?"end":"start"}};Re({chart:m,options:{type:"interval",xField:n,yField:Or,colorField:n,tooltipFields:(0,h.isArray)(S)&&S.concat([Ir,dr]),mapping:{shape:"funnel",tooltip:C,color:o,style:d},label:v===!1?!1:O({},A,v),state:p}})}}),e}function Nh(e){var r=e.chart,t=e.index,i=e.options,n=i.conversionTag,a=i.isTransposed;((0,h.isNumber)(t)?[r]:r.views).forEach(function(o,s){var l=(0,h.get)(o,["geometries","0","dataArray"],[]),u=(0,h.get)(o,["options","data","length"]),c=(0,h.map)(l,function(v){return(0,h.get)(v,["0","nextPoints","0","x"])*u-.5}),f=function(v,d,p,y){var m=(t||s)===0?-1:1;return O({},y,{start:[c[d-1]||d-.5,v[Or]],end:[c[d-1]||d-.5,v[Or]+.05],text:a?{style:{textAlign:"start"}}:{offsetX:n!==!1?m*n.offsetX:0,style:{textAlign:(t||s)===0?"end":"start"}}})};bs(f)(O({},{chart:o,options:i}))})}function lS(e){var r=e.chart;return r.once("beforepaint",function(){return Nh(e)}),e}function uS(e){return Et(oS,sS,lS)(e)}function cS(e){var r=e.chart,t=e.options,i=t.data,n=i===void 0?[]:i,a=t.yField,o=(0,h.reduce)(n,function(u,c){return u+(c[a]||0)},0),s=(0,h.maxBy)(n,a)[a],l=(0,h.map)(n,function(u,c){var f=[],v=[];if(u[_s]=(u[a]||0)/o,c){var d=n[c-1][hn],p=n[c-1][fn];f[0]=d[3],v[0]=p[3],f[1]=d[2],v[1]=p[2]}else f[0]=-.5,v[0]=1,f[1]=.5,v[1]=1;return v[2]=v[1]-u[_s],f[2]=(v[2]+1)/4,v[3]=v[2],f[3]=-f[2],u[hn]=f,u[fn]=v,u[Ir]=(u[a]||0)/s,u[dr]=[(0,h.get)(n,[c-1,a]),u[a]],u});return r.data(l),e}function hS(e){var r=e.chart,t=e.options,i=t.xField,n=t.yField,a=t.color,o=t.tooltip,s=t.label,l=t.funnelStyle,u=t.state,c=Ye(o,[i,n]),f=c.fields,v=c.formatter;return Re({chart:r,options:{type:"polygon",xField:hn,yField:fn,colorField:i,tooltipFields:(0,h.isArray)(f)&&f.concat([Ir,dr]),label:s,state:u,mapping:{tooltip:v,color:a,style:l}}}),e}function fS(e){var r=e.chart,t=e.options,i=t.isTransposed;return r.coordinate({type:"rect",actions:i?[["transpose"],["reflect","x"]]:[]}),e}function vS(e){var r=function(t,i,n,a){return(0,g.__assign)((0,g.__assign)({},a),{start:[t[hn][1],t[fn][1]],end:[t[hn][1]+.05,t[fn][1]]})};return bs(r)(e),e}function dS(e){return Et(cS,hS,fS,vS)(e)}function gS(e){var r,t=e.chart,i=e.options,n=i.data,a=n===void 0?[]:n,o=i.yField;return t.data(a),t.scale((r={},r[o]={sync:!0},r)),e}function pS(e){var r=e.chart,t=e.options,i=t.seriesField,n=t.isTransposed,a=t.showFacetTitle;return r.facet("rect",{fields:[i],padding:[n?0:32,10,0,10],showTitle:a,eachView:function(o,s){Rh(O({},e,{chart:o,options:{data:s.data}}))}}),e}function yS(e){return Et(gS,pS)(e)}var mS=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.rendering=!1,t}return r.prototype.change=function(t){var i=this;if(!this.rendering){var n=t.seriesField,a=t.compareField,o=a?Nh:Bh,s=this.context.view,l=n||a?s.views:[s];(0,h.map)(l,function(u,c){var f=u.getController("annotation"),v=(0,h.filter)((0,h.get)(f,["option"],[]),function(p){var y=p.name;return y!==Dh});f.clear(!0),(0,h.each)(v,function(p){typeof p=="object"&&u.annotation()[p.type](p)});var d=(0,h.get)(u,["filteredData"],u.getOptions().data);o({chart:u,index:c,options:(0,g.__assign)((0,g.__assign)({},t),{filteredData:ws(d,d,t)})}),u.filterData(d),i.rendering=!0,u.render(!0)})}this.rendering=!1},r}(ne),zh="funnel-conversion-tag",Ss="funnel-afterrender",Vh={trigger:"afterrender",action:"".concat(zh,":change")};xt(zh,mS),Ot(Ss,{start:[Vh]});function xS(e){var r=e.options,t=r.compareField,i=r.xField,n=r.yField,a=r.locale,o=r.funnelStyle,s=r.data,l=ya(a),u={label:t?{fields:[i,n,t,Ir,dr],formatter:function(f){return"".concat(f[n])}}:{fields:[i,n,Ir,dr],offset:0,position:"middle",formatter:function(f){return"".concat(f[i]," ").concat(f[n])}},tooltip:{title:i,formatter:function(f){return{name:f[i],value:f[n]}}},conversionTag:{formatter:function(f){return"".concat(l.get(["conversionTag","label"]),": ").concat(Oh.apply(void 0,f[dr]))}}},c;return(t||o)&&(c=function(f){return O({},t&&{lineWidth:1,stroke:"#fff"},(0,h.isFunction)(o)?o(f):o)}),O({options:u},e,{options:{funnelStyle:c,data:(0,h.clone)(s)}})}function _S(e){var r=e.options,t=r.compareField,i=r.dynamicHeight,n=r.seriesField;return n?yS(e):t?uS(e):i?dS(e):Rh(e)}function wS(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return Et(he((r={},r[a]=i,r[o]=n,r)))(e)}function bS(e){var r=e.chart;return r.axis(!1),e}function SS(e){var r=e.chart,t=e.options,i=t.legend;return i===!1?r.legend(!1):r.legend(i),e}function CS(e){var r=e.chart,t=e.options,i=t.interactions,n=t.dynamicHeight;return(0,h.each)(i,function(a){a.enable===!1?r.removeInteraction(a.type):r.interaction(a.type,a.cfg||{})}),n?r.removeInteraction(Ss):r.interaction(Ss,{start:[(0,g.__assign)((0,g.__assign)({},Vh),{arg:t})]}),e}function Gh(e){return Et(xS,_S,wS,bS,me,CS,SS,Qt,Xt,le())(e)}var AS=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="funnel",t}return r.getDefaultOptions=function(){return rS},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Gh},r.prototype.setState=function(t,i,n){n===void 0&&(n=!0);var a=on(this.chart);(0,h.each)(a,function(o){i(o.getData())&&o.setState(t,n)})},r.prototype.getStates=function(){var t=on(this.chart),i=[];return(0,h.each)(t,function(n){var a=n.getData(),o=n.getStates();(0,h.each)(o,function(s){i.push({data:a,state:s,geometry:n.geometry,element:n})})}),i},r.CONVERSATION_FIELD=dr,r.PERCENT_FIELD=Ir,r.TOTAL_PERCENT_FIELD=_s,r}(kt),Ca,Cs="range",Wh="type",gr="percent",MS="#f0f0f0",Hh="indicator-view",Yh="range-view",FS={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:(Ca={},Ca[Cs]={sync:"v"},Ca[gr]={sync:"v",tickCount:5,tickInterval:.2},Ca),animation:!1};function ES(e,r){return e.map(function(t,i){var n;return n={},n[Cs]=t-(e[i-1]||0),n[Wh]="".concat(i),n[gr]=r,n})}function Xh(e){var r;return[(r={},r[gr]=(0,h.clamp)(e,0,1),r)]}function Uh(e,r){var t=(0,h.get)(r,["ticks"],[]),i=(0,h.size)(t)?(0,h.uniq)(t):[0,(0,h.clamp)(e,0,1),1];return i[0]||i.shift(),ES(i,e)}function TS(e){var r=e.chart,t=e.options,i=t.percent,n=t.range,a=t.radius,o=t.innerRadius,s=t.startAngle,l=t.endAngle,u=t.axis,c=t.indicator,f=t.gaugeStyle,v=t.type,d=t.meter,p=n.color,y=n.width;if(c){var m=Xh(i),x=r.createView({id:Hh});x.data(m),x.point().position("".concat(gr,"*1")).shape(c.shape||"gauge-indicator").customInfo({defaultColor:r.getTheme().defaultColor,indicator:c}),x.coordinate("polar",{startAngle:s,endAngle:l,radius:o*a}),x.axis(gr,u),x.scale(gr,$t(u,Be))}var _=Uh(i,t.range),w=r.createView({id:Yh});w.data(_);var b=(0,h.isString)(p)?[p,MS]:p,S=Fe({chart:w,options:{xField:"1",yField:Cs,seriesField:Wh,rawFields:[gr],isStack:!0,interval:{color:b,style:f,shape:v==="meter"?"meter-gauge":null},args:{zIndexReversed:!0,sortZIndex:!0},minColumnWidth:y,maxColumnWidth:y}}).ext,C=S.geometry;return C.customInfo({meter:d}),w.coordinate("polar",{innerRadius:o,radius:a,startAngle:s,endAngle:l}).transpose(),e}function LS(e){var r;return Et(he((r={range:{min:0,max:1,maxLimit:1,minLimit:0}},r[gr]={},r)))(e)}function jh(e,r){var t=e.chart,i=e.options,n=i.statistic,a=i.percent;if(t.getController("annotation").clear(!0),n){var o=n.content,s=void 0;o&&(s=O({},{content:"".concat((a*100).toFixed(2),"%"),style:{opacity:.75,fontSize:"30px",lineHeight:1,textAlign:"center",color:"rgba(44,53,66,0.85)"}},o)),sb(t,{statistic:(0,g.__assign)((0,g.__assign)({},n),{content:s})},{percent:a})}return r&&t.render(!0),e}function IS(e){var r=e.chart,t=e.options,i=t.tooltip;return i?r.tooltip(O({showTitle:!1,showMarkers:!1,containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',domStyles:{"g2-tooltip":{padding:"4px 8px",fontSize:"10px"}},customContent:function(n,a){var o=(0,h.get)(a,[0,"data",gr],0);return"".concat((o*100).toFixed(2),"%")}},i)):r.tooltip(!1),e}function OS(e){var r=e.chart;return r.legend(!1),e}function Zh(e){return Et(Xt,Qt,TS,LS,IS,jh,oe,le(),OS)(e)}Zt("point","gauge-indicator",{draw:function(e,r){var t=e.customInfo,i=t.indicator,n=t.defaultColor,a=i,o=a.pointer,s=a.pin,l=r.addGroup(),u=this.parsePoint({x:0,y:0});return o&&l.addShape("line",{name:"pointer",attrs:(0,g.__assign)({x1:u.x,y1:u.y,x2:e.x,y2:e.y,stroke:n},o.style)}),s&&l.addShape("circle",{name:"pin",attrs:(0,g.__assign)({x:u.x,y:u.y,stroke:n},s.style)}),l}}),Zt("interval","meter-gauge",{draw:function(e,r){var t=e.customInfo.meter,i=t===void 0?{}:t,n=i.steps,a=n===void 0?50:n,o=i.stepRatio,s=o===void 0?.5:o;a=a<1?1:a,s=(0,h.clamp)(s,0,1);var l=this.coordinate,u=l.startAngle,c=l.endAngle,f=0;if(s>0&&s<1){var v=c-u;f=v/a/(s/(1-s)+1-1/a)}for(var d=f/(1-s)*s,p=r.addGroup(),y=this.coordinate.getCenter(),m=this.coordinate.getRadius(),x=ke.getAngle(e,this.coordinate),_=x.startAngle,w=x.endAngle,b=_;b<w;){var S=void 0,C=(b-u)%(d+f);C<d?S=b+(d-C):(b+=d+f-C,S=b+d);var A=ke.getSectorPath(y.x,y.y,m,b,Math.min(S,w),m*this.coordinate.innerRadius);p.addShape("path",{name:"meter-gauge",attrs:{path:A,fill:e.color,stroke:e.color,lineWidth:.5}}),b=S+f}return p}});var PS=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="gauge",t}return r.getDefaultOptions=function(){return FS},r.prototype.changeData=function(t){this.chart.emit(L.BEFORE_CHANGE_DATA,ue.fromData(this.chart,L.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t});var i=this.chart.views.find(function(a){return a.id===Hh});i&&i.data(Xh(t));var n=this.chart.views.find(function(a){return a.id===Yh});n&&n.data(Uh(t,this.options.range)),jh({chart:this.chart,options:this.options},!0),this.chart.emit(L.AFTER_CHANGE_DATA,ue.fromData(this.chart,L.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Zh},r}(kt);function qh(e,r,t){if(t===1)return[0,r];var i=Math.floor(e/r);return[r*i,r*(i+1)]}function kS(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function Kh(e,r,t,i,n){var a=(0,h.clone)(e);(0,h.sortBy)(a,r);var o=(0,h.valuesOfKey)(a,r),s=(0,h.getRange)(o),l=s.max-s.min,u=t;if(!t&&i&&(u=i>1?l/(i-1):s.max),!t&&!i){var c=kS(o);u=l/c}var f={},v=(0,h.groupBy)(a,n);(0,h.isEmpty)(v)?(0,h.each)(a,function(p){var y=p[r],m=qh(y,u,i),x="".concat(m[0],"-").concat(m[1]);(0,h.hasKey)(f,x)||(f[x]={range:m,count:0}),f[x].count+=1}):Object.keys(v).forEach(function(p){(0,h.each)(v[p],function(y){var m=y[r],x=qh(m,u,i),_="".concat(x[0],"-").concat(x[1]),w="".concat(_,"-").concat(p);(0,h.hasKey)(f,w)||(f[w]={range:x,count:0},f[w][n]=p),f[w].count+=1})});var d=[];return(0,h.each)(f,function(p){d.push(p)}),d}var Aa="range",vn="count",DS=O({},kt.getDefaultOptions(),{columnStyle:{stroke:"#FFFFFF"},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});function BS(e){var r=e.chart,t=e.options,i=t.data,n=t.binField,a=t.binNumber,o=t.binWidth,s=t.color,l=t.stackField,u=t.legend,c=t.columnStyle,f=Kh(i,n,o,a,l);r.data(f);var v=O({},e,{options:{xField:Aa,yField:vn,seriesField:l,isStack:!0,interval:{color:s,style:c}}});return Fe(v),u&&l?r.legend(l,u):r.legend(!1),e}function RS(e){var r,t=e.options,i=t.xAxis,n=t.yAxis;return Et(he((r={},r[Aa]=i,r[vn]=n,r)))(e)}function NS(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis;return i===!1?r.axis(Aa,!1):r.axis(Aa,i),n===!1?r.axis(vn,!1):r.axis(vn,n),e}function zS(e){var r=e.chart,t=e.options,i=t.label,n=Me(r,"interval");if(!i)n.label(!1);else{var a=i.callback,o=(0,g.__rest)(i,["callback"]);n.label({fields:[vn],callback:a,cfg:be(o)})}return e}function $h(e){return Et(Xt,Ve("columnStyle"),BS,RS,NS,Lr,zS,me,oe,Qt)(e)}var VS=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="histogram",t}return r.getDefaultOptions=function(){return DS},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options,n=i.binField,a=i.binNumber,o=i.binWidth,s=i.stackField;this.chart.changeData(Kh(t,n,o,a,s))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return $h},r}(kt),GS=O({},kt.getDefaultOptions(),{tooltip:{shared:!0,showMarkers:!0,showCrosshairs:!0,crosshairs:{type:"x"}},legend:{position:"top-left",radio:{}},isStack:!1}),WS=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.active=function(){var t=this.getView(),i=this.context.event;if(i.data){var n=i.data.items,a=t.geometries.filter(function(o){return o.type==="point"});(0,h.each)(a,function(o){(0,h.each)(o.elements,function(s){var l=(0,h.findIndex)(n,function(u){return u.data===s.data})!==-1;s.setState("active",l)})})}},r.prototype.reset=function(){var t=this.getView(),i=t.geometries.filter(function(n){return n.type==="point"});(0,h.each)(i,function(n){(0,h.each)(n.elements,function(a){a.setState("active",!1)})})},r.prototype.getView=function(){return this.context.view},r}(ne);xt("marker-active",WS),Ot("marker-active",{start:[{trigger:"tooltip:show",action:"marker-active:active"}],end:[{trigger:"tooltip:hide",action:"marker-active:reset"}]});var Qh=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="line",t}return r.getDefaultOptions=function(){return GS},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;wa({chart:n,options:a}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Fh},r}(kt),Jh=O({},kt.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}}}}}),HS=[1,0,0,0,1,0,0,0,1];function As(e,r){var t=r?(0,g.__spreadArray)([],r,!0):(0,g.__spreadArray)([],HS,!0);return ke.transform(t,e)}var YS=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getActiveElements=function(){var t=ke.getDelegationObject(this.context);if(t){var i=this.context.view,n=t.component,a=t.item,o=n.get("field");if(o){var s=i.geometries[0].elements;return s.filter(function(l){return l.getModel().data[o]===a.value})}}return[]},r.prototype.getActiveElementLabels=function(){var t=this.context.view,i=this.getActiveElements(),n=t.geometries[0].labelsContainer.getChildren();return n.filter(function(a){return i.find(function(o){return(0,h.isEqual)(o.getData(),a.get("data"))})})},r.prototype.transfrom=function(t){t===void 0&&(t=7.5);var i=this.getActiveElements(),n=this.getActiveElementLabels();i.forEach(function(a,o){var s=n[o],l=a.geometry.coordinate;if(l.isPolar&&l.isTransposed){var u=ke.getAngle(a.getModel(),l),c=u.startAngle,f=u.endAngle,v=(c+f)/2,d=t,p=d*Math.cos(v),y=d*Math.sin(v);a.shape.setMatrix(As([["t",p,y]])),s.setMatrix(As([["t",p,y]]))}})},r.prototype.active=function(){this.transfrom()},r.prototype.reset=function(){this.transfrom(0)},r}(ne);function XS(e){var r=e.event,t,i=r.target;return i&&(t=i.get("element")),t}var US=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getAnnotations=function(t){var i=t||this.context.view;return i.getController("annotation").option},r.prototype.getInitialAnnotation=function(){return this.initialAnnotation},r.prototype.init=function(){var t=this,i=this.context.view;i.removeInteraction("tooltip"),i.on("afterchangesize",function(){var n=t.getAnnotations(i);t.initialAnnotation=n})},r.prototype.change=function(t){var i=this.context,n=i.view,a=i.event;this.initialAnnotation||(this.initialAnnotation=this.getAnnotations());var o=(0,h.get)(a,["data","data"]);if(a.type.match("legend-item")){var s=ke.getDelegationObject(this.context),l=n.getGroupedFields()[0];if(s&&l){var u=s.item;o=n.getData().find(function(d){return d[l]===u.value})}}if(o){var c=(0,h.get)(t,"annotations",[]),f=(0,h.get)(t,"statistic",{});n.getController("annotation").clear(!0),(0,h.each)(c,function(d){typeof d=="object"&&n.annotation()[d.type](d)}),da(n,{statistic:f,plotType:"pie"},o),n.render(!0)}var v=XS(this.context);v&&v.shape.toFront()},r.prototype.reset=function(){var t=this.context.view,i=t.getController("annotation");i.clear(!0);var n=this.getInitialAnnotation();(0,h.each)(n,function(a){t.annotation()[a.type](a)}),t.render(!0)},r}(ne),tf="pie-statistic";xt(tf,US),Ot("pie-statistic-active",{start:[{trigger:"element:mouseenter",action:"pie-statistic:change"}],end:[{trigger:"element:mouseleave",action:"pie-statistic:reset"}]}),xt("pie-legend",YS),Ot("pie-legend-active",{start:[{trigger:"legend-item:mouseenter",action:"pie-legend:active"}],end:[{trigger:"legend-item:mouseleave",action:"pie-legend:reset"}]});function jS(e,r){var t=null;return(0,h.each)(e,function(i){typeof i[r]=="number"&&(t+=i[r])}),t}function ZS(e,r){var t;switch(e){case"inner":return t="-30%",(0,h.isString)(r)&&r.endsWith("%")?parseFloat(r)*.01>0?t:r:r<0?r:t;case"outer":return t=12,(0,h.isString)(r)&&r.endsWith("%")?parseFloat(r)*.01<0?t:r:r>0?r:t;default:return r}}function Ma(e,r){return(0,h.every)(xi(e,r),function(t){return t[r]===0})}function qS(e){var r=e.chart,t=e.options,i=t.data,n=t.angleField,a=t.colorField,o=t.color,s=t.pieStyle,l=t.shape,u=xi(i,n);if(Ma(u,n)){var c="$$percentage$$";u=u.map(function(v){var d;return(0,g.__assign)((0,g.__assign)({},v),(d={},d[c]=1/u.length,d))}),r.data(u);var f=O({},e,{options:{xField:"1",yField:c,seriesField:a,isStack:!0,interval:{color:o,shape:l,style:s},args:{zIndexReversed:!0,sortZIndex:!0}}});Fe(f)}else{r.data(u);var f=O({},e,{options:{xField:"1",yField:n,seriesField:a,isStack:!0,interval:{color:o,shape:l,style:s},args:{zIndexReversed:!0,sortZIndex:!0}}});Fe(f)}return e}function KS(e){var r,t=e.chart,i=e.options,n=i.meta,a=i.colorField,o=O({},n);return t.scale(o,(r={},r[a]={type:"cat"},r)),e}function $S(e){var r=e.chart,t=e.options,i=t.radius,n=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"theta",cfg:{radius:i,innerRadius:n,startAngle:a,endAngle:o}}),e}function QS(e){var r=e.chart,t=e.options,i=t.label,n=t.colorField,a=t.angleField,o=r.geometries[0];if(!i)o.label(!1);else{var s=i.callback,l=(0,g.__rest)(i,["callback"]),u=be(l);if(u.content){var c=u.content;u.content=function(p,y,m){var x=p[n],_=p[a],w=r.getScaleByField(a),b=w==null?void 0:w.scale(_);return(0,h.isFunction)(c)?c((0,g.__assign)((0,g.__assign)({},p),{percent:b}),y,m):(0,h.isString)(c)?dh(c,{value:_,name:x,percentage:(0,h.isNumber)(b)&&!(0,h.isNil)(_)?"".concat((b*100).toFixed(2),"%"):null}):c}}var f={inner:"",outer:"pie-outer",spider:"pie-spider"},v=u.type?f[u.type]:"pie-outer",d=u.layout?(0,h.isArray)(u.layout)?u.layout:[u.layout]:[];u.layout=(v?[{type:v}]:[]).concat(d),o.label({fields:n?[a,n]:[a],callback:s,cfg:(0,g.__assign)((0,g.__assign)({},u),{offset:ZS(u.type,u.offset),type:"pie"})})}return e}function ef(e){var r=e.innerRadius,t=e.statistic,i=e.angleField,n=e.colorField,a=e.meta,o=e.locale,s=ya(o);if(r&&t){var l=O({},Jh.statistic,t),u=l.title,c=l.content;return u!==!1&&(u=O({},{formatter:function(f){var v=f?f[n]:(0,h.isNil)(u.content)?s.get(["statistic","total"]):u.content,d=(0,h.get)(a,[n,"formatter"])||function(p){return p};return d(v)}},u)),c!==!1&&(c=O({},{formatter:function(f,v){var d=f?f[i]:jS(v,i),p=(0,h.get)(a,[i,"formatter"])||function(y){return y};return f||(0,h.isNil)(c.content)?p(d):c.content}},c)),O({},{statistic:{title:u,content:c}},e)}return e}function rf(e){var r=e.chart,t=e.options,i=ef(t),n=i.innerRadius,a=i.statistic;return r.getController("annotation").clear(!0),Et(le())(e),n&&a&&da(r,{statistic:a,plotType:"pie"}),e}function JS(e){var r=e.chart,t=e.options,i=t.tooltip,n=t.colorField,a=t.angleField,o=t.data;if(i===!1)r.tooltip(i);else if(r.tooltip(O({},i,{shared:!1})),Ma(o,a)){var s=(0,h.get)(i,"fields"),l=(0,h.get)(i,"formatter");(0,h.isEmpty)((0,h.get)(i,"fields"))&&(s=[n,a],l=l||function(u){return{name:u[n],value:(0,h.toString)(u[a])}}),r.geometries[0].tooltip(s.join("*"),_i(s,l))}return e}function tC(e){var r=e.chart,t=e.options,i=ef(t),n=i.interactions,a=i.statistic,o=i.annotations;return(0,h.each)(n,function(s){var l,u;if(s.enable===!1)r.removeInteraction(s.type);else if(s.type==="pie-statistic-active"){var c=[];((l=s.cfg)===null||l===void 0?void 0:l.start)||(c=[{trigger:"element:mouseenter",action:"".concat(tf,":change"),arg:{statistic:a,annotations:o}}]),(0,h.each)((u=s.cfg)===null||u===void 0?void 0:u.start,function(f){c.push((0,g.__assign)((0,g.__assign)({},f),{arg:{statistic:a,annotations:o}}))}),r.interaction(s.type,O({},s.cfg,{start:c}))}else r.interaction(s.type,s.cfg||{})}),e}function nf(e){return Et(Ve("pieStyle"),qS,KS,Xt,$S,Ur,JS,QS,Lr,rf,tC,Qt)(e)}var af=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="pie",t}return r.getDefaultOptions=function(){return Jh},r.prototype.changeData=function(t){this.chart.emit(L.BEFORE_CHANGE_DATA,ue.fromData(this.chart,L.BEFORE_CHANGE_DATA,null));var i=this.options,n=this.options.angleField,a=xi(i.data,n),o=xi(t,n);Ma(a,n)||Ma(o,n)?this.update({data:t}):(this.updateOption({data:t}),this.chart.data(o),rf({chart:this.chart,options:this.options}),this.chart.render(!0)),this.chart.emit(L.AFTER_CHANGE_DATA,ue.fromData(this.chart,L.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return nf},r}(kt),of=["#FAAD14","#E8EDF3"],eC={percent:.2,color:of,animation:{}};function Ms(e){var r=(0,h.clamp)(Xr(e)?e:0,0,1);return[{current:"".concat(r),type:"current",percent:r},{current:"".concat(r),type:"target",percent:1}]}function sf(e){var r=e.chart,t=e.options,i=t.percent,n=t.progressStyle,a=t.color,o=t.barWidthRatio;r.data(Ms(i));var s=O({},e,{options:{xField:"current",yField:"percent",seriesField:"type",widthRatio:o,interval:{style:n,color:(0,h.isString)(a)?[a,of[1]]:a},args:{zIndexReversed:!0,sortZIndex:!0}}});return Fe(s),r.tooltip(!1),r.axis(!1),r.legend(!1),e}function rC(e){var r=e.chart;return r.coordinate("rect").transpose(),e}function lf(e){return Et(sf,he({}),rC,Qt,Xt,le())(e)}var iC=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="process",t}return r.getDefaultOptions=function(){return eC},r.prototype.changeData=function(t){this.updateOption({percent:t}),this.chart.changeData(Ms(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return lf},r}(kt);function nC(e){var r=e.chart,t=e.options,i=t.innerRadius,n=t.radius;return r.coordinate("theta",{innerRadius:i,radius:n}),e}function uf(e,r){var t=e.chart,i=e.options,n=i.innerRadius,a=i.statistic,o=i.percent,s=i.meta;if(t.getController("annotation").clear(!0),n&&a){var l=(0,h.get)(s,["percent","formatter"])||function(c){return"".concat((c*100).toFixed(2),"%")},u=a.content;u&&(u=O({},u,{content:(0,h.isNil)(u.content)?l(o):u.content})),da(t,{statistic:(0,g.__assign)((0,g.__assign)({},a),{content:u}),plotType:"ring-progress"},{percent:o})}return r&&t.render(!0),e}function cf(e){return Et(sf,he({}),nC,uf,Qt,Xt,le())(e)}var aC={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:{}},oC=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="ring-process",t}return r.getDefaultOptions=function(){return aC},r.prototype.changeData=function(t){this.chart.emit(L.BEFORE_CHANGE_DATA,ue.fromData(this.chart,L.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(Ms(t)),uf({chart:this.chart,options:this.options},!0),this.chart.emit(L.AFTER_CHANGE_DATA,ue.fromData(this.chart,L.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return cf},r}(kt),Kr=M(56645),sC={exp:Kr.regressionExp,linear:Kr.regressionLinear,loess:Kr.regressionLoess,log:Kr.regressionLog,poly:Kr.regressionPoly,pow:Kr.regressionPow,quad:Kr.regressionQuad};function lC(e,r){var t=10,i={regionStyle:[{position:{start:[e,"max"],end:["max",r]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:["min","max"],end:[e,r]},style:{fill:"#a3dda1",opacity:.4}},{position:{start:["min",r],end:[e,"min"]},style:{fill:"#d8d0c0",opacity:.4}},{position:{start:[e,r],end:["max","min"]},style:{fill:"#a3dda1",opacity:.4}}],lineStyle:{stroke:"#9ba29a",lineWidth:1},labelStyle:[{position:["max",r],offsetX:-t,offsetY:-t,style:{textAlign:"right",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",r],offsetX:t,offsetY:-t,style:{textAlign:"left",textBaseline:"bottom",fontSize:14,fill:"#ccc"}},{position:["min",r],offsetX:t,offsetY:t,style:{textAlign:"left",textBaseline:"top",fontSize:14,fill:"#ccc"}},{position:["max",r],offsetX:-t,offsetY:t,style:{textAlign:"right",textBaseline:"top",fontSize:14,fill:"#ccc"}}]};return i}var uC=function(e,r){var t=r.view,i=r.options,n=i.xField,a=i.yField,o=t.getScaleByField(n),s=t.getScaleByField(a),l=e.map(function(u){return t.getCoordinate().convert({x:o.scale(u[0]),y:s.scale(u[1])})});return ob(l,!1)},cC=function(e){var r=e.options,t=r.xField,i=r.yField,n=r.data,a=r.regressionLine,o=a.type,s=o===void 0?"linear":o,l=a.algorithm,u=a.equation,c,f=null;if(l)c=(0,h.isArray)(l)?l:l(n),f=u;else{var v=sC[s]().x(function(d){return d[t]}).y(function(d){return d[i]});c=v(n),f=fC(s,c)}return[uC(c,e),f]},hC=function(e){var r,t=e.meta,i=t===void 0?{}:t,n=e.xField,a=e.yField,o=e.data,s=o[0][n],l=o[0][a],u=s>0,c=l>0;function f(v,d){var p=(0,h.get)(i,[v]);function y(x){return(0,h.get)(p,x)}var m={};return d==="x"?((0,h.isNumber)(s)&&((0,h.isNumber)(y("min"))||(m.min=u?0:s*2),(0,h.isNumber)(y("max"))||(m.max=u?s*2:0)),m):((0,h.isNumber)(l)&&((0,h.isNumber)(y("min"))||(m.min=c?0:l*2),(0,h.isNumber)(y("max"))||(m.max=c?l*2:0)),m)}return(0,g.__assign)((0,g.__assign)({},i),(r={},r[n]=(0,g.__assign)((0,g.__assign)({},i[n]),f(n,"x")),r[a]=(0,g.__assign)((0,g.__assign)({},i[a]),f(a,"y")),r))};function fC(e,r){var t,i,n,a=function(u,c){return c===void 0&&(c=4),Math.round(u*Math.pow(10,c))/Math.pow(10,c)},o=function(u){return Number.isFinite(u)?a(u):"?"};switch(e){case"linear":return"y = ".concat(o(r.a),"x + ").concat(o(r.b),", R^2 = ").concat(o(r.rSquared));case"exp":return"y = ".concat(o(r.a),"e^(").concat(o(r.b),"x), R^2 = ").concat(o(r.rSquared));case"log":return"y = ".concat(o(r.a),"ln(x) + ").concat(o(r.b),", R^2 = ").concat(o(r.rSquared));case"quad":return"y = ".concat(o(r.a),"x^2 + ").concat(o(r.b),"x + ").concat(o(r.c),", R^2 = ").concat(o(r.rSquared));case"poly":for(var s="y = ".concat(o((t=r.coefficients)===null||t===void 0?void 0:t[0])," + ").concat(o((i=r.coefficients)===null||i===void 0?void 0:i[1]),"x + ").concat(o((n=r.coefficients)===null||n===void 0?void 0:n[2]),"x^2"),l=3;l<r.coefficients.length;++l)s+=" + ".concat(o(r.coefficients[l]),"x^").concat(l);return"".concat(s,", R^2 = ").concat(o(r.rSquared));case"pow":return"y = ".concat(o(r.a),"x^").concat(o(r.b),", R^2 = ").concat(o(r.rSquared))}return null}function hf(e){var r=e.data,t=r===void 0?[]:r,i=e.xField,n=e.yField;if(t.length){for(var a=!0,o=!0,s=t[0],l=void 0,u=1;u<t.length&&(l=t[u],s[i]!==l[i]&&(a=!1),s[n]!==l[n]&&(o=!1),!(!a&&!o));u++)s=l;var c=[];a&&c.push(i),o&&c.push(n);var f=$t(hC(e),c);return O({},e,{meta:f})}return e}function vC(e){var r=e.chart,t=e.options,i=t.data,n=t.type,a=t.color,o=t.shape,s=t.pointStyle,l=t.shapeField,u=t.colorField,c=t.xField,f=t.yField,v=t.sizeField,d=t.size,p=t.tooltip;v&&(d||(d=[2,8]),(0,h.isNumber)(d)&&(d=[d,d])),p&&!p.fields&&(p=(0,g.__assign)((0,g.__assign)({},p),{fields:[c,f,u,v,l]})),r.data(i),Ge(O({},e,{options:{seriesField:u,point:{color:a,shape:o,size:d,style:s},tooltip:p}}));var y=Me(r,"point");return n&&y.adjust(n),e}function Fa(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField,s=hf(t);return Et(he((r={},r[a]=i,r[o]=n,r)))(O({},e,{options:s}))}function dC(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return r.axis(a,i),r.axis(o,n),e}function gC(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField,a=t.shapeField,o=t.sizeField,s=t.shapeLegend,l=t.sizeLegend,u=i!==!1;return n&&r.legend(n,u?i:!1),a&&(s?r.legend(a,s):r.legend(a,s===!1?!1:i)),o&&r.legend(o,l||!1),!u&&!s&&!l&&r.legend(!1),e}function pC(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Me(r,"point");if(!i)a.label(!1);else{var o=i.callback,s=(0,g.__rest)(i,["callback"]);a.label({fields:[n],callback:o,cfg:be(s)})}return e}function yC(e){var r=e.options,t=r.quadrant,i=[];if(t){var n=t.xBaseline,a=n===void 0?0:n,o=t.yBaseline,s=o===void 0?0:o,l=t.labels,u=t.regionStyle,c=t.lineStyle,f=lC(a,s),v=new Array(4).join(",").split(",");v.forEach(function(d,p){i.push((0,g.__assign)((0,g.__assign)({type:"region",top:!1},f.regionStyle[p].position),{style:O({},f.regionStyle[p].style,u==null?void 0:u[p])}),(0,g.__assign)({type:"text",top:!0},O({},f.labelStyle[p],l==null?void 0:l[p])))}),i.push({type:"line",top:!1,start:["min",s],end:["max",s],style:O({},f.lineStyle,c)},{type:"line",top:!1,start:[a,"min"],end:[a,"max"],style:O({},f.lineStyle,c)})}return Et(le(i))(e)}function mC(e){var r=e.options,t=e.chart,i=r.regressionLine;if(i){var n=i.style,a=i.equationStyle,o=a===void 0?{}:a,s=i.top,l=s===void 0?!1:s,u=i.showEquation,c=u===void 0?!1:u,f={stroke:"#9ba29a",lineWidth:2,opacity:.5},v={x:20,y:20,textAlign:"left",textBaseline:"middle",fontSize:14,fillOpacity:.5};t.annotation().shape({top:l,render:function(d,p){var y=d.addGroup({id:"".concat(t.id,"-regression-line"),name:"regression-line-group"}),m=cC({view:p,options:r}),x=m[0],_=m[1];y.addShape("path",{name:"regression-line",attrs:(0,g.__assign)((0,g.__assign)({path:x},f),n)}),c&&y.addShape("text",{name:"regression-equation",attrs:(0,g.__assign)((0,g.__assign)((0,g.__assign)({},v),o),{text:_})})}})}return e}function xC(e){var r=e.chart,t=e.options,i=t.tooltip;return i?r.tooltip(i):i===!1&&r.tooltip(!1),e}function ff(e){return Et(vC,Fa,dC,gC,xC,pC,Ih,un,gs,oe,yC,Qt,Xt,mC)(e)}var _C=O({},kt.getDefaultOptions(),{size:4,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!0,crosshairs:{type:"xy"}}});Ot("drag-move",{start:[{trigger:"plot:mousedown",action:"scale-translate:start"}],processing:[{trigger:"plot:mousemove",action:"scale-translate:translate",throttle:{wait:100,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseup",action:"scale-translate:end"}]});var wC=function(e){(0,g.__extends)(r,e);function r(t,i){var n=e.call(this,t,i)||this;return n.type="scatter",n.on(L.BEFORE_RENDER,function(a){var o,s,l=n,u=l.options,c=l.chart;if(((o=a.data)===null||o===void 0?void 0:o.source)===De.FILTER){var f=n.chart.filterData(n.chart.getData());Fa({chart:c,options:(0,g.__assign)((0,g.__assign)({},u),{data:f})})}((s=a.data)===null||s===void 0?void 0:s.source)===De.RESET&&Fa({chart:c,options:u})}),n}return r.getDefaultOptions=function(){return _C},r.prototype.changeData=function(t){this.updateOption(hf(O({},this.options,{data:t})));var i=this,n=i.options,a=i.chart;Fa({chart:a,options:n}),this.chart.changeData(t)},r.prototype.getSchemaAdaptor=function(){return ff},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(kt),dn="$$stock-range$$",Ea="trend",vf="up",df="down",bC={showMarkers:!1,showCrosshairs:!0,shared:!0,crosshairs:{type:"xy",follow:!0,text:function(e,r,t){var i;if(e==="x"){var n=t[0];i=n?n.title:r}else i=r;return{position:e==="y"?"start":"end",content:i,style:{fill:"#dfdfdf"}}},textBackground:{padding:[2,4],style:{fill:"#666"}}}},SC=O({},kt.getDefaultOptions(),{tooltip:bC,interactions:[{type:"tooltip"}],legend:{position:"top-left"},risingFill:"#ef5350",fallingFill:"#26a69a"});function gf(e,r){return(0,h.map)(e,function(t){var i=t&&(0,g.__assign)({},t);if((0,h.isArray)(r)&&i){var n=r[0],a=r[1],o=r[2],s=r[3];i[Ea]=i[n]<=i[a]?vf:df,i[dn]=[i[n],i[a],i[o],i[s]]}return i})}function CC(e){var r=e.chart,t=e.options,i=t.yField,n=t.data,a=t.risingFill,o=t.fallingFill,s=t.tooltip,l=t.stockStyle;r.data(gf(n,i));var u=s;return u!==!1&&(u=O({},{fields:i},u)),ps(O({},e,{options:{schema:{shape:"candle",color:[a,o],style:l},yField:dn,seriesField:Ea,rawFields:i,tooltip:u}})),e}function AC(e){var r,t,i=e.chart,n=e.options,a=n.meta,o=n.xAxis,s=n.yAxis,l=n.xField,u=(r={},r[l]={type:"timeCat",tickCount:6},r[Ea]={values:[vf,df]},r),c=O(u,a,(t={},t[l]=$t(o,Be),t[dn]=$t(s,Be),t));return i.scale(c),e}function MC(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(dn,!1):r.axis(dn,n),e}function FC(e){var r=e.chart,t=e.options,i=t.tooltip;return i!==!1?r.tooltip(i):r.tooltip(!1),e}function EC(e){var r=e.chart,t=e.options,i=t.legend;return i?r.legend(Ea,i):i===!1&&r.legend(!1),e}function pf(e){Et(Xt,CC,AC,MC,FC,EC,oe,Qt,le(),un)(e)}var TC=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="stock",t}return r.getDefaultOptions=function(){return SC},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return pf},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options.yField;this.chart.changeData(gf(t,i))},r}(kt);function $r(e){return(0,h.map)(e||[],function(r,t){return{x:"".concat(t),y:r}})}var gn="x",bi="y",yf={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(e,r){return"".concat((0,h.get)(r,[0,"data","y"],0))},containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',itemTpl:"<span>{value}</span>",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}},showCrosshairs:!0,crosshairs:{type:"x"}},LC={appendPadding:2,tooltip:(0,g.__assign)({},yf),animation:{}};function IC(e){var r=e.chart,t=e.options,i=t.data,n=t.color,a=t.areaStyle,o=t.point,s=t.line,l=o==null?void 0:o.state,u=$r(i);r.data(u);var c=O({},e,{options:{xField:gn,yField:bi,area:{color:n,style:a},line:s,point:o}}),f=O({},c,{options:{tooltip:!1}}),v=O({},c,{options:{tooltip:!1,state:l}});return xa(c),wi(f),Ge(v),r.axis(!1),r.legend(!1),e}function Si(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.data,s=$r(o);return Et(he((r={},r[gn]=n,r[bi]=a,r),(t={},t[gn]={type:"cat"},t[bi]=ls(s,bi),t)))(e)}function mf(e){return Et(Ve("areaStyle"),IC,Si,me,Xt,Qt,le())(e)}var OC={appendPadding:2,tooltip:(0,g.__assign)({},yf),color:"l(90) 0:#E5EDFE 1:#ffffff",areaStyle:{fillOpacity:.6},line:{size:1,color:"#5B8FF9"},animation:{}},PC=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-area",t}return r.getDefaultOptions=function(){return OC},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;Si({chart:n,options:a}),n.changeData($r(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return mf},r}(kt);function kC(e){var r=e.chart,t=e.options,i=t.data,n=t.color,a=t.columnStyle,o=t.columnWidthRatio,s=$r(i);r.data(s);var l=O({},e,{options:{xField:gn,yField:bi,widthRatio:o,interval:{style:a,color:n}}});return Fe(l),r.axis(!1),r.legend(!1),r.interaction("element-active"),e}function xf(e){return Et(Xt,Ve("columnStyle"),kC,Si,me,Qt,le())(e)}var DC={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(e,r){return"".concat((0,h.get)(r,[0,"data","y"],0))},containerTpl:'<div class="g2-tooltip"><div class="g2-tooltip-list"></div></div>',itemTpl:"<span>{value}</span>",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}}},BC={appendPadding:2,tooltip:(0,g.__assign)({},DC),animation:{}},RC=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-column",t}return r.getDefaultOptions=function(){return BC},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;Si({chart:n,options:a}),n.changeData($r(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return xf},r}(kt);function NC(e){var r=e.chart,t=e.options,i=t.data,n=t.color,a=t.lineStyle,o=t.point,s=o==null?void 0:o.state,l=$r(i);r.data(l);var u=O({},e,{options:{xField:gn,yField:bi,line:{color:n,style:a},point:o}}),c=O({},u,{options:{tooltip:!1,state:s}});return wi(u),Ge(c),r.axis(!1),r.legend(!1),e}function _f(e){return Et(NC,Si,Xt,me,Qt,le())(e)}var zC=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="tiny-line",t}return r.getDefaultOptions=function(){return LC},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;Si({chart:n,options:a}),n.changeData($r(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return _f},r}(kt),VC={line:Fh,pie:nf,column:Sa,bar:Ph,area:Eh,gauge:Zh,"tiny-line":_f,"tiny-column":xf,"tiny-area":mf,"ring-progress":cf,progress:lf,scatter:ff,histogram:$h,funnel:Gh,stock:pf},GC={line:Qh,pie:af,column:kh,bar:tS,area:Th,gauge:PS,"tiny-line":zC,"tiny-column":RC,"tiny-area":PC,"ring-progress":oC,progress:iC,scatter:wC,histogram:VS,funnel:AS,stock:TC},WC={pie:{label:!1},column:{tooltip:{showMarkers:!1}},bar:{tooltip:{showMarkers:!1}}};function Fs(e,r,t){var i=GC[e];if(!i){console.error("could not find ".concat(e," plot"));return}var n=VC[e];n({chart:r,options:O({},i.getDefaultOptions(),(0,h.get)(WC,e,{}),t)})}function HC(e){var r=e.chart,t=e.options,i=t.views,n=t.legend;return(0,h.each)(i,function(a){var o=a.region,s=a.data,l=a.meta,u=a.axes,c=a.coordinate,f=a.interactions,v=a.annotations,d=a.tooltip,p=a.geometries,y=r.createView({region:o});y.data(s);var m={};u&&(0,h.each)(u,function(x,_){m[_]=$t(x,Be)}),m=O({},l,m),y.scale(m),u?(0,h.each)(u,function(x,_){y.axis(_,x)}):y.axis(!1),y.coordinate(c),(0,h.each)(p,function(x){var _=Re({chart:y,options:x}).ext,w=x.adjust;w&&_.geometry.adjust(w)}),(0,h.each)(f,function(x){x.enable===!1?y.removeInteraction(x.type):y.interaction(x.type,x.cfg)}),(0,h.each)(v,function(x){y.annotation()[x.type]((0,g.__assign)({},x))}),typeof a.animation=="boolean"?y.animate(!1):(y.animate(!0),(0,h.each)(y.geometries,function(x){x.animate(a.animation)})),d&&(y.interaction("tooltip"),y.tooltip(d))}),n?(0,h.each)(n,function(a,o){r.legend(o,a)}):r.legend(!1),r.tooltip(t.tooltip),e}function YC(e){var r=e.chart,t=e.options,i=t.plots,n=t.data,a=n===void 0?[]:n;return(0,h.each)(i,function(o){var s=o.type,l=o.region,u=o.options,c=u===void 0?{}:u,f=o.top,v=c.tooltip;if(f){Fs(s,r,(0,g.__assign)((0,g.__assign)({},c),{data:a}));return}var d=r.createView((0,g.__assign)({region:l},$t(c,Sh)));v&&d.interaction("tooltip"),Fs(s,d,(0,g.__assign)({data:a},c))}),e}function XC(e){var r=e.chart,t=e.options;return r.option("slider",t.slider),e}function UC(e){return Et(Qt,HC,YC,oe,Qt,Xt,me,XC,le())(e)}function jC(e,r){var t=e.getModel(),i=t.data,n;return(0,h.isArray)(i)?n=i[0][r]:n=i[r],n}function ZC(e){var r=fa(e);(0,h.each)(r,function(t){t.hasState("active")&&t.setState("active",!1),t.hasState("selected")&&t.setState("selected",!1),t.hasState("inactive")&&t.setState("inactive",!1)})}var qC=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getAssociationItems=function(t,i){var n,a=this.context.event,o=i||{},s=o.linkField,l=o.dim,u=[];if((n=a.data)===null||n===void 0?void 0:n.data){var c=a.data.data;(0,h.each)(t,function(f){var v,d,p=s;if(l==="x"?p=f.getXScale().field:l==="y"?p=(v=f.getYScales().find(function(m){return m.field===p}))===null||v===void 0?void 0:v.field:p||(p=(d=f.getGroupScales()[0])===null||d===void 0?void 0:d.field),!!p){var y=(0,h.map)(fa(f),function(m){var x=!1,_=!1,w=(0,h.isArray)(c)?(0,h.get)(c[0],p):(0,h.get)(c,p);return jC(m,p)===w?x=!0:_=!0,{element:m,view:f,active:x,inactive:_}});u.push.apply(u,y)}})}return u},r.prototype.showTooltip=function(t){var i=gh(this.context.view),n=this.getAssociationItems(i,t);(0,h.each)(n,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})}})},r.prototype.hideTooltip=function(){var t=gh(this.context.view);(0,h.each)(t,function(i){i.hideTooltip()})},r.prototype.active=function(t){var i=sn(this.context.view),n=this.getAssociationItems(i,t);(0,h.each)(n,function(a){var o=a.active,s=a.element;o&&s.setState("active",!0)})},r.prototype.selected=function(t){var i=sn(this.context.view),n=this.getAssociationItems(i,t);(0,h.each)(n,function(a){var o=a.active,s=a.element;o&&s.setState("selected",!0)})},r.prototype.highlight=function(t){var i=sn(this.context.view),n=this.getAssociationItems(i,t);(0,h.each)(n,function(a){var o=a.inactive,s=a.element;o&&s.setState("inactive",!0)})},r.prototype.reset=function(){var t=sn(this.context.view);(0,h.each)(t,function(i){ZC(i)})},r}(ne);xt("association",qC),Ot("association-active",{start:[{trigger:"element:mouseenter",action:"association:active"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Ot("association-selected",{start:[{trigger:"element:mouseenter",action:"association:selected"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Ot("association-highlight",{start:[{trigger:"element:mouseenter",action:"association:highlight"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Ot("association-tooltip",{start:[{trigger:"element:mousemove",action:"association:showTooltip"}],end:[{trigger:"element:mouseleave",action:"association:hideTooltip"}]});var KC=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="mix",t}return r.prototype.getSchemaAdaptor=function(){return UC},r}(kt),Ci;(function(e){e.DEV="DEV",e.BETA="BETA",e.STABLE="STABLE"})(Ci||(Ci={}));function $C(e,r){console.warn(e===Ci.DEV?"Plot '".concat(r,"' is in DEV stage, just give us issues."):e===Ci.BETA?"Plot '".concat(r,"' is in BETA stage, DO NOT use it in production env."):e===Ci.STABLE?"Plot '".concat(r,`' is in STABLE stage, import it by "import { `).concat(r,` } from '@antv/g2plot'".`):"invalid Stage type.")}var sI=function(){function e(){}return Object.defineProperty(e,"MultiView",{get:function(){return $C(Ci.STABLE,"MultiView"),KC},enumerable:!1,configurable:!0}),e}(),er="first-axes-view",rr="second-axes-view",Qr="series-field-key";function wf(e,r,t,i,n){var a=[];r.forEach(function(f){i.forEach(function(v){var d,p=(d={},d[e]=v[e],d[t]=f,d[f]=v[f],d);a.push(p)})});var o=Object.values((0,h.groupBy)(a,t)),s=o[0],l=s===void 0?[]:s,u=o[1],c=u===void 0?[]:u;return n?[l.reverse(),c.reverse()]:[l,c]}function pr(e){return e!=="vertical"}function QC(e,r,t){var i=r[0],n=r[1],a=i.autoPadding,o=n.autoPadding,s=e.__axisPosition,l=s.layout,u=s.position;if(pr(l)&&u==="top"&&(i.autoPadding=t.instance(a.top,0,a.bottom,a.left),n.autoPadding=t.instance(o.top,a.left,o.bottom,0)),pr(l)&&u==="bottom"&&(i.autoPadding=t.instance(a.top,a.right/2+5,a.bottom,a.left),n.autoPadding=t.instance(o.top,o.right,o.bottom,a.right/2+5)),!pr(l)&&u==="bottom"){var c=a.left>=o.left?a.left:o.left;i.autoPadding=t.instance(a.top,a.right,a.bottom/2+5,c),n.autoPadding=t.instance(a.bottom/2+5,o.right,o.bottom,c)}if(!pr(l)&&u==="top"){var c=a.left>=o.left?a.left:o.left;i.autoPadding=t.instance(a.top,a.right,0,c),n.autoPadding=t.instance(0,o.right,a.top,c)}}function JC(e){var r=e.chart,t=e.options,i=t.data,n=t.xField,a=t.yField,o=t.color,s=t.barStyle,l=t.widthRatio,u=t.legend,c=t.layout,f=wf(n,a,Qr,i,pr(c));u?r.legend(Qr,u):u===!1&&r.legend(!1);var v,d,p=f[0],y=f[1];pr(c)?(v=r.createView({region:{start:{x:0,y:0},end:{x:.5,y:1}},id:er}),v.coordinate().transpose().reflect("x"),d=r.createView({region:{start:{x:.5,y:0},end:{x:1,y:1}},id:rr}),d.coordinate().transpose(),v.data(p),d.data(y)):(v=r.createView({region:{start:{x:0,y:0},end:{x:1,y:.5}},id:er}),d=r.createView({region:{start:{x:0,y:.5},end:{x:1,y:1}},id:rr}),d.coordinate().reflect("y"),v.data(p),d.data(y));var m=O({},e,{chart:v,options:{widthRatio:l,xField:n,yField:a[0],seriesField:Qr,interval:{color:o,style:s}}});Fe(m);var x=O({},e,{chart:d,options:{xField:n,yField:a[1],seriesField:Qr,widthRatio:l,interval:{color:o,style:s}}});return Fe(x),e}function tA(e){var r,t,i,n=e.options,a=e.chart,o=n.xAxis,s=n.yAxis,l=n.xField,u=n.yField,c=Nt(a,er),f=Nt(a,rr),v={};return(0,h.keys)((n==null?void 0:n.meta)||{}).map(function(d){(0,h.get)(n==null?void 0:n.meta,[d,"alias"])&&(v[d]=n.meta[d].alias)}),a.scale((r={},r[Qr]={sync:!0,formatter:function(d){return(0,h.get)(v,d,d)}},r)),he((t={},t[l]=o,t[u[0]]=s[u[0]],t))(O({},e,{chart:c})),he((i={},i[l]=o,i[u[1]]=s[u[1]],i))(O({},e,{chart:f})),e}function eA(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField,s=t.layout,l=Nt(r,er),u=Nt(r,rr);return(i==null?void 0:i.position)==="bottom"?u.axis(a,(0,g.__assign)((0,g.__assign)({},i),{label:{formatter:function(){return""}}})):u.axis(a,!1),i===!1?l.axis(a,!1):l.axis(a,(0,g.__assign)({position:pr(s)?"top":"bottom"},i)),n===!1?(l.axis(o[0],!1),u.axis(o[1],!1)):(l.axis(o[0],n[o[0]]),u.axis(o[1],n[o[1]])),r.__axisPosition={position:l.getOptions().axes[a].position,layout:s},e}function rA(e){var r=e.chart;return oe(O({},e,{chart:Nt(r,er)})),oe(O({},e,{chart:Nt(r,rr)})),e}function iA(e){var r=e.chart,t=e.options,i=t.yField,n=t.yAxis;return jr(O({},e,{chart:Nt(r,er),options:{yAxis:n[i[0]]}})),jr(O({},e,{chart:Nt(r,rr),options:{yAxis:n[i[1]]}})),e}function nA(e){var r=e.chart;return Xt(O({},e,{chart:Nt(r,er)})),Xt(O({},e,{chart:Nt(r,rr)})),Xt(e),e}function aA(e){var r=e.chart;return Qt(O({},e,{chart:Nt(r,er)})),Qt(O({},e,{chart:Nt(r,rr)})),e}function oA(e){var r=this,t,i,n=e.chart,a=e.options,o=a.label,s=a.yField,l=a.layout,u=Nt(n,er),c=Nt(n,rr),f=Me(u,"interval"),v=Me(c,"interval");if(!o)f.label(!1),v.label(!1);else{var d=o.callback,p=(0,g.__rest)(o,["callback"]);p.position||(p.position="middle"),p.offset===void 0&&(p.offset=2);var y=(0,g.__assign)({},p);if(pr(l)){var m=((t=y.style)===null||t===void 0?void 0:t.textAlign)||(p.position==="middle"?"center":"left");p.style=O({},p.style,{textAlign:m});var x={left:"right",right:"left",center:"center"};y.style=O({},y.style,{textAlign:x[m]})}else{var _={top:"bottom",bottom:"top",middle:"middle"};typeof p.position=="string"?p.position=_[p.position]:typeof p.position=="function"&&(p.position=function(){for(var S=[],C=0;C<arguments.length;C++)S[C]=arguments[C];return _[p.position.apply(r,S)]});var w=((i=y.style)===null||i===void 0?void 0:i.textBaseline)||"bottom";y.style=O({},y.style,{textBaseline:w});var b={top:"bottom",bottom:"top",middle:"middle"};p.style=O({},p.style,{textBaseline:b[w]})}f.label({fields:[s[0]],callback:d,cfg:be(y)}),v.label({fields:[s[1]],callback:d,cfg:be(p)})}return e}function sA(e){return Et(JC,tA,eA,iA,nA,oA,me,rA,aA)(e)}var lI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bidirectional-bar",t}return r.getDefaultOptions=function(){return O({},e.getDefaultOptions.call(this),{syncViewPadding:QC})},r.prototype.changeData=function(t){t===void 0&&(t=[]),this.chart.emit(L.BEFORE_CHANGE_DATA,ue.fromData(this.chart,L.BEFORE_CHANGE_DATA,null)),this.updateOption({data:t});var i=this.options,n=i.xField,a=i.yField,o=i.layout,s=wf(n,a,Qr,t,pr(o)),l=s[0],u=s[1],c=Nt(this.chart,er),f=Nt(this.chart,rr);c.data(l),f.data(u),this.chart.render(!0),this.chart.emit(L.AFTER_CHANGE_DATA,ue.fromData(this.chart,L.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return sA},r.SERIES_FIELD_KEY=Qr,r}(kt),Es,Ai="$$range$$",lA="low-q1-median-q3-high",uA="$$y_outliers$$",bf="outliers_view",cA=O({},kt.getDefaultOptions(),{meta:(Es={},Es[Ai]={min:0,alias:lA},Es),interactions:[{type:"active-region"}],tooltip:{showMarkers:!1,shared:!0},boxStyle:{lineWidth:1}}),Sf=function(e,r){var t=e;if(Array.isArray(r)){var i=r[0],n=r[1],a=r[2],o=r[3],s=r[4];t=(0,h.map)(e,function(l){return l[Ai]=[l[i],l[n],l[a],l[o],l[s]],l})}return t};function hA(e){var r=e.chart,t=e.options,i=t.xField,n=t.yField,a=t.groupField,o=t.color,s=t.tooltip,l=t.boxStyle;r.data(Sf(t.data,n));var u=(0,h.isArray)(n)?Ai:n,c=n?(0,h.isArray)(n)?n:[n]:[],f=s;f!==!1&&(f=O({},{fields:(0,h.isArray)(n)?n:[]},f));var v=ps(O({},e,{options:{xField:i,yField:u,seriesField:a,tooltip:f,rawFields:c,label:!1,schema:{shape:"box",color:o,style:l}}})).ext;return a&&v.geometry.adjust("dodge"),e}function fA(e){var r=e.chart,t=e.options,i=t.xField,n=t.data,a=t.outliersField,o=t.outliersStyle,s=t.padding,l=t.label;if(!a)return e;var u=r.createView({padding:s,id:bf}),c=n.reduce(function(f,v){var d=v[a];return d.forEach(function(p){var y;return f.push((0,g.__assign)((0,g.__assign)({},v),(y={},y[a]=p,y)))}),f},[]);return u.data(c),Ge({chart:u,options:{xField:i,yField:a,point:{shape:"circle",style:o},label:l}}),u.axis(!1),e}function vA(e){var r,t,i=e.chart,n=e.options,a=n.meta,o=n.xAxis,s=n.yAxis,l=n.xField,u=n.yField,c=n.outliersField,f=Array.isArray(u)?Ai:u,v={};if(c){var d=uA;v=(r={},r[c]={sync:d,nice:!0},r[f]={sync:d,nice:!0},r)}var p=O(v,a,(t={},t[l]=$t(o,Be),t[f]=$t(s,Be),t));return i.scale(p),e}function dA(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField,s=Array.isArray(o)?Ai:o;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(Ai,!1):r.axis(s,n),e}function gA(e){var r=e.chart,t=e.options,i=t.legend,n=t.groupField;return n?i?r.legend(n,i):r.legend(n,{position:"bottom"}):r.legend(!1),e}function pA(e){return Et(hA,fA,vA,dA,gA,me,le(),oe,Qt,Xt)(e)}var uI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="box",t}return r.getDefaultOptions=function(){return cA},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options.yField,n=this.chart.views.find(function(a){return a.id===bf});n&&n.data(t),this.chart.changeData(Sf(t,i))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return pA},r}(kt);function Cf(e,r,t){return e.length>1?"".concat(r,"_").concat(t):"".concat(r)}function Af(e){var r=e.data,t=e.xField,i=e.measureField,n=e.rangeField,a=e.targetField,o=e.layout,s=[],l=[];r.forEach(function(f,v){var d=[f[n]].flat();d.sort(function(m,x){return m-x}),d.forEach(function(m,x){var _,w=x===0?m:d[x]-d[x-1];s.push((_={rKey:"".concat(n,"_").concat(x)},_[t]=t?f[t]:String(v),_[n]=w,_))});var p=[f[i]].flat();p.forEach(function(m,x){var _;s.push((_={mKey:Cf(p,i,x)},_[t]=t?f[t]:String(v),_[i]=m,_))});var y=[f[a]].flat();y.forEach(function(m,x){var _;s.push((_={tKey:Cf(y,a,x)},_[t]=t?f[t]:String(v),_[a]=m,_))}),l.push(f[n],f[i],f[a])});var u=Math.min.apply(Math,l.flat(Infinity)),c=Math.max.apply(Math,l.flat(Infinity));return u=u>0?0:u,o==="vertical"&&s.reverse(),{min:u,max:c,ds:s}}function yA(e){var r=e.chart,t=e.options,i=t.bulletStyle,n=t.targetField,a=t.rangeField,o=t.measureField,s=t.xField,l=t.color,u=t.layout,c=t.size,f=t.label,v=Af(t),d=v.min,p=v.max,y=v.ds;r.data(y);var m=O({},e,{options:{xField:s,yField:a,seriesField:"rKey",isStack:!0,label:(0,h.get)(f,"range"),interval:{color:(0,h.get)(l,"range"),style:(0,h.get)(i,"range"),size:(0,h.get)(c,"range")}}});Fe(m),r.geometries[0].tooltip(!1);var x=O({},e,{options:{xField:s,yField:o,seriesField:"mKey",isStack:!0,label:(0,h.get)(f,"measure"),interval:{color:(0,h.get)(l,"measure"),style:(0,h.get)(i,"measure"),size:(0,h.get)(c,"measure")}}});Fe(x);var _=O({},e,{options:{xField:s,yField:n,seriesField:"tKey",label:(0,h.get)(f,"target"),point:{color:(0,h.get)(l,"target"),style:(0,h.get)(i,"target"),size:(0,h.isFunction)((0,h.get)(c,"target"))?function(w){return(0,h.get)(c,"target")(w)/2}:(0,h.get)(c,"target")/2,shape:u==="horizontal"?"line":"hyphen"}}});return Ge(_),u==="horizontal"&&r.coordinate().transpose(),(0,g.__assign)((0,g.__assign)({},e),{ext:{data:{min:d,max:p}}})}function Mf(e){var r,t,i=e.options,n=e.ext,a=i.xAxis,o=i.yAxis,s=i.targetField,l=i.rangeField,u=i.measureField,c=i.xField,f=n.data;return Et(he((r={},r[c]=a,r[u]=o,r),(t={},t[u]={min:f==null?void 0:f.min,max:f==null?void 0:f.max,sync:!0},t[s]={sync:"".concat(u)},t[l]={sync:"".concat(u)},t)))(e)}function mA(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.measureField,s=t.rangeField,l=t.targetField;return r.axis("".concat(s),!1),r.axis("".concat(l),!1),i===!1?r.axis("".concat(a),!1):r.axis("".concat(a),i),n===!1?r.axis("".concat(o),!1):r.axis("".concat(o),n),e}function xA(e){var r=e.chart,t=e.options,i=t.legend;return r.removeInteraction("legend-filter"),r.legend(i),r.legend("rKey",!1),r.legend("mKey",!1),r.legend("tKey",!1),e}function _A(e){var r=e.chart,t=e.options,i=t.label,n=t.measureField,a=t.targetField,o=t.rangeField,s=r.geometries,l=s[0],u=s[1],c=s[2];return(0,h.get)(i,"range")?l.label("".concat(o),(0,g.__assign)({layout:[{type:"limit-in-plot"}]},be(i.range))):l.label(!1),(0,h.get)(i,"measure")?u.label("".concat(n),(0,g.__assign)({layout:[{type:"limit-in-plot"}]},be(i.measure))):u.label(!1),(0,h.get)(i,"target")?c.label("".concat(a),(0,g.__assign)({layout:[{type:"limit-in-plot"}]},be(i.target))):c.label(!1),e}function wA(e){Et(yA,Mf,mA,xA,Xt,_A,me,oe,Qt)(e)}var bA=O({},kt.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}}),cI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bullet",t}return r.getDefaultOptions=function(){return bA},r.prototype.changeData=function(t){this.updateOption({data:t});var i=Af(this.options),n=i.min,a=i.max,o=i.ds;Mf({options:this.options,ext:{data:{min:n,max:a}},chart:this.chart}),this.chart.changeData(o)},r.prototype.getSchemaAdaptor=function(){return wA},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(kt),SA={y:0,nodeWidthRatio:.05,weight:!1,nodePaddingRatio:.1,id:function(e){return e.id},source:function(e){return e.source},target:function(e){return e.target},sourceWeight:function(e){return e.value||1},targetWeight:function(e){return e.value||1},sortBy:null};function CA(e,r,t){(0,h.forIn)(e,function(i,n){i.inEdges=r.filter(function(a){return"".concat(t.target(a))==="".concat(n)}),i.outEdges=r.filter(function(a){return"".concat(t.source(a))==="".concat(n)}),i.edges=i.outEdges.concat(i.inEdges),i.frequency=i.edges.length,i.value=0,i.inEdges.forEach(function(a){i.value+=t.targetWeight(a)}),i.outEdges.forEach(function(a){i.value+=t.sourceWeight(a)})})}function AA(e,r){var t={weight:function(n,a){return a.value-n.value},frequency:function(n,a){return a.frequency-n.frequency},id:function(n,a){return"".concat(r.id(n)).localeCompare("".concat(r.id(a)))}},i=t[r.sortBy];!i&&(0,h.isFunction)(r.sortBy)&&(i=r.sortBy),i&&e.sort(i)}function MA(e,r){var t=e.length;if(!t)throw new TypeError("Invalid nodes: it's empty!");if(r.weight){var i=r.nodePaddingRatio;if(i<0||i>=1)throw new TypeError("Invalid nodePaddingRatio: it must be in range [0, 1)!");var n=i/(2*t),a=r.nodeWidthRatio;if(a<=0||a>=1)throw new TypeError("Invalid nodeWidthRatio: it must be in range (0, 1)!");var o=0;e.forEach(function(l){o+=l.value}),e.forEach(function(l){l.weight=l.value/o,l.width=l.weight*(1-i),l.height=a}),e.forEach(function(l,u){for(var c=0,f=u-1;f>=0;f--)c+=e[f].width+2*n;var v=l.minX=n+c,d=l.maxX=l.minX+l.width,p=l.minY=r.y-a/2,y=l.maxY=p+a;l.x=[v,d,d,v],l.y=[p,p,y,y]})}else{var s=1/t;e.forEach(function(l,u){l.x=(u+.5)*s,l.y=r.y})}return e}function FA(e,r,t){if(t.weight){var i={};(0,h.forIn)(e,function(n,a){i[a]=n.value}),r.forEach(function(n){var a=t.source(n),o=t.target(n),s=e[a],l=e[o];if(s&&l){var u=i[a],c=t.sourceWeight(n),f=s.minX+(s.value-u)/s.value*s.width,v=f+c/s.value*s.width;i[a]-=c;var d=i[o],p=t.targetWeight(n),y=l.minX+(l.value-d)/l.value*l.width,m=y+p/l.value*l.width;i[o]-=p;var x=t.y;n.x=[f,v,y,m],n.y=[x,x,x,x],n.source=s,n.target=l}})}else r.forEach(function(n){var a=e[t.source(n)],o=e[t.target(n)];a&&o&&(n.x=[a.x,o.x],n.y=[a.y,o.y],n.source=a,n.target=o)});return r}function EA(e){return(0,h.assign)({},SA,e)}function TA(e,r){var t=EA(e),i={},n=r.nodes,a=r.links;n.forEach(function(l){var u=t.id(l);i[u]=l}),CA(i,a,t),AA(n,t);var o=MA(n,t),s=FA(i,a,t);return{nodes:o,links:s}}var Ff="x",Ef="y",Tf="name",Lf="source",LA={nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.5,lineWidth:2},label:{fields:["x","name"],callback:function(e,r){var t=(e[0]+e[1])/2,i=t>.5?-4:4;return{offsetX:i,content:r}},labelEmit:!0,style:{fill:"#8c8c8c"}},tooltip:{showTitle:!1,showMarkers:!1,fields:["source","target","value","isNode"],showContent:function(e){return!(0,h.get)(e,[0,"data","isNode"])},formatter:function(e){var r=e.source,t=e.target,i=e.value;return{name:"".concat(r," -> ").concat(t),value:i}}},interactions:[{type:"element-active"}],weight:!0,nodePaddingRatio:.1,nodeWidthRatio:.05};function IA(e){var r=e.options,t=r.data,i=r.sourceField,n=r.targetField,a=r.weightField,o=r.nodePaddingRatio,s=r.nodeWidthRatio,l=r.rawFields,u=l===void 0?[]:l,c=sh(t,i,n,a),f=TA({weight:!0,nodePaddingRatio:o,nodeWidthRatio:s},c),v=f.nodes,d=f.links,p=v.map(function(m){return(0,g.__assign)((0,g.__assign)({},$t(m,(0,g.__spreadArray)(["id","x","y","name"],u,!0))),{isNode:!0})}),y=d.map(function(m){return(0,g.__assign)((0,g.__assign)({source:m.source.name,target:m.target.name,name:m.source.name||m.target.name},$t(m,(0,g.__spreadArray)(["x","y","value"],u,!0))),{isNode:!1})});return(0,g.__assign)((0,g.__assign)({},e),{ext:(0,g.__assign)((0,g.__assign)({},e.ext),{chordData:{nodesData:p,edgesData:y}})})}function OA(e){var r,t=e.chart;return t.scale((r={x:{sync:!0,nice:!0},y:{sync:!0,nice:!0,max:1}},r[Tf]={sync:"color"},r[Lf]={sync:"color"},r)),e}function PA(e){var r=e.chart;return r.axis(!1),e}function kA(e){var r=e.chart;return r.legend(!1),e}function DA(e){var r=e.chart,t=e.options,i=t.tooltip;return r.tooltip(i),e}function BA(e){var r=e.chart;return r.coordinate("polar").reflect("y"),e}function RA(e){var r=e.chart,t=e.options,i=e.ext.chordData.nodesData,n=t.nodeStyle,a=t.label,o=t.tooltip,s=r.createView();return s.data(i),_a({chart:s,options:{xField:Ff,yField:Ef,seriesField:Tf,polygon:{style:n},label:a,tooltip:o}}),e}function NA(e){var r=e.chart,t=e.options,i=e.ext.chordData.edgesData,n=t.edgeStyle,a=t.tooltip,o=r.createView();o.data(i);var s={xField:Ff,yField:Ef,seriesField:Lf,edge:{style:n,shape:"arc"},tooltip:a};return wh({chart:o,options:s}),e}function zA(e){var r=e.chart,t=e.options,i=t.animation;return ln(r,i,tb(r)),e}function VA(e){return Et(Xt,IA,BA,OA,PA,kA,DA,NA,RA,oe,Lr,zA)(e)}var hI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="chord",t}return r.getDefaultOptions=function(){return LA},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return VA},r}(kt),GA=["x","y","r","name","value","path","depth"],WA={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}},If=4,HA=0,Of=5,Pf="drilldown-bread-crumb",YA={position:"top-left",dividerText:"/",textStyle:{fontSize:12,fill:"rgba(0, 0, 0, 0.65)",cursor:"pointer"},activeTextStyle:{fill:"#87B5FF"}},pn="hierarchy-data-transform-params",XA=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.name="drill-down",t.historyCache=[],t.breadCrumbGroup=null,t.breadCrumbCfg=YA,t}return r.prototype.click=function(){var t=(0,h.get)(this.context,["event","data","data"]);if(!t)return!1;this.drill(t),this.drawBreadCrumb()},r.prototype.resetPosition=function(){if(!!this.breadCrumbGroup){var t=this.context.view.getCoordinate(),i=this.breadCrumbGroup,n=i.getBBox(),a=this.getButtonCfg().position,o={x:t.start.x,y:t.end.y-(n.height+Of*2)};t.isPolar&&(o={x:0,y:0}),a==="bottom-left"&&(o={x:t.start.x,y:t.start.y});var s=ke.transform(null,[["t",o.x+HA,o.y+n.height+Of]]);i.setMatrix(s)}},r.prototype.back=function(){(0,h.size)(this.historyCache)&&this.backTo(this.historyCache.slice(0,-1))},r.prototype.reset=function(){this.historyCache[0]&&this.backTo(this.historyCache.slice(0,1)),this.historyCache=[],this.hideCrumbGroup()},r.prototype.drill=function(t){var i=this.context.view,n=(0,h.get)(i,["interactions","drill-down","cfg","transformData"],function(u){return u}),a=n((0,g.__assign)({data:t.data},t[pn]));i.changeData(a);for(var o=[],s=t;s;){var l=s.data;o.unshift({id:"".concat(l.name,"_").concat(s.height,"_").concat(s.depth),name:l.name,children:n((0,g.__assign)({data:l},t[pn]))}),s=s.parent}this.historyCache=(this.historyCache||[]).slice(0,-1).concat(o)},r.prototype.backTo=function(t){if(!(!t||t.length<=0)){var i=this.context.view,n=(0,h.last)(t).children;i.changeData(n),t.length>1?(this.historyCache=t,this.drawBreadCrumb()):(this.historyCache=[],this.hideCrumbGroup())}},r.prototype.getButtonCfg=function(){var t=this.context.view,i=(0,h.get)(t,["interactions","drill-down","cfg","drillDownConfig"]);return O(this.breadCrumbCfg,i==null?void 0:i.breadCrumb,this.cfg)},r.prototype.drawBreadCrumb=function(){this.drawBreadCrumbGroup(),this.resetPosition(),this.breadCrumbGroup.show()},r.prototype.drawBreadCrumbGroup=function(){var t=this,i=this.getButtonCfg(),n=this.historyCache;this.breadCrumbGroup?this.breadCrumbGroup.clear():this.breadCrumbGroup=this.context.view.foregroundGroup.addGroup({name:Pf});var a=0;n.forEach(function(o,s){var l=t.breadCrumbGroup.addShape({type:"text",id:o.id,name:"".concat(Pf,"_").concat(o.name,"_text"),attrs:(0,g.__assign)((0,g.__assign)({text:s===0&&!(0,h.isNil)(i.rootText)?i.rootText:o.name},i.textStyle),{x:a,y:0})}),u=l.getBBox();if(a+=u.width+If,l.on("click",function(v){var d,p=v.target.get("id");if(p!==((d=(0,h.last)(n))===null||d===void 0?void 0:d.id)){var y=n.slice(0,n.findIndex(function(m){return m.id===p})+1);t.backTo(y)}}),l.on("mouseenter",function(v){var d,p=v.target.get("id");p!==((d=(0,h.last)(n))===null||d===void 0?void 0:d.id)?l.attr(i.activeTextStyle):l.attr({cursor:"default"})}),l.on("mouseleave",function(){l.attr(i.textStyle)}),s<n.length-1){var c=t.breadCrumbGroup.addShape({type:"text",name:"".concat(i.name,"_").concat(o.name,"_divider"),attrs:(0,g.__assign)((0,g.__assign)({text:i.dividerText},i.textStyle),{x:a,y:0})}),f=c.getBBox();a+=f.width+If}})},r.prototype.hideCrumbGroup=function(){this.breadCrumbGroup&&this.breadCrumbGroup.hide()},r.prototype.destroy=function(){this.breadCrumbGroup&&this.breadCrumbGroup.remove(),e.prototype.destroy.call(this)},r}(ne);function UA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function jA(e){for(var r=e.length,t,i;r;)i=Math.random()*r--|0,t=e[r],e[r]=e[i],e[i]=t;return e}function kf(e){for(var r=0,t=(e=jA(Array.from(e))).length,i=[],n,a;r<t;)n=e[r],a&&Df(a,n)?++r:(a=qA(i=ZA(i,n)),r=0);return a}function ZA(e,r){var t,i;if(Ts(r,e))return[r];for(t=0;t<e.length;++t)if(Ta(r,e[t])&&Ts(yn(e[t],r),e))return[e[t],r];for(t=0;t<e.length-1;++t)for(i=t+1;i<e.length;++i)if(Ta(yn(e[t],e[i]),r)&&Ta(yn(e[t],r),e[i])&&Ta(yn(e[i],r),e[t])&&Ts(Bf(e[t],e[i],r),e))return[e[t],e[i],r];throw new Error}function Ta(e,r){var t=e.r-r.r,i=r.x-e.x,n=r.y-e.y;return t<0||t*t<i*i+n*n}function Df(e,r){var t=e.r-r.r+Math.max(e.r,r.r,1)*1e-9,i=r.x-e.x,n=r.y-e.y;return t>0&&t*t>i*i+n*n}function Ts(e,r){for(var t=0;t<r.length;++t)if(!Df(e,r[t]))return!1;return!0}function qA(e){switch(e.length){case 1:return KA(e[0]);case 2:return yn(e[0],e[1]);case 3:return Bf(e[0],e[1],e[2])}}function KA(e){return{x:e.x,y:e.y,r:e.r}}function yn(e,r){var t=e.x,i=e.y,n=e.r,a=r.x,o=r.y,s=r.r,l=a-t,u=o-i,c=s-n,f=Math.sqrt(l*l+u*u);return{x:(t+a+l/f*c)/2,y:(i+o+u/f*c)/2,r:(f+n+s)/2}}function Bf(e,r,t){var i=e.x,n=e.y,a=e.r,o=r.x,s=r.y,l=r.r,u=t.x,c=t.y,f=t.r,v=i-o,d=i-u,p=n-s,y=n-c,m=l-a,x=f-a,_=i*i+n*n-a*a,w=_-o*o-s*s+l*l,b=_-u*u-c*c+f*f,S=d*p-v*y,C=(p*b-y*w)/(S*2)-i,A=(y*m-p*x)/S,F=(d*w-v*b)/(S*2)-n,P=(v*x-d*m)/S,I=A*A+P*P-1,V=2*(a+C*A+F*P),Z=C*C+F*F-a*a,vt=-(I?(V+Math.sqrt(V*V-4*I*Z))/(2*I):Z/V);return{x:i+C+A*vt,y:n+F+P*vt,r:vt}}function Rf(e,r,t){var i=e.x-r.x,n,a,o=e.y-r.y,s,l,u=i*i+o*o;u?(a=r.r+t.r,a*=a,l=e.r+t.r,l*=l,a>l?(n=(u+l-a)/(2*u),s=Math.sqrt(Math.max(0,l/u-n*n)),t.x=e.x-n*i-s*o,t.y=e.y-n*o+s*i):(n=(u+a-l)/(2*u),s=Math.sqrt(Math.max(0,a/u-n*n)),t.x=r.x+n*i-s*o,t.y=r.y+n*o+s*i)):(t.x=r.x+t.r,t.y=r.y)}function Nf(e,r){var t=e.r+r.r-1e-6,i=r.x-e.x,n=r.y-e.y;return t>0&&t*t>i*i+n*n}function zf(e){var r=e._,t=e.next._,i=r.r+t.r,n=(r.x*t.r+t.x*r.r)/i,a=(r.y*t.r+t.y*r.r)/i;return n*n+a*a}function La(e){this._=e,this.next=null,this.previous=null}function Vf(e){if(!(n=(e=UA(e)).length))return 0;var r,t,i,n,a,o,s,l,u,c,f;if(r=e[0],r.x=0,r.y=0,!(n>1))return r.r;if(t=e[1],r.x=-t.r,t.x=r.r,t.y=0,!(n>2))return r.r+t.r;Rf(t,r,i=e[2]),r=new La(r),t=new La(t),i=new La(i),r.next=i.previous=t,t.next=r.previous=i,i.next=t.previous=r;t:for(s=3;s<n;++s){Rf(r._,t._,i=e[s]),i=new La(i),l=t.next,u=r.previous,c=t._.r,f=r._.r;do if(c<=f){if(Nf(l._,i._)){t=l,r.next=t,t.previous=r,--s;continue t}c+=l._.r,l=l.next}else{if(Nf(u._,i._)){r=u,r.next=t,t.previous=r,--s;continue t}f+=u._.r,u=u.previous}while(l!==u.next);for(i.previous=r,i.next=t,r.next=t.previous=t=i,a=zf(r);(i=i.next)!==t;)(o=zf(i))<a&&(r=i,a=o);t=r.next}for(r=[t._],i=t;(i=i.next)!==t;)r.push(i._);for(i=kf(r),s=0;s<n;++s)r=e[s],r.x-=i.x,r.y-=i.y;return i.r}function $A(e){return Vf(e),e}function QA(e){return e==null?null:Ia(e)}function Ia(e){if(typeof e!="function")throw new Error;return e}function Jr(){return 0}function Mi(e){return function(){return e}}function JA(e){return Math.sqrt(e.value)}function Gf(){var e=null,r=1,t=1,i=Jr;function n(a){return a.x=r/2,a.y=t/2,e?a.eachBefore(Wf(e)).eachAfter(Ls(i,.5)).eachBefore(Hf(1)):a.eachBefore(Wf(JA)).eachAfter(Ls(Jr,1)).eachAfter(Ls(i,a.r/Math.min(r,t))).eachBefore(Hf(Math.min(r,t)/(2*a.r))),a}return n.radius=function(a){return arguments.length?(e=QA(a),n):e},n.size=function(a){return arguments.length?(r=+a[0],t=+a[1],n):[r,t]},n.padding=function(a){return arguments.length?(i=typeof a=="function"?a:Mi(+a),n):i},n}function Wf(e){return function(r){r.children||(r.r=Math.max(0,+e(r)||0))}}function Ls(e,r){return function(t){if(i=t.children){var i,n,a=i.length,o=e(t)*r||0,s;if(o)for(n=0;n<a;++n)i[n].r+=o;if(s=Vf(i),o)for(n=0;n<a;++n)i[n].r-=o;t.r=s+o}}}function Hf(e){return function(r){var t=r.parent;r.r*=e,t&&(r.x=t.x+e*r.x,r.y=t.y+e*r.y)}}var tM=M(32059);function eM(e){var r=0,t=e.children,i=t&&t.length;if(!i)r=1;else for(;--i>=0;)r+=t[i].value;e.value=r}function rM(){return this.eachAfter(eM)}var iM=M(64254);function Yf(e,r){var t=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=(0,iM.Z)(e))||r&&e&&typeof e.length=="number"){t&&(e=t);var i=0,n=function(){};return{s:n,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
  35. 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(e)},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 nM(e,r){var t=-1,i=Yf(this),n;try{for(i.s();!(n=i.n()).done;){var a=n.value;e.call(r,a,++t,this)}}catch(o){i.e(o)}finally{i.f()}return this}function aM(e,r){for(var t=this,i=[t],n,a,o=-1;t=i.pop();)if(e.call(r,t,++o,this),n=t.children)for(a=n.length-1;a>=0;--a)i.push(n[a]);return this}function oM(e,r){for(var t=this,i=[t],n=[],a,o,s,l=-1;t=i.pop();)if(n.push(t),a=t.children)for(o=0,s=a.length;o<s;++o)i.push(a[o]);for(;t=n.pop();)e.call(r,t,++l,this);return this}function sM(e,r){var t=-1,i=Yf(this),n;try{for(i.s();!(n=i.n()).done;){var a=n.value;if(e.call(r,a,++t,this))return a}}catch(o){i.e(o)}finally{i.f()}}function lM(e){return this.eachAfter(function(r){for(var t=+e(r.data)||0,i=r.children,n=i&&i.length;--n>=0;)t+=i[n].value;r.value=t})}function uM(e){return this.eachBefore(function(r){r.children&&r.children.sort(e)})}function cM(e){for(var r=this,t=hM(r,e),i=[r];r!==t;)r=r.parent,i.push(r);for(var n=i.length;e!==t;)i.splice(n,0,e),e=e.parent;return i}function hM(e,r){if(e===r)return e;var t=e.ancestors(),i=r.ancestors(),n=null;for(e=t.pop(),r=i.pop();e===r;)n=e,e=t.pop(),r=i.pop();return n}function fM(){for(var e=this,r=[e];e=e.parent;)r.push(e);return r}function vM(){return Array.from(this)}function dM(){var e=[];return this.eachBefore(function(r){r.children||e.push(r)}),e}function gM(){var e=this,r=[];return e.each(function(t){t!==e&&r.push({source:t.parent,target:t})}),r}var Xf=M(39428),pM=(0,Xf.Z)().mark(Uf);function Uf(){var e,r,t,i,n,a;return(0,Xf.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=this,t=[e];case 1:r=t.reverse(),t=[];case 2:if(!(e=r.pop())){s.next=8;break}return s.next=5,e;case 5:if(i=e.children)for(n=0,a=i.length;n<a;++n)t.push(i[n]);s.next=2;break;case 8:if(t.length){s.next=1;break}case 9:case"end":return s.stop()}},pM,this)}function Fi(e,r){e instanceof Map?(e=[void 0,e],r===void 0&&(r=xM)):r===void 0&&(r=mM);for(var t=new Ei(e),i,n=[t],a,o,s,l;i=n.pop();)if((o=r(i.data))&&(l=(o=Array.from(o)).length))for(i.children=o,s=l-1;s>=0;--s)n.push(a=o[s]=new Ei(o[s])),a.parent=i,a.depth=i.depth+1;return t.eachBefore(jf)}function yM(){return Fi(this).eachBefore(_M)}function mM(e){return e.children}function xM(e){return Array.isArray(e)?e[1]:null}function _M(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function jf(e){var r=0;do e.height=r;while((e=e.parent)&&e.height<++r)}function Ei(e){this.data=e,this.depth=this.height=0,this.parent=null}Ei.prototype=Fi.prototype=(0,tM.Z)({constructor:Ei,count:rM,each:nM,eachAfter:oM,eachBefore:aM,find:sM,sum:lM,sort:uM,path:cM,ancestors:fM,descendants:vM,leaves:dM,links:gM,copy:yM},Symbol.iterator,Uf);var Zf="nodeIndex",qf="childNodeCount",Is="nodeAncestor",Os="Invalid field: it must be a string!";function Ps(e,r){var t=e.field,i=e.fields;if((0,h.isString)(t))return t;if((0,h.isArray)(t))return console.warn(Os),t[0];if(console.warn("".concat(Os," will try to get fields instead.")),(0,h.isString)(i))return i;if((0,h.isArray)(i)&&i.length)return i[0];if(r)return r;throw new TypeError(Os)}function ks(e){var r=[];if(e&&e.each){var t,i;e.each(function(n){var a,o;n.parent!==t?(t=n.parent,i=0):i+=1;var s=(0,h.filter)((((a=n.ancestors)===null||a===void 0?void 0:a.call(n))||[]).map(function(l){return r.find(function(u){return u.name===l.name})||l}),function(l){var u=l.depth;return u>0&&u<n.depth});n[Is]=s,n[qf]=((o=n.children)===null||o===void 0?void 0:o.length)||0,n[Zf]=i,r.push(n)})}else e&&e.eachNode&&e.eachNode(function(n){r.push(n)});return r}var wM={field:"value",as:["x","y","r"],sort:function(e,r){return r.value-e.value}};function bM(e,r){r=(0,h.assign)({},wM,r);var t=r.as;if(!(0,h.isArray)(t)||t.length!==3)throw new TypeError('Invalid as: it must be an array with 3 strings (e.g. [ "x", "y", "r" ])!');var i;try{i=Ps(r)}catch(u){console.warn(u)}var n=function(u){return Gf().size(r.size).padding(r.padding)(Fi(u).sum(function(c){return c[i]}).sort(r.sort))},a=n(e),o=t[0],s=t[1],l=t[2];return a.each(function(u){u[o]=u.x,u[s]=u.y,u[l]=u.r}),ks(a)}function Kf(e){var r=e.data,t=e.hierarchyConfig,i=e.rawFields,n=i===void 0?[]:i,a=e.enableDrillDown,o=bM(r,(0,g.__assign)((0,g.__assign)({},t),{field:"value",as:["x","y","r"]})),s=[];return o.forEach(function(l){for(var u,c=l.data.name,f=(0,g.__assign)({},l);f.depth>1;)c="".concat((u=f.parent.data)===null||u===void 0?void 0:u.name," / ").concat(c),f=f.parent;if(a&&l.depth>2)return null;var v=O({},l.data,(0,g.__assign)((0,g.__assign)((0,g.__assign)({},$t(l.data,n)),{path:c}),l));v.ext=t,v[pn]={hierarchyConfig:t,rawFields:n,enableDrillDown:a},s.push(v)}),s}function $f(e,r,t){var i=hs([e,r]),n=i[0],a=i[1],o=i[2],s=i[3],l=t.width,u=t.height,c=l-(s+a),f=u-(n+o),v=Math.min(c,f),d=(c-v)/2,p=(f-v)/2,y=n+p,m=a+d,x=o+p,_=s+d,w=[y,m,x,_],b=v<0?0:v;return{finalPadding:w,finalSize:b}}function SM(e){var r=e.chart,t=Math.min(r.viewBBox.width,r.viewBBox.height);return O({options:{size:function(i){var n=i.r;return n*t}}},e)}function CM(e){var r=e.options,t=e.chart,i=t.viewBBox,n=r.padding,a=r.appendPadding,o=r.drilldown,s=a;if(o==null?void 0:o.enabled){var l=va(t.appendPadding,(0,h.get)(o,["breadCrumb","position"]));s=hs([l,a])}var u=$f(n,s,i).finalPadding;return t.padding=u,t.appendPadding=0,e}function AM(e){var r=e.chart,t=e.options,i=r.padding,n=r.appendPadding,a=t.color,o=t.colorField,s=t.pointStyle,l=t.hierarchyConfig,u=t.sizeField,c=t.rawFields,f=c===void 0?[]:c,v=t.drilldown,d=Kf({data:t.data,hierarchyConfig:l,enableDrillDown:v==null?void 0:v.enabled,rawFields:f});r.data(d);var p=r.viewBBox,y=$f(i,n,p).finalSize,m=function(x){var _=x.r;return _*y};return u&&(m=function(x){return x[u]*y}),Ge(O({},e,{options:{xField:"x",yField:"y",seriesField:o,sizeField:u,rawFields:(0,g.__spreadArray)((0,g.__spreadArray)([],GA,!0),f,!0),point:{color:a,style:s,shape:"circle",size:m}}})),e}function MM(e){return Et(he({},{x:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0},y:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0}}))(e)}function FM(e){var r=e.chart,t=e.options,i=t.tooltip;if(i===!1)r.tooltip(!1);else{var n=i;(0,h.get)(i,"fields")||(n=O({},{customItems:function(a){return a.map(function(o){var s=(0,h.get)(r.getOptions(),"scales"),l=(0,h.get)(s,["name","formatter"],function(c){return c}),u=(0,h.get)(s,["value","formatter"],function(c){return c});return(0,g.__assign)((0,g.__assign)({},o),{name:l(o.data.name),value:u(o.data.value)})})}},n)),r.tooltip(n)}return e}function EM(e){var r=e.chart;return r.axis(!1),e}function TM(e){var r=e.drilldown,t=e.interactions,i=t===void 0?[]:t;return(r==null?void 0:r.enabled)?O({},e,{interactions:(0,g.__spreadArray)((0,g.__spreadArray)([],i,!0),[{type:"drill-down",cfg:{drillDownConfig:r,transformData:Kf,enableDrillDown:!0}}],!1)}):e}function LM(e){var r=e.chart,t=e.options;return oe({chart:r,options:TM(t)}),e}function IM(e){return Et(Ve("pointStyle"),SM,CM,Xt,MM,AM,EM,Ur,FM,LM,Qt,le())(e)}function Qf(e){var r=(0,h.get)(e,["event","data","data"],{});return(0,h.isArray)(r.children)&&r.children.length>0}function Jf(e){var r=e.view.getCoordinate(),t=r.innerRadius;if(t){var i=e.event,n=i.x,a=i.y,o=r.center,s=o.x,l=o.y,u=r.getRadius()*t,c=Math.sqrt(Math.pow(s-n,2)+Math.pow(l-a,2));return c<u}return!1}xt("drill-down-action",XA),Ot("drill-down",{showEnable:[{trigger:"element:mouseenter",action:"cursor:pointer",isEnable:Qf},{trigger:"element:mouseleave",action:"cursor:default"},{trigger:"element:mouseleave",action:"cursor:pointer",isEnable:Jf}],start:[{trigger:"element:click",isEnable:Qf,action:["drill-down-action:click"]},{trigger:"afterchangesize",action:["drill-down-action:resetPosition"]},{trigger:"click",isEnable:Jf,action:["drill-down-action:back"]}]});var fI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="circle-packing",t}return r.getDefaultOptions=function(){return WA},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return IM},r.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},r}(kt),We="left-axes-view",He="right-axes-view",tv={nice:!0,label:{autoHide:!0,autoRotate:!1}},OM=(0,g.__assign)((0,g.__assign)({},tv),{position:"left"}),PM=(0,g.__assign)((0,g.__assign)({},tv),{position:"right",grid:null}),Ti;(function(e){e.Left="Left",e.Right="Right"})(Ti||(Ti={}));var ti;(function(e){e.Line="line",e.Column="column"})(ti||(ti={}));function Ds(e){return(0,h.get)(e,"geometry")===ti.Line}function Bs(e){return(0,h.get)(e,"geometry")===ti.Column}function ev(e,r,t){return Bs(t)?O({},{geometry:ti.Column,label:t.label&&t.isRange?{content:function(i){var n;return(n=i[r])===null||n===void 0?void 0:n.join("-")}}:void 0},t):(0,g.__assign)({geometry:ti.Line},t)}function rv(e,r){var t=e[0],i=e[1];if((0,h.isArray)(r)){var n=r[0],a=r[1];return[n,a]}var o=(0,h.get)(r,t),s=(0,h.get)(r,i);return[o,s]}function iv(e,r){return r===Ti.Left?e===!1?!1:O({},OM,e):r===Ti.Right?e===!1?!1:O({},PM,e):e}function kM(e){var r=e.options,t=e.chart,i=r.geometryOption,n=i.isStack,a=i.color,o=i.seriesField,s=i.groupField,l=i.isGroup,u=["xField","yField"];if(Ds(i)){wi(O({},e,{options:(0,g.__assign)((0,g.__assign)((0,g.__assign)({},$t(r,u)),i),{line:{color:i.color,style:i.lineStyle}})})),Ge(O({},e,{options:(0,g.__assign)((0,g.__assign)((0,g.__assign)({},$t(r,u)),i),{point:i.point&&(0,g.__assign)({color:a,shape:"circle"},i.point)})}));var c=[];l&&c.push({type:"dodge",dodgeBy:s||o,customOffset:0}),n&&c.push({type:"stack"}),c.length&&(0,h.each)(t.geometries,function(f){f.adjust(c)})}return Bs(i)&&Sa(O({},e,{options:(0,g.__assign)((0,g.__assign)((0,g.__assign)({},$t(r,u)),i),{widthRatio:i.columnWidthRatio,interval:(0,g.__assign)((0,g.__assign)({},$t(i,["color"])),{style:i.columnStyle})})})),e}function nv(e){var r=e.view,t=e.geometryOption,i=e.yField,n=e.legend,a=(0,h.get)(n,"marker"),o=Me(r,Ds(t)?"line":"interval");if(!t.seriesField){var s=(0,h.get)(r,"options.scales.".concat(i,".alias"))||i,l=o.getAttribute("color"),u=r.getTheme().defaultColor;l&&(u=ke.getMappingValue(l,s,(0,h.get)(l,["values",0],u)));var c=((0,h.isFunction)(a)?a:!(0,h.isEmpty)(a)&&O({},{style:{stroke:u,fill:u}},a))||(Ds(t)?{symbol:function(v,d,p){return[["M",v-p,d],["L",v+p,d]]},style:{lineWidth:2,r:6,stroke:u}}:{symbol:"square",style:{fill:u}});return[{value:i,name:s,marker:c,isGeometry:!0,viewId:r.id}]}var f=o.getGroupAttributes();return(0,h.reduce)(f,function(v,d){var p=ke.getLegendItems(r,o,d,r.getTheme(),a);return v.concat(p)},[])}var av=function(e,r){var t=r[0],i=r[1],n=e.getOptions().data,a=e.getXScale(),o=(0,h.size)(n);if(!(!a||!o)){var s=!0,l=(0,h.valuesOfKey)(n,a.field),u=s?l:l.reverse(),c=(0,h.size)(u),f=Math.floor(t*(c-1)),v=Math.floor(i*(c-1));e.filter(a.field,function(d){var p=u.indexOf(d);return p>-1?rb(p,f,v):!0}),e.getRootView().render(!0)}};function DM(e){var r,t=e.options,i=t.geometryOptions,n=i===void 0?[]:i,a=t.xField,o=t.yField,s=(0,h.every)(n,function(l){var u=l.geometry;return u===ti.Line||u===void 0});return O({},{options:{geometryOptions:[],meta:(r={},r[a]={type:"cat",sync:!0,range:s?[0,1]:void 0},r),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"}}},e,{options:{yAxis:rv(o,t.yAxis),geometryOptions:[ev(a,o[0],n[0]),ev(a,o[1],n[1])],annotations:rv(o,t.annotations)}})}function BM(e){var r,t,i=e.chart,n=e.options,a=n.geometryOptions,o={line:0,column:1},s=[{type:(r=a[0])===null||r===void 0?void 0:r.geometry,id:We},{type:(t=a[1])===null||t===void 0?void 0:t.geometry,id:He}];return s.sort(function(l,u){return-o[l.type]+o[u.type]}).forEach(function(l){return i.createView({id:l.id})}),e}function RM(e){var r=e.chart,t=e.options,i=t.xField,n=t.yField,a=t.geometryOptions,o=t.data,s=t.tooltip,l=[(0,g.__assign)((0,g.__assign)({},a[0]),{id:We,data:o[0],yField:n[0]}),(0,g.__assign)((0,g.__assign)({},a[1]),{id:He,data:o[1],yField:n[1]})];return l.forEach(function(u){var c=u.id,f=u.data,v=u.yField,d=Bs(u)&&u.isPercent,p=d?Ch(f,v,i,v):f,y=Nt(r,c).data(p),m=d?(0,g.__assign)({formatter:function(x){return{name:x[u.seriesField]||v,value:(Number(x[v])*100).toFixed(2)+"%"}}},s):s;kM({chart:y,options:{xField:i,yField:v,tooltip:m,geometryOption:u}})}),e}function NM(e){var r,t=e.chart,i=e.options,n=i.geometryOptions,a=((r=t.getTheme())===null||r===void 0?void 0:r.colors10)||[],o=0;return t.once("beforepaint",function(){(0,h.each)(n,function(s,l){var u=Nt(t,l===0?We:He);if(!s.color){var c=u.getGroupScales(),f=(0,h.get)(c,[0,"values","length"],1),v=a.slice(o,o+f).concat(l===0?[]:a);u.geometries.forEach(function(d){s.seriesField?d.color(s.seriesField,v):d.color(v[0])}),o+=f}}),t.render(!0)}),e}function zM(e){var r,t,i=e.chart,n=e.options,a=n.xAxis,o=n.yAxis,s=n.xField,l=n.yField;return he((r={},r[s]=a,r[l[0]]=o[0],r))(O({},e,{chart:Nt(i,We)})),he((t={},t[s]=a,t[l[1]]=o[1],t))(O({},e,{chart:Nt(i,He)})),e}function VM(e){var r=e.chart,t=e.options,i=Nt(r,We),n=Nt(r,He),a=t.xField,o=t.yField,s=t.xAxis,l=t.yAxis;return r.axis(a,!1),r.axis(o[0],!1),r.axis(o[1],!1),i.axis(a,s),i.axis(o[0],iv(l[0],Ti.Left)),n.axis(a,!1),n.axis(o[1],iv(l[1],Ti.Right)),e}function GM(e){var r=e.chart,t=e.options,i=t.tooltip,n=Nt(r,We),a=Nt(r,He);return r.tooltip(i),n.tooltip({shared:!0}),a.tooltip({shared:!0}),e}function WM(e){var r=e.chart;return oe(O({},e,{chart:Nt(r,We)})),oe(O({},e,{chart:Nt(r,He)})),e}function HM(e){var r=e.chart,t=e.options,i=t.annotations,n=(0,h.get)(i,[0]),a=(0,h.get)(i,[1]);return le(n)(O({},e,{chart:Nt(r,We),options:{annotations:n}})),le(a)(O({},e,{chart:Nt(r,He),options:{annotations:a}})),e}function YM(e){var r=e.chart;return Xt(O({},e,{chart:Nt(r,We)})),Xt(O({},e,{chart:Nt(r,He)})),Xt(e),e}function XM(e){var r=e.chart;return Qt(O({},e,{chart:Nt(r,We)})),Qt(O({},e,{chart:Nt(r,He)})),e}function UM(e){var r=e.chart,t=e.options,i=t.yAxis;return jr(O({},e,{chart:Nt(r,We),options:{yAxis:i[0]}})),jr(O({},e,{chart:Nt(r,He),options:{yAxis:i[1]}})),e}function jM(e){var r=e.chart,t=e.options,i=t.legend,n=t.geometryOptions,a=t.yField,o=t.data,s=Nt(r,We),l=Nt(r,He);if(i===!1)r.legend(!1);else if((0,h.isObject)(i)&&i.custom===!0)r.legend(i);else{var u=(0,h.get)(n,[0,"legend"],i),c=(0,h.get)(n,[1,"legend"],i);r.once("beforepaint",function(){var f=o[0].length?nv({view:s,geometryOption:n[0],yField:a[0],legend:u}):[],v=o[1].length?nv({view:l,geometryOption:n[1],yField:a[1],legend:c}):[];r.legend(O({},i,{custom:!0,items:f.concat(v)}))}),n[0].seriesField&&s.legend(n[0].seriesField,u),n[1].seriesField&&l.legend(n[1].seriesField,c),r.on("legend-item:click",function(f){var v=(0,h.get)(f,"gEvent.delegateObject",{});if(v&&v.item){var d=v.item,p=d.value,y=d.isGeometry,m=d.viewId;if(y){var x=(0,h.findIndex)(a,function(b){return b===p});if(x>-1){var _=(0,h.get)(Nt(r,m),"geometries");(0,h.each)(_,function(b){b.changeVisible(!v.item.unchecked)})}}else{var w=(0,h.get)(r.getController("legend"),"option.items",[]);(0,h.each)(r.views,function(b){var S=b.getGroupScales();(0,h.each)(S,function(C){C.values&&C.values.indexOf(p)>-1&&b.filter(C.field,function(A){var F=(0,h.find)(w,function(P){return P.value===A});return!F.unchecked})}),r.render(!0)})}}})}return e}function ZM(e){var r=e.chart,t=e.options,i=t.slider,n=Nt(r,We),a=Nt(r,He);return i&&(n.option("slider",i),n.on("slider:valuechanged",function(o){var s=o.event,l=s.value,u=s.originValue;(0,h.isEqual)(l,u)||av(a,l)}),r.once("afterpaint",function(){if(!(0,h.isBoolean)(i)){var o=i.start,s=i.end;(o||s)&&av(a,[o,s])}})),e}function qM(e){return Et(DM,BM,YM,RM,zM,VM,UM,GM,WM,HM,XM,NM,jM,ZM)(e)}var vI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="dual-axes",t}return r.prototype.getDefaultOptions=function(){return O({},e.prototype.getDefaultOptions.call(this),{yAxis:[],syncViewPadding:!0})},r.prototype.getSchemaAdaptor=function(){return qM},r}(kt);function KM(e,r){var t=r.data,i=r.coordinate,n=r.interactions,a=r.annotations,o=r.animation,s=r.tooltip,l=r.axes,u=r.meta,c=r.geometries;t&&e.data(t);var f={};l&&(0,h.each)(l,function(v,d){f[d]=$t(v,Be)}),f=O({},u,f),e.scale(f),i&&e.coordinate(i),l===!1?e.axis(!1):(0,h.each)(l,function(v,d){e.axis(d,v)}),(0,h.each)(c,function(v){var d=Re({chart:e,options:v}).ext,p=v.adjust;p&&d.geometry.adjust(p)}),(0,h.each)(n,function(v){v.enable===!1?e.removeInteraction(v.type):e.interaction(v.type,v.cfg)}),(0,h.each)(a,function(v){e.annotation()[v.type]((0,g.__assign)({},v))}),ln(e,o),s?(e.interaction("tooltip"),e.tooltip(s)):s===!1&&e.removeInteraction("tooltip")}function $M(e){var r=e.chart,t=e.options,i=t.type,n=t.data,a=t.fields,o=t.eachView,s=(0,h.omit)(t,["type","data","fields","eachView","axes","meta","tooltip","coordinate","theme","legend","interactions","annotations"]);return r.data(n),r.facet(i,(0,g.__assign)((0,g.__assign)({},s),{fields:a,eachView:function(l,u){var c=o(l,u);if(c.geometries)KM(l,c);else{var f=c,v=f.options;v.tooltip&&l.interaction("tooltip"),Fs(f.type,l,v)}}})),e}function QM(e){var r=e.chart,t=e.options,i=t.axes,n=t.meta,a=t.tooltip,o=t.coordinate,s=t.theme,l=t.legend,u=t.interactions,c=t.annotations,f={};return i&&(0,h.each)(i,function(v,d){f[d]=$t(v,Be)}),f=O({},n,f),r.scale(f),r.coordinate(o),i?(0,h.each)(i,function(v,d){r.axis(d,v)}):r.axis(!1),a?(r.interaction("tooltip"),r.tooltip(a)):a===!1&&r.removeInteraction("tooltip"),r.legend(l),s&&r.theme(s),(0,h.each)(u,function(v){v.enable===!1?r.removeInteraction(v.type):r.interaction(v.type,v.cfg)}),(0,h.each)(c,function(v){r.annotation()[v.type]((0,g.__assign)({},v))}),e}function JM(e){return Et(Xt,$M,QM)(e)}var tF={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)"}}},dI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="area",t}return r.getDefaultOptions=function(){return tF},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return JM},r}(kt);function eF(e){var r=e.chart,t=e.options,i=t.data,n=t.type,a=t.xField,o=t.yField,s=t.colorField,l=t.sizeField,u=t.sizeRatio,c=t.shape,f=t.color,v=t.tooltip,d=t.heatmapStyle,p=t.meta;r.data(i);var y="polygon";n==="density"&&(y="heatmap");var m=Ye(v,[a,o,s]),x=m.fields,_=m.formatter,w=1;return(u||u===0)&&(!c&&!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]"):w=u),Re(O({},e,{options:{type:y,colorField:s,tooltipFields:x,shapeField:l||"",label:void 0,mapping:{tooltip:_,shape:c&&(l?function(b){var S=i.map(function(P){return P[l]}),C=(p==null?void 0:p[l])||{},A=C.min,F=C.max;return A=(0,h.isNumber)(A)?A:Math.min.apply(Math,S),F=(0,h.isNumber)(F)?F:Math.max.apply(Math,S),[c,((0,h.get)(b,l)-A)/(F-A),w]}:function(){return[c,1,w]}),color:f||s&&r.getTheme().sequenceColors.join("-"),style:d}}})),e}function rF(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return Et(he((r={},r[a]=i,r[o]=n,r)))(e)}function iF(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(o,!1):r.axis(o,n),e}function nF(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField,a=t.sizeField,o=t.sizeLegend,s=i!==!1;return n&&r.legend(n,s?i:!1),a&&r.legend(a,o===void 0?i:o),!s&&!o&&r.legend(!1),e}function aF(e){var r=e.chart,t=e.options,i=t.label,n=t.colorField,a=t.type,o=Me(r,a==="density"?"heatmap":"polygon");if(!i)o.label(!1);else if(n){var s=i.callback,l=(0,g.__rest)(i,["callback"]);o.label({fields:[n],callback:s,cfg:be(l)})}return e}function oF(e){var r,t,i=e.chart,n=e.options,a=n.coordinate,o=n.reflect,s=O({actions:[]},a!=null?a:{type:"rect"});return o&&((t=(r=s.actions)===null||r===void 0?void 0:r.push)===null||t===void 0||t.call(r,["reflect",o])),i.coordinate(s),e}function sF(e){return Et(Xt,Ve("heatmapStyle"),rF,oF,eF,iF,nF,me,aF,le(),oe,Qt,Lr)(e)}var lF=O({},kt.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"}}}}});Zt("polygon","circle",{draw:function(e,r){var t,i,n=e.x,a=e.y,o=this.parsePoints(e.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,c=Number(e.shape[1]),f=Number(e.shape[2]),v=Math.sqrt(f),d=u*v*Math.sqrt(c),p=((t=e.style)===null||t===void 0?void 0:t.fill)||e.color||((i=e.defaultStyle)===null||i===void 0?void 0:i.fill),y=r.addShape("circle",{attrs:(0,g.__assign)((0,g.__assign)((0,g.__assign)({x:n,y:a,r:d},e.defaultStyle),e.style),{fill:p})});return y}}),Zt("polygon","square",{draw:function(e,r){var t,i,n=e.x,a=e.y,o=this.parsePoints(e.points),s=Math.abs(o[2].x-o[1].x),l=Math.abs(o[1].y-o[0].y),u=Math.min(s,l),c=Number(e.shape[1]),f=Number(e.shape[2]),v=Math.sqrt(f),d=u*v*Math.sqrt(c),p=((t=e.style)===null||t===void 0?void 0:t.fill)||e.color||((i=e.defaultStyle)===null||i===void 0?void 0:i.fill),y=r.addShape("rect",{attrs:(0,g.__assign)((0,g.__assign)((0,g.__assign)({x:n-d/2,y:a-d/2,width:d,height:d},e.defaultStyle),e.style),{fill:p})});return y}});var gI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="heatmap",t}return r.getDefaultOptions=function(){return lF},r.prototype.getSchemaAdaptor=function(){return sF},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(kt),uF="liquid";function ov(e){return[{percent:e,type:uF}]}function cF(e){var r=e.chart,t=e.options,i=t.percent,n=t.liquidStyle,a=t.radius,o=t.outline,s=t.wave,l=t.shape,u=t.shapeStyle,c=t.animation;r.scale({percent:{min:0,max:1}}),r.data(ov(i));var f=t.color||r.getTheme().defaultColor,v=O({},e,{options:{xField:"type",yField:"percent",widthRatio:a,interval:{color:f,style:n,shape:"liquid-fill-gauge"}}}),d=Fe(v).ext,p=d.geometry,y=r.getTheme().background,m={percent:i,radius:a,outline:o,wave:s,shape:l,shapeStyle:u,background:y,animation:c};return p.customInfo(m),r.legend(!1),r.axis(!1),r.tooltip(!1),e}function sv(e,r){var t=e.chart,i=e.options,n=i.statistic,a=i.percent,o=i.meta;t.getController("annotation").clear(!0);var s=(0,h.get)(o,["percent","formatter"])||function(u){return"".concat((u*100).toFixed(2),"%")},l=n.content;return l&&(l=O({},l,{content:(0,h.isNil)(l.content)?s(a):l.content})),da(t,{statistic:(0,g.__assign)((0,g.__assign)({},n),{content:l}),plotType:"liquid"},{percent:a}),r&&t.render(!0),e}function hF(e){return Et(Xt,Ve("liquidStyle"),cF,sv,he({}),Qt,oe)(e)}var fF={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"},lv=5e3;function uv(e,r,t){return e+(r-e)*t}function vF(e){var r=(0,g.__assign)({opacity:1},e.style);return e.color&&!r.fill&&(r.fill=e.color),r}function dF(e){var r={fill:"#fff",fillOpacity:0,lineWidth:4},t=(0,h.mix)({},r,e.style);return e.color&&!t.stroke&&(t.stroke=e.color),(0,h.isNumber)(e.opacity)&&(t.opacity=t.strokeOpacity=e.opacity),t}function gF(e,r,t,i){return r===0?[[e+1/2*t/Math.PI/2,i/2],[e+1/2*t/Math.PI,i],[e+t/4,i]]:r===1?[[e+1/2*t/Math.PI/2*(Math.PI-2),i],[e+1/2*t/Math.PI/2*(Math.PI-1),i/2],[e+t/4,0]]:r===2?[[e+1/2*t/Math.PI/2,-i/2],[e+1/2*t/Math.PI,-i],[e+t/4,-i]]:[[e+1/2*t/Math.PI/2*(Math.PI-2),-i],[e+1/2*t/Math.PI/2*(Math.PI-1),-i/2],[e+t/4,0]]}function pF(e,r,t,i,n,a,o){for(var s=Math.ceil(2*e/t*4)*4,l=[],u=i;u<-Math.PI*2;)u+=Math.PI*2;for(;u>0;)u-=Math.PI*2;u=u/Math.PI/2*t;var c=a-e+u-e*2;l.push(["M",c,r]);for(var f=0,v=0;v<s;++v){var d=v%4,p=gF(v*t/4,d,t,n);l.push(["C",p[0][0]+c,-p[0][1]+r,p[1][0]+c,-p[1][1]+r,p[2][0]+c,-p[2][1]+r]),v===s-1&&(f=p[2][0])}return l.push(["L",f+c,o+e]),l.push(["L",c,o+e]),l.push(["Z"]),l}function yF(e,r,t,i,n,a,o,s,l,u){for(var c=n.fill,f=n.opacity,v=o.getBBox(),d=v.maxX-v.minX,p=v.maxY-v.minY,y=0;y<i;y++){var m=i<=1?1:y/(i-1),x=a.addShape("path",{name:"waterwave-path",attrs:{path:pF(s,v.minY+p*t,l,0,d/32,e,r),fill:c,opacity:uv(.2,.9,m)*f}});try{if(u===!1)return;var _=As([["t",l,0]]);x.stopAnimate(),x.animate({matrix:_},{duration:uv(.5*lv,lv,m),repeat:!0})}catch(w){console.warn("off-screen group animate error!")}}}function mF(e,r,t,i){var n=t*2/3,a=Math.max(n,i),o=n/2,s=e,l=o+r-a/2,u=Math.asin(o/((a-o)*.85)),c=Math.sin(u)*o,f=Math.cos(u)*o,v=s-f,d=l+c,p=e,y=l+o/Math.sin(u);return`
  36. M `.concat(v," ").concat(d,`
  37. A `).concat(o," ").concat(o," 0 1 1 ").concat(v+f*2," ").concat(d,`
  38. Q `).concat(p," ").concat(y," ").concat(e," ").concat(r+a/2,`
  39. Q `).concat(p," ").concat(y," ").concat(v," ").concat(d,`
  40. Z
  41. `)}function xF(e,r,t,i){var n=t/2,a=i/2;return`
  42. M `.concat(e," ").concat(r-a,`
  43. a `).concat(n," ").concat(a," 0 1 0 0 ").concat(a*2,`
  44. a `).concat(n," ").concat(a," 0 1 0 0 ").concat(-a*2,`
  45. Z
  46. `)}function _F(e,r,t,i){var n=i/2,a=t/2;return`
  47. M `.concat(e," ").concat(r-n,`
  48. L `).concat(e+a," ").concat(r,`
  49. L `).concat(e," ").concat(r+n,`
  50. L `).concat(e-a," ").concat(r,`
  51. Z
  52. `)}function wF(e,r,t,i){var n=i/2,a=t/2;return`
  53. M `.concat(e," ").concat(r-n,`
  54. L `).concat(e+a," ").concat(r+n,`
  55. L `).concat(e-a," ").concat(r+n,`
  56. Z
  57. `)}function bF(e,r,t,i){var n=.618,a=i/2,o=t/2*n;return`
  58. M `.concat(e-o," ").concat(r-a,`
  59. L `).concat(e+o," ").concat(r-a,`
  60. L `).concat(e+o," ").concat(r+a,`
  61. L `).concat(e-o," ").concat(r+a,`
  62. Z
  63. `)}var cv={pin:mF,circle:xF,diamond:_F,triangle:wF,rect:bF};Zt("interval","liquid-fill-gauge",{draw:function(e,r){var t=.5,i=.5,n=e.customInfo,a=n,o=a.percent,s=a.radius,l=a.shape,u=a.shapeStyle,c=a.background,f=a.animation,v=n.outline,d=n.wave,p=v.border,y=v.distance,m=d.count,x=d.length,_=(0,h.reduce)(e.points,function(yt,Bt){return Math.min(yt,Bt.x)},Infinity),w=this.parsePoint({x:t,y:i}),b=this.parsePoint({x:_,y:i}),S=w.x-b.x,C=Math.min(S,b.y*s),A=vF(e),F=dF((0,h.mix)({},e,v)),P=C-p/2,I=typeof l=="function"?l:cv[l]||cv.circle,V=I(w.x,w.y,P*2,P*2);if(u&&r.addShape("path",{name:"shape",attrs:(0,g.__assign)({path:V},u)}),o>0){var Z=r.addGroup({name:"waves"}),vt=Z.setClip({type:"path",attrs:{path:V}});yF(w.x,w.y,1-e.points[1].y,m,A,Z,vt,C*2,x,f)}return r.addShape("path",{name:"distance",attrs:{path:V,fill:"transparent",lineWidth:p+y*2,stroke:c==="transparent"?"#fff":c}}),r.addShape("path",{name:"wrap",attrs:(0,h.mix)(F,{path:V,fill:"transparent",lineWidth:p})}),r}});var pI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="liquid",t}return r.getDefaultOptions=function(){return fF},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.changeData=function(t){this.chart.emit(L.BEFORE_CHANGE_DATA,ue.fromData(this.chart,L.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(ov(t)),sv({chart:this.chart,options:this.options},!0),this.chart.emit(L.AFTER_CHANGE_DATA,ue.fromData(this.chart,L.AFTER_CHANGE_DATA,null))},r.prototype.getSchemaAdaptor=function(){return hF},r}(kt);function SF(e){var r=e.chart,t=e.options,i=t.data,n=t.lineStyle,a=t.color,o=t.point,s=t.area;r.data(i);var l=O({},e,{options:{line:{style:n,color:a},point:o&&(0,g.__assign)({color:a},o),area:s&&(0,g.__assign)({color:a},s),label:void 0}}),u=O({},l,{options:{tooltip:!1}}),c=(o==null?void 0:o.state)||t.state,f=O({},l,{options:{tooltip:!1,state:c}});return wi(l),Ge(f),xa(u),e}function CF(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return Et(he((r={},r[a]=i,r[o]=n,r)))(e)}function AF(e){var r=e.chart,t=e.options,i=t.radius,n=t.startAngle,a=t.endAngle;return r.coordinate("polar",{radius:i,startAngle:n,endAngle:a}),e}function MF(e){var r=e.chart,t=e.options,i=t.xField,n=t.xAxis,a=t.yField,o=t.yAxis;return r.axis(i,n),r.axis(a,o),e}function FF(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Me(r,"line");if(!i)a.label(!1);else{var o=i.callback,s=(0,g.__rest)(i,["callback"]);a.label({fields:[n],callback:o,cfg:be(s)})}return e}function EF(e){return Et(SF,CF,Xt,AF,MF,Ur,me,FF,oe,Qt,le())(e)}var TF=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"name",{get:function(){return"radar-tooltip"},enumerable:!1,configurable:!0}),r.prototype.getTooltipItems=function(t){var i=this.getTooltipCfg(),n=i.shared,a=i.title,o=e.prototype.getTooltipItems.call(this,t);if(o.length>0){var s=this.view.geometries[0],l=s.dataArray,u=o[0].name,c=[];return l.forEach(function(f){f.forEach(function(v){var d=ke.getTooltipItems(v,s),p=d[0];if(!n&&p&&p.name===u){var y=(0,h.isNil)(a)?u:a;c.push((0,g.__assign)((0,g.__assign)({},p),{name:p.title,title:y}))}else if(n&&p){var y=(0,h.isNil)(a)?p.name||u:a;c.push((0,g.__assign)((0,g.__assign)({},p),{name:p.title,title:y}))}})}),c}return[]},r}(Eu);Vr("radar-tooltip",TF);var LF=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.init=function(){var t=this.context.view;t.removeInteraction("tooltip")},r.prototype.show=function(){var t=this.context.event,i=this.getTooltipController();i.showTooltip({x:t.x,y:t.y})},r.prototype.hide=function(){var t=this.getTooltipController();t.hideTooltip()},r.prototype.getTooltipController=function(){var t=this.context.view;return t.getController("radar-tooltip")},r}(ne);xt("radar-tooltip",LF),Ot("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]});var yI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="radar",t}return r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return O({},e.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}}})},r.prototype.getSchemaAdaptor=function(){return EF},r}(kt);function IF(e,r,t){var i=t.map(function(o){return o[r]}).filter(function(o){return o!==void 0}),n=i.length>0?Math.max.apply(Math,i):0,a=Math.abs(e)%360;return a?n*360/a:n}function OF(e,r,t){var i=[];return e.forEach(function(n){var a=i.find(function(o){return o[r]===n[r]});a?a[t]+=n[t]||null:i.push((0,g.__assign)({},n))}),i}function PF(e){var r=e.chart,t=e.options,i=t.barStyle,n=t.color,a=t.tooltip,o=t.colorField,s=t.type,l=t.xField,u=t.yField,c=t.data,f=t.shape,v=xi(c,u);r.data(v);var d=O({},e,{options:{tooltip:a,seriesField:o,interval:{style:i,color:n,shape:f||(s==="line"?"line":"intervel")},minColumnWidth:t.minBarWidth,maxColumnWidth:t.maxBarWidth,columnBackground:t.barBackground}});return Fe(d),s==="line"&&Ge({chart:r,options:{xField:l,yField:u,seriesField:o,point:{shape:"circle",color:n}}}),e}function hv(e){var r,t=e.options,i=t.yField,n=t.xField,a=t.data,o=t.isStack,s=t.isGroup,l=t.colorField,u=t.maxAngle,c=o&&!s&&l?OF(a,n,i):a,f=xi(c,i);return Et(he((r={},r[i]={min:0,max:IF(u,i,f)},r)))(e)}function kF(e){var r=e.chart,t=e.options,i=t.radius,n=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"polar",cfg:{radius:i,innerRadius:n,startAngle:a,endAngle:o}}).transpose(),e}function DF(e){var r=e.chart,t=e.options,i=t.xField,n=t.xAxis;return r.axis(i,n),e}function BF(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Me(r,"interval");if(!i)a.label(!1);else{var o=i.callback,s=(0,g.__rest)(i,["callback"]);a.label({fields:[n],callback:o,cfg:(0,g.__assign)((0,g.__assign)({},be(s)),{type:"polar"})})}return e}function RF(e){return Et(Ve("barStyle"),PF,hv,DF,kF,oe,Qt,Xt,me,Ur,le(),BF)(e)}var NF=O({},kt.getDefaultOptions(),{interactions:[{type:"element-active"}],legend:!1,tooltip:{showMarkers:!1},xAxis:{grid:null,tickLine:null,line:null},maxAngle:240}),mI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="radial-bar",t}return r.getDefaultOptions=function(){return NF},r.prototype.changeData=function(t){this.updateOption({data:t}),hv({chart:this.chart,options:this.options}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return RF},r}(kt);function zF(e){var r=e.chart,t=e.options,i=t.data,n=t.sectorStyle,a=t.shape,o=t.color;return r.data(i),Et(Fe)(O({},e,{options:{marginRatio:1,interval:{style:n,color:o,shape:a}}})),e}function VF(e){var r=e.chart,t=e.options,i=t.label,n=t.xField,a=Me(r,"interval");if(i===!1)a.label(!1);else if((0,h.isObject)(i)){var o=i.callback,s=i.fields,l=(0,g.__rest)(i,["callback","fields"]),u=l.offset,c=l.layout;(u===void 0||u>=0)&&(c=c?(0,h.isArray)(c)?c:[c]:[],l.layout=(0,h.filter)(c,function(f){return f.type!=="limit-in-shape"}),l.layout.length||delete l.layout),a.label({fields:s||[n],callback:o,cfg:be(l)})}else fr(qe.WARN,i===null,"the label option must be an Object."),a.label({fields:[n]});return e}function GF(e){var r=e.chart,t=e.options,i=t.legend,n=t.seriesField;return i===!1?r.legend(!1):n&&r.legend(n,i),e}function WF(e){var r=e.chart,t=e.options,i=t.radius,n=t.innerRadius,a=t.startAngle,o=t.endAngle;return r.coordinate({type:"polar",cfg:{radius:i,innerRadius:n,startAngle:a,endAngle:o}}),e}function HF(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return Et(he((r={},r[a]=i,r[o]=n,r)))(e)}function YF(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i?r.axis(a,i):r.axis(a,!1),n?r.axis(o,n):r.axis(o,!1),e}function XF(e){Et(Ve("sectorStyle"),zF,HF,VF,WF,YF,GF,me,oe,Qt,Xt,le(),Lr)(e)}var UF=O({},kt.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"}]}),xI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="rose",t}return r.getDefaultOptions=function(){return UF},r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(t)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return XF},r}(kt),fv="x",vv="y",dv="name",Oa="nodes",Pa="edges";function jF(e,r,t){var i=[];return e.forEach(function(n){var a=n[r],o=n[t];i.includes(a)||i.push(a),i.includes(o)||i.push(o)}),i}function ZF(e,r,t,i){var n={};return r.forEach(function(a){n[a]={},r.forEach(function(o){n[a][o]=0})}),e.forEach(function(a){n[a[t]][a[i]]=1}),n}function qF(e,r,t){if(!(0,h.isArray)(e))return[];var i=[],n=jF(e,r,t),a=ZF(e,n,r,t),o={};n.forEach(function(l){o[l]=0});function s(l){o[l]=1,n.forEach(function(u){if(a[l][u]!=0)if(o[u]==1)i.push("".concat(l,"_").concat(u));else{if(o[u]==-1)return;s(u)}}),o[l]=-1}return n.forEach(function(l){o[l]!=-1&&s(l)}),i.length!==0&&console.warn("sankey data contains circle, ".concat(i.length," records removed."),i),e.filter(function(l){return i.findIndex(function(u){return u==="".concat(l[r],"_").concat(l[t])})<0})}function KF(e){return e.target.depth}function $F(e){return e.depth}function QF(e,r){return r-1-e.height}function Rs(e,r){return e.sourceLinks.length?e.depth:r-1}function JF(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?(0,h.minBy)(e.sourceLinks,KF)-1:0}function ka(e){return function(){return e}}function Ns(e,r){for(var t=0,i=0;i<e.length;i++)t+=r(e[i]);return t}function zs(e,r){for(var t=-Infinity,i=0;i<e.length;i++)t=Math.max(r(e[i]),t);return t}function tE(e,r){for(var t=Infinity,i=0;i<e.length;i++)t=Math.min(r(e[i]),t);return t}function gv(e,r){return Da(e.source,r.source)||e.index-r.index}function pv(e,r){return Da(e.target,r.target)||e.index-r.index}function Da(e,r){return e.y0-r.y0}function Vs(e){return e.value}function eE(e){return e.index}function rE(e){return e.nodes}function iE(e){return e.links}function yv(e,r){var t=e.get(r);if(!t)throw new Error("missing: "+r);return t}function mv(e){for(var r=e.nodes,t=0,i=r;t<i.length;t++){for(var n=i[t],a=n.y0,o=a,s=0,l=n.sourceLinks;s<l.length;s++){var u=l[s];u.y0=a+u.width/2,a+=u.width}for(var c=0,f=n.targetLinks;c<f.length;c++){var u=f[c];u.y1=o+u.width/2,o+=u.width}}}function nE(){var e=0,r=0,t=1,i=1,n=24,a=8,o,s=eE,l=Rs,u,c,f,v=rE,d=iE,p=6;function y(G){var at={nodes:v(G),links:d(G)};return m(at),x(at),_(at),w(at),C(at),mv(at),at}y.update=function(G){return mv(G),G},y.nodeId=function(G){return arguments.length?(s=typeof G=="function"?G:ka(G),y):s},y.nodeAlign=function(G){return arguments.length?(l=typeof G=="function"?G:ka(G),y):l},y.nodeDepth=function(G){return arguments.length?(u=(typeof G=="function",G),y):u},y.nodeSort=function(G){return arguments.length?(c=G,y):c},y.nodeWidth=function(G){return arguments.length?(n=+G,y):n},y.nodePadding=function(G){return arguments.length?(a=o=+G,y):a},y.nodes=function(G){return arguments.length?(v=typeof G=="function"?G:ka(G),y):v},y.links=function(G){return arguments.length?(d=typeof G=="function"?G:ka(G),y):d},y.linkSort=function(G){return arguments.length?(f=G,y):f},y.size=function(G){return arguments.length?(e=r=0,t=+G[0],i=+G[1],y):[t-e,i-r]},y.extent=function(G){return arguments.length?(e=+G[0][0],t=+G[1][0],r=+G[0][1],i=+G[1][1],y):[[e,r],[t,i]]},y.iterations=function(G){return arguments.length?(p=+G,y):p};function m(G){var at=G.nodes,mt=G.links;at.forEach(function(Ht,Jt){Ht.index=Jt,Ht.sourceLinks=[],Ht.targetLinks=[]});var ut=new Map(at.map(function(Ht){return[s(Ht),Ht]}));if(mt.forEach(function(Ht,Jt){Ht.index=Jt;var pe=Ht.source,ye=Ht.target;typeof pe!="object"&&(pe=Ht.source=yv(ut,pe)),typeof ye!="object"&&(ye=Ht.target=yv(ut,ye)),pe.sourceLinks.push(Ht),ye.targetLinks.push(Ht)}),f!=null)for(var pt=0,At=at;pt<At.length;pt++){var Gt=At[pt],Wt=Gt.sourceLinks,Dt=Gt.targetLinks;Wt.sort(f),Dt.sort(f)}}function x(G){for(var at=G.nodes,mt=0,ut=at;mt<ut.length;mt++){var pt=ut[mt];pt.value=pt.fixedValue===void 0?Math.max(Ns(pt.sourceLinks,Vs),Ns(pt.targetLinks,Vs)):pt.fixedValue}}function _(G){for(var at=G.nodes,mt=at.length,ut=new Set(at),pt=new Set,At=0;ut.size;){if(ut.forEach(function(Ht){Ht.depth=At;for(var Jt=0,pe=Ht.sourceLinks;Jt<pe.length;Jt++){var ye=pe[Jt].target;pt.add(ye)}}),++At>mt)throw new Error("circular link");ut=pt,pt=new Set}if(u)for(var Gt=Math.max(zs(at,function(Ht){return Ht.depth})+1,0),Wt=void 0,Dt=0;Dt<at.length;Dt++)Wt=at[Dt],Wt.depth=u.call(null,Wt,Gt)}function w(G){for(var at=G.nodes,mt=at.length,ut=new Set(at),pt=new Set,At=0;ut.size;){if(ut.forEach(function(Gt){Gt.height=At;for(var Wt=0,Dt=Gt.targetLinks;Wt<Dt.length;Wt++){var Ht=Dt[Wt].source;pt.add(Ht)}}),++At>mt)throw new Error("circular link");ut=pt,pt=new Set}}function b(G){for(var at=G.nodes,mt=Math.max(zs(at,function(ye){return ye.depth})+1,0),ut=(t-e-n)/(mt-1),pt=new Array(mt).fill(0).map(function(){return[]}),At=0,Gt=at;At<Gt.length;At++){var Wt=Gt[At],Dt=Math.max(0,Math.min(mt-1,Math.floor(l.call(null,Wt,mt))));Wt.layer=Dt,Wt.x0=e+Dt*ut,Wt.x1=Wt.x0+n,pt[Dt]?pt[Dt].push(Wt):pt[Dt]=[Wt]}if(c)for(var Ht=0,Jt=pt;Ht<Jt.length;Ht++){var pe=Jt[Ht];pe.sort(c)}return pt}function S(G){for(var at=tE(G,function(ar){return(i-r-(ar.length-1)*o)/Ns(ar,Vs)}),mt=0,ut=G;mt<ut.length;mt++){for(var pt=ut[mt],At=r,Gt=0,Wt=pt;Gt<Wt.length;Gt++){var Dt=Wt[Gt];Dt.y0=At,Dt.y1=At+Dt.value*at,At=Dt.y1+o;for(var Ht=0,Jt=Dt.sourceLinks;Ht<Jt.length;Ht++){var pe=Jt[Ht];pe.width=pe.value*at}}At=(i-At+o)/(pt.length+1);for(var ye=0;ye<pt.length;++ye){var Dt=pt[ye];Dt.y0+=At*(ye+1),Dt.y1+=At*(ye+1)}vt(pt)}}function C(G){var at=b(G);o=Math.min(a,(i-r)/(zs(at,function(At){return At.length})-1)),S(at);for(var mt=0;mt<p;++mt){var ut=Math.pow(.99,mt),pt=Math.max(1-ut,(mt+1)/p);F(at,ut,pt),A(at,ut,pt)}}function A(G,at,mt){for(var ut=1,pt=G.length;ut<pt;++ut){for(var At=G[ut],Gt=0,Wt=At;Gt<Wt.length;Gt++){for(var Dt=Wt[Gt],Ht=0,Jt=0,pe=0,ye=Dt.targetLinks;pe<ye.length;pe++){var ar=ye[pe],ri=ar.source,mr=ar.value,Li=mr*(Dt.layer-ri.layer);Ht+=yt(ri,Dt)*Li,Jt+=Li}if(Jt>0){var Ii=(Ht/Jt-Dt.y0)*at;Dt.y0+=Ii,Dt.y1+=Ii,Z(Dt)}}c===void 0&&At.sort(Da),At.length&&P(At,mt)}}function F(G,at,mt){for(var ut=G.length,pt=ut-2;pt>=0;--pt){for(var At=G[pt],Gt=0,Wt=At;Gt<Wt.length;Gt++){for(var Dt=Wt[Gt],Ht=0,Jt=0,pe=0,ye=Dt.sourceLinks;pe<ye.length;pe++){var ar=ye[pe],ri=ar.target,mr=ar.value,Li=mr*(ri.layer-Dt.layer);Ht+=Bt(Dt,ri)*Li,Jt+=Li}if(Jt>0){var Ii=(Ht/Jt-Dt.y0)*at;Dt.y0+=Ii,Dt.y1+=Ii,Z(Dt)}}c===void 0&&At.sort(Da),At.length&&P(At,mt)}}function P(G,at){var mt=G.length>>1,ut=G[mt];V(G,ut.y0-o,mt-1,at),I(G,ut.y1+o,mt+1,at),V(G,i,G.length-1,at),I(G,r,0,at)}function I(G,at,mt,ut){for(;mt<G.length;++mt){var pt=G[mt],At=(at-pt.y0)*ut;At>1e-6&&(pt.y0+=At,pt.y1+=At),at=pt.y1+o}}function V(G,at,mt,ut){for(;mt>=0;--mt){var pt=G[mt],At=(pt.y1-at)*ut;At>1e-6&&(pt.y0-=At,pt.y1-=At),at=pt.y0-o}}function Z(G){var at=G.sourceLinks,mt=G.targetLinks;if(f===void 0){for(var ut=0,pt=mt;ut<pt.length;ut++){var At=pt[ut].source.sourceLinks;At.sort(pv)}for(var Gt=0,Wt=at;Gt<Wt.length;Gt++){var Dt=Wt[Gt].target.targetLinks;Dt.sort(gv)}}}function vt(G){if(f===void 0)for(var at=0,mt=G;at<mt.length;at++){var ut=mt[at],pt=ut.sourceLinks,At=ut.targetLinks;pt.sort(pv),At.sort(gv)}}function yt(G,at){for(var mt=G.y0-(G.sourceLinks.length-1)*o/2,ut=0,pt=G.sourceLinks;ut<pt.length;ut++){var At=pt[ut],Gt=At.target,Wt=At.width;if(Gt===at)break;mt+=Wt+o}for(var Dt=0,Ht=at.targetLinks;Dt<Ht.length;Dt++){var Jt=Ht[Dt],Gt=Jt.source,Wt=Jt.width;if(Gt===G)break;mt-=Wt}return mt}function Bt(G,at){for(var mt=at.y0-(at.targetLinks.length-1)*o/2,ut=0,pt=at.targetLinks;ut<pt.length;ut++){var At=pt[ut],Gt=At.source,Wt=At.width;if(Gt===G)break;mt+=Wt+o}for(var Dt=0,Ht=G.sourceLinks;Dt<Ht.length;Dt++){var Jt=Ht[Dt],Gt=Jt.target,Wt=Jt.width;if(Gt===at)break;mt-=Wt}return mt}return y}var aE={left:$F,right:QF,center:JF,justify:Rs},oE={nodeId:function(e){return e.index},nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodeSort:void 0};function sE(e){var r=(0,h.isString)(e)?aE[e]:(0,h.isFunction)(e)?e:null;return r||Rs}function lE(e){return(0,h.assign)({},oE,e)}function uE(e,r){var t=lE(e),i=t.nodeId,n=t.nodeSort,a=t.nodeAlign,o=t.nodeWidth,s=t.nodePadding,l=t.nodeDepth,u=nE().nodeSort(n).nodeWidth(o).nodePadding(s).nodeDepth(l).nodeAlign(sE(a)).extent([[0,0],[1,1]]).nodeId(i),c=u(r),f=c.nodes.map(function(d){var p=d.x0,y=d.x1,m=d.y0,x=d.y1;return d.x=[p,y,y,p],d.y=[m,m,x,x],d}).filter(function(d){return d.name!==null}),v=c.links.map(function(d){var p=d.source,y=d.target,m=p.x1,x=y.x0;d.x=[m,m,x,x];var _=d.width/2;return d.y=[d.y0+_,d.y0-_,d.y1+_,d.y1-_],d}).filter(function(d){var p=d.source,y=d.target;return p.name!==null&&y.name!==null});return{nodes:f,links:v}}function cE(e){return e==="node-link"}function hE(e,r,t){return Xr(e)?e/t:r}function fE(e,r,t){return Xr(e)?e/t:r}function xv(e,r,t){var i=e.dataType,n=e.data,a=e.sourceField,o=e.targetField,s=e.weightField,l=e.nodeAlign,u=e.nodeSort,c=e.nodePadding,f=e.nodePaddingRatio,v=e.nodeWidth,d=e.nodeWidthRatio,p=e.nodeDepth,y=e.rawFields,m=y===void 0?[]:y,x;cE(i)?x=n:x=sh(qF(n,a,o),a,o,s,m);var _=uE({nodeAlign:l,nodePadding:fE(c,f,t),nodeWidth:hE(v,d,r),nodeSort:u,nodeDepth:p},x),w=_.nodes,b=_.links;return{nodes:w.map(function(S){return(0,g.__assign)((0,g.__assign)({},$t(S,(0,g.__spreadArray)(["x","y","name"],m,!0))),{isNode:!0})}),edges:b.map(function(S){return(0,g.__assign)((0,g.__assign)({source:S.source.name,target:S.target.name,name:S.source.name||S.target.name},$t(S,(0,g.__spreadArray)(["x","y","value"],m,!0))),{isNode:!1})})}}function vE(e){var r=e.options,t=r.rawFields,i=t===void 0?[]:t;return O({},{options:{tooltip:{fields:(0,h.uniq)((0,g.__spreadArray)(["name","source","target","value","isNode"],i,!0))},label:{fields:(0,h.uniq)((0,g.__spreadArray)(["x","name"],i,!0))}}},e)}function dE(e){var r=e.chart,t=e.options,i=t.color,n=t.nodeStyle,a=t.edgeStyle,o=t.label,s=t.tooltip,l=t.nodeState,u=t.edgeState,c=t.rawFields,f=c===void 0?[]:c;r.legend(!1),r.tooltip(s),r.axis(!1),r.coordinate().reflect("y");var v=xv(t,r.width,r.height),d=v.nodes,p=v.edges,y=r.createView({id:Pa});y.data(p),wh({chart:y,options:{xField:fv,yField:vv,seriesField:dv,rawFields:(0,g.__spreadArray)(["source","target"],f,!0),edge:{color:i,style:a,shape:"arc"},tooltip:s,state:u}});var m=r.createView({id:Oa});return m.data(d),_a({chart:m,options:{xField:fv,yField:vv,seriesField:dv,polygon:{color:i,style:n},label:o,tooltip:s,state:l}}),r.interaction("element-active"),r.scale({x:{sync:!0,nice:!0,min:0,max:1,minLimit:0,maxLimit:1},y:{sync:!0,nice:!0,min:0,max:1,minLimit:0,maxLimit:1},name:{sync:"color",type:"cat"}}),e}function gE(e){var r=e.chart,t=e.options,i=t.animation,n=(0,g.__spreadArray)((0,g.__spreadArray)([],r.views[0].geometries,!0),r.views[1].geometries,!0);return ln(r,i,n),e}function pE(e){var r=e.chart,t=e.options,i=t.nodeDraggable,n="sankey-node-draggable";return i?r.interaction(n):r.removeInteraction(n),e}function yE(e){var r=e.chart,t=e.options,i=t.interactions,n=i===void 0?[]:i,a=[].concat(n,t.nodeInteractions||[]),o=[].concat(n,t.edgeInteractions||[]),s=Nt(r,Oa),l=Nt(r,Pa);return a.forEach(function(u){(u==null?void 0:u.enable)===!1?s.removeInteraction(u.type):s.interaction(u.type,u.cfg||{})}),o.forEach(function(u){(u==null?void 0:u.enable)===!1?l.removeInteraction(u.type):l.interaction(u.type,u.cfg||{})}),e}function mE(e){return Et(vE,dE,yE,pE,gE,Xt)(e)}var xE=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.isDragging=!1,t}return r.prototype.isNodeElement=function(){var t=(0,h.get)(this.context,"event.target");if(t){var i=t.get("element");return i&&i.getModel().data.isNode}return!1},r.prototype.getNodeView=function(){return Nt(this.context.view,Oa)},r.prototype.getEdgeView=function(){return Nt(this.context.view,Pa)},r.prototype.getCurrentDatumIdx=function(t){return this.getNodeView().geometries[0].elements.indexOf(t)},r.prototype.start=function(){if(this.isNodeElement()){this.prevPoint={x:(0,h.get)(this.context,"event.x"),y:(0,h.get)(this.context,"event.y")};var t=this.context.event.target.get("element"),i=this.getCurrentDatumIdx(t);if(i===-1)return;this.currentElementIdx=i,this.context.isDragging=!0,this.isDragging=!0,this.prevNodeAnimateCfg=this.getNodeView().getOptions().animate,this.prevEdgeAnimateCfg=this.getEdgeView().getOptions().animate,this.getNodeView().animate(!1),this.getEdgeView().animate(!1)}},r.prototype.translate=function(){if(this.isDragging){var t=this.context.view,i={x:(0,h.get)(this.context,"event.x"),y:(0,h.get)(this.context,"event.y")},n=i.x-this.prevPoint.x,a=i.y-this.prevPoint.y,o=this.getNodeView(),s=o.geometries[0].elements[this.currentElementIdx];if(s&&s.getModel()){var l=s.getModel().data,u=o.getOptions().data,c=o.getCoordinate(),f={x:n/c.getWidth(),y:a/c.getHeight()},v=(0,g.__assign)((0,g.__assign)({},l),{x:l.x.map(function(x){return x+=f.x}),y:l.y.map(function(x){return x+=f.y})}),d=(0,g.__spreadArray)([],u,!0);d[this.currentElementIdx]=v,o.data(d);var p=l.name,y=this.getEdgeView(),m=y.getOptions().data;m.forEach(function(x){x.source===p&&(x.x[0]+=f.x,x.x[1]+=f.x,x.y[0]+=f.y,x.y[1]+=f.y),x.target===p&&(x.x[2]+=f.x,x.x[3]+=f.x,x.y[2]+=f.y,x.y[3]+=f.y)}),y.data(m),this.prevPoint=i,t.render(!0)}}},r.prototype.end=function(){this.isDragging=!1,this.context.isDragging=!1,this.prevPoint=null,this.currentElementIdx=null,this.getNodeView().animate(this.prevNodeAnimateCfg),this.getEdgeView().animate(this.prevEdgeAnimateCfg)},r}(ne);xt("sankey-node-drag",xE),Ot("sankey-node-draggable",{showEnable:[{trigger:"polygon:mouseenter",action:"cursor:pointer"},{trigger:"polygon:mouseleave",action:"cursor:default"}],start:[{trigger:"polygon:mousedown",action:"sankey-node-drag:start"}],processing:[{trigger:"plot:mousemove",action:"sankey-node-drag:translate"},{isEnable:function(e){return e.isDragging},trigger:"plot:mousemove",action:"cursor:move"}],end:[{trigger:"plot:mouseup",action:"sankey-node-drag:end"}]});var _I=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="sankey",t}return r.getDefaultOptions=function(){return{appendPadding:8,syncViewPadding:!0,nodeStyle:{opacity:1,fillOpacity:1,lineWidth:1},edgeStyle:{opacity:.3,lineWidth:0},edgeState:{active:{style:{opacity:.8,lineWidth:0}}},label:{formatter:function(t){var i=t.name;return i},callback:function(t){var i=t[1]===1;return{style:{fill:"#545454",textAlign:i?"end":"start"},offsetX:i?-8:8}},layout:[{type:"hide-overlap"}]},tooltip:{showTitle:!1,showMarkers:!1,shared:!1,showContent:function(t){return!(0,h.get)(t,[0,"data","isNode"])},formatter:function(t){var i=t.source,n=t.target,a=t.value;return{name:i+" -> "+n,value:a}}},nodeWidthRatio:.008,nodePaddingRatio:.01,animation:{appear:{animation:"wave-in"},enter:{animation:"wave-in"}}}},r.prototype.changeData=function(t){this.updateOption({data:t});var i=xv(this.options,this.chart.width,this.chart.height),n=i.nodes,a=i.edges,o=Nt(this.chart,Oa),s=Nt(this.chart,Pa);o.changeData(n),s.changeData(a)},r.prototype.getSchemaAdaptor=function(){return mE},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(kt),Gs="ancestor-node",_v="value",mn="path",_E=[mn,Zf,Is,qf,"name","depth","height"],wE=O({},kt.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 wv(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function xn(e,r,t,i,n){for(var a=e.children,o,s=-1,l=a.length,u=e.value&&(i-r)/e.value;++s<l;)o=a[s],o.y0=t,o.y1=n,o.x0=r,o.x1=r+=o.value*u}function bv(){var e=1,r=1,t=0,i=!1;function n(o){var s=o.height+1;return o.x0=o.y0=t,o.x1=e,o.y1=r/s,o.eachBefore(a(r,s)),i&&o.eachBefore(wv),o}function a(o,s){return function(l){l.children&&xn(l,l.x0,o*(l.depth+1)/s,l.x1,o*(l.depth+2)/s);var u=l.x0,c=l.y0,f=l.x1-t,v=l.y1-t;f<u&&(u=f=(u+f)/2),v<c&&(c=v=(c+v)/2),l.x0=u,l.y0=c,l.x1=f,l.y1=v}}return n.round=function(o){return arguments.length?(i=!!o,n):i},n.size=function(o){return arguments.length?(e=+o[0],r=+o[1],n):[e,r]},n.padding=function(o){return arguments.length?(t=+o,n):t},n}var bE={field:"value",size:[1,1],round:!1,padding:0,sort:function(e,r){return r.value-e.value},as:["x","y"],ignoreParentValue:!0};function SE(e,r){r=(0,h.assign)({},bE,r);var t=r.as;if(!(0,h.isArray)(t)||t.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var i;try{i=Ps(r)}catch(l){console.warn(l)}var n=function(l){return bv().size(r.size).round(r.round).padding(r.padding)(Fi(l).sum(function(u){return(0,h.size)(u.children)?r.ignoreParentValue?0:u[i]-(0,h.reduce)(u.children,function(c,f){return c+f[i]},0):u[i]}).sort(r.sort))},a=n(e),o=t[0],s=t[1];return a.each(function(l){var u,c;l[o]=[l.x0,l.x1,l.x1,l.x0],l[s]=[l.y1,l.y1,l.y0,l.y0],l.name=l.name||((u=l.data)===null||u===void 0?void 0:u.name)||((c=l.data)===null||c===void 0?void 0:c.label),l.data.name=l.name,["x0","x1","y0","y1"].forEach(function(f){t.indexOf(f)===-1&&delete l[f]})}),ks(a)}function CE(e,r){return e.parent===r.parent?1:2}function AE(e){return e.reduce(ME,0)/e.length}function ME(e,r){return e+r.x}function FE(e){return 1+e.reduce(EE,0)}function EE(e,r){return Math.max(e,r.y)}function TE(e){for(var r;r=e.children;)e=r[0];return e}function LE(e){for(var r;r=e.children;)e=r[r.length-1];return e}function IE(){var e=CE,r=1,t=1,i=!1;function n(a){var o,s=0;a.eachAfter(function(v){var d=v.children;d?(v.x=AE(d),v.y=FE(d)):(v.x=o?s+=e(v,o):0,v.y=0,o=v)});var l=TE(a),u=LE(a),c=l.x-e(l,u)/2,f=u.x+e(u,l)/2;return a.eachAfter(i?function(v){v.x=(v.x-a.x)*r,v.y=(a.y-v.y)*t}:function(v){v.x=(v.x-c)/(f-c)*r,v.y=(1-(a.y?v.y/a.y:1))*t})}return n.separation=function(a){return arguments.length?(e=a,n):e},n.size=function(a){return arguments.length?(i=!1,r=+a[0],t=+a[1],n):i?null:[r,t]},n.nodeSize=function(a){return arguments.length?(i=!0,r=+a[0],t=+a[1],n):i?[r,t]:null},n}var OE={depth:-1},Sv={};function PE(e){return e.id}function kE(e){return e.parentId}function DE(){var e=PE,r=kE;function t(i){var n=Array.from(i),a=n.length,o,s,l,u,c,f,v,d=new Map;for(s=0;s<a;++s)o=n[s],c=n[s]=new Ei(o),(f=e(o,s,i))!=null&&(f+="")&&(v=c.id=f,d.set(v,d.has(v)?Sv:c)),(f=r(o,s,i))!=null&&(f+="")&&(c.parent=f);for(s=0;s<a;++s)if(c=n[s],f=c.parent){if(u=d.get(f),!u)throw new Error("missing: "+f);if(u===Sv)throw new Error("ambiguous: "+f);u.children?u.children.push(c):u.children=[c],c.parent=u}else{if(l)throw new Error("multiple roots");l=c}if(!l)throw new Error("no root");if(l.parent=OE,l.eachBefore(function(p){p.depth=p.parent.depth+1,--a}).eachBefore(jf),l.parent=null,a>0)throw new Error("cycle");return l}return t.id=function(i){return arguments.length?(e=Ia(i),t):e},t.parentId=function(i){return arguments.length?(r=Ia(i),t):r},t}function BE(e,r){return e.parent===r.parent?1:2}function Ws(e){var r=e.children;return r?r[0]:e.t}function Hs(e){var r=e.children;return r?r[r.length-1]:e.t}function RE(e,r,t){var i=t/(r.i-e.i);r.c-=i,r.s+=t,e.c+=i,r.z+=t,r.m+=t}function NE(e){for(var r=0,t=0,i=e.children,n=i.length,a;--n>=0;)a=i[n],a.z+=r,a.m+=r,r+=a.s+(t+=a.c)}function zE(e,r,t){return e.a.parent===r.parent?e.a:t}function Ba(e,r){this._=e,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=r}Ba.prototype=Object.create(Ei.prototype);function VE(e){for(var r=new Ba(e,0),t,i=[r],n,a,o,s;t=i.pop();)if(a=t._.children)for(t.children=new Array(s=a.length),o=s-1;o>=0;--o)i.push(n=t.children[o]=new Ba(a[o],o)),n.parent=t;return(r.parent=new Ba(null,0)).children=[r],r}function GE(){var e=BE,r=1,t=1,i=null;function n(u){var c=VE(u);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),i)u.eachBefore(l);else{var f=u,v=u,d=u;u.eachBefore(function(_){_.x<f.x&&(f=_),_.x>v.x&&(v=_),_.depth>d.depth&&(d=_)});var p=f===v?1:e(f,v)/2,y=p-f.x,m=r/(v.x+p+y),x=t/(d.depth||1);u.eachBefore(function(_){_.x=(_.x+y)*m,_.y=_.depth*x})}return u}function a(u){var c=u.children,f=u.parent.children,v=u.i?f[u.i-1]:null;if(c){NE(u);var d=(c[0].z+c[c.length-1].z)/2;v?(u.z=v.z+e(u._,v._),u.m=u.z-d):u.z=d}else v&&(u.z=v.z+e(u._,v._));u.parent.A=s(u,v,u.parent.A||f[0])}function o(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function s(u,c,f){if(c){for(var v=u,d=u,p=c,y=v.parent.children[0],m=v.m,x=d.m,_=p.m,w=y.m,b;p=Hs(p),v=Ws(v),p&&v;)y=Ws(y),d=Hs(d),d.a=u,b=p.z+_-v.z-m+e(p._,v._),b>0&&(RE(zE(p,u,f),u,b),m+=b,x+=b),_+=p.m,m+=v.m,w+=y.m,x+=d.m;p&&!Hs(d)&&(d.t=p,d.m+=_-x),v&&!Ws(y)&&(y.t=v,y.m+=m-w,f=u)}return f}function l(u){u.x*=r,u.y=u.depth*t}return n.separation=function(u){return arguments.length?(e=u,n):e},n.size=function(u){return arguments.length?(i=!1,r=+u[0],t=+u[1],n):i?null:[r,t]},n.nodeSize=function(u){return arguments.length?(i=!0,r=+u[0],t=+u[1],n):i?[r,t]:null},n}function Ra(e,r,t,i,n){for(var a=e.children,o,s=-1,l=a.length,u=e.value&&(n-t)/e.value;++s<l;)o=a[s],o.x0=r,o.x1=i,o.y0=t,o.y1=t+=o.value*u}var Cv=(1+Math.sqrt(5))/2;function Av(e,r,t,i,n,a){for(var o=[],s=r.children,l,u,c=0,f=0,v=s.length,d,p,y=r.value,m,x,_,w,b,S,C;c<v;){d=n-t,p=a-i;do m=s[f++].value;while(!m&&f<v);for(x=_=m,S=Math.max(p/d,d/p)/(y*e),C=m*m*S,b=Math.max(_/C,C/x);f<v;++f){if(m+=u=s[f].value,u<x&&(x=u),u>_&&(_=u),C=m*m*S,w=Math.max(_/C,C/x),w>b){m-=u;break}b=w}o.push(l={value:m,dice:d<p,children:s.slice(c,f)}),l.dice?xn(l,t,i,n,y?i+=p*m/y:a):Ra(l,t,i,y?t+=d*m/y:n,a),y-=m,c=f}return o}var Mv=function e(r){function t(i,n,a,o,s){Av(r,i,n,a,o,s)}return t.ratio=function(i){return e((i=+i)>1?i:1)},t}(Cv);function Fv(){var e=Mv,r=!1,t=1,i=1,n=[0],a=Jr,o=Jr,s=Jr,l=Jr,u=Jr;function c(v){return v.x0=v.y0=0,v.x1=t,v.y1=i,v.eachBefore(f),n=[0],r&&v.eachBefore(wv),v}function f(v){var d=n[v.depth],p=v.x0+d,y=v.y0+d,m=v.x1-d,x=v.y1-d;m<p&&(p=m=(p+m)/2),x<y&&(y=x=(y+x)/2),v.x0=p,v.y0=y,v.x1=m,v.y1=x,v.children&&(d=n[v.depth+1]=a(v)/2,p+=u(v)-d,y+=o(v)-d,m-=s(v)-d,x-=l(v)-d,m<p&&(p=m=(p+m)/2),x<y&&(y=x=(y+x)/2),e(v,p,y,m,x))}return c.round=function(v){return arguments.length?(r=!!v,c):r},c.size=function(v){return arguments.length?(t=+v[0],i=+v[1],c):[t,i]},c.tile=function(v){return arguments.length?(e=Ia(v),c):e},c.padding=function(v){return arguments.length?c.paddingInner(v).paddingOuter(v):c.paddingInner()},c.paddingInner=function(v){return arguments.length?(a=typeof v=="function"?v:Mi(+v),c):a},c.paddingOuter=function(v){return arguments.length?c.paddingTop(v).paddingRight(v).paddingBottom(v).paddingLeft(v):c.paddingTop()},c.paddingTop=function(v){return arguments.length?(o=typeof v=="function"?v:Mi(+v),c):o},c.paddingRight=function(v){return arguments.length?(s=typeof v=="function"?v:Mi(+v),c):s},c.paddingBottom=function(v){return arguments.length?(l=typeof v=="function"?v:Mi(+v),c):l},c.paddingLeft=function(v){return arguments.length?(u=typeof v=="function"?v:Mi(+v),c):u},c}function WE(e,r,t,i,n){var a=e.children,o,s=a.length,l,u=new Array(s+1);for(u[0]=l=o=0;o<s;++o)u[o+1]=l+=a[o].value;c(0,s,e.value,r,t,i,n);function c(f,v,d,p,y,m,x){if(f>=v-1){var _=a[f];_.x0=p,_.y0=y,_.x1=m,_.y1=x;return}for(var w=u[f],b=d/2+w,S=f+1,C=v-1;S<C;){var A=S+C>>>1;u[A]<b?S=A+1:C=A}b-u[S-1]<u[S]-b&&f+1<S&&--S;var F=u[S]-w,P=d-F;if(m-p>x-y){var I=d?(p*P+m*F)/d:m;c(f,S,F,p,y,I,x),c(S,v,P,I,y,m,x)}else{var V=d?(y*P+x*F)/d:x;c(f,S,F,p,y,m,V),c(S,v,P,p,V,m,x)}}}function HE(e,r,t,i,n){(e.depth&1?Ra:xn)(e,r,t,i,n)}var YE=function e(r){function t(i,n,a,o,s){if((l=i._squarify)&&l.ratio===r)for(var l,u,c,f,v=-1,d,p=l.length,y=i.value;++v<p;){for(u=l[v],c=u.children,f=u.value=0,d=c.length;f<d;++f)u.value+=c[f].value;u.dice?xn(u,n,a,o,y?a+=(s-a)*u.value/y:s):Ra(u,n,a,y?n+=(o-n)*u.value/y:o,s),y-=u.value}else i._squarify=l=Av(r,i,n,a,o,s),l.ratio=r}return t.ratio=function(i){return e((i=+i)>1?i:1)},t}(Cv),XE={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(e,r){return r.value-e.value},ratio:.5*(1+Math.sqrt(5))};function UE(e,r){return e==="treemapSquarify"?K[e].ratio(r):K[e]}function Ev(e,r){r=(0,h.assign)({},XE,r);var t=r.as;if(!(0,h.isArray)(t)||t.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');var i;try{i=Ps(r)}catch(u){console.warn(u)}var n=UE(r.tile,r.ratio),a=function(u){return Fv().tile(n).size(r.size).round(r.round).padding(r.padding).paddingInner(r.paddingInner).paddingOuter(r.paddingOuter).paddingTop(r.paddingTop).paddingRight(r.paddingRight).paddingBottom(r.paddingBottom).paddingLeft(r.paddingLeft)(Fi(u).sum(function(c){return r.ignoreParentValue&&c.children?0:c[i]}).sort(r.sort))},o=a(e),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(c){t.indexOf(c)===-1&&delete u[c]})}),ks(o)}function Tv(e){var r=e.data,t=e.colorField,i=e.rawFields,n=e.hierarchyConfig,a=n===void 0?{}:n,o=a.activeDepth,s={partition:SE,treemap:Ev},l=e.seriesField,u=e.type||"partition",c=s[u](r,(0,g.__assign)((0,g.__assign)({field:l||"value"},(0,h.omit)(a,["activeDepth"])),{type:"hierarchy.".concat(u),as:["x","y"]})),f=[];return c.forEach(function(v){var d,p,y,m,x,_;if(v.depth===0||o>0&&v.depth>o)return null;for(var w=v.data.name,b=(0,g.__assign)({},v);b.depth>1;)w="".concat((p=b.parent.data)===null||p===void 0?void 0:p.name," / ").concat(w),b=b.parent;var S=(0,g.__assign)((0,g.__assign)((0,g.__assign)({},$t(v.data,(0,g.__spreadArray)((0,g.__spreadArray)([],i||[],!0),[a.field],!1))),(d={},d[mn]=w,d[Gs]=b.data.name,d)),v);l&&(S[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&&(S[t]=v.data[t]||((_=(x=v.parent)===null||x===void 0?void 0:x.data)===null||_===void 0?void 0:_[t])),S.ext=a,S[pn]={hierarchyConfig:a,colorField:t,rawFields:i},f.push(S)}),f}function jE(e){var r=e.chart,t=e.options,i=t.color,n=t.colorField,a=n===void 0?Gs:n,o=t.sunburstStyle,s=t.rawFields,l=s===void 0?[]:s,u=t.shape,c=Tv(t);r.data(c);var f;return o&&(f=function(v){return O({},{fillOpacity:Math.pow(.85,v.depth)},(0,h.isFunction)(o)?o(v):o)}),_a(O({},e,{options:{xField:"x",yField:"y",seriesField:a,rawFields:(0,h.uniq)((0,g.__spreadArray)((0,g.__spreadArray)([],_E,!0),l,!0)),polygon:{color:i,style:f,shape:u}}})),e}function ZE(e){var r=e.chart;return r.axis(!1),e}function qE(e){var r=e.chart,t=e.options,i=t.label,n=Me(r,"polygon");if(!i)n.label(!1);else{var a=i.fields,o=a===void 0?["name"]:a,s=i.callback,l=(0,g.__rest)(i,["fields","callback"]);n.label({fields:o,callback:s,cfg:be(l)})}return e}function KE(e){var r=e.chart,t=e.options,i=t.innerRadius,n=t.radius,a=t.reflect,o=r.coordinate({type:"polar",cfg:{innerRadius:i,radius:n}});return a&&o.reflect(a),e}function $E(e){var r,t=e.options,i=t.hierarchyConfig,n=t.meta;return Et(he({},(r={},r[_v]=(0,h.get)(n,(0,h.get)(i,["field"],"value")),r)))(e)}function QE(e){var r=e.chart,t=e.options,i=t.tooltip;if(i===!1)r.tooltip(!1);else{var n=i;(0,h.get)(i,"fields")||(n=O({},{customItems:function(a){return a.map(function(o){var s=(0,h.get)(r.getOptions(),"scales"),l=(0,h.get)(s,[mn,"formatter"],function(c){return c}),u=(0,h.get)(s,[_v,"formatter"],function(c){return c});return(0,g.__assign)((0,g.__assign)({},o),{name:l(o.data[mn]),value:u(o.data.value)})})}},n)),r.tooltip(n)}return e}function JE(e){var r=e.drilldown,t=e.interactions,i=t===void 0?[]:t;return(r==null?void 0:r.enabled)?O({},e,{interactions:(0,g.__spreadArray)((0,g.__spreadArray)([],i,!0),[{type:"drill-down",cfg:{drillDownConfig:r,transformData:Tv}}],!1)}):e}function t1(e){var r=e.chart,t=e.options,i=t.drilldown;return oe({chart:r,options:JE(t)}),(i==null?void 0:i.enabled)&&(r.appendPadding=va(r.appendPadding,(0,h.get)(i,["breadCrumb","position"]))),e}function e1(e){return Et(Xt,Ve("sunburstStyle"),jE,ZE,$E,Ur,KE,QE,qE,t1,Qt,le())(e)}var wI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="sunburst",t}return r.getDefaultOptions=function(){return wE},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return e1},r.SUNBURST_ANCESTOR_FIELD=Gs,r.SUNBURST_PATH_FIELD=mn,r.NODE_ANCESTORS_FIELD=Is,r}(kt);function Lv(e,r){if(!!(0,h.isArray)(e))return e.find(function(t){return t.type===r})}function Iv(e,r){var t=Lv(e,r);return t&&t.enable!==!1}function Ys(e){var r=e.interactions,t=e.drilldown;return(0,h.get)(t,"enabled")||Iv(r,"treemap-drill-down")}function r1(e){var r=e.interactions["drill-down"];if(!!r){var t=r.context.actions.find(function(i){return i.name==="drill-down-action"});t.reset()}}function Xs(e){var r=e.data,t=e.colorField,i=e.enableDrillDown,n=e.hierarchyConfig,a=Ev(r,(0,g.__assign)((0,g.__assign)({},n),{type:"hierarchy.treemap",field:"value",as:["x","y"]})),o=[];return a.forEach(function(s){if(s.depth===0||i&&s.depth!==1||!i&&s.children)return null;var l=s.ancestors().map(function(v){return{data:v.data,height:v.height,value:v.value}}),u=i&&(0,h.isArray)(r.path)?l.concat(r.path.slice(1)):l,c=Object.assign({},s.data,(0,g.__assign)({x:s.x,y:s.y,depth:s.depth,value:s.value,path:u},s));if(!s.data[t]&&s.parent){var f=s.ancestors().find(function(v){return v.data[t]});c[t]=f==null?void 0:f.data[t]}else c[t]=s.data[t];c[pn]={hierarchyConfig:n,colorField:t,enableDrillDown:i},o.push(c)}),o}function i1(e){var r=e.options,t=r.colorField;return O({options:{rawFields:["value"],tooltip:{fields:["name","value",t,"path"],formatter:function(i){return{name:i.name,value:i.value}}}}},e)}function n1(e){var r=e.chart,t=e.options,i=t.color,n=t.colorField,a=t.rectStyle,o=t.hierarchyConfig,s=t.rawFields,l=Xs({data:t.data,colorField:t.colorField,enableDrillDown:Ys(t),hierarchyConfig:o});return r.data(l),_a(O({},e,{options:{xField:"x",yField:"y",seriesField:n,rawFields:s,polygon:{color:i,style:a}}})),r.coordinate().reflect("y"),e}function a1(e){var r=e.chart;return r.axis(!1),e}function o1(e){var r=e.drilldown,t=e.interactions,i=t===void 0?[]:t,n=Ys(e);return n?O({},e,{interactions:(0,g.__spreadArray)((0,g.__spreadArray)([],i,!0),[{type:"drill-down",cfg:{drillDownConfig:r,transformData:Xs}}],!1)}):e}function s1(e){var r=e.chart,t=e.options,i=t.interactions,n=t.drilldown;oe({chart:r,options:o1(t)});var a=Lv(i,"view-zoom");a&&(a.enable!==!1?r.getCanvas().on("mousewheel",function(s){s.preventDefault()}):r.getCanvas().off("mousewheel"));var o=Ys(t);return o&&(r.appendPadding=va(r.appendPadding,(0,h.get)(n,["breadCrumb","position"]))),e}function l1(e){return Et(i1,Xt,Ve("rectStyle"),n1,a1,Ur,me,s1,Qt,le())(e)}var u1={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"}}}},bI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="treemap",t}return r.getDefaultOptions=function(){return u1},r.prototype.changeData=function(t){var i=this.options,n=i.colorField,a=i.interactions,o=i.hierarchyConfig;this.updateOption({data:t});var s=Xs({data:t,colorField:n,enableDrillDown:Iv(a,"treemap-drill-down"),hierarchyConfig:o});this.chart.changeData(s),r1(this.chart)},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return l1},r}(kt),yr="id",Us="path",c1={appendPadding:[10,0,20,0],blendMode:"multiply",tooltip:{showTitle:!1,showMarkers:!1,fields:["id","size"],formatter:function(e){return{name:e.id,value:e.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 Na(e){if(!!e){var r=e.geometries[0].elements;r.forEach(function(t){t.shape.toFront()})}}var h1=Yn("element-active"),f1=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){Na(this.context.view)},r.prototype.active=function(){e.prototype.active.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(h1),v1=Yn("element-highlight"),d1=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){Na(this.context.view)},r.prototype.highlight=function(){e.prototype.highlight.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.clear=function(){e.prototype.clear.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(v1),g1=Yn("element-selected"),p1=Yn("element-single-selected"),y1=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){Na(this.context.view)},r.prototype.selected=function(){e.prototype.selected.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(g1),m1=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.syncElementsPos=function(){Na(this.context.view)},r.prototype.selected=function(){e.prototype.selected.call(this),this.syncElementsPos()},r.prototype.toggle=function(){e.prototype.toggle.call(this),this.syncElementsPos()},r.prototype.reset=function(){e.prototype.reset.call(this),this.syncElementsPos()},r}(p1);xt("venn-element-active",f1),xt("venn-element-highlight",d1),xt("venn-element-selected",y1),xt("venn-element-single-selected",m1),Ot("venn-element-active",{start:[{trigger:"element:mouseenter",action:"venn-element-active:active"}],end:[{trigger:"element:mouseleave",action:"venn-element-active:reset"}]}),Ot("venn-element-highlight",{start:[{trigger:"element:mouseenter",action:"venn-element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"venn-element-highlight:reset"}]}),Ot("venn-element-selected",{start:[{trigger:"element:click",action:"venn-element-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-selected:reset"]}]}),Ot("venn-element-single-selected",{start:[{trigger:"element:click",action:"venn-element-single-selected:toggle"}],rollback:[{trigger:"dblclick",action:["venn-element-single-selected:reset"]}]}),Ot("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"]}]}),Ot("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 x1=function(e){(0,g.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getLabelPoint=function(t,i,n){var a=t.data,o=a.x,s=a.y,l=t.customLabelInfo,u=l.offsetX,c=l.offsetY;return{content:t.content[n],x:o+u,y:s+c}},r}(Qn);Qi("venn",x1);var _1=Array.isArray,w1=_1,_n=`
  64. \v\f\r \xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029`,b1=new RegExp("([a-z])["+_n+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+_n+"]*,?["+_n+"]*)+)","ig"),S1=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+_n+"]*,?["+_n+"]*","ig");function C1(e){if(!e)return null;if(w1(e))return e;var r={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},t=[];return String(e).replace(b1,function(i,n,a){var o=[],s=n.toLowerCase();if(a.replace(S1,function(l,u){u&&o.push(+u)}),s==="m"&&o.length>2&&(t.push([n].concat(o.splice(0,2))),s="l",n=n==="m"?"l":"L"),s==="o"&&o.length===1&&t.push([n,o[0]]),s==="r")t.push([n].concat(o));else for(;o.length>=r[s]&&(t.push([n].concat(o.splice(0,r[s]))),!!r[s]););return""}),t}var A1=/[a-z]/;function Ov(e,r){return[r[0]+(r[0]-e[0]),r[1]+(r[1]-e[1])]}function SI(e){var r=parsePathString(e);if(!r||!r.length)return[["M",0,0]];for(var t=!1,i=0;i<r.length;i++){var n=r[i][0];if(A1.test(n)||["V","H","T","S"].indexOf(n)>=0){t=!0;break}}if(!t)return r;var a=[],o=0,s=0,l=0,u=0,c=0,f,v,d=r[0];(d[0]==="M"||d[0]==="m")&&(o=+d[1],s=+d[2],l=o,u=s,c++,a[0]=["M",o,s]);for(var i=c,p=r.length;i<p;i++){var y=r[i],m=a[i-1],x=[],n=y[0],_=n.toUpperCase();if(n!==_)switch(x[0]=_,_){case"A":x[1]=y[1],x[2]=y[2],x[3]=y[3],x[4]=y[4],x[5]=y[5],x[6]=+y[6]+o,x[7]=+y[7]+s;break;case"V":x[1]=+y[1]+s;break;case"H":x[1]=+y[1]+o;break;case"M":l=+y[1]+o,u=+y[2]+s,x[1]=l,x[2]=u;break;default:for(var w=1,b=y.length;w<b;w++)x[w]=+y[w]+(w%2?o:s)}else x=r[i];switch(_){case"Z":o=+l,s=+u;break;case"H":o=x[1],x=["L",o,s];break;case"V":s=x[1],x=["L",o,s];break;case"T":o=x[1],s=x[2];var S=Ov([m[1],m[2]],[m[3],m[4]]);x=["Q",S[0],S[1],o,s];break;case"S":o=x[x.length-2],s=x[x.length-1];var C=m.length,A=Ov([m[C-4],m[C-3]],[m[C-2],m[C-1]]);x=["C",A[0],A[1],x[1],x[2],o,s];break;case"M":l=x[x.length-2],u=x[x.length-1];break;default:o=x[x.length-2],s=x[x.length-1]}a.push(x)}return a}var wn=Math.PI*2,js=function(e,r,t,i,n,a,o){var s=e.x,l=e.y;s*=r,l*=t;var u=i*s-n*l,c=n*s+i*l;return{x:u+a,y:c+o}},M1=function(e,r){var t=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:4/3*Math.tan(r/4),i=Math.cos(e),n=Math.sin(e),a=Math.cos(e+r),o=Math.sin(e+r);return[{x:i-n*t,y:n+i*t},{x:a+o*t,y:o-a*t},{x:a,y:o}]},Pv=function(e,r,t,i){var n=e*i-r*t<0?-1:1,a=e*t+r*i;return a>1&&(a=1),a<-1&&(a=-1),n*Math.acos(a)},F1=function(e,r,t,i,n,a,o,s,l,u,c,f){var v=Math.pow(n,2),d=Math.pow(a,2),p=Math.pow(c,2),y=Math.pow(f,2),m=v*d-v*y-d*p;m<0&&(m=0),m/=v*y+d*p,m=Math.sqrt(m)*(o===s?-1:1);var x=m*n/a*f,_=m*-a/n*c,w=u*x-l*_+(e+t)/2,b=l*x+u*_+(r+i)/2,S=(c-x)/n,C=(f-_)/a,A=(-c-x)/n,F=(-f-_)/a,P=Pv(1,0,S,C),I=Pv(S,C,A,F);return s===0&&I>0&&(I-=wn),s===1&&I<0&&(I+=wn),[w,b,P,I]},E1=function(e){var r=e.px,t=e.py,i=e.cx,n=e.cy,a=e.rx,o=e.ry,s=e.xAxisRotation,l=s===void 0?0:s,u=e.largeArcFlag,c=u===void 0?0:u,f=e.sweepFlag,v=f===void 0?0:f,d=[];if(a===0||o===0)return[{x1:0,y1:0,x2:0,y2:0,x:i,y:n}];var p=Math.sin(l*wn/360),y=Math.cos(l*wn/360),m=y*(r-i)/2+p*(t-n)/2,x=-p*(r-i)/2+y*(t-n)/2;if(m===0&&x===0)return[{x1:0,y1:0,x2:0,y2:0,x:i,y:n}];a=Math.abs(a),o=Math.abs(o);var _=Math.pow(m,2)/Math.pow(a,2)+Math.pow(x,2)/Math.pow(o,2);_>1&&(a*=Math.sqrt(_),o*=Math.sqrt(_));var w=F1(r,t,i,n,a,o,c,v,p,y,m,x),b=w[0],S=w[1],C=w[2],A=w[3],F=Math.abs(A)/(wn/4);Math.abs(1-F)<1e-7&&(F=1);var P=Math.max(Math.ceil(F),1);A/=P;for(var I=0;I<P;I++)d.push(M1(C,A)),C+=A;return d.map(function(V){var Z=js(V[0],a,o,y,p,b,S),vt=Z.x,yt=Z.y,Bt=js(V[1],a,o,y,p,b,S),G=Bt.x,at=Bt.y,mt=js(V[2],a,o,y,p,b,S),ut=mt.x,pt=mt.y;return{x1:vt,y1:yt,x2:G,y2:at,x:ut,y:pt}})};function CI(e,r,t,i,n,a,o,s,l){var u=E1({px:e,py:r,cx:s,cy:l,rx:t,ry:i,xAxisRotation:n,largeArcFlag:a,sweepFlag:o});return u.reduce(function(c,f){var v=f.x1,d=f.y1,p=f.x2,y=f.y2,m=f.x,x=f.y;return c.push(v,d,p,y,m,x),c},[])}function AI(e,r){"TQ".indexOf(e[0])<0&&(r.qx=null,r.qy=null);var t=e.slice(1),i=t[0],n=t[1];switch(e[0]){case"M":return r.x=i,r.y=n,e;case"A":return["C"].concat(arcToCubic.apply(0,[r.x1,r.y1].concat(e.slice(1))));case"Q":return r.qx=i,r.qy=n,["C"].concat(quadToCubic.apply(0,[r.x1,r.y1].concat(e.slice(1))));case"L":return["C"].concat(lineToCubic(r.x1,r.y1,e[1],e[2]));case"H":return["C"].concat(lineToCubic(r.x1,r.y1,e[1],r.y1));case"V":return["C"].concat(lineToCubic(r.x1,r.y1,r.x1,e[1]));case"Z":return["C"].concat(lineToCubic(r.x1,r.y1,r.x,r.y));default:}return e}function MI(e,r){r===void 0&&(r=!1);for(var t=path2Absolute(e),i={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null},n=[],a="",o=t.length,s,l,u=[],c=0;c<o;c+=1)t[c]&&(a=t[c][0]),n[c]=a,t[c]=segmentToCubic(t[c],i),T1(t,n,c),o=t.length,a==="Z"&&u.push(c),s=t[c],l=s.length,i.x1=+s[l-2],i.y1=+s[l-1],i.x2=+s[l-4]||i.x1,i.y2=+s[l-3]||i.y1;return r?[t,u]:t}function T1(e,r,t){if(e[t].length>7){e[t].shift();for(var i=e[t],n=t;i.length;)r[t]="A",e.splice(n+=1,0,["C"].concat(i.splice(0,6)));e.splice(t,1)}}var kv=function(e,r,t,i,n){var a=-3*r+9*t-9*i+3*n,o=e*a+6*r-12*t+6*i;return e*o-3*r+3*t},Dv=function(e,r,t,i,n,a,o,s,l){l===null&&(l=1),l=l>1?1:l<0?0:l;for(var u=l/2,c=12,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],v=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,p=0;p<c;p++){var y=u*f[p]+u,m=kv(y,e,t,n,o),x=kv(y,r,i,a,s),_=m*m+x*x;d+=v[p]*Math.sqrt(_)}return u*d},L1=function(e,r,t,i,n,a,o,s){for(var l=[],u=[[],[]],c,f,v,d,p=0;p<2;++p){if(p===0?(f=6*e-12*t+6*n,c=-3*e+9*t-9*n+3*o,v=3*t-3*e):(f=6*r-12*i+6*a,c=-3*r+9*i-9*a+3*s,v=3*i-3*r),Math.abs(c)<1e-12){if(Math.abs(f)<1e-12)continue;d=-v/f,d>0&&d<1&&l.push(d);continue}var y=f*f-4*v*c,m=Math.sqrt(y);if(!(y<0)){var x=(-f+m)/(2*c);x>0&&x<1&&l.push(x);var _=(-f-m)/(2*c);_>0&&_<1&&l.push(_)}}for(var w=l.length,b=w,S;w--;)d=l[w],S=1-d,u[0][w]=S*S*S*e+3*S*S*d*t+3*S*d*d*n+d*d*d*o,u[1][w]=S*S*S*r+3*S*S*d*i+3*S*d*d*a+d*d*d*s;return u[0][b]=e,u[1][b]=r,u[0][b+1]=o,u[1][b+1]=s,u[0].length=u[1].length=b+2,{min:{x:Math.min.apply(0,u[0]),y:Math.min.apply(0,u[1])},max:{x:Math.max.apply(0,u[0]),y:Math.max.apply(0,u[1])}}},I1=function(e,r,t,i,n,a,o,s){if(!(Math.max(e,t)<Math.min(n,o)||Math.min(e,t)>Math.max(n,o)||Math.max(r,i)<Math.min(a,s)||Math.min(r,i)>Math.max(a,s))){var l=(e*i-r*t)*(n-o)-(e-t)*(n*s-a*o),u=(e*i-r*t)*(a-s)-(r-i)*(n*s-a*o),c=(e-t)*(a-s)-(r-i)*(n-o);if(!!c){var f=l/c,v=u/c,d=+f.toFixed(2),p=+v.toFixed(2);if(!(d<+Math.min(e,t).toFixed(2)||d>+Math.max(e,t).toFixed(2)||d<+Math.min(n,o).toFixed(2)||d>+Math.max(n,o).toFixed(2)||p<+Math.min(r,i).toFixed(2)||p>+Math.max(r,i).toFixed(2)||p<+Math.min(a,s).toFixed(2)||p>+Math.max(a,s).toFixed(2)))return{x:f,y:v}}}},Pr=function(e,r,t){return r>=e.x&&r<=e.x+e.width&&t>=e.y&&t<=e.y+e.height},Zs=function(e,r,t,i){return e===null&&(e=r=t=i=0),r===null&&(r=e.y,t=e.width,i=e.height,e=e.x),{x:e,y:r,width:t,w:t,height:i,h:i,x2:e+t,y2:r+i,cx:e+t/2,cy:r+i/2,r1:Math.min(t,i)/2,r2:Math.max(t,i)/2,r0:Math.sqrt(t*t+i*i)/2,path:rectPath(e,r,t,i),vb:[e,r,t,i].join(" ")}},O1=function(e,r){return e=Zs(e),r=Zs(r),Pr(r,e.x,e.y)||Pr(r,e.x2,e.y)||Pr(r,e.x,e.y2)||Pr(r,e.x2,e.y2)||Pr(e,r.x,r.y)||Pr(e,r.x2,r.y)||Pr(e,r.x,r.y2)||Pr(e,r.x2,r.y2)||(e.x<r.x2&&e.x>r.x||r.x<e.x2&&r.x>e.x)&&(e.y<r.y2&&e.y>r.y||r.y<e.y2&&r.y>e.y)},Bv=function(e,r,t,i,n,a,o,s){isArray(e)||(e=[e,r,t,i,n,a,o,s]);var l=L1.apply(null,e);return Zs(l.min.x,l.min.y,l.max.x-l.min.x,l.max.y-l.min.y)},Rv=function(e,r,t,i,n,a,o,s,l){var u=1-l,c=Math.pow(u,3),f=Math.pow(u,2),v=l*l,d=v*l,p=c*e+f*3*l*t+u*3*l*l*n+d*o,y=c*r+f*3*l*i+u*3*l*l*a+d*s,m=e+2*l*(t-e)+v*(n-2*t+e),x=r+2*l*(i-r)+v*(a-2*i+r),_=t+2*l*(n-t)+v*(o-2*n+t),w=i+2*l*(a-i)+v*(s-2*a+i),b=u*e+l*t,S=u*r+l*i,C=u*n+l*o,A=u*a+l*s,F=90-Math.atan2(m-_,x-w)*180/Math.PI;return{x:p,y,m:{x:m,y:x},n:{x:_,y:w},start:{x:b,y:S},end:{x:C,y:A},alpha:F}},P1=function(e,r,t){var i=Bv(e),n=Bv(r);if(!O1(i,n))return t?0:[];for(var a=Dv.apply(0,e),o=Dv.apply(0,r),s=~~(a/8),l=~~(o/8),u=[],c=[],f={},v=t?0:[],d=0;d<s+1;d++){var p=Rv.apply(0,e.concat(d/s));u.push({x:p.x,y:p.y,t:d/s})}for(var d=0;d<l+1;d++){var p=Rv.apply(0,r.concat(d/l));c.push({x:p.x,y:p.y,t:d/l})}for(var d=0;d<s;d++)for(var y=0;y<l;y++){var m=u[d],x=u[d+1],_=c[y],w=c[y+1],b=Math.abs(x.x-m.x)<.001?"y":"x",S=Math.abs(w.x-_.x)<.001?"y":"x",C=I1(m.x,m.y,x.x,x.y,_.x,_.y,w.x,w.y);if(C){if(f[C.x.toFixed(4)]===C.y.toFixed(4))continue;f[C.x.toFixed(4)]=C.y.toFixed(4);var A=m.t+Math.abs((C[b]-m[b])/(x[b]-m[b]))*(x.t-m.t),F=_.t+Math.abs((C[S]-_[S])/(w[S]-_[S]))*(w.t-_.t);A>=0&&A<=1&&F>=0&&F<=1&&(t?v++:v.push({x:C.x,y:C.y,t1:A,t2:F}))}}return v},k1=function(e,r,t){e=path2Curve(e),r=path2Curve(r);for(var i,n,a,o,s,l,u,c,f,v,d=t?0:[],p=0,y=e.length;p<y;p++){var m=e[p];if(m[0]==="M")i=s=m[1],n=l=m[2];else{m[0]==="C"?(f=[i,n].concat(m.slice(1)),i=f[6],n=f[7]):(f=[i,n,i,n,s,l,s,l],i=s,n=l);for(var x=0,_=r.length;x<_;x++){var w=r[x];if(w[0]==="M")a=u=w[1],o=c=w[2];else{w[0]==="C"?(v=[a,o].concat(w.slice(1)),a=v[6],o=v[7]):(v=[a,o,a,o,u,c,u,c],a=u,o=c);var b=P1(f,v,t);if(t)d+=b;else{for(var S=0,C=b.length;S<C;S++)b[S].segment1=p,b[S].segment2=x,b[S].bez1=f,b[S].bez2=v;d=d.concat(b)}}}}}return d};function FI(e,r){return k1(e,r)}function D1(e){return O({},e.defaultStyle,{fill:e.color},e.style)}Zt("schema","venn",{draw:function(e,r){var t=e.data,i=C1(t[Us]),n=D1(e),a=r.addGroup({name:"venn-shape"});a.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},n),{path:i}),name:"venn-path"});var o=e.customInfo,s=o.offsetX,l=o.offsetY,u=ke.transform(null,[["t",s,l]]);return a.setMatrix(u),a},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{lineWidth:0,stroke:r,fill:r,r:4}}}});var B1=function(e){return function(r,t){var i=[];return i[0]=e(r[0],t[0]),i[1]=e(r[1],t[1]),i[2]=e(r[2],t[2]),i}},Nv={normal:function(e){return e},multiply:function(e,r){return e*r/255},screen:function(e,r){return 255*(1-(1-e/255)*(1-r/255))},overlay:function(e,r){return r<128?2*e*r/255:255*(1-2*(1-e/255)*(1-r/255))},darken:function(e,r){return e>r?r:e},lighten:function(e,r){return e>r?e:r},dodge:function(e,r){return e===255?255:(e=255*(r/255)/(1-e/255),e>255?255:e)},burn:function(e,r){return r===255?255:e===0?0:255*(1-Math.min(1,(1-r/255)/(e/255)))}},R1=function(e){if(!Nv[e])throw new Error("unknown blend mode "+e);return Nv[e]};function N1(e,r,t){t===void 0&&(t="normal");var i=B1(R1(t))(za(e),za(r)),n=za(e),a=n[0],o=n[1],s=n[2],l=n[3],u=za(r),c=u[0],f=u[1],v=u[2],d=u[3],p=Number((l+d*(1-l)).toFixed(2)),y=Math.round((l*(1-d)*(a/255)+l*d*(i[0]/255)+(1-l)*d*(c/255))/p*255),m=Math.round((l*(1-d)*(o/255)+l*d*(i[1]/255)+(1-l)*d*(f/255))/p*255),x=Math.round((l*(1-d)*(s/255)+l*d*(i[2]/255)+(1-l)*d*(v/255))/p*255);return"rgba(".concat(y,", ").concat(m,", ").concat(x,", ").concat(p,")")}function za(e){var r=e.replace("/s+/g",""),t;return typeof r=="string"&&!r.startsWith("rgba")&&!r.startsWith("#")?t=xr.rgb2arr(xr.toRGB(r)).concat([1]):(r.startsWith("rgba")&&(t=r.replace("rgba(","").replace(")","").split(",")),r.startsWith("#")&&(t=xr.rgb2arr(r).concat([1])),t.map(function(i,n){return n===3?Number(i):i|0}))}var ir=M(87026),zv=1e-10;function qs(e,r){var t=V1(e),i=t.filter(function(A){return z1(A,e)}),n=0,a=0,o,s=[];if(i.length>1){var l=Wv(i);for(o=0;o<i.length;++o){var u=i[o];u.angle=Math.atan2(u.x-l.x,u.y-l.y)}i.sort(function(A,F){return F.angle-A.angle});var c=i[i.length-1];for(o=0;o<i.length;++o){var f=i[o];a+=(c.x+f.x)*(f.y-c.y);for(var v={x:(f.x+c.x)/2,y:(f.y+c.y)/2},d=null,p=0;p<f.parentIndex.length;++p)if(c.parentIndex.indexOf(f.parentIndex[p])>-1){var y=e[f.parentIndex[p]],m=Math.atan2(f.x-y.x,f.y-y.y),x=Math.atan2(c.x-y.x,c.y-y.y),_=x-m;_<0&&(_+=2*Math.PI);var w=x-_/2,b=Ke(v,{x:y.x+y.radius*Math.sin(w),y:y.y+y.radius*Math.cos(w)});b>y.radius*2&&(b=y.radius*2),(d===null||d.width>b)&&(d={circle:y,width:b,p1:f,p2:c})}d!==null&&(s.push(d),n+=Ks(d.circle.radius,d.width),c=f)}}else{var S=e[0];for(o=1;o<e.length;++o)e[o].radius<S.radius&&(S=e[o]);var C=!1;for(o=0;o<e.length;++o)if(Ke(e[o],S)>Math.abs(S.radius-e[o].radius)){C=!0;break}C?n=a=0:(n=S.radius*S.radius*Math.PI,s.push({circle:S,p1:{x:S.x,y:S.y+S.radius},p2:{x:S.x-zv,y:S.y+S.radius},width:S.radius*2}))}return a/=2,r&&(r.area=n+a,r.arcArea=n,r.polygonArea=a,r.arcs=s,r.innerPoints=i,r.intersectionPoints=t),n+a}function z1(e,r){for(var t=0;t<r.length;++t)if(Ke(e,r[t])>r[t].radius+zv)return!1;return!0}function V1(e){for(var r=[],t=0;t<e.length;++t)for(var i=t+1;i<e.length;++i)for(var n=Gv(e[t],e[i]),a=0;a<n.length;++a){var o=n[a];o.parentIndex=[t,i],r.push(o)}return r}function Ks(e,r){return e*e*Math.acos(1-r/e)-(e-r)*Math.sqrt(r*(2*e-r))}function Ke(e,r){return Math.sqrt((e.x-r.x)*(e.x-r.x)+(e.y-r.y)*(e.y-r.y))}function Vv(e,r,t){if(t>=e+r)return 0;if(t<=Math.abs(e-r))return Math.PI*Math.min(e,r)*Math.min(e,r);var i=e-(t*t-r*r+e*e)/(2*t),n=r-(t*t-e*e+r*r)/(2*t);return Ks(e,i)+Ks(r,n)}function Gv(e,r){var t=Ke(e,r),i=e.radius,n=r.radius;if(t>=i+n||t<=Math.abs(i-n))return[];var a=(i*i-n*n+t*t)/(2*t),o=Math.sqrt(i*i-a*a),s=e.x+a*(r.x-e.x)/t,l=e.y+a*(r.y-e.y)/t,u=-(r.y-e.y)*(o/t),c=-(r.x-e.x)*(o/t);return[{x:s+u,y:l-c},{x:s-u,y:l+c}]}function Wv(e){for(var r={x:0,y:0},t=0;t<e.length;++t)r.x+=e[t].x,r.y+=e[t].y;return r.x/=e.length,r.y/=e.length,r}function $s(e,r,t){var i=r[0].radius-Ke(r[0],e),n,a;for(n=1;n<r.length;++n)a=r[n].radius-Ke(r[n],e),a<=i&&(i=a);for(n=0;n<t.length;++n)a=Ke(t[n],e)-t[n].radius,a<=i&&(i=a);return i}function Hv(e,r){var t=[],i;for(i=0;i<e.length;++i){var n=e[i];t.push({x:n.x,y:n.y}),t.push({x:n.x+n.radius/2,y:n.y}),t.push({x:n.x-n.radius/2,y:n.y}),t.push({x:n.x,y:n.y+n.radius/2}),t.push({x:n.x,y:n.y-n.radius/2})}var a=t[0],o=$s(t[0],e,r);for(i=1;i<t.length;++i){var s=$s(t[i],e,r);s>=o&&(a=t[i],o=s)}var l=(0,ir.nelderMead)(function(v){return-1*$s({x:v[0],y:v[1]},e,r)},[a.x,a.y],{maxIterations:500,minErrorDelta:1e-10}).x,u={x:l[0],y:l[1]},c=!0;for(i=0;i<e.length;++i)if(Ke(u,e[i])>e[i].radius){c=!1;break}for(i=0;i<r.length;++i)if(Ke(u,r[i])<r[i].radius){c=!1;break}if(!c)if(e.length==1)u={x:e[0].x,y:e[0].y};else{var f={};qs(e,f),f.arcs.length===0?u={x:0,y:-1e3,disjoint:!0}:f.arcs.length==1?u={x:f.arcs[0].circle.x,y:f.arcs[0].circle.y}:r.length?u=Hv(e,[]):u=Wv(f.arcs.map(function(v){return v.p1}))}return u}function G1(e){var r={},t=[];for(var i in e)t.push(i),r[i]=[];for(var n=0;n<t.length;n++)for(var a=e[t[n]],o=n+1;o<t.length;++o){var s=e[t[o]],l=Ke(a,s);l+s.radius<=a.radius+1e-10?r[t[o]].push(t[n]):l+a.radius<=s.radius+1e-10&&r[t[n]].push(t[o])}return r}function W1(e,r){for(var t={},i=G1(e),n=0;n<r.length;++n){for(var a=r[n].sets,o={},s={},l=0;l<a.length;++l){o[a[l]]=!0;for(var u=i[a[l]],c=0;c<u.length;++c)s[u[c]]=!0}var f=[],v=[];for(var d in e)d in o?f.push(e[d]):d in s||v.push(e[d]);var p=Hv(f,v);t[a]=p,p.disjoint&&r[n].size>0&&console.log("WARNING: area "+a+" not represented on screen")}return t}function H1(e,r,t){var i=[],n=e-t,a=r;return i.push("M",n,a),i.push("A",t,t,0,1,0,n+2*t,a),i.push("A",t,t,0,1,0,n,a),i.join(" ")}function EI(e){var r=e.split(" ");return{x:parseFloat(r[1]),y:parseFloat(r[2]),radius:-parseFloat(r[4])}}function Y1(e){var r={};qs(e,r);var t=r.arcs;if(t.length===0)return"M 0 0";if(t.length==1){var i=t[0].circle;return H1(i.x,i.y,i.radius)}else{for(var n=[`
  65. M`,t[0].p2.x,t[0].p2.y],a=0;a<t.length;++a){var o=t[a],s=o.circle.radius,l=o.width>s;n.push(`
  66. A`,s,s,0,l?1:0,1,o.p1.x,o.p1.y)}return n.join(" ")}}function X1(e,r){r=r||{},r.maxIterations=r.maxIterations||500;var t=r.initialLayout||q1,i=r.lossFunction||Js;e=U1(e);var n=t(e,r),a=[],o=[],s;for(s in n)n.hasOwnProperty(s)&&(a.push(n[s].x),a.push(n[s].y),o.push(s));for(var l=(0,ir.nelderMead)(function(f){for(var v={},d=0;d<o.length;++d){var p=o[d];v[p]={x:f[2*d],y:f[2*d+1],radius:n[p].radius}}return i(v,e)},a,r),u=l.x,c=0;c<o.length;++c)s=o[c],n[s].x=u[2*c],n[s].y=u[2*c+1];return n}var Yv=1e-10;function Qs(e,r,t){return Math.min(e,r)*Math.min(e,r)*Math.PI<=t+Yv?Math.abs(e-r):(0,ir.bisect)(function(i){return Vv(e,r,i)-t},0,e+r)}function U1(e){e=e.slice();var r=[],t={},i,n,a,o;for(i=0;i<e.length;++i){var s=e[i];s.sets.length==1?r.push(s.sets[0]):s.sets.length==2&&(a=s.sets[0],o=s.sets[1],t[[a,o]]=!0,t[[o,a]]=!0)}for(r.sort(function(l,u){return l>u?1:-1}),i=0;i<r.length;++i)for(a=r[i],n=i+1;n<r.length;++n)o=r[n],[a,o]in t||e.push({sets:[a,o],size:0});return e}function j1(e,r,t){var i=(0,ir.zerosM)(r.length,r.length),n=(0,ir.zerosM)(r.length,r.length);return e.filter(function(a){return a.sets.length==2}).map(function(a){var o=t[a.sets[0]],s=t[a.sets[1]],l=Math.sqrt(r[o].size/Math.PI),u=Math.sqrt(r[s].size/Math.PI),c=Qs(l,u,a.size);i[o][s]=i[s][o]=c;var f=0;a.size+1e-10>=Math.min(r[o].size,r[s].size)?f=1:a.size<=1e-10&&(f=-1),n[o][s]=n[s][o]=f}),{distances:i,constraints:n}}function Z1(e,r,t,i){var n=0,a;for(a=0;a<r.length;++a)r[a]=0;for(a=0;a<t.length;++a)for(var o=e[2*a],s=e[2*a+1],l=a+1;l<t.length;++l){var u=e[2*l],c=e[2*l+1],f=t[a][l],v=i[a][l],d=(u-o)*(u-o)+(c-s)*(c-s),p=Math.sqrt(d),y=d-f*f;v>0&&p<=f||v<0&&p>=f||(n+=2*y*y,r[2*a]+=4*y*(o-u),r[2*a+1]+=4*y*(s-c),r[2*l]+=4*y*(u-o),r[2*l+1]+=4*y*(c-s))}return n}function q1(e,r){var t=$1(e,r),i=r.lossFunction||Js;if(e.length>=8){var n=K1(e,r),a=i(n,e),o=i(t,e);a+1e-8<o&&(t=n)}return t}function K1(e,r){r=r||{};var t=r.restarts||10,i=[],n={},a;for(a=0;a<e.length;++a){var o=e[a];o.sets.length==1&&(n[o.sets[0]]=i.length,i.push(o))}var s=j1(e,i,n),l=s.distances,u=s.constraints,c=(0,ir.norm2)(l.map(ir.norm2))/l.length;l=l.map(function(_){return _.map(function(w){return w/c})});var f=function(_,w){return Z1(_,w,l,u)},v,d;for(a=0;a<t;++a){var p=(0,ir.zeros)(l.length*2).map(Math.random);d=(0,ir.conjugateGradient)(f,p,r),(!v||d.fx<v.fx)&&(v=d)}var y=v.x,m={};for(a=0;a<i.length;++a){var x=i[a];m[x.sets[0]]={x:y[2*a]*c,y:y[2*a+1]*c,radius:Math.sqrt(x.size/Math.PI)}}if(r.history)for(a=0;a<r.history.length;++a)(0,ir.scale)(r.history[a].x,c);return m}function $1(e,r){for(var t=r&&r.lossFunction?r.lossFunction:Js,i={},n={},a,o=0;o<e.length;++o){var s=e[o];s.sets.length==1&&(a=s.sets[0],i[a]={x:1e10,y:1e10,rowid:Object.keys(i).length,size:s.size,radius:Math.sqrt(s.size/Math.PI)},n[a]=[])}e=e.filter(function(G){return G.sets.length==2});for(var o=0;o<e.length;++o){var l=e[o],u=l.hasOwnProperty("weight")?l.weight:1,c=l.sets[0],f=l.sets[1];l.size+Yv>=Math.min(i[c].size,i[f].size)&&(u=0),n[c].push({set:f,size:l.size,weight:u}),n[f].push({set:c,size:l.size,weight:u})}var v=[];for(a in n)if(n.hasOwnProperty(a)){for(var d=0,o=0;o<n[a].length;++o)d+=n[a][o].size*n[a][o].weight;v.push({set:a,size:d})}function p(G,at){return at.size-G.size}v.sort(p);var y={};function m(G){return G.set in y}function x(G,at){i[at].x=G.x,i[at].y=G.y,y[at]=!0}x({x:0,y:0},v[0].set);for(var o=1;o<v.length;++o){var _=v[o].set,w=n[_].filter(m);if(a=i[_],w.sort(p),w.length===0)throw"ERROR: missing pairwise overlap information";for(var b=[],S=0;S<w.length;++S){var C=i[w[S].set],A=Qs(a.radius,C.radius,w[S].size);b.push({x:C.x+A,y:C.y}),b.push({x:C.x-A,y:C.y}),b.push({y:C.y+A,x:C.x}),b.push({y:C.y-A,x:C.x});for(var F=S+1;F<w.length;++F)for(var P=i[w[F].set],I=Qs(a.radius,P.radius,w[F].size),V=Gv({x:C.x,y:C.y,radius:A},{x:P.x,y:P.y,radius:I}),Z=0;Z<V.length;++Z)b.push(V[Z])}for(var vt=1e50,yt=b[0],S=0;S<b.length;++S){i[_].x=b[S].x,i[_].y=b[S].y;var Bt=t(i,e);Bt<vt&&(vt=Bt,yt=b[S])}x(yt,_)}return i}function Js(e,r){var t=0;function i(c){return c.map(function(f){return e[f]})}for(var n=0;n<r.length;++n){var a=r[n],o=void 0;if(a.sets.length!=1){if(a.sets.length==2){var s=e[a.sets[0]],l=e[a.sets[1]];o=Vv(s.radius,l.radius,Ke(s,l))}else o=qs(i(a.sets));var u=a.hasOwnProperty("weight")?a.weight:1;t+=u*(o-a.size)*(o-a.size)}}return t}function Q1(e,r,t){t===null?e.sort(function(y,m){return m.radius-y.radius}):e.sort(t);var i;if(e.length>0){var n=e[0].x,a=e[0].y;for(i=0;i<e.length;++i)e[i].x-=n,e[i].y-=a}if(e.length==2){var o=distance(e[0],e[1]);o<Math.abs(e[1].radius-e[0].radius)&&(e[1].x=e[0].x+e[0].radius-e[1].radius-1e-10,e[1].y=e[0].y)}if(e.length>1){var s=Math.atan2(e[1].x,e[1].y)-r,l=void 0,u=void 0,c=Math.cos(s),f=Math.sin(s);for(i=0;i<e.length;++i)l=e[i].x,u=e[i].y,e[i].x=c*l-f*u,e[i].y=f*l+c*u}if(e.length>2){for(var v=Math.atan2(e[2].x,e[2].y)-r;v<0;)v+=2*Math.PI;for(;v>2*Math.PI;)v-=2*Math.PI;if(v>Math.PI){var d=e[1].y/(1e-10+e[1].x);for(i=0;i<e.length;++i){var p=(e[i].x+d*e[i].y)/(1+d*d);e[i].x=2*p-e[i].x,e[i].y=2*p*d-e[i].y}}}}function J1(e){e.map(function(u){u.parent=u});function r(u){return u.parent!==u&&(u.parent=r(u.parent)),u.parent}function t(u,c){var f=r(u),v=r(c);f.parent=v}for(var i=0;i<e.length;++i)for(var n=i+1;n<e.length;++n){var a=e[i].radius+e[n].radius;distance(e[i],e[n])+1e-10<a&&t(e[n],e[i])}for(var o={},s,i=0;i<e.length;++i)s=r(e[i]).parent.setid,s in o||(o[s]=[]),o[s].push(e[i]);e.map(function(u){delete u.parent});var l=[];for(s in o)o.hasOwnProperty(s)&&l.push(o[s]);return l}function tl(e){var r=function(t){var i=Math.max.apply(null,e.map(function(a){return a[t]+a.radius})),n=Math.min.apply(null,e.map(function(a){return a[t]-a.radius}));return{max:i,min:n}};return{xRange:r("x"),yRange:r("y")}}function TI(e,r,t){r===null&&(r=Math.PI/2);var i=[],n,a;for(a in e)if(e.hasOwnProperty(a)){var o=e[a];i.push({x:o.x,y:o.y,radius:o.radius,setid:a})}var s=J1(i);for(n=0;n<s.length;++n){Q1(s[n],r,t);var l=tl(s[n]);s[n].size=(l.xRange.max-l.xRange.min)*(l.yRange.max-l.yRange.min),s[n].bounds=l}s.sort(function(p,y){return y.size-p.size}),i=s[0];var u=i.bounds,c=(u.xRange.max-u.xRange.min)/50;function f(p,y,m){if(!!p){var x=p.bounds,_,w,b;y?_=u.xRange.max-x.xRange.min+c:(_=u.xRange.max-x.xRange.max,b=(x.xRange.max-x.xRange.min)/2-(u.xRange.max-u.xRange.min)/2,b<0&&(_+=b)),m?w=u.yRange.max-x.yRange.min+c:(w=u.yRange.max-x.yRange.max,b=(x.yRange.max-x.yRange.min)/2-(u.yRange.max-u.yRange.min)/2,b<0&&(w+=b));for(var S=0;S<p.length;++S)p[S].x+=_,p[S].y+=w,i.push(p[S])}}for(var v=1;v<s.length;)f(s[v],!0,!1),f(s[v+1],!1,!0),f(s[v+2],!0,!0),v+=3,u=tl(i);var d={};for(n=0;n<i.length;++n)d[i[n].setid]=i[n];return d}function tT(e,r,t,i){var n=[],a=[];for(var o in e)e.hasOwnProperty(o)&&(a.push(o),n.push(e[o]));r-=2*i,t-=2*i;var s=tl(n),l=s.xRange,u=s.yRange;if(l.max==l.min||u.max==u.min)return console.log("not scaling solution: zero size detected"),e;for(var c=r/(l.max-l.min),f=t/(u.max-u.min),v=Math.min(f,c),d=(r-(l.max-l.min)*v)/2,p=(t-(u.max-u.min)*v)/2,y={},m=0;m<n.length;++m){var x=n[m];y[a[m]]={radius:v*x.radius,x:i+d+(x.x-l.min)*v,y:i+p+(x.y-u.min)*v}}return y}var eT=(0,h.memoize)(function(e,r,t,i){var n=new Map,a=e.length;return r.forEach(function(o,s){if(o[i].length===1)n.set(o[yr],e[(s+a)%a]);else{var l=o[i].map(function(u){return n.get(u)});n.set(o[yr],l.slice(1).reduce(function(u,c){return N1(u,c,t)},l[0]))}}),n},function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return JSON.stringify(e)});function rT(e,r,t,i){i===void 0&&(i=0);var n=e.data,a=e.setsField,o=e.sizeField;if(n.length===0)return fr(qe.WARN,!1,"warn: %s","\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A"),[];var s=n.map(function(f){var v;return(0,g.__assign)((0,g.__assign)({},f),(v={sets:f[a]||[],size:f[o]},v[Us]="",v[yr]="",v))});s.sort(function(f,v){return f.sets.length-v.sets.length});var l=X1(s),u=tT(l,r,t,i),c=W1(u,s);return s.forEach(function(f){var v=f.sets,d=v.join(",");f[yr]=d;var p=v.map(function(x){return u[x]}),y=Y1(p);/[zZ]$/.test(y)||(y+=" Z"),f[Us]=y;var m=c[d]||{x:0,y:0};(0,h.assign)(f,m)}),s}function iT(e,r){for(var t=0;t<r.length;t++)if(!e.includes(r[t]))return!1;return!0}var nT=40;function Xv(e,r,t){var i=e.chart,n=e.options,a=n.blendMode,o=n.setsField,s=i.getTheme(),l=s.colors10,u=s.colors20,c=t;(0,h.isArray)(c)||(c=r.filter(function(v){return v[o].length===1}).length<=10?l:u);var f=eT(c,r,a,o);return function(v){return f.get(v)||c[0]}}function aT(e,r){var t=e.options,i=t.color;if(typeof i!="function"){var n=typeof i=="string"?[i]:i,a=Xv(e,r,n);return function(o){return a(o[yr])}}return i}function oT(e){var r=e.chart,t=e.options,i=t.legend,n=t.appendPadding,a=t.padding,o=Tr(n);return i!==!1&&(o=va(n,(0,h.get)(i,"position"),nT)),r.appendPadding=hs([o,a]),e}function sT(e){var r=e.options,t=r.data;t||(fr(qe.WARN,!1,"warn: %s","\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A"),t=[]);var i=t.filter(function(a){return a.sets.length===1}).map(function(a){return a.sets[0]}),n=t.filter(function(a){var o=a.sets;return iT(i,o)});return(0,h.isEqual)(n,t)||fr(qe.WARN,!1,"warn: %s","\u4EA4\u96C6\u4E2D\u4E0D\u80FD\u51FA\u73B0\u4E0D\u5B58\u5728\u7684\u96C6\u5408, \u8BF7\u8F93\u5165\u5408\u6CD5\u6570\u636E"),(0,h.deepMix)({},e,{options:{data:n}})}function lT(e){var r=e.chart,t=e.options,i=t.pointStyle,n=t.setsField,a=t.sizeField,o=Tr(r.appendPadding),s=o[0],l=o[1],u=o[2],c=o[3],f={offsetX:c,offsetY:s},v=r.viewBBox,d=v.width,p=v.height,y=rT(t,Math.max(d-(l+c),0),Math.max(p-(s+u),0),0);r.data(y);var m=ps(O({},e,{options:{xField:"x",yField:"y",sizeField:a,seriesField:yr,rawFields:[n,a],schema:{shape:"venn",style:i}}})).ext,x=m.geometry;x.customInfo(f);var _=aT(e,y);return typeof _=="function"&&x.color(yr,function(w){var b=y.find(function(C){return C[yr]===w}),S=Xv(e,y)(w);return _(b,S)}),e}function uT(e){var r=e.chart,t=e.options,i=t.label,n=Tr(r.appendPadding),a=n[0],o=n[3],s={offsetX:o,offsetY:a},l=Me(r,"schema");if(!i)l.label(!1);else{var u=i.callback,c=(0,g.__rest)(i,["callback"]);l.label({fields:["id"],callback:u,cfg:(0,h.deepMix)({},be(c),{type:"venn",customLabelInfo:s})})}return e}function cT(e){var r=e.chart,t=e.options,i=t.legend,n=t.sizeField;return r.legend(yr,i),r.legend(n,!1),e}function hT(e){var r=e.chart;return r.axis(!1),e}function fT(e){var r=e.options,t=e.chart,i=r.interactions;if(i){var n={"legend-active":"venn-legend-active","legend-highlight":"venn-legend-highlight"};oe(O({},e,{options:{interactions:i.map(function(a){return(0,g.__assign)((0,g.__assign)({},a),{type:n[a.type]||a.type})})}}))}return t.removeInteraction("legend-active"),t.removeInteraction("legend-highlight"),e}function vT(e){return Et(oT,Xt,sT,lT,uT,he({}),cT,hT,me,fT,Qt)(e)}var LI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="venn",t}return r.getDefaultOptions=function(){return c1},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return vT},r.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},r}(kt),Xe="x",ei="violinY",dT="violinSize",Uv="minMax",jv="quantile",Zv="median",el="violin_view",gT="min_max_view",pT="quantile_view",yT="median_view",mT=O({},kt.getDefaultOptions(),{syncViewPadding:!0,kde:{type:"triangular",sampleSize:32,width:3},violinStyle:{lineWidth:1,fillOpacity:.3,strokeOpacity:.75},xAxis:{grid:{line:null},tickLine:{alignTick:!1}},yAxis:{grid:{line:{style:{lineWidth:.5,lineDash:[4,4]}}}},legend:{position:"top-left"},tooltip:{showMarkers:!1}}),xT=M(53843),_T=M.n(xT);function qv(e,r){var t=e.length*r;if(e.length===0)throw new Error("quantile requires at least one data point.");if(r<0||r>1)throw new Error("quantiles must be between 0 and 1");return r===1?e[e.length-1]:r===0?e[0]:t%1!=0?e[Math.ceil(t)-1]:e.length%2==0?(e[t-1]+e[t])/2:e[t]}function bn(e,r,t){var i=e[r];e[r]=e[t],e[t]=i}function Va(e,r,t,i){for(t=t||0,i=i||e.length-1;i>t;){if(i-t>600){var n=i-t+1,a=r-t+1,o=Math.log(n),s=.5*Math.exp(2*o/3),l=.5*Math.sqrt(o*s*(n-s)/n);a-n/2<0&&(l*=-1);var u=Math.max(t,Math.floor(r-a*s/n+l)),c=Math.min(i,Math.floor(r+(n-a)*s/n+l));Va(e,r,u,c)}var f=e[r],v=t,d=i;for(bn(e,t,r),e[i]>f&&bn(e,t,i);v<d;){for(bn(e,v,d),v++,d--;e[v]<f;)v++;for(;e[d]>f;)d--}e[t]===f?bn(e,t,d):(d++,bn(e,d,i)),d<=r&&(t=d+1),r<=d&&(i=d-1)}}function Sn(e,r){var t=e.slice();if(Array.isArray(r)){wT(t,r);for(var i=[],n=0;n<r.length;n++)i[n]=qv(t,r[n]);return i}else{var a=$v(t.length,r);return Kv(t,a,0,t.length-1),qv(t,r)}}function Kv(e,r,t,i){r%1==0?Va(e,r,t,i):(r=Math.floor(r),Va(e,r,t,i),Va(e,r+1,r+1,i))}function wT(e,r){for(var t=[0],i=0;i<r.length;i++)t.push($v(e.length,r[i]));t.push(e.length-1),t.sort(bT);for(var n=[0,t.length-1];n.length;){var a=Math.ceil(n.pop()),o=Math.floor(n.pop());if(!(a-o<=1)){var s=Math.floor((o+a)/2);Kv(e,t[s],Math.floor(t[o]),Math.ceil(t[a])),n.push(o,s,s,a)}}}function bT(e,r){return e-r}function $v(e,r){var t=e*r;return r===1?e-1:r===0?0:t%1!=0?Math.ceil(t)-1:e%2==0?t-.5:t}var Qv=function(e){return{low:(0,h.min)(e),high:(0,h.max)(e),q1:Sn(e,.25),q3:Sn(e,.75),median:Sn(e,[.5]),minMax:[(0,h.min)(e),(0,h.max)(e)],quantile:[Sn(e,.25),Sn(e,.75)]}},Jv=function(e,r){var t=_T().create(e,r);return{violinSize:t.map(function(i){return i.y}),violinY:t.map(function(i){return i.x})}},td=function(e){var r=e.xField,t=e.yField,i=e.seriesField,n=e.data,a=e.kde,o={min:a.min,max:a.max,size:a.sampleSize,width:a.width};if(!i){var s=(0,h.groupBy)(n,r);return Object.keys(s).map(function(c){var f=s[c],v=f.map(function(d){return d[t]});return(0,g.__assign)((0,g.__assign)({x:c},Jv(v,o)),Qv(v))})}var l=[],u=(0,h.groupBy)(n,i);return Object.keys(u).forEach(function(c){var f=(0,h.groupBy)(u[c],r);return Object.keys(f).forEach(function(v){var d,p=f[v],y=p.map(function(m){return m[t]});l.push((0,g.__assign)((0,g.__assign)((d={x:v},d[i]=c,d),Jv(y,o)),Qv(y)))})}),l},Ga=["low","high","q1","q3","median"],Wa=[{type:"dodge",marginRatio:1/32}];function ST(e){var r=e.chart,t=e.options;return r.data(td(t)),e}function CT(e){var r=e.chart,t=e.options,i=t.seriesField,n=t.color,a=t.shape,o=a===void 0?"violin":a,s=t.violinStyle,l=t.tooltip,u=t.state,c=r.createView({id:el});return wb({chart:c,options:{xField:Xe,yField:ei,seriesField:i||Xe,sizeField:dT,tooltip:(0,g.__assign)({fields:Ga},l),violin:{style:s,color:n,shape:o},state:u}}),c.geometries[0].adjust(Wa),e}function AT(e){var r=e.chart,t=e.options,i=t.seriesField,n=t.color,a=t.tooltip,o=t.box;if(o===!1)return e;var s=r.createView({id:gT});Fe({chart:s,options:{xField:Xe,yField:Uv,seriesField:i||Xe,tooltip:(0,g.__assign)({fields:Ga},a),state:typeof o=="object"?o.state:{},interval:{color:n,size:1,style:{lineWidth:0}}}}),s.geometries[0].adjust(Wa);var l=r.createView({id:pT});Fe({chart:l,options:{xField:Xe,yField:jv,seriesField:i||Xe,tooltip:(0,g.__assign)({fields:Ga},a),state:typeof o=="object"?o.state:{},interval:{color:n,size:8,style:{fillOpacity:1}}}}),l.geometries[0].adjust(Wa);var u=r.createView({id:yT});return Ge({chart:u,options:{xField:Xe,yField:Zv,seriesField:i||Xe,tooltip:(0,g.__assign)({fields:Ga},a),state:typeof o=="object"?o.state:{},point:{color:n,size:1,style:{fill:"white",lineWidth:0}}}}),u.geometries[0].adjust(Wa),l.axis(!1),s.axis(!1),u.axis(!1),u.legend(!1),s.legend(!1),l.legend(!1),e}function MT(e){var r,t=e.chart,i=e.options,n=i.meta,a=i.xAxis,o=i.yAxis,s={},l=O(s,n,(r={},r[Xe]=(0,g.__assign)((0,g.__assign)({sync:!0},$t(a,Be)),{type:"cat"}),r[ei]=(0,g.__assign)({sync:!0},$t(o,Be)),r[Uv]=(0,g.__assign)({sync:ei},$t(o,Be)),r[jv]=(0,g.__assign)({sync:ei},$t(o,Be)),r[Zv]=(0,g.__assign)({sync:ei},$t(o,Be)),r));return t.scale(l),e}function FT(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=Nt(r,el);return i===!1?a.axis(Xe,!1):a.axis(Xe,i),n===!1?a.axis(ei,!1):a.axis(ei,n),r.axis(!1),e}function ET(e){var r=e.chart,t=e.options,i=t.legend,n=t.seriesField,a=t.shape;if(i===!1)r.legend(!1);else{var o=n||Xe,s=(0,h.omit)(i,["selected"]);(!a||!a.startsWith("hollow"))&&((0,h.get)(s,["marker","style","lineWidth"])||(0,h.set)(s,["marker","style","lineWidth"],0)),r.legend(o,s),(0,h.get)(i,"selected")&&(0,h.each)(r.views,function(l){return l.legend(o,i)})}return e}function TT(e){var r=e.chart,t=Nt(r,el);return le()((0,g.__assign)((0,g.__assign)({},e),{chart:t})),e}function LT(e){var r=e.chart,t=e.options,i=t.animation;return(0,h.each)(r.views,function(n){ln(n,i)}),e}function IT(e){return Et(Xt,ST,CT,AT,MT,me,FT,ET,oe,TT,LT)(e)}var II=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="violin",t}return r.getDefaultOptions=function(){return mT},r.prototype.changeData=function(t){this.updateOption({data:t}),this.chart.changeData(td(this.options))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return IT},r}(kt),Ue="$$yField$$",Ha="$$diffField$$",rl="$$absoluteField$$",il="$$isTotal$$",OT={label:{},leaderLine:{style:{lineWidth:1,stroke:"#8c8c8c",lineDash:[4,2]}},total:{style:{fill:"rgba(0, 0, 0, 0.25)"}},interactions:[{type:"element-active"}],risingFill:"#f4664a",fallingFill:"#30bf78",waterfallStyle:{fill:"rgba(0, 0, 0, 0.25)"},yAxis:{grid:{line:{style:{lineDash:[4,2]}}}}};function PT(e){for(var r=[],t=0;t<e.length;t++){var i=e[t];if(i){var n=t===0?"M":"L";r.push([n,i.x,i.y])}}var a=e[0];return r.push(["L",a.x,a.y]),r.push(["z"]),r}function kT(e){return O({},e.defaultStyle,e.style,{fill:e.color})}Zt("interval","waterfall",{draw:function(e,r){var t=e.customInfo,i=e.points,n=e.nextPoints,a=r.addGroup(),o=this.parsePath(PT(i)),s=kT(e);a.addShape("path",{attrs:(0,g.__assign)((0,g.__assign)({},s),{path:o})});var l=(0,h.get)(t,"leaderLine");if(l&&n){var u=[["M",i[2].x,i[2].y],["L",n[0].x,n[0].y]];i[2].y===n[1].y&&(u[1]=["L",n[1].x,n[1].y]),u=this.parsePath(u),a.addShape("path",{attrs:(0,g.__assign)({path:u},l.style||{})})}return a}});function DT(e,r,t,i,n){var a,o=[];if((0,h.reduce)(e,function(l,u){var c;fr(qe.WARN,(0,h.isNumber)(u[t]),"".concat(u[t]," is not a valid number"));var f=(0,h.isUndefined)(u[t])?null:u[t];return o.push((0,g.__assign)((0,g.__assign)({},u),(c={},c[i]=[l,l+f],c))),l+f},0),o.length&&n){var s=(0,h.get)(o,[[e.length-1],i,[1]]);o.push((a={},a[r]=n.label,a[t]=s,a[i]=[0,s],a))}return o}function ed(e,r,t,i){var n=DT(e,r,t,Ue,i);return n.map(function(a,o){var s;return(0,h.isObject)(a)?(0,g.__assign)((0,g.__assign)({},a),(s={},s[rl]=a[Ue][1],s[Ha]=a[Ue][1]-a[Ue][0],s[il]=o===e.length,s)):a})}function BT(e){var r=e.options,t=r.locale,i=r.total,n=ya(t).get(["waterfall","total"]);return i&&typeof i.label!="string"&&n&&(e.options.total.label=n),e}function RT(e){var r=e.chart,t=e.options,i=t.data,n=t.xField,a=t.yField,o=t.total,s=t.leaderLine,l=t.columnWidthRatio,u=t.waterfallStyle,c=t.risingFill,f=t.fallingFill,v=t.color,d=t.shape,p=t.customInfo;r.data(ed(i,n,a,o));var y=v||function(w){return(0,h.get)(w,[il])?(0,h.get)(o,["style","fill"],""):(0,h.get)(w,[Ue,1])-(0,h.get)(w,[Ue,0])>0?c:f},m=O({},e,{options:{xField:n,yField:Ue,seriesField:n,rawFields:[a,Ha,il,Ue],widthRatio:l,interval:{style:u,shape:d||"waterfall",color:y}}}),x=Fe(m).ext,_=x.geometry;return _.customInfo((0,g.__assign)((0,g.__assign)({},p),{leaderLine:s})),e}function NT(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.xField,s=i.yField,l=i.meta,u=O({},{alias:s},(0,h.get)(l,s));return Et(he((r={},r[o]=n,r[s]=a,r[Ue]=a,r),O({},l,(t={},t[Ue]=u,t[Ha]=u,t[rl]=u,t))))(e)}function zT(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?(r.axis(o,!1),r.axis(Ue,!1)):(r.axis(o,n),r.axis(Ue,n)),e}function VT(e){var r=e.chart,t=e.options,i=t.legend,n=t.total,a=t.risingFill,o=t.fallingFill,s=t.locale,l=ya(s);if(i===!1)r.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}}}];n&&u.push({name:n.label||"",value:"total",marker:{symbol:"square",style:O({},{r:5},(0,h.get)(n,"style"))}}),r.legend(O({},{custom:!0,position:"top",items:u},i)),r.removeInteraction("legend-filter")}return e}function GT(e){var r=e.chart,t=e.options,i=t.label,n=t.labelMode,a=t.xField,o=Me(r,"interval");if(!i)o.label(!1);else{var s=i.callback,l=(0,g.__rest)(i,["callback"]);o.label({fields:n==="absolute"?[rl,a]:[Ha,a],callback:s,cfg:be(l)})}return e}function WT(e){var r=e.chart,t=e.options,i=t.tooltip,n=t.xField,a=t.yField;if(i!==!1){r.tooltip((0,g.__assign)({showCrosshairs:!1,showMarkers:!1,shared:!0,fields:[a]},i));var o=r.geometries[0];(i==null?void 0:i.formatter)?o.tooltip("".concat(n,"*").concat(a),i.formatter):o.tooltip(a)}else r.tooltip(!1);return e}function HT(e){return Et(BT,Xt,RT,NT,zT,VT,WT,GT,Lr,oe,Qt,le())(e)}var OI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="waterfall",t}return r.getDefaultOptions=function(){return OT},r.prototype.changeData=function(t){var i=this.options,n=i.xField,a=i.yField,o=i.total;this.updateOption({data:t}),this.chart.changeData(ed(t,n,a,o))},r.prototype.getSchemaAdaptor=function(){return HT},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(kt),nl="color",YT=O({},kt.getDefaultOptions(),{timeInterval:2e3,legend:!1,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!1,fields:["text","value",nl],formatter:function(e){return{name:e.text,value:e.value}}},wordStyle:{fontFamily:"Verdana",fontWeight:"normal",padding:1,fontSize:[12,60],rotation:[0,90],rotationSteps:2,rotateRatio:.5}}),XT={font:function(){return"serif"},padding:1,size:[500,500],spiral:"archimedean",timeInterval:3e3};function UT(e,r){return r=(0,h.assign)({},XT,r),jT(e,r)}function jT(e,r){var t=oL();["font","fontSize","fontWeight","padding","rotate","size","spiral","timeInterval","random"].forEach(function(l){(0,h.isNil)(r[l])||t[l](r[l])}),t.words(e),r.imageMask&&t.createMask(r.imageMask);var i=t.start(),n=i._tags;n.forEach(function(l){l.x+=r.size[0]/2,l.y+=r.size[1]/2});var a=r.size,o=a[0],s=a[1];return n.push({text:"",value:0,x:0,y:0,opacity:0}),n.push({text:"",value:0,x:o,y:s,opacity:0}),n}var al=Math.PI/180,Cn=1<<11>>5,Ya=1<<11;function ZT(e){return e.text}function qT(){return"serif"}function rd(){return"normal"}function KT(e){return e.value}function $T(){return~~(Math.random()*2)*90}function QT(){return 1}function JT(e,r,t,i){if(!r.sprite){var n=e.context,a=e.ratio;n.clearRect(0,0,(Cn<<5)/a,Ya/a);var o=0,s=0,l=0,u=t.length;for(--i;++i<u;){r=t[i],n.save(),n.font=r.style+" "+r.weight+" "+~~((r.size+1)/a)+"px "+r.font;var c=n.measureText(r.text+"m").width*a,f=r.size<<1;if(r.rotate){var v=Math.sin(r.rotate*al),d=Math.cos(r.rotate*al),p=c*d,y=c*v,m=f*d,x=f*v;c=Math.max(Math.abs(p+x),Math.abs(p-x))+31>>5<<5,f=~~Math.max(Math.abs(y+m),Math.abs(y-m))}else c=c+31>>5<<5;if(f>l&&(l=f),o+c>=Cn<<5&&(o=0,s+=l,l=0),s+f>=Ya)break;n.translate((o+(c>>1))/a,(s+(f>>1))/a),r.rotate&&n.rotate(r.rotate*al),n.fillText(r.text,0,0),r.padding&&(n.lineWidth=2*r.padding,n.strokeText(r.text,0,0)),n.restore(),r.width=c,r.height=f,r.xoff=o,r.yoff=s,r.x1=c>>1,r.y1=f>>1,r.x0=-r.x1,r.y0=-r.y1,r.hasText=!0,o+=c}for(var _=n.getImageData(0,0,(Cn<<5)/a,Ya/a).data,w=[];--i>=0;)if(r=t[i],!!r.hasText){for(var c=r.width,b=c>>5,f=r.y1-r.y0,S=0;S<f*b;S++)w[S]=0;if(o=r.xoff,o==null)return;s=r.yoff;for(var C=0,A=-1,F=0;F<f;F++){for(var S=0;S<c;S++){var P=b*F+(S>>5),I=_[(s+F)*(Cn<<5)+(o+S)<<2]?1<<31-S%32:0;w[P]|=I,C|=I}C?A=F:(r.y0++,f--,F--,s++)}r.y1=r.y0+A,r.sprite=w.slice(0,(r.y1-r.y0)*b)}}}function tL(e,r,t){t>>=5;for(var i=e.sprite,n=e.width>>5,a=e.x-(n<<4),o=a&127,s=32-o,l=e.y1-e.y0,u=(e.y+e.y0)*t+(a>>5),c,f=0;f<l;f++){c=0;for(var v=0;v<=n;v++)if((c<<s|(v<n?(c=i[f*n+v])>>>o:0))&r[u+v])return!0;u+=t}return!1}function eL(e,r){var t=e[0],i=e[1];r.x+r.x0<t.x&&(t.x=r.x+r.x0),r.y+r.y0<t.y&&(t.y=r.y+r.y0),r.x+r.x1>i.x&&(i.x=r.x+r.x1),r.y+r.y1>i.y&&(i.y=r.y+r.y1)}function rL(e,r){return e.x+e.x1>r[0].x&&e.x+e.x0<r[1].x&&e.y+e.y1>r[0].y&&e.y+e.y0<r[1].y}function id(e){var r=e[0]/e[1];return function(t){return[r*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function iL(e){var r=4,t=r*e[0]/e[1],i=0,n=0;return function(a){var o=a<0?-1:1;switch(Math.sqrt(1+4*o*a)-o&3){case 0:i+=t;break;case 1:n+=r;break;case 2:i-=t;break;default:n-=r;break}return[i,n]}}function nd(e){for(var r=[],t=-1;++t<e;)r[t]=0;return r}function nL(){return document.createElement("canvas")}function nr(e){return(0,h.isFunction)(e)?e:function(){return e}}var aL={archimedean:id,rectangular:iL};function oL(){var e=[256,256],r=qT,t=KT,i=rd,n=$T,a=QT,o=id,s=Math.random,l=[],u=Infinity,c=ZT,f=rd,v=nL,d={};d.start=function(){var m=e[0],x=e[1],_=p(v()),w=d.board?d.board:nd((e[0]>>5)*e[1]),b=l.length,S=[],C=l.map(function(I,V,Z){return I.text=c.call(this,I,V,Z),I.font=r.call(this,I,V,Z),I.style=f.call(this,I,V,Z),I.weight=i.call(this,I,V,Z),I.rotate=n.call(this,I,V,Z),I.size=~~t.call(this,I,V,Z),I.padding=a.call(this,I,V,Z),I}).sort(function(I,V){return V.size-I.size}),A=-1,F=d.board?[{x:0,y:0},{x:m,y:x}]:null;P();function P(){for(var I=Date.now();Date.now()-I<u&&++A<b;){var V=C[A];V.x=m*(s()+.5)>>1,V.y=x*(s()+.5)>>1,JT(_,V,C,A),V.hasText&&y(w,V,F)&&(S.push(V),F?d.hasImage||eL(F,V):F=[{x:V.x+V.x0,y:V.y+V.y0},{x:V.x+V.x1,y:V.y+V.y1}],V.x-=e[0]>>1,V.y-=e[1]>>1)}d._tags=S,d._bounds=F}return d};function p(m){m.width=m.height=1;var x=Math.sqrt(m.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,1,1).data.length>>2);m.width=(Cn<<5)/x,m.height=Ya/x;var _=m.getContext("2d",{willReadFrequently:!0});return _.fillStyle=_.strokeStyle="red",_.textAlign="center",{context:_,ratio:x}}function y(m,x,_){for(var w=x.x,b=x.y,S=Math.sqrt(e[0]*e[0]+e[1]*e[1]),C=o(e),A=s()<.5?1:-1,F,P=-A,I,V;(F=C(P+=A))&&(I=~~F[0],V=~~F[1],!(Math.min(Math.abs(I),Math.abs(V))>=S));)if(x.x=w+I,x.y=b+V,!(x.x+x.x0<0||x.y+x.y0<0||x.x+x.x1>e[0]||x.y+x.y1>e[1])&&(!_||!tL(x,m,e[0]))&&(!_||rL(x,_))){for(var Z=x.sprite,vt=x.width>>5,yt=e[0]>>5,Bt=x.x-(vt<<4),G=Bt&127,at=32-G,mt=x.y1-x.y0,ut=void 0,pt=(x.y+x.y0)*yt+(Bt>>5),At=0;At<mt;At++){ut=0;for(var Gt=0;Gt<=vt;Gt++)m[pt+Gt]|=ut<<at|(Gt<vt?(ut=Z[At*vt+Gt])>>>G:0);pt+=yt}return delete x.sprite,!0}return!1}return d.createMask=function(m){var x=document.createElement("canvas"),_=e[0],w=e[1];if(!(!_||!w)){var b=_>>5,S=nd((_>>5)*w);x.width=_,x.height=w;var C=x.getContext("2d");C.drawImage(m,0,0,m.width,m.height,0,0,_,w);for(var A=C.getImageData(0,0,_,w).data,F=0;F<w;F++)for(var P=0;P<_;P++){var I=b*F+(P>>5),V=F*_+P<<2,Z=A[V]>=250&&A[V+1]>=250&&A[V+2]>=250,vt=Z?1<<31-P%32:0;S[I]|=vt}d.board=S,d.hasImage=!0}},d.timeInterval=function(m){u=m==null?Infinity:m},d.words=function(m){l=m},d.size=function(m){e=[+m[0],+m[1]]},d.font=function(m){r=nr(m)},d.fontWeight=function(m){i=nr(m)},d.rotate=function(m){n=nr(m)},d.spiral=function(m){o=aL[m]||m},d.fontSize=function(m){t=nr(m)},d.padding=function(m){a=nr(m)},d.random=function(m){s=nr(m)},d}function ad(e){var r=e.options,t=e.chart,i=t,n=i.width,a=i.height,o=i.padding,s=i.appendPadding,l=i.ele,u=r.data,c=r.imageMask,f=r.wordField,v=r.weightField,d=r.colorField,p=r.wordStyle,y=r.timeInterval,m=r.random,x=r.spiral,_=r.autoFit,w=_===void 0?!0:_,b=r.placementStrategy;if(!u||!u.length)return[];var S=p.fontFamily,C=p.fontWeight,A=p.padding,F=p.fontSize,P=hL(u,v),I=[dL(P),gL(P)],V=u.map(function(yt){return{text:yt[f],value:yt[v],color:yt[d],datum:yt}}),Z={imageMask:c,font:S,fontSize:cL(F,I),fontWeight:C,size:sL({width:n,height:a,padding:o,appendPadding:s,autoFit:w,container:l}),padding:A,timeInterval:y,random:m,spiral:x,rotate:fL(r)};if((0,h.isFunction)(b)){var vt=V.map(function(yt,Bt,G){return(0,g.__assign)((0,g.__assign)((0,g.__assign)({},yt),{hasText:!!yt.text,font:nr(Z.font)(yt,Bt,G),weight:nr(Z.fontWeight)(yt,Bt,G),rotate:nr(Z.rotate)(yt,Bt,G),size:nr(Z.fontSize)(yt,Bt,G),style:"normal"}),b.call(t,yt,Bt,G))});return vt.push({text:"",value:0,x:0,y:0,opacity:0}),vt.push({text:"",value:0,x:Z.size[0],y:Z.size[1],opacity:0}),vt}return UT(V,Z)}function sL(e){var r=e.width,t=e.height,i=e.container,n=e.autoFit,a=e.padding,o=e.appendPadding;if(n){var s=us(i);r=s.width,t=s.height}r=r||400,t=t||400;var l=lL({padding:a,appendPadding:o}),u=l[0],c=l[1],f=l[2],v=l[3],d=[r-(v+c),t-(u+f)];return d}function lL(e){var r=Tr(e.padding),t=Tr(e.appendPadding),i=r[0]+t[0],n=r[1]+t[1],a=r[2]+t[2],o=r[3]+t[3];return[i,n,a,o]}function uL(e){return new Promise(function(r,t){if(e instanceof HTMLImageElement){r(e);return}if((0,h.isString)(e)){var i=new Image;i.crossOrigin="anonymous",i.src=e,i.onload=function(){r(i)},i.onerror=function(){fr(qe.ERROR,!1,"image %s load failed !!!",e),t()};return}fr(qe.WARN,e===void 0,"The type of imageMask option must be String or HTMLImageElement."),t()})}function cL(e,r){if((0,h.isFunction)(e))return e;if((0,h.isArray)(e)){var t=e[0],i=e[1];if(!r)return function(){return(i+t)/2};var n=r[0],a=r[1];return a===n?function(){return(i+t)/2}:function(s){var l=s.value;return(i-t)/(a-n)*(l-n)+t}}return function(){return e}}function hL(e,r){return e.map(function(t){return t[r]}).filter(function(t){return typeof t=="number"&&!isNaN(t)})}function fL(e){var r=vL(e),t=r.rotation,i=r.rotationSteps;if(!(0,h.isArray)(t))return t;var n=t[0],a=t[1],o=i===1?0:(a-n)/(i-1);return function(){return a===n?a:Math.floor(Math.random()*i)*o}}function vL(e){var r=e.wordStyle.rotationSteps;return r<1&&(fr(qe.WARN,!1,"The rotationSteps option must be greater than or equal to 1."),r=1),{rotation:e.wordStyle.rotation,rotationSteps:r}}function dL(e){return Math.min.apply(Math,e)}function gL(e){return Math.max.apply(Math,e)}function pL(e){var r=e.chart,t=e.options,i=t.colorField,n=t.color,a=ad(e);r.data(a);var o=O({},e,{options:{xField:"x",yField:"y",seriesField:i&&nl,rawFields:(0,h.isFunction)(n)&&(0,g.__spreadArray)((0,g.__spreadArray)([],(0,h.get)(t,"rawFields",[]),!0),["datum"],!1),point:{color:n,shape:"word-cloud"}}}),s=Ge(o).ext;return s.geometry.label(!1),r.coordinate().reflect("y"),r.axis(!1),e}function yL(e){return Et(he({x:{nice:!1},y:{nice:!1}}))(e)}function mL(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField;return i===!1?r.legend(!1):n&&r.legend(nl,i),e}function xL(e){Et(pL,yL,me,mL,oe,Qt,Xt,Lr)(e)}Zt("point","word-cloud",{draw:function(e,r){var t=e.x,i=e.y,n=r.addShape("text",{attrs:(0,g.__assign)((0,g.__assign)({},_L(e)),{x:t,y:i})}),a=e.data.rotate;return typeof a=="number"&&ke.rotate(n,a*Math.PI/180),n}});function _L(e){return{fontSize:e.data.size,text:e.data.text,textAlign:"center",fontFamily:e.data.font,fontWeight:e.data.weight,fill:e.color||e.defaultStyle.stroke,textBaseline:"alphabetic"}}var PI=function(e){(0,g.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="word-cloud",t}return r.getDefaultOptions=function(){return YT},r.prototype.changeData=function(t){this.updateOption({data:t}),this.options.imageMask?this.render():this.chart.changeData(ad({chart:this.chart,options:this.options}))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.render=function(){var t=this;return new Promise(function(i){var n=t.options.imageMask;if(!n){e.prototype.render.call(t),i();return}var a=function(o){t.options=(0,g.__assign)((0,g.__assign)({},t.options),{imageMask:o||null}),e.prototype.render.call(t),i()};uL(n).then(a).catch(a)})},r.prototype.getSchemaAdaptor=function(){return xL},r.prototype.triggerResize=function(){var t=this;this.chart.destroyed||(this.execAdaptor(),window.setTimeout(function(){e.prototype.triggerResize.call(t)}))},r}(kt),kI=function(e){(0,g.__extends)(r,e);function r(t,i,n,a){var o=e.call(this,t,O({},a,i))||this;return o.type="g2-plot",o.defaultOptions=a,o.adaptor=n,o}return r.prototype.getDefaultOptions=function(){return this.defaultOptions},r.prototype.getSchemaAdaptor=function(){return this.adaptor},r}(kt),DI="2.4.29";_h("en-US",mb),_h("zh-CN",xb);var BI={scale:he,legend:Ur,tooltip:me,annotation:le,interaction:oe,theme:Xt,animation:Qt}},80638:function(){},15746:function(Pt,st,M){"use strict";var B=M(21584);st.Z=B.Z},89032:function(Pt,st,M){"use strict";var B=M(38663),it=M.n(B),wt=M(6999)},99134:function(Pt,st,M){"use strict";var B=M(67294),it=(0,B.createContext)({});st.Z=it},21584:function(Pt,st,M){"use strict";var B=M(96156),it=M(22122),wt=M(90484),_t=M(94184),ft=M.n(_t),ct=M(67294),et=M(53124),K=M(99134),g=function(N,$){var L={};for(var X in N)Object.prototype.hasOwnProperty.call(N,X)&&$.indexOf(X)<0&&(L[X]=N[X]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ot=0,X=Object.getOwnPropertySymbols(N);ot<X.length;ot++)$.indexOf(X[ot])<0&&Object.prototype.propertyIsEnumerable.call(N,X[ot])&&(L[X[ot]]=N[X[ot]]);return L};function h(N){return typeof N=="number"?"".concat(N," ").concat(N," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(N)?"0 0 ".concat(N):N}var J=["xs","sm","md","lg","xl","xxl"],E=ct.forwardRef(function(N,$){var L,X=ct.useContext(et.E_),ot=X.getPrefixCls,ht=X.direction,bt=ct.useContext(K.Z),rt=bt.gutter,Mt=bt.wrap,zt=bt.supportFlexGap,qt=N.prefixCls,Yt=N.span,se=N.order,jt=N.offset,T=N.push,k=N.pull,tt=N.className,Y=N.children,R=N.flex,D=N.style,j=g(N,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),q=ot("col",qt),dt={};J.forEach(function(Q){var nt,U={},It=N[Q];typeof It=="number"?U.span=It:(0,wt.Z)(It)==="object"&&(U=It||{}),delete j[Q],dt=(0,it.Z)((0,it.Z)({},dt),(nt={},(0,B.Z)(nt,"".concat(q,"-").concat(Q,"-").concat(U.span),U.span!==void 0),(0,B.Z)(nt,"".concat(q,"-").concat(Q,"-order-").concat(U.order),U.order||U.order===0),(0,B.Z)(nt,"".concat(q,"-").concat(Q,"-offset-").concat(U.offset),U.offset||U.offset===0),(0,B.Z)(nt,"".concat(q,"-").concat(Q,"-push-").concat(U.push),U.push||U.push===0),(0,B.Z)(nt,"".concat(q,"-").concat(Q,"-pull-").concat(U.pull),U.pull||U.pull===0),(0,B.Z)(nt,"".concat(q,"-rtl"),ht==="rtl"),nt))});var St=ft()(q,(L={},(0,B.Z)(L,"".concat(q,"-").concat(Yt),Yt!==void 0),(0,B.Z)(L,"".concat(q,"-order-").concat(se),se),(0,B.Z)(L,"".concat(q,"-offset-").concat(jt),jt),(0,B.Z)(L,"".concat(q,"-push-").concat(T),T),(0,B.Z)(L,"".concat(q,"-pull-").concat(k),k),L),tt,dt),W={};if(rt&&rt[0]>0){var H=rt[0]/2;W.paddingLeft=H,W.paddingRight=H}if(rt&&rt[1]>0&&!zt){var z=rt[1]/2;W.paddingTop=z,W.paddingBottom=z}return R&&(W.flex=h(R),Mt===!1&&!W.minWidth&&(W.minWidth=0)),ct.createElement("div",(0,it.Z)({},j,{style:(0,it.Z)((0,it.Z)({},W),D),className:St,ref:$}),Y)});st.Z=E},92820:function(Pt,st,M){"use strict";var B=M(22122),it=M(96156),wt=M(90484),_t=M(28481),ft=M(94184),ct=M.n(ft),et=M(67294),K=M(53124),g=M(98082),h=M(24308),J=M(93355),E=M(99134),N=function(ht,bt){var rt={};for(var Mt in ht)Object.prototype.hasOwnProperty.call(ht,Mt)&&bt.indexOf(Mt)<0&&(rt[Mt]=ht[Mt]);if(ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var zt=0,Mt=Object.getOwnPropertySymbols(ht);zt<Mt.length;zt++)bt.indexOf(Mt[zt])<0&&Object.prototype.propertyIsEnumerable.call(ht,Mt[zt])&&(rt[Mt[zt]]=ht[Mt[zt]]);return rt},$=(0,J.b)("top","middle","bottom","stretch"),L=(0,J.b)("start","end","center","space-around","space-between","space-evenly");function X(ht,bt){var rt=et.useState(typeof ht=="string"?ht:""),Mt=(0,_t.Z)(rt,2),zt=Mt[0],qt=Mt[1],Yt=function(){if(typeof ht=="string"&&qt(ht),(0,wt.Z)(ht)==="object")for(var jt=0;jt<h.c4.length;jt++){var T=h.c4[jt];if(!!bt[T]){var k=ht[T];if(k!==void 0){qt(k);return}}}};return et.useEffect(function(){Yt()},[JSON.stringify(ht),bt]),zt}var ot=et.forwardRef(function(ht,bt){var rt,Mt=ht.prefixCls,zt=ht.justify,qt=ht.align,Yt=ht.className,se=ht.style,jt=ht.children,T=ht.gutter,k=T===void 0?0:T,tt=ht.wrap,Y=N(ht,["prefixCls","justify","align","className","style","children","gutter","wrap"]),R=et.useContext(K.E_),D=R.getPrefixCls,j=R.direction,q=et.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),dt=(0,_t.Z)(q,2),St=dt[0],W=dt[1],H=et.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),z=(0,_t.Z)(H,2),Q=z[0],nt=z[1],U=X(qt,Q),It=X(zt,Q),Tt=(0,g.Z)(),Ft=et.useRef(k);et.useEffect(function(){var ce=h.ZP.subscribe(function(ve){nt(ve);var de=Ft.current||0;(!Array.isArray(de)&&(0,wt.Z)(de)==="object"||Array.isArray(de)&&((0,wt.Z)(de[0])==="object"||(0,wt.Z)(de[1])==="object"))&&W(ve)});return function(){return h.ZP.unsubscribe(ce)}},[]);var lt=function(){var ve=[void 0,void 0],de=Array.isArray(k)?k:[k,void 0];return de.forEach(function(Te,ii){if((0,wt.Z)(Te)==="object")for(var ni=0;ni<h.c4.length;ni++){var ai=h.c4[ni];if(St[ai]&&Te[ai]!==void 0){ve[ii]=Te[ai];break}}else ve[ii]=Te}),ve},Ct=D("row",Mt),gt=lt(),Rt=ct()(Ct,(rt={},(0,it.Z)(rt,"".concat(Ct,"-no-wrap"),tt===!1),(0,it.Z)(rt,"".concat(Ct,"-").concat(It),It),(0,it.Z)(rt,"".concat(Ct,"-").concat(U),U),(0,it.Z)(rt,"".concat(Ct,"-rtl"),j==="rtl"),rt),Yt),Ut={},te=gt[0]!=null&&gt[0]>0?gt[0]/-2:void 0,ae=gt[1]!=null&&gt[1]>0?gt[1]/-2:void 0;if(te&&(Ut.marginLeft=te,Ut.marginRight=te),Tt){var we=(0,_t.Z)(gt,2);Ut.rowGap=we[1]}else ae&&(Ut.marginTop=ae,Ut.marginBottom=ae);var re=(0,_t.Z)(gt,2),xe=re[0],Se=re[1],_e=et.useMemo(function(){return{gutter:[xe,Se],wrap:tt,supportFlexGap:Tt}},[xe,Se,tt,Tt]);return et.createElement(E.Z.Provider,{value:_e},et.createElement("div",(0,B.Z)({},Y,{className:Rt,style:(0,B.Z)((0,B.Z)({},Ut),se),ref:bt}),jt))});st.Z=ot},6999:function(Pt,st,M){"use strict";var B=M(38663),it=M.n(B),wt=M(80638),_t=M.n(wt)},71230:function(Pt,st,M){"use strict";var B=M(92820);st.Z=B.Z},13062:function(Pt,st,M){"use strict";var B=M(38663),it=M.n(B),wt=M(6999)},56645:function(Pt,st){(function(M,B){B(st)})(this,function(M){"use strict";function B(T,k){return it(T)||wt(T,k)||_t()}function it(T){if(Array.isArray(T))return T}function wt(T,k){var tt=[],Y=!0,R=!1,D=void 0;try{for(var j=T[Symbol.iterator](),q;!(Y=(q=j.next()).done)&&(tt.push(q.value),!(k&&tt.length===k));Y=!0);}catch(dt){R=!0,D=dt}finally{try{!Y&&j.return!=null&&j.return()}finally{if(R)throw D}}return tt}function _t(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function ft(T,k,tt,Y){T=T.filter(function(nt,U){var It=k(nt,U),Tt=tt(nt,U);return It!=null&&isFinite(It)&&Tt!=null&&isFinite(Tt)}),Y&&T.sort(function(nt,U){return k(nt)-k(U)});for(var R=T.length,D=new Float64Array(R),j=new Float64Array(R),q=0,dt=0,St,W,H,z=0;z<R;)H=T[z],D[z]=St=+k(H,z,T),j[z]=W=+tt(H,z,T),++z,q+=(St-q)/z,dt+=(W-dt)/z;for(var Q=0;Q<R;++Q)D[Q]-=q,j[Q]-=dt;return[D,j,q,dt]}function ct(T,k,tt,Y){for(var R=0,D=0,j=T.length;D<j;D++){var q=T[D],dt=+k(q,D,T),St=+tt(q,D,T);dt!=null&&isFinite(dt)&&St!=null&&isFinite(St)&&Y(dt,St,R++)}}function et(T,k,tt,Y,R){var D=0,j=0;return ct(T,k,tt,function(q,dt){var St=dt-R(q),W=dt-Y;D+=St*St,j+=W*W}),1-D/j}function K(T){return Math.atan2(T[1][1]-T[0][1],T[1][0]-T[0][0])*180/Math.PI}function g(T){return[(T[0][0]+T[1][0])/2,(T[0][1]+T[1][1])/2]}function h(T,k,tt){for(var Y=Math.log(k-T)*Math.LOG10E+1|0,R=1*Math.pow(10,-Y/2-1),D=1e4,j=[dt(T),dt(k)],q=0;St(j)&&q<D;);return j;function dt(W){return[W,tt(W)]}function St(W){q++;for(var H=W.length,z=!1,Q=0;Q<H-1;Q++){var nt=W[Q],U=W[Q+1],It=g([nt,U]),Tt=dt(It[0]),Ft=K([nt,It]),lt=K([nt,Tt]),Ct=Math.abs(Ft-lt);Ct>R&&(W.splice(Q+1,0,Tt),z=!0)}return z}}function J(T,k,tt,Y){var R=Y-T*T,D=Math.abs(R)<1e-24?0:(tt-T*k)/R,j=k-D*T;return[j,D]}function E(){var T=function(D){return D[0]},k=function(D){return D[1]},tt;function Y(R){var D=0,j=0,q=0,dt=0,St=0,W=0,H=tt?+tt[0]:Infinity,z=tt?+tt[1]:-Infinity;ct(R,T,k,function(lt,Ct){var gt=Math.log(Ct),Rt=lt*Ct;++D,j+=(Ct-j)/D,dt+=(Rt-dt)/D,W+=(lt*Rt-W)/D,q+=(Ct*gt-q)/D,St+=(Rt*gt-St)/D,tt||(lt<H&&(H=lt),lt>z&&(z=lt))});var Q=J(dt/j,q/j,St/j,W/j),nt=B(Q,2),U=nt[0],It=nt[1];U=Math.exp(U);var Tt=function(Ct){return U*Math.exp(It*Ct)},Ft=h(H,z,Tt);return Ft.a=U,Ft.b=It,Ft.predict=Tt,Ft.rSquared=et(R,T,k,j,Tt),Ft}return Y.domain=function(R){return arguments.length?(tt=R,Y):tt},Y.x=function(R){return arguments.length?(T=R,Y):T},Y.y=function(R){return arguments.length?(k=R,Y):k},Y}function N(){var T=function(D){return D[0]},k=function(D){return D[1]},tt;function Y(R){var D=0,j=0,q=0,dt=0,St=0,W=tt?+tt[0]:Infinity,H=tt?+tt[1]:-Infinity;ct(R,T,k,function(Ft,lt){++D,j+=(Ft-j)/D,q+=(lt-q)/D,dt+=(Ft*lt-dt)/D,St+=(Ft*Ft-St)/D,tt||(Ft<W&&(W=Ft),Ft>H&&(H=Ft))});var z=J(j,q,dt,St),Q=B(z,2),nt=Q[0],U=Q[1],It=function(lt){return U*lt+nt},Tt=[[W,It(W)],[H,It(H)]];return Tt.a=U,Tt.b=nt,Tt.predict=It,Tt.rSquared=et(R,T,k,q,It),Tt}return Y.domain=function(R){return arguments.length?(tt=R,Y):tt},Y.x=function(R){return arguments.length?(T=R,Y):T},Y.y=function(R){return arguments.length?(k=R,Y):k},Y}function $(T){T.sort(function(tt,Y){return tt-Y});var k=T.length/2;return k%1==0?(T[k-1]+T[k])/2:T[Math.floor(k)]}var L=2,X=1e-12;function ot(){var T=function(D){return D[0]},k=function(D){return D[1]},tt=.3;function Y(R){for(var D=ft(R,T,k,!0),j=B(D,4),q=j[0],dt=j[1],St=j[2],W=j[3],H=q.length,z=Math.max(2,~~(tt*H)),Q=new Float64Array(H),nt=new Float64Array(H),U=new Float64Array(H).fill(1),It=-1;++It<=L;){for(var Tt=[0,z-1],Ft=0;Ft<H;++Ft){for(var lt=q[Ft],Ct=Tt[0],gt=Tt[1],Rt=lt-q[Ct]>q[gt]-lt?Ct:gt,Ut=0,te=0,ae=0,we=0,re=0,xe=1/Math.abs(q[Rt]-lt||1),Se=Ct;Se<=gt;++Se){var _e=q[Se],ce=dt[Se],ve=ht(Math.abs(lt-_e)*xe)*U[Se],de=_e*ve;Ut+=ve,te+=de,ae+=ce*ve,we+=ce*de,re+=_e*de}var Te=J(te/Ut,ae/Ut,we/Ut,re/Ut),ii=B(Te,2),ni=ii[0],ai=ii[1];Q[Ft]=ni+ai*lt,nt[Ft]=Math.abs(dt[Ft]-Q[Ft]),bt(q,Ft+1,Tt)}if(It===L)break;var Xa=$(nt);if(Math.abs(Xa)<X)break;for(var Oi=0,Pi,Ua;Oi<H;++Oi)Pi=nt[Oi]/(6*Xa),U[Oi]=Pi>=1?X:(Ua=1-Pi*Pi)*Ua}return rt(q,Q,St,W)}return Y.bandwidth=function(R){return arguments.length?(tt=R,Y):tt},Y.x=function(R){return arguments.length?(T=R,Y):T},Y.y=function(R){return arguments.length?(k=R,Y):k},Y}function ht(T){return(T=1-T*T*T)*T*T}function bt(T,k,tt){var Y=T[k],R=tt[0],D=tt[1]+1;if(!(D>=T.length))for(;k>R&&T[D]-Y<=Y-T[R];)tt[0]=++R,tt[1]=D,++D}function rt(T,k,tt,Y){for(var R=T.length,D=[],j=0,q=0,dt=[],St;j<R;++j)St=T[j]+tt,dt[0]===St?dt[1]+=(k[j]-dt[1])/++q:(q=0,dt[1]+=Y,dt=[St,k[j]],D.push(dt));return dt[1]+=Y,D}function Mt(){var T=function(j){return j[0]},k=function(j){return j[1]},tt=Math.E,Y;function R(D){var j=0,q=0,dt=0,St=0,W=0,H=Y?+Y[0]:Infinity,z=Y?+Y[1]:-Infinity,Q=Math.log(tt);ct(D,T,k,function(Ct,gt){var Rt=Math.log(Ct)/Q;++j,q+=(Rt-q)/j,dt+=(gt-dt)/j,St+=(Rt*gt-St)/j,W+=(Rt*Rt-W)/j,Y||(Ct<H&&(H=Ct),Ct>z&&(z=Ct))});var nt=J(q,dt,St,W),U=B(nt,2),It=U[0],Tt=U[1],Ft=function(gt){return Tt*Math.log(gt)/Q+It},lt=h(H,z,Ft);return lt.a=Tt,lt.b=It,lt.predict=Ft,lt.rSquared=et(D,T,k,dt,Ft),lt}return R.domain=function(D){return arguments.length?(Y=D,R):Y},R.x=function(D){return arguments.length?(T=D,R):T},R.y=function(D){return arguments.length?(k=D,R):k},R.base=function(D){return arguments.length?(tt=D,R):tt},R}function zt(){var T=function(D){return D[0]},k=function(D){return D[1]},tt;function Y(R){var D=ft(R,T,k),j=B(D,4),q=j[0],dt=j[1],St=j[2],W=j[3],H=q.length,z=0,Q=0,nt=0,U=0,It=0,Tt,Ft,lt,Ct;for(Tt=0;Tt<H;)Ft=q[Tt],lt=dt[Tt++],Ct=Ft*Ft,z+=(Ct-z)/Tt,Q+=(Ct*Ft-Q)/Tt,nt+=(Ct*Ct-nt)/Tt,U+=(Ft*lt-U)/Tt,It+=(Ct*lt-It)/Tt;var gt=0,Rt=0,Ut=tt?+tt[0]:Infinity,te=tt?+tt[1]:-Infinity;ct(R,T,k,function(ve,de){Rt++,gt+=(de-gt)/Rt,tt||(ve<Ut&&(Ut=ve),ve>te&&(te=ve))});var ae=nt-z*z,we=z*ae-Q*Q,re=(It*z-U*Q)/we,xe=(U*ae-It*Q)/we,Se=-re*z,_e=function(de){return de=de-St,re*de*de+xe*de+Se+W},ce=h(Ut,te,_e);return ce.a=re,ce.b=xe-2*re*St,ce.c=Se-xe*St+re*St*St+W,ce.predict=_e,ce.rSquared=et(R,T,k,gt,_e),ce}return Y.domain=function(R){return arguments.length?(tt=R,Y):tt},Y.x=function(R){return arguments.length?(T=R,Y):T},Y.y=function(R){return arguments.length?(k=R,Y):k},Y}function qt(){var T=function(j){return j[0]},k=function(j){return j[1]},tt=3,Y;function R(D){if(tt===1){var j=N().x(T).y(k).domain(Y)(D);return j.coefficients=[j.b,j.a],delete j.a,delete j.b,j}if(tt===2){var q=zt().x(T).y(k).domain(Y)(D);return q.coefficients=[q.c,q.b,q.a],delete q.a,delete q.b,delete q.c,q}var dt=ft(D,T,k),St=B(dt,4),W=St[0],H=St[1],z=St[2],Q=St[3],nt=W.length,U=[],It=[],Tt=tt+1,Ft=0,lt=0,Ct=Y?+Y[0]:Infinity,gt=Y?+Y[1]:-Infinity;ct(D,T,k,function(_e,ce){++lt,Ft+=(ce-Ft)/lt,Y||(_e<Ct&&(Ct=_e),_e>gt&&(gt=_e))});var Rt,Ut,te,ae,we;for(Rt=0;Rt<Tt;++Rt){for(te=0,ae=0;te<nt;++te)ae+=Math.pow(W[te],Rt)*H[te];for(U.push(ae),we=new Float64Array(Tt),Ut=0;Ut<Tt;++Ut){for(te=0,ae=0;te<nt;++te)ae+=Math.pow(W[te],Rt+Ut);we[Ut]=ae}It.push(we)}It.push(U);var re=se(It),xe=function(ce){ce-=z;var ve=Q+re[0]+re[1]*ce+re[2]*ce*ce;for(Rt=3;Rt<Tt;++Rt)ve+=re[Rt]*Math.pow(ce,Rt);return ve},Se=h(Ct,gt,xe);return Se.coefficients=Yt(Tt,re,-z,Q),Se.predict=xe,Se.rSquared=et(D,T,k,Ft,xe),Se}return R.domain=function(D){return arguments.length?(Y=D,R):Y},R.x=function(D){return arguments.length?(T=D,R):T},R.y=function(D){return arguments.length?(k=D,R):k},R.order=function(D){return arguments.length?(tt=D,R):tt},R}function Yt(T,k,tt,Y){var R=Array(T),D,j,q,dt;for(D=0;D<T;++D)R[D]=0;for(D=T-1;D>=0;--D)for(q=k[D],dt=1,R[D]+=q,j=1;j<=D;++j)dt*=(D+1-j)/j,R[D-j]+=q*Math.pow(tt,j)*dt;return R[0]+=Y,R}function se(T){var k=T.length-1,tt=[],Y,R,D,j,q;for(Y=0;Y<k;++Y){for(j=Y,R=Y+1;R<k;++R)Math.abs(T[Y][R])>Math.abs(T[Y][j])&&(j=R);for(D=Y;D<k+1;++D)q=T[D][Y],T[D][Y]=T[D][j],T[D][j]=q;for(R=Y+1;R<k;++R)for(D=k;D>=Y;D--)T[D][R]-=T[D][Y]*T[Y][R]/T[Y][Y]}for(R=k-1;R>=0;--R){for(q=0,D=R+1;D<k;++D)q+=T[D][R]*tt[D];tt[R]=(T[k][R]-q)/T[R][R]}return tt}function jt(){var T=function(D){return D[0]},k=function(D){return D[1]},tt;function Y(R){var D=0,j=0,q=0,dt=0,St=0,W=0,H=tt?+tt[0]:Infinity,z=tt?+tt[1]:-Infinity;ct(R,T,k,function(lt,Ct){var gt=Math.log(lt),Rt=Math.log(Ct);++D,j+=(gt-j)/D,q+=(Rt-q)/D,dt+=(gt*Rt-dt)/D,St+=(gt*gt-St)/D,W+=(Ct-W)/D,tt||(lt<H&&(H=lt),lt>z&&(z=lt))});var Q=J(j,q,dt,St),nt=B(Q,2),U=nt[0],It=nt[1];U=Math.exp(U);var Tt=function(Ct){return U*Math.pow(Ct,It)},Ft=h(H,z,Tt);return Ft.a=U,Ft.b=It,Ft.predict=Tt,Ft.rSquared=et(R,T,k,W,Tt),Ft}return Y.domain=function(R){return arguments.length?(tt=R,Y):tt},Y.x=function(R){return arguments.length?(T=R,Y):T},Y.y=function(R){return arguments.length?(k=R,Y):k},Y}M.regressionExp=E,M.regressionLinear=N,M.regressionLoess=ot,M.regressionLog=Mt,M.regressionPoly=qt,M.regressionPow=jt,M.regressionQuad=zt,Object.defineProperty(M,"__esModule",{value:!0})})},87026:function(Pt,st){(function(M,B){B(st)})(this,function(M){"use strict";function B(N,$,L,X){X=X||{};var ot=X.maxIterations||100,ht=X.tolerance||1e-10,bt=N($),rt=N(L),Mt=L-$;if(bt*rt>0)throw"Initial bisect points must have opposite signs";if(bt===0)return $;if(rt===0)return L;for(var zt=0;zt<ot;++zt){Mt/=2;var qt=$+Mt,Yt=N(qt);if(Yt*bt>=0&&($=qt),Math.abs(Mt)<ht||Yt===0)return qt}return $+Mt}function it(N){for(var $=new Array(N),L=0;L<N;++L)$[L]=0;return $}function wt(N,$){return it(N).map(function(){return it($)})}function _t(N,$){for(var L=0,X=0;X<N.length;++X)L+=N[X]*$[X];return L}function ft(N){return Math.sqrt(_t(N,N))}function ct(N,$,L){for(var X=0;X<$.length;++X)N[X]=$[X]*L}function et(N,$,L,X,ot){for(var ht=0;ht<N.length;++ht)N[ht]=$*L[ht]+X*ot[ht]}function K(N,$,L){L=L||{};var X=L.maxIterations||$.length*200,ot=L.nonZeroDelta||1.05,ht=L.zeroDelta||.001,bt=L.minErrorDelta||1e-6,rt=L.minErrorDelta||1e-5,Mt=L.rho!==void 0?L.rho:1,zt=L.chi!==void 0?L.chi:2,qt=L.psi!==void 0?L.psi:-.5,Yt=L.sigma!==void 0?L.sigma:.5,se,jt=$.length,T=new Array(jt+1);T[0]=$,T[0].fx=N($),T[0].id=0;for(var k=0;k<jt;++k){var tt=$.slice();tt[k]=tt[k]?tt[k]*ot:ht,T[k+1]=tt,T[k+1].fx=N(tt),T[k+1].id=k+1}function Y(nt){for(var U=0;U<nt.length;U++)T[jt][U]=nt[U];T[jt].fx=nt.fx}for(var R=function(nt,U){return nt.fx-U.fx},D=$.slice(),j=$.slice(),q=$.slice(),dt=$.slice(),St=0;St<X;++St){if(T.sort(R),L.history){var W=T.map(function(nt){var U=nt.slice();return U.fx=nt.fx,U.id=nt.id,U});W.sort(function(nt,U){return nt.id-U.id}),L.history.push({x:T[0].slice(),fx:T[0].fx,simplex:W})}for(se=0,k=0;k<jt;++k)se=Math.max(se,Math.abs(T[0][k]-T[1][k]));if(Math.abs(T[0].fx-T[jt].fx)<bt&&se<rt)break;for(k=0;k<jt;++k){D[k]=0;for(var H=0;H<jt;++H)D[k]+=T[H][k];D[k]/=jt}var z=T[jt];if(et(j,1+Mt,D,-Mt,z),j.fx=N(j),j.fx<T[0].fx)et(dt,1+zt,D,-zt,z),dt.fx=N(dt),dt.fx<j.fx?Y(dt):Y(j);else if(j.fx>=T[jt-1].fx){var Q=!1;if(j.fx>z.fx?(et(q,1+qt,D,-qt,z),q.fx=N(q),q.fx<z.fx?Y(q):Q=!0):(et(q,1-qt*Mt,D,qt*Mt,z),q.fx=N(q),q.fx<j.fx?Y(q):Q=!0),Q){if(Yt>=1)break;for(k=1;k<T.length;++k)et(T[k],1-Yt,T[0],Yt,T[k]),T[k].fx=N(T[k])}}else Y(j)}return T.sort(R),{fx:T[0].fx,x:T[0]}}function g(N,$,L,X,ot,ht,bt){var rt=L.fx,Mt=_t(L.fxprime,$),zt=rt,qt=rt,Yt=Mt,se=0;ot=ot||1,ht=ht||1e-6,bt=bt||.1;function jt(k,tt,Y){for(var R=0;R<16;++R)if(ot=(k+tt)/2,et(X.x,1,L.x,ot,$),zt=X.fx=N(X.x,X.fxprime),Yt=_t(X.fxprime,$),zt>rt+ht*ot*Mt||zt>=Y)tt=ot;else{if(Math.abs(Yt)<=-bt*Mt)return ot;Yt*(tt-k)>=0&&(tt=k),k=ot,Y=zt}return 0}for(var T=0;T<10;++T){if(et(X.x,1,L.x,ot,$),zt=X.fx=N(X.x,X.fxprime),Yt=_t(X.fxprime,$),zt>rt+ht*ot*Mt||T&&zt>=qt)return jt(se,ot,qt);if(Math.abs(Yt)<=-bt*Mt)return ot;if(Yt>=0)return jt(ot,se,zt);qt=zt,se=ot,ot*=2}return ot}function h(N,$,L){var X={x:$.slice(),fx:0,fxprime:$.slice()},ot={x:$.slice(),fx:0,fxprime:$.slice()},ht=$.slice(),bt,rt,Mt=1,zt;L=L||{},zt=L.maxIterations||$.length*20,X.fx=N(X.x,X.fxprime),bt=X.fxprime.slice(),ct(bt,X.fxprime,-1);for(var qt=0;qt<zt;++qt){if(Mt=g(N,bt,X,ot,Mt),L.history&&L.history.push({x:X.x.slice(),fx:X.fx,fxprime:X.fxprime.slice(),alpha:Mt}),!Mt)ct(bt,X.fxprime,-1);else{et(ht,1,ot.fxprime,-1,X.fxprime);var Yt=_t(X.fxprime,X.fxprime),se=Math.max(0,_t(ht,ot.fxprime)/Yt);et(bt,se,bt,-1,ot.fxprime),rt=X,X=ot,ot=rt}if(ft(X.fxprime)<=1e-5)break}return L.history&&L.history.push({x:X.x.slice(),fx:X.fx,fxprime:X.fxprime.slice(),alpha:Mt}),X}function J(N,$,L){L=L||{};for(var X=L.maxIterations||$.length*100,ot=L.learnRate||.001,ht={x:$.slice(),fx:0,fxprime:$.slice()},bt=0;bt<X&&(ht.fx=N(ht.x,ht.fxprime),L.history&&L.history.push({x:ht.x.slice(),fx:ht.fx,fxprime:ht.fxprime.slice()}),et(ht.x,1,ht.x,-ot,ht.fxprime),!(ft(ht.fxprime)<=1e-5));++bt);return ht}function E(N,$,L){L=L||{};var X={x:$.slice(),fx:0,fxprime:$.slice()},ot={x:$.slice(),fx:0,fxprime:$.slice()},ht=L.maxIterations||$.length*100,bt=L.learnRate||1,rt=$.slice(),Mt=L.c1||.001,zt=L.c2||.1,qt,Yt=[];if(L.history){var se=N;N=function(T,k){return Yt.push(T.slice()),se(T,k)}}X.fx=N(X.x,X.fxprime);for(var jt=0;jt<ht&&(ct(rt,X.fxprime,-1),bt=g(N,rt,X,ot,bt,Mt,zt),L.history&&(L.history.push({x:X.x.slice(),fx:X.fx,fxprime:X.fxprime.slice(),functionCalls:Yt,learnRate:bt,alpha:bt}),Yt=[]),qt=X,X=ot,ot=qt,!(bt===0||ft(X.fxprime)<1e-5));++jt);return X}M.bisect=B,M.nelderMead=K,M.conjugateGradient=h,M.gradientDescent=J,M.gradientDescentLineSearch=E,M.zeros=it,M.zerosM=wt,M.norm2=ft,M.weightedSum=et,M.scale=ct})},29932:function(Pt){function st(M,B){for(var it=-1,wt=M==null?0:M.length,_t=Array(wt);++it<wt;)_t[it]=B(M[it],it,M);return _t}Pt.exports=st},40371:function(Pt){function st(M){return function(B){return B==null?void 0:B[M]}}Pt.exports=st},80531:function(Pt,st,M){var B=M(62705),it=M(29932),wt=M(1469),_t=M(33448),ft=1/0,ct=B?B.prototype:void 0,et=ct?ct.toString:void 0;function K(g){if(typeof g=="string")return g;if(wt(g))return it(g,K)+"";if(_t(g))return et?et.call(g):"";var h=g+"";return h=="0"&&1/g==-ft?"-0":h}Pt.exports=K},1469:function(Pt){var st=Array.isArray;Pt.exports=st},79833:function(Pt,st,M){var B=M(80531);function it(wt){return wt==null?"":B(wt)}Pt.exports=it},73807:function(Pt){"use strict";var st=Pt.exports;Pt.exports.isNumber=function(M){return typeof M=="number"},Pt.exports.findMin=function(M){if(M.length===0)return Infinity;for(var B=M[0],it=1;it<M.length;it++)B=Math.min(B,M[it]);return B},Pt.exports.findMax=function(M){if(M.length===0)return-Infinity;for(var B=M[0],it=1;it<M.length;it++)B=Math.max(B,M[it]);return B},Pt.exports.findMinMulti=function(M){for(var B=st.findMin(M[0]),it=1;it<M.length;it++)B=Math.min(B,st.findMin(M[it]));return B},Pt.exports.findMaxMulti=function(M){for(var B=st.findMax(M[0]),it=1;it<M.length;it++)B=Math.max(B,st.findMax(M[it]));return B},Pt.exports.inside=function(M,B,it){return M<=it&&it<=B}},53843:function(Pt,st,M){"use strict";var B=50,it=2,wt=Math.log(2),_t=Pt.exports,ft=M(73807);function ct(K){return 1-Math.abs(K)}Pt.exports.getUnifiedMinMax=function(K,g){return _t.getUnifiedMinMaxMulti([K],g)},Pt.exports.getUnifiedMinMaxMulti=function(K,g){g=g||{};var h=!1,J=!1,E=ft.isNumber(g.width)?g.width:it,N=ft.isNumber(g.size)?g.size:B,$=ft.isNumber(g.min)?g.min:(h=!0,ft.findMinMulti(K)),L=ft.isNumber(g.max)?g.max:(J=!0,ft.findMaxMulti(K)),X=L-$,ot=X/(N-1);return h&&($=$-2*E*ot),J&&(L=L+2*E*ot),{min:$,max:L}},Pt.exports.create=function(K,g){if(g=g||{},!K||K.length===0)return[];var h=ft.isNumber(g.size)?g.size:B,J=ft.isNumber(g.width)?g.width:it,E=_t.getUnifiedMinMax(K,{size:h,width:J,min:g.min,max:g.max}),N=E.min,$=E.max,L=$-N,X=L/(h-1);if(L===0)return[{x:N,y:1}];for(var ot=[],ht=0;ht<h;ht++)ot.push({x:N+ht*X,y:0});var bt=function(T){return Math.floor((T-N)/X)},rt=et(ct,J),Mt=rt[J],zt=rt[J-1]-rt[J-2],qt=0;K.forEach(function(T){var k=bt(T);if(!(k+J<0||k-J>=ot.length)){var tt=Math.max(k-J,0),Y=k,R=Math.min(k+J,ot.length-1),D=tt-(k-J),j=k+J-R,q=rt[-J-1+D]||0,dt=rt[-J-1+j]||0,St=Mt/(Mt-q-dt);D>0&&(qt+=St*(D-1)*zt);var W=Math.max(0,k-J+1);ft.inside(0,ot.length-1,W)&&(ot[W].y+=St*1*zt),ft.inside(0,ot.length-1,Y+1)&&(ot[Y+1].y-=St*2*zt),ft.inside(0,ot.length-1,R+1)&&(ot[R+1].y+=St*1*zt)}});var Yt=qt,se=0,jt=0;return ot.forEach(function(T){se+=T.y,Yt+=se,T.y=Yt,jt+=Yt}),jt>0&&ot.forEach(function(T){T.y/=jt}),ot};function et(K,g){for(var h={},J=0,E=-g;E<=g;E++)J+=K(E/g),h[E]=J;return h}Pt.exports.getExpectedValueFromPdf=function(K){if(!(!K||K.length===0)){var g=0;return K.forEach(function(h){g+=h.x*h.y}),g}},Pt.exports.getXWithLeftTailArea=function(K,g){if(!(!K||K.length===0)){for(var h=0,J=0,E=0;E<K.length&&(J=E,h+=K[E].y,!(h>=g));E++);return K[J].x}},Pt.exports.getPerplexity=function(K){if(!(!K||K.length===0)){var g=0;return K.forEach(function(h){var J=Math.log(h.y);isFinite(J)&&(g+=h.y*J)}),g=-g/wt,Math.pow(2,g)}}},55168:function(Pt,st){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.SensorTabIndex=st.SensorClassName=st.SizeSensorId=void 0;var M="size-sensor-id";st.SizeSensorId=M;var B="size-sensor-object";st.SensorClassName=B;var it="-1";st.SensorTabIndex=it},12177:function(Pt,st){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.default=void 0;var M=function(it){var wt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,_t=null;return function(){for(var ft=this,ct=arguments.length,et=new Array(ct),K=0;K<ct;K++)et[K]=arguments[K];clearTimeout(_t),_t=setTimeout(function(){it.apply(ft,et)},wt)}};st.default=M},15378:function(Pt,st){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.default=void 0;var M=1,B=function(){return"".concat(M++)};st.default=B},18587:function(Pt,st,M){"use strict";var B;B={value:!0},B=B=st.ak=void 0;var it=M(12955),wt=function(et,K){var g=(0,it.getSensor)(et);return g.bind(K),function(){g.unbind(K)}};st.ak=wt;var _t=function(et){var K=(0,it.getSensor)(et);(0,it.removeSensor)(K)};B=_t;var ft="1.0.1";B=ft},12955:function(Pt,st,M){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.removeSensor=st.getSensor=void 0;var B=_t(M(15378)),it=M(82578),wt=M(55168);function _t(K){return K&&K.__esModule?K:{default:K}}var ft={},ct=function(g){var h=g.getAttribute(wt.SizeSensorId);if(h&&ft[h])return ft[h];var J=(0,B.default)();g.setAttribute(wt.SizeSensorId,J);var E=(0,it.createSensor)(g);return ft[J]=E,E};st.getSensor=ct;var et=function(g){var h=g.element.getAttribute(wt.SizeSensorId);g.element.removeAttribute(wt.SizeSensorId),g.destroy(),h&&ft[h]&&delete ft[h]};st.removeSensor=et},82578:function(Pt,st,M){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.createSensor=void 0;var B=M(27643),it=M(31743),wt=typeof ResizeObserver!="undefined"?it.createSensor:B.createSensor;st.createSensor=wt},27643:function(Pt,st,M){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.createSensor=void 0;var B=wt(M(12177)),it=M(55168);function wt(ft){return ft&&ft.__esModule?ft:{default:ft}}var _t=function(ct){var et=void 0,K=[],g=function(){getComputedStyle(ct).position==="static"&&(ct.style.position="relative");var L=document.createElement("object");return L.onload=function(){L.contentDocument.defaultView.addEventListener("resize",h),h()},L.style.display="block",L.style.position="absolute",L.style.top="0",L.style.left="0",L.style.height="100%",L.style.width="100%",L.style.overflow="hidden",L.style.pointerEvents="none",L.style.zIndex="-1",L.style.opacity="0",L.setAttribute("class",it.SensorClassName),L.setAttribute("tabindex",it.SensorTabIndex),L.type="text/html",ct.appendChild(L),L.data="about:blank",L},h=(0,B.default)(function(){K.forEach(function($){$(ct)})}),J=function(L){et||(et=g()),K.indexOf(L)===-1&&K.push(L)},E=function(){et&&et.parentNode&&(et.contentDocument&&et.contentDocument.defaultView.removeEventListener("resize",h),et.parentNode.removeChild(et),et=void 0,K=[])},N=function(L){var X=K.indexOf(L);X!==-1&&K.splice(X,1),K.length===0&&et&&E()};return{element:ct,bind:J,destroy:E,unbind:N}};st.createSensor=_t},31743:function(Pt,st,M){"use strict";Object.defineProperty(st,"__esModule",{value:!0}),st.createSensor=void 0;var B=it(M(12177));function it(_t){return _t&&_t.__esModule?_t:{default:_t}}var wt=function(ft){var ct=void 0,et=[],K=(0,B.default)(function(){et.forEach(function(N){N(ft)})}),g=function(){var $=new ResizeObserver(K);return $.observe(ft),K(),$},h=function($){ct||(ct=g()),et.indexOf($)===-1&&et.push($)},J=function(){ct.disconnect(),et=[],ct=void 0},E=function($){var L=et.indexOf($);L!==-1&&et.splice(L,1),et.length===0&&ct&&J()};return{element:ft,bind:h,destroy:J,unbind:E}};st.createSensor=wt}}]);