(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7679],{64183:function(Lt,it,F){"use strict";var R=F(67294),Q=F(80529),gt=F(23185),ht=F(4322),ot=F(24770),rt=F(26119),J=function(d,c){var Z={};for(var T in d)Object.prototype.hasOwnProperty.call(d,T)&&c.indexOf(T)<0&&(Z[T]=d[T]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var z=0,T=Object.getOwnPropertySymbols(d);z=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);c.each(r,function(a,o){c.each(n,function(s,l){i.adjustDim(l,s,a,o)})})},e.prototype.groupData=function(r,t){return c.each(r,function(i){i[t]===void 0&&(i[t]=dt)}),c.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=c.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]=c.valuesOfKey(r,l).sort(function(u,h){return u-h}))}),!n&&this.isAdjust("y")){var s="y";a[s]=[dt,1]}return a},e}(),ut=pt,Dt={},It=function(e){return Dt[e.toLowerCase()]},Ct=function(e,r){if(It(e))throw new Error("Adjust type '"+e+"' existed.");Dt[e.toLowerCase()]=r};/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var kt=function(r,t){return kt=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])},kt(r,t)};function Nt(e,r){kt(e,r);function t(){this.constructor=e}e.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}var Xt=function(){return Xt=Object.assign||function(t){for(var i,n=1,a=arguments.length;n=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 fe(e,r){return function(t,i){r(t,i,e)}}function ge(e,r){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,r)}function xe(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(h){try{u(i.next(h))}catch(f){o(f)}}function l(h){try{u(i.throw(h))}catch(f){o(f)}}function u(h){h.done?a(h.value):n(h.value).then(s,l)}u((i=i.apply(e,r||[])).next())})}function ve(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(h){return l([u,h])}}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]=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 pe(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 ke(){for(var e=[],r=0;r1||s(v,g)})})}function s(v,g){try{l(i[v](g))}catch(p){f(a[0][3],p)}}function l(v){v.value instanceof ei?Promise.resolve(v.value.v).then(u,h):f(a[0][2],v)}function u(v){s("next",v)}function h(v){s("throw",v)}function f(v,g){v(g),a.shift(),a.length&&s(a[0][0],a[0][1])}}function el(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:ei(e[n](o)),done:n==="return"}:a?a(o):o}:a}}function rl(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 de=="function"?de(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 Ha(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}function Mi(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 Ti(e){return e&&e.__esModule?e:{default:e}}function Ya(e,r){if(!r.has(e))throw new TypeError("attempted to get private field on non-instance");return r.get(e)}function ST(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 Ov=function(e){Nt(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?Pt:n,o=t.dodgeRatio,s=o===void 0?St:o,l=t.dodgeBy,u=t.intervalPadding,h=t.dodgePadding,f=t.xDimensionLength,v=t.groupNum,g=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=h,i.xDimensionLegenth=f,i.groupNum=v,i.defaultSize=g,i.maxColumnWidth=p,i.minColumnWidth=y,i.columnWidthRatio=m,i.customOffset=x,i}return r.prototype.process=function(t){var i=c.clone(t),n=c.flatten(i),a=this.dodgeBy,o=a?c.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 c.each(u,function(h,f){var v;i.length===1?v={pre:i[0]-1,next:i[0]+1}:v=o.getAdjustRange(t,parseFloat(f),i),c.each(h,function(g){var p=g[t],y=l[p],m=y.indexOf(a);if(c.isNil(s))g[t]=o.getDodgeOffset(v,m,y.length);else{var x=v.pre,_=v.next;g[t]=c.isFunction(s)?s(g,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,h=t.pre,f=t.next,v=f-h,g;if(!c.isNil(l)&&c.isNil(u)&&l>=0){var p=this.getIntervalOnlyOffset(n,i);g=h+p}else if(!c.isNil(u)&&c.isNil(l)&&u>=0){var p=this.getDodgeOnlyOffset(n,i);g=h+p}else if(!c.isNil(l)&&!c.isNil(u)&&l>=0&&u>=0){var p=this.getIntervalAndDodgeOffset(n,i);g=h+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;g=(h+f)/2+p}return g},r.prototype.getIntervalOnlyOffset=function(t,i){var n=this,a=n.defaultSize,o=n.intervalPadding,s=n.xDimensionLegenth,l=n.groupNum,u=n.dodgeRatio,h=n.maxColumnWidth,f=n.minColumnWidth,v=n.columnWidthRatio,g=o/s,p=(1-(l-1)*g)/l*u/(t-1),y=((1-g*(l-1))/l-p*(t-1))/t;if(y=c.isNil(v)?y:1/l/t*v,!c.isNil(h)){var m=h/s;y=Math.min(y,m)}if(!c.isNil(f)){var x=f/s;y=Math.max(y,x)}y=a?a/s:y,p=((1-(l-1)*g)/l-t*y)/(t-1);var _=((1/2+i)*y+i*p+1/2*g)*l-g/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,h=n.maxColumnWidth,f=n.minColumnWidth,v=n.columnWidthRatio,g=o/s,p=1*u/(l-1),y=((1-p*(l-1))/l-g*(t-1))/t;if(y=v?1/l/t*v:y,!c.isNil(h)){var m=h/s;y=Math.min(y,m)}if(!c.isNil(f)){var x=f/s;y=Math.max(y,x)}y=a?a/s:y,p=(1-(y*t+g*(t-1))*l)/(l-1);var _=((1/2+i)*y+i*g+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,h=o/s,f=((1-u*(l-1))/l-h*(t-1))/t,v=((1/2+i)*f+i*h+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={},c.each(i,function(o,s){var l=c.valuesOfKey(o,t);l.length||l.push(0),c.each(l,function(u){a[u]||(a[u]=[]),a[u].push(s)})}),n[t]=a),a},r}(ut),Pv=Ov;function Dv(e,r){return(r-e)*Math.random()+e}var kv=function(e){Nt(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.process=function(t){var i=c.clone(t),n=c.flatten(i);return this.adjustData(i,n),i},r.prototype.adjustDim=function(t,i,n){var a=this,o=this.groupData(n,t);return c.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)*Ft;return Dv(i+a,n-a)},r.prototype.adjustGroup=function(t,i,n,a){var o=this,s=this.getAdjustRange(i,n,a);return c.each(t,function(l){l[i]=o.getAdjustOffset(s)}),t},r}(ut),Bv=kv,Xa=c.Cache,Rv=function(e){Nt(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,h=t.reverseOrder,f=h===void 0?!1:h;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 Xa,u=new Xa;return s.map(function(h){return h.map(function(f){var v,g=c.get(f,n,0),p=c.get(f,[a]),y=g.toString();if(p=c.isArray(p)?p[1]:p,!c.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,_),Xt(Xt({},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,h=new Xa;return u.map(function(f){return f.map(function(v){var g,p=i.size,y=v[a],m=p*2/o;h.has(y)||h.set(y,m/2);var x=h.get(y);return h.set(y,x+m),Xt(Xt({},v),(g={},g[l]=x,g))})})},r}(ut),Nv=Rv,zv=function(e){Nt(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.process=function(t){var i=c.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 c.map(t,function(u){return c.map(u,function(h){var f,v,g=h[o],p=h[a];if(c.isArray(g)){var y=(l-s[p])/2;return Xt(Xt({},h),(f={},f[o]=c.map(g,function(x){return y+x}),f))}var m=(l-g)/2;return Xt(Xt({},h),(v={},v[o]=[m,g+m],v))})})},r.prototype.getXValuesMaxMap=function(t){var i=this,n=this,a=n.xField,o=n.yField,s=c.groupBy(t,function(l){return l[a]});return c.mapValues(s,function(l){return i.getDimMaxValue(l,o)})},r.prototype.getDimMaxValue=function(t,i){var n=c.map(t,function(o){return c.get(o,i,[])}),a=c.flatten(n);return Math.max.apply(Math,a)},r}(ut),Vv=zv;Ct("Dodge",Pv),Ct("Jitter",Bv),Ct("Stack",Nv),Ct("Symmetric",Vv);var il=function(e,r){return(0,c.isString)(r)?r:e.invert(e.scale(r))},Gv=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=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 FT(e,r){return function(t,i){r(t,i,e)}}function ET(e,r){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,r)}function MT(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(h){try{u(i.next(h))}catch(f){o(f)}}function l(h){try{u(i.throw(h))}catch(f){o(f)}}function u(h){h.done?a(h.value):n(h.value).then(s,l)}u((i=i.apply(e,r||[])).next())})}function TT(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(h){return l([u,h])}}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]=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 Wv(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 OT(){for(var e=[],r=0;r1||s(v,g)})})}function s(v,g){try{l(i[v](g))}catch(p){f(a[0][3],p)}}function l(v){v.value instanceof wn?Promise.resolve(v.value.v).then(u,h):f(a[0][2],v)}function u(v){s("next",v)}function h(v){s("throw",v)}function f(v,g){v(g),a.shift(),a.length&&s(a[0][0],a[0][1])}}function kT(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:wn(e[n](o)),done:n==="return"}:a?a(o):o}:a}}function BT(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 al=="function"?al(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 RT(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}function NT(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 zT(e){return e&&e.__esModule?e:{default:e}}function VT(e,r){if(!r.has(e))throw new TypeError("attempted to get private field on non-instance");return r.get(e)}function GT(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 Hv=/rgba?\(([\s.,0-9]+)\)/,Yv=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Xv=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,jv=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,Uv=function(e){return/^[r,R,L,l]{1}[\s]*\(/.test(e)},Zv=function(){var e=document.createElement("i");return e.title="Web Colour Picker",e.style.display="none",document.body.appendChild(e),e},Ua=function(e,r,t,i){return e[i]+(r[i]-e[i])*t};function ol(e){return"#"+Za(e[0])+Za(e[1])+Za(e[2])}var sl=function(e){return[parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16)]},Za=function(e){var r=Math.round(e).toString(16);return r.length===1?"0"+r:r},Kv=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 ol([Ua(o,s,a,0),Ua(o,s,a,1),Ua(o,s,a,2)])},bn,ll=function(e){if(e[0]==="#"&&e.length===7)return e;bn||(bn=Zv()),bn.style.color=e;var r=document.defaultView.getComputedStyle(bn,"").getPropertyValue("color"),t=Hv.exec(r),i=t[1].split(/\s*,\s*/).map(function(n){return Number(n)});return r=ol(i),r},qv=function(e){var r=(0,c.isString)(e)?e.split("-"):e,t=(0,c.map)(r,function(i){return sl(i.indexOf("#")===-1?ll(i):i)});return function(i){return Kv(t,i)}},$v=function(e){if(Uv(e)){var r,t=void 0;if(e[0]==="l"){var i=Yv.exec(e),n=+i[1]+90;t=i[2],r="linear-gradient("+n+"deg, "}else if(e[0]==="r"){r="radial-gradient(";var i=Xv.exec(e);t=i[4]}var a=t.match(jv);return(0,c.each)(a,function(o,s){var l=o.split(":");r+=l[1]+" "+l[0]*100+"%",s!==a.length-1&&(r+=", ")}),r+=")",r}return e},yr={rgb2arr:sl,gradient:qv,toRGB:(0,c.memoize)(ll),toCSSGradient:$v},Qv=function(e){Ii(r,e);function r(t){var i=e.call(this,t)||this;return i.type="color",i.names=["color"],(0,c.isString)(i.values)&&(i.linear=!0),i.gradient=yr.gradient(i.values),i}return r.prototype.getLinearValue=function(t){return this.gradient(t)},r}(Li),Jv=Qv,td=function(e){Ii(r,e);function r(t){var i=e.call(this,t)||this;return i.type="opacity",i.names=["opacity"],i}return r}(Li),ed=td,rd=function(e){Ii(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,c.isNil)(t)||(0,c.isNil)(i)?[]:[(0,c.isArray)(t)?t.map(function(s){return a.scale(s)}):a.scale(t),(0,c.isArray)(i)?i.map(function(s){return o.scale(s)}):o.scale(i)]},r}(Li),id=rd,nd=function(e){Ii(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}(Li),ad=nd,od=function(e){Ii(r,e);function r(t){var i=e.call(this,t)||this;return i.type="size",i.names=["size"],i}return r}(Li),sd=od,Oi=F(86429),ul={},cl=function(e){return ul[e.toLowerCase()]},Pi=function(e,r){if(cl(e))throw new Error("Attribute type '"+e+"' existed.");ul[e.toLowerCase()]=r};Pi("Color",Jv),Pi("Opacity",ed),Pi("Position",id),Pi("Shape",ad),Pi("Size",sd);var Sn=F(77160),ld=F(35600),te=F(31506),ud=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,d.__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,c.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 Sn.kK(a,a,n),a},e.prototype.invertMatrix=function(r,t,i){i===void 0&&(i=0);var n=this.matrix,a=ld.invert([0,0,0,0,0,0,0,0,0],n),o=[r,t,i];return a&&Sn.kK(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 te.m$(t,t,[-i.x,-i.y]),te.zu(t,t,r),te.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 te.m$(i,i,[-n.x,-n.y]),te.lh(i,i,[r,t]),te.m$(i,i,[n.x,n.y]),this},e.prototype.translate=function(r,t){var i=this.matrix;return te.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,d.__spreadArray)([],this.originalMatrix)},e}(),Ka=ud,cd=function(e){(0,d.__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),hl=cd,wt=F(31437),hd=function(e){(0,d.__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,h=t.radius;return i.startAngle=a,i.endAngle=s,i.innerRadius=u,i.radius=h,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=wt.$X([0,0],[t.x,t.y],[this.center.x,this.center.y]),o=te.Dg(a,[1,0],!0),s=o*this.a;wt.kE(a)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];te.zu(u,u,s);var h=[1,0,0];Sn.kK(h,h,u);var f=[h[0],h[1]],v=te.Dg(f,a,l0?p:-p;var y=this.invertDim(g,"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=0;i--)e.removeChild(r[i])}function md(e,r){return!!e.className.match(new RegExp("(\\s|^)"+r+"(\\s|$)"))}function ki(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 xd(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 Bi(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 Dr(e,r,t){return(1-t)*e+r*t}function ri(e,r,t){return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}}function _d(e,r){var t=r.x-e.x,i=r.y-e.y;return Math.sqrt(t*t+i*i)}var WT=function(e){return new Promise(function(r){setTimeout(r,e)})},En=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)0?(0,c.each)(l,function(u){if(u.get("visible")){if(u.isGroup()&&u.get("children").length===0)return!0;var h=pl(u),f=u.applyToMatrix([h.minX,h.minY,1]),v=u.applyToMatrix([h.minX,h.maxY,1]),g=u.applyToMatrix([h.maxX,h.minY,1]),p=u.applyToMatrix([h.maxX,h.maxY,1]),y=Math.min(f[0],v[0],g[0],p[0]),m=Math.max(f[0],v[0],g[0],p[0]),x=Math.min(f[1],v[1],g[1],p[1]),_=Math.max(f[1],v[1],g[1],p[1]);ya&&(a=m),xs&&(s=_)}}):(n=0,a=0,o=0,s=0),i=Bi(n,o,a-n,s-o)}return t?wd(i,t):i}function bd(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 Fe(e){return e+"px"}function yl(e,r,t,i){var n=_d(e,r),a=i/n,o=0;return t==="start"?o=0-a:t==="end"&&(o=1+a),{x:Dr(e.x,r.x,o),y:Dr(e.y,r.y,o)}}var Sd={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},Cd=function(e){(0,d.__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,c.each)(t,function(a,o){var s=i.get(o),l=a;s!==a&&((0,c.isObject)(a)&&n[o]&&(l=(0,c.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,c.hasKey)(t,"visible")&&(t.visible?this.show():this.hide()),(0,c.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,d.__assign)({},t);this.update(i)},r.prototype.getLocation=function(){var t=this,i={},n=this.get("locationType"),a=Sd[n];return(0,c.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,c.each)(i,function(n,a){var o=t.get(a);if((0,c.isObject)(o)){var s=(0,c.deepMix)({},n,o);t.set(a,s)}})},r}(vt.XY),ml=Cd,kr="update_status",Ad=["visible","tip","delegateObject"],Fd=["container","group","shapesMap","isRegister","isUpdating","destroyed"],Ed=function(e){(0,d.__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,d.__assign)((0,d.__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,c.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=yd(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),vl(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",pl(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,d.__rest)(i,["id","component"]),s=new a((0,d.__assign)((0,d.__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=qa(i);t.attr("matrix",n)},r.prototype.addAnimation=function(t,i,n){var a=i.attr("opacity");(0,c.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,c.each)(s,function(u){var h=u.get("id"),f=n.getElementById(h),v=u.get("name");if(f)if(u.get("isComponent")){var g=u.get("component"),p=f.get("component"),y=(0,c.pick)(g.cfg,(0,c.difference)((0,c.keys)(g.cfg),Fd));p.update(y),f.set(kr,"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,c.each)(Ad,function(b){f.set(b,u.get(b))}),bd(f,u),l=f,f.set(kr,"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(kr,"add"),u.get("isComponent")){var g=u.get("component");g.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,c.each)(i,function(n){n.set(kr,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,c.mix)(i.delegateObject,n)},r.prototype.getReplaceAttrs=function(t,i){var n=t.attr(),a=i.attr();return(0,c.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,c.each)(n,function(a){i.registerElement(a),a.set(kr,"add"),a.isGroup()&&i.registerNewGroup(a)})},r.prototype.deleteElements=function(){var t=this,i=this.get("shapesMap"),n=[];(0,c.each)(i,function(s,l){!s.get(kr)||s.destroyed?n.push([l,s]):s.set(kr,null)});var a=this.get("animate"),o=this.get("animateOption");(0,c.each)(n,function(s){var l=s[0],u=s[1];if(!u.destroyed){var h=u.get("name");if(a&&o.leave){var f=(0,c.mix)({callback:function(){t.removeElement(u)}},o.leave);t.removeAnimation(h,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}(ml),be=Ed,Qa="\u2026";function Md(e){for(var r=0,t=0;t0&&e.charCodeAt(r)<128?1:2}function Td(e,r,t){t===void 0&&(t="tail");var i=e.length,n="";if(t==="tail"){for(var a=0,o=0;a=19968&&s<=40869?a+=2:a+=1}a>t&&(t=a,i=n)}return e[i].getBBox().width}function Ja(e){if(e.length>Od)return Pd(e);var r=0;return(0,c.each)(e,function(t){var i=t.getBBox(),n=i.width;r=0?v=Td(a,f,i):v=Ld,v&&(r.attr("text",v),h=!0)}return h?r.set("tip",a):r.set("tip",null),h}function Mn(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,h=r.autoEllipsis,f=r.isVertical,v=r.ellipsisPosition,g=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,d.__assign)({x:0,y:0,text:n},a)}),m=Fn((0,c.get)(g,"padding",0));if(u&&h){var x=u-(m[1]+m[3]);Ri(!f,y,x,v)}if(g){var _=(0,c.get)(g,"style",{}),w=y.getCanvasBBox(),b=w.minX,S=w.minY,C=w.width,M=w.height,L=p.addShape("rect",{id:o+"-bg",name:o+"-bg",attrs:(0,d.__assign)({x:b-m[3],y:S-m[0],width:C+m[1]+m[3],height:M+m[0]+m[2]},_)});L.toBack()}Di(p,t,i),gl(p,l,t,i)}var Bt={fontFamily:` BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimSun, "sans-serif"`,textColor:"#2C3542",activeTextColor:"#333333",uncheckedColor:"#D8D8D8",lineColor:"#416180",regionColor:"#CCD7EB",verticalAxisRotate:-Math.PI/4,horizontalAxisRotate:Math.PI/4,descriptionIconStroke:"#fff",descriptionIconFill:"rgba(58, 73, 101, .25)"},kd=function(e){(0,d.__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,d.__assign)((0,d.__assign)({},t),{name:"annotation",type:"line",locationType:"region",start:null,end:null,style:{},text:null,defaultCfg:{style:{fill:Bt.textColor,fontSize:12,textAlign:"center",textBaseline:"bottom",fontFamily:Bt.fontFamily},text:{position:"center",autoRotate:!0,content:null,offsetX:0,offsetY:0,style:{stroke:Bt.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,d.__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,c.isString)(n)&&n.indexOf("%")!==-1?a=parseInt(n,10)/100:(0,c.isNumber)(n)?a=n:a=1,(a>1||a<0)&&(a=1),{x:Dr(t.x,i.x,a),y:Dr(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,h=i.offsetY,f=i.autoRotate,v=i.maxLength,g=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+h,S={id:this.getElementId("line-text"),name:"annotation-line-text",x:w,y:b,content:s,style:l,maxLength:v,autoEllipsis:g,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])}Mn(t,S)},r}(be),Bd=kd,Rd=function(e){(0,d.__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,d.__assign)((0,d.__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:Bt.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:Bt.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",h=this.get("maxLength"),f=this.get("autoEllipsis"),v=this.get("isVertical"),g=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:h,autoEllipsis:f,isVertical:v,ellipsisPosition:g,background:p,rotate:y};Mn(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");Di(t,n,a),gl(t,o,n,a)}},r}(be),Nd=Rd,zd=function(e){(0,d.__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,d.__assign)((0,d.__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=ri(i,n,a),l=ri(i,n,o),u=o-a>Math.PI?1:0,h=[["M",s.x,s.y]];if(o-a==Math.PI*2){var f=ri(i,n,a+Math.PI);h.push(["A",n,n,0,u,1,f.x,f.y]),h.push(["A",n,n,0,u,1,l.x,l.y])}else h.push(["A",n,n,0,u,1,l.x,l.y]);return h},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,d.__assign)({path:i},n)})},r}(be),Vd=zd,Gd=function(e){(0,d.__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,d.__assign)((0,d.__assign)({},t),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:Bt.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=ki({start:i,end:n});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:(0,d.__assign)({x:o.x,y:o.y,width:o.width,height:o.height},a)})},r}(be),Wd=Gd,Hd=function(e){(0,d.__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,d.__assign)((0,d.__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=ki({start:t,end:i}),o=this.get("src");return(0,d.__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}(be),Yd=Hd,Xd=function(e){(0,d.__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,d.__assign)((0,d.__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:Bt.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:Bt.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:Bt.fontFamily}}}})},r.prototype.renderInner=function(t){(0,c.get)(this.get("line"),"display")&&this.renderLine(t),(0,c.get)(this.get("text"),"display")&&this.renderText(t),(0,c.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,d.__rest)(i,["x","y","text"]),l=this.get("text"),u=l.background,h=l.maxLength,f=l.autoEllipsis,v=l.isVertival,g=l.ellipsisPosition,p={x:n,y:a,id:this.getElementId("text"),name:"annotation-text",content:o,style:s,background:u,maxLength:h,autoEllipsis:f,isVertival:v,ellipsisPosition:g};Mn(t,p)},r.prototype.autoAdjust=function(t){var i=this.get("direction"),n=this.get("x"),a=this.get("y"),o=(0,c.get)(this.get("line"),"length",0),s=this.get("coordinateBBox"),l=t.getBBox(),u=l.minX,h=l.maxX,f=l.minY,v=l.maxY,g=t.findById(this.getElementId("text-group")),p=t.findById(this.getElementId("text")),y=t.findById(this.getElementId("line"));if(!!s){if(g){if(n+u<=s.minX){var m=s.minX-(n+u);Di(g,g.attr("x")+m,g.attr("y"))}if(n+h>=s.maxX){var m=n+h-s.maxX;Di(g,g.attr("x")-m,g.attr("y"))}}if(i==="upward"&&a+f<=s.minY||i!=="upward"&&a+v>=s.maxY){var x=void 0,_=void 0;i==="upward"&&a+f<=s.minY?(x="top",_=1):(x="bottom",_=-1),p.attr("textBaseline",x),y&&y.attr("path",[["M",0,0],["L",0,o*_]]),Di(g,g.attr("x"),(o+2)*_)}}},r.prototype.getShapeAttrs=function(){var t=(0,c.get)(this.get("line"),"display"),i=(0,c.get)(this.get("point"),"style",{}),n=(0,c.get)(this.get("line"),"style",{}),a=(0,c.get)(this.get("text"),"style",{}),o=this.get("direction"),s=t?(0,c.get)(this.get("line"),"length",0):0,l=o==="upward"?-1:1;return{point:(0,d.__assign)({x:0,y:0},i),line:(0,d.__assign)({path:[["M",0,0],["L",0,s*l]]},n),text:(0,d.__assign)({x:0,y:(s+2)*l,text:(0,c.get)(this.get("text"),"content",""),textBaseline:o==="upward"?"bottom":"top"},a)}},r}(be),jd=Xd,Ud=function(e){(0,d.__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,d.__assign)((0,d.__assign)({},t),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:Bt.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:Bt.textColor,fontFamily:Bt.fontFamily}}}})},r.prototype.renderInner=function(t){var i=(0,c.get)(this.get("region"),"style",{}),n=(0,c.get)(this.get("text"),"style",{}),a=this.get("lineLength")||0,o=this.get("points");if(!!o.length){var s=xd(o),l=[];l.push(["M",o[0].x,s.minY-a]),o.forEach(function(h){l.push(["L",h.x,h.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,d.__assign)({path:l},i)});var u=(0,d.__assign)({id:this.getElementId("text"),name:"annotation-text",x:(s.minX+s.maxX)/2,y:s.minY-a},this.get("text"));Mn(t,u)}},r}(be),Zd=Ud,Kd=function(e){(0,d.__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,d.__assign)((0,d.__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,c.each)(this.get("shapes"),function(l,u){var h=l.get("type"),f=(0,c.clone)(l.attr());i.adjustShapeAttrs(f),i.addShape(o,{id:i.getElementId("shape-"+h+"-"+u),capture:!1,type:h,attrs:f})});var s=ki({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}(be),qd=Kd,$d=function(e){(0,d.__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,d.__assign)((0,d.__assign)({},t),{name:"annotation",type:"shape",draw:c.noop})},r.prototype.renderInner=function(t){var i=this.get("render");(0,c.isFunction)(i)&&i(t)},r}(be),Qd=$d;function Ee(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 Jd(e,r){var t=Ee(e,"width",r);return t==="auto"&&(t=e.offsetWidth),parseFloat(t)}function tg(e,r){var t=Jd(e,r),i=parseFloat(Ee(e,"borderLeftWidth"))||0,n=parseFloat(Ee(e,"paddingLeft"))||0,a=parseFloat(Ee(e,"paddingRight"))||0,o=parseFloat(Ee(e,"borderRightWidth"))||0,s=parseFloat(Ee(e,"marginRight"))||0,l=parseFloat(Ee(e,"marginLeft"))||0;return t+i+o+n+a+l+s}function eg(e,r){var t=Ee(e,"height",r);return t==="auto"&&(t=e.offsetHeight),parseFloat(t)}function rg(e,r){var t=eg(e,r),i=parseFloat(Ee(e,"borderTopWidth"))||0,n=parseFloat(Ee(e,"paddingTop"))||0,a=parseFloat(Ee(e,"paddingBottom"))||0,o=parseFloat(Ee(e,"borderBottomWidth"))||0,s=parseFloat(Ee(e,"marginTop"))||0,l=parseFloat(Ee(e,"marginBottom"))||0;return t+i+o+n+a+s+l}var ig=function(e){(0,d.__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,d.__assign)((0,d.__assign)({},t),{container:null,containerTpl:"
",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 Bi(i,n,t.clientWidth,t.clientHeight)},r.prototype.clear=function(){var t=this.get("container");$a(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,c.isNil)(t)){t=this.createDom();var i=this.get("parent");(0,c.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,c.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,c.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&&md(i,n)){var a=t[n];(0,k.Z)(i,a)}}},r.prototype.applyChildrenStyles=function(t,i){(0,c.each)(i,function(n,a){var o=t.getElementsByClassName(a);(0,c.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,E.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,c.hasKey)(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},r.prototype.resetPosition=function(){},r}(ml),to=ig,ng=function(e){(0,d.__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,d.__assign)((0,d.__assign)({},t),{name:"annotation",type:"html",locationType:"point",x:0,y:0,containerTpl:'
',alignX:"left",alignY:"top",html:"",zIndex:7})},r.prototype.render=function(){var t=this.getContainer(),i=this.get("html");$a(t);var n=(0,c.isFunction)(i)?i(t):i;if((0,c.isElement)(n))t.appendChild(n);else if((0,c.isString)(n)||(0,c.isNumber)(n)){var a=(0,E.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"),h=tg(t),f=rg(t),v={x:n,y:a};o==="middle"?v.x-=Math.round(h/2):o==="right"&&(v.x-=Math.round(h)),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}(to),ag=ng;function Ni(e,r,t){var i=r+"Style",n=null;return(0,c.each)(t,function(a,o){e[o]&&a[i]&&(n||(n={}),(0,c.mix)(n,a[i]))}),n}var og=function(e){(0,d.__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,d.__assign)((0,d.__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:Bt.lineColor}},tickLine:{style:{lineWidth:1,stroke:Bt.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:Bt.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:Bt.textColor,fontFamily:Bt.fontFamily,fontWeight:"normal"},offset:10,offsetX:0,offsetY:0},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:Bt.textColor,textBaseline:"middle",fontFamily:Bt.fontFamily,textAlign:"center"},iconStyle:{fill:Bt.descriptionIconFill,stroke:Bt.descriptionIconStroke},description:""},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:Bt.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,c.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,c.each)(i,function(a,o){t[o]&&n.push(o)}),n},r.prototype.clearItemsState=function(t){var i=this,n=this.getItemsByState(t);(0,c.each)(n,function(a){i.setItemState(a,t,!1)})},r.prototype.getItemsByState=function(t){var i=this,n=this.getItems();return(0,c.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,c.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,c.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,c.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,c.each)(t,function(h){var f=h.point;o||(f=i.getTickPoint(h.value-l/2));var v=i.getSidePoint(f,s);n.push({startPoint:f,tickValue:h.value,endPoint:v,tickId:h.id,id:"tickline-"+h.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;s0){var n=(0,c.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,h=a.formatter,f=this.getSidePoint(t.point,o),v=this.getSideVector(o,f),g=h?h(t.name,t,i):t.name,p=a.style;p=(0,c.isFunction)(p)?(0,c.get)(this.get("theme"),["label","style"],{}):p;var y=(0,c.mix)({x:f.x+s,y:f.y+l,text:g,textAlign:this.getTextAnchor(v),textBaseline:this.getTextBaseline(v)},p);return u&&(y.matrix=Pr(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,c.each)(n,function(v,g){i.addShape(a,{type:"text",name:"axis-label",id:i.getElementId("label-"+v.id),attrs:i.getLabelAttrs(v,g,n),delegateObject:{tick:v,item:v,index:g}})}),this.processOverlap(a);var o=a.getChildren(),s=(0,c.get)(this.get("theme"),["label","style"],{}),l=this.get("label"),u=l.style,h=l.formatter;if((0,c.isFunction)(u)){var f=o.map(function(v){return(0,c.get)(v.get("delegateObject"),"tick")});(0,c.each)(o,function(v,g){var p=v.get("delegateObject").tick,y=h?h(p.name,p,g):p.name,m=(0,c.mix)({},s,u(y,g,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,h=.5;n==="start"?h=0:n==="end"&&(h=1);var f=this.getTickPoint(h),v=this.getSidePoint(f,a||s+u/2),g=(0,c.mix)({x:v.x,y:v.y,text:t.text},i),p=t.rotate,y=p;if((0,c.isNil)(p)&&l){var m=this.getAxisVector(f),x=[1,0];y=te.Dg(m,x,!0)}if(y){var _=Pr(v,y);g.matrix=_}return g},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,h=this.get("title").iconStyle,f=4,v=u/2,g=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],M=C[0],L=C[1],B=[p,_+v],I=B[0],G=B[1],q=[p+v,y-u/4],ft=q[0],mt=q[1],zt=[ft,mt+g],H=zt[0],tt=zt[1],ct=[H,tt+g],nt=ct[0],lt=ct[1],xt=[nt,lt+v*3/4],Rt=xt[0],Vt=xt[1];this.addShape(a,{type:"path",id:this.getElementId("title-description-icon"),name:"axis-title-description-icon",attrs:(0,d.__assign)({path:[["M",x,_],["A",v,v,0,0,1,b,S],["A",v,v,0,0,1,M,L],["A",v,v,0,0,1,I,G],["A",v,v,0,0,1,x,_],["M",ft,mt],["L",H,tt],["M",nt,lt],["L",Rt,Vt]],lineWidth:g,matrix:n},h)}),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=Ni(t,"label",a);l&&s.attr(l)}var u=this.getElementId("tickline-"+t.id),h=i.findById(u);if(h){var f=Ni(t,"tickLine",a);f&&h.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=Ni(t,"label",n);u&&o.attr(u)}if(l){var h=Ni(t,"tickLine",n);h&&l.attr(h)}}else o&&o.attr(a.style),l&&l.attr(s.style)},r}(be),xl=og;function eo(e,r,t,i){var n=r.getChildren(),a=!1;return(0,c.each)(n,function(o){var s=Ri(e,o,t,i);a=a||s}),a}function sg(){return _l}function lg(e,r,t){return eo(e,r,t,"head")}function _l(e,r,t){return eo(e,r,t,"tail")}function ug(e,r,t){return eo(e,r,t,"middle")}function cg(e){var r=e.attr("matrix");return r&&r[0]!==1}function wl(e){var r=cg(e)?pd(e.attr("matrix")):0;return r%360}function ro(e,r,t,i){var n=!1,a=wl(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));En(l,0,Math.PI/180)?n=s.width+i>o:n=s.height/l+i>o}else{var l=Math.abs(Math.sin(a));En(l,0,Math.PI/180)?n=s.width+i>o:n=s.height/l+i>o}return n}function zi(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,h=1;h1){v=Math.ceil(v);for(var y=0;y2){var o=n[0],s=n[n.length-1];o.get("visible")||(o.show(),zi(e,r,!1,i)&&(a=!0)),s.get("visible")||(s.show(),zi(e,r,!0,i)&&(a=!0))}return a}function pg(e,r){(0,c.each)(e,function(t){var i=t.attr("x"),n=t.attr("y"),a=Pr({x:i,y:n},r);t.attr("matrix",a)})}function Cl(e,r,t,i){var n=r.getChildren();if(!n.length||!e&&n.length<2)return!1;var a=Ja(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);pg(n,l)}return o}function yg(){return Al}function Al(e,r,t,i){return Cl(e,r,t,function(){return(0,c.isNumber)(i)?i:e?Bt.verticalAxisRotate:Bt.horizontalAxisRotate})}function mg(e,r,t){return Cl(e,r,t,function(i,n){if(!i)return e?Bt.verticalAxisRotate:Bt.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 xg=function(e){(0,d.__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,d.__assign)((0,d.__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,c.isNumberEqual)(t.x,i.x)},r.prototype.isHorizontal=function(){var t=this.get("start"),i=this.get("end");return(0,c.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=wt.Fv([0,0],i),a=this.get("verticalFactor"),o=[n[1],n[0]*-1];return wt.bA([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,h=l,f=0,v=0;s&&(f=s.style.fontSize,v=s.spacing),h&&(h=h-u-v-f);var g=this.get("overlapOrder");if((0,c.each)(g,function(m){o[m]&&i.canProcessOverlap(m)&&i.autoProcessOverlap(m,o[m],t,h)}),s&&(0,c.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,c.isNil)(i.rotate):!0},r.prototype.autoProcessOverlap=function(t,i,n,a){var o=this,s=this.isVertical(),l=!1,u=ot[t];if(i===!0){var h=this.get("label");l=u.getDefault()(s,n,a)}else if((0,c.isFunction)(i))l=i(s,n,a);else if((0,c.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(),g=this.get("verticalFactor");(0,c.each)(v,function(y){var m=y.attr("textAlign");if(m==="center"){var x=g>0?"end":"start";y.attr("textAlign",x)}})}}else if(t==="autoHide"){var p=n.getChildren().slice(0);(0,c.each)(p,function(y){y.get("visible")||(o.get("isRegister")&&o.unregisterElement(y),y.remove())})}},r}(xl),_g=xg,wg=function(e){(0,d.__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,d.__assign)((0,d.__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 h=this.getCirclePoint(s),f=this.getCirclePoint(l),v=Math.abs(l-s)>Math.PI?1:0,g=s>l?0:1;u=[["M",i,n],["L",h.x,h.y],["A",a,o,0,v,g,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=wt.kE(a);return wt.bA(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,c.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,h=0;a&&(u=a.style.fontSize,h=a.spacing),l&&(l=l-s-h-u);var f=this.get("overlapOrder");if((0,c.each)(f,function(g){n[g]&&i.canProcessOverlap(g)&&i.autoProcessOverlap(g,n[g],t,l)}),a&&(0,c.isNil)(a.offset)){var v=t.getCanvasBBox().height;a.offset=s+v+h+u/2}},r.prototype.autoProcessOverlap=function(t,i,n,a){var o=this,s=!1,l=ot[t];if(a>0)if(i===!0)s=l.getDefault()(!1,n,a);else if((0,c.isFunction)(i))s=i(!1,n,a);else if((0,c.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 h=n.getChildren(),f=this.get("verticalFactor");(0,c.each)(h,function(g){var p=g.attr("textAlign");if(p==="center"){var y=f>0?"end":"start";g.attr("textAlign",y)}})}}else if(t==="autoHide"){var v=n.getChildren().slice(0);(0,c.each)(v,function(g){g.get("visible")||(o.get("isRegister")&&o.unregisterElement(g),g.remove())})}},r}(xl),bg=wg,Sg=function(e){(0,d.__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,d.__assign)((0,d.__assign)({},t),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:Bt.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:Bt.textColor,textAlign:"center",textBaseline:"middle",fontFamily:Bt.fontFamily}},textBackground:{padding:5,style:{stroke:Bt.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,c.isNil)(o)){var s=this.getTextPoint(),l=null;if(a){var u=this.getRotateAngle();l=Pr(s,u)}this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:(0,d.__assign)((0,d.__assign)((0,d.__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,d.__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=Fn(a.padding),l=a.style,u=this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:(0,d.__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}(be),io=Sg,Cg=function(e){(0,d.__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,d.__assign)((0,d.__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 yl(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}(io),Fl=Cg,Ag=function(e){(0,d.__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,d.__assign)((0,d.__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,h=i==="start"?l:u,f=this.getRotateAngle()-Math.PI,v=ri(o,s,h),g=Math.cos(f)*n,p=Math.sin(f)*n;return{x:v.x+g,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 h=ri(i,n,a),f=ri(i,n,o),v=Math.abs(o-a)>Math.PI?1:0,g=a>o?0:1;s=[["M",h.x,h.y],["A",n,n,0,v,g,f.x,f.y]]}return s},r}(io),Fg=Ag,Vi="g2-crosshair",no=Vi+"-line",ao=Vi+"-text",Gi,Eg=(Gi={},Gi[""+Vi]={position:"relative"},Gi[""+no]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},Gi[""+ao]={position:"absolute",color:Bt.textColor,fontFamily:Bt.fontFamily},Gi),Mg=function(e){(0,d.__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,d.__assign)((0,d.__assign)({},t),{name:"crosshair",type:"html",locationType:"region",start:{x:0,y:0},end:{x:0,y:0},capture:!1,text:null,containerTpl:'
',crosshairTpl:'
',textTpl:'{content}',domStyles:null,containerClassName:Vi,defaultStyles:Eg,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,E.Z)(i);t.appendChild(n),this.applyStyle(no,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 yl(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,c.substitute)(this.get("textTpl"),t);i=(0,E.Z)(o),a.appendChild(i),this.applyStyle(ao,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:Fe(Math.abs(n.y-i.y))}):(0,k.Z)(t,{height:"1px",width:Fe(Math.abs(n.x-i.x))}),(0,k.Z)(t,{top:Fe(o),left:Fe(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:Fe(a.y),left:Fe(a.x)})}},r.prototype.updateInner=function(t){(0,c.hasKey)(t,"text")&&this.resetText(),e.prototype.updateInner.call(this,t)},r}(to),Tg=Mg,Lg=function(e){(0,d.__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,d.__assign)((0,d.__assign)({},t),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:Bt.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,c.each)(a,function(l,u){var h=l.id||u;if(n){var f=i.getPathStyle();f=(0,c.isFunction)(f)?f(l,u,a):f;var v=i.getElementId("line-"+h),g=i.getGridPath(l.points);i.addShape(t,{type:"path",name:"grid-line",id:v,attrs:(0,c.mix)({path:g},f)})}if(o&&u>0){var p=i.getElementId("region-"+h),y=u%2==0;if((0,c.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}(be),El=Lg;function Ig(e,r,t,i){var n=t-e,a=i-r;return Math.sqrt(n*n+a*a)}var Og=function(e){(0,d.__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,d.__assign)((0,d.__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=Ig(s.x,s.y,l.x,l.y),h=i?0:1;a?(o.push(["M",s.x,s.y-u]),o.push(["A",u,u,0,0,h,s.x,s.y+u]),o.push(["A",u,u,0,0,h,s.x,s.y-u]),o.push(["Z"])):(0,c.each)(t,function(f,v){v===0?o.push(["M",f.x,f.y]):o.push(["A",u,u,0,0,h,f.x,f.y])})}else(0,c.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}(El),Pg=Og,Dg=function(e){(0,d.__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,d.__assign)((0,d.__assign)({},t),{type:"line"})},r.prototype.getGridPath=function(t){var i=[];return(0,c.each)(t,function(n,a){a===0?i.push(["M",n.x,n.y]):i.push(["L",n.x,n.y])}),i},r}(El),kg=Dg,Bg=function(e){(0,d.__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,d.__assign)((0,d.__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)),Bi(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=Fn(i.padding),o=(0,d.__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,d.__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=Fn(t.padding);i.x=n[3],i.y=n[0]}this.set("currentPoint",i)},r}(be),Ml=Bg,oo={marker:{style:{inactiveFill:"#000",inactiveOpacity:.45,fill:"#000",opacity:1,size:12}},text:{style:{fill:"#ccc",fontSize:12}}},Tn={fill:Bt.textColor,fontSize:12,textAlign:"start",textBaseline:"middle",fontFamily:Bt.fontFamily,fontWeight:"normal",lineHeight:12},so="navigation-arrow-right",lo="navigation-arrow-left",Tl={right:90*Math.PI/180,left:(360-90)*Math.PI/180,up:0,down:180*Math.PI/180},Rg=function(e){(0,d.__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.currentPageIndexm&&(m=M),g==="horizontal"?(x&&xb&&(b=G.width)}),S=b,b+=v,u&&(b=Math.min(u,b),S=Math.min(u,S)),this.pageWidth=b,this.pageHeight=h-Math.max(m.height,g+C);var B=Math.floor(this.pageHeight/(g+C));(0,c.each)(l,function(I,G){G!==0&&G%B==0&&(_+=1,x.x+=b,x.y=o),n.moveElementTo(I,x),I.getParent().setClip({type:"rect",attrs:{x:x.x,y:x.y,width:b,height:g}}),x.y+=g+C}),this.totalPagesCnt=_,this.moveElementTo(y,{x:a+S/2-m.width/2-m.minX,y:h-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,c.get)(a.marker,"style",{}),u=l.size,h=u===void 0?12:u,f=(0,d.__rest)(l,["size"]),v=this.drawArrow(s,o,lo,i==="horizontal"?"up":"left",h,f);v.on("click",this.onNavigationBack);var g=v.getBBox();o.x+=g.width+2;var p=this.addShape(s,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:(0,d.__assign)({x:o.x,y:o.y+h/2,text:n,textBaseline:"middle"},(0,c.get)(a.text,"style"))}),y=p.getBBox();o.x+=y.width+2;var m=this.drawArrow(s,o,so,i==="horizontal"?"down":"right",h,f);return m.on("click",this.onNavigationAfter),s},r.prototype.updateNavigation=function(t){var i=(0,c.deepMix)({},oo,this.get("pageNavigator")),n=i.marker.style,a=n.fill,o=n.opacity,s=n.inactiveFill,l=n.inactiveOpacity,u=this.currentPageIndex+"/"+this.totalPagesCnt,h=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),f=t?t.findById(this.getElementId(lo)):this.getElementByLocalId(lo),v=t?t.findById(this.getElementId(so)):this.getElementByLocalId(so);h.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 g=f.getBBox().maxX+2;h.attr("x",g),g+=h.getBBox().width+2,this.updateArrowPath(v,{x:g,y:0})},r.prototype.drawArrow=function(t,i,n,a,o,s){var l=i.x,u=i.y,h=this.addShape(t,{type:"path",id:this.getElementId(n),name:n,attrs:(0,d.__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 h.attr("matrix",Pr({x:l+o/2,y:u+o/2},Tl[a])),h},r.prototype.updateArrowPath=function(t,i){var n=i.x,a=i.y,o=t.attr(),s=o.size,l=o.direction,u=Pr({x:n+s/2,y:a+s/2},Tl[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 qa(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,c.each)(o,function(l){var u=l.get("name"),h=u.split("-")[2],f=Ni(t,h,s);f&&(l.attr(f),h==="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}(Ml),Ng=Rg,zg=1.4,Ll=.4,Vg=function(e){(0,d.__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,d.__assign)((0,d.__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:Bt.textColor,textBaseline:"middle",fontFamily:Bt.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:Bt.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];sa&&(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],h=i.getRange(),f=s-o;f<0?l[0]+f>h.min?i.setValue([l[0]+f,l[1]+f]):i.setValue([h.min,h.min+u]):f>0&&(f>0&&l[1]+fo&&(f=o),f0&&this.changeRailLength(a,s,n[s]-g)}},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(),h=t.getBBox(),f=i.getBBox(),v=u.height;this.fitRailLength(h,f,u,n),u=n.getBBox(),s==="rail"?(t.attr({x:a.x,y:a.y+v/2}),this.changeRailPosition(n,a.x+h.width+l,a.y),i.attr({x:a.x+h.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+h.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(),h=t.getBBox(),f=i.getBBox();if(this.fitRailLength(h,f,u,n),u=n.getBBox(),s==="rail")t.attr({x:a.x,y:a.y}),this.changeRailPosition(n,a.x,a.y+h.height+l),i.attr({x:a.x,y:a.y+h.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(h.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}(Ml),Gg=Vg,or="g2-tooltip",sr="g2-tooltip-title",Wi="g2-tooltip-list",Ln="g2-tooltip-list-item",In="g2-tooltip-marker",On="g2-tooltip-value",Il="g2-tooltip-name",uo="g2-tooltip-crosshair-x",co="g2-tooltip-crosshair-y",qe,Wg=(qe={},qe[""+or]={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:Bt.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},qe[""+sr]={marginBottom:"4px"},qe[""+Wi]={margin:"0px",listStyleType:"none",padding:"0px"},qe[""+Ln]={listStyleType:"none",marginBottom:"4px"},qe[""+In]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},qe[""+On]={display:"inline-block",float:"right",marginLeft:"30px"},qe[""+uo]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},qe[""+co]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},qe);function Hg(e,r,t,i,n){var a={left:en.x+n.width,top:rn.y+n.height};return a}function Yg(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 Xg(e,r,t,i,n,a,o){var s=Yg(e,r,t,i,n,a);if(o){var l=Hg(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 jg(e,r){var t=!1;return(0,c.each)(r,function(i){if((0,c.hasKey)(e,i))return t=!0,!1}),t}var Ug=function(e){(0,d.__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,d.__assign)((0,d.__assign)({},t),{name:"tooltip",type:"html",x:0,y:0,items:[],customContent:null,containerTpl:'
    ',itemTpl:'
  • {name}: {value}
  • `,xCrosshairTpl:'
    ',yCrosshairTpl:'
    ',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:or,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:Wg})},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():(jg(t,["title","showTitle"])&&this.resetTitle(),(0,c.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"),h=this.getContainer(),f=this.getBBox(),v=f.width,g=f.height,p;u&&(p=ki(u));var y=Xg(t,i,n,v,g,l,p);(0,k.Z)(h,{left:Fe(y.x+o),top:Fe(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,c.isElement)(n)?t=n:t=(0,E.Z)(n)}return t},r.prototype.cacheDoms=function(){var t=this.getContainer(),i=t.getElementsByClassName(sr)[0],n=t.getElementsByClassName(Wi)[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=ki(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:Fe(a),top:Fe(i.y),height:Fe(i.height)}):(0,k.Z)(n,{top:Fe(a),left:Fe(i.x),width:Fe(i.width)})},r.prototype.checkCrosshair=function(t){var i=t+"CrosshairDom",n=t+"CrosshairTpl",a="CROSSHAIR_"+t.toUpperCase(),o=J[a],s=this.get(i),l=this.get("parent");return s||(s=(0,E.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,c.each)(t,function(a){var o=yr.toCSSGradient(a.color),s=(0,d.__assign)((0,d.__assign)({},a),{color:o}),l=(0,c.substitute)(i,s),u=(0,E.Z)(l);n.appendChild(u)}),this.applyChildrenStyles(n,this.get("domStyles")))},r.prototype.clearItemDoms=function(){this.get("listDom")&&$a(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}(to),Zg=Ug,Kg={opacity:0},qg={stroke:"#C5C5C5",strokeOpacity:.85},$g={fill:"#CACED4",opacity:.85},Pn=F(80389);function Qg(e){return(0,c.map)(e,function(r,t){var i=t===0?"M":"L",n=r[0],a=r[1];return[i,n,a]})}function Ol(e){return Qg(e)}function Jg(e){if(e.length<=2)return Ol(e);var r=[];(0,c.each)(e,function(o){(0,c.isEqual)(o,r.slice(r.length-2))||r.push(o[0],o[1])});var t=(0,Pn.e9)(r,!1),i=(0,c.head)(e),n=i[0],a=i[1];return t.unshift(["M",n,a]),t}function tp(e,r,t,i){i===void 0&&(i=!0);var n=new Oi.bJ({values:e}),a=new Oi.WD({values:(0,c.map)(e,function(s,l){return l})}),o=(0,c.map)(e,function(s,l){return[a.scale(l)*r,t-n.scale(s)*t]});return i?Jg(o):Ol(o)}function ep(e,r){var t=new Oi.bJ({values:e}),i=t.max<0?t.max:Math.max(0,t.min);return r-t.scale(i)*r}function rp(e,r,t,i){var n=(0,d.__spreadArrays)(e),a=ep(i,t);return n.push(["L",r,a]),n.push(["L",0,a]),n.push(["Z"]),n}var ip=function(e){(0,d.__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,d.__assign)((0,d.__assign)({},t),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:Kg,lineStyle:qg,areaStyle:$g})},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,h=i.lineStyle,f=i.areaStyle;this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,d.__assign)({x:0,y:0,width:n,height:a},u)});var v=tp(o,n,a,s);if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:(0,d.__assign)({path:v},h)}),l){var g=rp(v,n,a,o);this.addShape(t,{id:this.getElementId("area"),type:"path",attrs:(0,d.__assign)({path:g},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}(be),XT=null,Pl={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},Dl=function(e){(0,d.__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,d.__assign)((0,d.__assign)({},t),{name:"handler",x:0,y:0,width:10,height:24,style:Pl})},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,h=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:h,cursor:f}});var v=1/3*n,g=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:g,y1:p,x2:g,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}(be),jT=null,np={fill:"#416180",opacity:.05},ap={fill:"#5B8FF9",opacity:.15,cursor:"move"},Dn=10,op={width:Dn,height:24},sp={textBaseline:"middle",fill:"#000",opacity:.45},lp="sliderchange",up=function(e){(0,d.__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,c.get)(a,"touches.0.pageX",a.pageX),t.prevY=(0,c.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,c.get)(i,"touches.0.pageX",i.pageX),s=(0,c.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(lp,[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,c.clamp)(n,t,i),s=(0,c.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,c.isArray)(t)&&t.length===2){var n=[this.get("start"),this.get("end")];this.update({start:(0,c.clamp)(t[0],i.min,i.max),end:(0,c.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,d.__assign)((0,d.__assign)({},t),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:np,foregroundStyle:ap,handlerStyle:op,textStyle:sp}})},r.prototype.update=function(t){var i=t.start,n=t.end,a=(0,d.__assign)({},t);(0,c.isNil)(i)||(a.start=(0,c.clamp)(i,0,1)),(0,c.isNil)(n)||(a.end=(0,c.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,c.clamp)(this.get("start"),0,1)),this.set("end",(0,c.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,h=i.minText,f=i.maxText,v=i.backgroundStyle,g=v===void 0?{}:v,p=i.foregroundStyle,y=p===void 0?{}:p,m=i.textStyle,x=m===void 0?{}:m,_=(0,c.deepMix)({},Pl,this.cfg.handlerStyle),w=n*o,b=a*o;(0,c.size)((0,c.get)(u,"data"))&&(this.trend=this.addComponent(t,(0,d.__assign)({component:ip,id:this.getElementId("trend"),x:0,y:0,width:o,height:s},u))),this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:(0,d.__assign)({x:0,y:0,width:o,height:s},g)});var S=this.addShape(t,{id:this.getElementId("minText"),type:"text",attrs:(0,d.__assign)({y:s/2,textAlign:"right",text:h,silent:!1},x)}),C=this.addShape(t,{id:this.getElementId("maxText"),type:"text",attrs:(0,d.__assign)({y:s/2,textAlign:"left",text:f,silent:!1},x)}),M=this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:(0,d.__assign)({y:0,height:s},y)}),L=(0,c.get)(_,"width",Dn),B=(0,c.get)(_,"height",24);this.minHandler=this.addComponent(t,{component:Dl,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(s-B)/2,width:L,height:B,cursor:"ew-resize",style:_}),this.maxHandler=this.addComponent(t,{component:Dl,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(s-B)/2,width:L,height:B,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,h=a.maxText,f=a.handlerStyle,v=a.height,g=o*l,p=s*l;this.trend&&(this.trend.update({width:l,height:v}),this.get("updateAutoRender")||this.trend.render()),t.attr("x",g),t.attr("width",p-g);var y=(0,c.get)(f,"width",Dn);i.attr("text",u),n.attr("text",h);var m=this._dodgeText([g,p],i,n),x=m[0],_=m[1];this.minHandler&&(this.minHandler.update({x:g-y/2}),this.get("updateAutoRender")||this.minHandler.render()),(0,c.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,c.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,h=2,f=(0,c.get)(l,"width",Dn),v=t[0],g=t[1],p=!1;v>g&&(a=[g,v],v=a[0],g=a[1],o=[n,i],i=o[0],n=o[1],p=!0);var y=i.getBBox(),m=n.getBBox(),x=y.width>v-h?{x:v+f/2+h,textAlign:"left"}:{x:v-f/2-h,textAlign:"right"},_=m.width>u-g-h?{x:g-f/2-h,textAlign:"right"}:{x:g+f/2+h,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}(be),UT=null,ii=F(57817),cp={trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},ho={default:cp,hover:{thumbColor:"rgba(0,0,0,0.2)"}},hp=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.clearEvents=c.noop,t.onStartEvent=function(i){return function(n){t.isMobile=i,n.originalEvent.preventDefault();var a=i?(0,c.get)(n.originalEvent,"touches.0.clientX"):n.clientX,o=i?(0,c.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,ii.Z)(i,"touchmove",t.onMouseMove),(0,ii.Z)(i,"touchend",t.onMouseUp),(0,ii.Z)(i,"touchcancel",t.onMouseUp)]:n=[(0,ii.Z)(i,"mousemove",t.onMouseMove),(0,ii.Z)(i,"mouseup",t.onMouseUp),(0,ii.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,c.get)(i,"touches.0.clientX"):i.clientX,l=t.isMobile?(0,c.get)(i,"touches.0.clientY"):i.clientY,u=a?s:l,h=u-t.startPos;t.startPos=u,t.updateThumbOffset(o+h)},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(),h=u.getBoundingClientRect(),f=i.clientX,v=i.clientY,g=a?f-h.left-o-l/2:v-h.top-s-l/2,p=t.validateRange(g);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,c.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,c.clamp)(t,i.min,i.max)}),this.delegateEmit("valuechange",{originalValue:n,value:this.getValue()})},r.prototype.getValue=function(){return(0,c.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,d.__assign)((0,d.__assign)({},t),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:ho})},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,c.deepMix)({},ho,o).default,l=s.lineCap,u=s.trackColor,h=s.size,f=(0,c.get)(this.cfg,"size",h),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,c.deepMix)({},ho,o).default,l=s.size,u=s.lineCap,h=s.thumbColor,f=(0,c.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:h,lineCap:u,cursor:"default"}:{x1:f/2,y1:n+f/2,x2:f/2,y2:n+a-f/2,lineWidth:f,stroke:h,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+na.x?a.x:r,t=ta.y?a.y:i,n=n=i&&e<=n}function xp(e,r,t){if((0,c.isString)(e))return e.padEnd(r,t);if((0,c.isArray)(e)){var i=e.length;if(i=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;tr.minX&&this.minYr.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}(),ZT=function(e,r){var t=r.start,i=r.end;return new Ae(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 _p(e){return[[e.minX,e.minY],[e.maxX,e.minY],[e.maxX,e.maxY],[e.minX,e.maxY]]}function Yi(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 wp(e){if(e.isPolar){var r=e.startAngle,t=e.endAngle;return t-r==Math.PI*2}return!1}function Bn(e,r){var t=e.getCenter();return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))}function fo(e,r){var t=!1;if(e)if(e.type==="theta"){var i=e.start,n=e.end;t=ni(r.x,i.x,n.x)&&ni(r.y,i.y,n.y)}else{var a=e.invert(r);t=ni(a.x,0,1)&&ni(a.y,0,1)}return t}function ai(e,r){var t=e.getCenter();return Math.atan2(r.y-t.y,r.x-t.x)}function vo(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:mr(l.x,l.y,u+r,o,o)},endState:function(f){var v=(s-o)*f+o,g=mr(l.x,l.y,u+r,o,v);return{path:g}},attrs:{path:mr(l.x,l.y,u+r,o,s)}}}var h;return e.isTransposed?h={height:a+r*2}:h={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:h,attrs:{x:t.x-r,y:i.y-r,width:n+r*2,height:a+r*2}}}function bp(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 Ae.fromRange(o-r,s-r,o+n+r,s+a+r)}var Sp=/^(?:(?!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 Cp(e){var r="linear";return Sp.test(e)?r="timeCat":(0,c.isString)(e)&&(r="cat"),r}function Vl(e,r,t,i){return r===void 0&&(r={}),r.type?r.type:e.type!=="identity"&&at.includes(t)&&["interval"].includes(i)||e.isCategory?"cat":e.type}function Ap(e,r,t){var i=r||[];if((0,c.isNumber)(e)||(0,c.isNil)((0,c.firstValue)(i,e))&&(0,c.isEmpty)(t)){var n=(0,Oi.yZ)("identity");return new n({field:e.toString(),values:[e]})}var a=(0,c.valuesOfKey)(i,e),o=(0,c.get)(t,"type",Cp(a[0])),s=(0,Oi.yZ)(o);return new s((0,d.__assign)({field:e,values:a},t))}function Fp(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 Xi(e){return e.alias||e.field}function Gl(e,r,t){var i=e.values,n=i.length,a;if(n===1)a=[.5,1];else{var o=1,s=0;wp(r)?r.isTransposed?(o=(0,c.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 Ep(e){var r=e.values.filter(function(t){return!(0,c.isNil)(t)&&!isNaN(t)});return Math.max.apply(Math,(0,d.__spreadArray)((0,d.__spreadArray)([],(0,d.__read)(r),!1),[(0,c.isNil)(e.max)?-Infinity:e.max],!1))}function Mp(e){var r,t;switch(e){case T.TOP:r={x:0,y:1},t={x:1,y:1};break;case T.RIGHT:r={x:1,y:0},t={x:1,y:1};break;case T.BOTTOM:r={x:0,y:0},t={x:1,y:0};break;case T.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 Tp(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 Rn(e,r){var t={start:{x:0,y:0},end:{x:0,y:0}};e.isRect?t=Mp(r):e.isPolar&&(t=Tp(e));var i=t.start,n=t.end;return{start:e.convert(i),end:e.convert(n)}}function KT(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 Wl(e){var r=e.start,t=e.end;return r.x===t.x}function Hl(e,r){var t=e.start,i=e.end,n=Wl(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 Nn(e,r){var t=(0,c.get)(e,["components","axis"],{});return(0,c.deepMix)({},(0,c.get)(t,["common"],{}),(0,c.deepMix)({},(0,c.get)(t,[r],{})))}function Yl(e,r,t){var i=(0,c.get)(e,["components","axis"],{});return(0,c.deepMix)({},(0,c.get)(i,["common","title"],{}),(0,c.deepMix)({},(0,c.get)(i,[r,"title"],{})),t)}function go(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?wt.EU(o,s):wt.EU(o,s)*-1,u=l+(r.end-r.start),h=Math.sqrt(Math.pow(a.x-i.x,2)+Math.pow(a.y-i.y,2));return{center:i,radius:h,startAngle:l,endAngle:u}}function zn(e,r){return(0,c.isBoolean)(e)?e===!1?!1:{}:(0,c.get)(e,[r])}function Xl(e,r){return(0,c.get)(e,"position",r)}function jl(e,r){return(0,c.get)(r,["title","text"],Xi(e))}var oi=function(){function e(r,t){this.destroyed=!1,this.facets=[],this.view=r,this.cfg=(0,c.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(Z.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,c.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,c.isNumber)(a)?a/(o===0?t:i):parseFloat(a)/100})},e.prototype.getFieldValues=function(r,t){var i=[],n={};return(0,c.each)(r,function(a){var o=a[t];!(0,c.isNil)(o)&&!n[o]&&(i.push(o),n[o]=!0)}),i},e.prototype.getRegion=function(r,t,i,n){var a=(0,d.__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,h={x:(l+o)*i,y:(u+s)*n},f={x:h.x+l,y:h.y+u};return{start:h,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,c.get)(n,"type","rect");if(o==="rect"&&a.length){(0,c.isNil)(i.axes)&&(i.axes={});var s=i.axes,l=(0,d.__read)(a[0].getXYFields(),2),u=l[0],h=l[1],f=zn(s,u),v=zn(s,h);f!==!1&&(i.axes[u]=this.getXAxisOption(u,s,f,t)),v!==!1&&(i.axes[h]=this.getYAxisOption(h,s,v,t))}},e.prototype.getFacetDataFilter=function(r){return function(t){return(0,c.every)(r,function(i){var n=i.field,a=i.value;return!(0,c.isNil)(a)&&n?t[n]===a:!0})}},e}(),Ul={},Lp=function(e){return Ul[(0,c.lowerCase)(e)]},si=function(e,r){Ul[(0,c.lowerCase)(e)]=r},Ip=function(){function e(r,t){this.context=r,this.cfg=t,r.addAction(this)}return e.prototype.applyCfg=function(r){(0,c.assign)(this,r)},e.prototype.init=function(){this.applyCfg(this.cfg)},e.prototype.destroy=function(){this.context.removeAction(this),this.context=null},e}(),ie=Ip,Op=function(e){(0,d.__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}(ie),Pp=Op,Vn={};function Dp(e,r){var t=Vn[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 Gn(e){var r=Vn[e];return(0,c.get)(r,"ActionClass")}function yt(e,r,t){Vn[e]={ActionClass:r,cfg:t}}function qT(e){delete Vn[e]}function kp(e,r){var t=new Pp(r);return t.callback=e,t.name="callback",t}function Bp(e,r){var t=[];if(e.length){t.push(["M",e[0].x,e[0].y]);for(var i=1,n=e.length;i=o[u]?1:0,v=h>Math.PI?1:0,g=t.convert(s),p=Bn(t,g);if(p>=.5)if(h===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,g.x,g.y])}else l.push(["A",p,p,0,v,f,g.x,g.y]);return l}function Np(e){(0,c.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 zp=function(e,r,t,i){var n,a=[],o=!!i,s,l,u,h,f,v,g;if(o){n=(0,d.__read)(i,2),u=n[0],h=n[1];for(var p=0,y=e.length;p=r||n.height>=r?n:null}function Wp(e,r){var t=e.event,i=t.target,n=i.getCanvasBBox();return n.width>=r||n.height>=r?i.attr("path"):null}function _r(e){var r=e.event,t,i=r.target;return i&&(t=i.get("element")),t}function Rr(e){var r=e.event,t=r.target,i;return t&&(i=t.get("delegateObject")),i}function $l(e){var r=e.event.gEvent;return!(r&&r.fromShape&&r.toShape&&r.fromShape.get("element")===r.toShape.get("element"))}function Ui(e){return e&&e.component&&e.component.isList()}function Ql(e){return e&&e.component&&e.component.isSlider()}function Zi(e){var r=e.event,t=r.target;return t&&t.get("name")==="mask"}function yo(e,r){var t=e.event.target;if(t.get("type")==="path"){var i=Wp(e,r);return i?Xp(e.view,i):void 0}var n=ql(e,r);return n?mo(e.view,n):null}function Jl(e,r,t){var i=ql(e,t);if(!i)return null;var n=e.view,a=_o(n,r,{x:i.x,y:i.y}),o=_o(n,r,{x:i.maxX,y:i.maxY}),s={minX:a.x,minY:a.y,maxX:o.x,maxY:o.y};return mo(r,s)}function we(e){var r=e.geometries,t=[];return(0,c.each)(r,function(i){var n=i.elements;t=t.concat(n)}),e.views&&e.views.length&&(0,c.each)(e.views,function(i){t=t.concat(we(i))}),t}function Hp(e,r,t){var i=we(e);return i.filter(function(n){return je(n,r)===t})}function tu(e,r){var t=e.geometries,i=[];return(0,c.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,c.isArray)(i)?n=i[0][r]:n=i[r],n}function Yp(e,r){return!(r.minX>e.maxX||r.maxXe.maxY||r.maxY=r.x&&e.y<=r.y&&e.maxY>r.y}function $e(e){var r=e.parent,t=null;return r&&(t=r.views.filter(function(i){return i!==e})),t}function Up(e,r){var t=e.getCoordinate();return t.invert(r)}function _o(e,r,t){var i=Up(e,t);return r.getCoordinate().convert(i)}function nu(e,r,t,i){var n=!1;return(0,c.each)(e,function(a){if(a[t]===r[t]&&a[i]===r[i])return n=!0,!1}),n}function li(e,r){var t=e.getScaleByField(r);return!t&&e.views&&(0,c.each)(e.views,function(i){if(t=li(i,r),t)return!1}),t}var Zp=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=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,c.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=ru(this.view),i=this.getCurrentPoint();return i?!!t.find(function(n){var a=n.getBBox();return r?n.get("name")===r&&iu(a,i):iu(a,i)}):!1},e.prototype.destroy=function(){(0,c.each)(this.actions.slice(),function(r){r.destroy()}),this.view=null,this.event=null,this.actions=null,this.cacheMap=null},e}(),Kp=Zp,qp=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}(),$p=qp;function au(e,r,t){var i=e.split(":"),n=i[0],a=r.getAction(n)||Dp(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 ou(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 Be={START:"start",SHOW_ENABLE:"showEnable",END:"end",ROLLBACK:"rollback",PROCESSING:"processing"},Qp=function(e){(0,d.__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,c.each)(this.steps,function(i,n){(0,c.each)(i,function(a){var o=t.getActionCallback(n,a);o&&t.bindEvent(a.trigger,o)})})},r.prototype.clearEvents=function(){var t=this;(0,c.each)(this.steps,function(i,n){(0,c.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 Kp(t);this.context=i;var n=this.steps;(0,c.each)(n,function(a){(0,c.each)(a,function(o){if((0,c.isFunction)(o.action))o.actionObject={action:kp(o.action,i),methodName:"execute"};else if((0,c.isString)(o.action))o.actionObject=au(o.action,i,o.arg);else if((0,c.isArray)(o.action)){var s=o.action,l=(0,c.isArray)(o.arg)?o.arg:[o.arg];o.actionObject=[],(0,c.each)(s,function(u,h){o.actionObject.push(au(u,i,l[h]))})}})})},r.prototype.isAllowStep=function(t){var i=this.currentStepName,n=this.steps;if(i===t||t===Be.SHOW_ENABLE)return!0;if(t===Be.PROCESSING)return i===Be.START;if(t===Be.START)return i!==Be.PROCESSING;if(t===Be.END)return i===Be.PROCESSING||i===Be.START;if(t===Be.ROLLBACK){if(n[Be.END])return i===Be.END;if(i===Be.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!==Be.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(h){a.event=h,n.isAllowExecute(t,i)?((0,c.isArray)(s)?(0,c.each)(s,function(f){a.event=h,ou(f)}):(a.event=h,ou(s)),n.afterExecute(t,i),i.callback&&(a.event=h,i.callback(a))):a.event=null};i.debounce?o[l]=(0,c.debounce)(u,i.debounce.wait,i.debounce.immediate):i.throttle?o[l]=(0,c.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}($p),Jp=Qp,su={};function ty(e){return su[(0,c.lowerCase)(e)]}function Et(e,r){su[(0,c.lowerCase)(e)]=r}function ey(e,r,t){var i=ty(e);if(!i)return null;if((0,c.isPlainObject)(i)){var n=(0,c.mix)((0,c.clone)(i),t);return new Jp(r,n)}else{var a=i;return new a(r,t)}}function ry(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 iy(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 lu(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=ry(e),n=iy(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=Hi(a.getModel(),o),l=s.startAngle,u=s.endAngle,h=(l+u)/2,f=7.5,v=f*Math.cos(h),g=f*Math.sin(h);return{matrix:te.vs(null,[["t",v,g]])}}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,d.__assign)((0,d.__assign)({},t.line.default),{lineCap:null,lineDash:[1,1]})},active:{style:(0,d.__assign)((0,d.__assign)({},t.line.active),{lineCap:null,lineDash:[1,1]})},inactive:{style:(0,d.__assign)((0,d.__assign)({},t.line.inactive),{lineCap:null,lineDash:[1,1]})},selected:{style:(0,d.__assign)((0,d.__assign)({},t.line.selected),{lineCap:null,lineDash:[1,1]})}},dash:{default:{style:(0,d.__assign)((0,d.__assign)({},t.line.default),{lineCap:null,lineDash:[5.5,1]})},active:{style:(0,d.__assign)((0,d.__assign)({},t.line.active),{lineCap:null,lineDash:[5.5,1]})},inactive:{style:(0,d.__assign)((0,d.__assign)({},t.line.inactive),{lineCap:null,lineDash:[5.5,1]})},selected:{style:(0,d.__assign)((0,d.__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,c.deepMix)({},i.grid,{line:{type:"line"}})},radius:{title:null,grid:(0,c.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(or)]={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(sr)]={marginBottom:"12px",marginTop:"12px"},r["".concat(Wi)]={margin:0,listStyleType:"none",padding:0},r["".concat(Ln)]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},r["".concat(In)]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},r["".concat(On)]={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 Ut={100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"},ui={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},ny=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],ay=["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],oy=["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"],uu=function(e){e===void 0&&(e={});var r=e.paletteQualitative10,t=r===void 0?ny:r,i=e.paletteQualitative20,n=i===void 0?ay: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:oy,fontFamily:`"Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,axisLineBorderColor:Ut[25],axisLineBorder:1,axisLineDash:null,axisTitleTextFillColor:Ut[65],axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTitleSpacing:12,axisDescriptionIconFillColor:ui[85],axisTickLineBorderColor:Ut[25],axisTickLineLength:4,axisTickLineBorder:1,axisSubTickLineBorderColor:Ut[15],axisSubTickLineLength:2,axisSubTickLineBorder:1,axisLabelFillColor:Ut[45],axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisLabelOffset:8,axisGridBorderColor:Ut[15],axisGridBorder:1,axisGridLineDash:null,legendTitleTextFillColor:Ut[45],legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:o,legendMarkerSpacing:8,legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:Ut[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:Ut[100],legendPageNavigatorMarkerInactiveFillOpacity:.45,legendPageNavigatorMarkerFillColor:Ut[100],legendPageNavigatorMarkerFillOpacity:1,legendPageNavigatorTextFillColor:Ut[45],legendPageNavigatorTextFontSize:12,sliderRailFillColor:Ut[15],sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:Ut[45],sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:Ut[6],sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:Ut[25],annotationArcBorderColor:Ut[15],annotationArcBorder:1,annotationLineBorderColor:Ut[25],annotationLineBorder:1,annotationLineDash:null,annotationTextFillColor:Ut[65],annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:null,annotationTextBorder:0,annotationRegionFillColor:Ut[100],annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:Ut[25],tooltipCrosshairsBorder:1,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:Ut[65],tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:Ut[65],labelFillColorDark:"#2c3542",labelFillColorLight:"#ffffff",labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:ui[100],innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,overflowLabelFillColor:Ut[65],overflowLabelFontSize:12,overflowLabelLineHeight:12,overflowLabelFontWeight:"normal",overflowLabelBorderColor:ui[100],overflowLabelBorder:1,labelLineBorder:1,labelLineBorderColor:Ut[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:ui[100],pointBorderOpacity:1,pointActiveBorderColor:Ut[100],pointSelectedBorder:2,pointSelectedBorderColor:Ut[100],pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:o,hollowPointBorderOpacity:.95,hollowPointFillColor:ui[100],hollowPointActiveBorder:1,hollowPointActiveBorderColor:Ut[100],hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:Ut[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:Ut[100],hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:Ut[100],hollowAreaInactiveBorderOpacity:.3,intervalFillColor:o,intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:Ut[100],intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:Ut[100],intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:o,hollowIntervalBorderOpacity:1,hollowIntervalFillColor:ui[100],hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:Ut[100],hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:Ut[100],hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3};return(0,d.__assign)((0,d.__assign)({},s),e)},$T=uu();function Hn(e){var r=e.styleSheet,t=r===void 0?{}:r,i=(0,d.__rest)(e,["styleSheet"]),n=uu(t);return(0,c.deepMix)({},lu(n),i)}var sy=Hn({}),wo={default:sy};function Ki(e){return(0,c.get)(wo,(0,c.lowerCase)(e),wo.default)}function ly(e,r){wo[(0,c.lowerCase)(e)]=Hn(r)}function cu(e,r,t){var i=t.translate(e),n=t.translate(r);return(0,c.isNumberEqual)(i,n)}function uy(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 hu(e,r,t){var i=t.coordinate,n=t.getYScale(),a=n.field,o=i.invert(r),s=n.invert(o.y),l=(0,c.find)(e,function(u){var h=u[K];return h[a][0]<=s&&h[a][1]>=s});return l||e[e.length-1]}var cy=(0,c.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;an&&(n=s)}return(n-i)/(t-1)});function hy(e,r,t){var i=r.getAttribute("position"),n=i.getFields(),a=r.scales,o=(0,c.isFunction)(t)||!t?n[0]:t,s=a[o],l=s?s.getText(e[o]):e[o]||o;return(0,c.isFunction)(t)?t(l,e):l}function fy(e){var r=(0,c.values)(e.attributes);return(0,c.filter)(r,function(t){return(0,c.contains)(at,t.type)})}function fu(e){var r,t,i=fy(e),n;try{for(var a=(0,d.__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,c.get)(e.scaleDefs,l.field),h=Vl(l,u,s.type,e.type);if(h!=="cat"){n=l;break}}}}catch(g){r={error:g}}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 vy(e,r){var t=r.field,i=e[t];if((0,c.isArray)(i)){var n=i.map(function(a){return r.getText(a)});return n.join("-")}return r.getText(i)}function dy(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=fu(r);return Xi(a)}function vu(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,h=u.invert(e),f=n.invert(h.x),v=a.invert(h.y),g=Infinity,p=0;p=b)if(L)(0,c.isArray)(l)||(l=[]),l.push(B);else{l=B;break}}(0,c.isArray)(l)&&(l=hu(l,e,t))}else{var I=void 0;if(!n.isLinear&&n.type!=="timeCat"){for(var p=0;pn.translate(M)||bn.max||bMath.abs(n.translate(I[K][o])-b)&&(w=I)}var zt=cy(t.getXScale());return!l&&Math.abs(n.translate(w[K][o])-b)<=zt/2&&(l=w),l}function bo(e,r,t,i){var n,a;t===void 0&&(t=""),i===void 0&&(i=!1);var o=e[K],s=hy(o,r,t),l=r.tooltipOption,u=r.theme.defaultColor,h=[],f,v;function g(B,I){if(i||!(0,c.isNil)(I)&&I!==""){var G={title:s,data:o,mappingData:e,name:B,value:I,color:e.color||u,marker:!0};h.push(G)}}if((0,c.isObject)(l)){var p=l.fields,y=l.callback;if(y){var m=p.map(function(B){return e[K][B]}),x=y.apply(void 0,(0,d.__spreadArray)([],(0,d.__read)(m),!1)),_=(0,d.__assign)({data:e[K],mappingData:e,title:s,color:e.color||u,marker:!0},x);h.push(_)}else{var w=r.scales;try{for(var b=(0,d.__values)(p),S=b.next();!S.done;S=b.next()){var C=S.value;if(!(0,c.isNil)(o[C])){var M=w[C];f=Xi(M),v=M.getText(o[C]),g(f,v)}}}catch(B){n={error:B}}finally{try{S&&!S.done&&(a=b.return)&&a.call(b)}finally{if(n)throw n.error}}}}else{var L=fu(r);v=vy(o,L),f=dy(o,r),g(f,v)}return h}function du(e,r,t,i){var n,a,o=i.showNil,s=[],l=e.dataArray;if(!(0,c.isEmpty)(l)){e.sort(l);try{for(var u=(0,d.__values)(l),h=u.next();!h.done;h=u.next()){var f=h.value,v=vu(r,f,e);if(v){var g=e.getElementId(v),p=e.elementsMap[g];if(e.type==="heatmap"||p.visible){var y=bo(v,e,t,o);y.length&&s.push(y)}}}}catch(m){n={error:m}}finally{try{h&&!h.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}}return s}function gu(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=bo(l,e,t,n);u.length&&a.push(u)}return a}function So(e,r,t){var i,n,a=[],o=e.geometries,s=t.shared,l=t.title,u=t.reversed;try{for(var h=(0,d.__values)(o),f=h.next();!f.done;f=h.next()){var v=f.value;if(v.visible&&v.tooltipOption!==!1){var g=v.type,p=void 0;["point","edge","polygon"].includes(g)?p=gu(v,r,l,t):["area","line","path","heatmap"].includes(g)||s!==!1?p=du(v,r,l,t):p=gu(v,r,l,t),p.length&&(u&&p.reverse(),a.push(p))}}}catch(y){i={error:y}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}finally{if(i)throw i.error}}return a}function gy(e,r,t){var i,n,a=So(e,r,t);try{for(var o=(0,d.__values)(e.views),s=o.next();!s.done;s=o.next()){var l=s.value;a=a.concat(So(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 py(e){return!(0,c.isNumber)(e)&&!(0,c.isArray)(e)}function Co(e){e===void 0&&(e=0);var r=(0,c.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,d.__spreadArray)((0,d.__spreadArray)([],(0,d.__read)(r),!1),(0,d.__read)(r),!1);break;case 3:r=(0,d.__spreadArray)((0,d.__spreadArray)([],(0,d.__read)(r),!1),[r[1]],!1);break;default:r=r.slice(0,4);break}return r}var Yn={};function Nr(e,r){Yn[e]=r}function QT(e){delete Yn[e]}function yy(){return Object.keys(Yn)}function my(e){return Yn[e]}var xy=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,c.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,d.__assign)({start:r,end:t},a),l=gd(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,d.__assign)({type:"rect",actions:[],cfg:{}},r)},e.prototype.execActions=function(r){var t=this,i=this.option.actions;(0,c.each)(i,function(n){var a,o=(0,d.__read)(n),s=o[0],l=o.slice(1),u=(0,c.isNil)(r)?!0:r.includes(s);u&&(a=t.coordinate)[s].apply(a,(0,d.__spreadArray)([],(0,d.__read)(l),!1))})},e}(),_y=xy,wy=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 vt.ju(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}(),ne=wy;function by(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 Sy=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,c.deepMix)(l,o.scaleDef,i)}var u=Ap(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,c.each)(n,function(u){var h=i.getScale(u);s=(0,c.isNumber)(h.max)?Math.max(s,h.max):s,o=(0,c.isNumber)(h.min)?Math.min(o,h.min):o,(0,c.each)(h.values,function(f){l.includes(f)||l.push(f)})}),(0,c.each)(n,function(u){var h=i.getScale(u);if(h.isContinuous)h.change({min:o,max:s,values:l});else if(h.isCategory){var f=h.range,v=i.getScaleMeta(u);l&&!(0,c.get)(v,["scaleDef","range"])&&(f=Gl((0,c.deepMix)({},h,{values:l}),r,t)),h.change({values:l,range:f})}})})},e.prototype.cacheScale=function(r,t,i){var n=this.getScaleMeta(i);n&&n.scale.type===r.type?(Fp(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,c.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,c.get)(i,["sync"]);return a===!0?n:a===!1?void 0:a},e.prototype.getScaleMeta=function(r){return this.scales.get(r)},e}(),Xn=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,d.__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,d.__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 T.TOP:case T.TOP_LEFT:case T.TOP_RIGHT:this.top+=n;break;case T.RIGHT:case T.RIGHT_TOP:case T.RIGHT_BOTTOM:this.right+=i;break;case T.BOTTOM:case T.BOTTOM_LEFT:case T.BOTTOM_RIGHT:this.bottom+=n;break;case T.LEFT:case T.LEFT_TOP:case T.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,d.__spreadArray)([void 0],(0,d.__read)(this.getPadding()),!1)))},e}();function Cy(e){var r=e.padding;if(!py(r))return new(Xn.bind.apply(Xn,(0,d.__spreadArray)([void 0],(0,d.__read)(Co(r)),!1)));var t=e.viewBBox,i=new Xn,n=[],a=[],o=[];return(0,c.each)(e.getComponents(),function(s){var l=s.type;l===z.AXIS?n.push(s):[z.LEGEND,z.SLIDER,z.SCROLLBAR].includes(l)?a.push(s):l!==z.GRID&&l!==z.TOOLTIP&&o.push(s)}),(0,c.each)(n,function(s){var l=s.component,u=l.getLayoutBBox(),h=new Ae(u.x,u.y,u.width,u.height),f=h.exceed(t);i.max(f)}),(0,c.each)(a,function(s){var l=s.component,u=s.direction,h=l.getLayoutBBox(),f=l.get("padding"),v=new Ae(h.x,h.y,h.width,h.height).expand(f);i.inc(v,u)}),(0,c.each)(o,function(s){var l=s.component,u=s.direction,h=l.getLayoutBBox(),f=new Ae(h.x,h.y,h.width,h.height);i.inc(f,u)}),i}function Ay(e,r,t){var i=t.instance();r.forEach(function(n){n.autoPadding=i.max(n.autoPadding.getPadding())})}var pu=function(e){(0,d.__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=yy(),i.scalePool=new Sy,i.layoutFunc=by,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,c.uniqueId)("view"):n,o=t.parent,s=t.canvas,l=t.backgroundGroup,u=t.middleGroup,h=t.foregroundGroup,f=t.region,v=f===void 0?{start:{x:0,y:0},end:{x:1,y:1}}:f,g=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=h,i.region=v,i.padding=g,i.appendPadding=p,i.options=(0,d.__assign)((0,d.__assign)({},i.options),m),i.limitInPlot=x,i.id=a,i.syncViewPadding=_,i.themeObject=(0,c.isObject)(y)?(0,c.deepMix)({},Ki("default"),Hn(y)):Ki(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(A.BEFORE_RENDER,ne.fromData(this,A.BEFORE_RENDER,i)),this.paint(t),this.emit(A.AFTER_RENDER,ne.fromData(this,A.AFTER_RENDER,i)),this.visible===!1&&this.changeVisible(!1)},r.prototype.clear=function(){var t=this;this.emit(A.BEFORE_CLEAR),this.filteredData=[],this.coordinateInstance=void 0,this.isDataChanged=!1,this.isCoordinateChanged=!1;for(var i=this.geometries,n=0;n');I.appendChild(G);var q=N(I,l,a,o),ft=re(v),mt=new ft.Canvas((0,d.__assign)({container:G,pixelRatio:g,localRefresh:y,supportCSSTransform:w},q));return i=e.call(this,{parent:null,canvas:mt,backgroundGroup:mt.addGroup({zIndex:j.BG}),middleGroup:mt.addGroup({zIndex:j.MID}),foregroundGroup:mt.addGroup({zIndex:j.FORE}),padding:u,appendPadding:h,visible:x,options:C,limitInPlot:M,theme:L,syncViewPadding:B})||this,i.onResize=(0,c.debounce)(function(){i.forceFit()},300),i.ele=I,i.canvas=mt,i.width=q.width,i.height=q.height,i.autoFit=l,i.localRefresh=y,i.renderer=v,i.wrapperElement=G,i.updateCanvasStyle(),i.bindAutoFit(),i.initDefaultInteractions(S),i}return r.prototype.initDefaultInteractions=function(t){var i=this;(0,c.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(A.BEFORE_CHANGE_SIZE),this.width=t,this.height=i,this.canvas.changeSize(t,i),this.render(!0),this.emit(A.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(),P(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=N(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}(Fy),My=Ey,ci=function(){function e(r){this.visible=!0,this.components=[],this.view=r}return e.prototype.clear=function(r){(0,c.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 Ty(e){for(var r=[],t=function(n){var a=e[n],o=(0,c.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;i1){var b=u[0],S=Math.abs(t.y-b[0].y);try{for(var C=(0,d.__values)(u),M=C.next();!M.done;M=C.next()){var L=M.value,B=Math.abs(t.y-L[0].y);B<=S&&(b=L,S=B)}}catch(I){s={error:I}}finally{try{M&&!M.done&&(l=C.return)&&l.call(C)}finally{if(s)throw s.error}}u=[b]}return Ty((0,c.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 Ae(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,c.get)(a,["components","tooltip"],{}),s=(0,c.get)(n,"enterable",o.enterable);return(0,c.deepMix)({},o,n,{capture:!!(s||this.isLocked)})},r.prototype.processCustomContent=function(t){if((0,c.isBoolean)(t)||!(0,c.get)(t,"customContent"))return t;var i=t.customContent,n=function(a,o){var s=i(a,o)||"";return(0,c.isString)(s)?'
    '+s+"
    ":s};return(0,d.__assign)((0,d.__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 kn((0,d.__assign)((0,d.__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,d.__values)(t),h=u.next();!h.done;h=u.next()){var f=h.value,v=f.x,g=f.y;if(l||(o==null?void 0:o.getClip())){var p=vo(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=(0,d.__assign)((0,d.__assign)({fill:f.color,symbol:"circle",shadowColor:f.color},i),{x:v,y:g});o.addShape("marker",{attrs:x})}}catch(_){n={error:_}}finally{try{h&&!h.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}},r.prototype.renderCrosshairs=function(t,i){var n=(0,c.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();if(!!fo(n,t)){var 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=ai(n,t),l=n.getCenter(),u=n.getRadius();o=le(l.x,l.y,u,s),a=l}var h=(0,c.deepMix)({start:a,end:o,container:this.getTooltipCrosshairsGroup()},(0,c.get)(i,"crosshairs",{}),this.getCrosshairsText("x",t,i));delete h.type;var f=this.xCrosshair;f?f.update(h):(f=new Fl(h),f.init()),f.render(),f.show(),this.xCrosshair=f}},r.prototype.renderYCrosshairs=function(t,i){var n=this.getViewWithGeometry(this.view).getCoordinate();if(!!fo(n,t)){var 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:Bn(n,t),startAngle:n.startAngle,endAngle:n.endAngle},o="Circle";a=(0,c.deepMix)({container:this.getTooltipCrosshairsGroup()},a,(0,c.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 rt[o](a),u.init()):u.update(a):(u=new rt[o](a),u.init()),u.render(),u.show(),this.yCrosshair=u}},r.prototype.getCrosshairsText=function(t,i,n){var a=(0,c.get)(n,["crosshairs","text"]),o=(0,c.get)(n,["crosshairs","follow"]),s=this.items;if(a){var l=this.getViewWithGeometry(this.view),u=s[0],h=l.getXScale(),f=l.getYScales()[0],v=void 0,g=void 0;if(o){var p=this.view.getCoordinate().invert(i);v=h.invert(p.x),g=f.invert(p.y)}else v=u.data[h.field],g=u.data[f.field];var y=t==="x"?v:g;return(0,c.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=So(t,i,o);try{for(var l=(0,d.__values)(t.views),u=l.next();!u.done;u=l.next()){var h=u.value;s=s.concat(this.findItemsFromView(h,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,c.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}(ci),yu=Ly,mu={};function xu(e){return mu[e.toLowerCase()]}function Re(e,r){mu[e.toLowerCase()]=r}var hi={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},Iy={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"}}},_u={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 Oy(e,r){return{delay:(0,c.isFunction)(e.delay)?e.delay(r):e.delay,easing:(0,c.isFunction)(e.easing)?e.easing(r):e.easing,duration:(0,c.isFunction)(e.duration)?e.duration(r):e.duration,callback:e.callback,repeat:e.repeat}}function wu(e,r,t){var i=Iy[e];return i&&((0,c.isFunction)(i)&&(i=i(r)),i=(0,c.deepMix)({},hi,i),t)?i[t]:i}function fi(e,r,t){var i=(0,c.get)(e.get("origin"),"data",K),n=r.animation,a=Oy(r,i);if(n){var o=xu(n);o&&o(e,a,t)}else e.animate(t.toAttrs,a)}function Py(e,r,t,i,n){if(_u[t]){var a=_u[t](i),o=xu((0,c.get)(a,"animation",""));if(o){var s=(0,d.__assign)((0,d.__assign)((0,d.__assign)({},hi.appear),a),r);e.stopAnimate(),o(e,s,{coordinate:i,minYPoint:n,toAttrs:null})}}}var Ao="element-background",Dy=function(e){(0,d.__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?fi(n,a,{coordinate:i.coordinate,toAttrs:(0,d.__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,h=a.indexOf(t);if(i){if(h>-1)return;a.push(t),(t==="active"||t==="selected")&&(l==null||l.toFront())}else{if(h===-1)return;if(a.splice(h,1),t==="active"||t==="selected"){var f=this.geometry,v=f.sortZIndex,g=f.zIndexReversed,p=g?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),vl(this.shape,"statechange",m)},r.prototype.clearStates=function(){var t=this,i=this.states;(0,c.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,c.deepMix)({},l,o)}return this.statesStyle},r.prototype.getStateStyle=function(t,i){var n=this.getStatesStyle(),a=(0,c.get)(n,[t,"style"],{}),o=a[i]||a;return(0,c.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,d.__assign)((0,d.__assign)({},a),{callback:function(){var o;(0,c.isFunction)(a.callback)&&a.callback(),(o=i.geometry)===null||o===void 0||o.emit(D.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,c.isString)(u)&&(this.shape.cfg.name=["element",u]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var h=i?"enter":"appear",f=this.getAnimateCfg(h);f&&((n=this.geometry)===null||n===void 0||n.emit(D.BEFORE_DRAW_ANIMATE),fi(this.shape,f,{coordinate:o.coordinate,toAttrs:(0,d.__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"),h=i.get("clipShape");if(this.syncShapeStyle(u,h,n,a),t.isGroup())for(var f=t.get("children"),v=i.get("children"),g=0;g=0?a=i:n<=0?a=n:a=0,a},r.prototype.createAttrOption=function(t,i,n){if((0,c.isNil)(i)||(0,c.isObject)(i))(0,c.isObject)(i)&&(0,c.isEqual)(Object.keys(i),["values"])?(0,c.set)(this.attributeOption,t,{fields:i.values}):(0,c.set)(this.attributeOption,t,i);else{var a={};(0,c.isNumber)(i)?a.values=[i]:a.fields=$i(i),n&&((0,c.isFunction)(n)?a.callback=n:a.values=n),(0,c.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 g=a[v];if(!g)return{value:void 0};var p=(0,d.__assign)({},g),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]&&at.includes(v)){var M=Vl(C,(0,c.get)(t.scaleDefs,S),v,t.type);M==="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=cl(v);n[v]=new b(p)}};for(var h in a){var f=u(h);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(M){return M.isCategory}),s=this.groupData(t),l=[],u=0,h=s.length;us&&(s=f)}var v=this.scaleDefs,g={};ot.max&&!(0,c.get)(v,[a,"max"])&&(g.max=s),t.change(g)},r.prototype.beforeMapping=function(t){var i=t;if(this.sortable&&this.sort(i),this.generatePoints)for(var n=0,a=i.length;n1)for(var v=0;v0})}function Tu(e,r,t){var i=t.data,n=t.origin,a=t.animateCfg,o=t.coordinate,s=(0,c.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 h=r.getChildByIndex(u);if(!h)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=zl(l,h);s?fi(l,s,{toAttrs:f,coordinate:o}):l.attr(f),h.isGroup()&&Tu(l,h,t)}}),(0,c.each)(r.getChildren(),function(l,u){u>=e.getCount()&&(l.destroyed||e.add(l))})}var Xy=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,d.__awaiter)(this,void 0,void 0,function(){var n,a,o,s,l,u,h,f,v=this;return(0,d.__generator)(this,function(g){switch(g.label){case 0:if(n={},a=this.createOffscreenGroup(),!r.length)return[3,2];try{for(o=(0,d.__values)(r),s=o.next();!s.done;s=o.next())l=s.value,l&&(n[l.id]=this.renderLabel(l,a))}catch(p){h={error:p}}finally{try{s&&!s.done&&(f=o.return)&&f.call(o)}finally{if(h)throw h.error}}return[4,this.doLayout(r,t,n)];case 1:g.sent(),this.renderLabelLine(r,n),this.renderLabelBackground(r,n),this.adjustLabel(r,n),g.label=2;case 2:return u=this.shapesMap,(0,c.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];Tu(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,c.get)(p.get("animateCfg"),i?"enter":"appear");S&&fi(p,S,{toAttrs:(0,d.__assign)({},p.attr()),coordinate:p.get("coordinate")})}delete u[y]}}),(0,c.each)(u,function(p){var y=(0,c.get)(p.get("animateCfg"),"leave");y?fi(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,h={id:i,elementId:n,data:a,origin:(0,d.__assign)((0,d.__assign)({},o),{data:o[K]}),coordinate:s},f=t.addGroup((0,d.__assign)({name:"label",animateCfg:this.animate===!1||l===null||l===!1?!1:(0,c.deepMix)({},this.animate,l)},h)),v;if(u.isGroup&&u.isGroup()||u.isShape&&u.isShape()){var g=u.getCanvasBBox(),p=g.width,y=g.height,m=(0,c.get)(r,"textAlign","left"),x=r.x,_=r.y-y/2;m==="center"?x=x-p/2:(m==="right"||m==="end")&&(x=x-p),Qi(u,x,_),v=u,f.add(u)}else{var w=(0,c.get)(r,["style","fill"]);v=f.addShape("text",(0,d.__assign)({attrs:(0,d.__assign)((0,d.__assign)({x:r.x,y:r.y,textAlign:r.textAlign,textBaseline:(0,c.get)(r,"textBaseline","middle"),text:r.content},r.style),{fill:(0,c.isNull)(w)?r.color:w})},h))}return r.rotate&&Eo(v,r.rotate),f},e.prototype.doLayout=function(r,t,i){return(0,d.__awaiter)(this,void 0,void 0,function(){var n,a=this;return(0,d.__generator)(this,function(o){switch(o.label){case 0:return this.layout?(n=(0,c.isArray)(this.layout)?this.layout:[this.layout],[4,Promise.all(n.map(function(s){var l=By((0,c.get)(s,"type",""));if(!!l){var u=[],h=[];return(0,c.each)(i,function(f,v){u.push(f),h.push(t[f.get("elementId")])}),l(r,u,h,a.region,s.cfg)}}))]):[3,2];case 1:o.sent(),o.label=2;case 2:return[2]}})})},e.prototype.renderLabelLine=function(r,t){(0,c.each)(r,function(i){var n=(0,c.get)(i,"coordinate");if(!(!i||!n)){var a=n.getCenter(),o=n.getRadius();if(!!i.labelLine){var s=(0,c.get)(i,"labelLine",{}),l=i.id,u=s.path;if(!u){var h=le(a.x,a.y,o,i.angle);u=[["M",h.x,h.y],["L",i.x,i.y]]}var f=t[l];f.destroyed||f.addShape("path",{capture:!1,attrs:(0,d.__assign)({path:u,stroke:i.color?i.color:(0,c.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,c.each)(r,function(i){var n=(0,c.get)(i,"coordinate"),a=(0,c.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=Mu(s,i,a.padding),h=u.rotation,f=(0,d.__rest)(u,["rotation"]),v=s.addShape("rect",{attrs:(0,d.__assign)((0,d.__assign)({},f),a.style||{}),id:o,origin:i.mappingData,data:i.data,coordinate:i.coordinate});if(v.setZIndex(-1),h){var g=l.getMatrix();v.setMatrix(g)}}}}})},e.prototype.createOffscreenGroup=function(){var r=this.container,t=r.getGroupBase(),i=new t({});return i},e.prototype.adjustLabel=function(r,t){(0,c.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,c.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}(),jy=Xy;function Lu(e){var r=0;return(0,c.each)(e,function(t){r+=t}),r/e.length}var Uy=function(){function e(r){this.geometry=r}return e.prototype.getLabelItems=function(r){var t=this,i=[],n=this.getLabelCfgs(r);return(0,c.each)(r,function(a,o){var s=n[o];if(!s||(0,c.isNil)(a.x)||(0,c.isNil)(a.y)){i.push(null);return}var l=(0,c.isArray)(s.content)?s.content:[s.content];s.content=l;var u=l.length;(0,c.each)(l,function(h,f){if((0,c.isNil)(h)||h===""){i.push(null);return}var v=(0,d.__assign)((0,d.__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,d.__awaiter)(this,void 0,void 0,function(){var i,n,a;return(0,d.__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,c.get)(a,"innerLabels",{}):(0,c.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,c.deepMix)({},i,a.innerLabels,r):o=(0,c.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,c.isArray)(w)&&(r.content.length===1?_?w=Lu(w):w.length<=2?w=w[m.length-1]:w=Lu(w):w=w[x]),w}var s={content:r.content[i],x:0,y:0,start:{x:0,y:0},color:"#fff"},l=(0,c.isArray)(t.shape)?t.shape[0]:t.shape,u=l==="funnel"||l==="pyramid";if(this.geometry.type==="polygon"){var h=mp(t.x,t.y);s.x=h[0],s.y=h[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,c.get)(t,"nextPoints"),v=(0,c.get)(t,"points");if(f){var g=n.convert(v[1]),p=n.convert(f[1]);s.x=(g.x+p.x)/2,s.y=(g.y+p.y)/2}else if(l==="pyramid"){var g=n.convert(v[1]),p=n.convert(v[2]);s.x=(g.x+p.x)/2,s.y=(g.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[K],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 jy({container:t,layout:(0,c.get)(i,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=s),s.region=n,s.animate=a?wu("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,h=s.cfg,f=l.map(function(g){return a[g]}),v=[];return(0,c.each)(r,function(g,p){var y=g[K],m=t.getLabelText(y,f),x;if(u){var _=l.map(function(M){return y[M]});if(x=u.apply(void 0,(0,d.__spreadArray)([],(0,d.__read)(_),!1)),(0,c.isNil)(x)){v.push(null);return}}var w=(0,d.__assign)((0,d.__assign)({id:t.getLabelId(g),elementId:t.geometry.getElementId(g),data:y,mappingData:g,coordinate:o},h),x);(0,c.isFunction)(w.position)&&(w.position=w.position(y,g,p));var b=t.getLabelOffset(w.offset||0),S=t.getDefaultLabelCfg(b,w.position);w=(0,c.deepMix)({},S,w),w.offset=t.getLabelOffset(w.offset||0);var C=w.content;(0,c.isFunction)(C)?w.content=C(y,g,p):(0,c.isUndefined)(C)&&(w.content=m[0]),v.push(w)}),v},e.prototype.getLabelText=function(r,t){var i=[];return(0,c.each)(t,function(n){var a=r[n.field];(0,c.isArray)(a)?a=a.map(function(o){return n.getText(o)}):a=n.getText(a),(0,c.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,c.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,c.each)(r.elementsMap,function(i,n){t[n]=i.shape}),(0,c.each)(r.getOffscreenGroup().getChildren(),function(i){var n=r.getElementId(i.get("origin").mappingData);t[n]=i}),t},e}(),Un=Uy;function Mo(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,d.__spreadArray)([r],(0,d.__read)(n),!1)).join("")}else i=e.mapping(r).join("");return i||t}var zr={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]]}},Zy=["line","cross","tick","plus","hyphen"];function Ky(e,r){return(0,c.isFunction)(r)?r(e):(0,c.deepMix)({},e,r)}function qy(e,r){var t=e.symbol;if((0,c.isString)(t)&&Zy.indexOf(t)!==-1){var i=(0,c.get)(e,"style",{}),n=(0,c.get)(i,"lineWidth",1),a=i.stroke||i.fill||r;e.style=(0,c.deepMix)({},e.style,{lineWidth:n,stroke:a,fill:null})}}function Iu(e){var r=e.symbol;(0,c.isString)(r)&&zr[r]&&(e.symbol=zr[r])}function To(e){return e.startsWith(T.LEFT)||e.startsWith(T.RIGHT)?"vertical":"horizontal"}function Ou(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,h=r.coordinate.isPolar;return a.getTicks().map(function(f,v){var g,p=f.text,y=f.value,m=p,x=a.invert(y),_=e.filterFieldData(o,[(g={},g[o]=x,g)]).length===0;(0,c.each)(e.views,function(M){var L;M.filterFieldData(o,[(L={},L[o]=x,L)]).length||(_=!0)});var w=Mo(s,x,u),b=Mo(l,x,"point"),S=r.getShapeMarker(b,{color:w,isInPolar:h}),C=n;return(0,c.isFunction)(C)&&(C=C(m,v,(0,d.__assign)({name:m,value:x},(0,c.deepMix)({},i,S)))),S=(0,c.deepMix)({},i,S,Me((0,d.__assign)({},C),["style"])),qy(S,w),C&&C.style&&(S.style=Ky(S.style,C.style)),Iu(S),{id:x,name:m,value:x,marker:S,unchecked:_}})}return[]}function $y(e,r,t){return t.map(function(i,n){var a=r;(0,c.isFunction)(a)&&(a=a(i.name,n,(0,c.deepMix)({},e,i)));var o=(0,c.isFunction)(i.marker)?i.marker(i.name,n,(0,c.deepMix)({},e,i)):i.marker,s=(0,c.deepMix)({},e,a,o);return Iu(s),i.marker=s,i})}function Pu(e,r){var t=(0,c.get)(e,["components","legend"],{});return(0,c.deepMix)({},(0,c.get)(t,["common"],{}),(0,c.deepMix)({},(0,c.get)(t,[r],{})))}function Lo(e){return e?!1:e==null||isNaN(e)}function Du(e){if((0,c.isArray)(e))return Lo(e[1].y);var r=e.y;return(0,c.isArray)(r)?Lo(r[0]):Lo(r)}function Zn(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;n0&&(g[0][0]="L")),a=a.concat(g)}),a.push(["Z"])}return a}function Kn(e,r,t,i,n){for(var a=se(e,r,!r,"lineWidth"),o=e.connectNulls,s=e.isInCircle,l=e.points,u=e.showSinglePoint,h=Zn(l,o,u),f=[],v=0,g=h.length;vo&&(o=l),l=i[0]}));var m=this.scales[p];try{for(var x=(0,d.__values)(t),_=x.next();!_.done;_=x.next()){var w=_.value,b=this.getDrawCfg(w),S=b.x,C=b.y,M=m.scale(w[K][p]);this.drawGrayScaleBlurredCircle(S-u.x,C-h.y,n+a,M,y)}}catch(I){o={error:I}}finally{try{_&&!_.done&&(s=x.return)&&s.call(x)}finally{if(o)throw o.error}}var L=y.getImageData(0,0,f,v);this.clearShadowCanvasCtx(),this.colorize(L),y.putImageData(L,0,0);var B=this.getImageShape();B.attr("x",u.x),B.attr("y",h.y),B.attr("width",f),B.attr("height",v),B.attr("img",y.canvas),B.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;or&&(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 Hu(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,c.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,d.__read)(Wu(o,Math.min(s,l)),4),h=u[0],f=u[1],v=u[2],g=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(h)]),h!==0&&i.push(["A",h,h,0,0,y,n.x+h,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+g,n.y]),g!==0&&i.push(["A",g,g,0,0,y,n.x,n.y-m(g)])}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(),_=Hi(e,t),w=_.startAngle,b=_.endAngle;if(t.type!=="theta"&&!t.isTransposed)i=mr(x.x,x.y,t.getRadius(),w,b);else{var S=function(L){return Math.pow(L,2)},h=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=mr(x.x,x.y,h,t.startAngle,t.endAngle,f)}}return i}function d0(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=ko(e),o}function Yu(e,r,t){var i=[];return(0,c.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 Ji(e,r){return[r,e]}function g0(e,r,t){var i,n,a,o,s,l,u,h=(0,d.__read)((0,d.__spreadArray)([],(0,d.__read)(e),!1),4),f=h[0],v=h[1],g=h[2],p=h[3],y=(0,d.__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,d.__read)(Ji(v,p),2),v=i[0],p=i[1]),r.isReflect("y")&&(n=(0,d.__read)(Ji(f,v),2),f=n[0],v=n[1],a=(0,d.__read)(Ji(g,p),2),g=a[0],p=a[1]),r.isReflect("x")&&(o=(0,d.__read)(Ji(f,p),2),f=o[0],p=o[1],s=(0,d.__read)(Ji(v,g),2),v=s[0],g=s[1]);var b=[],S=function(C){return Math.abs(C)};return l=(0,d.__read)(Wu([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,d.__read)([w,m,x,_],4),m=u[0],x=u[1],_=u[2],w=u[3]),f.yo&&(n=o)}return n}function y0(e,r){if(r){var t=(0,c.flatten)(e),i=(0,c.valuesOfKey)(t,r);return i.length}return e.length}function Bo(e){var r=e.theme,t=e.coordinate,i=e.getXScale(),n=i.values,a=e.beforeMappingData,o=n.length,s=Yi(e.coordinate),l=e.intervalPadding,u=e.dodgePadding,h=e.maxColumnWidth||r.maxColumnWidth,f=e.minColumnWidth||r.minColumnWidth,v=e.columnWidthRatio||r.columnWidthRatio,g=e.multiplePieWidthRatio||r.multiplePieWidthRatio,p=e.roseWidthRatio||r.roseWidthRatio;if(i.isLinear&&n.length>1){n.sort();var y=p0(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?_=g:_=p:(i.isLinear&&(x*=m[1]-m[0]),_=v),!(0,c.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=y0(a,S);if(!(0,c.isNil)(u)&&u>=0){var M=u/s;x=(x-M*(C-1))/C}else!(0,c.isNil)(l)&&l>=0&&(x*=_),x=x/C;x=x>=0?x:0}if(!(0,c.isNil)(h)&&h>=0){var L=h/s;x>L&&(x=L)}if(!(0,c.isNil)(f)&&f>=0){var B=f/s;x0&&!(0,c.get)(i,[n,"min"])&&t.change({min:0}),o<=0&&!(0,c.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}(br),x0=m0,_0=function(e){(0,d.__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}(Po),w0=_0,Xu=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"],b0=["cross","tick","plus","hyphen","line"];function Ro(e,r,t,i,n){var a,o,s=se(r,n,!n,"r"),l=e.parsePoints(r.points),u=l[0];if(r.isStack)u=l[1];else if(l.length>1){var h=t.addGroup();try{for(var f=(0,d.__values)(l),v=f.next();!v.done;v=f.next()){var g=v.value;h.addShape({type:"marker",attrs:(0,d.__assign)((0,d.__assign)((0,d.__assign)({},s),{symbol:zr[i]||i}),g)})}}catch(p){a={error:p}}finally{try{v&&!v.done&&(o=f.return)&&o.call(f)}finally{if(a)throw a.error}}return h}return t.addShape({type:"marker",attrs:(0,d.__assign)((0,d.__assign)((0,d.__assign)({},s),{symbol:zr[i]||i}),u)})}var uL=wr("point",{defaultShapeType:"hollow-circle",getDefaultPoints:function(e){return Io(e)}});(0,c.each)(Xu,function(e){jt("point","hollow-".concat(e),{draw:function(r,t){return Ro(this,r,t,e,!0)},getMarker:function(r){var t=r.color;return{symbol:zr[e]||e,style:{r:4.5,stroke:t,fill:null}}}})});var cL=null,S0=function(e){(0,d.__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,d.__assign)((0,d.__assign)({},i),{isStack:!!this.getAdjust("stack")})},r}(br),C0=S0;function A0(e){for(var r=e[0],t=1,i=[["M",r.x,r.y]];t2?"weight":"normal",a;if(e.isInCircle){var o={x:0,y:1};return n==="normal"?a=P0(i[0],i[1],o):(t.fill=t.stroke,a=D0(i,o)),a=this.parsePath(a),r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:a})})}else{if(n==="normal")return i=this.parsePoints(i),a=Nl((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,d.__assign)((0,d.__assign)({},t),{path:a})});var s=No(i[1],i[3]),l=No(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,d.__assign)((0,d.__assign)({},t),{path:a})})}},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});function k0(e,r){var t=No(e,r),i=[["M",e.x,e.y]];return i.push(t),i}jt("edge","smooth",{draw:function(e,r){var t=se(e,!0,!1,"lineWidth"),i=e.points,n=this.parsePath(k0(i[0],i[1]));return r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:n})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}});var qn=1/3;function B0(e,r){var t=[];t.push({x:e.x,y:e.y*(1-qn)+r.y*qn}),t.push({x:r.x,y:e.y*(1-qn)+r.y*qn}),t.push(r);var i=[["M",e.x,e.y]];return(0,c.each)(t,function(n){i.push(["L",n.x,n.y])}),i}jt("edge","vhv",{draw:function(e,r){var t=se(e,!0,!1,"lineWidth"),i=e.points,n=this.parsePath(B0(i[0],i[1]));return r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:n})})},getMarker:function(e){return{symbol:"circle",style:{r:4.5,fill:e.color}}}}),jt("interval","funnel",{getPoints:function(e){return e.size=e.size*2,Do(e)},draw:function(e,r){var t=se(e,!1,!0),i=this.parsePath(Yu(e.points,e.nextPoints,!1)),n=r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i}),name:"interval"});return n},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}}),jt("interval","hollow-rect",{draw:function(e,r){var t=se(e,!0,!1),i=r,n=e==null?void 0:e.background;if(n){i=r.addGroup();var a=Ru(e),o=Hu(e,this.parsePoints(e.points),this.coordinate);i.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},a),{path:o}),zIndex:-1,name:Ao})}var s=this.parsePath(ko(e.points)),l=i.addShape("path",{attrs:(0,d.__assign)((0,d.__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 R0(e){var r=e.x,t=e.y,i=e.y0;return(0,c.isArray)(t)?t.map(function(n,a){return{x:(0,c.isArray)(r)?r[a]:r,y:n}}):[{x:r,y:i},{x:r,y:t}]}jt("interval","line",{getPoints:function(e){return R0(e)},draw:function(e,r){var t=se(e,!0,!1,"lineWidth"),i=Me((0,d.__assign)({},t),["fill"]),n=this.parsePath(ko(e.points,!1)),a=r.addShape("path",{attrs:(0,d.__assign)((0,d.__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}}}}),jt("interval","pyramid",{getPoints:function(e){return e.size=e.size*2,Do(e)},draw:function(e,r){var t=se(e,!1,!0),i=this.parsePath(Yu(e.points,e.nextPoints,!0)),n=r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i}),name:"interval"});return n},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}});function N0(e){var r,t=e.x,i=e.y,n=e.y0,a=e.size,o,s;(0,c.isArray)(i)?(r=(0,d.__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 z0(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]]}jt("interval","tick",{getPoints:function(e){return N0(e)},draw:function(e,r){var t=se(e,!0,!1),i=this.parsePath(z0(e.points)),n=r.addShape("path",{attrs:(0,d.__assign)((0,d.__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 V0=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 G0(e,r){var t=[];return(0,c.each)(e,function(i,n){var a=e[n+1];if(t.push(i),a){var o=V0(i,a,r);t=t.concat(o)}}),t}function W0(e){return e.map(function(r,t){return t===0?["M",r.x,r.y]:["L",r.x,r.y]})}function H0(e,r){var t=Zn(e.points,e.connectNulls,e.showSinglePoint),i=[];return(0,c.each)(t,function(n){var a=G0(n,r);i=i.concat(W0(a))}),(0,d.__assign)((0,d.__assign)({},se(e,!0,!1,"lineWidth")),{path:i})}(0,c.each)(["hv","vh","hvh","vhv"],function(e){jt("line",e,{draw:function(r,t){var i=H0(r,e),n=t.addShape({type:"path",attrs:i,name:"line"});return n},getMarker:function(r){return Nu(r,e)}})}),(0,c.each)(b0,function(e){jt("point",e,{draw:function(r,t){return Ro(this,r,t,e,!0)},getMarker:function(r){var t=r.color;return{symbol:zr[e],style:{r:4.5,stroke:t,fill:null}}}})}),jt("point","image",{draw:function(e,r){var t,i,n=se(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,d.__values)(a),u=l.next();!u.done;u=l.next()){var h=u.value;s.addShape("image",{attrs:{x:h.x-n/2,y:h.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,c.each)(Xu,function(e){jt("point",e,{draw:function(r,t){return Ro(this,r,t,e,!1)},getMarker:function(r){var t=r.color;return{symbol:zr[e]||e,style:{r:4.5,fill:t}}}})});function ju(e){var r=(0,c.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 Uu(e,r,t){var i=t/2,n;if((0,c.isArray)(r)){var a=ju(r),o=a.min,s=a.max,l=a.median,u=a.min1,h=a.max1,f=e-i,v=e+i;n=[[f,s],[v,s],[e,s],[e,h],[f,u],[f,h],[v,h],[v,u],[e,u],[e,o],[f,o],[v,o],[f,l],[v,l]]}else{r=(0,c.isNil)(r)?.5:r;var g=ju(e),o=g.min,s=g.max,l=g.median,u=g.min1,h=g.max1,p=r-i,y=r+i;n=[[o,p],[o,y],[o,r],[u,r],[u,p],[u,y],[h,y],[h,p],[h,r],[s,r],[s,p],[s,y],[l,p],[l,y]]}return n.map(function(m){return{x:m[0],y:m[1]}})}function Y0(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]]}jt("schema","box",{getPoints:function(e){var r=e.x,t=e.y,i=e.size;return Uu(r,t,i)},draw:function(e,r){var t=se(e,!0,!1),i=this.parsePath(Y0(e.points)),n=r.addShape("path",{attrs:(0,d.__assign)((0,d.__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=Uu(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 X0(e){var r=(0,c.isArray)(e)?e:[e],t=r.sort(function(i,n){return n-i});return xp(t,4,t[t.length-1])}function Zu(e,r,t){var i=X0(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 j0(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]]}jt("schema","candle",{getPoints:function(e){var r=e.x,t=e.y,i=e.size;return Zu(r,t,i)},draw:function(e,r){var t=se(e,!0,!0),i=this.parsePath(j0(e.points)),n=r.addShape("path",{attrs:(0,d.__assign)((0,d.__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=Zu(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 U0(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,c.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}}jt("polygon","square",{draw:function(e,r){if(!(0,c.isEmpty)(e.points)){var t=se(e,!0,!0),i=this.parsePoints(e.points);return r.addShape("rect",{attrs:(0,d.__assign)((0,d.__assign)({},t),U0(i,e.size)),name:"polygon"})}},getMarker:function(e){var r=e.color;return{symbol:"square",style:{r:4,fill:r}}}}),jt("violin","smooth",{draw:function(e,r){var t=se(e,!0,!0),i=this.parsePath(Bu(e.points));return r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i})})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{stroke:null,r:4,fill:r}}}}),jt("violin","hollow",{draw:function(e,r){var t=se(e,!0,!1),i=this.parsePath(ku(e.points));return r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i})})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4,fill:null,stroke:r}}}}),jt("violin","hollow-smooth",{draw:function(e,r){var t=se(e,!0,!1),i=this.parsePath(Bu(e.points));return r.addShape("path",{attrs:(0,d.__assign)((0,d.__assign)({},t),{path:i})})},getMarker:function(e){var r=e.color;return{symbol:"circle",style:{r:4,fill:null,stroke:r}}}});var Z0=function(e){(0,d.__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,h=u?"x":"y",f=this.getLabelValueDir(t.mappingData);return s=(0,d.__assign)((0,d.__assign)({},s),(o={},o[h]=s[h]*f,o)),l.isReflect("x")&&(s=(0,d.__assign)((0,d.__assign)({},s),{x:s.x*-1})),l.isReflect("y")&&(s=(0,d.__assign)((0,d.__assign)({},s),{y:s.y*-1})),s},r.prototype.getThemedLabelCfg=function(t){var i=this.geometry,n=this.getDefaultLabelCfg(),a=i.theme;return(0,c.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]),h=o.convert(l[2]),f=this.getLabelValueDir(i),v,g,p,y,m=(0,c.isArray)(i.shape)?i.shape[0]:i.shape;if(m==="funnel"||m==="pyramid"){var x=(0,c.get)(i,"nextPoints"),_=(0,c.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),g=(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),g=C.x,y=w.x)}else v=Math.min(h.y,u.y),p=Math.max(h.y,u.y),g=h.x,y=u.x}else v=Math.min(h.y,u.y),p=Math.max(h.y,u.y),g=h.x,y=u.x;switch(a){case"right":t.x=g,t.y=(v+p)/2,t.textAlign=(0,c.get)(t,"textAlign",f>0?"left":"right");break;case"left":t.x=y,t.y=(v+p)/2,t.textAlign=(0,c.get)(t,"textAlign",f>0?"left":"right");break;case"bottom":s&&(t.x=(g+y)/2),t.y=p,t.textAlign=(0,c.get)(t,"textAlign","center"),t.textBaseline=(0,c.get)(t,"textBaseline",f>0?"bottom":"top");break;case"middle":s&&(t.x=(g+y)/2),t.y=(v+p)/2,t.textAlign=(0,c.get)(t,"textAlign","center"),t.textBaseline=(0,c.get)(t,"textBaseline","middle");break;case"top":s&&(t.x=(g+y)/2),t.y=v,t.textAlign=(0,c.get)(t,"textAlign","center"),t.textBaseline=(0,c.get)(t,"textBaseline",f>0?"bottom":"top");break;default:break}},r}(Un),K0=Z0,$n=Math.PI/2,q0=function(e){(0,d.__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,c.isNumber)(t))n=t;else if((0,c.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,c.map)(i,function(a){if(a&&n){var o=n.scale((0,c.get)(a.data,n.field));return(0,d.__assign)((0,d.__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),h=t.labelEmit,f=this.getCirclePoint(u,l,o,h);return f.r===0?f.content="":(f.content=s,f.angle=u,f.color=i.color),f.rotate=t.autoRotate?this.getLabelRotate(u,l,h):t.rotate,f.start={x:o.x,y:o.y},f},r.prototype.getArcPoint=function(t,i){return i===void 0&&(i=0),!(0,c.isArray)(t.x)&&!(0,c.isArray)(t.y)?{x:t.x,y:t.y}:{x:(0,c.isArray)(t.x)?t.x[i]:t.x,y:(0,c.isArray)(t.y)?t.y[i]:t.y}},r.prototype.getPointAngle=function(t){return ai(this.getCoordinate(),t)},r.prototype.getCirclePoint=function(t,i,n,a){var o=this.getCoordinate(),s=o.getCenter(),l=Bn(o,n);if(l===0)return(0,d.__assign)((0,d.__assign)({},s),{r:l});var u=t;if(o.isTransposed&&l>i&&!a){var h=Math.asin(i/(2*l));u=t+h*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+$n;return n&&(a-=$n),a&&(a>$n?a=a-Math.PI:a<-$n&&(a=a+Math.PI)),a},r.prototype.getMiddlePoint=function(t){var i=this.getCoordinate(),n=t.length,a={x:0,y:0};return(0,c.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}(Un),Ku=q0,$0=function(e){(0,d.__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,c.deepMix)({},n,(0,c.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,c.isArray)(t.x)?t.x[0]:t.x,y:t.y[0]},a={x:(0,c.isArray)(t.x)?t.x[1]:t.x,y:t.y[1]},o,s=ai(i,n);if(t.points&&t.points[0].y===t.points[1].y)o=s;else{var l=ai(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,d.__assign)((0,d.__assign)({},le(a.x,a.y,o,t)),{angle:t,r:o})},r}(Ku),Q0=$0,qu=4;function J0(e,r,t,i,n,a){var o,s,l=!0,u=i.start,h=i.end,f=Math.min(u.y,h.y),v=Math.abs(u.y-h.y),g,p=0,y=Number.MIN_VALUE,m=r.map(function(M){return M.y>p&&(p=M.y),M.yv&&(v=p-f);l;)for(m.forEach(function(M){var L=(Math.min.apply(y,M.targets)+Math.max.apply(y,M.targets))/2;M.pos=Math.min(Math.max(y,L-M.size/2),v-M.size)}),l=!1,g=m.length;g--;)if(g>0){var x=m[g-1],_=m[g];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(g,1),l=!0)}g=0,m.forEach(function(M){var L=f+t/2;M.targets.forEach(function(){r[g].y=M.pos+L,L+=t,g++})});var w={};try{for(var b=(0,d.__values)(e),S=b.next();!S.done;S=b.next()){var C=S.value;w[C.get("id")]=C}}catch(M){o={error:M}}finally{try{S&&!S.done&&(s=b.return)&&s.call(b)}finally{if(o)throw o.error}}r.forEach(function(M){var L=M.r*M.r,B=Math.pow(Math.abs(M.y-n.y),2);if(L0){var l=14,u=o+n,h=u*2+l*2,f={start:a.start,end:a.end},v=[[],[]];e.forEach(function(g){!g||(g.textAlign==="right"?v[0].push(g):v[1].push(g))}),v.forEach(function(g,p){var y=h/l;g.length>y&&(g.sort(function(m,x){return x["..percent"]-m["..percent"]}),g.splice(y,g.length-y)),g.sort(function(m,x){return m.y-x.y}),J0(r,g,l,f,s,p)})}(0,c.each)(e,function(g){if(g&&g.labelLine){var p=g.offset,y=g.angle,m=le(s.x,s.y,o,y),x=le(s.x,s.y,o+p/2,y),_=g.x+(0,c.get)(g,"offsetX",0),w=g.y+(0,c.get)(g,"offsetY",0),b={x:_-Math.cos(y)*qu,y:w-Math.sin(y)*qu};(0,c.isObject)(g.labelLine)||(g.labelLine={}),g.labelLine.path=["M ".concat(m.x),"".concat(m.y," Q").concat(x.x),"".concat(x.y," ").concat(b.x),b.y].join(",")}})}}function $u(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,h=Number.MIN_VALUE,f=i.map(function(p){return p.y>u&&(u=p.y),p.ys&&(s=u-a);n;)for(f.forEach(function(p){var y=(Math.min.apply(h,p.targets)+Math.max.apply(h,p.targets))/2;p.pos=Math.min(Math.max(h,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],g=f[l];v.pos+v.size>g.pos&&(v.size+=g.size,v.targets=v.targets.concat(g.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 Qu=4;function em(e,r){var t=r.getCenter(),i=r.getRadius();if(e&&e.labelLine){var n=e.angle,a=e.offset,o=le(t.x,t.y,i,n),s=e.x+(0,c.get)(e,"offsetX",0)*(Math.cos(n)>0?1:-1),l=e.y+(0,c.get)(e,"offsetY",0)*(Math.sin(n)>0?1:-1),u={x:s-Math.cos(n)*Qu,y:l-Math.sin(n)*Qu},h=e.labelLine.smooth,f=[],v=u.x-t.x,g=u.y-t.y,p=Math.atan(g/v);if(v<0&&(p+=Math.PI),h===!1){(0,c.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&&no.y&&(y=1),n>=Math.PI/2&&nu.y&&(y=1),(n<-Math.PI/2||n>=Math.PI&&nu.y&&(y=1);var m=a/2>4?4:Math.max(a/2-1,0),x=le(t.x,t.y,i+m,n),_=le(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=le(t.x,t.y,i+(a/2>4?4:Math.max(a/2-1,0)),n),b=o.xMath.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 rm(e,r,t,i){var n,a,o=(0,c.filter)(e,function(L){return!(0,c.isNil)(L)}),s=r[0]&&r[0].get("coordinate");if(!!s){var l=s.getCenter(),u=s.getRadius(),h={};try{for(var f=(0,d.__values)(r),v=f.next();!v.done;v=f.next()){var g=v.value;h[g.get("id")]=g}}catch(L){n={error:L}}finally{try{v&&!v.done&&(a=f.return)&&a.call(f)}finally{if(n)throw n.error}}var p=(0,c.get)(o[0],"labelHeight",14),y=(0,c.get)(o[0],"offset",0);if(!(y<=0)){var m="left",x="right",_=(0,c.groupBy)(o,function(L){return L.xI&&(L.sort(function(G,q){return q.percent-G.percent}),(0,c.each)(L,function(G,q){q+1>I&&(h[G.id].set("visible",!1),G.invisible=!0)})),$u(L,p,M)}),(0,c.each)(_,function(L,B){(0,c.each)(L,function(I){var G=B===x,q=h[I.id],ft=q.getChildByIndex(0);if(ft){var mt=u+y,zt=I.y-l.y,H=Math.pow(mt,2),tt=Math.pow(zt,2),ct=H-tt>0?H-tt:0,nt=Math.sqrt(ct),lt=Math.abs(Math.cos(I.angle)*mt);G?I.x=l.x+Math.max(nt,lt):I.x=l.x-Math.max(nt,lt)}ft&&(ft.attr("y",I.y),ft.attr("x",I.x)),em(I,s)})})}}}var Vo=4,im=4,Ju=4;function nm(e,r,t){var i=r.getCenter(),n=r.getRadius(),a={x:e.x-(t?Ju:-Ju),y:e.y},o=le(i.x,i.y,n+Vo,e.angle),s={x:a.x,y:a.y},l={x:o.x,y:o.y},u=le(i.x,i.y,n,e.angle),h="";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.y0&&e.angleo.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.ys.x||L.x===s.x&&L.y>s.y,G=(0,c.isNil)(L.offsetX)?im:L.offsetX,q=le(s.x,s.y,l+Vo,L.angle),ft=p+G;L.x=s.x+(I?1:-1)*(l+ft),L.y=q.y}}});var y=o.start,m=o.end,x="left",_="right",w=(0,c.groupBy)(e,function(L){return L.xb&&(b=Math.min(B,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,c.each)(w,function(L,B){var I=b/g;L.length>I&&(L.sort(function(G,q){return q.percent-G.percent}),(0,c.each)(L,function(G,q){q>I&&(u[G.id].set("visible",!1),G.invisible=!0)})),$u(L,g,S)});var C=S.minY,M=S.maxY;(0,c.each)(w,function(L,B){var I=B===_;(0,c.each)(L,function(G){var q=(0,c.get)(u,G&&[G.id]);if(!!q){if(G.yM){q.set("visible",!1);return}var ft=q.getChildByIndex(0),mt=ft.getCanvasBBox(),zt={x:I?mt.x:mt.maxX,y:mt.y+mt.height/2};Qi(ft,G.x-zt.x,G.y-zt.y),G.labelLine&&nm(G,o,I)}})})}}function om(e,r,t,i){(0,c.each)(r,function(n){var a=i.minX,o=i.minY,s=i.maxX,l=i.maxY,u=n.getCanvasBBox(),h=u.minX,f=u.minY,v=u.maxX,g=u.maxY,p=u.x,y=u.y,m=u.width,x=u.height,_=p,w=y;(hs?_=s-m:v>s&&(_=_-(v-s)),f>l?w=l-x:g>l&&(w=w-(g-l)),(_!==p||w!==y)&&Qi(n,_-p,w-y)})}function sm(e,r,t,i){(0,c.each)(r,function(n,a){var o=n.getCanvasBBox(),s=t[a].getBBox();(o.minXs.maxX||o.maxY>s.maxY)&&n.remove(!0)})}var lm=100,tc=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 um(e,r,t){t===void 0&&(t=lm);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,h=-i,f=0,v=0,g=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))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 Qn(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 rc(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?[Qn(r[0],t,r[0]),Qn(r[1],t,r[0]),Qn(r[2],t,r[0]),Qn(r[3],t,r[0])]:r}function ic(e,r){if(e.length>4)return{min:0,max:0};var t=[];return e.forEach(function(i){t.push(vm([i.x,i.y],r))}),{min:Math.min.apply(Math,(0,d.__spreadArray)([],(0,d.__read)(t),!1)),max:Math.max.apply(Math,(0,d.__spreadArray)([],(0,d.__read)(t),!1))}}function dm(e,r){return e.max>r.min&&e.mine.x+e.width+t||r.x+r.widthe.y+e.height+t||r.y+r.height4)return[];var b=function(M,L){return[L.x-M.x,L.y-M.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,M=w.y;return{x:(C-S.x)*Math.cos(-b)+(M-S.y)*Math.sin(-b)+S.x,y:(S.x-C)*Math.sin(-b)+(M-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 g(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.minw.x+w.width+S||b.x+b.widthw.y+w.height+S||b.y+b.height=a.height:o.width>=a.width}function Am(e,r,t){var i=!!e.getAdjust("stack");return i||r.every(function(n,a){var o=t[a];return Cm(e,n,o)})}function Fm(e,r,t){var i=e.coordinate,n=Ae.fromObject(t.getBBox()),a=Sr(r);i.isTransposed?a.attr({x:n.minX+n.width/2,textAlign:"center"}):a.attr({y:n.minY+n.height/2,textBaseline:"middle"})}function Em(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=Am(a,r,t);o&&t.forEach(function(s,l){var u=r[l];Fm(a,u,s)})}}}function Mm(e){var r=500,t=[],i=Math.max(Math.floor(e.length/r),1);return(0,c.each)(e,function(n,a){a%i==0?t.push(n):n.set("visible",!1)}),t}function Tm(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=Mm(r),s=(0,d.__read)(a.getXYFields(),1),l=s[0],u=[],h=[],f=(0,c.groupBy)(o,function(m){return m.get("data")[l]}),v=(0,c.uniq)((0,c.map)(o,function(m){return m.get("data")[l]})),g;o.forEach(function(m){m.set("visible",!0)});var p=function(m){m&&(m.length&&h.push(m.pop()),h.push.apply(h,(0,d.__spreadArray)([],(0,d.__read)(m),!1)))};for((0,c.size)(v)>0&&(g=v.shift(),p(f[g])),(0,c.size)(v)>0&&(g=v.pop(),p(f[g])),(0,c.each)(v.reverse(),function(m){p(f[m])});h.length>0;){var y=h.shift();y.get("visible")&&(Yy(y,u)?y.set("visible",!1):u.push(y))}}}}function Lm(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,d.__spreadArray)([],(0,d.__read)(n),!1)),i}function oc(e,r,t){return e.some(function(i){return t(i,r)})}function Im(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 sc(e,r){return oc(e,r,function(t,i){var n=Sr(t),a=Sr(i);return Im(n.getCanvasBBox(),a.getCanvasBBox(),2)>0})}function Om(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,d.__read)(l.getXYFields(),2),h=u[0],f=u[1],v=(0,c.groupBy)(r,function(y){return y.get("data")[h]}),g=[],p=n&&n.offset||((o=e[0])===null||o===void 0?void 0:o.offset)||12;(0,c.map)((0,c.keys)(v).reverse(),function(y){for(var m=Lm(l,v[y]);m.length;){var x=m.shift(),_=Sr(x);if(oc(g,x,function(S,C){return S.get("data")[h]===C.get("data")[h]&&S.get("data")[f]===C.get("data")[f]})){_.set("visible",!1);continue}var w=sc(g,x),b=!1;if(w&&(_.attr("y",_.attr("y")+2*p),b=sc(g,x)),b){_.set("visible",!1);continue}g.push(x)}})}}}function Pm(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,d.__spreadArray)([],(0,d.__read)(n),!1)),i}function lc(e,r,t){return e.some(function(i){return t(i,r)})}function Dm(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 uc(e,r){return lc(e,r,function(t,i){var n=Sr(t),a=Sr(i);return Dm(n.getCanvasBBox(),a.getCanvasBBox(),2)>0})}function km(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,d.__read)(l.getXYFields(),2),h=u[0],f=u[1],v=(0,c.groupBy)(r,function(y){return y.get("data")[h]}),g=[],p=n&&n.offset||((o=e[0])===null||o===void 0?void 0:o.offset)||12;(0,c.map)((0,c.keys)(v).reverse(),function(y){for(var m=Pm(l,v[y]);m.length;){var x=m.shift(),_=Sr(x);if(lc(g,x,function(S,C){return S.get("data")[h]===C.get("data")[h]&&S.get("data")[f]===C.get("data")[f]})){_.set("visible",!1);continue}var w=uc(g,x),b=!1;if(w&&(_.attr("y",_.attr("y")+2*p),b=uc(g,x)),b){_.set("visible",!1);continue}g.push(x)}})}}}var Ho;function Bm(){return Ho||(Ho=document.createElement("canvas").getContext("2d")),Ho}var ta=(0,c.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=Bm();return s.font=[a,o,n,"".concat(t,"px"),i].join(" "),s.measureText((0,c.isString)(e)?e:"").width},function(e,r){return r===void 0&&(r={}),(0,d.__spreadArray)([e],(0,d.__read)((0,c.values)(r)),!1).join("")}),Rm=function(e,r,t){var i=16,n=ta("...",t),a;(0,c.isString)(e)?a=e:a=(0,c.toString)(e);var o=r,s=[],l,u;if(ta(e,t)<=r)return e;for(;l=a.substr(0,i),u=ta(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=ta(l,t),!(u+n>o);)if(s.push(l),o-=u,a=a.substr(1),!a)return s.join("");return"".concat(s.join(""),"...")};function Nm(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=bp(l,s),h=u.minX,f=u.minY,v=u.maxX,g=u.maxY;(0,c.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,M=y.height,L=b,B=S;if(a.indexOf("left")>=0&&(m=0&&(x=0&&(m>v?L=v-C:_>v&&(L=L-(_-v))),a.indexOf("bottom")>=0&&(x>g?B=g-M:w>g&&(B=B-(w-g))),L!==b||B!==S){var I=L-b;if(o==="translate")Qi(p,I,B-S);else if(o==="ellipsis"){var G=p.findAll(function(q){return q.get("type")==="text"});G.forEach(function(q){var ft=(0,c.pick)(q.attr(),["fontSize","fontFamily","fontWeight","fontStyle","fontVariant"]),mt=q.getCanvasBBox(),zt=Rm(q.attr("text"),mt.width-Math.abs(I),ft);q.attr("text",zt)})}else p.hide()}})}}}function zm(e,r,t){var i={fillOpacity:(0,c.isNil)(e.attr("fillOpacity"))?1:e.attr("fillOpacity"),strokeOpacity:(0,c.isNil)(e.attr("strokeOpacity"))?1:e.attr("strokeOpacity"),opacity:(0,c.isNil)(e.attr("opacity"))?1:e.attr("opacity")};e.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),e.animate(i,r)}function Vm(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 Gm(e,r,t){var i,n=(0,d.__read)(r,2),a=n[0],o=n[1];return e.applyToMatrix([a,o,1]),t==="x"?(e.setMatrix(te.vs(e.getMatrix(),[["t",-a,-o],["s",.01,1],["t",a,o]])),i=te.vs(e.getMatrix(),[["t",-a,-o],["s",100,1],["t",a,o]])):t==="y"?(e.setMatrix(te.vs(e.getMatrix(),[["t",-a,-o],["s",1,.01],["t",a,o]])),i=te.vs(e.getMatrix(),[["t",-a,-o],["s",1,100],["t",a,o]])):t==="xy"&&(e.setMatrix(te.vs(e.getMatrix(),[["t",-a,-o],["s",.01,.01],["t",a,o]])),i=te.vs(e.getMatrix(),[["t",-a,-o],["s",100,100],["t",a,o]])),i}function Yo(e,r,t,i,n){var a=t.start,o=t.end,s=t.getWidth(),l=t.getHeight(),u,h;n==="y"?(u=a.x+s/2,h=i.ya.x?i.x:a.x,h=a.y+l/2):n==="xy"&&(t.isPolar?(u=t.getCenter().x,h=t.getCenter().y):(u=(a.x+o.x)/2,h=(a.y+o.y)/2));var f=Gm(e,[u,h],n);e.animate({matrix:f},r)}function Wm(e,r,t){var i=t.coordinate,n=t.minYPoint;Yo(e,r,i,n,"x")}function Hm(e,r,t){var i=t.coordinate,n=t.minYPoint;Yo(e,r,i,n,"y")}function Ym(e,r,t){var i=t.coordinate,n=t.minYPoint;Yo(e,r,i,n,"xy")}function Xm(e,r,t){var i=e.getTotalLength();e.attr("lineDash",[i]),e.animate(function(n){return{lineDashOffset:(1-n)*i}},r)}function jm(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 Um(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=te.vs(e.getMatrix(),[["t",-o,-s],["s",.01,1],["t",o,s]]);e.setMatrix(l),e.animate({matrix:te.vs(e.getMatrix(),[["t",-o,-s],["s",100,1],["t",o,s]])},r)}function Zm(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=te.vs(e.getMatrix(),[["t",-a,-s],["s",1,.01],["t",a,s]]);e.setMatrix(l),e.animate({matrix:te.vs(e.getMatrix(),[["t",-a,-s],["s",1,100],["t",a,s]])},r)}function cc(e,r){var t,i=(0,Vu.getArcParams)(e,r),n=i.startAngle,a=i.endAngle,o=i.arcFlag;return!(0,c.isNumberEqual)(n,-Math.PI*.5)&&n<-Math.PI*.5&&(n+=Math.PI*2),!(0,c.isNumberEqual)(a,-Math.PI*.5)&&a<-Math.PI*.5&&(a+=Math.PI*2),r[5]===0&&(t=(0,d.__read)([a,n],2),n=t[0],a=t[1]),(0,c.isNumberEqual)(n,Math.PI*1.5)&&(n=Math.PI*-.5),(0,c.isNumberEqual)(a,Math.PI*-.5)&&o&&(a=Math.PI*1.5),{startAngle:n,endAngle:a}}function hc(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 fc(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=hc(e[s-1]),h=hc(e[l-1]),f=cc(u,a),v=f.startAngle,g=f.endAngle,p=cc(h,o),y=p.startAngle,m=p.endAngle;(0,c.isNumberEqual)(v,y)&&(0,c.isNumberEqual)(g,m)?(t=v,i=g):(t=Math.min(v,y),i=Math.max(g,m));var x=a[1],_=n[n.length-1][1];return x<_?(r=(0,d.__read)([_,x],2),x=r[0],_=r[1]):x===_&&(_=0),{startAngle:t,endAngle:i,radius:x,innerRadius:_}}function Km(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=fc(a),l=s.startAngle,u=s.endAngle,h=s.radius,f=s.innerRadius,v=fc(e.attr("path")),g=v.startAngle,p=v.endAngle,y=n.getCenter(),m=l-g,x=u-p;if(m===0&&x===0){e.attr("path",a);return}e.animate(function(_){var w=g+_*m,b=p+_*x;return(0,d.__assign)((0,d.__assign)({},i),{path:(0,c.isEqual)(o,["M","A","A","Z"])?Nl(y.x,y.y,h,w,b):mr(y.x,y.y,h,w,b,f)})},(0,d.__assign)((0,d.__assign)({},r),{callback:function(){e.attr("path",a)}}))}}function qm(e,r,t){var i=vo(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,d.__assign)((0,d.__assign)({},r),{callback:function(){e&&!e.get("destroyed")&&e.set("clipShape",null),s.remove(!0)}}))}function Xo(e,r,t){if(e.isGroup())(0,c.each)(e.getChildren(),function(s){Xo(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=te.vs(e.getMatrix(),[["t",-n,-a],["s",.01,.01],["t",n,a]]);e.setMatrix(o),e.animate({matrix:te.vs(e.getMatrix(),[["t",-n,-a],["s",100,100],["t",n,a]])},r)}else e.animate({matrix:te.vs(e.getMatrix(),[["t",-n,-a],["s",.01,.01],["t",n,a]])},(0,d.__assign)((0,d.__assign)({},r),{callback:function(){e.remove(!0)}}))}}function $m(e,r,t){Xo(e,r,"zoomIn")}function Qm(e,r,t){Xo(e,r,"zoomOut")}function lr(e){return[T.TOP,T.BOTTOM].includes(e)?{offsetX:0,offsetY:e===T.TOP?-8:8,style:{textAlign:"center",textBaseline:e===T.TOP?"bottom":"top"}}:[T.LEFT,T.RIGHT].includes(e)?{offsetX:e===T.LEFT?-8:8,offsetY:0,style:{textAlign:e===T.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 Jm=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return(0,c.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),h=Math.PI*5/4,f=Math.PI*1/4;return{start:jo(u,l,h),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,d.__read)(a,1),l=s[0];if(!l)throw new Error("No `fields` specified!");var u=this.getFieldValues(t,l),h=u.length,f=[];return u.forEach(function(v,g){var p=[{field:l,value:v,values:u}],y=(0,c.filter)(t,i.getFacetDataFilter(p)),m={type:o,data:y,region:i.getRegion(h,g),columnValue:v,columnField:l,columnIndex:g,columnValuesLength:h,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,c.each)(this.facets,function(i){var n=i.columnValue,a=i.view,o=(0,c.get)(t.cfg.title,"formatter"),s=(0,c.deepMix)({position:["50%","0%"],content:o?o(n):n},lr(T.TOP),t.cfg.title);a.annotation().text(s)})},r}(oi),tx=Jm,ex=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return(0,c.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,d.__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 h=this.getPageCount(u,a),f=[];return l.forEach(function(v,g){var p=i.getRowCol(g,a),y=p.row,m=p.col,x=[{field:s,value:v,values:l}],_=(0,c.filter)(t,i.getFacetDataFilter(x)),w={type:i.cfg.type,data:_,region:i.getRegion(h,a,m,y),columnValue:v,rowValue:v,columnField:s,rowField:null,columnIndex:m,rowIndex:y,columnValuesLength:a,rowValuesLength:h,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,d.__assign)((0,d.__assign)({},n),{label:null,title:null}):n},r.prototype.getYAxisOption=function(t,i,n,a){return a.columnIndex!==0?(0,d.__assign)((0,d.__assign)({},n),{title:null,label:null}):n},r.prototype.renderTitle=function(){var t=this;(0,c.each)(this.facets,function(i){var n=i.columnValue,a=i.view,o=(0,c.get)(t.cfg.title,"formatter"),s=(0,c.deepMix)({position:["50%","0%"],content:o?o(n):n},lr(T.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}(oi),rx=ex,ix=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getDefaultCfg=function(){return(0,c.deepMix)({},e.prototype.getDefaultCfg.call(this),{type:"matrix",showTitle:!1,columnTitle:(0,d.__assign)({},e.prototype.getDefaultTitleCfg.call(this)),rowTitle:(0,d.__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=0;u--){var h=this.getFacetsByLevel(t,u);try{for(var f=(i=void 0,(0,d.__values)(h)),v=f.next();!v.done;v=f.next()){var g=v.value;this.isLeaf(g)||(g.originColIndex=g.columnIndex,g.columnIndex=this.getRegionIndex(g.children),g.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=g){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,h=a.getHeight()*n+l.y;return{x:u,y:h}},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,c.isNil)(i))return null;var u=i.start,h=i.end,f=i.position,v=this.parsePosition(u),g=this.parsePosition(h),p=this.parsePosition(f);if(["arc","image","line","region","regionFilter"].includes(t)&&(!v||!g))return null;if(["text","dataMarker","html"].includes(t)&&!p)return null;if(t==="arc"){var y=i,m=y.start,x=y.end,_=(0,d.__rest)(y,["start","end"]),w=ai(o,v),b=ai(o,g);w>b&&(b=Math.PI*2+b),l=(0,d.__assign)((0,d.__assign)({},_),{center:o.getCenter(),radius:Bn(o,v),startAngle:w,endAngle:b})}else if(t==="image"){var S=i,C=S.start,M=S.end,_=(0,d.__rest)(S,["start","end"]);l=(0,d.__assign)((0,d.__assign)({},_),{start:v,end:g,src:i.src})}else if(t==="line"){var L=i,B=L.start,I=L.end,_=(0,d.__rest)(L,["start","end"]);l=(0,d.__assign)((0,d.__assign)({},_),{start:v,end:g,text:(0,c.get)(i,"text",null)})}else if(t==="region"){var G=i,q=G.start,ft=G.end,_=(0,d.__rest)(G,["start","end"]);l=(0,d.__assign)((0,d.__assign)({},_),{start:v,end:g})}else if(t==="text"){var mt=this.view.getData(),zt=i,H=zt.position,tt=zt.content,_=(0,d.__rest)(zt,["position","content"]),ct=tt;(0,c.isFunction)(tt)&&(ct=tt(mt)),l=(0,d.__assign)((0,d.__assign)((0,d.__assign)({},p),_),{content:ct})}else if(t==="dataMarker"){var nt=i,lt=nt.position,xt=nt.point,Rt=nt.line,Vt=nt.text,Tt=nt.autoAdjust,Gt=nt.direction,_=(0,d.__rest)(nt,["position","point","line","text","autoAdjust","direction"]);l=(0,d.__assign)((0,d.__assign)((0,d.__assign)({},_),p),{coordinateBBox:this.getCoordinateBBox(),point:xt,line:Rt,text:Vt,autoAdjust:Tt,direction:Gt})}else if(t==="dataRegion"){var qt=i,ue=qt.start,ce=qt.end,nr=qt.region,Vt=qt.text,ti=qt.lineLength,_=(0,d.__rest)(qt,["start","end","region","text","lineLength"]);l=(0,d.__assign)((0,d.__assign)({},_),{points:this.getRegionPoints(ue,ce),region:nr,text:Vt,lineLength:ti})}else if(t==="regionFilter"){var pr=i,Fi=pr.start,Ei=pr.end,Tv=pr.apply,yT=pr.color,_=(0,d.__rest)(pr,["start","end","apply","color"]),mT=this.view.geometries,Lv=[],$s=function(ar){!ar||(ar.isGroup()?ar.getChildren().forEach(function(_n){return $s(_n)}):Lv.push(ar))};(0,c.each)(mT,function(ar){Tv?(0,c.contains)(Tv,ar.type)&&(0,c.each)(ar.elements,function(_n){$s(_n.shape)}):(0,c.each)(ar.elements,function(_n){$s(_n.shape)})}),l=(0,d.__assign)((0,d.__assign)({},_),{color:yT,shapes:Lv,start:v,end:g})}else if(t==="shape"){var Iv=i,xT=Iv.render,Qs=(0,d.__rest)(Iv,["render"]),_T=function(bT){if((0,c.isFunction)(i.render))return xT(bT,a.view,{parsePosition:a.parsePosition.bind(a)})};l=(0,d.__assign)((0,d.__assign)({},Qs),{render:_T})}else if(t==="html"){var Js=i,tl=Js.html,jL=Js.position,Qs=(0,d.__rest)(Js,["html","position"]),wT=function(ar){return(0,c.isFunction)(tl)?tl(ar,a.view):tl};l=(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Qs),p),{parent:s.get("el").parentNode,html:wT})}var Or=(0,c.deepMix)({},n,(0,d.__assign)((0,d.__assign)({},l),{top:i.top,style:i.style,offsetX:i.offsetX,offsetY:i.offsetY}));return t!=="html"&&(Or.container=this.getComponentContainer(Or)),Or.animate=this.view.getOptions().animate&&Or.animate&&(0,c.get)(i,"animate",Or.animate),Or.animateOption=(0,c.deepMix)({},hi,Or.animateOption,i.animateOption),Or},r.prototype.isTop=function(t){return(0,c.get)(t,"top",!0)},r.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},r.prototype.getAnnotationTheme=function(t){return(0,c.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&&Me(o,["container"]),i.component.update((0,d.__assign)((0,d.__assign)({},o||{}),{visible:!!o})),(0,c.includes)(ra,t.type)&&i.component.render()}else i=this.createAnnotation(t),i&&(i.component.init(),(0,c.includes)(ra,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,c.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}(ci),vx=fx;function dc(e,r){var t=(0,c.deepMix)({},(0,c.get)(e,["components","axis","common"]),(0,c.get)(e,["components","axis",r]));return(0,c.get)(t,["grid"],{})}function ia(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 h=o.value,f=(h+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 Uo(e,r,t,i,n){var a=r.values.length,o=[],s=t.getTicks();return s.reduce(function(l,u){var h=l?l.value:u.value,f=u.value,v=(h+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,c.map)(Array(a+1),function(g,p){return e.convert({x:p/a,y:i?f:v})})}),u},s[0]),o}function gc(e,r){var t=(0,c.get)(r,"grid");if(t===null)return!1;var i=(0,c.get)(e,"grid");return!(t===void 0&&i===null)}var Ar=["container"],pc=(0,d.__assign)((0,d.__assign)({},hi),{appear:null}),dx=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.cache=new Map,i.gridContainer=i.view.getLayer(Z.BG).addGroup(),i.gridForeContainer=i.view.getLayer(Z.FORE).addGroup(),i.axisContainer=i.view.getLayer(Z.BG).addGroup(),i.axisForeContainer=i.view.getLayer(Z.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,c.each)(this.getComponents(),function(n){var a=n.component,o=n.direction,s=n.type,l=n.extra,u=l.dim,h=l.scale,f=l.alignTick,v;if(s===z.AXIS)i.isPolar?u==="x"?v=i.isTransposed?Rn(i,o):go(i):u==="y"&&(v=i.isTransposed?go(i):Rn(i,o)):v=Rn(i,o);else if(s===z.GRID)if(i.isPolar){var g=void 0;i.isTransposed?g=u==="x"?Uo(i,t.view.getYScales()[0],h,f,u):ia(i,h,u,f):g=u==="x"?ia(i,h,u,f):Uo(i,t.view.getXScale(),h,f,u),v={items:g,center:t.view.getCoordinate().getCenter()}}else v={items:ia(i,h,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=zn(this.option,i.field);if(n!==!1){var a=Xl(n,T.BOTTOM),o=Z.BG,s="x",l=this.view.getCoordinate(),u=this.getId("axis",i.field),h=this.getId("grid",i.field);if(l.isRect){var f=this.cache.get(u);if(f){var v=this.getLineAxisCfg(i,n,a);Me(v,Ar),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 g=this.cache.get(h);if(g){var v=this.getLineGridCfg(i,n,a,s);Me(v,Ar),g.component.update(v),t.set(h,g)}else g=this.createLineGrid(i,n,o,a,s),g&&(this.cache.set(h,g),t.set(h,g))}else if(l.isPolar){var f=this.cache.get(u);if(f){var v=l.isTransposed?this.getLineAxisCfg(i,n,T.RADIUS):this.getCircleAxisCfg(i,n,a);Me(v,Ar),f.component.update(v),t.set(u,f)}else{if(l.isTransposed){if((0,c.isUndefined)(n))return;f=this.createLineAxis(i,n,o,T.RADIUS,s)}else f=this.createCircleAxis(i,n,o,a,s);this.cache.set(u,f),t.set(u,f)}var g=this.cache.get(h);if(g){var v=l.isTransposed?this.getCircleGridCfg(i,n,T.RADIUS,s):this.getLineGridCfg(i,n,T.CIRCLE,s);Me(v,Ar),g.component.update(v),t.set(h,g)}else{if(l.isTransposed){if((0,c.isUndefined)(n))return;g=this.createCircleGrid(i,n,o,T.RADIUS,s)}else g=this.createLineGrid(i,n,o,T.CIRCLE,s);g&&(this.cache.set(h,g),t.set(h,g))}}}}},r.prototype.updateYAxes=function(t){var i=this,n=this.view.getYScales();(0,c.each)(n,function(a,o){if(!(!a||a.isIdentity)){var s=a.field,l=zn(i.option,s);if(l!==!1){var u=Z.BG,h="y",f=i.getId("axis",s),v=i.getId("grid",s),g=i.view.getCoordinate();if(g.isRect){var p=Xl(l,o===0?T.LEFT:T.RIGHT),y=i.cache.get(f);if(y){var m=i.getLineAxisCfg(a,l,p);Me(m,Ar),y.component.update(m),t.set(f,y)}else y=i.createLineAxis(a,l,u,p,h),i.cache.set(f,y),t.set(f,y);var x=i.cache.get(v);if(x){var m=i.getLineGridCfg(a,l,p,h);Me(m,Ar),x.component.update(m),t.set(v,x)}else x=i.createLineGrid(a,l,u,p,h),x&&(i.cache.set(v,x),t.set(v,x))}else if(g.isPolar){var y=i.cache.get(f);if(y){var m=g.isTransposed?i.getCircleAxisCfg(a,l,T.CIRCLE):i.getLineAxisCfg(a,l,T.RADIUS);Me(m,Ar),y.component.update(m),t.set(f,y)}else{if(g.isTransposed){if((0,c.isUndefined)(l))return;y=i.createCircleAxis(a,l,u,T.CIRCLE,h)}else y=i.createLineAxis(a,l,u,T.RADIUS,h);i.cache.set(f,y),t.set(f,y)}var x=i.cache.get(v);if(x){var m=g.isTransposed?i.getLineGridCfg(a,l,T.CIRCLE,h):i.getCircleGridCfg(a,l,T.RADIUS,h);Me(m,Ar),x.component.update(m),t.set(v,x)}else{if(g.isTransposed){if((0,c.isUndefined)(l))return;x=i.createLineGrid(a,l,u,T.CIRCLE,h)}else x=i.createCircleGrid(a,l,u,T.RADIUS,h);x&&(i.cache.set(v,x),t.set(v,x))}}}}})},r.prototype.createLineAxis=function(t,i,n,a,o){var s={component:new fp(this.getLineAxisCfg(t,i,a)),layer:n,direction:a===T.RADIUS?T.NONE:a,type:z.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 dp(s),layer:n,direction:T.NONE,type:z.GRID,extra:{dim:o,scale:t,alignTick:(0,c.get)(s,"alignTick",!0)}};return l.component.init(),l}},r.prototype.createCircleAxis=function(t,i,n,a,o){var s={component:new vp(this.getCircleAxisCfg(t,i,a)),layer:n,direction:a,type:z.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 gp(s),layer:n,direction:T.NONE,type:z.GRID,extra:{dim:o,scale:t,alignTick:(0,c.get)(s,"alignTick",!0)}};return l.component.init(),l}},r.prototype.getLineAxisCfg=function(t,i,n){var a=(0,c.get)(i,["top"])?this.axisForeContainer:this.axisContainer,o=this.view.getCoordinate(),s=Rn(o,n),l=jl(t,i),u=Nn(this.view.getTheme(),n),h=(0,c.get)(i,["title"])?(0,c.deepMix)({title:{style:{text:l}}},{title:Yl(this.view.getTheme(),n,i.title)},i):i,f=(0,c.deepMix)((0,d.__assign)((0,d.__assign)({container:a},s),{ticks:t.getTicks().map(function(w){return{id:"".concat(w.tickValue),name:w.text,value:w.value}}),verticalFactor:o.isPolar?Hl(s,o.getCenter())*-1:Hl(s,o.getCenter()),theme:u}),u,h),v=this.getAnimateCfg(f),g=v.animate,p=v.animateOption;f.animateOption=p,f.animate=g;var y=Wl(s),m=(0,c.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(!!gc(Nn(this.view.getTheme(),n),i)){var o=dc(this.view.getTheme(),n),s=(0,c.deepMix)({container:(0,c.get)(i,["top"])?this.gridForeContainer:this.gridContainer},o,(0,c.get)(i,"grid"),this.getAnimateCfg(i));return s.items=ia(this.view.getCoordinate(),t,a,(0,c.get)(s,"alignTick",!0)),s}},r.prototype.getCircleAxisCfg=function(t,i,n){var a=(0,c.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.pop();var l=jl(t,i),u=Nn(this.view.getTheme(),T.CIRCLE),h=(0,c.get)(i,["title"])?(0,c.deepMix)({title:{style:{text:l}}},{title:Yl(this.view.getTheme(),n,i.title)},i):i,f=(0,c.deepMix)((0,d.__assign)((0,d.__assign)({container:a},go(this.view.getCoordinate())),{ticks:s,verticalFactor:1,theme:u}),u,h),v=this.getAnimateCfg(f),g=v.animate,p=v.animateOption;return f.animate=g,f.animateOption=p,f},r.prototype.getCircleGridCfg=function(t,i,n,a){if(!!gc(Nn(this.view.getTheme(),n),i)){var o=dc(this.view.getTheme(),T.RADIUS),s=(0,c.deepMix)({container:(0,c.get)(i,["top"])?this.gridForeContainer:this.gridContainer,center:this.view.getCoordinate().getCenter()},o,(0,c.get)(i,"grid"),this.getAnimateCfg(i)),l=(0,c.get)(s,"alignTick",!0),u=a==="x"?this.view.getYScales()[0]:this.view.getXScale();return s.items=Uo(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,c.get)(t,"animate"),animateOption:t&&t.animateOption?(0,c.deepMix)({},pc,t.animateOption):pc}},r}(ci),gx=dx;function Fr(e,r,t){return t===T.TOP?[e.minX+e.width/2-r.width/2,e.minY]:t===T.BOTTOM?[e.minX+e.width/2-r.width/2,e.maxY-r.height]:t===T.LEFT?[e.minX,e.minY+e.height/2-r.height/2]:t===T.RIGHT?[e.maxX-r.width,e.minY+e.height/2-r.height/2]:t===T.TOP_LEFT||t===T.LEFT_TOP?[e.tl.x,e.tl.y]:t===T.TOP_RIGHT||t===T.RIGHT_TOP?[e.tr.x-r.width,e.tr.y]:t===T.BOTTOM_LEFT||t===T.LEFT_BOTTOM?[e.bl.x,e.bl.y-r.height]:t===T.BOTTOM_RIGHT||t===T.RIGHT_BOTTOM?[e.br.x-r.width,e.br.y-r.height]:[0,0]}function px(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 yc(e){return e===DIRECTION.LEFT?DIRECTION.RIGHT:e===DIRECTION.RIGHT?DIRECTION.LEFT:e}function mc(e){return e===DIRECTION.TOP?DIRECTION.BOTTOM:e===DIRECTION.BOTTOM?DIRECTION.TOP:e}function yx(e,r){var t=r.matrix[0],i=r.matrix[4],n=e;return t<0&&(n=yc(n)),i<0&&(n=mc(n)),n}function mx(e,r){var t=e;return r.isReflect("x")&&(t=yc(t)),r.isReflect("y")&&(t=mc(t)),t}function yL(e,r){var t=e;return t=px(t,r),t=yx(t,r),t=mx(t,r),t}function xc(e,r){return(0,c.isBoolean)(e)?e===!1?!1:{}:(0,c.get)(e,[r],e)}function na(e){return(0,c.get)(e,"position",T.BOTTOM)}var xx=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.container=i.view.getLayer(Z.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,c.each)(this.components,function(i){var n=i.component,a=i.direction,o=To(a),s=n.get("maxWidthRatio"),l=n.get("maxHeightRatio"),u=t.getCategoryLegendSizeCfg(o,s,l),h=n.get("maxWidth"),f=n.get("maxHeight");n.update({maxWidth:Math.min(u.maxWidth,h||0),maxHeight:Math.min(u.maxHeight,f||0)});var v=n.get("padding"),g=n.getLayoutBBox(),p=new Ae(g.x,g.y,g.width,g.height).expand(v),y=(0,d.__read)(Fr(t.view.viewBBox,p,a),2),m=y[0],x=y[1],_=(0,d.__read)(Fr(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,g,p){var y=t.getId(p.field),m=t.getComponentById(y);if(m){var x=void 0,_=xc(t.option,p.field);_!==!1&&((0,c.get)(_,"custom")?x=t.getCategoryCfg(v,g,p,_,!0):p.isLinear?x=t.getContinuousCfg(v,g,p,_):p.isCategory&&(x=t.getCategoryCfg(v,g,p,_))),x&&(Me(x,["container"]),m.direction=na(_),m.component.update(x),i[y]=!0)}else{var w=t.createFieldLegend(v,g,p);w&&(w.component.init(),t.components.push(w),i[y]=!0)}};if((0,c.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);Me(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=Z.FORE,h=na(this.option);this.components.push({id:a,component:l,layer:u,direction:h,type:z.LEGEND,extra:void 0}),i[a]=!0}}}else this.loopLegends(n);var f=[];(0,c.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,c.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,c.each)(n,function(o){var s=o.getGroupAttributes();(0,c.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=xc(this.option,n.field),s=Z.FORE,l=na(o);if(o!==!1&&((0,c.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:z.LEGEND,extra:{scale:n}}},r.prototype.createCustomLegend=function(t,i,n,a){var o=this.getCategoryCfg(t,i,n,a,!0);return new kl(o)},r.prototype.createContinuousLegend=function(t,i,n,a){var o=this.getContinuousCfg(t,i,n,Me(a,["value"]));return new pp(o)},r.prototype.createCategoryLegend=function(t,i,n,a){var o=this.getCategoryCfg(t,i,n,a);return new kl(o)},r.prototype.getContinuousCfg=function(t,i,n,a){var o=n.getTicks(),s=(0,c.find)(o,function(y){return y.value===0}),l=(0,c.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 h={min:(0,c.head)(u).value,max:(0,c.last)(u).value,colors:[],rail:{type:i.type},track:{}};i.type==="size"&&(h.track={style:{fill:i.type==="size"?this.view.getTheme().defaultColor:void 0}}),i.type==="color"&&(h.colors=u.map(function(y){return y.attrValue}));var f=this.container,v=na(a),g=To(v),p=(0,c.get)(a,"title");return p&&(p=(0,c.deepMix)({text:Xi(n)},p)),h.container=f,h.layout=g,h.title=p,h.animateOption=hi,this.mergeLegendCfg(h,a,"continuous")},r.prototype.getCategoryCfg=function(t,i,n,a,o){var s=this.container,l=(0,c.get)(a,"position",T.BOTTOM),u=Pu(this.view.getTheme(),l),h=(0,c.get)(u,["marker"]),f=(0,c.get)(a,"marker"),v=To(l),g=(0,c.get)(u,["pageNavigator"]),p=(0,c.get)(a,"pageNavigator"),y=o?$y(h,f,a.items):Ou(this.view,t,i,h,f),m=(0,c.get)(a,"title");m&&(m=(0,c.deepMix)({text:n?Xi(n):""},m));var x=(0,c.get)(a,"maxWidthRatio"),_=(0,c.get)(a,"maxHeightRatio"),w=this.getCategoryLegendSizeCfg(v,x,_);w.container=s,w.layout=v,w.items=y,w.title=m,w.animateOption=hi,w.pageNavigator=(0,c.deepMix)({},g,p);var b=this.mergeLegendCfg(w,a,l);b.reversed&&b.items.reverse();var S=(0,c.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=Pu(this.view.getTheme(),a);return(0,c.deepMix)({},o,t,i)},r.prototype.getId=function(t){return"".concat(this.name,"-").concat(t)},r.prototype.getComponentById=function(t){return(0,c.find)(this.components,function(i){return i.id===t})},r.prototype.getCategoryLegendSizeCfg=function(t,i,n){i===void 0&&(i=$t),n===void 0&&(n=$t);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}(ci),_x=xx,wx=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.onChangeFn=c.noop,i.resetMeasure=function(){i.clear()},i.onValueChange=function(n){var a=(0,d.__read)(n,2),o=a[0],s=a[1];i.start=o,i.end=s,i.changeViewData(o,s)},i.container=i.view.getLayer(Z.FORE).addGroup(),i.onChangeFn=(0,c.throttle)(i.onValueChange,20,{leading:!0}),i.width=0,i.view.on(A.BEFORE_CHANGE_DATA,i.resetMeasure),i.view.on(A.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(A.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(A.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,c.isNil)(this.start)&&(this.start=i,this.end=n);var a=this.view.getOptions().data;this.option&&!(0,c.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,d.__read)(n,4),o=a[0],s=a[1],l=a[2],u=a[3],h=this.slider.component.getLayoutBBox(),f=new Ae(h.x,h.y,Math.min(h.width,i),h.height).expand(n),v=this.getMinMaxText(this.start,this.end),g=v.minText,p=v.maxText,y=(0,d.__read)(Fr(this.view.viewBBox,f,T.BOTTOM),2),m=y[0],x=y[1],_=(0,d.__read)(Fr(this.view.coordinateBBox,f,T.BOTTOM),2),w=_[0],b=_[1];this.slider.component.update((0,d.__assign)((0,d.__assign)({},this.getSliderCfg()),{x:w+u,y:x+o,width:this.width,start:this.start,end:this.end,minText:g,maxText:p})),this.view.viewBBox=this.view.viewBBox.cut(f,T.BOTTOM)}},r.prototype.update=function(){this.render()},r.prototype.createSlider=function(){var t=this.getSliderCfg(),i=new up((0,d.__assign)({container:this.container},t));return i.init(),{component:i,layer:Z.FORE,direction:T.BOTTOM,type:z.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,d.__assign)((0,d.__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,c.isObject)(this.option)){var i=(0,d.__assign)({data:this.getData()},(0,c.get)(this.option,"trendCfg",{}));t=(0,c.deepMix)({},t,this.getThemeOptions(),this.option),t=(0,d.__assign)((0,d.__assign)({},t),{trendCfg:i})}return t.start=(0,c.clamp)(Math.min((0,c.isNil)(t.start)?0:t.start,(0,c.isNil)(t.end)?1:t.end),0,1),t.end=(0,c.clamp)(Math.max((0,c.isNil)(t.start)?0:t.start,(0,c.isNil)(t.end)?1:t.end),0,1),t},r.prototype.getData=function(){var t=this.view.getOptions().data,i=(0,d.__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,h){return h[s]===l[0]&&u.push(h[n.field]),u},[])}return t.map(function(u){return u[n.field]||0})},r.prototype.getThemeOptions=function(){var t=this.view.getTheme();return(0,c.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,c.valuesOfKey)(n,a.field);a.isLinear&&(s=s.sort());var l=o?s:s.reverse(),u=(0,c.size)(n);if(!a||!u)return{};var h=(0,c.size)(l),f=Math.floor(t*(h-1)),v=Math.floor(i*(h-1)),g=(0,c.get)(l,[f]),p=(0,c.get)(l,[v]),y=this.getSliderCfg().formatter;return y&&(g=y(g,n[f],f),p=y(p,n[v],v)),{minText:g,maxText:p}},r.prototype.changeViewData=function(t,i){var n=this.view.getOptions().data,a=this.view.getXScale(),o=(0,c.size)(n);if(!(!a||!o)){var s=!0,l=(0,c.valuesOfKey)(n,a.field),u=this.view.getXScale().isLinear?l.sort(function(p,y){return Number(p)-Number(y)}):l,h=s?u:u.reverse(),f=(0,c.size)(h),v=Math.floor(t*(f-1)),g=Math.floor(i*(f-1));this.view.filter(a.field,function(p,y){var m=h.indexOf(p);return m>-1?ni(m,v,g):!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}(ci),bx=wx,aa=0,_c=8,Sx=32,Cx=20,Ax=function(e){(0,d.__extends)(r,e);function r(t){var i=e.call(this,t)||this;return i.onChangeFn=c.noop,i.resetMeasure=function(){i.clear()},i.onValueChange=function(n){var a=n.ratio,o=i.getValidScrollbarCfg().animate;i.ratio=(0,c.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(Z.FORE).addGroup(),i.onChangeFn=(0,c.throttle)(i.onValueChange,20,{leading:!0}),i.trackLen=0,i.thumbLen=0,i.ratio=0,i.view.on(A.BEFORE_CHANGE_DATA,i.resetMeasure),i.view.on(A.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(A.BEFORE_CHANGE_DATA,this.resetMeasure),this.view.off(A.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 Ae(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 h=(0,d.__read)(Fr(this.view.viewBBox,o,T.BOTTOM),2),f=h[0],v=h[1],g=(0,d.__read)(Fr(this.view.coordinateBBox,o,T.BOTTOM),2),p=g[0],y=g[1];l=p,u=v}else{var m=(0,d.__read)(Fr(this.view.viewBBox,o,T.RIGHT),2),f=m[0],v=m[1],x=(0,d.__read)(Fr(this.view.viewBBox,o,T.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,d.__assign)((0,d.__assign)({},s),{x:l,y:u,trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio})):this.scrollbar.component.update((0,d.__assign)((0,d.__assign)({},s),{x:l,y:u})),this.view.viewBBox=this.view.viewBBox.cut(o,s.isHorizontal?T.BOTTOM:T.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,c.get)(t,["components","scrollbar","common"],{})},r.prototype.getScrollbarTheme=function(t){var i=(0,c.get)(this.view.getTheme(),["components","scrollbar"]),n=t||{},a=n.thumbHighlightColor,o=(0,d.__rest)(n,["thumbHighlightColor"]);return{default:(0,c.deepMix)({},(0,c.get)(i,["default","style"],{}),o),hover:(0,c.deepMix)({},(0,c.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,c.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,d.__read)(t,2),o=a[0],s=a[1],l=this.getValidScrollbarCfg().type,u=l!=="vertical",h=(0,c.valuesOfKey)(this.data,this.xScaleCfg.field),f=this.view.getXScale().isLinear?h.sort(function(g,p){return Number(g)-Number(p)}):h,v=u?f:f.reverse();this.yScalesCfg.forEach(function(g){n.view.scale(g.field,{formatter:g.formatter,type:g.type,min:g.min,max:g.max,tickMethod:g.tickMethod})}),this.view.filter(this.xScaleCfg.field,function(g){var p=v.indexOf(g);return p>-1?ni(p,o,s):!0}),this.view.render(!0)},r.prototype.createScrollbar=function(){var t=this.getValidScrollbarCfg().type,i=t!=="vertical",n=new hp((0,d.__assign)((0,d.__assign)({container:this.container},this.getScrollbarComponentCfg()),{x:0,y:0}));return n.init(),{component:n,layer:Z.FORE,direction:i?T.BOTTOM:T.RIGHT,type:z.SCROLLBAR}},r.prototype.updateScrollbar=function(){var t=this.getScrollbarComponentCfg(),i=this.trackLen?(0,d.__assign)((0,d.__assign)({},t),{trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:(this.trackLen-this.thumbLen)*this.ratio}):(0,d.__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,c.valuesOfKey)(i,t.field);return(0,c.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,h=a.style,f=o!=="vertical",v=(0,d.__read)(s,4),g=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+g},_=this.getStep(),w=this.getCnt(),b=f?i.width-m-p:i.height-g-y,S=Math.max(b*(0,c.clamp)(_/w,0,1),Cx);return(0,d.__assign)((0,d.__assign)({},this.getThemeOptions()),{x:x.x,y:x.y,size:f?u:l,isHorizontal:f,trackLen:b,thumbLen:S,thumbOffset:0,theme:this.getScrollbarTheme(h)})},r.prototype.getValidScrollbarCfg=function(){var t={type:"horizontal",categorySize:Sx,width:_c,height:_c,padding:[0,0,0,0],animate:!0,style:{}};return(0,c.isObject)(this.option)&&(t=(0,d.__assign)((0,d.__assign)({},t),this.option)),(!(0,c.isObject)(this.option)||!this.option.padding)&&(t.padding=t.type==="horizontal"?[aa,0,aa,0]:[0,aa,0,aa]),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,d.__spreadArray)([],(0,d.__read)(n),!1).reverse()),n},r}(ci),Fx=Ax,Ex={fill:"#CCD6EC",opacity:.3};function Mx(e,r,t){var i,n,a,o,s,l,u=gy(e,r,t);if(u.length){u=(0,c.flatten)(u);try{for(var h=(0,d.__values)(u),f=h.next();!f.done;f=h.next()){var v=f.value;try{for(var g=(a=void 0,(0,d.__values)(v)),p=g.next();!p.done;p=g.next()){var y=p.value,m=y.mappingData,x=m.x,_=m.y;y.x=(0,c.isArray)(x)?x[x.length-1]:x,y.y=(0,c.isArray)(_)?_[_.length-1]:_}}catch(I){a={error:I}}finally{try{p&&!p.done&&(o=g.return)&&o.call(g)}finally{if(a)throw a.error}}}}catch(I){i={error:I}}finally{try{f&&!f.done&&(n=h.return)&&n.call(h)}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,d.__values)(u),M=C.next();!M.done;M=C.next()){var L=M.value,B=Math.abs(r.y-L[0].y);B<=S&&(b=L,S=B)}}catch(I){s={error:I}}finally{try{M&&!M.done&&(l=C.return)&&l.call(C)}finally{if(s)throw s.error}}u=[b]}return(0,c.uniq)((0,c.flatten)(u))}return[]}var Tx=function(e){(0,d.__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=Mx(i,{x:n.x,y:n.y},a);if(!(0,c.isEqual)(o,this.items)&&(this.items=o,o.length)){var s=i.getXScale().field,l=o[0].data[s],u=[],h=i.geometries;if((0,c.each)(h,function(ct){if(ct.type==="interval"||ct.type==="schema"){var nt=ct.getElementsBy(function(lt){var xt=lt.getData();return xt[s]===l});u=u.concat(nt)}}),u.length){var f=i.getCoordinate(),v=u[0].shape.getCanvasBBox(),g=u[0].shape.getCanvasBBox(),p=v;(0,c.each)(u,function(ct){var nt=ct.shape.getCanvasBBox();f.isTransposed?(nt.minYg.maxY&&(g=nt)):(nt.minXg.maxX&&(g=nt)),p.x=Math.min(nt.minX,p.minX),p.y=Math.min(nt.minY,p.minY),p.width=Math.max(nt.maxX,p.maxX)-p.x,p.height=Math.max(nt.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,c.isNil)(S)&&(b=(0,c.isNil)(b)?_.isLinear?0:.25:b,S=f.isTransposed?b*g.height:b*v.width);var C=void 0,M=void 0,L=void 0,B=void 0;f.isTransposed?(C=m.minX,M=Math.min(g.minY,v.minY)-S,L=m.width,B=p.height+S*2):(C=Math.min(v.minX,g.minX)-S,M=m.minY,L=p.width+S*2,B=m.height),x=[["M",C,M],["L",C+L,M],["L",C+L,M+B],["L",C,M+B],["Z"]]}else{var I=(0,c.head)(u),G=(0,c.last)(u),q=Hi(I.getModel(),f).startAngle,ft=Hi(G.getModel(),f).endAngle,mt=f.getCenter(),zt=f.getRadius(),H=f.innerRadius*zt;x=mr(mt.x,mt.y,zt,q,ft,H)}if(this.regionPath)this.regionPath.attr("path",x),this.regionPath.show();else{var tt=(0,c.get)(t,"style",Ex);this.regionPath=y.addShape({type:"path",name:"active-region",capture:!1,attrs:(0,d.__assign)((0,d.__assign)({},tt),{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}(ie),Lx=Tx,Ix=function(e){(0,d.__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,c.get)(t.view.getOptions(),"tooltip.showDelay",16);if(s-o>l){var u=this.location,h={x:i.x,y:i.y};(!u||!(0,c.isEqual)(u,h))&&this.showTooltip(n,h),this.timeStamp=s,this.location=h}}},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}(ie),wc=Ix,Ox=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.showTooltip=function(t,i){var n=$e(t);(0,c.each)(n,function(a){var o=_o(t,a,i);a.showTooltip(o)})},r.prototype.hideTooltip=function(t){var i=$e(t);(0,c.each)(i,function(n){n.hideTooltip()})},r}(wc),Px=Ox,Dx=function(e){(0,d.__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,c.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,d.__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,c.get)(o,["components","tooltip","domStyles"],{}),l=new kn({parent:n.get("el").parentNode,region:a,visible:!1,crosshairs:null,domStyles:(0,d.__assign)({},(0,c.deepMix)({},s,(t={},t[or]={"max-width":"50%"},t[sr]={"word-break":"break-all"},t)))});l.init(),l.setCapture(!1),this.tooltip=l},r}(ie),kx=Dx,Bx=function(e){(0,d.__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=tu(t,this.stateName);(0,c.each)(n,function(a){i.setElementState(a,!1)})},r}(ie),Zo=Bx;function bc(e){return(0,c.get)(e.get("delegateObject"),"item")}var Rx=function(e){(0,d.__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=we(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=li(a,i),s=je(t,i);return!(0,c.isNil)(s)&&n.name===o.getText(s)},r.prototype.setElementsStateByItem=function(t,i,n,a){var o=this;(0,c.each)(t,function(s){o.isMathItem(s,i,n)&&s.setState(o.stateName,a)})},r.prototype.setStateEnable=function(t){var i=_r(this.context);if(i)$l(this.context)&&this.setStateByElement(i,t);else{var n=Rr(this.context);if(Ui(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&&bc(s.fromShape)===bc(s.toShape))return;this.setStateByComponent(o,a,t)}}}},r.prototype.toggle=function(){var t=_r(this.context);if(t){var i=t.hasState(this.stateName);this.setElementState(t,!i)}},r.prototype.reset=function(){this.setStateEnable(!1)},r}(Zo),Ko=Rx,Nx=function(e){(0,d.__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),zx=Nx,Vx=function(e){(0,d.__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,d.__assign)((0,d.__assign)({},(0,c.deepMix)({},o,(0,c.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=Hp(a,o.field,s),u=this.linkGroup,h=u.addGroup();this.cache[s]=h;var f=l.length;(0,c.each)(l,function(v,g){if(g=0},i)},r}(qo),Cc=Jx,t_=function(e){(0,d.__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=we(n);Sc(a,function(o){return t===o},i)},r.prototype.clear=function(){var t=this.context.view;Qo(t)},r}($o),e_=t_,r_=function(e){(0,d.__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),i_=r_,n_=function(e){(0,d.__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),a_=n_,o_=function(e){(0,d.__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),s_=o_,l_=function(e){(0,d.__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=Rr(this.context),i=null;return Ui(t)&&(i={item:t.item,list:t.component}),i},r.prototype.getAllowComponents=function(){var t=this,i=this.context.view,n=ru(i),a=[];return(0,c.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,c.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=li(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=li(o,a),l=je(i,a),u=s.getText(l);this.setItemsState(t,u,n)},r.prototype.setStateEnable=function(t){var i=this,n=_r(this.context);if(n){var a=this.getAllowComponents();(0,c.each)(a,function(u){i.setStateByElement(u,n,t)})}else{var o=Rr(this.context);if(Ui(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,c.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}(ie),Gr=l_,u_=function(e){(0,d.__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}(Gr),c_=u_,Ac="inactive",Fc="active";function h_(e){var r=e.getItems();(0,c.each)(r,function(t){e.hasState(t,Fc)&&e.setItemState(t,Fc,!1),e.hasState(t,Ac)&&e.setItemState(t,Ac,!1)})}var rn="inactive",Wr="active",f_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName=Wr,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,c.each)(a,function(l){i(l)?(t.hasState(l,rn)&&t.setItemState(l,rn,!1),t.setItemState(l,Wr,!0)):t.hasState(l,Wr)||t.setItemState(l,rn,!0)});else{var o=t.getItemsByState(Wr),s=!0;(0,c.each)(o,function(l){if(!i(l))return s=!1,!1}),s?this.clear():(0,c.each)(a,function(l){i(l)&&(t.hasState(l,Wr)&&t.setItemState(l,Wr,!1),t.setItemState(l,rn,!0))})}},r.prototype.highlight=function(){this.setState()},r.prototype.clear=function(){var t=this.getTriggerListInfo();if(t)h_(t.list);else{var i=this.getAllowComponents();(0,c.each)(i,function(n){n.clearItemsState(Wr),n.clearItemsState(rn)})}},r}(Gr),ts=f_,v_=function(e){(0,d.__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}(Gr),d_=v_,g_=function(e){(0,d.__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}(Gr),p_=g_,vi="unchecked",oa="checked",y_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.stateName=oa,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,c.each)(a,function(o){i(o)?(t.hasState(o,vi)&&t.setItemState(o,vi,!1),t.setItemState(o,oa,!0)):t.hasState(o,oa)||t.setItemState(o,vi,!0)})},r.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var i=t.list,n=t.item,a=!(0,c.some)(i.getItems(),function(o){return i.hasState(o,vi)});a||i.hasState(n,vi)?this.setItemState(i,n,!0):this.reset()}},r.prototype.checked=function(){this.setState()},r.prototype.reset=function(){var t=this.getAllowComponents();(0,c.each)(t,function(i){i.clearItemsState(oa),i.clearItemsState(vi)})},r}(Gr),m_=y_,di="unchecked",x_=function(e){(0,d.__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,h=this.getTriggerListInfo();if(h==null?void 0:h.item){var f=h.list,v=h.item,g=f.getItems(),p=g.filter(function(I){return!f.hasState(I,di)}),y=g.filter(function(I){return f.hasState(I,di)}),m=p[0];if(g.length===p.length)try{for(var x=(0,d.__values)(g),_=x.next();!_.done;_=x.next()){var w=_.value;f.setItemState(w,di,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(g.length-y.length==1)if(m.id===v.id)try{for(var b=(0,d.__values)(g),S=b.next();!S.done;S=b.next()){var w=S.value;f.setItemState(w,di,!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,d.__values)(g),M=C.next();!M.done;M=C.next()){var w=M.value;f.setItemState(w,di,w.id!==v.id)}}catch(I){o={error:I}}finally{try{M&&!M.done&&(s=C.return)&&s.call(C)}finally{if(o)throw o.error}}else try{for(var L=(0,d.__values)(g),B=L.next();!B.done;B=L.next()){var w=B.value;f.setItemState(w,di,w.id!==v.id)}}catch(I){l={error:I}}finally{try{B&&!B.done&&(u=L.return)&&u.call(L)}finally{if(l)throw l.error}}}},r}(Gr),__=x_,Ec="showRadio",es="legend-radio-tip",w_=function(e){(0,d.__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,Ec,!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,Ec,!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,c.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,d.__assign)((0,d.__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[or]={padding:"6px 8px",transform:"translate(-50%, -80%)",background:"rgba(0,0,0,0.75)",color:"#fff","border-radius":"2px","z-index":100},t[sr]={"font-size":"12px","line-height":"14px","margin-bottom":0,"word-break":"break-all"},t);document.getElementById(es)&&document.body.removeChild(document.getElementById(es));var n=new kn({parent:document.body,region:null,visible:!1,crosshairs:null,domStyles:i,containerId:es});n.init(),n.setCapture(!1),this.tooltip=n},r}(Gr),b_=w_,S_=function(e){(0,d.__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,d.__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,c.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,c.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}(ie),rs=S_,C_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.shapeType="circle",t}return r.prototype.getMaskAttrs=function(){var t=this.points,i=(0,c.last)(this.points),n=0,a=0,o=0;if(t.length){var s=t[0];n=xo(s,i)/2,a=(i.x+s.x)/2,o=(i.y+s.y)/2}return{x:a,y:o,r:n}},r}(rs),A_=C_,F_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.shapeType="rect",t}return r.prototype.getRegion=function(){var t=this.points;return{start:(0,c.head)(t),end:(0,c.last)(t)}},r.prototype.getMaskAttrs=function(){var t=this.getRegion(),i=t.start,n=t.end,a=Math.min(i.x,n.x),o=Math.min(i.y,n.y),s=Math.abs(n.x-i.x),l=Math.abs(n.y-i.y);return{x:a,y:o,width:s,height:l}},r}(rs),Mc=F_;function Tc(e){e.x=(0,c.clamp)(e.x,0,1),e.y=(0,c.clamp)(e.y,0,1)}var E_=function(e){(0,d.__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=null,i=null,n=this.points,a=this.dim,o=this.context.view.getCoordinate(),s=o.invert((0,c.head)(n)),l=o.invert((0,c.last)(n));return this.inPlot&&(Tc(s),Tc(l)),a==="x"?(t=o.convert({x:s.x,y:0}),i=o.convert({x:l.x,y:1})):(t=o.convert({x:0,y:s.y}),i=o.convert({x:1,y:l.y})),{start:t,end:i}},r}(Mc),Lc=E_,M_=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getMaskPath=function(){var t=this.points,i=[];return t.length&&((0,c.each)(t,function(n,a){a===0?i.push(["M",n.x,n.y]):i.push(["L",n.x,n.y])}),i.push(["L",t[0].x,t[0].y])),i},r.prototype.getMaskAttrs=function(){return{path:this.getMaskPath()}},r.prototype.addPoint=function(){this.resize()},r}(rs),Ic=M_,T_=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getMaskPath=function(){var t=this.points;return jp(t,!0)},r}(Ic),L_=T_,I_=function(e){(0,d.__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}(ie),O_=I_,P_=function(e){(0,d.__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,c.each)(t.views,function(o){a.filterView(o,i,n)})},r.prototype.filter=function(){var t=Rr(this.context);if(t){var i=this.context.view,n=t.component,a=n.get("field");if(Ui(t)){if(a){var o=n.getItemsByState("unchecked"),s=li(i,a),l=o.map(function(g){return g.name});l.length?this.filterView(i,a,function(g){var p=s.getText(g);return!l.includes(p)}):this.filterView(i,a,null),i.render(!0)}}else if(Ql(t)){var u=n.getValue(),h=(0,d.__read)(u,2),f=h[0],v=h[1];this.filterView(i,a,function(g){return g>=f&&g<=v}),i.render(!0)}}},r}(ie),D_=P_;function Oc(e,r,t,i){var n=Math.min(t[r],i[r]),a=Math.max(t[r],i[r]),o=(0,d.__read)(e.range,2),s=o[0],l=o[1];if(nl&&(a=l),n===l&&a===l)return null;var u=e.invert(n),h=e.invert(a);if(e.isCategory){var f=e.values.indexOf(u),v=e.values.indexOf(h),g=e.values.slice(f,v+1);return function(p){return g.includes(p)}}else return function(p){return p>=u&&p<=h}}var Ie;(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"})(Ie||(Ie={}));var k_=function(e){(0,d.__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(Zi(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(Ie.BEFORE_FILTER,ne.fromData(s,Ie.BEFORE_FILTER,u));var h=s.getCoordinate(),f=h.invert(i),v=h.invert(t);if(this.hasDim("x")){var g=s.getXScale(),p=Oc(g,"x",f,v);this.filterView(s,g.field,p)}if(this.hasDim("y")){var y=s.getYScales()[0],p=Oc(y,"y",f,v);this.filterView(s,y.field,p)}this.reRender(s,{source:Ie.FILTER}),s.emit(Ie.AFTER_FILTER,ne.fromData(s,Ie.AFTER_FILTER,u))}},r.prototype.end=function(){this.isStarted=!1},r.prototype.reset=function(){var t=this.context.view;if(t.emit(Ie.BEFORE_RESET,ne.fromData(t,Ie.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:Ie.RESET}),t.emit(Ie.AFTER_RESET,ne.fromData(t,Ie.AFTER_RESET,{}))},r.prototype.filterView=function(t,i,n){t.filter(i,n)},r.prototype.reRender=function(t,i){t.render(!0,i)},r}(ie),sa=k_,B_=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.filterView=function(t,i,n){var a=$e(t);(0,c.each)(a,function(o){o.filter(i,n)})},r.prototype.reRender=function(t){var i=$e(t);(0,c.each)(i,function(n){n.render(!0)})},r}(sa),is=B_,R_=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.filter=function(){var t=Rr(this.context),i=this.context.view,n=we(i);if(Zi(this.context)){var a=yo(this.context,10);a&&(0,c.each)(n,function(y){a.includes(y)?y.show():y.hide()})}else if(t){var o=t.component,s=o.get("field");if(Ui(t)){if(s){var l=o.getItemsByState("unchecked"),u=li(i,s),h=l.map(function(y){return y.name});(0,c.each)(n,function(y){var m=je(y,s),x=u.getText(m);h.indexOf(x)>=0?y.hide():y.show()})}}else if(Ql(t)){var f=o.getValue(),v=(0,d.__read)(f,2),g=v[0],p=v[1];(0,c.each)(n,function(y){var m=je(y,s);m>=g&&m<=p?y.show():y.hide()})}}},r.prototype.clear=function(){var t=we(this.context.view);(0,c.each)(t,function(i){i.show()})},r.prototype.reset=function(){this.clear()},r}(ie),N_=R_,z_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.byRecord=!1,t}return r.prototype.filter=function(){Zi(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},r.prototype.filterByRecord=function(){var t=this.context.view,i=yo(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=$e(t);(0,c.each)(s,function(l){var u=we(l);(0,c.each)(u,function(h){var f=h.getModel().data;nu(o,f,n,a)?h.show():h.hide()})})}},r.prototype.filterByBBox=function(){var t=this,i=this.context.view,n=$e(i);(0,c.each)(n,function(a){var o=Jl(t.context,a,10),s=we(a);o&&(0,c.each)(s,function(l){o.includes(l)?l.show():l.hide()})})},r.prototype.reset=function(){var t=$e(this.context.view);(0,c.each)(t,function(i){var n=we(i);(0,c.each)(n,function(a){a.show()})})},r}(ie),Pc=z_,V_=10,G_=5,W_=function(e){(0,d.__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,c.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,d.__assign)({text:t.text},t.textStyle)}),a=n.getBBox(),o=Co(t.padding),s=i.addShape({type:"rect",name:"button-rect",attrs:(0,d.__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=te.vs(null,[["t",n.x-o.width-V_,n.y+o.height+G_]]);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}(ie),H_=W_,Y_=4,X_=function(e){(0,d.__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}):xo(t,this.startPoint)>Y_&&(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}(ie),j_=X_,U_=5,Z_=function(e){(0,d.__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=xo(t,i);if(n>U_&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var a=this.context.view,o=te.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}(ie),K_=Z_,Dc="x",kc="y",q_=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.dims=[Dc,kc],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(Dc),this.resetDim(kc);var t=this.context.view;t.render(!0)},r}(ie),Bc=q_,$_=function(e){(0,d.__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,c.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,h=this.context.view,f=this.dims;(0,c.each)(f,function(v){t.translateDim(v,{x:l*-1,y:u*-1})}),h.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,h=n[t]*u;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:i.nice,min:s,max:l}),a.scale(i.field,{nice:!1,min:s+h,max:l+h})},r.prototype.reset=function(){e.prototype.reset.call(this),this.startPoint=null,this.starting=!1},r}(Bc),Q_=$_,J_=function(e){(0,d.__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,c.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,h=n*s,f=l-h,v=u+h,g=v-f,p=g/s;v>f&&p<100&&p>.01&&a.scale(i.field,{nice:!1,min:l-h,max:u+h})},r}(Bc),tw=J_;function ew(e){var r=e.gEvent.originalEvent;return r.deltaY>0}var rw=1,iw=function(e){(0,d.__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)||rw,s=n.getController("scrollbar"),l=n.getXScale(),u=n.getOptions().data,h=(0,c.size)((0,c.valuesOfKey)(u,l.field)),f=(0,c.size)(l.values),v=s.getValue(),g=Math.floor((h-f)*v),p=g+(ew(a)?o:-o),y=o/(h-f)/1e4,m=(0,c.clamp)(p/(h-f)+y,0,1);s.setValue(m)}},r}(ie),nw=iw,aw="aixs-description-tooltip",ow=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.show=function(){var t=this.context,i=Rr(t).axis,n=i.cfg.title,a=n.description,o=n.text,s=n.descriptionTooltipStyle,l=t.event,u=l.x,h=l.y;this.tooltip||this.renderTooltip(),this.tooltip.update({title:o||"",customContent:function(){return`
    \u5B57\u6BB5\u8BF4\u660E\uFF1A`).concat(a,`
    `)},x:u,y:h}),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 kn({parent:n.get("el").parentNode,region:a,visible:!1,containerId:aw,domStyles:(0,d.__assign)({},(0,c.deepMix)({},(t={},t[or]={"max-width":"50%",padding:"10px","line-height":"15px","font-size":"12px",color:"rgba(0, 0, 0, .65)"},t[sr]={"word-break":"break-all","margin-bottom":"3px"},t)))});o.init(),o.setCapture(!1),this.tooltip=o},r}(ie),sw=ow;ly("dark",lu(n0)),bt("canvas",Vu),bt("svg",a0),Qe("Polygon",E0),Qe("Interval",x0),Qe("Schema",T0),Qe("Path",Po),Qe("Point",C0),Qe("Line",w0),Qe("Area",u0),Qe("Edge",h0),Qe("Heatmap",v0),Qe("Violin",O0),qi("base",Un),qi("interval",K0),qi("pie",Q0),qi("polar",Ku),Te("overlap",fm),Te("distribute",tm),Te("fixed-overlap",hm),Te("hide-overlap",wm),Te("limit-in-shape",sm),Te("limit-in-canvas",om),Te("limit-in-plot",Nm),Te("pie-outer",rm),Te("adjust-color",Sm),Te("interval-adjust-position",Em),Te("interval-hide-overlap",Tm),Te("point-adjust-position",Om),Te("pie-spider",am),Te("path-adjust-position",km),Re("fade-in",zm),Re("fade-out",Vm),Re("grow-in-x",Wm),Re("grow-in-xy",Ym),Re("grow-in-y",Hm),Re("scale-in-x",Um),Re("scale-in-y",Zm),Re("wave-in",qm),Re("zoom-in",$m),Re("zoom-out",Qm),Re("position-update",jm),Re("sector-path-update",Km),Re("path-in",Xm),si("rect",lx),si("mirror",ox),si("list",rx),si("matrix",nx),si("circle",tx),si("tree",cx),Nr("axis",gx),Nr("legend",_x),Nr("tooltip",yu),Nr("annotation",vx),Nr("slider",bx),Nr("scrollbar",Fx),yt("tooltip",wc),yt("sibling-tooltip",Px),yt("ellipsis-text",kx),yt("element-active",zx),yt("element-single-active",Ux),yt("element-range-active",Yx),yt("element-highlight",Jo),yt("element-highlight-by-x",Qx),yt("element-highlight-by-color",qx),yt("element-single-highlight",e_),yt("element-range-highlight",Cc),yt("element-sibling-highlight",Cc,{effectSiblings:!0,effectByRecord:!0}),yt("element-selected",a_),yt("element-single-selected",s_),yt("element-range-selected",i_),yt("element-link-by-color",Gx),yt("active-region",Lx),yt("list-active",c_),yt("list-selected",d_),yt("list-highlight",ts),yt("list-unchecked",p_),yt("list-checked",m_),yt("list-focus",__),yt("list-radio",b_),yt("legend-item-highlight",ts,{componentNames:["legend"]}),yt("axis-label-highlight",ts,{componentNames:["axis"]}),yt("axis-description",sw),yt("rect-mask",Mc),yt("x-rect-mask",Lc,{dim:"x"}),yt("y-rect-mask",Lc,{dim:"y"}),yt("circle-mask",A_),yt("path-mask",Ic),yt("smooth-path-mask",L_),yt("cursor",O_),yt("data-filter",D_),yt("brush",sa),yt("brush-x",sa,{dims:["x"]}),yt("brush-y",sa,{dims:["y"]}),yt("sibling-filter",is),yt("sibling-x-filter",is),yt("sibling-y-filter",is),yt("element-filter",N_),yt("element-sibling-filter",Pc),yt("element-sibling-filter-record",Pc,{byRecord:!0}),yt("view-drag",j_),yt("view-move",K_),yt("scale-translate",Q_),yt("scale-zoom",tw),yt("reset-button",H_,{name:"reset-button",text:"reset"}),yt("mousewheel-scroll",nw);function Er(e){return e.isInPlot()}Et("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"}]}),Et("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"}]}),Et("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),Et("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),Et("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),Et("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),Et("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),Et("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"]}]}),Et("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"]}]}),Et("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"]}]}),Et("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"]}]}),Et("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"]}]}),Et("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Er,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Er,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Er,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"]}]}),Et("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"]}]}),Et("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Er,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Er,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Er,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),Et("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Er,action:"path-mask:start"},{trigger:"mousedown",isEnable:Er,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"}]}),Et("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),Et("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:["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"]}]}),Et("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),Et("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),Et("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["list-unchecked:toggle","element-filter:filter"]}]}),Et("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),Et("axis-description",{start:[{trigger:"axis-description:mousemove",action:"axis-description:show"}],end:[{trigger:"axis-description:mouseleave",action:"axis-description:hide"}]});function Rc(e){return e.gEvent.preventDefault(),e.gEvent.originalEvent.deltaY>0}Et("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(e){return Rc(e.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(e){return!Rc(e.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),Et("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]}),Et("plot-mousewheel-scroll",{start:[{trigger:"plot:mousewheel",action:"mousewheel-scroll:scroll"}]});function _t(){for(var e=[],r=0;r"},key:(l===0?"top":"bottom")+"-statistic"},Zt(s,["offsetX","offsetY","rotate","style","formatter"])))}})},yw=function(e,r,t){var i=r.statistic,n=i.title,a=i.content;[n,a].forEach(function(o){if(!!o){var s=(0,c.isFunction)(o.style)?o.style(t):o.style;e.annotation().html((0,d.__assign)({position:["50%","100%"],html:function(l,u){var h=u.getCoordinate(),f=u.views[0].getCoordinate(),v=f.getCenter(),g=f.getRadius(),p=Math.max(Math.sin(f.startAngle),Math.sin(f.endAngle))*g,y=v.y+p-h.y.start-parseFloat((0,c.get)(s,"fontSize",0)),m=h.getRadius()*h.innerRadius*2;Uc(l,(0,d.__assign)({width:m+"px",transform:"translate(-50%, "+y+"px)"},jc(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,c.isString)(_)?_:""+_:"
    "}},Zt(o,["offsetX","offsetY","rotate","style","formatter"])))}})},as;function mw(){return as||(as=document.createElement("canvas").getContext("2d")),as}var xL=(0,c.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=mw();l.font=[o,a,s,t+"px",n].join(" ");var u=l.measureText((0,c.isString)(e)?e:"");return u.width},function(e,r){return r===void 0&&(r={}),(0,d.__spreadArrays)([e],(0,c.values)(r)).join("")});function Hr(e){return typeof e=="number"&&!isNaN(e)}function xw(e,r,t){var i=Math.min(r,t),n=Math.max(r,t);return e>=i&&e<=n}function os(e,r){if(!e)return{};var t=e.filter(function(a){var o=(0,c.get)(a,[r]);return(0,c.isNumber)(o)&&!isNaN(o)}),i=t.every(function(a){return(0,c.get)(a,[r])>=0}),n=t.every(function(a){return(0,c.get)(a,[r])<=0});return i?{min:0}:n?{max:0}:{}}function Zc(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],h=l[t],f=l[i],v=Zt(l,n);o[u]||(o[u]=(0,d.__assign)({id:++s,name:u},v)),o[h]||(o[h]=(0,d.__assign)({id:++s,name:h},v)),a.push((0,d.__assign)({source:o[u].id,target:o[h].id,value:f},v))}),{nodes:Object.values(o).sort(function(l,u){return l.id-u.id}),links:a}}function gi(e,r){var t=(0,c.filter)(e,function(i){var n=i[r];return n===null||typeof n=="number"&&!isNaN(n)});return cr(Ze.WARN,t.length===e.length,"illegal data existed in chart data."),t}function Mr(e){if((0,c.isNumber)(e))return[e,e,e,e];if((0,c.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 ca(e,r,t){r===void 0&&(r="bottom"),t===void 0&&(t=25);var i=Mr(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 ss(e){var r=e.map(function(i){return Mr(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}var Kc={locale:"en-US"};function _L(e){each(e,function(r,t){return Kc[t]=r})}var ha={};function qc(e,r){ha[e]=r}function fa(e){return{get:function(r,t){return Nc((0,c.get)(ha[e],r)||(0,c.get)(ha[Kc.locale],r)||(0,c.get)(ha["en-US"],r)||r,t)}}}var _w={locale:"en-US",general:{increase:"Increase",decrease:"Decrease",root:"Root"},statistic:{total:"Total"},conversionTag:{label:"Rate"},legend:{},tooltip:{},slider:{},scrollbar:{},waterfall:{total:"Total"}},ww={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"}},bw=F(18587),$c="data-chart-source-type",Qc=["padding","appendPadding","renderer","pixelRatio","syncViewPadding","supportCSSTransform","limitInPlot"],Mt=function(e){(0,d.__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 My((0,d.__assign)((0,d.__assign)((0,d.__assign)((0,d.__assign)({container:this.container,autoFit:!1},this.getChartSize(i,n)),{localRefresh:!1}),Zt(this.options,Qc)),{defaultInteractions:a})),this.container.setAttribute($c,"G2Plot")},r.prototype.getChartSize=function(t,i){var n=ns(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=nn(this.chart);(0,c.each)(a,function(o){i(o.getData())&&o.setState(t,n)})},r.prototype.getStates=function(){var t=nn(this.chart),i=[];return(0,c.each)(t,function(n){var a=n.getData(),o=n.getStates();(0,c.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,d.__spreadArrays)(t),a=i.getController("annotation"),o=a.getComponents().map(function(u){return u.extra});a.clear(!0);for(var s=function(u){var h=o[u],f=n.findIndex(function(v){return v.id&&v.id===h.id});f!==-1&&(h=O({},h,n[f]),n.splice(f,1)),a.annotation(h)},l=0;lw){var S=b/y.length,C=Math.max(1,Math.ceil(w/S)-1),M=y.slice(0,C)+"...";_.attr("text",M)}}}}function Kw(e,r,t){Uw(e,r,t),Zw(e,r,t)}function qw(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,c.isObject)(s)?s:Ki(s),{columnWidthRatio:1/3})),a.annotation().shape({render:function(l,u){var h=l.addGroup({id:a.id+"-conversion-tag-group",name:"conversion-tag-group"}),f=(0,c.find)(a.geometries,function(p){return p.type==="interval"}),v={view:u,geometry:f,group:h,field:e,horizontal:r,options:jw(o,r)},g=f.elements;(0,c.each)(g,function(p,y){y>0&&Kw(v,g[y-1],p)})}})),i}}var jr={hover:"__interval-connected-area-hover__",click:"__interval-connected-area-click__"},vs=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}]}]};Et(jr.hover,{start:vs(jr.hover),end:[{trigger:"interval:mouseleave",action:["element-highlight-by-color:reset","element-link-by-color:unlink"]}]}),Et(jr.click,{start:vs(jr.click),end:[{trigger:"document:mousedown",action:["element-highlight-by-color:clear","element-link-by-color:clear"]}]});function $w(e){return e===void 0&&(e=!1),function(r){var t=r.chart,i=r.options,n=i.connectedArea,a=function(){t.removeInteraction(jr.hover),t.removeInteraction(jr.click)};if(!e&&n){var o=n.trigger||"hover";a(),t.interaction(jr[o],{start:vs(o,n.style)})}else a();return r}}var Qw=10,Jw=5,tb={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"}}},eb=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.buttonGroup=null,t.buttonCfg=(0,d.__assign)({name:"button"},tb),t}return r.prototype.getButtonCfg=function(){var t=this.context.view,i=(0,c.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,d.__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=Mr(a.padding),s=t.addShape({type:"rect",name:"button-rect",attrs:(0,d.__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=Le.transform(null,[["t",n.x-o.width-Qw,n.y+o.height+Jw]]);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}(ie);yt("brush-reset-button",eb,{name:"brush-reset-button"}),Et("filter-action",{});function hr(e){return e.isInPlot()}function Ur(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||hr,action:["brush:start",o+"-mask:start",o+"-mask:show"],arg:[null,{maskStyle:n==null?void 0:n.style}]}],processing:[{trigger:"mousemove",isEnable:hr,action:[o+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:hr,action:["brush:filter","brush:end",o+"-mask:end",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:[o+"-mask:start",o+"-mask:show"],arg:[{maskStyle:n==null?void 0:n.style}]},{trigger:"mask:dragstart",action:[o+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[o+"-mask:resize"]},{trigger:"mask:drag",action:[o+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[o+"-mask:end"]},{trigger:"mask:dragend",action:[o+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(s){return!s.isInPlot()},action:["element-range-highlight:clear",o+"-mask:end",o+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",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||hr,action:["brush-x:start",o+"-mask:start",o+"-mask:show"],arg:[null,{maskStyle:n==null?void 0:n.style}]}],processing:[{trigger:"mousemove",isEnable:hr,action:[o+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:hr,action:["brush-x:filter","brush-x:end",o+"-mask:end",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:[o+"-mask:start",o+"-mask:show"],arg:[{maskStyle:n==null?void 0:n.style}]},{trigger:"mask:dragstart",action:[o+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[o+"-mask:resize"]},{trigger:"mask:drag",action:[o+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[o+"-mask:end"]},{trigger:"mask:dragend",action:[o+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(s){return!s.isInPlot()},action:["element-range-highlight:clear",o+"-mask:end",o+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",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||hr,action:["brush-y:start",o+"-mask:start",o+"-mask:show"],arg:[null,{maskStyle:n==null?void 0:n.style}]}],processing:[{trigger:"mousemove",isEnable:hr,action:[o+"-mask:resize"]}],end:[{trigger:"mouseup",isEnable:hr,action:["brush-y:filter","brush-y:end",o+"-mask:end",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:[o+"-mask:start",o+"-mask:show"],arg:[{maskStyle:n==null?void 0:n.style}]},{trigger:"mask:dragstart",action:[o+"-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:[o+"-mask:resize"]},{trigger:"mask:drag",action:[o+"-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:[o+"-mask:end"]},{trigger:"mask:dragend",action:[o+"-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(s){return!s.isInPlot()},action:["element-range-highlight:clear",o+"-mask:end",o+"-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear",o+"-mask:hide"]}]};default:return{}}}Et("brush",Ur("brush")),Et("brush-highlight",Ur("brush-highlight")),Et("brush-x",Ur("brush-x","x-rect")),Et("brush-y",Ur("brush-y","y-rect")),Et("brush-x-highlight",Ur("brush-x-highlight","x-rect")),Et("brush-y-highlight",Ur("brush-y-highlight","y-rect"));var hh=["brush","brush-x","brush-y","brush-highlight","brush-x-highlight","brush-y-highlight"];function fh(e){var r=e.options,t=r.brush,i=(0,c.filter)(r.interactions||[],function(n){return hh.indexOf(n.type)===-1});return(t==null?void 0:t.enabled)&&(hh.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=Ur(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}})}function rb(e){var r=e.options,t=r.legend,i=r.seriesField,n=r.isStack;return i?t!==!1&&(t=(0,d.__assign)({position:n?"right-top":"top-left"},t)):t=!1,e.options.legend=t,e}function ib(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,h=t.xField,f=t.yField,v=t.seriesField,g=t.groupField,p=t.tooltip,y=t.shape,m=s&&l&&u?Gw(i,f,[h,g],f):sn(i,f,h,f,s),x=[];u&&v&&!l?m.forEach(function(b){var S=x.find(function(C){return C[h]===b[h]&&C[v]===b[v]});S?S[f]+=b[f]||0:x.push((0,d.__assign)({},b))}):x=m,r.data(x);var _=s?(0,d.__assign)({formatter:function(b){return{name:l&&u?b[v]+" - "+b[g]:b[v]||b[h],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 Ce(w),w}function ds(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,h=u?{max:1,min:0,minLimit:0,maxLimit:1}:{};return _t(oe((r={},r[o]=n,r[s]=a,r),(t={},t[o]={type:"cat"},t[s]=(0,d.__assign)((0,d.__assign)({},os(l,s)),h),t)))(e)}function nb(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 ab(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 ob(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=t.isRange,o=Se(r,"interval");if(!i)o.label(!1);else{var s=i.callback,l=(0,d.__rest)(i,["callback"]);o.label({fields:[n],callback:s,cfg:(0,d.__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"}}]},ye(a?(0,d.__assign)({content:function(u){var h;return(h=u[n])===null||h===void 0?void 0:h.join("-")}},l):l))})}return e}function sb(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,h=t.seriesField;if(i===!1)r.tooltip(!1);else{var f=i;if(n&&a){var v=(f==null?void 0:f.formatter)||function(g){return{name:g[h]+" - "+g[o],value:g[u]}};f=(0,d.__assign)((0,d.__assign)({},f),{customItems:function(g){var p=[];return(0,c.each)(g,function(y){var m=(0,c.filter)(s,function(x){return(0,c.isMatch)(x,Zt(y.data,[l,h]))});m.forEach(function(x){p.push((0,d.__assign)((0,d.__assign)((0,d.__assign)({},y),{value:x[u],data:x,mappingData:{_origin:x}}),v(x)))})}),p}})}r.tooltip(f)}return e}function xa(e,r){r===void 0&&(r=!1);var t=e.options,i=t.seriesField;return _t(rb,Wt,Ne("columnStyle"),Tr,eh("rect"),ib,ds,nb,ab,sb,on,hs,ob,fh,ee,Kt,ae(),qw(t.yField,!r,!!i),$w(!t.isStack),Xr)(e)}var lb=O({},Mt.getDefaultOptions(),{columnWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),vh=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="column",t}return r.getDefaultOptions=function(){return lb},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;ds({chart:l,options:u}),this.chart.changeData(sn(t,n,a,n,o))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return xa},r}(Mt);function ub(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,d.__assign)({position:o[(a==null?void 0:a.position)||"left"]},a):!1,l=n!==!1?(0,d.__assign)({position:o[(n==null?void 0:n.position)||"bottom"]},n):!1;return(0,d.__assign)((0,d.__assign)({},e),{options:(0,d.__assign)((0,d.__assign)({},r),{xField:i,yField:t,xAxis:s,yAxis:l})})}function cb(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 hb(e){var r=e.options,t=r.seriesField,i=r.isStack,n=r.legend;return t?n!==!1&&(n=(0,d.__assign)({position:i?"top-left":"right-top"},n||{})):n=!1,O({},e,{options:{legend:n}})}function fb(e){var r=e.options,t=[{type:"transpose"},{type:"reflectY"}].concat(r.coordinate||[]);return O({},e,{options:{coordinate:t}})}function vb(e){var r=e.chart,t=e.options,i=t.barStyle,n=t.barWidthRatio,a=t.minBarWidth,o=t.maxBarWidth,s=t.barBackground;return xa({chart:r,options:(0,d.__assign)((0,d.__assign)({},t),{columnStyle:i,columnWidthRatio:n,minColumnWidth:a,maxColumnWidth:o,columnBackground:s})},!0)}function dh(e){return _t(ub,cb,hb,he,fb,vb)(e)}var db=O({},Mt.getDefaultOptions(),{barWidthRatio:.6,marginRatio:1/32,tooltip:{shared:!0,showMarkers:!1,offset:20},legend:{radio:{}},interactions:[{type:"active-region"}]}),gb=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bar",t}return r.getDefaultOptions=function(){return db},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,h=s.yField,f=s.xAxis,v=s.yAxis;i=[h,u],u=i[0],h=i[1],n=[v,f],f=n[0],v=n[1];var g=(0,d.__assign)((0,d.__assign)({},s),{xField:u,yField:h,yAxis:v,xAxis:f});ds({chart:o,options:g}),o.changeData(sn(t,u,h,u,l))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return dh},r}(Mt),gh=O({},Mt.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}}}}});function pb(e,r){var t=null;return(0,c.each)(e,function(i){typeof i[r]=="number"&&(t+=i[r])}),t}function yb(e,r){var t;switch(e){case"inner":return t="-30%",(0,c.isString)(r)&&r.endsWith("%")?parseFloat(r)*.01>0?t:r:r<0?r:t;case"outer":return t=12,(0,c.isString)(r)&&r.endsWith("%")?parseFloat(r)*.01<0?t:r:r>0?r:t;default:return r}}function _a(e,r){return(0,c.every)(gi(e,r),function(t){return t[r]===0})}var mb=[1,0,0,0,1,0,0,0,1];function gs(e,r){var t=r?(0,d.__spreadArrays)(r):(0,d.__spreadArrays)(mb);return Le.transform(t,e)}var xb=function(e){(0,d.__extends)(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.getActiveElements=function(){var t=Le.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,c.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=Le.getAngle(a.getModel(),l),h=u.startAngle,f=u.endAngle,v=(h+f)/2,g=t,p=g*Math.cos(v),y=g*Math.sin(v);a.shape.setMatrix(gs([["t",p,y]])),s.setMatrix(gs([["t",p,y]]))}})},r.prototype.active=function(){this.transfrom()},r.prototype.reset=function(){this.transfrom(0)},r}(ie);function _b(e){var r=e.event,t,i=r.target;return i&&(t=i.get("element")),t}var wb=function(e){(0,d.__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,c.get)(a,["data","data"]);if(a.type.match("legend-item")){var s=Le.getDelegationObject(this.context),l=n.getGroupedFields()[0];if(s&&l){var u=s.item;o=n.getData().find(function(g){return g[l]===u.value})}}if(o){var h=(0,c.get)(t,"annotations",[]),f=(0,c.get)(t,"statistic",{});n.getController("annotation").clear(!0),(0,c.each)(h,function(g){typeof g=="object"&&n.annotation()[g.type](g)}),ua(n,{statistic:f,plotType:"pie"},o),n.render(!0)}var v=_b(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,c.each)(n,function(a){t.annotation()[a.type](a)}),t.render(!0)},r}(ie),ph="pie-statistic";yt(ph,wb),Et("pie-statistic-active",{start:[{trigger:"element:mouseenter",action:"pie-statistic:change"}],end:[{trigger:"element:mouseleave",action:"pie-statistic:reset"}]}),yt("pie-legend",xb),Et("pie-legend-active",{start:[{trigger:"legend-item:mouseenter",action:"pie-legend:active"}],end:[{trigger:"legend-item:mouseleave",action:"pie-legend:reset"}]});function bb(e){var r=e.chart,t=e.options,i=t.data,n=t.angleField,a=t.colorField,o=t.color,s=t.pieStyle,l=gi(i,n);if(_a(l,n)){var u="$$percentage$$";l=l.map(function(f){var v;return(0,d.__assign)((0,d.__assign)({},f),(v={},v[u]=1/l.length,v))}),r.data(l);var h=O({},e,{options:{xField:"1",yField:u,seriesField:a,isStack:!0,interval:{color:o,style:s},args:{zIndexReversed:!0,sortZIndex:!0}}});Ce(h)}else{r.data(l);var h=O({},e,{options:{xField:"1",yField:n,seriesField:a,isStack:!0,interval:{color:o,style:s},args:{zIndexReversed:!0,sortZIndex:!0}}});Ce(h)}return e}function Sb(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 Cb(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 Ab(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,d.__rest)(i,["callback"]),u=ye(l);if(u.content){var h=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,c.isFunction)(h)?h((0,d.__assign)((0,d.__assign)({},p),{percent:b}),y,m):(0,c.isString)(h)?Nc(h,{value:_,name:x,percentage:(0,c.isNumber)(b)&&!(0,c.isNil)(_)?(b*100).toFixed(2)+"%":null}):h}}var f={inner:"",outer:"pie-outer",spider:"pie-spider"},v=u.type?f[u.type]:"pie-outer",g=u.layout?(0,c.isArray)(u.layout)?u.layout:[u.layout]:[];u.layout=(v?[{type:v}]:[]).concat(g),o.label({fields:n?[a,n]:[a],callback:s,cfg:(0,d.__assign)((0,d.__assign)({},u),{offset:yb(u.type,u.offset),type:"pie"})})}return e}function yh(e){var r=e.innerRadius,t=e.statistic,i=e.angleField,n=e.colorField,a=e.meta,o=e.locale,s=fa(o);if(r&&t){var l=O({},gh.statistic,t),u=l.title,h=l.content;return u!==!1&&(u=O({},{formatter:function(f){var v=f?f[n]:(0,c.isNil)(u.content)?s.get(["statistic","total"]):u.content,g=(0,c.get)(a,[n,"formatter"])||function(p){return p};return g(v)}},u)),h!==!1&&(h=O({},{formatter:function(f,v){var g=f?f[i]:pb(v,i),p=(0,c.get)(a,[i,"formatter"])||function(y){return y};return f||(0,c.isNil)(h.content)?p(g):h.content}},h)),O({},{statistic:{title:u,content:h}},e)}return e}function mh(e){var r=e.chart,t=e.options,i=yh(t),n=i.innerRadius,a=i.statistic;return r.getController("annotation").clear(!0),_t(ae())(e),n&&a&&ua(r,{statistic:a,plotType:"pie"}),e}function Fb(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})),_a(o,a)){var s=(0,c.get)(i,"fields"),l=(0,c.get)(i,"formatter");(0,c.isEmpty)((0,c.get)(i,"fields"))&&(s=[n,a],l=l||function(u){return{name:u[n],value:(0,c.toString)(u[a])}}),r.geometries[0].tooltip(s.join("*"),pi(s,l))}return e}function Eb(e){var r=e.chart,t=e.options,i=yh(t),n=i.interactions,a=i.statistic,o=i.annotations;return(0,c.each)(n,function(s){var l,u;if(s.enable===!1)r.removeInteraction(s.type);else if(s.type==="pie-statistic-active"){var h=[];((l=s.cfg)===null||l===void 0?void 0:l.start)||(h=[{trigger:"element:mouseenter",action:ph+":change",arg:{statistic:a,annotations:o}}]),(0,c.each)((u=s.cfg)===null||u===void 0?void 0:u.start,function(f){h.push((0,d.__assign)((0,d.__assign)({},f),{arg:{statistic:a,annotations:o}}))}),r.interaction(s.type,O({},s.cfg,{start:h}))}else r.interaction(s.type,s.cfg||{})}),e}function xh(e){return _t(Ne("pieStyle"),bb,Sb,Wt,Cb,Yr,Fb,Ab,Tr,mh,Eb,Kt)(e)}var _h=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="pie",t}return r.getDefaultOptions=function(){return gh},r.prototype.changeData=function(t){this.chart.emit(A.BEFORE_CHANGE_DATA,ne.fromData(this.chart,A.BEFORE_CHANGE_DATA,null));var i=this.options,n=this.options.angleField,a=gi(i.data,n),o=gi(t,n);_a(a,n)||_a(o,n)?this.update({data:t}):(this.updateOption({data:t}),this.chart.data(o),mh({chart:this.chart,options:this.options}),this.chart.render(!0)),this.chart.emit(A.AFTER_CHANGE_DATA,ne.fromData(this.chart,A.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return xh},r}(Mt);function Mb(e){var r=e.chart,t=e.options,i=t.data,n=t.sectorStyle,a=t.color;return r.data(i),_t(Ce)(O({},e,{options:{marginRatio:1,interval:{style:n,color:a}}})),e}function Tb(e){var r=e.chart,t=e.options,i=t.label,n=t.xField,a=Se(r,"interval");if(i===!1)a.label(!1);else if((0,c.isObject)(i)){var o=i.callback,s=i.fields,l=(0,d.__rest)(i,["callback","fields"]),u=l.offset,h=l.layout;(u===void 0||u>=0)&&(h=h?(0,c.isArray)(h)?h:[h]:[],l.layout=(0,c.filter)(h,function(f){return f.type!=="limit-in-shape"}),l.layout.length||delete l.layout),a.label({fields:s||[n],callback:o,cfg:ye(l)})}else cr(Ze.WARN,i===null,"the label option must be an Object."),a.label({fields:[n]});return e}function Lb(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 Ib(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 Ob(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return _t(oe((r={},r[a]=i,r[o]=n,r)))(e)}function Pb(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 Db(e){_t(Ne("sectorStyle"),Mb,Ob,Tb,Ib,Pb,Lb,he,ee,Kt,Wt,ae(),Tr)(e)}var kb=O({},Mt.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"}]}),wL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="rose",t}return r.getDefaultOptions=function(){return kb},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 Db},r}(Mt),Bb={font:function(){return"serif"},padding:1,size:[500,500],spiral:"archimedean",timeInterval:3e3};function Rb(e,r){return r=(0,c.assign)({},Bb,r),Nb(e,r)}function Nb(e,r){var t=$b();["font","fontSize","fontWeight","padding","rotate","size","spiral","timeInterval","random"].forEach(function(l){(0,c.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 ps=Math.PI/180,ln=1<<11>>5,wa=1<<11;function zb(e){return e.text}function Vb(){return"serif"}function wh(){return"normal"}function Gb(e){return e.value}function Wb(){return~~(Math.random()*2)*90}function Hb(){return 1}function Yb(e,r,t,i){if(!r.sprite){var n=e.context,a=e.ratio;n.clearRect(0,0,(ln<<5)/a,wa/a);var o=0,s=0,l=0,u=t.length;for(--i;++i>5<<5,f=~~Math.max(Math.abs(y+m),Math.abs(y-m))}else h=h+31>>5<<5;if(f>l&&(l=f),o+h>=ln<<5&&(o=0,s+=l,l=0),s+f>=wa)break;n.translate((o+(h>>1))/a,(s+(f>>1))/a),r.rotate&&n.rotate(r.rotate*ps),n.fillText(r.text,0,0),r.padding&&(n.lineWidth=2*r.padding,n.strokeText(r.text,0,0)),n.restore(),r.width=h,r.height=f,r.xoff=o,r.yoff=s,r.x1=h>>1,r.y1=f>>1,r.x0=-r.x1,r.y0=-r.y1,r.hasText=!0,o+=h}for(var _=n.getImageData(0,0,(ln<<5)/a,wa/a).data,w=[];--i>=0;)if(r=t[i],!!r.hasText){for(var h=r.width,b=h>>5,f=r.y1-r.y0,S=0;S>5),I=_[(s+L)*(ln<<5)+(o+S)<<2]?1<<31-S%32:0;w[B]|=I,C|=I}C?M=L:(r.y0++,f--,L--,s++)}r.y1=r.y0+M,r.sprite=w.slice(0,(r.y1-r.y0)*b)}}}function Xb(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),h,f=0;f>>o:0))&r[u+v])return!0;u+=t}return!1}function jb(e,r){var t=e[0],i=e[1];r.x+r.x0i.x&&(i.x=r.x+r.x1),r.y+r.y1>i.y&&(i.y=r.y+r.y1)}function Ub(e,r){return e.x+e.x1>r[0].x&&e.x+e.x0r[0].y&&e.y+e.y0>5)*e[1]),b=l.length,S=[],C=l.map(function(I,G,q){return I.text=h.call(this,I,G,q),I.font=r.call(this,I,G,q),I.style=f.call(this,I,G,q),I.weight=i.call(this,I,G,q),I.rotate=n.call(this,I,G,q),I.size=~~t.call(this,I,G,q),I.padding=a.call(this,I,G,q),I}).sort(function(I,G){return G.size-I.size}),M=-1,L=g.board?[{x:0,y:0},{x:m,y:x}]:null;B();function B(){for(var I=Date.now();Date.now()-I>1,G.y=x*(s()+.5)>>1,Yb(_,G,C,M),G.hasText&&y(w,G,L)&&(S.push(G),L?g.hasImage||jb(L,G):L=[{x:G.x+G.x0,y:G.y+G.y0},{x:G.x+G.x1,y:G.y+G.y1}],G.x-=e[0]>>1,G.y-=e[1]>>1)}g._tags=S,g._bounds=L}return g};function p(m){m.width=m.height=1;var x=Math.sqrt(m.getContext("2d").getImageData(0,0,1,1).data.length>>2);m.width=(ln<<5)/x,m.height=wa/x;var _=m.getContext("2d");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),M=s()<.5?1:-1,L,B=-M,I,G;(L=C(B+=M))&&(I=~~L[0],G=~~L[1],!(Math.min(Math.abs(I),Math.abs(G))>=S));)if(x.x=w+I,x.y=b+G,!(x.x+x.x0<0||x.y+x.y0<0||x.x+x.x1>e[0]||x.y+x.y1>e[1])&&(!_||!Xb(x,m,e[0]))&&(!_||Ub(x,_))){for(var q=x.sprite,ft=x.width>>5,mt=e[0]>>5,zt=x.x-(ft<<4),H=zt&127,tt=32-H,ct=x.y1-x.y0,nt=void 0,lt=(x.y+x.y0)*mt+(zt>>5),xt=0;xt>>H:0);lt+=mt}return delete x.sprite,!0}return!1}return g.createMask=function(m){var x=document.createElement("canvas"),_=e[0],w=e[1];if(!(!_||!w)){var b=_>>5,S=Sh((_>>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 M=C.getImageData(0,0,_,w).data,L=0;L>5),G=L*_+B<<2,q=M[G]>=250&&M[G+1]>=250&&M[G+2]>=250,ft=q?1<<31-B%32:0;S[I]|=ft}g.board=S,g.hasImage=!0}},g.timeInterval=function(m){u=m==null?Infinity:m},g.words=function(m){l=m},g.size=function(m){e=[+m[0],+m[1]]},g.font=function(m){r=tr(m)},g.fontWeight=function(m){i=tr(m)},g.rotate=function(m){n=tr(m)},g.spiral=function(m){o=qb[m]||m},g.fontSize=function(m){t=tr(m)},g.padding=function(m){a=tr(m)},g.random=function(m){s=tr(m)},g}function Ch(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,h=r.imageMask,f=r.wordField,v=r.weightField,g=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,M=p.padding,L=p.fontSize,B=rS(u,v),I=[aS(B),oS(B)],G=u.map(function(mt){return{text:mt[f],value:mt[v],color:mt[g],datum:mt}}),q={imageMask:h,font:S,fontSize:eS(L,I),fontWeight:C,size:Qb({width:n,height:a,padding:o,appendPadding:s,autoFit:w,container:l}),padding:M,timeInterval:y,random:m,spiral:x,rotate:iS(r)};if((0,c.isFunction)(b)){var ft=G.map(function(mt,zt,H){return(0,d.__assign)((0,d.__assign)((0,d.__assign)({},mt),{hasText:!!mt.text,font:tr(q.font)(mt,zt,H),weight:tr(q.fontWeight)(mt,zt,H),rotate:tr(q.rotate)(mt,zt,H),size:tr(q.fontSize)(mt,zt,H),style:"normal"}),b.call(t,mt,zt,H))});return ft.push({text:"",value:0,x:0,y:0,opacity:0}),ft.push({text:"",value:0,x:q.size[0],y:q.size[1],opacity:0}),ft}return Rb(G,q)}function Qb(e){var r=e.width,t=e.height,i=e.container,n=e.autoFit,a=e.padding,o=e.appendPadding;if(n){var s=ns(i);r=s.width,t=s.height}r=r||400,t=t||400;var l=Jb({padding:a,appendPadding:o}),u=l[0],h=l[1],f=l[2],v=l[3],g=[r-(v+h),t-(u+f)];return g}function Jb(e){var r=Mr(e.padding),t=Mr(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 tS(e){return new Promise(function(r,t){if(e instanceof HTMLImageElement){r(e);return}if((0,c.isString)(e)){var i=new Image;i.crossOrigin="anonymous",i.src=e,i.onload=function(){r(i)},i.onerror=function(){cr(Ze.ERROR,!1,"image %s load failed !!!",e),t()};return}cr(Ze.WARN,e===void 0,"The type of imageMask option must be String or HTMLImageElement."),t()})}function eS(e,r){if((0,c.isFunction)(e))return e;if((0,c.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 rS(e,r){return e.map(function(t){return t[r]}).filter(function(t){return typeof t=="number"&&!isNaN(t)})}function iS(e){var r=nS(e),t=r.rotation,i=r.rotationSteps;if(!(0,c.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 nS(e){var r=e.wordStyle.rotationSteps;return r<1&&(cr(Ze.WARN,!1,"The rotationSteps option must be greater than or equal to 1."),r=1),{rotation:e.wordStyle.rotation,rotationSteps:r}}function aS(e){return Math.min.apply(Math,e)}function oS(e){return Math.max.apply(Math,e)}var ys="color",sS=O({},Mt.getDefaultOptions(),{timeInterval:2e3,legend:!1,tooltip:{showTitle:!1,showMarkers:!1,showCrosshairs:!1,fields:["text","value",ys],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}});function lS(e){var r=e.chart,t=e.options,i=t.colorField,n=t.color,a=Ch(e);r.data(a);var o=O({},e,{options:{xField:"x",yField:"y",seriesField:i&&ys,rawFields:(0,c.isFunction)(n)&&(0,d.__spreadArrays)((0,c.get)(t,"rawFields",[]),["datum"]),point:{color:n,shape:"word-cloud"}}}),s=ze(o).ext;return s.geometry.label(!1),r.coordinate().reflect("y"),r.axis(!1),e}function uS(e){return _t(oe({x:{nice:!1},y:{nice:!1}}))(e)}function cS(e){var r=e.chart,t=e.options,i=t.legend,n=t.colorField;return i===!1?r.legend(!1):n&&r.legend(ys,i),e}function hS(e){_t(lS,uS,he,cS,ee,Kt,Wt,Tr)(e)}jt("point","word-cloud",{draw:function(e,r){var t=e.x,i=e.y,n=r.addShape("text",{attrs:(0,d.__assign)((0,d.__assign)({},fS(e)),{x:t,y:i})}),a=e.data.rotate;return typeof a=="number"&&Le.rotate(n,a*Math.PI/180),n}});function fS(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 bL=function(e){(0,d.__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 sS},r.prototype.changeData=function(t){this.updateOption({data:t}),this.options.imageMask?this.render():this.chart.changeData(Ch({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,d.__assign)((0,d.__assign)({},t.options),{imageMask:o||null}),e.prototype.render.call(t),i()};tS(n).then(a).catch(a)})},r.prototype.getSchemaAdaptor=function(){return hS},r.prototype.triggerResize=function(){var t=this;this.chart.destroyed||(this.execAdaptor(),window.setTimeout(function(){e.prototype.triggerResize.call(t)}))},r}(Mt),Zr=F(56645),vS={exp:Zr.regressionExp,linear:Zr.regressionLinear,loess:Zr.regressionLoess,log:Zr.regressionLog,poly:Zr.regressionPoly,pow:Zr.regressionPow,quad:Zr.regressionQuad};function dS(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 gS=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 fw(l,!1)},pS=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;if(l)u=(0,c.isArray)(l)?l:l(n);else{var h=vS[s]().x(function(f){return f[t]}).y(function(f){return f[i]});u=h(n)}return gS(u,e)},yS=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,h=l>0;function f(v,g){var p=(0,c.get)(i,[v]);function y(x){return(0,c.get)(p,x)}var m={};return g==="x"?((0,c.isNumber)(s)&&((0,c.isNumber)(y("min"))||(m.min=u?0:s*2),(0,c.isNumber)(y("max"))||(m.max=u?s*2:0)),m):((0,c.isNumber)(l)&&((0,c.isNumber)(y("min"))||(m.min=h?0:l*2),(0,c.isNumber)(y("max"))||(m.max=h?l*2:0)),m)}return(0,d.__assign)((0,d.__assign)({},i),(r={},r[n]=(0,d.__assign)((0,d.__assign)({},i[n]),f(n,"x")),r[a]=(0,d.__assign)((0,d.__assign)({},i[a]),f(a,"y")),r))};function Ah(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;u0){var s=this.view.geometries[0],l=s.dataArray,u=o[0].name,h=[];return l.forEach(function(f){f.forEach(function(v){var g=Le.getTooltipItems(v,s),p=g[0];if(!n&&p&&p.name===u){var y=(0,c.isNil)(a)?u:a;h.push((0,d.__assign)((0,d.__assign)({},p),{name:p.title,title:y}))}else if(n&&p){var y=(0,c.isNil)(a)?p.name||u:a;h.push((0,d.__assign)((0,d.__assign)({},p),{name:p.title,title:y}))}})}),h}return[]},r}(yu);Nr("radar-tooltip",PS);var DS=function(e){(0,d.__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}(ie);yt("radar-tooltip",DS),Et("radar-tooltip",{start:[{trigger:"plot:mousemove",action:"radar-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"radar-tooltip:hide"}]});var SL=function(e){(0,d.__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 OS},r}(Mt),mi;(function(e){e.Left="Left",e.Right="Right"})(mi||(mi={}));var Kr;(function(e){e.Line="line",e.Column="column"})(Kr||(Kr={}));var Ve="left-axes-view",Ge="right-axes-view",Eh={nice:!0,label:{autoHide:!0,autoRotate:!1}},kS=(0,d.__assign)((0,d.__assign)({},Eh),{position:"left"}),BS=(0,d.__assign)((0,d.__assign)({},Eh),{position:"right",grid:null});function ms(e){return(0,c.get)(e,"geometry")===Kr.Line}function xs(e){return(0,c.get)(e,"geometry")===Kr.Column}function Mh(e,r,t){return xs(t)?O({},{geometry:Kr.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,d.__assign)({geometry:Kr.Line},t)}function Th(e,r){var t=e[0],i=e[1];if((0,c.isArray)(r)){var n=r[0],a=r[1];return[n,a]}var o=(0,c.get)(r,t),s=(0,c.get)(r,i);return[o,s]}function Lh(e,r){return r===mi.Left?e===!1?!1:O({},kS,e):r===mi.Right?e===!1?!1:O({},BS,e):e}function Ih(e){var r=e.view,t=e.geometryOption,i=e.yField,n=e.legend,a=(0,c.get)(n,"marker"),o=Se(r,ms(t)?"line":"interval");if(!t.seriesField){var s=(0,c.get)(r,"options.scales."+i+".alias")||i,l=o.getAttribute("color"),u=r.getTheme().defaultColor;l&&(u=Le.getMappingValue(l,s,(0,c.get)(l,["values",0],u)));var h=((0,c.isFunction)(a)?a:!(0,c.isEmpty)(a)&&O({},{style:{stroke:u,fill:u}},a))||(ms(t)?{symbol:function(v,g,p){return[["M",v-p,g],["L",v+p,g]]},style:{lineWidth:2,r:6,stroke:u}}:{symbol:"square",style:{fill:u}});return[{value:i,name:s,marker:h,isGeometry:!0,viewId:r.id}]}var f=o.getGroupAttributes();return(0,c.reduce)(f,function(v,g){var p=Le.getLegendItems(r,o,g,r.getTheme(),a);return v.concat(p)},[])}function RS(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(ms(i)){yi(O({},e,{options:(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Zt(r,u)),i),{line:{color:i.color,style:i.lineStyle}})})),ze(O({},e,{options:(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Zt(r,u)),i),{point:i.point&&(0,d.__assign)({color:a,shape:"circle"},i.point)})}));var h=[];l&&h.push({type:"dodge",dodgeBy:s||o,customOffset:0}),n&&h.push({type:"stack"}),h.length&&(0,c.each)(t.geometries,function(f){f.adjust(h)})}return xs(i)&&xa(O({},e,{options:(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Zt(r,u)),i),{widthRatio:i.columnWidthRatio,interval:(0,d.__assign)((0,d.__assign)({},Zt(i,["color"])),{style:i.columnStyle})})})),e}var Oh=function(e,r){var t=r[0],i=r[1],n=e.getOptions().data,a=e.getXScale(),o=(0,c.size)(n);if(!(!a||!o)){var s=!0,l=(0,c.valuesOfKey)(n,a.field),u=s?l:l.reverse(),h=(0,c.size)(u),f=Math.floor(t*(h-1)),v=Math.floor(i*(h-1));e.filter(a.field,function(g){var p=u.indexOf(g);return p>-1?xw(p,f,v):!0}),e.getRootView().render(!0)}};function NS(e){var r,t=e.options,i=t.geometryOptions,n=i===void 0?[]:i,a=t.xField,o=t.yField,s=(0,c.every)(n,function(l){var u=l.geometry;return u===Kr.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:Th(o,t.yAxis),geometryOptions:[Mh(a,o[0],n[0]),Mh(a,o[1],n[1])],annotations:Th(o,t.annotations)}})}function zS(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:Ve},{type:(t=a[1])===null||t===void 0?void 0:t.geometry,id:Ge}];return s.sort(function(l,u){return-o[l.type]+o[u.type]}).forEach(function(l){return i.createView({id:l.id})}),e}function VS(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,d.__assign)((0,d.__assign)({},a[0]),{id:Ve,data:o[0],yField:n[0]}),(0,d.__assign)((0,d.__assign)({},a[1]),{id:Ge,data:o[1],yField:n[1]})];return l.forEach(function(u){var h=u.id,f=u.data,v=u.yField,g=xs(u)&&u.isPercent,p=g?sh(f,v,i,v):f,y=Ot(r,h).data(p),m=g?(0,d.__assign)({formatter:function(x){return{name:x[u.seriesField]||v,value:(Number(x[v])*100).toFixed(2)+"%"}}},s):s;RS({chart:y,options:{xField:i,yField:v,tooltip:m,geometryOption:u}})}),e}function GS(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,c.each)(n,function(s,l){var u=Ot(t,l===0?Ve:Ge);if(!s.color){var h=u.getGroupScales(),f=(0,c.get)(h,[0,"values","length"],1),v=a.slice(o,o+f).concat(l===0?[]:a);u.geometries.forEach(function(g){s.seriesField?g.color(s.seriesField,v):g.color(v[0])}),o+=f}}),t.render(!0)}),e}function WS(e){var r,t,i=e.chart,n=e.options,a=n.xAxis,o=n.yAxis,s=n.xField,l=n.yField;return oe((r={},r[s]=a,r[l[0]]=o[0],r))(O({},e,{chart:Ot(i,Ve)})),oe((t={},t[s]=a,t[l[1]]=o[1],t))(O({},e,{chart:Ot(i,Ge)})),e}function HS(e){var r=e.chart,t=e.options,i=Ot(r,Ve),n=Ot(r,Ge),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],Lh(l[0],mi.Left)),n.axis(a,!1),n.axis(o[1],Lh(l[1],mi.Right)),e}function YS(e){var r=e.chart,t=e.options,i=t.tooltip,n=Ot(r,Ve),a=Ot(r,Ge);return r.tooltip(i),n.tooltip({shared:!0}),a.tooltip({shared:!0}),e}function XS(e){var r=e.chart;return ee(O({},e,{chart:Ot(r,Ve)})),ee(O({},e,{chart:Ot(r,Ge)})),e}function jS(e){var r=e.chart,t=e.options,i=t.annotations,n=(0,c.get)(i,[0]),a=(0,c.get)(i,[1]);return ae(n)(O({},e,{chart:Ot(r,Ve),options:{annotations:n}})),ae(a)(O({},e,{chart:Ot(r,Ge),options:{annotations:a}})),e}function US(e){var r=e.chart;return Wt(O({},e,{chart:Ot(r,Ve)})),Wt(O({},e,{chart:Ot(r,Ge)})),Wt(e),e}function ZS(e){var r=e.chart;return Kt(O({},e,{chart:Ot(r,Ve)})),Kt(O({},e,{chart:Ot(r,Ge)})),e}function KS(e){var r=e.chart,t=e.options,i=t.yAxis;return Xr(O({},e,{chart:Ot(r,Ve),options:{yAxis:i[0]}})),Xr(O({},e,{chart:Ot(r,Ge),options:{yAxis:i[1]}})),e}function qS(e){var r=e.chart,t=e.options,i=t.legend,n=t.geometryOptions,a=t.yField,o=t.data,s=Ot(r,Ve),l=Ot(r,Ge);if(i===!1)r.legend(!1);else if((0,c.isObject)(i)&&i.custom===!0)r.legend(i);else{var u=(0,c.get)(n,[0,"legend"],i),h=(0,c.get)(n,[1,"legend"],i);r.once("beforepaint",function(){var f=o[0].length?Ih({view:s,geometryOption:n[0],yField:a[0],legend:u}):[],v=o[1].length?Ih({view:l,geometryOption:n[1],yField:a[1],legend:h}):[];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,h),r.on("legend-item:click",function(f){var v=(0,c.get)(f,"gEvent.delegateObject",{});if(v&&v.item){var g=v.item,p=g.value,y=g.isGeometry,m=g.viewId;if(y){var x=(0,c.findIndex)(a,function(b){return b===p});if(x>-1){var _=(0,c.get)(Ot(r,m),"geometries");(0,c.each)(_,function(b){b.changeVisible(!v.item.unchecked)})}}else{var w=(0,c.get)(r.getController("legend"),"option.items",[]);(0,c.each)(r.views,function(b){var S=b.getGroupScales();(0,c.each)(S,function(C){C.values&&C.values.indexOf(p)>-1&&b.filter(C.field,function(M){var L=(0,c.find)(w,function(B){return B.value===M});return!L.unchecked})}),r.render(!0)})}}})}return e}function $S(e){var r=e.chart,t=e.options,i=t.slider,n=Ot(r,Ve),a=Ot(r,Ge);return i&&(n.option("slider",i),n.on("slider:valuechanged",function(o){var s=o.event,l=s.value,u=s.originValue;(0,c.isEqual)(l,u)||Oh(a,l)}),r.once("afterpaint",function(){if(!(0,c.isBoolean)(i)){var o=i.start,s=i.end;(o||s)&&Oh(a,[o,s])}})),e}function QS(e){return _t(NS,zS,US,VS,WS,HS,KS,YS,XS,jS,ZS,GS,qS,$S)(e)}var CL=function(e){(0,d.__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 QS},r}(Mt),un="x",xi="y",Ph={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(e,r){return""+(0,c.get)(r,[0,"data","y"],0)},containerTpl:'
    ',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}},showCrosshairs:!0,crosshairs:{type:"x"}},JS={appendPadding:2,tooltip:(0,d.__assign)({},Ph),animation:{}};function qr(e){return(0,c.map)(e||[],function(r,t){return{x:""+t,y:r}})}function tC(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=qr(i);r.data(u);var h=O({},e,{options:{xField:un,yField:xi,area:{color:n,style:a},line:s,point:o}}),f=O({},h,{options:{tooltip:!1}}),v=O({},h,{options:{tooltip:!1,state:l}});return ga(h),yi(f),ze(v),r.axis(!1),r.legend(!1),e}function _i(e){var r,t,i=e.options,n=i.xAxis,a=i.yAxis,o=i.data,s=qr(o);return _t(oe((r={},r[un]=n,r[xi]=a,r),(t={},t[un]={type:"cat"},t[xi]=os(s,xi),t)))(e)}function Dh(e){return _t(Ne("areaStyle"),tC,_i,he,Wt,Kt,ae())(e)}function eC(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=qr(i);r.data(l);var u=O({},e,{options:{xField:un,yField:xi,line:{color:n,style:a},point:o}}),h=O({},u,{options:{tooltip:!1,state:s}});return yi(u),ze(h),r.axis(!1),r.legend(!1),e}function kh(e){return _t(eC,_i,Wt,he,Kt,ae())(e)}var rC=function(e){(0,d.__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 JS},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;_i({chart:n,options:a}),n.changeData(qr(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return kh},r}(Mt);function iC(e){var r=e.chart,t=e.options,i=t.data,n=t.color,a=t.columnStyle,o=t.columnWidthRatio,s=qr(i);r.data(s);var l=O({},e,{options:{xField:un,yField:xi,widthRatio:o,interval:{style:a,color:n}}});return Ce(l),r.axis(!1),r.legend(!1),r.interaction("element-active"),e}function Bh(e){return _t(Wt,Ne("columnStyle"),iC,_i,he,Kt,ae())(e)}var nC={showTitle:!1,shared:!0,showMarkers:!1,customContent:function(e,r){return""+(0,c.get)(r,[0,"data","y"],0)},containerTpl:'
    ',itemTpl:"{value}",domStyles:{"g2-tooltip":{padding:"2px 4px",fontSize:"10px"}}},aC={appendPadding:2,tooltip:(0,d.__assign)({},nC),animation:{}},oC=function(e){(0,d.__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 aC},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;_i({chart:n,options:a}),n.changeData(qr(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Bh},r}(Mt),sC={appendPadding:2,tooltip:(0,d.__assign)({},Ph),color:"l(90) 0:#E5EDFE 1:#ffffff",areaStyle:{fillOpacity:.6},line:{size:1,color:"#5B8FF9"},animation:{}},lC=function(e){(0,d.__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 sC},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this,n=i.chart,a=i.options;_i({chart:n,options:a}),n.changeData(qr(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Dh},r}(Mt);function Rh(e,r,t){if(t===1)return[0,r];var i=Math.floor(e/r);return[r*i,r*(i+1)]}function uC(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function Nh(e,r,t,i,n){var a=(0,c.clone)(e);(0,c.sortBy)(a,r);var o=(0,c.valuesOfKey)(a,r),s=(0,c.getRange)(o),l=s.max-s.min,u=t;if(!t&&i&&(u=i>1?l/(i-1):s.max),!t&&!i){var h=uC(o);u=l/h}var f={},v=(0,c.groupBy)(a,n);(0,c.isEmpty)(v)?(0,c.each)(a,function(p){var y=p[r],m=Rh(y,u,i),x=m[0]+"-"+m[1];(0,c.hasKey)(f,x)||(f[x]={range:m,count:0}),f[x].count+=1}):Object.keys(v).forEach(function(p){(0,c.each)(v[p],function(y){var m=y[r],x=Rh(m,u,i),_=x[0]+"-"+x[1],w=_+"-"+p;(0,c.hasKey)(f,w)||(f[w]={range:x,count:0},f[w][n]=p),f[w].count+=1})});var g=[];return(0,c.each)(f,function(p){g.push(p)}),g}var Sa="range",cn="count",cC=O({},Mt.getDefaultOptions(),{columnStyle:{stroke:"#FFFFFF"},tooltip:{shared:!0,showMarkers:!1},interactions:[{type:"active-region"}]});function hC(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,h=t.columnStyle,f=Nh(i,n,o,a,l);r.data(f);var v=O({},e,{options:{xField:Sa,yField:cn,seriesField:l,isStack:!0,interval:{color:s,style:h}}});return Ce(v),u&&l&&r.legend(l,u),e}function fC(e){var r,t=e.options,i=t.xAxis,n=t.yAxis;return _t(oe((r={},r[Sa]=i,r[cn]=n,r)))(e)}function vC(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis;return i===!1?r.axis(Sa,!1):r.axis(Sa,i),n===!1?r.axis(cn,!1):r.axis(cn,n),e}function dC(e){var r=e.chart,t=e.options,i=t.label,n=Se(r,"interval");if(!i)n.label(!1);else{var a=i.callback,o=(0,d.__rest)(i,["callback"]);n.label({fields:[cn],callback:a,cfg:ye(o)})}return e}function zh(e){return _t(Wt,Ne("columnStyle"),hC,fC,vC,Tr,dC,he,ee,Kt)(e)}var gC=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="histogram",t}return r.getDefaultOptions=function(){return cC},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(Nh(t,n,o,a,s))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return zh},r}(Mt),Vh=["#FAAD14","#E8EDF3"],pC={percent:.2,color:Vh,animation:{}};function _s(e){var r=(0,c.clamp)(Hr(e)?e:0,0,1);return[{type:"current",percent:r},{type:"target",percent:1-r}]}function Gh(e){var r=e.chart,t=e.options,i=t.percent,n=t.progressStyle,a=t.color,o=t.barWidthRatio;r.data(_s(i));var s=O({},e,{options:{xField:"1",yField:"percent",seriesField:"type",isStack:!0,widthRatio:o,interval:{style:n,color:(0,c.isString)(a)?[a,Vh[1]]:a},args:{zIndexReversed:!0,sortZIndex:!0}}});return Ce(s),r.tooltip(!1),r.axis(!1),r.legend(!1),e}function yC(e){var r=e.chart;return r.coordinate("rect").transpose(),e}function Wh(e){return _t(Gh,oe({}),yC,Kt,Wt,ae())(e)}var mC=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="process",t}return r.getDefaultOptions=function(){return pC},r.prototype.changeData=function(t){this.updateOption({percent:t}),this.chart.changeData(_s(t))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Wh},r}(Mt);function xC(e){var r=e.chart,t=e.options,i=t.innerRadius,n=t.radius;return r.coordinate("theta",{innerRadius:i,radius:n}),e}function Hh(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,c.get)(s,["percent","formatter"])||function(h){return(h*100).toFixed(2)+"%"},u=a.content;u&&(u=O({},u,{content:(0,c.isNil)(u.content)?l(o):u.content})),ua(t,{statistic:(0,d.__assign)((0,d.__assign)({},a),{content:u}),plotType:"ring-progress"},{percent:o})}return r&&t.render(!0),e}function Yh(e){return _t(Gh,oe({}),xC,Hh,Kt,Wt,ae())(e)}var _C={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:{}},wC=function(e){(0,d.__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 _C},r.prototype.changeData=function(t){this.chart.emit(A.BEFORE_CHANGE_DATA,ne.fromData(this.chart,A.BEFORE_CHANGE_DATA,null)),this.updateOption({percent:t}),this.chart.data(_s(t)),Hh({chart:this.chart,options:this.options},!0),this.chart.emit(A.AFTER_CHANGE_DATA,ne.fromData(this.chart,A.AFTER_CHANGE_DATA,null))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return Yh},r}(Mt);function bC(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,h=t.shape,f=t.color,v=t.tooltip,g=t.heatmapStyle;r.data(i);var p="polygon";n==="density"&&(p="heatmap");var y=He(v,[a,o,s]),m=y.fields,x=y.formatter,_=1;return(u||u===0)&&(!h&&!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]"):_=u),Pe(O({},e,{options:{type:p,colorField:s,tooltipFields:m,shapeField:l||"",label:void 0,mapping:{tooltip:x,shape:h&&(l?function(w){var b=i.map(function(M){return M[l]}),S=Math.min.apply(Math,b),C=Math.max.apply(Math,b);return[h,((0,c.get)(w,l)-S)/(C-S),_]}:function(){return[h,1,_]}),color:f||s&&r.getTheme().sequenceColors.join("-"),style:g}}})),e}function SC(e){var r,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField;return _t(oe((r={},r[a]=i,r[o]=n,r)))(e)}function CC(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 AC(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 FC(e){var r=e.chart,t=e.options,i=t.label,n=t.colorField,a=t.type,o=Se(r,a==="density"?"heatmap":"polygon");if(!i)o.label(!1);else if(n){var s=i.callback,l=(0,d.__rest)(i,["callback"]);o.label({fields:[n],callback:s,cfg:ye(l)})}return e}function EC(e){var r=e.chart,t=e.options,i=t.coordinate,n=t.reflect;return i&&r.coordinate({type:i.type||"rect",cfg:i.cfg}),n&&r.coordinate().reflect(n),e}function MC(e){return _t(Wt,Ne("heatmapStyle"),SC,EC,bC,CC,AC,he,FC,ae(),ee,Kt,Tr)(e)}var TC=O({},Mt.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"}}}}});jt("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,h=Number(e.shape[1]),f=Number(e.shape[2]),v=Math.sqrt(f),g=u*v*Math.sqrt(h),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,d.__assign)((0,d.__assign)((0,d.__assign)({x:n,y:a,r:g},e.defaultStyle),e.style),{fill:p})});return y}}),jt("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),h=Number(e.shape[1]),f=Number(e.shape[2]),v=Math.sqrt(f),g=u*v*Math.sqrt(h),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,d.__assign)((0,d.__assign)((0,d.__assign)({x:n-g/2,y:a-g/2,width:g,height:g},e.defaultStyle),e.style),{fill:p})});return y}});var AL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="heatmap",t}return r.getDefaultOptions=function(){return TC},r.prototype.getSchemaAdaptor=function(){return MC},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Mt),ws,wi="$$range$$",LC="low-q1-median-q3-high",IC="$$y_outliers$$",Xh="outliers_view",OC=O({},Mt.getDefaultOptions(),{meta:(ws={},ws[wi]={min:0,alias:LC},ws),interactions:[{type:"active-region"}],tooltip:{showMarkers:!1,shared:!0},boxStyle:{lineWidth:1}}),jh=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,c.map)(e,function(l){return l[wi]=[l[i],l[n],l[a],l[o],l[s]],l})}return t};function PC(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(jh(t.data,n));var u=(0,c.isArray)(n)?wi:n,h=n?(0,c.isArray)(n)?n:[n]:[],f=s;f!==!1&&(f=O({},{fields:(0,c.isArray)(n)?n:[]},f));var v=fs(O({},e,{options:{xField:i,yField:u,seriesField:a,tooltip:f,rawFields:h,label:!1,schema:{shape:"box",color:o,style:l}}})).ext;return a&&v.geometry.adjust("dodge"),e}function DC(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:Xh}),h=n.reduce(function(f,v){var g=v[a];return g.forEach(function(p){var y;return f.push((0,d.__assign)((0,d.__assign)({},v),(y={},y[a]=p,y)))}),f},[]);return u.data(h),ze({chart:u,options:{xField:i,yField:a,point:{shape:"circle",style:o},label:l}}),u.axis(!1),e}function kC(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,h=n.outliersField,f=Array.isArray(u)?wi:u,v={};if(h){var g=IC;v=(r={},r[h]={sync:g,nice:!0},r[f]={sync:g,nice:!0},r)}var p=O(v,a,(t={},t[l]=Zt(o,Oe),t[f]=Zt(s,Oe),t));return i.scale(p),e}function BC(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField,s=Array.isArray(o)?wi:o;return i===!1?r.axis(a,!1):r.axis(a,i),n===!1?r.axis(wi,!1):r.axis(s,n),e}function RC(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 NC(e){return _t(PC,DC,kC,BC,RC,he,ee,Kt,Wt)(e)}var FL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="box",t}return r.getDefaultOptions=function(){return OC},r.prototype.changeData=function(t){this.updateOption({data:t});var i=this.options.yField,n=this.chart.views.find(function(a){return a.id===Xh});n&&n.data(t),this.chart.changeData(jh(t,i))},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return NC},r}(Mt),zC=F(53843),VC=F.n(zC);function Uh(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 hn(e,r,t){var i=e[r];e[r]=e[t],e[t]=i}function Ca(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)),h=Math.min(i,Math.floor(r+(n-a)*s/n+l));Ca(e,r,u,h)}var f=e[r],v=t,g=i;for(hn(e,t,r),e[i]>f&&hn(e,t,i);vf;)g--}e[t]===f?hn(e,t,g):(g++,hn(e,g,i)),g<=r&&(t=g+1),r<=g&&(i=g-1)}}function fn(e,r){var t=e.slice();if(Array.isArray(r)){GC(t,r);for(var i=[],n=0;nr?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)))}},nA=function(e){if(!rf[e])throw new Error("unknown blend mode "+e);return rf[e]};function aA(e,r,t){t===void 0&&(t="normal");var i=iA(nA(t))(Ea(e),Ea(r)),n=Ea(e),a=n[0],o=n[1],s=n[2],l=n[3],u=Ea(r),h=u[0],f=u[1],v=u[2],g=u[3],p=Number((l+g*(1-l)).toFixed(2)),y=Math.round((l*(1-g)*(a/255)+l*g*(i[0]/255)+(1-l)*g*(h/255))/p*255),m=Math.round((l*(1-g)*(o/255)+l*g*(i[1]/255)+(1-l)*g*(f/255))/p*255),x=Math.round((l*(1-g)*(s/255)+l*g*(i[2]/255)+(1-l)*g*(v/255))/p*255);return"rgba("+y+", "+m+", "+x+", "+p+")"}function Ea(e){var r=e.replace("/s+/g",""),t;return typeof r=="string"&&!r.startsWith("rgba")&&!r.startsWith("#")?t=yr.rgb2arr(yr.toRGB(r)).concat([1]):(r.startsWith("rgba")&&(t=r.replace("rgba(","").replace(")","").split(",")),r.startsWith("#")&&(t=yr.rgb2arr(r).concat([1])),t.map(function(i,n){return n===3?Number(i):i|0}))}var er=F(87026),nf=1e-10;function Ss(e,r){var t=sA(e),i=t.filter(function(M){return oA(M,e)}),n=0,a=0,o,s=[];if(i.length>1){var l=sf(i);for(o=0;o-1){var y=e[f.parentIndex[p]],m=Math.atan2(f.x-y.x,f.y-y.y),x=Math.atan2(h.x-y.x,h.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),(g===null||g.width>b)&&(g={circle:y,width:b,p1:f,p2:h})}g!==null&&(s.push(g),n+=Cs(g.circle.radius,g.width),h=f)}}else{var S=e[0];for(o=1;oMath.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-nf,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 oA(e,r){for(var t=0;tr[t].radius+nf)return!1;return!0}function sA(e){for(var r=[],t=0;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 Cs(e,i)+Cs(r,n)}function of(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),h=-(r.x-e.x)*(o/t);return[{x:s+u,y:l-h},{x:s-u,y:l+h}]}function sf(e){for(var r={x:0,y:0},t=0;tu?1:-1}),i=0;i=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 hA(e,r,t,i){var n=0,a;for(a=0;a0&&p<=f||v<0&&p>=f||(n+=2*y*y,r[2*a]+=4*y*(o-u),r[2*a+1]+=4*y*(s-h),r[2*l]+=4*y*(u-o),r[2*l+1]+=4*y*(h-s))}return n}function fA(e,r){var t=dA(e,r),i=r.lossFunction||Fs;if(e.length>=8){var n=vA(e,r),a=i(n,e),o=i(t,e);a+1e-8=Math.min(i[h].size,i[f].size)&&(u=0),n[h].push({set:f,size:l.size,weight:u}),n[f].push({set:h,size:l.size,weight:u})}var v=[];for(a in n)if(n.hasOwnProperty(a)){for(var g=0,o=0;o0){var n=e[0].x,a=e[0].y;for(i=0;i1){var s=Math.atan2(e[1].x,e[1].y)-r,l=void 0,u=void 0,h=Math.cos(s),f=Math.sin(s);for(i=0;i2){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 g=e[1].y/(1e-10+e[1].x);for(i=0;i=o&&(a=t[i],o=s)}var l=(0,er.nelderMead)(function(v){return-1*Ms({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]},h=!0;for(i=0;ie[i].radius){h=!1;break}for(i=0;i0&&console.log("WARNING: area "+a+" not represented on screen")}return t}function _A(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 TL(e){var r=e.split(" ");return{x:parseFloat(r[1]),y:parseFloat(r[2]),radius:-parseFloat(r[4])}}function wA(e){var r={};Ss(e,r);var t=r.arcs;if(t.length===0)return"M 0 0";if(t.length==1){var i=t[0].circle;return _A(i.x,i.y,i.radius)}else{for(var n=[` M`,t[0].p2.x,t[0].p2.y],a=0;as;n.push(` A`,s,s,0,l?1:0,1,o.p1.x,o.p1.y)}return n.join(" ")}}var fr="id",Ts="path",bA={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"]},SA=(0,c.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[fr],e[(s+a)%a]);else{var l=o[i].map(function(u){return n.get(u)});n.set(o[fr],l.slice(1).reduce(function(u,h){return aA(u,h,t)},l[0]))}}),n},function(){for(var e=[],r=0;r0;)u-=Math.PI*2;u=u/Math.PI/2*t;var h=a-e+u-e*2;l.push(["M",h,r]);for(var f=0,v=0;v1?r+"_"+t:""+r}function Cf(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 g=[f[n]].flat();g.sort(function(m,x){return m-x}),g.forEach(function(m,x){var _,w=x===0?m:g[x]-g[x-1];s.push((_={rKey:n+"_"+x},_[t]=t?f[t]:String(v),_[n]=w,_))});var p=[f[i]].flat();p.forEach(function(m,x){var _;s.push((_={mKey:Sf(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:Sf(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)),h=Math.max.apply(Math,l.flat(Infinity));return u=u>0?0:u,o==="vertical"&&s.reverse(),{min:u,max:h,ds:s}}function RF(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,h=t.size,f=t.label,v=Cf(t),g=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,c.get)(f,"range"),interval:{color:(0,c.get)(l,"range"),style:(0,c.get)(i,"range"),size:(0,c.get)(h,"range")}}});Ce(m),r.geometries[0].tooltip(!1);var x=O({},e,{options:{xField:s,yField:o,seriesField:"mKey",isStack:!0,label:(0,c.get)(f,"measure"),interval:{color:(0,c.get)(l,"measure"),style:(0,c.get)(i,"measure"),size:(0,c.get)(h,"measure")}}});Ce(x);var _=O({},e,{options:{xField:s,yField:n,seriesField:"tKey",label:(0,c.get)(f,"target"),point:{color:(0,c.get)(l,"target"),style:(0,c.get)(i,"target"),size:(0,c.isFunction)((0,c.get)(h,"target"))?function(w){return(0,c.get)(h,"target")(w)/2}:(0,c.get)(h,"target")/2,shape:u==="horizontal"?"line":"hyphen"}}});return ze(_),u==="horizontal"&&r.coordinate().transpose(),(0,d.__assign)((0,d.__assign)({},e),{ext:{data:{min:g,max:p}}})}function Af(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,h=i.xField,f=n.data;return _t(oe((r={},r[h]=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:""+u},t[l]={sync:""+u},t)))(e)}function NF(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(""+s,!1),r.axis(""+l,!1),i===!1?r.axis(""+a,!1):r.axis(""+a,i),n===!1?r.axis(""+o,!1):r.axis(""+o,n),e}function zF(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 VF(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],h=s[2];return(0,c.get)(i,"range")?l.label(""+o,(0,d.__assign)({layout:[{type:"limit-in-plot"}]},ye(i.range))):l.label(!1),(0,c.get)(i,"measure")?u.label(""+n,(0,d.__assign)({layout:[{type:"limit-in-plot"}]},ye(i.measure))):u.label(!1),(0,c.get)(i,"target")?h.label(""+a,(0,d.__assign)({layout:[{type:"limit-in-plot"}]},ye(i.target))):h.label(!1),e}function GF(e){_t(RF,Af,NF,zF,Wt,VF,he,ee,Kt)(e)}var WF=O({},Mt.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}}),OL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="bullet",t}return r.getDefaultOptions=function(){return WF},r.prototype.changeData=function(t){this.updateOption({data:t});var i=Cf(this.options),n=i.min,a=i.max,o=i.ds;Af({options:this.options,ext:{data:{min:n,max:a}},chart:this.chart}),this.chart.changeData(o)},r.prototype.getSchemaAdaptor=function(){return GF},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Mt),Ff="nodeIndex",Ef="childNodeCount",Ps="nodeAncestor",Ds="Invalid field: it must be a string!";function ks(e,r){var t=e.field,i=e.fields;if((0,c.isString)(t))return t;if((0,c.isArray)(t))return console.warn(Ds),t[0];if(console.warn(Ds+" will try to get fields instead."),(0,c.isString)(i))return i;if((0,c.isArray)(i)&&i.length)return i[0];if(r)return r;throw new TypeError(Ds)}function Bs(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,c.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&&u1?(this.historyCache=t,this.drawBreadCrumb()):(this.historyCache=[],this.hideCrumbGroup())}},r.prototype.getButtonCfg=function(){var t=this.context.view,i=(0,c.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:If});var a=0;n.forEach(function(o,s){var l=t.breadCrumbGroup.addShape({type:"text",id:o.id,name:If+"_"+o.name+"_text",attrs:(0,d.__assign)((0,d.__assign)({text:s===0&&!(0,c.isNil)(i.rootText)?i.rootText:o.name},i.textStyle),{x:a,y:0})}),u=l.getBBox();if(a+=u.width+Tf,l.on("click",function(v){var g,p=v.target.get("id");if(p!==((g=(0,c.last)(n))===null||g===void 0?void 0:g.id)){var y=n.slice(0,n.findIndex(function(m){return m.id===p})+1);t.backTo(y)}}),l.on("mouseenter",function(v){var g,p=v.target.get("id");p!==((g=(0,c.last)(n))===null||g===void 0?void 0:g.id)?l.attr(i.activeTextStyle):l.attr({cursor:"default"})}),l.on("mouseleave",function(){l.attr(i.textStyle)}),s=0;)r+=t[i].value;e.value=r}function qF(){return this.eachAfter(KF)}var $F=F(64254);function Df(e,r){var t;if(typeof Symbol=="undefined"||e[Symbol.iterator]==null){if(Array.isArray(e)||(t=(0,$F.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. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a=!0,o=!1,s;return{s:function(){t=e[Symbol.iterator]()},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 QF(e,r){var t=-1,i=Df(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 JF(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 tE(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=0;)t+=i[n].value;r.value=t})}function iE(e){return this.eachBefore(function(r){r.children&&r.children.sort(e)})}function nE(e){for(var r=this,t=aE(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 aE(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 oE(){for(var e=this,r=[e];e=e.parent;)r.push(e);return r}function sE(){return Array.from(this)}function lE(){var e=[];return this.eachBefore(function(r){r.children||e.push(r)}),e}function uE(){var e=this,r=[];return e.each(function(t){t!==e&&r.push({source:t.parent,target:t})}),r}var cE=F(94043),kf=F.n(cE),hE=kf().mark(Bf);function Bf(){var e,r,t,i,n,a;return kf().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=0;--s)n.push(a=o[s]=new Si(o[s])),a.parent=i,a.depth=i.depth+1;return t.eachBefore(Rf)}function fE(){return bi(this).eachBefore(gE)}function vE(e){return e.children}function dE(e){return Array.isArray(e)?e[1]:null}function gE(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Rf(e){var r=0;do e.height=r;while((e=e.parent)&&e.height<++r)}function Si(e){this.data=e,this.depth=this.height=0,this.parent=null}Si.prototype=bi.prototype=(0,ZF.Z)({constructor:Si,count:qF,each:QF,eachAfter:tE,eachBefore:JF,find:eE,sum:rE,sort:iE,path:nE,ancestors:oE,descendants:sE,leaves:lE,links:uE,copy:fE},Symbol.iterator,Bf);var pE={field:"value",size:[1,1],round:!1,padding:0,sort:function(e,r){return r.value-e.value},as:["x","y"],ignoreParentValue:!0};function yE(e,r){r=(0,c.assign)({},pE,r);var t=r.as;if(!(0,c.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=ks(r)}catch(l){console.warn(l)}var n=function(l){return Pf().size(r.size).round(r.round).padding(r.padding)(bi(l).sum(function(u){return(0,c.size)(u.children)?r.ignoreParentValue?0:u[i]-(0,c.reduce)(u.children,function(h,f){return h+f[i]},0):u[i]}).sort(r.sort))},a=n(e),o=t[0],s=t[1];return a.each(function(l){var u,h;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)||((h=l.data)===null||h===void 0?void 0:h.label),l.data.name=l.name,["x0","x1","y0","y1"].forEach(function(f){t.indexOf(f)===-1&&delete l[f]})}),Bs(a)}function mE(e,r){return e.parent===r.parent?1:2}function xE(e){return e.reduce(_E,0)/e.length}function _E(e,r){return e+r.x}function wE(e){return 1+e.reduce(bE,0)}function bE(e,r){return Math.max(e,r.y)}function SE(e){for(var r;r=e.children;)e=r[0];return e}function CE(e){for(var r;r=e.children;)e=r[r.length-1];return e}function AE(){var e=mE,r=1,t=1,i=!1;function n(a){var o,s=0;a.eachAfter(function(v){var g=v.children;g?(v.x=xE(g),v.y=wE(g)):(v.x=o?s+=e(v,o):0,v.y=0,o=v)});var l=SE(a),u=CE(a),h=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-h)/(f-h)*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}function FE(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function EE(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 Nf(e){for(var r=0,t=(e=EE(Array.from(e))).length,i=[],n,a;r0&&t*t>i*i+n*n}function Ns(e,r){for(var t=0;tl?(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 Wf(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 Hf(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 Ia(e){this._=e,this.next=null,this.previous=null}function Yf(e){if(!(n=(e=FE(e)).length))return 0;var r,t,i,n,a,o,s,l,u,h,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;Gf(t,r,i=e[2]),r=new Ia(r),t=new Ia(t),i=new Ia(i),r.next=i.previous=t,t.next=r.previous=i,i.next=t.previous=r;t:for(s=3;s0)throw new Error("cycle");return l}return t.id=function(i){return arguments.length?(e=Oa(i),t):e},t.parentId=function(i){return arguments.length?(r=Oa(i),t):r},t}function NE(e,r){return e.parent===r.parent?1:2}function Vs(e){var r=e.children;return r?r[0]:e.t}function Gs(e){var r=e.children;return r?r[r.length-1]:e.t}function zE(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 VE(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 GE(e,r,t){return e.a.parent===r.parent?e.a:t}function Pa(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}Pa.prototype=Object.create(Si.prototype);function WE(e){for(var r=new Pa(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 Pa(a[o],o)),n.parent=t;return(r.parent=new Pa(null,0)).children=[r],r}function HE(){var e=NE,r=1,t=1,i=null;function n(u){var h=WE(u);if(h.eachAfter(a),h.parent.m=-h.z,h.eachBefore(o),i)u.eachBefore(l);else{var f=u,v=u,g=u;u.eachBefore(function(_){_.xv.x&&(v=_),_.depth>g.depth&&(g=_)});var p=f===v?1:e(f,v)/2,y=p-f.x,m=r/(v.x+p+y),x=t/(g.depth||1);u.eachBefore(function(_){_.x=(_.x+y)*m,_.y=_.depth*x})}return u}function a(u){var h=u.children,f=u.parent.children,v=u.i?f[u.i-1]:null;if(h){VE(u);var g=(h[0].z+h[h.length-1].z)/2;v?(u.z=v.z+e(u._,v._),u.m=u.z-g):u.z=g}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,h,f){if(h){for(var v=u,g=u,p=h,y=v.parent.children[0],m=v.m,x=g.m,_=p.m,w=y.m,b;p=Gs(p),v=Vs(v),p&&v;)y=Vs(y),g=Gs(g),g.a=u,b=p.z+_-v.z-m+e(p._,v._),b>0&&(zE(GE(p,u,f),u,b),m+=b,x+=b),_+=p.m,m+=v.m,w+=y.m,x+=g.m;p&&!Gs(g)&&(g.t=p,g.m+=_-x),v&&!Vs(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 Da(e,r,t,i,n){for(var a=e.children,o,s=-1,l=a.length,u=e.value&&(n-t)/e.value;++s_&&(_=u),C=m*m*S,w=Math.max(_/C,C/x),w>b){m-=u;break}b=w}o.push(l={value:m,dice:g1?i:1)},t}(Kf);function Qf(){var e=$f,r=!1,t=1,i=1,n=[0],a=Qr,o=Qr,s=Qr,l=Qr,u=Qr;function h(v){return v.x0=v.y0=0,v.x1=t,v.y1=i,v.eachBefore(f),n=[0],r&&v.eachBefore(Of),v}function f(v){var g=n[v.depth],p=v.x0+g,y=v.y0+g,m=v.x1-g,x=v.y1-g;m=v-1){var _=a[f];_.x0=p,_.y0=y,_.x1=m,_.y1=x;return}for(var w=u[f],b=g/2+w,S=f+1,C=v-1;S>>1;u[M]x-y){var I=g?(p*B+m*L)/g:m;h(f,S,L,p,y,I,x),h(S,v,B,I,y,m,x)}else{var G=g?(y*B+x*L)/g:x;h(f,S,L,p,y,m,G),h(S,v,B,p,G,m,x)}}}function XE(e,r,t,i,n){(e.depth&1?Da:mn)(e,r,t,i,n)}var jE=function e(r){function t(i,n,a,o,s){if((l=i._squarify)&&l.ratio===r)for(var l,u,h,f,v=-1,g,p=l.length,y=i.value;++v1?i:1)},t}(Kf),UE={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 ZE(e,r){return e==="treemapSquarify"?$[e].ratio(r):$[e]}function Jf(e,r){r=(0,c.assign)({},UE,r);var t=r.as;if(!(0,c.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=ks(r)}catch(u){console.warn(u)}var n=ZE(r.tile,r.ratio),a=function(u){return Qf().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)(bi(u).sum(function(h){return r.ignoreParentValue&&h.children?0:h[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(h){t.indexOf(h)===-1&&delete u[h]})}),Bs(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:yE,treemap:Jf},l=e.seriesField,u=e.type||"partition",h=s[u](r,(0,d.__assign)((0,d.__assign)({field:l||"value"},(0,c.omit)(a,["activeDepth"])),{type:"hierarchy."+u,as:["x","y"]})),f=[];return h.forEach(function(v){var g,p,y,m,x,_;if(v.depth===0||o>0&&v.depth>o)return null;for(var w=v.data.name,b=(0,d.__assign)({},v);b.depth>1;)w=((p=b.parent.data)===null||p===void 0?void 0:p.name)+" / "+w,b=b.parent;var S=(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Zt(v.data,(0,d.__spreadArrays)(i||[],[a.field]))),(g={},g[pn]=w,g[Rs]=b.data.name,g)),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[yn]={hierarchyConfig:a,colorField:t,rawFields:i},f.push(S)}),f}function KE(e){var r=e.chart,t=e.options,i=t.color,n=t.colorField,a=n===void 0?Rs:n,o=t.sunburstStyle,s=t.rawFields,l=s===void 0?[]:s,u=tv(t);r.data(u);var h;return o&&(h=function(f){return O({},{fillOpacity:Math.pow(.85,f.depth)},(0,c.isFunction)(o)?o(f):o)}),pa(O({},e,{options:{xField:"x",yField:"y",seriesField:a,rawFields:(0,c.uniq)((0,d.__spreadArrays)(HF,l)),polygon:{color:i,style:h}}})),e}function qE(e){var r=e.chart;return r.axis(!1),e}function $E(e){var r=e.chart,t=e.options,i=t.label,n=Se(r,"polygon");if(!i)n.label(!1);else{var a=i.fields,o=a===void 0?["name"]:a,s=i.callback,l=(0,d.__rest)(i,["fields","callback"]);n.label({fields:o,callback:s,cfg:ye(l)})}return e}function QE(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 JE(e){var r,t=e.options,i=t.hierarchyConfig,n=t.meta;return _t(oe({},(r={},r[Mf]=(0,c.get)(n,(0,c.get)(i,["field"],"value")),r)))(e)}function tM(e){var r=e.chart,t=e.options,i=t.tooltip;if(i===!1)r.tooltip(!1);else{var n=i;(0,c.get)(i,"fields")||(n=O({},{customItems:function(a){return a.map(function(o){var s=(0,c.get)(r.getOptions(),"scales"),l=(0,c.get)(s,[pn,"formatter"],function(h){return h}),u=(0,c.get)(s,[Mf,"formatter"],function(h){return h});return(0,d.__assign)((0,d.__assign)({},o),{name:l(o.data[pn]),value:u(o.data.value)})})}},n)),r.tooltip(n)}return e}function eM(e){var r=e.drilldown,t=e.interactions,i=t===void 0?[]:t;return(r==null?void 0:r.enabled)?O({},e,{interactions:(0,d.__spreadArrays)(i,[{type:"drill-down",cfg:{drillDownConfig:r,transformData:tv}}])}):e}function rM(e){var r=e.chart,t=e.options,i=t.drilldown;return ee({chart:r,options:eM(t)}),(i==null?void 0:i.enabled)&&(r.appendPadding=ca(r.appendPadding,(0,c.get)(i,["breadCrumb","position"]))),e}function iM(e){return _t(Wt,Ne("sunburstStyle"),KE,qE,JE,Yr,QE,tM,$E,rM,Kt,ae())(e)}function ev(e){var r=(0,c.get)(e,["event","data","data"],{});return(0,c.isArray)(r.children)&&r.children.length>0}function rv(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,h=Math.sqrt(Math.pow(s-n,2)+Math.pow(l-a,2));return h
    ',domStyles:{"g2-tooltip":{padding:"4px 8px",fontSize:"10px"}},customContent:function(n,a){var o=(0,c.get)(a,[0,"data",dr],0);return(o*100).toFixed(2)+"%"}},i)):r.tooltip(!1),e}function cM(e){var r=e.chart;return r.legend(!1),e}function uv(e){return _t(Wt,Kt,sM,lM,uM,lv,ee,ae(),cM)(e)}jt("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,d.__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,d.__assign)({x:u.x,y:u.y,stroke:n},s.style)}),l}}),jt("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,c.clamp)(s,0,1);var l=this.coordinate,u=l.startAngle,h=l.endAngle,f=0;if(s>0&&s<1){var v=h-u;f=v/a/(s/(1-s)+1-1/a)}for(var g=f/(1-s)*s,p=r.addGroup(),y=this.coordinate.getCenter(),m=this.coordinate.getRadius(),x=Le.getAngle(e,this.coordinate),_=x.startAngle,w=x.endAngle,b=_;b0?h:f},p=O({},e,{options:{xField:n,yField:Xe,seriesField:n,rawFields:[a,Ra,Hs,Xe],widthRatio:l,interval:{style:u,shape:"waterfall",color:g}}}),y=Ce(p).ext,m=y.geometry;return m.customInfo({leaderLine:s}),e}function mM(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,c.get)(l,s));return _t(oe((r={},r[o]=n,r[s]=a,r[Xe]=a,r),O({},l,(t={},t[Xe]=u,t[Ra]=u,t[Ws]=u,t))))(e)}function xM(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(Xe,!1)):(r.axis(o,n),r.axis(Xe,n)),e}function _M(e){var r=e.chart,t=e.options,i=t.legend,n=t.total,a=t.risingFill,o=t.fallingFill,s=t.locale,l=fa(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,c.get)(n,"style"))}}),r.legend(O({},{custom:!0,position:"top",items:u},i)),r.removeInteraction("legend-filter")}return e}function wM(e){var r=e.chart,t=e.options,i=t.label,n=t.labelMode,a=t.xField,o=Se(r,"interval");if(!i)o.label(!1);else{var s=i.callback,l=(0,d.__rest)(i,["callback"]);o.label({fields:n==="absolute"?[Ws,a]:[Ra,a],callback:s,cfg:ye(l)})}return e}function bM(e){var r=e.chart,t=e.options,i=t.tooltip,n=t.xField,a=t.yField;if(i!==!1){r.tooltip((0,d.__assign)({showCrosshairs:!1,showMarkers:!1,shared:!0,fields:[a]},i));var o=r.geometries[0];(i==null?void 0:i.formatter)?o.tooltip(n+"*"+a,i.formatter):o.tooltip(a)}else r.tooltip(!1);return e}function SM(e){return _t(pM,Wt,yM,mM,xM,_M,bM,wM,Tr,ee,Kt,ae())(e)}var DL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="waterfall",t}return r.getDefaultOptions=function(){return fM},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(cv(t,n,a,o))},r.prototype.getSchemaAdaptor=function(){return SM},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Mt);function CM(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 AM(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,d.__assign)({},n))}),i}function FM(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,h=t.data,f=gi(h,u);r.data(f);var v=O({},e,{options:{tooltip:a,seriesField:o,interval:{style:i,color:n,shape:s==="line"?"line":"intervel"},minColumnWidth:t.minBarWidth,maxColumnWidth:t.maxBarWidth,columnBackground:t.barBackground}});return Ce(v),s==="line"&&ze({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,h=o&&!s&&l?AM(a,n,i):a,f=gi(h,i);return _t(oe((r={},r[i]={min:0,max:CM(u,i,f)},r)))(e)}function EM(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 MM(e){var r=e.chart,t=e.options,i=t.xField,n=t.xAxis;return r.axis(i,n),e}function TM(e){var r=e.chart,t=e.options,i=t.label,n=t.yField,a=Se(r,"interval");if(!i)a.label(!1);else{var o=i.callback,s=(0,d.__rest)(i,["callback"]);a.label({fields:[n],callback:o,cfg:(0,d.__assign)((0,d.__assign)({},ye(s)),{type:"polar"})})}return e}function LM(e){return _t(Ne("barStyle"),FM,hv,MM,EM,ee,Kt,Wt,he,Yr,ae(),TM)(e)}var IM=O({},Mt.getDefaultOptions(),{interactions:[{type:"element-active"}],legend:!1,tooltip:{showMarkers:!1},xAxis:{grid:null,tickLine:null,line:null},maxAngle:240}),kL=function(e){(0,d.__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 IM},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 LM},r}(Mt),rr="first-axes-view",ir="second-axes-view",Jr="series-field-key";function fv(e,r,t,i,n){var a=[];r.forEach(function(f){i.forEach(function(v){var g,p=(g={},g[e]=v[e],g[t]=f,g[f]=v[f],g);a.push(p)})});var o=Object.values((0,c.groupBy)(a,t)),s=o[0],l=s===void 0?[]:s,u=o[1],h=u===void 0?[]:u;return n?[l.reverse(),h.reverse()]:[l,h]}function gr(e){return e!=="vertical"}function OM(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(gr(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)),gr(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)),!gr(l)&&u==="bottom"){var h=a.left>=o.left?a.left:o.left;i.autoPadding=t.instance(a.top,a.right,a.bottom/2+5,h),n.autoPadding=t.instance(a.bottom/2+5,o.right,o.bottom,h)}if(!gr(l)&&u==="top"){var h=a.left>=o.left?a.left:o.left;i.autoPadding=t.instance(a.top,a.right,0,h),n.autoPadding=t.instance(0,o.right,a.top,h)}}function PM(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,h=t.layout,f=fv(n,a,Jr,i,gr(h));u?r.legend(Jr,u):u===!1&&r.legend(!1);var v,g,p=f[0],y=f[1];gr(h)?(v=r.createView({region:{start:{x:0,y:0},end:{x:.5,y:1}},id:rr}),v.coordinate().transpose().reflect("x"),g=r.createView({region:{start:{x:.5,y:0},end:{x:1,y:1}},id:ir}),g.coordinate().transpose(),v.data(p),g.data(y)):(v=r.createView({region:{start:{x:0,y:0},end:{x:1,y:.5}},id:rr}),g=r.createView({region:{start:{x:0,y:.5},end:{x:1,y:1}},id:ir}),g.coordinate().reflect("y"),v.data(p),g.data(y));var m=O({},e,{chart:v,options:{widthRatio:l,xField:n,yField:a[0],seriesField:Jr,interval:{color:o,style:s}}});Ce(m);var x=O({},e,{chart:g,options:{xField:n,yField:a[1],seriesField:Jr,widthRatio:l,interval:{color:o,style:s}}});return Ce(x),e}function DM(e){var r,t,i,n=e.options,a=e.chart,o=n.xAxis,s=n.yAxis,l=n.xField,u=n.yField,h=Ot(a,rr),f=Ot(a,ir),v={};return(0,c.keys)((n==null?void 0:n.meta)||{}).map(function(g){(0,c.get)(n==null?void 0:n.meta,[g,"alias"])&&(v[g]=n.meta[g].alias)}),a.scale((r={},r[Jr]={sync:!0,formatter:function(g){return(0,c.get)(v,g,g)}},r)),oe((t={},t[l]=o,t[u[0]]=s[u[0]],t))(O({},e,{chart:h})),oe((i={},i[l]=o,i[u[1]]=s[u[1]],i))(O({},e,{chart:f})),e}function kM(e){var r=e.chart,t=e.options,i=t.xAxis,n=t.yAxis,a=t.xField,o=t.yField,s=t.layout,l=Ot(r,rr),u=Ot(r,ir);return(i==null?void 0:i.position)==="bottom"?u.axis(a,(0,d.__assign)((0,d.__assign)({},i),{label:{formatter:function(){return""}}})):u.axis(a,!1),i===!1?l.axis(a,!1):l.axis(a,(0,d.__assign)({position:gr(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 BM(e){var r=e.chart;return ee(O({},e,{chart:Ot(r,rr)})),ee(O({},e,{chart:Ot(r,ir)})),e}function RM(e){var r=e.chart,t=e.options,i=t.yField,n=t.yAxis;return Xr(O({},e,{chart:Ot(r,rr),options:{yAxis:n[i[0]]}})),Xr(O({},e,{chart:Ot(r,ir),options:{yAxis:n[i[1]]}})),e}function NM(e){var r=e.chart;return Wt(O({},e,{chart:Ot(r,rr)})),Wt(O({},e,{chart:Ot(r,ir)})),Wt(e),e}function zM(e){var r=e.chart;return Kt(O({},e,{chart:Ot(r,rr)})),Kt(O({},e,{chart:Ot(r,ir)})),e}function VM(e){var r=this,t,i,n=e.chart,a=e.options,o=a.label,s=a.yField,l=a.layout,u=Ot(n,rr),h=Ot(n,ir),f=Se(u,"interval"),v=Se(h,"interval");if(!o)f.label(!1),v.label(!1);else{var g=o.callback,p=(0,d.__rest)(o,["callback"]);p.position||(p.position="middle"),p.offset===void 0&&(p.offset=2);var y=(0,d.__assign)({},p);if(gr(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;Cct)throw new Error("circular link");nt=lt,lt=new Set}if(u)for(var Rt=Math.max(Zs(tt,function(Gt){return Gt.depth})+1,0),Vt=void 0,Tt=0;Ttct)throw new Error("circular link");nt=lt,lt=new Set}}function b(H){for(var tt=H.nodes,ct=Math.max(Zs(tt,function(ce){return ce.depth})+1,0),nt=(t-e-n)/(ct-1),lt=new Array(ct).fill(0).map(function(){return[]}),xt=0,Rt=tt;xt0){var Ei=(Gt/qt-Tt.y0)*tt;Tt.y0+=Ei,Tt.y1+=Ei,q(Tt)}}h===void 0&&xt.sort(za),xt.length&&B(xt,ct)}}function L(H,tt,ct){for(var nt=H.length,lt=nt-2;lt>=0;--lt){for(var xt=H[lt],Rt=0,Vt=xt;Rt0){var Ei=(Gt/qt-Tt.y0)*tt;Tt.y0+=Ei,Tt.y1+=Ei,q(Tt)}}h===void 0&&xt.sort(za),xt.length&&B(xt,ct)}}function B(H,tt){var ct=H.length>>1,nt=H[ct];G(H,nt.y0-o,ct-1,tt),I(H,nt.y1+o,ct+1,tt),G(H,i,H.length-1,tt),I(H,r,0,tt)}function I(H,tt,ct,nt){for(;ct1e-6&&(lt.y0+=xt,lt.y1+=xt),tt=lt.y1+o}}function G(H,tt,ct,nt){for(;ct>=0;--ct){var lt=H[ct],xt=(lt.y1-tt)*nt;xt>1e-6&&(lt.y0-=xt,lt.y1-=xt),tt=lt.y0-o}}function q(H){var tt=H.sourceLinks,ct=H.targetLinks;if(f===void 0){for(var nt=0,lt=ct;nt "+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=Ot(this.chart,Va),s=Ot(this.chart,Ga);o.changeData(n),s.changeData(a)},r.prototype.getSchemaAdaptor=function(){return w1},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r}(Mt),S1={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 C1(e,r,t){(0,c.forIn)(e,function(i,n){i.inEdges=r.filter(function(a){return""+t.target(a)==""+n}),i.outEdges=r.filter(function(a){return""+t.source(a)==""+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 A1(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(""+r.id(n)).localeCompare(""+r.id(a))}},i=t[r.sortBy];!i&&(0,c.isFunction)(r.sortBy)&&(i=r.sortBy),i&&e.sort(i)}function F1(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 h=0,f=u-1;f>=0;f--)h+=e[f].width+2*n;var v=l.minX=n+h,g=l.maxX=l.minX+l.width,p=l.minY=r.y-a/2,y=l.maxY=p+a;l.x=[v,g,g,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 E1(e,r,t){if(t.weight){var i={};(0,c.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],h=t.sourceWeight(n),f=s.minX+(s.value-u)/s.value*s.width,v=f+h/s.value*s.width;i[a]-=h;var g=i[o],p=t.targetWeight(n),y=l.minX+(l.value-g)/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 M1(e){return(0,c.assign)({},S1,e)}function T1(e,r){var t=M1(e),i={},n=r.nodes,a=r.links;n.forEach(function(l){var u=t.id(l);i[u]=l}),C1(i,a,t),A1(n,t);var o=F1(n,t),s=E1(i,a,t);return{nodes:o,links:s}}var Sv="x",Cv="y",Av="name",Fv="source",L1={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{labelEmit:!0,style:{fill:"#8c8c8c"},offsetX:i,content:r}}},tooltip:{showTitle:!1,showMarkers:!1,fields:["source","target","value","isNode"],showContent:function(e){return!(0,c.get)(e,[0,"data","isNode"])},formatter:function(e){var r=e.source,t=e.target,i=e.value;return{name:r+" -> "+t,value:i}}},interactions:[{type:"element-active"}],weight:!0,nodePaddingRatio:.1,nodeWidthRatio:.05};function I1(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,h=Zc(t,i,n,a),f=T1({weight:!0,nodePaddingRatio:o,nodeWidthRatio:s},h),v=f.nodes,g=f.links,p=v.map(function(m){return(0,d.__assign)((0,d.__assign)({},Zt(m,(0,d.__spreadArrays)(["id","x","y","name"],u))),{isNode:!0})}),y=g.map(function(m){return(0,d.__assign)((0,d.__assign)({source:m.source.name,target:m.target.name,name:m.source.name||m.target.name},Zt(m,(0,d.__spreadArrays)(["x","y","value"],u))),{isNode:!1})});return(0,d.__assign)((0,d.__assign)({},e),{ext:(0,d.__assign)((0,d.__assign)({},e.ext),{chordData:{nodesData:p,edgesData:y}})})}function O1(e){var r,t=e.chart;return t.scale((r={x:{sync:!0,nice:!0},y:{sync:!0,nice:!0,max:1}},r[Av]={sync:"color"},r[Fv]={sync:"color"},r)),e}function P1(e){var r=e.chart;return r.axis(!1),e}function D1(e){var r=e.chart;return r.legend(!1),e}function k1(e){var r=e.chart,t=e.options,i=t.tooltip;return r.tooltip(i),e}function B1(e){var r=e.chart;return r.coordinate("polar").reflect("y"),e}function R1(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),pa({chart:s,options:{xField:Sv,yField:Cv,seriesField:Av,polygon:{style:n},label:a,tooltip:o}}),e}function N1(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:Sv,yField:Cv,seriesField:Fv,edge:{style:n,shape:"arc"},tooltip:a};return rh({chart:o,options:s}),e}function z1(e){var r=e.chart,t=e.options,i=t.animation;return typeof i=="boolean"?r.animate(i):r.animate(!0),(0,c.each)(lw(r),function(n){n.animate(i)}),e}function V1(e){return _t(Wt,I1,B1,O1,P1,D1,k1,N1,R1,ee,Tr,z1)(e)}var zL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="chord",t}return r.getDefaultOptions=function(){return L1},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return V1},r}(Mt),G1={field:"value",as:["x","y","r"],sort:function(e,r){return r.value-e.value}};function W1(e,r){r=(0,c.assign)({},G1,r);var t=r.as;if(!(0,c.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=ks(r)}catch(u){console.warn(u)}var n=function(u){return Xf().size(r.size).padding(r.padding)(bi(u).sum(function(h){return h[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}),Bs(a)}function Ev(e){var r=e.data,t=e.hierarchyConfig,i=e.rawFields,n=i===void 0?[]:i,a=e.enableDrillDown,o=W1(r,(0,d.__assign)((0,d.__assign)({},t),{field:"value",as:["x","y","r"]})),s=[];return o.forEach(function(l){for(var u,h=l.data.name,f=(0,d.__assign)({},l);f.depth>1;)h=((u=f.parent.data)===null||u===void 0?void 0:u.name)+" / "+h,f=f.parent;if(a&&l.depth>2)return null;var v=O({},l.data,(0,d.__assign)((0,d.__assign)((0,d.__assign)({},Zt(l.data,n)),{path:h}),l));v.ext=t,v[yn]={hierarchyConfig:t,rawFields:n,enableDrillDown:a},s.push(v)}),s}function Mv(e,r,t){var i=ss([e,r]),n=i[0],a=i[1],o=i[2],s=i[3],l=t.width,u=t.height,h=l-(s+a),f=u-(n+o),v=Math.min(h,f),g=(h-v)/2,p=(f-v)/2,y=n+p,m=a+g,x=o+p,_=s+g,w=[y,m,x,_],b=v<0?0:v;return{finalPadding:w,finalSize:b}}var H1=["x","y","r","name","value","path","depth"],Y1={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}};function X1(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 j1(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=ca(t.appendPadding,(0,c.get)(o,["breadCrumb","position"]));s=ss([l,a])}var u=Mv(n,s,i).finalPadding;return t.padding=u,t.appendPadding=0,e}function U1(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,h=t.rawFields,f=h===void 0?[]:h,v=t.drilldown,g=Ev({data:t.data,hierarchyConfig:l,enableDrillDown:v==null?void 0:v.enabled,rawFields:f});r.data(g);var p=r.viewBBox,y=Mv(i,n,p).finalSize,m=function(x){var _=x.r;return _*y};return u&&(m=function(x){return x[u]*y}),ze(O({},e,{options:{xField:"x",yField:"y",seriesField:o,sizeField:u,rawFields:(0,d.__spreadArrays)(H1,f),point:{color:a,style:s,shape:"circle",size:m}}})),e}function Z1(e){return _t(oe({},{x:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0},y:{min:0,max:1,minLimit:0,maxLimit:1,nice:!0}}))(e)}function K1(e){var r=e.chart,t=e.options,i=t.tooltip;if(i===!1)r.tooltip(!1);else{var n=i;(0,c.get)(i,"fields")||(n=O({},{customItems:function(a){return a.map(function(o){var s=(0,c.get)(r.getOptions(),"scales"),l=(0,c.get)(s,["name","formatter"],function(h){return h}),u=(0,c.get)(s,["value","formatter"],function(h){return h});return(0,d.__assign)((0,d.__assign)({},o),{name:l(o.data.name),value:u(o.data.value)})})}},n)),r.tooltip(n)}return e}function q1(e){var r=e.chart;return r.axis(!1),e}function $1(e){var r=e.drilldown,t=e.interactions,i=t===void 0?[]:t;return(r==null?void 0:r.enabled)?O({},e,{interactions:(0,d.__spreadArrays)(i,[{type:"drill-down",cfg:{drillDownConfig:r,transformData:Ev,enableDrillDown:!0}}])}):e}function Q1(e){var r=e.chart,t=e.options;return ee({chart:r,options:$1(t)}),e}function J1(e){return _t(Ne("pointStyle"),X1,j1,Wt,Z1,U1,q1,Yr,K1,Q1,Kt,ae())(e)}var VL=function(e){(0,d.__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 Y1},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return J1},r.prototype.triggerResize=function(){this.chart.destroyed||(this.chart.forceFit(),this.chart.clear(),this.execAdaptor(),this.chart.render(!0))},r}(Mt),GL=function(e){(0,d.__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}(Mt),tT={line:ah,pie:xh,column:xa,bar:dh,area:lh,gauge:uv,"tiny-line":kh,"tiny-column":Bh,"tiny-area":Dh,"ring-progress":Yh,progress:Wh,scatter:Fh,histogram:zh,funnel:yf,stock:df},eT={line:oh,pie:_h,column:vh,bar:gb,area:uh,gauge:hM,"tiny-line":rC,"tiny-column":oC,"tiny-area":lC,"ring-progress":wC,progress:mC,scatter:FS,histogram:gC,funnel:bF,stock:JA},rT={pie:{label:!1},column:{tooltip:{showMarkers:!1}},bar:{tooltip:{showMarkers:!1}}};function qs(e,r,t){var i=eT[e];if(!i){console.error("could not find "+e+" plot");return}var n=tT[e];n({chart:r,options:O({},i.getDefaultOptions(),(0,c.get)(rT,e,{}),t)})}function iT(e){var r=e.chart,t=e.options,i=t.views,n=t.legend;return(0,c.each)(i,function(a){var o=a.region,s=a.data,l=a.meta,u=a.axes,h=a.coordinate,f=a.interactions,v=a.annotations,g=a.tooltip,p=a.geometries,y=r.createView({region:o});y.data(s);var m={};u&&(0,c.each)(u,function(x,_){m[_]=Zt(x,Oe)}),m=O({},l,m),y.scale(m),u?(0,c.each)(u,function(x,_){y.axis(_,x)}):y.axis(!1),y.coordinate(h),(0,c.each)(p,function(x){var _=Pe({chart:y,options:x}).ext,w=x.adjust;w&&_.geometry.adjust(w)}),(0,c.each)(f,function(x){x.enable===!1?y.removeInteraction(x.type):y.interaction(x.type,x.cfg)}),(0,c.each)(v,function(x){y.annotation()[x.type]((0,d.__assign)({},x))}),typeof a.animation=="boolean"?y.animate(!1):(y.animate(!0),(0,c.each)(y.geometries,function(x){x.animate(a.animation)})),g&&(y.interaction("tooltip"),y.tooltip(g))}),n?(0,c.each)(n,function(a,o){r.legend(o,a)}):r.legend(!1),r.tooltip(t.tooltip),e}function nT(e){var r=e.chart,t=e.options,i=t.plots,n=t.data,a=n===void 0?[]:n;return(0,c.each)(i,function(o){var s=o.type,l=o.region,u=o.options,h=u===void 0?{}:u,f=o.top,v=h.tooltip;if(f){qs(s,r,(0,d.__assign)((0,d.__assign)({},h),{data:a}));return}var g=r.createView((0,d.__assign)({region:l},Zt(h,Qc)));v&&g.interaction("tooltip"),qs(s,g,(0,d.__assign)({data:a},h))}),e}function aT(e){var r=e.chart,t=e.options;return r.option("slider",t.slider),e}function oT(e){return _t(Kt,iT,nT,ee,Kt,Wt,he,aT,ae())(e)}function sT(e,r){var t=e.getModel(),i=t.data,n;return(0,c.isArray)(i)?n=i[0][r]:n=i[r],n}function lT(e){var r=la(e);(0,c.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 uT=function(e){(0,d.__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 h=a.data.data;(0,c.each)(t,function(f){var v,g,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=(g=f.getGroupScales()[0])===null||g===void 0?void 0:g.field),!!p){var y=(0,c.map)(la(f),function(m){var x=!1,_=!1,w=(0,c.isArray)(h)?(0,c.get)(h[0],p):(0,c.get)(h,p);return sT(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=Gc(this.context.view),n=this.getAssociationItems(i,t);(0,c.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=Gc(this.context.view);(0,c.each)(t,function(i){i.hideTooltip()})},r.prototype.active=function(t){var i=an(this.context.view),n=this.getAssociationItems(i,t);(0,c.each)(n,function(a){var o=a.active,s=a.element;o&&s.setState("active",!0)})},r.prototype.selected=function(t){var i=an(this.context.view),n=this.getAssociationItems(i,t);(0,c.each)(n,function(a){var o=a.active,s=a.element;o&&s.setState("selected",!0)})},r.prototype.highlight=function(t){var i=an(this.context.view),n=this.getAssociationItems(i,t);(0,c.each)(n,function(a){var o=a.inactive,s=a.element;o&&s.setState("inactive",!0)})},r.prototype.reset=function(){var t=an(this.context.view);(0,c.each)(t,function(i){lT(i)})},r}(ie);yt("association",uT),Et("association-active",{start:[{trigger:"element:mouseenter",action:"association:active"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Et("association-selected",{start:[{trigger:"element:mouseenter",action:"association:selected"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Et("association-highlight",{start:[{trigger:"element:mouseenter",action:"association:highlight"}],end:[{trigger:"element:mouseleave",action:"association:reset"}]}),Et("association-tooltip",{start:[{trigger:"element:mousemove",action:"association:showTooltip"}],end:[{trigger:"element:mouseleave",action:"association:hideTooltip"}]});var cT=function(e){(0,d.__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 oT},r}(Mt);function hT(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,h=r.geometries;t&&e.data(t);var f={};l&&(0,c.each)(l,function(v,g){f[g]=Zt(v,Oe)}),f=O({},u,f),e.scale(f),i&&e.coordinate(i),l===!1?e.axis(!1):(0,c.each)(l,function(v,g){e.axis(g,v)}),(0,c.each)(h,function(v){var g=Pe({chart:e,options:v}).ext,p=v.adjust;p&&g.geometry.adjust(p)}),(0,c.each)(n,function(v){v.enable===!1?e.removeInteraction(v.type):e.interaction(v.type,v.cfg)}),(0,c.each)(a,function(v){e.annotation()[v.type]((0,d.__assign)({},v))}),typeof o=="boolean"?e.animate(!1):(e.animate(!0),(0,c.each)(e.geometries,function(v){v.animate(o)})),s?(e.interaction("tooltip"),e.tooltip(s)):s===!1&&e.removeInteraction("tooltip")}function fT(e){var r=e.chart,t=e.options,i=t.type,n=t.data,a=t.fields,o=t.eachView,s=(0,c.omit)(t,["type","data","fields","eachView","axes","meta","tooltip","coordinate","theme","legend","interactions","annotations"]);return r.data(n),r.facet(i,(0,d.__assign)((0,d.__assign)({},s),{fields:a,eachView:function(l,u){var h=o(l,u);if(h.geometries)hT(l,h);else{var f=h,v=f.options;v.tooltip&&l.interaction("tooltip"),qs(f.type,l,v)}}})),e}function vT(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,h=t.annotations,f={};return i&&(0,c.each)(i,function(v,g){f[g]=Zt(v,Oe)}),f=O({},n,f),r.scale(f),r.coordinate(o),i?(0,c.each)(i,function(v,g){r.axis(g,v)}):r.axis(!1),a?(r.interaction("tooltip"),r.tooltip(a)):a===!1&&r.removeInteraction("tooltip"),r.legend(l),s&&r.theme(s),(0,c.each)(u,function(v){v.enable===!1?r.removeInteraction(v.type):r.interaction(v.type,v.cfg)}),(0,c.each)(h,function(v){r.annotation()[v.type]((0,d.__assign)({},v))}),e}function dT(e){return _t(Wt,fT,vT)(e)}var gT={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)"}}},WL=function(e){(0,d.__extends)(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.type="area",t}return r.getDefaultOptions=function(){return gT},r.prototype.getDefaultOptions=function(){return r.getDefaultOptions()},r.prototype.getSchemaAdaptor=function(){return dT},r}(Mt),Ai;(function(e){e.DEV="DEV",e.BETA="BETA",e.STABLE="STABLE"})(Ai||(Ai={}));function pT(e,r){console.warn(e===Ai.DEV?"Plot '"+r+"' is in DEV stage, just give us issues.":e===Ai.BETA?"Plot '"+r+"' is in BETA stage, DO NOT use it in production env.":e===Ai.STABLE?"Plot '"+r+`' is in STABLE stage, import it by "import { `+r+` } from '@antv/g2plot'".`:"invalid Stage type.")}var HL=function(){function e(){}return Object.defineProperty(e,"MultiView",{get:function(){return pT(Ai.STABLE,"MultiView"),cT},enumerable:!1,configurable:!0}),e}(),YL="2.4.20";qc("en-US",_w),qc("zh-CN",ww);var XL={scale:oe,legend:Yr,tooltip:he,annotation:ae,interaction:ee,theme:Wt,animation:Kt}},80638:function(){},15746:function(Lt,it,F){"use strict";var R=F(21584);it.Z=R.Z},89032:function(Lt,it,F){"use strict";var R=F(38663),Q=F.n(R),gt=F(6999)},99134:function(Lt,it,F){"use strict";var R=F(67294),Q=(0,R.createContext)({});it.Z=Q},21584:function(Lt,it,F){"use strict";var R=F(96156),Q=F(22122),gt=F(90484),ht=F(94184),ot=F.n(ht),rt=F(67294),J=F(53124),$=F(99134),d=function(z,j){var A={};for(var D in z)Object.prototype.hasOwnProperty.call(z,D)&&j.indexOf(D)<0&&(A[D]=z[D]);if(z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var V=0,D=Object.getOwnPropertySymbols(z);V0){var Pt=K[0]/2;dt.paddingLeft=Pt,dt.paddingRight=Pt}if(K&&K[1]>0&&!Ht){var St=K[1]/2;dt.paddingTop=St,dt.paddingBottom=St}return N&&(dt.flex=c(N),At===!1&&!dt.minWidth&&(dt.minWidth=0)),rt.createElement("div",(0,Q.Z)({},X,{style:(0,Q.Z)((0,Q.Z)({},dt),P),className:vt,ref:j}),W)});it.Z=T},92820:function(Lt,it,F){"use strict";var R=F(22122),Q=F(96156),gt=F(90484),ht=F(28481),ot=F(94184),rt=F.n(ot),J=F(67294),$=F(53124),d=F(98082),c=F(24308),Z=F(93355),T=F(99134),z=function(V,et){var at={};for(var K in V)Object.prototype.hasOwnProperty.call(V,K)&&et.indexOf(K)<0&&(at[K]=V[K]);if(V!=null&&typeof Object.getOwnPropertySymbols=="function")for(var At=0,K=Object.getOwnPropertySymbols(V);At0?pt[0]/-2:void 0,Ct=pt[1]!=null&&pt[1]>0?pt[1]/-2:void 0;if(It&&(Dt.marginLeft=It,Dt.marginRight=It),dt){var kt=(0,ht.Z)(pt,2);Dt.rowGap=kt[1]}else Ct&&(Dt.marginTop=Ct,Dt.marginBottom=Ct);var Nt=(0,ht.Z)(pt,2),Xt=Nt[0],Jt=Nt[1],me=J.useMemo(function(){return{gutter:[Xt,Jt],wrap:k,supportFlexGap:dt}},[Xt,Jt,k,dt]);return J.createElement(T.Z.Provider,{value:me},J.createElement("div",(0,R.Z)({},Y,{className:ut,style:(0,R.Z)((0,R.Z)({},Dt),Yt),ref:et}),re))});it.Z=D},6999:function(Lt,it,F){"use strict";var R=F(38663),Q=F.n(R),gt=F(80638),ht=F.n(gt)},71230:function(Lt,it,F){"use strict";var R=F(92820);it.Z=R.Z},13062:function(Lt,it,F){"use strict";var R=F(38663),Q=F.n(R),gt=F(6999)},56645:function(Lt,it){(function(F,R){R(it)})(this,function(F){"use strict";function R(E,k){return Q(E)||gt(E,k)||ht()}function Q(E){if(Array.isArray(E))return E}function gt(E,k){var Y=[],W=!0,N=!1,P=void 0;try{for(var X=E[Symbol.iterator](),U;!(W=(U=X.next()).done)&&(Y.push(U.value),!(k&&Y.length===k));W=!0);}catch(st){N=!0,P=st}finally{try{!W&&X.return!=null&&X.return()}finally{if(N)throw P}}return Y}function ht(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function ot(E,k,Y,W){E=E.filter(function(pt,ut){var Dt=k(pt,ut),It=Y(pt,ut);return Dt!=null&&isFinite(Dt)&&It!=null&&isFinite(It)}),W&&E.sort(function(pt,ut){return k(pt)-k(ut)});for(var N=E.length,P=new Float64Array(N),X=new Float64Array(N),U=0,st=0,vt,dt,Pt,St=0;StN&&(dt.splice(Ft+1,0,It),St=!0)}return St}}function Z(E,k,Y,W){var N=W-E*E,P=Math.abs(N)<1e-24?0:(Y-E*k)/N,X=k-P*E;return[X,P]}function T(){var E=function(P){return P[0]},k=function(P){return P[1]},Y;function W(N){var P=0,X=0,U=0,st=0,vt=0,dt=0,Pt=Y?+Y[0]:Infinity,St=Y?+Y[1]:-Infinity;rt(N,E,k,function(kt,Nt){var Xt=Math.log(Nt),Jt=kt*Nt;++P,X+=(Nt-X)/P,st+=(Jt-st)/P,dt+=(kt*Jt-dt)/P,U+=(Nt*Xt-U)/P,vt+=(Jt*Xt-vt)/P,Y||(ktSt&&(St=kt))});var Ft=Z(st/X,U/X,vt/X,dt/X),pt=R(Ft,2),ut=pt[0],Dt=pt[1];ut=Math.exp(ut);var It=function(Nt){return ut*Math.exp(Dt*Nt)},Ct=c(Pt,St,It);return Ct.a=ut,Ct.b=Dt,Ct.predict=It,Ct.rSquared=J(N,E,k,X,It),Ct}return W.domain=function(N){return arguments.length?(Y=N,W):Y},W.x=function(N){return arguments.length?(E=N,W):E},W.y=function(N){return arguments.length?(k=N,W):k},W}function z(){var E=function(P){return P[0]},k=function(P){return P[1]},Y;function W(N){var P=0,X=0,U=0,st=0,vt=0,dt=Y?+Y[0]:Infinity,Pt=Y?+Y[1]:-Infinity;rt(N,E,k,function(Ct,kt){++P,X+=(Ct-X)/P,U+=(kt-U)/P,st+=(Ct*kt-st)/P,vt+=(Ct*Ct-vt)/P,Y||(CtPt&&(Pt=Ct))});var St=Z(X,U,st,vt),Ft=R(St,2),pt=Ft[0],ut=Ft[1],Dt=function(kt){return ut*kt+pt},It=[[dt,Dt(dt)],[Pt,Dt(Pt)]];return It.a=ut,It.b=pt,It.predict=Dt,It.rSquared=J(N,E,k,U,Dt),It}return W.domain=function(N){return arguments.length?(Y=N,W):Y},W.x=function(N){return arguments.length?(E=N,W):E},W.y=function(N){return arguments.length?(k=N,W):k},W}function j(E){E.sort(function(Y,W){return Y-W});var k=E.length/2;return k%1==0?(E[k-1]+E[k])/2:E[Math.floor(k)]}var A=2,D=1e-12;function V(){var E=function(P){return P[0]},k=function(P){return P[1]},Y=.3;function W(N){for(var P=ot(N,E,k,!0),X=R(P,4),U=X[0],st=X[1],vt=X[2],dt=X[3],Pt=U.length,St=Math.max(2,~~(Y*Pt)),Ft=new Float64Array(Pt),pt=new Float64Array(Pt),ut=new Float64Array(Pt).fill(1),Dt=-1;++Dt<=A;){for(var It=[0,St-1],Ct=0;CtU[Xt]-kt?Nt:Xt,me=0,fe=0,ge=0,xe=0,ve=0,De=1/Math.abs(U[Jt]-kt||1),_e=Nt;_e<=Xt;++_e){var de=U[_e],pe=st[_e],ke=et(Math.abs(kt-de)*De)*ut[_e],We=de*ke;me+=ke,fe+=We,ge+=pe*ke,xe+=pe*We,ve+=de*We}var ei=Z(fe/me,ge/me,xe/me,ve/me),Wa=R(ei,2),el=Wa[0],rl=Wa[1];Ft[Ct]=el+rl*kt,pt[Ct]=Math.abs(st[Ct]-Ft[Ct]),at(U,Ct+1,It)}if(Dt===A)break;var Ha=j(pt);if(Math.abs(Ha)=1?D:(Ya=1-Ti*Ti)*Ya}return K(U,Ft,vt,dt)}return W.bandwidth=function(N){return arguments.length?(Y=N,W):Y},W.x=function(N){return arguments.length?(E=N,W):E},W.y=function(N){return arguments.length?(k=N,W):k},W}function et(E){return(E=1-E*E*E)*E*E}function at(E,k,Y){var W=E[k],N=Y[0],P=Y[1]+1;if(!(P>=E.length))for(;k>N&&E[P]-W<=W-E[N];)Y[0]=++N,Y[1]=P,++P}function K(E,k,Y,W){for(var N=E.length,P=[],X=0,U=0,st=[],vt;XSt&&(St=Nt))});var pt=Z(U,st,vt,dt),ut=R(pt,2),Dt=ut[0],It=ut[1],Ct=function(Xt){return It*Math.log(Xt)/Ft+Dt},kt=c(Pt,St,Ct);return kt.a=It,kt.b=Dt,kt.predict=Ct,kt.rSquared=J(P,E,k,st,Ct),kt}return N.domain=function(P){return arguments.length?(W=P,N):W},N.x=function(P){return arguments.length?(E=P,N):E},N.y=function(P){return arguments.length?(k=P,N):k},N.base=function(P){return arguments.length?(Y=P,N):Y},N}function Ht(){var E=function(P){return P[0]},k=function(P){return P[1]},Y;function W(N){var P=ot(N,E,k),X=R(P,4),U=X[0],st=X[1],vt=X[2],dt=X[3],Pt=U.length,St=0,Ft=0,pt=0,ut=0,Dt=0,It,Ct,kt,Nt;for(It=0;Itfe&&(fe=ke))});var ge=pt-St*St,xe=St*ge-Ft*Ft,ve=(Dt*St-ut*Ft)/xe,De=(ut*ge-Dt*Ft)/xe,_e=-ve*St,de=function(We){return We=We-vt,ve*We*We+De*We+_e+dt},pe=c(me,fe,de);return pe.a=ve,pe.b=De-2*ve*vt,pe.c=_e-De*vt+ve*vt*vt+dt,pe.predict=de,pe.rSquared=J(N,E,k,Xt,de),pe}return W.domain=function(N){return arguments.length?(Y=N,W):Y},W.x=function(N){return arguments.length?(E=N,W):E},W.y=function(N){return arguments.length?(k=N,W):k},W}function $t(){var E=function(X){return X[0]},k=function(X){return X[1]},Y=3,W;function N(P){if(Y===1){var X=z().x(E).y(k).domain(W)(P);return X.coefficients=[X.b,X.a],delete X.a,delete X.b,X}if(Y===2){var U=Ht().x(E).y(k).domain(W)(P);return U.coefficients=[U.c,U.b,U.a],delete U.a,delete U.b,delete U.c,U}var st=ot(P,E,k),vt=R(st,4),dt=vt[0],Pt=vt[1],St=vt[2],Ft=vt[3],pt=dt.length,ut=[],Dt=[],It=Y+1,Ct=0,kt=0,Nt=W?+W[0]:Infinity,Xt=W?+W[1]:-Infinity;rt(P,E,k,function(de,pe){++kt,Ct+=(pe-Ct)/kt,W||(deXt&&(Xt=de))});var Jt,me,fe,ge,xe;for(Jt=0;Jt=0;--P)for(U=k[P],st=1,N[P]+=U,X=1;X<=P;++X)st*=(P+1-X)/X,N[P-X]+=U*Math.pow(Y,X)*st;return N[0]+=W,N}function re(E){var k=E.length-1,Y=[],W,N,P,X,U;for(W=0;WMath.abs(E[W][X])&&(X=N);for(P=W;P=W;P--)E[P][N]-=E[P][W]*E[W][N]/E[W][W]}for(N=k-1;N>=0;--N){for(U=0,P=N+1;PSt&&(St=kt))});var Ft=Z(X,U,st,vt),pt=R(Ft,2),ut=pt[0],Dt=pt[1];ut=Math.exp(ut);var It=function(Nt){return ut*Math.pow(Nt,Dt)},Ct=c(Pt,St,It);return Ct.a=ut,Ct.b=Dt,Ct.predict=It,Ct.rSquared=J(N,E,k,dt,It),Ct}return W.domain=function(N){return arguments.length?(Y=N,W):Y},W.x=function(N){return arguments.length?(E=N,W):E},W.y=function(N){return arguments.length?(k=N,W):k},W}F.regressionExp=T,F.regressionLinear=z,F.regressionLoess=V,F.regressionLog=At,F.regressionPoly=$t,F.regressionPow=bt,F.regressionQuad=Ht,Object.defineProperty(F,"__esModule",{value:!0})})},87026:function(Lt,it){(function(F,R){R(it)})(this,function(F){"use strict";function R(z,j,A,D){D=D||{};var V=D.maxIterations||100,et=D.tolerance||1e-10,at=z(j),K=z(A),At=A-j;if(at*K>0)throw"Initial bisect points must have opposite signs";if(at===0)return j;if(K===0)return A;for(var Ht=0;Ht=0&&(j=$t),Math.abs(At)=E[bt-1].fx){var Ft=!1;if(X.fx>St.fx?(J(U,1+$t,P,-$t,St),U.fx=z(U),U.fx=1)break;for(k=1;kK+et*V*At||Ht>=W)Y=V;else{if(Math.abs(Yt)<=-at*At)return V;Yt*(Y-k)>=0&&(Y=k),k=V,W=Ht}return 0}for(var E=0;E<10;++E){if(J(D.x,1,A.x,V,j),Ht=D.fx=z(D.x,D.fxprime),Yt=ht(D.fxprime,j),Ht>K+et*V*At||E&&Ht>=$t)return bt(re,V,$t);if(Math.abs(Yt)<=-at*At)return V;if(Yt>=0)return bt(V,re,Ht);$t=Ht,re=V,V*=2}return V}function c(z,j,A){var D={x:j.slice(),fx:0,fxprime:j.slice()},V={x:j.slice(),fx:0,fxprime:j.slice()},et=j.slice(),at,K,At=1,Ht;A=A||{},Ht=A.maxIterations||j.length*20,D.fx=z(D.x,D.fxprime),at=D.fxprime.slice(),rt(at,D.fxprime,-1);for(var $t=0;$t=V.length)){var Y=Math.max(k-Z,0),W=k,N=Math.min(k+Z,V.length-1),P=Y-(k-Z),X=k+Z-N,U=K[-Z-1+P]||0,st=K[-Z-1+X]||0,vt=At/(At-U-st);P>0&&($t+=vt*(P-1)*Ht);var dt=Math.max(0,k-Z+1);ot.inside(0,V.length-1,dt)&&(V[dt].y+=vt*1*Ht),ot.inside(0,V.length-1,W+1)&&(V[W+1].y-=vt*2*Ht),ot.inside(0,V.length-1,N+1)&&(V[N+1].y+=vt*1*Ht)}});var Yt=$t,re=0,bt=0;return V.forEach(function(E){re+=E.y,Yt+=re,E.y=Yt,bt+=Yt}),bt>0&&V.forEach(function(E){E.y/=bt}),V};function J($,d){for(var c={},Z=0,T=-d;T<=d;T++)Z+=$(T/d),c[T]=Z;return c}Lt.exports.getExpectedValueFromPdf=function($){if(!(!$||$.length===0)){var d=0;return $.forEach(function(c){d+=c.x*c.y}),d}},Lt.exports.getXWithLeftTailArea=function($,d){if(!(!$||$.length===0)){for(var c=0,Z=0,T=0;T<$.length&&(Z=T,c+=$[T].y,!(c>=d));T++);return $[Z].x}},Lt.exports.getPerplexity=function($){if(!(!$||$.length===0)){var d=0;return $.forEach(function(c){var Z=Math.log(c.y);isFinite(Z)&&(d+=c.y*Z)}),d=-d/gt,Math.pow(2,d)}}},55168:function(Lt,it){"use strict";Object.defineProperty(it,"__esModule",{value:!0}),it.SensorTabIndex=it.SensorClassName=it.SizeSensorId=void 0;var F="size-sensor-id";it.SizeSensorId=F;var R="size-sensor-object";it.SensorClassName=R;var Q="-1";it.SensorTabIndex=Q},12177:function(Lt,it){"use strict";Object.defineProperty(it,"__esModule",{value:!0}),it.default=void 0;var F=function(Q){var gt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,ht=null;return function(){for(var ot=this,rt=arguments.length,J=new Array(rt),$=0;$