File: /var/www/uileague/cms/js/chunk-0a1018ea.03ee2d9c.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0a1018ea"],{"01f97":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("bd8b");e.default=function(t){return Array.isArray?Array.isArray(t):n.default(t,"Array")}},"06ef":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){return"object"===typeof t&&null!==t};e.default=n},"0b63":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("8937");function r(t){var e=[],i=t.x,r=t.y;return r=n.isArray(r)?r:[r],n.each(r,(function(t,r){var a={x:n.isArray(i)?i[r]:i,y:t};e.push(a)})),e}function a(t,e){var i=e.color,r=e.opacity;i&&(t.fill=i),n.isNumber(r)&&(t.opacity=t.fillOpacity=r)}function o(t,e){var i=e.color,r=e.opacity;i&&(t.stroke=i),n.isNumber(r)&&(t.opacity=t.strokeOpacity=r)}e.splitPoints=r,e.setFillStyle=a,e.setStrokeStyle=o},"19dd":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="*",r=function(){function t(){this._events={}}return t.prototype.on=function(t,e,i){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!i}),this},t.prototype.once=function(t,e){return this.on(t,e,!0),this},t.prototype.emit=function(t){for(var e=this,i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];var a=this._events[t]||[],o=this._events[n]||[],s=function(n){for(var r=n.length,a=0;a<r;a++){var o=n[a],s=o.callback,l=o.once;l&&(n.splice(a,1),0===n.length&&delete e._events[t],r--,a--),s.apply(e,i)}};s(a),s(o)},t.prototype.off=function(t,e){if(t)if(e){for(var i=this._events[t]||[],n=i.length,r=0;r<n;r++)i[r].callback===e&&(i.splice(r,1),n--,r--);0===i.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},t.prototype.getEvents=function(){return this._events},t}();e.default=r},"1ca4":function(t,e,i){!function(e,i){t.exports=i()}(window,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=20)}([function(t,e,i){var n;n=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=40)}([function(t,e,i){var n=i(16),r=i(1);t.exports=function(t,e){if(t)if(r(t))for(var i=0,a=t.length;i<a&&!1!==e(t[i],i);i++);else if(n(t))for(var o in t)if(t.hasOwnProperty(o)&&!1===e(t[o],o))break}},function(t,e,i){var n=i(2),r=Array.isArray?Array.isArray:function(t){return n(t,"Array")};t.exports=r},function(t,e){var i={}.toString;t.exports=function(t,e){return i.call(t)==="[object "+e+"]"}},function(t,e,i){var n=i(2);t.exports=function(t){return n(t,"Function")}},function(t,e){t.exports=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)}},function(t,e){t.exports=function(t){return null==t}},function(t,e,i){var n=i(2);t.exports=function(t){return n(t,"Number")}},function(t,e,i){var n=i(13),r=i(2);t.exports=function(t){if(!n(t)||!r(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}},function(t,e,i){var n=i(5);t.exports=function(t){return n(t)?"":t.toString()}},function(t,e,i){var n=i(4),r=Array.prototype.indexOf;t.exports=function(t,e){return!!n(t)&&r.call(t,e)>-1}},function(t,e,i){var n=i(2);t.exports=function(t){return n(t,"String")}},function(t,e){function i(t,e){for(var i in e)e.hasOwnProperty(i)&&"constructor"!==i&&void 0!==e[i]&&(t[i]=e[i])}t.exports=function(t,e,n,r){return e&&i(t,e),n&&i(t,n),r&&i(t,r),t}},function(t,e,i){var n=i(0),r=i(4);t.exports=function(t,e){if(!r(t))return t;var i=[];return n(t,(function(t,n){e(t,n)&&i.push(t)})),i}},function(t,e){var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){return"object"===(void 0===t?"undefined":i(t))&&null!==t}},function(t,e,i){var n=i(4);t.exports=function(t){return n(t)?Array.prototype.slice.call(t):[]}},function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=t},e.toRadian=function(t){return t*n},e.equals=function(t,e){return Math.abs(t-e)<=i*Math.max(1,Math.abs(t),Math.abs(e))};var i=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;var n=Math.PI/180},function(t,e){var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var e=void 0===t?"undefined":i(t);return null!==t&&"object"===e||"function"===e}},function(t,e,i){var n=i(18),r=i(5);t.exports=function(t,e){var i=n(e),a=i.length;if(r(t))return!a;for(var o=0;o<a;o+=1){var s=i[o];if(e[s]!==t[s]||!(s in t))return!1}return!0}},function(t,e,i){var n=i(0),r=i(3),a=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return n(t,(function(i,n){r(t)&&"prototype"===n||e.push(n)})),e};t.exports=a},function(t,e,i){var n=i(4),r=Array.prototype.splice;t.exports=function(t,e){if(!n(t))return[];for(var i=t?e.length:0,a=i-1;i--;){var o=void 0,s=e[i];i!==a&&s===o||(o=s,r.call(t,s,1))}return t}},function(t,e,i){var n=i(0),r=i(9);t.exports=function(t){var e=[];return n(t,(function(t){r(e,t)||e.push(t)})),e}},function(t,e){t.exports=function(t,e,i){return t<e?e:t>i?i:t}},function(t,e){t.exports=parseInt},function(t,e,i){var n=i(89);n.translate=function(t,e,i){var r=new Array(9);return n.fromTranslation(r,i),n.multiply(t,r,e)},n.rotate=function(t,e,i){var r=new Array(9);return n.fromRotation(r,i),n.multiply(t,r,e)},n.scale=function(t,e,i){var r=new Array(9);return n.fromScaling(r,i),n.multiply(t,r,e)},t.exports=n},function(t,e,i){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=i(1);t.exports=function t(e){if("object"!==(void 0===e?"undefined":n(e))||null===e)return e;var i=void 0;if(r(e)){i=[];for(var a=0,o=e.length;a<o;a++)"object"===n(e[a])&&null!=e[a]?i[a]=t(e[a]):i[a]=e[a]}else for(var s in i={},e)"object"===n(e[s])&&null!=e[s]?i[s]=t(e[s]):i[s]=e[s];return i}},function(t,e){t.exports=function(t,e){return t.hasOwnProperty(e)}},function(t,e,i){var n=i(0),r=i(3),a=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return n(t,(function(i,n){r(t)&&"prototype"===n||e.push(i)})),e};t.exports=a},function(t,e,i){var n=i(28);t.exports=function(t,e,i,r,a){if(a)return[["M",+t+ +a,e],["l",i-2*a,0],["a",a,a,0,0,1,a,a],["l",0,r-2*a],["a",a,a,0,0,1,-a,a],["l",2*a-i,0],["a",a,a,0,0,1,-a,-a],["l",0,2*a-r],["a",a,a,0,0,1,a,-a],["z"]];var o=[["M",t,e],["l",i,0],["l",0,r],["l",-i,0],["z"]];return o.parsePathArray=n,o}},function(t,e){var i=/,?([a-z]),?/gi;t.exports=function(t){return t.join(",").replace(i,"$1")}},function(t,e,i){var n=i(30),r=function t(e,i,n,r,a,o,s,l,u,h){n===r&&(n+=1);var c=120*Math.PI/180,p=Math.PI/180*(+a||0),f=[],d=void 0,g=void 0,v=void 0,y=void 0,m=void 0,x=function(t,e,i){return{x:t*Math.cos(i)-e*Math.sin(i),y:t*Math.sin(i)+e*Math.cos(i)}};if(h)g=h[0],v=h[1],y=h[2],m=h[3];else{e=(d=x(e,i,-p)).x,i=d.y,l=(d=x(l,u,-p)).x,u=d.y,e===l&&i===u&&(l+=1,u+=1);var b=(e-l)/2,_=(i-u)/2,w=b*b/(n*n)+_*_/(r*r);w>1&&(n*=w=Math.sqrt(w),r*=w);var M=n*n,S=r*r,k=(o===s?-1:1)*Math.sqrt(Math.abs((M*S-M*_*_-S*b*b)/(M*_*_+S*b*b)));y=k*n*_/r+(e+l)/2,m=k*-r*b/n+(i+u)/2,g=Math.asin(((i-m)/r).toFixed(9)),v=Math.asin(((u-m)/r).toFixed(9)),g=e<y?Math.PI-g:g,v=l<y?Math.PI-v:v,g<0&&(g=2*Math.PI+g),v<0&&(v=2*Math.PI+v),s&&g>v&&(g-=2*Math.PI),!s&&v>g&&(v-=2*Math.PI)}var O=v-g;if(Math.abs(O)>c){var C=v,A=l,L=u;v=g+c*(s&&v>g?1:-1),f=t(l=y+n*Math.cos(v),u=m+r*Math.sin(v),n,r,a,0,s,A,L,[v,C,y,m])}O=v-g;var P=Math.cos(g),j=Math.sin(g),T=Math.cos(v),B=Math.sin(v),I=Math.tan(O/4),D=4/3*n*I,F=4/3*r*I,E=[e,i],R=[e+D*j,i-F*P],z=[l+D*B,u-F*T],N=[l,u];if(R[0]=2*E[0]-R[0],R[1]=2*E[1]-R[1],h)return[R,z,N].concat(f);for(var Y=[],H=0,G=(f=[R,z,N].concat(f).join().split(",")).length;H<G;H++)Y[H]=H%2?x(f[H-1],f[H],p).y:x(f[H],f[H+1],p).x;return Y},a=function(t,e,i,n){return[t,e,i,n,i,n]},o=function(t,e,i,n,r,a){return[1/3*t+2/3*i,1/3*e+2/3*n,1/3*r+2/3*i,1/3*a+2/3*n,r,a]};t.exports=function(t,e){var i=n(t),s=e&&n(e),l={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},u={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},h=[],c=[],p="",f="",d=void 0,g=function(t,e,i){var n=void 0,s=void 0;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"].concat(r.apply(0,[e.x,e.y].concat(t.slice(1))));break;case"S":"C"===i||"S"===i?(n=2*e.x-e.bx,s=2*e.y-e.by):(n=e.x,s=e.y),t=["C",n,s].concat(t.slice(1));break;case"T":"Q"===i||"T"===i?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"].concat(o(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"].concat(o(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"].concat(a(e.x,e.y,t[1],t[2]));break;case"H":t=["C"].concat(a(e.x,e.y,t[1],e.y));break;case"V":t=["C"].concat(a(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"].concat(a(e.x,e.y,e.X,e.Y))}return t},v=function(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)h[e]="A",s&&(c[e]="A"),t.splice(e++,0,["C"].concat(n.splice(0,6)));t.splice(e,1),d=Math.max(i.length,s&&s.length||0)}},y=function(t,e,n,r,a){t&&e&&"M"===t[a][0]&&"M"!==e[a][0]&&(e.splice(a,0,["M",r.x,r.y]),n.bx=0,n.by=0,n.x=t[a][1],n.y=t[a][2],d=Math.max(i.length,s&&s.length||0))};d=Math.max(i.length,s&&s.length||0);for(var m=0;m<d;m++){i[m]&&(p=i[m][0]),"C"!==p&&(h[m]=p,m&&(f=h[m-1])),i[m]=g(i[m],l,f),"A"!==h[m]&&"C"===p&&(h[m]="C"),v(i,m),s&&(s[m]&&(p=s[m][0]),"C"!==p&&(c[m]=p,m&&(f=c[m-1])),s[m]=g(s[m],u,f),"A"!==c[m]&&"C"===p&&(c[m]="C"),v(s,m)),y(i,s,l,u,m),y(s,i,u,l,m);var x=i[m],b=s&&s[m],_=x.length,w=s&&b.length;l.x=x[_-2],l.y=x[_-1],l.bx=parseFloat(x[_-4])||l.x,l.by=parseFloat(x[_-3])||l.y,u.bx=s&&(parseFloat(b[w-4])||u.x),u.by=s&&(parseFloat(b[w-3])||u.y),u.x=s&&b[w-2],u.y=s&&b[w-1]}return s?[i,s]:i}},function(t,e,i){var n=i(31),r=i(32);function a(t,e,i,n,r){var a=[];if(null===r&&null===n&&(n=i),t=+t,e=+e,i=+i,n=+n,null!==r){var o=Math.PI/180,s=t+i*Math.cos(-n*o),l=t+i*Math.cos(-r*o);a=[["M",s,e+i*Math.sin(-n*o)],["A",i,i,0,+(r-n>180),0,l,e+i*Math.sin(-r*o)]]}else a=[["M",t,e],["m",0,-n],["a",i,n,0,1,1,0,2*n],["a",i,n,0,1,1,0,-2*n],["z"]];return a}t.exports=function(t){if(!(t=n(t))||!t.length)return[["M",0,0]];var e=[],i=0,o=0,s=0,l=0,u=0,h=void 0,c=void 0;"M"===t[0][0]&&(s=i=+t[0][1],l=o=+t[0][2],u++,e[0]=["M",i,o]);for(var p,f,d=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),g=u,v=t.length;g<v;g++){if(e.push(p=[]),(h=(f=t[g])[0])!==h.toUpperCase())switch(p[0]=h.toUpperCase(),p[0]){case"A":p[1]=f[1],p[2]=f[2],p[3]=f[3],p[4]=f[4],p[5]=f[5],p[6]=+f[6]+i,p[7]=+f[7]+o;break;case"V":p[1]=+f[1]+o;break;case"H":p[1]=+f[1]+i;break;case"R":for(var y=2,m=(c=[i,o].concat(f.slice(1))).length;y<m;y++)c[y]=+c[y]+i,c[++y]=+c[y]+o;e.pop(),e=e.concat(r(c,d));break;case"O":e.pop(),(c=a(i,o,f[1],f[2])).push(c[0]),e=e.concat(c);break;case"U":e.pop(),e=e.concat(a(i,o,f[1],f[2],f[3])),p=["U"].concat(e[e.length-1].slice(-2));break;case"M":s=+f[1]+i,l=+f[2]+o;break;default:for(var x=1,b=f.length;x<b;x++)p[x]=+f[x]+(x%2?i:o)}else if("R"===h)c=[i,o].concat(f.slice(1)),e.pop(),e=e.concat(r(c,d)),p=["R"].concat(f.slice(-2));else if("O"===h)e.pop(),(c=a(i,o,f[1],f[2])).push(c[0]),e=e.concat(c);else if("U"===h)e.pop(),e=e.concat(a(i,o,f[1],f[2],f[3])),p=["U"].concat(e[e.length-1].slice(-2));else for(var _=0,w=f.length;_<w;_++)p[_]=f[_];if("O"!==(h=h.toUpperCase()))switch(p[0]){case"Z":i=+s,o=+l;break;case"H":i=p[1];break;case"V":o=p[1];break;case"M":s=p[p.length-2],l=p[p.length-1];break;default:i=p[p.length-2],o=p[p.length-1]}}return e}},function(t,e){var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n="\t\n\v\f\r \u2028\u2029",r=new RegExp("([a-z])["+n+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+n+"]*,?["+n+"]*)+)","ig"),a=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+n+"]*,?["+n+"]*","ig");t.exports=function(t){if(!t)return null;if((void 0===t?"undefined":i(t))===i([]))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},n=[];return String(t).replace(r,(function(t,i,r){var o=[],s=i.toLowerCase();if(r.replace(a,(function(t,e){e&&o.push(+e)})),"m"===s&&o.length>2&&(n.push([i].concat(o.splice(0,2))),s="l",i="m"===i?"l":"L"),"o"===s&&1===o.length&&n.push([i,o[0]]),"r"===s)n.push([i].concat(o));else for(;o.length>=e[s]&&(n.push([i].concat(o.splice(0,e[s]))),e[s]););})),n}},function(t,e){t.exports=function(t,e){for(var i=[],n=0,r=t.length;r-2*!e>n;n+=2){var a=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?r-4===n?a[3]={x:+t[0],y:+t[1]}:r-2===n&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[r-2],y:+t[r-1]}:r-4===n?a[3]=a[2]:n||(a[0]={x:+t[n],y:+t[n+1]}),i.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return i}},function(t,e,i){var n=i(8);t.exports=function(t){return n(t).toLowerCase()}},function(t,e,i){var n=i(8);t.exports=function(t){return n(t).toUpperCase()}},function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).replace(/^\[object /,"").replace(/\]$/,"")}},function(t,e){var i=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}},function(t,e,i){var n=i(3),r=i(1),a=i(38);t.exports=function(t,e){if(!e)return{0:t};if(!n(e)){var i=r(e)?e:e.replace(/\s+/g,"").split("*");e=function(t){for(var e="_",n=0,r=i.length;n<r;n++)e+=t[i[n]]&&t[i[n]].toString();return e}}return a(t,e)}},function(t,e,i){var n=i(0),r=i(1),a=Object.prototype.hasOwnProperty;t.exports=function(t,e){if(!e||!r(t))return t;var i={},o=null;return n(t,(function(t){o=e(t),a.call(i,o)?i[o].push(t):i[o]=[t]})),i}},function(t,e,i){var n=i(13),r=i(4),a=i(10);t.exports=function t(e,i){if(e===i)return!0;if(!e||!i)return!1;if(a(e)||a(i))return!1;if(r(e)||r(i)){if(e.length!==i.length)return!1;for(var o=!0,s=0;s<e.length&&(o=t(e[s],i[s]));s++);return o}if(n(e)||n(i)){var l=Object.keys(e),u=Object.keys(i);if(l.length!==u.length)return!1;for(var h=!0,c=0;c<l.length&&(h=t(e[l[c]],i[l[c]]));c++);return h}return!1}},function(t,e,i){var n=i(0),r=i(11),a=i(41),o=i(53),s=i(67),l=i(70),u=i(74),h=i(88),c=i(95),p=i(99),f=i(105),d=i(111),g={DOMUtil:a,DomUtil:a,MatrixUtil:h,PathUtil:p,arrayUtil:o,domUtil:a,eventUtil:s,formatUtil:l,mathUtil:u,matrixUtil:h,objectUtil:c,stringUtil:f,pathUtil:p,typeUtil:d,augment:i(119),clone:i(24),debounce:i(120),deepMix:i(121),each:n,extend:i(122),filter:i(12),group:i(123),groupBy:i(38),groupToMap:i(37),indexOf:i(124),isEmpty:i(125),isEqual:i(39),isEqualWith:i(126),map:i(127),mix:r,pick:i(128),throttle:i(129),toArray:i(14),toString:i(8),uniqueId:i(130)};n([a,o,s,l,u,h,c,p,f,d],(function(t){r(g,t)})),t.exports=g},function(t,e,i){t.exports={addEventListener:i(42),createDom:i(43),getBoundingClientRect:i(44),getHeight:i(45),getOuterHeight:i(46),getOuterWidth:i(47),getRatio:i(48),getStyle:i(49),getWidth:i(50),modifyCSS:i(51),requestAnimationFrame:i(52)}},function(t,e){t.exports=function(t,e,i){if(t){if(t.addEventListener)return t.addEventListener(e,i,!1),{remove:function(){t.removeEventListener(e,i,!1)}};if(t.attachEvent)return t.attachEvent("on"+e,i),{remove:function(){t.detachEvent("on"+e,i)}}}}},function(t,e){var i=document.createElement("table"),n=document.createElement("tr"),r=/^\s*<(\w+|!)[^>]*>/,a={tr:document.createElement("tbody"),tbody:i,thead:i,tfoot:i,td:n,th:n,"*":document.createElement("div")};t.exports=function(t){var e=r.test(t)&&RegExp.$1;e in a||(e="*");var i=a[e];t=t.replace(/(^\s*)|(\s*$)/g,""),i.innerHTML=""+t;var n=i.childNodes[0];return i.removeChild(n),n}},function(t,e){t.exports=function(t,e){if(t&&t.getBoundingClientRect){var i=t.getBoundingClientRect(),n=document.documentElement.clientTop,r=document.documentElement.clientLeft;return{top:i.top-n,bottom:i.bottom-n,left:i.left-r,right:i.right-r}}return e||null}},function(t,e){t.exports=function(t,e){var i=this.getStyle(t,"height",e);return"auto"===i&&(i=t.offsetHeight),parseFloat(i)}},function(t,e){t.exports=function(t,e){var i=this.getHeight(t,e),n=parseFloat(this.getStyle(t,"borderTopWidth"))||0,r=parseFloat(this.getStyle(t,"paddingTop"))||0,a=parseFloat(this.getStyle(t,"paddingBottom"))||0;return i+n+(parseFloat(this.getStyle(t,"borderBottomWidth"))||0)+r+a}},function(t,e){t.exports=function(t,e){var i=this.getWidth(t,e),n=parseFloat(this.getStyle(t,"borderLeftWidth"))||0,r=parseFloat(this.getStyle(t,"paddingLeft"))||0,a=parseFloat(this.getStyle(t,"paddingRight"))||0;return i+n+(parseFloat(this.getStyle(t,"borderRightWidth"))||0)+r+a}},function(t,e){t.exports=function(){return window.devicePixelRatio?window.devicePixelRatio:2}},function(t,e,i){var n=i(5);t.exports=function(t,e,i){try{return window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.currentStyle[e]}catch(t){return n(i)?null:i}}},function(t,e){t.exports=function(t,e){var i=this.getStyle(t,"width",e);return"auto"===i&&(i=t.offsetWidth),parseFloat(i)}},function(t,e){t.exports=function(t,e){if(t)for(var i in e)e.hasOwnProperty(i)&&(t.style[i]=e[i]);return t}},function(t,e){t.exports=function(t){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,16)})(t)}},function(t,e,i){t.exports={contains:i(9),difference:i(54),find:i(55),firstValue:i(56),flatten:i(57),flattenDeep:i(58),getRange:i(59),merge:i(60),pull:i(61),pullAt:i(19),reduce:i(62),remove:i(63),sortBy:i(64),union:i(65),uniq:i(20),valuesOfKey:i(66)}},function(t,e,i){var n=i(12),r=i(9);t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n(t,(function(t){return!r(e,t)}))}},function(t,e,i){var n=i(3),r=i(7),a=i(17);t.exports=function(t,e){var i=void 0;if(n(e)&&(i=e),r(e)&&(i=function(t){return a(t,e)}),i)for(var o=0;o<t.length;o+=1)if(i(t[o]))return t[o];return null}},function(t,e,i){var n=i(5),r=i(1);t.exports=function(t,e){for(var i=null,a=0;a<t.length;a++){var o=t[a][e];if(!n(o)){i=r(o)?o[0]:o;break}}return i}},function(t,e,i){var n=i(1),r=i(0);t.exports=function(t){if(!n(t))return t;var e=[];return r(t,(function(t){n(t)?r(t,(function(t){e.push(t)})):e.push(t)})),e}},function(t,e,i){var n=i(1);t.exports=function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(n(e))for(var r=0;r<e.length;r+=1)t(e[r],i);else i.push(e);return i}},function(t,e,i){var n=i(12),r=i(1);t.exports=function(t){if(!(t=n(t,(function(t){return!isNaN(t)}))).length)return{min:0,max:0};if(r(t[0])){for(var e=[],i=0;i<t.length;i++)e=e.concat(t[i]);t=e}var a=Math.max.apply(null,t);return{min:Math.min.apply(null,t),max:a}}},function(t,e){t.exports=function(t){for(var e=[],i=0;i<t.length;i++)e=e.concat(t[i]);return e}},function(t,e){var i=Array.prototype,n=i.splice,r=i.indexOf,a=i.slice;t.exports=function(t){for(var e=a.call(arguments,1),i=0;i<e.length;i++)for(var o=e[i],s=-1;(s=r.call(t,o))>-1;)n.call(t,s,1);return t}},function(t,e,i){var n=i(1),r=i(7),a=i(0);t.exports=function(t,e,i){if(!n(t)&&!r(t))return t;var o=i;return a(t,(function(t,i){o=e(o,t,i)})),o}},function(t,e,i){var n=i(4),r=i(19);t.exports=function(t,e){var i=[];if(!n(t))return i;for(var a=-1,o=[],s=t.length;++a<s;){var l=t[a];e(l,a,t)&&(i.push(l),o.push(a))}return r(t,o),i}},function(t,e,i){var n=i(10),r=i(3),a=i(1);t.exports=function(t,e){var i=void 0;if(r(e))i=function(t,i){return e(t)-e(i)};else{var o=[];n(e)?o.push(e):a(e)&&(o=e),i=function(t,e){for(var i=0;i<o.length;i+=1){var n=o[i];if(t[n]>e[n])return 1;if(t[n]<e[n])return-1}return 0}}return t.sort(i),t}},function(t,e,i){var n=i(0),r=i(14),a=i(20);t.exports=function(){var t=[],e=r(arguments);return n(e,(function(e){t=t.concat(e)})),a(t)}},function(t,e,i){var n=i(5),r=i(1),a=i(0);t.exports=function(t,e){for(var i=[],o={},s=0;s<t.length;s++){var l=t[s][e];n(l)||(r(l)||(l=[l]),a(l,(function(t){o[t]||(i.push(t),o[t]=!0)})))}return i}},function(t,e,i){t.exports={getWrapBehavior:i(68),wrapBehavior:i(69)}},function(t,e){t.exports=function(t,e){return t["_wrap_"+e]}},function(t,e){t.exports=function(t,e){if(t["_wrap_"+e])return t["_wrap_"+e];var i=function(i){t[e](i)};return t["_wrap_"+e]=i,i}},function(t,e,i){var n=i(71);t.exports={number2color:n,numberToColor:n,parsePath:i(72),parseRadius:i(73)}},function(t,e){var i={};t.exports=function(t){var e=i[t];if(!e){for(var n=t.toString(16),r=n.length;r<6;r++)n="0"+n;e="#"+n,i[t]=e}return e}},function(t,e,i){var n=i(1),r=i(10),a=i(0),o=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,s=/[^\s\,]+/gi;t.exports=function(t){return n(t=t||[])?t:r(t)?(t=t.match(o),a(t,(function(e,i){if((e=e.match(s))[0].length>1){var n=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=n}a(e,(function(t,i){isNaN(t)||(e[i]=+t)})),t[i]=e})),t):void 0}},function(t,e,i){var n=i(1);t.exports=function(t){var e=0,i=0,r=0,a=0;return n(t)?1===t.length?e=i=r=a=t[0]:2===t.length?(e=r=t[0],i=a=t[1]):3===t.length?(e=t[0],i=a=t[1],r=t[2]):(e=t[0],i=t[1],r=t[2],a=t[3]):e=i=r=a=t,{r1:e,r2:i,r3:r,r4:a}}},function(t,e,i){var n=i(75);t.exports={clamp:i(21),fixedBase:i(76),isDecimal:i(77),isEven:i(78),isInteger:i(79),isNegative:i(80),isNumberEqual:n,isOdd:i(81),isPositive:i(82),maxBy:i(83),minBy:i(84),mod:i(85),snapEqual:n,toDegree:i(86),toInt:i(22),toInteger:i(22),toRadian:i(87)}},function(t,e){t.exports=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e-5;return Math.abs(t-e)<i}},function(t,e){t.exports=function(t,e){var i=e.toString(),n=i.indexOf(".");if(-1===n)return Math.round(t);var r=i.substr(n+1).length;return r>20&&(r=20),parseFloat(t.toFixed(r))}},function(t,e,i){var n=i(6);t.exports=function(t){return n(t)&&t%1!=0}},function(t,e,i){var n=i(6);t.exports=function(t){return n(t)&&t%2==0}},function(t,e,i){var n=i(6),r=Number.isInteger?Number.isInteger:function(t){return n(t)&&t%1==0};t.exports=r},function(t,e,i){var n=i(6);t.exports=function(t){return n(t)&&t<0}},function(t,e,i){var n=i(6);t.exports=function(t){return n(t)&&t%2!=0}},function(t,e,i){var n=i(6);t.exports=function(t){return n(t)&&t>0}},function(t,e,i){var n=i(1),r=i(3),a=i(0);t.exports=function(t,e){if(n(t)){var i=t[0],o=void 0;o=r(e)?e(t[0]):t[0][e];var s=void 0;return a(t,(function(t){(s=r(e)?e(t):t[e])>o&&(i=t,o=s)})),i}}},function(t,e,i){var n=i(1),r=i(3),a=i(0);t.exports=function(t,e){if(n(t)){var i=t[0],o=void 0;o=r(e)?e(t[0]):t[0][e];var s=void 0;return a(t,(function(t){(s=r(e)?e(t):t[e])<o&&(i=t,o=s)})),i}}},function(t,e){t.exports=function(t,e){return(t%e+e)%e}},function(t,e){var i=180/Math.PI;t.exports=function(t){return i*t}},function(t,e){var i=Math.PI/180;t.exports=function(t){return i*t}},function(t,e,i){t.exports={mat3:i(23),vec2:i(90),vec3:i(92),transform:i(94)}},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=function(){var t=new n.ARRAY_TYPE(9);return n.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},e.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},e.clone=function(t){var e=new n.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromValues=function(t,e,i,r,a,o,s,l,u){var h=new n.ARRAY_TYPE(9);return h[0]=t,h[1]=e,h[2]=i,h[3]=r,h[4]=a,h[5]=o,h[6]=s,h[7]=l,h[8]=u,h},e.set=function(t,e,i,n,r,a,o,s,l,u){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=u,t},e.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.transpose=function(t,e){if(t===e){var i=e[1],n=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=i,t[5]=e[7],t[6]=n,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},e.invert=function(t,e){var i=e[0],n=e[1],r=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],h=e[8],c=h*o-s*u,p=-h*a+s*l,f=u*a-o*l,d=i*c+n*p+r*f;return d?(d=1/d,t[0]=c*d,t[1]=(-h*n+r*u)*d,t[2]=(s*n-r*o)*d,t[3]=p*d,t[4]=(h*i-r*l)*d,t[5]=(-s*i+r*a)*d,t[6]=f*d,t[7]=(-u*i+n*l)*d,t[8]=(o*i-n*a)*d,t):null},e.adjoint=function(t,e){var i=e[0],n=e[1],r=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],h=e[8];return t[0]=o*h-s*u,t[1]=r*u-n*h,t[2]=n*s-r*o,t[3]=s*l-a*h,t[4]=i*h-r*l,t[5]=r*a-i*s,t[6]=a*u-o*l,t[7]=n*l-i*u,t[8]=i*o-n*a,t},e.determinant=function(t){var e=t[0],i=t[1],n=t[2],r=t[3],a=t[4],o=t[5],s=t[6],l=t[7],u=t[8];return e*(u*a-o*l)+i*(-u*r+o*s)+n*(l*r-a*s)},e.multiply=r,e.translate=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],h=e[7],c=e[8],p=i[0],f=i[1];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=p*n+f*o+u,t[7]=p*r+f*s+h,t[8]=p*a+f*l+c,t},e.rotate=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],h=e[7],c=e[8],p=Math.sin(i),f=Math.cos(i);return t[0]=f*n+p*o,t[1]=f*r+p*s,t[2]=f*a+p*l,t[3]=f*o-p*n,t[4]=f*s-p*r,t[5]=f*l-p*a,t[6]=u,t[7]=h,t[8]=c,t},e.scale=function(t,e,i){var n=i[0],r=i[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},e.fromRotation=function(t,e){var i=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=i,t[2]=0,t[3]=-i,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},e.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},e.fromQuat=function(t,e){var i=e[0],n=e[1],r=e[2],a=e[3],o=i+i,s=n+n,l=r+r,u=i*o,h=n*o,c=n*s,p=r*o,f=r*s,d=r*l,g=a*o,v=a*s,y=a*l;return t[0]=1-c-d,t[3]=h-y,t[6]=p+v,t[1]=h+y,t[4]=1-u-d,t[7]=f-g,t[2]=p-v,t[5]=f+g,t[8]=1-u-c,t},e.normalFromMat4=function(t,e){var i=e[0],n=e[1],r=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],h=e[8],c=e[9],p=e[10],f=e[11],d=e[12],g=e[13],v=e[14],y=e[15],m=i*s-n*o,x=i*l-r*o,b=i*u-a*o,_=n*l-r*s,w=n*u-a*s,M=r*u-a*l,S=h*g-c*d,k=h*v-p*d,O=h*y-f*d,C=c*v-p*g,A=c*y-f*g,L=p*y-f*v,P=m*L-x*A+b*C+_*O-w*k+M*S;return P?(P=1/P,t[0]=(s*L-l*A+u*C)*P,t[1]=(l*O-o*L-u*k)*P,t[2]=(o*A-s*O+u*S)*P,t[3]=(r*A-n*L-a*C)*P,t[4]=(i*L-r*O+a*k)*P,t[5]=(n*O-i*A-a*S)*P,t[6]=(g*M-v*w+y*_)*P,t[7]=(v*b-d*M-y*x)*P,t[8]=(d*w-g*b+y*m)*P,t):null},e.projection=function(t,e,i){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/i,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},e.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},e.add=function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t[3]=e[3]+i[3],t[4]=e[4]+i[4],t[5]=e[5]+i[5],t[6]=e[6]+i[6],t[7]=e[7]+i[7],t[8]=e[8]+i[8],t},e.subtract=a,e.multiplyScalar=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*i,t},e.multiplyScalarAndAdd=function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t[2]=e[2]+i[2]*n,t[3]=e[3]+i[3]*n,t[4]=e[4]+i[4]*n,t[5]=e[5]+i[5]*n,t[6]=e[6]+i[6]*n,t[7]=e[7]+i[7]*n,t[8]=e[8]+i[8]*n,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},e.equals=function(t,e){var i=t[0],r=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],h=t[7],c=t[8],p=e[0],f=e[1],d=e[2],g=e[3],v=e[4],y=e[5],m=e[6],x=e[7],b=e[8];return Math.abs(i-p)<=n.EPSILON*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(r-f)<=n.EPSILON*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(a-d)<=n.EPSILON*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(o-g)<=n.EPSILON*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(s-v)<=n.EPSILON*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(l-y)<=n.EPSILON*Math.max(1,Math.abs(l),Math.abs(y))&&Math.abs(u-m)<=n.EPSILON*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(h-x)<=n.EPSILON*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(c-b)<=n.EPSILON*Math.max(1,Math.abs(c),Math.abs(b))};var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(15));function r(t,e,i){var n=e[0],r=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],h=e[7],c=e[8],p=i[0],f=i[1],d=i[2],g=i[3],v=i[4],y=i[5],m=i[6],x=i[7],b=i[8];return t[0]=p*n+f*o+d*u,t[1]=p*r+f*s+d*h,t[2]=p*a+f*l+d*c,t[3]=g*n+v*o+y*u,t[4]=g*r+v*s+y*h,t[5]=g*a+v*l+y*c,t[6]=m*n+x*o+b*u,t[7]=m*r+x*s+b*h,t[8]=m*a+x*l+b*c,t}function a(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t[3]=e[3]-i[3],t[4]=e[4]-i[4],t[5]=e[5]-i[5],t[6]=e[6]-i[6],t[7]=e[7]-i[7],t[8]=e[8]-i[8],t}e.mul=r,e.sub=a},function(t,e,i){var n=i(91),r=i(21);n.angle=function(t,e){var i=n.dot(t,e)/(n.length(t)*n.length(e));return Math.acos(r(i,-1,1))},n.direction=function(t,e){return t[0]*e[1]-e[0]*t[1]},n.angleTo=function(t,e,i){var r=n.angle(t,e),a=n.direction(t,e)>=0;return i?a?2*Math.PI-r:r:a?r:2*Math.PI-r},n.vertical=function(t,e,i){return i?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t},t.exports=n},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0,e.create=a,e.clone=function(t){var e=new r.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e},e.fromValues=function(t,e){var i=new r.ARRAY_TYPE(2);return i[0]=t,i[1]=e,i},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.set=function(t,e,i){return t[0]=e,t[1]=i,t},e.add=function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},e.subtract=o,e.multiply=s,e.divide=l,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},e.min=function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},e.max=function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},e.scale=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},e.scaleAndAdd=function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},e.distance=u,e.squaredDistance=h,e.length=c,e.squaredLength=p,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},e.normalize=function(t,e){var i=e[0],n=e[1],r=i*i+n*n;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,i){var n=e[0]*i[1]-e[1]*i[0];return t[0]=t[1]=0,t[2]=n,t},e.lerp=function(t,e,i,n){var r=e[0],a=e[1];return t[0]=r+n*(i[0]-r),t[1]=a+n*(i[1]-a),t},e.random=function(t,e){e=e||1;var i=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(i)*e,t[1]=Math.sin(i)*e,t},e.transformMat2=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r,t[1]=i[1]*n+i[3]*r,t},e.transformMat2d=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t},e.transformMat3=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[3]*r+i[6],t[1]=i[1]*n+i[4]*r+i[7],t},e.transformMat4=function(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[4]*r+i[12],t[1]=i[1]*n+i[5]*r+i[13],t},e.rotate=function(t,e,i,n){var r=e[0]-i[0],a=e[1]-i[1],o=Math.sin(n),s=Math.cos(n);return t[0]=r*s-a*o+i[0],t[1]=r*o+a*s+i[1],t},e.angle=function(t,e){var i=t[0],n=t[1],r=e[0],a=e[1],o=i*i+n*n;o>0&&(o=1/Math.sqrt(o));var s=r*r+a*a;s>0&&(s=1/Math.sqrt(s));var l=(i*r+n*a)*o*s;return l>1?0:l<-1?Math.PI:Math.acos(l)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var i=t[0],n=t[1],a=e[0],o=e[1];return Math.abs(i-a)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(n-o)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))};var n,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(15));function a(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function o(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function s(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t}function l(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t}function u(t,e){var i=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(i*i+n*n)}function h(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function c(t){var e=t[0],i=t[1];return Math.sqrt(e*e+i*i)}function p(t){var e=t[0],i=t[1];return e*e+i*i}e.len=c,e.sub=o,e.mul=s,e.div=l,e.dist=u,e.sqrDist=h,e.sqrLen=p,e.forEach=(n=a(),function(t,e,i,r,a,o){var s=void 0,l=void 0;for(e||(e=2),i||(i=0),l=r?Math.min(r*e+i,t.length):t.length,s=i;s<l;s+=e)n[0]=t[s],n[1]=t[s+1],a(n,n,o),t[s]=n[0],t[s+1]=n[1];return t})},function(t,e,i){var n=i(93);t.exports=n},function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.len=e.sqrDist=e.dist=e.div=e.mul=e.sub=void 0,e.create=a,e.clone=function(t){var e=new r.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},e.length=o,e.fromValues=s,e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.set=function(t,e,i,n){return t[0]=e,t[1]=i,t[2]=n,t},e.add=function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t},e.subtract=l,e.multiply=u,e.divide=h,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},e.min=function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t[2]=Math.min(e[2],i[2]),t},e.max=function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t[2]=Math.max(e[2],i[2]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},e.scale=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t},e.scaleAndAdd=function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t[2]=e[2]+i[2]*n,t},e.distance=c,e.squaredDistance=p,e.squaredLength=f,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},e.normalize=d,e.dot=g,e.cross=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=i[0],s=i[1],l=i[2];return t[0]=r*l-a*s,t[1]=a*o-n*l,t[2]=n*s-r*o,t},e.lerp=function(t,e,i,n){var r=e[0],a=e[1],o=e[2];return t[0]=r+n*(i[0]-r),t[1]=a+n*(i[1]-a),t[2]=o+n*(i[2]-o),t},e.hermite=function(t,e,i,n,r,a){var o=a*a,s=o*(2*a-3)+1,l=o*(a-2)+a,u=o*(a-1),h=o*(3-2*a);return t[0]=e[0]*s+i[0]*l+n[0]*u+r[0]*h,t[1]=e[1]*s+i[1]*l+n[1]*u+r[1]*h,t[2]=e[2]*s+i[2]*l+n[2]*u+r[2]*h,t},e.bezier=function(t,e,i,n,r,a){var o=1-a,s=o*o,l=a*a,u=s*o,h=3*a*s,c=3*l*o,p=l*a;return t[0]=e[0]*u+i[0]*h+n[0]*c+r[0]*p,t[1]=e[1]*u+i[1]*h+n[1]*c+r[1]*p,t[2]=e[2]*u+i[2]*h+n[2]*c+r[2]*p,t},e.random=function(t,e){e=e||1;var i=2*r.RANDOM()*Math.PI,n=2*r.RANDOM()-1,a=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(i)*a,t[1]=Math.sin(i)*a,t[2]=n*e,t},e.transformMat4=function(t,e,i){var n=e[0],r=e[1],a=e[2],o=i[3]*n+i[7]*r+i[11]*a+i[15];return o=o||1,t[0]=(i[0]*n+i[4]*r+i[8]*a+i[12])/o,t[1]=(i[1]*n+i[5]*r+i[9]*a+i[13])/o,t[2]=(i[2]*n+i[6]*r+i[10]*a+i[14])/o,t},e.transformMat3=function(t,e,i){var n=e[0],r=e[1],a=e[2];return t[0]=n*i[0]+r*i[3]+a*i[6],t[1]=n*i[1]+r*i[4]+a*i[7],t[2]=n*i[2]+r*i[5]+a*i[8],t},e.transformQuat=function(t,e,i){var n=i[0],r=i[1],a=i[2],o=i[3],s=e[0],l=e[1],u=e[2],h=r*u-a*l,c=a*s-n*u,p=n*l-r*s,f=r*p-a*c,d=a*h-n*p,g=n*c-r*h,v=2*o;return h*=v,c*=v,p*=v,f*=2,d*=2,g*=2,t[0]=s+h+f,t[1]=l+c+d,t[2]=u+p+g,t},e.rotateX=function(t,e,i,n){var r=[],a=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],a[0]=r[0],a[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),a[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),t[0]=a[0]+i[0],t[1]=a[1]+i[1],t[2]=a[2]+i[2],t},e.rotateY=function(t,e,i,n){var r=[],a=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],a[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),a[1]=r[1],a[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),t[0]=a[0]+i[0],t[1]=a[1]+i[1],t[2]=a[2]+i[2],t},e.rotateZ=function(t,e,i,n){var r=[],a=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],a[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),a[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),a[2]=r[2],t[0]=a[0]+i[0],t[1]=a[1]+i[1],t[2]=a[2]+i[2],t},e.angle=function(t,e){var i=s(t[0],t[1],t[2]),n=s(e[0],e[1],e[2]);d(i,i),d(n,n);var r=g(i,n);return r>1?0:r<-1?Math.PI:Math.acos(r)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var i=t[0],n=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(i-o)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-s)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(a-l)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(l))};var n,r=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(15));function a(){var t=new r.ARRAY_TYPE(3);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function o(t){var e=t[0],i=t[1],n=t[2];return Math.sqrt(e*e+i*i+n*n)}function s(t,e,i){var n=new r.ARRAY_TYPE(3);return n[0]=t,n[1]=e,n[2]=i,n}function l(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t}function u(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t}function h(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t[2]=e[2]/i[2],t}function c(t,e){var i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(i*i+n*n+r*r)}function p(t,e){var i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return i*i+n*n+r*r}function f(t){var e=t[0],i=t[1],n=t[2];return e*e+i*i+n*n}function d(t,e){var i=e[0],n=e[1],r=e[2],a=i*i+n*n+r*r;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}e.sub=l,e.mul=u,e.div=h,e.dist=c,e.sqrDist=p,e.len=o,e.sqrLen=f,e.forEach=(n=a(),function(t,e,i,r,a,o){var s=void 0,l=void 0;for(e||(e=3),i||(i=0),l=r?Math.min(r*e+i,t.length):t.length,s=i;s<l;s+=e)n[0]=t[s],n[1]=t[s+1],n[2]=t[s+2],a(n,n,o),t[s]=n[0],t[s+1]=n[1],t[s+2]=n[2];return t})},function(t,e,i){var n=i(24),r=i(0),a=i(23);t.exports=function(t,e){return t=n(t),r(e,(function(e){switch(e[0]){case"t":a.translate(t,t,[e[1],e[2]]);break;case"s":a.scale(t,t,[e[1],e[2]]);break;case"r":a.rotate(t,t,e[1]);break;case"m":a.multiply(t,t,e[1]);break;default:return!1}})),t}},function(t,e,i){t.exports={forIn:i(96),has:i(25),hasKey:i(97),hasValue:i(98),keys:i(18),isMatch:i(17),values:i(26)}},function(t,e,i){t.exports=i(0)},function(t,e,i){t.exports=i(25)},function(t,e,i){var n=i(9),r=i(26);t.exports=function(t,e){return n(r(t),e)}},function(t,e,i){var n=i(100),r=i(30),a=i(29),o=i(32);t.exports={catmullRom2Bezier:o,catmullRomToBezier:o,fillPath:i(101),fillPathByDiff:i(102),formatPath:i(104),intersection:n,pathIntersection:n,parsePathArray:i(28),parsePathString:i(31),pathToAbsolute:r,path2absolute:r,pathTocurve:a,path2curve:a,rectPath:i(27)}},function(t,e,i){var n=i(1),r=i(27),a=i(29),o=function(t,e,i,n,r){return t*(t*(-3*e+9*i-9*n+3*r)+6*e-12*i+6*n)-3*e+3*i},s=function(t,e,i,n,r,a,s,l,u){null===u&&(u=1);for(var h=(u=u>1?1:u<0?0:u)/2,c=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],p=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,d=0;d<12;d++){var g=h*c[d]+h,v=o(g,t,i,r,s),y=o(g,e,n,a,l),m=v*v+y*y;f+=p[d]*Math.sqrt(m)}return h*f},l=function(t,e,i,n,r,a,o,s){for(var l=[],u=[[],[]],h=void 0,c=void 0,p=void 0,f=void 0,d=0;d<2;++d)if(0===d?(c=6*t-12*i+6*r,h=-3*t+9*i-9*r+3*o,p=3*i-3*t):(c=6*e-12*n+6*a,h=-3*e+9*n-9*a+3*s,p=3*n-3*e),Math.abs(h)<1e-12){if(Math.abs(c)<1e-12)continue;(f=-p/c)>0&&f<1&&l.push(f)}else{var g=c*c-4*p*h,v=Math.sqrt(g);if(!(g<0)){var y=(-c+v)/(2*h);y>0&&y<1&&l.push(y);var m=(-c-v)/(2*h);m>0&&m<1&&l.push(m)}}for(var x=l.length,b=x,_=void 0;x--;)_=1-(f=l[x]),u[0][x]=_*_*_*t+3*_*_*f*i+3*_*f*f*r+f*f*f*o,u[1][x]=_*_*_*e+3*_*_*f*n+3*_*f*f*a+f*f*f*s;return u[0][b]=t,u[1][b]=e,u[0][b+1]=o,u[1][b+1]=s,u[0].length=u[1].length=b+2,{min:{x:Math.min.apply(0,u[0]),y:Math.min.apply(0,u[1])},max:{x:Math.max.apply(0,u[0]),y:Math.max.apply(0,u[1])}}},u=function(t,e,i,n,r,a,o,s){if(!(Math.max(t,i)<Math.min(r,o)||Math.min(t,i)>Math.max(r,o)||Math.max(e,n)<Math.min(a,s)||Math.min(e,n)>Math.max(a,s))){var l=(t-i)*(a-s)-(e-n)*(r-o);if(l){var u=((t*n-e*i)*(r-o)-(t-i)*(r*s-a*o))/l,h=((t*n-e*i)*(a-s)-(e-n)*(r*s-a*o))/l,c=+u.toFixed(2),p=+h.toFixed(2);if(!(c<+Math.min(t,i).toFixed(2)||c>+Math.max(t,i).toFixed(2)||c<+Math.min(r,o).toFixed(2)||c>+Math.max(r,o).toFixed(2)||p<+Math.min(e,n).toFixed(2)||p>+Math.max(e,n).toFixed(2)||p<+Math.min(a,s).toFixed(2)||p>+Math.max(a,s).toFixed(2)))return{x:u,y:h}}}},h=function(t,e,i){return e>=t.x&&e<=t.x+t.width&&i>=t.y&&i<=t.y+t.height},c=function(t,e,i,n){return null===t&&(t=e=i=n=0),null===e&&(e=t.y,i=t.width,n=t.height,t=t.x),{x:t,y:e,width:i,w:i,height:n,h:n,x2:t+i,y2:e+n,cx:t+i/2,cy:e+n/2,r1:Math.min(i,n)/2,r2:Math.max(i,n)/2,r0:Math.sqrt(i*i+n*n)/2,path:r(t,e,i,n),vb:[t,e,i,n].join(" ")}},p=function(t,e,i,r,a,o,s,u){n(t)||(t=[t,e,i,r,a,o,s,u]);var h=l.apply(null,t);return c(h.min.x,h.min.y,h.max.x-h.min.x,h.max.y-h.min.y)},f=function(t,e,i,n,r,a,o,s,l){var u=1-l,h=Math.pow(u,3),c=Math.pow(u,2),p=l*l,f=p*l,d=t+2*l*(i-t)+p*(r-2*i+t),g=e+2*l*(n-e)+p*(a-2*n+e),v=i+2*l*(r-i)+p*(o-2*r+i),y=n+2*l*(a-n)+p*(s-2*a+n);return{x:h*t+3*c*l*i+3*u*l*l*r+f*o,y:h*e+3*c*l*n+3*u*l*l*a+f*s,m:{x:d,y:g},n:{x:v,y:y},start:{x:u*t+l*i,y:u*e+l*n},end:{x:u*r+l*o,y:u*a+l*s},alpha:90-180*Math.atan2(d-v,g-y)/Math.PI}},d=function(t,e,i){if(!function(t,e){return t=c(t),e=c(e),h(e,t.x,t.y)||h(e,t.x2,t.y)||h(e,t.x,t.y2)||h(e,t.x2,t.y2)||h(t,e.x,e.y)||h(t,e.x2,e.y)||h(t,e.x,e.y2)||h(t,e.x2,e.y2)||(t.x<e.x2&&t.x>e.x||e.x<t.x2&&e.x>t.x)&&(t.y<e.y2&&t.y>e.y||e.y<t.y2&&e.y>t.y)}(p(t),p(e)))return i?0:[];for(var n=~~(s.apply(0,t)/8),r=~~(s.apply(0,e)/8),a=[],o=[],l={},d=i?0:[],g=0;g<n+1;g++){var v=f.apply(0,t.concat(g/n));a.push({x:v.x,y:v.y,t:g/n})}for(var y=0;y<r+1;y++){var m=f.apply(0,e.concat(y/r));o.push({x:m.x,y:m.y,t:y/r})}for(var x=0;x<n;x++)for(var b=0;b<r;b++){var _=a[x],w=a[x+1],M=o[b],S=o[b+1],k=Math.abs(w.x-_.x)<.001?"y":"x",O=Math.abs(S.x-M.x)<.001?"y":"x",C=u(_.x,_.y,w.x,w.y,M.x,M.y,S.x,S.y);if(C){if(l[C.x.toFixed(4)]===C.y.toFixed(4))continue;l[C.x.toFixed(4)]=C.y.toFixed(4);var A=_.t+Math.abs((C[k]-_[k])/(w[k]-_[k]))*(w.t-_.t),L=M.t+Math.abs((C[O]-M[O])/(S[O]-M[O]))*(S.t-M.t);A>=0&&A<=1&&L>=0&&L<=1&&(i?d++:d.push({x:C.x,y:C.y,t1:A,t2:L}))}}return d};t.exports=function(t,e){return function(t,e,i){t=a(t),e=a(e);for(var n=void 0,r=void 0,o=void 0,s=void 0,l=void 0,u=void 0,h=void 0,c=void 0,p=void 0,f=void 0,g=i?0:[],v=0,y=t.length;v<y;v++){var m=t[v];if("M"===m[0])n=l=m[1],r=u=m[2];else{"C"===m[0]?(p=[n,r].concat(m.slice(1)),n=p[6],r=p[7]):(p=[n,r,n,r,l,u,l,u],n=l,r=u);for(var x=0,b=e.length;x<b;x++){var _=e[x];if("M"===_[0])o=h=_[1],s=c=_[2];else{"C"===_[0]?(f=[o,s].concat(_.slice(1)),o=f[6],s=f[7]):(f=[o,s,o,s,h,c,h,c],o=h,s=c);var w=d(p,f,i);if(i)g+=w;else{for(var M=0,S=w.length;M<S;M++)w[M].segment1=v,w[M].segment2=x,w[M].bez1=p,w[M].bez2=f;g=g.concat(w)}}}}}return g}(t,e)}},function(t,e){function i(t,e){var i=[],n=[];return t.length&&function t(e,r){if(1===e.length)i.push(e[0]),n.push(e[0]);else{for(var a=[],o=0;o<e.length-1;o++)0===o&&i.push(e[0]),o===e.length-2&&n.push(e[o+1]),a[o]=[(1-r)*e[o][0]+r*e[o+1][0],(1-r)*e[o][1]+r*e[o+1][1]];t(a,r)}}(t,e),{left:i,right:n.reverse()}}function n(t,e,n){if(1===n)return[[].concat(t)];var r=[];if("L"===e[0]||"C"===e[0]||"Q"===e[0])r=r.concat(function(t,e,n){var r=[[t[1],t[2]]];n=n||2;var a=[];"A"===e[0]?(r.push(e[6]),r.push(e[7])):"C"===e[0]?(r.push([e[1],e[2]]),r.push([e[3],e[4]]),r.push([e[5],e[6]])):"S"===e[0]||"Q"===e[0]?(r.push([e[1],e[2]]),r.push([e[3],e[4]])):r.push([e[1],e[2]]);for(var o=r,s=1/n,l=0;l<n-1;l++){var u=i(o,s/(1-s*l));a.push(u.left),o=u.right}return a.push(o),a.map((function(t){var e=[];return 4===t.length&&(e.push("C"),e=e.concat(t[2])),t.length>=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e.concat(t[t.length-1])}))}(t,e,n));else{var a=[].concat(t);"M"===a[0]&&(a[0]="L");for(var o=0;o<=n-1;o++)r.push(a)}return r}t.exports=function(t,e){if(1===t.length)return t;var i=t.length-1,r=e.length-1,a=i/r,o=[];if(1===t.length&&"M"===t[0][0]){for(var s=0;s<r-i;s++)t.push(t[0]);return t}for(var l=0;l<r;l++){var u=Math.floor(a*l);o[u]=(o[u]||0)+1}var h=o.reduce((function(e,r,a){return a===i?e.concat(t[i]):e.concat(n(t[a],t[a+1],r))}),[]);return h.unshift(t[0]),"Z"!==e[r]&&"z"!==e[r]||h.push("Z"),h}},function(t,e,i){var n=i(103);function r(t,e,i){var n=null,r=i;return e<r&&(r=e,n="add"),t<r&&(r=t,n="del"),{type:n,min:r}}t.exports=function(t,e){var i=function(t,e){var i=t.length,a=e.length,o=void 0,s=void 0,l=0;if(0===i||0===a)return null;for(var u=[],h=0;h<=i;h++)u[h]=[],u[h][0]={min:h};for(var c=0;c<=a;c++)u[0][c]={min:c};for(var p=1;p<=i;p++){o=t[p-1];for(var f=1;f<=a;f++){s=e[f-1],l=n(o,s)?0:1;var d=u[p-1][f].min+1,g=u[p][f-1].min+1,v=u[p-1][f-1].min+l;u[p][f]=r(d,g,v)}}return u}(t,e),a=t.length,o=e.length,s=[],l=1,u=1;if(i[a][o]!==a){for(var h=1;h<=a;h++){var c=i[h][h].min;u=h;for(var p=l;p<=o;p++)i[h][p].min<c&&(c=i[h][p].min,u=p);l=u,i[h][l].type&&s.push({index:h-1,type:i[h][l].type})}for(var f=s.length-1;f>=0;f--)l=s[f].index,"add"===s[f].type?t.splice(l,0,[].concat(t[l])):t.splice(l,1)}if((a=t.length)<o)for(var d=0;d<o-a;d++)"z"===t[a-1][0]||"Z"===t[a-1][0]?t.splice(a-2,0,t[a-2]):t.push(t[a-1]);return t}},function(t,e,i){var n=i(0);t.exports=function(t,e){if(t.length!==e.length)return!1;var i=!0;return n(t,(function(t,n){if(t!==e[n])return i=!1,!1})),i}},function(t,e){function i(t){var e=[];switch(t[0]){case"M":case"L":e.push([t[1],t[2]]);break;case"A":e.push([t[6],t[7]]);break;case"Q":e.push([t[3],t[4]]),e.push([t[1],t[2]]);break;case"T":e.push([t[1],t[2]]);break;case"C":e.push([t[5],t[6]]),e.push([t[1],t[2]]),e.push([t[3],t[4]]);break;case"S":e.push([t[3],t[4]]),e.push([t[1],t[2]]);break;case"H":case"V":e.push([t[1],t[1]])}return e}function n(t,e,n){for(var r=[].concat(t),a=void 0,o=1/(n+1),s=i(e)[0],l=1;l<=n;l++)o*=l,0===(a=Math.floor(t.length*o))?r.unshift([s[0]*o+t[a][0]*(1-o),s[1]*o+t[a][1]*(1-o)]):r.splice(a,0,[s[0]*o+t[a][0]*(1-o),s[1]*o+t[a][1]*(1-o)]);return r}t.exports=function(t,e){if(t.length<=1)return t;for(var r=void 0,a=0;a<e.length;a++)if(t[a][0]!==e[a][0])switch(r=i(t[a]),e[a][0]){case"M":t[a]=["M"].concat(r[0]);break;case"L":t[a]=["L"].concat(r[0]);break;case"A":t[a]=[].concat(e[a]),t[a][6]=r[0][0],t[a][7]=r[0][1];break;case"Q":if(r.length<2){if(!(a>0)){t[a]=e[a];break}r=n(r,t[a-1],1)}t[a]=["Q"].concat(r.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[a]=["T"].concat(r[0]);break;case"C":if(r.length<3){if(!(a>0)){t[a]=e[a];break}r=n(r,t[a-1],2)}t[a]=["C"].concat(r.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(r.length<2){if(!(a>0)){t[a]=e[a];break}r=n(r,t[a-1],1)}t[a]=["S"].concat(r.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[a]=e[a]}return t}},function(t,e,i){var n={lc:i(106),lowerCase:i(33),lowerFirst:i(107),substitute:i(108),uc:i(109),upperCase:i(34),upperFirst:i(110)};t.exports=n},function(t,e,i){t.exports=i(33)},function(t,e,i){var n=i(8);t.exports=function(t){var e=n(t);return e.charAt(0).toLowerCase()+e.substring(1)}},function(t,e){t.exports=function(t,e){return t&&e?t.replace(/\\?\{([^{}]+)\}/g,(function(t,i){return"\\"===t.charAt(0)?t.slice(1):void 0===e[i]?"":e[i]})):t}},function(t,e,i){t.exports=i(34)},function(t,e,i){var n=i(8);t.exports=function(t){var e=n(t);return e.charAt(0).toUpperCase()+e.substring(1)}},function(t,e,i){var n=i(2),r={getType:i(35),isArray:i(1),isArrayLike:i(4),isBoolean:i(112),isFunction:i(3),isNil:i(5),isNull:i(113),isNumber:i(6),isObject:i(16),isObjectLike:i(13),isPlainObject:i(7),isPrototype:i(36),isType:n,isUndefined:i(114),isString:i(10),isRegExp:i(115),isDate:i(116),isArguments:i(117),isError:i(118)};t.exports=r},function(t,e,i){var n=i(2);t.exports=function(t){return n(t,"Boolean")}},function(t,e){t.exports=function(t){return null===t}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,i){var n=i(2);t.exports=function(t){return n(t,"RegExp")}},function(t,e,i){var n=i(2);t.exports=function(t){return n(t,"Date")}},function(t,e,i){var n=i(2);t.exports=function(t){return n(t,"Arguments")}},function(t,e,i){var n=i(2);t.exports=function(t){return n(t,"Error")}},function(t,e,i){var n=i(3),r=i(14),a=i(11);t.exports=function(t){for(var e=r(arguments),i=1;i<e.length;i++){var o=e[i];n(o)&&(o=o.prototype),a(t.prototype,o)}}},function(t,e){t.exports=function(t,e,i){var n=void 0;return function(){var r=this,a=arguments,o=function(){n=null,i||t.apply(r,a)},s=i&&!n;clearTimeout(n),n=setTimeout(o,e),s&&t.apply(r,a)}}},function(t,e,i){var n=i(7),r=i(1);function a(t,e,i,o){for(var s in i=i||0,o=o||5,e)if(e.hasOwnProperty(s)){var l=e[s];null!==l&&n(l)?(n(t[s])||(t[s]={}),i<o?a(t[s],l,i+1,o):t[s]=e[s]):r(l)?(t[s]=[],t[s]=t[s].concat(l)):void 0!==l&&(t[s]=l)}}t.exports=function(){for(var t=new Array(arguments.length),e=t.length,i=0;i<e;i++)t[i]=arguments[i];for(var n=t[0],r=1;r<e;r++)a(n,t[r]);return n}},function(t,e,i){var n=i(3),r=i(11);t.exports=function(t,e,i,a){n(e)||(i=e,e=t,t=function(){});var o=Object.create?function(t,e){return Object.create(t,{constructor:{value:e}})}:function(t,e){function i(){}i.prototype=t;var n=new i;return n.constructor=e,n},s=o(e.prototype,t);return t.prototype=r(s,t.prototype),t.superclass=o(e.prototype,e),r(s,i),r(t,a),t}},function(t,e,i){var n=i(37);t.exports=function(t,e){if(!e)return[t];var i=n(t,e),r=[];for(var a in i)r.push(i[a]);return r}},function(t,e,i){var n=i(4);t.exports=function(t,e){if(!n(t))return-1;var i=Array.prototype.indexOf;if(i)return i.call(t,e);for(var r=-1,a=0;a<t.length;a++)if(t[a]===e){r=a;break}return r}},function(t,e,i){var n=i(5),r=i(4),a=i(35),o=i(36),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(n(t))return!0;if(r(t))return!t.length;var e=a(t);if("Map"===e||"Set"===e)return!t.size;if(o(t))return!Object.keys(t).length;for(var i in t)if(s.call(t,i))return!1;return!0}},function(t,e,i){var n=i(3),r=i(39);t.exports=function(t,e,i){return n(i)?!!i(t,e):r(t,e)}},function(t,e,i){var n=i(0),r=i(4);t.exports=function(t,e){if(!r(t))return t;var i=[];return n(t,(function(t,n){i.push(e(t,n))})),i}},function(t,e,i){var n=i(0),r=i(7),a=Object.prototype.hasOwnProperty;t.exports=function(t,e){if(null===t||!r(t))return{};var i={};return n(e,(function(e){a.call(t,e)&&(i[e]=t[e])})),i}},function(t,e){t.exports=function(t,e,i){var n=void 0,r=void 0,a=void 0,o=void 0,s=0;i||(i={});var l=function(){s=!1===i.leading?0:Date.now(),n=null,o=t.apply(r,a),n||(r=a=null)},u=function(){var u=Date.now();s||!1!==i.leading||(s=u);var h=e-(u-s);return r=this,a=arguments,h<=0||h>e?(n&&(clearTimeout(n),n=null),s=u,o=t.apply(r,a),n||(r=a=null)):n||!1===i.trailing||(n=setTimeout(l,h)),o};return u.cancel=function(){clearTimeout(n),s=0,n=r=a=null},u}},function(t,e){var i,n=(i={},function(t){return i[t=t||"g"]?i[t]+=1:i[t]=1,t+i[t]});t.exports=n}])},t.exports=n()},function(t,e,i){"use strict";i.r(e),i.d(e,"__extends",(function(){return r})),i.d(e,"__assign",(function(){return a})),i.d(e,"__rest",(function(){return o})),i.d(e,"__decorate",(function(){return s})),i.d(e,"__param",(function(){return l})),i.d(e,"__metadata",(function(){return u})),i.d(e,"__awaiter",(function(){return h})),i.d(e,"__generator",(function(){return c})),i.d(e,"__exportStar",(function(){return p})),i.d(e,"__values",(function(){return f})),i.d(e,"__read",(function(){return d})),i.d(e,"__spread",(function(){return g})),i.d(e,"__spreadArrays",(function(){return v})),i.d(e,"__await",(function(){return y})),i.d(e,"__asyncGenerator",(function(){return m})),i.d(e,"__asyncDelegator",(function(){return x})),i.d(e,"__asyncValues",(function(){return b})),i.d(e,"__makeTemplateObject",(function(){return _})),i.d(e,"__importStar",(function(){return w})),i.d(e,"__importDefault",(function(){return M})),i.d(e,"__classPrivateFieldGet",(function(){return S})),i.d(e,"__classPrivateFieldSet",(function(){return k}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function r(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var a=function(){return(a=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function o(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(i[n[r]]=t[n[r]])}return i}function s(t,e,i,n){var r,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o}function l(t,e){return function(i,n){e(i,n,t)}}function u(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function h(t,e,i,n){return new(i||(i=Promise))((function(r,a){function o(t){try{l(n.next(t))}catch(t){a(t)}}function s(t){try{l(n.throw(t))}catch(t){a(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,s)}l((n=n.apply(t,e||[])).next())}))}function c(t,e){var i,n,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=(r=o.trys).length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(t){a=[6,t],n=0}finally{i=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function p(t,e){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}function f(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],n=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,a=i.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}function g(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t}function v(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,r++)n[r]=a[o];return n}function y(t){return this instanceof y?(this.v=t,this):new y(t)}function m(t,e,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,r=i.apply(t,e||[]),a=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(t){r[t]&&(n[t]=function(e){return new Promise((function(i,n){a.push([t,e,i,n])>1||s(t,e)}))})}function s(t,e){try{(i=r[t](e)).value instanceof y?Promise.resolve(i.value.v).then(l,u):h(a[0][2],i)}catch(t){h(a[0][3],t)}var i}function l(t){s("next",t)}function u(t){s("throw",t)}function h(t,e){t(e),a.shift(),a.length&&s(a[0][0],a[0][1])}}function x(t){var e,i;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,r){e[n]=t[n]?function(e){return(i=!i)?{value:y(t[n](e)),done:"return"===n}:r?r(e):e}:r}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,i=t[Symbol.asyncIterator];return i?i.call(t):(t=f(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(i){e[i]=t[i]&&function(e){return new Promise((function(n,r){(function(t,e,i,n){Promise.resolve(n).then((function(e){t({value:e,done:i})}),e)})(n,r,(e=t[i](e)).done,e.value)}))}}}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function M(t){return t&&t.__esModule?t:{default:t}}function S(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function k(t,e,i){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,i),i}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.height=n,this.width=i,this.x=this.minX=t,this.y=this.minY=e;var r=this.maxX=t+i,a=this.maxY=e+n;this.tl={x:t,y:e},this.tr={x:r,y:e},this.bl={x:t,y:a},this.br={x:r,y:a},this.bottom=0,this.left=this.x,this.right=0,this.top=this.y}return t.fromRange=function(e,i,n,r){return new t(e,i,n-e,r-i)},t.prototype.equals=function(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height},t}();e.default=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(10),o=i(4),s={matrix:"matrix",path:"path",points:"points",lineDash:"lineDash"},l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isShape=!0,e}return n.__extends(e,t),e.prototype.createPath=function(t){},e.prototype.afterPath=function(t){},e.prototype.isPointInPath=function(t,e){return!1},e.prototype.drawInner=function(t){var e=this.attrs;this.createPath(t);var i=t.globalAlpha;if(this.hasFill()){var n=e.fillOpacity;r.isNil(n)||1===n?t.fill():(t.globalAlpha=n,t.fill(),t.globalAlpha=i)}if(this.hasStroke()&&this.attrs.lineWidth>0){var a=e.strokeOpacity;r.isNil(a)||1===a||(t.globalAlpha=a),t.stroke()}this.afterPath(t)},e.prototype.isHitBox=function(){return!0},e.prototype.isHit=function(t,e){var i=[t,e,1];if(this.invert(i),this.isHitBox()){var n=this.getBBox();if(n&&!o.box(n.minX,n.maxX,n.minY,n.maxY,i[0],i[1]))return!1}var r=this.attrs.clip;return r?(r.invert(i,this.get("canvas")),!!r.isPointInPath(i[0],i[1])&&this.isPointInPath(i[0],i[1])):this.isPointInPath(i[0],i[1])},e.prototype.calculateBox=function(){return null},e.prototype.getHitLineWidth=function(){var t=this.attrs,e=t.lineAppendWidth||0;return(t.lineWidth||0)+e},e.prototype.clearTotalMatrix=function(){this.cfg.totalMatrix=null,this.cfg.region=null},e.prototype.clearBBox=function(){this.cfg.box=null,this.cfg.region=null},e.prototype.getBBox=function(){var t=this.get("box");return t||(t=this.calculateBox())&&this.set("box",t),t},e.prototype.clone=function(){var t=null,i=this.attrs,n={};return r.each(i,(function(t,e){s[e]&&r.isArray(i[e])?n[e]=function(t){for(var e=[],i=0;i<t.length;i++)r.isArray(t[i])?e.push([].concat(t[i])):e.push(t[i]);return e}(i[e]):n[e]=i[e]})),(t=new e({attrs:n})).cfg.zIndex=this.cfg.zIndex,t},e}(a.default);e.default=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(12),r=i(18),a=i(13),o=i(7);function s(t,e,i,r,a,o,s){var u=n.box(t,e,i,r,a);if(!l(u.minX,u.maxX,u.minY,u.maxY,o,s))return!1;var h=n.pointDistance(t,e,i,r,o,s);return!isNaN(h)&&h<=a/2}function l(t,e,i,n,r,a){return t<=r&&r<=e&&i<=a&&a<=n}e.line=s,e.polyline=function(t,e,i,n){var r=t.length-1;if(r<1)return!1;for(var a=0;a<r;a++)if(s(t[a][0],t[a][1],t[a+1][0],t[a+1][1],e,i,n))return!0;return!1},e.cubicline=function(t,e,i,n,r,o,s,l,u,h,c){return a.pointDistance(t,e,i,n,r,o,s,l,h,c)<=u/2},e.quadraticline=function(t,e,i,n,a,o,s,l,u){return r.pointDistance(t,e,i,n,a,o,l,u)<=s/2},e.arcline=function(t,e,i,n,r,a,s,l,u){return o.pointDistance(t,e,i,n,r,a,l,u)<=s/2},e.rect=function(t,e,i,n,r,a){return t<=r&&r<=t+i&&e<=a&&a<=e+n},e.circle=function(t,e,i,n,r){return Math.pow(n-t,2)+Math.pow(r-e,2)<=Math.pow(i,2)},e.box=l},,function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,a=/[^\s\,]+/gi;e.parseRadius=function(t){var e=0,i=0,r=0,a=0;return n.isArray(t)?1===t.length?e=i=r=a=t[0]:2===t.length?(e=r=t[0],i=a=t[1]):3===t.length?(e=t[0],i=a=t[1],r=t[2]):(e=t[0],i=t[1],r=t[2],a=t[3]):e=i=r=a=t,{r1:e,r2:i,r3:r,r4:a}},e.parsePath=function(t){return t=t||[],n.isArray(t)?t:n.isString(t)?(t=t.match(r),n.each(t,(function(e,i){if((e=e.match(a))[0].length>1){var r=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=r}n.each(e,(function(t,i){isNaN(t)||(e[i]=+t)})),t[i]=e})),t):void 0}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=i(2),a=function(t,e,i,n){return{x:Math.cos(n)*i+t,y:Math.sin(n)*i+e}},o=function(t,e,i,n){var r,a;return n?t<e?(r=e-t,a=2*Math.PI-i+t):t>i&&(r=2*Math.PI-t+e,a=t-i):(r=t-e,a=i-t),r>a?i:e};e.nearAngle=function(t,e,i,r){var a=0;return i-e>=2*Math.PI&&(a=2*Math.PI),e=n.mod(e,2*Math.PI),i=n.mod(i,2*Math.PI)+a,t=n.mod(t,2*Math.PI),r?e>=i?t>i&&t<e?t:o(t,i,e,!0):t<e||t>i?t:o(t,e,i,!1):e<=i?e<t&&t<i?t:o(t,e,i,!0):t>e||t<i?t:o(t,i,e,!1)},e.pointDistance=function(t,i,r,a,o,s,l,u,h){var c=[l,u],p=[t,i],f=n.vec2.subtract([],c,p),d=n.vec2.angleTo([1,0],f);d=e.nearAngle(d,a,o,s);var g=[r*Math.cos(d)+t,r*Math.sin(d)+i];return h?{x:g[0],y:g[1]}:n.vec2.distance(g,c)},e.box=function(t,i,n,o,s,l){var u=Math.PI/2,h=Math.PI,c=3*Math.PI/2,p=[],f=e.nearAngle(0,o,s,l);0===f&&p.push(a(t,i,n,0)),(f=e.nearAngle(u,o,s,l))===u&&p.push(a(t,i,n,u)),(f=e.nearAngle(h,o,s,l))===h&&p.push(a(t,i,n,h)),(f=e.nearAngle(c,o,s,l))===c&&p.push(a(t,i,n,c)),p.push(a(t,i,n,o)),p.push(a(t,i,n,s));var d=p.map((function(t){return t.x})),g=p.map((function(t){return t.y}));return r.default.fromRange(Math.min.apply(Math,d),Math.min.apply(Math,g),Math.max.apply(Math,d),Math.max.apply(Math,g))},e.projectPoint=function(t,i,n,r,a,o,s,l){return e.pointDistance(t,i,n,r,a,o,s,l,!0)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=i(4),a=i(13),o=i(18),s=i(39),l=i(2),u=n.vec3,h=n.mat3,c=["m","l","c","a","q","h","v","t","s","z"];function p(t,e,i){return{x:i.x+t,y:i.y+e}}function f(t,e){return{x:e.x+(e.x-t.x),y:e.y+(e.y-t.y)}}function d(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function g(t,e){return(t[0]*e[0]+t[1]*e[1])/(d(t)*d(e))}function v(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(g(t,e))}var y=function(){function t(t,e,i){this.preSegment=e,this.isLast=i,this.init(t,e)}return t.prototype.init=function(t,e){var i=t[0];e=e||{endPoint:{x:0,y:0}};var r,a,o,s,l=c.indexOf(i)>=0,u=l?i.toUpperCase():i,h=t,d=e.endPoint,y=h[1],m=h[2];switch(u){default:break;case"M":s=l?p(y,m,d):{x:y,y:m},this.command="M",this.params=[d,s],this.subStart=s,this.endPoint=s;break;case"L":s=l?p(y,m,d):{x:y,y:m},this.command="L",this.params=[d,s],this.subStart=e.subStart,this.endPoint=s,this.endTangent=function(){return[s.x-d.x,s.y-d.y]},this.startTangent=function(){return[d.x-s.x,d.y-s.y]};break;case"H":s=l?p(y,0,d):{x:y,y:d.y},this.command="L",this.params=[d,s],this.subStart=e.subStart,this.endPoint=s,this.endTangent=function(){return[s.x-d.x,s.y-d.y]},this.startTangent=function(){return[d.x-s.x,d.y-s.y]};break;case"V":s=l?p(0,y,d):{x:d.x,y:y},this.command="L",this.params=[d,s],this.subStart=e.subStart,this.endPoint=s,this.endTangent=function(){return[s.x-d.x,s.y-d.y]},this.startTangent=function(){return[d.x-s.x,d.y-s.y]};break;case"Q":l?(r=p(y,m,d),a=p(h[3],h[4],d)):(r={x:y,y:m},a={x:h[3],y:h[4]}),this.command="Q",this.params=[d,r,a],this.subStart=e.subStart,this.endPoint=a,this.endTangent=function(){return[a.x-r.x,a.y-r.y]},this.startTangent=function(){return[d.x-r.x,d.y-r.y]};break;case"T":a=l?p(y,m,d):{x:y,y:m},"Q"===e.command?(r=f(e.params[1],d),this.command="Q",this.params=[d,r,a],this.subStart=e.subStart,this.endPoint=a,this.endTangent=function(){return[a.x-r.x,a.y-r.y]},this.startTangent=function(){return[d.x-r.x,d.y-r.y]}):(this.command="TL",this.params=[d,a],this.subStart=e.subStart,this.endPoint=a,this.endTangent=function(){return[a.x-d.x,a.y-d.y]},this.startTangent=function(){return[d.x-a.x,d.y-a.y]});break;case"C":l?(r=p(y,m,d),a=p(h[3],h[4],d),o=p(h[5],h[6],d)):(r={x:y,y:m},a={x:h[3],y:h[4]},o={x:h[5],y:h[6]}),this.command="C",this.params=[d,r,a,o],this.subStart=e.subStart,this.endPoint=o,this.endTangent=function(){return[o.x-a.x,o.y-a.y]},this.startTangent=function(){return[d.x-r.x,d.y-r.y]};break;case"S":l?(a=p(y,m,d),o=p(h[3],h[4],d)):(a={x:y,y:m},o={x:h[3],y:h[4]}),"C"===e.command?(r=f(e.params[2],d),this.command="C",this.params=[d,r,a,o],this.subStart=e.subStart,this.endPoint=o,this.endTangent=function(){return[o.x-a.x,o.y-a.y]},this.startTangent=function(){return[d.x-r.x,d.y-r.y]}):(this.command="SQ",this.params=[d,a,o],this.subStart=e.subStart,this.endPoint=o,this.endTangent=function(){return[o.x-a.x,o.y-a.y]},this.startTangent=function(){return[d.x-a.x,d.y-a.y]});break;case"A":var x=y,b=m,_=h[3],w=h[4],M=h[5];s=l?p(h[6],h[7],d):{x:h[6],y:h[7]},this.command="A";var S=function(t,e,i,r,a,o,s){var l=n.mod(n.toRadian(s),2*Math.PI),u=t.x,h=t.y,c=e.x,p=e.y,f=Math.cos(l)*(u-c)/2+Math.sin(l)*(h-p)/2,d=-1*Math.sin(l)*(u-c)/2+Math.cos(l)*(h-p)/2,y=f*f/(a*a)+d*d/(o*o);y>1&&(a*=Math.sqrt(y),o*=Math.sqrt(y));var m=a*a*(d*d)+o*o*(f*f),x=Math.sqrt((a*a*(o*o)-m)/m);i===r&&(x*=-1),isNaN(x)&&(x=0);var b=x*a*d/o,_=x*-o*f/a,w=(u+c)/2+Math.cos(l)*b-Math.sin(l)*_,M=(h+p)/2+Math.sin(l)*b+Math.cos(l)*_,S=v([1,0],[(f-b)/a,(d-_)/o]),k=[(f-b)/a,(d-_)/o],O=[(-1*f-b)/a,(-1*d-_)/o],C=v(k,O);return g(k,O)<=-1&&(C=Math.PI),g(k,O)>=1&&(C=0),0===r&&C>0&&(C-=2*Math.PI),1===r&&C<0&&(C+=2*Math.PI),[t,w,M,a,o,S,C,l,r]}(d,s,w,M,x,b,_);this.params=S;var k=e.subStart;this.subStart=k,this.endPoint=s;var O=S[5]%(2*Math.PI);n.isNumberEqual(O,2*Math.PI)&&(O=0);var C=S[6]%(2*Math.PI);n.isNumberEqual(C,2*Math.PI)&&(C=0);var A=.001;this.startTangent=function(){0===M&&(A*=-1);var t=S[3]*Math.cos(O-A)+S[1],e=S[4]*Math.sin(O-A)+S[2];return[t-k.x,e-k.y]},this.endTangent=function(){var t=S[6];t-2*Math.PI<1e-4&&(t=0);var e=S[3]*Math.cos(O+t+A)+S[1],i=S[4]*Math.sin(O+t-A)+S[2];return[d.x-e,d.y-i]};break;case"Z":this.command="Z",this.params=[d,e.subStart],this.subStart=e.subStart,this.endPoint=e.subStart}},t.prototype.isInside=function(t,e,i){var n=this.command,a=this.params,o=this.box;if(o&&!r.box(o.minX,o.maxX,o.minY,o.maxY,t,e))return!1;switch(n){default:break;case"M":return!1;case"TL":case"L":case"Z":return r.line(a[0].x,a[0].y,a[1].x,a[1].y,i,t,e);case"SQ":case"Q":return r.quadraticline(a[0].x,a[0].y,a[1].x,a[1].y,a[2].x,a[2].y,i,t,e);case"C":return r.cubicline(a[0].x,a[0].y,a[1].x,a[1].y,a[2].x,a[2].y,a[3].x,a[3].y,i,t,e);case"A":var s=a,l=s[1],c=s[2],p=s[3],f=s[4],d=s[5],g=s[6],v=s[7],y=s[8],m=p>f?p:f,x=p>f?1:p/f,b=p>f?f/p:1;s=[t,e,1];var _=[1,0,0,0,1,0,0,0,1];return h.translate(_,_,[-l,-c]),h.rotate(_,_,-v),h.scale(_,_,[1/x,1/b]),u.transformMat3(s,s,_),r.arcline(0,0,m,d,d+g,1-y,i,s[0],s[1])}return!1},t.prototype.draw=function(t){var e,i,n,r=this.command,a=this.params;switch(r){default:break;case"M":t.moveTo(a[1].x,a[1].y);break;case"TL":case"L":t.lineTo(a[1].x,a[1].y);break;case"SQ":case"Q":e=a[1],i=a[2],t.quadraticCurveTo(e.x,e.y,i.x,i.y);break;case"C":e=a[1],i=a[2],n=a[3],t.bezierCurveTo(e.x,e.y,i.x,i.y,n.x,n.y);break;case"A":var o=a,s=o[1],l=o[2],u=o[3],h=o[4],c=o[5],p=o[6],f=o[7],d=o[8],g=u>h?u:h,v=u>h?1:u/h,y=u>h?h/u:1;t.translate(s,l),t.rotate(f),t.scale(v,y),t.arc(0,0,g,c,c+p,1-d),t.scale(1/v,1/y),t.rotate(-f),t.translate(-s,-l);break;case"Z":t.closePath()}},t.prototype.getBBox=function(t){var e,i,n,r,u=t/2,h=this.params;switch(this.command){default:case"M":case"Z":break;case"TL":case"L":this.box=l.default.fromRange(Math.min(h[0].x,h[1].x)-u,Math.min(h[0].y,h[1].y)-u,Math.max(h[0].x,h[1].x)+u,Math.max(h[0].y,h[1].y)+u);break;case"SQ":case"Q":for(n=0,r=(i=o.extrema(h[0].x,h[1].x,h[2].x)).length;n<r;n++)i[n]=o.at(h[0].x,h[1].x,h[2].x,i[n]);for(i.push(h[0].x,h[2].x),n=0,r=(e=o.extrema(h[0].y,h[1].y,h[2].y)).length;n<r;n++)e[n]=o.at(h[0].y,h[1].y,h[2].y,e);e.push(h[0].y,h[2].y),this.box=l.default.fromRange(Math.min.apply(Math,i)-u,Math.min.apply(Math,e)-u,Math.max.apply(Math,i)+u,Math.max.apply(Math,e)+u);break;case"C":for(n=0,r=(i=a.extrema(h[0].x,h[1].x,h[2].x,h[3].x)).length;n<r;n++)i[n]=a.at(h[0].x,h[1].x,h[2].x,h[3].x,i[n]);for(n=0,r=(e=a.extrema(h[0].y,h[1].y,h[2].y,h[3].y)).length;n<r;n++)e[n]=a.at(h[0].y,h[1].y,h[2].y,h[3].y,e[n]);i.push(h[0].x,h[3].x),e.push(h[0].y,h[3].y),this.box=l.default.fromRange(Math.min.apply(Math,i)-u,Math.min.apply(Math,e)-u,Math.max.apply(Math,i)+u,Math.max.apply(Math,e)+u);break;case"A":var c=h,p=c[1],f=c[2],d=c[3],g=c[4],v=c[5],y=c[6],m=c[7],x=c[8],b=v,_=v+y,w=s.xExtrema(m,d,g),M=1/0,S=-1/0,k=[b,_];for(n=2*-Math.PI;n<=2*Math.PI;n+=Math.PI){var O=w+n;1===x?b<O&&O<_&&k.push(O):_<O&&O<b&&k.push(O)}for(n=0,r=k.length;n<r;n++){var C=s.xAt(m,d,g,p,k[n]);C<M&&(M=C),C>S&&(S=C)}var A=s.yExtrema(m,d,g),L=1/0,P=-1/0,j=[b,_];for(n=2*-Math.PI;n<=2*Math.PI;n+=Math.PI){var T=A+n;1===x?b<T&&T<_&&j.push(T):_<T&&T<b&&j.push(T)}for(n=0,r=j.length;n<r;n++){var B=s.yAt(m,d,g,f,j[n]);B<L&&(L=B),B>P&&(P=B)}this.box=l.default.fromRange(M-u,L-u,S+u,P+u)}},t}();e.default=y},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(6),r=i(8),a=Math.PI,o=Math.sin,s=Math.cos,l=Math.atan2,u=a/3;function h(t,e,i,n,r,h,c){var p,f,d,g,v,y,m;if(!e.fill){var x=e.arrowLength||10,b=e.arrowAngle?e.arrowAngle*a/180:u;m=l(n-h,i-r),v=Math.abs(e.lineWidth*s(m))/2,y=Math.abs(e.lineWidth*o(m))/2,c&&(v=-v,y=-y),p=r+x*s(m+b/2),f=h+x*o(m+b/2),d=r+x*s(m-b/2),g=h+x*o(m-b/2),t.beginPath(),t.moveTo(p-v,f-y),t.lineTo(r-v,h-y),t.lineTo(d-v,g-y),t.moveTo(r-v,h-y),t.lineTo(r+v,h+y),t.moveTo(r,h),t.stroke()}}function c(t,e,i,a,o,s,l){var u=l?e.startArrow:e.endArrow,h=u.d,c=0,p=o-i,f=s-a,d=Math.atan(p/f);0===f&&p<0?c=Math.PI:p>0&&f>0?c=Math.PI/2-d:p<0&&f<0?c=-Math.PI/2-d:p>=0&&f<0?c=-d-Math.PI/2:p<=0&&f>0&&(c=Math.PI/2-d);var g=function(t){var e,i=[],a=n.parsePath(t.path);if(Array.isArray(a)&&0!==a.length&&("M"===a[0][0]||"m"===a[0][0])){for(var o=a.length,s=0;s<a.length;s++){var l=a[s];e=new r.default(l,e,s===o-1),i.push(e)}return i}}(u);if(g){h&&(l?(o+=Math.sin(Math.abs(d))*h,s=s+Math.cos(Math.abs(d))*h-.5*t.lineWidth):(o-=Math.sin(Math.abs(d))*h,s=s-Math.cos(Math.abs(d))*h+.5*t.lineWidth)),t.save(),t.beginPath(),t.translate(o,s),t.rotate(c);for(var v=0;v<g.length;v++)g[v].draw(t);t.setTransform(1,0,0,1,0,0),t.fillStyle=t.strokeStyle,t.fill(),t.restore()}}e.addStartArrow=function(t,e,i,n,r,a){"object"==typeof e.startArrow?c(t,e,i,n,r,a,!0):e.startArrow&&h(t,e,i,n,r,a,!0)},e.addEndArrow=function(t,e,i,n,r,a){"object"==typeof e.endArrow?c(t,e,i,n,r,a,!1):e.endArrow&&h(t,e,i,n,r,a,!1)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(36),o={delay:"delay",rotate:"rotate"},s={fill:"fill",stroke:"stroke",fillStyle:"fillStyle",strokeStyle:"strokeStyle"};function l(t,e){var i={},n=e.attrs;for(var r in t.attrs)i[r]=n[r];return i}var u=function(t){function e(e){void 0===e&&(e={});var i=t.call(this,e)||this;return i.initTransform(),i.initAnimate(),i}return n.__extends(e,t),e.prototype.initAnimate=function(){this.setSilent("animable",!0),this.setSilent("animating",!1)},e.prototype.animate=function(t,e,i,n,a){void 0===n&&(n=r.noop),void 0===a&&(a=0),this.set("animating",!0);var u=this.get("timeline");u||(u=this.get("canvas").get("timeline"),this.setSilent("timeline",u));var h=this.get("animators")||[];u.timer||u.initTimer(),r.isNumber(n)&&(a=n,n=null),r.isFunction(i)?(n=i,i="easeLinear"):i=i||"easeLinear";var c=function(t,e){var i={matrix:null,attrs:{}},n=e.attrs;for(var a in t)if("transform"===a)i.matrix=r.transform(e.getMatrix(),t[a]);else if("rotate"===a)i.matrix=r.transform(e.getMatrix(),[["r",t[a]]]);else if("matrix"===a)i.matrix=t[a];else{if(s[a]&&/^[r,R,L,l]{1}[\s]*\(/.test(t[a]))continue;o[a]||n[a]===t[a]||(i.attrs[a]=t[a])}return i}(t,this),p={fromAttrs:l(c,this),toAttrs:c.attrs,fromMatrix:r.clone(this.getMatrix()),toMatrix:c.matrix,duration:e,easing:i,callback:n,delay:a,startTime:u.getTime(),id:r.uniqueId(),onFrame:null};t.onFrame&&(p.onFrame=t.onFrame),h.length>0?h=function(t,e){if(e.onFrame)return t;var i=e.delay,n=Object.prototype.hasOwnProperty;return r.each(e.toAttrs,(function(e,a){r.each(t,(function(t){i<t.startTime+t.duration&&n.call(t.toAttrs,a)&&(delete t.toAttrs[a],delete t.fromAttrs[a])}))})),e.toMatrix&&r.each(t,(function(t){i<t.startTime+t.duration&&t.toMatrix&&delete t.toMatrix})),t}(h,p):u.addAnimator(this),h.push(p),this.setSilent("animators",h),this.setSilent("pause",{isPaused:!1})},e.prototype.stopAnimate=function(){var t=this,e=this.get("animators");r.each(e,(function(e){e.onFrame?t.attr(e.onFrame(1)):t.attr(e.toAttrs),e.toMatrix&&t.attr("matrix",e.toMatrix),e.callback&&e.callback()})),this.setSilent("animating",!1),this.setSilent("animators",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline");return this.setSilent("pause",{isPaused:!0,pauseTime:t.getTime()}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animators"),i=this.get("pause").pauseTime;return r.each(e,(function(e){e.startTime=e.startTime+(t-i),e._paused=!1,e._pauseTime=null})),this.setSilent("pause",{isPaused:!1}),this.setSilent("animators",e),this},e}(a.default);e.default=u},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=function(){function t(t,e,i,n){this.x=0,this.y=0,this.clientX=0,this.clientY=0,this.cfg={},this.bubbles=!1,this.cancelable=!1,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.type=t,this.event=e,this.bubbles=!!i,this.cancelable=!!n}return t.prototype.preventDefault=function(){this.defaultPrevented=this.cancelable&&!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.remove=function(){this.cfg.removed=!0},t.prototype.clone=function(){return n.clone(this)},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t}();e.default=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=i(2);e.at=function(t,e,i){return(e-t)*i+t},e.pointDistance=function(t,e,i,r,a,o){var s=[i-t,r-e];if(n.vec2.exactEquals(s,[0,0]))return NaN;var l=[-s[1],s[0]];n.vec2.normalize(l,l);var u=[a-t,o-e];return Math.abs(n.vec2.dot(u,l))},e.box=function(t,e,i,n,a){var o=a/2;return r.default.fromRange(Math.min(t,i)-o,Math.min(e,n)-o,Math.max(t,i)+o,Math.max(e,n)+o)},e.len=function(t,e,i,n){return Math.sqrt((i-t)*(i-t)+(n-e)*(n-e))}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=n.vec2;function a(t,e,i,n,r){var a=1-r;return a*a*(a*n+3*r*i)+r*r*(r*t+3*a*e)}function o(t,e,i,n,o,s,l,u,h,c,p){var f,d,g,v,y,m,x,b,_=.005,w=1/0,M=[h,c];for(d=0;d<1;d+=.05)g=[a(t,i,o,l,d),a(e,n,s,u,d)],(v=r.squaredDistance(M,g))<w&&(f=d,w=v);w=1/0;for(var S=0;S<32&&!(_<1e-4);S++)b=f+_,g=[a(t,i,o,l,x=f-_),a(e,n,s,u,x)],v=r.squaredDistance(M,g),x>=0&&v<w?(f=x,w=v):(m=[a(t,i,o,l,b),a(e,n,s,u,b)],y=r.squaredDistance(M,m),b<=1&&y<w?(f=b,w=y):_*=.5);return p?{x:a(t,i,o,l,f),y:a(e,n,s,u,f)}:Math.sqrt(w)}function s(t,e,i,n,r){return t*(t*(-3*e+9*i-9*n+3*r)+6*e-12*i+6*n)-3*e+3*i}e.at=a,e.derivativeAt=function(t,e,i,n,r){var a=1-r;return 3*(((e-t)*a+2*(i-e)*r)*a+(n-i)*r*r)},e.pointDistance=o,e.extrema=function(t,e,i,r){var a,o,s,l=3*t-9*e+9*i-3*r,u=6*e-12*i+6*r,h=3*i-3*r,c=[];if(n.isNumberEqual(l,0))n.isNumberEqual(u,0)||(a=-h/u)>=0&&a<=1&&c.push(a);else{var p=u*u-4*l*h;n.isNumberEqual(p,0)?c.push(-u/(2*l)):p>0&&(o=(-u-(s=Math.sqrt(p)))/(2*l),(a=(-u+s)/(2*l))>=0&&a<=1&&c.push(a),o>=0&&o<=1&&c.push(o))}return c},e.len=function(t,e,i,r,a,o,l,u,h){n.isNil(h)&&(h=1);for(var c=(h=h>1?1:h<0?0:h)/2,p=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,g=0;g<12;g++){var v=c*p[g]+c,y=s(v,t,i,a,l),m=s(v,e,r,o,u),x=y*y+m*m;d+=f[g]*Math.sqrt(x)}return c*d},e.projectPoint=function(t,e,i,n,r,a,s,l,u,h){return o(t,e,i,n,r,a,s,l,u,h,!0)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r="\t\n\v\f\r \u2028\u2029",a=new RegExp("([a-z])["+r+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+r+"]*,?["+r+"]*)+)","ig"),o=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+r+"]*,?["+r+"]*","ig"),s=function(t){if(!t)return null;if(typeof t==typeof[])return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},i=[];return String(t).replace(a,(function(n,r,a){var s=[],l=r.toLowerCase();if(a.replace(o,(function(t,e){e&&s.push(+e)})),"m"===l&&s.length>2&&(i.push([r].concat(s.splice(0,2))),l="l",r="m"===r?"l":"L"),"o"===l&&1===s.length&&i.push([r,s[0]]),"r"===l)i.push([r].concat(s));else for(;s.length>=e[l]&&(i.push([r].concat(s.splice(0,e[l]))),e[l]););return t})),i};e.parsePathString=s;var l=function(t,e){for(var i=[],n=0,r=t.length;r-2*!e>n;n+=2){var a=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?r-4===n?a[3]={x:+t[0],y:+t[1]}:r-2===n&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[r-2],y:+t[r-1]}:r-4===n?a[3]=a[2]:n||(a[0]={x:+t[n],y:+t[n+1]}),i.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return i};e.catmullRomToBezier=l;var u=function(t,e,i,n,r){var a=[];if(null===r&&null===n&&(n=i),t=+t,e=+e,i=+i,n=+n,null!==r){var o=Math.PI/180,s=t+i*Math.cos(-n*o),l=t+i*Math.cos(-r*o);a=[["M",s,e+i*Math.sin(-n*o)],["A",i,i,0,+(r-n>180),0,l,e+i*Math.sin(-r*o)]]}else a=[["M",t,e],["m",0,-n],["a",i,n,0,1,1,0,2*n],["a",i,n,0,1,1,0,-2*n],["z"]];return a},h=function(t){if(!(t=s(t))||!t.length)return[["M",0,0]];var e,i,n=[],r=0,a=0,o=0,h=0,c=0;"M"===t[0][0]&&(o=r=+t[0][1],h=a=+t[0][2],c++,n[0]=["M",r,a]);for(var p=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),f=void 0,d=void 0,g=c,v=t.length;g<v;g++){if(n.push(f=[]),(e=(d=t[g])[0])!==e.toUpperCase())switch(f[0]=e.toUpperCase(),f[0]){case"A":f[1]=d[1],f[2]=d[2],f[3]=d[3],f[4]=d[4],f[5]=d[5],f[6]=+d[6]+r,f[7]=+d[7]+a;break;case"V":f[1]=+d[1]+a;break;case"H":f[1]=+d[1]+r;break;case"R":for(var y=2,m=(i=[r,a].concat(d.slice(1))).length;y<m;y++)i[y]=+i[y]+r,i[++y]=+i[y]+a;n.pop(),n=n.concat(l(i,p));break;case"O":n.pop(),(i=u(r,a,d[1],d[2])).push(i[0]),n=n.concat(i);break;case"U":n.pop(),n=n.concat(u(r,a,d[1],d[2],d[3])),f=["U"].concat(n[n.length-1].slice(-2));break;case"M":o=+d[1]+r,h=+d[2]+a;break;default:for(y=1,m=d.length;y<m;y++)f[y]=+d[y]+(y%2?r:a)}else if("R"===e)i=[r,a].concat(d.slice(1)),n.pop(),n=n.concat(l(i,p)),f=["R"].concat(d.slice(-2));else if("O"===e)n.pop(),(i=u(r,a,d[1],d[2])).push(i[0]),n=n.concat(i);else if("U"===e)n.pop(),n=n.concat(u(r,a,d[1],d[2],d[3])),f=["U"].concat(n[n.length-1].slice(-2));else for(var x=0,b=d.length;x<b;x++)f[x]=d[x];if("O"!==(e=e.toUpperCase()))switch(f[0]){case"Z":r=+o,a=+h;break;case"H":r=f[1];break;case"V":a=f[1];break;case"M":o=f[f.length-2],h=f[f.length-1];break;default:r=f[f.length-2],a=f[f.length-1]}}return n};e.pathToAbsolute=h;var c=function(t,e,i,n){return[t,e,i,n,i,n]},p=function(t,e,i,n,r,a){return[1/3*t+2/3*i,1/3*e+2/3*n,1/3*r+2/3*i,1/3*a+2/3*n,r,a]},f=function(t,e,i,n,r,a,o,s,l,u){i===n&&(i+=1);var h,c,p,d,g,v=120*Math.PI/180,y=Math.PI/180*(+r||0),m=[],x=function(t,e,i){return{x:t*Math.cos(i)-e*Math.sin(i),y:t*Math.sin(i)+e*Math.cos(i)}};if(u)c=u[0],p=u[1],d=u[2],g=u[3];else{t=(h=x(t,e,-y)).x,e=h.y,s=(h=x(s,l,-y)).x,l=h.y,t===s&&e===l&&(s+=1,l+=1);var b=(t-s)/2,_=(e-l)/2,w=b*b/(i*i)+_*_/(n*n);w>1&&(i*=w=Math.sqrt(w),n*=w);var M=i*i,S=n*n,k=(a===o?-1:1)*Math.sqrt(Math.abs((M*S-M*_*_-S*b*b)/(M*_*_+S*b*b)));d=k*i*_/n+(t+s)/2,g=k*-n*b/i+(e+l)/2,c=Math.asin(((e-g)/n).toFixed(9)),p=Math.asin(((l-g)/n).toFixed(9)),c=t<d?Math.PI-c:c,p=s<d?Math.PI-p:p,c<0&&(c=2*Math.PI+c),p<0&&(p=2*Math.PI+p),o&&c>p&&(c-=2*Math.PI),!o&&p>c&&(p-=2*Math.PI)}var O=p-c;if(Math.abs(O)>v){var C=p,A=s,L=l;p=c+v*(o&&p>c?1:-1),s=d+i*Math.cos(p),l=g+n*Math.sin(p),m=f(s,l,i,n,r,0,o,A,L,[p,C,d,g])}O=p-c;var P=Math.cos(c),j=Math.sin(c),T=Math.cos(p),B=Math.sin(p),I=Math.tan(O/4),D=4/3*i*I,F=4/3*n*I,E=[t,e],R=[t+D*j,e-F*P],z=[s+D*B,l-F*T],N=[s,l];if(R[0]=2*E[0]-R[0],R[1]=2*E[1]-R[1],u)return[R,z,N].concat(m);for(var Y=[],H=0,G=(m=[R,z,N].concat(m).join().split(",")).length;H<G;H++)Y[H]=H%2?x(m[H-1],m[H],y).y:x(m[H],m[H+1],y).x;return Y},d=function(t,e){var i,n=h(t),r=e&&h(e),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s=[],l=[],u="",d="",g=function(t,e,i){var n,r;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"].concat(f.apply(0,[e.x,e.y].concat(t.slice(1))));break;case"S":"C"===i||"S"===i?(n=2*e.x-e.bx,r=2*e.y-e.by):(n=e.x,r=e.y),t=["C",n,r].concat(t.slice(1));break;case"T":"Q"===i||"T"===i?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"].concat(p(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"].concat(p(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"].concat(c(e.x,e.y,t[1],t[2]));break;case"H":t=["C"].concat(c(e.x,e.y,t[1],e.y));break;case"V":t=["C"].concat(c(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"].concat(c(e.x,e.y,e.X,e.Y))}return t},v=function(t,e){if(t[e].length>7){t[e].shift();for(var a=t[e];a.length;)s[e]="A",r&&(l[e]="A"),t.splice(e++,0,["C"].concat(a.splice(0,6)));t.splice(e,1),i=Math.max(n.length,r&&r.length||0)}},y=function(t,e,a,o,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),a.bx=0,a.by=0,a.x=t[s][1],a.y=t[s][2],i=Math.max(n.length,r&&r.length||0))};i=Math.max(n.length,r&&r.length||0);for(var m=0;m<i;m++){n[m]&&(u=n[m][0]),"C"!==u&&(s[m]=u,m&&(d=s[m-1])),n[m]=g(n[m],a,d),"A"!==s[m]&&"C"===u&&(s[m]="C"),v(n,m),r&&(r[m]&&(u=r[m][0]),"C"!==u&&(l[m]=u,m&&(d=l[m-1])),r[m]=g(r[m],o,d),"A"!==l[m]&&"C"===u&&(l[m]="C"),v(r,m)),y(n,r,a,o,m),y(r,n,o,a,m);var x=n[m],b=r&&r[m],_=x.length,w=r&&b.length;a.x=x[_-2],a.y=x[_-1],a.bx=parseFloat(x[_-4])||a.x,a.by=parseFloat(x[_-3])||a.y,o.bx=r&&(parseFloat(b[w-4])||o.x),o.by=r&&(parseFloat(b[w-3])||o.y),o.x=r&&b[w-2],o.y=r&&b[w-1]}return r?[n,r]:n};e.pathTocurve=d;var g=/,?([a-z]),?/gi,v=function(t){return t.join(",").replace(g,"$1")};e.parsePathArray=v;var y=function(t,e,i,n,r){return t*(t*(-3*e+9*i-9*n+3*r)+6*e-12*i+6*n)-3*e+3*i},m=function(t,e,i,n,r,a,o,s,l){null===l&&(l=1);for(var u=(l=l>1?1:l<0?0:l)/2,h=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],c=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,f=0;f<12;f++){var d=u*h[f]+u,g=y(d,t,i,r,o),v=y(d,e,n,a,s),m=g*g+v*v;p+=c[f]*Math.sqrt(m)}return u*p},x=function(t,e,i,n,r,a,o,s){for(var l,u,h,c,p=[],f=[[],[]],d=0;d<2;++d)if(0===d?(u=6*t-12*i+6*r,l=-3*t+9*i-9*r+3*o,h=3*i-3*t):(u=6*e-12*n+6*a,l=-3*e+9*n-9*a+3*s,h=3*n-3*e),Math.abs(l)<1e-12){if(Math.abs(u)<1e-12)continue;(c=-h/u)>0&&c<1&&p.push(c)}else{var g=u*u-4*h*l,v=Math.sqrt(g);if(!(g<0)){var y=(-u+v)/(2*l);y>0&&y<1&&p.push(y);var m=(-u-v)/(2*l);m>0&&m<1&&p.push(m)}}for(var x,b=p.length,_=b;b--;)x=1-(c=p[b]),f[0][b]=x*x*x*t+3*x*x*c*i+3*x*c*c*r+c*c*c*o,f[1][b]=x*x*x*e+3*x*x*c*n+3*x*c*c*a+c*c*c*s;return f[0][_]=t,f[1][_]=e,f[0][_+1]=o,f[1][_+1]=s,f[0].length=f[1].length=_+2,{min:{x:Math.min.apply(0,f[0]),y:Math.min.apply(0,f[1])},max:{x:Math.max.apply(0,f[0]),y:Math.max.apply(0,f[1])}}},b=function(t,e,i,n,r,a,o,s){if(!(Math.max(t,i)<Math.min(r,o)||Math.min(t,i)>Math.max(r,o)||Math.max(e,n)<Math.min(a,s)||Math.min(e,n)>Math.max(a,s))){var l=(t-i)*(a-s)-(e-n)*(r-o);if(l){var u=((t*n-e*i)*(r-o)-(t-i)*(r*s-a*o))/l,h=((t*n-e*i)*(a-s)-(e-n)*(r*s-a*o))/l,c=+u.toFixed(2),p=+h.toFixed(2);if(!(c<+Math.min(t,i).toFixed(2)||c>+Math.max(t,i).toFixed(2)||c<+Math.min(r,o).toFixed(2)||c>+Math.max(r,o).toFixed(2)||p<+Math.min(e,n).toFixed(2)||p>+Math.max(e,n).toFixed(2)||p<+Math.min(a,s).toFixed(2)||p>+Math.max(a,s).toFixed(2)))return{x:u,y:h}}}},_=function(t,e,i){return e>=t.x&&e<=t.x+t.width&&i>=t.y&&i<=t.y+t.height},w=function(t,e,i,n,r){if(r)return[["M",+t+ +r,e],["l",i-2*r,0],["a",r,r,0,0,1,r,r],["l",0,n-2*r],["a",r,r,0,0,1,-r,r],["l",2*r-i,0],["a",r,r,0,0,1,-r,-r],["l",0,2*r-n],["a",r,r,0,0,1,r,-r],["z"]];var a=[["M",t,e],["l",i,0],["l",0,n],["l",-i,0],["z"]];return a.parsePathArray=v,a};e.rectPath=w;var M=function(t,e,i,n){return null===t&&(t=e=i=n=0),null===e&&(e=t.y,i=t.width,n=t.height,t=t.x),{x:t,y:e,width:i,w:i,height:n,h:n,x2:t+i,y2:e+n,cx:t+i/2,cy:e+n/2,r1:Math.min(i,n)/2,r2:Math.max(i,n)/2,r0:Math.sqrt(i*i+n*n)/2,path:w(t,e,i,n),vb:[t,e,i,n].join(" ")}},S=function(t,e,i,r,a,o,s,l){n.isArray(t)||(t=[t,e,i,r,a,o,s,l]);var u=x.apply(null,t);return M(u.min.x,u.min.y,u.max.x-u.min.x,u.max.y-u.min.y)},k=function(t,e,i,n,r,a,o,s,l){var u=1-l,h=Math.pow(u,3),c=Math.pow(u,2),p=l*l,f=p*l,d=t+2*l*(i-t)+p*(r-2*i+t),g=e+2*l*(n-e)+p*(a-2*n+e),v=i+2*l*(r-i)+p*(o-2*r+i),y=n+2*l*(a-n)+p*(s-2*a+n);return{x:h*t+3*c*l*i+3*u*l*l*r+f*o,y:h*e+3*c*l*n+3*u*l*l*a+f*s,m:{x:d,y:g},n:{x:v,y:y},start:{x:u*t+l*i,y:u*e+l*n},end:{x:u*r+l*o,y:u*a+l*s},alpha:90-180*Math.atan2(d-v,g-y)/Math.PI}},O=function(t,e,i){if(!function(t,e){return t=M(t),e=M(e),_(e,t.x,t.y)||_(e,t.x2,t.y)||_(e,t.x,t.y2)||_(e,t.x2,t.y2)||_(t,e.x,e.y)||_(t,e.x2,e.y)||_(t,e.x,e.y2)||_(t,e.x2,e.y2)||(t.x<e.x2&&t.x>e.x||e.x<t.x2&&e.x>t.x)&&(t.y<e.y2&&t.y>e.y||e.y<t.y2&&e.y>t.y)}(S(t),S(e)))return i?0:[];for(var n=~~(m.apply(0,t)/8),r=~~(m.apply(0,e)/8),a=[],o=[],s={},l=i?0:[],u=0;u<n+1;u++){var h=k.apply(0,t.concat(u/n));a.push({x:h.x,y:h.y,t:u/n})}for(u=0;u<r+1;u++)h=k.apply(0,e.concat(u/r)),o.push({x:h.x,y:h.y,t:u/r});for(u=0;u<n;u++)for(var c=0;c<r;c++){var p=a[u],f=a[u+1],d=o[c],g=o[c+1],v=Math.abs(f.x-p.x)<.001?"y":"x",y=Math.abs(g.x-d.x)<.001?"y":"x",x=b(p.x,p.y,f.x,f.y,d.x,d.y,g.x,g.y);if(x){if(s[x.x.toFixed(4)]===x.y.toFixed(4))continue;s[x.x.toFixed(4)]=x.y.toFixed(4);var w=p.t+Math.abs((x[v]-p[v])/(f[v]-p[v]))*(f.t-p.t),O=d.t+Math.abs((x[y]-d[y])/(g[y]-d[y]))*(g.t-d.t);w>=0&&w<=1&&O>=0&&O<=1&&(i?l+=1:l.push({x:x.x,y:x.y,t1:w,t2:O}))}}return l};function C(t,e){var i=[],n=[];return t.length&&function t(e,r){if(1===e.length)i.push(e[0]),n.push(e[0]);else{for(var a=[],o=0;o<e.length-1;o++)0===o&&i.push(e[0]),o===e.length-2&&n.push(e[o+1]),a[o]=[(1-r)*e[o][0]+r*e[o+1][0],(1-r)*e[o][1]+r*e[o+1][1]];t(a,r)}}(t,e),{left:i,right:n.reverse()}}e.intersection=function(t,e){return function(t,e,i){var n,r,a,o,s,l,u,h,c,p;t=d(t),e=d(e);for(var f=i?0:[],g=0,v=t.length;g<v;g++){var y=t[g];if("M"===y[0])n=s=y[1],r=l=y[2];else{"C"===y[0]?(c=[n,r].concat(y.slice(1)),n=c[6],r=c[7]):(c=[n,r,n,r,s,l,s,l],n=s,r=l);for(var m=0,x=e.length;m<x;m++){var b=e[m];if("M"===b[0])a=u=b[1],o=h=b[2];else{"C"===b[0]?(p=[a,o].concat(b.slice(1)),a=p[6],o=p[7]):(p=[a,o,a,o,u,h,u,h],a=u,o=h);var _=O(c,p,i);if(i)f+=_;else{for(var w=0,M=_.length;w<M;w++)_[w].segment1=g,_[w].segment2=m,_[w].bez1=c,_[w].bez2=p;f=f.concat(_)}}}}}return f}(t,e)};var A=function(t,e,i){if(1===i)return[[].concat(t)];var n=[];if("L"===e[0]||"C"===e[0]||"Q"===e[0])n=n.concat(function(t,e,i){var n=[[t[1],t[2]]];i=i||2;var r=[];"A"===e[0]?(n.push(e[6]),n.push(e[7])):"C"===e[0]?(n.push([e[1],e[2]]),n.push([e[3],e[4]]),n.push([e[5],e[6]])):"S"===e[0]||"Q"===e[0]?(n.push([e[1],e[2]]),n.push([e[3],e[4]])):n.push([e[1],e[2]]);for(var a=n,o=1/i,s=0;s<i-1;s++){var l=C(a,o/(1-o*s));r.push(l.left),a=l.right}return r.push(a),r.map((function(t){var e=[];return 4===t.length&&(e.push("C"),e=e.concat(t[2])),t.length>=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e.concat(t[t.length-1])}))}(t,e,i));else{var r=[].concat(t);"M"===r[0]&&(r[0]="L");for(var a=0;a<=i-1;a++)n.push(r)}return n};e.fillPath=function(t,e){if(1===t.length)return t;var i=t.length-1,n=e.length-1,r=i/n,a=[];if(1===t.length&&"M"===t[0][0]){for(var o=0;o<n-i;o++)t.push(t[0]);return t}for(o=0;o<n;o++){var s=Math.floor(r*o);a[s]=(a[s]||0)+1}var l=a.reduce((function(e,n,r){return r===i?e.concat(t[i]):e.concat(A(t[r],t[r+1],n))}),[]);return l.unshift(t[0]),"Z"!==e[n]&&"z"!==e[n]||l.push("Z"),l};var L=function(t,e){if(t.length!==e.length)return!1;var i=!0;return n.each(t,(function(t,n){if(t!==e[n])return i=!1,!1})),i};function P(t,e,i){var n=null,r=i;return e<r&&(r=e,n="add"),t<r&&(r=t,n="del"),{type:n,min:r}}function j(t,e,i){for(var n,r=[].concat(t),a=1/(i+1),o=T(e)[0],s=1;s<=i;s++)a*=s,0===(n=Math.floor(t.length*a))?r.unshift([o[0]*a+t[n][0]*(1-a),o[1]*a+t[n][1]*(1-a)]):r.splice(n,0,[o[0]*a+t[n][0]*(1-a),o[1]*a+t[n][1]*(1-a)]);return r}function T(t){var e=[];switch(t[0]){case"M":case"L":e.push([t[1],t[2]]);break;case"A":e.push([t[6],t[7]]);break;case"Q":e.push([t[3],t[4]]),e.push([t[1],t[2]]);break;case"T":e.push([t[1],t[2]]);break;case"C":e.push([t[5],t[6]]),e.push([t[1],t[2]]),e.push([t[3],t[4]]);break;case"S":e.push([t[3],t[4]]),e.push([t[1],t[2]]);break;case"H":case"V":e.push([t[1],t[1]])}return e}e.fillPathByDiff=function(t,e){var i=function(t,e){var i,n,r=t.length,a=e.length,o=0;if(0===r||0===a)return null;for(var s=[],l=0;l<=r;l++)s[l]=[],s[l][0]={min:l};for(var u=0;u<=a;u++)s[0][u]={min:u};for(l=1;l<=r;l++)for(i=t[l-1],u=1;u<=a;u++){n=e[u-1],o=L(i,n)?0:1;var h=s[l-1][u].min+1,c=s[l][u-1].min+1,p=s[l-1][u-1].min+o;s[l][u]=P(h,c,p)}return s}(t,e),n=t.length,r=e.length,a=[],o=1,s=1;if(i[n][r]!==n){for(var l=1;l<=n;l++){var u=i[l][l].min;s=l;for(var h=o;h<=r;h++)i[l][h].min<u&&(u=i[l][h].min,s=h);o=s,i[l][o].type&&a.push({index:l-1,type:i[l][o].type})}for(l=a.length-1;l>=0;l--)o=a[l].index,"add"===a[l].type?t.splice(o,0,[].concat(t[o])):t.splice(o,1)}var c=r-(n=t.length);if(n<r)for(l=0;l<c;l++)"z"===t[n-1][0]||"Z"===t[n-1][0]?t.splice(n-2,0,t[n-2]):t.push(t[n-1]),n+=1;return t},e.formatPath=function(t,e){if(t.length<=1)return t;for(var i,n=0;n<e.length;n++)if(t[n][0]!==e[n][0])switch(i=T(t[n]),e[n][0]){case"M":t[n]=["M"].concat(i[0]);break;case"L":t[n]=["L"].concat(i[0]);break;case"A":t[n]=[].concat(e[n]),t[n][6]=i[0][0],t[n][7]=i[0][1];break;case"Q":if(i.length<2){if(!(n>0)){t[n]=e[n];break}i=j(i,t[n-1],1)}t[n]=["Q"].concat(i.reduce((function(t,e){return t.concat(e)}),[]));break;case"T":t[n]=["T"].concat(i[0]);break;case"C":if(i.length<3){if(!(n>0)){t[n]=e[n];break}i=j(i,t[n-1],2)}t[n]=["C"].concat(i.reduce((function(t,e){return t.concat(e)}),[]));break;case"S":if(i.length<2){if(!(n>0)){t[n]=e[n];break}i=j(i,t[n-1],1)}t[n]=["S"].concat(i.reduce((function(t,e){return t.concat(e)}),[]));break;default:t[n]=e[n]}return t}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(43);e.Arc=n.default;var r=i(44);e.Circle=r.default;var a=i(45);e.Dom=a.default;var o=i(46);e.Ellipse=o.default;var s=i(47);e.Fan=s.default;var l=i(48);e.Image=l.default;var u=i(49);e.Line=u.default;var h=i(17);e.Marker=h.default;var c=i(50);e.Path=c.default;var p=i(51);e.Polygon=p.default;var f=i(52);e.Polyline=f.default;var d=i(53);e.Rect=d.default;var g=i(54);e.Text=g.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0).createDom('<canvas width="500" height="500"></canvas>').getContext("2d");e.default=function(t,e,i){return i.createPath(n),n.isPointInPath(t,e)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(6),o=i(3),s=i(8),l=i(4),u=i(2),h=i(40),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="marker",e.canFill=!0,e.canStroke=!0,e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{path:null,x:0,y:0,lineWidth:1}},e.prototype.isPointInPath=function(t,e){var i=this.attrs,n=i.x,r=i.y,a=i.radius,o=this.getHitLineWidth();return l.circle(n,r,a+o/2,t,e)},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x,i=t.y,n=t.radius,r=this.getHitLineWidth()/2+n;return u.default.fromRange(e-r,i-r,e+r,i+r)},e.prototype._getPath=function(){var t,e=this.attrs,i=e.x,n=e.y,a=e.radius,o=e.symbol||"circle";return(t=r.isFunction(o)?o:h.default.get(o))?t(i,n,a):(console.warn(t+" symbol is not exist."),null)},e.prototype.createPath=function(t){var e=this.cfg.segments;if(!e||this.cfg.hasUpdate){var i,n=a.parsePath(this._getPath());for(t.beginPath(),e=[],o=0;o<n.length;o++){var r=n[o];i=new s.default(r,i,o===n.length-1),e.push(i),i.draw(t)}this.cfg.segments=e,this.cfg.hasUpdate=!1}else{t.beginPath();for(var o=0;o<e.length;o++)e[o].draw(t)}},e.symbolsFactory=h.default,e}(o.default);e.default=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=n.vec2;function a(t,e,i,n){var r=1-n;return r*(r*t+2*n*e)+n*n*i}function o(t,e,i,n,o,s,l,u,h){var c,p,f,d,g,v,y,m=.005,x=1/0,b=[l,u];for(g=0;g<1;g+=.05)f=[a(t,i,o,g),a(e,n,s,g)],(p=r.squaredDistance(b,f))<x&&(c=g,x=p);for(x=1/0,y=0;y<32&&!(m<1e-4);y++){var _=c-m,w=c+m;f=[a(t,i,o,_),a(e,n,s,_)],p=r.squaredDistance(b,f),_>=0&&p<x?(c=_,x=p):(d=[a(t,i,o,w),a(e,n,s,w)],v=r.squaredDistance(b,d),w<=1&&v<x?(c=w,x=v):m*=.5)}return h?{x:a(t,i,o,c),y:a(e,n,s,c)}:Math.sqrt(x)}e.at=a,e.pointDistance=o,e.extrema=function(t,e,i){var r=t+i-2*e;if(n.isNumberEqual(r,0))return[.5];var a=(t-e)/r;return a<=1&&a>=0?[a]:[]},e.projectPoint=function(t,e,i,n,r,a,s,l){return o(t,e,i,n,r,a,s,l,!0)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(10),o=i(2),s=i(15),l={};function u(t,e,i){for(var n,r=t.length-1;r>=0;r--){var a=t[r];if(a.cfg.visible&&a.cfg.capture&&!a.destroyed&&!a.removed&&(a.isGroup?n=a.getShape(e,i):a.isHit(e,i)&&(n=a)),n)break}return n}var h=function(t){function e(e){void 0===e&&(e={});var i=t.call(this,e)||this;return i.isGroup=!0,i.type="group",i.canFill=!0,i.canStroke=!0,i.set("children",[]),i.set("tobeRemoved",[]),i._beforeRenderUI(),i._renderUI(),i._bindUI(),i}return n.__extends(e,t),e.prototype._beforeRenderUI=function(){},e.prototype._renderUI=function(){},e.prototype._bindUI=function(){},e.prototype.addShape=function(t,e){var i=this.get("canvas");e=e||{};var n=l[t];if(n||(n=r.upperFirst(t),l[t]=n),e.attrs&&i){var a=e.attrs;if("text"===t){var o=i.get("fontFamily");o&&(a.fontFamily=a.fontFamily?a.fontFamily:o)}}e.canvas=i,e.type=t;var u=new s[n](e);return this.add(u),u},e.prototype.addGroup=function(t,i){var n,a=this.get("canvas");if(i=r.mix({},i),r.isFunction(t))i?(i.canvas=a,i.parent=this,n=new t(i)):n=new t({canvas:a,parent:this}),this.add(n);else if(r.isObject(t))t.canvas=a,n=new e(t),this.add(n);else{if(void 0!==t)return!1;n=new e,this.add(n)}return n},e.prototype.renderBack=function(t,e){var i=this.get("backShape"),n=this.getBBox();return r.mix(e,{x:n.x-t[3],y:n.y-t[0],width:n.width+t[1]+t[3],height:n.height+t[0]+t[2]}),i?i.attr(e):i=this.addShape("rect",{zIndex:-1,attrs:e}),this.set("backShape",i),this.sort(),i},e.prototype.removeChild=function(e,i){if(arguments.length>=2)this.contain(e)&&e.remove(i);else{if(1===arguments.length){if(!r.isBoolean(e))return this.contain(e)&&e.remove(!0),this;i=e}0===arguments.length&&(i=!0),t.prototype.remove.call(this,i)}return this},e.prototype.add=function(t){var e=this,i=e.get("children");if(r.isArray(t))r.each(t,(function(t){var i=t.get("parent");i&&i.removeChild(t,!1),e._setCfgProperty(t)})),e.cfg.children=i.concat(t);else{var n=t,a=n.get("parent");a&&a.removeChild(n,!1),e._setCfgProperty(n),i.push(n)}return e},e.prototype._setCfgProperty=function(t){var e=this.cfg;t.set("parent",this),t.set("canvas",e.canvas),e.timeline&&t.set("timeline",e.timeline)},e.prototype.contain=function(t){return this.get("children").indexOf(t)>-1},e.prototype.getChildByIndex=function(t){return this.get("children")[t]},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.get("children").length-1;return this.getChildByIndex(t)},e.prototype.getBBox=function(){var t=1/0,e=-1/0,i=1/0,n=-1/0,a=this.get("children");return a.length>0?r.each(a,(function(r){if(r.get("visible")){var a=r.getBBox();if(!a)return!0;var o=a.tl,s=a.tr,l=a.bl,u=a.br,h=[o.x,o.y,1],c=[l.x,l.y,1],p=[s.x,s.y,1],f=[u.x,u.y,1];r.apply(h),r.apply(c),r.apply(p),r.apply(f);var d=Math.min(h[0],c[0],p[0],f[0]),g=Math.max(h[0],c[0],p[0],f[0]),v=Math.min(h[1],c[1],p[1],f[1]),y=Math.max(h[1],c[1],p[1],f[1]);d<t&&(t=d),g>e&&(e=g),v<i&&(i=v),y>n&&(n=y)}})):(t=0,e=0,i=0,n=0),new o.default(t,i,e-t,n-i)},e.prototype.getCount=function(){return this.get("children").length},e.prototype.sort=function(){var t,e=this.get("children");return r.each(e,(function(t,e){return t._INDEX=e,t})),e.sort((t=function(t,e){return t.get("zIndex")-e.get("zIndex")},function(e,i){var n=t(e,i);return 0===n?e._INDEX-i._INDEX:n})),this},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.find=function(t){if(r.isString(t))return this.findById(t);var e=this.get("children"),i=null;return r.each(e,(function(e){if(t(e)?i=e:e.find&&(i=e.find(t)),i)return!1})),i},e.prototype.findAll=function(t){var e=this.get("children"),i=[],n=[];return r.each(e,(function(e){t(e)&&i.push(e),e.findAllBy&&(n=e.findAllBy(t),i=i.concat(n))})),i},e.prototype.findBy=function(t){var e=this.get("children"),i=null;return r.each(e,(function(e){if(t(e)?i=e:e.findBy&&(i=e.findBy(t)),i)return!1})),i},e.prototype.findAllBy=function(t){var e=this.get("children"),i=[],n=[];return r.each(e,(function(e){t(e)&&i.push(e),e.findAllBy&&(n=e.findAllBy(t),i=i.concat(n))})),i},e.prototype.getShape=function(t,e,i){var n,r=this.attrs.clip,a=this.cfg.children;if(r){var o=[t,e,1];r.invert(o,this.get("canvas")),r.isPointInPath(o[0],o[1])&&(n=u(a,t,e))}else n=u(a,t,e);return n},e.prototype.clearTotalMatrix=function(){if(this.get("totalMatrix")){this.setSilent("totalMatrix",null);for(var t=this.cfg.children,e=0;e<t.length;e++)t[e].clearTotalMatrix()}},e.prototype.clear=function(t){if(!this.destroyed){for(var e=this.cfg.children,i=e.length-1;i>=0;i--)e[i].remove(!0,t);return this.cfg.children=[],this}},e.prototype.destroy=function(){this.destroyed||(this.clear(),t.prototype.destroy.call(this))},e.prototype.clone=function(){var t=this.cfg.children,i=new e;return r.each(t,(function(t){i.add(t.clone())})),i},e}(a.default);e.default=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(2);e.BBox=r.default;var a=i(21);e.Canvas=a.default;var o=i(10);e.Element=o.default;var s=i(11);e.Event=s.default;var l=i(19);e.Group=l.default;var u=i(8);e.PathSegment=u.default;var h=i(3);e.Shape=h.default;var c=i(14);e.PathUtil=c;var p=i(15);e.Shapes=p;var f=i(55);e.version=f.version,n.__exportStar(i(15),e),n.__exportStar(i(56),e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(22),o=i(11),s=i(42),l=i(19),u=["click","mousedown","mouseup","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","wheel"],h=null,c=null,p=null;function f(t){return+t}var d=function(t){function e(e){var i=t.call(this,n.__assign({eventEnable:!0,width:null,height:null,widthCanvas:null,heightCanvas:null,widthStyle:null,heightStyle:null,containerDOM:null,canvasDOM:null,pixelRatio:null,renderer:"canvas"},e))||this;return i._setGlobalParam(),i._setContainer(),i._initPainter(),i._scale(),i.get("eventEnable")&&i.registerEvent(),i}return n.__extends(e,t),e.prototype._scale=function(){if("svg"!==this.cfg.renderType){var t=this.get("pixelRatio");this.scale(t,t)}},e.prototype._setGlobalParam=function(){var t=this.get("renderer")||"canvas";"svg"===t?this.set("pixelRatio",1):this.get("pixelRatio")||this.set("pixelRatio",r.getRatio()),this.cfg.renderType=t;var e=a[t];this.cfg.renderer=e,this.cfg.canvas=this;var i=new s.default(this);this.cfg.timeline=i},e.prototype._setContainer=function(){var t=this.get("containerId"),e=this.get("containerDOM");e||(e=document.getElementById(t),this.set("containerDOM",e)),r.modifyCSS(e,{position:"relative"});for(var i=e.style.transform,n=[],a=/(\w+)\((.+?)\)/g,o=a.exec(i);o;)n.push([o[1],o[2].split(", ")]),o=a.exec(i);var s={scaleX:1,scaleY:1};r.each(n,(function(t,e){var i=t[0],n=t[1]&&t[1][0],a=t[1]&&t[1][1];"scale"===i?(s.scaleX=r.isNil(n)?1:f(n),s.scaleY=r.isNil(a)?s.scaleX:f(a)):i===e&&(s[e]=n)})),this.set("containerTransform",s)},e.prototype._initPainter=function(){var t=this.get("containerDOM"),e=new this.cfg.renderer.painter(t);this.cfg.painter=e,this.cfg.canvasDOM=this.cfg.el=e.canvas,this.changeSize(this.get("width"),this.get("height"))},e.prototype._resize=function(){var t=this.get("canvasDOM"),e=this.get("widthCanvas"),i=this.get("heightCanvas"),n=this.get("widthStyle"),r=this.get("heightStyle");t.style.width=n,t.style.height=r,t.setAttribute("width",e),t.setAttribute("height",i)},e.prototype.getWidth=function(){var t=this.get("pixelRatio");return this.get("width")*t},e.prototype.getHeight=function(){var t=this.get("pixelRatio");return this.get("height")*t},e.prototype.changeSize=function(t,e){var i=this.get("pixelRatio"),n=t*i,r=e*i;this.set("widthCanvas",n),this.set("heightCanvas",r),this.set("widthStyle",t+"px"),this.set("heightStyle",e+"px"),this.set("width",t),this.set("height",e),this._resize()},e.prototype.getPointByClient=function(t,e){var i=this.get("containerTransform"),n=i.scaleX,r=i.scaleY,a=this.get("el"),o=this.get("pixelRatio")||1,s=a.getBoundingClientRect();return{x:(t-s.left)*o/n,y:(e-s.top)*o/r}},e.prototype.getClientByPoint=function(t,e){var i=this.get("containerTransform"),n=i.scaleX,r=i.scaleY,a=this.get("el").getBoundingClientRect(),o=this.get("pixelRatio")||1;return{clientX:t/o*n+a.left,clientY:e/o*r+a.top}},e.prototype.draw=function(){this.cfg.painter.draw(this)},e.prototype.getShape=function(e,i,n){return 3===arguments.length&&this.cfg.renderer.getShape?this.cfg.renderer.getShape.call(this,e,i,n):t.prototype.getShape.call(this,e,i)},e.prototype.getRenderer=function(){return this.cfg.renderType},e.prototype._drawSync=function(){this.cfg.painter.drawSync(this)},e.prototype.destroy=function(){var e=this.cfg,i=e.containerDOM,n=e.canvasDOM;n&&i&&i.removeChild(n),e.timeline.stop(),t.prototype.destroy.call(this)},e.prototype.registerEvent=function(){var t=this,e=this.get("el");r.each(u,(function(i){e.addEventListener(i,(function(e){t._triggerEvent(i,e)}),!1)})),e.addEventListener("touchstart",(function(e){r.isEmpty(e.targetTouches)||t._triggerEvent("touchstart",e)}),!1),e.addEventListener("touchmove",(function(e){r.isEmpty(e.targetTouches)||t._triggerEvent("touchmove",e)}),!1),e.addEventListener("touchend",(function(e){r.isEmpty(e.changedTouches)||t._triggerEvent("touchend",e)}),!1)},e.prototype._getEmitter=function(t,e){if(t){if(!r.isEmpty(t.getEvents()))return t;var i=t.get("parent");if(i&&!e.propagationStopped)return this._getEmitter(i,e)}},e.prototype._getEventObj=function(t,e,i,n){var r=new o.default(t,e,!0,!0);return r.x=i.x,r.y=i.y,r.clientX=e.clientX,r.clientY=e.clientY,r.target=n,r.currentTarget=this._getEmitter(n,r),r},e.prototype._getClientXY=function(t,e){return"touchstart"===t||"touchmove"===t?[e.targetTouches[0].clientX,e.targetTouches[0].clientY]:"touchend"===t?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[e.clientX,e.clientY]},e.prototype._triggerEvent=function(t,e){var i=this._getClientXY(t,e),n=i[0],r=i[1],a=this.getPointByClient(n,r),o=this.getShape(a.x,a.y,e),s=this.get("el");if(p&&"svg"===this.getRenderer()&&(o=this.getShape(a.x,a.y)),"mousemove"===t){if(h&&h!==o&&(this._emitEvent("mouseout",e,a,h),this._emitEvent("mouseleave",e,a,h),p&&this._emitEvent("dragleave",e,a,h),h.destroyed||h.removed||(s.style.cursor=h.attr("cursor")||"default")),p&&(this._emitEvent("drag",e,a,p),this._emitEvent("mousemove",e,a,o||this)),o)p||(c===o?(p=o,c=null,this._emitEvent("dragstart",e,a,o)):this._emitEvent("mousemove",e,a,o)),h!==o&&(this._emitEvent("mouseenter",e,a,o),this._emitEvent("mouseover",e,a,o),p&&this._emitEvent("dragenter",e,a,o));else{var l=this._getEventObj("mousemove",e,a,this);this.emit("mousemove",l)}h=o}else this._emitEvent(t,e,a,o||this),p||"mousedown"!==t||(c=o),"mouseup"===t&&(c=null,p&&(p.cfg.capture=!0,this._emitEvent("dragend",e,a,p),p=null,this._emitEvent("drop",e,a,o||this)));o&&!o.destroyed&&(s.style.cursor=o.attr("cursor")||"default")},e.prototype._emitEvent=function(t,e,i,n){var r=this._getEventObj(t,e,i,n),a=this._getEmitter(n,e);return a&&a.emit(t,r),a},e}(l.default);e.default=d},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(23);e.canvas=n;var r=i(26);e.svg=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(24);e.painter=n.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=i(25),a=["fillStyle","font","globalAlpha","lineCap","lineWidth","lineJoin","miterLimit","shadowBlur","shadowColor","shadowOffsetX","shadowOffsetY","strokeStyle","textAlign","textBaseline","lineDash","lineDashOffset"],o=function(){function t(t){if(!t)return null;var e=n.uniqueId("canvas_"),i=n.createDom('<canvas id="'+e+'"></canvas>');return t.appendChild(i),this.type="canvas",this.canvas=i,this.context=i.getContext("2d"),this}return t.prototype.beforeDraw=function(){var t=this.canvas;this.context&&this.context.clearRect(0,0,t.width,t.height)},t.prototype.draw=function(t){var e=this;e.animateHandler?e.toDraw=!0:function i(){e.animateHandler=n.requestAnimationFrame((function(){e.animateHandler=void 0,e.toDraw&&i()})),e.beforeDraw();try{e._drawGroup(t)}catch(t){console.warn("error in draw canvas, detail as:"),console.warn(t)}finally{e.toDraw=!1}}()},t.prototype.drawSync=function(t){this.beforeDraw(),this._drawGroup(t)},t.prototype._drawGroup=function(t){if(!t.removed&&!t.destroyed&&t.cfg.visible){var e=t.cfg.children,i=null;this.setContext(t);for(var n=0;n<e.length;n++)i=e[n],e[n].isGroup?this._drawGroup(i):this._drawShape(i);this.restoreContext(t)}},t.prototype._drawShape=function(t){t.removed||t.destroyed||!t.cfg.visible||(this.setContext(t),t.drawInner(this.context),this.restoreContext(t),t.cfg.attrs=t.attrs,t.cfg.hasUpdate=!1)},t.prototype.setContext=function(t){var e=this.context,i=t.attrs.clip;e.save(),i&&(i.resetTransform(e),i.createPath(e),e.clip()),this.resetContext(t),t.resetTransform(e)},t.prototype.restoreContext=function(t){this.context.restore()},t.prototype.resetContext=function(t){var e=this.context,i=t.attrs;if(!t.isGroup)for(var o in i)if(a.indexOf(o)>-1){var s=i[o];"fillStyle"===o&&(s=r.parseStyle(s,t,e)),"strokeStyle"===o&&(s=r.parseStyle(s,t,e)),"lineDash"===o&&e.setLineDash?n.isArray(s)?e.setLineDash(s):n.isString(s)&&e.setLineDash(s.split(" ")):e[o]=s}},t}();e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,a=/[^\s\,]+/gi,o=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,s=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,l=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,u=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function h(t,e){var i=t.match(u);n.each(i,(function(t){t=t.split(":"),e.addColorStop(t[0],t[1])}))}e.parsePath=function(t){return t=t||[],n.isArray(t)?t:n.isString(t)?(t=t.match(r),n.each(t,(function(e,i){if((e=e.match(a))[0].length>1){var r=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=r}n.each(e,(function(t,i){isNaN(t)||(e[i]=+t)})),t[i]=e})),t):void 0},e.parseStyle=function(t,e,i){if(n.isString(t)){if("("===t[1]||"("===t[2]){if("l"===t[0])return function(t,e,i){var r,a,s=o.exec(t),l=n.mod(n.toRadian(parseFloat(s[1])),2*Math.PI),u=s[2],c=e.getBBox(),p=c.maxX,f=c.maxY;l>=0&&l<.5*Math.PI?(r={x:c.x,y:c.y},a={x:p,y:f}):.5*Math.PI<=l&&l<Math.PI?(r={x:p,y:c.y},a={x:c.x,y:f}):Math.PI<=l&&l<1.5*Math.PI?(r={x:p,y:f},a={x:c.x,y:c.y}):(r={x:c.x,y:f},a={x:p,y:c.y});var d=Math.tan(l),g=d*d,v=(a.x-r.x+d*(a.y-r.y))/(g+1)+r.x,y=d*(a.x-r.x+d*(a.y-r.y))/(g+1)+r.y,m=i.createLinearGradient(r.x,r.y,v,y);return h(u,m),m}(t,e,i);if("r"===t[0])return function(t,e,i){var n=s.exec(t),r=parseFloat(n[1]),a=parseFloat(n[2]),o=parseFloat(n[3]),l=n[4];if(0===o){var c=l.match(u);return c[c.length-1].split(":")[1]}var p=e.getBBox(),f=p.maxX,d=p.maxY,g=f-p.x,v=d-p.y,y=Math.sqrt(g*g+v*v)/2,m=i.createRadialGradient(p.x+g*r,p.y+v*a,o*y,p.x+g/2,p.y+v/2,y);return h(l,m),m}(t,e,i);if("p"===t[0])return function(t,e,i){if(e.get("patternSource")&&e.get("patternSource")===t)return e.get("pattern");var n,r,a=l.exec(t),o=a[1],s=a[2];function u(){n=i.createPattern(r,o),e.setSilent("pattern",n),e.setSilent("patternSource",t)}switch(o){case"a":o="repeat";break;case"x":o="repeat-x";break;case"y":o="repeat-y";break;case"n":o="no-repeat";break;default:o="no-repeat"}return r=new Image,s.match(/^data:/i)||(r.crossOrigin="Anonymous"),r.src=s,r.complete?u():(r.onload=u,r.src=r.src),n}(t,e,i)}return t}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(27);e.painter=n.default;var r=i(41);e.getShape=r.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=i(28),a=i(30),o=i(6),s=(i(17).default.symbolsFactory,{rect:"path",circle:"circle",line:"line",path:"path",marker:"path",text:"text",polygon:"polygon",image:"image",ellipse:"ellipse",dom:"foreignObject",fan:"path",group:"g"}),l={opacity:"opacity",fillStyle:"fill",strokeOpacity:"stroke-opacity",fillOpacity:"fill-opacity",strokeStyle:"stroke",x:"x",y:"y",r:"r",width:"width",height:"height",x1:"x1",x2:"x2",y1:"y1",y2:"y2",lineCap:"stroke-linecap",lineJoin:"stroke-linejoin",lineWidth:"stroke-width",lineDash:"stroke-dasharray",lineDashOffset:"stroke-dashoffset",miterLimit:"stroke-miterlimit",font:"font",fontSize:"font-size",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",fontFamily:"font-family",startArrow:"marker-start",endArrow:"marker-end",path:"d",class:"class",id:"id",style:"style",preserveAspectRatio:"preserveAspectRatio"},u={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},h={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},c={left:"left",start:"left",center:"middle",right:"end",end:"end"},p=function(){function t(t){if(this.toDraw=!1,this.type="svg",this.removed=!1,this.destroyed=!1,!t)return null;var e=n.uniqueId("canvas_"),i=n.createDom('<svg id="'+e+'"></svg>');return t.appendChild(i),this.type="svg",this.canvas=i,this.context=new a.default(i),this.toDraw=!1,this}return t.prototype.draw=function(t){var e=this;e.animateHandler?e.toDraw=!0:function i(){e.animateHandler=n.requestAnimationFrame((function(){e.animateHandler=void 0,e.toDraw&&i()}));try{e._drawChildren(t)}catch(t){console.warn("error in draw canvas, detail as:"),console.warn(t)}finally{e.toDraw=!1}}()},t.prototype.drawSync=function(t){this._drawChildren(t)},t.prototype._drawGroup=function(t,e){var i=t.cfg;t.removed||t.destroyed||(i.tobeRemoved&&(n.each(i.tobeRemoved,(function(t){t.parentNode&&t.parentNode.removeChild(t)})),i.tobeRemoved=[]),this._drawShape(t,e),i.children&&i.children.length>0&&this._drawChildren(t))},t.prototype._drawChildren=function(t){var e,i=t.cfg.children;if(i)for(var n=0;n<i.length;n++)(e=i[n]).isGroup?this._drawGroup(e,n):this._drawShape(e,n)},t.prototype._drawShape=function(t,e){var i=t.attrs,n=t.cfg,r=n.el;t.removed||t.destroyed?r&&r.parentNode.removeChild(n.el):(!r&&n.parent&&(this._createDom(t,e),this._updateShape(t)),r=n.el,!1!==n.visible?(n.visible&&r.hasAttribute("visibility")&&r.removeAttribute("visibility"),n.hasUpdate&&this._updateShape(t),i.clip&&i.clip.cfg.hasUpdate&&this._updateShape(i.clip)):r.setAttribute("visibility","hidden"))},t.prototype._updateShape=function(t){var e=t.attrs,i=t.cfg.attrs;if(i)if(t.cfg.el||this._createDom(t),"clip"in e&&this._setClip(t,e.clip),("shadowOffsetX"in e||"shadowOffsetY"in e||"shadowBlur"in e||"shadowColor"in e)&&this._setShadow(t),"text"!==t.type){for(var r in"fan"===t.type&&this._updateFan(t),"marker"===t.type&&t.cfg.el.setAttribute("d",this._assembleMarker(t,e)),"rect"===t.type&&t.cfg.el.setAttribute("d",this._assembleRect(e)),e)e[r]!==i[r]&&this._setAttribute(t,r,e[r]);t.cfg.attrs=n.deepMix({},t.attrs),t.cfg.hasUpdate=!1}else this._updateText(t)},t.prototype._setAttribute=function(t,e,i){var r=t.type,a=t.attrs,o=t.cfg.el,s=this.context;if("marker"!==r&&"rect"!==r||!~["x","y","radius","r"].indexOf(e))if(~["circle","ellipse"].indexOf(r)&&~["x","y"].indexOf(e))o.setAttribute("c"+e,parseInt(i,10));else{if("polygon"===r&&"points"===e)return i&&0!==i.length||(i=""),n.isArray(i)&&(i=(i=i.map((function(t){return t[0]+","+t[1]}))).join(" ")),void o.setAttribute("points",i);if("path"!==e)if("img"!==e){if("transform"===e)return i?void this._setTransform(t):void o.removeAttribute("transform");if("rotate"===e)return i?void this._setTransform(t):void o.removeAttribute("transform");if("matrix"!==e)if("fillStyle"!==e&&"strokeStyle"!==e){if("clip"!==e)if(~e.indexOf("Arrow"))if(e=l[e],i){var u=null;u="boolean"==typeof i?s.getDefaultArrow(a,e):s.addArrow(a,e),o.setAttribute(e,"url(#"+u+")"),t.cfg[e]=u}else t.cfg[e]=null,o.removeAttribute(e);else"html"===e&&("string"==typeof i?o.innerHTML=i:(o.innerHTML="",o.appendChild(i))),l[e]&&o.setAttribute(l[e],i)}else this._setColor(t,e,i);else this._setTransform(t)}else this._setImage(t,i);else n.isArray(i)&&o.setAttribute("d",this._formatPath(i))}},t.prototype._createDom=function(t,e){var i=s[t.type],n=t.attrs,r=t.cfg.parent;if(!i)throw new Error("the type"+t.type+"is not supported by svg");var a=document.createElementNS("http://www.w3.org/2000/svg",i);if(t.cfg.id&&(a.id=t.cfg.id),t.cfg.el=a,r){var o=r.cfg.el;if(void 0===e)o.appendChild(a);else{var l=r.cfg.el.childNodes;"svg"===o.tagName&&(e+=1),l.length<=e?o.appendChild(a):o.insertBefore(a,l[e])}}return t.cfg.attrs={},"text"===t.type?(a.setAttribute("paint-order","stroke"),a.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")):(n.stroke||n.strokeStyle||a.setAttribute("stroke","none"),n.fill||n.fillStyle||a.setAttribute("fill","none")),a},t.prototype._assembleMarker=function(t,e){var i=t._getPath();return n.isArray(i)?i.map((function(t){return t.join(" ")})).join(""):i},t.prototype._assembleRect=function(t){var e=t.x,i=t.y,r=t.width,a=t.height,s=t.radius;if(!s)return"M "+e+","+i+" l "+r+",0 l 0,"+a+" l"+-r+" 0 z";var l=o.parseRadius(s);return n.isArray(s)?1===s.length?l.r1=l.r2=l.r3=l.r4=s[0]:2===s.length?(l.r1=l.r3=s[0],l.r2=l.r4=s[1]):3===s.length?(l.r1=s[0],l.r2=l.r4=s[1],l.r3=s[2]):(l.r1=s[0],l.r2=s[1],l.r3=s[2],l.r4=s[3]):l.r1=l.r2=l.r3=l.r4=s,[["M "+(e+l.r1)+","+i],["l "+(r-l.r1-l.r2)+",0"],["a "+l.r2+","+l.r2+",0,0,1,"+l.r2+","+l.r2],["l 0,"+(a-l.r2-l.r3)],["a "+l.r3+","+l.r3+",0,0,1,"+-l.r3+","+l.r3],["l "+(l.r3+l.r4-r)+",0"],["a "+l.r4+","+l.r4+",0,0,1,"+-l.r4+","+-l.r4],["l 0,"+(l.r4+l.r1-a)],["a "+l.r1+","+l.r1+",0,0,1,"+l.r1+","+-l.r1],["z"]].join(" ")},t.prototype._formatPath=function(t){return~(t=t.map((function(t){return t.join(" ")})).join("")).indexOf("NaN")?"":t},t.prototype._setTransform=function(t){for(var e=t.attrs.matrix,i=t.cfg.el,n=[],r=0;r<9;r+=3)n.push(e[r]+","+e[r+1]);-1===(n=n.join(",")).indexOf("NaN")?i.setAttribute("transform","matrix("+n+")"):console.warn("invalid matrix:",e)},t.prototype._setImage=function(t,e){var i=t.attrs,r=t.cfg.el;if(n.isString(e))r.setAttribute("href",e);else if(e instanceof Image)i.width||(r.setAttribute("width",e.width),t.attrs.width=e.width),i.height||(r.setAttribute("height",e.height),t.attrs.height=e.height),r.setAttribute("href",e.src);else if(e instanceof HTMLElement&&n.isString(e.nodeName)&&"CANVAS"===e.nodeName.toUpperCase())r.setAttribute("href",e.toDataURL());else if(e instanceof ImageData){var a=document.createElement("canvas");a.setAttribute("width",""+e.width),a.setAttribute("height",""+e.height),a.getContext("2d").putImageData(e,0,0),i.width||(r.setAttribute("width",e.width),t.attrs.width=e.width),i.height||(r.setAttribute("height",e.height),t.attrs.height=e.height),r.setAttribute("href",a.toDataURL())}},t.prototype._updateFan=function(t){function e(t,e,i){return{x:e*Math.cos(t)+i.x,y:e*Math.sin(t)+i.y}}var i=t.attrs,r=t.cfg,a={x:i.x,y:i.y},o=[],s=i.startAngle,l=i.endAngle;n.isNumberEqual(l-s,2*Math.PI)&&(l-=1e-5);var u=e(s,i.re,a),h=e(l,i.re,a),c=l>s?1:0,p=Math.abs(l-s)>Math.PI?1:0,f=i.rs,d=i.re,g=e(s,i.rs,a),v=e(l,i.rs,a);i.rs>0?(o.push("M "+h.x+","+h.y),o.push("L "+v.x+","+v.y),o.push("A "+f+","+f+",0,"+p+","+(1===c?0:1)+","+g.x+","+g.y),o.push("L "+u.x+" "+u.y)):(o.push("M "+a.x+","+a.y),o.push("L "+u.x+","+u.y)),o.push("A "+d+","+d+",0,"+p+","+c+","+h.x+","+h.y),i.rs>0?o.push("L "+v.x+","+v.y):o.push("Z"),r.el.setAttribute("d",o.join(" "))},t.prototype._updateText=function(t){var e=t.attrs,i=t.cfg.attrs,n=t.cfg.el;for(var r in this._setFont(t),e)if(e[r]!==i[r]){if("text"===r){this._setText(t,""+e[r]);continue}if("fillStyle"===r||"strokeStyle"===r){this._setColor(t,r,e[r]);continue}if("matrix"===r){this._setTransform(t);continue}l[r]&&n.setAttribute(l[r],e[r])}t.cfg.attrs=Object.assign({},t.attrs),t.cfg.hasUpdate=!1},t.prototype._setFont=function(t){var e=t.get("el"),i=t.attrs,n=i.fontSize,a=r.detect();a&&"firefox"===a.name?e.setAttribute("dominant-baseline",h[i.textBaseline]||"alphabetic"):e.setAttribute("alignment-baseline",u[i.textBaseline]||"baseline"),e.setAttribute("text-anchor",c[i.textAlign]||"left"),n&&+n<12&&(i.matrix=[1,0,0,0,1,0,0,0,1],t.transform([["t",-i.x,-i.y],["s",+n/12,+n/12],["t",i.x,i.y]]))},t.prototype._setText=function(t,e){var i=t.cfg.el,r=t.attrs.textBaseline||"bottom";if(e)if(~e.indexOf("\n")){var a=t.attrs.x,o=e.split("\n"),s=o.length-1,l="";n.each(o,(function(t,e){0===e?"alphabetic"===r?l+='<tspan x="'+a+'" dy="'+-s+'em">'+t+"</tspan>":"top"===r?l+='<tspan x="'+a+'" dy="0.9em">'+t+"</tspan>":"middle"===r?l+='<tspan x="'+a+'" dy="'+-(s-1)/2+'em">'+t+"</tspan>":"bottom"===r?l+='<tspan x="'+a+'" dy="-'+(s+.3)+'em">'+t+"</tspan>":"hanging"===r&&(l+='<tspan x="'+a+'" dy="'+(-(s-1)-.3)+'em">'+t+"</tspan>"):l+='<tspan x="'+a+'" dy="1em">'+t+"</tspan>"})),i.innerHTML=l}else i.innerHTML=e;else i.innerHTML=""},t.prototype._setClip=function(t,e){var i=t.cfg.el;if(e)if(i.hasAttribute("clip-path"))e.cfg.hasUpdate&&this._updateShape(e);else{this._createDom(e),this._updateShape(e);var n=this.context.addClip(e);i.setAttribute("clip-path","url(#"+n+")")}else i.removeAttribute("clip-path")},t.prototype._setColor=function(t,e,i){var n=t.cfg.el,r=this.context;if(i)if(i=i.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(i))(a=r.find("gradient",i))||(a=r.addGradient(i)),n.setAttribute(l[e],"url(#"+a+")");else if(/^[p,P]{1}[\s]*\(/.test(i)){var a;(a=r.find("pattern",i))||(a=r.addPattern(i)),n.setAttribute(l[e],"url(#"+a+")")}else n.setAttribute(l[e],i);else n.setAttribute(l[e],"none")},t.prototype._setShadow=function(t){var e=t.cfg.el,i=t.attrs,n={dx:i.shadowOffsetX,dy:i.shadowOffsetY,blur:i.shadowBlur,color:i.shadowColor};if(n.dx||n.dy||n.blur||n.color){var r=this.context.find("filter",n);r||(r=this.context.addShadow(n)),e.setAttribute("filter","url(#"+r+")")}else e.removeAttribute("filter")},t}();e.default=p},function(t,e,i){"use strict";(function(t){var i=this&&this.__spreadArrays||function(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,r++)n[r]=a[o];return n};Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e,i){this.name=t,this.version=e,this.os=i};e.BrowserInfo=n;var r=function(e){this.version=e,this.name="node",this.os=t.platform};e.NodeInfo=r;var a=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null};e.BotInfo=a;var o=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/Edg\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],s=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function l(t){var e=""!==t&&o.reduce((function(e,i){var n=i[0],r=i[1];if(e)return e;var a=r.exec(t);return!!a&&[n,a]}),!1);if(!e)return null;var r=e[0],s=e[1];if("searchbot"===r)return new a;var l=s[1]&&s[1].split(/[._]/).slice(0,3);return l?l.length<3&&(l=i(l,function(t){for(var e=[],i=0;i<t;i++)e.push("0");return e}(3-l.length))):l=[],new n(r,l.join("."),u(t))}function u(t){for(var e=0,i=s.length;e<i;e++){var n=s[e],r=n[0];if(n[1].test(t))return r}return null}function h(){return void 0!==t&&t.version?new r(t.version.slice(1)):null}e.detect=function(t){return t?l(t):"undefined"!=typeof navigator?l(navigator.userAgent):h()},e.parseUserAgent=l,e.detectOS=u,e.getNodeVersion=h}).call(this,i(29))},function(t,e){var i,n,r=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(i===setTimeout)return setTimeout(t,0);if((i===a||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:a}catch(t){i=a}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var l,u=[],h=!1,c=-1;function p(){h&&l&&(h=!1,l.length?u=l.concat(u):c=-1,u.length&&f())}function f(){if(!h){var t=s(p);h=!0;for(var e=u.length;e;){for(l=u,u=[];++c<e;)l&&l[c].run();c=-1,e=u.length}l=null,h=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function g(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];u.push(new d(t,e)),1!==u.length||h||s(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=i(31),a=i(32),o=i(33),s=i(34),l=i(35),u=function(){function t(t){var e=document.createElementNS("http://www.w3.org/2000/svg","defs"),i=n.uniqueId("defs_");e.id=i,t.appendChild(e),this.children=[],this.defaultArrow={},this.el=e,this.canvas=t}return t.prototype.find=function(t,e){for(var i=this.children,n=null,r=0;r<i.length;r++)if(i[r].match(t,e)){n=i[r].id;break}return n},t.prototype.findById=function(t){for(var e=this.children,i=null,n=0;n<e.length;n++)if(e[n].id===t){i=e[n];break}return i},t.prototype.add=function(t){this.children.push(t),t.canvas=this.canvas,t.parent=this},t.prototype.getDefaultArrow=function(t,e){var i=t.stroke||t.strokeStyle;if(this.defaultArrow[i])return this.defaultArrow[i].id;var n=new o.default(t,e);return this.defaultArrow[i]=n,this.el.appendChild(n.el),n.id},t.prototype.addGradient=function(t){var e=new r.default(t);return this.el.appendChild(e.el),this.add(e),e.id},t.prototype.addArrow=function(t,e){var i=new o.default(t,e);return this.el.appendChild(i.el),i.id},t.prototype.addShadow=function(t){var e=new a.default(t);return this.el.appendChild(e.el),this.add(e),e.id},t.prototype.addPattern=function(t){var e=new l.default(t);return this.el.appendChild(e.el),this.add(e),e.id},t.prototype.addClip=function(t){var e=new s.default(t);return this.el.appendChild(e.el),this.add(e),e.id},t}();e.default=u},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,a=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,o=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function s(t){var e=t.match(o);if(!e)return"";var i="";return e.sort((function(t,e){return t=t.split(":"),e=e.split(":"),Number(t[0])-Number(e[0])})),n.each(e,(function(t){t=t.split(":"),i+='<stop offset="'+t[0]+'" stop-color="'+t[1]+'"></stop>'})),i}var l=function(){function t(t){this.cfg={};var e,i,o,l,u,h,c,p=null,f=n.uniqueId("gradient_");return"l"===t.toLowerCase()[0]?function(t,e){var i,a,o=r.exec(t),l=n.mod(n.toRadian(parseFloat(o[1])),2*Math.PI),u=o[2];l>=0&&l<.5*Math.PI?(i={x:0,y:0},a={x:1,y:1}):.5*Math.PI<=l&&l<Math.PI?(i={x:1,y:0},a={x:0,y:1}):Math.PI<=l&&l<1.5*Math.PI?(i={x:1,y:1},a={x:0,y:0}):(i={x:0,y:1},a={x:1,y:0});var h=Math.tan(l),c=h*h,p=(a.x-i.x+h*(a.y-i.y))/(c+1)+i.x,f=h*(a.x-i.x+h*(a.y-i.y))/(c+1)+i.y;e.setAttribute("x1",i.x),e.setAttribute("y1",i.y),e.setAttribute("x2",p),e.setAttribute("y2",f),e.innerHTML=s(u)}(t,p=document.createElementNS("http://www.w3.org/2000/svg","linearGradient")):(p=document.createElementNS("http://www.w3.org/2000/svg","radialGradient"),e=t,i=p,o=a.exec(e),l=parseFloat(o[1]),u=parseFloat(o[2]),h=parseFloat(o[3]),c=o[4],i.setAttribute("cx",l),i.setAttribute("cy",u),i.setAttribute("r",h),i.innerHTML=s(c)),p.setAttribute("id",f),this.el=p,this.id=f,this.cfg=t,this}return t.prototype.match=function(t,e){return this.cfg===e},t}();e.default=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r={shadowColor:"color",shadowOpacity:"opacity",shadowBlur:"blur",shadowOffsetX:"dx",shadowOffsetY:"dy"},a={x:"-40%",y:"-40%",width:"200%",height:"200%"},o=function(){function t(t){this.type="filter",this.cfg={},this.type="filter";var e=document.createElementNS("http://www.w3.org/2000/svg","filter");return n.each(a,(function(t,i){e.setAttribute(i,t)})),this.el=e,this.id=n.uniqueId("filter_"),this.el.id=this.id,this.cfg=t,this._parseShadow(t,e),this}return t.prototype.match=function(t,e){if(this.type!==t)return!1;var i=!0,r=this.cfg;return n.each(Object.keys(r),(function(t){if(r[t]!==e[t])return i=!1,!1})),i},t.prototype.update=function(t,e){var i=this.cfg;return i[r[t]]=e,this._parseShadow(i,this.el),this},t.prototype._parseShadow=function(t,e){var i='<feDropShadow\n dx="'+(t.dx||0)+'"\n dy="'+(t.dy||0)+'"\n stdDeviation="'+(t.blur?t.blur/10:0)+'"\n flood-color="'+(t.color?t.color:"#000")+'"\n flood-opacity="'+(t.opacity?t.opacity:1)+'"\n />';e.innerHTML=i},t}();e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=function(){function t(t,e){this.cfg={};var i=document.createElementNS("http://www.w3.org/2000/svg","marker"),r=n.uniqueId("marker_");i.setAttribute("id",r);var a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttribute("stroke","none"),a.setAttribute("fill",t.stroke||"#000"),i.appendChild(a),i.setAttribute("overflow","visible"),i.setAttribute("orient","auto-start-reverse"),this.el=i,this.child=a,this.id=r;var o=t["marker-start"===e?"startArrow":"endArrow"];return this.stroke=t.stroke||"#000",!0===o?this._setDefaultPath(e,a):this._setMarker(t.lineWidth,a),this}return t.prototype.match=function(){return!1},t.prototype._setDefaultPath=function(t,e){var i=this.el;e.setAttribute("d","M0,0 L6,3 L0,6 L3,3Z"),i.setAttribute("refX","3"),i.setAttribute("refY","3")},t.prototype._setMarker=function(t,e){var i=this.el,r=this.cfg.path,a=this.cfg.d;n.isArray(r)&&(r=r.map((function(t){return t.join(" ")})).join("")),e.setAttribute("d",r),i.appendChild(e),a&&i.setAttribute("refX",""+a/t)},t.prototype.update=function(t){var e=this.child;e.attr?e.attr("fill",t):e.setAttribute("fill",t)},t}();e.default=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=function(){function t(t){this.type="clip",this.cfg={};var e=document.createElementNS("http://www.w3.org/2000/svg","clipPath");this.el=e,this.id=n.uniqueId("clip_"),e.id=this.id;var i=t.cfg.el;return e.appendChild(i.cloneNode(!0)),this.cfg=t,this}return t.prototype.match=function(){return!1},t.prototype.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}();e.default=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,a=function(){function t(t){this.cfg={};var e=document.createElementNS("http://www.w3.org/2000/svg","pattern");e.setAttribute("patternUnits","userSpaceOnUse");var i=document.createElementNS("http://www.w3.org/2000/svg","image");e.appendChild(i);var a=n.uniqueId("pattern_");e.id=a,this.el=e,this.id=a,this.cfg=t;var o=r.exec(t)[2];i.setAttribute("href",o);var s=new Image;function l(){e.setAttribute("width",""+s.width),e.setAttribute("height",""+s.height)}return o.match(/^data:/i)||(s.crossOrigin="Anonymous"),s.src=o,s.complete?l():(s.onload=l,s.src=s.src),this}return t.prototype.match=function(t,e){return this.cfg===e},t}();e.default=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0);function a(t){return 1===t[0]&&0===t[1]&&0===t[3]&&1===t[4]&&0===t[6]&&0===t[7]}function o(t){return 0===t[1]&&0===t[3]&&0===t[6]&&0===t[7]}function s(t,e){a(e)||(o(e)?(t[0]*=e[0],t[4]*=e[4]):r.mat3.multiply(t,t,e))}var l=function(t){function e(e){void 0===e&&(e={});var i=t.call(this,e)||this;return i.canFill=!1,i.canStroke=!1,i.attrs={},i.attrs={opacity:1,fillOpacity:1,strokeOpacity:1,matrix:[1,0,0,0,1,0,0,0,1]},i.attr(n.__assign(n.__assign({},i.getDefaultAttrs()),i.cfg.attrs)),i.cfg.attrs={},i}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{}},e.prototype.attr=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=t[0],n=t[1];if(!i)return this.attrs;if(r.isObject(i)){for(var a in i)this._setAttr(a,i[a]);return this.clearBBox(),this.cfg.hasUpdate=!0,this}return 2===t.length?(this._setAttr(i,n),this.clearBBox(),this.cfg.hasUpdate=!0,this):this.attrs[i]},e.prototype._afterSetAttrPath=function(t){},e.prototype._setAttr=function(t,e){var i=this.attrs;i[t]=e,"fill"!==t&&"stroke"!==t?"opacity"!==t?"clip"===t&&e?this._setClip(e):"path"!==t?"transform"!==t?"rotate"===t&&this.rotateAtStart(e):this.transform(e):this._afterSetAttrPath(e):i.globalAlpha=e:i[t+"Style"]=e},e.prototype.clearBBox=function(){this.setSilent("box",null)},e.prototype.hasFill=function(){return this.canFill&&this.attrs.fillStyle},e.prototype.hasStroke=function(){return this.canStroke&&this.attrs.strokeStyle},e.prototype._setClip=function(t){t.cfg.renderer=this.cfg.renderer,t.cfg.canvas=this.cfg.canvas,t.cfg.parent=this.cfg.parent,t.hasFill=function(){return!0}},e.prototype.initTransform=function(){},e.prototype.resetMatrix=function(){this.attr("matrix",[1,0,0,0,1,0,0,0,1])},e.prototype.translate=function(t,e){var i=this.attrs.matrix;return r.mat3.translate(i,i,[t,e]),this.clearTotalMatrix(),this.attr("matrix",i),this},e.prototype.rotate=function(t){var e=this.attrs.matrix;return r.mat3.rotate(e,e,t),this.clearTotalMatrix(),this.attr("matrix",e),this},e.prototype.scale=function(t,e){var i=this.attrs.matrix;return r.mat3.scale(i,i,[t,e]),this.clearTotalMatrix(),this.attr("matrix",i),this},e.prototype.rotateAtStart=function(t){var e=this.attrs.x||0,i=this.attrs.y||0;return Math.abs(t)>2*Math.PI&&(t=t/180*Math.PI),this.transform([["t",-e,-i],["r",t],["t",e,i]])},e.prototype.move=function(t,e){var i=this.get("x")||0,n=this.get("y")||0;return this.translate(t-i,e-n),this.set("x",t),this.set("y",e),this},e.prototype.transform=function(t){var e=this,i=this.attrs.matrix;return r.each(t,(function(t){switch(t[0]){case"t":e.translate(t[1],t[2]);break;case"s":e.scale(t[1],t[2]);break;case"r":e.rotate(t[1]);break;case"m":e.attr("matrix",r.mat3.multiply([],i,t[1])),e.clearTotalMatrix()}})),this},e.prototype.setTransform=function(t){return this.attr("matrix",[1,0,0,0,1,0,0,0,1]),this.transform(t)},e.prototype.getMatrix=function(){return this.attr("matrix")},e.prototype.setMatrix=function(t){return this.attr("matrix",t),this.clearTotalMatrix(),this},e.prototype.apply=function(t,e){var i;return i=e?this._getMatrixByRoot(e):this.attr("matrix"),r.vec3.transformMat3(t,t,i),this},e.prototype._getMatrixByRoot=function(t){t=t||this;for(var e=this,i=[];e!==t;)i.unshift(e),e=e.get("parent");i.unshift(e);var n=[1,0,0,0,1,0,0,0,1];return r.each(i,(function(t){r.mat3.multiply(n,t.attr("matrix"),n)})),n},e.prototype.getTotalMatrix=function(){var t=this.cfg.totalMatrix;if(!t){t=[1,0,0,0,1,0,0,0,1];var e=this.cfg.parent;e&&s(t,e.getTotalMatrix()),s(t,this.attr("matrix")),this.cfg.totalMatrix=t}return t},e.prototype.clearTotalMatrix=function(){},e.prototype.invert=function(t){var e=this.getTotalMatrix();if(o(e))t[0]/=e[0],t[1]/=e[4];else{var i=r.mat3.invert([],e);i&&r.vec3.transformMat3(t,t,i)}return this},e.prototype.resetTransform=function(t){var e=this.attr("matrix");a(e)||t.transform(e[0],e[1],e[3],e[4],e[6],e[7])},e}(i(37).default);e.default=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(38),a=i(0),o=i(11),s=["click","mousedown","mouseup","dblclick","contextmenu","mouseover","mouseout","mousemove","wheel","touchstart","touchend","touchmove","dragstart","drag","dragend","dragenter","dragleave","drop"],l=function(t){function e(e){void 0===e&&(e={});var i=t.call(this)||this;return i.destroyed=!1,i.removed=!1,i.cfg=n.__assign(n.__assign({canvas:null,capture:!0,context:null,parent:null,visible:!0,zIndex:0},e),i.getDefaultCfg()),i}return n.__extends(e,t),e.prototype.emit=function(e,i){for(var r=[],a=2;a<arguments.length;a++)r[a-2]=arguments[a];if(t.prototype.emit.apply(this,n.__spreadArrays([e,i],r)),!(i instanceof o.default&&i.propagationStopped)&&s.indexOf(e)>=0){var l=this.cfg.parent;!l||l.removed||l.destroyed||l.emit.apply(l,n.__spreadArrays([e,i],r))}},e.prototype.set=function(t,e){return"zIndex"===t&&this._beforeSetZIndex&&this._beforeSetZIndex(e),"loading"===t&&this._beforeSetLoading&&this._beforeSetLoading(e),this.cfg[t]=e,this},e.prototype.setSilent=function(t,e){this.cfg[t]=e},e.prototype.get=function(t){return this.cfg[t]},e.prototype.show=function(){return this.cfg.visible=!0,this},e.prototype.hide=function(){return this.cfg.visible=!1,this},e.prototype.remove=function(t,e){var i=this.cfg,n=i.parent,r=i.el;return n&&!n.destroyed&&a.pull(n.get("children"),this),r&&(e?n&&n.cfg.tobeRemoved.push(r):r.parentNode.removeChild(r)),(t||void 0===t)&&this.destroy(),this},e.prototype.destroy=function(){this.destroyed||(this.off(),this.cfg={},this.destroyed=!0)},e.prototype.getParent=function(){return this.cfg.parent},e.prototype.getDefaultCfg=function(){return{}},e.prototype.toFront=function(){var t=this.cfg,e=t.parent;if(e){var i=e.cfg.children,n=t.el,r=i.indexOf(this);i.splice(r,1),i.push(this),n&&(n.parentNode.removeChild(n),t.el=null)}},e.prototype.toBack=function(){var t=this.cfg,e=t.parent;if(e){var i=e.cfg.children,n=t.el,r=i.indexOf(this);if(i.splice(r,1),i.unshift(this),n){var a=n.parentNode;a.removeChild(n),a.insertBefore(n,a.firstChild)}}},e.prototype._beforeSetZIndex=function(t){var e=this.cfg.parent;this.cfg.zIndex=t,a.isNil(e)||e.sort();var i=this.cfg.el;if(i){var n=e.cfg.children,r=n.indexOf(this),o=i.parentNode;o.removeChild(i),r===n.length-1?o.appendChild(i):o.insertBefore(i,o.childNodes[r])}return t},e.prototype._beforeSetLoading=function(t){},e.prototype.setZIndex=function(t){return this.cfg.zIndex=t,this._beforeSetZIndex(t)},e.prototype.clone=function(){return a.clone(this)},e.prototype.getBBox=function(){},e}(r.default);e.default=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this._events={}}return t.prototype.on=function(t,e,i){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!i}),this},t.prototype.once=function(t,e){return this.on(t,e,!0),this},t.prototype.emit=function(t){for(var e=this,i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var r=this._events[t]||[],a=this._events["*"]||[],o=function(n){for(var r=n.length,a=0;a<r;a++){var o=n[a],s=o.callback;o.once&&(n.splice(a,1),0===n.length&&delete e._events[t],r--,a--),s.apply(e,i)}};o(r),o(a)},t.prototype.off=function(t,e){if(t)if(e){for(var i=this._events[t]||[],n=i.length,r=0;r<n;r++)i[r].callback===e&&(i.splice(r,1),n--,r--);0===i.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},t.prototype.getEvents=function(){return this._events},t}();e.default=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.xAt=function(t,e,i,n,r){return e*Math.cos(t)*Math.cos(r)-i*Math.sin(t)*Math.sin(r)+n},e.yAt=function(t,e,i,n,r){return e*Math.sin(t)*Math.cos(r)+i*Math.cos(t)*Math.sin(r)+n},e.xExtrema=function(t,e,i){return Math.atan(-i/e*Math.tan(t))},e.yExtrema=function(t,e,i){return Math.atan(i/(e*Math.tan(t)))}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={circle:function(t,e,i){return[["M",t,e],["m",-i,0],["a",i,i,0,1,0,2*i,0],["a",i,i,0,1,0,2*-i,0]]},square:function(t,e,i){return[["M",t-i,e-i],["L",t+i,e-i],["L",t+i,e+i],["L",t-i,e+i],["Z"]]},diamond:function(t,e,i){return[["M",t-i,e],["L",t,e-i],["L",t+i,e],["L",t,e+i],["Z"]]},triangle:function(t,e,i){var n=i*Math.sin(1/3*Math.PI);return[["M",t-i,e+n],["L",t,e-n],["L",t+i,e+n],["z"]]},triangleDown:function(t,e,i){var n=i*Math.sin(1/3*Math.PI);return[["M",t-i,e-n],["L",t+i,e-n],["L",t,e+n],["Z"]]}};e.default={get:function(t){return n[t]},register:function(t,e){n[t]=e},remove:function(t){delete n[t]},getAll:function(){return n}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={svg:"svg",circle:"circle",rect:"rect",text:"text",path:"path",foreignObject:"foreignObject",polygon:"polygon",ellipse:"ellipse",image:"image"};e.default=function(t,e,i){var r=i.target||i.srcElement;if(!n[r.tagName]){for(var a=r.parentNode;a&&!n[a.tagName];)a=a.parentNode;r=a}return this.cfg.el===r?this:this.find((function(t){return t.cfg&&t.cfg.el===r}))}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=i(59),a=i(58),o=i(57),s=i(14);function l(t,e,i){var r,l=e.startTime;if(i<l+e.delay||e.isPaused)return!1;var u=e.duration,h=e.easing;if(i=i-l-e.delay,e.toAttrs.repeat)r=i%u/u,r=a[h](r);else{if(!((r=i/u)<1))return e.onFrame?t.attr(e.onFrame(1)):t.attr(e.toAttrs),e.toMatrix&&t.setMatrix(e.toMatrix),!0;r=a[h](r)}if(e.onFrame){var c=e.onFrame(r);t.attr(c)}else!function(t,e,i){var r={},a=e.toAttrs,l=e.fromAttrs,u=e.toMatrix;if(!t.destroyed){var h;for(var c in a)if(!n.isEqual(l[c],a[c]))if("path"===c){var p=a[c],f=l[c];p.length>f.length?(p=s.parsePathString(a[c]),f=s.parsePathString(l[c]),f=s.fillPathByDiff(f,p),f=s.formatPath(f,p),e.fromAttrs.path=f,e.toAttrs.path=p):e.pathFormatted||(p=s.parsePathString(a[c]),f=s.parsePathString(l[c]),f=s.formatPath(f,p),e.fromAttrs.path=f,e.toAttrs.path=p,e.pathFormatted=!0),r[c]=[];for(var d=0;d<p.length;d++){for(var g=p[d],v=f[d],y=[],m=0;m<g.length;m++)n.isNumber(g[m])&&v&&n.isNumber(v[m])?(h=o.interpolate(v[m],g[m]),y.push(h(i))):y.push(g[m]);r[c].push(y)}}else h=o.interpolate(l[c],a[c]),r[c]=h(i);if(u){var x=o.interpolateArray(e.fromMatrix,u)(i);t.setMatrix(x)}t.attr(r)}}(t,e,r);return!1}var u=function(){function t(t){this.animators=[],this.current=0,this.timer=null,this.canvas=t}return t.prototype.initTimer=function(){var t,e,i,n=this,a=this;a.timer=r.timer((function(r){if(a.current=r,n.animators.length>0){for(var o=n.animators.length-1;o>=0;o--)if((t=n.animators[o]).destroyed)a.removeAnimator(o);else{if(!t.get("pause").isPaused)for(var s=(e=t.get("animators")).length-1;s>=0;s--)i=e[s],l(t,i,r)&&(e.splice(s,1),i.callback&&i.callback());0===e.length&&a.removeAnimator(o)}n.canvas.draw()}}))},t.prototype.addAnimator=function(t){this.animators.push(t)},t.prototype.removeAnimator=function(t){this.animators.splice(t,1)},t.prototype.isAnimating=function(){return!!this.animators.length},t.prototype.stop=function(){this.timer&&this.timer.stop()},t.prototype.stopAllAnimations=function(){this.animators.forEach((function(t){t.stopAnimate()})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}();e.default=u},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(3),a=i(7),o=i(9),s=i(4),l=i(2);function u(t,e,i){return t+e*Math.cos(i)}function h(t,e,i){return t+e*Math.sin(i)}var c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canStroke=!0,e.type="arc",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x:0,y:0,r:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1,startArrow:!1,endArrow:!1}},e.prototype.isPointInPath=function(t,e){var i=this.attrs,n=i.x,r=i.y,a=i.r,o=i.startAngle,l=i.endAngle,u=i.clockwise,h=this.getHitLineWidth();return!!this.hasStroke()&&s.arcline(n,r,a,o,l,u,h,t,e)},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x,i=t.y,n=t.r,r=t.startAngle,o=t.endAngle,s=t.clockwise,u=this.getHitLineWidth(),h=u/2,c=a.box(e,i,n,r,o,s);return new l.default(c.x-h,c.y-h,c.width+u,c.height+u)},e.prototype.getStartTangent=function(){var t=this.attrs,e=t.x,i=t.y,n=t.startAngle,r=t.r,a=t.clockwise,o=Math.PI/180;a&&(o*=-1);var s=[],l=u(e,r,n+o),c=h(i,r,n+o),p=u(e,r,n),f=h(i,r,n);return s.push([l,c]),s.push([p,f]),s},e.prototype.getEndTangent=function(){var t=this.attrs,e=t.x,i=t.y,n=t.endAngle,r=t.r,a=t.clockwise,o=Math.PI/180,s=[];a&&(o*=-1);var l=u(e,r,n+o),c=h(i,r,n+o),p=u(e,r,n),f=h(i,r,n);return s.push([p,f]),s.push([l,c]),s},e.prototype.createPath=function(t){var e=this.attrs,i=e.x,n=e.y,r=e.r,a=e.startAngle,o=e.endAngle,s=e.clockwise;(t=t||this.get("context")).beginPath(),t.arc(i,n,r,a,o,s)},e.prototype.afterPath=function(t){var e=this.attrs;if(t=t||this.get("context"),e.startArrow){var i=this.getStartTangent();o.addStartArrow(t,e,i[0][0],i[0][1],i[1][0],i[1][1])}if(e.endArrow){var n=this.getEndTangent();o.addEndArrow(t,e,n[0][0],n[0][1],n[1][0],n[1][1])}},e}(r.default);e.default=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(3),a=i(4),o=i(2),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canFill=!0,e.canStroke=!0,e.type="circle",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x:0,y:0,r:0,lineWidth:1}},e.prototype.isPointInPath=function(t,e){var i=this.attrs,n=i.x,r=i.y,o=i.r,s=this.getHitLineWidth(),l=this.hasFill(),u=this.hasStroke();return l&&u?a.circle(n,r,o,t,e)||a.arcline(n,r,o,0,2*Math.PI,!1,s,t,e):l?a.circle(n,r,o,t,e):!!u&&a.arcline(n,r,o,0,2*Math.PI,!1,s,t,e)},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x,i=t.y,n=t.r,r=this.getHitLineWidth()/2+n;return o.default.fromRange(e-r,i-r,e+r,i+r)},e.prototype.createPath=function(t){var e=this.attrs,i=e.x,n=e.y,r=e.r;t.beginPath(),t.arc(i,n,r,0,2*Math.PI,!1),t.closePath()},e}(r.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(3),a=i(4),o=i(2),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canFill=!0,e.canStroke=!0,e.type="dom",e}return n.__extends(e,t),e.prototype.isPointInPath=function(t,e){if(!this.cfg.el)return!1;var i=this.cfg.el.getBBox();return a.box(i.x,i.x+i.width,i.y,i.y+i.height,t,e)},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x,i=t.y,n=t.width,r=t.height,a=this.getHitLineWidth()/2;return new o.default(e-a,i-a,n,r)},e}(r.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(3),o=i(4),s=i(2),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canFill=!0,e.canStroke=!0,e.type="ellipse",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x:0,y:0,rx:1,ry:1,lineWidth:1}},e.prototype.isPointInPath=function(t,e){var i=this.attrs,n=this.hasFill(),a=this.hasStroke(),s=i.x,l=i.y,u=i.rx,h=i.ry,c=this.getHitLineWidth(),p=u>h?u:h,f=u>h?1:u/h,d=u>h?h/u:1,g=[t,e,1],v=[1,0,0,0,1,0,0,0,1];r.mat3.scale(v,v,[f,d]),r.mat3.translate(v,v,[s,l]);var y=r.mat3.invert([],v);return r.vec3.transformMat3(g,g,y),n&&a?o.circle(0,0,p,g[0],g[1])||o.arcline(0,0,p,0,2*Math.PI,!1,c,g[0],g[1]):n?o.circle(0,0,p,g[0],g[1]):!!a&&o.arcline(0,0,p,0,2*Math.PI,!1,c,g[0],g[1])},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x,i=t.y,n=t.rx,r=t.ry,a=this.getHitLineWidth(),o=n+a/2,l=r+a/2;return s.default.fromRange(e-o,i-l,e+o,i+l)},e.prototype.createPath=function(t){var e=this.attrs,i=e.x,n=e.y,a=e.rx,o=e.ry;t=t||this.get("context");var s=a>o?a:o,l=a>o?1:a/o,u=a>o?o/a:1,h=[1,0,0,0,1,0,0,0,1];r.mat3.scale(h,h,[l,u]),r.mat3.translate(h,h,[i,n]),t.beginPath(),t.save(),t.transform(h[0],h[1],h[3],h[4],h[6],h[7]),t.arc(0,0,s,0,2*Math.PI),t.restore(),t.closePath()},e}(a.default);e.default=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(7),o=i(3),s=i(4),l=i(2),u=i(7),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canFill=!0,e.canStroke=!0,e.type="fan",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x:0,y:0,rs:0,re:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1}},e.prototype.isPointInPath=function(t,e){var i=this,n=i.hasFill(),o=i.hasStroke(),l=i.attrs,u=l.x,h=l.y,c=l.rs,p=l.re,f=l.startAngle,d=l.endAngle,g=l.clockwise,v=[t-u,e-h],y=r.vec2.angleTo([1,0],v);function m(){var t=a.nearAngle(y,f,d,g);if(r.isNumberEqual(y,t)){var e=r.vec2.squaredLength(v);if(c*c<=e&&e<=p*p)return!0}return!1}function x(){var n=i.getHitLineWidth(),r={x:Math.cos(f)*c+u,y:Math.sin(f)*c+h},a={x:Math.cos(f)*p+u,y:Math.sin(f)*p+h},o={x:Math.cos(d)*c+u,y:Math.sin(d)*c+h},l={x:Math.cos(d)*p+u,y:Math.sin(d)*p+h};return!!s.line(r.x,r.y,a.x,a.y,n,t,e)||!!s.line(o.x,o.y,l.x,l.y,n,t,e)||!!s.arcline(u,h,c,f,d,g,n,t,e)||!!s.arcline(u,h,p,f,d,g,n,t,e)}return n&&o?m()||x():n?m():!!o&&x()},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x,i=t.y,n=t.rs,r=t.re,a=t.startAngle,o=t.endAngle,s=t.clockwise,h=this.getHitLineWidth(),c=u.box(e,i,n,a,o,s),p=u.box(e,i,r,a,o,s),f=Math.min(c.minX,p.minX),d=Math.min(c.minY,p.minY),g=Math.max(c.maxX,p.maxX),v=Math.max(c.maxY,p.maxY),y=h/2;return l.default.fromRange(f-y,d-y,g+y,v+y)},e.prototype.createPath=function(t){var e=this.attrs,i=e.x,n=e.y,r=e.rs,a=e.re,o=e.startAngle,s=e.endAngle,l=e.clockwise,u={x:Math.cos(o)*r+i,y:Math.sin(o)*r+n},h={x:Math.cos(o)*a+i,y:Math.sin(o)*a+n},c={x:Math.cos(s)*r+i,y:Math.sin(s)*r+n};(t=t||this.get("context")).beginPath(),t.moveTo(u.x,u.y),t.lineTo(h.x,h.y),t.arc(i,n,a,o,s,l),t.lineTo(c.x,c.y),t.arc(i,n,r,s,o,!l),t.closePath()},e}(o.default);e.default=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(3),o=i(4),s=i(2),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="image",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x:0,y:0,img:null,width:0,height:0,sx:null,sy:null,swidth:null,sheight:null}},e.prototype.isPointInPath=function(t,e){var i=this.attrs;if(this.get("toDraw")||!i.img)return!1;this.cfg.attrs&&this.cfg.attrs.img===i.img||this._setAttrImg();var n=i.x,r=i.y,a=i.width,s=i.height;return o.rect(n,r,a,s,t,e)},e.prototype.isHitBox=function(){return!1},e.prototype.calculateBox=function(){var t=this.attrs;return this.cfg.attrs&&this.cfg.attrs.img===t.img||this._setAttrImg(),new s.default(t.x,t.y,t.width,t.height)},e.prototype._beforeSetLoading=function(t){var e=this.get("canvas");return!1===t&&!0===this.get("toDraw")&&(this.cfg.loading=!1,e.draw()),t},e.prototype._setAttrImg=function(){var t=this,e=t.attrs,i=e.img;if(!r.isString(i))return i instanceof Image?(e.width||t.attr("width",i.width),e.height||t.attr("height",i.height),i):i instanceof HTMLElement&&r.isString(i.nodeName)&&"CANVAS"===i.nodeName.toUpperCase()?(e.width||t.attr("width",Number(i.getAttribute("width"))),e.height||t.attr("height",Number(i.getAttribute("height"))),i):i instanceof ImageData?(e.width||t.attr("width",i.width),e.height||t.attr("height",i.height),i):null;var n=new Image;n.onload=function(){if(t.get("destroyed"))return!1;t.attr("imgSrc",i),t.attr("img",n);var e=t.get("callback");e&&e.call(t),t.set("loading",!1)},n.src=i,n.crossOrigin="Anonymous",t.set("loading",!0)},e.prototype.drawInner=function(t){this.cfg.hasUpdate&&this._setAttrImg(),this.get("loading")?this.set("toDraw",!0):(this._drawImage(t),this.cfg.hasUpdate=!1)},e.prototype._drawImage=function(t){var e=this.attrs,i=e.x,n=e.y,a=e.img,o=e.width,s=e.height,l=e.sx,u=e.sy,h=e.swidth,c=e.sheight;this.set("toDraw",!1);var p=a;if(p instanceof ImageData&&((p=new Image).src=a),p instanceof Image||p instanceof HTMLImageElement&&r.isString(p.nodeName)&&"CANVAS"===p.nodeName.toUpperCase()){if(r.isNil(l)||r.isNil(u)||r.isNil(h)||r.isNil(c))return void t.drawImage(p,i,n,o,s);if(!(r.isNil(l)||r.isNil(u)||r.isNil(h)||r.isNil(c)))return void t.drawImage(p,l,u,h,c,i,n,o,s)}},e}(a.default);e.default=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(3),a=i(9),o=i(12),s=i(4),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canStroke=!0,e.type="line",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x1:0,y1:0,x2:0,y2:0,lineWidth:1,startArrow:!1,endArrow:!1}},e.prototype.isPointInPath=function(t,e){var i=this.attrs,n=i.x1,r=i.y1,a=i.x2,o=i.y2,l=this.getHitLineWidth();return!!this.hasStroke()&&s.line(n,r,a,o,l,t,e)},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x1,i=t.y1,n=t.x2,r=t.y2,a=this.getHitLineWidth();return o.box(e,i,n,r,a)},e.prototype.createPath=function(t){var e=this.attrs,i=e.x1,n=e.y1,r=e.x2,a=e.y2;(t=t||this.get("context")).beginPath(),t.moveTo(i,n),t.lineTo(r,a)},e.prototype.afterPath=function(t){var e=this.attrs,i=e.x1,n=e.y1,r=e.x2,o=e.y2;t=t||this.get("context"),e.startArrow&&a.addStartArrow(t,e,r,o,i,n),e.endArrow&&a.addEndArrow(t,e,i,n,r,o)},e.prototype.getPoint=function(t){var e=this.attrs;return{x:o.at(e.x1,e.x2,t),y:o.at(e.y1,e.y2,t)}},e}(r.default);e.default=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(3),o=i(8),s=i(6),l=i(9),u=i(14),h=i(13),c=i(16),p=i(2),f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canFill=!0,e.canStroke=!0,e.type="path",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{path:null,lineWidth:1,startArrow:!1,endArrow:!1}},e.prototype.isPointInPath=function(t,e){var i=this,n=i.get("segments"),a=i.hasFill(),o=i.hasStroke();function s(){if(!r.isEmpty(n)){for(var a=i.getHitLineWidth(),o=0,s=n.length;o<s;o++)if(n[o].isInside(t,e,a))return!0;return!1}}return a&&o?c.default(t,e,i)||s():a?c.default(t,e,i):!!o&&s()},e.prototype._afterSetAttrPath=function(t){if(r.isNil(t))return this.setSilent("segments",null),void this.setSilent("box",void 0);var e,i=s.parsePath(t),n=[];if(r.isArray(i)&&0!==i.length&&("M"===i[0][0]||"m"===i[0][0])){for(var a=i.length,l=0;l<i.length;l++){var u=i[l];e=new o.default(u,e,l===a-1),n.push(e)}this.setSilent("segments",n),this.setSilent("tCache",null),this.setSilent("box",null)}},e.prototype.calculateBox=function(){var t=this.get("segments");if(!t)return null;var e=this.getHitLineWidth(),i=1/0,n=-1/0,a=1/0,o=-1/0;return r.each(t,(function(t){t.getBBox(e);var r=t.box;if(r){r.x<i&&(i=r.x);var s=r.maxX;s>n&&(n=s),r.y<a&&(a=r.y);var l=r.maxY;l>o&&(o=l)}})),i===1/0||a===1/0?new p.default(0,0,0,0):new p.default(i,a,n-i,o-a)},e.prototype._setTcache=function(){var t,e,i,n,a=0,o=0,s=[],l=this.cfg.curve;l&&(r.each(l,(function(t,e){i=l[e+1],n=t.length,i&&(a+=h.len(t[n-2],t[n-1],i[1],i[2],i[3],i[4],i[5],i[6]))})),r.each(l,(function(r,u){i=l[u+1],n=r.length,i&&((t=[])[0]=o/a,e=h.len(r[n-2],r[n-1],i[1],i[2],i[3],i[4],i[5],i[6]),o+=e,t[1]=o/a,s.push(t))})),this.cfg.tCache=s)},e.prototype._calculateCurve=function(){var t=this.attrs.path;this.cfg.curve=u.pathTocurve(t)},e.prototype.getStartTangent=function(){var t,e,i,n,a=this.get("segments");if(a.length>1)if(t=a[0].endPoint,e=a[1].endPoint,i=a[1].startTangent,n=[],r.isFunction(i)){var o=i();n.push([t.x-o[0],t.y-o[1]]),n.push([t.x,t.y])}else n.push([e.x,e.y]),n.push([t.x,t.y]);return n},e.prototype.getEndTangent=function(){var t,e,i,n,a=this.get("segments"),o=a.length;if(o>1)if(t=a[o-2].endPoint,e=a[o-1].endPoint,i=a[o-1].endTangent,n=[],r.isFunction(i)){var s=i();n.push([e.x-s[0],e.y-s[1]]),n.push([e.x,e.y])}else n.push([t.x,t.y]),n.push([e.x,e.y]);return n},e.prototype.getPoint=function(t){var e,i,n=this.cfg.tCache;n||(this._calculateCurve(),this._setTcache(),n=this.cfg.tCache);var a=this.cfg.curve;if(!n)return a?{x:a[0][1],y:a[0][2]}:null;r.each(n,(function(n,r){t>=n[0]&&t<=n[1]&&(e=(t-n[0])/(n[1]-n[0]),i=r)}));var o=a[i];if(r.isNil(o)||r.isNil(i))return null;var s=o.length,l=a[i+1];return{x:h.at(o[s-2],l[1],l[3],l[5],1-e),y:h.at(o[s-1],l[2],l[4],l[6],1-e)}},e.prototype.createPath=function(t){var e=this.get("segments");if(r.isArray(e)){(t=t||this.get("context")).beginPath();for(var i=e.length,n=0;n<i;n++)e[n].draw(t)}},e.prototype.afterPath=function(t){var e=this.attrs,i=this.get("segments"),n=e.path;if(t=t||this.get("context"),r.isArray(i)&&1!==i.length&&(e.startArrow||e.endArrow)&&"z"!==n[n.length-1]&&"Z"!==n[n.length-1]&&!e.fill){var a=this.getStartTangent();l.addStartArrow(t,e,a[0][0],a[0][1],a[1][0],a[1][1]);var o=this.getEndTangent();l.addEndArrow(t,e,o[0][0],o[0][1],o[1][0],o[1][1])}},e}(a.default);e.default=f},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(3),o=i(4),s=i(16),l=i(2),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canFill=!0,e.canStroke=!0,e.type="polygon",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{points:null,lineWidth:1}},e.prototype.isPointInPath=function(t,e){var i=this,n=i.hasFill(),r=i.hasStroke();function a(){var n=i.attrs.points;if(n.length<2)return!1;var r=i.getHitLineWidth(),a=n.slice(0);return n.length>=3&&a.push(n[0]),o.polyline(a,r,t,e)}return n&&r?s.default(t,e,i)||a():n?s.default(t,e,i):!!r&&a()},e.prototype.calculateBox=function(){var t=this.attrs.points,e=this.getHitLineWidth();if(!t||0===t.length)return null;var i=1/0,n=1/0,a=-1/0,o=-1/0;r.each(t,(function(t){var e=t[0],r=t[1];e<i&&(i=e),e>a&&(a=e),r<n&&(n=r),r>o&&(o=r)}));var s=e/2;return l.default.fromRange(i-s,n-s,a+s,o+s)},e.prototype.createPath=function(t){var e=this.attrs.points;e.length<2||((t=t||this.get("context")).beginPath(),r.each(e,(function(e,i){0===i?t.moveTo(e[0],e[1]):t.lineTo(e[0],e[1])})),t.closePath())},e}(a.default);e.default=u},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(3),o=i(9),s=i(12),l=i(4),u=i(2),h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canStroke=!0,e.type="polyline",e.tCache=null,e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{points:null,lineWidth:1,startArrow:!1,endArrow:!1,tCache:null}},e.prototype.isPointInPath=function(t,e){var i=this.attrs;if(this.hasStroke()){var n=i.points;if(n.length<2)return!1;var r=i.lineWidth;return l.polyline(n,r,t,e)}return!1},e.prototype.calculateBox=function(){var t=this.attrs,e=this.getHitLineWidth(),i=t.points;if(!i||0===i.length)return null;var n=1/0,a=1/0,o=-1/0,s=-1/0;r.each(i,(function(t){var e=t[0],i=t[1];e<n&&(n=e),e>o&&(o=e),i<a&&(a=i),i>s&&(s=i)}));var l=e/2;return u.default.fromRange(n-l,a-l,o+l,s+l)},e.prototype._setTcache=function(){var t,e,i=this.attrs.points,n=0,a=0,o=[];i&&0!==i.length&&(r.each(i,(function(t,e){i[e+1]&&(n+=s.len(t[0],t[1],i[e+1][0],i[e+1][1]))})),n<=0||(r.each(i,(function(r,l){i[l+1]&&((t=[])[0]=a/n,e=s.len(r[0],r[1],i[l+1][0],i[l+1][1]),a+=e,t[1]=a/n,o.push(t))})),this.tCache=o))},e.prototype.createPath=function(t){var e,i,n=this.attrs.points;if(!(n.length<2)){for((t=t||this.get("context")).beginPath(),t.moveTo(n[0][0],n[0][1]),i=1,e=n.length-1;i<e;i++)t.lineTo(n[i][0],n[i][1]);t.lineTo(n[e][0],n[e][1])}},e.prototype.getStartTangent=function(){var t=this.attrs.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.prototype.getEndTangent=function(){var t=this.attrs.points,e=t.length-1,i=[];return i.push([t[e-1][0],t[e-1][1]]),i.push([t[e][0],t[e][1]]),i},e.prototype.afterPath=function(t){var e=this.attrs,i=e.points,n=i.length-1;t=t||this.get("context"),e.startArrow&&o.addStartArrow(t,e,i[1][0],i[1][1],i[0][0],i[0][1]),e.endArrow&&o.addEndArrow(t,e,i[n-1][0],i[n-1][1],i[n][0],i[n][1])},e.prototype.getPoint=function(t){var e,i,n=this.attrs.points,a=this.tCache;return a||(this._setTcache(),a=this.tCache),r.each(a,(function(n,r){t>=n[0]&&t<=n[1]&&(e=(t-n[0])/(n[1]-n[0]),i=r)})),{x:s.at(n[i][0],n[i+1][0],e),y:s.at(n[i][1],n[i+1][1],e)}},e}(a.default);e.default=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(3),a=i(6),o=i(4),s=i(16),l=i(2),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canFill=!0,e.canStroke=!0,e.type="rect",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x:0,y:0,width:0,height:0,radius:0,lineWidth:1}},e.prototype.isPointInPath=function(t,e){var i=this,n=i.hasFill(),r=i.hasStroke();function a(){var n=i.attrs,r=n.x,a=n.y,s=n.width,l=n.height,u=n.radius,h=i.getHitLineWidth();if(0===u){var c=h/2;return o.line(r-c,a,r+s+c,a,h,t,e)||o.line(r+s,a-c,r+s,a+l+c,h,t,e)||o.line(r+s+c,a+l,r-c,a+l,h,t,e)||o.line(r,a+l+c,r,a-c,h,t,e)}return o.line(r+u,a,r+s-u,a,h,t,e)||o.line(r+s,a+u,r+s,a+l-u,h,t,e)||o.line(r+s-u,a+l,r+u,a+l,h,t,e)||o.line(r,a+l-u,r,a+u,h,t,e)||o.arcline(r+s-u,a+u,u,1.5*Math.PI,2*Math.PI,!1,h,t,e)||o.arcline(r+s-u,a+l-u,u,0,.5*Math.PI,!1,h,t,e)||o.arcline(r+u,a+l-u,u,.5*Math.PI,Math.PI,!1,h,t,e)||o.arcline(r+u,a+u,u,Math.PI,1.5*Math.PI,!1,h,t,e)}return n&&r?s.default(t,e,i)||a():n?s.default(t,e,i):!!r&&a()},e.prototype.calculateBox=function(){var t=this.attrs,e=t.x,i=t.y,n=t.width,r=t.height,a=this.getHitLineWidth()/2;return l.default.fromRange(e-a,i-a,e+n+a,i+r+a)},e.prototype.createPath=function(t){var e=this.attrs,i=e.x,n=e.y,r=e.width,o=e.height,s=e.radius;if((t=t||this.get("context")).beginPath(),0===s)t.rect(i,n,r,o);else{var l=a.parseRadius(s);t.moveTo(i+l.r1,n),t.lineTo(i+r-l.r2,n),0!==l.r2&&t.arc(i+r-l.r2,n+l.r2,l.r2,-Math.PI/2,0),t.lineTo(i+r,n+o-l.r3),0!==l.r3&&t.arc(i+r-l.r3,n+o-l.r3,l.r3,0,Math.PI/2),t.lineTo(i+l.r4,n+o),0!==l.r4&&t.arc(i+l.r4,n+o-l.r4,l.r4,Math.PI/2,Math.PI),t.lineTo(i,n+l.r1),0!==l.r1&&t.arc(i+l.r1,n+l.r1,l.r1,Math.PI,1.5*Math.PI),t.closePath()}},e}(r.default);e.default=u},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),a=i(3),o=i(4),s=i(2),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.canFill=!0,e.canStroke=!0,e.type="text",e}return n.__extends(e,t),e.prototype.getDefaultAttrs=function(){return{x:0,y:0,text:null,lineHeight:1,lineWidth:1,lineCount:1,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom",textArr:null}},e.prototype.isPointInPath=function(t,e){var i=this.getBBox();if(this.hasFill()||this.hasStroke())return o.box(i.x,i.maxX,i.minY,i.maxY,t,e)},e.prototype.initTransform=function(){var t=this.attrs.fontSize;t&&+t<12&&this.transform([["t",-1*this.attrs.x,-1*this.attrs.y],["s",+t/12,+t/12],["t",this.attrs.x,this.attrs.y]])},e.prototype._assembleFont=function(){var t=this.attrs,e=t.fontSize,i=t.fontFamily,n=t.fontWeight,r=t.fontStyle,a=t.fontVariant;t.font=[r,a,n,e+"px",i].join(" ")},e.prototype._setAttrText=function(){var t=this.attrs,e=t.text,i=null;if(r.isString(e)&&-1!==e.indexOf("\n")){var n=(i=e.split("\n")).length;t.lineCount=n}t.textArr=i},e.prototype._getTextHeight=function(){var t=this.attrs,e=t.lineCount,i=1*t.fontSize;return e>1?i*e+this._getSpaceingY()*(e-1):i},e.prototype.isHitBox=function(){return!1},e.prototype.calculateBox=function(){var t=this.attrs,e=this.cfg;e.attrs&&!e.hasUpdate||(this._assembleFont(),this._setAttrText()),t.textArr||this._setAttrText();var i=t.x,n=t.y,r=this.measureText();if(!r)return new s.default(i,n,0,0);var a=this._getTextHeight(),o=t.textAlign,l=t.textBaseline,u=this.getHitLineWidth(),h={x:i,y:n-a};o&&("end"===o||"right"===o?h.x-=r:"center"===o&&(h.x-=r/2)),l&&("top"===l?h.y+=a:"middle"===l&&(h.y+=a/2)),this.set("startPoint",h);var c=u/2;return s.default.fromRange(h.x-c,h.y-c,h.x+r+c,h.y+a+c)},e.prototype._getSpaceingY=function(){var t=this.attrs,e=t.lineHeight,i=1*t.fontSize;return e?e-i:.14*i},e.prototype.drawInner=function(t){var e=this.attrs,i=this.cfg;i.attrs&&!i.hasUpdate||(this._assembleFont(),this._setAttrText()),t.font=e.font;var n=e.text;if(!r.isNil(n)){var a=e.textArr,o=e.x,s=e.y,l=e.maxWidth;if(t.beginPath(),this.hasStroke()){var u=e.strokeOpacity;r.isNil(u)||1===u||(t.globalAlpha=u),a?this._drawTextArr(t,!1):r.isNil(l)?t.strokeText(n,o,s):t.strokeText(n,o,s,l),t.globalAlpha=1}if(this.hasFill()){var h=e.fillOpacity;r.isNil(h)||1===h||(t.globalAlpha=h),a?this._drawTextArr(t,!0):r.isNil(l)?t.fillText(n,o,s):t.fillText(n,o,s,l)}i.hasUpdate=!1}},e.prototype._drawTextArr=function(t,e){var i,n=this.attrs.textArr,a=this.attrs.textBaseline,o=1*this.attrs.fontSize,s=this._getSpaceingY(),l=this.attrs.x,u=this.attrs.y,h=this.attrs.maxWidth,c=this.getBBox(),p=c.maxY-c.minY;r.each(n,(function(n,c){i=u+c*(s+o)-p+o,"middle"===a&&(i+=p-o-(p-o)/2),"top"===a&&(i+=p-o),e?r.isNil(h)?t.fillText(n,l,i):t.fillText(n,l,i,h):r.isNil(h)?t.strokeText(n,l,i):t.strokeText(n,l,i,h)}))},e.prototype.measureText=function(){var t,e=this.attrs,i=e.text,n=e.font,a=e.textArr,o=0;if(!r.isNil(i)){var s=document.createElement("canvas").getContext("2d");return s.save(),s.font=n,a?r.each(a,(function(e){t=s.measureText(e).width,o<t&&(o=t),s.restore()})):(o=s.measureText(i).width,s.restore()),r.isNil(e.maxWidth)||(o=Math.min(e.maxWidth,o)),o}},e}(a.default);e.default=l},function(t){t.exports=JSON.parse('{"name":"@antv/g","version":"3.5.0-beta.4","description":"A canvas library which providing 2d draw for G2.","keywords":["canvas","svg","G","G2","G6","2d draw"],"main":"lib/index.js","module":"esm/index.js","browser":"dist/g.min.js","types":"lib/index.d.ts","files":["package.json","lib","esm","dist","LICENSE","README.md"],"homepage":"https://github.com/antvis/g","author":"https://github.com/orgs/antvis/people","repository":{"type":"git","url":"git@github.com:antvis/g.git"},"bugs":{"url":"https://github.com/antvis/g/issues"},"scripts":{"test":"torch --compile --renderer --opts __tests__/mocha.opts","test-live":"torch --compile --renderer --interactive --opts __tests__/mocha.opts","build":"run-s clean lib","clean":"rimraf lib esm","lib":"run-p lib:*","lib:cjs":"loose-tsc -p tsconfig.json --target ES5 --module commonjs --outDir lib","lib:esm":"loose-tsc -p tsconfig.json --target ES5 --module ESNext --outDir esm","lib:umd":"webpack --config webpack.config.js --mode production","lint":"exit 0","coverage":"exit 0","tsc":"loose-tsc --noEmit","prettier":"prettier --write \'*.{js,ts,json,md}\'"},"husky":{"hooks":{"pre-commit":"run-s lint"}},"lint-staged":{"*.{js,json,md}":["prettier --write","git add"],"*.{ts}":["tslint -c tslint.json --fix","prettier --write","git add"]},"dependencies":{"@antv/event-emitter":"^0.1.0","@antv/gl-matrix":"~2.7.1","@antv/util":"~1.3.1","d3-ease":"~1.0.3","d3-interpolate":"~1.1.5","d3-timer":"~1.0.6","detect-browser":"^4.6.0"},"devDependencies":{"@antv/torch":"^1.0.3","@babel/cli":"^7.1.5","@babel/core":"^7.1.6","@babel/plugin-proposal-class-properties":"^7.1.0","@babel/plugin-proposal-object-rest-spread":"^7.0.0","@babel/preset-env":"^7.2.0","@babel/preset-typescript":"^7.1.0","@commitlint/cli":"^7.2.1","@commitlint/config-angular":"^7.1.2","@types/lodash":"^4.14.119","@types/node":"^10.12.18","babel-eslint":"^10.0.1","babel-loader":"^8.0.0","babel-plugin-transform-remove-strict-mode":"~0.0.2","benchmark":"^2.1.4","chai":"~4.0.1","eslint":"^5.10.0","eslint-config-egg":"^7.1.0","eslint-config-prettier":"^6.1.0","event-simulate":"~1.0.0","git-contributor":"~1.0.8","husky":"^1.3.1","lint-staged":"^9.2.3","loose-tsc":"^0.0.1","npm-run-all":"^4.1.5","prettier":"^1.18.2","rimraf":"^3.0.0","source-map-support":"^0.5.9","ts-loader":"^5.3.1","ts-node":"^7.0.1","tslint":"^5.12.0","tslint-config-airbnb":"^5.11.1","tslint-config-prettier":"^1.18.0","typescript":"^3.2.2","webpack":"^4.26.1","webpack-cli":"^3.1.2"}}')},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,i){"use strict";i.r(e);var n=function(t,e,i){t.prototype=e.prototype=i,i.constructor=t};function r(t,e){var i=Object.create(t.prototype);for(var n in e)i[n]=e[n];return i}function a(){}var o="\\s*([+-]?\\d+)\\s*",s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",l="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u=/^#([0-9a-f]{3,8})$/,h=new RegExp("^rgb\\("+[o,o,o]+"\\)$"),c=new RegExp("^rgb\\("+[l,l,l]+"\\)$"),p=new RegExp("^rgba\\("+[o,o,o,s]+"\\)$"),f=new RegExp("^rgba\\("+[l,l,l,s]+"\\)$"),d=new RegExp("^hsl\\("+[s,l,l]+"\\)$"),g=new RegExp("^hsla\\("+[s,l,l,s]+"\\)$"),v={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function y(){return this.rgb().formatHex()}function m(){return this.rgb().formatRgb()}function x(t){var e,i;return t=(t+"").trim().toLowerCase(),(e=u.exec(t))?(i=e[1].length,e=parseInt(e[1],16),6===i?b(e):3===i?new S(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===i?new S(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===i?new S(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=h.exec(t))?new S(e[1],e[2],e[3],1):(e=c.exec(t))?new S(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=p.exec(t))?_(e[1],e[2],e[3],e[4]):(e=f.exec(t))?_(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=d.exec(t))?A(e[1],e[2]/100,e[3]/100,1):(e=g.exec(t))?A(e[1],e[2]/100,e[3]/100,e[4]):v.hasOwnProperty(t)?b(v[t]):"transparent"===t?new S(NaN,NaN,NaN,0):null}function b(t){return new S(t>>16&255,t>>8&255,255&t,1)}function _(t,e,i,n){return n<=0&&(t=e=i=NaN),new S(t,e,i,n)}function w(t){return t instanceof a||(t=x(t)),t?new S((t=t.rgb()).r,t.g,t.b,t.opacity):new S}function M(t,e,i,n){return 1===arguments.length?w(t):new S(t,e,i,null==n?1:n)}function S(t,e,i,n){this.r=+t,this.g=+e,this.b=+i,this.opacity=+n}function k(){return"#"+C(this.r)+C(this.g)+C(this.b)}function O(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function C(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function A(t,e,i,n){return n<=0?t=e=i=NaN:i<=0||i>=1?t=e=NaN:e<=0&&(t=NaN),new j(t,e,i,n)}function L(t){if(t instanceof j)return new j(t.h,t.s,t.l,t.opacity);if(t instanceof a||(t=x(t)),!t)return new j;if(t instanceof j)return t;var e=(t=t.rgb()).r/255,i=t.g/255,n=t.b/255,r=Math.min(e,i,n),o=Math.max(e,i,n),s=NaN,l=o-r,u=(o+r)/2;return l?(s=e===o?(i-n)/l+6*(i<n):i===o?(n-e)/l+2:(e-i)/l+4,l/=u<.5?o+r:2-o-r,s*=60):l=u>0&&u<1?0:s,new j(s,l,u,t.opacity)}function P(t,e,i,n){return 1===arguments.length?L(t):new j(t,e,i,null==n?1:n)}function j(t,e,i,n){this.h=+t,this.s=+e,this.l=+i,this.opacity=+n}function T(t,e,i){return 255*(t<60?e+(i-e)*t/60:t<180?i:t<240?e+(i-e)*(240-t)/60:e)}function B(t,e,i,n,r){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*i+(1+3*t+3*a-3*o)*n+o*r)/6}n(a,x,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:y,formatHex:y,formatHsl:function(){return L(this).formatHsl()},formatRgb:m,toString:m}),n(S,M,r(a,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new S(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new S(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:k,formatHex:k,formatRgb:O,toString:O})),n(j,P,r(a,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new j(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new j(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,n=i+(i<.5?i:1-i)*e,r=2*i-n;return new S(T(t>=240?t-240:t+120,r,n),T(t,r,n),T(t<120?t+240:t-120,r,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var I=function(t){var e=t.length-1;return function(i){var n=i<=0?i=0:i>=1?(i=1,e-1):Math.floor(i*e),r=t[n],a=t[n+1],o=n>0?t[n-1]:2*r-a,s=n<e-1?t[n+2]:2*a-r;return B((i-n/e)*e,o,r,a,s)}},D=function(t){var e=t.length;return function(i){var n=Math.floor(((i%=1)<0?++i:i)*e),r=t[(n+e-1)%e],a=t[n%e],o=t[(n+1)%e],s=t[(n+2)%e];return B((i-n/e)*e,r,a,o,s)}},F=function(t){return function(){return t}};function E(t,e){return function(i){return t+i*e}}function R(t,e){var i=e-t;return i?E(t,i>180||i<-180?i-360*Math.round(i/360):i):F(isNaN(t)?e:t)}function z(t){return 1==(t=+t)?N:function(e,i){return i-e?function(t,e,i){return t=Math.pow(t,i),e=Math.pow(e,i)-t,i=1/i,function(n){return Math.pow(t+n*e,i)}}(e,i,t):F(isNaN(e)?i:e)}}function N(t,e){var i=e-t;return i?E(t,i):F(isNaN(t)?e:t)}var Y=function t(e){var i=z(e);function n(t,e){var n=i((t=M(t)).r,(e=M(e)).r),r=i(t.g,e.g),a=i(t.b,e.b),o=N(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=r(e),t.b=a(e),t.opacity=o(e),t+""}}return n.gamma=t,n}(1);function H(t){return function(e){var i,n,r=e.length,a=new Array(r),o=new Array(r),s=new Array(r);for(i=0;i<r;++i)n=M(e[i]),a[i]=n.r||0,o[i]=n.g||0,s[i]=n.b||0;return a=t(a),o=t(o),s=t(s),n.opacity=1,function(t){return n.r=a(t),n.g=o(t),n.b=s(t),n+""}}}var G,W,X,V,q=H(I),U=H(D),Z=function(t,e){var i,n=e?e.length:0,r=t?Math.min(n,t.length):0,a=new Array(r),o=new Array(n);for(i=0;i<r;++i)a[i]=it(t[i],e[i]);for(;i<n;++i)o[i]=e[i];return function(t){for(i=0;i<r;++i)o[i]=a[i](t);return o}},Q=function(t,e){var i=new Date;return e-=t=+t,function(n){return i.setTime(t+e*n),i}},$=function(t,e){return e-=t=+t,function(i){return t+e*i}},K=function(t,e){var i,n={},r={};for(i in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)i in t?n[i]=it(t[i],e[i]):r[i]=e[i];return function(t){for(i in n)r[i]=n[i](t);return r}},J=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tt=new RegExp(J.source,"g"),et=function(t,e){var i,n,r,a=J.lastIndex=tt.lastIndex=0,o=-1,s=[],l=[];for(t+="",e+="";(i=J.exec(t))&&(n=tt.exec(e));)(r=n.index)>a&&(r=e.slice(a,r),s[o]?s[o]+=r:s[++o]=r),(i=i[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:$(i,n)})),a=tt.lastIndex;return a<e.length&&(r=e.slice(a),s[o]?s[o]+=r:s[++o]=r),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var i,n=0;n<e;++n)s[(i=l[n]).i]=i.x(t);return s.join("")})},it=function(t,e){var i,n=typeof e;return null==e||"boolean"===n?F(e):("number"===n?$:"string"===n?(i=x(e))?(e=i,Y):et:e instanceof x?Y:e instanceof Date?Q:Array.isArray(e)?Z:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?K:$)(t,e)},nt=function(t,e){return e-=t=+t,function(i){return Math.round(t+e*i)}},rt=180/Math.PI,at={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},ot=function(t,e,i,n,r,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*i+e*n)&&(i-=t*l,n-=e*l),(s=Math.sqrt(i*i+n*n))&&(i/=s,n/=s,l/=s),t*n<e*i&&(t=-t,e=-e,l=-l,o=-o),{translateX:r,translateY:a,rotate:Math.atan2(e,t)*rt,skewX:Math.atan(l)*rt,scaleX:o,scaleY:s}};function st(t,e,i,n){function r(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],l=[];return a=t(a),o=t(o),function(t,n,r,a,o,s){if(t!==r||n!==a){var l=o.push("translate(",null,e,null,i);s.push({i:l-4,x:$(t,r)},{i:l-2,x:$(n,a)})}else(r||a)&&o.push("translate("+r+e+a+i)}(a.translateX,a.translateY,o.translateX,o.translateY,s,l),function(t,e,i,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:i.push(r(i)+"rotate(",null,n)-2,x:$(t,e)})):e&&i.push(r(i)+"rotate("+e+n)}(a.rotate,o.rotate,s,l),function(t,e,i,a){t!==e?a.push({i:i.push(r(i)+"skewX(",null,n)-2,x:$(t,e)}):e&&i.push(r(i)+"skewX("+e+n)}(a.skewX,o.skewX,s,l),function(t,e,i,n,a,o){if(t!==i||e!==n){var s=a.push(r(a)+"scale(",null,",",null,")");o.push({i:s-4,x:$(t,i)},{i:s-2,x:$(e,n)})}else 1===i&&1===n||a.push(r(a)+"scale("+i+","+n+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,i=-1,n=l.length;++i<n;)s[(e=l[i]).i]=e.x(t);return s.join("")}}}var lt=st((function(t){return"none"===t?at:(G||(G=document.createElement("DIV"),W=document.documentElement,X=document.defaultView),G.style.transform=t,t=X.getComputedStyle(W.appendChild(G),null).getPropertyValue("transform"),W.removeChild(G),t=t.slice(7,-1).split(","),ot(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),ut=st((function(t){return null==t?at:(V||(V=document.createElementNS("http://www.w3.org/2000/svg","g")),V.setAttribute("transform",t),(t=V.transform.baseVal.consolidate())?(t=t.matrix,ot(t.a,t.b,t.c,t.d,t.e,t.f)):at)}),", ",")",")"),ht=Math.SQRT2;function ct(t){return((t=Math.exp(t))+1/t)/2}var pt=function(t,e){var i,n,r=t[0],a=t[1],o=t[2],s=e[0],l=e[1],u=e[2],h=s-r,c=l-a,p=h*h+c*c;if(p<1e-12)n=Math.log(u/o)/ht,i=function(t){return[r+t*h,a+t*c,o*Math.exp(ht*t*n)]};else{var f=Math.sqrt(p),d=(u*u-o*o+4*p)/(2*o*2*f),g=(u*u-o*o-4*p)/(2*u*2*f),v=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(g*g+1)-g);n=(y-v)/ht,i=function(t){var e,i=t*n,s=ct(v),l=o/(2*f)*(s*(e=ht*i+v,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[r+l*h,a+l*c,o*s/ct(ht*i+v)]}}return i.duration=1e3*n,i};function ft(t){return function(e,i){var n=t((e=P(e)).h,(i=P(i)).h),r=N(e.s,i.s),a=N(e.l,i.l),o=N(e.opacity,i.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=a(t),e.opacity=o(t),e+""}}}var dt=ft(R),gt=ft(N),vt=Math.PI/180,yt=180/Math.PI,mt=6/29,xt=3*mt*mt;function bt(t){if(t instanceof wt)return new wt(t.l,t.a,t.b,t.opacity);if(t instanceof Lt)return Pt(t);t instanceof S||(t=w(t));var e,i,n=Ot(t.r),r=Ot(t.g),a=Ot(t.b),o=Mt((.2225045*n+.7168786*r+.0606169*a)/1);return n===r&&r===a?e=i=o:(e=Mt((.4360747*n+.3850649*r+.1430804*a)/.96422),i=Mt((.0139322*n+.0971045*r+.7141733*a)/.82521)),new wt(116*o-16,500*(e-o),200*(o-i),t.opacity)}function _t(t,e,i,n){return 1===arguments.length?bt(t):new wt(t,e,i,null==n?1:n)}function wt(t,e,i,n){this.l=+t,this.a=+e,this.b=+i,this.opacity=+n}function Mt(t){return t>.008856451679035631?Math.pow(t,1/3):t/xt+4/29}function St(t){return t>mt?t*t*t:xt*(t-4/29)}function kt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ot(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ct(t){if(t instanceof Lt)return new Lt(t.h,t.c,t.l,t.opacity);if(t instanceof wt||(t=bt(t)),0===t.a&&0===t.b)return new Lt(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*yt;return new Lt(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function At(t,e,i,n){return 1===arguments.length?Ct(t):new Lt(t,e,i,null==n?1:n)}function Lt(t,e,i,n){this.h=+t,this.c=+e,this.l=+i,this.opacity=+n}function Pt(t){if(isNaN(t.h))return new wt(t.l,0,0,t.opacity);var e=t.h*vt;return new wt(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}function jt(t,e){var i=N((t=_t(t)).l,(e=_t(e)).l),n=N(t.a,e.a),r=N(t.b,e.b),a=N(t.opacity,e.opacity);return function(e){return t.l=i(e),t.a=n(e),t.b=r(e),t.opacity=a(e),t+""}}function Tt(t){return function(e,i){var n=t((e=At(e)).h,(i=At(i)).h),r=N(e.c,i.c),a=N(e.l,i.l),o=N(e.opacity,i.opacity);return function(t){return e.h=n(t),e.c=r(t),e.l=a(t),e.opacity=o(t),e+""}}}n(wt,_t,r(a,{brighter:function(t){return new wt(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new wt(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,i=isNaN(this.b)?t:t-this.b/200;return new S(kt(3.1338561*(e=.96422*St(e))-1.6168667*(t=1*St(t))-.4906146*(i=.82521*St(i))),kt(-.9787684*e+1.9161415*t+.033454*i),kt(.0719453*e-.2289914*t+1.4052427*i),this.opacity)}})),n(Lt,At,r(a,{brighter:function(t){return new Lt(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Lt(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Pt(this).rgb()}}));var Bt=Tt(R),It=Tt(N),Dt=-.14861,Ft=1.78277,Et=-.29227,Rt=-.90649,zt=1.97294,Nt=zt*Rt,Yt=zt*Ft,Ht=Ft*Et-Rt*Dt;function Gt(t){if(t instanceof Xt)return new Xt(t.h,t.s,t.l,t.opacity);t instanceof S||(t=w(t));var e=t.r/255,i=t.g/255,n=t.b/255,r=(Ht*n+Nt*e-Yt*i)/(Ht+Nt-Yt),a=n-r,o=(zt*(i-r)-Et*a)/Rt,s=Math.sqrt(o*o+a*a)/(zt*r*(1-r)),l=s?Math.atan2(o,a)*yt-120:NaN;return new Xt(l<0?l+360:l,s,r,t.opacity)}function Wt(t,e,i,n){return 1===arguments.length?Gt(t):new Xt(t,e,i,null==n?1:n)}function Xt(t,e,i,n){this.h=+t,this.s=+e,this.l=+i,this.opacity=+n}function Vt(t){return function e(i){function n(e,n){var r=t((e=Wt(e)).h,(n=Wt(n)).h),a=N(e.s,n.s),o=N(e.l,n.l),s=N(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=a(t),e.l=o(Math.pow(t,i)),e.opacity=s(t),e+""}}return i=+i,n.gamma=e,n}(1)}n(Xt,Wt,r(a,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Xt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Xt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*vt,e=+this.l,i=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),r=Math.sin(t);return new S(255*(e+i*(Dt*n+Ft*r)),255*(e+i*(Et*n+Rt*r)),255*(e+i*(zt*n)),this.opacity)}}));var qt=Vt(R),Ut=Vt(N),Zt=function(t,e){for(var i=new Array(e),n=0;n<e;++n)i[n]=t(n/(e-1));return i};i.d(e,"interpolate",(function(){return it})),i.d(e,"interpolateArray",(function(){return Z})),i.d(e,"interpolateBasis",(function(){return I})),i.d(e,"interpolateBasisClosed",(function(){return D})),i.d(e,"interpolateDate",(function(){return Q})),i.d(e,"interpolateNumber",(function(){return $})),i.d(e,"interpolateObject",(function(){return K})),i.d(e,"interpolateRound",(function(){return nt})),i.d(e,"interpolateString",(function(){return et})),i.d(e,"interpolateTransformCss",(function(){return lt})),i.d(e,"interpolateTransformSvg",(function(){return ut})),i.d(e,"interpolateZoom",(function(){return pt})),i.d(e,"interpolateRgb",(function(){return Y})),i.d(e,"interpolateRgbBasis",(function(){return q})),i.d(e,"interpolateRgbBasisClosed",(function(){return U})),i.d(e,"interpolateHsl",(function(){return dt})),i.d(e,"interpolateHslLong",(function(){return gt})),i.d(e,"interpolateLab",(function(){return jt})),i.d(e,"interpolateHcl",(function(){return Bt})),i.d(e,"interpolateHclLong",(function(){return It})),i.d(e,"interpolateCubehelix",(function(){return qt})),i.d(e,"interpolateCubehelixLong",(function(){return Ut})),i.d(e,"quantize",(function(){return Zt}))},function(t,e,i){"use strict";function n(t){return+t}function r(t){return t*t}function a(t){return t*(2-t)}function o(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function s(t){return t*t*t}function l(t){return--t*t*t+1}function u(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}i.r(e);var h=function t(e){function i(t){return Math.pow(t,e)}return e=+e,i.exponent=t,i}(3),c=function t(e){function i(t){return 1-Math.pow(1-t,e)}return e=+e,i.exponent=t,i}(3),p=function t(e){function i(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,i.exponent=t,i}(3),f=Math.PI,d=f/2;function g(t){return 1-Math.cos(t*d)}function v(t){return Math.sin(t*d)}function y(t){return(1-Math.cos(f*t))/2}function m(t){return Math.pow(2,10*t-10)}function x(t){return 1-Math.pow(2,-10*t)}function b(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function _(t){return 1-Math.sqrt(1-t*t)}function w(t){return Math.sqrt(1- --t*t)}function M(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var S=7.5625;function k(t){return 1-O(1-t)}function O(t){return(t=+t)<4/11?S*t*t:t<8/11?S*(t-=6/11)*t+.75:t<10/11?S*(t-=9/11)*t+.9375:S*(t-=21/22)*t+63/64}function C(t){return((t*=2)<=1?1-O(1-t):O(t-1)+1)/2}var A=function t(e){function i(t){return t*t*((e+1)*t-e)}return e=+e,i.overshoot=t,i}(1.70158),L=function t(e){function i(t){return--t*t*((e+1)*t+e)+1}return e=+e,i.overshoot=t,i}(1.70158),P=function t(e){function i(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,i.overshoot=t,i}(1.70158),j=2*Math.PI,T=function t(e,i){var n=Math.asin(1/(e=Math.max(1,e)))*(i/=j);function r(t){return e*Math.pow(2,10*--t)*Math.sin((n-t)/i)}return r.amplitude=function(e){return t(e,i*j)},r.period=function(i){return t(e,i)},r}(1,.3),B=function t(e,i){var n=Math.asin(1/(e=Math.max(1,e)))*(i/=j);function r(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+n)/i)}return r.amplitude=function(e){return t(e,i*j)},r.period=function(i){return t(e,i)},r}(1,.3),I=function t(e,i){var n=Math.asin(1/(e=Math.max(1,e)))*(i/=j);function r(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((n-t)/i):2-e*Math.pow(2,-10*t)*Math.sin((n+t)/i))/2}return r.amplitude=function(e){return t(e,i*j)},r.period=function(i){return t(e,i)},r}(1,.3);i.d(e,"easeLinear",(function(){return n})),i.d(e,"easeQuad",(function(){return o})),i.d(e,"easeQuadIn",(function(){return r})),i.d(e,"easeQuadOut",(function(){return a})),i.d(e,"easeQuadInOut",(function(){return o})),i.d(e,"easeCubic",(function(){return u})),i.d(e,"easeCubicIn",(function(){return s})),i.d(e,"easeCubicOut",(function(){return l})),i.d(e,"easeCubicInOut",(function(){return u})),i.d(e,"easePoly",(function(){return p})),i.d(e,"easePolyIn",(function(){return h})),i.d(e,"easePolyOut",(function(){return c})),i.d(e,"easePolyInOut",(function(){return p})),i.d(e,"easeSin",(function(){return y})),i.d(e,"easeSinIn",(function(){return g})),i.d(e,"easeSinOut",(function(){return v})),i.d(e,"easeSinInOut",(function(){return y})),i.d(e,"easeExp",(function(){return b})),i.d(e,"easeExpIn",(function(){return m})),i.d(e,"easeExpOut",(function(){return x})),i.d(e,"easeExpInOut",(function(){return b})),i.d(e,"easeCircle",(function(){return M})),i.d(e,"easeCircleIn",(function(){return _})),i.d(e,"easeCircleOut",(function(){return w})),i.d(e,"easeCircleInOut",(function(){return M})),i.d(e,"easeBounce",(function(){return O})),i.d(e,"easeBounceIn",(function(){return k})),i.d(e,"easeBounceOut",(function(){return O})),i.d(e,"easeBounceInOut",(function(){return C})),i.d(e,"easeBack",(function(){return P})),i.d(e,"easeBackIn",(function(){return A})),i.d(e,"easeBackOut",(function(){return L})),i.d(e,"easeBackInOut",(function(){return P})),i.d(e,"easeElastic",(function(){return B})),i.d(e,"easeElasticIn",(function(){return T})),i.d(e,"easeElasticOut",(function(){return B})),i.d(e,"easeElasticInOut",(function(){return I}))},function(t,e,i){"use strict";i.r(e);var n,r,a=0,o=0,s=0,l=0,u=0,h=0,c="object"==typeof performance&&performance.now?performance:Date,p="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function f(){return u||(p(d),u=c.now()+h)}function d(){u=0}function g(){this._call=this._time=this._next=null}function v(t,e,i){var n=new g;return n.restart(t,e,i),n}function y(){f(),++a;for(var t,e=n;e;)(t=u-e._time)>=0&&e._call.call(null,t),e=e._next;--a}function m(){u=(l=c.now())+h,a=o=0;try{y()}finally{a=0,function(){for(var t,e,i=n,a=1/0;i;)i._call?(a>i._time&&(a=i._time),t=i,i=i._next):(e=i._next,i._next=null,i=t?t._next=e:n=e);r=t,b(a)}(),u=0}}function x(){var t=c.now(),e=t-l;e>1e3&&(h-=e,l=t)}function b(t){a||(o&&(o=clearTimeout(o)),t-u>24?(t<1/0&&(o=setTimeout(m,t-c.now()-h)),s&&(s=clearInterval(s))):(s||(l=c.now(),s=setInterval(x,1e3)),a=1,p(m)))}g.prototype=v.prototype={constructor:g,restart:function(t,e,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?f():+i)+(null==e?0:+e),this._next||r===this||(r?r._next=this:n=this,r=this),this._call=t,this._time=i,b()},stop:function(){this._call&&(this._call=null,this._time=1/0,b())}};var _=function(t,e,i){var n=new g;return e=null==e?0:+e,n.restart((function(i){n.stop(),t(i+e)}),e,i),n},w=function(t,e,i){var n=new g,r=e;return null==e?(n.restart(t,e,i),n):(e=+e,i=null==i?f():+i,n.restart((function a(o){o+=r,n.restart(a,r+=e,i),t(o)}),e,i),n)};i.d(e,"now",(function(){return f})),i.d(e,"timer",(function(){return v})),i.d(e,"timerFlush",(function(){return y})),i.d(e,"timeout",(function(){return _})),i.d(e,"interval",(function(){return w}))}])}))},2157:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("9ab4"),r=i("f8aa"),a={layout:"horizontal",titleDistance:15,itemDistance:5,itemMarginBottom:8,wordSpacing:8,backgroundPadding:0,unSelectedColor:"#ccc",offsetX:0,offsetY:0},o=function(t){function e(e){return t.call(this,n.__assign(n.__assign({hoverable:!0,clickable:!0,selectedMode:"multiple",allowAllCanceled:!1,reversed:!1,autoWrap:!0},a),e))||this}return n.__extends(e,t),e}(r.default);e.default=o},2183:function(t,e,i){"use strict";e.__esModule=!0;var n=i("8661");function r(t,e){var i=n["default"](t,"width",e);return"auto"===i&&(i=t.offsetWidth),parseFloat(i)}e["default"]=r},"22ca":function(t,e){},"258e":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=20;function r(t,e,i,n,r,a){var o=t,s=e,l=0,u=0,h=20;if(a){var c=a.getBBox();l=c.width,u=c.height,o=c.x,s=c.y,h=5}switch(i){case"inside":o=o+l/2-n/2,s=s+u/2-r/2;break;case"top":o=o+l/2-n/2,s=s-r-h;break;case"left":o=o-n-h,s=s+u/2-r/2;break;case"right":o=o+l+h,s=s+u/2-r/2;break;case"bottom":default:o=o+l/2-n/2,s=s+u+h;break}return[o,s]}function a(t,e,i,r,a,o){var s=t,l=e;return s+i+n>a?(s-=i+n,s=s<0?0:s):s+n<0?s=n:s+=n,l+r+n>o?(l-=r+n,l=l<0?0:l):l+n<0?l=n:l+=n,[s,l]}function o(t,e,i,r,a,o){var s=t,l=e;return s+i>a.tr.x&&(s-=i+2*n),s<a.tl.x&&(s=a.tl.x),o||(l+r>a.bl.y&&(l-=r+2*n),l<a.tl.y&&(l=a.tl.y)),[s,l]}e.defaultPosition=r,e.constraintPositionInBoundary=a,e.constraintPositionInPanel=o},"284c":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("f8aa");e.Legend=n.default;var r=i("9e29");e.Size=r.Size,e.Color=r.Color;var a=i("ea03");e.CanvasCategory=a.CanvasCategory,e.HtmlCategory=a.HtmlCategory},"33a3":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("9ab4"),r=i("1ca4"),a=i("8937"),o=i("f8ac"),s=i("2157"),l=function(t){function e(e){return t.call(this,n.__assign({type:"category-legend"},e))||this}return n.__extends(e,t),e.prototype.init=function(){this.isFlipped=!1;var t=this.get("container");this.set("canvas",t.get("canvas"));var e=t.addGroup();this.set("itemsGroup",e),this.get("flipPage")&&this.set("autoWrap",!0)},e.prototype.renderTitle=function(){var t=this.get("title");if(t){var e=this.get("container"),i=this.get("titleStyle"),r=e.addShape("text",{attrs:n.__assign({x:0,y:0,text:t},i)});r.name="legend-title",this.set("titleShape",r)}},e.prototype.renderItems=function(){var t=this,e=this.get("items");this.get("reversed")&&e.reverse(),a.each(e,(function(e){t._addItem(e)})),this.get("autoWrap")&&this._adjustItems();var i=this._getMaxItemSize(),n=i.maxItemWidth,r=i.maxItemHeight;this.set("maxItemWidth",n),this.set("maxItemHeight",r);var o=this.isNeedFlip();o&&this.flipPage(),this._adjustPositionOffset(),this._renderBack()},e.prototype.isNeedFlip=function(){var t=this.get("maxWidth"),e=this.get("maxItemHeight"),i=this.get("itemsGroup").getBBox(),n=this.get("layout");if(this.get("flipPage")){if("vertical"===n&&t<i.width)return!0;if("horizontal"===n&&e<i.height)return!0}return!1},e.prototype.flipPage=function(){var t=this;this.isFlipped=!0;var e=this.get("maxItemWidth"),i=this.get("maxItemHeight"),n=this.get("maxWidth"),o=this.get("maxHeight"),s=this.get("itemsGroup"),l=s.getBBox(),u=this.get("layout"),h=this._getPaginationCfg(),c=0,p="up-down",f=l.tl.x,d=l.tl.y,g=0,v=new r.Rect({attrs:{x:f,y:d,width:n-h.size,height:o}});if("horizontal"===u){var y=Math.max(n,l.width);if(v.attr("width",y),v.attr("height",i),this.set("maxWidth",y),this.set("maxHeight",i),c=Math.ceil(l.height/(i+this.get("itemMarginBottom"))),f=f+y-h.size,d=Math.ceil(d+i/2),g=i,d-this._getHorizontalPaginationHeight()/2<0){var m=(this.get("offsetY")||0)+this._getHorizontalPaginationHeight()/2-d;this.set("offsetY",m)}}if("vertical"===u){v.attr("width",e);var x=Math.max(o,l.height);v.attr("height",x),this.set("maxWidth",e),this.set("maxHeight",x),c=Math.ceil(l.width/(e+this.get("itemDistance"))),d=d+x+10,p="left-right",g=e}s.attr("clip",v),this.set("clip",v);var b=this.flipPageUI(f,d,g,c,p);this.flipUI=b;var _=1,w=b.arrows[0],M=b.arrows[1];w.on("click",(function(){if(_>1){_-=1,b.text.attr("text",_+" / "+c);var n=a.clone(s.attr("matrix"));if("vertical"===u){var r=t.get("itemDistance")+e;n[6]+=r}else{r=i+t.get("itemMarginBottom");n[7]+=r}s.stopAnimate(),s.animate({matrix:n},100),t.get("canvas").draw()}})),M.on("click",(function(){if(_<c){_+=1,b.text.attr("text",_+" / "+c);var n=a.clone(s.attr("matrix"));if("vertical"===u){var r=t.get("itemDistance")+e;n[6]-=r}else{r=i+t.get("itemMarginBottom");n[7]-=r}s.stopAnimate(),s.animate({matrix:n},100)}}))},e.prototype.flipPageUI=function(t,e,i,n,r){var s,l=this._getPaginationCfg(),u=this.get("container"),h=u.addGroup(),c=[];if("left-right"===r){var p=new o.default(a.mix({},l.arrow,{x:t+l.arrow.width/2,y:e,direction:"left"}));h.add(p.shape),c.push(p.shape);var f=new o.default(a.mix({},l.arrow,{x:t+i-l.arrow.width/2,y:e,direction:"right"}));h.add(f.shape),c.push(f.shape),s=h.addShape("text",{attrs:a.mix({},l.text,{x:t+i/2,y:e,text:"1 / "+n})})}else{var d=this._getHorizontalPaginationHeight(),g=new o.default(a.mix({},l.arrow,{x:t,y:e-d/2+l.arrow.height/2,direction:"up"}));h.add(g.shape),c.push(g.shape);var v=new o.default(a.mix({},l.arrow,{x:t,y:e+d/2-l.arrow.height/2,direction:"down"}));h.add(v.shape),c.push(v.shape),s=h.addShape("text",{attrs:a.mix({},l.text,{x:t,y:e,text:"1 / "+n})})}return{arrows:c,text:s,container:h}},e.prototype._getPaginationCfg=function(){var t={arrow:{x:0,y:0,width:10,height:8,attrs:{fill:"#ccc",cursor:"pointer"},direction:"right"},text:{fontSize:12,fill:"#ccc",textAlign:"center",textBaseline:"middle"},size:40};return t},e.prototype._getHorizontalPaginationHeight=function(){var t=2,e=this._getPaginationCfg();return e.text.fontSize+2*e.arrow.height+2*t},e.prototype.bindEvents=function(){var t=this.get("itemsGroup");this.get("hoverable")&&(t.on("mousemove",a.wrapBehavior(this,"_onMousemove")),t.on("mouseleave",a.wrapBehavior(this,"_onMouseleave"))),this.get("clickable")&&t.on("click",a.wrapBehavior(this,"_onClick"))},e.prototype.clear=function(){var t=this.get("container");t&&!t.destroyed&&t.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this.get("container");e&&!e.destroyed&&(e.get("parent")&&e.remove(),e.destroy())},e.prototype.getCheckedCount=function(){var t=this.get("itemsGroup"),e=t.get("children"),i=a.filter(e,(function(t){return t.get("checked")}));return i.length},e.prototype.getWidth=function(){return this.getBBox().width},e.prototype.getHeight=function(){return this.getBBox().height},e.prototype.getBBox=function(){if(this.isFlipped){var t=this.get("clip"),e=this.flipUI.container;return this._mergeBBox([t.getBBox(),e.getBBox()])}return this.get("container").getBBox()},e.prototype._adjustPositionOffset=function(){var t=this.get("offsetX"),e=this.get("offsetY"),i=this.get("container");i.move(t,e)},e.prototype._addItem=function(t){var e=this.get("itemsGroup"),i=this._getNextX(),n=this._getNextY(),r=this.get("unSelectedColor"),a=e.addGroup({x:i,y:n,value:t.value,checked:t.checked}),o=this.get("textStyle"),s=this.get("wordSpacing"),l=0;if(t.marker){var u=Object.assign({},t.marker,{x:t.marker.radius+i,y:n});t.checked||(u.fill&&(u.fill=r),u.stroke&&(u.stroke=r));var h=a.addShape("marker",{type:"marker",attrs:u});h.attr("cursor","pointer"),h.name="legend-marker",l+=h.getBBox().width+s}var c=Object.assign({},o,{x:l+i,y:n-(t.marker?t.marker.radius/2:0)+o.fontSize/4,text:this.formatterValue(t.value)});t.checked||Object.assign(c,{fill:r});var p=a.addShape("text",{attrs:c});p.attr("cursor","pointer"),p.name="legend-text";var f=a.getBBox(),d=this.get("itemWidth"),g=a.addShape("rect",{attrs:{x:i,y:n-f.height/2,fill:"#fff",fillOpacity:0,width:d||f.width,height:f.height}});return g.attr("cursor","pointer"),g.set("origin",t),g.name="legend-item",a.name="legendGroup",a},e.prototype._getNextX=function(){var t=this.get("layout"),e=this.get("itemDistance"),i=this.get("itemsGroup"),n=this.get("itemWidth"),r=i.get("children"),o=0;return"horizontal"===t&&a.each(r,(function(t){o+=(n||t.getBBox().width)+e})),o},e.prototype._getNextY=function(){var t=this.get("itemMarginBottom"),e=this.get("titleDistance"),i=this.get("layout"),n=this.get("itemsGroup"),r=this.get("titleShape"),o=n.get("children"),s=e;return r&&(s+=r.getBBox().height),"vertical"===i&&a.each(o,(function(e){s+=e.getBBox().height+t})),s},e.prototype._adjustHorizontal=function(){var t,e,i,n=this.flipPage?this._getPaginationCfg().size:0,r=this.get("itemsGroup"),o=r.get("children"),s=this.get("maxWidth")-n,l=this.get("itemDistance"),u=this.get("itemMarginBottom"),h=this.get("titleDistance"),c=0,p=0,f=this.get("itemWidth");r.getBBox().width>s&&a.each(o,(function(n){i=n.getBBox(),t=f||i.width,e=i.height+u,s-p<t&&(c++,p=0),n.move(p,c*e+h),p+=t+l}))},e.prototype._adjustVertical=function(){var t,e,i=this._getMaxItemSize().maxItemWidth,n=this.get("itemsGroup"),r=this.get("titleShape"),o=n.get("children"),s=this.get("maxLength"),l=this.get("itemDistance"),u=this.get("itemMarginBottom"),h=this.get("titleDistance"),c=r?r.getBBox().height+h:0,p=this.get("itemWidth")?this.get("itemWidth"):0,f=c+n.getBBox().height;i=Math.max(i,p)+l;var d=0;f>s&&a.each(o,(function(n,r){e=n.getBBox(),e.width,t=e.height,s-f<t?(f=c,r>0&&(d+=i),n.move(d,c)):n.move(d,f),f+=t+u}))},e.prototype._adjustItems=function(){var t=this.get("layout");"horizontal"===t?this._adjustHorizontal():this._adjustVertical()},e.prototype._renderBack=function(){var t=this.get("container"),e=this.get("backgroundPadding"),i=this.get("backgroundStyle");a.isNumber(e)&&(e=[e,e,e,e]),i&&t.renderBack(e,i)},e.prototype._onMousemove=function(t){var e=this._getLegendItem(t.target);if(e&&e.get("checked")){var i=new r.Event("itemmouseover",t,!0,!0);i.item=this._findItem(e),i.checked=e.get("checked"),this.emit("itemmouseover",i),this.get("canvas").draw()}},e.prototype._onMouseleave=function(t){var e=this._getLegendItem(t.target);if(e&&e.get("checked")){var i=new r.Event("itemmouseleave",t,!0,!0);i.item=this._findItem(e),i.checked=e.get("checked"),this.emit("itemmouseleave",i),this.get("canvas").draw()}},e.prototype._onClick=function(t){var e=this,i=this._getLegendItem(t.target);if(i&&!i.get("destroyed")){var o=i.get("checked");if(!this.get("allowAllCanceled")&&o&&1===this.getCheckedCount())return;var s=this.get("selectedMode"),l=this._findItem(i),u=new r.Event("itemclick",t,!0,!0);u.item=l,u.currentTarget=i,u.checked="single"===s||!o;var h,c,p,f=this.get("unSelectedColor"),d=this.get("textStyle").fill;if("single"===s){var g=this.get("itemsGroup"),v=g.get("children");a.each(v,(function(t){h=e._findShapeByName(t,"legend-marker"),c=e._findShapeByName(t,"legend-text"),p=e._findShapeByName(t,"legend-item"),t!==i?(h.attr("fill")&&h.attr("fill",f),h.attr("stroke")&&h.attr("stroke",f),c.attr("fill",f),h.set("checked",!1),h.set("rawAttrs",n.__assign({},h.get("attrs"))),c.set("checked",!1),p.set("checked",!1),t.set("checked",!1)):(h.attr("fill")&&h.attr("fill",l.marker.fill),h.attr("stroke")&&h.attr("stroke",l.marker.stroke),c.attr("fill",d),h.set("rawAttrs",n.__assign({},h.get("attrs"))),h.set("checked",!0),c.set("checked",!0),p.set("checked",!0),t.set("checked",!0))}))}else h=this._findShapeByName(i,"legend-marker"),c=this._findShapeByName(i,"legend-text"),p=this._findShapeByName(i,"legend-item"),h.attr("fill")&&h.attr("fill",o?f:l.marker.fill),h.attr("stroke")&&h.attr("stroke",o?f:l.marker.stroke),c.attr("fill",o?f:d),i.set("checked",!o),h.set("checked",!o),c.set("checked",!o),p.set("checked",!o);this.emit("itemclick",u),this.get("canvas").draw()}},e.prototype._getLegendItem=function(t){var e=t.get("parent");return e&&"legendGroup"===e.name?e:null},e.prototype._findItem=function(t){var e=this.get("items"),i=null,n=t instanceof r.Group?t.get("value"):t;return a.each(e,(function(t){if(t.value===n)return i=t,!1})),i},e.prototype._findShapeByName=function(t,e){return t.findBy((function(t){return t.name===e}))},e.prototype._getMaxItemSize=function(){var t=-1/0,e=-1/0,i=this.get("itemsGroup"),n=i.get("children");return a.each(n,(function(i){var n=i,r=n.getBBox();t<r.width&&(t=r.width),e<r.height&&(e=r.height)})),{maxItemWidth:t,maxItemHeight:e}},e.prototype._mergeBBox=function(t){var e=1/0,i=-1/0,n=1/0,o=-1/0;return a.each(t,(function(t){var r=t;e=Math.min(r.minX,e),i=Math.max(r.maxX,i),n=Math.min(r.minY,n),o=Math.max(r.maxY,o)})),new r.BBox(e,n,i-e,o-n)},e}(s.default);e.default=l},3753:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=Math.PI/180,r=function(t){return n*t};e.default=r},"381b":function(t,e,i){"use strict";var n,r,a,o;function s(){n=document.createElement("table"),r=document.createElement("tr"),a=/^\s*<(\w+|!)[^>]*>/,o={tr:document.createElement("tbody"),tbody:n,thead:n,tfoot:n,td:r,th:r,"*":document.createElement("div")}}function l(t){n||s();var e=a.test(t)&&RegExp.$1;e&&e in o||(e="*");var i=o[e];t=t.replace(/(^\s*)|(\s*$)/g,""),i.innerHTML=""+t;var r=i.childNodes[0];return i.removeChild(r),r}e.__esModule=!0,e["default"]=l},"3e28":function(t,e,i){"use strict";function n(t,e,i){if(t){if("function"===typeof t.addEventListener)return t.addEventListener(e,i,!1),{remove:function(){t.removeEventListener(e,i,!1)}};if("function"===typeof t.attachEvent)return t.attachEvent("on"+e,i),{remove:function(){t.detachEvent("on"+e,i)}}}}e.__esModule=!0,e["default"]=n},"4d8e":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("9ab4"),r=i("8937"),a=i("1ca4"),o=i("e945"),s=i("9e26"),l=i("907a"),u=function(t){function e(e){return t.call(this,n.__assign({type:"color-legend"},e))||this}return n.__extends(e,t),e.prototype.calculatePercent=function(t){var e=r.head(t).value,i=r.last(t).value,a=i-e;return r.map(t,(function(t){return n.__assign(n.__assign({},t),{percentage:(Number(t.value)-e)/a})}))},e.prototype.isSegment=function(){return!!this.get("isSegment")},e.prototype.getOperationalGroup=function(){var t,e=this.get("width"),i=this.get("height"),s=this.calculatePercent(this.get("items")),l=this.get("backgroundStyle"),u="";this.isHorizontal()?(u+="l (0) ",r.each(s,(function(e){t=o.default.toRGB(e.color),u+=e.percentage+":"+t+" "}))):(u+="l (90) ",r.each(s,(function(e){t=o.default.toRGB(e.color),u+=1-e.percentage+":"+t+" "})));var h=new a.Rect({attrs:n.__assign({x:0,y:0,width:e,height:i,strokeOpacity:0},l)}),c=new a.Rect({attrs:{x:0,y:0,width:e,height:i,fill:u,strokeOpacity:0}}),p=new a.Group;return this.isOperational()?(p.add(h),p.add(c)):p.add(c),{group:p,background:h,frontend:c}},e.prototype.getUnOperationalGroup=function(){var t,e=this,i=this.get("width"),s=this.get("height"),u=this.calculatePercent(this.get("items")),h=this.get("textStyle"),c=new a.Group,p="",f=[],d=u.length;this.isHorizontal()?(p+="l (0) ",r.each(u,(function(r,a){if(0!==a&&a!==d-1&&(f.push(["M",r.percentage*i,0]),f.push(["L",r.percentage*i,s])),t=o.default.toRGB(u[a].color),e.isSegment()&&a>0){var g=o.default.toRGB(u[a-1].color);p+=r.percentage+":"+g+" "}p+=r.percentage+":"+t+" ",c.addShape("text",{attrs:n.__assign(n.__assign({x:r.percentage*i,y:s+l.TEXT_OFFSET,text:""+e.formatterValue(r.value)},h),{textBaseline:"top",textAlign:"center"})})}))):(p+="l (90) ",r.each(u,(function(r,a){if(0!==a&&a!==d-1&&(f.push(["M",0,s-r.percentage*s]),f.push(["L",i,s-r.percentage*s])),t=o.default.toRGB(u[a].color),p+=1-r.percentage+":"+t+" ",e.isSegment()&&a>0){var g=o.default.toRGB(u[a-1].color);p+=1-r.percentage+":"+g+" "}c.addShape("text",{attrs:n.__assign(n.__assign({x:i+l.TEXT_OFFSET,y:(1-r.percentage)*s,text:""+e.formatterValue(r.value)},h),{textAlign:"start",textBaseline:"middle"})})})));var g=c.addShape("rect",{attrs:{x:0,y:0,width:i,height:s,fill:p,strokeOpacity:0}});return c.addShape("path",{attrs:{path:f,lineWidth:1,stroke:"#fff"}}),{group:c,background:g,frontend:void 0}},e.prototype.createBackgroundGroup=function(){return this.isOperational()?this.getOperationalGroup():this.getUnOperationalGroup()},e}(s.default);e.default=u},5830:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.sqrDist=e.dist=e.div=e.mul=e.sub=e.len=void 0,e.create=o,e.clone=s,e.fromValues=l,e.copy=u,e.set=h,e.add=c,e.subtract=p,e.multiply=f,e.divide=d,e.ceil=g,e.floor=v,e.min=y,e.max=m,e.round=x,e.scale=b,e.scaleAndAdd=_,e.distance=w,e.squaredDistance=M,e.length=S,e.squaredLength=k,e.negate=O,e.inverse=C,e.normalize=A,e.dot=L,e.cross=P,e.lerp=j,e.random=T,e.transformMat2=B,e.transformMat2d=I,e.transformMat3=D,e.transformMat4=F,e.rotate=E,e.angle=R,e.str=z,e.exactEquals=N,e.equals=Y;var n=i("8d60"),r=a(n);function a(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function o(){var t=new r.ARRAY_TYPE(2);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0),t}function s(t){var e=new r.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e}function l(t,e){var i=new r.ARRAY_TYPE(2);return i[0]=t,i[1]=e,i}function u(t,e){return t[0]=e[0],t[1]=e[1],t}function h(t,e,i){return t[0]=e,t[1]=i,t}function c(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function p(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function f(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t}function d(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t}function g(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t}function v(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t}function y(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function m(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}function x(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function b(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function _(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function w(t,e){var i=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(i*i+n*n)}function M(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function S(t){var e=t[0],i=t[1];return Math.sqrt(e*e+i*i)}function k(t){var e=t[0],i=t[1];return e*e+i*i}function O(t,e){return t[0]=-e[0],t[1]=-e[1],t}function C(t,e){return t[0]=1/e[0],t[1]=1/e[1],t}function A(t,e){var i=e[0],n=e[1],r=i*i+n*n;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t}function L(t,e){return t[0]*e[0]+t[1]*e[1]}function P(t,e,i){var n=e[0]*i[1]-e[1]*i[0];return t[0]=t[1]=0,t[2]=n,t}function j(t,e,i,n){var r=e[0],a=e[1];return t[0]=r+n*(i[0]-r),t[1]=a+n*(i[1]-a),t}function T(t,e){e=e||1;var i=2*r.RANDOM()*Math.PI;return t[0]=Math.cos(i)*e,t[1]=Math.sin(i)*e,t}function B(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r,t[1]=i[1]*n+i[3]*r,t}function I(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[2]*r+i[4],t[1]=i[1]*n+i[3]*r+i[5],t}function D(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[3]*r+i[6],t[1]=i[1]*n+i[4]*r+i[7],t}function F(t,e,i){var n=e[0],r=e[1];return t[0]=i[0]*n+i[4]*r+i[12],t[1]=i[1]*n+i[5]*r+i[13],t}function E(t,e,i,n){var r=e[0]-i[0],a=e[1]-i[1],o=Math.sin(n),s=Math.cos(n);return t[0]=r*s-a*o+i[0],t[1]=r*o+a*s+i[1],t}function R(t,e){var i=t[0],n=t[1],r=e[0],a=e[1],o=i*i+n*n;o>0&&(o=1/Math.sqrt(o));var s=r*r+a*a;s>0&&(s=1/Math.sqrt(s));var l=(i*r+n*a)*o*s;return l>1?0:l<-1?Math.PI:Math.acos(l)}function z(t){return"vec2("+t[0]+", "+t[1]+")"}function N(t,e){return t[0]===e[0]&&t[1]===e[1]}function Y(t,e){var i=t[0],n=t[1],a=e[0],o=e[1];return Math.abs(i-a)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(n-o)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))}e.len=S,e.sub=p,e.mul=f,e.div=d,e.dist=w,e.sqrDist=M,e.sqrLen=k,e.forEach=function(){var t=o();return function(e,i,n,r,a,o){var s=void 0,l=void 0;for(i||(i=2),n||(n=0),l=r?Math.min(r*i+n,e.length):e.length,s=n;s<l;s+=i)t[0]=e[s],t[1]=e[s+1],a(t,t,o),e[s]=t[0],e[s+1]=t[1];return e}}()},"5977a":function(t,e){},"5b8d":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t){return null!==t&&"function"!==typeof t&&isFinite(t.length)};e.default=n},"61d8":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("bd8b");e.default=function(t){return n.default(t,"String")}},"6c60":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("9ab4"),r=i("1ca4"),a=i("9c7a"),o=i("907a"),s=function(t){function e(e){var i=t.call(this)||this;i.onMouseMove=function(t){var e=t.clientX,n=t.clientY;i.updateSliderStatus(e,n)},i.onMouseUp=function(){i.clearAllEvents&&i.clearAllEvents(),i.currentTarget=void 0};var n=e.layout,r=e.sliderType,a=e.sliderSize,s=e.operational,l=e.width,u=e.height,h=e.textStyle,c=e.min,p=e.max,f=e.range,d=e.formatter;i.layout=n,i.sliderType=r;var g=a||[],v=g[0],y=void 0===v?o.SLIDER_WIDTH:v,m=g[1],x=void 0===m?o.SLIDER_HEIGHT:m;return i.sliderSize=[y,x],i.operational=s,i.width=l,i.height=u,i.min=c,i.max=p,i.range=f,i.textStyle=h,i.formatter=d,i.initialSlider(),i}return n.__extends(e,t),e.prototype.setBackground=function(t){this.backgroundGroup&&this.backgroundGroup.destroy();var e=t.group,i=(t.background,t.frontend);this.backgroundGroup=e,this.backgroundGroup.set("zIndex",0),this.operational&&this.rangeSliderShape&&i&&i.attr("clip",this.rangeSliderShape),this.add(this.backgroundGroup),this.sort()},e.prototype.isHorizontal=function(){return"horizontal"===this.layout},e.prototype.initialSlider=function(){if(this.operational){this.rangeSliderShape=this.createRangeSliderShape(),this.rangeSliderShape.set("zIndex",1),this.minSliderGroup=this.createMinSliderGroup(),this.minSliderGroup.set("zIndex",2),this.maxSliderGroup=this.createMaxSliderGroup(),this.maxSliderGroup.set("zIndex",2);var t=this.range,e=t[0],i=t[1];this.renderUIWithRange(e,i)}this.bindEvent()},e.prototype.getSliderCursor=function(){return this.isHorizontal()?"ew-resize":"ns-resize"},e.prototype.createMinSliderGroup=function(){var t=this.addGroup();return this.minSliderShape=this.createSliderButton(t,!0),this.minTextShape=this.createSliderText(t,!0),t},e.prototype.createMaxSliderGroup=function(){var t=this.addGroup();return this.maxSliderShape=this.createSliderButton(t,!1),this.maxTextShape=this.createSliderText(t,!1),t},e.prototype.createRangeSliderShape=function(){return this.addShape("rect",{attrs:{fill:"#fff",fillOpacity:0,cursor:"move"}})},e.prototype.getRectButtonAttribute=function(t){var e=this.sliderSize,i=e[0],n=e[1];return this.isHorizontal()?{x:t?-i:0,y:this.height/2-n/2,width:i,height:n}:{x:this.width/2-n/2,y:t?0:-i,width:n,height:i}},e.prototype.getCircleButtonAttribute=function(t){return this.isHorizontal()?{x:0,y:this.height/2,r:o.SLIDER_CIRCLE_MAX_SIZE/2}:{x:this.width/2,y:0,r:o.SLIDER_CIRCLE_MAX_SIZE/2}},e.prototype.createSliderButton=function(t,e){var i="rect"===this.sliderType?this.getRectButtonAttribute(e):"circle"===this.sliderType?this.getCircleButtonAttribute(e):{},r=n.__assign(n.__assign(n.__assign({},i),o.SliderBtnStyle),{cursor:this.getSliderCursor()});return t.addShape(this.sliderType,{attrs:r})},e.prototype.getRectTextAttribute=function(t){var e=this.sliderSize,i=e[0],n=e[1];return this.isHorizontal()?{x:t?-i/2:i/2,y:this.height/2+n/2+4,textAlign:"center",textBaseline:"top"}:{x:this.width/2+n/2+4,y:t?i/2:-i/2,textAlign:"left",textBaseline:"middle"}},e.prototype.getCircleTextAttribute=function(t){return this.isHorizontal()?{x:0,y:this.height/2+o.SLIDER_CIRCLE_MAX_SIZE/2+4,textAlign:"center",textBaseline:"top"}:{x:this.width/2+o.SLIDER_CIRCLE_MAX_SIZE/2+4,y:0,textAlign:"left",textBaseline:"middle"}},e.prototype.createSliderText=function(t,e){var i="rect"===this.sliderType?this.getRectTextAttribute(e):"circle"===this.sliderType?this.getCircleTextAttribute(e):{},r=n.__assign(n.__assign(n.__assign({},this.textStyle),i),{text:""});return t.addShape("text",{attrs:r})},e.prototype.bindEvent=function(){this.operational&&this.on("mousedown",this.onMouseDown)},e.prototype.onMouseDown=function(t){this.currentTarget=t.target;var e=t.event;e.stopPropagation(),e.preventDefault();var i=e.clientX,n=e.clientY;this.pos=this.isHorizontal()?i:n,this.bindCanvasEvents()},e.prototype.bindCanvasEvents=function(){var t=this.get("canvas").get("containerDOM"),e=a.addEventListener(t,"mousemove",this.onMouseMove),i=a.addEventListener(t,"mouseup",this.onMouseUp),n=a.addEventListener(t,"mouseleave",this.onMouseUp);this.clearAllEvents=function(){e.remove(),i.remove(),n.remove()}},e.prototype.isDragMin=function(){return this.currentTarget===this.minSliderShape},e.prototype.isDragMax=function(){return this.currentTarget===this.maxSliderShape},e.prototype.isDragAll=function(){return this.currentTarget===this.rangeSliderShape},e.prototype.updateSliderStatus=function(t,e){var i=this,n=this.isHorizontal()?this.width:this.height,r=this.isHorizontal()?1:-1,a=this.range,o=a[0],s=a[1],l=this.pos,u=this.isHorizontal()?t:e,h=u-l,c=h/n*r,p=[o,s];this.isDragAll()?p=c>=0&&s+c>1?[o+(1-s),1]:c<0&&o+c<0?[0,s-o]:[o+c,s+c]:(this.isDragMin()&&(p[0]=this.getNewRange(o,c)),this.isDragMax()&&(p[1]=this.getNewRange(s,c)),p[1]<p[0]&&(p=Array(2).fill(this.isDragMin()?p[0]:p[1]))),this.pos=u,this.range=p,this.emit("sliderchange",{range:p,value:p.map((function(t){return i.getValue(t)}))}),this.renderUIWithRange(p[0],p[1]),this.get("canvas").draw()},e.prototype.renderUIWithRange=function(t,e){var i=this.width,n=this.height;this.minSliderGroup.resetMatrix(),this.maxSliderGroup.resetMatrix(),this.isHorizontal()?(this.rangeSliderShape.attr({x:i*t,y:0,width:(e-t)*i,height:n}),this.minSliderGroup.translate(t*i,0),this.maxSliderGroup.translate(e*i,0)):(this.rangeSliderShape.attr({x:0,y:n*(1-e),width:i,height:(e-t)*n}),this.minSliderGroup.translate(0,(1-t)*n),this.maxSliderGroup.translate(0,(1-e)*n)),this.minTextShape.attr("text",this.formatter(this.getValue(t))),this.maxTextShape.attr("text",this.formatter(this.getValue(e))),"circle"===this.sliderType&&(this.minSliderShape.attr({r:(o.SLIDER_HEIGHT+t*(o.SLIDER_CIRCLE_MAX_SIZE-o.SLIDER_HEIGHT))/2}),this.maxSliderShape.attr({r:(o.SLIDER_HEIGHT+e*(o.SLIDER_CIRCLE_MAX_SIZE-o.SLIDER_HEIGHT))/2}))},e.prototype.getNewRange=function(t,e){var i=e+t;return i>1?1:i<0?0:i},e.prototype.getValue=function(t){var e=this.min+(this.max-this.min)*t;return Number(e.toFixed(e>1?0:2))},e}(r.Group);e.default=s},"6c7f":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sub=e.mul=void 0,e.create=o,e.fromMat4=s,e.clone=l,e.copy=u,e.fromValues=h,e.set=c,e.identity=p,e.transpose=f,e.invert=d,e.adjoint=g,e.determinant=v,e.multiply=y,e.translate=m,e.rotate=x,e.scale=b,e.fromTranslation=_,e.fromRotation=w,e.fromScaling=M,e.fromMat2d=S,e.fromQuat=k,e.normalFromMat4=O,e.projection=C,e.str=A,e.frob=L,e.add=P,e.subtract=j,e.multiplyScalar=T,e.multiplyScalarAndAdd=B,e.exactEquals=I,e.equals=D;var n=i("8d60"),r=a(n);function a(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function o(){var t=new r.ARRAY_TYPE(9);return r.ARRAY_TYPE!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function l(t){var e=new r.ARRAY_TYPE(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function u(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function h(t,e,i,n,a,o,s,l,u){var h=new r.ARRAY_TYPE(9);return h[0]=t,h[1]=e,h[2]=i,h[3]=n,h[4]=a,h[5]=o,h[6]=s,h[7]=l,h[8]=u,h}function c(t,e,i,n,r,a,o,s,l,u){return t[0]=e,t[1]=i,t[2]=n,t[3]=r,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=u,t}function p(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function f(t,e){if(t===e){var i=e[1],n=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=i,t[5]=e[7],t[6]=n,t[7]=r}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function d(t,e){var i=e[0],n=e[1],r=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],h=e[8],c=h*o-s*u,p=-h*a+s*l,f=u*a-o*l,d=i*c+n*p+r*f;return d?(d=1/d,t[0]=c*d,t[1]=(-h*n+r*u)*d,t[2]=(s*n-r*o)*d,t[3]=p*d,t[4]=(h*i-r*l)*d,t[5]=(-s*i+r*a)*d,t[6]=f*d,t[7]=(-u*i+n*l)*d,t[8]=(o*i-n*a)*d,t):null}function g(t,e){var i=e[0],n=e[1],r=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],h=e[8];return t[0]=o*h-s*u,t[1]=r*u-n*h,t[2]=n*s-r*o,t[3]=s*l-a*h,t[4]=i*h-r*l,t[5]=r*a-i*s,t[6]=a*u-o*l,t[7]=n*l-i*u,t[8]=i*o-n*a,t}function v(t){var e=t[0],i=t[1],n=t[2],r=t[3],a=t[4],o=t[5],s=t[6],l=t[7],u=t[8];return e*(u*a-o*l)+i*(-u*r+o*s)+n*(l*r-a*s)}function y(t,e,i){var n=e[0],r=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],h=e[7],c=e[8],p=i[0],f=i[1],d=i[2],g=i[3],v=i[4],y=i[5],m=i[6],x=i[7],b=i[8];return t[0]=p*n+f*o+d*u,t[1]=p*r+f*s+d*h,t[2]=p*a+f*l+d*c,t[3]=g*n+v*o+y*u,t[4]=g*r+v*s+y*h,t[5]=g*a+v*l+y*c,t[6]=m*n+x*o+b*u,t[7]=m*r+x*s+b*h,t[8]=m*a+x*l+b*c,t}function m(t,e,i){var n=e[0],r=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],h=e[7],c=e[8],p=i[0],f=i[1];return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=p*n+f*o+u,t[7]=p*r+f*s+h,t[8]=p*a+f*l+c,t}function x(t,e,i){var n=e[0],r=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],h=e[7],c=e[8],p=Math.sin(i),f=Math.cos(i);return t[0]=f*n+p*o,t[1]=f*r+p*s,t[2]=f*a+p*l,t[3]=f*o-p*n,t[4]=f*s-p*r,t[5]=f*l-p*a,t[6]=u,t[7]=h,t[8]=c,t}function b(t,e,i){var n=i[0],r=i[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function _(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t}function w(t,e){var i=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=i,t[2]=0,t[3]=-i,t[4]=n,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function M(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t}function k(t,e){var i=e[0],n=e[1],r=e[2],a=e[3],o=i+i,s=n+n,l=r+r,u=i*o,h=n*o,c=n*s,p=r*o,f=r*s,d=r*l,g=a*o,v=a*s,y=a*l;return t[0]=1-c-d,t[3]=h-y,t[6]=p+v,t[1]=h+y,t[4]=1-u-d,t[7]=f-g,t[2]=p-v,t[5]=f+g,t[8]=1-u-c,t}function O(t,e){var i=e[0],n=e[1],r=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],h=e[8],c=e[9],p=e[10],f=e[11],d=e[12],g=e[13],v=e[14],y=e[15],m=i*s-n*o,x=i*l-r*o,b=i*u-a*o,_=n*l-r*s,w=n*u-a*s,M=r*u-a*l,S=h*g-c*d,k=h*v-p*d,O=h*y-f*d,C=c*v-p*g,A=c*y-f*g,L=p*y-f*v,P=m*L-x*A+b*C+_*O-w*k+M*S;return P?(P=1/P,t[0]=(s*L-l*A+u*C)*P,t[1]=(l*O-o*L-u*k)*P,t[2]=(o*A-s*O+u*S)*P,t[3]=(r*A-n*L-a*C)*P,t[4]=(i*L-r*O+a*k)*P,t[5]=(n*O-i*A-a*S)*P,t[6]=(g*M-v*w+y*_)*P,t[7]=(v*b-d*M-y*x)*P,t[8]=(d*w-g*b+y*m)*P,t):null}function C(t,e,i){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/i,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function A(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function L(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))}function P(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t[3]=e[3]+i[3],t[4]=e[4]+i[4],t[5]=e[5]+i[5],t[6]=e[6]+i[6],t[7]=e[7]+i[7],t[8]=e[8]+i[8],t}function j(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t[3]=e[3]-i[3],t[4]=e[4]-i[4],t[5]=e[5]-i[5],t[6]=e[6]-i[6],t[7]=e[7]-i[7],t[8]=e[8]-i[8],t}function T(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*i,t}function B(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t[2]=e[2]+i[2]*n,t[3]=e[3]+i[3]*n,t[4]=e[4]+i[4]*n,t[5]=e[5]+i[5]*n,t[6]=e[6]+i[6]*n,t[7]=e[7]+i[7]*n,t[8]=e[8]+i[8]*n,t}function I(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]}function D(t,e){var i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],h=t[7],c=t[8],p=e[0],f=e[1],d=e[2],g=e[3],v=e[4],y=e[5],m=e[6],x=e[7],b=e[8];return Math.abs(i-p)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(n-f)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(a-d)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(o-g)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(s-v)<=r.EPSILON*Math.max(1,Math.abs(s),Math.abs(v))&&Math.abs(l-y)<=r.EPSILON*Math.max(1,Math.abs(l),Math.abs(y))&&Math.abs(u-m)<=r.EPSILON*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(h-x)<=r.EPSILON*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(c-b)<=r.EPSILON*Math.max(1,Math.abs(c),Math.abs(b))}e.mul=y,e.sub=j},"6dd8":function(t,e,i){"use strict";(function(t){var i=function(){if("undefined"!==typeof Map)return Map;function t(t,e){var i=-1;return t.some((function(t,n){return t[0]===e&&(i=n,!0)})),i}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var i=t(this.__entries__,e),n=this.__entries__[i];return n&&n[1]},e.prototype.set=function(e,i){var n=t(this.__entries__,e);~n?this.__entries__[n][1]=i:this.__entries__.push([e,i])},e.prototype.delete=function(e){var i=this.__entries__,n=t(i,e);~n&&i.splice(n,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var i=0,n=this.__entries__;i<n.length;i++){var r=n[i];t.call(e,r[1],r[0])}},e}()}(),n="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,r=function(){return"undefined"!==typeof t&&t.Math===Math?t:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")()}(),a=function(){return"function"===typeof requestAnimationFrame?requestAnimationFrame.bind(r):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)}}(),o=2;function s(t,e){var i=!1,n=!1,r=0;function s(){i&&(i=!1,t()),n&&u()}function l(){a(s)}function u(){var t=Date.now();if(i){if(t-r<o)return;n=!0}else i=!0,n=!1,setTimeout(l,e);r=t}return u}var l=20,u=["top","right","bottom","left","width","height","size","weight"],h="undefined"!==typeof MutationObserver,c=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=s(this.refresh.bind(this),l)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,i=e.indexOf(t);~i&&e.splice(i,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),h?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,i=void 0===e?"":e,n=u.some((function(t){return!!~i.indexOf(t)}));n&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),p=function(t,e){for(var i=0,n=Object.keys(e);i<n.length;i++){var r=n[i];Object.defineProperty(t,r,{value:e[r],enumerable:!1,writable:!1,configurable:!0})}return t},f=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||r},d=S(0,0,0,0);function g(t){return parseFloat(t)||0}function v(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.reduce((function(e,i){var n=t["border-"+i+"-width"];return e+g(n)}),0)}function y(t){for(var e=["top","right","bottom","left"],i={},n=0,r=e;n<r.length;n++){var a=r[n],o=t["padding-"+a];i[a]=g(o)}return i}function m(t){var e=t.getBBox();return S(0,0,e.width,e.height)}function x(t){var e=t.clientWidth,i=t.clientHeight;if(!e&&!i)return d;var n=f(t).getComputedStyle(t),r=y(n),a=r.left+r.right,o=r.top+r.bottom,s=g(n.width),l=g(n.height);if("border-box"===n.boxSizing&&(Math.round(s+a)!==e&&(s-=v(n,"left","right")+a),Math.round(l+o)!==i&&(l-=v(n,"top","bottom")+o)),!_(t)){var u=Math.round(s+a)-e,h=Math.round(l+o)-i;1!==Math.abs(u)&&(s-=u),1!==Math.abs(h)&&(l-=h)}return S(r.left,r.top,s,l)}var b=function(){return"undefined"!==typeof SVGGraphicsElement?function(t){return t instanceof f(t).SVGGraphicsElement}:function(t){return t instanceof f(t).SVGElement&&"function"===typeof t.getBBox}}();function _(t){return t===f(t).document.documentElement}function w(t){return n?b(t)?m(t):x(t):d}function M(t){var e=t.x,i=t.y,n=t.width,r=t.height,a="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,o=Object.create(a.prototype);return p(o,{x:e,y:i,width:n,height:r,top:i,right:e+n,bottom:r+i,left:e}),o}function S(t,e,i,n){return{x:t,y:e,width:i,height:n}}var k=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=S(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=w(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),O=function(){function t(t,e){var i=M(e);p(this,{target:t,contentRect:i})}return t}(),C=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new i,"function"!==typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(t instanceof f(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new k(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(t instanceof f(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new O(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),A="undefined"!==typeof WeakMap?new WeakMap:new i,L=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=c.getInstance(),n=new C(e,i,this);A.set(this,n)}return t}();["observe","unobserve","disconnect"].forEach((function(t){L.prototype[t]=function(){var e;return(e=A.get(this))[t].apply(e,arguments)}}));var P=function(){return"undefined"!==typeof r.ResizeObserver?r.ResizeObserver:L}();e["a"]=P}).call(this,i("c8ba"))},"72fb":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("01f97"),r=i("9ab4f");function a(t,e){var i;if(t)if(n.default(t)){for(var a=0,o=t.length;a<o;a++)if(i=e(t[a],a),!1===i)break}else if(r.default(t))for(var s in t)if(t.hasOwnProperty(s)&&(i=e(t[s],s),!1===i))break}e.default=a},"754d":function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0});var r=i("d9c7"),a="g2-tooltip",o="g2-tooltip-title",s="g2-tooltip-list",l="g2-tooltip-list-item",u="g2-tooltip-marker",h="g2-tooltip-value";e.default=(n={},n[""+a]={position:"absolute",display:"none",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:r.FONT_FAMILY,lineHeight:"20px",padding:"10px 10px 6px 10px"},n[""+o]={marginBottom:"4px"},n[""+s]={margin:0,listStyleType:"none",padding:0},n[""+l]={marginBottom:"4px"},n[""+u]={width:"5px",height:"5px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},n[""+h]={display:"inline-block",float:"right",marginLeft:"30px"},n)},8661:function(t,e,i){"use strict";function n(t,e,i){var n;try{n=window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.style[e]}catch(r){}finally{n=void 0===n?i:n}return n}e.__esModule=!0,e["default"]=n},8937:function(t,e,i){"use strict";i.r(e);var n=function(t){return null!==t&&"function"!==typeof t&&isFinite(t.length)},r=n,a=function(t,e){return!!r(t)&&t.indexOf(e)>-1},o=a,s={}.toString,l=function(t,e){return s.call(t)==="[object "+e+"]"},u=l,h=function(t){return Array.isArray?Array.isArray(t):u(t,"Array")},c=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e};function p(t,e){var i;if(t)if(h(t)){for(var n=0,r=t.length;n<r;n++)if(i=e(t[n],n),!1===i)break}else if(c(t))for(var a in t)if(t.hasOwnProperty(a)&&(i=e(t[a],a),!1===i))break}var f=p,d=function(t,e){if(!r(t))return t;var i=[];return f(t,(function(t,n){e(t,n)&&i.push(t)})),i},g=d,v=function(t,e){return void 0===e&&(e=[]),g(t,(function(t){return!o(e,t)}))},y=v,m=function(t){return u(t,"Function")},x=function(t){return null===t||void 0===t},b=x,_=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return f(t,(function(i,n){m(t)&&"prototype"===n||e.push(n)})),e},w=_;function M(t,e){var i=w(e),n=i.length;if(b(t))return!n;for(var r=0;r<n;r+=1){var a=i[r];if(e[a]!==t[a]||!(a in t))return!1}return!0}var S=M,k=function(t){return"object"===typeof t&&null!==t},O=k,C=function(t){if(!O(t)||!u(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;var e=t;while(null!==Object.getPrototypeOf(e))e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},A=C;function L(t,e){if(!h(t))return null;var i;if(m(e)&&(i=e),A(e)&&(i=function(t){return S(t,e)}),i)for(var n=0;n<t.length;n+=1)if(i(t[n]))return t[n];return null}var P=L;function j(t,e,i){void 0===i&&(i=0);for(var n=i;n<t.length;n++)if(e(t[n],n))return n;return-1}var T=j,B=function(t,e){for(var i=null,n=0;n<t.length;n++){var r=t[n],a=r[e];if(!b(a)){i=h(a)?a[0]:a;break}}return i},I=B,D=function(t){if(!h(t))return[];for(var e=[],i=0;i<t.length;i++)e=e.concat(t[i]);return e},F=D,E=function(t,e){if(void 0===e&&(e=[]),h(t))for(var i=0;i<t.length;i+=1)E(t[i],e);else e.push(t);return e},R=E,z=function(t){if(t=g(t,(function(t){return!isNaN(t)})),!t.length)return{min:0,max:0};if(h(t[0])){for(var e=[],i=0;i<t.length;i++)e=e.concat(t[i]);t=e}var n=Math.max.apply(null,t),r=Math.min.apply(null,t);return{min:r,max:n}},N=z,Y=Array.prototype,H=Y.splice,G=Y.indexOf,W=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];for(var n=0;n<e.length;n++){var r=e[n],a=-1;while((a=G.call(t,r))>-1)H.call(t,a,1)}return t},X=W,V=Array.prototype.splice,q=function(t,e){if(!r(t))return[];var i=t?e.length:0,n=i-1;while(i--){var a=void 0,o=e[i];i!==n&&o===a||(a=o,V.call(t,o,1))}return t},U=q,Z=function(t,e,i){if(!h(t)&&!A(t))return t;var n=i;return f(t,(function(t,i){n=e(n,t,i)})),n},Q=Z,$=function(t,e){var i=[];if(!r(t))return i;var n=-1,a=[],o=t.length;while(++n<o){var s=t[n];e(s,n,t)&&(i.push(s),a.push(n))}return U(t,a),i},K=$,J=function(t){return u(t,"String")};function tt(t,e){var i;if(m(e))i=function(t,i){return e(t)-e(i)};else{var n=[];J(e)?n.push(e):h(e)&&(n=e),i=function(t,e){for(var i=0;i<n.length;i+=1){var r=n[i];if(t[r]>e[r])return 1;if(t[r]<e[r])return-1}return 0}}return t.sort(i),t}var et=tt,it=function(t){var e=[];return f(t,(function(t){o(e,t)||e.push(t)})),e},nt=it,rt=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return nt([].concat.apply([],t))},at=rt,ot=function(t,e){var i=[],n={};return t.forEach((function(t){var r=t[e];b(r)||(h(r)||(r=[r]),f(r,(function(t){n[t]||(i.push(t),n[t]=!0)})))})),i};function st(t){if(r(t))return t[0]}function lt(t){if(r(t)){var e=t;return e[e.length-1]}}function ut(t,e){return!(!h(t)&&!J(t))&&t[0]===e}var ht=ut;function ct(t,e){return!(!h(t)&&!J(t))&&t[t.length-1]===e}var pt=ct,ft=function(t,e){for(var i=0;i<t.length;i++)if(!e(t[i],i))return!1;return!0},dt=ft,gt=function(t,e){for(var i=0;i<t.length;i++)if(e(t[i],i))return!0;return!1},vt=gt,yt=Object.prototype.hasOwnProperty;function mt(t,e){if(!e||!h(t))return{};var i,n={},r=m(e)?e:function(t){return t[e]};return f(t,(function(t){i=r(t),yt.call(n,i)?n[i].push(t):n[i]=[t]})),n}var xt=mt,bt=function(t,e){if(!e)return{0:t};if(!m(e)){var i=h(e)?e:e.replace(/\s+/g,"").split("*");e=function(t){for(var e="_",n=0,r=i.length;n<r;n++)e+=t[i[n]]&&t[i[n]].toString();return e}}var n=xt(t,e);return n},_t=bt,wt=function(t,e){if(!e)return[t];var i=_t(t,e),n=[];for(var r in i)n.push(i[r]);return n};function Mt(t,e){return t["_wrap_"+e]}var St=Mt;function kt(t,e){if(t["_wrap_"+e])return t["_wrap_"+e];var i=function(i){t[e](i)};return t["_wrap_"+e]=i,i}var Ot=kt,Ct={};function At(t){var e=Ct[t];if(!e){for(var i=t.toString(16),n=i.length;n<6;n++)i="0"+i;e="#"+i,Ct[t]=e}return e}var Lt=At;function Pt(t){var e=0,i=0,n=0,r=0;return h(t)?1===t.length?e=i=n=r=t[0]:2===t.length?(e=n=t[0],i=r=t[1]):3===t.length?(e=t[0],i=r=t[1],n=t[2]):(e=t[0],i=t[1],n=t[2],r=t[3]):e=i=n=r=t,{r1:e,r2:i,r3:n,r4:r}}var jt=Pt,Tt=function(t,e,i){return t<e?e:t>i?i:t},Bt=Tt,It=function(t,e){var i=e.toString(),n=i.indexOf(".");if(-1===n)return Math.round(t);var r=i.substr(n+1).length;return r>20&&(r=20),parseFloat(t.toFixed(r))},Dt=It,Ft=function(t){return u(t,"Number")},Et=Ft,Rt=function(t){return Et(t)&&t%1!==0},zt=Rt,Nt=function(t){return Et(t)&&t%2===0},Yt=Nt,Ht=Number.isInteger?Number.isInteger:function(t){return Et(t)&&t%1===0},Gt=Ht,Wt=function(t){return Et(t)&&t<0},Xt=Wt,Vt=1e-5;function qt(t,e,i){return void 0===i&&(i=Vt),Math.abs(t-e)<i}var Ut=function(t){return Et(t)&&t%2!==0},Zt=Ut,Qt=function(t){return Et(t)&&t>0},$t=Qt,Kt=function(t,e){if(h(t)){var i,n,r=t[0];return i=m(e)?e(t[0]):t[0][e],f(t,(function(t){n=m(e)?e(t):t[e],n>i&&(r=t,i=n)})),r}},Jt=function(t,e){if(h(t)){var i,n,r=t[0];return i=m(e)?e(t[0]):t[0][e],f(t,(function(t){n=m(e)?e(t):t[e],n<i&&(r=t,i=n)})),r}},te=function(t,e){return(t%e+e)%e},ee=te,ie=180/Math.PI,ne=function(t){return ie*t},re=ne,ae=parseInt,oe=Math.PI/180,se=function(t){return oe*t},le=se,ue=f,he=function(t,e){return t.hasOwnProperty(e)},ce=he,pe=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return f(t,(function(i,n){m(t)&&"prototype"===n||e.push(i)})),e},fe=pe,de=function(t,e){return o(fe(t),e)},ge=function(t){return b(t)?"":t.toString()},ve=function(t){return ge(t).toLowerCase()},ye=ve,me=function(t){var e=ge(t);return e.charAt(0).toLowerCase()+e.substring(1)},xe=me;function be(t,e){return t&&e?t.replace(/\\?\{([^{}]+)\}/g,(function(t,i){return"\\"===t.charAt(0)?t.slice(1):void 0===e[i]?"":e[i]})):t}var _e=be,we=function(t){return ge(t).toUpperCase()},Me=we,Se=function(t){var e=ge(t);return e.charAt(0).toUpperCase()+e.substring(1)},ke=Se,Oe={}.toString,Ce=function(t){return Oe.call(t).replace(/^\[object /,"").replace(/]$/,"")},Ae=Ce,Le=function(t){return u(t,"Arguments")},Pe=Le,je=function(t){return u(t,"Boolean")},Te=je,Be=function(t){return u(t,"Date")},Ie=Be,De=function(t){return u(t,"Error")},Fe=De,Ee=function(t){return Et(t)&&isFinite(t)},Re=function(t){return null===t},ze=Re,Ne=Object.prototype,Ye=function(t){var e=t&&t.constructor,i="function"===typeof e&&e.prototype||Ne;return t===i},He=Ye,Ge=function(t){return u(t,"RegExp")},We=Ge,Xe=function(t){return void 0===t},Ve=Xe,qe=function(t){return t instanceof Element||t instanceof HTMLDocument},Ue=qe;function Ze(t){var e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return setTimeout(t,16)};return e(t)}function Qe(t){var e=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout;e(t)}function $e(t,e){for(var i in e)e.hasOwnProperty(i)&&"constructor"!==i&&void 0!==e[i]&&(t[i]=e[i])}function Ke(t,e,i,n){return e&&$e(t,e),i&&$e(t,i),n&&$e(t,n),t}var Je=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=t[0],n=1;n<t.length;n++){var r=t[n];m(r)&&(r=r.prototype),Ke(i.prototype,r)}},ti=Je,ei=function(t){if("object"!==typeof t||null===t)return t;var e;if(h(t)){e=[];for(var i=0,n=t.length;i<n;i++)"object"===typeof t[i]&&null!=t[i]?e[i]=ei(t[i]):e[i]=t[i]}else for(var r in e={},t)"object"===typeof t[r]&&null!=t[r]?e[r]=ei(t[r]):e[r]=t[r];return e},ii=ei;function ni(t,e,i){var n;return function(){var r=this,a=arguments,o=function(){n=null,i||t.apply(r,a)},s=i&&!n;clearTimeout(n),n=setTimeout(o,e),s&&t.apply(r,a)}}var ri=ni,ai=function(t,e){if(!m(t))throw new TypeError("Expected a function");var i=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var a=e?e.apply(this,n):n[0],o=i.cache;if(o.has(a))return o.get(a);var s=t.apply(this,n);return o.set(a,s),s};return i.cache=new Map,i},oi=5;function si(t,e,i,n){for(var r in i=i||0,n=n||oi,e)if(e.hasOwnProperty(r)){var a=e[r];null!==a&&A(a)?(A(t[r])||(t[r]={}),i<n?si(t[r],a,i+1,n):t[r]=e[r]):h(a)?(t[r]=[],t[r]=t[r].concat(a)):void 0!==a&&(t[r]=a)}}var li=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];for(var n=0;n<e.length;n+=1)si(t,e[n]);return t},ui=li,hi=function(t,e,i,n){m(e)||(i=e,e=t,t=function(){});var r=Object.create?function(t,e){return Object.create(t,{constructor:{value:e}})}:function(t,e){function i(){}i.prototype=t;var n=new i;return n.constructor=e,n},a=r(e.prototype,t);return t.prototype=Ke(a,t.prototype),t.superclass=r(e.prototype,e),Ke(a,i),Ke(t,n),t},ci=hi,pi=function(t,e){if(!r(t))return-1;var i=Array.prototype.indexOf;if(i)return i.call(t,e);for(var n=-1,a=0;a<t.length;a++)if(t[a]===e){n=a;break}return n},fi=pi,di=Object.prototype.hasOwnProperty;function gi(t){if(b(t))return!0;if(r(t))return!t.length;var e=Ae(t);if("Map"===e||"Set"===e)return!t.size;if(He(t))return!Object.keys(t).length;for(var i in t)if(di.call(t,i))return!1;return!0}var vi=gi,yi=function(t,e){if(t===e)return!0;if(!t||!e)return!1;if(J(t)||J(e))return!1;if(r(t)||r(e)){if(t.length!==e.length)return!1;for(var i=!0,n=0;n<t.length;n++)if(i=yi(t[n],e[n]),!i)break;return i}if(O(t)||O(e)){var a=Object.keys(t),o=Object.keys(e);if(a.length!==o.length)return!1;for(i=!0,n=0;n<a.length;n++)if(i=yi(t[a[n]],e[a[n]]),!i)break;return i}return!1},mi=yi,xi=function(t,e,i){return m(i)?!!i(t,e):mi(t,e)},bi=function(t,e){if(!r(t))return t;var i=[];return f(t,(function(t,n){i.push(e(t,n))})),i},_i=bi,wi=function(t){return t},Mi=function(t,e){void 0===e&&(e=wi);var i={};return c(t)&&!b(t)&&Object.keys(t).forEach((function(n){i[n]=e(t[n],n)})),i},Si=function(t,e,i){var n=0,r=J(e)?e.split("."):e;while(t&&n<r.length)t=t[r[n++]];return void 0===t||n<r.length?i:t},ki=function(t,e,i){var n=t,r=J(e)?e.split("."):e;return r.forEach((function(t,e){e<r.length-1?(c(n[t])||(n[t]=Et(r[e+1])?[]:{}),n=n[t]):n[t]=i})),t},Oi=Object.prototype.hasOwnProperty,Ci=function(t,e){if(null===t||!A(t))return{};var i={};return f(e,(function(e){Oi.call(t,e)&&(i[e]=t[e])})),i},Ai=function(t,e,i){var n,r,a,o,s=0;i||(i={});var l=function(){s=!1===i.leading?0:Date.now(),n=null,o=t.apply(r,a),n||(r=a=null)},u=function(){var u=Date.now();s||!1!==i.leading||(s=u);var h=e-(u-s);return r=this,a=arguments,h<=0||h>e?(n&&(clearTimeout(n),n=null),s=u,o=t.apply(r,a),n||(r=a=null)):n||!1===i.trailing||(n=setTimeout(l,h)),o};return u.cancel=function(){clearTimeout(n),s=0,n=r=a=null},u},Li=function(t){return r(t)?Array.prototype.slice.call(t):[]},Pi={},ji=function(t){return t=t||"g",Pi[t]?Pi[t]+=1:Pi[t]=1,t+Pi[t]},Ti=function(){},Bi=function(t){return t};function Ii(t){return b(t)?0:r(t)?t.length:Object.keys(t).length}var Di=function(){function t(){this.map={}}return t.prototype.has=function(t){return void 0!==this.map[t]},t.prototype.get=function(t,e){var i=this.map[t];return void 0===i?e:i},t.prototype.set=function(t,e){this.map[t]=e},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(t){delete this.map[t]},t.prototype.size=function(){return Object.keys(this.map).length},t}(),Fi=Di;i.d(e,"contains",(function(){return o})),i.d(e,"includes",(function(){return o})),i.d(e,"difference",(function(){return y})),i.d(e,"find",(function(){return P})),i.d(e,"findIndex",(function(){return T})),i.d(e,"firstValue",(function(){return I})),i.d(e,"flatten",(function(){return F})),i.d(e,"flattenDeep",(function(){return R})),i.d(e,"getRange",(function(){return N})),i.d(e,"pull",(function(){return X})),i.d(e,"pullAt",(function(){return U})),i.d(e,"reduce",(function(){return Q})),i.d(e,"remove",(function(){return K})),i.d(e,"sortBy",(function(){return et})),i.d(e,"union",(function(){return at})),i.d(e,"uniq",(function(){return nt})),i.d(e,"valuesOfKey",(function(){return ot})),i.d(e,"head",(function(){return st})),i.d(e,"last",(function(){return lt})),i.d(e,"startsWith",(function(){return ht})),i.d(e,"endsWith",(function(){return pt})),i.d(e,"filter",(function(){return g})),i.d(e,"every",(function(){return dt})),i.d(e,"some",(function(){return vt})),i.d(e,"group",(function(){return wt})),i.d(e,"groupBy",(function(){return xt})),i.d(e,"groupToMap",(function(){return _t})),i.d(e,"getWrapBehavior",(function(){return St})),i.d(e,"wrapBehavior",(function(){return Ot})),i.d(e,"number2color",(function(){return Lt})),i.d(e,"parseRadius",(function(){return jt})),i.d(e,"clamp",(function(){return Bt})),i.d(e,"fixedBase",(function(){return Dt})),i.d(e,"isDecimal",(function(){return zt})),i.d(e,"isEven",(function(){return Yt})),i.d(e,"isInteger",(function(){return Gt})),i.d(e,"isNegative",(function(){return Xt})),i.d(e,"isNumberEqual",(function(){return qt})),i.d(e,"isOdd",(function(){return Zt})),i.d(e,"isPositive",(function(){return $t})),i.d(e,"maxBy",(function(){return Kt})),i.d(e,"minBy",(function(){return Jt})),i.d(e,"mod",(function(){return ee})),i.d(e,"toDegree",(function(){return re})),i.d(e,"toInteger",(function(){return ae})),i.d(e,"toRadian",(function(){return le})),i.d(e,"forIn",(function(){return ue})),i.d(e,"has",(function(){return he})),i.d(e,"hasKey",(function(){return ce})),i.d(e,"hasValue",(function(){return de})),i.d(e,"keys",(function(){return w})),i.d(e,"isMatch",(function(){return S})),i.d(e,"values",(function(){return fe})),i.d(e,"lowerCase",(function(){return ye})),i.d(e,"lowerFirst",(function(){return xe})),i.d(e,"substitute",(function(){return _e})),i.d(e,"upperCase",(function(){return Me})),i.d(e,"upperFirst",(function(){return ke})),i.d(e,"getType",(function(){return Ae})),i.d(e,"isArguments",(function(){return Pe})),i.d(e,"isArray",(function(){return h})),i.d(e,"isArrayLike",(function(){return r})),i.d(e,"isBoolean",(function(){return Te})),i.d(e,"isDate",(function(){return Ie})),i.d(e,"isError",(function(){return Fe})),i.d(e,"isFunction",(function(){return m})),i.d(e,"isFinite",(function(){return Ee})),i.d(e,"isNil",(function(){return b})),i.d(e,"isNull",(function(){return ze})),i.d(e,"isNumber",(function(){return Et})),i.d(e,"isObject",(function(){return c})),i.d(e,"isObjectLike",(function(){return O})),i.d(e,"isPlainObject",(function(){return A})),i.d(e,"isPrototype",(function(){return He})),i.d(e,"isRegExp",(function(){return We})),i.d(e,"isString",(function(){return J})),i.d(e,"isType",(function(){return u})),i.d(e,"isUndefined",(function(){return Ve})),i.d(e,"isElement",(function(){return Ue})),i.d(e,"requestAnimationFrame",(function(){return Ze})),i.d(e,"clearAnimationFrame",(function(){return Qe})),i.d(e,"augment",(function(){return ti})),i.d(e,"clone",(function(){return ii})),i.d(e,"debounce",(function(){return ri})),i.d(e,"memoize",(function(){return ai})),i.d(e,"deepMix",(function(){return ui})),i.d(e,"each",(function(){return f})),i.d(e,"extend",(function(){return ci})),i.d(e,"indexOf",(function(){return fi})),i.d(e,"isEmpty",(function(){return vi})),i.d(e,"isEqual",(function(){return mi})),i.d(e,"isEqualWith",(function(){return xi})),i.d(e,"map",(function(){return _i})),i.d(e,"mapValues",(function(){return Mi})),i.d(e,"mix",(function(){return Ke})),i.d(e,"assign",(function(){return Ke})),i.d(e,"get",(function(){return Si})),i.d(e,"set",(function(){return ki})),i.d(e,"pick",(function(){return Ci})),i.d(e,"throttle",(function(){return Ai})),i.d(e,"toArray",(function(){return Li})),i.d(e,"toString",(function(){return ge})),i.d(e,"uniqueId",(function(){return ji})),i.d(e,"noop",(function(){return Ti})),i.d(e,"identity",(function(){return Bi})),i.d(e,"size",(function(){return Ii})),i.d(e,"Cache",(function(){return Fi}))},"8a09":function(t,e,i){"use strict";function n(){return window.devicePixelRatio?window.devicePixelRatio:2}e.__esModule=!0,e["default"]=n},"8c29":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("9ab4"),r=i("9c7a"),a=i("8937"),o=i("e785"),s=i("df70"),l=i("754d"),u=i("258e"),h="g2-tooltip",c="g2-tooltip-title",p="g2-tooltip-list",f="g2-tooltip-marker",d="g2-tooltip-value",g="g2-tooltip-list-item",v=function(t,e){return t.getElementsByClassName(e)[0]},y=function(t,e){return Object.keys(t).forEach((function(i){e[i]&&(t[i]=a.mix(t[i],e[i]))})),t},m=function(t){function e(e){var i=t.call(this,n.__assign({containerTpl:'<div class="'+h+'">\n <div class="'+c+'"></div>\n <ul class="'+p+'"></ul>\n </div>',itemTpl:'<li data-index={index}>\n <span style="background-color:{color};" class="'+f+'"></span>\n {name}<span class="'+d+'">{value}</span></li>',htmlContent:null,follow:!0,enterable:!1},e))||this,r=l.default;i.style=y(r,e),i._init_(),i.get("items")&&i.render();var o=i.get("crosshairs");if(o){var u="rect"===o.type?i.get("backgroundGroup"):i.get("frontgroundGroup"),g=new s.default(a.mix({plot:u,panelRange:i.get("panelRange"),canvas:i.get("canvas")},i.get("crosshairs")));g.hide(),i.set("crosshairGroup",g)}return i}return n.__extends(e,t),e.prototype._init_=function(){var t,e=this.get("containerTpl"),i=this.get("canvas").get("el").parentNode;if(this.get("htmlContent"))t=this._getHtmlContent();else if(/^\#/.test(e)){var n=e.replace("#","");t=document.getElementById(n)}else t=r.createDom(e);this.set("container",t),r.modifyCSS(t,this.style[h]),i.appendChild(t),i.style.position="relative"},e.prototype.render=function(){if(this.clear(),this.get("htmlContent")){var t=this.get("canvas").get("el").parentNode,e=this._getHtmlContent();t.appendChild(e),r.modifyCSS(e,this.style[h]),this.set("container",e)}else this._renderTpl()},e.prototype._renderTpl=function(){var t=this,e=this.get("showTitle"),i=this.get("titleContent"),n=this.get("container"),o=v(n,c),s=v(n,p),l=this.get("items");o&&e&&(r.modifyCSS(o,this.style[c]),o.innerHTML=i),s&&(r.modifyCSS(s,this.style[p]),a.each(l,(function(e,i){s.appendChild(t._addItem(e,i))})))},e.prototype.clear=function(){var t=this.get("container");if(t&&this.get("htmlContent"))t.remove();else{var e=v(t,c),i=v(t,p);e&&(e.innerHTML=""),i&&(i.innerHTML="")}},e.prototype.show=function(){var e=this.get("container");e.style.visibility="visible",e.style.display="block";var i=this.get("crosshairGroup");i&&i.show();var n=this.get("markerGroup");n&&n.show(),t.prototype.show.call(this),this.get("canvas").draw()},e.prototype.hide=function(){var e=this.get("container");e.style.visibility="hidden",e.style.display="none";var i=this.get("crosshairGroup");i&&i.hide();var n=this.get("markerGroup");n&&n.hide(),t.prototype.hide.call(this),this.get("canvas").draw()},e.prototype.destroy=function(){var e=this.get("container"),i=this.get("containerTpl");e&&!/^\#/.test(i)&&e.parentNode.removeChild(e);var n=this.get("crosshairGroup");n&&n.destroy();var r=this.get("markerGroup");r&&r.remove(),t.prototype.destroy.call(this)},e.prototype._addItem=function(t,e){var i=this.get("itemTpl"),n=a.substitute(i,a.mix({index:e},t)),o=r.createDom(n);r.modifyCSS(o,this.style[g]);var s=v(o,f);s&&r.modifyCSS(s,this.style[f]);var l=v(o,d);return l&&r.modifyCSS(l,this.style[d]),o},e.prototype._getHtmlContent=function(){var t,e=this.get("htmlContent"),i=this.get("titleContent"),n=this.get("items"),o=e(i,n);return t=a.isElement(o)?o:r.createDom(o),t},e.prototype.setPosition=function(e,i,n){var o,s=e,l=i,h=this.get("container"),c=this.get("canvas").get("el"),p=r.getWidth(c),f=r.getHeight(c),d=h.clientWidth,g=h.clientHeight,v=s,y=l,m=this.get("prePosition")||{x:0,y:0};if(d||(h.style.display="block",d=h.clientWidth,g=h.clientHeight,h.style.display="none"),this.get("enterable")?(l-=h.clientHeight/2,o=[s,l],m&&s-m.x>0?s-=h.clientWidth+1:s+=1):this.get("position")?(o=u.defaultPosition(s,l,this.get("position"),d,g,n),s=o[0],l=o[1]):(o=u.constraintPositionInBoundary(s,l,d,g,p,f),s=o[0],l=o[1]),this.get("inPanel")){var x=this.get("panelRange"),b=this.get("panelGroup"),_=b.attr("clip");o=u.constraintPositionInPanel(s,l,d,g,_?_.getBBox():x,this.get("enterable")),s=o[0],l=o[1]}var w=this.get("markerItems");a.isEmpty(w)||(v=w[0].x,y=w[0].y),this.set("prePosition",o);var M=this.get("follow");M&&(h.style.left=s+"px",h.style.top=l+"px");var S=this.get("crosshairGroup");if(S){var k=this.get("items");S.setPosition(v,y,k)}t.prototype.setPosition.call(this,s,l)},e}(o.default);e.default=m},"8d60":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=r,e.toRadian=o,e.equals=s;var n=e.EPSILON=1e-6;e.ARRAY_TYPE="undefined"!==typeof Float32Array?Float32Array:Array,e.RANDOM=Math.random;function r(t){e.ARRAY_TYPE=t}var a=Math.PI/180;function o(t){return t*a}function s(t,e){return Math.abs(t-e)<=n*Math.max(1,Math.abs(t),Math.abs(e))}},"907a":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("d9c7");e.SLIDER_WIDTH=8,e.SLIDER_HEIGHT=2*e.SLIDER_WIDTH,e.SLIDER_CIRCLE_MAX_SIZE=2*e.SLIDER_HEIGHT,e.TEXT_OFFSET=4,e.SliderBtnStyle={fill:"#fff",shadowBlur:10,shadowColor:"rgba(0,0,0,0.65)",radius:2},e.SliderTextStyle={fill:"#333",textAlign:"center",textBaseline:"middle",stroke:"#fff",lineWidth:5,fontFamily:n.FONT_FAMILY},e.SliderMiddleBackgroundStyle={fill:"#D9D9D9"},e.SliderMiddleFrontendStyle={fill:"rgb(64, 141, 251)"},e.DefaultTitleStyle={fill:"#333",textBaseline:"top",textAlign:"start",fontFamily:n.FONT_FAMILY}},"91de":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("06ef"),r=i("5b8d"),a=i("61d8"),o=function(t,e){if(t===e)return!0;if(!t||!e)return!1;if(a.default(t)||a.default(e))return!1;if(r.default(t)||r.default(e)){if(t.length!==e.length)return!1;for(var i=!0,s=0;s<t.length;s++)if(i=o(t[s],e[s]),!i)break;return i}if(n.default(t)||n.default(e)){var l=Object.keys(t),u=Object.keys(e);if(l.length!==u.length)return!1;for(i=!0,s=0;s<l.length;s++)if(i=o(t[l[s]],e[l[s]]),!i)break;return i}return!1};e.default=o},9272:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.len=e.sqrDist=e.dist=e.div=e.mul=e.sub=void 0,e.create=o,e.clone=s,e.length=l,e.fromValues=u,e.copy=h,e.set=c,e.add=p,e.subtract=f,e.multiply=d,e.divide=g,e.ceil=v,e.floor=y,e.min=m,e.max=x,e.round=b,e.scale=_,e.scaleAndAdd=w,e.distance=M,e.squaredDistance=S,e.squaredLength=k,e.negate=O,e.inverse=C,e.normalize=A,e.dot=L,e.cross=P,e.lerp=j,e.hermite=T,e.bezier=B,e.random=I,e.transformMat4=D,e.transformMat3=F,e.transformQuat=E,e.rotateX=R,e.rotateY=z,e.rotateZ=N,e.angle=Y,e.str=H,e.exactEquals=G,e.equals=W;var n=i("8d60"),r=a(n);function a(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function o(){var t=new r.ARRAY_TYPE(3);return r.ARRAY_TYPE!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function s(t){var e=new r.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function l(t){var e=t[0],i=t[1],n=t[2];return Math.sqrt(e*e+i*i+n*n)}function u(t,e,i){var n=new r.ARRAY_TYPE(3);return n[0]=t,n[1]=e,n[2]=i,n}function h(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function c(t,e,i,n){return t[0]=e,t[1]=i,t[2]=n,t}function p(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t}function f(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t}function d(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t[2]=e[2]*i[2],t}function g(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t[2]=e[2]/i[2],t}function v(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function y(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function m(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t[2]=Math.min(e[2],i[2]),t}function x(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t[2]=Math.max(e[2],i[2]),t}function b(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function _(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t}function w(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t[2]=e[2]+i[2]*n,t}function M(t,e){var i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(i*i+n*n+r*r)}function S(t,e){var i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return i*i+n*n+r*r}function k(t){var e=t[0],i=t[1],n=t[2];return e*e+i*i+n*n}function O(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function C(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function A(t,e){var i=e[0],n=e[1],r=e[2],a=i*i+n*n+r*r;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function L(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function P(t,e,i){var n=e[0],r=e[1],a=e[2],o=i[0],s=i[1],l=i[2];return t[0]=r*l-a*s,t[1]=a*o-n*l,t[2]=n*s-r*o,t}function j(t,e,i,n){var r=e[0],a=e[1],o=e[2];return t[0]=r+n*(i[0]-r),t[1]=a+n*(i[1]-a),t[2]=o+n*(i[2]-o),t}function T(t,e,i,n,r,a){var o=a*a,s=o*(2*a-3)+1,l=o*(a-2)+a,u=o*(a-1),h=o*(3-2*a);return t[0]=e[0]*s+i[0]*l+n[0]*u+r[0]*h,t[1]=e[1]*s+i[1]*l+n[1]*u+r[1]*h,t[2]=e[2]*s+i[2]*l+n[2]*u+r[2]*h,t}function B(t,e,i,n,r,a){var o=1-a,s=o*o,l=a*a,u=s*o,h=3*a*s,c=3*l*o,p=l*a;return t[0]=e[0]*u+i[0]*h+n[0]*c+r[0]*p,t[1]=e[1]*u+i[1]*h+n[1]*c+r[1]*p,t[2]=e[2]*u+i[2]*h+n[2]*c+r[2]*p,t}function I(t,e){e=e||1;var i=2*r.RANDOM()*Math.PI,n=2*r.RANDOM()-1,a=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(i)*a,t[1]=Math.sin(i)*a,t[2]=n*e,t}function D(t,e,i){var n=e[0],r=e[1],a=e[2],o=i[3]*n+i[7]*r+i[11]*a+i[15];return o=o||1,t[0]=(i[0]*n+i[4]*r+i[8]*a+i[12])/o,t[1]=(i[1]*n+i[5]*r+i[9]*a+i[13])/o,t[2]=(i[2]*n+i[6]*r+i[10]*a+i[14])/o,t}function F(t,e,i){var n=e[0],r=e[1],a=e[2];return t[0]=n*i[0]+r*i[3]+a*i[6],t[1]=n*i[1]+r*i[4]+a*i[7],t[2]=n*i[2]+r*i[5]+a*i[8],t}function E(t,e,i){var n=i[0],r=i[1],a=i[2],o=i[3],s=e[0],l=e[1],u=e[2],h=r*u-a*l,c=a*s-n*u,p=n*l-r*s,f=r*p-a*c,d=a*h-n*p,g=n*c-r*h,v=2*o;return h*=v,c*=v,p*=v,f*=2,d*=2,g*=2,t[0]=s+h+f,t[1]=l+c+d,t[2]=u+p+g,t}function R(t,e,i,n){var r=[],a=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],a[0]=r[0],a[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),a[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),t[0]=a[0]+i[0],t[1]=a[1]+i[1],t[2]=a[2]+i[2],t}function z(t,e,i,n){var r=[],a=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],a[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),a[1]=r[1],a[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),t[0]=a[0]+i[0],t[1]=a[1]+i[1],t[2]=a[2]+i[2],t}function N(t,e,i,n){var r=[],a=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],a[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),a[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),a[2]=r[2],t[0]=a[0]+i[0],t[1]=a[1]+i[1],t[2]=a[2]+i[2],t}function Y(t,e){var i=u(t[0],t[1],t[2]),n=u(e[0],e[1],e[2]);A(i,i),A(n,n);var r=L(i,n);return r>1?0:r<-1?Math.PI:Math.acos(r)}function H(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function G(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function W(t,e){var i=t[0],n=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(i-o)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-s)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(a-l)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(l))}e.sub=f,e.mul=d,e.div=g,e.dist=M,e.sqrDist=S,e.len=l,e.sqrLen=k,e.forEach=function(){var t=o();return function(e,i,n,r,a,o){var s=void 0,l=void 0;for(i||(i=3),n||(n=0),l=r?Math.min(r*i+n,e.length):e.length,s=n;s<l;s+=i)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],a(t,t,o),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2];return e}}()},"99af":function(t,e,i){"use strict";var n={};i.r(n),i.d(n,"default",(function(){return $e}));var r={};i.r(r),i.d(r,"Base",(function(){return Cr})),i.d(r,"Html",(function(){return $r})),i.d(r,"Canvas",(function(){return Jr}));var a={};i.r(a),i.d(a,"Base",(function(){return ia})),i.d(a,"Circle",(function(){return ra})),i.d(a,"Helix",(function(){return oa})),i.d(a,"Line",(function(){return ua}));var o={};i.r(o),i.d(o,"Legend",(function(){return ca})),i.d(o,"Size",(function(){return Ca})),i.d(o,"Color",(function(){return La})),i.d(o,"CanvasCategory",(function(){return Ea})),i.d(o,"HtmlCategory",(function(){return Ha}));var s={};i.r(s),i.d(s,"Annotation",(function(){return Wa})),i.d(s,"Line",(function(){return Va})),i.d(s,"Text",(function(){return Ua})),i.d(s,"Arc",(function(){return Qa})),i.d(s,"Region",(function(){return Ka})),i.d(s,"Image",(function(){return to})),i.d(s,"Html",(function(){return io})),i.d(s,"DataMarker",(function(){return ro})),i.d(s,"DataRegion",(function(){return oo}));var l={};i.r(l),i.d(l,"EVENT_MAP",(function(){return R})),i.d(l,"onEvent",(function(){return Y}));var u={};i.r(u),i.d(u,"EVENT_MAP",(function(){return R})),i.d(u,"onEvent",(function(){return Y}));var h={};i.r(h),i.d(h,"EVENT_MAP",(function(){return R})),i.d(h,"onEvent",(function(){return Y}));var c={};i.r(c),i.d(c,"EVENT_MAP",(function(){return R})),i.d(c,"onEvent",(function(){return Y}));var p={};i.r(p),i.d(p,"EVENT_MAP",(function(){return R})),i.d(p,"onEvent",(function(){return Y}));var f={};i.r(f),i.d(f,"EVENT_MAP",(function(){return R})),i.d(f,"onEvent",(function(){return Y}));var d={};i.r(d),i.d(d,"EVENT_MAP",(function(){return R})),i.d(d,"onEvent",(function(){return Y}));var g={};i.r(g),i.d(g,"EVENT_MAP",(function(){return R})),i.d(g,"onEvent",(function(){return Y}));var v={};i.r(v),i.d(v,"EVENT_MAP",(function(){return R})),i.d(v,"onEvent",(function(){return Y}));var y={};i.r(y),i.d(y,"EVENT_MAP",(function(){return R})),i.d(y,"onEvent",(function(){return Y}));var m={};i.r(m),i.d(m,"EVENT_MAP",(function(){return R})),i.d(m,"onEvent",(function(){return Y}));var x={};i.r(x),i.d(x,"EVENT_MAP",(function(){return R})),i.d(x,"onEvent",(function(){return Y}));var b={};i.r(b),i.d(b,"EVENT_MAP",(function(){return R})),i.d(b,"onEvent",(function(){return Y}));var _={};i.r(_),i.d(_,"EVENT_MAP",(function(){return R})),i.d(_,"onEvent",(function(){return Y}));var w={};i.r(w),i.d(w,"EVENT_MAP",(function(){return R})),i.d(w,"onEvent",(function(){return Y}));var M={};i.r(M),i.d(M,"EVENT_MAP",(function(){return R})),i.d(M,"onEvent",(function(){return Y}));var S={};i.r(S),i.d(S,"EVENT_MAP",(function(){return R})),i.d(S,"onEvent",(function(){return Y}));var k=1e3,O=60*k,C=60*O,A=24*C,L=7*A,P=30*A,j=365*A,T={second:{value:k,format:"HH:mm:ss"},miniute:{value:O,format:"HH:mm"},hour:{value:C,format:"HH"},day:{value:A,format:"YYYY-MM-DD"},week:{value:L,format:"YYYY-MM-DD"},month:{value:P,format:"YYYY-MM"},year:{value:j,format:"YYYY"}},B=i("9ab4"),I=i("19dd"),D=i.n(I),F=i("1ca4"),E=i("8937"),R={onViewClick:"click",onViewDblClick:"dblclick",onViewMousemove:"mousemove",onViewMousedown:"mousedown",onViewMouseup:"mouseup",onViewMouseenter:"mouseenter",onViewMouseleave:"mouseleave",onViewContextmenu:"contextmenu",onAxisClick:"axis-label:click",onAxisDblClick:"axis-label:dblclick",onAxisMousemove:"axis-label:mousemove",onAxisMousedown:"axis-label:mousedown",onAxisMouseup:"axis-label:mouseup",onAxisMouseenter:"axis-label:mouseenter",onAxisMouseleave:"axis-label:mouseleave",onAxisContextmenu:"axis-label:contextmenu",onLabelClick:"label:click",onLabelDblClick:"label:dblclick",onLabelMousemove:"label:mousemove",onLabelMouseup:"label:mouseup",onLabelMousedown:"label:mousedown",onLabelMouseenter:"label:mouseenter",onLabelMouseleave:"label:mouseleave",onLabelContextmenu:"label:contextmenu",onLegendClick:"legend-item:click",onLegendDblClick:"legend-item:dblclick",onLegendMouseMove:"legend-item:mousemove",onLegendMouseDown:"legend-item:mousedown",onLegendMouseUp:"legend-item:mouseup",onLegendMouseLeave:"legend-item:mouseleave",onLegendMouseEnter:"legend-item:mouseenter",onLegendContextmenu:"legend-item:contextmenu"},z={onPlotClick:"click",onPlotDblClick:"dblclick",onPlotMousemove:"mousemove",onPlotMousedown:"mousedown",onPlotMouseup:"mouseup",onPlotMouseenter:"mouseenter",onPlotMouseleave:"mouseleave",onPlotContextmenu:"contextmenu",onTitleClick:"title:click",onTitleDblClick:"title:dblclick",onTitleMousemove:"title:mousemove",onTitleMousedown:"title:mousedown",onTitleMouseup:"title:mouseup",onTitleMouseenter:"title:mouseenter",onTitleMouseleave:"title:mouseleave",onTitleContextmenu:"title:contextmenu",onDescriptionClick:"description:click",onDescriptionDblClick:"description:dblclick",onDescriptionMousemove:"description:mousemove",onDescriptionMousedown:"description:mousedown",onDescriptionMouseup:"description:mouseup",onDescriptionMouseenter:"description:mouseenter",onDescriptionMouseleave:"description:mouseleave",onDescriptionContextmenu:"description:contextmenu",onBreadcrumbClick:"breadcrumb:click",onBreadcrumbDblClick:"breadcrumb:dblclick",onBreadcrumbMousemove:"breadcrumb:mousemove",onBreadcrumbMousedown:"breadcrumb:mousedown",onBreadcrumbMouseup:"breadcrumb:mouseup",onBreadcrumbMouseenter:"breadcrumb:mouseenter",onBreadcrumbMouseleave:"breadcrumb:mouseleave",onBreadcrumbContextmenu:"breadcrumb:contextmenu"},N={onLayerClick:"click",onLayerDblClick:"dblclick",onLayerMousemove:"mousemove",onLayerMousedown:"mousedown",onLayerMouseup:"mouseup",onLayerMouseenter:"mouseenter",onLayerMouseleave:"mouseleave",onLayerContextmenu:"contextmenu"};function Y(t,e,i){t.view.on(e,i)}var H,G=function(t){function e(e){var i=t.call(this)||this;return i.layers=[],i.destroyed=!1,i.visibility=!0,i.rendered=!1,i.eventHandlers=[],i.options=i.getOptions(e),i.processOptions(i.options),i.container=new F["Group"],i}return Object(B["__extends"])(e,t),e.prototype.processOptions=function(t){this.id=t.id,this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this.canvas=t.canvas,this.parent=t.parent},e.prototype.updateConfig=function(t){this.options=E["deepMix"]({},this.options,t),this.processOptions(this.options)},e.prototype.beforeInit=function(){},e.prototype.init=function(){this.layerBBox=this.getLayerBBox(),this.layerRegion=this.getLayerRegion(),this.eachLayer((function(t){t.init()}))},e.prototype.afterInit=function(){},e.prototype.render=function(){this.rendered||(this.parent?this.parent.container.add(this.container):this.canvas.add(this.container)),this.rendered=!0,this.beforeInit(),this.init(),this.afterInit(),this.container.transform([["t",this.x,this.y]]),this.eachLayer((function(t){t.render()})),this.canvas.draw()},e.prototype.clear=function(){this.eachLayer((function(t){t.destroy()})),this.layers=[],this.container.clear()},e.prototype.destroy=function(){var t=this;this.eachLayer((function(t){t.destroy()})),E["each"](this.eventHandlers,(function(e){t.off(e.eventName,e.handler)})),this.container.remove(!0),this.destroyed=!0},e.prototype.show=function(){this.container.set("visible",!0),this.visibility=!0},e.prototype.hide=function(){this.container.set("visible",!1),this.visibility=!1},e.prototype.addLayer=function(t){var e=E["findIndex"](this.layers,(function(e){return e===t}));e<0&&(t.parent!==this&&(t.parent=this,t.init()),this.layers.push(t))},e.prototype.removeLayer=function(t){var e=E["findIndex"](this.layers,(function(e){return e===t}));e>=0&&this.layers.splice(e,1)},e.prototype.updateBBox=function(t,e){void 0===e&&(e=!1);var i={x:this.x,y:this.y,width:this.width,height:this.height},n=E["deepMix"]({},i,t);this.x=n.x,this.y=n.y,this.width=n.width,this.height=n.height,this.layerBBox=this.getLayerBBox(),this.layerRegion=this.getLayerRegion(),this.render(),e&&this.eachLayer((function(t){t.updateBBoxByParent(),t.render()})),this.canvas.draw()},e.prototype.updateBBoxByParent=function(){var t=this.layerRegion;this.x=this.parent.x+this.parent.width*t.start.x,this.y=this.parent.y+this.parent.height*t.start.y,this.width=this.parent.width*(t.end.x-t.start.x),this.height=this.parent.height*(t.end.y-t.start.y),this.layerBBox=this.getLayerBBox()},e.prototype.getGlobalPosition=function(){var t=this.x,e=this.y,i=this.parent;while(i)t+=i.x,e+=i.y,i=i.parent;return{x:t,y:e}},e.prototype.getGlobalBBox=function(){var t=this.getGlobalPosition();return new F["BBox"](t.x,t.y,this.width,this.height)},e.prototype.getOptions=function(t){var e=0,i=0;t.parent&&(e=t.parent.width,i=t.parent.height);var n={x:0,y:0,width:e,height:i};return E["deepMix"]({},n,t)},e.prototype.eachLayer=function(t){E["each"](this.layers,t)},e.prototype.parseEvents=function(t){var e=this,i=E["keys"](N);E["each"](t,(function(t,n){if(E["contains"](i,n)&&E["isFunction"](t)){var r=N[n]||n,a=t;e.on(r,a),e.eventHandlers.push({name:r,handler:a})}}))},e.prototype.getLayerBBox=function(){return new F["BBox"](this.x,this.y,this.width,this.height)},e.prototype.getLayerRegion=function(){if(this.parent){var t=this.parent.width,e=this.parent.height,i=this.parent.x,n=this.parent.y,r=(this.x-i)/t,a=(this.y-n)/e,o=(this.x+this.width-i)/t,s=(this.y+this.height-n)/e;return{start:{x:r,y:a},end:{x:o,y:s}}}return{start:{x:0,y:0},end:{x:1,y:1}}},e}(D.a),W=G,X=(i("5977a"),i("9c7a")),V=i("f2a9"),q={},U=function(t){return q[t.toLowerCase()]},Z=function(t,e){if(U(t))throw new Error("Theme type '"+t+"' existed.");q[t.toLowerCase()]=e},Q="#1890FF",$=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E8684A","#6DC8EC","#9270CA","#FF9D4D","#269A99","#FF99C3"],K=["#5B8FF9","#BDD2FD","#5AD8A6","#BDEFDB","#5D7092","#C2C8D5","#F6BD16","#FBE5A2","#E8684A","#F6C3B7","#6DC8EC","#B6E3F5","#9270CA","#D3C6EA","#FF9D4D","#FFD8B8","#269A99","#AAD8D8","#FF99C3","#FFD6E7"],J='"-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",SimSun, "sans-serif"',tt="g2-tooltip",et="g2-tooltip-title",it="g2-tooltip-list",nt="g2-tooltip-list-item",rt="g2-tooltip-marker",at="g2-tooltip-value",ot={area:{lineWidth:0,fill:Q,fillOpacity:.6},hollowArea:{fill:"#fff",stroke:Q,fillOpacity:0,lineWidth:2},box:{stroke:Q,lineWidth:1,fill:null},edge:{stroke:Q,lineWidth:1,fill:null},interval:{lineWidth:0,fill:Q,fillOpacity:.85},hollowInterval:{fill:"#fff",stroke:Q,fillOpacity:0,lineWidth:2},kline:{fill:Q,lineWidth:1,stroke:Q},line:{stroke:Q,lineWidth:2,fill:null},polygon:{lineWidth:0,fill:Q,fillOpacity:1},hollowPolygon:{fill:"#fff",stroke:Q,fillOpacity:0,lineWidth:2},point:{lineWidth:1,fill:Q,radius:4},hollowPoint:{fill:"#fff",lineWidth:1,stroke:Q,radius:3},text:{fill:Q,textAlign:"center",textBaseline:"middle"}},st=function(t){var e=t.fillOpacity||t.opacity||1;return{fillOpacity:E["clamp"](e-.15,.1,1),strokeOpacity:E["clamp"](e-.15,.1,1)}},lt=function(t){var e=t.lineWidth||1;return{lineWidth:e+1}},ut=function(t){var e=t.fillOpacity||t.opacity||1;return{fillOpacity:E["clamp"](e-.15,.1,1)}},ht=function(t){var e=t.fill||t.fillStyle,i=t.size||t.radius;return{radius:i+1,shadowBlur:i,shadowColor:e,stroke:e,strokeOpacity:1,lineWidth:1}},ct=function(t){var e=t.stroke||t.strokeStyle,i=t.size||t.radius;return{radius:i+1,shadowBlur:i,shadowColor:e,stroke:e,strokeOpacity:1,lineWidth:1}},pt=function(t){var e=t.fill||t.fillStyle;return{stroke:e,strokeOpacity:1,lineWidth:1}},ft={autoRotateLabel:!0,autoHideLabel:!1,autoRotateTitle:!0,showTitle:!1,gridType:"line",title:{textStyle:{fontSize:12,fill:"#ccc",textBaseline:"middle",fontFamily:J,textAlign:"center"},offset:20},label:{offset:16,textStyle:{fill:"#545454",fontSize:12,lineHeight:16,textBaseline:"middle",fontFamily:J}},line:{lineWidth:1,stroke:"#BFBFBF"},tickLine:{lineWidth:1,stroke:"#BFBFBF",length:4,alignWithLabel:!0},grid:{stroke:"#E9E9E9",lineWidth:1,lineDash:[3,3]}},dt={showTitle:!1,textStyle:{fill:"#8C8C8C",fontSize:12,textAlign:"start",textBaseline:"middle",lineHeight:20,fontFamily:J},unSelectedColor:"#bfbfbf",titleStyle:{fill:"#333",textBaseline:"top",textAlign:"start",fontFamily:J},flipPage:!0},gt={pixelRatio:null,defaultColor:Q,padding:[20,20,95,80],fontFamily:J,colors:$,colors_20:K,shapes:{point:["hollowCircle","hollowSquare","hollowDiamond","hollowBowtie","hollowTriangle","hollowHexagon","cross","tick","plus","hyphen","line"],line:["line","dash","dot"],area:["area"]},sizes:[1,10],opacities:[.1,.9],backgroundStyle:{fill:"rgba(255,255,255,0)"},axis:{top:E["deepMix"]({},ft,{position:"top",grid:null}),bottom:E["deepMix"]({},ft,{position:"bottom",grid:null}),left:E["deepMix"]({},ft,{position:"left",label:{offset:8},line:null,tickLine:null}),right:E["deepMix"]({},ft,{position:"right",label:{offset:8},line:null,tickLine:null}),circle:E["deepMix"]({},ft,{label:{offset:8,textStyle:{textBaseline:"alphabetic"}}}),radius:E["deepMix"]({},ft,{label:{offset:12},gridType:"arc"}),helix:E["deepMix"]({},ft,{label:null,grid:null})},label:{offset:20,textStyle:{fill:"#545454",fontSize:12,textBaseline:"middle",fontFamily:J}},treemapLabels:{offset:10,textStyle:{fill:"#fff",fontSize:12,textBaseline:"top",fontStyle:"bold",fontFamily:J}},innerLabels:{textStyle:{fill:"#fff",fontSize:12,textBaseline:"middle",fontFamily:J}},thetaLabels:{labelHeight:14,offset:30,labelLine:{lineWidth:1}},defaultLegendPosition:"bottom",legend:{right:E["deepMix"]({},dt,{position:"right",layout:"vertical",itemMarginBottom:8,textStyle:{lineHeight:0}}),left:E["deepMix"]({},dt,{position:"left",layout:"vertical",itemMarginBottom:8}),top:E["deepMix"]({},dt,{position:"top",layout:"horizontal",itemDistance:10}),bottom:E["deepMix"]({},dt,{position:"bottom",layout:"horizontal",itemDistance:10}),html:{position:"bottom",layout:"horizontal",showTitle:!1,unSelectedColor:"#bfbfbf",backgroundStyle:{height:"auto",width:"auto",position:"absolute",overflow:"auto",fontSize:"12px",fontFamily:J,lineHeight:"20px",color:"#8C8C8C"},titleStyle:{marginBottom:"4px"},listStyle:{listStyleType:"none",margin:0,padding:0},itemStyle:{cursor:"pointer",marginBottom:"5px",marginRight:"24px"},markerStyle:{width:"9px",height:"9px",borderRadius:"50%",display:"inline-block",marginRight:"8px",verticalAlign:"middle"}},margin:[0,24,24,24],legendMargin:24},tooltip:(H={useHtml:!0},H[""+tt]={position:"absolute",display:"none",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:J,lineHeight:"20px",padding:"10px 10px 6px 10px"},H[""+et]={marginBottom:"4px"},H[""+it]={margin:0,listStyleType:"none",padding:0},H[""+nt]={marginBottom:"4px",listStyleType:"none",padding:0,marginTop:0,marginLeft:0,marginRight:0},H[""+rt]={width:"5px",height:"5px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},H[""+at]={display:"inline-block",float:"right",marginLeft:"30px"},H),tooltipMarker:{symbol:function(t,e,i){return[["M",t,e],["m",-i,0],["a",i,i,0,1,0,2*i,0],["a",i,i,0,1,0,2*-i,0]]},stroke:"#fff",shadowBlur:10,shadowOffsetX:0,shadowOffSetY:0,shadowColor:"rgba(0,0,0,0.09)",lineWidth:2,radius:4},tooltipCrosshairsRect:{type:"rect",rectStyle:{fill:"#CCD6EC",opacity:.3}},tooltipCrosshairsLine:{lineStyle:{stroke:"rgba(0, 0, 0, 0.25)",lineWidth:1}},annotation:{line:{line:{style:{stroke:"rgba(0, 0, 0, .65)",lineDash:[2,2],lineWidth:1}},text:{position:"start",autoRotate:!0,style:{fill:"rgba(0, 0, 0, .45)",fontSize:12,textAlign:"start",fontFamily:J,textBaseline:"bottom"}}},text:{top:!0,style:{fill:"rgba(0,0,0,.5)",fontSize:12,textBaseline:"middle",textAlign:"start",fontFamily:J}},region:{top:!1,style:{lineWidth:0,fill:"#000",fillOpacity:.04}},html:{alignX:"middle",alignY:"middle"},dataRegion:{region:{style:{lineWidth:0,fill:"#000000",opacity:.04}},text:{style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:"rgba(0, 0, 0, .65)"}}},dataMarker:{top:!0,direction:"upward",autoAdjust:!0,text:{display:!0,style:{fill:"rgba(0, 0, 0, .65)",opacity:1,fontSize:12,textAlign:"start"}},line:{display:!0,lineLength:20,style:{stroke:"#A3B1BF",lineWidth:1}},point:{display:!0,style:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2}}}},shape:{area:{area:{default:ot.area,active:st},smooth:{default:ot.area,active:st},line:{default:ot.hollowArea,active:lt},smoothLine:{default:ot.hollowArea,active:lt}},box:{box:{default:ot.box,active:lt}},edge:{line:{default:ot.edge,active:lt},vhv:{default:ot.edge,active:lt},smooth:{default:ot.edge,active:lt},arc:{default:ot.edge,active:lt}},interval:{rect:{default:ot.interval,active:ut},hollowInterval:{default:ot.hollowInterval,active:lt},line:{default:ot.hollowInterval,active:lt},tick:{default:ot.hollowInterval,active:lt},funnel:{default:ot.interval,active:ut},pyramid:{default:ot.interval,active:ut},"top-line":{default:ot.interval,active:ut}},kline:{kline:{default:ot.kline,active:st}},line:{line:{default:ot.line,active:lt},dot:{default:ot.line,active:lt},dash:{default:ot.line,active:lt},smooth:{default:ot.line,active:lt},hv:{default:ot.line,active:lt},vh:{default:ot.line,active:lt},hvh:{default:ot.line,active:lt},vhv:{default:ot.line,active:lt}},polygon:{polygon:{default:ot.polygon,active:ut},hollow:{default:ot.hollowPolygon,active:lt}},point:{circle:{default:ot.point,active:ht},square:{default:ot.point,active:ht},bowtie:{default:ot.point,active:ht},diamond:{default:ot.point,active:ht},hexagon:{default:ot.point,active:ht},triangle:{default:ot.point,active:ht},triangleDown:{default:ot.point,active:ht},hollowCircle:{default:ot.hollowPoint,active:ct},hollowSquare:{default:ot.hollowPoint,active:ct},hollowBowtie:{default:ot.hollowPoint,active:ct},hollowDiamond:{default:ot.hollowPoint,active:ct},hollowHexagon:{default:ot.hollowPoint,active:ct},hollowTriangle:{default:ot.hollowPoint,active:ct},hollowTriangleDown:{default:ot.hollowPoint,active:ct},cross:{default:ot.hollowPoint,active:ct},tick:{default:ot.hollowPoint,active:ct},plus:{default:ot.hollowPoint,active:ct},hyphen:{default:ot.hollowPoint,active:ct},line:{default:ot.hollowPoint,active:ct},rect:{default:ot.point,active:ht},image:{default:ot.point,active:ht},path:{default:ot.point,active:ht}},text:{text:{default:ot.text,active:pt}}}},vt=gt;Z("default",vt);var yt={version:V["a"],renderer:"canvas",width:640,height:480,pixelRatio:null,animate:!0,widthRatio:{column:.5,rose:.9999999,multiplePie:1/1.3},theme:U("default"),setTheme:function(t){var e={};e=E["isObject"](t)?t:U(t)?U(t):U("default"),E["deepMix"](yt.theme,e)}},mt=yt,xt=(yt.setTheme,yt.version,function(t){function e(e){var i=t.call(this)||this;return i.cfg={},i.destroyed=!1,i.cfg=Object(B["__assign"])({visible:!0},e),i}return Object(B["__extends"])(e,t),e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){return this.cfg[t]=e,this},e.prototype.show=function(){var t=this.get("visible");t||(this.set("visible",!0),this.changeVisible(!0))},e.prototype.hide=function(){var t=this.get("visible");t&&(this.set("visible",!1),this.changeVisible(!1))},e.prototype.destroy=function(){this.cfg={},this.off(),this.destroyed=!0},e}(D.a)),bt=xt,_t=i("6c7f");_t["translate"]=function(t,e,i){var n=new Array(9);return _t["fromTranslation"](n,i),_t["multiply"](t,n,e)},_t["rotate"]=function(t,e,i){var n=new Array(9);return _t["fromRotation"](n,i),_t["multiply"](t,n,e)},_t["scale"]=function(t,e,i){var n=new Array(9);return _t["fromScaling"](n,i),_t["multiply"](t,n,e)},_t["transform"]=function(t,e){for(var i=[].concat(t),n=0,r=e.length;n<r;n++){var a=e[n];switch(a[0]){case"t":_t["translate"](i,i,[a[1],a[2]]);break;case"s":_t["scale"](i,i,[a[1],a[2]]);break;case"r":_t["rotate"](i,i,a[1]);break;default:break}}return i};var wt=_t,Mt=i("5830");Mt["angle"]=function(t,e){var i=Mt["dot"](t,e)/(Mt["length"](t)*Mt["length"](e));return Math.acos(Object(E["clamp"])(i,-1,1))},Mt["direction"]=function(t,e){return t[0]*e[1]-e[0]*t[1]},Mt["angleTo"]=function(t,e,i){var n=Mt["angle"](t,e),r=Mt["direction"](t,e)>=0;return i?r?2*Math.PI-n:n:r?n:2*Math.PI-n},Mt["vertical"]=function(t,e,i){return i?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t};var St=Mt,kt=i("9272"),Ot=kt,Ct=function(t,e){var i=t?Object(E["clone"])(t):[1,0,0,0,1,0,0,0,1];return Object(E["each"])(e,(function(t){switch(t[0]){case"t":wt.translate(i,i,[t[1],t[2]]);break;case"s":wt.scale(i,i,[t[1],t[2]]);break;case"r":wt.rotate(i,i,t[1]);break;case"m":wt.multiply(i,i,t[1]);break;default:return!1}})),i},At=i("72fb"),Lt=i.n(At),Pt=i("01f97"),jt=i.n(Pt);i("61d8");function Tt(t,e){for(var i=[],n=0,r=t.length;r-2*!e>n;n+=2){var a=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?r-4===n?a[3]={x:+t[0],y:+t[1]}:r-2===n&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[r-2],y:+t[r-1]}:r-4===n?a[3]=a[2]:n||(a[0]={x:+t[n],y:+t[n+1]}),i.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return i}i("91de");var Bt="\t\n\v\f\r \u2028\u2029",It=new RegExp("([a-z])["+Bt+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+Bt+"]*,?["+Bt+"]*)+)","ig"),Dt=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+Bt+"]*,?["+Bt+"]*","ig");function Ft(t){if(!t)return null;if(jt()(t))return t;var e={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},i=[];return String(t).replace(It,(function(t,n,r){var a=[],o=n.toLowerCase();if(r.replace(Dt,(function(t,e){e&&a.push(+e)})),"m"===o&&a.length>2&&(i.push([n].concat(a.splice(0,2))),o="l",n="m"===n?"l":"L"),"o"===o&&1===a.length&&i.push([n,a[0]]),"r"===o)i.push([n].concat(a));else while(a.length>=e[o])if(i.push([n].concat(a.splice(0,e[o]))),!e[o])break;return""})),i}var Et=/[a-z]/;function Rt(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function zt(t){var e=Ft(t);if(!e||!e.length)return[["M",0,0]];for(var i=!1,n=0;n<e.length;n++){var r=e[n][0];if(Et.test(r)||["V","H","T","S"].indexOf(r)>=0){i=!0;break}}if(!i)return e;var a=[],o=0,s=0,l=0,u=0,h=0,c=e[0];"M"!==c[0]&&"m"!==c[0]||(o=+c[1],s=+c[2],l=o,u=s,h++,a[0]=["M",o,s]);n=h;for(var p=e.length;n<p;n++){var f=e[n],d=a[n-1],g=[],v=(r=f[0],r.toUpperCase());if(r!==v)switch(g[0]=v,v){case"A":g[1]=f[1],g[2]=f[2],g[3]=f[3],g[4]=f[4],g[5]=f[5],g[6]=+f[6]+o,g[7]=+f[7]+s;break;case"V":g[1]=+f[1]+s;break;case"H":g[1]=+f[1]+o;break;case"M":l=+f[1]+o,u=+f[2]+s;break;default:for(var y=1,m=f.length;y<m;y++)g[y]=+f[y]+(y%2?o:s)}else g=e[n];switch(v){case"Z":o=+l,s=+u;break;case"H":o=g[1],g=["L",o,s];break;case"V":s=g[1],g=["L",o,s];break;case"T":o=g[1],s=g[2];var x=Rt([d[1],d[2]],[d[3],d[4]]);g=["Q",x[0],x[1],o,s];break;case"S":o=g[g.length-2],s=g[g.length-1];var b=d.length,_=Rt([d[b-4],d[b-3]],[d[b-2],d[b-1]]);g=["C",_[0],_[1],g[1],g[2],o,s];break;case"M":l=g[g.length-2],u=g[g.length-1];break;default:o=g[g.length-2],s=g[g.length-1]}a.push(g)}return a}var Nt=function(t,e,i,n,r,a,o,s,l,u){i===n&&(i+=1);var h,c,p,f,d,g=120*Math.PI/180,v=Math.PI/180*(+r||0),y=[],m=function(t,e,i){var n=t*Math.cos(i)-e*Math.sin(i),r=t*Math.sin(i)+e*Math.cos(i);return{x:n,y:r}};if(u)c=u[0],p=u[1],f=u[2],d=u[3];else{h=m(t,e,-v),t=h.x,e=h.y,h=m(s,l,-v),s=h.x,l=h.y,t===s&&e===l&&(s+=1,l+=1);var x=(t-s)/2,b=(e-l)/2,_=x*x/(i*i)+b*b/(n*n);_>1&&(_=Math.sqrt(_),i*=_,n*=_);var w=i*i,M=n*n,S=(a===o?-1:1)*Math.sqrt(Math.abs((w*M-w*b*b-M*x*x)/(w*b*b+M*x*x)));f=S*i*b/n+(t+s)/2,d=S*-n*x/i+(e+l)/2,c=Math.asin(Number(((e-d)/n).toFixed(9))),p=Math.asin(Number(((l-d)/n).toFixed(9))),c=t<f?Math.PI-c:c,p=s<f?Math.PI-p:p,c<0&&(c=2*Math.PI+c),p<0&&(p=2*Math.PI+p),o&&c>p&&(c-=2*Math.PI),!o&&p>c&&(p-=2*Math.PI)}var k=p-c;if(Math.abs(k)>g){var O=p,C=s,A=l;p=c+g*(o&&p>c?1:-1),s=f+i*Math.cos(p),l=d+n*Math.sin(p),y=Nt(s,l,i,n,r,0,o,C,A,[p,O,f,d])}k=p-c;var L=Math.cos(c),P=Math.sin(c),j=Math.cos(p),T=Math.sin(p),B=Math.tan(k/4),I=4/3*i*B,D=4/3*n*B,F=[t,e],E=[t+I*P,e-D*L],R=[s+I*T,l-D*j],z=[s,l];if(E[0]=2*F[0]-E[0],E[1]=2*F[1]-E[1],u)return[E,R,z].concat(y);y=[E,R,z].concat(y).join().split(",");for(var N=[],Y=0,H=y.length;Y<H;Y++)N[Y]=Y%2?m(y[Y-1],y[Y],v).y:m(y[Y],y[Y+1],v).x;return N},Yt=function(t,e,i,n){return[t,e,i,n,i,n]},Ht=function(t,e,i,n,r,a){var o=1/3,s=2/3;return[o*t+s*i,o*e+s*n,o*r+s*i,o*a+s*n,r,a]};function Gt(t,e){var i,n=zt(t),r=e&&zt(e),a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s=[],l=[],u="",h="",c=function(t,e,i){var n,r;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"].concat(Nt.apply(0,[e.x,e.y].concat(t.slice(1))));break;case"S":"C"===i||"S"===i?(n=2*e.x-e.bx,r=2*e.y-e.by):(n=e.x,r=e.y),t=["C",n,r].concat(t.slice(1));break;case"T":"Q"===i||"T"===i?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"].concat(Ht(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"].concat(Ht(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"].concat(Yt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"].concat(Yt(e.x,e.y,t[1],e.y));break;case"V":t=["C"].concat(Yt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"].concat(Yt(e.x,e.y,e.X,e.Y));break;default:break}return t},p=function(t,e){if(t[e].length>7){t[e].shift();var a=t[e];while(a.length)s[e]="A",r&&(l[e]="A"),t.splice(e++,0,["C"].concat(a.splice(0,6)));t.splice(e,1),i=Math.max(n.length,r&&r.length||0)}},f=function(t,e,a,o,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),a.bx=0,a.by=0,a.x=t[s][1],a.y=t[s][2],i=Math.max(n.length,r&&r.length||0))};i=Math.max(n.length,r&&r.length||0);for(var d=0;d<i;d++){n[d]&&(u=n[d][0]),"C"!==u&&(s[d]=u,d&&(h=s[d-1])),n[d]=c(n[d],a,h),"A"!==s[d]&&"C"===u&&(s[d]="C"),p(n,d),r&&(r[d]&&(u=r[d][0]),"C"!==u&&(l[d]=u,d&&(h=l[d-1])),r[d]=c(r[d],o,h),"A"!==l[d]&&"C"===u&&(l[d]="C"),p(r,d)),f(n,r,a,o,d),f(r,n,o,a,d);var g=n[d],v=r&&r[d],y=g.length,m=r&&v.length;a.x=g[y-2],a.y=g[y-1],a.bx=parseFloat(g[y-4])||a.x,a.by=parseFloat(g[y-3])||a.y,o.bx=r&&(parseFloat(v[m-4])||o.x),o.by=r&&(parseFloat(v[m-3])||o.y),o.x=r&&v[m-2],o.y=r&&v[m-1]}return r?[n,r]:n}i("df017"),i("3753");function Wt(t,e,i){return{delay:E["isFunction"](t.delay)?t.delay(e,i):t.delay,easing:E["isFunction"](t.easing)?t.easing(e,i):t.easing,duration:E["isFunction"](t.duration)?t.duration(e,i):t.duration,callback:t.callback}}function Xt(t){var e=t.start,i=t.end;return{start:e,end:i,width:t.getWidth(),height:t.getWidth()}}function Vt(t){var e,i=t.start,n=t.end,r=t.width,a=t.height,o=200;if(t.isPolar){var s=t.startAngle,l=t.endAngle,u=t.getCenter(),h=t.getRadius();e=new F["Shapes"].Fan({attrs:{x:u.x,y:u.y,rs:0,re:h+o,startAngle:s,endAngle:s}}),e.endState={endAngle:l}}else e=new F["Shapes"].Rect({attrs:{x:i.x-o,y:n.y-o,width:t.isTransposed?r+2*o:0,height:t.isTransposed?0:a+2*o}}),t.isTransposed?e.endState={height:a+2*o}:e.endState={width:r+2*o};return e.set("isClip",!0),e}function qt(t,e,i){var n;t.apply(e);var r=e[0],a=e[1];if("x"===i){t.transform([["t",-r,-a],["s",.01,1],["t",r,a]]);var o=t.getMatrix();n=wt.transform(o,[["t",-r,-a],["s",100,1],["t",r,a]])}else if("y"===i){t.transform([["t",-r,-a],["s",1,.01],["t",r,a]]);o=t.getMatrix();n=wt.transform(o,[["t",-r,-a],["s",1,100],["t",r,a]])}else if("xy"===i){t.transform([["t",-r,-a],["s",.01,.01],["t",r,a]]);o=t.getMatrix();n=wt.transform(o,[["t",-r,-a],["s",100,100],["t",r,a]])}return n}function Ut(t,e,i){var n=t.id,r=t.get("index"),a=Wt(i,r,n),o=a.easing,s=a.delay,l=a.duration,u=a.callback;t.animate(e,l,o,u,s)}function Zt(t,e,i,n,r){var a,o,s=Xt(i),l=s.start,u=s.end,h=s.width,c=s.height,p=new F["Shapes"].Rect({attrs:{x:l.x,y:u.y,width:h,height:c}});"y"===r?(a=l.x+h/2,o=n.y<l.y?n.y:l.y):"x"===r?(a=n.x>l.x?n.x:l.x,o=l.y+c/2):"xy"===r&&(i.isPolar?(a=i.getCenter().x,o=i.getCenter().y):(a=(l.x+u.x)/2,o=(l.y+u.y)/2));var f=qt(p,[a,o,1],r);p.set("isClip",!0),p.set("canvas",t.get("canvas")),t.attr("clip",p),e.callback=function(){t.attr("clip",null),p.remove()},Ut(p,{matrix:f},e)}function Qt(t){if(E["isEmpty"](t))return null;var e=t[0].x,i=t[0].x,n=t[0].y,r=t[0].y;return E["each"](t,(function(t){e=e>t.x?t.x:e,i=i<t.x?t.x:i,n=n>t.y?t.y:n,r=r<t.y?t.y:r})),{minX:e,maxX:i,minY:n,maxY:r,centerX:(e+i)/2,centerY:(n+r)/2}}function $t(t,e){var i,n,r=t.points||t.get("origin").points,a=Qt(r),o=e.startAngle,s=e.endAngle,l=s-o;return e.isTransposed?(i=a.maxY*l,n=a.minY*l):(i=a.maxX*l,n=a.minX*l),i+=o,n+=o,{startAngle:n,endAngle:i}}function Kt(t,e){var i=t.getBBox(),n=t.get("origin").points,r=(i.minX+i.maxX)/2,a=n[0].y-n[1].y<=0?i.maxY:i.minY,o={matrix:qt(t,[r,a,1],"y")};Ut(t,o,e)}function Jt(t,e){var i=t.getBBox(),n=t.get("origin").points,r=n[0].y-n[1].y>0?i.maxX:i.minX,a=(i.minY+i.maxY)/2,o={matrix:qt(t,[r,a,1],"x")};Ut(t,o,e)}function te(t,e){var i={lineWidth:0,opacity:0};e.callback=function(){return t.remove()},Ut(t,i,e)}function ee(t,e,i){var n,r;if(i.isPolar&&"point"!==t.name)n=i.getCenter().x,r=i.getCenter().y;else{var a=t.getBBox();n=(a.minX+a.maxX)/2,r=(a.minY+a.maxY)/2}var o={matrix:qt(t,[n,r,1],"xy")};Ut(t,o,e)}function ie(t,e,i){var n,r;if(i.isPolar&&"point"!==t.name)n=i.getCenter().x,r=i.getCenter().y;else{var a=t.getBBox();n=(a.minX+a.maxX)/2,r=(a.minY+a.maxY)/2}var o=[n,r,1];t.apply(o);var s={transform:[["t",-n,-r],["s",.01,.01],["t",n,r]]};e.callback=function(){return t.remove()},Ut(t,s,e)}function ne(t,e){if("path"===t.get("type")){var i=Gt(t.attr("path"));t.attr("path",[i[0]]);var n={path:i};Ut(t,n,e)}}function re(t,e){if("path"===t.get("type")){var i=Gt(t.attr("path")),n={path:[i[0]]};e.callback=function(){return t.remove()},Ut(t,n,e)}}function ae(t,e,i,n,r){var a,o=Vt(i),s=t.get("canvas");n?(o.attr("startAngle",n),o.attr("endAngle",n),a={endAngle:r}):a=o.endState,o.set("canvas",s),t.attr("clip",o),t.setSilent("animating",!0),e.callback=function(){t&&!t.get("destroyed")&&(t.attr("clip",null),t.setSilent("cacheShape",null),t.setSilent("animating",!1),o.remove())},Ut(o,a,e)}function oe(t,e){var i=E["isNil"](t.attr("fillOpacity"))?1:t.attr("fillOpacity"),n=E["isNil"](t.attr("strokeOpacity"))?1:t.attr("strokeOpacity");t.attr("fillOpacity",0),t.attr("strokeOpacity",0);var r={fillOpacity:i,strokeOpacity:n};Ut(t,r,e)}function se(t,e){var i={fillOpacity:0,strokeOpacity:0};e.callback=function(){return t.remove()},Ut(t,i,e)}function le(t,e,i){var n=$t(t,i),r=n.startAngle,a=n.endAngle;ae(t,e,i,r,a)}function ue(t,e,i,n){Zt(t,e,i,n,"x")}function he(t,e,i,n){Zt(t,e,i,n,"y")}function ce(t,e,i,n){Zt(t,e,i,n,"xy")}function pe(t,e,i){var n=Vt(i);n.set("canvas",t.get("canvas")),t.attr("clip",n),e.callback=function(){t.attr("clip",null),n.remove()};var r=n.endState;Ut(n,r,e)}var fe={enter:{clipIn:ae,zoomIn:ee,pathIn:ne,scaleInY:Kt,scaleInX:Jt,fanIn:le,fadeIn:oe},leave:{lineWidthOut:te,zoomOut:ie,pathOut:re,fadeOut:se,fadeIn:oe},appear:{clipIn:ae,zoomIn:ee,pathIn:ne,scaleInY:Kt,scaleInX:Jt,fanIn:le,fadeIn:oe,groupWaveIn:pe,groupScaleInX:ue,groupScaleInY:he,groupScaleInXY:ce},update:{fadeIn:oe,fanIn:le}};E["each"](fe,(function(t){E["each"](t,(function(t,e){t.animationName=e}))}));var de=fe,ge={appear:{duration:450,easing:"easeQuadOut"},update:{duration:450,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut",delay:100},leave:{duration:350,easing:"easeQuadIn"}},ve={line:{appear:function(){return de.appear.groupWaveIn},enter:function(){return de.enter.clipIn},leave:function(){return de.leave.lineWidthOut}},path:{appear:function(){return de.appear.groupWaveIn},enter:function(){return de.enter.clipIn},leave:function(){return de.leave.lineWidthOut}},area:{appear:function(){return de.appear.groupWaveIn},enter:function(){return de.enter.fadeIn},leave:function(){return de.leave.fadeOut},cfg:{appear:{duration:500,easing:"easeQuadOut"},update:{duration:450,easing:"easeQuadInOut"},enter:{duration:600,delay:150,easing:"easeQuadInOut"},leave:{easing:"easeQuadOut",duration:350}}},polygon:{appear:function(){return de.appear.fadeIn},enter:function(){return de.enter.zoomIn},leave:function(){return de.leave.zoomOut}},edge:{appear:function(){return de.appear.pathIn},enter:function(){return de.enter.pathIn},leave:function(){return de.leave.pathOut}},interval:{appear:function(t){var e;return t.isPolar?(e=de.appear.groupScaleInXY,t.isTransposed&&(e=de.appear.groupWaveIn)):e=t.isTransposed?de.appear.groupScaleInX:de.appear.groupScaleInY,e},enter:function(t){return t.isRect||t.isTransposed||"theta"===t.type?de.enter.fadeIn:de.enter.zoomIn},leave:function(){return de.leave.fadeOut},update:function(t){if("theta"===t.type)return de.update.fanIn}},point:{appear:function(){return de.appear.zoomIn},enter:function(){return de.enter.zoomIn},leave:function(){return de.leave.zoomOut}},text:{appear:function(){return de.appear.zoomIn},enter:function(){return de.enter.zoomIn},leave:function(){return de.leave.zoomOut}},kline:{appear:function(){return de.appear.groupWaveIn},enter:function(){return de.enter.clipIn},leave:function(){return de.leave.lineWidthOut}},box:{appear:function(){return de.appear.groupWaveIn},enter:function(){return de.enter.clipIn},leave:function(){return de.leave.lineWidthOut}},heatmap:null,label:{appear:function(){return de.appear.fadeIn},enter:function(){return de.enter.fadeIn},leave:function(){return de.leave.fadeOut},cfg:{appear:{duration:900}}},"axis-label":{enter:function(){return de.appear.fadeIn},leave:function(){return de.leave.fadeOut},update:function(t){if(t.isPolar)return de.appear.fadeIn}},"axis-ticks":{enter:function(){return de.appear.fadeIn},leave:function(){return de.leave.fadeOut},update:function(t){if(t.isPolar)return de.appear.fadeIn}},"axis-grid":{enter:function(){return de.appear.fadeIn},leave:function(){return de.leave.fadeOut},update:function(t){if(t.isPolar)return de.appear.fadeIn}},"axis-grid-rect":{enter:function(){return de.appear.fadeIn},leave:function(){return de.leave.fadeOut},update:function(){return de.leave.fadeIn}}};ve.Action=de,ve.defaultCfg=ge,ve.getAnimation=function(t,e,i){var n=this[t];if(n){var r=n[i];if(E["isFunction"](r))return r(e)}return!1},ve.getAnimateCfg=function(t,e){var i=ge[e];return this[t]&&this[t].cfg&&this[t].cfg[e]?E["deepMix"]({},i,this[t].cfg[e]):i},ve.registerAnimation=function(t,e,i){this.Action[t]||(this.Action[t]={}),this.Action[t][e]=i};var ye=ve;function me(t,e){var i=[];if(!1===t.get("animate"))return[];var n=t.get("children");return E["each"](n,(function(t){if(t.isGroup)i=i.concat(me(t,e));else if(t.isShape&&t.id){var n=t.id;n=n.split("-")[0],n===e&&i.push(t)}})),i}function xe(t){var e={};return E["each"](t,(function(t){if(t.id&&!t.get("isClip")){var i=t.id;e[i]={id:i,type:t.get("type"),attrs:E["clone"](t.attr()),name:t.name,index:t.get("index"),animateCfg:t.get("animateOptions"),coord:t.get("coord")}}})),e}function be(t,e,i,n){var r={};return r=n?ye.Action[i][n]:ye.getAnimation(t,e,i),r}function _e(t,e,i){if(!1===i||E["isObject"](i)&&!1===i[e])return null;var n=ye.getAnimateCfg(t,e);return i&&i[e]?E["deepMix"]({},n,i[e]):n}function we(t,e,i){var n,r,a=!1,o=[],s=[];return E["each"](e,(function(e){var i=t[e.id];i?(e.setSilent("cacheShape",i),o.push(e),delete t[e.id]):s.push(e)})),E["each"](t,(function(t){var e=t.name,o=t.coord,s=t.id,l=t.attrs,u=t.index,h=t.type;if(r=_e(e,"leave",t.animateCfg),!r)return!0;if(n=be(e,o,"leave",r.animation),E["isFunction"](n)){var c=i.addShape(h,{attrs:l,index:u});if(c.id=s,c.name=e,o&&"label"!==e){var p=c.getMatrix(),f=wt.multiply([],p,o.matrix);c.setMatrix(f)}a=!0,n(c,r,o)}})),E["each"](o,(function(t){var e=t.name;if(r=_e(e,"update",t.get("animateOptions")),!r)return!0;var i=t.get("coord"),o=t.get("cacheShape").attrs;if(!E["isEqual"](o,t.attr())){if(n=be(e,i,"update",r.animation),E["isFunction"](n))n(t,r,i);else{var s=E["clone"](t.attr());t.attr(o),t.animate(s,r.duration,r.easing,(function(){t.setSilent("cacheShape",null)}))}a=!0}})),E["each"](s,(function(t){var e=t.name,i=t.get("coord");if(r=_e(e,"enter",t.get("animateOptions")),!r)return!0;n=be(e,i,"enter",r.animation),E["isFunction"](n)&&(n(t,r,i),a=!0)})),a}function Me(t,e){var i=e,n=t.get("panelGroup"),r=t.get("backgroundGroup"),a=t.get("id"),o=t.get("canvas"),s=o.get(a+"caches")||[];0===s.length&&(i=!1);var l,u=me(n,a),h=me(r,a),c=u.concat(h);if(o.setSilent(a+"caches",xe(c)),i)l=we(s,c,o);else{var p,f,d=t.get("elements"),g=t.get("coord");E["each"](d,(function(t){var e=t.get("type"),i=t.get("animateOptions");if(!1!==i){if(p=_e(e,"appear",i),!p)return!0;if(f=be(e,g,"appear",p.animation),E["isFunction"](f))if(0===f.animationName.indexOf("group")){var n=t.getYScale(),r=g.convertPoint({x:0,y:n.scale(t.getYMinValue())}),o=t.get("container");f&&f(o,p,g,r)}else{var s=me(t.get("container"),a);E["each"](s,(function(t){t.name===e?f(t,p,g):"label"===t.name&&(p=_e("label","appear",null),f=be(t.name,g,"appear",p.animation),E["isFunction"](f)&&f(t,p,g))}))}}})),l=!0}l||o.draw()}var Se={execAnimation:Me},ke=i("e945"),Oe={};function Ce(t){return Oe[t]}function Ae(t,e){Oe[t]=e}var Le=function(){function t(t){this.type="base",this.isCategory=!1,this.isLinear=!1,this.isContinuous=!1,this.isIdentity=!1,this.values=[],this.range=[0,1],this.ticks=[],this.__cfg__=t,this.initCfg(),this.init()}return t.prototype.translate=function(t){return t},t.prototype.change=function(t){Object(E["assign"])(this.__cfg__,t),this.init()},t.prototype.clone=function(){return this.constructor(this.__cfg__)},t.prototype.getTicks=function(){var t=this;return Object(E["map"])(this.ticks,(function(e,i){return Object(E["isObject"])(e)?e:{text:t.getText(e,i),tickValue:e,value:t.scale(e)}}))},t.prototype.getText=function(t,e){var i=this.formatter,n=i?i(t,e):t;return Object(E["isNil"])(n)||!Object(E["isFunction"])(n.toString)?"":n.toString()},t.prototype.getConfig=function(t){return this.__cfg__[t]},t.prototype.init=function(){Object(E["assign"])(this,this.__cfg__),this.setDomain(),Object(E["isEmpty"])(this.getConfig("ticks"))&&(this.ticks=this.calculateTicks())},t.prototype.initCfg=function(){},t.prototype.setDomain=function(){},t.prototype.calculateTicks=function(){var t=this.tickMethod,e=[];if(Object(E["isString"])(t)){var i=Ce(t);if(!i)throw new Error("There is no method to to calculate ticks!");e=i(this)}else Object(E["isFunction"])(t)&&(e=t(this));return e},t.prototype.rangeMin=function(){return Object(E["head"])(this.range)},t.prototype.rangeMax=function(){return Object(E["last"])(this.range)},t.prototype.calcPercent=function(t,e,i){return Object(E["isNumber"])(t)?(t-e)/(i-e):NaN},t.prototype.calcValue=function(t,e,i){return e+t*(i-e)},t}(),Pe=Le,je=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cat",e.isCategory=!0,e}return Object(B["__extends"])(e,t),e.prototype.translate=function(t){var e=Object(E["indexOf"])(this.values,t);return-1===e?Object(E["isNumber"])(t)?t:NaN:e},e.prototype.scale=function(t){var e=this.translate(t);if(e<this.min-.5||e>this.max+.5)return NaN;var i=this.calcPercent(e,this.min,this.max);return this.calcValue(i,this.rangeMin(),this.rangeMax())},e.prototype.invert=function(t){var e=this.max-this.min,i=this.calcPercent(t,this.rangeMin(),this.rangeMax()),n=Math.round(e*i)+this.min;return n<this.min||n>this.max?NaN:this.values[n]},e.prototype.getText=function(e){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var r=e;return Object(E["isNumber"])(e)&&!this.values.includes(e)&&(r=this.values[r]),t.prototype.getText.apply(this,Object(B["__spreadArrays"])([r],i))},e.prototype.initCfg=function(){this.tickMethod="cat"},e.prototype.setDomain=function(){if(Object(E["isNil"])(this.getConfig("min"))&&(this.min=0),Object(E["isNil"])(this.getConfig("max"))){var t=this.values.length;this.max=t>1?t-1:t}},e}(Pe),Te=je,Be={},Ie=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,De="\\d\\d?",Fe="\\d{3}",Ee="\\d{4}",Re="[^\\s]+",ze=/\[([^]*?)\]/gm,Ne=function(){};function Ye(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")}function He(t,e){for(var i=[],n=0,r=t.length;n<r;n++)i.push(t[n].substr(0,e));return i}function Ge(t){return function(e,i,n){var r=n[t].indexOf(i.charAt(0).toUpperCase()+i.substr(1).toLowerCase());~r&&(e.month=r)}}function We(t,e){t=String(t),e=e||2;while(t.length<e)t="0"+t;return t}var Xe=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ve=["January","February","March","April","May","June","July","August","September","October","November","December"],qe=He(Ve,3),Ue=He(Xe,3);Be.i18n={dayNamesShort:Ue,dayNames:Xe,monthNamesShort:qe,monthNames:Ve,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10)*t%10]}};var Ze={D:function(t){return t.getDate()},DD:function(t){return We(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return t.getDay()},dd:function(t){return We(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return t.getMonth()+1},MM:function(t){return We(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return We(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return We(t.getFullYear(),4)},h:function(t){return t.getHours()%12||12},hh:function(t){return We(t.getHours()%12||12)},H:function(t){return t.getHours()},HH:function(t){return We(t.getHours())},m:function(t){return t.getMinutes()},mm:function(t){return We(t.getMinutes())},s:function(t){return t.getSeconds()},ss:function(t){return We(t.getSeconds())},S:function(t){return Math.round(t.getMilliseconds()/100)},SS:function(t){return We(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return We(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+We(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)}},Qe={D:[De,function(t,e){t.day=e}],Do:[De+Re,function(t,e){t.day=parseInt(e,10)}],M:[De,function(t,e){t.month=e-1}],YY:[De,function(t,e){var i=new Date,n=+(""+i.getFullYear()).substr(0,2);t.year=""+(e>68?n-1:n)+e}],h:[De,function(t,e){t.hour=e}],m:[De,function(t,e){t.minute=e}],s:[De,function(t,e){t.second=e}],YYYY:[Ee,function(t,e){t.year=e}],S:["\\d",function(t,e){t.millisecond=100*e}],SS:["\\d{2}",function(t,e){t.millisecond=10*e}],SSS:[Fe,function(t,e){t.millisecond=e}],d:[De,Ne],ddd:[Re,Ne],MMM:[Re,Ge("monthNamesShort")],MMMM:[Re,Ge("monthNames")],a:[Re,function(t,e,i){var n=e.toLowerCase();n===i.amPm[0]?t.isPm=!1:n===i.amPm[1]&&(t.isPm=!0)}],ZZ:["[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z",function(t,e){var i,n=(e+"").match(/([+-]|\d\d)/gi);n&&(i=60*n[1]+parseInt(n[2],10),t.timezoneOffset="+"===n[0]?i:-i)}]};Qe.dd=Qe.d,Qe.dddd=Qe.ddd,Qe.DD=Qe.D,Qe.mm=Qe.m,Qe.hh=Qe.H=Qe.HH=Qe.h,Qe.MM=Qe.M,Qe.ss=Qe.s,Qe.A=Qe.a,Be.masks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},Be.format=function(t,e,i){var n=i||Be.i18n;if("number"===typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date in fecha.format");e=Be.masks[e]||e||Be.masks["default"];var r=[];return e=e.replace(ze,(function(t,e){return r.push(e),"@@@"})),e=e.replace(Ie,(function(e){return e in Ze?Ze[e](t,n):e.slice(1,e.length-1)})),e.replace(/@@@/g,(function(){return r.shift()}))},Be.parse=function(t,e,i){var n=i||Be.i18n;if("string"!==typeof e)throw new Error("Invalid format in fecha.parse");if(e=Be.masks[e]||e,t.length>1e3)return null;var r={},a=[],o=[];e=e.replace(ze,(function(t,e){return o.push(e),"@@@"}));var s=Ye(e).replace(Ie,(function(t){if(Qe[t]){var e=Qe[t];return a.push(e[1]),"("+e[0]+")"}return t}));s=s.replace(/@@@/g,(function(){return o.shift()}));var l=t.match(new RegExp(s,"i"));if(!l)return null;for(var u=1;u<l.length;u++)a[u-1](r,l[u],n);var h,c=new Date;return!0===r.isPm&&null!=r.hour&&12!==+r.hour?r.hour=+r.hour+12:!1===r.isPm&&12===+r.hour&&(r.hour=0),null!=r.timezoneOffset?(r.minute=+(r.minute||0)-+r.timezoneOffset,h=new Date(Date.UTC(r.year||c.getFullYear(),r.month||0,r.day||1,r.hour||0,r.minute||0,r.second||0,r.millisecond||0))):h=new Date(r.year||c.getFullYear(),r.month||0,r.day||1,r.hour||0,r.minute||0,r.second||0,r.millisecond||0),h};var $e=Be,Ke=function(t){return function(e,i,n,r){var a=Object(E["isNil"])(n)?0:n,o=Object(E["isNil"])(r)?e.length:r;while(a<o){var s=a+o>>>1;t(e[s])>i?o=s:a=s+1}return a}},Je="format";function ti(t,e){var i=n[Je]||$e[Je];return i(t,e)}function ei(t){return Object(E["isString"])(t)&&(t=t.indexOf("T")>0?new Date(t).getTime():new Date(t.replace(/-/gi,"/")).getTime()),Object(E["isDate"])(t)&&(t=t.getTime()),t}var ii=1e3,ni=60*ii,ri=60*ni,ai=24*ri,oi=31*ai,si=365*ai,li=[["HH:mm:ss",ii],["HH:mm:ss",10*ii],["HH:mm:ss",30*ii],["HH:mm",ni],["HH:mm",10*ni],["HH:mm",30*ni],["HH",ri],["HH",6*ri],["HH",12*ri],["YYYY-MM-DD",ai],["YYYY-MM-DD",4*ai],["YYYY-WW",7*ai],["YYYY-MM",oi],["YYYY-MM",4*oi],["YYYY-MM",6*oi],["YYYY",380*ai]];function ui(t,e,i){var n=(e-t)/i,r=Ke((function(t){return t[1]}))(li,n)-1,a=li[r];return r<0?a=li[0]:r>=li.length&&(a=Object(E["last"])(li)),a}var hi=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.translate=function(t){t=ei(t);var e=this.values.indexOf(t);return-1===e&&(e=Object(E["isNumber"])(t)&&t<this.values.length?t:NaN),e},e.prototype.getText=function(t,e){var i=this.translate(t);if(i>-1){var n=this.values[i],r=this.formatter;return n=r?r(n,e):ti(n,this.mask),n}return t},e.prototype.initCfg=function(){this.tickMethod="time-cat",this.mask="YYYY-MM-DD",this.tickCount=7},e.prototype.setDomain=function(){var e=this.values;Object(E["each"])(e,(function(t,i){e[i]=ei(t)})),e.sort((function(t,e){return t-e})),t.prototype.setDomain.call(this)},e}(Te),ci=hi,pi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isContinuous=!0,e}return Object(B["__extends"])(e,t),e.prototype.scale=function(t){if(Object(E["isNil"])(t))return NaN;var e=this.rangeMin(),i=this.rangeMax(),n=this.max,r=this.min;if(n===r)return e;var a=this.getScalePercent(t);return e+a*(i-e)},e.prototype.init=function(){t.prototype.init.call(this);var e=this.ticks,i=Object(E["head"])(e),n=Object(E["last"])(e);i<this.min&&(this.min=i),n>this.max&&(this.max=n)},e.prototype.setDomain=function(){var t=Object(E["getRange"])(this.values),e=t.min,i=t.max;Object(E["isNil"])(this.min)&&(this.min=e),Object(E["isNil"])(this.max)&&(this.max=i),this.min>this.max&&(this.min=e,this.max=i)},e.prototype.calculateTicks=function(){var e=this,i=t.prototype.calculateTicks.call(this);return this.nice||(i=Object(E["filter"])(i,(function(t){return t>=e.min&&t<=e.max}))),i},e.prototype.getScalePercent=function(t){var e=this.max,i=this.min;return(t-i)/(e-i)},e.prototype.getInvertPercent=function(t){return(t-this.rangeMin())/(this.rangeMax()-this.rangeMin())},e}(Pe),fi=pi,di=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="linear",e.isLinear=!0,e}return Object(B["__extends"])(e,t),e.prototype.invert=function(t){var e=this.getInvertPercent(t);return this.min+e*(this.max-this.min)},e.prototype.initCfg=function(){this.tickMethod="wilkinson-extended",this.nice=!1},e}(fi),gi=di;function vi(t,e){var i,n=Math.E;return i=e>=0?Math.pow(n,Math.log(e)/t):-1*Math.pow(n,Math.log(-e)/t),i}function yi(t,e){return 1===t?1:Math.log(e)/Math.log(t)}function mi(t,e,i){Object(E["isNil"])(i)&&(i=Math.max.apply(null,t));var n=i;return Object(E["each"])(t,(function(t){t>0&&t<n&&(n=t)})),n===i&&(n=i/e),n>1&&(n=1),n}var xi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e}return Object(B["__extends"])(e,t),e.prototype.invert=function(t){var e,i=this.base,n=yi(i,this.max),r=this.rangeMin(),a=this.rangeMax()-r,o=this.positiveMin;if(o){if(0===t)return 0;e=yi(i,o/i);var s=1/(n-e)*a;if(t<s)return t/s*o}else e=yi(i,this.min);var l=(t-r)/a,u=l*(n-e)+e;return Math.pow(i,u)},e.prototype.initCfg=function(){this.tickMethod="log",this.base=10,this.tickCount=6,this.nice=!0},e.prototype.setDomain=function(){t.prototype.setDomain.call(this);var e=this.min;if(e<0)throw new Error("When you use log scale, the minimum value must be greater than zero!");0===e&&(this.positiveMin=mi(this.values,this.base,this.max))},e.prototype.getScalePercent=function(t){var e=this.max,i=this.min;if(e===i)return 0;if(t<=0)return 0;var n,r=this.base,a=this.positiveMin;return a&&(i=1*a/r),n=t<a?t/a/(yi(r,e)-yi(r,i)):(yi(r,t)-yi(r,i))/(yi(r,e)-yi(r,i)),n},e}(fi),bi=xi,_i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pow",e}return Object(B["__extends"])(e,t),e.prototype.invert=function(t){var e=this.getInvertPercent(t),i=this.exponent,n=vi(i,this.max),r=vi(i,this.min),a=e*(n-r)+r,o=a>=0?1:-1;return Math.pow(a,i)*o},e.prototype.initCfg=function(){this.tickMethod="pow",this.exponent=2,this.tickCount=5,this.nice=!0},e.prototype.getScalePercent=function(t){var e=this.max,i=this.min;if(e===i)return 0;var n=this.exponent,r=(vi(n,t)-vi(n,i))/(vi(n,e)-vi(n,i));return r},e}(fi),wi=_i,Mi=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="time",e}return Object(B["__extends"])(e,t),e.prototype.getText=function(t,e){var i=this.translate(t),n=this.formatter;return n?n(i,e):ti(i,this.mask)},e.prototype.scale=function(e){var i=e;return(Object(E["isString"])(i)||Object(E["isDate"])(i))&&(i=this.translate(i)),t.prototype.scale.call(this,i)},e.prototype.translate=function(t){return ei(t)},e.prototype.initCfg=function(){this.tickMethod="time-pretty",this.mask="YYYY-MM-DD",this.tickCount=7,this.nice=!1},e.prototype.setDomain=function(){var t=this.values,e=this.getConfig("min"),i=this.getConfig("max");if(Object(E["isNil"])(e)&&Object(E["isNumber"])(e)||(this.min=this.translate(this.min)),Object(E["isNil"])(i)&&Object(E["isNumber"])(i)||(this.max=this.translate(this.max)),t&&t.length){var n=[],r=1/0,a=r,o=0;Object(E["each"])(t,(function(t){var e=ei(t);if(isNaN(e))throw new TypeError("Invalid Time: "+t+" in time scale!");r>e?(a=r,r=e):a>e&&(a=e),o<e&&(o=e),n.push(e)})),t.length>1&&(this.minTickInterval=a-r),Object(E["isNil"])(e)&&(this.min=r),Object(E["isNil"])(i)&&(this.max=o)}},e}(gi),Si=Mi,ki=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantize",e}return Object(B["__extends"])(e,t),e.prototype.invert=function(t){var e=this.ticks,i=e.length,n=this.getInvertPercent(t),r=Math.floor(n*(i-1));if(r>=i-1)return Object(E["last"])(e);if(r<0)return Object(E["head"])(e);var a=e[r],o=e[r+1],s=r/(i-1),l=(r+1)/(i-1);return a+(n-s)/(l-s)*(o-a)},e.prototype.initCfg=function(){this.tickMethod="r-pretty",this.tickCount=5,this.nice=!0},e.prototype.calculateTicks=function(){var e=t.prototype.calculateTicks.call(this);return this.nice||(Object(E["last"])(e)!==this.max&&e.push(this.max),Object(E["head"])(e)!==this.min&&e.unshift(this.min)),e},e.prototype.getScalePercent=function(t){var e=this.ticks;if(t<Object(E["head"])(e))return 0;if(t>Object(E["last"])(e))return 1;var i=0;return Object(E["each"])(e,(function(e,n){if(!(t>=e))return!1;i=n})),i/(e.length-1)},e}(fi),Oi=ki,Ci=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantile",e}return Object(B["__extends"])(e,t),e.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},e}(Oi),Ai=Ci,Li={};function Pi(t){return Li[t]}function ji(t,e){if(Pi(t))throw new Error("type '"+t+"' existed.");Li[t]=e}var Ti=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="identity",e.isIdentity=!0,e}return Object(B["__extends"])(e,t),e.prototype.calculateTicks=function(){return this.values},e.prototype.scale=function(t){return this.values[0]!==t&&Object(E["isNumber"])(t)?t:this.range[0]},e.prototype.invert=function(t){var e=this.range;return t<e[0]||t>e[1]?NaN:this.values[0]},e}(Pe),Bi=Ti,Ii=[1,5,2,2.5,4,3],Di=100*Number.EPSILON;function Fi(t,e){return(t%e+e)%e}function Ei(t,e,i,n,r,a){var o=Object(E["size"])(e),s=Object(E["indexOf"])(e,t),l=0,u=Fi(n,a);return(u<Di||a-u<Di)&&n<=0&&r>=0&&(l=1),1-s/(o-1)-i+l}function Ri(t,e,i){var n=Object(E["size"])(e),r=Object(E["indexOf"])(e,t),a=1;return 1-r/(n-1)-i+a}function zi(t,e,i,n,r,a){var o=(t-1)/(a-r),s=(e-1)/(Math.max(a,n)-Math.min(i,r));return 2-Math.max(o/s,s/o)}function Ni(t,e){return t>=e?2-(t-1)/(e-1):1}function Yi(t,e,i,n){var r=e-t;return 1-.5*(Math.pow(e-n,2)+Math.pow(t-i,2))/Math.pow(.1*r,2)}function Hi(t,e,i){var n=e-t;if(i>n){var r=(i-n)/2;return 1-Math.pow(r,2)/Math.pow(.1*n,2)}return 1}function Gi(){return 1}function Wi(t,e,i,n,r,a){if(void 0===i&&(i=5),void 0===n&&(n=!0),void 0===r&&(r=Ii),void 0===a&&(a=[.25,.2,.5,.05]),t===e||1===i)return{min:t,max:e,ticks:[t]};var o={score:-2,lmin:0,lmax:0,lstep:0},s=1;while(s<1/0){for(var l=0,u=r;l<u.length;l++){var h=u[l],c=Ri(h,r,s);if(Number.isNaN(c))throw new Error("NaN");if(a[0]*c+a[1]+a[2]+a[3]<o.score){s=1/0;break}var p=2;while(p<1/0){var f=Ni(p,i);if(a[0]*c+a[1]+a[2]*f+a[3]<o.score)break;var d=(e-t)/(p+1)/s/h,g=Math.ceil(Math.log10(d));while(g<1/0){var v=s*h*Math.pow(10,g),y=Hi(t,e,v*(p-1));if(a[0]*c+a[1]*y+a[2]*f+a[3]<o.score)break;var m=Math.floor(e/v)*s-(p-1)*s,x=Math.ceil(t/v)*s;if(m>x)g+=1;else{for(var b=m;b<=x;b+=1){var _=b*(v/s),w=_+v*(p-1),M=v,S=Ei(h,r,s,_,w,M),k=Yi(t,e,_,w),O=zi(p,i,t,e,_,w),C=Gi(),A=a[0]*S+a[1]*k+a[2]*O+a[3]*C;A>o.score&&(!n||_<=t&&w>=e)&&(o.lmin=_,o.lmax=w,o.lstep=M,o.score=A)}g+=1}}p+=1}}s+=1}for(var L=Number.isInteger(o.lstep)?0:Math.ceil(Math.abs(Math.log10(o.lstep))),P=[],j=o.lmin;j<=o.lmax;j+=o.lstep)P.push(j);var T=L?Object(E["map"])(P,(function(t){return Number.parseFloat(t.toFixed(L))})):P;return{min:Math.min(t,Object(E["head"])(T)),max:Math.max(e,Object(E["last"])(T)),ticks:T}}function Xi(t){var e=t.values,i=t.tickInterval,n=t.tickCount,r=e;if(Object(E["isNumber"])(i))return Object(E["filter"])(r,(function(t,e){return e%i===0}));var a=t.min,o=t.max;if(Object(E["isNil"])(a)&&(a=0),Object(E["isNil"])(o)&&(o=e.length-1),Object(E["isNumber"])(n)&&n<o-a){var s=Wi(a,o,n,!1,[1,2,5,3,4,7,6,8,9]).ticks,l=Object(E["filter"])(s,(function(t){return t>=a&&t<=o}));return l.map((function(t){return e[t]}))}return e.slice(a,o+1)}function Vi(t,e,i){var n;return n="ceil"===i?Math.ceil(t/e):"floor"===i?Math.floor(t/e):Math.round(t/e),n*e}function qi(t,e,i){var n=Vi(t,i,"floor"),r=Vi(e,i,"ceil");n=Object(E["fixedBase"])(n,i),r=Object(E["fixedBase"])(r,i);for(var a=[],o=n;o<=r;o+=i){var s=Object(E["fixedBase"])(o,i);a.push(s)}return{min:n,max:r,ticks:a}}function Ui(t){var e=t.min,i=t.max,n=t.tickCount,r=t.nice,a=t.tickInterval;return a?qi(e,i,a).ticks:Wi(e,i,n,r).ticks}function Zi(t,e,i){void 0===i&&(i=5);var n={max:0,min:0,ticks:[]},r=1.5,a=.5+1.5*r,o=e-t,s=o/i,l=Math.pow(10,Math.floor(Math.log10(s))),u=l<1?Math.ceil(Math.abs(Math.log10(l))):0,h=l;2*l-s<r*(s-h)&&(h=2*l,5*l-s<a*(s-h)&&(h=5*l,10*l-s<r*(s-h)&&(h=10*l)));var c=Math.ceil(e/h),p=Math.floor(t/h);n.max=Math.max(c*h,e),n.min=Math.min(p*h,t);var f=Number.parseFloat((p*h).toFixed(u));while(f<e)n.ticks.push(f),f+=h,u&&(f=Number.parseFloat(f.toFixed(u)));return n.ticks.push(f),n}function Qi(t){var e=t.min,i=t.max,n=t.tickCount,r=t.tickInterval;return r?qi(e,i,r).ticks:Zi(e,i,n).ticks}function $i(t){var e=t.min,i=t.max,n=t.minTickInterval,r=t.tickInterval,a=t.tickCount;if(r)a=Math.ceil((i-e)/r);else{r=ui(e,i,a)[1];var o=(i-e)/r,s=o/a;s>1&&(r*=Math.ceil(s)),n&&r<n&&(r=n)}for(var l=[],u=e;u<i+r;u+=r)l.push(u);return l}function Ki(t){var e=Xi(t),i=Object(E["last"])(t.values);return i!==Object(E["last"])(e)&&e.push(i),e}function Ji(t){var e,i=t.base,n=t.tickCount,r=t.min,a=t.max,o=t.values,s=yi(i,a);if(r>0)e=Math.floor(yi(i,r));else{var l=mi(o,i,a);e=Math.floor(yi(i,l))}for(var u=s-e,h=Math.ceil(u/n),c=[],p=e;p<s+h;p+=h)c.push(Math.pow(i,p));return r<=0&&c.unshift(0),c}function tn(t){var e=t.exponent,i=t.tickCount,n=Math.ceil(vi(e,t.max)),r=Math.floor(vi(e,t.min)),a=Zi(r,n,i).ticks;return a.map((function(t){var i=t>=0?1:-1;return Math.pow(t,e)*i}))}function en(t,e){var i=t.length*e;return 1===e?t[t.length-1]:0===e?t[0]:i%1!==0?t[Math.ceil(i)-1]:t.length%2===0?(t[i-1]+t[i])/2:t[i]}function nn(t){var e=t.tickCount,i=t.values;if(!i||!i.length)return[];for(var n=i.slice().sort((function(t,e){return t-e})),r=[],a=0;a<e;a++){var o=a/(e-1);r.push(en(n,o))}return r}function rn(t){return new Date(t).getFullYear()}function an(t){return new Date(t,0,1).getTime()}function on(t){return new Date(t).getMonth()}function sn(t,e){var i=rn(t),n=rn(e),r=on(t),a=on(e);return 12*(n-i)+(a-r)%12}function ln(t,e){return new Date(t,e,1).getTime()}function un(t,e){return Math.ceil((e-t)/ai)}function hn(t,e){return Math.ceil((e-t)/ri)}function cn(t,e){return Math.ceil((e-t)/6e4)}function pn(t){var e=t.min,i=t.max,n=t.minTickInterval,r=t.tickInterval,a=t.tickCount,o=[];r||(r=(i-e)/a,n&&r<n&&(r=n));var s=rn(e);if(r>si)for(var l=rn(i),u=Math.ceil(r/si),h=s;h<=l+u;h+=u)o.push(an(h));else if(r>oi){var c=Math.ceil(r/oi),p=on(e),f=sn(e,i);for(h=0;h<=f+c;h+=c)o.push(ln(s,h+p))}else if(r>ai){var d=new Date(e),g=d.getFullYear(),v=d.getMonth(),y=d.getDate(),m=Math.ceil(r/ai),x=un(e,i);for(h=0;h<x+m;h+=m)o.push(new Date(g,v,y+h).getTime())}else if(r>ri){d=new Date(e),g=d.getFullYear(),v=d.getMonth(),m=d.getDate();var b=d.getHours(),_=Math.ceil(r/ri),w=hn(e,i);for(h=0;h<=w+_;h+=_)o.push(new Date(g,v,m,b+h).getTime())}else if(r>ni){var M=cn(e,i),S=Math.ceil(r/ni);for(h=0;h<=M+S;h+=S)o.push(e+h*ni)}else{var k=r;k<ii&&(k=ii);var O=Math.floor(e/ii)*ii,C=Math.ceil((i-e)/ii),A=Math.ceil(k/ii);for(h=0;h<C+A;h+=A)o.push(O+h*ii)}return o}Ae("cat",Xi),Ae("time-cat",Ki),Ae("wilkinson-extended",Ui),Ae("r-pretty",Qi),Ae("time",$i),Ae("time-pretty",pn),Ae("log",Ji),Ae("pow",tn),Ae("quantile",nn),ji("cat",Te),ji("category",Te),ji("identity",Bi),ji("linear",gi),ji("log",bi),ji("pow",wi),ji("time",Si),ji("timeCat",ci),ji("quantize",Oi),ji("quantile",Ai);var fn=0,dn=.5,gn=.5,vn=.05,yn=function(){function t(t){var e=t.xField,i=t.yField,n=t.adjustNames,r=void 0===n?["x","y"]:n;this.adjustNames=r,this.xField=e,this.yField=i}return t.prototype.isAdjust=function(t){return this.adjustNames.indexOf(t)>=0},t.prototype.getAdjustRange=function(t,e,i){var n,r,a=this.yField,o=i.indexOf(e),s=i.length;return!a&&this.isAdjust("y")?(n=0,r=1):s>1?(n=i[0===o?0:o-1],r=i[o===s-1?s-1:o+1],0!==o?n+=(e-n)/2:n-=(r-e)/2,o!==s-1?r-=(r-e)/2:r+=(e-i[s-2])/2):(n=0===e?0:e-.5,r=0===e?1:e+.5),{pre:n,next:r}},t.prototype.adjustData=function(t,e){var i=this,n=this.getDimValues(e);E["each"](t,(function(t,e){E["each"](n,(function(n,r){i.adjustDim(r,n,t,e)}))}))},t.prototype.groupData=function(t,e){return E["each"](t,(function(t){void 0===t[e]&&(t[e]=fn)})),E["groupBy"](t,e)},t.prototype.adjustDim=function(t,e,i,n){},t.prototype.getDimValues=function(t){var e=this,i=e.xField,n=e.yField,r={},a=[];if(i&&this.isAdjust("x")&&a.push(i),n&&this.isAdjust("y")&&a.push(n),a.forEach((function(e){r[e]=E["valuesOfKey"](t,e).sort((function(t,e){return t-e}))})),!n&&this.isAdjust("y")){var o="y";r[o]=[fn,1]}return r},t}(),mn=yn,xn={},bn=function(t){return xn[t.toLowerCase()]},_n=function(t,e){if(bn(t))throw new Error("Adjust type '"+t+"' existed.");xn[t.toLowerCase()]=e},wn=function(t){function e(e){var i=t.call(this,e)||this;i.cacheMap={},i.adjustDataArray=[],i.mergeData=[];var n=e.marginRatio,r=void 0===n?dn:n,a=e.dodgeRatio,o=void 0===a?gn:a,s=e.dodgeBy;return i.marginRatio=r,i.dodgeRatio=o,i.dodgeBy=s,i}return Object(B["__extends"])(e,t),e.prototype.process=function(t){var e=E["clone"](t),i=E["flatten"](e),n=this.dodgeBy,r=n?E["group"](i,n):e;return this.cacheMap={},this.adjustDataArray=r,this.mergeData=i,this.adjustData(r,i),this.adjustDataArray=[],this.mergeData=[],e},e.prototype.adjustDim=function(t,e,i,n){var r=this,a=this.getDistribution(t),o=this.groupData(i,t);return E["each"](o,(function(i,o){var s;s=1===e.length?{pre:e[0]-1,next:e[0]+1}:r.getAdjustRange(t,parseFloat(o),e),E["each"](i,(function(e){var i=e[t],o=a[i],l=o.indexOf(n);e[t]=r.getDodgeOffset(s,l,o.length)}))})),[]},e.prototype.getDodgeOffset=function(t,e,i){var n=this,r=n.dodgeRatio,a=n.marginRatio,o=t.pre,s=t.next,l=s-o,u=l*r/i,h=a*u,c=.5*(l-i*u-(i-1)*h)+((e+1)*u+e*h)-.5*u-.5*l;return(o+s)/2+c},e.prototype.getDistribution=function(t){var e=this.adjustDataArray,i=this.cacheMap,n=i[t];return n||(n={},E["each"](e,(function(e,i){var r=E["valuesOfKey"](e,t);r.length||r.push(0),E["each"](r,(function(t){n[t]||(n[t]=[]),n[t].push(i)}))})),i[t]=n),n},e}(mn),Mn=wn;function Sn(t,e){return(e-t)*Math.random()+t}var kn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.process=function(t){var e=E["clone"](t),i=E["flatten"](e);return this.adjustData(e,i),e},e.prototype.adjustDim=function(t,e,i){var n=this,r=this.groupData(i,t);return E["each"](r,(function(i,r){return n.adjustGroup(i,t,parseFloat(r),e)}))},e.prototype.getAdjustOffset=function(t){var e=t.pre,i=t.next,n=(i-e)*vn;return Sn(e+n,i-n)},e.prototype.adjustGroup=function(t,e,i,n){var r=this,a=this.getAdjustRange(e,i,n);return E["each"](t,(function(t){t[e]=r.getAdjustOffset(a)})),t},e}(mn),On=kn,Cn=E["Cache"],An=function(t){function e(e){var i=t.call(this,e)||this,n=e.adjustNames,r=void 0===n?["y"]:n,a=e.height,o=void 0===a?NaN:a,s=e.size,l=void 0===s?10:s,u=e.reverseOrder,h=void 0!==u&&u;return i.adjustNames=r,i.height=o,i.size=l,i.reverseOrder=h,i}return Object(B["__extends"])(e,t),e.prototype.process=function(t){var e=this,i=e.yField,n=e.reverseOrder,r=i?this.processStack(t):this.processOneDimStack(t);return n?this.reverse(r):r},e.prototype.reverse=function(t){return t.slice(0).reverse()},e.prototype.processStack=function(t){var e=this,i=e.xField,n=e.yField,r=e.reverseOrder,a=r?this.reverse(t):t,o=new Cn,s=new Cn;return a.map((function(t){return t.map((function(t){var e,r=E["get"](t,i,0),a=E["get"](t,n),l=r.toString();if(a=E["isArray"](a)?a[1]:a,!E["isNil"](a)){var u=a>=0?o:s;u.has(l)||u.set(l,0);var h=u.get(l),c=a+h;return u.set(l,c),Object(B["__assign"])(Object(B["__assign"])({},t),(e={},e[n]=[h,c],e))}return t}))}))},e.prototype.processOneDimStack=function(t){var e=this,i=this,n=i.xField,r=i.height,a=i.reverseOrder,o="y",s=a?this.reverse(t):t,l=new Cn;return s.map((function(t){return t.map((function(t){var i,a=e.size,s=t[n],u=2*a/r;l.has(s)||l.set(s,u/2);var h=l.get(s);return l.set(s,h+u),Object(B["__assign"])(Object(B["__assign"])({},t),(i={},i[o]=h,i))}))}))},e}(mn),Ln=An,Pn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.process=function(t){var e=E["flatten"](t),i=this,n=i.xField,r=i.yField,a=this.getXValuesMaxMap(e),o=Math.max.apply(Math,Object.keys(a).map((function(t){return a[t]})));return E["map"](t,(function(t){return E["map"](t,(function(t){var e,i,s=t[r],l=t[n];if(E["isArray"](s)){var u=(o-a[l])/2;return Object(B["__assign"])(Object(B["__assign"])({},t),(e={},e[r]=E["map"](s,(function(t){return u+t})),e))}var h=(o-s)/2;return Object(B["__assign"])(Object(B["__assign"])({},t),(i={},i[r]=[h,s+h],i))}))}))},e.prototype.getXValuesMaxMap=function(t){var e=this,i=this,n=i.xField,r=i.yField,a=E["groupBy"](t,(function(t){return t[n]}));return E["mapValues"](a,(function(t){return e.getDimMaxValue(t,r)}))},e.prototype.getDimMaxValue=function(t,e){var i=E["map"](t,(function(t){return E["get"](t,e,[])})),n=E["flatten"](i);return Math.max.apply(Math,n)},e}(mn),jn=Pn;_n("Dodge",Mn),_n("Jitter",On),_n("Stack",Ln),_n("Symmetric",jn);var Tn=function(){function t(t){this.type="coordinate",this.isRect=!1,this.isHelix=!1,this.isPolar=!1,this.isReflectX=!1,this.isReflectY=!1;var e=t.start,i=t.end,n=t.matrix,r=void 0===n?[1,0,0,0,1,0,0,0,1]:n,a=t.isTransposed,o=void 0!==a&&a;this.start=e,this.end=i,this.matrix=r,this.originalMatrix=Object(B["__spreadArrays"])(r),this.isTransposed=o}return t.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)},t.prototype.update=function(t){E["assign"](this,t),this.initial()},t.prototype.convertDim=function(t,e){var i,n=this[e],r=n.start,a=n.end;return this.isReflect(e)&&(i=[a,r],r=i[0],a=i[1]),r+t*(a-r)},t.prototype.invertDim=function(t,e){var i,n=this[e],r=n.start,a=n.end;return this.isReflect(e)&&(i=[a,r],r=i[0],a=i[1]),(t-r)/(a-r)},t.prototype.applyMatrix=function(t,e,i){void 0===i&&(i=0);var n=this.matrix,r=[t,e,i];return Ot.transformMat3(r,r,n),r},t.prototype.invertMatrix=function(t,e,i){void 0===i&&(i=0);var n=this.matrix,r=wt.invert([],n),a=[t,e,i];return Ot.transformMat3(a,a,r),a},t.prototype.convert=function(t){var e=this.convertPoint(t),i=e.x,n=e.y,r=this.applyMatrix(i,n,1);return{x:r[0],y:r[1]}},t.prototype.invert=function(t){var e=this.invertMatrix(t.x,t.y,1);return this.invertPoint({x:e[0],y:e[1]})},t.prototype.rotate=function(t){var e=this.matrix,i=this.center;return wt.translate(e,e,[-i.x,-i.y]),wt.rotate(e,e,t),wt.translate(e,e,[i.x,i.y]),this},t.prototype.reflect=function(t){return"x"===t?this.isReflectX=!this.isReflectX:this.isReflectY=!this.isReflectY,this},t.prototype.scale=function(t,e){var i=this.matrix,n=this.center;return wt.translate(i,i,[-n.x,-n.y]),wt.scale(i,i,[t,e]),wt.translate(i,i,[n.x,n.y]),this},t.prototype.translate=function(t,e){var i=this.matrix;return wt.translate(i,i,[t,e]),this},t.prototype.transpose=function(){return this.isTransposed=!this.isTransposed,this},t.prototype.getCenter=function(){return this.center},t.prototype.getWidth=function(){return this.width},t.prototype.getHeight=function(){return this.height},t.prototype.isReflect=function(t){return"x"===t?this.isReflectX:this.isReflectY},t.prototype.resetMatrix=function(t){this.matrix=t||Object(B["__spreadArrays"])(this.originalMatrix)},t}(),Bn=Tn,In=function(t){function e(e){var i=t.call(this,e)||this;return i.isRect=!0,i.type="cartesian",i.initial(),i}return Object(B["__extends"])(e,t),e.prototype.initial=function(){t.prototype.initial.call(this);var e=this.start,i=this.end;this.x={start:e.x,end:i.x},this.y={start:e.y,end:i.y}},e.prototype.convertPoint=function(t){var e,i=t.x,n=t.y;return this.isTransposed&&(e=[n,i],i=e[0],n=e[1]),{x:this.convertDim(i,"x"),y:this.convertDim(n,"y")}},e.prototype.invertPoint=function(t){var e,i=this.invertDim(t.x,"x"),n=this.invertDim(t.y,"y");return this.isTransposed&&(e=[n,i],i=e[0],n=e[1]),{x:i,y:n}},e}(Bn),Dn=In,Fn=function(t){function e(e){var i=t.call(this,e)||this;i.isHelix=!0,i.type="helix";var n=e.startAngle,r=void 0===n?1.25*Math.PI:n,a=e.endAngle,o=void 0===a?7.25*Math.PI:a,s=e.innerRadius,l=void 0===s?0:s,u=e.radius;return i.startAngle=r,i.endAngle=o,i.innerRadius=l,i.radius=u,i.initial(),i}return Object(B["__extends"])(e,t),e.prototype.initial=function(){t.prototype.initial.call(this);var e=(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*=this.radius),this.d=Math.floor(i*(1-this.innerRadius)/e),this.a=this.d/(2*Math.PI),this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*i,end:this.innerRadius*i+.99*this.d}},e.prototype.convertPoint=function(t){var e,i=t.x,n=t.y;this.isTransposed&&(e=[n,i],i=e[0],n=e[1]);var r=this.convertDim(i,"x"),a=this.a*r,o=this.convertDim(n,"y");return{x:this.center.x+Math.cos(r)*(a+o),y:this.center.y+Math.sin(r)*(a+o)}},e.prototype.invertPoint=function(t){var e,i=this.d+this.y.start,n=St.subtract([],[t.x,t.y],[this.center.x,this.center.y]),r=St.angleTo(n,[1,0],!0),a=r*this.a;St.length(n)<a&&(a=St.length(n));var o=Math.floor((St.length(n)-a)/i);r=2*o*Math.PI+r;var s=this.a*r,l=St.length(n)-s;l=Object(E["isNumberEqual"])(l,0)?0:l;var u=this.invertDim(r,"x"),h=this.invertDim(l,"y");return u=Object(E["isNumberEqual"])(u,0)?0:u,h=Object(E["isNumberEqual"])(h,0)?0:h,this.isTransposed&&(e=[h,u],u=e[0],h=e[1]),{x:u,y:h}},e}(Bn),En=Fn,Rn=function(t){function e(e){var i=t.call(this,e)||this;i.isPolar=!0,i.type="polar";var n=e.startAngle,r=void 0===n?-Math.PI/2:n,a=e.endAngle,o=void 0===a?3*Math.PI/2:a,s=e.innerRadius,l=void 0===s?0:s,u=e.radius;return i.startAngle=r,i.endAngle=o,i.innerRadius=l,i.radius=u,i.initial(),i}return Object(B["__extends"])(e,t),e.prototype.initial=function(){t.prototype.initial.call(this);while(this.endAngle<this.startAngle)this.endAngle+=2*Math.PI;var e,i=this.getOneBox(),n=i.maxX-i.minX,r=i.maxY-i.minY,a=Math.abs(i.minX)/n,o=Math.abs(i.minY)/r;this.height/r>this.width/n?(e=this.width/n,this.circleCenter={x:this.center.x-(.5-a)*this.width,y:this.center.y-(.5-o)*e*r}):(e=this.height/r,this.circleCenter={x:this.center.x-(.5-a)*e*n,y:this.center.y-(.5-o)*this.height}),this.polarRadius=this.radius,this.radius?this.radius>0&&this.radius<=1?this.polarRadius=e*this.radius:(this.radius<=0||this.radius>e)&&(this.polarRadius=e):this.polarRadius=e,this.x={start:this.startAngle,end:this.endAngle},this.y={start:this.innerRadius*this.polarRadius,end:this.polarRadius}},e.prototype.getRadius=function(){return this.polarRadius},e.prototype.convertPoint=function(t){var e,i=this.getCenter(),n=t.x,r=t.y;return this.isTransposed&&(e=[r,n],n=e[0],r=e[1]),n=this.convertDim(n,"x"),r=this.convertDim(r,"y"),{x:i.x+Math.cos(n)*r,y:i.y+Math.sin(n)*r}},e.prototype.invertPoint=function(t){var e=this.getCenter(),i=[t.x-e.x,t.y-e.y],n=[1,0,0,0,1,0,0,0,1];wt.rotate(n,n,this.startAngle);var r=[1,0,0];Ot.transformMat3(r,r,n),r=[r[0],r[1]];var a=St.angleTo(r,i,this.endAngle<this.startAngle);Object(E["isNumberEqual"])(a,2*Math.PI)&&(a=0);var o=St.length(i),s=a/(this.endAngle-this.startAngle);s=this.endAngle-this.startAngle>0?s:-s;var l=this.invertDim(o,"y"),u={x:0,y:0};return u.x=this.isTransposed?l:s,u.y=this.isTransposed?s:l,u},e.prototype.getCenter=function(){return this.circleCenter},e.prototype.getOneBox=function(){var t=this.startAngle,e=this.endAngle;if(Math.abs(e-t)>=2*Math.PI)return{minX:-1,maxX:1,minY:-1,maxY:1};for(var i=[0,Math.cos(t),Math.cos(e)],n=[0,Math.sin(t),Math.sin(e)],r=Math.min(t,e);r<Math.max(t,e);r+=Math.PI/18)i.push(Math.cos(r)),n.push(Math.sin(r));return{minX:Math.min.apply(Math,i),maxX:Math.max.apply(Math,i),minY:Math.min.apply(Math,n),maxY:Math.max.apply(Math,n)}},e}(Bn),zn=Rn,Nn={},Yn=function(t){return Nn[t.toLowerCase()]},Hn=function(t,e){Nn[t.toLowerCase()]=e};Hn("rect",Dn),Hn("cartesian",Dn),Hn("polar",zn),Hn("helix",En);var Gn=function(t,e){return Object(E["isString"])(e)?e:t.invert(t.scale(e))},Wn=function(){function t(t){this.names=[],this.scales=[],this.linear=!1,this.values=[],this.callback=function(){return[]},this._parseCfg(t)}return t.prototype.mapping=function(){for(var t=this,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var n=e.map((function(e,i){return t._toOriginParam(e,t.scales[i])}));return this.callback.apply(this,n)},t.prototype.getLinearValue=function(t){var e=this.values.length-1,i=Math.floor(e*t),n=e*t-i,r=this.values[i],a=i===e?r:this.values[i+1];return r+(a-r)*n},t.prototype.getNames=function(){for(var t=this.scales,e=this.names,i=Math.min(t.length,e.length),n=[],r=0;r<i;r+=1)n.push(e[r]);return n},t.prototype.getFields=function(){return this.scales.map((function(t){return t.field}))},t.prototype.getScale=function(t){return this.scales[this.names.indexOf(t)]},t.prototype.defaultCallback=function(){for(var t=this,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return 0===e.length?this.values:e.map((function(e,i){var n=t.scales[i];return"identity"===n.type?n.values[0]:t._getAttributeValue(n,e)}))},t.prototype._parseCfg=function(t){var e=this,i=t.type,n=void 0===i?"base":i,r=t.names,a=void 0===r?[]:r,o=t.scales,s=void 0===o?[]:o,l=t.values,u=void 0===l?[]:l,h=t.callback;this.type=n,this.scales=s,this.values=u,this.names=a,this.callback=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];if(h){var n=h.apply(void 0,t);if(!Object(E["isNil"])(n))return[n]}return e.defaultCallback.apply(e,t)}},t.prototype._getAttributeValue=function(t,e){if(t.isCategory&&!this.linear){var i=t.translate(e);return this.values[i%this.values.length]}var n=t.scale(e);return this.getLinearValue(n)},t.prototype._toOriginParam=function(t,e){return e.isLinear?t:Object(E["isArray"])(t)?t.map((function(t){return Gn(e,t)})):Gn(e,t)},t}(),Xn=Wn,Vn=function(t){function e(e){var i=t.call(this,e)||this;return i.type="color",i.names=["color"],Object(E["isString"])(i.values)&&(i.linear=!0),i.gradient=ke["default"].gradient(i.values),i}return Object(B["__extends"])(e,t),e.prototype.getLinearValue=function(t){return this.gradient(t)},e}(Xn),qn=Vn,Un=function(t){function e(e){var i=t.call(this,e)||this;return i.type="opacity",i.names=["opacity"],i}return Object(B["__extends"])(e,t),e}(Xn),Zn=Un,Qn=function(t){function e(e){var i=t.call(this,e)||this;return i.names=["x","y"],i.type="position",i}return Object(B["__extends"])(e,t),e.prototype.mapping=function(t,e){var i=this.scales,n=i[0],r=i[1];return Object(E["isNil"])(t)||Object(E["isNil"])(e)?[]:[Object(E["isArray"])(t)?t.map((function(t){return n.scale(t)})):n.scale(t),Object(E["isArray"])(e)?e.map((function(t){return r.scale(t)})):r.scale(e)]},e}(Xn),$n=Qn,Kn=function(t){function e(e){var i=t.call(this,e)||this;return i.type="shape",i.names=["shape"],i}return Object(B["__extends"])(e,t),e.prototype.getLinearValue=function(t){var e=Math.round((this.values.length-1)*t);return this.values[e]},e}(Xn),Jn=Kn,tr=function(t){function e(e){var i=t.call(this,e)||this;return i.type="size",i.names=["size"],i}return Object(B["__extends"])(e,t),e}(Xn),er=tr,ir={},nr=function(t){return ir[t.toLowerCase()]},rr=function(t,e){if(nr(t))throw new Error("Attribute type '"+t+"' existed.");ir[t.toLowerCase()]=e};rr("Color",qn),rr("Opacity",Zn),rr("Position",$n),rr("Shape",Jn),rr("Size",er);var ar,or=/^(?:(?!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(t){t["Linear"]="linear",t["Cat"]="cat",t["Time"]="time"})(ar||(ar={}));var sr=function(){function t(t){this.defs={},this.defs=t}return t.prototype.createScale=function(t,e){var i,n=this.defs[t];if(!e||!e.length){if(n&&n.type){var r=Pi(n.type);i=new r(n)}else{var a=Pi("identity");i=new a({field:t.toString(),values:[t]})}return i}var o=E["firstValue"](e,t);if(E["isNumber"](t)||E["isNil"](o)&&!n){a=Pi("identity");i=new a({field:t.toString(),values:[t]})}else{var s=E["get"](n,"type",this._getDefaultType(t,e)),l=this._getScaleCfg(s,t,e);n&&E["mix"](l,n);r=Pi(s);i=new r(l)}return i},t.prototype._getDefaultType=function(t,e){var i=ar.Linear,n=E["firstValue"](e,t);return E["isArray"](n)&&(n=n[0]),or.test(n)?i=ar.Time:E["isString"](n)&&(i=ar.Cat),i},t.prototype._getScaleCfg=function(t,e,i){var n=E["valuesOfKey"](i,e),r={field:e,values:n};if("cat"!==t&&"timeCat"!==t&&"time"!==t){var a=E["getRange"](n),o=a.min,s=a.max;r.min=o,r.max=s,r.nice=!0}return"time"===t&&(r.nice=!1),r},t}(),lr=sr,ur=function(){function t(t){void 0===t&&(t={}),this.type="rect",this.actions=[],this.cfg={},this.options={},E["mix"](this,t),this.options=t}return t.prototype.reset=function(t){return this.type=t.type||"rect",this.actions=t.actions||[],this.cfg=t.cfg,this.options.type=this.type,this.options.actions=this.actions,this.options.cfg=this.cfg,this},t.prototype.createCoord=function(t,e){var i,n,r=this.type,a=this.cfg,o=Object(B["__assign"])({start:t,end:e},a);return"theta"===r?(i=Yn("polar"),this._hasAction("transpose")||this.transpose(),n=new i(o),n.type=r):(i=Yn(r),n=new i(o)),this._execActions(n),n},t.prototype.rotate=function(t){var e=t*Math.PI/180;return this.actions.push(["rotate",e]),this},t.prototype.reflect=function(t){return void 0===t&&(t="y"),this.actions.push(["reflect",t]),this},t.prototype.scale=function(t,e){return this.actions.push(["scale",t,e]),this},t.prototype.transpose=function(){return this.actions.push(["transpose"]),this},t.prototype._execActions=function(t){E["each"](this.actions,(function(e){var i=e[0];t[i](e[1],e[2])}))},t.prototype._hasAction=function(t){var e=this.actions,i=!1;return E["each"](e,(function(e){if(t===e[0])return i=!0,!1})),i},t}(),hr=ur,cr=(i("22ca"),function(t){function e(e){var i=t.call(this)||this;return i.cfg=Object(B["__assign"])({id:null,canvas:null,container:null,group:null,capture:!0,offsetX:0,offsetY:0,visible:!0,zIndex:1},e),i.destroyed=!1,i}return Object(B["__extends"])(e,t),e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){return this.cfg[t]=e,this},e.prototype.destroy=function(){this.off(),this.destroyed=!0},e}(D.a)),pr=cr,fr=function(t,e){for(var i,n,r=[],a=0;a<t.length;a++)i=t[a].getBBox(),n=e[a].getBBox(),(i.width>n.width||i.height>n.height)&&r.push(t[a]);for(a=0;a<r.length;a++)r[a].remove()},dr=function(){function t(t){this.bitmap={},this.xGap=1,this.yGap=8,t&&E["mix"](this,t)}return t.prototype.hasGap=function(t){for(var e=!0,i=this.bitmap,n=Math.round(t.minX),r=Math.round(t.maxX),a=Math.round(t.minY),o=Math.round(t.maxY),s=n;s<=r;s+=1)if(i[s]){if(s===n||s===r){for(var l=a;l<=o;l++)if(i[s][l]){e=!1;break}}else if(i[s][a]||i[s][o]){e=!1;break}}else i[s]={};return e},t.prototype.fillGap=function(t){for(var e=this.bitmap,i=Math.round(t.minX),n=Math.round(t.maxX),r=Math.round(t.minY),a=Math.round(t.maxY),o=i;o<=n;o+=1)e[o]||(e[o]={});for(o=i;o<=n;o+=this.xGap){for(var s=r;s<=a;s+=this.yGap)e[o][s]=!0;e[o][a]=!0}if(1!==this.yGap)for(o=r;o<=a;o+=1)e[i][o]=!0,e[n][o]=!0;if(1!==this.xGap)for(o=i;o<=n;o+=1)e[o][r]=!0,e[o][a]=!0},t.prototype.destroy=function(){this.bitmap={}},t}(),gr=dr;function vr(t,e,i,n){var r=t.getBBox(),a=r.width,o=r.height,s={x:e,y:i,textAlign:"center"};switch(n){case 0:s.y-=o+1,s.x+=1,s.textAlign="left";break;case 1:s.y-=o+1,s.x-=1,s.textAlign="right";break;case 2:s.y+=o+1,s.x-=1,s.textAlign="right";break;case 3:s.y+=o+1,s.x+=1,s.textAlign="left";break;case 5:s.y-=2*o+2;break;case 6:s.y+=2*o+2;break;case 7:s.x+=a+1,s.textAlign="left";break;case 8:s.x-=a+1,s.textAlign="right";break;default:break}return t.attr(s),t.getBBox()}var yr=function(t){for(var e,i,n,r,a,o=new gr,s=[],l=0;l<t.length;l++){i=t[l],n=i.attr("x"),r=i.attr("y"),a=!1;for(var u=0;u<=8;u++)if(e=vr(i,n,r,u),o.hasGap(e)){o.fillGap(e),a=!0;break}a||s.push(i)}for(l=0;l<s.length;l++)s[l].remove()},mr=100;function xr(t,e,i){void 0===i&&(i=mr);var n,r=-1,a=t.attr("x"),o=t.attr("y"),s=t.getBBox(),l=Math.sqrt(s.width*s.width+s.height*s.height),u=-r,h=0,c=0,p=function(t){var e=.1*t;return[e*Math.cos(e),e*Math.sin(e)]};if(e.hasGap(s))return e.fillGap(s),!0;var f=!1,d=0,g={};while(Math.min(Math.abs(h),Math.abs(c))<l&&d<i)if(n=p(u+=r),h=~~n[0],c=~~n[1],(h||c)&&!g[h+"-"+c]&&(t.attr({x:a+h,y:o+c}),h+c<0&&t.attr("textAlign","right"),d++,e.hasGap(t.getBBox()))){e.fillGap(t.getBBox()),f=!0,g[h+"-"+c]=!0;break}return f}var br,_r=function(t,e){var i;void 0===e&&(e=mr);for(var n=new gr,r=[],a=0;a<t.length;a++)i=t[a],xr(i,n,e)||r.push(i);for(a=0;a<r.length;a++)r[a].remove()},wr={scatter:yr,map:_r,treemap:fr},Mr=function(t){function e(e){return t.call(this,Object(B["__assign"])({name:"label",type:"default",containerTpl:'<div class="g-labels" style="position:absolute;top:0;left:0;"></div>',itemTpl:'<div class="g-label" style="position:absolute;">{text}</div>',items:null,lineGroup:null,shapes:null,useHtml:!1},e))||this}return Object(B["__extends"])(e,t),e.prototype.render=function(){this.clear(),this._init(),this.emit("beforerender"),this.draw(),this.emit("afterrender")},e.prototype.draw=function(t){void 0===t&&(t=!0),this._dryDraw(),t&&this.get("canvas").draw()},e.prototype.clear=function(){var t=this.get("group"),e=this.get("container");t&&!t.destroyed&&t.clear(),e&&(e.innerHTML="")},e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this.get("group"),i=this.get("container");e&&!e.destroyed&&e.destroy(),i&&(i.innerHTML="")},e.prototype.changeLabel=function(t,e){if(t)if(t.tagName){var i=this._createDom(e);t.innerHTML=i.innerHTML,this._setCustomPosition(e,t)}else t.id=e.id,t.attr("text",e.text),t.attr("x")===e.x&&t.attr("y")===e.y||(t.resetMatrix(),e.textStyle.rotate&&(t.rotateAtStart(e.textStyle.rotate),delete e.textStyle.rotate),t.attr(e))},e.prototype.show=function(){var t=this.get("group"),e=this.get("container");t&&t.show(),e&&(e.style.opacity=1)},e.prototype.hide=function(){var t=this.get("group"),e=this.get("container");t&&t.hide(),e&&(e.style.opacity=0)},e.prototype.drawLines=function(){var t=this,e=this.get("lineGroup");!e||e.destroyed?(e=this.get("group").addGroup(),this.set("lineGroup",e)):e.clear(),E["each"](this.get("items"),(function(i){t._lineToLabel(i,e)}))},e.prototype._lineToLabel=function(t,e){if(t.labelLine){var i=E["isBoolean"](t.labelLine)?{}:t.labelLine,n="undefined"===typeof t.capture?this.get("capture"):t.capture,r=i.path;if(r&&E["isFunction"](i.path)&&(r=i.path(t)),!r){var a=t.start;r=[["M",a.x,a.y],["L",t.x,t.y]]}var o=t.color;o||(o=t.textStyle&&t.textStyle.fill?t.textStyle.fill:"#000");var s=e.addShape("path",{capture:n,attrs:E["mix"]({path:r,stroke:o,fill:null},i)});s.name=this.get("name"),s.id=t.id&&t.id.replace("glabel","glabelline"),s.set("coord",this.get("coord"))}},e.prototype._adjustLabels=function(){var t=this.get("type"),e=this.getLabels(),i=this.get("shapes"),n=wr[t];n&&n(e,i)},e.prototype.getLabels=function(){var t=this.get("container");if(t)return E["toArray"](t.childNodes);var e=this.get("group").get("children");return E["filter"](e,(function(t){return t.isShape}))},e.prototype._createText=function(t){var e,i=t,n=this.get("container"),r="undefined"===typeof i.capture?this.get("capture"):i.capture;if(!i.useHtml&&!i.htmlTemplate){var a=this.get("name"),o=i.origin,s=this.get("group");delete i.origin;var l=i.rotate;return i.textStyle&&(i.textStyle.rotate&&(l=i.textStyle.rotate,delete i.textStyle.rotate),i=E["mix"]({x:i.x,y:i.y,textAlign:i.textAlign,text:i.text},i.textStyle)),e=s.addShape("text",{capture:r,attrs:i}),l&&(Math.abs(l)>2*Math.PI&&(l=l/180*Math.PI),e.transform([["t",-i.x,-i.y],["r",l],["t",i.x,i.y]])),e.setSilent("origin",o||i),e.name=a,this.get("appendInfo")&&e.setSilent("appendInfo",this.get("appendInfo")),e}n||(n=this._initHtmlContainer());var u=this._createDom(i);n.appendChild(u),this._setCustomPosition(i,u)},e.prototype._initHtmlContainer=function(){var t=this.get("container");if(!t){var e=this.get("containerTpl"),i=this.get("canvas").get("el").parentNode;t=X["createDom"](e),i.style.position="relative",i.appendChild(t),this.set("container",t)}return t},e.prototype._createDom=function(t){var e=this.get("itemTpl"),i=E["substitute"](e,{text:t.text});return X["createDom"](i)},e.prototype._setCustomPosition=function(t,e){var i=t.textAlign||"left",n=t.y,r=t.x,a=X["getOuterWidth"](e),o=X["getOuterHeight"](e);n-=o/2,"center"===i?r-=a/2:"right"===i&&(r-=a),e.style.top=parseInt(n,10)+"px",e.style.left=parseInt(r,10)+"px"},e.prototype._init=function(){if(!this.get("group")){var t=this.get("canvas").addGroup({id:"label-group"});this.set("group",t)}},e.prototype._dryDraw=function(){var t=this,e=this.get("items"),i=this.getLabels(),n=i.length;E["each"](e,(function(e,r){if(r<n){var a=i[r];t.changeLabel(a,e)}else{var o=t._createText(e);o&&(o.id=e.id,o.set("coord",e.coord))}}));for(var r=n-1;r>=e.length;r-=1)i[r].remove();this._adjustLabels(),this.drawLines()},e}(pr),Sr=Mr,kr=Sr,Or=function(t){function e(e){return t.call(this,Object(B["__assign"])({x:0,y:0,items:null,titleContent:null,showTitle:!0,panelRange:null,inPanel:!0,crosshairs:null},e))||this}return Object(B["__extends"])(e,t),e.prototype.isContentChange=function(t,e){var i=this.get("titleContent"),n=this.get("items"),r=!(t===i&&n.length===e.length);return r||E["each"](e,(function(t,e){var i=n[e],a=Object.keys(t);if(r=a.some((function(e){return!E["isObject"](t[e])&&t[e]!==i[e]})),r)return!1})),r},e.prototype.setContent=function(t,e){return this.set("items",e),this.set("titleContent",t),this.render(),this},e.prototype.setPosition=function(t,e,i){this.set("x",t),this.set("y",e)},e.prototype.setMarkers=function(t,e){var i=this.get("markerGroup"),n=this.get("frontgroundGroup");i?i.clear():(i=n.addGroup({zIndex:1,capture:!1}),this.set("markerGroup",i)),E["each"](t,(function(t){i.addShape("marker",{color:t.color,attrs:E["mix"]({fill:t.color,symbol:"circle",shadowColor:t.color},e,{x:t.x,y:t.y})})})),this.set("markerItems",t)},e.prototype.clearMarkers=function(){var t=this.get("markerGroup");t&&t.clear()},e.prototype.render=function(){},e.prototype.clear=function(){},e.prototype.show=function(){this.set("visible",!0)},e.prototype.hide=function(){this.set("visible",!1)},e}(pr),Cr=Or,Ar=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({type:null,plot:null,panelRange:null,rectStyle:{fill:"#CCD6EC",opacity:.3},lineStyle:{stroke:"rgba(0, 0, 0, 0.25)",lineWidth:1},isTransposed:!1},e))||this;return i._init_(),i.render(),i}return Object(B["__extends"])(e,t),e.prototype._init_=function(){var t=this.get("plot"),e=t.addGroup();this.set("container",e)},e.prototype._addLineShape=function(t,e){var i=this.get("container"),n=i.addShape("line",{attrs:t,capture:!1});return this.set("crossLineShape"+e,n),n},e.prototype._renderHorizontalLine=function(t,e){var i=E["mix"](this.get("lineStyle"),this.get("style")),n=E["mix"]({x1:e?e.bl.x:t.get("width"),y1:0,x2:e?e.br.x:0,y2:0},i);this._addLineShape(n,"X")},e.prototype._renderVerticalLine=function(t,e){var i=E["mix"](this.get("lineStyle"),this.get("style")),n=E["mix"]({x1:0,y1:e?e.bl.y:t.get("height"),x2:0,y2:e?e.tl.y:0},i);this._addLineShape(n,"Y")},e.prototype._renderBackground=function(t,e){var i=E["mix"](this.get("rectStyle"),this.get("style")),n=this.get("container"),r=E["mix"]({x:e?e.tl.x:0,y:e?e.tl.y:t.get("height"),width:e?e.br.x-e.bl.x:t.get("width"),height:e?Math.abs(e.tl.y-e.bl.y):t.get("height")},i),a=n.addShape("rect",{attrs:r,capture:!1});return this.set("crosshairsRectShape",a),a},e.prototype._updateRectShape=function(t){var e,i=this.get("crosshairsRectShape"),n=this.get("isTransposed"),r=t[0],a=t[t.length-1],o=n?"y":"x",s=n?"height":"width",l=r[o];if(t.length>1&&r[o]>a[o]&&(l=a[o]),this.get("width"))i.attr(o,l-this.get("crosshairs").width/2),i.attr(s,this.get("width"));else if(E["isArray"](r.point[o])&&!r.size){var u=r.point[o][1]-r.point[o][0];i.attr(o,r.point[o][0]),i.attr(s,u)}else e=3*r.size/4,i.attr(o,l-e),1===t.length?i.attr(s,3*r.size/2):i.attr(s,Math.abs(a[o]-r[o])+2*e)},e.prototype.render=function(){var t=this.get("canvas"),e=this.get("panelRange"),i=this.get("isTransposed");switch(this.clear(),this.get("type")){case"x":this._renderHorizontalLine(t,e);break;case"y":this._renderVerticalLine(t,e);break;case"cross":this._renderHorizontalLine(t,e),this._renderVerticalLine(t,e);break;case"rect":this._renderBackground(t,e);break;default:i?this._renderHorizontalLine(t,e):this._renderVerticalLine(t,e)}},e.prototype.show=function(){var t=this.get("container");t.show()},e.prototype.hide=function(){var t=this.get("container");t.hide()},e.prototype.clear=function(){var t=this.get("container");this.set("crossLineShapeX",null),this.set("crossLineShapeY",null),this.set("crosshairsRectShape",null),t.clear()},e.prototype.destroy=function(){var e=this.get("container");t.prototype.destroy.call(this),e.remove()},e.prototype.setPosition=function(t,e,i){var n=this.get("crossLineShapeX"),r=this.get("crossLineShapeY"),a=this.get("crosshairsRectShape");r&&!r.get("destroyed")&&r.move(t,0),n&&!n.get("destroyed")&&n.move(0,e),a&&!a.get("destroyed")&&this._updateRectShape(i)},e}(pr),Lr=Ar,Pr='"-apple-system", "BlinkMacSystemFont", "Segoe UI", Roboto, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimSun, "sans-serif"',jr="g2-tooltip",Tr="g2-tooltip-title",Br="g2-tooltip-list",Ir="g2-tooltip-list-item",Dr="g2-tooltip-marker",Fr="g2-tooltip-value",Er=(br={},br[""+jr]={position:"absolute",display:"none",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:Pr,lineHeight:"20px",padding:"10px 10px 6px 10px"},br[""+Tr]={marginBottom:"4px"},br[""+Br]={margin:0,listStyleType:"none",padding:0},br[""+Ir]={marginBottom:"4px"},br[""+Dr]={width:"5px",height:"5px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},br[""+Fr]={display:"inline-block",float:"right",marginLeft:"30px"},br),Rr=20;function zr(t,e,i,n,r,a){var o=t,s=e,l=0,u=0,h=20;if(a){var c=a.getBBox();l=c.width,u=c.height,o=c.x,s=c.y,h=5}switch(i){case"inside":o=o+l/2-n/2,s=s+u/2-r/2;break;case"top":o=o+l/2-n/2,s=s-r-h;break;case"left":o=o-n-h,s=s+u/2-r/2;break;case"right":o=o+l+h,s=s+u/2-r/2;break;case"bottom":default:o=o+l/2-n/2,s=s+u+h;break}return[o,s]}function Nr(t,e,i,n,r,a){var o=t,s=e;return o+i+Rr>r?(o-=i+Rr,o=o<0?0:o):o+Rr<0?o=Rr:o+=Rr,s+n+Rr>a?(s-=n+Rr,s=s<0?0:s):s+Rr<0?s=Rr:s+=Rr,[o,s]}function Yr(t,e,i,n,r,a){var o=t,s=e;return o+i>r.tr.x&&(o-=i+2*Rr),o<r.tl.x&&(o=r.tl.x),a||(s+n>r.bl.y&&(s-=n+2*Rr),s<r.tl.y&&(s=r.tl.y)),[o,s]}var Hr="g2-tooltip",Gr="g2-tooltip-title",Wr="g2-tooltip-list",Xr="g2-tooltip-marker",Vr="g2-tooltip-value",qr="g2-tooltip-list-item",Ur=function(t,e){return t.getElementsByClassName(e)[0]},Zr=function(t,e){return Object.keys(t).forEach((function(i){e[i]&&(t[i]=E["mix"](t[i],e[i]))})),t},Qr=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({containerTpl:'<div class="'+Hr+'">\n <div class="'+Gr+'"></div>\n <ul class="'+Wr+'"></ul>\n </div>',itemTpl:'<li data-index={index}>\n <span style="background-color:{color};" class="'+Xr+'"></span>\n {name}<span class="'+Vr+'">{value}</span></li>',htmlContent:null,follow:!0,enterable:!1},e))||this,n=Er;i.style=Zr(n,e),i._init_(),i.get("items")&&i.render();var r=i.get("crosshairs");if(r){var a="rect"===r.type?i.get("backgroundGroup"):i.get("frontgroundGroup"),o=new Lr(E["mix"]({plot:a,panelRange:i.get("panelRange"),canvas:i.get("canvas")},i.get("crosshairs")));o.hide(),i.set("crosshairGroup",o)}return i}return Object(B["__extends"])(e,t),e.prototype._init_=function(){var t,e=this.get("containerTpl"),i=this.get("canvas").get("el").parentNode;if(this.get("htmlContent"))t=this._getHtmlContent();else if(/^\#/.test(e)){var n=e.replace("#","");t=document.getElementById(n)}else t=X["createDom"](e);this.set("container",t),X["modifyCSS"](t,this.style[Hr]),i.appendChild(t),i.style.position="relative"},e.prototype.render=function(){if(this.clear(),this.get("htmlContent")){var t=this.get("canvas").get("el").parentNode,e=this._getHtmlContent();t.appendChild(e),X["modifyCSS"](e,this.style[Hr]),this.set("container",e)}else this._renderTpl()},e.prototype._renderTpl=function(){var t=this,e=this.get("showTitle"),i=this.get("titleContent"),n=this.get("container"),r=Ur(n,Gr),a=Ur(n,Wr),o=this.get("items");r&&e&&(X["modifyCSS"](r,this.style[Gr]),r.innerHTML=i),a&&(X["modifyCSS"](a,this.style[Wr]),E["each"](o,(function(e,i){a.appendChild(t._addItem(e,i))})))},e.prototype.clear=function(){var t=this.get("container");if(t&&this.get("htmlContent"))t.remove();else{var e=Ur(t,Gr),i=Ur(t,Wr);e&&(e.innerHTML=""),i&&(i.innerHTML="")}},e.prototype.show=function(){var e=this.get("container");e.style.visibility="visible",e.style.display="block";var i=this.get("crosshairGroup");i&&i.show();var n=this.get("markerGroup");n&&n.show(),t.prototype.show.call(this),this.get("canvas").draw()},e.prototype.hide=function(){var e=this.get("container");e.style.visibility="hidden",e.style.display="none";var i=this.get("crosshairGroup");i&&i.hide();var n=this.get("markerGroup");n&&n.hide(),t.prototype.hide.call(this),this.get("canvas").draw()},e.prototype.destroy=function(){var e=this.get("container"),i=this.get("containerTpl");e&&!/^\#/.test(i)&&e.parentNode.removeChild(e);var n=this.get("crosshairGroup");n&&n.destroy();var r=this.get("markerGroup");r&&r.remove(),t.prototype.destroy.call(this)},e.prototype._addItem=function(t,e){var i=this.get("itemTpl"),n=E["substitute"](i,E["mix"]({index:e},t)),r=X["createDom"](n);X["modifyCSS"](r,this.style[qr]);var a=Ur(r,Xr);a&&X["modifyCSS"](a,this.style[Xr]);var o=Ur(r,Vr);return o&&X["modifyCSS"](o,this.style[Vr]),r},e.prototype._getHtmlContent=function(){var t,e=this.get("htmlContent"),i=this.get("titleContent"),n=this.get("items"),r=e(i,n);return t=E["isElement"](r)?r:X["createDom"](r),t},e.prototype.setPosition=function(e,i,n){var r,a=e,o=i,s=this.get("container"),l=this.get("canvas").get("el"),u=X["getWidth"](l),h=X["getHeight"](l),c=s.clientWidth,p=s.clientHeight,f=a,d=o,g=this.get("prePosition")||{x:0,y:0};if(c||(s.style.display="block",c=s.clientWidth,p=s.clientHeight,s.style.display="none"),this.get("enterable")?(o-=s.clientHeight/2,r=[a,o],g&&a-g.x>0?a-=s.clientWidth+1:a+=1):this.get("position")?(r=zr(a,o,this.get("position"),c,p,n),a=r[0],o=r[1]):(r=Nr(a,o,c,p,u,h),a=r[0],o=r[1]),this.get("inPanel")){var v=this.get("panelRange"),y=this.get("panelGroup"),m=y.attr("clip");r=Yr(a,o,c,p,m?m.getBBox():v,this.get("enterable")),a=r[0],o=r[1]}var x=this.get("markerItems");E["isEmpty"](x)||(f=x[0].x,d=x[0].y),this.set("prePosition",r);var b=this.get("follow");b&&(s.style.left=a+"px",s.style.top=o+"px");var _=this.get("crosshairGroup");if(_){var w=this.get("items");_.setPosition(f,d,w)}t.prototype.setPosition.call(this,a,o)},e}(Cr),$r=Qr,Kr=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({backgroundStyle:{x:0,y:0,width:100,height:100,fill:"rgba(255, 255, 255, 0.9)",radius:4,stroke:"#e2e2e2",lineWidth:1},titleStyle:{fontFamily:Pr,text:"",textBaseline:"top",fontSize:12,fill:"rgb(87, 87, 87)",lineHeight:20,padding:20},markerStyle:{radius:4},nameStyle:{fontFamily:Pr,fontSize:12,fill:"rgb(87, 87, 87)",textBaseline:"middle",textAlign:"start",padding:8},valueStyle:{fontFamily:Pr,fontSize:12,fill:"rgb(87, 87, 87)",textBaseline:"middle",textAlign:"start",padding:30},padding:{top:20,right:20,bottom:20,left:20},itemGap:10,animationDuration:200},e))||this,n=i.get("crosshairs");if(n){var r=i.get("frontgroundGroup"),a=new Lr(E["mix"]({plot:r,panelRange:i.get("panelRange"),canvas:i.get("canvas")},i.get("crosshairs")));a.hide(),i.set("crosshairGroup",a)}return i._init_(),i.get("items")&&i.render(),i}return Object(B["__extends"])(e,t),e.prototype._init_=function(){var t=this.get("padding"),e=this.get("frontgroundGroup"),i=e.addGroup({capture:!1});this.set("markerGroup",i);var n=e.addGroup();n.hide(),this.set("container",n);var r=n.addShape("rect",{attrs:E["mix"]({},this.get("backgroundStyle"))});this.set("board",r);var a=this.get("titleStyle");if(this.get("showTitle")){var o=n.addShape("text",{attrs:E["mix"]({x:t.left,y:t.top},a)});this.set("titleShape",o),o.name="tooltip-title"}var s=n.addGroup();s.move(t.left,t.top+a.lineHeight+a.padding),this.set("itemsGroup",s)},e.prototype.render=function(){var t=this;this.clear();var e=this.get("container"),i=this.get("board"),n=this.get("showTitle"),r=this.get("titleContent"),a=this.get("titleShape"),o=this.get("itemsGroup"),s=this.get("items"),l=this.get("padding");a&&n&&a.attr("text",r);var u=this.get("itemGap"),h=0,c=0;E["each"](s,(function(e){var i=t._addItem(e);i.move(h,c),o.add(i);var n=i.getBBox().height;c+=n+u}));var p=e.getBBox(),f=p.width+l.right,d=p.height+l.bottom;i.attr("width",f),i.attr("height",d),this._alignToRight(f)},e.prototype.clear=function(){var t=this.get("titleShape"),e=this.get("itemsGroup"),i=this.get("board");t&&(t.text=""),e.clear(),i.attr("width",0),i.attr("height",0)},e.prototype.show=function(){var e=this.get("container");e.show();var i=this.get("crosshairGroup");i&&i.show();var n=this.get("markerGroup");n&&n.show(),t.prototype.show.call(this),this.get("canvas").draw()},e.prototype.hide=function(){var e=this.get("container");e.hide();var i=this.get("crosshairGroup");i&&i.hide();var n=this.get("markerGroup");n&&n.hide(),t.prototype.hide.call(this),this.get("canvas").draw()},e.prototype.destroy=function(){var e=this.get("container"),i=this.get("crosshairGroup");i&&i.destroy();var n=this.get("markerGroup");n&&n.remove(),t.prototype.destroy.call(this),e.remove()},e.prototype.setPosition=function(e,i,n){var r,a=e,o=i,s=this.get("container"),l=this.get("canvas").get("el"),u=X["getWidth"](l),h=X["getHeight"](l),c=s.getBBox(),p=c.width,f=c.height,d=a,g=o;if(this.get("position")?(r=zr(a,o,this.get("position"),p,f,n),a=r[0],o=r[1]):(r=Nr(a,o,p,f,u,h),a=r[0],o=r[1]),this.get("inPanel")){var v=this.get("panelRange"),y=this.get("panelGroup"),m=y.attr("clip");r=Yr(a,o,p,f,m?m.getBBox():v,this.get("enterable")),a=r[0],o=r[1]}var x=this.get("markerItems");E["isEmpty"](x)||(d=x[0].x,g=x[0].y);var b=[1,0,0,0,1,0,0,0,1],_=Ct(b,[["t",a,o]]);s.stopAnimate(),s.animate({matrix:_},this.get("animationDuration"));var w=this.get("crosshairGroup");if(w){var M=this.get("items");w.setPosition(d,g,M)}t.prototype.setPosition.call(this,a,o)},e.prototype._addItem=function(t){var e=new F["Group"],i=this.get("markerStyle").radius;if(t.marker){var n=E["mix"]({},t.marker,{x:t.marker.radius/2,y:0});e.addShape("marker",{attrs:n}),i=t.marker.radius}var r=this.get("nameStyle");e.addShape("text",{attrs:E["mix"]({x:i+r.padding,y:0,text:t.name},r)});var a=this.get("valueStyle");return e.addShape("text",{attrs:E["mix"]({x:e.getBBox().width+a.padding,y:0,text:t.value},a)}),e},e.prototype._alignToRight=function(t){var e=this,i=this.get("itemsGroup"),n=i.get("children");E["each"](n,(function(i){var n=i.get("children"),r=n[2];if(r){var a=r.getBBox().width,o=t-a-2*e.get("padding").right;r.attr("x",o)}}))},e}(Cr),Jr=Kr,ta={title:{textStyle:{fontSize:12,fill:"#595959",textBaseline:"middle",fontFamily:Pr,textAlign:"center"},offset:20},label:{textStyle:{fontSize:12,fill:"#ccc",textBaseline:"middle",fontFamily:Pr},offset:10,offsetX:0,offsetY:0},grid:{lineWidth:1,stroke:"#C0D0E0"}},ea=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({type:"base",id:null,line:{lineWidth:1,stroke:"#C0D0E0"},tickLine:{lineWidth:1,stroke:"#C0D0E0",length:5},subTickCount:0,subTickLine:null,grid:null,label:null,title:null,autoRotateLabel:!0,autoHideLabel:!1,autoRotateTitle:!0,gridType:"line",ticks:[],labelItems:[],gridPoints:[]},e))||this;return i._processTicks(),i}return Object(B["__extends"])(e,t),e.prototype.render=function(){var t=this.get("grid");t&&this._renderGrid();var e=this.get("line");e&&this._renderLine();var i=this.get("tickLine");i&&this._renderTicks();var n=this.get("label");n&&this._renderLabels();var r=this.get("title");r&&(this.set("title",E["deepMix"]({},ta.title,this.get("title"))),this.renderTitle())},e.prototype.destroy=function(){if(!this.destroyed){t.prototype.destroy.call(this);var e=this.get("gridGroup");e&&e.remove();var i=this.get("labelRenderer");i&&i.destroy();var n=this.get("group");n.destroy(),this.destroyed=!0}},e.prototype.clear=function(){var t=this.get("group");if(!t.get("destroyed")&&t.get("children").length){var e=this.get("gridGroup");e&&e.clear();var i=this.get("labelRenderer");i&&i.clear(),this.get("group").clear()}},e.prototype.parseTick=function(t,e,i){return{text:t,value:e/(i-1)}},e.prototype.addLabel=function(t,e,i,n){var r=this.get("theme")||{},a=this.get("label"),o=a;if(E["isFunction"](o)){var s=a(t.text,i,n);o=s?E["deepMix"]({},r.label,s):null}if(o){o=E["deepMix"]({text:t.text},ta.label,o),o.formatter&&(o.text=o.formatter(t.text,i,n));var l=this.getSideVector(o.offset,e,i),u={x:e.x+l[0]+o.offsetX,y:e.y+l[1]+o.offsetY};if(o.x=u.x,o.y=u.y,o.point=u,E["isNil"](e.rotate)||(o.rotate=e.rotate),E["isNil"](o.rotate))o.textAlign=this.getTextAnchor(l);else{o.textAlign=o.rotate%180===0?"center":o.rotate>0?o.rotate%360<180?"left":"right":o.rotate%360>-180?"right":"left";var h=-6*Math.abs(Math.sin(o.rotate*Math.PI/180));o.y+=h,o.point.y+=h}o.useHtml&&(o.text=o.htmlTemplate),this.get("labelItems").push(o)}},e.prototype.getTextAnchor=function(t){var e=Math.abs(t[1]/t[0]);return e>=1?"center":t[0]>0?"start":"end"},e.prototype.getMaxLabelWidthOrHeight=function(t,e){var i=t.getLabels(),n=0;return E["each"](i,(function(t){var i=t.getBBox(),r=i[e];n<r&&(n=r)})),n},e.prototype.autoRotateLabels=function(){},e.prototype.autoHideLabels=function(){},e.prototype.renderTitle=function(){},e.prototype._renderLine=function(){var t=this.getLinePath(),e=Object(B["__assign"])({path:t},this.get("line")),i=this.get("group"),n=i.addShape("path",{attrs:e,zIndex:1});n.name="axis-line",this.get("appendInfo")&&n.setSilent("appendInfo",this.get("appendInfo")),this.set("lineShape",n)},e.prototype._renderTicks=function(){var t=this.get("tickLine"),e=this.get("tickItems"),i=this.get("subTickItems");if(e&&e.length&&this._addTickLine(e,t),i&&i.length){var n=this.get("subTickLine")||t;this._addTickLine(i,n)}},e.prototype._renderGrid=function(){var t=this,e=this.get("coord"),i=this.get("appendInfo"),n=this.get("group"),r=this.get("gridPoints"),a=this.get("grid"),o=this.get("gridType"),s=this.get("theme")||{},l=this.get("ticks"),u=r.length,h=n.addGroup({class:"axis-grid",zIndex:0});this.set("gridGroup",h);var c=a;E["each"](r,(function(t,n){if(E["isFunction"](a)){var r=l[n],p=r&&a(r.text,n,u);c=p?E["mix"]({},s.grid,p):null}if(c){var f=t.points,d=[];"arc"===o?E["each"](f,(function(t,e){var i=t.radius,n=t.x,r=t.y,a=t.flag;0===e?d.push(["M",n,r]):d.push(["A",i,i,0,0,a,n,r])})):E["each"](f,(function(t,e){var i=t.x,n=t.y;0===e?d.push(["M",i,n]):d.push(["L",i,n])}));var g=h.addShape("path",{attrs:E["mix"]({path:d},ta.grid,c)});g.name="axis-grid",g.id=t.id,g.set("coord",e),i&&g.setSilent("appendInfo",g)}}));var p,f=this.get("gridAlternateColor");f&&E["each"](r,(function(e,i){p&&t._drawAlternativeBg(e,p,i),p=e}))},e.prototype._renderLabels=function(){var t=this.get("group"),e=new Sr({name:"axis-label"});e.set("coord",this.get("coord")),e.set("group",t.addGroup({class:"axis-labels"})),e.set("canvas",this.get("canvas")),e.set("items",this.get("labelItems")),e.draw(!1),this.set("labelRenderer",e),this.get("autoRotateLabel")&&this.autoRotateLabels(),this.get("autoHideLabel")&&this.autoHideLabels()},e.prototype._processTicks=function(){var t=this,e=this.get("label"),i=this.get("subTickCount"),n=this.get("tickLine"),r=this._parseTicks(this.get("ticks")),a=r.length;if(E["each"](r,(function(i,r){var o=t.getTickPoint(i.value,r);n&&t._addTickItem(r,o,n.length),e&&t.addLabel(i,o,r,a)})),i){var o=this.get("subTickLine");E["each"](r,(function(e,a){if(a>0){var s=e.value-r[a-1].value;s/=t.get("subTickCount")+1;for(var l=1;l<=i;l++){var u={text:"",value:a?r[a-1].value+l*s:l*s},h=t.getTickPoint(u.value),c=void 0;c=o&&o.length?o.length:Math.floor(.6*n.length),t._addTickItem(l-1,h,c,"sub")}}}))}},e.prototype._parseTicks=function(t){void 0===t&&(t=[]);for(var e=t.length,i=0;i<e;i++){var n=t[i];E["isObject"](n)||(t[i]=this.parseTick(n,i,e))}return this.set("ticks",t),t},e.prototype._addTickItem=function(t,e,i,n){void 0===n&&(n="");var r=this.get("tickItems")||[],a=this.get("subTickItems")||[],o=this.getTickEnd(e,i,t),s={x1:e.x,y1:e.y,x2:o.x,y2:o.y};"sub"===n?a.push(s):r.push(s),this.set("tickItems",r),this.set("subTickItems",a)},e.prototype._addTickLine=function(t,e){var i=E["mix"]({},e),n=[];E["each"](t,(function(t){n.push(["M",t.x1,t.y1]),n.push(["L",t.x2,t.y2])})),delete i.length,i.path=n;var r=this.get("group"),a=r.addShape("path",{attrs:i,zIndex:1});a.name="axis-ticks",a.id=this.get("id")+"-ticks",a.set("coord",this.get("coord")),this.get("appendInfo")&&a.setSilent("appendInfo",this.get("appendInfo"))},e.prototype._drawAlternativeBg=function(t,e,i){var n,r,a,o=this.get("gridAlternateColor");E["isString"](o)?r=o:E["isArray"](o)&&(r=o[0],a=o[1]),i%2===0?a&&(n=this._getBackItem(e.points,t.points,a)):r&&(n=this._getBackItem(e.points,t.points,r));var s=this.get("gridGroup"),l=s.addShape("Path",{attrs:n});l.name="axis-grid-rect",l.id=t.id&&t.id.replace("grid","grid-rect"),l.set("coord",this.get("coord")),this.get("appendInfo")&&l.setSilent("appendInfo",this.get("appendInfo"))},e.prototype._getBackItem=function(t,e,i){var n=[],r=this.get("gridType");if("arc"===r){E["each"](t,(function(t,e){var i=t.x,r=t.y,a=t.radius,o=t.flag;0===e?n.push(["M",i,r]):n.push(["A",a,a,0,0,o,i,r])}));for(var a=e.length-1;a>=0;a--){var o=e[a],s=o.x,l=o.y,u=o.radius,h=o.flag;a===e.length-1?n.push(["M",s,l]):n.push(["A",u,u,0,0,1===h?0:1,s,l])}}else{E["each"](t,(function(t,e){var i=t.x,r=t.y;0===e?n.push(["M",i,r]):n.push(["L",i,r])}));for(var c=e.length-1;c>=0;c--)n.push(["L",e[c].x,e[c].y]);n.push(["Z"])}return{fill:i,path:n}},e}(pr),ia=ea,na=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Object(B["__assign"])({type:"circle",startAngle:-Math.PI/2,endAngle:3*Math.PI/2},e))||this}return Object(B["__extends"])(e,t),e.prototype.parseTick=function(t,e,i){return{text:t,value:e/i}},e.prototype.getTickPoint=function(t){var e=this.get("startAngle"),i=this.get("endAngle"),n=e+(i-e)*t;return this._getCirclePoint(n)},e.prototype.getSideVector=function(t,e){var i=this.get("center"),n=[e.x-i.x,e.y-i.y];if(!E["isNil"](t)){var r=St.length(n);St.scale(n,n,t/r)}return n},e.prototype.getSidePoint=function(t,e){var i=this.getSideVector(e,t);return{x:t.x+i[0],y:t.y+i[1]}},e.prototype.getTickEnd=function(t,e){var i=this.get("tickLine"),n=E["isNil"](e)?i.length:e;return this.getSidePoint(t,n)},e.prototype.getTextAnchor=function(t){var e;return E["isNumberEqual"](t[0],0)?e="center":t[0]>0?e="left":t[0]<0&&(e="right"),e},e.prototype.getLinePath=function(){var t=this.get("center"),e=t.x,i=t.y,n=this.get("radius"),r=n,a=this.get("startAngle"),o=this.get("endAngle"),s=this.get("inner"),l=[];if(Math.abs(o-a)===2*Math.PI)l=[["M",e,i],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];else{var u=this._getCirclePoint(a),h=this._getCirclePoint(o),c=Math.abs(o-a)>Math.PI?1:0,p=a>o?0:1;if(s){var f=this.getSideVector(s*n,u),d=this.getSideVector(s*n,h),g={x:f[0]+e,y:f[1]+i},v={x:d[0]+e,y:d[1]+i};l=[["M",g.x,g.y],["L",u.x,u.y],["A",n,r,0,c,p,h.x,h.y],["L",v.x,v.y],["A",n*s,r*s,0,c,Math.abs(p-1),g.x,g.y]]}else l=[["M",e,i],["L",u.x,u.y],["A",n,r,0,c,p,h.x,h.y],["L",e,i]]}return l},e.prototype.addLabel=function(e,i,n,r){var a=E["get"](this.get("label"),"offset",5),o=this.getSidePoint(i,a);t.prototype.addLabel.call(this,e,o,n,r)},e.prototype.autoRotateLabels=function(){var t=this.get("ticks"),e=this.get("labelRenderer");if(e&&t.length>12){var i=this.get("radius"),n=this.get("startAngle"),r=this.get("endAngle"),a=r-n,o=a/(t.length-1),s=Math.sin(o/2)*i*2,l=this.getMaxLabelWidthOrHeight(e,"width");E["each"](e.getLabels(),(function(e,i){var r=t[i],o=r.value*a+n,u=o%(2*Math.PI);l<s?(u<=0&&(o+=Math.PI),u>Math.PI&&(o-=Math.PI),o-=Math.PI/2,e.attr("textAlign","center")):u>Math.PI/2?o-=Math.PI:u<Math.PI/2*-1&&(o+=Math.PI),e.rotateAtStart(o)}))}},e.prototype._getCirclePoint=function(t,e){void 0===e&&(e=0);var i=this.get("center"),n=e||this.get("radius");return{x:i.x+Math.cos(t)*n,y:i.y+Math.sin(t)*n}},e}(ia),ra=na,aa=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Object(B["__assign"])({type:"helix",startAngle:1.25*Math.PI,endAngle:7.25*Math.PI,inner:0,a:0,center:null,axisStart:null,crp:[]},e))||this}return Object(B["__extends"])(e,t),e.prototype.getLinePath=function(){var t=this.get("crp"),e=this.get("axisStart"),i=Tt(t);return i.unshift(["M",e.x,e.y]),i},e.prototype.getTickPoint=function(t){var e=this.get("startAngle"),i=this.get("endAngle"),n=e+(i-e)*t;return this._getHelixPoint(n)},e.prototype.getSideVector=function(t,e){var i=this.get("center"),n=[e.x-i.x,e.y-i.y];if(!E["isNil"](t)){var r=St.length(n);St.scale(n,n,t/r)}return n},e.prototype.getSidePoint=function(t,e){var i=this.getSideVector(e,t);return{x:t.x+i[0],y:t.y+i[1]}},e.prototype.getTickEnd=function(t,e){var i=this.get("tickLine"),n=e||i.length;return this.getSidePoint(t,n)},e.prototype._getHelixPoint=function(t){var e=this.get("center"),i=this.get("a"),n=i*t+this.get("inner");return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},e}(ia),oa=aa,sa=[0,-45,-90],la=function(t){function e(e){return void 0===e&&(e={}),t.call(this,Object(B["__assign"])({type:"line",x:null,y:null,isVertical:!1,start:null,end:null},e))||this}return Object(B["__extends"])(e,t),e.prototype.getSideVector=function(t){var e=this.get("isVertical"),i=this.get("factor");if(!E["isNumber"](t))return[0,0];var n=this.get("start"),r=this.get("end"),a=this.getAxisVector(),o=St.normalize([],a),s=!1;(e&&n.y<r.y||!e&&n.x>r.x)&&(s=!0);var l=St.vertical([],o,s);return St.scale([],l,t*i)},e.prototype.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},e.prototype.getLinePath=function(){var t=this.get("start"),e=this.get("end");return[["M",t.x,t.y],["L",e.x,e.y]]},e.prototype.getTickEnd=function(t,e){var i=this.getSideVector(e);return{x:t.x+i[0],y:t.y+i[1]}},e.prototype.getTickPoint=function(t){var e=this.get("start"),i=this.get("end"),n=i.x-e.x,r=i.y-e.y;return{x:e.x+n*t,y:e.y+r*t}},e.prototype.renderTitle=function(){var t=this.get("title"),e=this.get("label"),i=E["get"](e,"rotate"),n=this.get("autoRotateTitle"),r=this.getTickPoint(.5),a=t.offset?t.offset:20,o=this.get("labelRenderer");if(o){var s=this.get("position"),l="bottom"===s||"top"===s?"height":"width",u=this.getMaxLabelWidthOrHeight(o,l);if(this.get("autoRotateLabel")){var h=this.getAutoRotateAngle();h&&(u=this.getOffsetByRotateAngle(h))}i&&(u=this.getOffsetByRotateAngle(i*Math.PI/180));var c=E["get"](this.get("label"),"offset",5);a+=u+c}var p=t.textStyle,f=E["mix"]({},p);if(t.text){var d=this.getAxisVector();if(n&&E["isNil"](t.rotate)){h=0;if(!E["isNumberEqual"](d[1],0)){var g=[1,0],v=[d[0],d[1]];h=St.angleTo(v,g,!0)}f.rotate=h*(180/Math.PI)}else E["isNil"](t.rotate)||(f.rotate=t.rotate/180*Math.PI);var y=this.getSideVector(a),m=void 0;s=t.position;m="start"===s?{x:this.get("start").x+y[0],y:this.get("start").y+y[1]}:"end"===s?{x:this.get("end").x+y[0],y:this.get("end").y+y[1]}:{x:r.x+y[0],y:r.y+y[1]},f.x=m.x,f.y=m.y,f.text=t.text;var x=this.get("group"),b=x.addShape("Text",{zIndex:2,attrs:f});b.name="axis-title",this.get("appendInfo")&&b.setSilent("appendInfo",this.get("appendInfo"))}},e.prototype.autoRotateLabels=function(){var t=this.get("labelRenderer");if(t){var e=t.getLabels(),i=(this.getAxisVector(),this.getAutoRotateAngle());if(i){this.set("autoRotateAngle",i);var n=-6*Math.abs(Math.sin(i)),r=i%Math.PI===0?"center":i>0?i%(2*Math.PI)<Math.PI?"left":"right":i%(2*Math.PI)>-Math.PI?"right":"left";E["each"](e,(function(t){t.attr("textAlign",r),t.rotateAtStart(i),t.attr("y",t.attr("y")+n)}))}}},e.prototype.autoHideLabels=function(){var t,e,i=this.get("labelRenderer"),n=8;if(i){var r=this.get("tickItems"),a=i.getLabels(),o=this.getAxisVector();if(a.length<2)return;if(E["isNumberEqual"](o[0],0)){var s=this.getMaxLabelWidthOrHeight(i,"height")+n,l=Math.abs(this._getAvgLabelHeightSpace(i));s>l&&(t=s,e=l)}else if(E["isNumberEqual"](o[1],0)&&a.length>1){var u=this.getMaxLabelWidthOrHeight(i,"width")+n,h=Math.abs(this._getAvgLabelLength(i));u>h&&(t=u,e=h)}if(t&&e){var c=Math.ceil(t/e);if(E["each"](a,(function(t,e){e%c!==0&&(t.set("visible",!1),t.attr("text",""))})),r){var p=E["filter"](r,(function(t,e){return a[e].get("visible")}));E["size"](p)>0&&(this.set("tickItems",p),E["remove"](this.get("group").get("children"),(function(t){return"axis-ticks"===t.name})),this._renderTicks())}}}},e.prototype.getAutoRotateAngleByAvgWidth=function(t){var e,i=this.get("autoRotateLabel"),n=this.get("labelRenderer"),r=this.get("title");if(n){var a=n.getLabels(),o=this.get("label").offset,s=12,l=r&&r.offset?r.offset:20;if(l<0)return;var u=this.getAxisVector(),h=void 0,c=void 0;if(E["isNumberEqual"](u[0],0)&&r&&r.text)h=this.getMaxLabelWidthOrHeight(n,"width"),h>l-o-s&&(e=-1*Math.acos((l-o-s)/h));else if(E["isNumberEqual"](u[1],0)&&a.length>1&&(h=this.getMaxLabelWidthOrHeight(n,"width"),c=this.getMaxLabelWidthOrHeight(n,"height"),h>t))for(var p=E["isArray"](i)?i:sa,f=0,d=p;f<d.length;f++){var g=d[f];if(e=g*Math.PI/180,t*Math.abs(Math.sin(e))>c+4)break}}return e},e.prototype.getOffsetByRotateAngle=function(t){var e=this.get("labelRenderer"),i=this.get("position"),n="bottom"===i||"top"===i?"height":"width",r=this.getMaxLabelWidthOrHeight(e,n);return t?Math.max(r,this.getMaxLabelWidthOrHeight(e,"width")*Math.abs(Math.sin(t))):r},e.prototype._getAvgLabelLength=function(t){var e=t.getLabels();return e[1].attr("x")-e[0].attr("x")},e.prototype._getAvgLabelHeightSpace=function(t){var e=t.getLabels();return e[1].attr("y")-e[0].attr("y")},e.prototype.getAutoRotateAngle=function(){var t=this.get("labelRenderer"),e=t.getLabels();if(e&&!(e.length<2)){var i=Math.abs(this._getAvgLabelLength(t));return this.getAutoRotateAngleByAvgWidth(i)}},e}(ia),ua=la,ha=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({type:"base",title:null,items:null,formatter:null,offsetX:0,offsetY:0},e))||this;return i.init(),i.render(),i.bindEvents(),i}return Object(B["__extends"])(e,t),e.prototype.render=function(){this.renderTitle(),this.renderItems()},e.prototype.getWidth=function(){var t=this.get("container"),e=t.getBBox();return e.width},e.prototype.getHeight=function(){var t=this.get("container"),e=t.getBBox();return e.height},e.prototype.getBBox=function(){return this.get("container").getBBox()},e.prototype.moveTo=function(t,e){var i=this.get("container");i.move(t,e),this.set("x",t),this.set("y",e)},e.prototype.draw=function(){this.get("canvas").draw()},e.prototype.formatterValue=function(t){var e=this.get("formatter")||E["identity"];return e.call(this,t)},e}(pr),ca=ha,pa=8,fa=2*pa,da=2*fa,ga=4,va={fill:"#fff",shadowBlur:10,shadowColor:"rgba(0,0,0,0.65)",radius:2},ya={fill:"#333",textAlign:"center",textBaseline:"middle",stroke:"#fff",lineWidth:5,fontFamily:Pr},ma={fill:"#D9D9D9"},xa={fill:"rgb(64, 141, 251)"},ba={fill:"#333",textBaseline:"top",textAlign:"start",fontFamily:Pr},_a=function(t){function e(e){var i=t.call(this)||this;i.onMouseMove=function(t){var e=t.clientX,n=t.clientY;i.updateSliderStatus(e,n)},i.onMouseUp=function(){i.clearAllEvents&&i.clearAllEvents(),i.currentTarget=void 0};var n=e.layout,r=e.sliderType,a=e.sliderSize,o=e.operational,s=e.width,l=e.height,u=e.textStyle,h=e.min,c=e.max,p=e.range,f=e.formatter;i.layout=n,i.sliderType=r;var d=a||[],g=d[0],v=void 0===g?pa:g,y=d[1],m=void 0===y?fa:y;return i.sliderSize=[v,m],i.operational=o,i.width=s,i.height=l,i.min=h,i.max=c,i.range=p,i.textStyle=u,i.formatter=f,i.initialSlider(),i}return Object(B["__extends"])(e,t),e.prototype.setBackground=function(t){this.backgroundGroup&&this.backgroundGroup.destroy();var e=t.group,i=(t.background,t.frontend);this.backgroundGroup=e,this.backgroundGroup.set("zIndex",0),this.operational&&this.rangeSliderShape&&i&&i.attr("clip",this.rangeSliderShape),this.add(this.backgroundGroup),this.sort()},e.prototype.isHorizontal=function(){return"horizontal"===this.layout},e.prototype.initialSlider=function(){if(this.operational){this.rangeSliderShape=this.createRangeSliderShape(),this.rangeSliderShape.set("zIndex",1),this.minSliderGroup=this.createMinSliderGroup(),this.minSliderGroup.set("zIndex",2),this.maxSliderGroup=this.createMaxSliderGroup(),this.maxSliderGroup.set("zIndex",2);var t=this.range,e=t[0],i=t[1];this.renderUIWithRange(e,i)}this.bindEvent()},e.prototype.getSliderCursor=function(){return this.isHorizontal()?"ew-resize":"ns-resize"},e.prototype.createMinSliderGroup=function(){var t=this.addGroup();return this.minSliderShape=this.createSliderButton(t,!0),this.minTextShape=this.createSliderText(t,!0),t},e.prototype.createMaxSliderGroup=function(){var t=this.addGroup();return this.maxSliderShape=this.createSliderButton(t,!1),this.maxTextShape=this.createSliderText(t,!1),t},e.prototype.createRangeSliderShape=function(){return this.addShape("rect",{attrs:{fill:"#fff",fillOpacity:0,cursor:"move"}})},e.prototype.getRectButtonAttribute=function(t){var e=this.sliderSize,i=e[0],n=e[1];return this.isHorizontal()?{x:t?-i:0,y:this.height/2-n/2,width:i,height:n}:{x:this.width/2-n/2,y:t?0:-i,width:n,height:i}},e.prototype.getCircleButtonAttribute=function(t){return this.isHorizontal()?{x:0,y:this.height/2,r:da/2}:{x:this.width/2,y:0,r:da/2}},e.prototype.createSliderButton=function(t,e){var i="rect"===this.sliderType?this.getRectButtonAttribute(e):"circle"===this.sliderType?this.getCircleButtonAttribute(e):{},n=Object(B["__assign"])(Object(B["__assign"])(Object(B["__assign"])({},i),va),{cursor:this.getSliderCursor()});return t.addShape(this.sliderType,{attrs:n})},e.prototype.getRectTextAttribute=function(t){var e=this.sliderSize,i=e[0],n=e[1];return this.isHorizontal()?{x:t?-i/2:i/2,y:this.height/2+n/2+4,textAlign:"center",textBaseline:"top"}:{x:this.width/2+n/2+4,y:t?i/2:-i/2,textAlign:"left",textBaseline:"middle"}},e.prototype.getCircleTextAttribute=function(t){return this.isHorizontal()?{x:0,y:this.height/2+da/2+4,textAlign:"center",textBaseline:"top"}:{x:this.width/2+da/2+4,y:0,textAlign:"left",textBaseline:"middle"}},e.prototype.createSliderText=function(t,e){var i="rect"===this.sliderType?this.getRectTextAttribute(e):"circle"===this.sliderType?this.getCircleTextAttribute(e):{},n=Object(B["__assign"])(Object(B["__assign"])(Object(B["__assign"])({},this.textStyle),i),{text:""});return t.addShape("text",{attrs:n})},e.prototype.bindEvent=function(){this.operational&&this.on("mousedown",this.onMouseDown)},e.prototype.onMouseDown=function(t){this.currentTarget=t.target;var e=t.event;e.stopPropagation(),e.preventDefault();var i=e.clientX,n=e.clientY;this.pos=this.isHorizontal()?i:n,this.bindCanvasEvents()},e.prototype.bindCanvasEvents=function(){var t=this.get("canvas").get("containerDOM"),e=X["addEventListener"](t,"mousemove",this.onMouseMove),i=X["addEventListener"](t,"mouseup",this.onMouseUp),n=X["addEventListener"](t,"mouseleave",this.onMouseUp);this.clearAllEvents=function(){e.remove(),i.remove(),n.remove()}},e.prototype.isDragMin=function(){return this.currentTarget===this.minSliderShape},e.prototype.isDragMax=function(){return this.currentTarget===this.maxSliderShape},e.prototype.isDragAll=function(){return this.currentTarget===this.rangeSliderShape},e.prototype.updateSliderStatus=function(t,e){var i=this,n=this.isHorizontal()?this.width:this.height,r=this.isHorizontal()?1:-1,a=this.range,o=a[0],s=a[1],l=this.pos,u=this.isHorizontal()?t:e,h=u-l,c=h/n*r,p=[o,s];this.isDragAll()?p=c>=0&&s+c>1?[o+(1-s),1]:c<0&&o+c<0?[0,s-o]:[o+c,s+c]:(this.isDragMin()&&(p[0]=this.getNewRange(o,c)),this.isDragMax()&&(p[1]=this.getNewRange(s,c)),p[1]<p[0]&&(p=Array(2).fill(this.isDragMin()?p[0]:p[1]))),this.pos=u,this.range=p,this.emit("sliderchange",{range:p,value:p.map((function(t){return i.getValue(t)}))}),this.renderUIWithRange(p[0],p[1]),this.get("canvas").draw()},e.prototype.renderUIWithRange=function(t,e){var i=this.width,n=this.height;this.minSliderGroup.resetMatrix(),this.maxSliderGroup.resetMatrix(),this.isHorizontal()?(this.rangeSliderShape.attr({x:i*t,y:0,width:(e-t)*i,height:n}),this.minSliderGroup.translate(t*i,0),this.maxSliderGroup.translate(e*i,0)):(this.rangeSliderShape.attr({x:0,y:n*(1-e),width:i,height:(e-t)*n}),this.minSliderGroup.translate(0,(1-t)*n),this.maxSliderGroup.translate(0,(1-e)*n)),this.minTextShape.attr("text",this.formatter(this.getValue(t))),this.maxTextShape.attr("text",this.formatter(this.getValue(e))),"circle"===this.sliderType&&(this.minSliderShape.attr({r:(fa+t*(da-fa))/2}),this.maxSliderShape.attr({r:(fa+e*(da-fa))/2}))},e.prototype.getNewRange=function(t,e){var i=e+t;return i>1?1:i<0?0:i},e.prototype.getValue=function(t){var e=this.min+(this.max-this.min)*t;return Number(e.toFixed(e>1?0:2))},e}(F["Group"]),wa=_a,Ma=function(t){function e(e){var i=this,n=e.backgroundStyle,r=e.fillStyle,a=e.textStyle,o=e.titleStyle,s=Object(B["__rest"])(e,["backgroundStyle","fillStyle","textStyle","titleStyle"]),l=e.layout,u=void 0===l?"horizontal":l,h={width:"horizontal"===u?156:16,height:"horizontal"===u?16:156};return i=t.call(this,Object(B["__assign"])(Object(B["__assign"])({titleDistance:16,layout:"horizontal",operational:!0,handleIcon:"rect",backgroundStyle:Object(B["__assign"])(Object(B["__assign"])({},ma),n),fillStyle:Object(B["__assign"])(Object(B["__assign"])({},xa),r),textStyle:Object(B["__assign"])(Object(B["__assign"])({},ya),a),titleStyle:Object(B["__assign"])(Object(B["__assign"])({},ba),o),width:156,height:16},h),s))||this,i}return Object(B["__extends"])(e,t),e.prototype.init=function(){var t=this.get("container");this.set("canvas",t.get("canvas"));var e=t.addGroup();this.set("legendGroup",e);var i=e.addGroup();this.set("itemsGroup",i),e.translate(this.get("offsetX"),this.get("offsetY"))},e.prototype.renderTitle=function(){if(this.isShowTitle()){var t=this.get("title"),e=this.get("legendGroup"),i=this.get("titleStyle"),n=e.addShape("text",{attrs:Object(B["__assign"])({x:0,y:0,text:t},i)});n.name="legend-title",this.set("titleShape",n)}},e.prototype.renderItems=function(){this.renderSlider()},e.prototype.bindEvents=function(){this.isOperational()},e.prototype.clear=function(){var t=this.get("container");t&&!t.destroyed&&t.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this.get("container");e&&!e.destroyed&&(e.get("parent")&&e.remove(!0),e.destroy())},e.prototype.isHorizontal=function(){return"horizontal"===this.get("layout")},e.prototype.isOperational=function(){return this.get("operational")},e.prototype.isShowTitle=function(){return!!this.get("title")},e.prototype.getSliderConfig=function(){return{layout:this.get("layout"),sliderType:this.get("handleIcon"),sliderSize:this.get("handleSize"),sliderStyle:this.get("handleStyle"),operational:this.isOperational(),width:this.get("width"),height:this.get("height"),min:E["head"](this.get("items")).value,max:E["last"](this.get("items")).value,range:this.get("range")||[0,1],textStyle:Object(B["__assign"])({},this.get("textStyle")),formatter:this.formatterValue}},e.prototype.renderSlider=function(){var t=this,e=this.get("itemsGroup"),i=new wa(this.getSliderConfig());if(i.setBackground(this.createBackgroundGroup()),this.isShowTitle()){var n=this.get("titleDistance"),r=this.get("titleShape").getBBox(),a=r.height;i.translate(0,n+a)}i.on("sliderchange",(function(e){var i=e.value,n=(e.range,new F["Event"]("itemfilter",e,!0,!0));n.range=i,t.emit("itemfilter",n)})),e.add(i),this.set("slider",i)},e}(ca),Sa=Ma,ka=2,Oa=function(t){function e(e){return t.call(this,Object(B["__assign"])({type:"size-legend"},e))||this}return Object(B["__extends"])(e,t),e.prototype.getBackgroundShapeAttr=function(){var t=this.get("width"),e=this.get("height"),i=t/2,n=e/2,r=[];return r="rect"===this.get("handleIcon")?this.isHorizontal()?[[0,e],[0,e-4],[t,0],[t,e]]:[[0,0],[t,0],[t,e],[t-4,e]]:this.isHorizontal()?[[0,n+ka],[0,n-ka],[t,n-ka],[t,n+ka]]:[[i+ka,0],[i-ka,0],[i-ka,e],[i+ka,e]],{points:r}},e.prototype.createBackgroundGroup=function(){var t=this.getBackgroundShapeAttr(),e=this.get("backgroundStyle"),i=this.get("fillStyle"),n=new F["Polygon"]({attrs:Object(B["__assign"])(Object(B["__assign"])({},t),e)}),r=new F["Polygon"]({attrs:Object(B["__assign"])(Object(B["__assign"])(Object(B["__assign"])({},t),e),i)}),a=new F["Group"];return this.isOperational()?(a.add(n),a.add(r)):a.add(r),{group:a,background:n,frontend:r}},e}(Sa),Ca=Oa,Aa=function(t){function e(e){return t.call(this,Object(B["__assign"])({type:"color-legend"},e))||this}return Object(B["__extends"])(e,t),e.prototype.calculatePercent=function(t){var e=E["head"](t).value,i=E["last"](t).value,n=i-e;return E["map"](t,(function(t){return Object(B["__assign"])(Object(B["__assign"])({},t),{percentage:(Number(t.value)-e)/n})}))},e.prototype.isSegment=function(){return!!this.get("isSegment")},e.prototype.getOperationalGroup=function(){var t,e=this.get("width"),i=this.get("height"),n=this.calculatePercent(this.get("items")),r=this.get("backgroundStyle"),a="";this.isHorizontal()?(a+="l (0) ",E["each"](n,(function(e){t=ke["default"].toRGB(e.color),a+=e.percentage+":"+t+" "}))):(a+="l (90) ",E["each"](n,(function(e){t=ke["default"].toRGB(e.color),a+=1-e.percentage+":"+t+" "})));var o=new F["Rect"]({attrs:Object(B["__assign"])({x:0,y:0,width:e,height:i,strokeOpacity:0},r)}),s=new F["Rect"]({attrs:{x:0,y:0,width:e,height:i,fill:a,strokeOpacity:0}}),l=new F["Group"];return this.isOperational()?(l.add(o),l.add(s)):l.add(s),{group:l,background:o,frontend:s}},e.prototype.getUnOperationalGroup=function(){var t,e=this,i=this.get("width"),n=this.get("height"),r=this.calculatePercent(this.get("items")),a=this.get("textStyle"),o=new F["Group"],s="",l=[],u=r.length;this.isHorizontal()?(s+="l (0) ",E["each"](r,(function(h,c){if(0!==c&&c!==u-1&&(l.push(["M",h.percentage*i,0]),l.push(["L",h.percentage*i,n])),t=ke["default"].toRGB(r[c].color),e.isSegment()&&c>0){var p=ke["default"].toRGB(r[c-1].color);s+=h.percentage+":"+p+" "}s+=h.percentage+":"+t+" ",o.addShape("text",{attrs:Object(B["__assign"])(Object(B["__assign"])({x:h.percentage*i,y:n+ga,text:""+e.formatterValue(h.value)},a),{textBaseline:"top",textAlign:"center"})})}))):(s+="l (90) ",E["each"](r,(function(h,c){if(0!==c&&c!==u-1&&(l.push(["M",0,n-h.percentage*n]),l.push(["L",i,n-h.percentage*n])),t=ke["default"].toRGB(r[c].color),s+=1-h.percentage+":"+t+" ",e.isSegment()&&c>0){var p=ke["default"].toRGB(r[c-1].color);s+=1-h.percentage+":"+p+" "}o.addShape("text",{attrs:Object(B["__assign"])(Object(B["__assign"])({x:i+ga,y:(1-h.percentage)*n,text:""+e.formatterValue(h.value)},a),{textAlign:"start",textBaseline:"middle"})})})));var h=o.addShape("rect",{attrs:{x:0,y:0,width:i,height:n,fill:s,strokeOpacity:0}});return o.addShape("path",{attrs:{path:l,lineWidth:1,stroke:"#fff"}}),{group:o,background:h,frontend:void 0}},e.prototype.createBackgroundGroup=function(){return this.isOperational()?this.getOperationalGroup():this.getUnOperationalGroup()},e}(Sa),La=Aa,Pa={right:90*Math.PI/180,left:270*Math.PI/180,up:0,down:180*Math.PI/180},ja=function(){function t(t){this.width=10,this.height=10,this.direction="right",E["assign"](this,t),this._init()}return t.prototype._init=function(){var t=this.width/2,e=this.height/2,i=[{x:0,y:-e},{x:-t,y:e},{x:t,y:e}];this.shape=new F["Path"]({attrs:E["deepMix"]({path:[["M",i[0].x,i[0].y],["L",i[1].x,i[1].y],["L",i[2].x,i[2].y],["Z"]]},this.attrs)});var n=[];n.push(["r",Pa[this.direction]]),n.push(["t",this.x,this.y]),this.shape.transform(n)},t}(),Ta=ja,Ba={layout:"horizontal",titleDistance:15,itemDistance:5,itemMarginBottom:8,wordSpacing:8,backgroundPadding:0,unSelectedColor:"#ccc",offsetX:0,offsetY:0},Ia=function(t){function e(e){return t.call(this,Object(B["__assign"])(Object(B["__assign"])({hoverable:!0,clickable:!0,selectedMode:"multiple",allowAllCanceled:!1,reversed:!1,autoWrap:!0},Ba),e))||this}return Object(B["__extends"])(e,t),e}(ca),Da=Ia,Fa=function(t){function e(e){return t.call(this,Object(B["__assign"])({type:"category-legend"},e))||this}return Object(B["__extends"])(e,t),e.prototype.init=function(){this.isFlipped=!1;var t=this.get("container");this.set("canvas",t.get("canvas"));var e=t.addGroup();this.set("itemsGroup",e),this.get("flipPage")&&this.set("autoWrap",!0)},e.prototype.renderTitle=function(){var t=this.get("title");if(t){var e=this.get("container"),i=this.get("titleStyle"),n=e.addShape("text",{attrs:Object(B["__assign"])({x:0,y:0,text:t},i)});n.name="legend-title",this.set("titleShape",n)}},e.prototype.renderItems=function(){var t=this,e=this.get("items");this.get("reversed")&&e.reverse(),Object(E["each"])(e,(function(e){t._addItem(e)})),this.get("autoWrap")&&this._adjustItems();var i=this._getMaxItemSize(),n=i.maxItemWidth,r=i.maxItemHeight;this.set("maxItemWidth",n),this.set("maxItemHeight",r);var a=this.isNeedFlip();a&&this.flipPage(),this._adjustPositionOffset(),this._renderBack()},e.prototype.isNeedFlip=function(){var t=this.get("maxWidth"),e=this.get("maxItemHeight"),i=this.get("itemsGroup").getBBox(),n=this.get("layout");if(this.get("flipPage")){if("vertical"===n&&t<i.width)return!0;if("horizontal"===n&&e<i.height)return!0}return!1},e.prototype.flipPage=function(){var t=this;this.isFlipped=!0;var e=this.get("maxItemWidth"),i=this.get("maxItemHeight"),n=this.get("maxWidth"),r=this.get("maxHeight"),a=this.get("itemsGroup"),o=a.getBBox(),s=this.get("layout"),l=this._getPaginationCfg(),u=0,h="up-down",c=o.tl.x,p=o.tl.y,f=0,d=new F["Rect"]({attrs:{x:c,y:p,width:n-l.size,height:r}});if("horizontal"===s){var g=Math.max(n,o.width);if(d.attr("width",g),d.attr("height",i),this.set("maxWidth",g),this.set("maxHeight",i),u=Math.ceil(o.height/(i+this.get("itemMarginBottom"))),c=c+g-l.size,p=Math.ceil(p+i/2),f=i,p-this._getHorizontalPaginationHeight()/2<0){var v=(this.get("offsetY")||0)+this._getHorizontalPaginationHeight()/2-p;this.set("offsetY",v)}}if("vertical"===s){d.attr("width",e);var y=Math.max(r,o.height);d.attr("height",y),this.set("maxWidth",e),this.set("maxHeight",y),u=Math.ceil(o.width/(e+this.get("itemDistance"))),p=p+y+10,h="left-right",f=e}a.attr("clip",d),this.set("clip",d);var m=this.flipPageUI(c,p,f,u,h);this.flipUI=m;var x=1,b=m.arrows[0],_=m.arrows[1];b.on("click",(function(){if(x>1){x-=1,m.text.attr("text",x+" / "+u);var n=Object(E["clone"])(a.attr("matrix"));if("vertical"===s){var r=t.get("itemDistance")+e;n[6]+=r}else{r=i+t.get("itemMarginBottom");n[7]+=r}a.stopAnimate(),a.animate({matrix:n},100),t.get("canvas").draw()}})),_.on("click",(function(){if(x<u){x+=1,m.text.attr("text",x+" / "+u);var n=Object(E["clone"])(a.attr("matrix"));if("vertical"===s){var r=t.get("itemDistance")+e;n[6]-=r}else{r=i+t.get("itemMarginBottom");n[7]-=r}a.stopAnimate(),a.animate({matrix:n},100)}}))},e.prototype.flipPageUI=function(t,e,i,n,r){var a,o=this._getPaginationCfg(),s=this.get("container"),l=s.addGroup(),u=[];if("left-right"===r){var h=new Ta(Object(E["mix"])({},o.arrow,{x:t+o.arrow.width/2,y:e,direction:"left"}));l.add(h.shape),u.push(h.shape);var c=new Ta(Object(E["mix"])({},o.arrow,{x:t+i-o.arrow.width/2,y:e,direction:"right"}));l.add(c.shape),u.push(c.shape),a=l.addShape("text",{attrs:Object(E["mix"])({},o.text,{x:t+i/2,y:e,text:"1 / "+n})})}else{var p=this._getHorizontalPaginationHeight(),f=new Ta(Object(E["mix"])({},o.arrow,{x:t,y:e-p/2+o.arrow.height/2,direction:"up"}));l.add(f.shape),u.push(f.shape);var d=new Ta(Object(E["mix"])({},o.arrow,{x:t,y:e+p/2-o.arrow.height/2,direction:"down"}));l.add(d.shape),u.push(d.shape),a=l.addShape("text",{attrs:Object(E["mix"])({},o.text,{x:t,y:e,text:"1 / "+n})})}return{arrows:u,text:a,container:l}},e.prototype._getPaginationCfg=function(){var t={arrow:{x:0,y:0,width:10,height:8,attrs:{fill:"#ccc",cursor:"pointer"},direction:"right"},text:{fontSize:12,fill:"#ccc",textAlign:"center",textBaseline:"middle"},size:40};return t},e.prototype._getHorizontalPaginationHeight=function(){var t=2,e=this._getPaginationCfg();return e.text.fontSize+2*e.arrow.height+2*t},e.prototype.bindEvents=function(){var t=this.get("itemsGroup");this.get("hoverable")&&(t.on("mousemove",Object(E["wrapBehavior"])(this,"_onMousemove")),t.on("mouseleave",Object(E["wrapBehavior"])(this,"_onMouseleave"))),this.get("clickable")&&t.on("click",Object(E["wrapBehavior"])(this,"_onClick"))},e.prototype.clear=function(){var t=this.get("container");t&&!t.destroyed&&t.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this.get("container");e&&!e.destroyed&&(e.get("parent")&&e.remove(),e.destroy())},e.prototype.getCheckedCount=function(){var t=this.get("itemsGroup"),e=t.get("children"),i=Object(E["filter"])(e,(function(t){return t.get("checked")}));return i.length},e.prototype.getWidth=function(){return this.getBBox().width},e.prototype.getHeight=function(){return this.getBBox().height},e.prototype.getBBox=function(){if(this.isFlipped){var t=this.get("clip"),e=this.flipUI.container;return this._mergeBBox([t.getBBox(),e.getBBox()])}return this.get("container").getBBox()},e.prototype._adjustPositionOffset=function(){var t=this.get("offsetX"),e=this.get("offsetY"),i=this.get("container");i.move(t,e)},e.prototype._addItem=function(t){var e=this.get("itemsGroup"),i=this._getNextX(),n=this._getNextY(),r=this.get("unSelectedColor"),a=e.addGroup({x:i,y:n,value:t.value,checked:t.checked}),o=this.get("textStyle"),s=this.get("wordSpacing"),l=0;if(t.marker){var u=Object.assign({},t.marker,{x:t.marker.radius+i,y:n});t.checked||(u.fill&&(u.fill=r),u.stroke&&(u.stroke=r));var h=a.addShape("marker",{type:"marker",attrs:u});h.attr("cursor","pointer"),h.name="legend-marker",l+=h.getBBox().width+s}var c=Object.assign({},o,{x:l+i,y:n-(t.marker?t.marker.radius/2:0)+o.fontSize/4,text:this.formatterValue(t.value)});t.checked||Object.assign(c,{fill:r});var p=a.addShape("text",{attrs:c});p.attr("cursor","pointer"),p.name="legend-text";var f=a.getBBox(),d=this.get("itemWidth"),g=a.addShape("rect",{attrs:{x:i,y:n-f.height/2,fill:"#fff",fillOpacity:0,width:d||f.width,height:f.height}});return g.attr("cursor","pointer"),g.set("origin",t),g.name="legend-item",a.name="legendGroup",a},e.prototype._getNextX=function(){var t=this.get("layout"),e=this.get("itemDistance"),i=this.get("itemsGroup"),n=this.get("itemWidth"),r=i.get("children"),a=0;return"horizontal"===t&&Object(E["each"])(r,(function(t){a+=(n||t.getBBox().width)+e})),a},e.prototype._getNextY=function(){var t=this.get("itemMarginBottom"),e=this.get("titleDistance"),i=this.get("layout"),n=this.get("itemsGroup"),r=this.get("titleShape"),a=n.get("children"),o=e;return r&&(o+=r.getBBox().height),"vertical"===i&&Object(E["each"])(a,(function(e){o+=e.getBBox().height+t})),o},e.prototype._adjustHorizontal=function(){var t,e,i,n=this.flipPage?this._getPaginationCfg().size:0,r=this.get("itemsGroup"),a=r.get("children"),o=this.get("maxWidth")-n,s=this.get("itemDistance"),l=this.get("itemMarginBottom"),u=this.get("titleDistance"),h=0,c=0,p=this.get("itemWidth");r.getBBox().width>o&&Object(E["each"])(a,(function(n){i=n.getBBox(),t=p||i.width,e=i.height+l,o-c<t&&(h++,c=0),n.move(c,h*e+u),c+=t+s}))},e.prototype._adjustVertical=function(){var t,e,i=this._getMaxItemSize().maxItemWidth,n=this.get("itemsGroup"),r=this.get("titleShape"),a=n.get("children"),o=this.get("maxLength"),s=this.get("itemDistance"),l=this.get("itemMarginBottom"),u=this.get("titleDistance"),h=r?r.getBBox().height+u:0,c=this.get("itemWidth")?this.get("itemWidth"):0,p=h+n.getBBox().height;i=Math.max(i,c)+s;var f=0;p>o&&Object(E["each"])(a,(function(n,r){e=n.getBBox(),e.width,t=e.height,o-p<t?(p=h,r>0&&(f+=i),n.move(f,h)):n.move(f,p),p+=t+l}))},e.prototype._adjustItems=function(){var t=this.get("layout");"horizontal"===t?this._adjustHorizontal():this._adjustVertical()},e.prototype._renderBack=function(){var t=this.get("container"),e=this.get("backgroundPadding"),i=this.get("backgroundStyle");Object(E["isNumber"])(e)&&(e=[e,e,e,e]),i&&t.renderBack(e,i)},e.prototype._onMousemove=function(t){var e=this._getLegendItem(t.target);if(e&&e.get("checked")){var i=new F["Event"]("itemmouseover",t,!0,!0);i.item=this._findItem(e),i.checked=e.get("checked"),this.emit("itemmouseover",i),this.get("canvas").draw()}},e.prototype._onMouseleave=function(t){var e=this._getLegendItem(t.target);if(e&&e.get("checked")){var i=new F["Event"]("itemmouseleave",t,!0,!0);i.item=this._findItem(e),i.checked=e.get("checked"),this.emit("itemmouseleave",i),this.get("canvas").draw()}},e.prototype._onClick=function(t){var e=this,i=this._getLegendItem(t.target);if(i&&!i.get("destroyed")){var n=i.get("checked");if(!this.get("allowAllCanceled")&&n&&1===this.getCheckedCount())return;var r=this.get("selectedMode"),a=this._findItem(i),o=new F["Event"]("itemclick",t,!0,!0);o.item=a,o.currentTarget=i,o.checked="single"===r||!n;var s,l,u,h=this.get("unSelectedColor"),c=this.get("textStyle").fill;if("single"===r){var p=this.get("itemsGroup"),f=p.get("children");Object(E["each"])(f,(function(t){s=e._findShapeByName(t,"legend-marker"),l=e._findShapeByName(t,"legend-text"),u=e._findShapeByName(t,"legend-item"),t!==i?(s.attr("fill")&&s.attr("fill",h),s.attr("stroke")&&s.attr("stroke",h),l.attr("fill",h),s.set("checked",!1),s.set("rawAttrs",Object(B["__assign"])({},s.get("attrs"))),l.set("checked",!1),u.set("checked",!1),t.set("checked",!1)):(s.attr("fill")&&s.attr("fill",a.marker.fill),s.attr("stroke")&&s.attr("stroke",a.marker.stroke),l.attr("fill",c),s.set("rawAttrs",Object(B["__assign"])({},s.get("attrs"))),s.set("checked",!0),l.set("checked",!0),u.set("checked",!0),t.set("checked",!0))}))}else s=this._findShapeByName(i,"legend-marker"),l=this._findShapeByName(i,"legend-text"),u=this._findShapeByName(i,"legend-item"),s.attr("fill")&&s.attr("fill",n?h:a.marker.fill),s.attr("stroke")&&s.attr("stroke",n?h:a.marker.stroke),l.attr("fill",n?h:c),i.set("checked",!n),s.set("checked",!n),l.set("checked",!n),u.set("checked",!n);this.emit("itemclick",o),this.get("canvas").draw()}},e.prototype._getLegendItem=function(t){var e=t.get("parent");return e&&"legendGroup"===e.name?e:null},e.prototype._findItem=function(t){var e=this.get("items"),i=null,n=t instanceof F["Group"]?t.get("value"):t;return Object(E["each"])(e,(function(t){if(t.value===n)return i=t,!1})),i},e.prototype._findShapeByName=function(t,e){return t.findBy((function(t){return t.name===e}))},e.prototype._getMaxItemSize=function(){var t=-1/0,e=-1/0,i=this.get("itemsGroup"),n=i.get("children");return Object(E["each"])(n,(function(i){var n=i,r=n.getBBox();t<r.width&&(t=r.width),e<r.height&&(e=r.height)})),{maxItemWidth:t,maxItemHeight:e}},e.prototype._mergeBBox=function(t){var e=1/0,i=-1/0,n=1/0,r=-1/0;return Object(E["each"])(t,(function(t){var a=t;e=Math.min(a.minX,e),i=Math.max(a.maxX,i),n=Math.min(a.minY,n),r=Math.max(a.maxY,r)})),new F["BBox"](e,n,i-e,r-n)},e}(Da),Ea=Fa,Ra={backgroundStyle:{position:"absolute",overflow:"auto",top:0,left:0},titleStyle:{marginBottom:"4px"},listStyle:{listStyleType:"none",margin:0,padding:0},itemStyle:{cursor:"pointer",marginBottom:"5px",marginRight:"16px",userSelect:"none"},markerStyle:{width:"9px",height:"9px",borderRadius:"50%",display:"inline-block",marginRight:"8px",verticalAlign:"middle"},pagination:{activeColor:"#000",inactiveColor:"#ccc",arrowSize:8,animation:!0}};function za(t,e){var i=t.className;return E["isNil"](i)?t:(i=i.split(" "),i.indexOf(e)>-1?t:t.parentNode?t.parentNode.className===e?t.parentNode:za(t.parentNode,e):null)}function Na(t,e){return t.getElementsByClassName(e)[0]}var Ya=function(t){function e(e){return t.call(this,Object(B["__assign"])({type:"html-legend",prefixClassName:"g2-legend",pagination:!0,highlight:!1},e))||this}return Object(B["__extends"])(e,t),e.prototype.init=function(){var t=this.get("fontFamily"),e=this.get("layout"),i=this.get("maxWidth"),n=this.get("maxHeight"),r=this.get("prefixClassName"),a=this.get("containerTpl");a||(a='<div class="'+r+'">\n <div class="'+r+'-title"></div>\n <ul class="'+r+'-list"></ul>\n </div>');var o=X["createDom"](a),s=E["deepMix"]({},Ra.backgroundStyle,this.get("backgroundStyle"));X["modifyCSS"](o,Object(B["__assign"])({fontFamily:t,maxHeight:n+"px",width:"100%",height:"auto"},s)),"horizontal"===e&&X["modifyCSS"](o,{maxWidth:i+"px"});var l=this.get("container");if(l)if(/^\#/.test(l)){var u=l.replace("#","");l=document.getElementById(u),l.appendChild(o)}else l.appendChild(o);else{var h=this.get("canvas"),c=h.get("el").parentNode;c.appendChild(o)}this.set("_legendContainer",o)},e.prototype.renderTitle=function(){var t=this.get("title");if(t){var e=this.get("prefixClassName"),i=this.get("_legendContainer"),n=Na(i,e+"-title");n||(n=X["createDom"]('<div class="'+e+'-title"></div>'),i.appendChild(n)),n.innerHTML=t;var r=E["deepMix"]({},Ra.titleStyle,this.get("titleStyle"));X["modifyCSS"](n,r),this.set("_titleContainer",n)}},e.prototype.renderItems=function(){var t=this,e=this.get("items");if(e&&e.length){var i=this.get("_legendContainer"),n=this.get("layout"),r=this.get("prefixClassName"),a=this.get("reversed");a&&e.reverse();var o=Na(i,r+"-list");o||(o=X["createDom"]('<ul class="'+r+'-list"></ul>'));var s=E["deepMix"]({},Ra.listStyle,this.get("listStyle"));"horizontal"===n&&(s.width="max-content"),X["modifyCSS"](o,s);var l=X["createDom"]("<div></div>");i.appendChild(l),l.appendChild(o),this.set("_clipContainer",l),this.set("_itemGroupContainer",o);var u=this.get("itemTpl");u||(u='<li class="'+r+'-item">\n <span class="'+r+'-item-marker"></span>\n <span class="'+r+'-item-text"></span>\n </li>');var h=this.get("unSelectedColor"),c=E["deepMix"]({},Ra.itemStyle,this.get("itemStyle")),p=E["deepMix"]({},Ra.markerStyle,this.get("markerStyle"));"horizontal"===n?c.display="inline-block":"vertical"===n&&(c.display="block");var f={};E["each"](e,(function(e,i){var n,a=e.checked,s=t.formatterValue(e.value),l=e.marker.fill||e.marker.stroke,d=a?l:h;if(E["isFunction"](u)){var g=u(s,d,a,i);n=X["createDom"](g)}else{n=X["createDom"](u);var v=Na(n,r+"-item-text");v.innerHTML=s}c.color=d,p.backgroundColor=d,X["modifyCSS"](n,c),n.setAttribute("data-checked",a),n.setAttribute("data-value",e.value),n.setAttribute("data-color",l);var y=Na(n,r+"-item-marker");y&&X["modifyCSS"](y,p),o.appendChild(n),f[e.value]=e})),this.set("_itemMap",f),"horizontal"===n?this._renderHorizontalPagination():this._renderPagination()}},e.prototype.bindEvents=function(){var t=this,e=this.get("_itemGroupContainer");e&&(this.get("clickable")&&(e.onclick=function(e){return t._onClick(e)}),this.get("hoverable")&&(e.onmousemove=function(e){return t._onMousemove(e)},e.onmouseout=function(e){return t._onMouseout(e)}))},e.prototype.getWidth=function(){var t=this.get("_legendContainer");return X["getOuterWidth"](t)},e.prototype.getHeight=function(){var t=this.get("_legendContainer");return X["getOuterHeight"](t)},e.prototype.getBBox=function(){return new F["BBox"](this.get("x")||0,this.get("y")||0,this.getWidth(),this.getHeight())},e.prototype.moveTo=function(t,e){var i=this.get("_legendContainer");X["modifyCSS"](i,{left:t+"px",top:e+"px"}),this.set("x",t),this.set("y",e)},e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this.get("_legendContainer");e&&e.parentNode&&e.parentNode.removeChild(e)},e.prototype.draw=function(){return null},e.prototype._updateStatus=function(t,e,i,n){e&&(e.style.background=i),t.style.color=i,t.setAttribute("data-checked",n)},e.prototype._onClick=function(t){var e=this,i=(this.get("items"),this.get("_itemGroupContainer")),n=this.get("prefixClassName"),r=n+"-item",a=n+"-item-marker",o=t.target,s=o.className.split(" ");if(!(E["indexOf"](s,n+"-list")>-1)){var l=za(o,r),u=Na(l,a),h=this.get("_itemMap"),c=h[l.getAttribute("data-value")],p=l.getAttribute("data-color"),f=this.get("selectedMode"),d=this.get("unSelectedColor"),g=i.childNodes;if("single"===f)c.checked=!0,E["each"](g,(function(t){if(t!==l){var i=Na(t,a);e._updateStatus(t,i,d,"false");var n=h[t.getAttribute("data-value")];n.checked=!1}else e._updateStatus(l,u,p,"true")}));else{var v="true"===l.getAttribute("data-checked"),y=0;if(E["each"](g,(function(t){"true"===t.getAttribute("data-checked")&&y++})),!this.get("allowAllCanceled")&&v&&1===y)return;c.checked=!c.checked,v?this._updateStatus(l,u,d,"false"):this._updateStatus(l,u,p,"true")}this.emit("itemclick",{item:c,currentTarget:l,checked:"single"===f||c.checked})}},e.prototype._onMousemove=function(t){var e=this.get("_lastActiveItem"),i=(this.get("items"),this.get("_itemMap")),n=this.get("prefixClassName"),r=n+"-list",a=n+"-item",o=t.target,s=o.className.split(" ");if(!(E["indexOf"](s,r)>-1)){var l=za(o,a),u=i[l.getAttribute("data-value")];if(u){var h=this.get("highlight");if(u.checked&&e!==u){if(l.className+=" active",h){var c=this.get("_itemGroupContainer"),p=c.childNodes;p.forEach((function(t){t!==l&&"true"===t.getAttribute("data-checked")&&(t.className+=" inactive")}))}this.set("_lastActiveItem",u)}this.emit("itemmouseover",{item:u,currentTarget:l,checked:u.checked})}}},e.prototype._onMouseout=function(t){var e=this.get("_itemGroupContainer"),i=e.childNodes;i.forEach((function(t){var e=t.className.split(" ");E["remove"](e,(function(t){return"active"===t||"inactive"===t})),t.className=e.join(" ")})),this.set("_lastActiveItem",null),this.emit("itemmouseleave",t)},e.prototype._renderPagination=function(){var t=this.get("pagination"),e=this.get("_legendContainer"),i=this.get("_itemGroupContainer"),n='\n <div style="position: absolute;bottom: 0;left: 0;user-select: none;margin-top: 5px;">\n <div class="pre-page"\n style="display:inline-block;-webkit-transform: rotate(-135deg);transform: rotate(-135deg);margin-left: 2px;">\n </div>\n <span class="current-page-number">1</span> / <span class="total-page-number">0</span>\n <div class="next-page"\n style="display:inline-block;-webkit-transform: rotate(45deg);transform: rotate(45deg);margin-right: 2px;">\n </div>\n </div>\n ';if(t&&e.scrollHeight>e.offsetHeight){X["modifyCSS"](e,{overflow:"hidden",height:this.get("maxHeight")+"px"});var r=X["createDom"](n);e.appendChild(r);var a=this.getHeight(),o=this.get("_titleContainer")?X["getOuterHeight"](this.get("_titleContainer")):0,s=X["getOuterHeight"](r),l=a-o-s,u=i.offsetHeight,h=this.get("_clipContainer");X["modifyCSS"](h,{maxHeight:l+"px",overflow:"hidden"});var c=Math.ceil(u/l),p=X["getOuterHeight"](i.childNodes[0]),f=Math.floor(l/p),d=f*p,g=Na(r,"current-page-number"),v=Na(r,"total-page-number"),y=Na(r,"pre-page"),m=Na(r,"next-page");v.innerHTML=c;var x=E["deepMix"]({},Ra.pagination,t),b={cursor:"pointer",border:x.activeColor+" solid",borderWidth:"2px 2px 0 0",width:x.arrowSize+"px",height:x.arrowSize+"px"},_={cursor:"default",border:x.inactiveColor+" solid",borderWidth:"2px 2px 0 0",width:x.arrowSize+"px",height:x.arrowSize+"px"};X["modifyCSS"](y,_),X["modifyCSS"](m,b),x.animation&&X["modifyCSS"](i,{transition:"transform .3s ease-in"});var w=1,M=0;y.onclick=function(){1!==w&&(w-=1,M+=d,g.innerHTML=w,X["modifyCSS"](y,b),X["modifyCSS"](m,b),X["modifyCSS"](i,{transform:"translateY("+M+"px)"}),1===w&&X["modifyCSS"](y,_))},m.onclick=function(){w!==c&&(w+=1,M-=d,g.innerHTML=w,X["modifyCSS"](m,b),X["modifyCSS"](y,b),X["modifyCSS"](i,{transform:"translateY("+M+"px)"}),w===c&&X["modifyCSS"](m,_))}}},e.prototype._renderHorizontalPagination=function(){var t=this.get("pagination"),e=this.get("_legendContainer"),i=this.get("_itemGroupContainer"),n='\n <div style="position: absolute;bottom: 4px;right: 12px;user-select: none;margin-top: 5px;background: #fff;">\n <div class="pre-page"\n style="display:inline-block;-webkit-transform: rotate(-135deg);transform: rotate(-135deg);margin-left: 2px;">\n </div>\n <span class="current-page-number">1</span> / <span class="total-page-number">0</span>\n <div class="next-page"\n style="display:inline-block;-webkit-transform: rotate(45deg);transform: rotate(45deg);margin-right: 2px;">\n </div>\n </div>\n ';if(t&&e.scrollWidth>e.offsetWidth){X["modifyCSS"](e,{overflow:"hidden",width:this.get("maxWidth")+"px"});var r=X["createDom"](n);e.appendChild(r);var a=this.getWidth(),o=X["getOuterWidth"](r),s=a-o-40,l=i.offsetWidth,u=this.get("_clipContainer");X["modifyCSS"](u,{maxWidth:s+"px",overflow:"hidden"});var h=Math.ceil(l/s),c=(X["getOuterWidth"](i.childNodes[0]),s),p=Na(r,"current-page-number"),f=Na(r,"total-page-number"),d=Na(r,"pre-page"),g=Na(r,"next-page");f.innerHTML=h;var v=E["deepMix"]({},Ra.pagination,t),y={cursor:"pointer",border:v.activeColor+" solid",borderWidth:"2px 2px 0 0",width:v.arrowSize+"px",height:v.arrowSize+"px"},m={cursor:"default",border:v.inactiveColor+" solid",borderWidth:"2px 2px 0 0",width:v.arrowSize+"px",height:v.arrowSize+"px"};X["modifyCSS"](d,m),X["modifyCSS"](g,y),v.animation&&X["modifyCSS"](i,{transition:"transform .3s ease-in"});var x=1,b=0;d.onclick=function(){1!==x&&(x-=1,b+=c,p.innerHTML=x,X["modifyCSS"](d,y),X["modifyCSS"](g,y),X["modifyCSS"](i,{transform:"translateX("+b+"px)"}),1===x&&X["modifyCSS"](d,m))},g.onclick=function(){x!==h&&(x+=1,b-=c,p.innerHTML=x,X["modifyCSS"](g,y),X["modifyCSS"](d,y),X["modifyCSS"](i,{transform:"translateX("+b+"px)"}),x===h&&X["modifyCSS"](g,m))}}},e}(Da),Ha=Ya,Ga=function(t){function e(e){return t.call(this,Object(B["__assign"])({xScales:null,yScales:null,el:null},e))||this}return Object(B["__extends"])(e,t),e.prototype.clear=function(){var t=this.get("el");t&&t.remove()},e.prototype.changeVisible=function(t){this.set("visible",t);var e=this.get("el");e instanceof F["Element"]?e.set("visible",t):e instanceof HTMLElement&&(e.style.display=t?"":"none")},e.prototype.change=function(t){this.cfg=E["deepMix"]({},this.cfg,t)},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){return this.cfg[t]=e,this},e.prototype.parsePoint=function(t,e){var i=this.get("xScales"),n=this.get("yScales"),r=E["isFunction"](e)?e.call(null,i,n):e,a=0,o=0;if(E["isArray"](r)&&E["includes"](r[0],"%"))return this.parsePercentPoint(t,r);if(E["isArray"](r))a=this.getNormalizedValue(r[0],E["head"](E["values"](i))),o=this.getNormalizedValue(r[1],E["head"](E["values"](n)));else if(!E["isNil"](r))for(var s=0,l=E["keys"](r);s<l.length;s++){var u=l[s],h=r[u];i[u]&&(a=this.getNormalizedValue(h,i[u])),n[u]&&(o=this.getNormalizedValue(h,n[u]))}return t.convert({x:a,y:o})},e.prototype.getNormalizedValue=function(t,e){var i,n;switch(t){case"start":i=0;break;case"end":i=1;break;case"median":n=e.isCategory?(e.values.length-1)/2:(e.min+e.max)/2,i=e.scale(n);break;case"min":case"max":n=e.isCategory?"min"===t?0:e.values.length-1:e[t],i=e.scale(n);break;default:i=e.scale(t)}return i},e.prototype.parsePercentPoint=function(t,e){var i=parseFloat(e[0])/100,n=parseFloat(e[1])/100,r=t.start,a=t.end,o={x:Math.min(r.x,a.x),y:Math.min(r.y,a.y)},s=t.getWidth()*i+o.x,l=t.getHeight()*n+o.y;return{x:s,y:l}},e}(pr),Wa=Ga,Xa=function(t){function e(e){return t.call(this,E["deepMix"]({type:"line",xScales:null,yScales:null,line:{style:{stroke:"#000"}},text:{display:!0,position:"end",autoRotate:!0,style:{fill:"#999",fontSize:12,fontWeight:500,fontFamily:Pr}}},e))||this}return Object(B["__extends"])(e,t),e.prototype.render=function(t,e){var i=this,n=this.parsePoint(t,this.get("start")),r=this.parsePoint(t,this.get("end")),a=e.addGroup();this.drawLines(n,r,a);var o=this.get("text");o.display&&o.content&&this.drawText(n,r,a),a.get("children").forEach((function(t){t.name="annotation-line",i.get("appendInfo")&&t.setSilent("appendInfo",i.get("appendInfo"))})),this.set("el",a)},e.prototype.drawLines=function(t,e,i){var n=[["M",t.x,t.y],["L",e.x,e.y]];i.addShape("Path",{attrs:E["assign"]({path:n},this.get("line").style)})},e.prototype.drawText=function(t,e,i){var n=this.get("text"),r=n.position,a=n.style||{},o=1;"start"===r?o=0:"center"===r?o=.5:!E["isNil"](r)&&E["includes"](r,"%")?o=parseInt(r,10)/100:E["isNumber"](r)&&r>=0&&r<1&&(o=r);var s={x:t.x+(e.x-t.x)*o,y:t.y+(e.y-t.y)*o,text:n.content};if(n.offsetX&&(s.x+=n.offsetX),n.offsetY&&(s.y+=n.offsetY),E["assign"](s,a),n.autoRotate&&E["isNil"](a.rotate)){var l=St.angleTo([e.x-t.x,e.y-t.y],[1,0],1);s.rotate=l}else E["isNil"](a.rotate)||(s.rotate=a.rotate*Math.PI/180);i.addShape("Text",{attrs:s})},e}(Wa),Va=Xa,qa=function(t){function e(e){return t.call(this,Object(B["__assign"])({type:"text",position:null,content:null,style:{fill:"#999",fontSize:12,fontWeight:500,textAlign:"center"}},e))||this}return Object(B["__extends"])(e,t),e.prototype.render=function(t,e){var i=this.parsePoint(t,this.get("position")),n=E["clone"](this.get("style")),r=this.get("offsetX"),a=this.get("offsetY");r&&(i.x+=r),a&&(i.y+=a),n.rotate&&(n.rotate=n.rotate*Math.PI/180);var o=e.addShape("Text",{zIndex:this.get("zIndex"),attrs:E["assign"]({text:this.get("content")},n,i)});o.name="annotation-text",this.get("appendInfo")&&o.setSilent("appendInfo",this.get("appendInfo")),this.set("el",o)},e}(Wa),Ua=qa,Za=function(t){function e(e){return t.call(this,Object(B["__assign"])({type:"arc",start:null,end:null,style:{stroke:"#999",lineWidth:1}},e))||this}return Object(B["__extends"])(e,t),e.prototype.render=function(t,e){var i=this.get("start"),n=this.get("end"),r=this.parsePoint(t,this.get("start")),a=this.parsePoint(t,this.get("end")),o=t.getCenter(),s=Math.sqrt((r.x-o.x)*(r.x-o.x)+(r.y-o.y)*(r.y-o.y)),l=[["M",r.x,r.y]];if(E["isNumberEqual"](r.x,a.x)&&E["isNumberEqual"](r.y,a.y))E["isEqual"](i,n)?console.warn("start point is the same as end point!"):l=[["M",r.x,r.y],["A",s,s,0,1,1,2*o.x-r.x,2*o.y-r.y],["A",s,s,0,1,1,r.x,r.y]];else{var u=St.angleTo([o.x-r.x,o.y-r.y],[o.x-a.x,o.y-a.y],0),h=u>Math.PI?1:0;l=[["M",r.x,r.y],["A",s,s,0,h,1,a.x,a.y]]}var c=e.addShape("path",{zIndex:this.get("zIndex"),attrs:E["assign"]({path:l},this.get("style"))});c.name="annotation-arc",this.get("appendInfo")&&c.setSilent("appendInfo",this.get("appendInfo")),this.set("el",c)},e}(Wa),Qa=Za,$a=function(t){function e(e){return t.call(this,Object(B["__assign"])({type:"region",zIndex:1,start:null,end:null,style:{lineWidth:0,fill:"#CCD7EB",opacity:.4}},e))||this}return Object(B["__extends"])(e,t),e.prototype.render=function(t,e){var i=this.get("style"),n=this.getPath(t),r=e.addShape("path",{zIndex:this.get("zIndex"),attrs:E["assign"]({path:n},i)});r.name="annotation-region",this.get("appendInfo")&&r.setSilent("appendInfo",this.get("appendInfo")),this.set("el",r)},e.prototype.getPath=function(t){var e=this.parsePoint(t,this.get("start")),i=this.parsePoint(t,this.get("end"));return[["M",e.x,e.y],["L",i.x,e.y],["L",i.x,i.y],["L",e.x,i.y],["z"]]},e}(Wa),Ka=$a,Ja=function(t){function e(e){return t.call(this,Object(B["__assign"])({type:"image",start:null,end:null,src:""},e))||this}return Object(B["__extends"])(e,t),e.prototype.render=function(t,e){var i=this.parsePoint(t,this.get("start")),n={x:i.x,y:i.y,img:this.get("src")};if(this.get("end")){var r=this.parsePoint(t,this.get("end"));n.width=r.x-i.x,n.height=r.y-i.y}else n.width=this.get("width")||32,n.height=this.get("height")||32;this.get("offsetX")&&(n.x+=this.get("offsetX")),this.get("offsetY")&&(n.y+=this.get("offsetY"));var a=e.addShape("Image",{zIndex:1,attrs:n});a.name="annotation-image",this.get("appendInfo")&&a.setSilent("appendInfo",this.get("appendInfo")),this.set("el",a)},e}(Wa),to=Ja,eo=function(t){function e(e){return t.call(this,Object(B["__assign"])({type:"html",zIndex:7,position:null,alignX:"middle",alignY:"middle",offsetX:null,offsetY:null,html:null},e))||this}return Object(B["__extends"])(e,t),e.prototype.render=function(t,e){var i=this.parsePoint(t,this.get("position")),n=e.get("canvas").get("el").parentNode,r=X["createDom"]('<div class="guide-annotation"></div>');n.appendChild(r);var a=this.get("html");if(E["isFunction"](a)){var o=this.get("xScales"),s=this.get("yScales");a=a(o,s)}var l=E["isElement"](a)?a:X["createDom"](a);r.appendChild(l),X["modifyCSS"](r,{position:"absolute"}),this.setDomPosition(r,l,i),this.set("el",r)},e.prototype.clear=function(){var t=this.get("el");t&&t.parentNode&&t.parentNode.removeChild(t)},e.prototype.setDomPosition=function(t,e,i){var n=this.get("alignX"),r=this.get("alignY"),a=X["getOuterWidth"](e),o=X["getOuterHeight"](e),s={x:i.x,y:i.y};"middle"===n?s.x-=Math.round(a/2):"right"===n&&(s.x-=Math.round(a)),"middle"===r?s.y-=Math.round(o/2):"bottom"===r&&(s.y-=Math.round(o));var l=this.get("offsetX");l&&(s.x+=l);var u=this.get("offsetY");u&&(s.y+=u),X["modifyCSS"](t,{top:Math.round(s.y)+"px",left:Math.round(s.x)+"px",zIndex:this.get("zIndex")})},e}(Wa),io=eo,no=function(t){function e(e){return t.call(this,E["deepMix"]({type:"dataMarker",zIndex:1,position:null,point:{display:!0,style:{r:3,fill:"#ffffff",stroke:"#1890FF",lineWidth:2}},line:{display:!0,lineLength:20,style:{stroke:"#A3B1BF",lineWidth:1}},text:{display:!0,style:{fill:"#000000",opacity:.65,fontSize:12,textAlign:"start"}},direction:"upward",autoAdjust:!0},e))||this}return Object(B["__extends"])(e,t),e.prototype.render=function(t,e){var i,n,r=this,a=this.parsePoint(t,this.get("position")),o=e.addGroup(),s=this.getElementPosition(a),l=this.get("line"),u=this.get("point"),h=this.get("text");if(l.display){var c=s.line;i=this.drawLine(c,o)}if(h.display&&h.content){var p=s.text;n=this.drawText(p,o)}if(u.display){var f=s.point;this.drawPoint(f,o)}if(this.get("autoAdjust")){var d=o.getBBox(),g=d.minX,v=d.minY,y=d.maxX,m=d.maxY,x=t.start,b=t.end;if(n){g<=x.x&&n.attr("textAlign","start"),y>=b.x&&n.attr("textAlign","end");var _=this.get("direction");if("upward"===_&&v<=b.y||"upward"!==_&&m>=x.y){var w=void 0,M=void 0;"upward"===_&&v<=b.y?(w="top",M=1):(w="bottom",M=-1),n.attr("textBaseline",w);var S=0;if(l.display){S=l.lineLength;var k=[["M",a.x,a.y],["L",a.x,a.y+S*M]];i.attr("path",k)}var O=a.y+(S+2)*M;n.attr("y",O)}}}o.get("children").forEach((function(t){t.name="annotation-data-marker",r.get("appendInfo")&&t.setSilent("appendInfo",r.get("appendInfo"))})),this.set("el",o)},e.prototype.getElementPosition=function(t){var e=t.x,i=t.y,n=this.get("line").display?this.get("line").lineLength:0,r=this.get("direction"),a=this.get("text").style;a.textBaseline="upward"===r?"bottom":"top";var o="upward"===r?-1:1,s={x:e,y:i},l={x:e,y:i},u={x:e,y:n*o+i},h={x:e,y:(n+2)*o+i};return{point:s,line:[l,u],text:h}},e.prototype.drawLine=function(t,e){var i=this.get("line").style,n=[["M",t[0].x,t[0].y],["L",t[1].x,t[1].y]],r=e.addShape("path",{attrs:E["assign"]({path:n},i)});return r},e.prototype.drawText=function(t,e){var i=this.get("text"),n=e.addShape("text",{attrs:E["assign"]({text:i.content},i.style,t)});return n},e.prototype.drawPoint=function(t,e){var i=this.get("point").style,n=e.addShape("circle",{attrs:E["assign"]({},i,t)});return n},e}(Wa),ro=no,ao=function(t){function e(e){return t.call(this,E["deepMix"]({type:"dataRegion",start:null,end:null,region:{lineLength:0,style:{lineWidth:0,fill:"#000000",opacity:.04}},text:{display:!0,content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:"rgba(0, 0, 0, .65)"}}},e))||this}return Object(B["__extends"])(e,t),e.prototype.render=function(t,e,i){var n=this,r=this.get("region"),a=this.get("text"),o=r.lineLength,s=this.getRegionData(t,i);if(s.length){var l=this.getBBox(s),u=[];u.push(["M",s[0].x,l.minY-o]);for(var h=0,c=s.length;h<c;h++){var p=["L",s[h].x,s[h].y];u.push(p)}u.push(["L",s[s.length-1].x,l.minY-o]);var f=e.addGroup();f.addShape("path",{attrs:E["mix"]({path:u},r.style)}),a.display&&a.content&&f.addShape("Text",{attrs:E["mix"]({x:(l.minX+l.maxX)/2,y:l.minY-o,text:a.content},a.style)}),f.get("children").forEach((function(t){t.name="annotation-data-region",n.get("appendInfo")&&t.setSilent("appendInfo",n.get("appendInfo"))})),this.set("el",f)}},e.prototype.getRegionData=function(t,e){for(var i,n=this.get("start"),r=this.get("end"),a=E["head"](E["values"](this.get("xScales"))).field,o=E["head"](E["values"](this.get("yScales"))).field,s=E["isArray"](n)?n[0]:n[a],l=E["isArray"](r)?r[0]:r[a],u=[],h=0,c=e.length;h<c;h++){var p=e[h];if(p[a]===s&&(i=h),h>=i&&u.push(this.parsePoint(t,[p[a],p[o]])),p[a]===l)break}return u},e.prototype.getBBox=function(t){for(var e=[],i=[],n=0;n<t.length;n++)e.push(t[n].x),i.push(t[n].y);var r=E["getRange"](e),a=E["getRange"](i);return F["BBox"].fromRange(r.min,a.min,r.max,a.max)},e}(Wa),oo=ao,so=function(){function t(t){this.options=[],this.annotations=[],E["assign"](this,t)}return t.prototype.add=function(t,e,i){void 0===i&&(i=!0);var n=E["upperFirst"](t);return s[n]?this.options.push(Object(B["__assign"])({top:i,type:t},e)):console.error("Annotation "+t+" not exist."),this},t.prototype.get=function(t){return this.annotations[t]},t.prototype.render=function(t){var e=this;this.coord=t;var i=this.view,n=i&&i.get("filteredData");this.createAnnotations(),E["each"](this.annotations,(function(i){i.get("top")?i.render(t,e.frontgroundGroup,n):i.render(t,e.backgroundGroup,n)}))},t.prototype.changeVisible=function(t){E["each"](this.annotations,(function(e){e.changeVisible(t)}))},t.prototype.clear=function(){this.reset(),this.options=[],this.backgroundGroup&&this.backgroundGroup.remove(),this.frontgroundGroup&&this.frontgroundGroup.remove()},t.prototype.reset=function(){E["each"](this.annotations,(function(t){t.clear()})),this.annotations=[]},t.prototype.repaint=function(){var t=this;if(!this.coord||!this.view)throw new Error("need render first");var e=this.coord,i=this.view.get("filteredData");E["each"](this.annotations,(function(n){n.clear(),n.get("top")?n.render(e,t.frontgroundGroup,i):n.render(e,t.backgroundGroup,i)}));var n=this.view.get("canvas");n.draw()},t.prototype.createAnnotations=function(){var t=this;E["each"](this.options,(function(e){var i=e.type,n=e.top,r=Object(B["__rest"])(e,["type","top"]),a=new(s[E["upperFirst"](i)])(E["deepMix"]({},Object(B["__assign"])({xScales:t.xScales,yScales:t.yScales},E["get"](t.theme,"annotation."+i)?t.theme.annotation[i]:{}),r));a.set("top",n),t.annotations.push(a)}))},t}(),lo=so,uo=i("284c");function ho(t,e){var i=[];if(t.length){for(var n=0,r=t.length;n<r;n+=1){var a=t[n],o=0===n?"M":"L";i.push([o,a.x,a.y])}e&&i.push(["Z"])}return i}function co(t,e){var i=t.getCenter(),n=Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2));return n}function po(t,e){for(var i=[t[0]],n=1,r=t.length;n<r;n+=2){var a=e.convertPoint({x:t[n],y:t[n+1]});i.push(a.x,a.y)}return i}function fo(t,e,i){var n=i.isTransposed,r=i.startAngle,a=i.endAngle,o={x:t[1],y:t[2]},s={x:e[1],y:e[2]},l=[],u=n?"y":"x",h=Math.abs(s[u]-o[u])*(a-r),c=s[u]>=o[u]?1:0,p=h>Math.PI?1:0,f=i.convertPoint(s),d=co(i,f);if(d>=.5)if(h===2*Math.PI){var g={x:(s.x+o.x)/2,y:(s.y+o.y)/2},v=i.convertPoint(g);l.push(["A",d,d,0,p,c,v.x,v.y]),l.push(["A",d,d,0,p,c,f.x,f.y])}else l.push(["A",d,d,0,p,c,f.x,f.y]);return l}function go(t){E["each"](t,(function(e,i){var n=e;if("a"===n[0].toLowerCase()){var r=t[i-1],a=t[i+1];a&&"a"===a[0].toLowerCase()?r&&"l"===r[0].toLowerCase()&&(r[0]="M"):r&&"a"===r[0].toLowerCase()&&a&&"l"===a[0].toLowerCase()&&(a[0]="M")}}))}var vo=function(t,e,i,n){var r,a,o,s,l=[],u=!!n;if(u){o=[1/0,1/0],s=[-1/0,-1/0];for(var h=0,c=t.length;h<c;h++){var p=t[h];o=St.min([],o,p),s=St.max([],s,p)}o=St.min([],o,n[0]),s=St.max([],s,n[1])}h=0;for(var f=t.length;h<f;h++){p=t[h];if(i)r=t[h?h-1:f-1],a=t[(h+1)%f];else{if(0===h||h===f-1){l.push(p);continue}r=t[h-1],a=t[h+1]}var d=[];d=St.sub(d,a,r),d=St.scale(d,d,e);var g=St.distance(p,r),v=St.distance(p,a),y=g+v;0!==y&&(g/=y,v/=y);var m=St.scale([],d,-g),x=St.scale([],d,v),b=St.add([],p,m),_=St.add([],p,x);u&&(b=St.max([],b,o),b=St.min([],b,s),_=St.max([],_,o),_=St.min([],_,s)),l.push(b),l.push(_)}return i&&l.push(l.shift()),l};function yo(t,e,i){for(var n=!!e,r=[],a=0,o=t.length;a<o;a+=2)r.push([t[a],t[a+1]]);var s,l,u,h=vo(r,.4,n,i),c=r.length,p=[];for(a=0;a<c-1;a++)s=h[2*a],l=h[2*a+1],u=r[a+1],p.push(["C",s[0],s[1],l[0],l[1],u[0],u[1]]);return n&&(s=h[c],l=h[c+1],u=r[0],p.push(["C",s[0],s[1],l[0],l[1],u[0],u[1]])),p}function mo(t,e){return ho(t,e)}function xo(t,e,i){var n=[],r=t[0],a=null;if(t.length<=2)return mo(t,e);E["each"](t,(function(t){a&&a.x===t.x&&a.y===t.y||(n.push(t.x),n.push(t.y),a=t)}));var o=i||[[0,0],[1,1]],s=yo(n,e,o);return s.unshift(["M",r.x,r.y]),s}function bo(t,e){return co(t,e)}function _o(t,e){var i=t.getCenter();return Math.atan2(e.y-i.y,e.x-i.x)}function wo(t,e){var i=[];return E["each"](e,(function(e){var n=e[0];switch(n.toLowerCase()){case"m":case"l":case"c":i.push(po(e,t));break;case"z":default:i.push(e);break}})),i}function Mo(t,e){var i,n,r,a,o=[];return E["each"](e,(function(s,l){var u=s[0];switch(u.toLowerCase()){case"m":case"c":case"q":o.push(po(s,t));break;case"l":i=e[l-1],n=s,r=t.isTransposed,a=r?i[i.length-2]===n[1]:i[i.length-1]===n[2],a?o=o.concat(fo(i,n,t)):o.push(po(s,t));break;case"z":default:o.push(s);break}})),go(o),o}var So={_coord:null,getCoord:function(){return this._coord},parsePath:function(t,e){var i=this._coord,n=Ft(t);return n=i.isPolar&&!1!==e?Mo(i,n):wo(i,n),n},parsePoint:function(t){var e=this._coord;return e.convertPoint(t)},parsePoints:function(t){var e=this._coord;return t.map((function(t){return e.convertPoint(t)}))},draw:function(){}},ko={_theme:mt.theme.shape,_coord:null,_getShapeStyleByState:function(t,e,i){var n=this._theme,r=this.name;if(n&&n[r]&&n[r][t]){var a=n[r][t][e];return E["isFunction"](a)&&(a=a(i)),a}},defaultShapeType:null,setCoord:function(t){this._coord=t},setTheme:function(t){this._theme=t},getShape:function(t){var e=E["isArray"](t)?t[0]:t,i=this[e]||this[this.defaultShapeType];return i._coord=this._coord,i},getShapePoints:function(t,e){var i=this.getShape(t);return i.getPoints?i.getPoints(e):this.getDefaultPoints(e)},getDefaultPoints:function(){return[]},getMarkerStyle:function(t,e){var i=this.getShape(t);if(i.getMarkerStyle){var n=i.getMarkerStyle(e),r=this._theme,a=i.name,o=this.name;return r&&r[o]&&r[o][a]&&(n=E["mix"]({},r[o][a].default,n)),n}},getInactiveStyle:function(t,e){var i=this.getShape(t);return i.getInactiveStyle?i.getInactiveStyle(e):this._getShapeStyleByState(i.name,"inactive",e)},getActiveStyle:function(t,e){var i=this.getShape(t);return i.getActiveStyle?i.getActiveStyle(e):this._getShapeStyleByState(i.name,"active",e)},getSelectedStyle:function(t,e){var i=this.getShape(t);return i.getSelectedStyle?i.getSelectedStyle(e):this._getShapeStyleByState(i.name,"selected",e)},drawShape:function(t,e,i){var n=this.getShape(t),r=n.name,a=this._theme,o=this.name;if(a&&a[o]&&a[o][r]){var s=a[o][r].default;e.style=E["mix"]({},s,e.style)}var l=n.draw(e,i);return l&&(l.setSilent("origin",e.origin),l.id=e.yIndex?e.id+e.yIndex:e.id,l.name=this.name),l}},Oo={};function Co(t,e){var i=E["upperFirst"](t),n=Object(B["__assign"])(Object(B["__assign"])(Object(B["__assign"])({},ko),e),{name:t});return Oo[i]=n,n}function Ao(t,e,i){var n=E["upperFirst"](t),r=Oo[n],a=Object(B["__assign"])(Object(B["__assign"])(Object(B["__assign"])({},So),i),{name:e});return r[e]=a,a}function Lo(t){var e=E["upperFirst"](t);return Oo[e]}var Po=4.5,jo=["cross","tick","plus","hyphen","line","hollowCircle","hollowSquare","hollowDiamond","hollowTriangle","hollowTriangleDown","hollowHexagon","hollowBowtie"],To=function(t,e){return E["find"](t,(function(t){var i=[].concat(t.values),n=[].concat(e.values);return t.type===e.type&&t.field===e.field&&E["isEqual"](i.sort(),n.sort())}))},Bo=function(){function t(t){this.legends=[];var e=t.view;this.view=e,this.theme=e.get("theme")}return t.prototype.render=function(){var t=this;this.clear();var e=this.options;if(E["isObject"](e)){if(e.custom){var i=this.addCustomLegend();this.legends.push(i)}else{var n=this.view.getElements(),r=[];E["each"](n,(function(i){var n=i.get("view"),a=i.getAttrsForLegend();E["each"](a,(function(a){var o=a.type,s=a.getScale(o);if(s&&s.field&&"identity"!==s.type&&!To(r,s)){r.push(s);var l=n.getFilteredOutValues(s.field),u=t.addLegend(e,s,a,i,l);u&&t.legends.push(u)}}))}))}this.alignLegends()}},t.prototype.changeVisible=function(t){E["each"](this.legends,(function(t){}))},t.prototype.clear=function(){E["each"](this.legends,(function(t){t.destroy()})),this.legends=[],this.reset()},t.prototype.reset=function(){this.init()},t.prototype.init=function(){this.options=this.getLegendOptions(),this.panelRange=this.view.get("panelRange"),this.viewRange=this.view.get("viewRange"),this.container=this.view.get("frontgroundGroup")},t.prototype.addLegend=function(t,e,i,n,r){var a=e.field,o=t.fields&&t.fields[a];if(!1!==o){if(o&&o.custom)return this.addCustomLegend(a);var s=this.getFieldLegendConfig(a,"position",this.theme.defaultLegendPosition);s=this.adjustPosition(s);var l=e.isLinear?this.addContinuousLegend(e,i,s):this.addCategoryLegend(e,i,n,r,s);return l&&this.bindHoverEvent(l,a),l}},t.prototype.addContinuousLegend=function(t,e,i){var n=this.container.addGroup({name:"legend"}),r=t.field,a=t.getTicks(),o=E["map"](a,(function(i){var n=i.value,r=i.tickValue,a=t.invert(n),o=e.mapping(a).join("");return{value:r,color:o}})),s=!!E["find"](a,(function(t){return 0===t.value})),l=!!E["find"](a,(function(t){return 1===t.value}));if(!s){var u=e.mapping(0).join("");o.push({value:t.min,color:u})}if(!l){u=e.mapping(0).join("");o.push({value:t.max,color:u})}var h,c=this.options,p=i.split("-"),f=this.theme.legend[p[0]],d=E["deepMix"]({},f,this.getFieldLegendOption(r,c),{items:o,attr:e,formatter:t.formatter,container:n,position:i});if(d.showTitle&&E["mix"](d,{title:t.field}),"color"===e.type)h=new uo["Color"](d);else{if("size"!==e.type)return;h=new uo["Size"](d)}return this.bindFilterEvent(h,t),h},t.prototype.addCategoryLegend=function(t,e,i,n,r){var a=this,o=this.options,s=t.field,l=o.fields?o.fields[s]:null,u=[],h=t.getTicks(),c=!0,p=i.get("shapeType")||"point",f=i.getDefaultValue("shape")||p||"point";o.marker&&(f=o.marker,p="point",c=!1),l&&l.marker&&(f=l.marker,p="point",c=!1);var d=this.view,g=this.theme,v=d.get("canvas"),y=d.get("panelGroup"),m=y.attr("clip"),x=m?m.getBBox():void 0,b=d.get("panelRange"),_=d.get("viewRange"),w=r.split("-"),M="right"===w[0]||"left"===w[0]?x?x.height:b.height:x?_.width-(b.width-x.width):_.width;E["each"](h,(function(e){var r=e.text,o=r,s=e.value,l=t.invert(s),h={isInCircle:i.isInCircle()},d=!n||a.isFiltered(t,n,l),v=i.getAttr("color"),y=i.getAttr("shape");if(v)if(v.callback&&v.callback.length>1){var m=Array(v.callback.length-1).fill("");h.color=v.mapping.apply(v,Object(B["__spreadArrays"])([l],m)).join("")||g.defaultColor}else h.color=v.mapping(l).join("")||g.defaultColor;if(c&&y&&y.scales.length)if(y.callback&&y.callback.length>1){m=Array(y.callback.length-1).fill("");f=y.mapping.apply(y,Object(B["__spreadArrays"])([l],m)).join("")}else f=y.mapping(l).join("");var x=Lo(p),b=x.getMarkerStyle(f,h);E["isFunction"](f)&&(b.symbol=f),u.push({value:o,dataValue:l,checked:d,marker:b})}));var S,k,O,C,A=!!o.useHtml||!(!l||!l.useHtml);switch(w[0]){case"left":C=x?x.height:b.height,O=b.x-_.x,k="vertical";break;case"right":C=x?x.height:b.height,O=_.tr.x-b.tr.x,k="vertical";break;case"top":C=b.tr.y-_.tr.y,O=x?_.width-(b.width-x.width):_.width,k="horizontal";break;case"bottom":C=_.br.y-b.br.y,O=x?_.width-(b.width-x.width):_.width,k="horizontal";break;default:break}S=A?E["mix"]({},g.legend.html,{maxHeight:C,maxWidth:O,layout:k}):E["mix"]({},g.legend[w[0]],{maxHeight:C,maxWidth:O,layout:k,container:this.container.addGroup({name:"legend"})});var L=E["deepMix"]({},S,o,l,{maxLength:M,canvas:v,items:u,position:r});L.showTitle&&E["mix"](L,{title:t.alias||t.field});var P=A?new uo["HtmlCategory"](L):new uo["CanvasCategory"](L);return this.bindClickEvent(P,t,n,L.onClick),P},t.prototype.addCustomLegend=function(t){var e,i=this.theme,n=(this.view,this.container.addGroup({name:"legend"})),r=n.get("canvas"),a=this.panelRange,o=this.options;E["isObject"](o)&&(e=o.fields?o.fields[t]:{});var s=e.position||o.position||i.defaultLegendPosition;s=this.adjustPosition(s);var l=e.items||o.items;if(l){E["each"](l,(function(t){E["isPlainObject"](t.marker)?t.marker.radius=t.marker.radius||Po:(t.marker={symbol:t.marker||"circle",radius:Po},E["contains"](jo,t.marker.symbol)?t.marker.stroke=t.color:t.marker.fill=t.color);var e=t.marker.symbol;E["isString"](e)&&-1!==e.indexOf("hollow")&&(t.marker.symbol=E["lowerFirst"](e.substr(6))),t.checked=!!E["isNil"](t.checked)||t.checked}));var u=s.split("-"),h="right"===u[0]||"left"===u[0]?a.height:this.viewRange.width,c=E["deepMix"]({},i.legend[u[0]],o,e,{maxLength:h,viewTheme:i,items:l,container:n,canvas:r}),p=!!c.useHtml,f=p?new uo["HtmlCategory"](c):new uo["CanvasCategory"](c);return f.on("itemclick",(function(t){o.onClick&&o.onClick(t)})),this.bindHoverEvent(f),f}},t.prototype.alignLegends=function(){var t=this,e=this.getRegion();this.totalRegion=e;var i=this.groupLegendByPosition(),n=0;E["each"](i,(function(i,r){var a=e.subs[n];E["each"](i,(function(e,n){var o=i[n-1];t.alignLegend(e,o,a,r)})),n++}))},t.prototype.alignLegend=function(t,e,i,n){var r=this.theme,a=this.viewRange.width,o=this.viewRange.height,s=this.totalRegion,l=this.groupLegendByPosition(),u=this.viewRange,h=t.get("offsetX")||0,c=t.get("offsetY")||0,p=t.getHeight(),f=t.getWidth(),d=r.legend.margin,g=r.legend.legendMargin,v=l[n].length,y=n.split("-"),m=0,x=0,b=v>1?s:i;if("left"===y[0]||"right"===y[0])if(o=u.maxY,m=this.getXAlign(y[0],a,i,u,f,d),e){var _=e.get("y");x=_+e.getHeight()+g}else x=this.getYAlignVertical(y[1],o,b,u,0,d,this.viewRange.height);else if("top"===y[0]||"bottom"===y[0])if(x=this.getYAlignHorizontal(y[0],o,i,u,p,d),e){var w=e.getWidth(),M=e.get("x");m=M+w+g}else m=this.getXAlign(y[1],a,b,u,f,d);t.moveTo(m+h,x+c)},t.prototype.getXAlign=function(t,e,i,n,r,a){var o="left"===t?n.minX+a[3]:n.maxX-a[1]-r;return"center"===t&&(o=(e-i.totalWidth)/2),o},t.prototype.getYAlignHorizontal=function(t,e,i,n,r,a){var o="top"===t?n.minY+a[0]:n.maxY-a[2]-r;return o},t.prototype.getYAlignVertical=function(t,e,i,n,r,a,o){var s="top"===t?n.minY+a[0]:n.maxY-i.totalHeight-a[2];return"center"===t&&(s=n.minY+(n.height-i.totalHeight)/2),s},t.prototype.adjustPosition=function(t){var e=t.split("-");if(1===e.length){var i=e[0];return"left"===i?"left-bottom":"right"===i?"right-bottom":"top"===i?"top-center":"bottom"===i?"bottom-center":""}return e.slice(0,2).join("-")},t.prototype.bindClickEvent=function(t,e,i,n){var r=this,a=this.view,o=e.field;t.on("itemclick",(function(e){if(n)n(e);else{var s=e.item,l=e.checked,u="single"===t.get("selectedMode"),h=s.dataValue;l?(E["pull"](i,h),r.isFieldInView(o,h)&&a.filter(o,(function(t){return u?t===h:!E["contains"](i,t)}))):u||(i.push(h),r.isFieldInView(o,h)&&a.filter(o,(function(t){return!E["contains"](i,t)}))),a.set("keepLegend",!0),a.repaint(),a.set("keepLegend",!1)}}))},t.prototype.bindHoverEvent=function(t,e){var i=t.get("onMouseover"),n=t.get("onMouseleave");t.on("itemmouseover",(function(t){i&&i(t)})),t.on("itemmouseleave",(function(t){n&&n(t)}))},t.prototype.getRegion=function(){var t=this,e=this.theme,i=e.legend.legendMargin,n=[],r=0,a=0,o=this.groupLegendByPosition();return E["each"](o,(function(e){var o=t.getSubRegion(e);n.push(o),r+=o.totalWidth+i,a+=o.totalHeight+i})),{totalWidth:r,totalHeight:a,subs:n}},t.prototype.getSubRegion=function(t){var e=0,i=0,n=0,r=0;return E["each"](t,(function(t){var a=t.getWidth(),o=t.getHeight();e<a&&(e=a),n+=a,i<o&&(i=o),r+=o})),{maxWidth:e,totalWidth:n,maxHeight:i,totalHeight:r}},t.prototype.isFiltered=function(t,e,i){if(!t.isCategory)return!0;var n=!0;return E["each"](e,(function(e){if(t.getText(e)===t.getText(i))return n=!1,!1})),n},t.prototype.isFieldInView=function(t,e){var i=!1,n=this.view.get("scales"),r=n[t];return r&&r.values&&(i=E["contains"](r.values,e)),i},t.prototype.getLegendOptions=function(){return E["get"](this.view.get("options"),"legends",{})},t.prototype.getFieldLegendConfig=function(t,e,i){var n=this.options,r=E["get"](n,"fields."+t,{});return r[e]?r[e]:n[e]?n[e]:i},t.prototype.bindFilterEvent=function(t,e){var i=this,n=e.field;t.on("itemfilter",(function(t){var e=t.range,r=e[0],a=e[1];i.filterShape(n,r,a)}))},t.prototype.filterShape=function(t,e,i){var n=this,r=function(r,a,o,s){var l=r[t];if(E["isNil"](l))a.show();else{var u=l>=e&&l<=i;n.filterLabels(a,o,u),u?a.show():a.hide()}};this.view.eachShape(r)},t.prototype.groupLegendByPosition=function(){return E["groupBy"](this.legends,(function(t){return t.get("position")}))},t.prototype.filterLabels=function(t,e,i){if(t.get("gLabel"))t.get("gLabel").set("visible",i);else{var n=e.get("labelOptions");if(!E["isEmpty"](E["get"](n,"fields"))){var r=e.getXScale().field,a=e.getYScale().field,o=t.get("origin")._origin,s=e.get("labels");E["each"](s,(function(e){var n=e.get("origin")||[];n[r]===o[r]&&n[a]===o[a]&&(e.set("visible",i),t.set("gLabel",e))}))}}},t.prototype.getFieldLegendOption=function(t,e){return void 0===e&&(e={}),E["get"](this.getLegendOptions(),"fields."+t,e)},t}(),Io=Bo;function Do(t){var e=[];if(t.length){e=t.slice(0);var i=e[0],n=e[e.length-1];0!==i.value&&e.unshift({value:0}),1!==n.value&&e.push({value:1})}return e}function Fo(t,e,i){var n=[];return t.length?(t.length>=2&&e&&i&&n.push({text:"",tickValue:"",value:0}),0!==t[0].value&&n.push({text:"",tickValue:"",value:0}),n=n.concat(t),1!==n[n.length-1].value&&n.push({text:"",tickValue:"",value:1}),n):n}function Eo(t,e){void 0===e&&(e=0);var i=e;return"middle"===t&&(i=.5),-1!==t.indexOf("%")&&(i=parseInt(t,10)/100),i}var Ro=function(){function t(t){this.title=null,this.visible=!0,this.canvas=null,this.container=null,this.coord=null,this.options=null,this.axes=[],this.theme=null,E["mix"](this,t)}return t.prototype.createAxis=function(t,e,i){var n,r=this,a=this.coord,o=a.type;"theta"===o||"polar"===o&&a.isTransposed||(t&&!this._isHide(t.field)&&(n=this._drawAxis(a,t,e[0],"x",i)),E["isEmpty"](e)||"helix"===o||E["each"](e,(function(e,o){r._isHide(e.field)||r._drawAxis(a,e,t,"y",i,n,o)})))},t.prototype.changeVisible=function(t){var e=this.axes;E["each"](e,(function(e){e.set("visible",t)}))},t.prototype.clear=function(){var t=this.axes;E["each"](t,(function(t){t.clear()})),this.axes=[]},t.prototype._getAxisOptionByField=function(t,e){return void 0===e&&(e={}),E["get"](this.options,"fields."+t,e)},t.prototype._isHide=function(t){return!1===this._getAxisOptionByField(t)},t.prototype._getMiddleValue=function(t,e,i,n){if(0===t&&!n)return 0;if(1===t)return 1;var r=e[i+1].value;return n||1!==r?(t+r)/2:1},t.prototype._getLineRange=function(t,e,i,n){var r,a,o,s=e.field,l=this._getAxisOptionByField(s).position||"";if("x"===i){var u="top"===l?1:0;u=Eo(l,u),r={x:0,y:u},a={x:1,y:u},o=!1}else{if(n){var h="left"===l?0:1;h=Eo(l,h),r={x:h,y:0},a={x:h,y:1}}else{h="right"===l?1:0;h=Eo(l,h),r={x:h,y:0},a={x:h,y:1}}o=!0}return r=t.convert(r),a=t.convert(a),{start:r,end:a,isVertical:o}},t.prototype._getLineCfg=function(t,e,i,n){var r,a=this._getLineRange(t,e,i,n),o=a.start,s=a.end,l=t.center,u=t.isTransposed,h=u?!a.isVertical:a.isVertical;return r=h&&o.x>l.x||!h&&o.y>l.y?1:-1,{isVertical:h,factor:r,start:o,end:s}},t.prototype._getCircleCfg=function(t){var e,i=t.x,n=t.y,r=t.isTransposed,a=t.circleCenter,o=t.innerRadius,s=n.start>n.end;e=r?{x:s?0:1,y:0}:{x:0,y:s?0:1},e=t.convert(e);var l,u=[e.x-a.x,e.y-a.y],h=[1,0];l=e.y>a.y?St.angle(u,h):-1*St.angle(u,h);var c=l+(i.end-i.start);return{startAngle:l,endAngle:c,center:a,radius:Math.sqrt(Math.pow(e.x-a.x,2)+Math.pow(e.y-a.y,2)),inner:o||0}},t.prototype._getRadiusCfg=function(t){var e,i,n=t.x.start,r=n<0?-1:1;return t.isTransposed?(e={x:0,y:0},i={x:1,y:0}):(e={x:0,y:0},i={x:0,y:1}),{factor:r,start:t.convert(e),end:t.convert(i)}},t.prototype._getHelixCfg=function(t){for(var e=t.a,i=t.startAngle,n=t.endAngle,r=t.center,a=t.y,o=100,s=[],l=0;l<=o;l++){var u=t.convert({x:l/100,y:0});s.push(u.x),s.push(u.y)}var h=t.convert({x:0,y:0});return{a:e,startAngle:i,endAngle:n,crp:s,axisStart:h,center:r,inner:a.start}},t.prototype._getAxisPosition=function(t,e,i,n){if(this._getAxisOptionByField(n).position)return this._getAxisOptionByField(n).position;var r="",a=t.type;return t.isRect?"x"===e?r="bottom":"y"===e&&(r=i?"right":"left"):r="helix"===a?"helix":"x"===e?t.isTransposed?"radius":"circle":t.isTransposed?"circle":"radius",r},t.prototype._getAxisDefaultCfg=function(t,e,i,n){var r=this.theme,a=e.field,o={coord:t,theme:r.axis[n]};if(o=E["deepMix"]({},r.axis[n],o,this._getAxisOptionByField(a)),o.showTitle){var s=E["get"](o,"title",{});s.text=s.text||e.alias||a,E["deepMix"](o,{title:s})}return o.ticks=e.getTicks(),t.isPolar&&!e.isCategory&&"x"===i&&Math.abs(t.endAngle-t.startAngle)===2*Math.PI&&o.ticks.pop(),o},t.prototype._getAxisCfg=function(t,e,i,n,r,a){var o=this;void 0===r&&(r="");var s=this._getAxisPosition(t,n,r,e.field),l=this._getAxisDefaultCfg(t,e,n,s);if(l.grid&&i){var u=[],h=Do(i.getTicks());if(h.length){var c=Fo(l.ticks,e.isLinear,"center"===l.gridAlign);E["each"](c,(function(i,s){var p=[],f=i.value;if("center"===l.gridAlign&&(f=o._getMiddleValue(f,c,s,e.isLinear)),!E["isNil"](f)){var d=t.x,g=t.y;E["each"](h,(function(e){var i="x"===n?f:e.value,r="x"===n?e.value:f,a=t.convert({x:i,y:r});if(t.isPolar){var o=t.circleCenter;g.start>g.end&&(r=1-r),a.flag=d.start>d.end?0:1,a.radius=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2))}p.push(a)})),u.push({id:a+"-"+n+r+"-grid-"+i.tickValue,points:p})}}))}l.gridPoints=u}return l},t.prototype._drawAxis=function(t,e,i,n,r,o,s){var l,u,h=this.container,c=this.canvas;"cartesian"===t.type?(l=a.Line,u=this._getLineCfg(t,e,n,s)):"helix"===t.type&&"x"===n?(l=a.Helix,u=this._getHelixCfg(t)):"x"===n?(l=a.Circle,u=this._getCircleCfg(t)):(l=a.Line,u=this._getRadiusCfg(t));var p=this._getAxisCfg(t,e,i,n,s,r);p=E["mix"]({},p,u),"y"===n&&o&&"circle"===o.get("type")&&(p.circle=o),p.id=E["isNil"](s)?r+"-"+n:r+"-"+n+s,E["mix"](p,{canvas:c,group:h.addGroup()});var f=new l(p);return f.render(),this.axes.push(f),f},t}(),zo=Ro,No=St,Yo=["line","area","path"],Ho=["line","area"],Go=["marker","showMarker"],Wo=function(t,e){var i=-1;return E["each"](t,(function(t,n){var r=!0;for(var a in e)if(e.hasOwnProperty(a)&&-1===Go.indexOf(a)&&!E["isObject"](e[a])&&e[a]!==t[a]){r=!1;break}if(r)return i=n,!1})),i},Xo=function(t){var e=[];return E["each"](t,(function(t){var i=Wo(e,t);-1===i&&e.push(t)})),e},Vo=function(){function t(t){var e=this;this.timeStamp=0,this.onMouseMove=function(t){var i=e.view.get("panelGroup"),n=e.timeStamp,r=+new Date,a={x:t.x-(i.get("x")||0),y:t.y-(i.get("y")||0)};r-n>16&&(e.showTooltip(a,e.view,t.target),e.timeStamp=r)},this.onMouseOut=function(t){t&&!t.event||e.hideTooltip()},E["assign"](this,t)}return t.prototype.renderTooltip=function(){var t=this;if(!this.tooltip){var e,i=this.view,n=this.theme,a=this._getCanvas(),o=this._getDefaultTooltipOptions(),s=this.options;if(s=E["deepMix"]({panelGroup:i.get("panelGroup"),panelRange:i.get("panelRange"),capture:!1,canvas:a,frontgroundGroup:i.get("frontgroundGroup"),theme:n.tooltip,backgroundGroup:i.get("backgroundGroup")},o,s),s.crosshairs&&"rect"===s.crosshairs.type&&(s.zIndex=0),s.visible=!1,s.useHtml){e=new r.Html(s);var l=this._getTriggerEvent();if(!e.get("enterable")&&"panel:mousemove"===l){var u=e.get("container");u&&(u.onmousemove=function(e){var n=t._normalizeEvent(e);i.emit(l,n)})}}else e=new r.Canvas(s);this.tooltip=e,this.options=s,this._bindEvent()}},t.prototype._normalizeEvent=function(t){var e=this.view,i=this._getCanvas(),n=i.getPointByClient(t.clientX,t.clientY),r=i.get("pixelRatio");return n.x=n.x/r,n.y=n.y/r,n.view=e,n},t.prototype.hideTooltip=function(){var t=this.tooltip;if(t.get("visible")){var e=this.view,i=this._getCanvas();this.prePoint=null,t.hide(),e.emit("tooltip:hide",{tooltip:t}),e.setActive((function(){return!1})),i.draw()}},t.prototype.showTooltip=function(t,e,i){var n=this;if(t){this.tooltip||this.renderTooltip();var r=this.options,a=[],o=[],s=e.getElements(),l=e.get("coord");if(E["each"](s,(function(e){var i=e.get("type");if(e.get("visible")&&!1!==e.get("tooltipOptions")){var s=e.get("dataArray");if(e.isShareTooltip()||E["contains"](["area","line","path"],i))E["each"](s,(function(s){var u=e.findPoint(t,s);if(u){var h=e.getTooltipItems(u,r.title);E["each"](h,(function(t){var r=t.point;if(!E["isNil"](r)&&!E["isNil"](r.x)&&!E["isNil"](r.y)){var o=E["isArray"](r.x)?r.x[r.x.length-1]:r.x,s=E["isArray"](r.y)?r.y[r.y.length-1]:r.y;r=l.applyMatrix(o,s,1),t.x=r[0],t.y=r[1],t.showMarker=!0;var u=n._getItemMarker(e,t.color);t.marker=u,-1!==E["indexOf"](Yo,i)&&a.push(t)}})),o=o.concat(h)}}));else{var u=e.get("shapeContainer"),h=u.get("canvas"),c=h.get("pixelRatio"),p=u.getShape(t.x*c,t.y*c);p&&p.get("visible")&&p.get("origin")&&(o=e.getTooltipItems(p.get("origin"),r.title))}}})),E["each"](o,(function(t){var e=t.point,i=E["isArray"](e.x)?e.x[e.x.length-1]:e.x,n=E["isArray"](e.y)?e.y[e.y.length-1]:e.y;e=l.applyMatrix(i,n,1),t.x=e[0],t.y=e[1]})),o.length){var u=o[0];if(!o.every((function(t){return t.title===u.title}))){var h=u,c=1/0;o.forEach((function(e){var i=No.distance([t.x,t.y],[e.x,e.y]);i<c&&(c=i,h=e)})),o=o.filter((function(t){return t.title===h.title})),a=a.filter((function(t){return t.title===h.title}))}if(!1===r.shared&&o.length>1){var p=o[0],f=Math.abs(t.y-p.y);E["each"](o,(function(e){Math.abs(t.y-e.y)<=f&&(p=e,f=Math.abs(t.y-e.y))})),!p||E["isNil"](p.x)||E["isNil"](p.y)||(a=[p]),o=[p]}this._setTooltip(t,o,a,i),e.setActive((function(t){var e=!1;return E["each"](o,(function(i){var n=i.point._origin;if(n===t)return e=!0,!1})),e}),!1)}else this.hideTooltip()}},t.prototype.clear=function(){var t=this.tooltip;t&&t.destroy(),this.tooltip=null,this.prePoint=null,this._offEvent()},t.prototype._getCanvas=function(){return this.view.get("canvas")},t.prototype._getTriggerEvent=function(){var t,e=E["get"](this.options,"triggerOn");return e&&"mousemove"!==e?"click"===e?t="panel:click":"none"===e&&(t=null):t="panel:mousemove",t},t.prototype._getDefaultTooltipOptions=function(){var t,e=this.view,i=this.options,n=this.theme,r=E["mix"]({},n.tooltip),a=E["filter"](e.getElements(),(function(t){return t.get("visible")})),o=E["uniq"](E["map"](a,(function(t){return t.get("type")}))),s=!!e.get("coord")&&e.get("coord").isTransposed;if(e.get("coord")&&"cartesian"===e.get("coord").type)if("interval"===o[0]){if(!1!==i.shape){var l=E["mix"]({},n.tooltipCrosshairsRect);l.isTransposed=s,t={zIndex:0,crosshairs:l}}}else if(E["indexOf"](Ho,o[0])>-1){l=E["mix"]({},n.tooltipCrosshairsLine);l.isTransposed=s,t={crosshairs:l}}return E["mix"](r,t)},t.prototype._bindEvent=function(){var t=this.view,e=this._getTriggerEvent();e&&(t.on(e,this.onMouseMove),t.on("panel:mouseleave",this.onMouseOut))},t.prototype._offEvent=function(){var t=this.view,e=this._getTriggerEvent();e&&(t.off(e,this.onMouseMove),t.off("panel:mouseleave",this.onMouseOut))},t.prototype._setTooltip=function(t,e,i,n){var r=this.tooltip,a=this.prePoint;if(!a||a.x!==t.x||a.y!==t.y){var o=Xo(e);this.prePoint=t;var s=this.view,l=this.theme,u=E["isArray"](t.x)?t.x[t.x.length-1]:t.x,h=E["isArray"](t.y)?t.y[t.y.length-1]:t.y;r.get("visible")||s.emit("tooltip:show",{x:u,y:h,tooltip:r});var c=o[0],p=c.title||c.name;r.isContentChange(p,o)&&(s.emit("tooltip:change",{tooltip:r,x:u,y:h,items:o}),p=o[0].title||o[0].name,r.setContent(p,o),E["isEmpty"](i)?(r.clearMarkers(),r.set("markerItems",[])):!1===this.options.showTooltipMarkers?r.set("markerItems",i):r.setMarkers(i,l.tooltipMarker)),r.setPosition(u+(s.get("panelGroup").get("x")||0),h+(s.get("panelGroup").get("y")||0),n),r.show()}},t.prototype._getItemMarker=function(t,e){var i=t.get("shapeType")||"point",n=t.getDefaultValue("shape")||"circle",r=Lo(i),a={color:e},o=r.getMarkerStyle(n,a);return o},t}(),qo=Vo,Uo=function(){function t(t){void 0===t&&(t={view:null}),this._states={},this._stateStack={},this.view=t.view}return t.prototype.setState=function(t,e,i){this._stateStack[t]={exp:e,draw:i},this._onUpdate()},t.prototype.getState=function(t){return this._states[t]},t.prototype.getAllStates=function(){return this._states},t.prototype.clear=function(){this._states={},this._stateStack={},this._changeTimer&&(clearTimeout(this._changeTimer),this._changeTimer=null)},t.prototype._onUpdate=function(){var t=this,e=this._stateStack;this._changeTimer&&(clearTimeout(this._changeTimer),this._changeTimer=null),this._changeTimer=setTimeout((function(){for(var i in e){var n=e[i],r=n.exp;t._states[i]&&t._states[i]===r||(t._states[i]=r,t._triggerEvent(i,n))}t._stateStack={}}),16)},t.prototype._triggerEvent=function(t,e){this.view.emit(t+":change",Object(B["__assign"])({name:t},e))},t}(),Zo=Uo;function Qo(t,e){var i=t.get("backgroundGroup").get("backShape"),n=t.get("panelGroup").get("backShape");return i===e||n===e}function $o(t){t.target&&t.target.get("origin")&&(t.data=t.target.get("origin"))}function Ko(t,e){return!(!t||!e||t!==e)}function Jo(t,e,i){return!(t===i||!e.isShapeInView(t))}function ts(t,e){var i=t;while(i=i.get("parent"))if(i===e)return!0;return!1}var es=function(){function t(t){void 0===t&&(t={view:null,canvas:null}),this.view=t.view,this.canvas=t.canvas,this._panelGroup=this.view.get("panelGroup"),this._eventHandlers=[],this._pixelRatio=this.canvas.get("pixelRatio")}return t.prototype._getEventObj=function(t){var e={x:t.x/this._pixelRatio,y:t.y/this._pixelRatio,target:t.target,event:t.event};return e},t.prototype._triggerShapeEvent=function(t,e,i){var n=t.name;if(n&&!t.get("destroyed")){var r=this.view,a=n+":"+e;i.view=r,i.appendInfo=t.get("appendInfo"),r.emit(a,i)}},t.prototype._addEvent=function(t,e,i){t.on(e,i),this._eventHandlers.push({target:t,type:e,handler:i})},t.prototype.bindEvents=function(){var t=this.view.get("container");this._addEvent(t,"mousedown",E["wrapBehavior"](this,"_onEvents")),this._addEvent(t,"mousemove",E["wrapBehavior"](this,"_onMove")),this._addEvent(t,"mouseup",E["wrapBehavior"](this,"_onEvents")),this._addEvent(t,"click",E["wrapBehavior"](this,"_onEvents")),this._addEvent(t,"dblclick",E["wrapBehavior"](this,"_onEvents")),this._addEvent(t,"contextmenu",E["wrapBehavior"](this,"_onEvents")),this._addEvent(t,"wheel",E["wrapBehavior"](this,"_onEvents")),this._addEvent(t,"touchstart",E["wrapBehavior"](this,"_onEvents")),this._addEvent(t,"touchmove",E["wrapBehavior"](this,"_onEvents")),this._addEvent(t,"touchend",E["wrapBehavior"](this,"_onEvents")),this._addEvent(this.canvas,"mousemove",E["wrapBehavior"](this,"_onCanvasMove"));var e=this.canvas.get("canvasDOM");this._canvasDomLeaveHandler=E["wrapBehavior"](this,"_onCanvasDomLeave"),e.addEventListener("mouseleave",this._canvasDomLeaveHandler)},t.prototype._onEvents=function(t){var e=t.type,i=this._getEventObj(t),n=t.target;$o(i);var r=Qo(this.view,n);r||this._triggerShapeEvent(n,e,i);var a=n.get("parent");if(a){var o=a.get("name");o&&"panelGroup"===o&&this.view.emit("panel:"+e,i)}this.view.emit(e,i)},t.prototype._onMove=function(t){var e=this._getEventObj(t),i=t.target;$o(e),this.view.emit("mousemove",e);var n=Qo(this.view,i);n||this._triggerShapeEvent(i,"mousemove",e);var r=this._lastShape,a=Qo(this.view,r);if(r&&!a&&!Ko(r,i)){var o=this._getEventObj(t);$o(o),this._triggerShapeEvent(r,"mouseleave",e)}if(!n&&!Ko(r,i)){var s=this._getEventObj(t);$o(s),this._triggerShapeEvent(i,"mouseenter",s)}var l=ts(i,this._panelGroup),u=!!r&&ts(r,this._panelGroup);l?u?this.view.emit("panel:mousemove",e):this.view.emit("panel:mouseenter",e):u&&this.view.emit("panel:mouseleave",e),this._lastShape=i},t.prototype._onCanvasMove=function(t){var e=E["isArray"](t)?t[0]:t,i=this._getEventObj(e),n=this.canvas,r=this.view,a=e.target,o=Jo(a,r,n),s=!!this._lastCanvasTarget&&Jo(this._lastCanvasTarget,r,n);a!==this._lastCanvasTarget&&(s&&!o?this.view.emit("mouseleave",i):!s&&o&&this.view.emit("mouseenter",i)),this._lastCanvasTarget=a},t.prototype._onCanvasDomLeave=function(t){var e=this._getEventObj(t);e.event=t,this.view.emit("panel:mouseleave",e)},t.prototype.clearEvents=function(){var t=this._eventHandlers;E["each"](t,(function(t){t.target.off(t.type,t.handler)}));var e=this.canvas.get("canvasDOM");e.removeEventListener("mouseleave",this._canvasDomLeaveHandler)},t}(),is=es,ns=function(){function t(t,e){this.view=t,this.cfg=e,this.init()}return t.prototype.init=function(){this.container=this._createContainer();var t=this.view.get("data");this.facets=this.generateFacets(t)},t.prototype._createContainer=function(){var t=this.view.get("frontgroundGroup");return t.addGroup()},t.prototype.render=function(){this._renderViews(),this.renderTitle(),this.renderAxis()},t.prototype._renderViews=function(){this._clearFacetViews(),this._createFacetViews()},t.prototype._createFacetViews=function(){var t=this;return this.facets.map((function(e){return t.facetToView(e)}))},t.prototype._clearFacetViews=function(){var t=this;E["each"](this.facets,(function(e){e.view&&(t.view.removeView(e.view),e.view=void 0)}))},t.prototype.facetToView=function(t){var e=t.region,i=t.data,n=this.view.createView({start:e.start,end:e.end,padding:E["get"](t,"padding",this.cfg.padding||0)});n.data(i||[]),this.beforeProcessView(n,t);var r=this.cfg.eachView;return r&&r(n,t),this.afterProcessView(n,t),t.view=n,n},t.prototype.clear=function(){this._clearFacetViews()},t.prototype.destroy=function(){this.clear(),this.container&&this.container.remove(),this.view=void 0,this.facets=[],this.container=void 0,this.destroyed=!0},t.prototype.beforeProcessView=function(t,e){},t.prototype.afterProcessView=function(t,e){},t.prototype.getFieldValues=function(t,e){var i=[],n={};return E["each"](t,(function(t){var r=t[e];E["isNil"](r)||n[r]||(i.push(r),n[r]=!0)})),i},t.prototype.getRegion=function(t,e,i,n){var r=1/(0===e?1:e),a=1/(0===t?1:t),o={x:r*i,y:a*n},s={x:r*(i+1),y:a*(n+1)};return{start:o,end:s}},t}(),rs={},as=function(t){return rs[E["lowerFirst"](t)]},os=function(t,e){rs[E["lowerFirst"](t)]=e},ss={},ls=function(t){return ss[t.toLowerCase()]},us=function(t,e){if(ls(t))throw new Error("Element type '"+t+"' existed.");var i=t.toLowerCase();ss[i]=e,il(i,e)},hs="_origin";function cs(t,e,i){var n=i.translate(t),r=i.translate(e);return i.isCategory?n===r:E["isNumberEqual"](n,r)}function ps(t){return t.alias||t.field}var fs=function(){function t(t){this.element=null,this._xDistance=null,this.element=t}return t.prototype.findPoint=function(t,e){if(0===e.length)return null;var i=this.element,n=i.get("type"),r=i.getXScale(),a=i.getYScale(),o=r.field,s=a.field,l=null;if("point"===n||"heatmap"===n){var u=i.get("coord"),h=u.invert(t),c=r.invert(h.x),p=a.invert(h.y),f=1/0;return E["each"](e,(function(t){var e=t[hs],i=Math.pow(e[o]-c,2)+Math.pow(e[s]-p,2);i<f&&(f=i,l=t)})),l}var d=e[0],g=e[e.length-1],v=this._getXValueByPoint(t),y=d[hs][o],m=d[hs][s],x=g[hs][o],b=a.isLinear&&E["isArray"](m);if(E["isArray"](y))E["each"](e,(function(t){var e=t[hs];if(r.translate(e[o][0])<=v&&r.translate(e[o][1])>=v){if(!b)return l=t,!1;E["isArray"](l)||(l=[]),l.push(t)}})),E["isArray"](l)&&(l=this._filterYValue(l,t));else{var _;if(r.isLinear||"timeCat"===r.type){if(v>r.translate(x)||v<r.translate(y))return null;var w=0,M=e.length-1,S=void 0;while(w<=M){S=Math.floor((w+M)/2);var k=e[S][hs][o];if(cs(k,v,r))return e[S];r.translate(k)<=r.translate(v)?(w=S+1,g=e[S],_=e[S+1]):(0===M&&(g=e[0]),M=S-1)}}else E["each"](e,(function(t,i){var n=t[hs];if(cs(n[o],v,r)){if(!b)return l=t,!1;E["isArray"](l)||(l=[]),l.push(t)}else r.translate(n[o])<=v&&(g=t,_=e[i+1])})),E["isArray"](l)&&(l=this._filterYValue(l,t));g&&_&&Math.abs(r.translate(g[hs][o])-v)>Math.abs(r.translate(_[hs][o])-v)&&(g=_)}var O=this._getXDistance();return!l&&Math.abs(r.translate(g[hs][o])-v)<=O/2&&(l=g),l},t.prototype.getTooltipItems=function(t,e){var i,n,r=this.element,a=t[hs],o=this._getTooltipTitle(a,e),s=r.get("tooltipOptions"),l=r.get("theme").defaultColor,u=this._getSize(t),h=[];function c(e,i){if(!E["isNil"](i)&&""!==i){var n={title:o,point:t,name:e||o,value:i,color:t.color||l,marker:!0,size:u};h.push(n)}}if(s){var p=s.fields,f=s.callback;if(f){var d=p.map((function(e){return t[hs][e]})),g=f.apply(void 0,d),v=Object(B["__assign"])({point:t,title:o,color:t.color||l,marker:!0,size:u},g);h.push(v)}else{var y=r.get("scales");E["each"](p,(function(t){if(!E["isNil"](a[t])){var e=y[t];i=ps(e),n=e.getText(a[t]),c(i,n)}}))}}else{var m=this._getTooltipValueScale();E["isNil"](a[m.field])||(n=this._getTooltipValue(a,m),i=this._getTooltipName(a),c(i,n))}return h},t.prototype.clear=function(){this._xDistance=null},t.prototype._getXValueByPoint=function(t){var e=0,i=this.element,n=i.get("coord"),r=i.getXScale(),a=r.range,o=a[a.length-1],s=a[0],l=n.invert(t),u=l.x;return i.isInCircle()&&u>(1+o)/2&&(u=s),e=r.invert(u),r.isCategory&&(e=r.translate(e)),e},t.prototype._filterYValue=function(t,e){var i=this.element,n=i.get("coord"),r=i.getYScale(),a=r.field,o=n.invert(e),s=r.invert(o.y),l=t[t.length-1];return E["each"](t,(function(t){var e=t[hs];if(e[a][0]<=s&&e[a][1]>=s)return l=t,!1})),l},t.prototype._getXDistance=function(){var t=this._xDistance;if(!t){var e=this.element,i=e.getXScale();if(i.isCategory)t=1;else{var n=i.values,r=i.translate(n[0]),a=r;E["each"](n,(function(t){var e=i.translate(t);e<r&&(r=e),e>a&&(a=e)}));var o=n.length;t=(a-r)/(o-1)}this._xDistance=t}return t},t.prototype._getTooltipTitleScale=function(t){var e=this.element,i=e.get("scales");if(t)return i[t];var n=e.getAttr("position"),r=n.getFields();return i[r[0]]},t.prototype._getTooltipTitle=function(t,e){var i="",n=this.element,r=this._getTooltipTitleScale(e);if(r){var a=t[r.field];i=r.getText(a)}else if("heatmap"===n.get("type")){var o=n.getXScale(),s=n.getYScale(),l=o.getText(t[o.field]),u=s.getText(t[s.field]);i="( "+l+", "+u+" )"}return i},t.prototype._getTooltipValueScale=function(){var t,e=this.element,i=e.getAttrsForLegend();E["each"](i,(function(e){var i=e.getScale(e.type);if(i&&i.isLinear)return t=i,!1}));var n=e.getXScale(),r=e.getYScale();return t||r||n},t.prototype._getTooltipValue=function(t,e){var i=e.field,n=t[i];if(E["isArray"](n)){var r=n.map((function(t){return e.getText(t)}));return r.join("-")}return e.getText(n)},t.prototype._getTooltipName=function(t){var e,i=this.element,n=i.getGroupScales();if(n.length&&E["each"](n,(function(t){return e=t,!1})),e){var r=e.field;return e.getText(t[r])}var a=this._getTooltipValueScale();return ps(a)},t.prototype._getSize=function(t){var e=this.element,i=e.get("coord"),n=e.getSize(t[hs]);if(i.isRect&&n){var r=i.isTransposed?"y":"x";if(E["isArray"](t[r])){var a=Math.abs(t[r][1]-t[r][0]);n=n<a?null:n}}return n},t}(),ds=fs,gs=["line","point","path"],vs="_origin";function ys(t){var e=0;return E["each"](t,(function(t){e+=t})),e/t.length}function ms(t,e){if(E["isNumber"](t)&&E["isNumber"](e))return[t,e];var i,n,r=-1,a=0,o=0,s=t.length-1,l=0;while(++r<t.length)i=s,s=r,l+=n=t[i]*e[s]-t[s]*e[i],a+=(t[i]+t[s])*n,o+=(e[i]+e[s])*n;return l*=3,[a/l,o/l]}var xs=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({labelOptions:null,coord:null,elementType:null,zIndex:6},e))||this;return i.set("defaultLabelCfg",i.get("theme").label),i}return Object(B["__extends"])(e,t),e.prototype._renderUI=function(){t.prototype._renderUI.call(this);var e=this.addGroup({name:"element-labels-group"}),i=this.addGroup({name:"element-labels-line-group"}),n=new kr;n.set("coord",this.get("coord")),n.set("group",e),n.set("lineGroup",i),this.set("labelsRenderer",n),this.set("labelsGroup",e),this.set("lineGroup",i)},e.prototype.destroy=function(){this.get("labelsRenderer").destroy(),t.prototype.destroy.call(this)},e.prototype.showLabels=function(t,e){var i=this.get("labelsRenderer"),n=this.getLabelsItems(t,e),r=[].concat(e),a=this.get("type");n=this.adjustItems(n,r),this.drawLines(n),i.set("items",n.filter((function(t,e){return!!t||(r.splice(e,1),!1)}))),a&&(i.set("shapes",r),i.set("type",a),i.set("points",t)),i.set("canvas",this.get("canvas")),i.draw()},e.prototype.adjustItems=function(t,e){return E["each"](t,(function(t){t&&(t.offsetX&&(t.x+=t.offsetX),t.offsetY&&(t.y+=t.offsetY))})),t},e.prototype.drawLines=function(t){var e=this;E["each"](t,(function(t){t&&t.offset>0&&t.labelLine&&e.lineToLabel(t)}))},e.prototype.lineToLabel=function(t){},e.prototype.setLabelPosition=function(t,e,i,n){},e.prototype.transLabelPoint=function(t){var e=this.get("coord"),i=e.applyMatrix(t.x,t.y,1);t.x=i[0],t.y=i[1]},e.prototype.getOffsetVector=function(t){var e,i=t.offset||0,n=this.get("coord");return e=n.isTransposed?n.applyMatrix(i,0):n.applyMatrix(0,i),e},e.prototype.getDefaultOffset=function(t){var e=0,i=this.get("coord"),n=this.getOffsetVector(t);return e=i.isTransposed?n[0]:n[1],e},e.prototype.getLabelOffset=function(t,e,i){var n=this.getDefaultOffset(t),r=this.get("coord"),a=r.isTransposed,o=a?"x":"y",s=a?1:-1,l={x:0,y:0};return l[o]=e>0||1===i?n*s:n*s*-1,l},e.prototype.getLabelsItems=function(t,e){var i=this,n=[],r=this.get("element"),a=this.get("coord"),o=this._getlabelOptions(t,e);return E["each"](t,(function(t,e){var s=t[vs],l=o[e];if(l){E["isArray"](l.text)||(l.text=[l.text]);var u=l.length;E["each"](l.text,(function(e,o){if(E["isNil"](e)||""===e)n.push(null);else{var h=i.getLabelPoint(l,t,o);h=E["mix"]({},l,h),h.textAlign||(h.textAlign=i.getLabelAlign(h,o,u)),r&&(h.id=r.getShapeId(s)+"-glabel-"+o+"-"+h.text),h.coord=a,n.push(h)}}))}else n.push(null)})),n},e.prototype.getLabelPoint=function(t,e,i){var n=this.get("coord"),r=t.text.length;function a(e,i){var n=e;return E["isArray"](n)&&(n=1===t.text.length?n.length<=2?n[e.length-1]:ys(n):n[i]),n}var o={text:t.text[i],x:0,y:0,start:{x:0,y:0},color:"#fff"};if(e&&"polygon"===this.get("elementType")){var s=ms(e.x,e.y);o.x=s[0],o.y=s[1]}else o.x=a(e.x,i),o.y=a(e.y,i);if(e&&e.nextPoints&&("funnel"===e.shape||"pyramid"===e.shape)){var l=-1/0;e.nextPoints.forEach((function(t){var e=n.convert(t);e.x>l&&(l=e.x)})),o.x=(o.x+l)/2}"pyramid"===e.shape&&!e.nextPoints&&e.points&&e.points.forEach((function(t){var i=t;i=n.convert(i),(E["isArray"](i.x)&&-1===e.x.indexOf(i.x)||E["isNumber"](i.x)&&e.x!==i.x)&&(o.x=(o.x+i.x)/2)})),t.position&&this.setLabelPosition(o,e,i,t.position);var u=this.getLabelOffset(t,i,r);return t.offsetX&&(u.x+=t.offsetX),t.offsetY&&(u.y+=t.offsetY),this.transLabelPoint(o),o.start={x:o.x,y:o.y},o.x+=u.x,o.y+=u.y,o.color=e.color,o},e.prototype.getLabelAlign=function(t,e,i){var n="center",r=this.get("coord");if(r.isTransposed){var a=this.getDefaultOffset(t);n=a<0?"right":0===a?"center":"left",i>1&&0===e&&("right"===n?n="left":"left"===n&&(n="right"))}return n},e.prototype._getLabelValue=function(t,e){var i=e;E["isArray"](i)||(i=[i]);var n=[];return E["each"](i,(function(e){var i=t[e.field];if(E["isArray"](i)){var r=[];E["each"](i,(function(t){r.push(e.getText(t))})),i=r}else i=e.getText(i);E["isNil"](i)||""===i?n.push(null):n.push(i)})),n},e.prototype._getlabelOptions=function(t,e){var i=this,n=this.get("elementType"),r=this.get("theme"),a=this.get("labelOptions"),o=a.scales,s=[];return E["each"](t,(function(t,e){var l={},u=t[vs],h=i._getLabelValue(u,o);if(a.callback){var c=o.map((function(t){return u[t.field]}));l=a.callback.apply(a,c)}E["isNil"](l)?s.push(null):(E["isString"](l.content)?(l.text=l.content,delete l.content):E["isFunction"](l.content)?(l.text=l.content(u,t,e),delete l.content):l.text=h[0],l.htmlTemplate&&(l.useHtml=!0,l.text=l.htmlTemplate(u,t,e),delete l.htmlTemplate),l.formatter&&(l.text=l.formatter.call(null,l.text,t,e),delete l.formatter),l="polygon"===n||l.offset<0&&-1===E["indexOf"](gs,n)?E["deepMix"]({},i.get("defaultLabelCfg"),r.innerLabels,l):E["deepMix"]({},i.get("defaultLabelCfg"),r.label,l),l.origin=u,s.push(l))})),s},e}(F["Group"]),bs=xs,_s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.setLabelPosition=function(t,e,i,n){var r=n;E["isFunction"](r)&&(r=r(e));var a=this.get("coord"),o=a.isTransposed,s=a.convertPoint(e.points[0]),l=a.convertPoint(e.points[2]),u=(s.x-l.x)/2*(o?-1:1),h=(s.y-l.y)/2*(o?-1:1);switch(r){case"right":o?(t.x-=u,t.y+=h,t.textAlign=t.textAlign||"center"):(t.x-=u,t.y+=h,t.textAlign=t.textAlign||"left");break;case"left":o?(t.x-=u,t.y-=h,t.textAlign=t.textAlign||"center"):(t.x+=u,t.y+=h,t.textAlign=t.textAlign||"right");break;case"bottom":o?(t.x-=2*u,t.textAlign=t.textAlign||"left"):(t.y+=2*h,t.textAlign=t.textAlign||"center");break;case"middle":o?t.x-=u:t.y+=h,t.textAlign=t.textAlign||"center";break;case"top":t.textAlign=o?t.textAlign||"left":t.textAlign||"center";break;default:break}},e}(bs),ws=_s,Ms=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.getLabelPoint=function(t,e,i){var n,r=i,a=t.text[r],o=1;this._isToMiddle(e)?n=this._getMiddlePoint(e.points):(1===t.text.length&&0===r?r=1:0===r&&(o=-1),n=this.getArcPoint(e,r));var s=this.getDefaultOffset(t);s*=o;var l=this.getPointAngle(n),u=t.labelEmit,h=this.getCirclePoint(l,s,n,u);return h?(h.text=a,h.angle=l,h.color=e.color):h={text:""},t.autoRotate||void 0===t.autoRotate?h.rotate=this.getLabelRotate(l,s,u):h.rotate=t.rotate,h.start={x:n.x,y:n.y},h},e.prototype.getCirclePoint=function(t,e,i,n){var r=this.get("coord"),a=r.getCenter(),o=t,s=bo(r,i);if(0===s)return null;if(r.isTransposed&&s>e&&!n){var l=Math.asin(e/(2*s));o+=2*l}else s+=e;return{x:a.x+s*Math.cos(o),y:a.y+s*Math.sin(o),angle:o,r:s}},e.prototype.getArcPoint=function(t,e){var i,n=e;return n=n||0,i=E["isArray"](t.x)||E["isArray"](t.y)?{x:E["isArray"](t.x)?t.x[n]:t.x,y:E["isArray"](t.y)?t.y[n]:t.y}:t,this.transLabelPoint(i),i},e.prototype.getPointAngle=function(t){var e=this.get("coord");return _o(e,t)},e.prototype.getLabelRotate=function(t,e,i){var n;return n=180*t/Math.PI,n+=90,i&&(n-=90),n&&(n>90?n-=180:n<-90&&(n+=180)),n/180*Math.PI},e.prototype.getLabelAlign=function(t){var e,i=this.get("coord");if(t.labelEmit)e=t.angle<=Math.PI/2&&t.angle>-Math.PI/2?"left":"right";else if(i.isTransposed){var n=i.getCenter(),r=this.getDefaultOffset(t);e=Math.abs(t.x-n.x)<1?"center":t.angle>Math.PI||t.angle<=0?r>0?"left":"right":r>0?"right":"left"}else e="center";return e},e.prototype.lineToLabel=function(t){},e.prototype._getMiddlePoint=function(t){var e=this.get("coord"),i=t.length,n={x:0,y:0};return E["each"](t,(function(t){n.x+=t.x,n.y+=t.y})),n.x/=i,n.y/=i,n=e.convert(n),n},e.prototype._isToMiddle=function(t){return t.x.length>2},e}(bs),Ss=Ms,ks=4;function Os(t,e,i){return{x:t.x+i*Math.cos(e),y:t.y+i*Math.sin(e)}}function Cs(t,e,i,n,r){var a,o=!0,s=i.start,l=i.end,u=Math.min(s.y,l.y),h=Math.abs(s.y-l.y),c=0,p=Number.MIN_VALUE,f=t.map((function(t){return t.y>c&&(c=t.y),t.y<p&&(p=t.y),{size:e,targets:[t.y-u]}}));p-=u,c-u>h&&(h=c-u);while(o){f.forEach((function(t){var e=(Math.min.apply(p,t.targets)+Math.max.apply(p,t.targets))/2;t.pos=Math.min(Math.max(p,e-t.size/2),h-t.size)})),o=!1,a=f.length;while(a--)if(a>0){var d=f[a-1],g=f[a];d.pos+d.size>g.pos&&(d.size+=g.size,d.targets=d.targets.concat(g.targets),d.pos+d.size>h&&(d.pos=h-d.size),f.splice(a,1),o=!0)}}a=0,f.forEach((function(i){var n=u+e/2;i.targets.forEach((function(){t[a].y=i.pos+n,n+=e,a++}))})),t.forEach((function(t){var e=t.r*t.r,i=Math.pow(Math.abs(t.y-n.y),2);if(e<i)t.x=n.x;else{var a=Math.sqrt(e-i);t.x=r?n.x+a:n.x-a}}))}var As=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({},e))||this;return i.set("defaultLabelCfg",i.get("theme").thetaLabels),i}return Object(B["__extends"])(e,t),e.prototype.getDefaultOffset=function(t){return t.offset||0},e.prototype.adjustItems=function(e){var i=e,n=i[0]?i[0].offset:0;return n>0&&(i=this._distribute(i,n)),t.prototype.adjustItems.call(this,i)},e.prototype.lineToLabel=function(t){var e=this.get("coord"),i=e.getRadius(),n=t.offset,r=t.orignAngle||t.angle,a=e.getCenter(),o=Os(a,r,i),s=Os(a,r,i+n/2),l={x:t.x-Math.cos(r)*ks,y:t.y-Math.sin(r)*ks};E["isObject"](t.labelLine)||(t.labelLine={}),t.labelLine.path=["M "+o.x,o.y+" Q"+s.x,s.y+" "+l.x,l.y].join(",")},e.prototype.getLabelRotate=function(t,e,i){var n;return e<0&&(n=180*t/Math.PI,n>90&&(n-=180),n<-90&&(n+=180)),n/180*Math.PI},e.prototype.getLabelAlign=function(t){var e,i=this.get("coord"),n=i.getCenter();e=t.angle<=Math.PI/2&&t.x>=n.x?"left":"right";var r=this.getDefaultOffset(t);return r<=0&&(e="right"===e?"left":"right"),e},e.prototype.getArcPoint=function(t){return t},e.prototype.getPointAngle=function(t){var e=this.get("coord"),i={x:E["isArray"](t.x)?t.x[0]:t.x,y:t.y[0]};this.transLabelPoint(i);var n,r={x:E["isArray"](t.x)?t.x[1]:t.x,y:t.y[1]};this.transLabelPoint(r);var a=_o(e,i);if(t.points&&t.points[0].y===t.points[1].y)n=a;else{var o=_o(e,r);a>=o&&(o+=2*Math.PI),n=a+(o-a)/2}return n},e.prototype.getCirclePoint=function(t,e,i){var n=this.get("coord"),r=n.getCenter(),a=n.getRadius()+e,o=Os(r,t,a);return o.angle=t,o.r=a,o},e.prototype._distribute=function(t,e){var i=this.get("coord"),n=i.getRadius(),r=this.get("defaultLabelCfg").labelHeight,a=i.getCenter(),o=n+e,s=2*o+2*r,l={start:i.start,end:i.end},u=this.get("element");if(u){var h=u.get("view");l={start:h.get("panelRange").bl,end:h.get("panelRange").tr}}var c=[[],[]];return t.forEach((function(t){t&&("right"===t.textAlign?c[0].push(t):c[1].push(t))})),c.forEach((function(t,e){var i=s/r;t.length>i&&(t.sort((function(t,e){return e["..percent"]-t["..percent"]})),t.splice(i,t.length-i)),t.sort((function(t,e){return t.y-e.y})),Cs(t,r,l,a,e)})),c[0].concat(c[1])},e}(Ss),Ls=As,Ps={};function js(t){return Ps[t.toLowerCase()]}function Ts(t,e){if(js(t))throw new Error("ElementLabels type '"+t+"' existed.");Ps[t.toLowerCase()]=e}var Bs=function(){function t(t){this.element=null,this.labelsContainer=null,this.element=t}return t.prototype._createLabelsContainer=function(){var t=this.element,e=t.get("type"),i=t.get("coord"),n=t.get("labelOptions"),r=this._getElementLabelsConstructor(n.labelType,i.type,e),a=t.get("frontgroundGroup"),o=E["map"](t.get("labelOptions").fields,(function(e){return t.createScale(e)})),s=a.addGroup(r,{labelOptions:E["mix"]({scales:o},n),coord:i,element:t,elementType:e,theme:t.get("theme"),visible:t.get("visible")});this.labelsContainer=s},t.prototype.addLabels=function(t,e){this._createLabelsContainer(),this.labelsContainer.showLabels(t,e);var i=this.labelsContainer.get("labelsGroup");return i.get("children")},t.prototype.changeVisible=function(t){this.labelsContainer&&this.labelsContainer.set("visible",t)},t.prototype.clear=function(){var t=this.labelsContainer;t&&!t.destroyed&&t.remove()},t.prototype._getElementLabelsConstructor=function(t,e,i){var n=t||"base";return"polar"===e&&"base"===n?n="polar":"theta"===e&&"base"===n?n="pie":"interval"!==i&&"polygon"!==i||"base"!==n||(n="interval"),js(n)},t}(),Is=Bs;Ts("base",bs),Ts("interval",ws),Ts("pie",Ls),Ts("polar",Ss);var Ds="_origin";function Fs(t,e){if(E["isNil"](t)||E["isNil"](e))return!1;var i=t.get("origin"),n=e.get("origin");return E["isEqual"](i,n)}function Es(t,e){if(!t)return!0;if(t.length!==e.length)return!0;var i=!1;return E["each"](e,(function(e,n){if(!Fs(e,t[n]))return i=!0,!1})),i}function Rs(t,e){var i={};return E["each"](t,(function(t,n){var r=e[n];E["isArray"](r)&&(r=r.concat()),i[n]=r})),i}var zs=function(){function t(t){this.element=null,this._activeShapes=null,this._selectedShapes=null,this._inactiveShapes=null,this.element=t}return t.prototype.bind=function(){var t=this.element,e=t.get("view");e.on("active:change",E["wrapBehavior"](this,"_onActive")),e.on("selected:change",E["wrapBehavior"](this,"_onSelected")),e.on("inactive:change",E["wrapBehavior"](this,"_onInactive"))},t.prototype.unbind=function(){var t=this.element,e=t.get("view");e.off("active:change",E["getWrapBehavior"](this,"_onActive")),e.off("selected:change",E["getWrapBehavior"](this,"_onSelected")),e.off("inactive:change",E["getWrapBehavior"](this,"_onInactive"))},t.prototype._onActive=function(t){var e=this,i=this.element,n=i.get("activeOptions");if(!1!==n){var r=i.get("shapeContainer"),a=t.exp,o=t.draw,s=this._filterShapes(a),l=this._activeShapes;Es(l,s)&&(l&&this._clearActiveShapes(),this._clearInactiveShapes(),s.forEach((function(t){t.get("animating")&&t.stopAnimate(),e._setShapeActive(t)})),this._activeShapes=s,r.sort(),o&&this._draw())}},t.prototype._clearActiveShapes=function(){var t=this._activeShapes;E["each"](t,(function(t){var e=t.get("_beforeActiveAttrs");t.attr(e),t.setZIndex(0),t.set("_beforeActiveAttrs",null)}));var e=this.element.get("shapeContainer"),i=e.get("children");i.sort((function(t,e){return t._INDEX-e._INDEX})),this._activeShapes=null},t.prototype._setShapeActive=function(t){var e=this._getShapeStyleByState(t,"active"),i=Rs(e,t.attr());t.setSilent("_beforeActiveAttrs",i),t.attr(e),t.setZIndex(1)},t.prototype._onSelected=function(t){var e=this,i=this.element.get("selectedOptions");if(!1!==i){var n=t.exp,r=t.draw,a=this._filterShapes(n),o=this._selectedShapes;Es(o,a)&&(o&&this._clearSelectedShapes(),this._clearInactiveShapes(),a.forEach((function(t){t.get("animating")&&t.stopAnimate(),e._setShapeSelected(t)})),this._selectedShapes=a,r&&this._draw())}},t.prototype._clearSelectedShapes=function(){var t=this._selectedShapes;E["each"](t,(function(t){if(t.set("selected",!1),!t.get("inactive")){var e=t.get("_originAttrs");t.attr(e),t.set("_originAttrs",null)}})),this._selectedShapes=null},t.prototype._setShapeSelected=function(t){t.set("selected",!0);var e=this._getShapeStyleByState(t,"selected");this._applyShapeStyle(t,e)},t.prototype._onInactive=function(t){var e=this,i=this.element.get("inactiveOptions");if(!1!==i){var n=t.exp,r=t.draw,a=this._filterShapes(n),o=this._inactiveShapes;Es(o,a)&&(o&&this._clearInactiveShapes(),a.forEach((function(t){t.get("animating")&&t.stopAnimate(),e._setShapeInactive(t)})),this._inactiveShapes=a,r&&this._draw())}},t.prototype._clearInactiveShapes=function(){var t=this._inactiveShapes;E["each"](t,(function(t){if(t.set("inactive",!1),!t.get("selected")){var e=t.get("_originAttrs");t.attr(e),t.set("_originAttrs",null)}})),this._inactiveShapes=null},t.prototype._setShapeInactive=function(t){t.set("inactive",!0);var e=this._getShapeStyleByState(t,"inactive");this._applyShapeStyle(t,e)},t.prototype._applyShapeStyle=function(t,e){var i=t.get("_originAttrs");i&&t.attr(i),i=Rs(e,t.attr()),t.setSilent("_originAttrs",i),t.attr(e)},t.prototype._filterShapes=function(t){var e=this.element,i=e.get("shapeContainer"),n=i.get("children");return E["filter"](n,(function(e){if(e.get("origin")&&e.get("visible")){var i=e.get("origin"),n=E["isArray"](i)?i[0][Ds]:i[Ds];return t(n)}}))},t.prototype._getShapeStyleByState=function(t,e){var i=this.element,n=t.get("origin"),r=n.shape||i.getDefaultValue("shape");E["isArray"](r)&&(r=r[0]);var a=i.get("shapeFactory"),o=E["mix"]({},t.attr(),{origin:n});if("active"===e){var s=i.get("activeOptions"),l=a.getActiveStyle(r,o)||{};return E["mix"](l,s)}if("selected"===e){var u=i.get("selectedOptions"),h=a.getSelectedStyle(r,o)||{};return E["mix"](h,u)}if("inactive"===e){var c=i.get("inactiveOptions"),p=a.getInactiveStyle(r,o)||{};return E["mix"](p,c)}return o},t.prototype._draw=function(){var t=this.element.get("canvas");if(t){var e=t.get("_drawTimer");e&&(clearTimeout(e),t.set("_drawTimer",null)),e=setTimeout((function(){t.draw()}),16),t.set("_drawTimer",e)}},t}(),Ns=zs;function Ys(t){return E["isArray"](t)?t:t.split("*")}var Hs=["color","shape","size"],Gs="_origin",Ws=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({id:null,type:"base",shapeType:null,coord:null,attrs:{},data:[],scales:{},attrOptions:{},view:null,canvas:null,container:null,shapeContainer:null,generatePoints:!1,sortable:!1,animate:!0,visible:!0,shareTooltip:!0,activeOptions:null,inactiveOptions:null,selectedOptions:null,labelOptions:null,tooltipOptions:null,adjustOptions:null,styleOptions:null,statOptions:null,animateOptions:null,theme:null,widthRatio:mt.widthRatio},e))||this,n=i.get("theme")||mt.theme;return i.set("theme",n),i.get("container")&&i._initContainer(),i._initController(),i}return Object(B["__extends"])(e,t),e.prototype.position=function(t){return E["isString"](t)?this._setAttrOptions("position",{fields:Ys(t)}):this._setAttrOptions("position",t),this},e.prototype.color=function(t,e){return this._createAttrOption("color",t,e),this},e.prototype.shape=function(t,e){return this._createAttrOption("shape",t,e),this},e.prototype.size=function(t,e){return this._createAttrOption("size",t,e),this},e.prototype.opacity=function(t,e){return this._createAttrOption("opacity",t,e),this},e.prototype.adjust=function(t){var e=t;return(E["isString"](t)||E["isPlainObject"](t))&&(e=[t]),E["each"](e,(function(t,i){E["isObject"](t)||(e[i]={type:t})})),this.set("adjustOptions",e),this},e.prototype.style=function(t,e){if(E["isString"](t)){var i=Ys(t);this.set("styleOptions",{fields:i,callback:e})}else{i=t.fields;var n=t.callback,r=t.cfg;i||n||r?this.set("styleOptions",t):this.set("styleOptions",{cfg:t})}return this},e.prototype.tooltip=function(t,e){if(E["isString"](t)){var i=Ys(t);this.set("tooltipOptions",{fields:i,callback:e})}else this.set("tooltipOptions",t);return this},e.prototype.label=function(t,e){var i={};if(E["isString"](t)){var n=Ys(t);i.fields=n,i.callback=e,this.set("labelOptions",i)}else this.set("labelOptions",t);return this},e.prototype.animate=function(t){return this.set("animateOptions",t),this},e.prototype.active=function(t){return this.set("activeOptions",t),this},e.prototype.selected=function(t){return this.set("selectedOptions",t),this},e.prototype.inactive=function(t){return this.set("inactiveOptions",t),this},e.prototype.init=function(){var t=this,e=this.get("coord"),i=this.get("shapeContainer");i.setMatrix(e.matrix);var n=this.get("data");this._initAttrs(n);var r=this.get("tooltipOptions");if(r&&r.fields){var a=r.fields;a.forEach((function(e){t.createScale(e,n)}))}var o=this._processData(n);o=this._adjustData(o),this.set("dataArray",o)},e.prototype.bindStates=function(){if(this.get("view")){var t=new Ns(this);t.bind(),this.set("stateController",t)}},e.prototype.unbindStates=function(){if(this.get("view")){var t=this.get("stateController");t&&t.unbind()}},e.prototype.paint=function(){var t=this.get("coord"),e=this.get("theme"),i=this.get("dataArray"),n=[],r=this._getShapeFactory();r.setCoord(t),r.setTheme(e.shape);var a=this.get("shapeContainer");this._beforeMapping(i);for(var o=0,s=i.length;o<s;o+=1){var l=i[o];l=this._mapping(l),n.push(l),this.draw(l,a,r,o)}if(this.get("labelOptions")){var u=this.get("labelController"),h=u.addLabels(E["union"].apply(E,n),a.get("children"));this.set("labels",h)}this.get("sortable")?this.set("dataArray",n):this._sort(n)},e.prototype.clear=function(){this.clearInner(),this.set("scales",{}),this.set("labels",null)},e.prototype.destroy=function(){this.clear();var e=this.get("shapeContainer");e&&e.remove();var i=this.get("container");i&&i.remove(),this.unbindStates(),t.prototype.destroy.call(this)},e.prototype.getDefaultValue=function(t){var e,i=this.getAttr(t);return i&&E["isEmpty"](i.scales)&&(e=i.values[0]),e},e.prototype.changeVisible=function(t,e){this.set("visible",t);var i=this.get("shapeContainer");i&&i.set("visible",t);var n=this.get("labelController");if(n&&n.changeVisible(t),!e&&i){var r=this.get("canvas");r.draw()}},e.prototype.getAttr=function(t){return this.get("attrs")[t]},e.prototype.getAttrsForLegend=function(){var t=E["values"](this.get("attrs"));return E["filter"](t,(function(t){return E["contains"](Hs,t.type)}))},e.prototype.getXScale=function(){return this.getAttr("position").scales[0]},e.prototype.getYScale=function(){return this.getAttr("position").scales[1]},e.prototype.getShapes=function(){var t=this.get("shapeContainer");return t.get("children")},e.prototype.isInCircle=function(){var t=this.get("coord");return!(!t||!t.isPolar)},e.prototype.appendShapeInfo=function(t,e){t&&(t.setSilent("index",e),t.setSilent("coord",this.get("coord")),t.setSilent("scales",this.get("scales")),this.get("animate")&&!E["isNil"](this.get("animateOptions"))&&t.setSilent("animateOptions",this.get("animateOptions")))},e.prototype.hasAdjust=function(t){var e=this.get("adjustOptions"),i=!1;return E["each"](e,(function(e){if(e.type===t)return i=!0,!1})),i},e.prototype.getAttrValues=function(t,e){var i=t.scales,n=E["map"](i,(function(t){var i=t.field;return"identity"===t.type?t.values[0]:(t.isCategory,e[i])}));return t.mapping.apply(t,n)},e.prototype.getSize=function(t){var e=this.get("sizeController");if(e)return e.getSize(t)},e.prototype.getNormalizedSize=function(t){var e=this.get("sizeController");if(e)return e.getNormalizedSize(t)},e.prototype.getGroupScales=function(){var t=this.get("groupScales");if(!t){var e=E["values"](this.get("attrs")),i=E["filter"](e,(function(t){return E["contains"](Hs,t.type)})),n=E["map"](i,(function(t){return E["filter"](t.scales,(function(t){return t.isCategory}))}));t=E["uniq"](E["flatten"](n)),this.set("groupScales",t)}return t},e.prototype.getLegendFields=function(){var t=[],e=this.get("attrOptions");return Hs.forEach((function(i){var n=e[i],r=E["get"](n,"fields",[]);t=t.concat(r)})),E["uniq"](t)},e.prototype.isShareTooltip=function(){var t=this.get("shareTooltip");return this.getYScale()||(t=!1),t},e.prototype.findPoint=function(t,e){var i=this.get("tooltipController");return i.findPoint(t,e)},e.prototype.getTooltipItems=function(t,e){var i=this.get("tooltipController");return i.getTooltipItems(t,e)},e.prototype.getYMinValue=function(){var t,e=this.getYScale(),i=e.min,n=e.max;return t=i>=0?i:n<=0?n:0,t},e.prototype.getShapeId=function(t){var e=this.get("id"),i=this.get("keyFields");if(i&&i.length>0)E["each"](i,(function(i){e=e+"-"+t[i]}));else{var n=this.get("type"),r=this.getXScale(),a=this.getYScale(),o=r.field||"x",s=a.field||"y",l=t[s],u=void 0;u=r.isIdentity?r.values[0]:t[o],e="interval"===n||"schema"===n?e+"-"+u:"line"===n||"area"===n||"path"===n?e+"-"+n:e+"-"+u+"-"+l;var h=this.getGroupScales();E["isEmpty"](h)||E["each"](h,(function(i){var n=i.field;"identity"!==i.type&&(e=e+"-"+t[n])}))}return e},e.prototype.getOriginDataByPoint=function(t){var e,i=this.getXScale(),n=this.getYScale(),r=this.get("coord"),a=r.invert(t),o=i.invert(a.x),s=n.invert(a.y),l=i.field,u=n.field;return e={},e[l]=o,e[u]=s,e},e.prototype.createShapePointsCfg=function(t){var e,i=this.getXScale(),n=this.getYScale(),r=this._normalizeValues(t[i.field],i);return e=n?this._normalizeValues(t[n.field],n):t.y?t.y:.1,{x:r,y:e,y0:n?n.scale(this.getYMinValue()):void 0}},e.prototype.draw=function(t,e,i,n){for(var r=0,a=t.length;r<a;r+=1){var o=t[r];this.drawPoint(o,e,i,n+r)}},e.prototype.drawPoint=function(t,e,i,n){var r=t.shape,a=this.getDrawCfg(t),o=i.drawShape(r,a,e);this.appendShapeInfo(o,n)},e.prototype.getDrawCfg=function(t){var e={origin:t,x:t.x,y:t.y,color:t.color,size:t.size,shape:t.shape,isInCircle:this.isInCircle(),opacity:t.opacity},i=this.get("styleOptions");return i&&(e.style=this._getStyleCfg(i,t[Gs])),this.get("generatePoints")&&(e.points=t.points,e.nextPoints=t.nextPoints),e.id=this.getShapeId(t[Gs]),e},e.prototype.clearInner=function(){var t=this.get("shapeContainer");t&&t.clear();var e=this.get("labelController");e&&e.clear(),this.set("attrs",{}),this.set("groupScales",null);var i=this.get("sizeController");i&&i.clear();var n=this.get("tooltipController");n.clear()},e.prototype._createAttrOption=function(t,e,i){if(E["isObject"](e))this._setAttrOptions(t,e);else{var n={};E["isNumber"](e)?n.values=[e]:n.fields=Ys(e),i&&(E["isFunction"](i)?n.callback=i:n.values=i),this._setAttrOptions(t,n)}},e.prototype._initContainer=function(){var t=this.get("container"),e=this.get("view"),i=e.get("id"),n=this.get("visible"),r=t.addGroup({viewId:i,visible:n});this.set("shapeContainer",r)},e.prototype._initController=function(){var t=new ds(this);this.set("tooltipController",t);var e=new Is(this);this.set("labelController",e)},e.prototype._setAttrOptions=function(t,e){var i=this.get("attrOptions");i[t]=e},e.prototype.createScale=function(t,e){var i=this.get("view"),n=this.get("scales"),r=n[t];return r||(r=i._initScale(t,e),n[t]=r),r},e.prototype._initAttrs=function(t){var e=this,i=this.get("attrs"),n=this.get("attrOptions"),r=this.get("coord"),a=this.get("theme"),o=this.get("type");E["each"](n,(function(n,s){var l=Object(B["__assign"])({},n),u=l.callback,h=l.values,c=l.fields,p=void 0===c?[]:c;"position"===s&&1===p.length&&"theta"===r.type&&p.unshift("1");var f=E["map"](p,(function(i){return e.createScale(i,t)}));if("theta"===r.type&&"position"===s&&f.length>1){var d=f[1];d.change({nice:!1,min:0,max:Math.max.apply(null,d.values)})}if(l.scales=f,-1!==E["indexOf"](["color","size","shape","opacity"],s)&&1===f.length&&f[0].isIdentity)l.values=f[0].values;else if(!u&&!h)if("size"===s)l.values=a.sizes;else if("shape"===s)l.values=a.shapes[o]||[];else if("opacity"===s)l.values=a.opacities;else if("color"===s&&f.length){var g=f[0].values.length;l.values=g<=10?a.colors:a.colors_20}var v=nr(s);i[s]=new v(l)}))},e.prototype._updateStackRange=function(t,e,i){for(var n=this.get("view"),r=n.get("options").scales,a=E["flatten"](i),o=e.min,s=e.max,l=0,u=a.length;l<u;l+=1){var h=a[l],c=Math.min.apply(null,h[t]),p=Math.max.apply(null,h[t]);c<o&&(o=c),p>s&&(s=p)}var f={};o<e.min&&!E["get"](r,[t,"min"])&&(f.min=o),s>e.max&&!E["get"](r,[t,"max"])&&(f.max=s),E["isEmpty"](f)||e.change(f)},e.prototype._groupData=function(t){var e=this.getGroupScales(),i=e.map((function(t){return t.field}));return E["group"](t,i)},e.prototype._saveOrigin=function(t){return E["map"](t,(function(t){var e;return Object(B["__assign"])(Object(B["__assign"])({},t),(e={},e[Gs]=t,e))}))},e.prototype._numeric=function(t){for(var e=this.getAttr("position"),i=e.scales,n=0,r=t.length;n<r;n+=1)for(var a=t[n],o=0;o<Math.min(2,i.length);o+=1){var s=i[o];if(s.isCategory){var l=s.field;a[l]=s.translate(a[l])}}},e.prototype._processData=function(t){var e=this,i=this._groupData(t);return E["map"](i,(function(t){var i=e._saveOrigin(t);return e._numeric(i),i}))},e.prototype._adjustData=function(t){var e=this,i=this.get("adjustOptions"),n=t;if(i){this.get("theme");var r=this.getXScale(),a=this.getYScale(),o=r.field,s=a?a.field:null;i.forEach((function(t){var i=Object(B["__assign"])({xField:o,yField:s},t),l=t.type;if("dodge"===l){var u=[];if(r.isCategory||r.isIdentity)u.push("x");else{if(a)throw new Error("dodge is not support linear attribute, please use category attribute!");u.push("y")}i.adjustNames=u,i.dodgeRatio=e.get("widthRatio").column}else if("stack"===l){var h=e.get("coord");if(!a){i.height=h.getHeight();var c=e.getDefaultValue("size")||3;i.size=c}!h.isTransposed&&E["isNil"](i.reverseOrder)&&(i.reverseOrder=!0)}var p=bn(l),f=new p(i);n=f.process(n),"stack"===l&&a&&e._updateStackRange(s,a,n)}))}return n},e.prototype._getShapeFactory=function(){var t=this.get("shapeFactory");if(!t){var e=this.get("shapeType");t=Lo(e),this.set("shapeFactory",t)}return t},e.prototype._generatePoints=function(t){for(var e=this._getShapeFactory(),i=this.getAttr("shape"),n=0,r=t.length;n<r;n+=1){var a=t[n],o=this.createShapePointsCfg(a),s=i?this.getAttrValues(i,a):null,l=e.getShapePoints(s,o);a.points=l}},e.prototype._normalizeValues=function(t,e){var i=[];if(E["isArray"](t))for(var n=0,r=t.length;n<r;n+=1){var a=t[n];i.push(e.scale(a))}else i=e.scale(t);return i},e.prototype._beforeMapping=function(t){var e=this;if(this.get("sortable")){var i=this.getXScale(),n=i.field;E["each"](t,(function(t){t.sort((function(t,e){return i.translate(t[n])-i.translate(e[n])}))}))}this.get("generatePoints")&&(E["each"](t,(function(t){e._generatePoints(t)})),E["each"](t,(function(e,i){var n=t[i+1];n&&(e[0].nextPoints=n[0].points)})))},e.prototype._mapping=function(t){for(var e=this.get("attrs"),i=[],n=0,r=t.length;n<r;n+=1){var a=t[n],o={_origin:a[Gs],points:a.points,nextPoints:a.nextPoints};for(var s in e)if(e.hasOwnProperty(s)){var l=e[s],u=l.names,h=this.getAttrValues(l,a);if(u.length>1)for(var c=0;c<h.length;c+=1){var p=h[c],f=u[c];o[f]=E["isArray"](p)&&1===p.length?p[0]:p}else 1===h.length||"color"===u[0]?o[u[0]]=h[0]:o[u[0]]=h}this._convertPoint(o),i.push(o)}return i},e.prototype._convertPoint=function(t){var e=t.x,i=t.y;if(!E["isNil"](e)&&!E["isNil"](i)){var n,r,a,o=this.get("coord");if(E["isArray"](i)&&E["isArray"](e)){n=[],r=[];for(var s=0,l=0,u=e.length,h=i.length;s<u&&l<h;s+=1,l+=1)a=o.convertPoint({x:e[s],y:i[l]}),n.push(a.x),r.push(a.y)}else if(E["isArray"](i))r=[],i.forEach((function(t){a=o.convertPoint({x:e,y:t}),n&&n!==a.x?(E["isArray"](n)||(n=[n]),n.push(a.x)):n=a.x,r.push(a.y)}));else if(E["isArray"](e))n=[],e.forEach((function(t){a=o.convertPoint({x:t,y:i}),r&&r!==a.y?(E["isArray"](r)||(r=[r]),r.push(a.y)):r=a.y,n.push(a.x)}));else{var c=o.convertPoint({x:e,y:i});n=c.x,r=c.y}t.x=n,t.y=r}},e.prototype._getStyleCfg=function(t,e){var i=t.fields,n=void 0===i?[]:i,r=t.callback,a=t.cfg;if(a)return a;var o=n.map((function(t){return e[t]}));return r.apply(void 0,o)},e.prototype._sort=function(t){var e=this.getXScale(),i=e.field;E["each"](t,(function(t){t.sort((function(t,n){return e.translate(t[Gs][i])-e.translate(n[Gs][i])}))})),this.set("dataArray",t)},e}(bt),Xs=Ws,Vs=["start","process","end","reset"],qs=function(){function t(t){var e=this._getDefaultCfg();E["assign"](this,e,t),this.canvas=this.view.get("canvas"),this._eventHandlers=[],this._bindEvents()}return t.prototype._getDefaultCfg=function(){return{startEvent:"mousedown",processEvent:"mousemove",endEvent:"mouseup",resetEvent:"dblclick"}},t.prototype._start=function(t){this.preStart(t),this.start(t),this.afterStart(t)},t.prototype.preStart=function(t){},t.prototype.start=function(t){},t.prototype.afterStart=function(t){},t.prototype._process=function(t){this.preProcess(t),this.process(t),this.afterProcess(t)},t.prototype.preProcess=function(t){},t.prototype.process=function(t){},t.prototype.afterProcess=function(t){},t.prototype._end=function(t){this.preEnd(t),this.end(t),this.afterEnd(t)},t.prototype.preEnd=function(t){},t.prototype.end=function(t){},t.prototype.afterEnd=function(t){},t.prototype._reset=function(t){this.preReset(t),this.reset(t),this.afterReset(t)},t.prototype.preReset=function(t){},t.prototype.reset=function(t){},t.prototype.afterReset=function(t){},t.prototype._bindEvents=function(){var t=this;E["each"](Vs,(function(e){var i=t[e+"Event"],n=E["wrapBehavior"](t,"_"+e);t.view.on(i,n),t._eventHandlers.push({type:i,handler:n})}))},t.prototype._unbindEvents=function(){var t=this,e=this._eventHandlers;E["each"](e,(function(e){t.view.off(e.type,e.handler)}))},t.prototype.destroy=function(){this._unbindEvents(),this._reset()},t}(),Us=qs,Zs={},Qs=function(t){return Zs[t]};function $s(t){var e,i,n,r;return E["isNumber"](t)||E["isString"](t)?e=i=n=r=t:E["isArray"](t)&&(e=t[0],n=E["isNil"](t[1])?t[0]:t[1],r=E["isNil"](t[2])?t[0]:t[2],i=E["isNil"](t[3])?n:t[3]),[e,n,r,i]}function Ks(t){if(t.isPolar){var e=t.startAngle,i=t.endAngle;return i-e===2*Math.PI}return!1}var Js="_origin",tl=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({animate:mt.animate,widthRatio:mt.widthRatio,canvas:null,container:null,coord:null,elements:[],guideController:null,id:E["uniqueId"]("view_"),options:{},padding:mt.theme.padding,parent:null,scaleController:null,scales:{},start:{x:0,y:0},end:{x:1,y:1},width:null,height:null,theme:null,title:null,views:[],visible:!0,backgroundStyle:{},interactions:{}},e))||this;return i.init(),i}return Object(B["__extends"])(e,t),e.prototype.axis=function(t,e){var i=this.get("options")||{};return!1===t?(i.axes=!1,E["set"](i,"axes",!1)):E["isObject"](t)?E["set"](i,["axes","fields"],t):E["isString"](t)?E["set"](i,["axes","fields",t],e):E["set"](i,"axes",e),this},e.prototype.title=function(t){},e.prototype.tooltip=function(t,e){var i=this.get("options");return i.tooltip||(i.tooltip={}),!1===t?i.tooltip=!1:E["isObject"](t)?E["mix"](i.tooltip,t):E["mix"](i.tooltip,e),this},e.prototype.legend=function(t,e){var i=this.get("options");return!1===t?E["set"](i,"legends",!1):E["isObject"](t)?E["set"](i,"legends",t):E["isString"](t)?E["set"](i,["legends","fields",t],e):E["set"](i,"legends",e),this},e.prototype.annotation=function(){return this.get("annotationController")},e.prototype.changeData=function(t){return this.emit("beforechangedata"),this.set("data",t),this._initData(),this.emit("afterchangedata"),this.repaint(),this},e.prototype.data=function(t){return this.set("data",t),this._initData(),this},e.prototype.scale=function(t,e){var i=this.get("options"),n=i.scales;return E["isObject"](t)?E["mix"](n,t):n[t]=e,this},e.prototype.filter=function(t,e){var i=this.get("options");return i.filters||(i.filters={}),i.filters[t]=e,this},e.prototype.coordinate=function(t,e){var i=this.get("coordController");return E["isObject"](t)?i.reset(t):i.reset({type:t,cfg:e}),i},e.prototype.createView=function(t){void 0===t&&(t={});var i=this.get("views"),n=Object(B["__assign"])({theme:this.get("theme"),parent:this,container:this.get("panelGroup"),canvas:this.get("canvas"),animate:this.get("animate")},t);n.options=E["mix"]({},this._getSharedOptions(),t.options);var r=new e(n);return r.set("id",E["uniqueId"]("view_")),i.push(r),this.emit("addview",{view:r}),r},e.prototype.removeView=function(t){var e=this.get("views");E["pull"](e,t),t.destroy()},e.prototype.facet=function(t){var e=this.get("facet");e&&e.destroy();var i=E["get"](t,"type"),n=as(i);if(!n)throw new Error("facet '"+i+"' is not exist!");this.set("facet",new n(this,t))},e.prototype.animate=function(t){var e=this.get("options");return e.animate=t,this.set("animate",t),this},e.prototype.render=function(t){return this._clearInner(),this.emit("beforerender"),this._beforeRender(),this.emit("beforedraw"),this._drawGuides(),this._drawElements(),this._renderFacet(),this.get("views").length&&E["each"](this.get("views"),(function(e){e.render(t)})),this._addBackShape(),this._canvasDraw(t),this.emit("afterdraw"),this.emit("afterrender"),this.set("rendered",!0),this},e.prototype.changeVisible=function(t,e){E["each"](this.get("elements"),(function(e){e.changeVisible(t,!0)})),this.get("container").set("visible",t);var i=this.get("annotationController");i&&i.changeVisible(t);var n=this.get("axisController");n&&n.changeVisible(t),e||this.get("canvas").draw()},e.prototype.isShapeInView=function(t){var e=this.get("id"),i=t.get("viewId");if(i)return i===e;var n=this.get("container"),r=t.get("parent");while(r){if(r===n)return t.set("viewId",this.get("id")),!0;r=r.get("parent")}return!1},e.prototype.isPointInView=function(t){var e=this.get("viewRange");return t.x>e.minX&&t.x<e.maxX&&t.y>e.minY&&t.y<e.maxY},e.prototype.getXScale=function(){var t=this.get("elements");return t.length?t[0].getXScale():null},e.prototype.getYScales=function(){var t=this.get("elements"),e=[];return t.forEach((function(t){var i=t.getYScale();i&&-1===E["indexOf"](e,i)&&e.push(i)})),e},e.prototype.getXY=function(t){var e,i,n=this.get("coord"),r=this._getScales("x"),a=this._getScales("y");for(var o in t)r[o]&&(e=r[o].scale(t[o])),a[o]&&(i=a[o].scale(t[o]));return E["isNil"](e)||E["isNil"](i)?null:n.convert({x:e,y:i})},e.prototype.showTooltip=function(t){var e=this.get("tooltipController");return e.showTooltip(t,this),this},e.prototype.hideTooltip=function(){var t=this.get("tooltipController");return t.hideTooltip(),this},e.prototype.getTooltipItems=function(t){var e=[],i=this.getElements();return E["each"](i,(function(i){var n=i.get("dataArray"),r=[];E["each"](n,(function(e){var n=i.findPoint(t,e);if(n){var a=i.getTooltipItems(n);r=r.concat(a)}})),e=e.concat(r)})),e},e.prototype.init=function(){this._initTheme(),this._initLayers(),this.initRegion(),this._initOptions(),this._initControllers(),this._bindEvents(),this.get("data")&&this._initData()},e.prototype.destroy=function(){this._clearEvents(),this.off(),this.clear(),this.clearAllInteractions(),this._destroyViewGroups(),t.prototype.destroy.call(this)},e.prototype.clear=function(){return this.set("isUpdate",!1),this._clearInner(),this._destroyElements(),this},e.prototype.repaint=function(){return this.set("isUpdate",!0),this.render(),this},e.prototype.eachShape=function(t){var e=this,i=this.get("views"),n=this.get("canvas");E["each"](i,(function(e){e.eachShape(t)}));var r=this.get("elements");return E["each"](r,(function(i){var n=i.getShapes();E["each"](n,(function(n){var r=n.get("origin");if(E["isArray"](r)){var a=r.map((function(t){return t[Js]}));t(a,n,i,e)}else{var o=r[Js];t(o,n,i,e)}}))})),n.draw(),this},e.prototype.getElements=function(t){void 0===t&&(t=!1);var e=Object(B["__spreadArrays"])(this.get("elements"));if(t){var i=this.get("views");E["each"](i,(function(i){e=e.concat(i.getElements(t))}))}return e},e.prototype.getFilteredValues=function(t){var e,i=this.get("scales")[t],n=i.values,r=this._getFilters();return e=r&&r[t]?n.filter(r[t]):n.slice(0),e},e.prototype.getFilteredOutValues=function(t){var e,i=this.get("scales")[t],n=i.values,r=this._getFilters();return e=r&&r[t]?n.filter((function(e){return!r[t](e)})):[],e},e.prototype.setActive=function(t,e){void 0===e&&(e=!0);var i=this.get("shapeStateController");return i.setState("active",t,e),this},e.prototype.setSelected=function(t,e){void 0===e&&(e=!0);var i=this.get("shapeStateController");return i.setState("selected",t,e),this},e.prototype.setInactive=function(t,e){void 0===e&&(e=!0);var i=this.get("shapeStateController");return i.setState("inactive",t,e),this},e.prototype.clearAllInteractions=function(){var t=this.get("interactions");return E["each"](t,(function(e,i){e.destroy(),delete t[i]})),this},e.prototype.clearInteraction=function(t){var e=this.get("interactions");return e[t]&&(e[t].destroy(),delete e[t]),this},e.prototype.interaction=function(t,e){void 0===e&&(e={}),e.view=this;var i=Qs(t),n=new i(e);return this._setInteraction(t,n),this},e.prototype._renderFacet=function(){var t=this.get("facet");t&&t.render()},e.prototype._getSharedOptions=function(){var t=this.get("options"),e=t.scales,i=t.coord,n=t.axes;return{scales:e,coord:i,axes:n}},e.prototype._getFilters=function(){var t=this.get("options");return t.filters},e.prototype._initTheme=function(){var t=this.get("theme"),e={},i={};E["isObject"](t)?i=t:E["isString"](t)&&(i=U(t)),E["deepMix"](e,mt.theme,i),this.set("theme",e)},e.prototype._bindEvents=function(){var t=this.get("eventController");t.bindEvents()},e.prototype._clearEvents=function(){var t=this.get("eventController");t.clearEvents()},e.prototype._initLayers=function(){var t=this.get("container"),e=t.addGroup({name:"backgroundGroup",zIndex:0,viewId:this.get("id")}),i=t.addGroup({name:"panelGroup",zIndex:1,viewId:this.get("id")}),n=t.addGroup({name:"frontgroundGroup",zIndex:2});this.set("frontgroundGroup",n),this.set("backgroundGroup",e),this.set("panelGroup",i)},e.prototype.initRegion=function(){var t=this.get("start"),e=t.x,i=t.y,n=this.get("end"),r=n.x,a=n.y,o=this.get("parent");if(o){var s=o.get("panelRange"),l=s.width,u=s.height,h=s.tl;r-e<=1&&(e*=l,i*=u,r*=l,a*=u),e+=h.x,r+=h.x,i+=h.y,a+=h.y}else if(r-e<=1){l=this.get("width"),u=this.get("height");e*=l,i*=u,r*=l,a*=u}var c=r-e,p=a-i;this.set("viewRange",new F["BBox"](e,i,c,p));var f=$s(this.get("padding")),d=f[0],g=f[1],v=f[2],y=f[3],m=new F["BBox"](e+y,i+d,c-y-g,p-d-v);this.set("panelRange",m)},e.prototype._initData=function(){},e.prototype._initOptions=function(){var t=this,e=E["mix"]({},this.get("options"));e.scales||(e.scales={}),e.coord||(e.coord={}),E["isUndefined"](e.animate)||this.set("animate",!!e.animate),e.elements&&e.elements.length&&E["each"](e.elements,(function(e){t._createElement(e)}));var i=this.get("scaleController");i&&(i.defs=e.scales);var n=this.get("coordController");n&&n.reset(e.coord),this.set("options",e)},e.prototype._drawGuides=function(){this.get("keepLegend")||this._renderLegend(),this._renderAnnotations(),this._renderAxes(),this._renderTooltip()},e.prototype._renderAxes=function(){var t=this.get("options"),e=t.axes;if(!1!==e){var i=this.get("axisController");i.container=this.get("backgroundGroup").addGroup({name:"axisGroup"}),i.coord=this.get("coord"),i.options=E["get"](t,"axes",{});var n=this.getXScale(),r=this.getYScales(),a=this.get("id");i.createAxis(n,r,a)}},e.prototype._renderTooltip=function(){var t=this.get("options");if(E["isNil"](t.tooltip)||!1!==t.tooltip){var e=this.get("tooltipController");e.options=t.tooltip||{},e.renderTooltip()}},e.prototype._initControllers=function(){var t=this.get("options"),e=this.get("theme"),i=this.get("canvas"),n=new lr(t.scales);this.set("scaleController",n);var r=new hr(t.coord);this.set("coordController",r);var a=new is({canvas:this.get("canvas"),view:this});this.set("eventController",a);var o=new Zo({view:this});this.set("shapeStateController",o);var s=new Io({view:this});this.set("legendController",s);var l=new lo({theme:this.get("theme"),view:this,frontgroundGroup:this.get("frontgroundGroup").addGroup(),backgroundGroup:this.get("backgroundGroup").addGroup(),options:t.annotations||[]});this.set("annotationController",l);var u=new zo({canvas:i,theme:e});this.set("axisController",u);var h=new qo({view:this,theme:e});this.set("tooltipController",h)},e.prototype._initScale=function(t,e){void 0===e&&(e=[]);var i=this.get("scales"),n=i[t],r=e,a=this._getLegendFields();r.length&&-1===a.indexOf(t)||(r=this.get("data")||[]);var o=this.get("scaleController");return n||(n=o.createScale(t,r),i[t]=n),n},e.prototype._createElement=function(t){var e,i=t.type;if(ls(i)){var n=Object(B["__assign"])(Object(B["__assign"])({},t),{container:this.get("panelGroup").addGroup(),frontgroundGroup:this.get("frontgroundGroup").addGroup(),view:this,canvas:this.get("canvas"),theme:this.get("theme")}),r=ls(i);e=new r(n),E["each"](t,(function(t,i){e[i]&&e[i](t)})),this._addElement(e)}},e.prototype._addElement=function(t){var e=this.get("elements");e.push(t),t.bindStates()},e.prototype._drawElements=function(){this.emit("beforedrawelements"),E["each"](this.get("elements"),(function(t){t.paint()})),this.emit("afterdrawelements")},e.prototype._clearElements=function(){E["each"](this.get("elements"),(function(t){t.clear()}))},e.prototype._destroyElements=function(){var t=this.get("elements");while(t.length>0){var e=t.shift();e.destroy()}},e.prototype._clearInner=function(){this.set("scales",{}),this.emit("beforeclearinner");var t=this.get("options");t.elements=[],this._clearElements();var e=this.get("facet");e&&e.clear();var i=this.get("annotationController");i&&i.reset();var n=this.get("axisController");n&&n.clear();var r=this.get("tooltipController");if(r&&r.clear(),!this.get("keepLegend")){var a=this.get("legendController");a&&a.clear()}var o=this.get("backgroundGroup"),s=this.get("panelGroup");o.get("backShape")&&o.get("backShape").remove(),s.get("backShape")&&s.get("backShape").remove(),this.emit("afterclearinner")},e.prototype._beforeRender=function(){E["each"](this.get("views"),(function(t){t._beforeRender()})),this._initView()},e.prototype._initView=function(){this._execFilters(),this._initCoord(),this.emit("beforeinitelements"),this._initElements(),this._adjustScales()},e.prototype._initCoord=function(){var t=this.get("panelRange"),e=this.get("coordController"),i=e.createCoord(t.bl,t.tr);this.set("coord",i)},e.prototype._getScales=function(t){var e=this.get("elements");return E["reduce"](e,(function(e,i){var n="x"===t?i.getXScale():i.getYScale();return n&&!E["has"](e,n.field)&&(e[n.field]=n),e}),{})},e.prototype._initElements=function(){var t=this.get("filteredData"),e=this.get("coord"),i=this.get("id"),n=this.get("options"),r=this.get("animate"),a=this.get("widthRatio"),o=n.tooltip&&n.tooltip.shared;E["each"](this.get("elements"),(function(n,s){n.set("data",t),n.set("coord",e),n.set("id",i+"-element-"+s),n.set("animate",r),n.set("widthRatio",E["deepMix"]({},a,n.get("widthRatio"))),E["isBoolean"](o)&&n.set("shareTooltip",o),n.init()}))},e.prototype._adjustScales=function(){this._adjustCategoryScalesRange();var t=this.get("elements"),e=this.get("scaleController").defs;t.forEach((function(t){if("interval"===t.get("type")){var i=t.getYScale(),n=i.field,r=i.min,a=i.max,o=i.type;e[n]&&e[n].min||"time"===o||(r>0?i.change({min:0}):a<=0&&i.change({max:0}))}}))},e.prototype._adjustCategoryScalesRange=function(){var t=this.get("coord"),e=this.getXScale(),i=this.getYScales(),n=this.get("widthRatio"),r=[];e&&r.push(e),r=r.concat(i);var a=Ks(t),o=this.get("scaleController"),s=o.defs;r.forEach((function(e){var i=e.field,r=e.values;if((e.isCategory||e.isIdentity)&&r&&(!s[i]||!s[i].range)){var o=r.length,l=void 0;if(1===o)l=[.5,1];else{var u=1,h=0;a?t.isTransposed?(u=n.multiplePie,h=1/o*u,l=[h/2,1-h/2]):l=[0,1-1/o]:(h=1/o*1/2,l=[h,1-h])}e.range=l}}))},e.prototype._execFilters=function(){this.get("data");var t=this.get("data")||[],e=this._getFilters();e&&(t=t.filter((function(t){var i=!0;return E["each"](e,(function(e,n){if(e&&(i=e(t[n],t),!i))return!1})),i}))),this.set("filteredData",t)},e.prototype._addBackShape=function(){var t=this.get("backgroundGroup"),e=this.get("viewRange"),i={x:e.x,y:e.y,width:e.width,height:e.height,fill:"rgba(255,255,255,0)"},n=E["mix"](this.get("theme").backgroundStyle,this.get("backgroundStyle")),r=t.addShape("rect",{attrs:E["mix"](i,n),zIndex:-1});t.set("backShape",r),t.sort();var a=this.get("panelGroup"),o=this.get("panelRange"),s=a.addShape("rect",{attrs:{x:o.x,y:o.y,width:o.width,height:o.height,fill:"rgba(255,255,255,0)"},zIndex:-1});a.set("backShape",s),a.sort()},e.prototype._destroyViewGroups=function(){this.get("frontgroundGroup").remove(),this.get("backgroundGroup").remove(),this.get("panelGroup").remove(),this.set("frontgroundGroup",null),this.set("backgroundGroup",null),this.set("panelGroup",null)},e.prototype._canvasDraw=function(t){var e=this.get("canvas");if(!t){var i=this.get("views");if(this.get("animate")){var n=this.get("isUpdate");E["each"](i,(function(t){Se.execAnimation(t,n)})),Se.execAnimation(this,n),e.draw()}else e.draw()}},e.prototype._renderLegend=function(){var t=this.get("legendController");t.render()},e.prototype._renderAnnotations=function(){var t=this.get("coord"),e=this.get("annotationController");e.xScales=this._getScales("x"),e.yScales=this._getScales("y"),e.render(t)},e.prototype._getLegendFields=function(){var t=[],e=this.get("elements");return e.forEach((function(e){var i=e.getLegendFields();t=t.concat(i)})),E["uniq"](t)},e.prototype._setInteraction=function(t,e){var i=this.get("interactions");i[t]&&i[t].destroy(),i[t]=e},e}(bt),el=tl,il=function(t,e){tl.prototype[t]=function(t){void 0===t&&(t={}),t.view=this,t.theme=this.get("theme"),t.container=this.get("panelGroup").addGroup(),t.frontgroundGroup=this.get("frontgroundGroup").addGroup(),t.canvas=this.get("canvas");var i=new e(t);return this._addElement(i),i}};(function(t){function e(e){return t.call(this,Object(B["__assign"])({containerDOM:null,containerId:null,width:mt.width,height:mt.height,pixelRatio:mt.pixelRatio,renderer:mt.renderer,forceFit:!1},e))||this}Object(B["__extends"])(e,t),e.prototype.init=function(){this.set("id",E["uniqueId"]("chart")),this._initCanvas(),this._initEvents(),t.prototype.init.call(this)},e.prototype.changeSize=function(t,e,i){void 0===i&&(i=!0);var n=this.get("canvas");return n.changeSize(t,e),this.set("width",t),this.set("height",e),this.initRegion(),i&&(this.render(),this.emit("afterchangesize")),this},e.prototype.render=function(e){return t.prototype.render.call(this,e),this.get("canvas").draw(),this},e.prototype.destroy=function(){window.removeEventListener("resize",E["getWrapBehavior"](this,"_initForceFitEvent")),t.prototype.destroy.call(this)},e.prototype._initCanvas=function(){var t=new F["Canvas"]({containerDOM:this.get("containerDOM"),containerId:this.get("containerId"),width:this.get("width"),height:this.get("height"),renderer:this.get("renderer"),pixelRatio:this.get("pixelRatio")});if(this.set("canvas",t),this.set("container",t),this.get("forceFit")){var e=this._getContainerDOM(),i=X["getWidth"](e,this.get("width"));this.set("width",i)}},e.prototype._initEvents=function(){this.get("forceFit")&&window.addEventListener("resize",E["wrapBehavior"](this,"_initForceFitEvent"))},e.prototype._initForceFitEvent=function(){var t=setTimeout(E["wrapBehavior"](this,"forceFit"),200);clearTimeout(this.get("resizeTimer")),this.set("resizeTimer",t)},e.prototype.forceFit=function(){if(!this.destroyed){var t=this._getContainerDOM(),e=this.get("width"),i=X["getWidth"](t,e);if(0!==i&&i!==e){var n=this.get("height");this.changeSize(i,n)}return this}},e.prototype._getContainerDOM=function(){var t=this.get("containerDOM");return E["isElement"](t)||(t=document.getElementById(this.get("containerId"))),t}})(el);function nl(t){var e=[],i=t.x,n=t.y;return n=E["isArray"](n)?n:[n],E["each"](n,(function(t,n){var r={x:E["isArray"](i)?i[n]:i,y:t};e.push(r)})),e}function rl(t,e){var i=e.color,n=e.opacity;i&&(t.fill=i),E["isNumber"](n)&&(t.opacity=t.fillOpacity=n)}function al(t,e){var i=e.color,n=e.opacity;i&&(t.stroke=i),E["isNumber"](n)&&(t.opacity=t.strokeOpacity=n)}function ol(t){var e=t.style;return al(e,t),E["isNumber"](t.size)&&(e.lineWidth=t.size),e}function sl(t){var e=t.style;return rl(e,t),e}function ll(t,e,i){var n=[],r=[],a=[],o=[],s=t.isInCircle;return E["each"](t.points,(function(t){a.push(t[1]),o.push(t[0])})),o=o.reverse(),r.push(a,o),E["each"](r,(function(r,a){var o=[],l=i.parsePoints(r),u=l[0];s&&l.push({x:u.x,y:u.y}),o=e?xo(l,!1,t.constraint):mo(l,!1),a>0&&(o[0][0]="L"),n=n.concat(o)})),n.push(["Z"]),n}function ul(t){return{symbol:function(t,e){return[["M",t-5.5,e-4],["L",t+5.5,e-4],["L",t+5.5,e+4],["L",t-5.5,e+4],["Z"]]},radius:5,fill:t.color}}function hl(t,e,i){var n=t._coord,r=n.convertPoint(e.points[0][1]);return i.addShape("circle",{attrs:E["mix"]({x:r.x,y:r.y,r:2,fill:e.color},e.style)})}var cl=Co("area",{defaultShapeType:"area",getDefaultPoints:function(t){var e=t.x,i=t.y,n=t.y0;return i=E["isArray"](i)?i:[n,i],i.map((function(t){return{x:e,y:t}}))},drawShape:function(t,e,i){var n=this.getShape(t),r=n.name,a=this._theme;if(a&&a.area&&a.area[r]){var o=a.area[r].default;e.style=E["mix"]({},o,e.style)}var s=1===e.points.length&&e.showSinglePoint?hl(this,e,i):n.draw(e,i);return s&&(s.set("origin",e.origin),s.id=e.splitedIndex?e.id+e.splitedIndex:e.id,s.name=this.name),s},getMarkerStyle:function(t,e){var i,n=this.getShape(t);i=n.getMarkerStyle?n.getMarkerStyle(e):ul(e);var r=this._theme,a=n.name;return r&&r.area&&r.area[a]&&(i=E["mix"]({},r.area[a].default,i)),i}});Ao("area","area",{draw:function(t,e){var i=sl(t),n=ll(t,!1,this);return e.addShape("path",{attrs:E["mix"](i,{path:n})})}}),Ao("area","smooth",{draw:function(t,e){var i=sl(t),n=this.getCoord();t.constraint=[[n.start.x,n.end.y],[n.end.x,n.start.y]];var r=ll(t,!0,this);return e.addShape("path",{attrs:E["mix"](i,{path:r})})}}),Ao("area","line",{draw:function(t,e){var i=ol(t),n=ll(t,!1,this);return e.addShape("path",{attrs:E["mix"](i,{path:n})})}}),Ao("area","smoothLine",{draw:function(t,e){var i=ol(t),n=ll(t,!0,this);return e.addShape("path",{attrs:E["mix"](i,{path:n})})}});var pl=cl;function fl(t,e,i){if(!t.length)return[];var n,r=[],a=[];return t.forEach((function(t){n=t._origin?t._origin[i]:t[i],e?E["isNil"](n)||a.push(t):E["isArray"](n)&&E["isNil"](n[0])||E["isNil"](n)?a.length&&(r.push(a),a=[]):a.push(t)})),a.length&&r.push(a),r}var dl=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({type:"area",shapeType:"area",generatePoints:!0,sortable:!0,connectNulls:!1,showSinglePoint:!1},e))||this;return i.set("shapeFactory",pl),i}return Object(B["__extends"])(e,t),e.prototype.draw=function(t,e,i,n){var r=this,a=this.getDrawCfg(t[0]),o=fl(t,this.get("connectNulls"),this.getYScale().field);a.origin=t,E["each"](o,(function(t,o){a.splitedIndex=o;var s=t.map((function(t){return t.points}));a.points=s;var l=i.drawShape(a.shape,a,e);r.appendShapeInfo(l,n+o)}))},e}(Xs),gl=dl;function vl(t,e){var i=t.length,n=t;E["isString"](n[0])&&(n=t.map((function(t){return e.translate(t)})));for(var r=n[1]-n[0],a=2;a<i;a++){var o=n[a]-n[a-1];r>o&&(r=o)}return r}var yl=function(){function t(t){this.element=null,this.element=t}return t.prototype.getSize=function(t){var e=this._getSizeValue(t);if(E["isUndefined"](e)){var i=this._getDefaultSize();return this._toCoordinateSize(i)}return e},t.prototype.getNormalizedSize=function(t){var e=this._getSizeValue(t);return E["isUndefined"](e)?this._getDefaultSize():this._toNormalizedSize(e)},t.prototype.clear=function(){this._defaultSize=null},t.prototype._getSizeValue=function(t){var e,i=this.element,n=i.getAttr("size");return n&&(e=i.getAttrValues(n,t)[0]),e},t.prototype._getDodgeCount=function(t){var e,i=this.element,n=i.get("adjustOptions");if(E["each"](n,(function(t){if("dodge"===t.type)return e=t.dodgeBy,!1})),e){var r=E["flatten"](t),a=E["valuesOfKey"](r,e);return a.length}return t.length},t.prototype._getDefaultSize=function(){var t=this.element.get("widthRatio"),e=this._defaultSize;if(!e){var i=this.element,n=i.get("coord"),r=i.getXScale(),a=r.values,o=i.get("dataArray"),s=a.length;if(r.isLinear&&a.length>1){a.sort();var l=vl(a,r);s=(r.max-r.min)/l,a.length>s&&(s=a.length)}var u=r.range,h=1/s,c=1;if(i.isInCircle()?c=n.isTransposed&&s>1?t.multiplePie:t.rose:(r.isLinear&&(h*=u[1]-u[0]),c=t.column),h*=c,i.hasAdjust("dodge")){var p=this._getDodgeCount(o);h/=p}return this._defaultSize=h,h}return e},t.prototype._getCoordinateWidth=function(){var t=this.element,e=t.get("coord");if(t.isInCircle()&&!e.isTransposed)return(e.endAngle-e.startAngle)*e.getRadius();var i=e.convertPoint({x:0,y:0}),n=e.convertPoint({x:1,y:0}),r=0;return i&&n&&(r=Math.sqrt(Math.pow(n.x-i.x,2)+Math.pow(n.y-i.y,2))),r},t.prototype._toCoordinateSize=function(t){var e=this._getCoordinateWidth();return t*e},t.prototype._toNormalizedSize=function(t){var e=this._getCoordinateWidth();return t/e},t}(),ml=yl;function xl(t){var e=t;E["isArray"](t)||(e=[t]);var i=e[0],n=e[e.length-1],r=e.length>1?e[1]:i,a=e.length>3?e[3]:n,o=e.length>2?e[2]:r;return{min:i,max:n,min1:r,max1:a,median:o}}function bl(t,e){E["each"](t,(function(t){e.push({x:t[0],y:t[1]})}))}function _l(t){var e=t.style;return al(e,t),e}function wl(t,e,i){var n,r,a=[],o=t,s=e;return E["isArray"](s)?(r=xl(s),n=[[o-i/2,r.max],[o+i/2,r.max],[o,r.max],[o,r.max1],[o-i/2,r.min1],[o-i/2,r.max1],[o+i/2,r.max1],[o+i/2,r.min1],[o,r.min1],[o,r.min],[o-i/2,r.min],[o+i/2,r.min],[o-i/2,r.median],[o+i/2,r.median]]):(s=s||.5,r=xl(o),n=[[r.min,s-i/2],[r.min,s+i/2],[r.min,s],[r.min1,s],[r.min1,s-i/2],[r.min1,s+i/2],[r.max1,s+i/2],[r.max1,s-i/2],[r.max1,s],[r.max,s],[r.max,s-i/2],[r.max,s+i/2],[r.median,s-i/2],[r.median,s+i/2]]),bl(n,a),a}function Ml(t){var e=[["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["M",t[2].x,t[2].y],["L",t[3].x,t[3].y],["M",t[4].x,t[4].y],["L",t[5].x,t[5].y],["L",t[6].x,t[6].y],["L",t[7].x,t[7].y],["L",t[4].x,t[4].y],["Z"],["M",t[8].x,t[8].y],["L",t[9].x,t[9].y],["M",t[10].x,t[10].y],["L",t[11].x,t[11].y],["M",t[12].x,t[12].y],["L",t[13].x,t[13].y]];return e}var Sl=Co("box",{defaultShapeType:"box"});Ao("box","box",{getPoints:function(t){return wl(t.x,t.y,t.size)},draw:function(t,e){var i=_l(t),n=Ml(t.points);return n=this.parsePath(n),e.addShape("path",{attrs:E["mix"](i,{path:n})})},getMarkerStyle:function(t){return{symbol:function(t,e,i){var n=[e-6,e-3,e,e+3,e+6],r=wl(t,n,i);return[["M",r[0].x+1,r[0].y],["L",r[1].x-1,r[1].y],["M",r[2].x,r[2].y],["L",r[3].x,r[3].y],["M",r[4].x,r[4].y],["L",r[5].x,r[5].y],["L",r[6].x,r[6].y],["L",r[7].x,r[7].y],["L",r[4].x,r[4].y],["Z"],["M",r[8].x,r[8].y],["L",r[9].x,r[9].y],["M",r[10].x+1,r[10].y],["L",r[11].x-1,r[11].y],["M",r[12].x,r[12].y],["L",r[13].x,r[13].y]]},radius:6,lineWidth:1,stroke:t.color}}});var kl=Sl,Ol=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({type:"box",shapeType:"box",generatePoints:!0},e))||this,n=new ml(i);return i.set("sizeController",n),i.set("shapeFactory",kl),i}return Object(B["__extends"])(e,t),e.prototype.createShapePointsCfg=function(e){var i=t.prototype.createShapePointsCfg.call(this,e);return i.size=this.getNormalizedSize(e),i},e}(Xs),Cl=Ol,Al=1/3;function Ll(t){var e=t.style;return al(e,t),e}function Pl(t){var e={symbol:"circle",radius:4.5};return al(e,t),e}function jl(t,e){var i=[];i.push({x:t.x,y:.5*t.y+1*e.y/2}),i.push({y:.5*t.y+1*e.y/2,x:e.x}),i.push(e);var n=["C"];return E["each"](i,(function(t){n.push(t.x,t.y)})),n}function Tl(t,e){var i=[];i.push({x:e.x,y:e.y}),i.push(t);var n=["Q"];return E["each"](i,(function(t){n.push(t.x,t.y)})),n}function Bl(t,e){var i=jl(t,e),n=[["M",t.x,t.y]];return n.push(i),n}function Il(t,e,i){var n=Tl(e,i),r=[["M",t.x,t.y]];return r.push(n),r}function Dl(t,e){var i=Tl(t[1],e),n=Tl(t[3],e),r=[["M",t[0].x,t[0].y]];return r.push(n),r.push(["L",t[3].x,t[3].y]),r.push(["L",t[2].x,t[2].y]),r.push(i),r.push(["L",t[1].x,t[1].y]),r.push(["L",t[0].x,t[0].y]),r.push(["Z"]),r}function Fl(t,e){var i=[];i.push({y:t.y*(1-Al)+e.y*Al,x:t.x}),i.push({y:t.y*(1-Al)+e.y*Al,x:e.x}),i.push(e);var n=[["M",t.x,t.y]];return E["each"](i,(function(t){n.push(["L",t.x,t.y])})),n}var El=Co("edge",{defaultShapeType:"line",getDefaultPoints:function(t){return nl(t)},getMarkerStyle:function(t,e){var i,n=this.getShape(t);i=n.getMarkerStyle?n.getMarkerStyle(e):Pl(e);var r=this._theme,a=n.name;return r&&r.edge&&r.edge[a]&&(i=E["mix"]({},r.edge[a].default,i)),i}});Ao("edge","line",{draw:function(t,e){var i=t.isInCircle,n=this.parsePoints(t.points),r=Ll(t),a=mo(n,i),o=e.addShape("path",{attrs:E["mix"](r,{path:a})});return o}}),Ao("edge","vhv",{draw:function(t,e){var i=t.points,n=Ll(t),r=Fl(i[0],i[1]);r=this.parsePath(r);var a=e.addShape("path",{attrs:E["mix"](n,{path:r})});return a}}),Ao("edge","smooth",{draw:function(t,e){var i=t.points,n=Ll(t),r=Bl(i[0],i[1]);r=this.parsePath(r);var a=e.addShape("path",{attrs:E["mix"](n,{path:r})});return a}}),Ao("edge","arc",{draw:function(t,e){var i,n,r=t.points,a=r.length>2?"weight":"normal",o=Ll(t);if(t.isInCircle){var s={x:0,y:1};"normal"===a?n=Il(r[0],r[1],s):(o.fill=o.stroke,n=Dl(r,s)),n=this.parsePath(n),i=e.addShape("path",{attrs:E["mix"](o,{path:n})})}else if("normal"===a)r=this.parsePoints(r),i=e.addShape("arc",{attrs:E["mix"](o,{x:(r[1].x+r[0].x)/2,y:r[0].y,r:Math.abs(r[1].x-r[0].x)/2,startAngle:Math.PI,endAngle:2*Math.PI})});else{n=[["M",r[0].x,r[0].y],["L",r[1].x,r[1].y]];var l=jl(r[1],r[3]),u=jl(r[2],r[0]);n.push(l),n.push(["L",r[3].x,r[3].y]),n.push(["L",r[2].x,r[2].y]),n.push(u),n.push(["Z"]),n=this.parsePath(n),o.fill=o.stroke,i=e.addShape("path",{attrs:E["mix"](o,{path:n})})}return i}});var Rl=El,zl=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({type:"edge",generatePoints:!0,shapeType:"edge",shareTooltip:!1},e))||this;return i.set("shapeFactory",Rl),i}return Object(B["__extends"])(e,t),e}(Xs),Nl=zl,Yl="_origin",Hl="shadowCanvas",Gl="valueRange",Wl="imageShape",Xl="mappedData",Vl="grayScaleBlurredCanvas",ql="heatmapSize",Ul=function(t){function e(e){return t.call(this,Object(B["__assign"])({type:"heatmap",shapeType:"point",paletteCache:{}},e))||this}return Object(B["__extends"])(e,t),e.prototype._prepareRange=function(){var t=this.get(Xl),e=this.getAttr("color"),i=e.scales[0].field,n=1/0,r=-1/0;t.forEach((function(t){var e=t[Yl][i];e>r&&(r=e),e<n&&(n=e)})),n===r&&(n=r-1);var a=[n,r];this.set(Gl,a)},e.prototype._prepareSize=function(){var t=this.getDefaultValue("size");E["isNumber"](t)||(t=this.getDefaultSize());var e=this.get("styleOptions"),i=e&&E["isObject"](e.cfg)?e.cfg.blur:null;E["isFinite"](i)&&null!==i||(i=t/2),this.set(ql,{blur:i,radius:t})},e.prototype.getDefaultSize=function(){var t=this.getAttr("position"),e=this.get("coord"),i=Math.min(e.width/(4*t.scales[0].ticks.length),e.height/(4*t.scales[1].ticks.length));return i},e.prototype._colorize=function(t){for(var e=this.getAttr("color"),i=t.data,n=this.get("paletteCache"),r=3;r<i.length;r+=4){var a=i[r];if(a){var o=void 0;n[a]?o=n[a]:(o=ke["default"].rgb2arr(e.gradient(a/256)),n[a]=o),i[r-3]=o[0],i[r-2]=o[1],i[r-1]=o[2],i[r]=a}}},e.prototype._prepareGreyScaleBlurredCircle=function(t,e){var i=this.get(Vl);i||(i=document.createElement("canvas"),this.set(Vl,i));var n=t+e,r=i.getContext("2d");i.width=i.height=2*n,r.clearRect(0,0,i.width,i.height),r.shadowOffsetX=r.shadowOffsetY=2*n,r.shadowBlur=e,r.shadowColor="black",r.beginPath(),r.arc(-n,-n,t,0,2*Math.PI,!0),r.closePath(),r.fill()},e.prototype._drawGrayScaleBlurredCircle=function(t,e,i,n,r){var a=this.get(Vl);r.globalAlpha=n,r.drawImage(a,t-i,e-i)},e.prototype._getShadowCanvasCtx=function(){var t=this.get(Hl);t||(t=document.createElement("canvas"),this.set(Hl,t));var e=this.get("view").get("viewRange");return t.width=e.width,t.height=e.height,t.getContext("2d")},e.prototype._clearShadowCanvasCtx=function(){var t=this._getShadowCanvasCtx();t.clearRect(0,0,t.canvas.width,t.canvas.height)},e.prototype._getImageShape=function(){var t=this.get(Wl);if(t)return t;var e=this.get("container");return t=e.addShape("Image",{}),this.set(Wl,t),t},e.prototype.clear=function(){this._clearShadowCanvasCtx(),t.prototype.clear.call(this)},e.prototype.drawWithRange=function(t){var e=this.get("coord"),i=e.start,n=e.end,r=e.width,a=e.height,o=this.getAttr("color").scales[0].field,s=this.get(ql);this._clearShadowCanvasCtx();var l=this._getShadowCanvasCtx(),u=this.get(Xl);t&&(u=u.filter((function(e){return e[Yl][o]<=t[1]&&e[Yl][o]>=t[0]})));for(var h=this.get("scales")[o],c=0;c<u.length;c++){var p=u[c],f=this.getDrawCfg(p),d=h.scale(p[Yl][o]);this._drawGrayScaleBlurredCircle(f.x-i.x,f.y-n.y,s.radius+s.blur,d,l)}var g=l.getImageData(0,0,r,a);this._clearShadowCanvasCtx(),this._colorize(g),l.putImageData(g,0,0);var v=new Image;v.src=l.canvas.toDataURL("image/png");var y=this._getImageShape();y.attr({x:i.x,y:n.y,width:r,height:a,img:v})},e.prototype.draw=function(t){this.set(Xl,t),this._prepareRange(),this._prepareSize();var e=this.get(ql);this._prepareGreyScaleBlurredCircle(e.radius,e.blur);var i=this.get(Gl);this.drawWithRange(i)},e}(Xs),Zl=Ul,Ql=Math.sqrt(3),$l={line:function(t,e,i){return[["M",t-i,e],["L",t+i,e]]},smooth:function(t,e,i){return[["M",t-i,e],["A",i/2,i/2,0,1,1,t,e],["A",i/2,i/2,0,1,0,t+i,e]]},hv:function(t,e,i){return[["M",t-i-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+i+1,e+2.5]]},vh:function(t,e,i){return[["M",t-i-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+i+1,e-2.5]]},hvh:function(t,e,i){return[["M",t-(i+1),e+2.5],["L",t-i/2,e+2.5],["L",t-i/2,e-2.5],["L",t+i/2,e-2.5],["L",t+i/2,e+2.5],["L",t+i+1,e+2.5]]},vhv:function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]}},Kl={hexagon:function(t,e,i){var n=i/2*Ql;return[["M",t,e-i],["L",t+n,e-i/2],["L",t+n,e+i/2],["L",t,e+i],["L",t-n,e+i/2],["L",t-n,e-i/2],["Z"]]},bowtie:function(t,e,i){var n=i-1.5;return[["M",t-i,e-n],["L",t+i,e+n],["L",t+i,e-n],["L",t-i,e+n],["Z"]]},cross:function(t,e,i){return[["M",t-i,e-i],["L",t+i,e+i],["M",t+i,e-i],["L",t-i,e+i]]},tick:function(t,e,i){return[["M",t-i/2,e-i],["L",t+i/2,e-i],["M",t,e-i],["L",t,e+i],["M",t-i/2,e+i],["L",t+i/2,e+i]]},plus:function(t,e,i){return[["M",t-i,e],["L",t+i,e],["M",t,e-i],["L",t,e+i]]},hyphen:function(t,e,i){return[["M",t-i,e],["L",t+i,e]]},line:function(t,e,i){return[["M",t,e-i],["L",t,e+i]]}},Jl={tick:function(t,e,i){return[["M",t-i/2,e-i],["L",t+i/2,e-i],["M",t,e-i],["L",t,e+i],["M",t-i/2,e+i],["L",t+i/2,e+i]]},line:function(t,e,i){return[["M",t,e-i],["L",t,e+i]]}};function tu(t){var e=t.style;return rl(e,t),e}function eu(t){var e=t.style;return al(e,t),e}function iu(t,e){void 0===e&&(e=!1);var i,n,r,a,o=t.x,s=t.y,l=t.y0,u=t.size;E["isArray"](s)?(i=s[0],n=s[1]):(i=l,n=s),E["isArray"](o)?(r=o[0],a=o[1]):(r=o-u/2,a=o+u/2);var h=[{x:r,y:i},{x:r,y:n}];return e?h.push({x:a,y:(n+i)/2}):h.push({x:a,y:n},{x:a,y:i}),h}function nu(t){var e=[],i=t[0];e.push(["M",i.x,i.y]);for(var n=1,r=t.length;n<r;n++)e.push(["L",t[n].x,t[n].y]);return e.push(["L",i.x,i.y]),e.push(["z"]),e}function ru(t){var e=t.x,i=t.y,n=t.y0;return E["isArray"](i)?i.map((function(t,i){return{x:E["isArray"](e)?e[i]:e,y:t}})):[{x:e,y:i},{x:e,y:n}]}function au(t){var e,i,n=t.x,r=t.y,a=t.y0,o=t.size;E["isArray"](r)?(e=r[0],i=r[1]):(e=a,i=r);var s=n+o/2,l=n-o/2;return[{x:l,y:i},{x:s,y:i},{x:n,y:i},{x:n,y:e},{x:l,y:e},{x:s,y:e}]}function ou(t){return[["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["M",t[2].x,t[2].y],["L",t[3].x,t[3].y],["M",t[4].x,t[4].y],["L",t[5].x,t[5].y]]}function su(t,e){var i=[],n=t.points,r=t.nextPoints;return E["isNil"](r)?e?i.push(["M",n[0].x,n[0].y],["L",n[1].x,n[1].y],["L",n[2].x,n[2].y],["L",n[3].x,n[3].y],["Z"]):i.push(["M",n[0].x,n[0].y],["L",n[1].x,n[1].y],["L",n[2].x,n[2].y],["Z"]):i.push(["M",n[0].x,n[0].y],["L",n[1].x,n[1].y],["L",r[1].x,r[1].y],["L",r[0].x,r[0].y],["Z"]),i}E["each"](Jl,(function(t,e){F["Marker"].symbolsFactory.register(e,t)}));var lu=Co("interval",{defaultShapeType:"rect",getDefaultPoints:function(t){return iu(t)}});Ao("interval","rect",{draw:function(t,e){var i=tu(t),n=nu(t.points);return n=this.parsePath(n),e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{path:n})})},getMarkerStyle:function(t){var e=t.isInCircle,i={symbol:e?"circle":"square",radius:e?4.5:4};return rl(i,t),i}}),Ao("interval","hollowInterval",{draw:function(t,e){var i=eu(t),n=nu(t.points);return n=this.parsePath(n),e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{path:n})})},getMarkerStyle:function(t){var e=t.isInCircle,i={symbol:e?"circle":"square",radius:e?4.5:4};return al(i,t),i}}),Ao("interval","line",{getPoints:function(t){return ru(t)},draw:function(t,e){var i=eu(t);i.lineWidth=t.size||1;var n=nu(t.points);return n=this.parsePath(n),e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{path:n})})},getMarkerStyle:function(t){var e={symbol:"line",radius:5};return al(e,t),e}}),Ao("interval","tick",{getPoints:function(t){return au(t)},draw:function(t,e){var i=eu(t),n=ou(t.points);return n=this.parsePath(n),e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{path:n})})},getMarkerStyle:function(t){var e={symbol:"tick",radius:5};return al(e,t),e}}),Ao("interval","funnel",{getPoints:function(t){return t.size=2*t.size,iu(t)},draw:function(t,e){var i=tu(t),n=su(t,!0);return n=this.parsePath(n),e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{path:n})})},getMarkerStyle:function(t){var e={symbol:"square",radius:4};return rl(e,t),e}}),Ao("interval","pyramid",{getPoints:function(t){return t.size=2*t.size,iu(t,!0)},draw:function(t,e){var i=tu(t),n=su(t,!1);return n=this.parsePath(n),e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{path:n})})},getMarkerStyle:function(t){var e={symbol:"square",radius:4};return rl(e,t),e}}),Ao("interval","top-line",{draw:function(t,e){var i=E["mix"]({},tu(t)),n=t.style,r=t.points,a=nu(r);a=this.parsePath(a),delete i.stroke;var o=e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{zIndex:0,path:a})}),s=[["M",r[1].x,r[1].y],["L",r[2].x,r[2].y]];return e.addShape("path",{zIndex:1,attrs:{stroke:n.stroke||"white",lineWidth:n.lineWidth||1,path:this.parsePath(s)}}),o},getMarkerStyle:function(t){var e=t.isInCircle,i={symbol:e?"circle":"square",radius:e?4.5:4};return rl(i,t),i}});var uu=lu,hu=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({type:"interval",shapeType:"interval",generatePoints:!0},e))||this,n=new ml(i);return i.set("sizeController",n),i.set("shapeFactory",uu),i}return Object(B["__extends"])(e,t),e.prototype.createShapePointsCfg=function(e){var i=t.prototype.createShapePointsCfg.call(this,e);return i.size=this.getNormalizedSize(e),i},e.prototype.isShareTooltip=function(){var t=this.get("shareTooltip"),e=this.get("coord"),i=e.type;return("theta"===i||"polar"===i&&e.isTransposed)&&(t=!1),t},e}(Xs),cu=hu;function pu(t){var e=t;E["isArray"](t)||(e=[t]);var i=e.sort((function(t,e){return t<e?1:-1})),n=i.length;if(n<4)for(var r=i[n-1],a=0;a<4-n;a++)i.push(r);return i}function fu(t,e,i){var n=pu(e),r=[{x:t,y:n[0]},{x:t,y:n[1]},{x:t-i/2,y:n[2]},{x:t-i/2,y:n[1]},{x:t+i/2,y:n[1]},{x:t+i/2,y:n[2]},{x:t,y:n[2]},{x:t,y:n[3]}];return r}function du(t){var e=[["M",t[0].x,t[0].y],["L",t[1].x,t[1].y],["M",t[2].x,t[2].y],["L",t[3].x,t[3].y],["L",t[4].x,t[4].y],["L",t[5].x,t[5].y],["Z"],["M",t[6].x,t[6].y],["L",t[7].x,t[7].y]];return e}function gu(t){var e=t.style;return rl(e,t),al(e,t),e}var vu=Co("kline",{defaultShapeType:"kline"});Ao("kline","kline",{getPoints:function(t){return fu(t.x,t.y,t.size)},draw:function(t,e){var i=gu(t),n=du(t.points);return n=this.parsePath(n),e.addShape("path",{attrs:E["mix"](i,{path:n})})},getMarkerStyle:function(t){return{symbol:function(t,e,i){var n=[e+7.5,e+3,e-3,e-7.5],r=fu(t,n,i);return[["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],["M",r[2].x,r[2].y],["L",r[3].x,r[3].y],["L",r[4].x,r[4].y],["L",r[5].x,r[5].y],["Z"],["M",r[6].x,r[6].y],["L",r[7].x,r[7].y]]},lineWidth:1,stroke:t.color,fill:t.color,radius:6}}});var yu=vu,mu=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({type:"kline",shapeType:"kline",generatePoints:!0},e))||this,n=new ml(i);return i.set("sizeController",n),i.set("shapeFactory",yu),i}return Object(B["__extends"])(e,t),e.prototype.createShapePointsCfg=function(e){var i=t.prototype.createShapePointsCfg.call(this,e);return i.size=this.getNormalizedSize(e),i},e}(Xs),xu=mu,bu=[1,1],_u=[5.5,1];function wu(t){var e=t.style;return al(e,t),t.size&&(e.lineWidth=t.size),e}function Mu(t){var e={lineWidth:2,radius:6};return al(e,t),e}function Su(t,e){var i=t.points[0];return e.addShape("circle",{attrs:{x:i.x,y:i.y,r:2,fill:t.color}})}function ku(t,e,i,n){for(var r=n.isStack,a=[],o=[],s=0,l=t.length;s<l;s++){var u=t[s],h=nl(u);o.push(h[0]),a.push(h[1])}var c=Ou(a,e,i,n),p=Ou(o,e,i,n);return r?c:c.concat(p)}function Ou(t,e,i,n){var r;if(e){var a=n.constraint;i&&t.length&&t.push({x:t[0].x,y:t[0].y}),r=xo(t,!1,a)}else r=mo(t,!1),i&&r.push(["Z"]);return r}function Cu(t,e){var i=t.points,n=t.isInCircle,r=i[0];return E["isArray"](r.y)?ku(i,e,n,t):Ou(i,e,n,t)}function Au(t,e){var i=[];return E["each"](t,(function(n,r){var a=t[r+1];i.push(n),a&&(i=i.concat(e(n,a)))})),i}function Lu(t){var e=t.map((function(t,e){return 0===e?["M",t.x,t.y]:["L",t.x,t.y]}));return e}function Pu(t,e){var i=Au(t.points,e);return Lu(i)}var ju=Co("line",{defaultShapeType:"line",drawShape:function(t,e,i){var n=this.getShape(t),r=n.name,a=this._theme;if(a&&a.line&&a.line[r]){var o=a.line[r].default;e.style=E["mix"]({},o,e.style)}var s=1===e.points.length&&e.showSinglePoint?Su(e,i):n.draw(e,i);return s&&(s.setSilent("origin",e.origin),s.id=e.splitedIndex?e.id+e.splitedIndex:e.id,s.name=this.name),s},getMarkerStyle:function(t,e){var i,n=this.getShape(t);if(n.getMarkerStyle)i=n.getMarkerStyle(e);else{i=Mu(e);var r=$l[t];"dot"===t&&(r=$l.line,i.lineDash=i.lineDash||bu),"dash"===t&&(r=$l.line,i.lineDash=i.lineDash||_u),i.symbol=r}var a=this._theme,o=n.name;return a&&a.line&&a.line[o]&&(i=E["mix"]({},a.line[o].default,i)),i}});Ao("line","line",{draw:function(t,e){var i=wu(t),n=Cu(t,!1);return e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{path:n})})}}),Ao("line","dot",{draw:function(t,e){var i=wu(t),n=Cu(t,!1);return e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({lineDash:bu},i),{path:n})})}}),Ao("line","dash",{draw:function(t,e){var i=wu(t),n=Cu(t,!1);return e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({lineDash:_u},i),{path:n})})}}),Ao("line","smooth",{draw:function(t,e){var i=wu(t),n=this.getCoord();t.constraint=[[n.start.x,n.end.y],[n.end.x,n.start.y]];var r=Cu(t,!0);return e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{path:r})})}}),Ao("line","hv",{draw:function(t,e){var i=wu(t),n=Pu(t,(function(t,e){return[{x:e.x,y:t.y}]}));return e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{path:n})})}}),Ao("line","vh",{draw:function(t,e){var i=wu(t),n=Pu(t,(function(t,e){return[{x:t.x,y:e.y}]}));return e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{path:n})})}}),Ao("line","hvh",{draw:function(t,e){var i=wu(t),n=Pu(t,(function(t,e){var i=(e.x+t.x)/2;return[{x:i,y:t.y},{x:i,y:e.y}]}));return e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{path:n})})}}),Ao("line","vhv",{draw:function(t,e){var i=wu(t),n=Pu(t,(function(t,e){var i=(t.y+e.y)/2;return[{x:t.x,y:i},{x:e.x,y:i}]}));return e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{path:n})})}});var Tu=ju,Bu=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({type:"path",shapeType:"line",connectNulls:!1,showSinglePoint:!1},e))||this;return i.set("shapeFactory",Tu),i}return Object(B["__extends"])(e,t),e.prototype.getDrawCfg=function(e){var i=t.prototype.getDrawCfg.call(this,e),n=this.hasAdjust("stack");return Object(B["__assign"])(Object(B["__assign"])({},i),{isStack:n,showSinglePoint:this.get("showSinglePoint")})},e.prototype.draw=function(t,e,i,n){var r=this,a=fl(t,this.get("connectNulls"),this.getYScale().field),o=this.getDrawCfg(t[0]);o.origin=t,E["each"](a,(function(t,a){if(!E["isEmpty"](t)){o.splitedIndex=a,o.points=t;var s=i.drawShape(o.shape,o,e);r.appendShapeInfo(s,n+a)}}))},e}(Xs),Iu=Bu,Du=function(t){function e(e){return t.call(this,Object(B["__assign"])({type:"line",sortable:!0},e))||this}return Object(B["__extends"])(e,t),e}(Iu),Fu=Du;E["each"](Kl,(function(t,e){F["Marker"].symbolsFactory.register(e,t)}));var Eu=["circle","square","bowtie","diamond","hexagon","triangle","triangleDown"],Ru=["cross","tick","plus","hyphen","line"];function zu(t){var e=t.style;return rl(e,t),E["isNumber"](t.size)&&(e.radius=t.size),e}function Nu(t){var e=t.style;return al(e,t),E["isNumber"](t.size)&&(e.radius=t.size),e}function Yu(t){var e=t.points[0].x,i=t.points[0].y,n=t.size[0],r=t.size[1],a=[["M",e-.5*n,i-.5*r],["L",e+.5*n,i-.5*r],["L",e+.5*n,i+.5*r],["L",e-.5*n,i+.5*r],["z"]];return a}var Hu=Co("point",{defaultShapeType:"hollowCircle",getDefaultPoints:function(t){return nl(t)}});Ao("point","rect",{draw:function(t,e){var i=zu(t),n=Yu(t);n=this.parsePath(n);var r=e.addShape("path",{attrs:E["mix"](i,{path:n})});return r},getMarkerStyle:function(t){var e={symbol:"rect",radius:4.5};return rl(e,t),e}}),E["each"](Eu,(function(t){Ao("point",t,{draw:function(e,i){var n=zu(e);return i.addShape("Marker",{attrs:Object(B["__assign"])(Object(B["__assign"])({},n),{symbol:t,x:e.x,y:e.y})})},getMarkerStyle:function(e){var i={symbol:t,radius:4.5};return rl(i,e),i}}),Ao("point","hollow"+E["upperFirst"](t),{draw:function(e,i){var n=Nu(e);return i.addShape("Marker",{attrs:Object(B["__assign"])(Object(B["__assign"])({},n),{symbol:t,x:e.x,y:e.y})})},getMarkerStyle:function(e){var i={symbol:t,radius:4.5};return al(i,e),i}})})),E["each"](Ru,(function(t){Ao("point",t,{draw:function(e,i){var n=Nu(e);return i.addShape("Marker",{attrs:Object(B["__assign"])(Object(B["__assign"])({},n),{symbol:t,x:e.x,y:e.y})})},getMarkerStyle:function(e){var i={symbol:t,radius:4.5};return al(i,e),i}})})),Ao("point","image",{draw:function(t,e){return t.points=this.parsePoints(t.points),e.addShape("image",{attrs:{x:t.points[0].x-t.size/2,y:t.points[0].y-t.size,width:t.size,height:t.size,img:t.shape[1]}})},getMarkerStyle:function(t){var e={symbol:"circle",radius:4.5};return rl(e,t),e}});var Gu=E["memoize"]((function(t){var e=Ft(t),i=E["flatten"](e).filter((function(t){return E["isNumber"](t)}));return{range:Math.max.apply(null,i)-Math.min.apply(null,i),segments:e}}));Ao("point","path",{draw:function(t,e){var i=E["mix"]({},Nu(t),zu(t)),n=t.shape[1],r=t.size||10,a=Gu(n),o=r/a.range,s=[];i.rotate&&(s.push(["r",i.rotate/180*Math.PI]),delete i.rotate);var l=e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{path:a.segments})});return s.push(["s",o,o],["t",t.x,t.y]),l.transform(s),l},getMarkerStyle:function(t){var e={symbol:"circle",radius:4.5};return rl(e,t),e}});var Wu=Hu,Xu=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({type:"point",shapeType:"point",generatePoints:!0,shareTooltip:!1},e))||this;return i.set("shapeFactory",Wu),i}return Object(B["__extends"])(e,t),e.prototype.drawPoint=function(t,e,i,n){var r=this,a=t.shape,o=this.getDrawCfg(t);if(E["isArray"](t.y)){var s=this.hasAdjust("stack");E["each"](t.y,(function(t,l){if(o.y=t,o.yIndex=l,!s||0!==l){var u=i.drawShape(a,o,e);r.appendShapeInfo(u,n+l)}}))}else if(!E["isNil"](t.y)){var l=i.drawShape(a,o,e);this.appendShapeInfo(l,n)}},e}(Xs),Vu=Xu;function qu(t){var e=t.style;return rl(e,t),e}function Uu(t){var e=t.style;return al(e,t),e}function Zu(t){var e=t[0],i=1,n=[["M",e.x,e.y]];while(i<t.length){var r=t[i];r.x===t[i-1].x&&r.y===t[i-1].y||(n.push(["L",r.x,r.y]),r.x===e.x&&r.y===e.y&&i<t.length-1&&(e=t[i+1],n.push(["Z"]),n.push(["M",e.x,e.y]),i++)),i++}return E["isEqual"](n[n.length-1],e)||n.push(["L",e.x,e.y]),n.push(["Z"]),n}function Qu(t){var e={symbol:"square",radius:4};return rl(e,t),e}var $u=Co("polygon",{defaultShapeType:"polygon",getDefaultPoints:function(t){var e=[];return E["each"](t.x,(function(i,n){var r=t.y[n];e.push({x:i,y:r})})),e}});Ao("polygon","polygon",{draw:function(t,e){if(!E["isEmpty"](t.points)){var i=qu(t),n=Zu(t.points);return n=this.parsePath(n),e.addShape("path",{attrs:E["mix"](i,{path:n})})}},getMarkerStyle:function(t){return Qu(t)}}),Ao("polygon","hollow",{draw:function(t,e){if(!E["isEmpty"](t.points)){var i=Uu(t),n=Zu(t.points);return n=this.parsePath(n),e.addShape("path",{attrs:E["mix"](i,{path:n})})}},getMarkerStyle:function(t){return Qu(t)}});var Ku=$u,Ju=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({type:"polygon",shapeType:"polygon",generatePoints:!0,shareTooltip:!1},e))||this;return i.set("shapeFactory",Ku),i}return Object(B["__extends"])(e,t),e.prototype.createShapePointsCfg=function(e){var i,n=t.prototype.createShapePointsCfg.call(this,e),r=n.x,a=n.y;if(!E["isArray"](r)||!E["isArray"](a)){var o=this.getXScale(),s=this.getYScale(),l=o.values.length,u=s.values.length,h=.5/l,c=.5/u;o.isCategory&&s.isCategory?(r=[r-h,r-h,r+h,r+h],a=[a-c,a+c,a+c,a-c]):E["isArray"](r)?(i=r,r=[i[0],i[0],i[1],i[1]],a=[a-c/2,a+c/2,a+c/2,a-c/2]):E["isArray"](a)&&(i=a,a=[i[0],i[1],i[1],i[0]],r=[r-h/2,r-h/2,r+h/2,r+h/2]),n.x=r,n.y=a}return n},e}(Xs),th=Ju;function eh(t){var e=t.style;return rl(e,t),E["isNumber"](t.size)&&(e.fontSize=t.size),e}var ih=Co("text",{defaultShapeType:"text",getDefaultPoints:function(t){return nl(t)}});Ao("text","text",{draw:function(t,e){var i=eh(t),n=e.addShape("text",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{x:t.x,y:t.y,text:t.text})});return n},getMarkerStyle:function(t){var e={symbol:"circle",radius:4.5};return rl(e,t),e}});var nh=ih,rh=function(t){function e(e){var i=t.call(this,Object(B["__assign"])({type:"text",shapeType:"text"},e))||this;return i.set("shapeFactory",nh),i}return Object(B["__extends"])(e,t),e.prototype.content=function(t,e){if(E["isObject"](t))this.set("contentOptions",t);else{var i=Ys(t);this.set("contentOptions",{fields:i,callback:e})}return this},e.prototype._getContent=function(t,e){var i=t.fields||[],n=t.callback;if(n){var r=i.map((function(t){return e[t]}));return n.apply(void 0,r)}return e[i[0]]},e.prototype.getDrawCfg=function(e){var i=t.prototype.getDrawCfg.call(this,e),n=this.get("contentOptions");return n&&(i.text=this._getContent(n,e[Gs])),i},e}(Vu),ah=rh,oh=function(t){function e(e,i){return t.call(this,e,Object(B["__assign"])({showTitle:!0,autoSetAxis:!0,padding:16},i))||this}return Object(B["__extends"])(e,t),e.prototype.generateFacets=function(t){var e=this,i=this.cfg.fields,n=i[0],r=i[1],a=[],o=0,s=0,l=[],u=[];return n&&(l=this.getFieldValues(t,n),o=l.length),r&&(u=this.getFieldValues(t,r),s=u.length),l.forEach((function(i,h){u.forEach((function(c,p){var f=[{field:n,value:i,values:l},{field:r,value:c,values:u}],d=E["filter"](t,(function(t){return E["every"](f,(function(e){var i=e.field,n=e.value;return t[i]===n}))})),g={type:e.cfg.type,columnValue:i,rowValue:c,columnField:n,rowField:r,columnIndex:h,rowIndex:p,columnValuesLength:o,rowValuesLength:s,data:d,region:e.getRegion(s,o,h,p)};a.push(g)}))})),a},e.prototype.renderAxis=function(){},e.prototype.renderTitle=function(){},e}(ns);i("b13e");function sh(t){return!!t&&!(!0!==t.visible||"string"!==typeof t.text||!t.text.trim())}function lh(t,e){var i=Object(B["__spreadArrays"])(t);return e.forEach((function(t,e){i.splice(t+e,0,"\n")})),i.join("")}us("Line",Fu),us("Path",Iu),us("Point",Vu),us("Interval",cu),us("Edge",Nl),us("Polygon",th),us("Area",gl),us("Box",Cl),us("Kline",xu),us("Text",ah),us("Heatmap",Zl),os("rect",oh);var uh=function(){function t(t){this.position="top",this.destroyed=!1,E["assign"](this,t),this._init()}return t.prototype.getBBox=function(){var t=this;if(this.shape){var e=this.shape.getBBox();if(0===this.index)return e;var i=this.plot.theme.description.padding;return E["isArray"](i)&&E["each"](i,(function(e,n){"function"===typeof i[n]&&(i[n]=i[n](t.plot.options.legend.position))})),new F["BBox"](e.maxX,e.minY,e.width,e.height+i[2])}return null},t.prototype.clear=function(){this.shape&&this.shape.attr("text","")},t.prototype.destroy=function(){this.shape&&this.shape.remove(),this.destroyed=!0},t.prototype._init=function(){var t=this._textWrapper();this.shape=this.container.addShape("text",{attrs:E["mix"]({x:this.leftMargin,y:this.topMargin,text:t},this.style)}),this.shape.name=this.name},t.prototype._textWrapper=function(){var t=this.wrapperWidth,e=this.style,i=this.text,n=new F["Text"]({attrs:Object(B["__assign"])({text:"",x:0,y:0},e)}),r=i.split("\n"),a=r.map((function(e){for(var i="",r=e.split(""),a=[],o=0;o<r.length;o++){var s=r[o];n.attr("text",i+=s);var l=n.getBBox().width-1;if(l>t){if(0===o)break;a.push(o),i=""}}return lh(r,a)}));return n.remove(),a.join("\n")},t}(),hh=uh,ch=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e,i,n){return t.reduce((function(t,e){return e(t,i,n)}),e)}},ph=function(){return function(t,e,i){return t}},fh=function(t){return function(e,i,n){var r=Number(e);return isNaN(r)||Object(E["isNil"])(t)?e:r.toFixed(t)}},dh=function(t){return function(e,i,n){return Object(E["isNil"])(t)?e:e+" "+t}};function gh(t,e,i){t[i]&&(e[i]=t[i])}var vh=function(){function t(t){this.config=!1,this.plot=t.plot,this.dim=t.dim,this.init()}return t.prototype.init=function(){this.config=!1;var t=this.plot.getPlotTheme();this.themeConfig=t&&t.axis&&t.axis[this.dim],this._needDraw()&&this._styleParser()},t.prototype._styleParser=function(){this.config=Object(B["__assign"])({},this.localProps),this._isVisible("line")?this._lineParser():this.config.line=null,this._isVisible("grid")?this._gridParser():this.config.grid=null,this._isVisible("tickLine")?this._tickLineParser():this.config.tickLine=null,this._isVisible("label")?this._labelParser():this.config.label=null,this._isVisible("title")?this._titleParser():this.config.title=null,gh(this.localProps,this.config,"autoHideLabel"),gh(this.localProps,this.config,"autoRotateLabel"),gh(this.localProps,this.config,"autoRotateTitle")},t.prototype._needDraw=function(){var t=this.plot.options,e=t[this.dim+"Axis"]?t[this.dim+"Axis"]:{},i=E["deepMix"]({},this.themeConfig,e);return this.localProps=i,!!i.visible},t.prototype._lineParser=function(){this.config.line=this.localProps.line,this.localProps.line.style&&(this.config.line=this.localProps.line.style),this.applyThemeConfig("line")},t.prototype._gridParser=function(){var t=this,e=this.localProps.grid,i=e.style;E["isFunction"](i)?this.config.grid=function(e,n,r){var a=i(e,n,r);return E["deepMix"]({},E["get"](t.themeConfig,"grid.style"),a)}:i&&(this.config.grid=i,this.applyThemeConfig("grid"))},t.prototype._tickLineParser=function(){this.config.tickLine=this.localProps.tickLine,this.localProps.tickLine.style&&(this.config.tickLine=this.localProps.tickLine.style),this.applyThemeConfig("tickLine")},t.prototype._labelParser=function(){var t=this.localProps.label,e=t.style,i=Object(B["__rest"])(t,["style"]),n=Object(B["__assign"])({},i);e&&(n.textStyle=this.localProps.label.style),n.textStyle=E["deepMix"]({},E["get"](this.themeConfig,"label.style"),n.textStyle);var r=this.parseFormatter(n);n.formatter=r,this.config.label=n},t.prototype._titleParser=function(){var t=Object(B["__assign"])({},this.localProps.title),e=this.localProps.title,i=e.visible,n=e.style,r=e.text;i?(this.config.showTitle=!0,n&&(t.textStyle=n),t.textStyle=E["deepMix"]({},E["get"](this.config,"title.style"),t.textStyle),r&&(t.text=r)):this.config.showTitle=!1,this.config.title=t},t.prototype._isVisible=function(t){return!(!this.localProps[t]||!this.localProps[t].visible)},t.prototype.applyThemeConfig=function(t){this.config[t]=E["deepMix"]({},E["get"](this.themeConfig,t+".style"),this.config[t])},t.prototype.parseFormatter=function(t){var e=ch(ph(),fh(t.precision),dh(t.suffix));return t.formatter&&(e=ch(e,t.formatter)),e},t}(),yh=vh;function mh(t,e){return t.x*e.y+t.y*e.x}function xh(t,e,i){void 0===i&&(i=1);var n=[t.x,t.y,i];return Ot.transformMat3(n,n,e),{x:n[0],y:n[1]}}function bh(t,e){for(var i=!1,n=0,r=e.length-1;n<e.length;r=n++){var a=e[n].x,o=e[n].y,s=e[r].x,l=e[r].y,u=o>t.y!==l>t.y&&t.x<=(s-a)*(t.y-o)/(l-o)+a;u&&(i=!i)}return i}function _h(t){return t*t}function wh(t,e){return Math.sqrt(_h(t.x-e.x)+_h(t.y-e.y))}function Mh(t,e){return Math.sqrt(_h(t.x-e.x)+_h(t.y-e.y))}function Sh(t,e,i){var n=wh(e,i);if(0===n)return wh(t,e);var r=((t.x-e.x)*(i.x-e.x)+(t.y-e.y)*(i.y-e.y))/n;r=Math.max(0,Math.min(1,r));var a=wh(t,{x:e.x+r*(i.x-e.x),y:e.y+r*(i.y-e.y)});return Math.sqrt(a)}function kh(t,e){var i=1/0;E["each"](e,(function(e){var n=Math.sqrt(wh(e,t));i>n&&(i=n)}));for(var n=0,r=e.length-1;n<e.length;r=n++){var a=e[n].x,o=e[n].y,s=e[r].x,l=e[r].y,u=Sh(t,{x:a,y:o},{x:s,y:l});i>u&&(i=u)}return i}function Oh(t,e){for(var i=0,n=t;i<n.length;i++){var r=n[i],a=bh(r,e);if(a)return!0}return!1}function Ch(t,e){if(Oh(t,e))return 0;var i=1/0,n=1/0;return E["each"](t,(function(t){var n=kh(t,e);i>n&&(i=n)})),E["each"](e,(function(e){var i=kh(e,t);n>i&&(n=i)})),Math.min(i,n)}function Ah(t){var e=t.getBBox(),i=e.minX,n=e.minY,r=e.tr.x-e.tl.x,a=e.bl.y-e.tl.y,o=t.attr("matrix"),s=[o[0],o[1],0,o[3],o[4],0,0,0,1],l=xh({x:0,y:0},s);l.x+=i,l.y+=n;var u=xh({x:r,y:0},s);u.x+=i,u.y+=n;var h=xh({x:0,y:a},s);h.x+=i,h.y+=n;var c=xh({x:r,y:a},s);c.x+=i,c.y+=n;var p=[l,u,h,c];p.sort((function(t,e){return t.y-e.y}));var f=p[0].y,d=p[p.length-1].y,g=[p[0],p[1]],v=[p[2],p[3]],y=g[0].x<g[1].x?g[0]:g[1],m=g[0].x<g[1].x?g[1]:g[0],x=v[0].x<v[1].x?v[0]:v[1],b=v[0].x<v[1].x?v[1]:v[0];p.sort((function(t,e){return t.x-e.x}));var _=p[0].x,w=p[p.length-1].x,M={width:w-_,height:d-f,left:_,right:w,top:f,bottom:d,topLeft:y,topRight:m,bottomLeft:x,bottomRight:b,centerX:_+(w-_)/2,centerY:f+(d-f)/2};return M}var Lh=2;function Ph(t){return t.length<5?t:jh(t,Lh)}function jh(t,e){for(var i,n=-1/0,r=0,a=t.length-1,o=1;o<a;o++){var s=t[o],l={start:t[0],end:t[a]},u=Sh(s,l.start,l.end);u>n&&(n=u,r=o)}if(n>e){var h=jh(t.slice(0,r+1),e),c=jh(t.slice(r,t.length),e);i=h.concat(c)}else i=[t[0],t[t.length-1]];return i}function Th(t){var e=E["clone"](t);e.sort((function(t,e){return t-e}));var i=Math.floor(e.length/2);return e.length%2?e[i]:(e[i-1]+e[i])/2}function Bh(t){var e=0;return E["each"](t,(function(t){e+=t})),e/t.length}function Ih(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}var Dh,Fh,Eh=function(){function t(t){E["assign"](this,t),this._init()}return t.prototype._init=function(){var t=this.plot.options,e=this.getDefaultStyle(),i={type:"line",top:!0,start:this.cfg.start,end:this.cfg.end};if(i.line=E["deepMix"]({},e.line,{style:this.cfg.lineStyle}),i.text=E["deepMix"]({},e.text,this.cfg.text),this.cfg.type){var n=this._getState(this.cfg.type),r=this._getState("min"),a=this._getState("max"),o=Pi("linear"),s=new o(E["mix"]({},{min:"column"===this.plot.type?0:r,max:a,nice:!0,values:this.values},this.plot.config.scales[t.yField])),l=100*(1-s.scale(n))+"%",u=["0%",l],h=["100%",l];this.config=E["mix"]({start:u,end:h},i)}else this.config=i},t.prototype._getState=function(t){return this.values=this._extractValues(),"median"===t?Th(this.values):"mean"===t?Bh(this.values):"max"===t?Math.max.apply(Math,this.values):"min"===t?Math.min.apply(Math,this.values):void 0},t.prototype._extractValues=function(){var t=this.plot.options,e=t.yField,i=[];return E["each"](t.data,(function(t){i.push(t[e])})),i},t.prototype.getDefaultStyle=function(){return this.getDefaultTextAlign(),{line:{style:{lineWidth:2,stroke:"#333333",opacity:.7,lineDash:[0,0]}},text:{offsetY:-5,style:{fontSize:14,stroke:"white",lineWidth:2,textAlign:this.getDefaultTextAlign()}}}},t.prototype.getDefaultTextAlign=function(){var t=this.cfg.text;if(t){if(!t.position||"start"===t.position)return"left";if("center"===t.position)return"center";if("end"===t.position)return"right"}},t}(),Rh=Eh,zh=function(){function t(t){this.config={};var e=t.plot,i=Object(B["__rest"])(t,["plot"]);this.plot=e,this.originConfig=i,this.init(t)}return t.prototype.getConfig=function(){return this.config},t.prototype.init=function(t){var e=this;E["assign"](this.config,t),this.config.callback=function(t){for(var i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];return e.parseCallBack.apply(e,Object(B["__spreadArrays"])([t],i))}},t.prototype.parseCallBack=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n=this.originConfig,r=this.plot.getPlotTheme(),a=Object(B["__assign"])({},n);return this.parseOffset(n,a),n.position&&(E["isFunction"](n.position)?a.position=n.position(t):a.position=n.position),this.parseFormatter.apply(this,Object(B["__spreadArrays"])([a,t],e)),n.style&&(E["isFunction"](n.style)?a.textStyle=n.style(t):a.textStyle=n.style),a.textStyle=E["deepMix"]({},E["get"](r,"label.style"),a.textStyle),n.autoRotate&&(a.autoRotate=n.autoRotate),a},t.prototype.parseOffset=function(t,e){var i=["offset","offsetX","offsetY"],n=0;E["each"](i,(function(i){E["has"](t,i)&&(e[i]=t[i],n++)})),0===n&&"middle"===E["get"](t,"position")&&(e.offset=0)},t.prototype.parseFormatter=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var n=this.originConfig;t.formatter=ch(ph(),fh(n.precision),dh(n.suffix)),n.formatter&&(t.formatter=ch(t.formatter,n.formatter))},t}(),Nh=zh;function Yh(t,e){Dh||Gh(t),E["each"](Dh,(function(t,i){var n=Xh(t,e),r=n.labelData,a=n.con;if(Uh(r,a)){var o=Fh[i],s=qh(o);t.shape.attr(s)}}))}function Hh(t,e){Dh||Gh(t),E["each"](Dh,(function(t,i){var n=Xh(t,e),r=n.labelData,a=n.con;if(Uh(r,a)){var o=Fh[i],s=Vh(o);t.shape.attr(s)}}))}function Gh(t){Dh=[],Fh=[];var e=t.view.get("axisController").axes;E["each"](e,(function(e){var i=[],n=Wh(t,e),r=e.get("labelRenderer").get("group").get("children");if(E["each"](r,(function(t){"text"===t.type&&(i.push({shape:t}),Fh.push(t.attr()))})),n){var a=n.ticks,o=n.field;E["each"](i,(function(t,e){t.value=a[e],t.scaleField=o,t.type=n.type}))}Dh.push.apply(Dh,i)}))}function Wh(t,e){var i=t.options,n="y",r=e.get("position");"bottom"!==r&&"top"!==r||(n="x");var a=i[n+"Field"];return t.view.get("scales")[a]}function Xh(t,e){var i,n=(i={},i[t.scaleField]=t.value,i),r=E["clone"](e);return"time"===t.type&&E["isObject"](e)&&!E["isFunction"](r.exp)&&(r.exp=new Date(r.exp).getTime()),{labelData:n,con:r}}function Vh(t){var e=t.opacity||1;return{opacity:.2*e}}function qh(t){return{opacity:1,fontWeight:600,fill:"red"}}function Uh(t,e){if(!E["isFunction"](e)){var i=e.name,n=e.exp;return!!t[i]&&(E["isFunction"](n)?n(t[i]):t[i]===n)}return e(t)}var Zh={active:Yh,selected:Yh,disable:Hh},Qh=function(t){function e(e){var i=t.call(this)||this;return i._states={},i._stateStack={},i}return Object(B["__extends"])(e,t),e.prototype.setState=function(t,e){this._stateStack[t]=e,this._onUpdate()},e.prototype.getState=function(t){return this._states[t]},e.prototype.getAllStates=function(){return this._states},e.prototype.clear=function(){this._states={},this._stateStack={},this._changeTimer&&(clearTimeout(this._changeTimer),this._changeTimer=null)},e.prototype._onUpdate=function(){var t=this,e=this._stateStack;this._changeTimer&&(clearTimeout(this._changeTimer),this._changeTimer=null),this._changeTimer=setTimeout((function(){E["each"](e,(function(i,n){var r=e[n];t._states[n]&&t._states[n]===i||(t._states[n]=i,t._triggerEvent(n,r))})),t._stateStack={}}),16)},e.prototype._triggerEvent=function(t,e){this.emit(t+":change",{name:t,exp:e})},e}(D.a),$h=Qh;function Kh(t,e){if(!E["isFunction"](e)){var i=e.name,n=e.exp;return E["isFunction"](n)?n(t[i]):t[i]===n}return e(t)}var Jh,tc,ec=function(){function t(t){this.shapeContainers=[],E["assign"](this,t)}return t.prototype.createStateManager=function(t){this.stateManager=new $h(t)},t.prototype.bindStateManager=function(t,e){this.stateManager=t,e.setState&&this._updateStateProcess(e.setState),e.onStateChange&&this._stateChangeProcess(e.onStateChange)},t.prototype.defaultStates=function(t){var e=this;E["each"](t,(function(t,i){var n=t.condition,r=(t.style,t.related);e.setState({type:i,condition:n,related:r})}))},t.prototype.setState=function(t){var e=this,i=t.type,n=t.condition,r=t.related;this.shapes||(this.shapes=this._getShapes(),this.originAttrs=this._getOriginAttrs()),E["each"](this.shapes,(function(r,a){var o=r.get("origin"),s=E["isArray"](o)?o[0]._origin:o._origin;if(Kh(s,n)){var l=t.style?t.style:e._getDefaultStateStyle(i,r),u=e.originAttrs[a],h=void 0;h=E["isFunction"](l)?l(u):E["mix"]({},u,l),r.attr(h),e.setZIndex(i,r)}})),r&&this._parserRelated(i,r,n),this.plot.canvas.draw()},t.prototype._updateStateProcess=function(t){var e=this;E["each"](t,(function(t){var i,n=t.state;i=E["isFunction"](n)?function(t){var i=n(t);e.stateManager.setState(i.name,i.exp)}:function(){e.stateManager.setState(n.name,n.exp)},t.event?Y(e.plot,e._eventParser(t.event),i):i()}))},t.prototype._stateChangeProcess=function(t){var e=this;E["each"](t,(function(t){e.stateManager.on(t.name+":change",(function(i){t.callback(i,e.plot)}))}))},t.prototype._getShapes=function(){var t=this,e=[],i=this.plot.view.get("elements");return E["each"](i,(function(i){var n=i.get("shapeContainer");t.shapeContainers.push(n),i.destroyed||e.push.apply(e,i.getShapes())})),e},t.prototype._getOriginAttrs=function(){var t=[];return E["each"](this.shapes,(function(e){t.push(E["clone"](e.attr()))})),t},t.prototype._eventParser=function(t){var e=t.split(":"),i=this.plot.geometryParser("g2",e[0]),n=e[1];return i+":"+n},t.prototype._getDefaultStateStyle=function(t,e){var i=this.plot.theme,n=this.plot.geometryParser("plot",e.name),r=n+"Style";if(i[r]){var a=i[r][t];return E["isFunction"](a)&&(a=a(e.attr())),a}return{}},t.prototype._parserRelated=function(t,e,i){var n=this;E["each"](e,(function(e){if(n.plot[e]){var r=mc(e,t);r(n.plot,i)}}))},t.prototype.setZIndex=function(t,e){if("active"===t||"selected"===t){var i=e.get("parent").get("children");i[i.length-1].setZIndex(0),e.setZIndex(1)}},t.prototype.resetZIndex=function(){E["each"](this.shapeContainers,(function(t){var e=t.get("children");e.sort((function(t,e){return t._INDEX-e._INDEX}))}))},t}(),ic=ec;function nc(t,e){Jh||ac(t),E["each"](Jh,(function(t,i){var n=t.get("origin");if(Kh(n,e)){var r=tc[i],a=E["mix"]({},r,{opacity:1});t.attr(a)}}))}function rc(t,e){Jh||ac(t),E["each"](Jh,(function(t,i){var n=t.get("origin");if(Kh(n,e)){var r=tc[i],a=oc(r);t.attr(a)}}))}function ac(t){Jh=[],tc=[];var e=t.view.get("elements");E["each"](e,(function(t){var e=t.get("labels");e&&E["each"](e,(function(t){Jh.push(t),tc.push(t.attr())}))}))}function oc(t){var e=t.opacity||1;return{opacity:.2*e}}var sc={active:nc,selected:nc,disable:rc},lc=["xField","yField","angleField"];function uc(t,e){var i=t.options;if(pc(i,e)){var n=i.data;E["each"](n,(function(i){if(Kh(i,e)){var n=t.view.getXY(i);t.view.on("tooltip:create",(function(t){cc(e,t,!1)})),t.view.showTooltip(n)}}))}}function hc(t,e){t.view.on("tooltip:change",(function(t){cc(e,t,!0)}))}function cc(t,e,i){var n=!i,r=E["clone"](e.items);e.items.splice(0),E["each"](r,(function(i){var r=i.point._origin;Kh(r,t)===n&&e.items.push(i)}))}function pc(t,e){var i=fc(t);return!E["isFunction"](e)&&i.indexOf(e.name)}function fc(t){var e=[];return E["each"](lc,(function(i){E["has"](t,i)&&e.push(i)})),e}var dc={active:uc,selected:uc,disable:hc},gc={axis:yh,label:Nh,guideLine:Rh},vc={tooltip:dc,label:sc,axis:Zh};function yc(t,e){var i=gc[t];return new i(e).config}function mc(t,e){return vc[t][e]}var xc=function(t){function e(e,i,n,r){var a=t.call(this,e)||this;return a.viewLayer=i,a.interactionRange=n,a.interactionConfig=r,a.render(),a}return Object(B["__extends"])(e,t),e.registerInteraction=function(t,i){e.GLOBAL_INTERACTION_MAP[t]=i},e.registerPlotInteraction=function(t,i,n){e.PLOT_INTERACTION_MAP[t]||(e.PLOT_INTERACTION_MAP[t]={}),e.PLOT_INTERACTION_MAP[t][i]=n},e.getInteraction=function(t,i){return i&&e.PLOT_INTERACTION_MAP[i]&&e[i][t]?e.PLOT_INTERACTION_MAP[i][t]:e.GLOBAL_INTERACTION_MAP[t]},e.getInteractionRange=function(t,e){},e.prototype.destroy=function(){this.clear(),t.prototype.destroy.call(this)},e.prototype.getViewLayer=function(){return this.viewLayer},e.prototype.getRange=function(){return this.interactionRange},e.prototype.getInteractionConfig=function(){return this.interactionConfig},e.prototype.render=function(){},e.prototype.clear=function(){},e.GLOBAL_INTERACTION_MAP={},e.PLOT_INTERACTION_MAP={},e}(Us),bc=xc,_c={trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},wc={default:_c,hover:{thumbColor:"rgba(0,0,0,0.2)"}},Mc=function(t){function e(e){var i=t.call(this)||this;i._isMobile=!1,i._onStartEvent=function(t){return function(e){i._isMobile=t,e.event.preventDefault();var n=i._isMobile?E["get"](e.event,"touches.0",e):e,r=n.clientX,a=n.clientY;i._startPos=i.isHorizontal?r:a,i._bindLaterEvent()}},i._onTrackClick=function(t){var e=i.get("canvas").get("containerDOM"),n=e.getBoundingClientRect(),r=t.clientX,a=t.clientY,o=i.isHorizontal?r-n.left-i.position.x-i.thumbLen/2:a-n.top-i.position.y-i.thumbLen/2,s=i._validateRange(o);i.updateThumbOffset(s)},i._onMouseMove=function(t){t.preventDefault();var e=i._isMobile?E["get"](t,"touches.0",t):t,n=e.clientX,r=e.clientY,a=i.isHorizontal?n:r,o=a-i._startPos;i._startPos=a,i.updateThumbOffset(i.thumbOffset+o)},i._onMouseUp=function(t){t.preventDefault(),i._clearEvents()},i._onTrackMouseOver=function(t){var e=i.theme.hover.thumbColor;i.thumbShape.attr("stroke",e),i.get("canvas").draw()},i._onTrackMouseOut=function(t){var e=i.theme.default.thumbColor;i.thumbShape.attr("stroke",e),i.get("canvas").draw()};var n=e.isHorizontal,r=void 0!==n&&n,a=e.trackLen,o=e.thumbLen,s=e.position,l=e.minThumbLen,u=void 0===l?20:l,h=e.thumbOffset,c=void 0===h?0:h,p=e.theme;return i.isHorizontal=r,i.thumbOffset=c,i.trackLen=a,i.thumbLen=o,i.position=s,i.minThumbLen=u,i.theme=E["deepMix"]({},wc,p),i._initScrollBar(),i}return Object(B["__extends"])(e,t),e.prototype.current=function(){var t=this.thumbLen/this.trackLen,e=this.thumbOffset/this.trackLen;return e/(1-t)},e.prototype.updateTrackLen=function(t){if(this.trackLen!==t){var e=this.thumbLen/this.trackLen,i=this.thumbOffset/this.trackLen,n=t*e,r=t*i;this.trackLen=t,this.isHorizontal?this.trackShape.attr("x2",t):this.trackShape.attr("y2",t),this.updateThumbLen(n),this.updateThumbOffset(r),this._renderNewScrollBar()}},e.prototype.updateThumbLen=function(t){this.thumbLen!==t&&(this.thumbLen=t,this.isHorizontal?this.thumbShape.attr("x2",this.thumbOffset+t):this.thumbShape.attr("y2",this.thumbOffset+t),this._renderNewScrollBar())},e.prototype.updateThumbOffset=function(t){var e=this._validateRange(t);this.thumbOffset!==e&&(this.thumbOffset=e,this.isHorizontal?this.thumbShape.attr({x1:e,x2:e+this.thumbLen}):this.thumbShape.attr({y1:e,y2:e+this.thumbLen}),this._renderNewScrollBar())},e.prototype.updateScrollBarPos=function(t){t.x===this.position.x&&t.y===this.position.y||(this.position=t,this.scrollBarGroup.move(t.x,t.y),this._renderNewScrollBar())},e.prototype._renderNewScrollBar=function(){this.emit("scrollchange",{thumbOffset:this.thumbOffset,ratio:E["clamp"](this.thumbOffset/(this.trackLen-this.thumbLen),0,1)}),this.get("canvas").draw()},e.prototype.updateTheme=function(t){this.theme=E["deepMix"]({},wc,t),this.thumbShape.attr("stroke",this.theme.default.thumbColor),this.thumbShape.attr("lineWidth",this.theme.default.size),this.thumbShape.attr("lineCap",this.theme.default.lineCap),this.get("canvas").draw()},e.prototype._initScrollBar=function(){this.scrollBarGroup=this._createScrollBarGroup(),this.scrollBarGroup.move(this.position.x,this.position.y),this._bindEvents()},e.prototype._createScrollBarGroup=function(){var t=this.addGroup({className:this.isHorizontal?"horizontalBar":"verticalBar"});return this.trackShape=this._createTrackShape(t),this.thumbShape=this._createThumbShape(t),t},e.prototype._createTrackShape=function(t){var e=this.theme.default,i=e.lineCap,n=e.trackColor,r=e.size;return this.isHorizontal?t.addShape("line",{attrs:{x1:0,y1:r/2,x2:this.trackLen,y2:r/2,lineWidth:r,stroke:n,lineCap:i}}):t.addShape("line",{attrs:{x1:r/2,y1:0,x2:r/2,y2:this.trackLen,lineWidth:r,stroke:n,lineCap:i}})},e.prototype._createThumbShape=function(t){var e=this.theme.default,i=e.size,n=e.lineCap,r=e.thumbColor;return this.isHorizontal?t.addShape("line",{attrs:{x1:this.thumbOffset,y1:i/2,x2:this.thumbOffset+this.thumbLen,y2:i/2,lineWidth:i,stroke:r,lineCap:n,cursor:"default"}}):t.addShape("line",{attrs:{x1:i/2,y1:this.thumbOffset,x2:i/2,y2:this.thumbOffset+this.thumbLen,lineWidth:i,stroke:r,lineCap:n,cursor:"default"}})},e.prototype._bindEvents=function(){this.on("mousedown",this._onStartEvent(!1)),this.on("mouseup",this._onMouseUp),this.on("touchstart",this._onStartEvent(!0)),this.on("touchend",this._onMouseUp),this.trackShape.on("click",this._onTrackClick),this.thumbShape.on("mouseover",this._onTrackMouseOver),this.thumbShape.on("mouseout",this._onTrackMouseOut)},e.prototype._bindLaterEvent=function(){var t=this.get("canvas").get("containerDOM"),e=[];e=this._isMobile?[X["addEventListener"](t,"touchmove",this._onMouseMove),X["addEventListener"](t,"touchend",this._onMouseUp),X["addEventListener"](t,"touchcancel",this._onMouseUp)]:[X["addEventListener"](t,"mousemove",this._onMouseMove),X["addEventListener"](t,"mouseup",this._onMouseUp),X["addEventListener"](t,"mouseleave",this._onMouseUp)],this._clearEvents=function(){e.forEach((function(t){t.remove()}))}},e.prototype._validateRange=function(t){var e=t;return t+this.thumbLen>this.trackLen?e=this.trackLen-this.thumbLen:t+this.thumbLen<this.thumbLen&&(e=0),e},e}(F["Group"]),Sc=Mc,kc=(function(t){function e(e){var i=t.call(this,e)||this,n=e.position,r=void 0===n?{x:0,y:0}:n,a=e.icon,o=e.text,s=void 0===o?"":o,l=e.spacing,u=void 0===l?8:l,h=e.iconStyle,c=e.textStyle,p=e.interactive,f=void 0!==p&&p;return i.position=r,i.icon=a,i.text=s,i.spacing=u,i.iconStyle=Object(B["__assign"])({fontFamily:"iconfont",fontSize:16,textAlign:"left",textBaseline:"top",fill:"#1890ff"},h),i.textStyle=Object(B["__assign"])({fontSize:12,textAlign:"left",textBaseline:"middle",fill:"#000"},c),i.interactive=f,i._initIcon(),i.interactive&&i._bindEvent(),i}Object(B["__extends"])(e,t),e.prototype._initIcon=function(){var t=this.position,e=t.x,i=t.y,n=String.fromCharCode(parseInt(this.icon,16)),r=this.addShape("text",{attrs:Object(B["__assign"])({x:e,y:i,text:n},this.iconStyle)});if(this.text){var a=r.getBBox();this.addShape("text",{attrs:Object(B["__assign"])({x:e+a.width+this.spacing,y:i+a.height/2,text:this.text},this.textStyle)})}var o=this.getBBox();this.bg=this.addShape("rect",{attrs:{x:o.x,y:o.y,width:o.width,height:o.height,radius:2,fill:"#fff"},zIndex:-1}),this.sort()},e.prototype._bindEvent=function(){var t=this;this.on("mouseover",(function(){t.bg.attr("fill","#F5F5F5"),t.get("canvas").draw()})),this.on("mouseout",(function(){t.bg.attr("fill","#fff"),t.get("canvas").draw()}))}}(F["Group"]),{right:90*Math.PI/180,left:270*Math.PI/180,up:0,down:180*Math.PI/180}),Oc=(function(t){function e(e){var i=t.call(this)||this,n=e.position,r=void 0===n?{x:0,y:0}:n,a=e.width,o=void 0===a?10:a,s=e.height,l=void 0===s?10:s,u=e.direction,h=void 0===u?"right":u,c=e.shapeAttrs,p=void 0===c?{}:c;return i.position=r,i.width=o,i.height=l,i.direction=h,i.shapeAttrs=p,i._init(),i}Object(B["__extends"])(e,t),e.prototype._init=function(){var t=this,e=this.width/2,i=this.height/2,n=[{x:0,y:-i},{x:-e,y:i},{x:e,y:i}],r=new F["Path"]({attrs:Object(B["__assign"])({path:[["M",n[0].x,n[0].y],["L",n[1].x,n[1].y],["L",n[2].x,n[2].y],["Z"]]},this.shapeAttrs)});this.add(r),this.rotate(kc[this.direction]),this.move(this.position.x,this.position.y),r.on("click",(function(e){e.stopPropagation(),t.emit("click",e)}))}}(F["Group"]),{opacity:0}),Cc={stroke:"#C5C5C5",strokeOpacity:.85},Ac={fill:"#CACED4",opacity:.85};function Lc(t){return E["map"](t,(function(t,e){var i=0===e?"M":"L",n=t[0],r=t[1];return[i,n,r]}))}function Pc(t){return Lc(t)}function jc(t){if(t.length<=2)return Pc(t);var e=[];E["each"](t,(function(t){E["isEqual"](t,e.slice(e.length-2))||e.push(t[0],t[1])}));var i=Tt(e,!1),n=E["head"](t),r=n[0],a=n[1];return i.unshift(["M",r,a]),i}function Tc(t,e,i,n){void 0===n&&(n=!0);var r=new gi({values:t}),a=new Te({values:E["map"](t,(function(t,e){return e}))}),o=E["map"](t,(function(t,n){return[a.scale(n)*e,i-r.scale(t)*i]}));return n?jc(o):Pc(o)}function Bc(t,e,i){var n=Object(B["__spreadArrays"])(t);return n.push(["L",e,0]),n.push(["L",0,i]),n.push(["Z"]),n}var Ic=function(t){function e(e){var i=t.call(this)||this,n=e.x,r=void 0===n?0:n,a=e.y,o=void 0===a?0:a,s=e.width,l=void 0===s?200:s,u=e.height,h=void 0===u?16:u,c=e.smooth,p=void 0===c||c,f=e.isArea,d=void 0!==f&&f,g=e.data,v=void 0===g?[]:g,y=e.backgroundStyle,m=e.lineStyle,x=e.areaStyle;return i.x=r,i.y=o,i.width=l,i.height=h,i.data=v,i.smooth=p,i.isArea=d,i.backgroundStyle=E["assign"]({},Oc,y),i.lineStyle=E["assign"]({},Cc,m),i.areaStyle=E["assign"]({},Ac,x),i._initial(),i}return Object(B["__extends"])(e,t),e.prototype._initial=function(){var t=this,e=t.x,i=t.y,n=t.width,r=t.height,a=t.data,o=t.smooth,s=t.isArea,l=t.backgroundStyle,u=t.lineStyle,h=t.areaStyle;this.backgroundShape=this.addShape("rect",{attrs:Object(B["__assign"])({x:0,y:0,width:n,height:r},l)});var c=Tc(a,n,r,o);this.lineShape=this.addShape("path",{attrs:Object(B["__assign"])({path:c},u)});var p=Bc(c,n,r);s&&(this.areaShape=this.addShape("path",{attrs:Object(B["__assign"])({path:p},h)})),this.move(e,i)},e}(F["Group"]),Dc=Ic,Fc={fill:"#416180 ",opacity:.05},Ec={fill:"#5B8FF9",opacity:.15,cursor:"move"},Rc=10,zc={width:Rc,height:24},Nc={textBaseline:"middle",fill:"#000",opacity:.45},Yc="sliderchange",Hc={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},Gc=function(t){function e(e){var i=t.call(this)||this,n=e.x,r=void 0===n?0:n,a=e.y,o=void 0===a?0:a,s=e.width,l=void 0===s?10:s,u=e.height,h=void 0===u?24:u,c=e.style,p=void 0===c?{}:c;return i.x=r,i.y=o,i.width=l,i.height=h,i.style=Object(B["__assign"])(Object(B["__assign"])({},Hc),p),i._initial(),i}return Object(B["__extends"])(e,t),e.prototype.setX=function(t){this.setXY(t,void 0)},e.prototype.setY=function(t){this.setXY(void 0,t)},e.prototype.setXY=function(t,e){E["isNumber"](t)&&(this.x=t),E["isNumber"](e)&&(this.y=e),this._updateXY()},e.prototype._initial=function(){var t=this,e=t.width,i=t.height,n=t.style,r=n.fill,a=n.stroke,o=n.radius,s=n.opacity,l=n.cursor;this.background=this.addShape("rect",{attrs:{x:0,y:0,width:e,height:i,fill:r,stroke:a,radius:o,opacity:s,cursor:l}});var u=1/3*e,h=2/3*e,c=1/4*i,p=3/4*i;this.addShape("line",{attrs:{x1:u,y1:c,x2:u,y2:p,stroke:a,cursor:l}}),this.addShape("line",{attrs:{x1:h,y1:c,x2:h,y2:p,stroke:a,cursor:l}}),this._updateXY(),this._bindEvents()},e.prototype._bindEvents=function(){var t=this;this.on("mouseenter",(function(){var e=t.style.highLightFill;t.background.attr("fill",e),t._getCanvas().draw()})),this.on("mouseleave",(function(){var e=t.style.fill;t.background.attr("fill",e),t._getCanvas().draw()}))},e.prototype._updateXY=function(){this.move(this.x,this.y)},e.prototype._getCanvas=function(){var t=this;while(t.get("parent"))t=t.get("parent");return t},e}(F["Group"]),Wc=Gc,Xc=function(t){function e(e){var i=t.call(this)||this;i.prevX=0,i.prevY=0,i.onMouseDown=function(t){return function(e){i.currentHandler=t;var n=e.event;n.stopPropagation(),n.preventDefault(),i.prevX=E["get"](n,"touches.0.pageX",n.pageX),i.prevY=E["get"](n,"touches.0.pageY",n.pageY);var r=i.get("canvas").get("containerDOM");r.addEventListener("mousemove",i.onMouseMove),r.addEventListener("mouseup",i.onMouseUp),r.addEventListener("mouseleave",i.onMouseUp),r.addEventListener("touchmove",i.onMouseMove),r.addEventListener("touchend",i.onMouseUp),r.addEventListener("touchcancel",i.onMouseUp)}},i.onMouseMove=function(t){t.stopPropagation(),t.preventDefault();var e=E["get"](t,"touches.0.pageX",t.pageX),n=E["get"](t,"touches.0.pageY",t.pageY),r=e-i.prevX,a=i.adjustOffsetRange(r/i.width);i.updateStartEnd(a),i._updateUI(),i.prevX=e,i.prevY=n,i.get("canvas").draw(),i.emit(Yc,[i.start,i.end].sort())},i.onMouseUp=function(){i.currentHandler&&(i.currentHandler=void 0);var t=i.get("canvas").get("containerDOM");t&&(t.removeEventListener("mousemove",i.onMouseMove),t.removeEventListener("mouseup",i.onMouseUp),t.removeEventListener("mouseleave",i.onMouseUp),t.removeEventListener("touchmove",i.onMouseMove),t.removeEventListener("touchend",i.onMouseUp),t.removeEventListener("touchcancel",i.onMouseUp))};var n=e.x,r=void 0===n?0:n,a=e.y,o=void 0===a?0:a,s=e.width,l=void 0===s?100:s,u=e.height,h=void 0===u?16:u,c=e.trendCfg,p=e.backgroundStyle,f=void 0===p?{}:p,d=e.foregroundStyle,g=void 0===d?{}:d,v=e.handlerStyle,y=void 0===v?{}:v,m=e.textStyle,x=void 0===m?{}:m,b=e.start,_=void 0===b?0:b,w=e.end,M=void 0===w?1:w,S=e.minText,k=void 0===S?"":S,O=e.maxText,C=void 0===O?"":O;return i.x=r,i.y=o,i.width=l,i.height=h,i.trendCfg=c,i.backgroundStyle=Object(B["__assign"])(Object(B["__assign"])({},Fc),f),i.foregroundStyle=Object(B["__assign"])(Object(B["__assign"])({},Ec),g),i.handlerStyle=Object(B["__assign"])(Object(B["__assign"])({},zc),y),i.textStyle=Object(B["__assign"])(Object(B["__assign"])({},Nc),x),i.start=_,i.end=M,i.minText=k,i.maxText=C,i._initial(),i}return Object(B["__extends"])(e,t),e.prototype.update=function(t){var e=t.x,i=t.y,n=t.width,r=t.height,a=t.minText,o=t.maxText,s=t.start,l=t.end;this.start=Math.min(1,Math.max(s,0)),this.end=Math.min(1,Math.max(l,0)),E["assign"](this,{x:e,y:i,width:n,height:r,minText:a,maxText:o}),this._updateUI()},e.prototype._initial=function(){var t=this.width,e=this.height;E["size"](E["get"](this.trendCfg,"data"))&&(this.trendShape=new Dc(Object(B["__assign"])({x:0,y:0,width:t,height:e},this.trendCfg)),this.add(this.trendShape)),this.backgroundShape=this.addShape("rect",{attrs:Object(B["__assign"])({x:0,y:0,width:t,height:e},this.backgroundStyle)}),this.minTextShape=this.addShape("text",{attrs:Object(B["__assign"])({y:e/2,textAlign:"right",text:this.minText,silent:!1},this.textStyle)}),this.maxTextShape=this.addShape("text",{attrs:Object(B["__assign"])({y:e/2,textAlign:"left",text:this.maxText,silent:!1},this.textStyle)}),this.foregroundShape=this.addShape("rect",{attrs:Object(B["__assign"])({y:0,height:e},this.foregroundStyle)});E["get"](this.handlerStyle,"width",10);var i=E["get"](this.handlerStyle,"height",24);this.minHandlerShape=new Wc(Object(B["__assign"])({x:0,y:(e-i)/2,width:t,height:i,cursor:"ew-resize"},this.handlerStyle)),this.add(this.minHandlerShape),this.maxHandlerShape=new Wc(Object(B["__assign"])({x:0,y:(e-i)/2,width:t,height:i,cursor:"ew-resize"},this.handlerStyle)),this.add(this.maxHandlerShape),this._updateUI(),this.move(this.x,this.y),this._bindEvents()},e.prototype._bindEvents=function(){this.minHandlerShape.on("mousedown",this.onMouseDown(this.minHandlerShape)),this.minHandlerShape.on("touchstart",this.onMouseDown(this.minHandlerShape)),this.maxHandlerShape.on("mousedown",this.onMouseDown(this.maxHandlerShape)),this.maxHandlerShape.on("touchstart",this.onMouseDown(this.maxHandlerShape)),this.foregroundShape.on("mousedown",this.onMouseDown(this.foregroundShape)),this.foregroundShape.on("touchstart",this.onMouseDown(this.foregroundShape))},e.prototype.adjustOffsetRange=function(t){switch(this.currentHandler){case this.minHandlerShape:var e=0-this.start,i=1-this.start;return Math.min(i,Math.max(e,t));case this.maxHandlerShape:e=0-this.end,i=1-this.end;return Math.min(i,Math.max(e,t));case this.foregroundShape:e=0-this.start,i=1-this.end;return Math.min(i,Math.max(e,t));default:return 0}},e.prototype.updateStartEnd=function(t){switch(this.currentHandler){case this.minHandlerShape:this.start+=t;break;case this.maxHandlerShape:this.end+=t;break;case this.foregroundShape:this.start+=t,this.end+=t;break}},e.prototype._updateUI=function(){var t=this,e=this.start*this.width,i=this.end*this.width;this.foregroundShape.attr("x",e),this.foregroundShape.attr("width",i-e);var n=E["get"](this.handlerStyle,"width",Rc);this.minTextShape.attr("text",this.minText),this.maxTextShape.attr("text",this.maxText);var r=this._dodgeText([e,i]),a=r[0],o=r[1];this.minHandlerShape.setX(e-n/2),E["each"](a,(function(e,i){return t.minTextShape.attr(i,e)})),this.maxHandlerShape.setX(i-n/2),E["each"](o,(function(e,i){return t.maxTextShape.attr(i,e)}))},e.prototype._dodgeText=function(t){var e,i,n=2,r=E["get"](this.handlerStyle,"width",Rc),a=this.minTextShape,o=this.maxTextShape,s=t[0],l=t[1],u=!1;s>l&&(e=[l,s],s=e[0],l=e[1],i=[o,a],a=i[0],o=i[1],u=!0);var h=a.getBBox(),c=o.getBBox(),p=h.width>s-n?{x:s+r/2+n,textAlign:"left"}:{x:s-r/2-n,textAlign:"right"},f=c.width>this.width-l-n?{x:l-r/2-n,textAlign:"right"}:{x:l+r/2+n,textAlign:"left"};return u?[f,p]:[p,f]},e}(F["Group"]),Vc=Xc,qc=function(t){function e(e){var i=t.call(this)||this;return i.config=E["deepMix"]({},e),i.init(),i}return Object(B["__extends"])(e,t),e.prototype.update=function(t){this.config=E["deepMix"]({},this.config,t),this.updateElement(),this.renderMarker()},e.prototype.init=function(){this.initElement(),this.renderMarker()},e.prototype.initElement=function(){this.circle=this.addShape("circle",{attrs:{x:this.config.x,y:this.config.y,r:this.config.r,fill:"#607889"}}),this.startMarker=this.addShape("path",{attrs:{path:this.getStartMarkerPath(),fill:"#ffffff"}}),this.pauseGroupMarker=new F["Group"];var t=1/4*this.config.r,e=.5*this.config.r*Math.sqrt(3);this.pauseLeftMarker=this.pauseGroupMarker.addShape("rect",{attrs:{x:this.config.x-.375*this.config.r,y:this.config.y-e/2,width:t,height:e,fill:"#ffffff"}}),this.pauseRightMarker=this.pauseGroupMarker.addShape("rect",{attrs:{x:this.config.x+1/8*this.config.r,y:this.config.y-e/2,width:t,height:e,fill:"#ffffff"}}),this.add(this.pauseGroupMarker)},e.prototype.updateElement=function(){this.circle.attr("x",this.config.x),this.circle.attr("y",this.config.y),this.circle.attr("r",this.config.r),this.startMarker.attr("path",this.getStartMarkerPath());var t=1/4*this.config.r,e=.5*this.config.r*Math.sqrt(3);this.pauseLeftMarker.attr("x",this.config.x-.375*this.config.r),this.pauseLeftMarker.attr("y",this.config.y-e/2),this.pauseLeftMarker.attr("width",t),this.pauseLeftMarker.attr("height",e),this.pauseRightMarker.attr("x",this.config.x+1/8*this.config.r),this.pauseRightMarker.attr("y",this.config.y-e/2),this.pauseRightMarker.attr("width",t),this.pauseRightMarker.attr("height",e)},e.prototype.renderMarker=function(){this.config.isPlay?(this.startMarker.hide(),this.pauseGroupMarker.show()):(this.startMarker.show(),this.pauseGroupMarker.hide())},e.prototype.getStartMarkerPath=function(){var t=.5*this.config.r*Math.sqrt(3);return[["M",this.config.x-t/Math.sqrt(3)/2,this.config.y-t/2],["L",this.config.x+t/Math.sqrt(3),this.config.y],["L",this.config.x-t/Math.sqrt(3)/2,this.config.y+t/2]]},e}(F["Group"]),Uc=qc,Zc="timelinestart",Qc="timelinechange",$c="timelineend",Kc=20,Jc=20,tp=(function(t){function e(e){var i=t.call(this)||this;return i.onTimeSelectMouseMove=function(t){t.stopPropagation(),t.preventDefault();var e=E["get"](t,"touches.0.pageX",t.pageX),n=e-i.prevX;i.setTimeSelectX(n),i.prevX=e},i.onTimeSelectMouseUp=function(t){i.syncCurrnentTick(),i.emit($c,null);var e=i.get("canvas").get("containerDOM");e&&(e.removeEventListener("mousemove",i.onTimeSelectMouseMove),e.removeEventListener("mouseup",i.onTimeSelectMouseUp),e.removeEventListener("mouseleave",i.onTimeSelectMouseUp),e.removeEventListener("touchmove",i.onTimeSelectMouseMove),e.removeEventListener("touchend",i.onTimeSelectMouseUp),e.removeEventListener("touchcancel",i.onTimeSelectMouseUp))},i.onTimeSelectMouseDown=function(t){var e=t.event;e.stopPropagation(),e.preventDefault(),!1===i.isPlay?i.emit(Zc,null):(i.isPlay=!1,i.changePlayStatus(!1)),i.prevX=E["get"](t,"touches.0.pageX",e.pageX);var n=i.get("canvas").get("containerDOM");n.addEventListener("mousemove",i.onTimeSelectMouseMove),n.addEventListener("mouseup",i.onTimeSelectMouseUp),n.addEventListener("mouseleave",i.onTimeSelectMouseUp),n.addEventListener("touchmove",i.onTimeSelectMouseMove),n.addEventListener("touchend",i.onTimeSelectMouseUp),n.addEventListener("touchcancel",i.onTimeSelectMouseUp)},i.config=E["deepMix"]({},{speed:1,loop:!1},e),i.init(),i}Object(B["__extends"])(e,t),e.prototype.update=function(t){this.config=E["deepMix"]({},this.config,t);var e=this.config.ticks;this.currentTick=e.includes(this.currentTick)?this.currentTick:e[0],this.renderPlayButton(),this.renderTimeLine(),this.renderTimeSelect(this.currentTick)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.timeLineButton.off(),this.timeSelect.off()},e.prototype.init=function(){var t=this.config,e=t.ticks,i=t.defaultCurrentTick;e&&e.length&&(this.currentTick=this.config.ticks.includes(i)?i:e[0],this.renderPlayButton(),this.renderTimeLine(),this.renderTimeSelect(this.currentTick),this.initEvent())},e.prototype.renderPlayButton=function(){var t=this.config,e=t.height,i=t.x,n=t.y,r=.8,a=e/2*r;this.timeLineButton?this.timeLineButton.update({x:i+a,y:n+a+e*(1-r)/2,r:a}):(this.timeLineButton=new Uc({x:i+a,y:n+a+e*(1-r)/2,r:a,isPlay:this.isPlay}),this.add(this.timeLineButton))},e.prototype.getTimeLinePath=function(){var t=this.timeLine,e=t.x,i=t.y,n=t.width,r=t.height,a=r/2;return n>0?"M"+e+", "+i+"A"+a+","+a+" 90 0,0 "+e+","+(i+r)+"L"+(e+n)+", "+(i+r)+"A"+a+","+a+" 90 0,0 "+(e+n)+","+i+"L"+e+", "+i:[]},e.prototype.renderTimeLine=function(){var t=this,e=this.config,i=e.width,n=e.height,r=e.ticks,a=e.x,o=e.y;this.timeLine||(this.timeLine={}),this.timeLine.height=.15*n,this.timeLine.x=a+n+Kc,this.timeLine.y=o+(n/2-this.timeLine.height/2),this.timeLine.width=i-this.timeLine.x-Jc,this.timeLine&&this.timeLine.shape?this.timeLine.shape.attr("path",this.getTimeLinePath()):this.timeLine.shape=this.addShape("path",{attrs:{path:this.getTimeLinePath(),fill:"#607889",opacity:.2}});var s=this.timeLine.width/(r.length-1);this.tickPosList=[],this.timeLine.textList&&this.timeLine.textList.length&&this.timeLine.textList.forEach((function(t){t.destroy()}));var l=-1/0;this.timeLine.textList=r.map((function(e,i){t.tickPosList.push(t.timeLine.x+i*s);var n=t.addShape("text",{attrs:{x:t.timeLine.x+i*s,y:t.timeLine.y+t.timeLine.height+5,text:e,textAlign:"center",textBaseline:"top",fill:"#607889",opacity:.35}}),r=n.getBBox();return r.minX>l?(n.show(),l=r.minX+r.width+10):n.hide(),n}))},e.prototype.renderTimeSelect=function(t){var e=this.config,i=e.ticks,n=e.height,r=this.timeLine.width/(i.length-1),a=E["findIndex"](i,(function(e){return e===t})),o=this.timeLine.x+a*r,s=this.config.y+n/2,l=.15*n;this.timeSelect?(this.timeSelect.attr("x",o),this.timeSelect.attr("y",s),this.timeSelect.attr("r",l)):this.timeSelect=this.addShape("circle",{attrs:{x:o,y:s,r:l,fill:"#607889"}}),this.timeSelectText?(this.timeSelectText.attr("x",o),this.timeSelectText.attr("y",s-.15*n-14),this.timeSelectText.attr("text",this.currentTick)):this.timeSelectText=this.addShape("text",{attrs:{x:o,y:s-.15*n-14,text:this.currentTick,textAlign:"center",textBaseline:"top",fill:"#607889"}})},e.prototype.adjustTickIndex=function(t){for(var e=0;e<this.tickPosList.length-1;e++)if(this.tickPosList[e]<=t&&t<=this.tickPosList[e+1])return Math.abs(this.tickPosList[e]-t)<Math.abs(t-this.tickPosList[e+1])?e:e+1},e.prototype.setTimeSelectX=function(t){var e=this.timeSelect.attr("x")+t;e<this.timeLine.x&&(e=this.timeLine.x),e>this.timeLine.x+this.timeLine.width&&(e=this.timeLine.x+this.timeLine.width,this.isPlay&&(this.config.loop?this.timeSelect.attr("x")===this.timeLine.x+this.timeLine.width&&(e=this.timeLine.x):(this.isPlay=!1,this.changePlayStatus()))),this.timeSelect.attr("x",e),this.timeSelectText.attr("x",e);var i=this.adjustTickIndex(e);this.currentTick!==this.config.ticks[i]&&(this.currentTick=this.config.ticks[i],this.timeSelectText.attr("text",this.currentTick),this.emit(Qc,this.currentTick)),this.get("canvas").draw()},e.prototype.syncCurrnentTick=function(){var t=this,e=this.config.ticks,i=this.timeLine.width/(e.length-1),n=E["findIndex"](e,(function(e){return e===t.currentTick})),r=this.timeLine.x+n*i;this.timeSelect.attr("x",r),this.timeSelectText.attr("x",r),this.get("canvas").draw()},e.prototype.startPlay=function(){var t=this;return window.requestAnimationFrame((function(){var e=t.config,i=e.speed,n=e.ticks,r=t.timeLine.width,a=r/n.length,o=a/(1e3*i/60);t.setTimeSelectX(o),t.isPlay&&(t.playHandler=t.startPlay())}))},e.prototype.changePlayStatus=function(t){void 0===t&&(t=!0),this.timeLineButton.update({isPlay:this.isPlay}),this.isPlay?(this.playHandler=this.startPlay(),this.emit(Zc,null)):this.playHandler&&(window.cancelAnimationFrame(this.playHandler),t&&(this.syncCurrnentTick(),this.emit($c,null))),this.get("canvas").draw()},e.prototype.initEvent=function(){var t=this;this.timeLineButton.on("click",(function(){t.isPlay=!t.isPlay,t.changePlayStatus()})),this.timeSelect.on("mousedown",this.onTimeSelectMouseDown)}}(F["Group"]),function(t,e,i,n,r){var a=n[0],o=n[1];void 0===r&&(r=!1);var s=Object(E["groupBy"])(i,t),l=r?e.slice(e.length-o,e.length-a):e.slice(a,o);return Object(E["flatten"])(Object(E["map"])(l,(function(t){return s[t]||[]})))}),ep=4,ip=8,np=32,rp=8,ap=999,op=function(t){void 0===t&&(t={});var e=Object(B["__assign"])({type:"horizontal",categorySize:np,width:ip,height:ip,padding:[0,0,0,0]},t);return t.padding||(e.padding="horizontal"===e.type?[ep,0,ep,0]:[0,ep,0,ep]),e},sp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onChangeFn=Object(E["throttle"])(e.onChange.bind(e),20,{leading:!0}),e}return Object(B["__extends"])(e,t),e.getInteractionRange=function(t,e){var i=op(e),n=i.padding,r=n[0],a=n[1],o=n[2],s=n[3];return"horizontal"===i.type?new F["BBox"](t.minX,t.maxY-i.height-r-o,t.width,i.height+r+o):new F["BBox"](t.maxX-i.width-s-a,t.minY,i.width+s+a,t.height)},e.prototype.render=function(){var t=this,e=this.view;this.ratio=0,this.thumbOffset=0,e.on("afterrender",(function(){var e=t.view.get("padding");Object(E["isEqual"])([0,0,0,0],e)||(t.trackLen?t.renderScrollbar():(t.measureScrollBar(),t.changeViewData(t.getScrollRange())))}))},e.prototype.clear=function(){this.scrollBar&&(this.scrollBar.destroy(),this.scrollBar=null),this.container&&(this.container.remove(!0),this.container=null),this.trackLen=null,this.thumbLen=null},e.prototype.renderScrollbar=function(){var t=op(this.getInteractionConfig()),e=this.getRange(),i="vertical"!==t.type,n=this.view.get("panelRange"),r=t.padding,a=r[0],o=r[3],s=i?{x:n.minX+o,y:e.tl.y+a}:{x:e.tl.x+o,y:n.minY+a};this.scrollBar?(this.scrollBar.updateTrackLen(this.trackLen),this.scrollBar.updateThumbLen(this.thumbLen),this.scrollBar.updateScrollBarPos(s),this.scrollBar.updateThumbOffset(this.thumbOffset)):(this.container=this.canvas.addGroup(),this.scrollBar=new Sc({isHorizontal:i,trackLen:this.trackLen,thumbLen:this.thumbLen,position:s,thumbOffset:this.ratio*this.trackLen}),this.container.add(this.scrollBar),this.scrollBar.set("zIndex",ap),this.scrollBar.on("scrollchange",this.onChangeFn))},e.prototype.measureScrollBar=function(){var t=op(this.getInteractionConfig()),e=t.padding,i=e[0],n=e[1],r=e[2],a=e[3],o="vertical"!==t.type,s=this.view.get("panelRange"),l=this.view.getXScale(),u=this.view.getYScales();this.cnt=l.values.length,this.xScaleCfg={field:l.field,values:l.values||[]},this.yScalesCfg=Object(E["map"])(u,(function(t){return{field:t.field,type:t.type,min:t.min,max:t.max,ticks:t.ticks,formatter:t.formatter}})),this.step=Math.floor((o?s.width:s.height)/t.categorySize),this.trackLen=o?s.width-a-n:s.height-i-r,this.thumbLen=Math.max(this.trackLen*Object(E["clamp"])(this.step/l.values.length,0,1),rp)},e.prototype.getScrollRange=function(){var t=Math.floor((this.cnt-this.step)*Object(E["clamp"])(this.ratio,0,1)),e=Math.min(t+this.step,this.cnt);return[t,e]},e.prototype.changeViewData=function(t){var e=this,i=t[0],n=t[1],r=op(this.getInteractionConfig()),a=this.getViewLayer(),o=a.options.meta,s=a.getData(),l=tp(this.xScaleCfg.field,this.xScaleCfg.values,s,[i,n],"vertical"===r.type);this.yScalesCfg.forEach((function(t){var i=Object(E["get"])(o,t.field)||{};e.view.scale(t.field,Object(B["__assign"])(Object(B["__assign"])({formatter:t.formatter},i),{type:t.type,min:t.min,max:t.max}))})),this.view.set("data",l),this.view.repaint()},e.prototype.onChange=function(t){var e=t.ratio,i=t.thumbOffset;this.ratio=e,this.thumbOffset=i;var n=this.view.get("animation");this.view.animate(!1),this.changeViewData(this.getScrollRange()),this.view.animate(n)},e}(bc),lp=sp,up=4,hp=16,cp=function(t){void 0===t&&(t={});var e=Object(B["__assign"])({type:"horizontal",start:0,end:1,width:void 0,height:void 0,padding:[0,0,0,0],backgroundColor:void 0,foregroundColor:void 0},t);t.padding||(e.padding="horizontal"===e.type?[up,0,up,0]:[0,up,0,up]),t.height||(e.height=hp),t.width||(e.width=hp);var i=Object(E["clamp"])(Math.min(e.start,e.end),0,1),n=Object(E["clamp"])(Math.max(e.start,e.end),0,1);return e.start=i,e.end=n,e},pp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onChangeFn=Object(E["throttle"])(e.onChange.bind(e),20,{leading:!0}),e}return Object(B["__extends"])(e,t),e.getInteractionRange=function(t,e){var i=cp(e),n=i.padding||[0,0,0,0],r=n[0],a=n[1],o=n[2],s=n[3];return"horizontal"===i.type?new F["BBox"](t.minX,t.maxY-i.height-r-o,t.width,i.height+r+o):new F["BBox"](t.maxX-i.width-s-a,t.minY,i.width+s+a,t.height)},e.prototype.render=function(){var t=this,e=cp(this.getInteractionConfig());this.curStart=e.start,this.curEnd=e.end,this.xScaleCfg=void 0,this.view.on("afterrender",(function(){if(t.xScaleCfg)t.renderSlider();else{var e=t.view.getXScale();t.xScaleCfg={field:e.field,values:e.values||[]},t.view.set("data",t.getSliderData(t.curStart,t.curEnd)),t.view.repaint()}}))},e.prototype.clear=function(){this.slider&&(this.slider.destroy(),this.slider=null),this.container&&(this.container.remove(!0),this.container=null)},e.prototype.renderSlider=function(){this.slider?this.slider.update(this.getSliderConfig()):(this.container=this.canvas.addGroup(),this.slider=new Vc(this.getSliderConfig()),this.slider.on("sliderchange",this.onChangeFn),this.container.add(this.slider))},e.prototype.getSliderConfig=function(){var t=this.view,e=t.get("panelRange"),i=this.getRange(),n=cp(this.getInteractionConfig()),r=n||{},a=r.padding,o=void 0===a?[0,0,0,0]:a,s=r.foregroundColor,l=r.backgroundColor,u=o[0],h=o[1],c=o[2],p=o[3],f=this.getSliderMinMaxText(this.curStart,this.curEnd),d=f.minText,g=f.maxText,v={x:e.minX+p,y:i.tl.y+u,width:e.width-p-h,height:i.height-u-c,start:this.curStart,end:this.curEnd,minText:d,maxText:g,trendCfg:{data:this.getSliderTrendData(),isArea:!1,smooth:!1},foregroundStyle:{},backgroundStyle:{}};return s&&(v.foregroundStyle.fill=s),l&&(v.backgroundStyle.fill=l),v},e.prototype.getSliderTrendData=function(){var t=this.getViewLayer().options,e=t.data,i=t.yField;return Object(E["map"])(e,(function(t){return t[i]}))},e.prototype.getSliderData=function(t,e){var i=this.getViewLayer().getData(),n=Object(E["size"])(this.xScaleCfg.values),r=Math.round(t*n),a=Math.max(r+1,Math.round(e*n));return tp(this.xScaleCfg.field,this.xScaleCfg.values,i,[r,a])},e.prototype.getSliderMinMaxText=function(t,e){var i=this.getViewLayer().options,n=i.data,r=void 0===n?[]:n,a=i.xField,o=Object(E["size"])(r),s=Math.round(t*o),l=Math.max(s+1,Math.round(e*o)),u=r.slice(s,l);return{minText:Object(E["head"])(u)[a],maxText:Object(E["last"])(u)[a]}},e.prototype.onChange=function(t){var e=this.view,i=Object(E["clamp"])(Math.min(t[0],t[1]),0,1),n=Object(E["clamp"])(Math.max(t[0],t[1]),0,1),r=this.getSliderData(i,n),a=this.getSliderMinMaxText(i,n),o=a.minText,s=a.maxText;this.curStart=i,this.curEnd=n,this.slider.update({start:i,end:n,minText:o,maxText:s});var l=e.get("animation");e.animate(!1),e.changeData(r),e.animate(l)},e}(bc),fp=pp;bc.registerInteraction("slider",fp),bc.registerInteraction("scrollbar",lp);var dp=bc,gp=function(){function t(t){this.innerPaddingComponents=[],this.outerPaddingComponents=[],this.plot=t.plot}return t.prototype.registerPadding=function(t,e,i){void 0===e&&(e="outer"),void 0===i&&(i=!1),"inner"===e?i&&this.innerPaddingComponents.find((function(e){return e==t}))||this.innerPaddingComponents.push(t):i&&this.outerPaddingComponents.find((function(e){return e==t}))||this.outerPaddingComponents.push(t)},t.prototype.clear=function(){this.innerPaddingComponents=[],this.outerPaddingComponents=E["filter"](this.outerPaddingComponents,(function(t){return t.afterRender}))},t.prototype.clearOuterComponents=function(){E["each"](this.outerPaddingComponents,(function(t){t.afterRender&&t.destroy()})),this.outerPaddingComponents=[]},t.prototype.getPadding=function(){var t=this.plot.options,e=t.padding?t.padding:this.plot.config.theme.padding;return"auto"===e?[0,0,0,0]:e},t.prototype.processAutoPadding=function(){var t=this._getInnerAutoPadding();this.plot.updateConfig({padding:t}),this.plot.render()},t.prototype.processOuterPadding=function(){var t=this.plot.layerBBox.minX,e=this.plot.layerBBox.maxX,i=this.plot.layerBBox.minY,n=this.plot.layerBBox.maxY;return E["each"](this.outerPaddingComponents,(function(r){var a=r.position,o=r.getBBox(),s=o.minX,l=o.maxX,u=o.minY,h=o.maxY;h>=i&&h<=n&&"top"===a&&(i=h),u>=i&&u<=n&&"bottom"===a&&(n=u),l>t&&l<=e&&"left"===a&&(t=l),s>=t&&l<=e&&"right"===a&&(e=s)})),new F["BBox"](t,i,e-t,n-i)},t.prototype._getInnerAutoPadding=function(){var t=this.plot.options,e=this.plot.view,i=e.get("viewRange"),n=i.maxX,r=i.maxY,a=this.plot.config.theme.bleeding;E["isArray"](a)&&E["each"](a,(function(e,i){"function"===typeof a[i]&&(a[i]=a[i](t))})),this.plot.config.theme.legend.margin=a,this.bleeding=E["clone"](a);var o=[e.get("panelRange")];this._getAxis(e,o);var s=this._mergeBBox(o);this._getLegend(e,o,s),s=this._mergeBBox(o);var l=this.innerPaddingComponents;E["each"](l,(function(t){var e=t,i=e.getBBox();o.push(i)})),s=this._mergeBBox(o);var u=s.minY;u===i.minY&&(u=0);var h=[0-u+this.bleeding[0],s.maxX-n+this.bleeding[1],s.maxY-r+this.bleeding[2],0-s.minX+this.bleeding[3]];(E["get"](t,"title.visible")||E["get"](t,"description.visible"))&&(h[0]=Math.max(this.bleeding[0],h[0])),this.adjustAxisPadding(e,h);var c=this._getPanel(e,s);return h[0]+=c[0],h[1]+=c[1],h[2]+=c[2],h[3]+=c[3],h},t.prototype._getAxis=function(t,e){var i=t.get("axisController").axes;i.length>0&&E["each"](i,(function(t){var i=t,n=i.get("group").getBBox();e.push(n)}))},t.prototype._getLegend=function(t,e,i){var n=this,r=t.get("viewRange"),a=t.get("legendController").legends;a.length>0&&E["each"](a,(function(a){var o=a;n._adjustLegend(o,t,i);var s=o.getBBox(),l=s.width,u=s.height,h=0,c=0,p=o.get("position").split("-");"right"===p[0]&&(h=r.maxX,c=s.minY),"left"===p[0]&&(h=i.minX-l,c=s.minY),"top"===p[0]&&(h=s.minX,c=-u),"bottom"===p[0]&&(h=s.minX,c=r.maxY+u);var f=new F["BBox"](h,c,l,u);e.push(f);var d=n._getLegendInnerPadding(o);n._mergeBleeding(d)}))},t.prototype._getPanel=function(t,e){var i=[],n=t.get("elements");E["each"](n,(function(t){if(t.get("labelController")){var e=t.get("labelController").labelsContainer;e&&i.push(e)}}));var r=1/0,a=-1/0,o=1/0,s=-1/0;E["each"](i,(function(t){var e=t.get("children");e.forEach((function(t){if("group"!==t.type||0!==t.get("children").length){var e=t.getBBox();e.minX<r&&(r=e.minX),e.maxX>a&&(a=e.maxX),e.minY<o&&(o=e.minY),e.maxY>s&&(s=e.maxY)}}))}));var l=t.get("panelRange"),u=Math.max(a-parseFloat(l.maxX),0);if(u>0){var h=l.width/(l.width+u);u*=h}var c=Math.max(parseFloat(l.minX)-r,0);if(c>0){h=l.width/(l.width+c);c*=h}var p=Math.max(parseFloat(l.minY)-o,0);if(p>0){h=l.height/(l.height+p);p*=h}var f=Math.max(s-parseFloat(l.maxY),0);if(f>0){h=l.height/(l.height+f);f*=h}return[p,u,f,c]},t.prototype._mergeBBox=function(t){var e=1/0,i=-1/0,n=1/0,r=-1/0;return E["each"](t,(function(t){var a=t;e=Math.min(a.minX,e),i=Math.max(a.maxX,i),n=Math.min(a.minY,n),r=Math.max(a.maxY,r)})),{minX:e,maxX:i,minY:n,maxY:r}},t.prototype._adjustLegend=function(t,e,i){var n=t.get("position").split("-"),r=t.get("container"),a=r.getBBox(),o=e.get("viewRange"),s=o.width,l=(o.height,o.maxX,o.minX,o.maxY),u=o.minY;"right"===n[0]&&r.move(s,u),"left"===n[0]&&r.move(i.minX-a.width,u),"top"===n[0]&&r.move(0,i.minY-a.height),"bottom"===n[0]&&r.move(0,Math.max(l,i.maxY))},t.prototype._getLegendInnerPadding=function(t){var e=this.plot.theme.legend.innerPadding,i=t.get("position").split("-");return"top"===i[0]?[e[0],0,0,0]:"bottom"===i[0]?[0,0,e[2],0]:"left"===i[0]?[0,0,0,e[3]]:"right"===i[0]?[0,e[1],0,0]:void 0},t.prototype._mergeBleeding=function(t){var e=this.bleeding;if(t.length===e.length)for(var i=0;i<t.length;i++)e[i]+=t[i]},t.prototype.adjustAxisPadding=function(t,e){var i=t.get("axisController").axes[0];if(i&&i.get("autoRotateLabel")&&i.getOffsetByRotateAngle){var n=i.get("labelRenderer"),r=n.getLabels(),a=i.getOffsetByRotateAngle(i.get("autoRotateAngle")),o=Math.abs(i.get("end").x-i.get("start").x),s=o;r.length>1&&(s=Math.abs(r[1].attr("x")-r[0].attr("x")));var l=o-e[1]-e[3],u=s*l/o,h=i.getOffsetByRotateAngle(i.getAutoRotateAngleByAvgWidth(u));h>a&&(e[2]+=h-a)}},t}(),vp=gp,yp="#5B8FF9",mp=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E8684A","#6DC8EC","#9270CA","#FF9D4D","#269A99","#FF99C3"],xp=["#5B8FF9","#BDD2FD","#5AD8A6","#BDEFDB","#5D7092","#C2C8D5","#F6BD16","#FBE5A2","#E8684A","#F6C3B7","#6DC8EC","#B6E3F5","#9270CA","#D3C6EA","#FF9D4D","#FFD8B8","#269A99","#AAD8D8","#FF99C3","#FFD6E7"],bp=function(t){return t&&"top"===t.split("-")[0]?12:24},_p=function(t){var e=t.title&&t.title.visible,i=t.description&&t.description.visible;return e||i?12:24},wp=function(t){return Object(E["some"])(t.interactions||[],(function(t){return("slider"===t.type||"scrollbar"===t.type)&&"vertical"!==(t.cfg&&t.cfg.type)}))?8:24},Mp={width:400,height:400,bleeding:[_p,24,wp,24],padding:"auto",defaultColor:yp,colors:mp,colors_20:xp,title:{padding:[24,24,24,24],fontFamily:"PingFang SC",fontSize:18,fill:"black",textAlign:"left",textBaseline:"top",lineHeight:20,alignWithAxis:!1},description:{padding:[10,24,bp,24],fontFamily:"PingFang SC",fontSize:12,fill:"grey",textAlign:"left",textBaseline:"top",lineHeight:16,alignWithAxis:!1},axis:{y:{visible:!0,position:"left",autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!0,grid:{visible:!0,style:{stroke:"rgba(0, 0, 0, 0.15)",lineWidth:1,lineDash:[0,0]}},line:{visible:!1,style:{stroke:"rgba(0, 0, 0, 0.45)",lineWidth:1}},tickLine:{visible:!1,style:{stroke:"rgba(0,0,0,0.45)",lineWidth:.5,length:4}},label:{visible:!0,offset:8,textStyle:{fill:"rgba(0,0,0,0.45)",fontSize:12}},title:{visible:!1,offset:12,style:{fill:"rgba(0, 0, 0, 0.65)",fontSize:12,textBaseline:"bottom"}}},x:{visible:!0,position:"bottom",autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!1,grid:{visible:!1,style:{stroke:"rgba(0, 0, 0, 0.15)",lineWidth:1,lineDash:[0,0]}},line:{visible:!1,style:{stroke:"rgba(0, 0, 0, 0.45)",lineWidth:1}},tickLine:{visible:!0,style:{length:4,stroke:"rgba(0, 0, 0, 0.45)",lineWidth:.5}},label:{visible:!0,textStyle:{fill:"rgba(0,0,0,0.45)",fontSize:12},offset:16},title:{visible:!1,offset:12,style:{fill:"rgba(0, 0, 0, 0.65)",fontSize:12}}},circle:{autoHideLabel:!1,autoRotateLabel:!0,autoRotateTitle:!0,grid:{style:{lineDash:null,lineWidth:1,stroke:"rgba(0, 0, 0, 0.15)"}},line:{style:{lineWidth:1,stroke:"rgba(0, 0, 0, 0.45)"}},tickLine:{style:{lineWidth:1,stroke:"rgba(0, 0, 0, 0.45)",length:4,alignWithLabel:!0}},label:{offset:16,textStyle:{fill:"rgba(0,0,0,0.45)",fontSize:12}},title:{offset:12,style:{fill:"rgba(0, 0, 0, 0.65)",fontSize:12}}},radius:{label:{textStyle:{fill:"rgba(0,0,0,0.45)",fontSize:12}}}},legend:{flipPage:!1,position:"bottom-center",innerPadding:[16,16,16,16],margin:[0,24,24,24]},label:{offset:12,textStyle:{fill:"#595959"},style:{fill:"#595959",stroke:"#ffffff",lineWidth:2}},tooltip:{"g2-tooltip":{boxShadow:"0px 0px 8px rgba(0,0,0,0.15)"}}},Sp={backgroundStyle:{fill:"#262626"},defaultColor:"#5B8FF9",width:400,height:400,bleeding:[_p,24,wp,24],padding:"auto",title:{padding:[24,24,24,24],fontFamily:"PingFang SC",fontSize:18,fontWeight:"bold",fill:"rgba(255,255,255,0.65)",stroke:"rgba(0,0,0,0.95)",textAlign:"left",textBaseline:"top",lineHeight:20,alignWithAxis:!1},description:{padding:[10,24,bp,24],fontFamily:"PingFang SC",fontSize:12,fill:"rgba(255, 255, 255, 0.65)",stroke:"rgba(0,0,0,0.95)",textAlign:"left",textBaseline:"top",lineHeight:16,alignWithAxis:!1},axis:{y:{visible:!0,position:"left",autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!0,grid:{visible:!0,style:{stroke:"rgba(255, 255, 255, 0.15)",lineWidth:1,lineDash:[0,0]}},line:{visible:!1,style:{stroke:"rgba(255, 255, 255, 0.45)",lineWidth:1}},tickLine:{visible:!1,style:{stroke:"rgba(255, 255, 255, 0.45)",lineWidth:.5,length:4}},label:{visible:!0,offset:8,textStyle:{fill:"rgba(255, 255, 255, 0.45)",fontSize:12}},title:{visible:!1,offset:12,style:{fill:"rgba(255, 255, 255, 0.65)",fontSize:12,textBaseline:"bottom"}}},x:{visible:!0,position:"bottom",autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!1,grid:{visible:!1,style:{stroke:"rgba(255, 255, 255, 0.15)",lineWidth:1,lineDash:[0,0]}},line:{visible:!1,style:{stroke:"rgba(255, 255, 255, 0.45)"}},tickLine:{visible:!0,style:{length:4,stroke:"rgba(255, 255, 255, 0.45)",lineWidth:.5}},label:{visible:!0,textStyle:{fill:"rgba(255, 255, 255, 0.65)",fontSize:12},offset:16},title:{visible:!1,offset:12,style:{fill:"rgba(255, 255, 255, 0.65)",fontSize:12}}},circle:{autoHideLabel:!1,autoRotateLabel:!0,autoRotateTitle:!0,grid:{style:{lineDash:null,lineWidth:1,stroke:"#E3E8EC"}},line:{style:{lineWidth:1,stroke:"#BFBFBF"}},tickLine:{style:{lineWidth:1,stroke:"#bdc8d3",length:4,alignWithLabel:!0}},label:{offset:16,textStyle:{fill:"#a0a4aa",fontSize:12}},title:{offset:12,style:{fill:"#767b84",fontSize:12}}},radius:{label:{offset:12,textStyle:{fill:"#a0a4aa",fontSize:12}}}},legend:{flipPage:!1,position:"bottom-center",innerPadding:[16,16,16,16]},label:{offset:12,textStyle:{fill:"rgba(255, 255, 255, 0.65)"},style:{fill:"rgba(255, 255, 255, 0.65)",lineWidth:1}},tooltip:{"g2-tooltip":{backgroundColor:"rgba(33,33,33, 0.95)",boxShadow:"0px 0px 8px rgba(0,0,0,0.65)",color:"rgba(255, 255, 255, 0.65)"}}},kp={default:Mp,dark:Sp};function Op(t){void 0===t&&(t="default");var e=kp[t.toLowerCase()];return e||(console.warn("error in theme: Can't find the theme named %s. Please register theme first.",t),Mp)}var Cp={};function Ap(t,e){Cp[t.toLowerCase()]=e}function Lp(t){return Cp[t.toLowerCase()]||{}}function Pp(t){var e=E["clone"](t);return e.legend||(e.legend={}),e}function jp(t){t.line&&!1===t.line.visible&&(t.line=null),t.grid&&!1===t.grid.visible&&(t.grid=null),t.tickLine&&!1===t.tickLine.visible&&(t.tickLine=null),t.title&&!1===t.title.visible&&(t.title=null),t.label&&!1===t.label.visible&&(t.label=null)}var Tp={axis:{x:{category:{constraints:[{name:"elementDist"}],rules:{elementDist:[{name:"textWrapper",option:{lineNumber:2}},{name:"textRotation",option:{degree:45}},{name:"textRotation",option:{degree:90}},{name:"textAbbreviate",option:{abbreviateBy:"end"}},{name:"textHide"}]}},linear:{constraints:[{name:"elementDist"}],rules:{elementDist:[{name:"nodesResampling",option:{keep:["end"]}},{name:"textRotation",option:{degree:45}},{name:"textRotation",option:{degree:90}},{name:"robustAbbrevaite",option:{unit:"thousand",decimal:1,abbreviateBy:"end"}},{name:"textHide"}]}},dateTime:{constraints:[{name:"elementDist"}],rules:{elementDist:[{name:"datetimeStringAbbrevaite"},{name:"nodesResamplingByAbbrevate",option:{keep:["end"]}},{name:"textRotation",option:{degree:45}},{name:"textRotation",option:{degree:90}},{name:"nodesResampling"},{name:"nodesResampling"},{name:"textHide"}]}}},y:{linear:{constraints:[{name:"elementDistVertical"},{name:"elementWidth"}],rules:{elementDistVertical:[{name:"nodesResampling"},{name:"textHide"}],elementWidth:[{name:"digitsAbbreviate"},{name:"textHide"}]}},category:{constraints:[{name:"elementDistVertical"},{name:"elementWidth"}],rules:{elementDistVertical:[{name:"nodesResampling"},{name:"textHide"}],elementWidth:[{name:"textAbbreviate",option:{abbreviateBy:"end"}},{name:"textHide"}]}}}}},Bp={default:Tp};function Ip(t,e){Bp[t.toLowerCase()]=E["deepMix"]({},Tp,e)}function Dp(t){var e=Bp[t.toLowerCase()];return e||Tp}var Fp=mt.theme,Ep=function(){function t(){}return t.getGlobalTheme=function(t){return E["isString"](t)?Op(t):E["deepMix"]({},Op(),t)},t.prototype.getPlotTheme=function(t,e){var i=t.theme;return E["isString"](i)?E["deepMix"]({},Op(i),Lp(e)):E["deepMix"]({},Op(),Lp(e),i)},t.prototype.getTheme=function(t,e){var i=Pp(this.getPlotTheme(t,e)),n=E["deepMix"]({},Fp,i);return n},t.prototype.getResponsiveTheme=function(t){return Dp(t)||Dp("default")},t.prototype._processVisible=function(t){return jp(t.axis.left),jp(t.axis.right),jp(t.axis.top),jp(t.axis.bottom),t},t}(),Rp=Ep;function zp(t,e,i){void 0===i&&(i=0);var n=Math.max(0,Math.min(t.x+t.width+i,e.x+e.width+i)-Math.max(t.x-i,e.x-i)),r=Math.max(0,Math.min(t.y+t.height+i,e.y+e.height+i)-Math.max(t.y-i,e.y-i));return n*r}var Np=function(t){function e(e){var i=t.call(this,e)||this;return i.interactions=[],i.options=i.getOptions(e),i.initialOptions=E["deepMix"]({},i.options),i.paddingController=new vp({plot:i}),i.stateController=new ic({plot:i}),i.themeController=new Rp,i}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(t){return{renderer:"canvas",title:{visible:!1,text:""},description:{visible:!1,text:""},padding:"auto",legend:{visible:!0,position:"bottom-center"},tooltip:{visible:!0,shared:!0,crosshairs:{type:"y"}},xAxis:{visible:!0,autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!1,grid:{visible:!1},line:{visible:!0},tickLine:{visible:!0},label:{visible:!0},title:{visible:!1,offset:12}},yAxis:{visible:!0,autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!0,grid:{visible:!0},line:{visible:!1},tickLine:{visible:!1},label:{visible:!0},title:{visible:!1,offset:12}},label:{visible:!1}}},e.prototype.getOptions=function(e){var i=t.prototype.getOptions.call(this,e),n=this.constructor.getDefaultOptions(e);return E["deepMix"]({},i,n,e)},e.prototype.beforeInit=function(){t.prototype.beforeInit.call(this)},e.prototype.init=function(){var e=this;t.prototype.init.call(this),this.theme=this.themeController.getTheme(this.options,this.type),this.config={scales:{},legends:{},tooltip:{showTitle:!0,triggerOn:"mousemove",inPanel:!0,useHtml:!0},axes:{fields:{}},coord:{type:"cartesian"},elements:[],annotations:[],interactions:{},theme:this.theme,panelRange:{},animate:!0},this.paddingController.clear(),this.drawTitle(),this.drawDescription(),this.coord(),this.scale(),this.axis(),this.tooltip(),this.legend(),this.addGeometry(),this.annotation(),this.animation(),this.viewRange=this.getViewRange(),this.paddingController.clearOuterComponents(),this.view=new el({width:this.width,height:this.height,canvas:this.canvas,container:this.container,padding:this.paddingController.getPadding(),data:this.processData(this.options.data),theme:this.theme,options:this.config,start:{x:this.viewRange.minX,y:this.viewRange.minY},end:{x:this.viewRange.maxX,y:this.viewRange.maxY}}),this.applyInteractions(),this.view.on("afterrender",(function(){e.afterRender()}))},e.prototype.afterInit=function(){t.prototype.afterInit.call(this),this.view&&!this.view.destroyed&&"auto"!==this.options.padding&&this.parseEvents()},e.prototype.afterRender=function(){if(this.view&&!this.view.destroyed){var t=this.options,e=t.padding?t.padding:this.config.theme.padding;t.defaultState&&"auto"!==e&&this.stateController.defaultStates(t.defaultState),"canvas"===this.options.renderer&&this.addGeomCliper(),"auto"===e&&this.paddingController.processAutoPadding()}},e.prototype.render=function(){t.prototype.render.call(this);var e=this.options.data;E["isEmpty"](e)||this.view.render()},e.prototype.destroy=function(){this.doDestroy(),t.prototype.destroy.call(this)},e.prototype.updateConfig=function(t){this.doDestroy(),!t.padding&&this.initialOptions.padding&&"auto"===this.initialOptions.padding&&(t.padding="auto"),this.options=E["deepMix"]({},this.options,t),this.processOptions(this.options)},e.prototype.changeData=function(t){this.options.data=this.processData(t),this.view.changeData(this.options.data)},e.prototype.getPlot=function(){return this.view},e.prototype.getTheme=function(){return this.theme},e.prototype.getResponsiveTheme=function(){return this.themeController.getResponsiveTheme(this.type)},e.prototype.getPlotTheme=function(){return this.themeController.getPlotTheme(this.options,this.type)},e.prototype.bindStateManager=function(t,e){this.stateController.bindStateManager(t,e)},e.prototype.setActive=function(t,e){this.stateController.setState({type:"active",condition:t,style:e})},e.prototype.setSelected=function(t,e){this.stateController.setState({type:"selected",condition:t,style:e})},e.prototype.setDisable=function(t,e){this.stateController.setState({type:"disable",condition:t,style:e})},e.prototype.setNormal=function(t){this.stateController.setState({type:"normal",condition:t,style:{}})},e.prototype.getData=function(t,e){return this.processData((this.options.data||[]).slice(t,e))},e.prototype.processData=function(t){return t},e.prototype.scale=function(){var t=E["mapValues"](this.config.scales,(function(t){var e=t.type;return e?{type:e}:{}})),e=E["deepMix"]({},this.config.scales,this.options.meta||{},t);this.setConfig("scales",e)},e.prototype.axis=function(){var t=yc("axis",{plot:this,dim:"x"}),e=yc("axis",{plot:this,dim:"y"}),i={fields:{}};i.fields[this.options.xField]=t,i.fields[this.options.yField]=e,this.setConfig("axes",i)},e.prototype.tooltip=function(){!1!==this.options.tooltip.visible?(this.setConfig("tooltip",E["deepMix"]({},E["get"](this.options,"tooltip"))),E["deepMix"](this.config.theme.tooltip,this.options.tooltip.style)):this.setConfig("tooltip",!1)},e.prototype.legend=function(){if(!1!==this.options.legend.visible){var t=E["get"](this.options,"legend.flipPage"),e=E["get"](this.options,"legend.clickable");this.setConfig("legends",{position:E["get"](this.options,"legend.position"),formatter:E["get"](this.options,"legend.formatter"),offsetX:E["get"](this.options,"legend.offsetX"),offsetY:E["get"](this.options,"legend.offsetY"),clickable:!!E["isUndefined"](e)||e,flipPage:t,marker:E["get"](this.options,"legend.marker")})}else this.setConfig("legends",!1)},e.prototype.annotation=function(){var t=this,e=[];"cartesian"===this.config.coord.type&&this.options.guideLine&&E["each"](this.options.guideLine,(function(i){var n=yc("guideLine",{plot:t,cfg:i});e.push(n)})),this.setConfig("annotations",e)},e.prototype.animation=function(){!1!==this.options.animation&&"auto"!==this.options.padding||(this.config.animate=!1)},e.prototype.applyInteractions=function(){var t=this,e=this.options.interactions,i=void 0===e?[]:e;this.interactions&&this.interactions.forEach((function(t){t.destroy()})),this.interactions=[],i.forEach((function(e){var i=dp.getInteraction(e.type,t.type);if(i){var n=new i({view:t.view},t,i.getInteractionRange(t.layerBBox,e.cfg),e.cfg);t.interactions.push(n)}}))},e.prototype.setConfig=function(t,e){"element"!==t?!1!==e?E["assign"](this.config[t],e):this.config[t]=!1:this.config.elements.push(e)},e.prototype.parseEvents=function(e){var i=this,n=this.options;if(n.events){t.prototype.parseEvents.call(this,n.events);var r=e?e.EVENT_MAP:R;E["each"](n.events,(function(t,e){if(E["isFunction"](t)){var n=r[e]||e,a=t;Y(i,n,a)}}))}},e.prototype.drawTitle=function(){var t=this.options,e=this.layerBBox;if(this.title&&(this.title.destroy(),this.title=null),sh(t.title)){var i=this.width,n=this.config.theme,r=new hh({leftMargin:e.minX+n.title.padding[3],topMargin:e.minY+n.title.padding[0],text:t.title.text,style:E["mix"](n.title,t.title.style),wrapperWidth:i-n.title.padding[3]-n.title.padding[1],container:this.container.addGroup(),theme:n,index:sh(t.description)?0:1,plot:this,name:"title"});this.title=r,this.paddingController.registerPadding(r,"outer")}},e.prototype.drawDescription=function(){var t=this.options,e=this.layerBBox;if(this.description&&(this.description.destroy(),this.description=null),sh(t.description)){var i=this.width,n=this.config.theme,r=0;if(this.title){var a=this.title.getBBox();r+=a.minY+a.height,r+=n.description.padding[0]}else r+=e.minY+n.title.padding[0];var o=new hh({leftMargin:e.minX+n.description.padding[3],topMargin:r,text:t.description.text,style:E["mix"](n.description,t.description.style),wrapperWidth:i-n.description.padding[3]-n.description.padding[1],container:this.container.addGroup(),theme:n,index:1,plot:this,name:"description"});this.description=o,this.paddingController.registerPadding(o,"outer")}},e.prototype.doDestroy=function(){this.doDestroyInteractions(),this.view.destroyed||this.view.destroy()},e.prototype.doDestroyInteractions=function(){this.interactions&&this.interactions.forEach((function(t){t.destroy()})),this.interactions=[]},e.prototype.getViewRange=function(){var t=this,e=this.options.interactions,i=void 0===e?[]:e,n=this.layerBBox;i.forEach((function(e){var i=dp.getInteraction(e.type,t.type),r=i&&i.getInteractionRange(n,e.cfg),a="";r&&(r.bottom===n.bottom&&r.top>n.top?a="bottom":r.right===n.right&&r.left>n.left?a="right":r.left===n.left&&r.right>n.right?a="left":r.top===n.top&&r.bottom>n.bottom&&(a="top"),t.paddingController.registerPadding({getBBox:function(){return r},position:a},"outer"))}));var r=this.paddingController.processOuterPadding();return r},e.prototype.addGeomCliper=function(){var t=this.view.get("panelRange"),e=new F["Rect"]({attrs:{x:t.minX,y:t.minY,width:t.width,height:t.height}}),i=this.view.get("elements");E["each"](i,(function(t){var i=t.get("shapeContainer"),n=i.attr("clip");n&&n.remove(),i.attr("clip",e)}));var n=new F["BBox"](t.x,t.y,t.width,t.height);E["each"](this.getDataLabShapes(),(function(t){var e=t.getBBox();zp(n,e)<=0&&t.set("visible",!1)}))},e.prototype.getDataLabShapes=function(){var t=[];return this.view.get("elements").map((function(e){var i=e.get("labelController"),n=i.labelsContainer&&i.labelsContainer.get("labelsRenderer");n&&t.push.apply(t,n.getLabels()||[])})),t},e}(W),Yp=Np,Hp=i("6dd8"),Gp=function(){function t(t){var e=this;this.onResize=E["debounce"]((function(){if(!e.plot.destroyed){var t=e.getCanvasSize(),i=t.width,n=t.height;e.width!==i&&(e.width=i,e.height=n,e.plot.updateConfig({width:i,height:n}),e.plot.render())}}),300);var i=t.containerDOM,n=t.plot;this.containerDOM=i,this.plot=n,this.init()}return t.prototype.getCanvasSize=function(){var t=Op(),e=this.plot.width?this.plot.width:t.width,i=this.plot.height?this.plot.height:t.height;return this.plot.forceFit&&(e=this.containerDOM.offsetWidth?this.containerDOM.offsetWidth:e,i=this.containerDOM.offsetHeight?this.containerDOM.offsetHeight:i),{width:e,height:i}},t.prototype.getCanvasDOM=function(){return this.canvas.get("canvasDOM")},t.prototype.updateCanvasSize=function(){var t=this.getCanvasSize(),e=t.width,i=t.height;this.width=e,this.height=i,this.canvas.changeSize(e,i)},t.prototype.updateCanvasTheme=function(){var t=this.plot.theme,e=Rp.getGlobalTheme(t),i=E["get"](e,"backgroundStyle.fill");i&&this.updateCanvasStyle({backgroundColor:i})},t.prototype.updateCanvasStyle=function(t){Object(X["modifyCSS"])(this.getCanvasDOM(),t)},t.prototype.destroy=function(){this.resizeObserver&&(this.resizeObserver.unobserve(this.containerDOM),this.resizeObserver.disconnect(),this.containerDOM=null),this.canvas.destroy()},t.prototype.bindForceFit=function(){var t=this.plot.forceFit;t&&(this.resizeObserver=new Hp["a"](this.onResize),this.resizeObserver.observe(this.containerDOM))},t.prototype.init=function(){this.initGCanvas(),this.bindForceFit()},t.prototype.initGCanvas=function(){var t=this.plot,e=t.renderer,i=void 0===e?"canvas":e,n=t.pixelRatio,r=this.getCanvasSize(),a=r.width,o=r.height;this.canvas=new F["Canvas"]({containerDOM:this.containerDOM,width:a,height:o,renderer:i,pixelRatio:n}),this.width=a,this.height=o,this.updateCanvasTheme()},t}(),Wp=Gp;function Xp(t,e){return!(!t||!e||t!==e)}function Vp(t,e){return t.x>=e.minX&&t.x<=e.maxX&&t.y>=e.minY&&t.y<=e.maxY}var qp=function(){function t(t){this.plot=t.plot,this.canvas=t.canvas,this.pixelRatio=this.canvas.get("pixelRatio"),this.eventHandlers=[]}return t.prototype.bindEvents=function(){this.addEvent(this.canvas,"mousedown",E["wrapBehavior"](this,"onEvents")),this.addEvent(this.canvas,"mousemove",E["wrapBehavior"](this,"onMove")),this.addEvent(this.canvas,"mouseup",E["wrapBehavior"](this,"onEvents")),this.addEvent(this.canvas,"click",E["wrapBehavior"](this,"onEvents")),this.addEvent(this.canvas,"dblclick",E["wrapBehavior"](this,"onEvents")),this.addEvent(this.canvas,"contextmenu",E["wrapBehavior"](this,"onEvents")),this.addEvent(this.canvas,"wheel",E["wrapBehavior"](this,"onEvents"))},t.prototype.clearEvents=function(){var t=this.eventHandlers;E["each"](t,(function(t){t.target.off(t.type,t.handler)}))},t.prototype.addEvent=function(t,e,i){t.on(e,i),this.eventHandlers.push({target:t,type:e,handler:i})},t.prototype.onEvents=function(t){var e=this.getEventObj(t),i=t.target;i.isShape&&!this.isShapeInView(i)&&i.name&&this.plot.emit(i.name+":"+t.type,t),this.plot.emit(""+t.type,e);var n=this.plot.getLayers();n.length>0&&this.onLayerEvent(n,e,t.type)},t.prototype.onMove=function(t){var e=t.target,i=this.getEventObj(t);e.isShape&&!this.isShapeInView(e)&&e.name&&(this.plot.emit(e.name+":"+t.type,i),this.lastShape&&!Xp(e,this.lastShape)&&(this.lastShape&&this.plot.emit(this.lastShape.name+":mouseleave",i),this.plot.emit(e.name+":mouseenter",i)),this.lastShape=e),this.plot.emit("mousemove",i);var n=this.plot.getLayers();n.length>0&&this.onLayerEvent(n,i,"mousemove")},t.prototype.isShapeInView=function(t){var e=["frontgroundGroup","backgroundGroup","panelGroup"],i=t.get("parent");while(i){var n=i.get("name");if(n&&E["contains"](e,n))return!0;i=i.get("parent")}return!1},t.prototype.getEventObj=function(t){var e={x:t.x/this.pixelRatio,y:t.y/this.pixelRatio,target:t.target,event:t.event};return e},t.prototype.onLayerEvent=function(t,e,i){var n=this;E["each"](t,(function(t){var r=t.getGlobalBBox();if(Vp({x:e.x,y:e.y},r)){t.emit(""+i,e);var a=t.layers;a.length>0&&n.onLayerEvent(a,e,i)}}))},t}(),Up=qp,Zp={};function Qp(t,e){Zp[t.toLowerCase()]=e}function $p(t){return Zp[t.toLowerCase()]}var Kp=function(t){function e(e,i){var n=t.call(this)||this;return n.containerDOM="string"===typeof e?document.getElementById(e):e,n.forceFit=E["isNil"](i.forceFit)?E["isNil"](i.width)&&E["isNil"](i.height):i.forceFit,n.renderer=i.renderer||"canvas",n.pixelRatio=i.pixelRatio||null,n.width=i.width,n.height=i.height,n.theme=i.theme,n.canvasController=new Wp({containerDOM:n.containerDOM,plot:n}),n.width=n.canvasController.width,n.height=n.canvasController.height,n.canvas=n.canvasController.canvas,n.layers=[],n.destroyed=!1,n.createLayers(i),n.eventController=new Up({plot:n,canvas:n.canvasController.canvas}),n.eventController.bindEvents(),n.parseEvents(i),n}return Object(B["__extends"])(e,t),e.prototype.destroy=function(){this.eachLayer((function(t){t.destroy()})),this.canvasController.destroy(),this.eventController.clearEvents(),this.layers=[],this.destroyed=!0},e.prototype.repaint=function(){this.canvasController.canvas.draw()},e.prototype.updateConfig=function(t,e){if(void 0===e&&(e=!1),e)this.eachLayer((function(e){e instanceof Yp&&e.updateConfig(t)}));else{var i=this.layers[0];i instanceof W&&i.updateConfig(t)}t.width&&(this.width=t.width),t.height&&(this.height=t.height),t.theme&&(this.theme=t.theme),this.canvasController.updateCanvasSize(),this.canvasController.updateCanvasTheme()},e.prototype.changeData=function(t,e){if(void 0===e&&(e=!1),e)this.eachLayer((function(e){e instanceof Yp&&e.changeData(t)}));else{var i=this.layers[0];i instanceof Yp&&i.changeData(t)}},e.prototype.getPlotTheme=function(){var t=this.layers[0];return t.getPlotTheme()},e.prototype.getData=function(){var t=this.layers[0];return t.getData()},e.prototype.bindStateManager=function(t,e){this.eachLayer((function(i){i instanceof Yp&&i.bindStateManager(t,e)}))},e.prototype.setActive=function(t,e){this.eachLayer((function(i){i instanceof Yp&&i.setActive(t,e)}))},e.prototype.setSelected=function(t,e){this.eachLayer((function(i){i instanceof Yp&&i.setSelected(t,e)}))},e.prototype.setDisable=function(t,e){this.eachLayer((function(i){i instanceof Yp&&i.setDisable(t,e)}))},e.prototype.setNormal=function(t){this.eachLayer((function(e){e instanceof Yp&&e.setNormal(t)}))},e.prototype.getLayer=function(t){return void 0===t&&(t=0),this.layers[t]},e.prototype.getCanvas=function(){return this.canvasController.canvas},e.prototype.getLayers=function(){return this.layers},e.prototype.render=function(){this.eachLayer((function(t){return t.render()}))},e.prototype.eachLayer=function(t){E["each"](this.layers,t)},e.prototype.addLayer=function(t){var e=E["findIndex"](this.layers,(function(e){return e===t}));e<0&&this.layers.push(t)},e.prototype.createLayers=function(t){if(t.layers);else if(t.type){var e=$p(t.type),i=E["deepMix"]({},t,{canvas:this.canvasController.canvas,x:0,y:0,width:this.width,height:this.height}),n=new e(i);this.addLayer(n)}},e.prototype.parseEvents=function(t){var e=this,i=E["keys"](z);t.events&&E["each"](t.events,(function(t,n){if(E["contains"](i,n)&&E["isFunction"](t)){var r=z[n]||n,a=t;e.on(r,a)}}))},e}(D.a),Jp=Kp,tf=function(){function t(t){E["assign"](this,t),this.init()}return t.prototype.init=function(){this.config={type:this.type,position:{fields:this.positionFields},widthRatio:{column:this.widthRatio||.6,rose:.9999999,multiplePie:1/1.3}}},t}(),ef=tf,nf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.init=function(){var t=this.plot.options;this.config={type:"area",position:{fields:[t.xField,t.yField]},connectNulls:t.connectNulls||!1},t.smooth&&(this.config.shape={values:["smooth"]}),(this._getColorMappingField()||t.color)&&this.parseColor(),(t.areaStyle||t.area&&t.area.style)&&this.parseStyle()},e.prototype.parseColor=function(){var t=this.plot.options,e={},i=this._getColorMappingField();if(i&&(e.fields=i),E["has"](t,"color")){var n=t.color;E["isString"](n)?e.values=[n]:E["isFunction"](n)?e.callback=n:e.values=n}this.config.color=e},e.prototype.parseStyle=function(){var t=this.plot.options,e=t.areaStyle?t.areaStyle:t.area.style,i={};E["isFunction"](e)&&t.seriesField?(i.fields=[t.seriesField],i.callback=e):i.cfg=e,this.config.style=i},e.prototype._getColorMappingField=function(){for(var t=this.plot.options,e=["stackField","seriesField"],i=0,n=e;i<n.length;i++){var r=n[i];if(E["get"](t,r))return[t[r]]}},e}(ef),rf=nf,af=St;function of(t,e){var i=[];if(t.length){for(var n=0,r=t.length;n<r;n+=1){var a=t[n],o=0===n?"M":"L";i.push([o,a.x,a.y])}e&&i.push(["Z"])}return i}var sf=function(t,e,i,n){var r,a,o,s,l=[],u=!!n;if(u){o=[1/0,1/0],s=[-1/0,-1/0];for(var h=0,c=t.length;h<c;h++){var p=t[h];o=af.min([],o,p),s=af.max([],s,p)}o=af.min([],o,n[0]),s=af.max([],s,n[1])}h=0;for(var f=t.length;h<f;h++){p=t[h];if(i)r=t[h?h-1:f-1],a=t[(h+1)%f];else{if(0===h||h===f-1){l.push(p);continue}r=t[h-1],a=t[h+1]}var d=[];d=af.sub(d,a,r),d=af.scale(d,d,e);var g=af.distance(p,r),v=af.distance(p,a),y=g+v;0!==y&&(g/=y,v/=y);var m=af.scale([],d,-g),x=af.scale([],d,v),b=af.add([],p,m),_=af.add([],p,x);u&&(b=af.max([],b,o),b=af.min([],b,s),_=af.max([],_,o),_=af.min([],_,s)),l.push(b),l.push(_)}return i&&l.push(l.shift()),l};function lf(t,e,i){for(var n=!!e,r=[],a=0,o=t.length;a<o;a+=2)r.push([t[a],t[a+1]]);var s,l,u,h=sf(r,.4,n,i),c=r.length,p=[];for(a=0;a<c-1;a++)s=h[2*a],l=h[2*a+1],u=r[a+1],p.push(["C",s[0],s[1],l[0],l[1],u[0],u[1]]);return n&&(s=h[c],l=h[c+1],u=r[0],p.push(["C",s[0],s[1],l[0],l[1],u[0],u[1]])),p}function uf(t,e){return of(t,e)}function hf(t,e,i){var n=[],r=t[0],a=null;if(t.length<=2)return uf(t,e);E["each"](t,(function(t){a&&a.x===t.x&&a.y===t.y||(n.push(t.x),n.push(t.y),a=t)}));var o=i||[[0,0],[1,1]],s=lf(n,e,o);return s.unshift(["M",r.x,r.y]),s}var cf=mt.theme;function pf(t,e,i){var n=[[0,0],[1,1]],r=[],a=[];E["each"](t.points,(function(t){r.push(t[1]),a.push(t[0])})),a=e.parsePoints(a.reverse()),r=Ph(e.parsePoints(r));var o=i?hf(r,!1,n):ff(r),s=ff(a);s[0][0]="L";var l=o.concat(s);return l}function ff(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],r=0===i?"M":"L";e.push([r,n.x,n.y])}return e}function df(t){return"l(90) 0:"+t+" 1:#ffffff"}Ao("area","miniArea",{draw:function(t,e){var i=pf(t,this,!1),n=E["deepMix"]({},{lineJoin:"round",lineCap:"round"},t.style),r=e.addShape("path",{attrs:{path:i,fill:df(t.color||cf.defaultColor),opacity:t.opacity||.4},style:n});return r}}),Ao("area","miniAreaSmooth",{draw:function(t,e){var i=pf(t,this,!0),n=e.addShape("path",{attrs:{path:i,fill:df(t.color||cf.defaultColor),opacity:t.opacity||.5}});return n}});var gf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.init=function(){t.prototype.init.call(this),this.parseShape()},e.prototype.parseShape=function(){var t=this.plot.options;t.smooth?this.config.shape={values:["miniAreaSmooth"]}:this.config.shape={values:["miniArea"]}},e}(rf),vf=gf,yf={main:rf,mini:vf},mf=["colorField","stackField","groupField"],xf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.init=function(){this.type="interval",t.prototype.init.call(this);var e=this.plot.options;this._needParserColor()&&this.parseColor(),this.config.color||(this.config.color={values:["#5b8ff9"]});var i=this._getSizeProps(e);i&&this.parseSize(i);var n=this._getStyleProps(e);n&&this.parseStyle(n)},e.prototype.parseColor=function(){var t=this.plot.options,e=this._getColorMappingField(t),i={};e&&(i.fields=e),t.color&&(E["isString"](t.color)?i.values=[t.color]:E["isFunction"](t.color)?i.callback=t.color:E["isArray"](t.color)?i.values=t.color:E["isObject"](t.color)&&(i.fields=e,i.callback=function(e){return t.color[e]})),this.config.color=i},e.prototype.parseSize=function(t){var e=this.plot.options,i={};E["isFunction"](e[t])?(i.fields=[this.config.position.fields],i.callback=e[t]):i.values=[e[t]],this.config.size=i},e.prototype.parseStyle=function(t){var e=this.plot.options[t],i={};E["isFunction"](e)?(i.fields=[this.config.position.fields],i.callback=e):i.cfg=e,this.config.style=i},e.prototype._getSizeProps=function(t){for(var e=["columnSize","barSize"],i=0,n=e;i<n.length;i++){var r=n[i];if(E["get"](t,r))return r}},e.prototype._getStyleProps=function(t){for(var e=["columnStyle","barStyle","pieStyle","ringStyle"],i=0,n=e;i<n.length;i++){var r=n[i];if(E["get"](t,r))return r}},e.prototype._getColorMappingField=function(t){for(var e=0,i=mf;e<i.length;e++){var n=i[e];if(E["get"](t,n))return[t[n]]}},e.prototype._needParserColor=function(){var t=this.plot.options;if(t.color)return!0;for(var e=0,i=mf;e<i.length;e++){var n=i[e];if(t[n])return!0}return!1},e}(ef),bf=xf,_f={main:bf},wf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.init=function(){var t=this.plot.options;this.config={type:"line",position:{fields:[t.xField,t.yField]},connectNulls:t.connectNulls},t.lineSize&&this.parseSize(),t.smooth&&(this.config.shape={values:["smooth"]}),t.step&&(this.config.shape={values:[t.step]}),(t.seriesField||t.color)&&this.parseColor(),t.lineStyle&&this.parseStyle()},e.prototype.parseSize=function(){var t=this.plot.options.lineSize,e={};E["isFunction"](t)?e.callback=t:e.values=[t],this.config.size=e},e.prototype.parseColor=function(){var t=this.plot.options,e={};if(t.seriesField&&(e.fields=[t.seriesField]),E["has"](t,"color")){var i=t.color;E["isString"](i)?e.values=[i]:E["isFunction"](i)?e.callback=i:e.values=i}this.config.color=e},e.prototype.parseStyle=function(){var t=this.plot.options,e=t.lineStyle,i={fields:null,callback:null,cfg:null};E["isFunction"](e)&&t.seriesField?(i.fields=[t.seriesField],i.callback=e):i.cfg=e,this.config.style=i},e}(ef),Mf=wf,Sf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.init=function(){var t=this.plot.options;t.xField&&t.yField&&(this.config={type:"line",position:{fields:[t.xField,t.yField]},tooltip:!1},(this._getColorMappingField()||this._needParseAttribute("color"))&&this.parseColor(),this._needParseAttribute("size")&&this.parseSize(),t.line.style&&this.parseStyle(),t.smooth&&(this.config.shape={values:["smooth"]}))},e.prototype.parseSize=function(){var t=this.plot.options,e={};t.line.size?e.values=[t.line.size]:e.values=[2],this.config.size=e},e.prototype.parseColor=function(){var t=this.plot.options,e={},i=this._getColorMappingField();i&&(e.fields=i),t.line.color?e.values=[t.line.color]:(i||(i=this.config.position.fields),E["isString"](t.color)?e.values=[t.color]:E["isFunction"](t.color)?(e.fields=i,e.callback=t.color):E["isArray"](t.color)&&(e.fields=i,e.values=t.color)),this.config.color=e},e.prototype.parseStyle=function(){var t=this.plot.options,e=t.line.style,i={};E["isFunction"](e)?(i.fields=this.config.position.fields,i.callback=e):i.cfg=e,this.config.style=i},e.prototype._needParseAttribute=function(t){var e=this.plot.options,i=!e.line||e.line[t];return i},e.prototype._getColorMappingField=function(){for(var t=this.plot.options,e=["stackField","seriesField"],i=0,n=e;i<n.length;i++){var r=n[i];if(E["get"](t,r))return[t[r]]}},e}(Mf),kf=Sf,Of=mt.theme;Ao("line","miniLine",{draw:function(t,e){for(var i=Ph(t.points),n=[],r=0;r<i.length;r++){var a=i[r],o=0===r?"M":"L";n.push([o,a.x,a.y])}var s=E["deepMix"]({},{lineJoin:"round",lineCap:"round"},t.style),l=e.addShape("path",{attrs:E["mix"]({path:n,stroke:t.color||Of.defaultColor,lineWidth:t.size||2},s)});return l}}),Ao("line","miniLineSmooth",{draw:function(t,e){var i=Ph(t.points),n=[[0,0],[1,1]],r=hf(i,!1,n),a=e.addShape("path",{attrs:E["mix"]({path:r,stroke:t.color||Of.defaultColor,lineWidth:t.size||2},t.style)});return a}});var Cf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.init=function(){t.prototype.init.call(this),this.parseShape()},e.prototype.parseShape=function(){var t=this.plot.options;t.smooth?this.config.shape={values:["miniLineSmooth"]}:this.config.shape={values:["miniLine"]}},e}(Mf),Af=Cf,Lf={main:Mf,guide:kf,mini:Af},Pf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.init=function(){var t=this.plot.options;this.style=t.pointStyle,t.xField&&t.yField&&(this.config={type:"point",position:{fields:[t.xField,t.yField]}},this.parseColor(),this.parseSize(),t.shape&&this.parseShape(t.shape),t.pointStyle&&this.parseStyle())},e.prototype.parseColor=function(){var t=this.plot.options,e={},i=t.colorField;i&&(e.fields=E["isArray"](i)?i:[i]),t.color&&this._parseColor(t,e),this.config.color=e},e.prototype.parseSize=function(){var t=this.plot.options,e={};t.sizeField&&(e.fields=[t.sizeField]),t.pointSize&&(e.values=t.pointSize),this.config.size=e},e.prototype.parseShape=function(t){var e={values:[t]};this.config.shape=e},e.prototype.parseStyle=function(){var t=this.plot.options,e=t.pointStyle,i={fields:null,callback:null,cfg:null},n=t.xField,r=t.yField,a=t.colorField;E["isFunction"](e)?(i.fields=a?E["isArray"](a)?[n,r,a].concat(a):[n,r,a]:[n,r],i.callback=e):i.cfg=e,this.config.style=i},e.prototype._parseColor=function(t,e){E["isString"](t.color)?e.values=[t.color]:E["isFunction"](t.color)?e.callback=t.color:E["isArray"](t.color)&&(e.values=t.color)},e}(ef),jf=Pf;function Tf(t,e){var i=[];return E["each"](e,(function(e){var n=e[t];i.push(n)})),E["uniq"](i)}var Bf=["seriesField","stackField"],If=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.init=function(){var t=this.plot.options;this.style=t.point.style,t.xField&&t.yField&&(this.config={type:"point",position:{fields:[t.xField,t.yField]},tooltip:!1},this.parseColor(),this._needParseAttribute("size")&&this.parseSize(),t.point.shape&&this.parseShape(t.point.shape),t.point.style&&this.parseStyle())},e.prototype.parseColor=function(){var t=this.plot.options,e={},i=this._getColorMappingField(t);i?this._parseColorByField(t,e,i):t.point&&t.point.color?e.values=[t.point.color]:t.color&&this._parseColor(t,e),this.config.color=e},e.prototype.parseSize=function(){var t=this.plot.options,e={};e.values=[t.point.size],this.config.size=e},e.prototype.parseShape=function(t){var e={values:[t]};this.config.shape=e},e.prototype.parseStyle=function(){var t=this.plot.options,e=t.point&&t.point.style,i={fields:null,callback:null,cfg:null},n=this._getColorMappingField(t);E["isFunction"](e)&&n?(i.fields=[n],i.callback=e):i.cfg=e,this.config.style=i},e.prototype._parseColorByField=function(t,e,i){if(e.fields=[i],t.point.color){for(var n=Tf(i,t.data).length,r=[],a=0;a<n;a++)r.push(t.point.color);e.values=r}else t.color&&this._parseColor(t,e)},e.prototype._parseColor=function(t,e){E["isString"](t.color)?e.values=[t.color]:E["isFunction"](t.color)?e.callback=t.color:E["isArray"](t.color)&&(e.values=t.color)},e.prototype._needParseAttribute=function(t){var e=this.plot.options,i=e.point&&E["has"](e.point,t);return i},e.prototype._getColorMappingField=function(t){for(var e=0,i=Bf;e<i.length;e++){var n=i[e];if(E["get"](t,n))return[t[n]]}},e}(ef),Df=If,Ff={guide:Df,circle:jf},Ef={area:yf,line:Lf,point:Ff,interval:_f};function Rf(t,e,i){var n=Ef[t][e];return new n(i).config}function zf(t){var e=T,i=t.split(" "),n=e[i[1]],r=parseInt(i[0],10);return[n.format,r*n.value]}function Nf(t,e){if(!e)return t;Object.prototype.hasOwnProperty.call(e,"tickCount")&&(t.tickCount=e.tickCount),Object.prototype.hasOwnProperty.call(e,"type")&&"dateTime"!==e.type&&(t.type=e.type),Object.prototype.hasOwnProperty.call(e,"tickInterval")&&("time"===e.type?t.tickInterval=zf(e.tickInterval):t.tickInterval=e.tickInterval),"time"===e.type&&e.mask&&(t.mask=e.mask),Object.prototype.hasOwnProperty.call(e,"min")&&(t.min=e.min),Object.prototype.hasOwnProperty.call(e,"max")&&(t.max=e.max),Object.prototype.hasOwnProperty.call(e,"nice")&&(t.nice=e.nice),Object.prototype.hasOwnProperty.call(e,"formatter")&&(t.formatter=e.formatter),e.tickMethod&&(t.tickMethod=e.tickMethod)}function Yf(t,e){var i=Object(E["filter"])(e,(function(t){return Object(E["isNumber"])(t)})),n=Math.min.apply(Math,i),r=Math.max.apply(Math,i);n>0?Object(E["isNil"])(t.min)&&(t.min=0):r<=0&&Object(E["isNil"])(t.max)&&(t.max=0)}function Hf(t,e){var i=t.get("index"),n=t.get("coord"),r=t.get("scales"),a=r[e.yField],o=E["clone"](t.get("origin")),s=Gf(n);t.attr("clip",s),t.setSilent("animating",!0);var l=Vf(e.plot.view,o[0]._origin[e.seriesField]);l&&!l.get("destroyed")&&l.set("visible",!1);var u,h=t.get("parent"),c=12;e.seriesField&&(u=h.addShape("text",{attrs:{x:n.start.x+c,y:0,text:o[0]._origin[e.seriesField],fill:t.attr("stroke"),fontSize:12,textAlign:"start",textBaseline:"middle"}}));var p=u?16:0,f=h.addShape("text",{attrs:{x:n.start.x+c,y:p,text:"test"+i,fill:t.attr("stroke"),fontSize:12,textAlign:"start",textBaseline:"middle"}});e.callback=function(){t&&!t.get("destroyed")&&(t.attr("clip",null),t.setSilent("cacheShape",null),t.setSilent("animating",!1),s.remove(),f.animate({opacity:0},300,(function(){f.remove(),l&&!l.get("destroyed")&&(l.set("visible",!0),e.plot.canvas.draw())})),u&&f.animate({opacity:0},300,(function(){f.remove()})))};var d=e.delay;E["isFunction"](d)&&(d=e.delay(i));var g=e.easing;E["isFunction"](g)&&(g=e.easing(i));var v=0;s.animate({width:n.getWidth()},e.duration,g,e.callback,d),f.animate({onFrame:function(t){var e=Wf(t,o,n,v);if(e){f.attr("x",e[0]+c),f.attr("y",e[1]+p);var i=Xf(a,e[1],n);a.formatter&&(i=a.formatter(i)),f.attr("text",i)}}},e.duration,g,e.callback,d),u&&u.animate({onFrame:function(t){var e=Wf(t,o,n,v);e&&(u.attr("x",e[0]+c),u.attr("y",e[1]))}},e.duration,g,e.callback,d)}function Gf(t){var e=t.start,i=t.end,n=(t.width,t.height),r=new F["Shapes"].Rect({attrs:{x:e.x,y:i.y,width:0,height:n}});return r.set("isClip",!0),r}function Wf(t,e,i,n){for(var r=i.start.x+i.getWidth()*t,a=0;a<e.length-1;a++){var o=e[a],s=e[a+1];if(r>=o.x&&r<=s.x){var l=(s.y-o.y)/(s.x-o.x),u=o.y+l*(r-o.x);return[r,u]}}}function Xf(t,e,i){var n=(e-i.start.y)/(i.end.y-i.start.y);return t.invert(n).toFixed(2)}function Vf(t,e){var i,n=t.get("elements");return E["each"](n,(function(t){if("line"===t.get("type")&&t.get("labelController")){var n=t.get("labelController").labelsContainer;if(n){var r=n.get("labelsRenderer").getLabels();E["each"](r,(function(t){t.attr("text")===e&&(i=t)}))}}})),i}Hf.animationName="clipingWithData",ye.registerAnimation("appear","clipingWithData",Hf);var qf=function(){function t(t){this.type="shape",this.shapes=t.shapes,this.nodes=[],this._parserNodes(),this.origion_nodes=E["deepMix"]([],this.nodes)}return t.prototype.measure=function(t){var e=E["deepMix"]({},Ah(t),{shape:t});return e},t.prototype.measureNodes=function(){var t=this,e=[],i=[];E["each"](this.shapes,(function(n,r){var a=E["deepMix"]({},t.nodes[r],t.measure(n));0!==a.width&&0!==a.height&&(e.push(a),i.push(n))})),this.nodes=e,this.shapes=i},t.prototype.updateShapes=function(){},t.prototype._parserNodes=function(){var t=this;E["each"](this.shapes,(function(e){var i=t.measure(e);t.nodes.push(i)}))},t}(),Uf=qf;function Zf(t,e,i){return void 0===i&&(i={ratio:.6}),e.width*i.ratio}var Qf={type:"padding",usage:"assign",expression:Zf};function $f(t,e){var i=[t.topLeft,t.topRight,t.bottomRight,t.bottomLeft],n=[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft],r=Ch(i,n);return Math.round(r)>=2}var Kf={type:"group",usage:"compare",expression:$f};function Jf(t,e,i){void 0===i&&(i={value:4});var n=[t.topLeft,t.topRight,t.bottomRight,t.bottomLeft],r=[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft],a=Ch(n,r);return Math.round(a)>=i.value}var td={type:"chain",usage:"compare",expression:Jf};function ed(t,e,i){void 0===i&&(i={value:5});var n=Math.abs(t.bottom-e.top);return Math.round(n)>=i.value}var id={type:"chain",usage:"compare",expression:ed};function nd(t,e,i){return void 0===i&&(i={ratio:.15}),t.width<e.width*i.ratio}var rd={type:"padding",usage:"compare",expression:nd};function ad(t,e){var i=2,n=e.coord.radius/i;return Math.min(n,t.value)}var od={type:"padding",usage:"assign",expression:ad};function sd(t,e,i){return void 0===i&&(i={ratio:.8}),e.radius*i.ratio}var ld={type:"padding",usage:"assign",expression:sd},ud={elementDist:td,elementDistVertical:id,elementCollision:Kf,elementWidth:rd,columnWidth:Qf,ringThickness:ld,minRingThickness:od};function hd(t){t.attr("text","")}function cd(t,e,i,n){var r=n.nodes.nodes,a=r[i],o=[];if(!a.shape.get("blank"))for(var s=0;s<r.length;s++){var l=r[s],u=l.shape;if(s!==i&&!u.get("blank")){var h=pd(a,l);h&&o.push(l)}}o.length>0&&(o.push(a),o.sort((function(t,e){return e.top-t.top})),E["each"](o,(function(t,e){if(e>0){var i=t.shape;hd(i),i.set("blank",!0)}})))}function pd(t,e){return!(t.bottom<e.top||e.bottom<t.top)&&!(t.right<e.left||e.right<t.left)}var fd=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,dd="[1-9]\\d?",gd="\\d\\d",vd="\\d{3}",yd="\\d{4}",md="[^\\s]+",xd=/\[([^]*?)\]/gm;function bd(t,e){for(var i=[],n=0,r=t.length;n<r;n++)i.push(t[n].substr(0,e));return i}var _d=function(t){return function(e,i){var n=i[t].map((function(t){return t.toLowerCase()})),r=n.indexOf(e.toLowerCase());return r>-1?r:null}};function wd(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];for(var n=0,r=e;n<r.length;n++){var a=r[n];for(var o in a)t[o]=a[o]}return t}var Md=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Sd=["January","February","March","April","May","June","July","August","September","October","November","December"],kd=bd(Sd,3),Od=bd(Md,3),Cd={dayNamesShort:Od,dayNames:Md,monthNamesShort:kd,monthNames:Sd,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},Ad=wd({},Cd),Ld=function(t){return Ad=wd(Ad,t)},Pd=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},jd=function(t,e){void 0===e&&(e=2),t=String(t);while(t.length<e)t="0"+t;return t},Td={D:function(t){return String(t.getDate())},DD:function(t){return jd(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return jd(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return jd(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return jd(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return jd(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return jd(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return jd(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return jd(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return jd(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return jd(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return jd(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+jd(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)}},Bd=function(t){return+t-1},Id=[null,dd],Dd=[null,md],Fd=["isPm",md,function(t,e){var i=t.toLowerCase();return i===e.amPm[0]?0:i===e.amPm[1]?1:null}],Ed={D:["day",dd],DD:["day",gd],Do:["day",dd+md,function(t){return parseInt(t,10)}],M:["month",dd,Bd],MM:["month",gd,Bd],YY:["year",gd,function(t){var e=new Date,i=+(""+e.getFullYear()).substr(0,2);return+(""+(+t>68?i-1:i)+t)}],h:["hour",dd,void 0,"isPm"],hh:["hour",gd,void 0,"isPm"],H:["hour",dd],HH:["hour",gd],m:["minute",dd],mm:["minute",gd],s:["second",dd],ss:["second",gd],YYYY:["year",yd],S:["millisecond","\\d",function(t){return 100*+t}],SS:["millisecond",gd,function(t){return 10*+t}],SSS:["millisecond",vd],d:Id,dd:Id,ddd:Dd,dddd:Dd,MMM:["month",md,_d("monthNamesShort")],MMMM:["month",md,_d("monthNames")],a:Fd,A:Fd,ZZ:["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var i=60*+e[1]+parseInt(e[2],10);return"+"===e[0]?i:-i}return 0}]},Rd={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},zd=function(t){return wd(Rd,t)},Nd=function(t,e,i){if(void 0===e&&(e=Rd["default"]),void 0===i&&(i={}),"number"===typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");e=Rd[e]||e;var n=[];e=e.replace(xd,(function(t,e){return n.push(e),"@@@"}));var r=wd(wd({},Ad),i);return e=e.replace(fd,(function(e){return Td[e](t,r)})),e.replace(/@@@/g,(function(){return n.shift()}))};function Yd(t,e,i){if(void 0===i&&(i={}),"string"!==typeof e)throw new Error("Invalid format in fecha parse");if(e=Rd[e]||e,t.length>1e3)return null;var n=new Date,r={year:n.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},a=[],o=[],s=e.replace(xd,(function(t,e){return o.push(Pd(e)),"@@@"})),l={},u={};s=Pd(s).replace(fd,(function(t){var e=Ed[t],i=e[0],n=e[1],r=e[3];if(l[i])throw new Error("Invalid format. "+i+" specified twice in format");return l[i]=!0,r&&(u[r]=!0),a.push(e),"("+n+")"})),Object.keys(u).forEach((function(t){if(!l[t])throw new Error("Invalid format. "+t+" is required in specified format")})),s=s.replace(/@@@/g,(function(){return o.shift()}));var h=t.match(new RegExp(s,"i"));if(!h)return null;for(var c=wd(wd({},Ad),i),p=1;p<h.length;p++){var f=a[p-1],d=f[0],g=f[2],v=g?g(h[p],c):+h[p];if(null==v)return null;r[d]=v}1===r.isPm&&null!=r.hour&&12!==+r.hour?r.hour=+r.hour+12:0===r.isPm&&12===+r.hour&&(r.hour=0);for(var y=new Date(r.year,r.month,r.day,r.hour,r.minute,r.second,r.millisecond),m=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],x=(p=0,m.length);p<x;p++)if(l[m[p][0]]&&r[m[p][0]]!==y[m[p][1]]())return null;return null==r.timezoneOffset?y:new Date(Date.UTC(r.year,r.month,r.day,r.hour,r.minute-r.timezoneOffset,r.second,r.millisecond))}var Hd={format:Nd,parse:Yd,defaultI18n:Cd,setGlobalDateI18n:Ld,setGlobalDateMasks:zd},Gd=Hd,Wd=1e3,Xd=60*Wd,Vd=60*Xd,qd=24*Vd,Ud=31*qd,Zd=365*qd;function Qd(t,e,i,n){var r,a=n.nodes.nodes;r=i===a.length-1?a[i-1].shape.get("origin").text:a[i+1].shape.get("origin").text;var o=new Date(r),s=t.get("origin").text,l=new Date(s),u=a[0].shape.get("origin").text,h=new Date(u),c=a[a.length-1].shape.get("origin").text,p=new Date(c),f=Kd(h,p),d=Kd(l,o);if(f!==d){if(0!==i){var g=a[i-1].shape.get("origin").text,v=new Date(g),y=$d(f,l,v);if(y){m=Jd(f,d);return void t.attr("text",Gd.format(l,m))}}}else if(0!==i&&i!==a.length-1){var m=tg(f);t.attr("text",Gd.format(l,m))}}function $d(t,e,i){var n=eg(e,t),r=eg(i,t);return n===r}function Kd(t,e){var i,n=Math.abs(t-e),r={minute:[Xd,Vd],hour:[Vd,qd],day:[qd,Ud],month:[Ud,Zd],year:[Zd,1/0]};return E["each"](r,(function(t,e){n>=t[0]&&n<t[1]&&(i=e)})),i}function Jd(t,e){for(var i=["year","month","day","hour","minute"],n=["YYYY","MM","DD","HH","MM"],r=i.indexOf(t)+1,a=i.indexOf(e),o="",s=r;s<=a;s++)o+=n[s],s<a&&(o+="-");return o}function tg(t){var e=["year","month","day","hour","minute"],i=["YYYY","MM","DD","HH","MM"],n=e.indexOf(t),r=i[n];return r}function eg(t,e){return"year"===e?t.getFullYear():"month"===e?t.getMonth()+1:"day"===e?t.getDay()+1:"hour"===e?t.getHours()+1:"minute"===e?t.getMinutes()+1:void 0}function ig(t){var e=/^(?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]$/,i=/^(?:(?:[0-2][0-3])|(?:[0-1][0-9])):[0-5][0-9]:[0-5][0-9]$/;return e.test(t)||i.test(t)}var ng={k:{number:1e3,index:0},m:{number:1e6,index:1},b:{number:1e9,index:2},t:{number:1e12,index:3}};function rg(t,e,i,n){if(E["has"](n,"node")&&E["has"](n.node,"node")){var r=n.nodes.nodes,a=parseFloat(t.get("origin").text);if(0!==a)if(e.formatter)t.attr("text",e.formatter(a));else if(e.unit){var o=ag(e,a),s=o.num,l=o.unitname;t.attr("text",s+l)}else{var u=sg(r),h=Th(u),c=(l=og(h),ng[l].number),p=lg(r),f=ug(p,c);s=ag({unit:l,decimal:f},a).num;t.attr("text",s+l)}}}function ag(t,e){var i,n,r=["k","m","b","t"];if("auto"===t.unit){var a=Math.floor(Math.log(e)/Math.log(1e3));n=r[a-1],i=(e/Math.pow(1e3,a)).toFixed(t.decimal)}else if(t.unit){var o=ng[t.unit];n=t.unit,i=(e/o.number).toFixed(t.decimal)}return{num:i,unitname:n}}function og(t){var e=["k","m","b","t"],i=Math.floor(Math.log(t)/Math.log(1e3));return e[i-1]}function sg(t){var e=[];return E["each"](t,(function(t){var i=t,n=parseFloat(i.shape.get("origin").text);e.push(n)})),e}function lg(t){if(t.length>=2){var e=parseFloat(t[0].shape.get("origin").text),i=parseFloat(t[1].shape.get("origin").text);return Math.abs(e-i)}return 0}function ug(t,e){var i=Math.floor(Math.log10(e));if(!(t>=e)){var n=Math.floor(Math.log10(t));return Math.abs(n-i)}var r=t%e;if(r>0){var a=Math.floor(Math.log10(r));return Math.abs(a-i)}return 0}function hg(t,e,i,n){var r=n.nodes.nodes;if(i!==r.length-1){var a=r[i],o=r[i+1],s=cg(a,o),l=s.dir,u=(s.distX,s.distY,t.get("startPoint"));"x"===l&&t.attr("y",u.y+20)}}function cg(t,e){var i,n={x:e.centerX-t.centerX,y:e.centerY-t.centerY},r=Math.sqrt(n.x*n.x+n.y*n.y),a={x:10,y:0},o=Math.sqrt(a.x*a.x+a.y*a.y),s=mh(n,a),l=s/(r*o)*180/Math.PI;l<0&&(l=360-l),l=pg(l);var u=Math.abs(t.centerX-e.centerX),h=Math.abs(t.centerY-e.centerY);return l>45?i="x":l<45&&(i="y"),{dir:i,distX:u,distY:h}}function pg(t){return t>90&&t<=180?180-t:t>180&&t<270?t-180:360-t}function fg(t,e,i,n){var r=n.nodes.nodes;if(0!==i){var a=r[i],o=r[i-1];if(pd(a,o)){var s=n.plot.plot.get("elements")[0],l=o.top-a.height/2,u=10;if(l-u>n.region.top){var h=a.shape.get("origin"),c=s.getShapeId(h),p=s.getShapes(),f=dg(c,p).get("box"),d=f.left+f.width/2,g=f.top,v=s.get("labelController").labelsContainer,y=v.addShape("path",{attrs:{path:[["M",d,g],["L",a.shape.attr("x"),l]],stroke:"#ccc",lineWidth:1}}),m={x:t.attr("x"),y:t.attr("y")};a.shape.attr("y",l-u),r[i]=n.nodes.measure(a.shape),r[i].line=y,r[i].origin_position=m}}}}function dg(t,e){var i;return E["each"](e,(function(e){var n=e,r=n.id;r===t&&(i=n)})),i}function gg(t,e,i,n){var r=n.nodes.nodes,a=r.length%2!==0;if(!vg(e.keep,i,r)){var o=i%2===0;(!a&&o||a&&!o)&&hd(t)}}function vg(t,e,i){var n=[];E["each"](t,(function(t){"start"===t?n.push(0===e):"end"===t?n.push(e===i.length-1):E["isNumber"](t)&&n.push(e===t)}));for(var r=0,a=n;r<a.length;r++){var o=a[r];if(!0===o)return!0}return!1}function yg(t,e,i,n){var r=n.nodes.nodes;if(!vg(e.keep,i,r)){var a=t.attr("text"),o=t.get("origin").text;a!==o&&hd(t)}}function mg(t,e,i,n){var r=n.nodes.nodes,a=bg(r);if(!(i<=1)){var o=r[i],s=xg(i,r),l=s.centerX-o.centerX,u=s.centerY-o.centerY,h=Math.sqrt(l*l+u*u);h<a&&(hd(t),t.set("blank",!0))}}function xg(t,e){for(var i=t-1;i>0;i--){var n=e[i];if(!n.shape.get("blank"))return n}}function bg(t){var e=E["deepMix"]([],t);return e.sort((function(t,e){return e.width-t.width})),Math.round(e[0].width)}function _g(t,e,i,n){var r=n.nodes.nodes,a=r[i];a.line&&a.line.remove();var o=n.plot.initialProps.data,s=n.plot[n.plot.type].label.fields[0],l=wg(o,s,r),u=!1;if(E["each"](l,(function(t){t.shape.get("origin")===a.shape.get("origin")&&(u=!0)})),u){if(a.origin_position){var h=a.origin_position,c=h.x,p=h.y;t.attr("x",c),t.attr("y",p)}}else hd(t)}function wg(t,e,i){var n=[];E["each"](t,(function(t){n.push(t[e])})),n.sort((function(t,e){return t-e}));var r=n[0],a=Sg(i,e,r),o=n[n.length-1],s=Sg(i,e,o),l=Mg(n),u=Sg(i,e,l);return{min:a,max:s,median:u}}function Mg(t){var e=E["clone"](t);e.sort((function(t,e){return t-e}));var i=Math.floor(e.length/2);return e.length,e[i]}function Sg(t,e,i){for(var n=0,r=t;n<r.length;n++){var a=r[n],o=a.shape.get("origin");if(o[e]===i)return a}}function kg(t,e){var i,n=e.abbreviateBy?e.abbreviateBy:"end",r=t.attr("text");"end"===n&&(i=r[0]+"..."),"start"===n&&(i="..."+r[r.length-1]),"middle"===n&&(i=r[0]+"..."+r[r.length-1]),t.resetMatrix(),t.attr({text:i,textAlign:"center",textBaseline:"top"})}function Og(t,e,i,n){var r=n.nodes.nodes,a=t.attr("text"),o=/^\d+$/.test(a);o?rg(t,e,i,r):ig(a)?Qd(t,e,i,r):kg(t,e)}function Cg(t,e){t.resetMatrix(),t.attr({rotate:360-e.degree,textAlign:"right",textBaseline:"middle"})}function Ag(t,e){for(var i=t.attr("text"),n=Math.ceil(i.length/e.lineNumber),r="",a=1;a<e.lineNumber;a++){var o=n*a;r=i.slice(0,o)+"\n"+i.slice(o)}var s=t.attr("fontSize");t.attr({text:r,lineHeight:s,textAlign:"center",textBaseline:"top"})}var Lg={textWrapper:Ag,textRotation:Cg,textAbbreviate:kg,textHide:hd,digitsAbbreviate:rg,datetimeStringAbbrevaite:Qd,robustAbbrevaite:Og,nodesResampling:gg,nodesResamplingByAbbrevate:yg,nodesResamplingByChange:mg,nodesResamplingByState:_g,nodeJitter:hg,nodeJitterUpward:fg,clearOverlapping:cd};var Pg=function(){function t(t){this.iterationTime=10,this.iterationIndex=0,this.rulesLocker=[],this.constraintIndex=0,E["assign"](this,t),this.currentConstraint=this.constraints[0],this.rules&&(this.iterationTime=this.rules[this.currentConstraint.name].length),this._start(),this._run(),this._end()}return t.prototype._start=function(){this.onStart&&this.onStart(this.nodes)},t.prototype._iteration=function(){var t;t=(this.nodes.type,this.nodes),"shape"===t.type&&t.measureNodes(),this.rules&&this._applyRules(),"shape"===t.type&&t.measureNodes(),this.onIteration&&this.onIteration(this.nodes)},t.prototype._end=function(){this.onEnd&&this.onEnd(this.nodes)},t.prototype._run=function(){var t=this._constraintsTest();while(!t){if(this.iterationIndex>this.iterationTime-1)break;this._iteration(),t=this._constraintsTest(),this.iterationIndex++}this.constraintIndex<this.constraints.length-1&&(this.constraintIndex++,this.currentConstraint=this.constraints[this.constraintIndex],this.iterationTime=this.rules?this.rules[this.currentConstraint.name].length:1,this.iterationIndex=0,this._run())},t.prototype._constraintsTest=function(){var t=ud[this.currentConstraint.name],e=this.currentConstraint.option;return"compare"===t.usage?this._constraintCompare(t,e):this._constraintAssignment(t,e)},t.prototype._constraintCompare=function(t,e){var i=t.type,n=t.expression,r=this.nodes.nodes;return"chain"===i?this._chainConstraintCompare(n,r,e):"padding"===i?this._paddingConstraintCompare(n,this.region,r,e):"group"===i?this._groupConstraintCompare(n,r,e):void 0},t.prototype._chainConstraintCompare=function(t,e,i){for(var n=0;n<e.length-1;n++){var r=e[n],a=e[n+1];if(!1===t(r,a,i))return!1}return!0},t.prototype._paddingConstraintCompare=function(t,e,i,n){if(e)for(var r=0,a=i;r<a.length;r++){var o=a[r];if(!1===t(o,e,n))return!1}return!0},t.prototype._groupConstraintCompare=function(t,e,i){for(var n=0;n<e.length;n++)for(var r=e[n],a=0;a<e.length;a++)if(a!==n){var o=e[a];if(!1===t(r,o,i))return!1}return!0},t.prototype._constraintAssignment=function(t,e){var i=t.type,n=t.expression,r=this.nodes.nodes;return"chain"===i?this._chainConstraintAssign(n,r,e):"padding"===i?this._paddingConstraintAssign(n,this.region,r,e):void 0},t.prototype._chainConstraintAssign=function(t,e,i){return!0},t.prototype._paddingConstraintAssign=function(t,e,i,n){if(e)for(var r=0,a=i;r<a.length;r++){var o=a[r],s=t(o,e,n);o.value=s}return!0},t.prototype._applyRules=function(){for(var t=this.rules[this.currentConstraint.name][this.iterationIndex],e=Lg[t.name],i=t.option?t.option:{},n=this.nodes.nodes,r=0;r<n.length;r++){var a=n[r];this._applyRule(a.shape,e,i,r)}},t.prototype._applyRule=function(t,e,i,n){var r={nodes:this.nodes,region:this.region,plot:this.plot};e(t,i,n,r)},t}(),jg=Pg,Tg=function(){function t(t){E["assign"](this,t),this.init()}return t.prototype.init=function(){this.type=this.getType(),this.shouldApply()&&this.apply()},t}(),Bg=Tg,Ig={cat:"category",timeCat:"category",time:"dateTime",linear:"linear"};function Dg(t,e){var i=null;e.get("group").get("children").forEach((function(t){if("axis-ticks"===t.name)return i=t,!1}));var n=e.get("ticks"),r=e.get("tickItems"),a=[];E["each"](n,(function(t){var e=t;a.push(e.text)}));var o=[];E["each"](t.nodes,(function(t){var e=t;if(e.width>0&&e.height>0){var i=e.shape.get("origin").text,n=a.indexOf(i),s=r[n];o.push(["M",s.x1,s.y1],["L",s.x2,s.y2])}})),0===o.length&&(o=[["M",0,0]]),i.attr("path",o)}var Fg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.init=function(){this.axisInstance=this.getAxisInstance(),t.prototype.init.call(this)},e.prototype.shouldApply=function(){return!!this.responsiveTheme.axis&&!!(this.responsiveTheme.axis[this.dim]&&this.type&&this.axisInstance&&this.axisInstance.get("labelRenderer"))},e.prototype.apply=function(){for(var t=this.axisInstance,e=t.get("labelRenderer").get("group").get("children"),i=[],n=0;n<e.length-1;n++)i.push(e[n]);var r=new Uf({shapes:i}),a=this.responsiveTheme.axis.x[this.type],o=a.constraints,s=a.rules;new jg({nodes:r,constraints:o,region:this.plot.view.get("viewRange"),rules:s,plot:this.plot,onEnd:function(e){t.get("tickLine")&&Dg(e,t)}})},e.prototype.getType=function(){var t=this.plot.options,e=this.dim+"Axis",i=this.dim+"Field";if(t[e]&&t[e].type&&"dateTime"===t[e].type)return"dateTime";var n=this.plot.view.get("scales")[t[i]].type;return Ig[n]},e.prototype.getAxisInstance=function(){var t="x"===this.dim?0:1,e=this.plot.view.get("axisController").axes[t];return e},e}(Bg),Eg=Fg;function Rg(t){var e=t.getResponsiveTheme(),i=t.canvas;new Eg({plot:t,responsiveTheme:e,dim:"x"}),new Eg({plot:t,responsiveTheme:e,dim:"y"});i.draw()}var zg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.shouldApply=function(){return!(!this.responsiveTheme.label||!this.responsiveTheme.label[this.type])},e.prototype.apply=function(){var t=this.plot.view.get("elements")[0].get("labels"),e=new Uf({shapes:t}),i=this.responsiveTheme.label[this.type],n=i.constraints,r=i.rules;new jg({nodes:e,constraints:n,rules:r,plot:this.plot,region:this.plot.view.get("viewRange")})},e.prototype.getType=function(){return null},e}(Bg),Ng=zg,Yg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.getType=function(){var t=this.plot.options;return t.label&&t.label.type?t.label.type:"point"},e}(Ng);function Hg(t){var e=t.getResponsiveTheme();new Yg({plot:t,responsiveTheme:e})}var Gg=[],Wg=[{name:"responsiveAxis",method:Rg},{name:"responsivePointLabel",method:Hg}],Xg={preRender:Gg,afterRender:Wg},Vg={label:{point:{constraints:[{name:"elementCollision"}],rules:{elementCollision:[{name:"nodesResamplingByChange"},{name:"clearOverlapping"}]}}}};Ip("line",Vg);var qg=i("e0ef"),Ug=i.n(qg),Zg=10,Qg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.showLabels=function(e,i){var n=this,r=[];Lt()(i,(function(t){var e=t.get("origin"),i=Ug()(e[e.length-1]),n=t.getBBox();i.x=n.maxX+Zg,r.push(i)})),t.prototype.showLabels.call(this,r,i);var a=this.get("labelsRenderer"),o=(this.get("labelOptions").fields[0],a.get("group").get("children")),s=this.get("element").get("view");Lt()(o,(function(t){t.attr("textAlign","left"),t.attr("textBaseline","middle");var e=t.get("origin"),r=n.get("element").getShapeId(e),a=n._adjustColor(r,i);t.attr("fill",a)})),s.get("canvas").draw()},e.prototype._adjustColor=function(t,e){var i;return Lt()(e,(function(e){var n=e.id;n===t&&(i=e.attr("stroke"))})),i},e}(bs);Ts("line",Qg);var $g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.showLabels=function(e,i){t.prototype.showLabels.call(this,e,i);var n=this.get("labelsRenderer"),r=(n.get("group").get("children"),this.get("element").get("view"));n.get("items").map((function(t){return{x:t.start.x-4,y:t.start.y-4,width:8,height:8}}));r.get("canvas").draw()},e}(bs);Ts("point",$g);var Kg={onLineClick:"line:click",onLineDoubleclick:"line:dblclick",onLineMousemove:"line:mousemove",onLineMouseenter:"line:mouseenter",onLineMouseleave:"line:mouseleave",onLineMousedown:"line:mousedown",onLineMouseup:"line:mouseup",onLineContextmenu:"line:contextmenu",onPointClick:"point:click",onPointDblclick:"point:dblclick",onPointMousemove:"point:mousemove",onPointMouseenter:"point:mouseenter",onPointMouseleave:"point:mouseleave",onPointMousedown:"point:mousedown",onPointMouseup:"point:mouseup",onPointContextmenu:"point:contextmenu"};E["assign"](R,Kg);var Jg=function(t){function e(e){return t.call(this,Object(B["__assign"])({processEvent:"mousemove"},e))||this}return Object(B["__extends"])(e,t),e.prototype.process=function(t){var e=t.target;if("line"===e.name){var i=t.data[0]._origin;this.view.setActive((function(t){return t===i}))}else this.view.setActive((function(){return!1}))},e}(Us),tv=Jg,ev=function(t){function e(e){return t.call(this,Object(B["__assign"])({endEvent:"click"},e))||this}return Object(B["__extends"])(e,t),e.prototype.end=function(t){var e=t.target;if("line"===e.name){var i=t.data[0]._origin;this.view.setInactive((function(t){return t!==i}))}else this.view.setInactive((function(){return!1}))},e}(Us),iv=ev,nv=function(t){var e=t.lineWidth||1;return{lineWidth:e+1}},rv=function(t){var e=t.opacity||1;return{opacity:.2*e}},av=function(t){var e=t.lineWidth||1;return{lineWidth:e+2}};Ap("line",{lineStyle:{normal:{},active:nv,disable:rv,selected:av},pointStyle:{normal:{},active:{},disable:{},selected:{}}});var ov={line:"line",point:"point"},sv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{connectNulls:!1,smooth:!1,lineSize:2,lineStyle:{lineJoin:"round",lineCap:"round"},point:{visible:!1,size:3,shape:"circle",style:{stroke:"#fff"}},label:{visible:!1,type:"point"},legend:{visible:!0,position:"top-left",wordSpacing:4}})},e.prototype.getOptions=function(e){var i=t.prototype.getOptions.call(this,e),n=this.constructor.getDefaultOptions();return E["deepMix"]({},i,n,e)},e.prototype.afterRender=function(){var e=this.options;e.responsive&&"auto"!==e.padding&&this.applyResponsive("afterRender"),t.prototype.afterRender.call(this)},e.prototype.geometryParser=function(t,e){return ov[e]},e.prototype.scale=function(){var e=this.options,i={};i[e.xField]={},E["has"](e,"xAxis")&&Nf(i[e.xField],e.xAxis),i[e.yField]={},E["has"](e,"yAxis")&&Nf(i[e.yField],e.yAxis),this.setConfig("scales",i),Yf(i[e.yField],E["map"](e.data,(function(t){return t[e.yField]}))),t.prototype.scale.call(this)},e.prototype.coord=function(){},e.prototype.addGeometry=function(){this.addLine(),this.addPoint()},e.prototype.addLine=function(){var t=this.options;this.line=Rf("line","main",{plot:this}),t.label&&this.label(),this.setConfig("element",this.line)},e.prototype.addPoint=function(){var t=this.options,e={visible:!1};t.point&&(t.point=E["deepMix"](e,t.point)),t.point&&t.point.visible&&(this.point=Rf("point","guide",{plot:this}),this.point.active=!1,this.setConfig("element",this.point))},e.prototype.label=function(){var t=this.options,e=t.label;!1===e.visible||this.singleLineLabelCheck()?this.line.label=!1:("line"===e.type&&(e.offset=0),this.line.label=yc("label",Object(B["__assign"])({plot:this,top:!0,labelType:e.type,fields:"line"===e.type?[t.seriesField]:[t.yField]},e)))},e.prototype.animation=function(){t.prototype.animation.call(this);var e=this.options;!1===e.animation?(this.line.animate=!1,this.point&&(this.point.animate=!1)):E["has"](e,"animation")&&"clipingWithData"===e.animation.type&&"auto"!==e.padding&&(this.line.animate={appear:{animation:"clipingWithData",easing:"easeLinear",duration:1e4,yField:e.yField,seriesField:e.seriesField,plot:this}},e.point&&e.point.visible&&(this.point.animate=!1))},e.prototype.applyInteractions=function(){t.prototype.applyInteractions.call(this);var e=this.view.get("interactions"),i=new tv({view:this.view});e.lineActive=i;var n=new iv({view:this.view});e.lineSelect=n},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,l)},e.prototype.applyResponsive=function(t){var e=this,i=Xg[t];E["each"](i,(function(t){var i=t;i.method(e)}))},e.prototype.singleLineLabelCheck=function(){return!this.options.seriesField&&this.options.label.type&&"line"===this.options.label.type},e}(Yp),lv=sv;Qp("line",sv);var uv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="line",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=lv.getDefaultOptions,e}(Jp),hv=uv;function cv(t){var e=t.getResponsiveTheme(),i=t.canvas;new Eg({plot:t,responsiveTheme:e,dim:"x"}),new Eg({plot:t,responsiveTheme:e,dim:"y"});i.draw()}var pv=[],fv=[{name:"responsiveAxis",method:cv}],dv={preRender:pv,afterRender:fv},gv={onAreaClick:"area:click",onAreaDblclick:"area:dblclick",onAreaMousemove:"area:mousemove",onAreaMouseenter:"area:mouseenter",onAreaMouseleave:"area:mouseleave",onAreaMousedown:"area:mousedown",onAreaMouseup:"area:mouseup",onAreaContextmenu:"area:contextmenu",onLineClick:"line:click",onLineDblclick:"line:dblclick",onLineMousemove:"line:mousemove",onLineMouseenter:"line:mouseenter",onLineMouseleave:"line:mouseleave",onLineMousedown:"line:mousedown",onLineMouseup:"line:mouseup",onLineContextmenu:"line:contextmenu",onPointClick:"point:click",onPointDblclick:"point:dblclick",onPointMousemove:"point:mousemove",onPointMouseenter:"point:mouseenter",onPointMouseleave:"point:mouseleave",onPointMousedown:"point:mousedown",onPointMouseup:"point:mouseup",onPointContextmenu:"point:contextmenu"};E["assign"](R,gv);var vv=function(t){var e=t.opacity||1;return{opacity:e}},yv=function(t){var e=t.opacity||1;return{opacity:.5*e}},mv=function(t){var e=t.opacity||1;return{opacity:e}},xv=function(t){var e=t.opacity||1;return{opacity:.5*e}},bv=function(t){var e=t.lineWidth||1;return{lineWidth:e+2}},_v=function(t){var e=t.fill||t.fillStyle,i=t.size||t.radius;return{radius:i+1,shadowBlur:i,shadowColor:e,stroke:e,strokeOpacity:1,lineWidth:1}},wv=function(t){var e=t.fill||t.fillStyle,i=t.size||t.radius;return{radius:i+2,shadowBlur:i,shadowColor:e,stroke:e,strokeOpacity:1,lineWidth:2}},Mv=function(t){var e=t.opacity||t.fillOpacity||1;return{opacity:.5*e}};Ap("area",{areaStyle:{normal:{},active:vv,disable:yv,selected:{lineWidth:1,stroke:"#333333"}},lineStyle:{normal:{},active:mv,disable:xv,selected:bv},pointStyle:{normal:{},active:_v,disable:Mv,selected:wv}});var Sv={area:"area",line:"line",point:"point"},kv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{smooth:!1,areaStyle:{opacity:.25,fillOpacity:1},line:{visible:!0,size:2,style:{opacity:1,lineJoin:"round",lineCap:"round"}},point:{visible:!1,size:4,shape:"point"},label:{visible:!1,type:"point"},legend:{visible:!0,position:"top-left",wordSpacing:4}})},e.prototype.beforeInit=function(){t.prototype.beforeInit.call(this),this.options.responsive&&"auto"!==this.options.padding&&this.applyResponsive("preRender")},e.prototype.afterRender=function(){this.options.responsive&&"auto"!==this.options.padding&&this.applyResponsive("afterRender"),t.prototype.afterRender.call(this)},e.prototype.geometryParser=function(t,e){return Sv[e]},e.prototype.scale=function(){var e=this.options,i={};i[e.xField]={type:"cat"},E["has"](e,"xAxis")&&Nf(i[e.xField],e.xAxis),i[e.yField]={},E["has"](e,"yAxis")&&Nf(i[e.yField],e.yAxis),this.setConfig("scales",i),t.prototype.scale.call(this)},e.prototype.coord=function(){},e.prototype.addGeometry=function(){var t=this.options,e=Rf("area","main",{plot:this});this.area=e,t.label&&this.label(),this.adjustArea(e),this.setConfig("element",e),this.addLine(),this.addPoint()},e.prototype.adjustArea=function(t){},e.prototype.adjustLine=function(t){},e.prototype.adjustPoint=function(t){},e.prototype.addLine=function(){var t=this.options,e=E["deepMix"]({},t.line);if(e.visible){var i=Rf("line","guide",{type:"line",plot:this,line:e});this.adjustLine(i),this.setConfig("element",i),this.line=i}},e.prototype.addPoint=function(){var t=this.options,e=E["deepMix"]({},t.point);if(e.visible){var i=Rf("point","guide",{plot:this});this.adjustPoint(i),this.setConfig("element",i),this.point=i}},e.prototype.animation=function(){t.prototype.animation.call(this);var e=this.options;!1===e.animation&&(this.area.animate=!1,this.line&&(this.line.animate=!1),this.point&&(this.point.animate=!1))},e.prototype.label=function(){var t=this.options,e=t.label;if(!1===e.visible)return this.line&&(this.line.label=!1),void(this.area.label=!1);this.area.label=yc("label",{fields:[t.yField],plot:this})},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,u)},e.prototype.applyResponsive=function(t){var e=this,i=dv[t];E["each"](i,(function(t){var i=t;i.method(e)}))},e}(Yp),Ov=kv;Qp("area",kv);var Cv={epanechnikov:function(t){return Math.abs(t)<=1?.75*(1-t*t):0},gaussian:function(t){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*Math.pow(t,2))},uniform:function(t){return Math.abs(t)<=1?.5:0},triangle:function(t){return Math.abs(t)<=1?1-Math.abs(t):0},quartic:function(t){var e=1-t*t;return Math.abs(t)<=1?15/16*e*e:0},triweight:function(t){var e=1-t*t;return Math.abs(t)<=1?15/16*Math.pow(e,3):0},cosinus:function(t){var e=Math.PI/4*Math.cos(.5*Math.PI*t);return Math.abs(t)<=1?e:0}},Av=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="density",e}return Object(B["__extends"])(e,t),e.prototype.init=function(){var e=this.options.xAxis?E["clone"](this.options.xAxis):{};this.options.xField="value",this.options.yField="density",this.options.xAxis=E["deepMix"]({},e,{type:"linear"}),this.options.smooth=!0,t.prototype.init.call(this)},e.prototype.processData=function(t){var e=this,i=this.options,n=i.binField,r=i.binWidth,a=i.binNumber,o=i.kernel,s=o||"epanechnikov",l=Cv[s],u=E["clone"](t);E["sortBy"](u,n);var h=E["valuesOfKey"](u,n),c=E["getRange"](h),p=c.max-c.min,f=a,d=r;!a&&r&&(f=Math.floor(p/r)),!r&&a&&(d=p/a),a||r||(f=Ih(h),d=p/a);var g=Pi("linear"),v=new g({min:c.min,max:c.max,tickCount:f,nice:!1}),y=v.getTicks(),m=[];return E["each"](y,(function(t){var i=e.kernelDensityEstimator(d,l,t,h);m.push({value:t.text,density:i})})),m},e.prototype.kernelDensityEstimator=function(t,e,i,n){var r=0;return E["each"](n,(function(n){var a=(i.tickValue-n)/t;r+=e(a)})),0===n.length?0:r/n.length},e}(Ov),Lv=Av;Qp("density",Av);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="density",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=Lv.getDefaultOptions})(Jp);function Pv(t){var e=[],i=t.get("coord"),n=t.get("origin").points;return E["each"](n,(function(t){e.push(i.convertPoint(t))})),e}var jv=function(){function t(t){E["deepMix"](this,this.constructor.getDefaultOptions(t),t),this._init()}return t.getDefaultOptions=function(t){var e=t.transpose;return{visible:!0,size:e?32:80,spacing:e?8:12,offset:e?32:0,arrow:{visible:!0,headSize:12,style:{fill:"rgba(0, 0, 0, 0.05)"}},value:{visible:!0,style:{fontSize:12,fill:"rgba(0, 0, 0, 0.85)"},formatter:function(t,e){return(100*e/t).toFixed(2)+"%"}},animation:E["deepMix"]({},ye.defaultCfg)}},t.prototype._init=function(){var t=this,e=this.view.get("backgroundGroup");this.container=e.addGroup(),this.draw(),this.view.on("beforerender",(function(){t.clear()}))},t.prototype.draw=function(){var t,e,i,n,r=this,a=this.transpose,o=this.view.get("scales")[this.field].values,s=this.view.get("elements")[0],l=s.getShapes();a?l.forEach((function(t,a){e=o[a],a++>0&&r._drawTag(i,n,t,e),n=e,i=t})):l.forEach((function(i,a){n=o[a],a++>0&&r._drawTag(i,n,t,e),e=n,t=i}))},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destory=function(){this.container&&this.container.remove()},t.prototype._drawTag=function(t,e,i,n){var r=this.transpose,a=Pv(t)[r?3:0],o=Pv(i)[r?0:3];this._drawTagArrow(a,o),this._drawTagValue(a,e,o,n)},t.prototype._drawTagArrow=function(t,e){var i,n=this.spacing,r=this,a=r.size,o=r.offset,s=r.animation,l=r.transpose,u=this.arrow.headSize,h=e.y-t.y,c=e.x-t.x;l?(c-u)/2<n?(n=Math.max(1,(c-u)/2),i=[[t.x+n,t.y-o],[t.x+n,t.y-o-a],[e.x-n,e.y-o-a/2]]):i=[[t.x+n,t.y-o],[t.x+n,t.y-o-a],[e.x-n-u,e.y-o-a],[e.x-n,e.y-o-a/2],[e.x-n-u,e.y-o]]:(h-u)/2<n?(n=Math.max(1,(h-u)/2),i=[[t.x+o,t.y+n],[t.x+o+a,t.y+n],[e.x+o+a/2,e.y-n]]):i=[[t.x+o,t.y+n],[t.x+o+a,t.y+n],[e.x+o+a,e.y-n-u],[e.x+o+a/2,e.y-n],[e.x+o,e.y-n-u]];var p=this.container.addShape("polygon",{name:"arrow",attrs:Object(B["__assign"])(Object(B["__assign"])({},this.arrow.style),{points:i})});!1!==s&&this._fadeInTagShape(p)},t.prototype._drawTagValue=function(t,e,i,n){var r=this,a=r.size,o=r.offset,s=r.animation,l=r.transpose,u=this.value.formatter(e,n),h=this.container.addShape("text",{name:"value",attrs:Object(B["__assign"])(Object(B["__assign"])({},this.value.style),{text:u,x:l?(t.x+i.x)/2:t.x+o+a/2,y:l?t.y-o-a/2:(t.y+i.y)/2,textAlign:"center",textBaseline:"middle"})});if(l){var c=i.x-t.x,p=h.getBBox().width;if(p>c){var f=p/u.length,d=Math.max(1,Math.ceil(c/f)-1),g=u.slice(0,d)+"...";h.attr("text",g)}}!1!==s&&this._fadeInTagShape(h)},t.prototype._fadeInTagShape=function(t){var e=this.animation,i=t.attr("opacity");t.attr("opacity",0);var n=E["get"](e,"appear",ye.defaultCfg.appear).duration;t.animate({opacity:i},n)},t}(),Tv=jv;function Bv(t){var e=t.getResponsiveTheme(),i=t.canvas;new Eg({plot:t,responsiveTheme:e,dim:"x"}),new Eg({plot:t,responsiveTheme:e,dim:"y"});i.draw()}var Iv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.getType=function(){return!this.plot.column.label||this.plot.column.label.position&&"top"!==this.plot.column.label.position?"inner":"top"},e}(Ng);function Dv(t){var e=t.getResponsiveTheme();new Iv({plot:t,responsiveTheme:e})}var Fv=[],Ev=[{name:"responsiveAxis",method:Bv},{name:"responsiveLabel",method:Dv}],Rv={preRender:Fv,afterRender:Ev},zv={label:{top:{constraints:[{name:"elementCollision"}],rules:{elementCollision:[{name:"nodeJitterUpward"},{name:"nodesResamplingByState",option:{keep:["min","max","median"]}},{name:"textHide"}]}}}};function Nv(t){var e=[];return e.push(parseInt(t.substr(1,2),16)),e.push(parseInt(t.substr(3,2),16)),e.push(parseInt(t.substr(5,2),16)),e}Ip("column",zv);var Yv=20,Hv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.setLabelPosition=function(t,e,i,n){var r=n;E["isFunction"](r)&&(r=r(e));var a=this.get("coord"),o=a.convertPoint(e.points[0]),s=a.convertPoint(e.points[2]),l=(o.y,s.y,(o.x-s.x)/2),u=(o.y-s.y)/2;switch(r){case"right":t.x-=l,t.y+=u,t.textAlign=t.textAlign||"left";break;case"left":t.x+=l,t.y+=u,t.textAlign=t.textAlign||"right";break;case"bottom":t.y+=2*u,t.textAlign=t.textAlign||"center";break;case"middle":t.y+=u,t.textAlign=t.textAlign||"center";break;case"top":t.textAlign=t.textAlign||"center";break;default:break}},e.prototype.adjustOffset=function(t,e){var i=this.get("labelsRenderer"),n=i.get("items"),r=i.get("group").get("children"),a=this.get("coord");E["each"](n,(function(e,i){var n=r[i],o=a.convertPoint(t[i].points[0]),s=a.convertPoint(t[i].points[2]),l=o.y<s.y;l&&(e.y+=2*e.offset,n.attr("textBaseline","top"),n.attr("y",n.attr("y")+2*e.offset))}))},e.prototype.showLabels=function(e,i){var n=this;t.prototype.showLabels.call(this,e,i),this.adjustOffset(e,i);var r=this.get("labelsRenderer"),a=r.get("group").get("children"),o=r.get("items"),s=this.get("element").get("view");E["each"](a,(function(t,e){var r=t,a=o[e],s=r.get("origin"),l=n.get("element").getShapeId(s),u=n._getShape(l,i),h=n.get("labelOptions"),c=h.adjustColor,p=h.adjustPosition;p&&n.adjustPosition(r,u,a),c&&n.adjustColor(r,u)})),s.get("canvas").draw()},e.prototype._getShape=function(t,e){var i;return E["each"](e,(function(e){var n=e,r=n.id;r===t&&(i=n)})),i},e.prototype.adjustPosition=function(t,e,i){var n=t.getBBox(),r=e.getBBox();if(r.height<=n.height&&"top"!==i.position){var a=r.minY-Yv;t.attr("y",a)}},e.prototype.adjustColor=function(t,e){var i=t.getBBox(),n=e.getBBox();if(i.minY>=n.minY&&i.maxY<=n.maxY){var r=e.attr("fill"),a=e.attr("opacity")?e.attr("opacity"):1,o=Nv(r),s=Math.round(.299*o[0]+.587*o[1]+.114*o[2])/a,l=[{from:0,to:85,color:"white"},{from:85,to:170,color:"#F6F6F6"},{from:170,to:255,color:"black"}],u=this._mappingColor(l,s);t.attr("fill",u),"black"!==u?(t.attr("stroke",null),t.attr("lineWidth",0)):(t.attr("stroke","white"),t.attr("lineWidth",2))}else if(i.maxY<n.minY){var h=this.get("theme"),c=E["get"](h,"label.textStyle.fill","black");t.attr("fill",c)}},e.prototype._mappingColor=function(t,e){var i;return E["each"](t,(function(t){var n=t;e>=n.from&&e<n.to&&(i=n.color)})),i},e}(bs);Ts("columnLabel",Hv);var Gv={onColumnClick:"interval:click",onColumnDblclick:"interval:dblclick",onColumnMousemove:"interval:mousemove",onColumnMouseenter:"interval:mouseenter",onColumnMouseleave:"interval:mouseleave",onColumnMousedown:"interval:mousedown",onColumnMouseup:"interval:mouseup",onColumnContextmenu:"interval:contextmenu"};E["assign"](R,Gv);var Wv=function(t){var e=t.opacity||1;return{opacity:.5*e}},Xv=function(t){var e=t.opacity||1;return{opacity:.5*e,fillOpacity:.5*e}};Ap("column",{columnStyle:{normal:{},active:Wv,disable:Xv,selected:{lineWidth:1,stroke:"black"}}});var Vv={column:"interval"},qv={interval:"column"},Uv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="column",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{xAxis:{visible:!0,tickLine:{visible:!1},title:{visible:!0}},yAxis:{title:{visible:!0},label:{visible:!0},grid:{visible:!0}},tooltip:{visible:!0,shared:!0,crosshairs:{type:"rect"}},label:{visible:!1,position:"top",adjustColor:!0},legend:{visible:!0,position:"top-left"},conversionTag:{visible:!1}})},e.prototype.getOptions=function(e){var i=t.prototype.getOptions.call(this,e),n=this.constructor.getDefaultOptions();return E["deepMix"]({},i,n,e)},e.prototype.beforeInit=function(){t.prototype.beforeInit.call(this),this.options.responsive&&"auto"!==this.options.padding&&this.applyResponsive("preRender")},e.prototype.afterRender=function(){var e=this.options;this.options.responsive&&"auto"!==this.options.padding&&this.applyResponsive("afterRender"),e.conversionTag.visible&&(this.conversionTag=new Tv(Object(B["__assign"])({view:this.view,field:e.yField,transpose:!0,animation:!1!==e.animation},e.conversionTag))),t.prototype.afterRender.call(this)},e.prototype.geometryParser=function(t,e){return"g2"===t?Vv[e]:qv[e]},e.prototype.scale=function(){var e=this.options,i={};i[e.xField]={type:"cat"},E["has"](e,"xAxis")&&Nf(i[e.xField],e.xAxis),i[e.yField]={},E["has"](e,"yAxis")&&Nf(i[e.yField],e.yAxis),this.setConfig("scales",i),t.prototype.scale.call(this)},e.prototype.coord=function(){},e.prototype.adjustColumn=function(t){},e.prototype.addGeometry=function(){var t=this.options,e=Rf("interval","main",{positionFields:[t.xField,t.yField],plot:this});t.conversionTag.visible&&(e.widthRatio.column=.4),t.label&&(e.label=this.extractLabel()),this.adjustColumn(e),this.column=e,this.setConfig("element",e)},e.prototype.animation=function(){t.prototype.animation.call(this),!1===this.options.animation&&(this.column.animate=!1)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,h)},e.prototype.extractLabel=function(){var t=this.options,e=this.getLabelOptionsByPosition(t.label.position),i=E["deepMix"]({},e,this.options.label);if(!1===i.visible)return!1;var n=yc("label",Object(B["__assign"])({plot:this,labelType:"columnLabel",fields:[this.options.yField]},i));return n},e.prototype.applyResponsive=function(t){var e=this,i=Rv[t];E["each"](i,(function(t){var i=t;i.method(e)}))},e.prototype.getLabelOptionsByPosition=function(t){return"middle"===t?{offset:0,style:{textBaseline:"middle"}}:"top"===t||"bottom"===t?{offset:4,style:{textBaseline:"bottom"}}:{offset:0}},e}(Yp),Zv=Uv;Qp("column",Uv);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="column",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=Zv.getDefaultOptions})(Jp);var Qv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.setLabelPosition=function(t,e,i,n){var r=n;E["isFunction"](r)&&(r=r(e));var a=e.size,o=(e.points[0],this.get("coord"),a),s=a;switch(r){case"right":t.x+=2*o,t.textAlign=t.textAlign||"left";break;case"left":t.x-=2*o,t.textAlign=t.textAlign||"right";break;case"bottom":t.y+=2*s,t.textAlign=t.textAlign||"center",t.textBaseline="top";break;case"middle":t.textBaseline="middle",t.textAlign=t.textAlign||"center";break;case"top":t.y-=2*s,t.textAlign=t.textAlign||"center",t.textBaseline="bottom";break;default:break}},e.prototype.showLabels=function(e,i){var n=this;t.prototype.showLabels.call(this,e,i);var r=this.get("labelsRenderer"),a=r.get("group").get("children"),o=r.get("items"),s=this.get("element").get("view");E["each"](a,(function(t,e){var r=t,a=o[e],s=r.get("origin"),l=n.get("element").getShapeId(s),u=n._getShape(l,i),h=n.get("labelOptions"),c=h.adjustColor,p=h.adjustPosition;p&&n.adjustPosition(r,u,a),c&&n.adjustColor(r,u)})),s.get("canvas").draw()},e.prototype._getShape=function(t,e){var i;return E["each"](e,(function(e){var n=e,r=n.id;r===t&&(i=n)})),i},e.prototype.adjustPosition=function(t,e,i){e.get("origin")._origin;var n=t.getBBox(),r=e.getBBox();(r.height<=n.height||r.width<=n.width&&"middle"===i.position)&&t.attr("text","")},e.prototype.adjustColor=function(t,e){var i=t.getBBox(),n=e.getBBox();if(i.minY>=n.minY&&i.maxY<=n.maxY){var r=e.attr("fill"),a=e.attr("opacity")?e.attr("opacity"):1,o=Nv(r),s=Math.round(.299*o[0]+.587*o[1]+.114*o[2])/a,l=[{from:0,to:85,color:"white"},{from:85,to:170,color:"#F6F6F6"},{from:170,to:255,color:"black"}],u=this._mappingColor(l,s);t.attr("fill",u)}else if(i.maxY<n.minY){var h=this.get("theme"),c=E["get"](h,"label.textStyle.fill","black");t.attr("fill",c)}},e.prototype._mappingColor=function(t,e){var i;return E["each"](t,(function(t){var n=t;e>=n.from&&e<n.to&&(i=n.color)})),i},e}(bs);Ts("scatterLabel",Qv);var $v={onPointClick:"point:click",onPointDblclick:"point:dblclick",onPointMousemove:"point:mousemove",onPointMouseenter:"point:mouseenter",onPointMouseleave:"point:mouseleave",onPointMousedown:"point:mousedown",onPointMouseup:"point:mouseup",onPointContextmenu:"point:contextmenu"};E["assign"](R,$v);var Kv=function(){function t(t){this.xBaseline=0,this.yBaseline=0,this.quadrantGroups=[],this.regionData=[],this.lineData=[],this.options=t,this.view=this.options.view,this.init()}return t.prototype.init=function(){var t,e=this,i=this.options,n=i.xBaseline,r=i.yBaseline,a=this.view.get("coord"),o=this.view.get("scales"),s=o[this.options.plotOptions.xField],l=o[this.options.plotOptions.yField];if(n>s.min&&n<s.max){var u=(n-s.min)/(s.max-s.min);t=[new F["BBox"](a.start.x,a.end.y,a.width*u,a.height),new F["BBox"](a.start.x+a.width*u,a.end.y,a.width*(1-u),a.height)];var h={start:{x:a.start.x+a.width*u,y:a.end.y},end:{x:a.start.x+a.width*u,y:a.start.y}};this.lineData.push(h)}else t=new F["BBox"](a.start.x,a.start.y,a.width,a.height);if(r>l.min&&r<l.max){var c=(r-l.min)/(l.max-l.min),p={start:{x:a.start.x,y:a.end.y+a.height*c},end:{x:a.end.x,y:a.end.y+a.height*c}};this.lineData.push(p),Object(E["each"])(t,(function(i,n){var r=["left","right"],a={name:t.length>1?"top-"+r[n]:"top",bbox:new F["BBox"](i.minX,i.minY,i.width,i.height*c)};e.regionData.push(a);var o={name:t.length>1?"bottom-"+r[n]:"bottom",bbox:new F["BBox"](i.minX,i.minY+i.height*c,i.width,i.height*(1-c))};e.regionData.push(o)}))}else if(2===t.length){var f={name:"left",bbox:t[0]};this.regionData.push(f);var d={name:"right",bbox:t[1]};this.regionData.push(d)}this.container=this.view.get("backgroundGroup").addGroup()},t.prototype.render=function(){var t=this;if(this.regionData.length>0){var e=this.getDefaultStyle(),i=this.getRegionStyle(this.regionData);Object(E["each"])(this.regionData,(function(n,r){var a=t.container.addGroup(),o=a.addShape("rect",{attrs:Object(B["__assign"])({x:n.bbox.minX,y:n.bbox.minY,width:n.bbox.width,height:n.bbox.height},i[r]),name:"quadrant"});if(t.options.label&&t.options.label.text){var s=Object(E["deepMix"])({},e.label,t.options.label),l=t.getLabelConfig(n,s,r);a.addShape("text",{attrs:Object(B["__assign"])({},l)})}o.setSilent("data",n),t.quadrantGroups.push(a)}));var n=Object(E["deepMix"])({},e.line,this.options.lineStyle);Object(E["each"])(this.lineData,(function(e){t.container.addShape("path",{attrs:Object(B["__assign"])({path:[["M",e.start.x,e.start.y],["L",e.end.x,e.end.y]]},n)})})),this.view.get("canvas").draw()}},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destroy=function(){this.container&&this.container.remove()},t.prototype.getDefaultStyle=function(){return{line:{stroke:"#9ba29a",lineWidth:1},region_2:[{fill:"#000000",opacity:.05},{fill:"#ffffff",opacity:0}],region_4:[{fill:"#000000",opacity:.05},{fill:"#ffffff",opacity:0},{fill:"#ffffff",opacity:0},{fill:"#000000",opacity:.05}],label:{position:"outter-inner",offset:10,style:{fontSize:14,fill:"#ccc"}}}},t.prototype.getRegionStyle=function(t){var e,i=t.length,n=this.getDefaultStyle();if(e=2===i?n.region_2:n.region_4,this.options.regionStyle){var r=this.options.regionStyle;Object(E["isArray"])(r)?e=e.map((function(t,e){return r.length>=e?r[e]:t})):Object(E["isFunction"])(r)&&Object(E["each"])(t,(function(t,i){e[i]=r(t)}))}return e},t.prototype.getLabelConfig=function(t,e,i){var n=0,r=0,a={},o=e.text;Object(E["isFunction"])(o)?o=o(t):Object(E["isArray"])(o)&&(o=o[i]);var s=e.position,l=s.split("-"),u=t.name.split("-");return"left"===u[1]?("inner"===l[0]&&(n=t.bbox.maxX-e.offset,a.textAlign="right"),"outter"===l[0]&&(n=t.bbox.minX+e.offset,a.textAlign="left")):"right"===u[1]&&("inner"===l[0]&&(n=t.bbox.minX+e.offset,a.textAlign="left"),"outter"===l[0]&&(n=t.bbox.maxX-e.offset,a.textAlign="right")),"top"===u[0]?("inner"===l[1]&&(r=t.bbox.maxY-e.offset,a.textBaseline="bottom"),"outter"===l[1]&&(r=t.bbox.minY+e.offset,a.textBaseline="top")):"bottom"===u[0]&&("inner"===l[1]&&(r=t.bbox.minY+e.offset,a.textBaseline="top"),"outter"===l[1]&&(r=t.bbox.maxY-e.offset,a.textBaseline="bottom")),a=Object(E["deepMix"])({},e.style,a),a.lineHeight=a.fontSize,Object(B["__assign"])({x:n,y:r,text:o},a)},t}(),Jv=Kv;function ty(t,e,i,n){t=t.filter(t=>{let n=e(t),r=i(t);return null!=n&&isFinite(n)&&null!=r&&isFinite(r)}),n&&t.sort((t,i)=>e(t)-e(i));const r=t.length,a=new Float64Array(r),o=new Float64Array(r);let s,l,u,h=0,c=0;for(let p=0;p<r;)u=t[p],a[p]=s=+e(u),o[p]=l=+i(u),++p,h+=(s-h)/p,c+=(l-c)/p;for(let p=0;p<r;++p)a[p]-=h,o[p]-=c;return[a,o,h,c]}function ey(t,e,i,n){let r=0;for(let a=0,o=t.length;a<o;a++){const o=t[a],s=+e(o),l=+i(o);null!=s&&isFinite(s)&&null!=l&&isFinite(l)&&n(s,l,r++)}}function iy(t,e,i,n,r){let a=0,o=0;return ey(t,e,i,(t,e)=>{const i=e-r(t),s=e-n;a+=i*i,o+=s*s}),1-a/o}function ny(t){return 180*Math.atan2(t[1][1]-t[0][1],t[1][0]-t[0][0])/Math.PI}function ry(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function ay(t,e,i){const n=Math.log(e-t)*Math.LOG10E+1|0,r=1*Math.pow(10,-n/2-1),a=1e4;let o=[l(t),l(e)],s=0;while(u(o)&&s<a);return o;function l(t){return[t,i(t)]}function u(t){s++;const e=t.length;let i=!1;for(let n=0;n<e-1;n++){const e=t[n],a=t[n+1],o=ry([e,a]),s=l(o[0]),u=ny([e,o]),h=ny([e,s]),c=Math.abs(u-h);c>r&&(t.splice(n+1,0,s),i=!0)}return i}}function oy(t,e,i,n){const r=n-t*t,a=Math.abs(r)<1e-24?0:(i-t*e)/r,o=e-a*t;return[o,a]}var sy=function(){let t,e=t=>t[0],i=t=>t[1];function n(n){let r=0,a=0,o=0,s=0,l=0,u=0,h=t?+t[0]:1/0,c=t?+t[1]:-1/0;ey(n,e,i,(e,i)=>{const n=Math.log(i),p=e*i;++r,a+=(i-a)/r,s+=(p-s)/r,u+=(e*p-u)/r,o+=(i*n-o)/r,l+=(p*n-l)/r,t||(e<h&&(h=e),e>c&&(c=e))});let[p,f]=oy(s/a,o/a,l/a,u/a);p=Math.exp(p);const d=t=>p*Math.exp(f*t),g=ay(h,c,d);return g.a=p,g.b=f,g.predict=d,g.rSquared=iy(n,e,i,a,d),g}return n.domain=function(e){return arguments.length?(t=e,n):t},n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(i=t,n):i},n},ly=function(){let t,e=t=>t[0],i=t=>t[1];function n(n){let r=0,a=0,o=0,s=0,l=0,u=t?+t[0]:1/0,h=t?+t[1]:-1/0;ey(n,e,i,(e,i)=>{++r,a+=(e-a)/r,o+=(i-o)/r,s+=(e*i-s)/r,l+=(e*e-l)/r,t||(e<u&&(u=e),e>h&&(h=e))});const[c,p]=oy(a,o,s,l),f=t=>p*t+c,d=[[u,f(u)],[h,f(h)]];return d.a=p,d.b=c,d.predict=f,d.rSquared=iy(n,e,i,o,f),d}return n.domain=function(e){return arguments.length?(t=e,n):t},n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(i=t,n):i},n};function uy(t){t.sort((t,e)=>t-e);var e=t.length/2;return e%1===0?(t[e-1]+t[e])/2:t[Math.floor(e)]}const hy=2,cy=1e-12;var py=function(){let t=t=>t[0],e=t=>t[1],i=.3;function n(n){const[r,a,o,s]=ty(n,t,e,!0),l=r.length,u=Math.max(2,~~(i*l)),h=new Float64Array(l),c=new Float64Array(l),p=new Float64Array(l).fill(1);for(let t=-1;++t<=hy;){const e=[0,u-1];for(let t=0;t<l;++t){const i=r[t],n=e[0],o=e[1],s=i-r[n]>r[o]-i?n:o;let l=0,u=0,f=0,d=0,g=0,v=1/Math.abs(r[s]-i||1);for(let t=n;t<=o;++t){const e=r[t],n=a[t],o=fy(Math.abs(i-e)*v)*p[t],s=e*o;l+=o,u+=s,f+=n*o,d+=n*s,g+=e*s}const[y,m]=oy(u/l,f/l,d/l,g/l);h[t]=y+m*i,c[t]=Math.abs(a[t]-h[t]),dy(r,t+1,e)}if(t===hy)break;const i=uy(c);if(Math.abs(i)<cy)break;for(let t,n,r=0;r<l;++r)t=c[r]/(6*i),p[r]=t>=1?cy:(n=1-t*t)*n}return gy(r,h,o,s)}return n.bandwidth=function(t){return arguments.length?(i=t,n):i},n.x=function(e){return arguments.length?(t=e,n):t},n.y=function(t){return arguments.length?(e=t,n):e},n};function fy(t){return(t=1-t*t*t)*t*t}function dy(t,e,i){let n=t[e],r=i[0],a=i[1]+1;if(!(a>=t.length))while(e>r&&t[a]-n<=n-t[r])i[0]=++r,i[1]=a,++a}function gy(t,e,i,n){const r=t.length,a=[];let o,s=0,l=0,u=[];for(;s<r;++s)o=t[s]+i,u[0]===o?u[1]+=(e[s]-u[1])/++l:(l=0,u[1]+=n,u=[o,e[s]],a.push(u));return u[1]+=n,a}var vy=function(){let t,e=t=>t[0],i=t=>t[1];function n(n){let r=0,a=0,o=0,s=0,l=0,u=t?+t[0]:1/0,h=t?+t[1]:-1/0;ey(n,e,i,(e,i)=>{const n=Math.log(e);++r,a+=(n-a)/r,o+=(i-o)/r,s+=(n*i-s)/r,l+=(n*n-l)/r,t||(e<u&&(u=e),e>h&&(h=e))});const[c,p]=oy(a,o,s,l),f=t=>p*Math.log(t)+c,d=ay(u,h,f);return d.a=p,d.b=c,d.predict=f,d.rSquared=iy(n,e,i,o,f),d}return n.domain=function(e){return arguments.length?(t=e,n):t},n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(i=t,n):i},n},yy=function(){let t,e=t=>t[0],i=t=>t[1];function n(n){const[r,a,o,s]=ty(n,e,i),l=r.length;let u,h,c,p,f=0,d=0,g=0,v=0,y=0;for(u=0;u<l;)h=r[u],c=a[u++],p=h*h,f+=(p-f)/u,d+=(p*h-d)/u,g+=(p*p-g)/u,v+=(h*c-v)/u,y+=(p*c-y)/u;let m=0,x=0,b=t?+t[0]:1/0,_=t?+t[1]:-1/0;ey(n,e,i,(e,i)=>{x++,m+=(i-m)/x,t||(e<b&&(b=e),e>_&&(_=e))});const w=g-f*f,M=f*w-d*d,S=(y*f-v*d)/M,k=(v*w-y*d)/M,O=-S*f,C=t=>(t-=o,S*t*t+k*t+O+s),A=ay(b,_,C);return A.a=S,A.b=k-2*S*o,A.c=O-k*o+S*o*o+s,A.predict=C,A.rSquared=iy(n,e,i,m,C),A}return n.domain=function(e){return arguments.length?(t=e,n):t},n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(i=t,n):i},n},my=function(){let t,e=t=>t[0],i=t=>t[1],n=3;function r(r){if(1===n){const n=ly().x(e).y(i).domain(t)(r);return n.coefficients=[n.b,n.a],delete n.a,delete n.b,n}if(2===n){const n=yy().x(e).y(i).domain(t)(r);return n.coefficients=[n.c,n.b,n.a],delete n.a,delete n.b,delete n.c,n}const[a,o,s,l]=ty(r,e,i),u=a.length,h=[],c=[],p=n+1;let f,d,g,v,y,m=0,x=0,b=t?+t[0]:1/0,_=t?+t[1]:-1/0;for(ey(r,e,i,(e,i)=>{++x,m+=(i-m)/x,t||(e<b&&(b=e),e>_&&(_=e))}),f=0;f<p;++f){for(g=0,v=0;g<u;++g)v+=Math.pow(a[g],f)*o[g];for(h.push(v),y=new Float64Array(p),d=0;d<p;++d){for(g=0,v=0;g<u;++g)v+=Math.pow(a[g],f+d);y[d]=v}c.push(y)}c.push(h);const w=by(c),M=t=>{t-=s;let e=l+w[0]+w[1]*t+w[2]*t*t;for(f=3;f<p;++f)e+=w[f]*Math.pow(t,f);return e},S=ay(b,_,M);return S.coefficients=xy(p,w,-s,l),S.predict=M,S.rSquared=iy(r,e,i,m,M),S}return r.domain=function(e){return arguments.length?(t=e,r):t},r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(i=t,r):i},r.order=function(t){return arguments.length?(n=t,r):n},r};function xy(t,e,i,n){const r=Array(t);let a,o,s,l;for(a=0;a<t;++a)r[a]=0;for(a=t-1;a>=0;--a)for(s=e[a],l=1,r[a]+=s,o=1;o<=a;++o)l*=(a+1-o)/o,r[a-o]+=s*Math.pow(i,o)*l;return r[0]+=n,r}function by(t){const e=t.length-1,i=[];let n,r,a,o,s;for(n=0;n<e;++n){for(o=n,r=n+1;r<e;++r)Math.abs(t[n][r])>Math.abs(t[n][o])&&(o=r);for(a=n;a<e+1;++a)s=t[a][n],t[a][n]=t[a][o],t[a][o]=s;for(r=n+1;r<e;++r)for(a=e;a>=n;a--)t[a][r]-=t[a][n]*t[n][r]/t[n][n]}for(r=e-1;r>=0;--r){for(s=0,a=r+1;a<e;++a)s+=t[a][r]*i[a];i[r]=(t[e][r]-s)/t[r][r]}return i}var _y=function(){let t,e=t=>t[0],i=t=>t[1];function n(n){let r=0,a=0,o=0,s=0,l=0,u=0,h=t?+t[0]:1/0,c=t?+t[1]:-1/0;ey(n,e,i,(e,i)=>{const n=Math.log(e),p=Math.log(i);++r,a+=(n-a)/r,o+=(p-o)/r,s+=(n*p-s)/r,l+=(n*n-l)/r,u+=(i-u)/r,t||(e<h&&(h=e),e>c&&(c=e))});let[p,f]=oy(a,o,s,l);p=Math.exp(p);const d=t=>p*Math.pow(t,f),g=ay(h,c,d);return g.a=p,g.b=f,g.predict=d,g.rSquared=iy(n,e,i,u,d),g}return n.domain=function(e){return arguments.length?(t=e,n):t},n.x=function(t){return arguments.length?(e=t,n):e},n.y=function(t){return arguments.length?(i=t,n):i},n},wy={exp:sy,linear:ly,loess:py,log:vy,poly:my,pow:_y,quad:yy};function My(t,e){return 1.96*Math.sqrt(t*(1-t)/e)}var Sy=function(){function t(t){var e={type:"linear",style:{stroke:"#9ba29a",lineWidth:2,opacity:.5,lineJoin:"round",lineCap:"round"},showConfidence:!1,confidenceStyle:{fill:"#ccc",opacity:.1}};this.options=Object(E["deepMix"])({},e,t),this.view=this.options.view,this.init()}return t.prototype.init=function(){var t=this.options.plotOptions,e=t.xField,i=t.yField,n=t.data,r=wy[this.options.type]().x((function(t){return t[e]})).y((function(t){return t[i]}));this.data=this.processData(r(n)),this.container=this.view.get("backgroundGroup").addGroup()},t.prototype.render=function(){var t=this.view.get("scales"),e=t[this.options.plotOptions.xField],i=t[this.options.plotOptions.yField],n=this.view.get("coord"),r=this.data.trendlineData,a=Pi("linear"),o=this.adjustScale(e,r,"x"),s=new a({min:o.min,max:o.max,nice:e.nice}),l=this.adjustScale(i,r,"y"),u=new a({min:l.min,max:l.max,nice:i.nice});if(this.options.showConfidence){var h=this.getConfidencePath(s,u,n);this.container.addShape("path",{attrs:Object(B["__assign"])({path:h},this.options.confidenceStyle)})}var c=this.getTrendlinePoints(s,u,n),p=[[0,0],[1,1]],f=hf(c,!1,p);this.shape=this.container.addShape("path",{attrs:Object(B["__assign"])({path:f},this.options.style)})},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destroy=function(){this.container&&this.container.destroy()},t.prototype.processData=function(t){var e=[],i=[];return Object(E["each"])(t,(function(n){e.push({x:n[0],y:n[1]});var r=My(t.rSquared,n[1]);i.push({x:n[0],y0:n[1]-r,y1:n[1]+r})})),{trendlineData:e,confidenceData:i}},t.prototype.getTrendlinePoints=function(t,e,i){var n=[];return Object(E["each"])(this.data.trendlineData,(function(r){var a=t.scale(r.x),o=e.scale(r.y),s=i.start.x+i.width*a,l=i.start.y-i.height*o;n.push({x:s,y:l})})),n},t.prototype.getConfidencePath=function(t,e,i){var n=[],r=[],a=[];Object(E["each"])(this.data.confidenceData,(function(a){var o=t.scale(a.x),s=e.scale(a.y0),l=e.scale(a.y1),u=i.start.x+i.width*o,h=i.start.y-i.height*s,c=i.start.y-i.height*l;n.push({x:u,y:h}),r.push({x:u,y:c})}));for(var o=0;o<n.length;o++){var s=0===o?"M":"L",l=n[o];isNaN(l.x)||isNaN(l.y)||a.push([s,l.x,l.y])}for(var u=r.length-1;u>0;u--){l=r[u];isNaN(l.x)||isNaN(l.y)||a.push(["L",l.x,l.y])}return a},t.prototype.adjustScale=function(t,e,i){var n=t.min,r=t.max,a=this.options.plotOptions,o=a.data,s=a.xField,l=a.yField,u="x"===i?s:l,h=Object(E["minBy"])(o,u)[u],c=Object(E["maxBy"])(o,u)[u],p=(n-h)/(c-h),f=(r-c)/(c-h),d=Object(E["minBy"])(e,i)[i],g=Object(E["maxBy"])(e,i)[i];return{min:d+p*(g-d),max:g+f*(g-d)}},t}(),ky=Sy,Oy={scatter:"point"},Cy={point:"point"},Ay=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{pointSize:4,pointStyle:{strokeOpacity:1,fillOpacity:.4,opacity:.65},xAxis:{grid:{visible:!0},line:{visible:!0}},yAxis:{grid:{visible:!0},line:{visible:!0}},tooltip:{visible:!0,shared:null,crosshairs:{type:"rect"}},label:{visible:!1,position:"top"},shape:"circle"})},e.prototype.afterRender=function(){t.prototype.afterRender.call(this),this.options.quadrant&&this.options.quadrant.visible&&!this.quadrant&&(this.quadrant&&this.quadrant.destroy(),this.quadrant=new Jv(Object(B["__assign"])({view:this.view,plotOptions:this.options},this.options.quadrant)),this.quadrant.render()),this.options.trendline&&this.options.trendline.visible&&(this.trendline=new ky(Object(B["__assign"])({view:this.view,plotOptions:this.options},this.options.trendline)),this.trendline.render())},e.prototype.destroy=function(){this.quadrant&&(this.quadrant.destroy(),this.quadrant=null),this.trendline&&(this.trendline.destroy(),this.trendline=null),t.prototype.destroy.call(this)},e.prototype.geometryParser=function(t,e){return"g2"===t?Oy[e]:Cy[e]},e.prototype.scale=function(){var e=this.options,i={};i[e.xField]={},E["has"](e,"xAxis")&&Nf(i[e.xField],e.xAxis),i[e.yField]={},E["has"](e,"yAxis")&&Nf(i[e.yField],e.yAxis),this.setConfig("scales",i),t.prototype.scale.call(this)},e.prototype.coord=function(){},e.prototype.annotation=function(){},e.prototype.addGeometry=function(){var t=Rf("point","circle",{plot:this});this.points=t,this.options.label&&this.options.label.visible&&(this.points.label=this.extractLabel()),this.options.tooltip&&this.options.tooltip.visible&&(this.points.tooltip=this.extractTooltip(),this.setConfig("tooltip",Object(B["__assign"])({showTitle:!1},this.options.tooltip))),this.setConfig("element",t)},e.prototype.animation=function(){t.prototype.animation.call(this);var e=this.options;!1===e.animation&&(this.points.animate=!1)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,e||c)},e.prototype.extractLabel=function(){var t=this.options,e=t.label;if(e&&!1===e.visible)return!1;var i=yc("label",Object(B["__assign"])({plot:this,labelType:"scatterLabel",fields:[t.yField],position:"right",offset:0},e));return i},e.prototype.extractTooltip=function(){var t=this.options;return{fields:[t.xField,t.yField]}},e}(Yp),Ly=Ay;Qp("scatter",Ay);var Py=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{pointSize:[8,58],pointStyle:{strokeOpacity:1,fillOpacity:1,opacity:.5},label:{position:"middle"}})},e.prototype.legend=function(){var e;t.prototype.legend.call(this),this.setConfig("legends",{fields:(e={},e[this.options.sizeField]=!1,e)})},e.prototype.parseEvents=function(){t.prototype.parseEvents.call(this,c)},e}(Ly),jy=Py;Qp("bubble",Py);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="bubble",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=jy.getDefaultOptions})(Jp),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="scatter",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=Ly.getDefaultOptions}(Jp);var Ty=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="groupColumn",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return Object(E["deepMix"])({},t.getDefaultOptions.call(this),{yAxis:{title:{visible:!0}}})},e.prototype.getResponsiveTheme=function(){return this.themeController.getResponsiveTheme("column")},e.prototype.addGeometry=function(){t.prototype.addGeometry.call(this)},e.prototype.adjustColumn=function(t){t.adjust=[{type:"dodge",marginRatio:.1}]},e}(Zv),By=Ty;Qp("groupColumn",Ty);var Iy=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="groupColumn",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=By.getDefaultOptions,e}(Jp),Dy=Iy;function Fy(t){var e=[],i=t.get("coord"),n=t.get("origin").points;return E["each"](n,(function(t){e.push(i.convertPoint(t))})),e}function Ey(){return{areaStyle:{opacity:.2},lineStyle:{lineWidth:2,opacity:.1}}}var Ry=function(){function t(t){this.areas=[],this.lines=[],this._areaStyle={},this._lineStyle={},E["assign"](this,t),this._init()}return t.prototype.draw=function(){var t=this,e=this._getGroupedShapes();E["each"](e,(function(e,i){e.length>0&&t._drawConnection(e,i)})),this.triggerOn?this._addInteraction():this.animation&&this._initialAnimation()},t.prototype.clear=function(){this.container&&this.container.clear(),this.areas=[],this.lines=[]},t.prototype.destory=function(){this.container&&this.container.remove()},t.prototype.setState=function(t,e){"active"===t&&this._onActive(e),"disabled"===t&&this._onDisabled(e),"selected"===t&&this._onSelected(e)},t.prototype._init=function(){var t=this,e=this.view.get("backgroundGroup");this.container=e.addGroup(),this.draw(),this.view.on("beforerender",(function(){t.clear()}))},t.prototype._getGroupedShapes=function(){var t=this,e=this.view.get("scales")[this.field].values,i=this.view.get("elements")[0],n=i.getShapes(),r={};return E["each"](e,(function(t){r[t]=[]})),E["each"](n,(function(e){var i=e.get("origin")._origin,n=i[t.field];r[n].push(e)})),r},t.prototype._drawConnection=function(t,e){var i=t[0].attr("fill");this._areaStyle[e]=this._getShapeStyle(i,"area"),this._lineStyle[e]=this._getShapeStyle(i,"line");for(var n=0;n<t.length-1;n++){var r=Fy(t[n]),a=Fy(t[n+1]),o=E["mix"]({},this._areaStyle[e]),s=E["mix"]({},this._lineStyle[e]);this.triggerOn&&(o.opacity=0,s.opacity=0);var l=this.container.addShape("path",{attrs:E["mix"]({},o,{path:[["M",r[2].x,r[2].y],["L",a[1].x,a[1].y],["L",a[0].x,a[0].y],["L",r[3].x,r[3].y]]}),name:"connectedArea"}),u=this.container.addShape("path",{attrs:E["mix"]({},s,{path:[["M",r[2].x,r[2].y],["L",a[1].x,a[1].y]]}),name:"connectedArea"}),h=t[n].get("origin")._origin;l.set("data",h),u.set("data",h),this.areas.push(l),this.lines.push(u)}},t.prototype._getShapeStyle=function(t,e){var i=e+"Style";if(this[i])return this[i];var n=Ey()[i],r={fill:t};return"line"===e&&(r={stroke:t}),E["mix"](n,r)},t.prototype._addInteraction=function(){var t=this,e=this.triggerOn;this.view.on("interval:"+e,(function(e){var i=e.target.get("origin")._origin[t.field];t.setState("active",{name:t.field,exp:i}),t.setState("disabled",{name:t.field,exp:function(t){return t!==i}}),t.view.get("canvas").draw()})),this.view.on("mousemove",(function(e){"interval"!==e.target.name&&t.setState("disabled",{name:t.field,exp:function(){return!0}})}))},t.prototype._initialAnimation=function(){var t=this.view.get("coord"),e=t.start,i=t.end,n=t.width,r=t.height,a=new F["Shapes"].Rect({attrs:{x:e.x,y:i.y,width:0,height:r}});this.container.attr("clip",a),this.container.setSilent("animating",!0),a.animate({width:n},600,"easeQuadOut",(function(){}),400)},t.prototype._onActive=function(t){var e=this;E["each"](this.areas,(function(i){var n=i.get("data"),r=n[e.field];if(Kh(n,t)){var a=e._areaStyle[r].opacity||1;i.stopAnimate(),i.animate({opacity:a},400,"easeQuadOut")}})),E["each"](this.lines,(function(i){var n=i.get("data"),r=n[e.field];if(Kh(n,t)){var a=e._lineStyle[r].opacity||1;i.stopAnimate(),i.animate({opacity:a},400,"easeQuadOut")}}))},t.prototype._onDisabled=function(t){E["each"](this.areas,(function(e){var i=e.get("data");Kh(i,t)&&(e.stopAnimate(),e.animate({opacity:0},400,"easeQuadOut"))})),E["each"](this.lines,(function(e){var i=e.get("data");Kh(i,t)&&(e.stopAnimate(),e.animate({opacity:0},400,"easeQuadOut"))}))},t.prototype._onSelected=function(t){this._onActive(t)},t}(),zy=Ry,Ny=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.adjustPosition=function(t,e){var i=t.getBBox(),n=e.getBBox();n.height<=i.height&&(t.attr("opacity",0),t.attr("fillOpacity",0),t.attr("strokeOpacity",0),t.set("capture",!1))},e}(Hv);Ts("stackColumnLabel",Ny);var Yy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stackColum",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{legend:{visible:!0,position:"right-top"},label:{visible:!1,position:"middle",offset:0,adjustColor:!0},connectedArea:{visible:!1,triggerOn:"mouseenter"}})},e.prototype.init=function(){this.options.connectedArea.visible&&(this.options.tooltip.crosshairs=null),t.prototype.init.call(this)},e.prototype.afterRender=function(){var e=this.options;e.connectedArea.visible&&(this.connectedArea=new zy(Object(B["__assign"])({view:this.view,field:e.stackField,animation:!1!==e.animation},e.connectedArea))),t.prototype.afterRender.call(this)},e.prototype.adjustColumn=function(t){t.adjust=[{type:"stack"}]},e.prototype.extractLabel=function(){var t=this.options,e=this.getLabelOptionsByPosition(t.label.position),i=E["deepMix"]({},e,this.options.label);if(i&&!1===i.visible)return!1;var n=yc("label",Object(B["__assign"])({plot:this,labelType:"stackColumnLabel",fields:[t.yField]},i));return n},e}(Zv),Hy=Yy;Qp("stackColumn",Yy);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="stackColumn",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=Hy.getDefaultOptions})(Jp);var Gy=function(t,e,i){var n=Object(E["groupBy"])(t,e);n=Object(E["mapValues"])(n,(function(t){return Object(E["map"])(t,(function(t){return Object(E["map"])(i,(function(e){return t[e]}))}))})),n=Object(E["mapValues"])(n,E["flatten"]),n=Object(E["mapValues"])(n,(function(t){return Object(E["map"])(t,(function(t){var e=Number.parseFloat(t);return!Object(E["isNumber"])(e)||isNaN(e)?0:e}))}));var r=Object(E["mapValues"])(n,(function(t){return Object(E["reduce"])(t,(function(t,e){return t+e}),0)})),a=Object(E["map"])(t,(function(t){var n=Object(B["__assign"])(Object(B["__assign"])({},t),{_origin:t,total:r[t[e]]});return Object(E["each"])(i,(function(i){n[i]=t[i]/r[t[e]]})),n}));return Object(E["each"])(Object(E["groupBy"])(a,e),(function(t){var e=0;Object(E["each"])(t,(function(n,r){Object(E["each"])(i,(function(a,o){(e+n[a]>=1||r===t.length-1&&o===i.length-1)&&(n[a]=1-e),e+=n[a]}))}))})),a},Wy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="percentageStackColumn",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{label:{visible:!0,position:"middle",offset:0},yAxis:{visible:!0,tick:{visible:!1},grid:{visible:!1},title:{visible:!0},label:{visible:!1}}})},e.prototype.processData=function(t){var e=this.options,i=e.xField,n=e.yField;return Gy(t||[],i,[n])},e.prototype.scale=function(){var e={},i=this.options.yField;e[i]={tickCount:6,alias:i+" (%)",min:0,max:1,formatter:function(t){var e=(100*t).toFixed(1);return e+"%"}},this.options.meta=e,t.prototype.scale.call(this)},e}(Hy),Xy=Wy;Qp("percentageStackColumn",Wy);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="percentageStackColumn",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=Xy.getDefaultOptions})(Jp);var Vy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="histogram",e}return Object(B["__extends"])(e,t),e.prototype.init=function(){this.options.xField="range",this.options.yField="count",t.prototype.init.call(this)},e.prototype.processData=function(t){var e=this,i=this.options,n=i.binField,r=i.binWidth,a=i.binNumber,o=E["clone"](t);E["sortBy"](o,n);var s=E["valuesOfKey"](o,n),l=E["getRange"](s),u=l.max-l.min,h=r;if(!r&&a&&(h=u/a),!r&&!a){var c=Ih(s);h=u/c}var p={};E["each"](o,(function(t){var i=t[n],r=e.getBin(i,h),a=r[0]+"-"+r[1];E["hasKey"](p,a)||(p[a]={name:a,range:r,count:0,data:[]}),p[a].data.push(t),p[a].count+=1}));var f=[];return E["each"](p,(function(t){f.push(t)})),f},e.prototype.scale=function(){t.prototype.scale.call(this);var e=this.config.scales.range;e.nice=!1,e.type="linear"},e.prototype.getBin=function(t,e){var i=Math.floor(t/e);return[e*i,e*(i+1)]},e}(Zv),qy=Vy;Qp("histogram",Vy);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="histogram",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=qy.getDefaultOptions})(Jp);function Uy(t){var e=t.getResponsiveTheme(),i=t.canvas;new Eg({plot:t,responsiveTheme:e,dim:"x"}),new Eg({plot:t,responsiveTheme:e,dim:"y"});i.draw()}var Zy=[],Qy=[{name:"responsiveAxis",method:Uy}],$y={preRender:Zy,afterRender:Qy},Ky=20,Jy=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.setLabelPosition=function(t,e,i,n){var r=n;E["isFunction"](r)&&(r=r(e));var a=this.get("coord"),o=a.convertPoint(e.points[0]),s=a.convertPoint(e.points[2]),l=o.x>s.x,u=(o.x-s.x)/2*-1,h=(o.y-s.y)/2*-1;switch(r){case"bottom":t.x-=u,t.y+=h,t.textAlign=t.textAlign||"center";break;case"top":t.x-=u,t.y-=h,t.textAlign=t.textAlign||"center";break;case"left":t.x-=2*u,t.textAlign=t.textAlign||(l?"right":"left");break;case"middle":t.x-=u,t.textAlign=t.textAlign||"center";break;case"right":t.textAlign=t.textAlign||(l?"right":"left");break;default:break}},e.prototype.adjustOffset=function(t,e){var i=this.get("labelsRenderer"),n=i.get("items"),r=i.get("group").get("children"),a=this.get("coord");E["each"](n,(function(e,i){var n=r[i],o=a.convertPoint(t[i].points[0]),s=a.convertPoint(t[i].points[2]),l=o.x>s.x;l&&e.offset&&(e.x-=2*e.offset,n.attr("x",n.attr("x")-2*e.offset))}))},e.prototype.showLabels=function(e,i){var n=this;t.prototype.showLabels.call(this,e,i),this.adjustOffset(e,i);var r=this.get("labelsRenderer"),a=r.get("group").get("children"),o=r.get("items"),s=this.get("element").get("view"),l=this.get("labelOptions"),u=l.adjustColor,h=l.adjustPosition;E["each"](a,(function(t,e){var r=t,a=o[e],s=r.get("origin"),l=n.get("element").getShapeId(s),c=n._getShape(l,i);h&&n.adjustPosition(r,c,a),u&&n.adjustColor(r,c)})),s.get("canvas").draw()},e.prototype._getShape=function(t,e){var i;return E["each"](e,(function(e){var n=e,r=n.id;r===t&&(i=n)})),i},e.prototype.adjustPosition=function(t,e,i){var n=t.getBBox(),r=e.getBBox();if(r.width<=n.width&&"right"!==i.position){var a=r.maxX+Ky;t.attr("x",a)}},e.prototype.adjustColor=function(t,e){var i=t.getBBox(),n=e.getBBox();if(i.minX>=n.minX&&i.maxX<=n.maxX){var r=e.attr("fill"),a=e.attr("opacity")?e.attr("opacity"):1,o=Nv(r),s=Math.round(.299*o[0]+.587*o[1]+.114*o[2])/a,l=[{from:0,to:85,color:"white"},{from:85,to:170,color:"#F6F6F6"},{from:170,to:255,color:"black"}],u=this._mappingColor(l,s);t.attr("fill",u),"black"!==u?(t.attr("stroke",null),t.attr("lineWidth",0)):(t.attr("stroke","white"),t.attr("lineWidth",2))}else if(i.maxY<n.minY){var h=this.get("theme"),c=E["get"](h,"label.textStyle.fill","black");t.attr("fill",c)}},e.prototype._mappingColor=function(t,e){var i;return E["each"](t,(function(t){var n=t;e>=n.from&&e<n.to&&(i=n.color)})),i},e}(bs);Ts("barLabel",Jy);var tm={onBarClick:"interval:click",onBarDblclick:"interval:dblclick",onBarMousemove:"interval:mousemove",onBarMouseenter:"interval:mouseenter",onBarMouseleave:"interval:mouseleave",onBarMousedown:"interval:mousedown",onBarMouseup:"interval:mouseup",onBarContextmenu:"interval:contextmenu"};E["assign"](R,tm);var em=function(t){var e=t.opacity||1;return{opacity:.5*e}},im=function(t){var e=t.opacity||1;return{opacity:.5*e}};Ap("bar",{columnStyle:{normal:{},active:em,disable:im,selected:{lineWidth:1,stroke:"black"}}});var nm={bar:"interval"},rm={interval:"bar"},am=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bar",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){var e={xAxis:{visible:!0,line:{visible:!1},title:{visible:!0},label:{visible:!1},tickLine:{visible:!1},grid:{visible:!1}},yAxis:{visible:!0,autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!0,grid:{visible:!1},line:{visible:!1},tickLine:{visible:!1},label:{visible:!0},title:{visible:!1,offset:12}},tooltip:{visible:!0,shared:!0,crosshairs:{type:"rect"}},label:{visible:!0,position:"left",adjustColor:!0},legend:{visible:!0,position:"top-left"},conversionTag:{visible:!1}};return E["deepMix"]({},t.getDefaultOptions.call(this),e)},e.prototype.beforeInit=function(){t.prototype.beforeInit.call(this);var e=this.options;e.responsive&&"auto"!==e.padding&&this.applyResponsive("preRender")},e.prototype.afterRender=function(){var e=this.options;e.responsive&&"auto"!==e.padding&&this.applyResponsive("afterRender"),e.conversionTag.visible&&(this.conversionTag=new Tv(Object(B["__assign"])({view:this.view,field:e.xField,animation:!1!==e.animation},e.conversionTag))),t.prototype.afterRender.call(this)},e.prototype.geometryParser=function(t,e){return"g2"===t?nm[e]:rm[e]},e.prototype.processData=function(t){return t?t.slice().reverse():t},e.prototype.scale=function(){var e=this.options,i={};i[e.yField]={type:"cat"},E["has"](e,"yAxis")&&Nf(i[e.yField],e.yAxis),i[e.xField]={},E["has"](e,"xAxis")&&Nf(i[e.xField],e.xAxis),this.setConfig("scales",i),t.prototype.scale.call(this)},e.prototype.coord=function(){var t={actions:[["transpose"]]};this.setConfig("coord",t)},e.prototype.adjustBar=function(t){},e.prototype.addGeometry=function(){var t=this.options,e=Rf("interval","main",{positionFields:[t.yField,t.xField],plot:this});t.conversionTag.visible&&(e.widthRatio.column=1/3),t.label&&(e.label=this.extractLabel()),this.adjustBar(e),this.bar=e,this.setConfig("element",e)},e.prototype.animation=function(){t.prototype.animation.call(this);var e=this.options;!1===e.animation&&(this.bar.animate=!1)},e.prototype.extractLabel=function(){var t=this.options,e=this.getLabelOptionsByPosition(t.label.position),i=E["deepMix"]({},e,this.options.label);if(i&&!1===i.visible)return!1;var n=yc("label",Object(B["__assign"])({plot:this,labelType:"barLabel",fields:[t.xField]},i));return n},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,p)},e.prototype.applyResponsive=function(t){var e=this,i=$y[t];E["each"](i,(function(t){var i=t;i.method(e)}))},e.prototype.getLabelOptionsByPosition=function(t){return"middle"===t?{offset:0}:"left"===t?{offset:7,style:{stroke:null,lineWidth:0}}:"right"===t?{offset:4}:void 0},e}(Yp),om=am;Qp("bar",am);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="bar",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=om.getDefaultOptions})(Jp);var sm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.adjustPosition=function(t,e){var i=t.getBBox(),n=e.getBBox();n.width<=i.width&&(t.attr("opacity",0),t.attr("fillOpacity",0),t.attr("strokeOpacity",0),t.set("capture",!1))},e}(Jy);Ts("stackBarLabel",sm);var lm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stackBar",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{xAxis:{visible:!0,autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!1,grid:{visible:!0},line:{visible:!1},tickLine:{visible:!0},label:{visible:!0},title:{visible:!0,offset:12}},yAxis:{visible:!0,autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!0,grid:{visible:!1},line:{visible:!1},tickLine:{visible:!1},label:{visible:!0},title:{visible:!1,offset:12}}})},e.prototype.adjustBar=function(t){t.adjust=[{type:"stack"}]},e.prototype.extractLabel=function(){var t=this.options,e=t.label;if(!1===e.visible)return!1;var i=yc("label",Object(B["__assign"])({plot:this,labelType:"stackBarLabel",fields:[t.xField]},e));return i},e}(om),um=lm;Qp("stackBar",lm);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="stackBar",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=um.getDefaultOptions})(Jp);var hm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="percentageStackBar",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{xAxis:{visible:!0,tickLine:{visible:!1},grid:{visible:!1},title:{visible:!0,formatter:function(t){return t+" (%)"}},label:{visible:!1,formatter:function(t){var e=/%/gi;return t.replace(e,"")}}}})},e.prototype.processData=function(e){var i=this.options,n=i.xField,r=i.yField,a=t.prototype.processData.call(this,e);return Gy(a,r,[n])},e.prototype.scale=function(){var e={},i=this.options.xField;e[i]={tickCount:6,alias:i+" (%)",min:0,max:1,formatter:function(t){var e=(100*t).toFixed(1);return e+"%"}},this.options.meta=e,t.prototype.scale.call(this)},e}(um),cm=hm;Qp("percentageStackBar",hm);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="percentageStackBar",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=cm.getDefaultOptions})(Jp);var pm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="groupBar",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{xAxis:{visible:!0,grid:{visible:!0}},yAxis:{visible:!0,title:{visible:!1}},label:{visible:!0,position:"right",offset:8,adjustColor:!0},legend:{visible:!0,position:"right-top"}})},e.prototype.afterRender=function(){t.prototype.afterRender.call(this);var e=E["valuesOfKey"](this.options.data,this.options.groupField);this.view.on("tooltip:change",(function(t){for(var i=t.items,n=E["clone"](i),r=0;r<e.length;r++)for(var a=e[r],o=0;o<n.length;o++){var s=n[o];s.name===a&&(t.items[r]=s)}}))},e.prototype.scale=function(){var e={};e[this.options.groupField]={values:E["valuesOfKey"](this.options.data,this.options.groupField)},this.options.meta?this.options.meta=E["deepMix"]({},this.options.meta,e):this.options.meta=e,t.prototype.scale.call(this)},e.prototype.adjustBar=function(t){t.adjust=[{type:"dodge",marginRatio:.1}]},e}(om),fm=pm;Qp("groupBar",pm);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="groupBar",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=fm.getDefaultOptions})(Jp);var dm=8;function gm(t,e){var i;return Object(E["each"])(t,(function(t){var n=t;e>=n.from&&e<n.to&&(i=n.color)})),i}var vm,ym=function(){function t(t){this.destroyed=!1,this.view=t.view,this.plot=t.plot;var e=this.getDefaultOptions();this.options=Object(E["deepMix"])(e,t,{}),this.options.leftStyle||(this.options.leftStyle=this.options.style),this.options.rightStyle||(this.options.rightStyle=this.options.style),this.init()}return t.prototype.init=function(){var t=this,e=this.view.get("elements")[0].get("container");this.container=e.addGroup(),this.view.on("beforerender",(function(){t.clear(),t.plot.canvas.draw()}))},t.prototype.render=function(){var t=this,e=this.view.get("elements")[0],i=e.getShapes();Object(E["each"])(i,(function(e){var i=t.getPosition(e),n=t.getValue(e),r=t.getTextAlign(),a=[];Object(E["each"])(i,(function(i,o){var s=0===o?t.options.leftStyle:t.options.rightStyle,l=t.getTextColor(e,o);"inner"===t.options.position&&t.options.adjustColor&&"black"!==l&&(s.stroke=null);var u=t.options.formatter,h=u?u(n[o]):n[o],c=t.container.addShape("text",{attrs:Object(E["deepMix"])({},s,{x:i.x,y:i.y,text:h,fill:l,textAlign:r[o],textBaseline:"middle"})});a.push(c),t.doAnimation(c)})),e.set("labelShapes",a),t.adjustPosition(a[0],a[1],e)}));var n=e.get("labelController");n.labelsContainer=this.container,this.plot.canvas.draw()},t.prototype.hide=function(){this.container.set("visible",!1),this.plot.canvas.draw()},t.prototype.show=function(){this.container.set("visible",!0),this.plot.canvas.draw()},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destory=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getBBox=function(){},t.prototype.getDefaultOptions=function(){var t=this.plot.theme,e=t.label.style;return{position:"outer",offsetX:dm,offsetY:0,style:Object(E["clone"])(e),adjustColor:!0,adjustPosition:!0}},t.prototype.getPosition=function(t){var e,i,n=t.get("origin"),r=n.x[0],a=n.x[1],o=this.options,s=o.offsetX,l=(o.offsetY,n.y[0]);return"outer"===this.options.position?(e=r-s,i=a+s):(e=r+s,i=a-s),[{x:e,y:l},{x:i,y:l}]},t.prototype.getValue=function(t){var e=this.plot.options.xField;return t.get("origin")._origin[e]},t.prototype.getTextAlign=function(){return"outer"===this.options.position?["right","left"]:["left","right"]},t.prototype.getTextColor=function(t,e){if(this.options.adjustColor&&"inner"===this.options.position){var i=t.attr("fill"),n=t.attr("opacity")?t.attr("opacity"):1,r=Nv(i),a=Math.round(.299*r[0]+.587*r[1]+.114*r[2])/n,o=[{from:0,to:85,color:"white"},{from:85,to:170,color:"#F6F6F6"},{from:170,to:255,color:"black"}],s=gm(o,a);return s}var l=0===e?this.options.leftStyle.fill:this.options.rightStyle.fill;return l},t.prototype.doAnimation=function(t){this.plot.animation&&!1===this.plot.animation||(t.attr("fillOpacity",0),t.attr("strokeOpacity",0),t.stopAnimate(),t.animate({fillOpacity:1,strokeOpacity:1},800,"easeLinear",500))},t.prototype.adjustPosition=function(t,e,i){var n=i.get("origin"),r=n.x[0],a=n.x[1],o=Math.abs(a-r),s=this.view.get("panelRange"),l=[t.getBBox(),e.getBBox()],u=t.attr("x"),h=e.attr("x");if(this.options.adjustPosition&&"inner"===this.options.position){var c=l[0].width+l[1].width,p=l[0].maxX-l[1].minX>2,f=c>o;(p||f)&&(u=r-this.options.offsetX,t.attr("fill",this.options.leftStyle.fill),t.attr("textAlign","right"),l[0]=t.getBBox(),h=a+this.options.offsetX,e.attr("fill",this.options.rightStyle.fill),e.attr("textAlign","left"),l[1]=e.getBBox())}l[0].minX<s.minX&&(u=s.minX+dm,t.attr("textAlign","left")),t.attr("x",u),e.attr("x",h),this.plot.canvas.draw()},t}(),mm=ym;function xm(t,e){var i=t.getBBox(),n=i.minX+i.width/2,r=new F["Rect"]({attrs:{x:n,y:i.minY,width:0,height:i.height}});t.attr("clip",r),r.animate({width:i.width,x:i.minX},e.duration,e.easing,(function(){t.attr("clip",null)}),e.delay)}function bm(t){vm=t}function _m(t,e){var i=wm(t).attr("path"),n=E["clone"](t.attr("path"));t.attr("path",i),t.animate({path:n},e.duration,e.easing,e.callback,100)}function wm(t){var e,i=t.id;return E["each"](vm,(function(t){t.id===i&&(e=t)})),e}xm.animationName="clipInFromCenter",_m.animationName="updateFromCenter",ye.registerAnimation("appear","clipInFromCenter",xm),ye.registerAnimation("update","updateFromCenter",_m);var Mm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rangeBar",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"](t.getDefaultOptions.call(this),{label:{visible:!0,position:"outer"},xAxis:{visible:!0,autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!1,grid:{visible:!0},line:{visible:!1},tickLine:{visible:!1},label:{visible:!0},title:{visible:!0,offset:12}},yAxis:{visible:!0,autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!0,grid:{visible:!1},line:{visible:!0},tickLine:{visible:!0},label:{visible:!0},title:{visible:!1,offset:12}}},{})},e.prototype.afterRender=function(){if(this.options.label&&this.options.label.visible){var e=new mm(Object(B["__assign"])({view:this.view,plot:this},this.options.label));e.render()}var i=[],n=this.view.get("elements");E["each"](n,(function(t){var e=t.getShapes();E["each"](e,(function(t){i.push(t)}))})),bm(i),t.prototype.afterRender.call(this)},e.prototype.extractLabel=function(){},e.prototype.animation=function(){t.prototype.animation.call(this),this.bar.animate={appear:{animation:"clipInFromCenter",duration:600},update:{animation:"updateFromCenter",duration:600}}},e}(om),Sm=Mm;Qp("rangeBar",Mm);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="rangeBar",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=Sm.getDefaultOptions})(Jp);var km=8;function Om(t,e){var i;return Object(E["each"])(t,(function(t){var n=t;e>=n.from&&e<n.to&&(i=n.color)})),i}var Cm,Am=function(){function t(t){this.destroyed=!1,this.view=t.view,this.plot=t.plot;var e=this.getDefaultOptions();this.options=Object(E["deepMix"])(e,t,{}),this.options.topStyle||(this.options.topStyle=this.options.style),this.options.bottomStyle||(this.options.bottomStyle=this.options.style),this.init()}return t.prototype.init=function(){var t=this,e=this.view.get("elements")[0].get("container");this.container=e.addGroup(),this.view.on("beforerender",(function(){t.clear(),t.plot.canvas.draw()}))},t.prototype.render=function(){var t=this,e=this.view.get("elements")[0],i=e.getShapes();Object(E["each"])(i,(function(e){var i=t.getPosition(e),n=t.getValue(e),r=t.getTextBaseline(),a=[];Object(E["each"])(i,(function(i,o){var s=1===o?t.options.topStyle:t.options.bottomStyle,l=t.getTextColor(e,o);"inner"===t.options.position&&t.options.adjustColor&&"black"!==l&&(s.stroke=null);var u=t.options.formatter,h=u?u(n[o]):n[o],c=t.container.addShape("text",{attrs:Object(E["deepMix"])({},s,{x:i.x,y:i.y,text:h,fill:l,textAlign:"center",textBaseline:r[o]})});a.push(c),t.doAnimation(c)})),e.set("labelShapes",a),t.adjustPosition(a[0],a[1],e)}));var n=e.get("labelController");n.labelsContainer=this.container,this.plot.canvas.draw()},t.prototype.hide=function(){this.container.set("visible",!1),this.plot.canvas.draw()},t.prototype.show=function(){this.container.set("visible",!0),this.plot.canvas.draw()},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destory=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getBBox=function(){},t.prototype.getDefaultOptions=function(){var t=this.plot.theme,e=t.label.style;return{position:"outer",offsetX:0,offsetY:km,style:Object(E["clone"])(e),adjustColor:!0,adjustPosition:!0}},t.prototype.getPosition=function(t){var e,i,n=t.get("origin"),r=n.y[1],a=n.y[0],o=this.options,s=(o.offsetX,o.offsetY),l=n.x;return"outer"===this.options.position?(e=r-s,i=a+s):(e=r+s,i=a-s),[{x:l,y:i},{x:l,y:e}]},t.prototype.getValue=function(t){var e=this.plot.options.yField;return t.get("origin")._origin[e]},t.prototype.getTextBaseline=function(){return"outer"===this.options.position?["top","bottom"]:["bottom","top"]},t.prototype.getTextColor=function(t,e){if(this.options.adjustColor&&"inner"===this.options.position){var i=t.attr("fill"),n=t.attr("opacity")?t.attr("opacity"):1,r=Nv(i),a=Math.round(.299*r[0]+.587*r[1]+.114*r[2])/n,o=[{from:0,to:85,color:"white"},{from:85,to:170,color:"#F6F6F6"},{from:170,to:255,color:"black"}],s=Om(o,a);return s}var l=1===e?this.options.topStyle.fill:this.options.bottomStyle.fill;return l},t.prototype.doAnimation=function(t){this.plot.animation&&!1===this.plot.animation||(t.attr("fillOpacity",0),t.attr("strokeOpacity",0),t.stopAnimate(),t.animate({fillOpacity:1,strokeOpacity:1},800,"easeLinear",500))},t.prototype.adjustPosition=function(t,e,i){var n=i.get("origin"),r=n.y[1],a=n.y[0],o=Math.abs(a-r),s=this.view.get("panelRange"),l=[t.getBBox(),e.getBBox()],u=t.attr("y"),h=e.attr("y");if(this.options.adjustPosition&&"inner"===this.options.position){var c=l[0].height+l[1].height,p=l[1].maxY-l[0].minY>2,f=c>o;(p||f)&&(h=r-this.options.offsetY,e.attr("fill",this.options.topStyle.fill),e.attr("textBaseline","bottom"),u=a+this.options.offsetY,t.attr("fill",this.options.bottomStyle.fill),t.attr("textBaseline","top"),l[0]=t.getBBox(),l[1]=e.getBBox())}l[0].maxY>s.maxY-km&&(u=s.maxY-km/2,t.attr("textBaseline","bottom")),t.attr("y",u),e.attr("y",h),this.plot.canvas.draw()},t}(),Lm=Am;function Pm(t,e){var i=t.getBBox(),n=i.minY+i.height/2,r=new F["Rect"]({attrs:{x:i.minX,y:n,width:i.width,height:0}});t.attr("clip",r),r.animate({height:i.height,y:i.minY},e.duration,e.easing,(function(){t.attr("clip",null)}),e.delay)}function jm(t){Cm=t}function Tm(t,e){var i=Bm(t).attr("path"),n=E["clone"](t.attr("path"));t.attr("path",i),t.animate({path:n},e.duration,e.easing,e.callback,100)}function Bm(t){var e,i=t.id;return E["each"](Cm,(function(t){t.id===i&&(e=t)})),e}Pm.animationName="clipInFromCenterVertical",Tm.animationName="updateFromCenterVertical",ye.registerAnimation("appear","clipInFromCenterVertical",Pm),ye.registerAnimation("update","updateFromCenterVertical",Tm);var Im=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rangeColumn",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"](t.getDefaultOptions.call(this),{label:{visible:!0,position:"outer"}},{})},e.prototype.afterRender=function(){if(this.options.label&&this.options.label.visible){var e=new Lm(Object(B["__assign"])({view:this.view,plot:this},this.options.label));e.render()}var i=[],n=this.view.get("elements");E["each"](n,(function(t){var e=t.getShapes();E["each"](e,(function(t){i.push(t)}))})),jm(i),t.prototype.afterRender.call(this)},e.prototype.extractLabel=function(){},e.prototype.animation=function(){t.prototype.animation.call(this),this.column.animate={appear:{animation:"clipInFromCenterVertical",duration:600},update:{animation:"updateFromCenterVertical",duration:600}}},e}(Zv),Dm=Im;Qp("rangeColumn",Im);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="rangeColumn",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=Dm.getDefaultOptions})(Jp);var Fm=0,Em=15,Rm="#CCC",zm=2,Nm=-2,Ym=15;function Hm(t,e,i){return{x:t.x+i*Math.cos(e),y:t.y+i*Math.sin(e)}}function Gm(){return{text:{fill:"rgba(0, 0, 0, 0.65)",fontSize:12},lineWidth:.5,lineStroke:"rgba(0, 0, 0, 0.45)",sidePadding:20,lineHeight:32}}var Wm=function(){function t(t){this.view=t.view,this.fields=t.fields,this.formatter=t.formatter,this.offsetX=t.offsetX,this.offsetY=t.offsetY,this.config=E["assign"](Gm(),E["pick"](t.style,["lineStroke","lineWidth"])),t.style&&(this.config.text=E["mix"](this.config.text,t.style)),this._adjustConfig(this.config),this._init()}return t.prototype.draw=function(){var t=this;if(this.view&&!this.view.destroyed){var e=E["clone"](this.view.get("filteredData"));this.halves=[[],[]],this.container=this.view.get("frontgroundGroup").addGroup();var i=this.view.get("elements")[0].getShapes(),n=this.view.get("coord"),r=this.fields[0],a=this.view.get("scales")[r],o=n.center,s=n.startAngle,l=n.getRadius(),u=this.view.get("panelRange"),h=u.width,c=u.height;this.width=h,this.height=c;for(var p=s,f=function(t){var n=e[t],s=a.scale(n[r]),u=p+2*Math.PI*s,h=p+(u-p)/2;p=u;var c=Hm(o,h,l+Fm),f=Hm(o,h,l+Em),g=Rm;if(2===d.fields.length){var v=d.fields[1],y=d.view.get("scales")[v],m=y.scale(n[v]),x=Math.floor(m*(i.length-1));g=i[x].attr("fill")}var b={_anchor:c,_inflection:f,_data:n,x:f.x,y:f.y,r:l+Em,fill:g,textGroup:null,_side:null},_=[];if(E["each"](d.fields,(function(t){_.push(n[t])})),d.formatter){var w=d.formatter(n[r],{_origin:n,color:g},t);E["isString"](w)&&(w=[w]),_=w}var M=new F["Group"],S={x:0,y:0,fontSize:d.config.text.fontSize,lineHeight:d.config.text.fontSize,fontWeight:d.config.text.fontWeight,fill:d.config.text.fill},k=n[r];d.formatter&&(k=_[0]);var O=E["clone"](S);2===_.length&&(O.fontWeight=700);var C=M.addShape("text",{attrs:E["mix"]({textBaseline:2===_.length?"top":"middle",text:k},O),data:n,offsetY:2===_.length?zm:0,name:"label"});if(C.name="label",2===_.length){var A=M.addShape("text",{attrs:E["mix"]({textBaseline:"bottom",text:_[1]},S),data:n,offsetY:Nm,name:"label"});A.name="label"}b.textGroup=M,c.x<o.x?(b._side="left",d.halves[0].push(b)):(b._side="right",d.halves[1].push(b))},d=this,g=0;g<e.length;g++)f(g);var v=Math.floor(c/this.config.lineHeight);E["each"](this.halves,(function(e){e.length>v&&e.splice(v,e.length-v),e.sort((function(t,e){return t.y-e.y})),t._antiCollision(e)})),this.view.get("canvas").draw()}},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype._init=function(){var t=this;this.view.on("beforerender",(function(){t.clear()})),this.view.on("afterrender",(function(){t.draw()}))},t.prototype._antiCollision=function(t){var e,i=this,n=this.view.get("coord"),r=n.getHeight(),a=n.center,o=n.getRadius(),s=a.y-o-Em-this.config.lineHeight,l=!0,u=r,h=0,c=Number.MIN_VALUE,p=0,f=t.map((function(t){var e=t.y;e>h&&(h=e),e<c&&(c=e);var n=t.textGroup,r=n.getBBox().width;return r>=p&&(p=r),{size:i.config.lineHeight,targets:[e-s]}}));h-s>u&&(u=h-s);var d=function(t){t.forEach((function(t){var e=(Math.min.apply(c,t.targets)+Math.max.apply(c,t.targets))/2;t.pos=Math.min(Math.max(c,e-t.size/2),u-t.size)}))};while(l){d(f),l=!1,e=f.length;while(e--)if(e>0){var g=f[e-1],v=f[e];g.pos+g.size>v.pos&&(g.size+=v.size,g.targets=g.targets.concat(v.targets),g.pos+g.size>u&&(g.pos=u-g.size),f.splice(e,1),l=!0)}}e=0,f.forEach((function(n){var r=s;n.targets.forEach((function(){t[e].y=n.pos+r+i.config.lineHeight/2,r+=i.config.lineHeight,e++}))}));var y=[];t.forEach((function(t){var e=i._drawLabel(t);i.container.add(e),i._drawLabelLine(t,p),y.push(e)}))},t.prototype._drawLabel=function(t){var e=this.view.get("coord"),i=e.getCenter(),n=e.getRadius(),r=(this.width,t.y),a=t.textGroup,o=a.get("children"),s="left"===t._side?1:-1,l={textAlign:"left"===t._side?"right":"left",x:"left"===t._side?i.x-n-this.config.sidePadding:i.x+n+this.config.sidePadding};return this.offsetX&&(l.x+=this.offsetX*s),o.forEach((function(t){var e=t.get("offsetY"),i=r+e;t.attr(l),t.attr("y",i)})),a},t.prototype._drawLabelLine=function(t,e){var i=[t._anchor.x,t._anchor.y],n=[t._inflection.x,t._inflection.y],r=(t.fill,t.y),a=t.textGroup;if(a){var o=["left"===t._side?a.getBBox().maxX+4:a.getBBox().minX-4,r],s=[i,n,o];if(n[1]!==r)if(n[1]<r){var l=n,u=o[0]+e+Ym,h=o[0]-e-Ym,c=["left"===t._side?u:h,n[1]],p=["left"===t._side?o[0]+e:o[0]-e,o[1]];s=[i,l,c,p,o],("right"===t._side&&c[0]<l[0]||"left"===t._side&&c[0]>l[0])&&(s=[i,p,o])}else s=[i,[n[0],r],o];for(var f=[],d=0;d<s.length;d++){var g=s[d],v="L";0===d&&(v="M"),f.push([v,g[0],g[1]])}this.container.addShape("path",{attrs:{path:f,lineWidth:this.config.lineWidth,stroke:this.config.lineStroke}})}},t.prototype._adjustConfig=function(t){t.text.fontSize&&(t.lineHeight=3*t.text.fontSize)},t}(),Xm=Wm;function Vm(t,e,i){return{x:t.x+i*Math.cos(e),y:t.y+i*Math.sin(e)}}function qm(t,e,i){void 0===i&&(i=0);var n=Math.max(0,Math.min(t.x+t.width+i,e.x+e.width+i)-Math.max(t.x-i,e.x-i)),r=Math.max(0,Math.min(t.y+t.height+i,e.y+e.height+i)-Math.max(t.y-i,e.y-i));return n*r}function Um(t,e,i){void 0===i&&(i=0);var n=Math.max(0,Math.min(t.x+t.width+i,e.x+e.width+i)-Math.max(t.x-i,e.x-i)),r=Math.max(0,Math.min(t.y+t.height+i,e.y+e.height+i)-Math.max(t.y-i,e.y-i));return n&&t.x<e.x&&(n=-n),r&&t.y<e.y&&(r=-r),t.x===e.x&&t.width===e.width&&(n=e.width),t.y===e.y&&t.height===e.height&&(r=e.height),{xOverlap:n,yOverlap:r}}var Zm=function(t,e,i){return void 0===i&&(i=Math.pow(Number.EPSILON,.5)),[t,e].includes(1/0)?Math.abs(t)===Math.abs(e):Math.abs(t-e)<i},Qm=document.createElement("canvas"),$m=Qm.getContext("2d"),Km=E["memoize"]((function(t,e){void 0===e&&(e={});var i=e.fontSize,n=e.fontFamily,r=e.fontWeight,a=e.fontStyle,o=e.fontVariant;return $m.font=[a,o,r,i+"px",n].join(" "),$m.measureText(E["isString"](t)?t:"").width}),(function(t,e){return e?Object(B["__spreadArrays"])([t],E["values"](e)).join(""):t})),Jm=function(t,e,i,n){var r,a=16,o=Km("...",i);r=E["isString"](t)?t:E["toString"](t);var s,l,u=e,h=[];if(Km(t,i)<=e)return t;while(1){if(s=r.substr(0,a),l=Km(s,i),l+o>u&&l>u)break;if(h.push(s),u-=l,r=r.substr(a),!r)return h.join("")}while(1){if(s=r.substr(0,1),l=Km(s,i),l+o>u)break;if(h.push(s),u-=l,r=r.substr(1),!r)return h.join("")}return h.join("")+"..."},tx=js("pie"),ex=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.showLabels=function(e,i){var n=this;t.prototype.showLabels.call(this,e,i);var r=this.get("element").get("view"),a=this.get("coord"),o=r.get("panelRange"),s=this.get("labelsRenderer"),l=s.get("group").get("children"),u=r.get("filteredData"),h=this.getLabelOptions().fields,c=h[0],p=h[1],f=r.get("scales")[c];l.forEach((function(t,e){var i=u[e],n=f.scale(i[c]);t.attr("data",{value:i[c],name:i[p],percent:n})}));var d=s.get("items")||[];this.anchors=[];var g=a.getRadius()+this.getOffsetOfLabel();this.anchorRadius=g,l.forEach((function(t,e){var i=d[e],r=Vm(a.getCenter(),i.angle,g);n.anchors.push(Object(B["__assign"])(Object(B["__assign"])(Object(B["__assign"])({},i),r),{id:t.id}))}));var v=s.get("lineGroup").get("children")||[];this.adjustPosition(l,d,a,o),this.adjustTexts(l,d,a,o),this.adjustOverlap(l,o),this.adjustLines(l,d,v,a,o),r.get("canvas").draw()},e.prototype.adjustTexts=function(t,e,i,n){var r=this;t.forEach((function(t){var a=e.find((function(e){return e.id===t.id}));r.adjustLabelText(t,a,i,n)}))},e.prototype.adjustItems=function(t){return t},e.prototype.adjustLabelText=function(t,e,i,n){var r=t.getBBox(),a=e.textAlign,o="right"===a?r.maxX-n.minX:n.maxX-r.minX;if(o<r.width){var s={fontFamily:t.attr("fontFamily"),fontSize:t.attr("fontSize"),fontVariant:t.attr("fontVariant"),fontWeight:t.attr("fontWeight"),fontStyle:t.attr("fontStyle")},l=t.attr("text"),u=t.attr("data"),h=["[\\d,.]*","[\\d.]*%",u.name],c=l.split("\n").map((function(t){return Jm(t,o-2,s,h)}));t.attr("text",c.join("\n"))}},e.prototype.adjustOverlap=function(t,e){var i=this,n=t.slice();if(!this.getLabelOptions().allowOverlap){n.sort((function(t,e){var i=t.attr("data").value,n=e.attr("data").value;return i>n?-1:1}));for(var r=1;r<n.length;r++)for(var a=n[r],o=0,s=r-1;s>=0;s--){var l=n[s],u=l.getBBox(),h=a.getBBox();if(l.get("visible")&&(o=qm(u,h),!Zm(o,0))){a.set("visible",!1);break}}n.forEach((function(t){return i.checkInPanel(t,e)}))}},e.prototype.checkInPanel=function(t,e){var i=t.getBBox();e.y<=i.y&&e.y+e.height>=i.y+i.height||t.set("visible",!1)},e.prototype.getLabelOptions=function(){return this.get("labelOptions")},e}(tx),ix=ex,nx=i("2ef0");function rx(t){var e=Number(t.endsWith("%")?t.slice(0,-1):t);return e/100}var ax=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.adjustPosition=function(t,e,i){var n=this,r=i.getCenter(),a=i.getRadius(),o=this.getOffsetOfLabel(),s=a+o;t.forEach((function(a,o){var l=e.find((function(t){return t.id===a.id})),u=Vm(r,l.angle,s),h=u.x,c=u.y;if(a.attr("x",h),a.attr("y",c),a.attr("textBaseline","middle"),o>0){var p=t[o-1];n.resolveCollision(a,p,l,i)}}))},e.prototype.adjustLines=function(t,e,i,n){i.forEach((function(t){return t.set("visible",!1)}))},e.prototype.adjustLabelText=function(){},e.prototype.getOffsetOfLabel=function(){var t=this.get("labelOptions"),e=t.offset,i=this.get("coord").getRadius();return nx["isString"](e)&&(e=i*rx(e)),e>0?0:e},e.prototype.resolveCollision=function(t,e,i,n){var r=i.angle,a=t.getBBox(),o=e.getBBox(),s={x:(a.minX+a.maxX)/2,y:(a.minY+a.maxY)/2},l=nx["clone"](s),u=nx["clone"](s);if(e.id!==t.id){var h=Um(a,o),c=h.xOverlap,p=h.yOverlap;if(c&&(l.x=s.x+c,l.y=s.y+Math.tan(r)*c),p){var f=p,d=n.getCenter();f=s.y<d.y?f<0?f:o.minY-a.maxY:f>0?f:o.maxY-a.minY,u.y=s.y+f,u.x=s.x+f/Math.tan(r)}var g=Mh(s,l),v=Mh(s,u),y=g<v?l:u;t.attr("x",y.x),t.attr("y",y.y)}},e}(ix);Ts("inner",ax);var ox=16,sx=4,lx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.adjustPosition=function(t,e,i,n){var r=this;this._adjustLabelPosition(t,i,n);var a=E["filter"](t,(function(t){return"right"===E["find"](r.anchors,(function(e){return e.id===t.id})).textAlign})),o=E["filter"](t,(function(t){return"left"===E["find"](r.anchors,(function(e){return e.id===t.id})).textAlign}));[o,a].forEach((function(t,e){r._antiCollision(t,i,n,!e)}))},e.prototype.adjustLines=function(t,e,i,n,r){var a=this,o=this.getLabelOptions();E["each"](t,(function(t,e){var s=i[e],l=a._getLinePath(t,n,r);if(s.attr("path",l),o.line)for(var u in o.line)s.attr(u,o.line[u]);s.set("visible",t.get("visible"))}))},e.prototype.getOffsetOfLabel=function(){var t=this.getLabelOptions(),e=t.offset;return E["isString"](e)&&(e=rx(e)),void 0===e?ox:e<2*sx?e/2:e-sx},e.prototype._antiCollision=function(t,e,i,n){var r=this,a=this.getLabelHeight(),o=this.anchorRadius,s=e.getCenter(),l=Math.min(i.height,Math.max(2*o+2*a,t.length*a)),u=Math.floor(l/a);this.get("labelOptions").allowOverlap||t.slice(u).forEach((function(t){t.set("visible",!1)})),t.splice(u,t.length-u),t.sort((function(t,e){return t.getBBox().y-e.getBBox().y}));var h,c=!0,p=s.y+l/2,f=s.y-l/2,d=t.map((function(t){var e=t.getBBox();return e.maxY>p&&(p=Math.min(i.maxY,e.maxY)),e.minY<f&&(f=Math.max(i.minY,e.minY)),{text:t.attr("text"),size:a,pos:e.y,targets:[]}})),g=0;while(g<d.length)g===d.length-1?d[g].targets[0]=p:d[g].targets[0]=d[g+1].pos-d[g+1].size/2,g++;while(c){d.forEach((function(t){var e=E["last"](t.targets);t.pos=Math.max(f,Math.min(t.pos,e-t.size))})),c=!1,h=d.length;while(h--)if(h>0){var v=d[h-1],y=d[h];if(v.pos+v.size>y.pos){v.size+=y.size,v.targets=v.targets.concat(y.targets);var m=E["last"](v.targets);v.pos+v.size>m&&(v.pos=m-v.size),d.splice(h,1),c=!0}else v.targets.splice(-1,1,y.pos)}}h=0,d.forEach((function(e){var i=a/2;e.targets.forEach((function(){t[h].attr("y",e.pos+i),i+=a,h++}))}));var x=[],b=[];t.forEach((function(t){var e=r.anchors.find((function(e){return e.id===t.id}));e.angle>=0&&e.angle<=Math.PI?b.push(t):x.push(t)})),[x,b].forEach((function(a,l){if(a.length){var u=l?E["last"](a).getBBox().maxY-s.y:s.y-E["head"](a).getBBox().minY;u=Math.max(o,u);var h=r.getOffsetOfLabel(),c=r.getCrookDistance(),p=Math.max.apply(0,E["map"](t,(function(t){return t.getBBox().width})))+h+c,f=Math.max(o,Math.min((u+o)/2,s.x-(i.minX+p))),d=f*f,g=u*u;a.forEach((function(t){var i=t.getBBox(),a={x:i.minX+i.width/2,y:i.minY+i.height/2},o=Math.pow(a.y-s.y,2),l=r.anchors.find((function(e){return e.id===t.id})),u=Vm(s,l.angle,e.getRadius()),h=(n?1:-1)*c*2;if(o>g)console.warn("异常(一般不会出现)",t.attr("text")),t.attr("x",u.x+h);else{var p=s.x+(n?1:-1)*Math.sqrt((1-o/g)*d);if(s.x===u.x&&a.y===u.y||s.y===u.y&&p===u.x)p=u.x;else{var f=(s.y-u.y)/(s.x-u.x),v=(a.y-u.y)/(p-u.x),y=Math.atan((f-v)/(1+f*v));Math.cos(y)>0&&(n?p<u.x:p>u.x)&&(p=u.x)}t.attr("x",p+h)}}))}}))},e.prototype._adjustLabelPosition=function(t,e,i){var n=this,r=this.getCrookDistance();t.forEach((function(t){var e=n.anchors.find((function(e){return e.id===t.id})),i="left"===e.textAlign;t.attr("x",e.x+(i?2*r:2*-r)),t.attr("y",e.y),t.attr("textBaseline","middle")}))},e.prototype._getLinePath=function(t,e,i){var n=this.getLabelOptions(),r=!!n.line&&n.line.smooth,a=this.anchors.find((function(e){return e.id===t.id})),o=a.angle,s=e.getCenter(),l=this.getCrookDistance(),u=Vm(s,o,e.getRadius()),h=Vm(s,o,e.getRadius()+4),c=u.x-a.x<=0,p={x:t.attr("x")+(c?-l:l),y:t.attr("y")},f=["C",p.x+(c?-4:4),p.y,2*h.x-u.x,2*h.y-u.y,h.x,h.y],d=["L",h.x,h.y],g=r?f:d,v=["M",p.x,p.y].concat(g).concat("L",u.x,u.y);return v.join(",")},e.prototype.getCrookDistance=function(){var t=this.get("labelOptions"),e=t.offset;return e<2*sx?e/2:sx},e.prototype.getLabelHeight=function(){var t=this.get("labelOptions");if(!t.labelHeight){var e=this.get("labelsRenderer"),i=e.get("group").get("children");return E["head"](i)?E["head"](i).getBBox().height:14}return t.labelHeight},e.prototype.getDefaultOffset=function(e){var i=t.prototype.getDefaultOffset.call(this,e);return void 0===i?ox:i<=sx?1:i-sx},e}(ix);Ts("outer",lx);var ux=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.adjustPosition=function(t,e,i,n){this._adjustLabelPosition(t,e,i,n)},e.prototype.adjustLines=function(t,e,i,n,r){var a=this;E["each"](t,(function(t,e){var o=i[e],s=a._getLinePath(t,n,r);o.attr("path",s),o.set("visible",t.get("visible"))}))},e.prototype.getOffsetOfLabel=function(){var t=this.get("labelOptions"),e=t.offset;return void 0===e?ox:e<=sx?1:e-sx},e.prototype._adjustLabelPosition=function(t,e,i,n){var r=this,a=i.getCenter(),o=i.getRadius(),s=this.getCrookDistance();t.forEach((function(t,i){var n=e[i],l=r.getOffsetOfLabel(),u=Vm(a,n.angle,o+l),h="left"===n.textAlign;t.attr("x",u.x+(h?2*s:2*-s)),t.attr("y",u.y)}))},e.prototype._getLinePath=function(t,e,i){var n=this.getLabelOptions(),r=!!n.line&&n.line.smooth,a=this.anchors.find((function(e){return e.id===t.id})),o=a.angle,s=e.getCenter(),l=e.getRadius(),u=Vm(s,o,l),h=this.getOffsetOfLabel(),c="left"===a.textAlign,p=Vm(s,o,l+h),f=this.getCrookDistance()*(c?1:-1),d={x:t.attr("x")-f,y:t.attr("y")},g="";return g=["M "+u.x,u.y+" Q"+p.x,p.y+" "+d.x,d.y].join(","),!1===r&&(g=["M "+u.x,u.y+" L"+p.x,p.y+" H"+d.x].join(",")),g},e.prototype.getDefaultOffset=function(e){var i=t.prototype.getDefaultOffset.call(this,e);return void 0===i?ox:i<=sx?1:i-sx},e.prototype.getCrookDistance=function(){var t=this.get("labelOptions"),e=t.offset;return e<2*sx?e/2:sx},e}(ix);Ts("outer-center",ux);var hx={onPieClick:"interval:click",onPieDblclick:"interval:dblclick",onPieMousemove:"interval:mousemove",onPieMouseenter:"interval:mouseenter",onPieMouseleave:"interval:mouseleave",onPieMousedown:"interval:mousedown",onPieMouseup:"interval:mouseup",onPieContextmenu:"interval:contextmenu"};E["assign"](R,hx);var cx=function(t){var e=t.opacity||1;return{opacity:.5*e}},px=function(t){var e=t.opacity||1;return{opacity:.5*e}};Ap("pie",{columnStyle:{normal:{},active:cx,disable:px,selected:{lineWidth:1,stroke:"black"}}});var fx={pie:"interval"},dx={pie:"column"},gx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{width:400,height:400,title:{visible:!1},description:{visible:!1},forceFit:!0,padding:"auto",radius:.8,label:{visible:!0,type:"inner",autoRotate:!1,allowOverlap:!1,line:{smooth:!0}},legend:{visible:!0,position:"right-center"},tooltip:{visible:!0,shared:!1,crosshairs:null},pieStyle:{stroke:"white",lineWidth:1}})},e.prototype.getOptions=function(e){var i=this.constructor.getDefaultOptions(),n=E["deepMix"]({},t.prototype.getOptions.call(this,e),i,e);return n},e.prototype.afterInit=function(){t.prototype.afterInit.call(this);var e=this.options;if(e.label&&e.label.visible){var i=e.label;if("spider"===i.type){var n=new Xm({view:this.view,fields:e.colorField?[e.angleField,e.colorField]:[e.angleField],style:i.style?i.style:{},formatter:!!e.label.formatter&&e.label.formatter,offsetX:e.label.offsetX,offsetY:e.label.offsetY});this.spiderLabel=n}}},e.prototype.geometryParser=function(t,e){return"g2"===t?fx[e]:dx[e]},e.prototype.scale=function(){var t=this.options,e={};e[t.angleField]={},e[t.colorField]={type:"cat"},this.setConfig("scales",e)},e.prototype.processData=function(t){var e=this.options.angleField;return t.map((function(t){var i;return Object(B["__assign"])(Object(B["__assign"])({},t),(i={},i[e]="string"===typeof t[e]?Number.parseFloat(t[e]):t[e],i))}))},e.prototype.axis=function(){},e.prototype.coord=function(){var t=this.options,e={type:"theta",cfg:{radius:t.radius,innerRadius:t.innerRadius||0}};this.setConfig("coord",e)},e.prototype.addGeometry=function(){var t=this.options,e=Rf("interval","main",{plot:this,positionFields:[t.angleField]});e.adjust=[{type:"stack"}],this.pie=e,t.label&&this.label(),t.tooltip&&t.tooltip.visible&&this.tooltip(),this.setConfig("element",e)},e.prototype.animation=function(){t.prototype.animation.call(this);var e=this.options;!1===e.animation&&(this.pie.animate=!1)},e.prototype.annotation=function(){},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,f)},e.prototype.tooltip=function(){var e=this;t.prototype.tooltip.call(this);var i=this.options;if(i.tooltip.htmlContent){var n=i.tooltip.htmlContent;this.setConfig("tooltip",Object(B["__assign"])(Object(B["__assign"])({},this.options.tooltip),{htmlContent:function(t,i){if(i&&i.length){var r=e.options.angleField,a=e.getFilteredSum();return n(t,i.map((function(t){var e=E["get"](t,"point._origin."+r),i=e/a;return Object(B["__assign"])(Object(B["__assign"])({},t),{percent:i})})))}return"<div></div>"}}))}},e.prototype.getFilteredSum=function(){var t=this.options.angleField,e=this.view.get("filteredData")||[];return e.reduce((function(e,i){return e+i[t]}),0)},e.prototype.label=function(){var t=this,e=this.options,i=Object(B["__assign"])({},e.label);if(i=this.adjustLabelDefaultOptions(this.options),this.showLabel()){if("inner"===i.type?i.labelLine=!1:i.labelLine=!i||!i.line||i.line,i.formatter){var n=i.formatter;i.formatter=function(e,i,r){var a=t.options.angleField,o=t.getFilteredSum(),s=i._origin[a]/o;return n(e,Object(B["__assign"])(Object(B["__assign"])({},i),{percent:s}),r)}}var r=i.type;-1!==["spider"].indexOf(r)&&(r=null),this.pie.label=yc("label",Object(B["__assign"])({plot:this,labelType:r,fields:e.colorField?[e.angleField,e.colorField]:[e.angleField]},i))}else this.pie.label=!1},e.prototype.showLabel=function(){var t=this.options;return t.label&&!0===t.label.visible&&"spider"!==t.label.type},e.prototype.adjustLabelDefaultOptions=function(t){var e=Object(B["__assign"])({},t.label);return e&&"inner"===e.type&&(e=E["deepMix"]({},{offset:-1/3*100+"%",style:{textAlign:"center"}},e)),e&&"outer"===e.type&&(e=E["deepMix"]({},{offset:20},e)),e},e}(Yp),vx=gx;Qp("pie",gx);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="pie",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=vx.getDefaultOptions})(Jp);var yx=function(){function t(t){this.type="variable",E["assign"](this,t)}return t.prototype.normalize=function(){},t}(),mx=yx;function xx(t){var e=t.options,i=t.getResponsiveTheme(),n=e.padding,r=e.radius?e.radius:1,a=t.width,o=t.height,s=Yn("polar"),l=new s({radius:r,start:{x:n[3],y:n[0]},end:{x:a-n[1],y:o-n[2]}}),u={radius:r,coord:l},h=new mx({nodes:[{name:"innerRadius",value:0}]}),c=i.ring.constraints;new jg({nodes:h,constraints:c,region:u,plot:t,onEnd:function(){e.innerRadius=h.nodes[0].value}})}var bx=[{name:"responsiveRing",method:xx}],_x={preRender:bx},wx={ring:{constraints:[{name:"ringThickness"},{name:"minRingThickness"}]}};Ip("ring",wx);var Mx="color:#8c8c8c;font-size:14px;text-align:center;line-height:2;font-family:'-apple-system',BlinkMacSystemFont,'SegoeUI',Roboto,'HelveticaNeue',Helvetica,'PingFangSC','HiraginoSansGB','MicrosoftYaHei',SimSun,'sans-serif';pointer-events:none;",Sx="font-weight:300;",kx="font-size:32px;font-weight:bold;color:#4D4D4D";function Ox(t,e,i){var n=Mx+"width:"+i+"px;";return'<div class="ring-guide-html '+e+'" style='+n+'><span class="ring-guide-value" style='+kx+">"+t+"</span></div>"}function Cx(t,e,i,n){var r=Mx+"width:"+n+"px;";return'<div class="ring-guide-html '+i+'" style='+r+'><span class="ring-guide-name" style='+Sx+">"+t+'</span><br/><span class="ring-guide-value" style='+kx+">"+e+"</span></div>"}var Ax={onRingClick:"interval:click",onRingDblclick:"interval:dblclick",onRingMousemove:"interval:mousemove",onRingMouseenter:"interval:mouseenter",onRingMouseleave:"interval:mouseleave",onRingMousedown:"interval:mousedown",onRingMouseup:"interval:mouseup",onRingContextmenu:"interval:contextmenu"};E["assign"](R,Ax);var Lx={ring:"interval"},Px={interval:"ring"},jx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ring",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{radius:.8,innerRadius:.64,statistic:{visible:!0,triggerOn:"mouseenter",triggerOff:"mouseleave"}})},e.prototype.getOptions=function(e){var i=t.prototype.getOptions.call(this,e),n=this.constructor.getDefaultOptions();return E["deepMix"]({},i,n,e)},e.prototype.beforeInit=function(){t.prototype.beforeInit.call(this),e.centralId++,this.statisticClass="statisticClassId"+e.centralId;var i=this.options;i.responsive&&"auto"!==i.padding&&this.applyResponsive("preRender")},e.prototype.afterInit=function(){var e=this;if(t.prototype.afterInit.call(this),this.statistic&&this.statistic.visible&&this.statistic.triggerOn){var i=this.statistic.triggerOn;this.view.on("interval:"+i,E["debounce"]((function(t){var i=e.parseStatisticData(t.data._origin),n=e.getStatisticHtmlString(i);document.getElementsByClassName(e.statisticClass)[0].innerHTML=n}),150));var n=this.statistic.triggerOff?this.statistic.triggerOff:"mouseleave";this.view.on("interval:"+n,E["debounce"]((function(t){var i=e.getTotalValue(),n=e.parseStatisticData(i),r=e.getStatisticHtmlString(n);document.getElementsByClassName(e.statisticClass)[0].innerHTML=r}),150))}},e.prototype.geometryParser=function(t,e){return"g2"===t?Lx[e]:Px[e]},e.prototype.coord=function(){var t=this.options,e={type:"theta",cfg:{radius:t.radius,innerRadius:t.innerRadius}};this.setConfig("coord",e)},e.prototype.annotation=function(){var t=[],e=this.options;if(e.statistic&&e.statistic.visible){var i=this.drawStatistic(e.statistic);t.push(i),this.statistic=i}this.setConfig("annotations",t)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,d)},e.prototype.drawStatistic=function(t){var e,i,n=E["deepMix"]({},{type:"html",top:!0,position:["50%","50%"],triggerOn:"mouseenter"},t);if(t.content)e=t.content;else{var r=this.getTotalValue();e=this.parseStatisticData(r)}return i=t.htmlContent?t.htmlContent(e):this.getStatisticTemplate(e),n.html=i,n.triggerOn&&this.setConfig("tooltip",!1),n},e.prototype.getTotalValue=function(){var t,e=this.options,i=0;E["each"](e.data,(function(t){"number"===typeof t[e.angleField]&&(i+=t[e.angleField])}));var n=(t={},t[e.angleField]=i,t[e.colorField]="总计",t);return n},e.prototype.parseStatisticData=function(t){var e=this.options,i=e.angleField;return e.colorField?{name:t[e.colorField],value:t[i]}:t[i]},e.prototype.getStatisticTemplate=function(t){var e,i=this.getStatisticSize();if(E["isString"](t))e=Ox(t,this.statisticClass,i);else if(E["isObject"](t)&&2===E["keys"](t).length){var n=t;e=Cx(n.name,n.value,this.statisticClass,i)}return e},e.prototype.getStatisticHtmlString=function(t){var e,i=this.statistic.triggerOn;return E["isString"](i)&&(e=this.getStatisticTemplate(t)),E["isFunction"](i)&&(e=i(t),e='<div class="ring-guide-html '+this.statisticClass+'">'+e+"</div>"),e},e.prototype.applyResponsive=function(t){var e=this,i=_x[t];E["each"](i,(function(t){var i=t;i.method(e)}))},e.prototype.getStatisticSize=function(){return this.width*this.options.radius},e.prototype.adjustLabelDefaultOptions=function(t){var e=Object(B["__assign"])({},t.label);if(e&&"inner"===e.type){var i=e.style||{};i.textAlign||(i.textAlign="center"),e.style=i,e.offset||(e.offset=(t.innerRadius-1)/2*100+"%")}return e},e.centralId=0,e}(vx),Tx=jx;Qp("ring",jx);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="ring",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=Tx.getDefaultOptions})(Jp);var Bx={onAreaClick:"area:click",onAreaDblclick:"area:dblclick",onAreaMousemove:"area:mousemove",onAreaMouseenter:"area:mouseenter",onAreaMouseleave:"area:mouseleave",onAreaMousedown:"area:mousedown",onAreaMouseup:"area:mouseup",onAreaContextmenu:"area:contextmenu",onLineClick:"line:click",onLineDblclick:"line:dblclick",onLineMousemove:"line:mousemove",onLineMouseenter:"line:mouseenter",onLineMouseleave:"line:mouseleave",onLineMousedown:"line:mousedown",onLineMouseup:"line:mouseup",onLineContextmenu:"line:contextmenu",onPointClick:"point:click",onPointDblclick:"point:dblclick",onPointMousemove:"point:mousemove",onPointMouseenter:"point:mouseenter",onPointMouseleave:"point:mouseleave",onPointMousedown:"point:mousedown",onPointMouseup:"point:mouseup",onPointContextmenu:"point:contextmenu"};E["assign"](R,Bx);var Ix={area:"area",line:"line",point:"point"},Dx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{width:400,height:400,title:{visible:!1},description:{visible:!1},forceFit:!0,padding:"auto",radius:.8,smooth:!1,line:{visible:!0,size:2,style:{opacity:1}},area:{visible:!0,style:{opacity:.25}},point:{visible:!1,size:4,shape:"point",style:{opacity:1}},angleAxis:{visible:!0,autoHideLabel:!1,autoRotateLabel:!0,autoRotateTitle:!0,line:{visible:!1},tickLine:{visible:!1},grid:{visible:!0,style:{lineDash:[0,0]}},label:{visible:!0,offset:8},title:{visible:!1}},radiusAxis:{min:0,visible:!0,autoHideLabel:!1,autoRotateLabel:!0,autoRotateTitle:!0,line:{visible:!0},tickLine:{visible:!0},gridType:"line",grid:{visible:!0,style:{lineDash:[0,0]}},label:{visible:!0},title:{visible:!1}},label:{visible:!1,type:"point"},legend:{visible:!0,position:"left-top"},tooltip:{visible:!0,shared:!0,crosshairs:null}})},e.prototype.init=function(){var e=this.options;e.xField=e.angleField,e.yField=e.radiusField,t.prototype.init.call(this)},e.prototype.getOptions=function(e){var i=t.prototype.getOptions.call(this,e),n=this.constructor.getDefaultOptions();return E["deepMix"]({},i,n,e)},e.prototype.geometryParser=function(t,e){return Ix[e]},e.prototype.scale=function(){var e=this.options,i={};i[e.angleField]={},E["has"](e,"angleAxis")&&Nf(i[e.angleField],e.angleAxis),i[e.radiusField]={},E["has"](e,"radiusAxis")&&Nf(i[e.radiusField],e.radiusAxis),this.setConfig("scales",i),t.prototype.scale.call(this)},e.prototype.coord=function(){var t=this.options,e={type:"polar",cfg:{radius:t.radius}};this.setConfig("coord",e)},e.prototype.axis=function(){var t=this.options,e=yc("axis",{plot:this,dim:"angle"}),i=yc("axis",{plot:this,dim:"radius"}),n={fields:{}};n.fields[t.angleField]=e,n.fields[t.radiusField]=i,this.setConfig("axes",n)},e.prototype.addGeometry=function(){var t=this.options;if(t.area.visible){var e=Rf("area","main",{plot:this});this.setConfig("element",e),this.area=e}if(t.line&&t.line.visible){var i=Rf("line","guide",{plot:this});this.setConfig("element",i),this.line=i}if(t.point&&t.point.visible){var n=Rf("point","guide",{plot:this});this.setConfig("element",n),this.point=n}},e.prototype.label=function(){},e.prototype.annotation=function(){},e.prototype.animation=function(){t.prototype.animation.call(this);var e=this.options;!1===e.animation&&(this.area&&(this.area.animate=!1),this.line&&(this.line.animate=!1),this.point&&(this.point.animate=!1))},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,g)},e}(Yp),Fx=Dx;Qp("radar",Dx);var Ex=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="radar",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=Fx.getDefaultOptions,e}(Jp),Rx=Ex,zx={splitPoints:function(t){var e=[],i=t.x,n=t.y;return n=E["isArray"](n)?n:[n],E["each"](n,(function(t,n){var r={x:E["isArray"](i)?i[n]:i,y:t};e.push(r)})),e},addFillAttrs:function(t,e){e.color&&!t.fill&&(t.fill=e.color),E["isNumber"](e.opacity)&&(t.opacity=t.fillOpacity=e.opacity)},addStrokeAttrs:function(t,e){e.color&&!t.stroke&&(t.stroke=e.color),E["isNumber"](e.opacity)&&(t.opacity=t.strokeOpacity=e.opacity)}},Nx={lerp:function(t,e,i){return(1-i)*t+i*e}},Yx=function(t){var e=mt.theme.shape.interval,i=E["mix"]({},e,t.style);return zx.addFillAttrs(i,t),t.color&&!i.stroke&&(i.stroke=i.stroke||t.color),i},Hx=function(t){var e=mt.theme.shape.hollowInterval,i=E["mix"]({},e,t.style);return zx.addStrokeAttrs(i,t),i};function Gx(t,e,i,n){return 0===e?[[t+.5*i/Math.PI/2,n/2],[t+.5*i/Math.PI,n],[t+i/4,n]]:1===e?[[t+.5*i/Math.PI/2*(Math.PI-2),n],[t+.5*i/Math.PI/2*(Math.PI-1),n/2],[t+i/4,0]]:2===e?[[t+.5*i/Math.PI/2,-n/2],[t+.5*i/Math.PI,-n],[t+i/4,-n]]:[[t+.5*i/Math.PI/2*(Math.PI-2),-n],[t+.5*i/Math.PI/2*(Math.PI-1),-n/2],[t+i/4,0]]}function Wx(t,e,i,n,r,a,o){var s=2*Math.ceil(2*t/i*4),l=[],u=n;while(u<2*-Math.PI)u+=2*Math.PI;while(u>0)u-=2*Math.PI;u=u/Math.PI/2*i;var h=a-t+u-2*t;l.push(["M",h,e]);for(var c=0,p=0;p<s;++p){var f=p%4,d=Gx(p*i/4,f,i,r);l.push(["C",d[0][0]+h,-d[0][1]+e,d[1][0]+h,-d[1][1]+e,d[2][0]+h,-d[2][1]+e]),p===s-1&&(c=d[2][0])}return l.push(["L",c+h,o+t]),l.push(["L",h,o+t]),l.push(["L",h,e]),l}function Xx(t,e,i,n,r,a,o,s){for(var l=o.getBBox(),u=l.maxX-l.minX,h=l.maxY-l.minY,c=5e3,p=0;p<n;p++){var f=n<=1?0:p/(n-1),d=a.addShape("path",{attrs:{path:Wx(s,l.minY+h*i,u/4,0,u/Nx.lerp(56,64,f),t,e),fill:r,clip:o,opacity:Nx.lerp(.6,.3,f)}});"canvas"===mt.renderer&&d.animate({transform:[["t",u/2,0]],repeat:!0},Nx.lerp(c,.7*c,f))}}function Vx(t,e){var i=t.get("parent"),n=i.getBBox(),r=Math.min(Math.max(0,E["get"](e,"factor",.5)),1),a=E["get"](e,"delay",0),o=E["get"](e,"duration",800),s=e.callback,l=(n.minX+n.maxX)/2,u=n.maxY,h=i.find((function(t){return"wrap"==t.get("name")})),c=h.attr("opacity");h.attr("opacity",0),h.animate({opacity:c},o*r,"easeLinear",null,a);var p=i.find((function(t){return"waves"==t.get("name")})),f=E["clone"](p.attr("matrix"));p.attr("transform",[["t",-l,-u],["s",1,0],["t",l,u]]),p.animate({matrix:f},o,e.easing,(function(){return s&&s(i,h,p)}),a)}Ao("interval","liquid-fill-gauge",{draw:function(t,e){var i=.5,n=0,r=1/0;E["each"](t.points,(function(t){t.x<r&&(r=t.x),n+=t.x}));var a=n/t.points.length,o=this.parsePoint({x:a,y:i}),s=this.parsePoint({x:r,y:.5}),l=o.x-s.x,u=Math.min(l,s.y),h=Yx(t).fill,c=new F["Circle"]({attrs:{x:o.x,y:o.y,r:u}}),p=e.addGroup({name:"waves",attrs:{x:o.x,y:o.y,clip:c}});return Xx(o.x,o.y,1-t.points[1].y,3,h,p,c,4*u),e.addShape("circle",{name:"wrap",attrs:E["mix"](Hx(t),{x:o.x,y:o.y,r:u,fill:"transparent"})})}}),Vx.animationName="liquidMoveIn",ye.registerAnimation("appear","liquidMoveIn",Vx);var qx={column:"interval"},Ux={interval:"liquid"},Zx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="liquid",e.shouldFadeInAnnotation=!0,e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){var e={animation:{factor:.4,easing:"easeExpOut",duration:800},liquidStyle:{lineWidth:2}};return E["deepMix"]({},t.getDefaultOptions.call(this),e)},e.prototype.init=function(){this.options.data=[{}],t.prototype.init.call(this)},e.prototype.coord=function(){},e.prototype.scale=function(){var e=this.options,i=e.min,n=e.max,r={value:{}};Nf(r.value,{min:Math.min(i,n),max:Math.max(i,n)}),this.setConfig("scales",r),t.prototype.scale.call(this)},e.prototype.axis=function(){this.setConfig("axes",!1)},e.prototype.adjustLiquid=function(t){var e=this.options;t.shape={values:["liquid-fill-gauge"]},t.tooltip=!1;var i=e.liquidStyle;E["isFunction"](i)&&(i=i()),i&&(t.style=i)},e.prototype.addGeometry=function(){var t=Rf("interval","main",{positionFields:["_","value"],plot:this});this.adjustLiquid(t),this.liquid=t,this.setConfig("element",t)},e.prototype.animation=function(){var t=this.options;if(!1===t.animation)this.liquid.animate=!1;else{var e=E["get"](t,"animation.factor"),i=E["get"](t,"animation.easing"),n=E["get"](t,"animation.duration");this.liquid.animate={appear:{animation:"liquidMoveIn",factor:e,easing:i,duration:n}}}},e.prototype.geometryParser=function(t,e){return"g2"===t?qx[e]:Ux[e]},e.prototype.annotation=function(){var t=[],e=this.extractStatistic();t.push(e),this.setConfig("annotations",t)},e.prototype.extractStatistic=function(){var t,e,i,n,r=this.options,a=r.statistic||{};if(t=E["isFunction"](a.formatter)?a.formatter(r.value):""+r.value,t){var o=void 0;o=r.width<r.height?.8*r.width:r.height,e=.8*o/t.length,i=Math.max(1,Math.ceil(.025*e))}!1===a.visible&&(n=0);var s=E["deepMix"]({style:{fontSize:e,shadowBlur:i}},a,{top:!0,content:t,type:"text",position:["_","median"],style:{opacity:n,fill:"transparent",shadowColor:"transparent",textAlign:"center"}});return delete s.visible,delete s.formatter,delete s.adjustColor,s},e.prototype.afterRender=function(){this.fadeInAnnotation();var t=this.options,e=t.padding?t.padding:this.config.theme.padding;t.defaultState&&"auto"!==e&&this.stateController.defaultStates(t.defaultState),"auto"===e&&this.paddingController.processAutoPadding()},e.prototype.processData=function(t){var e=this.options;return[{_:"_",value:e.value}]},e.prototype.changeValue=function(t){var e=this.options;e.value=t,this.changeData([])},e.prototype.fadeInAnnotation=function(){var t=this,e=this.options,i=e.animation||{},n=this.view.annotation().annotations,r=n[0].get("el"),a=this.calcAnnotationColorStyle();this.shouldFadeInAnnotation?r.animate(a,i.duration*Math.min(1,1.5*i.factor),null,(function(){t.shouldFadeInAnnotation=!1})):E["forIn"](a,(function(t,e){return r.attr(e,t)}))},e.prototype.calcAnnotationColorStyle=function(){var t=this.options,e={fill:"#f6f6f6",shadowColor:"black"},i={fill:"#303030",shadowColor:"white"};if(!1===E["get"](t,"statistic.adjustColor"))return{fill:E["get"](t,"statistic.style.fill",i.fill),shadowColor:E["get"](t,"statistic.style.shadowColor",i.shadowColor)};var n,r=t.min,a=t.max,o=t.value;if(r=Math.min(r,a),a=Math.max(r,a),n=r==a?1:(o-r)/(a-r),n>.55){var s=this.view.get("elements")[0].get("container").find((function(t){return"waves"==t.get("name")})),l=s.getChildByIndex(0),u=l.attr("fill"),h=.8,c=Nv(u),p=Math.round(.299*c[0]+.587*c[1]+.114*c[2])/h;return p<156?e:i}return i},e.prototype.updateConfig=function(e){t.prototype.updateConfig.call(this,e),this.shouldFadeInAnnotation=!0},e.prototype.getViewRange=function(){var e=t.prototype.getViewRange.call(this),i=this.options.liquidStyle,n=i.lineWidth?i.lineWidth:2,r=e.minX,a=e.minY,o=e.width,s=e.height,l=Math.min(o,s)-2*n,u=r+o/2,h=a+s/2,c=u-l/2,p=h-l/2;return new F["BBox"](c,p,l,l)},e}(Yp),Qx=Zx;Qp("liquid",Zx);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="liquid",t.prototype.createLayers.call(this,i)},e.prototype.changeValue=function(t,e){if(void 0===e&&(e=!1),e)this.eachLayer((function(e){e instanceof Qx&&e.changeValue(t)}));else{var i=this.layers[0];i instanceof Qx&&i.changeValue(t)}},e.getDefaultOptions=Qx.getDefaultOptions})(Jp);var $x=10,Kx=4;Ao("point","pointer",{draw:function(t,e){var i=t.points[0],n=this.parsePoint({x:0,y:0}),r=this.parsePoint({x:i.x,y:.5}),a={x:n.x-r.x,y:n.y-r.y},o=Math.sqrt(a.x*a.x+a.y*a.y);a.x*=1/o,a.y*=1/o;var s=-Math.PI/2,l=Math.cos(s)*a.x-Math.sin(s)*a.y,u=Math.sin(s)*a.x+Math.cos(s)*a.y,h=Math.PI/2,c=Math.cos(h)*a.x-Math.sin(h)*a.y,p=Math.sin(h)*a.x+Math.cos(h)*a.y,f=Math.atan2(a.y,a.x),d=Kx/2-$x,g=n.x+Math.cos(f)*d,v=n.y+Math.sin(f)*d,y=[["M",r.x+1*l,r.y+1*u],["L",g+3*l,v+3*u],["L",g+3*c,v+3*p],["L",r.x+1*c,r.y+1*p],["Z"]];e.addShape("circle",{attrs:{x:n.x,y:n.y,r:$x,lineWidth:Kx,stroke:t.color}});var m=e.addShape("path",{attrs:{path:y,fill:t.color}});return m}}),Ap("gauge",{stripWidth:30,stripBackColor:"#ddd",tickInterval:20,tickLabelPos:"inner",tickLabelSize:16,tickLabelColor:"#aaa",tickLineColor:"#aaa",subTickCount:4,labelPos:["50%","80%"],labelColor:"#666",labelSize:30});var Jx=1,tb=.9,eb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="gauge",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{startAngle:-7/6,endAngle:1/6,range:[0,25,50,75,100],gaugeStyle:{tickLineColor:"rgba(0,0,0,0)",pointerColor:"#bfbfbf",statisticPos:["50%","100%"]}})},e.prototype.init=function(){var e=this.options,i=e.value,n=e.range,r=n.map((function(t){return+t})).sort((function(t,e){return t-e})),a=this.options,o=a.min,s=void 0===o?r[0]:o,l=a.max,u=void 0===l?r[r.length-1]:l,h=a.format,c=void 0===h?function(t){return""+t}:h,p=c(i),f=this.getStyleMix();this.options.styleMix=f,this.options.data=[{value:i||0}],this.options.valueText=p,this.options.min=s,this.options.max=u,this.options.format=c,t.prototype.init.call(this)},e.prototype.geometryParser=function(t,e){throw new Error("Method not implemented.")},e.prototype.getStyleMix=function(){var t=this.options.gaugeStyle,e=void 0===t?{}:t,i=this,n=i.width,r=i.height,a=Math.max(n,r)/20,o=Object.assign({},this.theme,{stripWidth:a,tickLabelSize:a/2,statisticSize:1.5*a});return Object.assign(o,e)},e.prototype.scale=function(){var e=this.options,i=e.min,n=e.max,r=e.format,a=e.styleMix,o={value:{}};Nf(o.value,{min:i,max:n,minLimit:i,maxLimit:n,nice:!0,formatter:r,tickInterval:a.tickInterval}),this.setConfig("scales",o),t.prototype.scale.call(this)},e.prototype.coord=function(){var t={type:"polar",cfg:{radius:.9,startAngle:this.options.startAngle*Math.PI,endAngle:this.options.endAngle*Math.PI}};this.setConfig("coord",t)},e.prototype.axis=function(){var t=this.options.styleMix,e="number"===typeof t.tickLabelPos?-t.tickLabelPos:"outer"===t.tickLabelPos?.8:-.8,i={fields:{value:{},1:{}}};i.fields.value={line:null,label:{offset:e*(t.stripWidth/1.8+t.tickLabelSize/1.5),textStyle:{fontSize:t.tickLabelSize,fill:t.tickLabelColor,textAlign:"center",textBaseline:"middle"}},tickLine:{length:e*(t.stripWidth+4),stroke:t.tickLineColor,lineWidth:2,lineDash:[0,t.stripWidth/2,Math.abs(e*(t.stripWidth+4))]},subTickCount:t.subTickCount,subTickLine:{length:e*(t.stripWidth+1),stroke:t.tickLineColor,lineWidth:1,lineDash:[0,t.stripWidth/2,Math.abs(e*(t.stripWidth+1))]},labelAutoRotate:!0},i.fields["1"]=!1,this.setConfig("axes",i)},e.prototype.addGeometry=function(){var t=this.options.styleMix,e=t.pointerColor||this.config.theme.defaultColor,i={type:"point",position:{fields:["value","1"]},shape:{values:["pointer"]},color:{values:[e]},animate:!1};this.setConfig("element",i)},e.prototype.annotation=function(){var t=this.options,e=(t.min,t.max,t.statistic),i=t.range,n=t.styleMix,r=[];if(!1!==e){var a=this.renderStatistic();r.push(a)}var o=1,s=this.renderArcs(i,o,n),l=r.concat(s);this.setConfig("annotations",l)},e.prototype.renderArcs=function(t,e,i){var n=this,r=i.colors||this.config.theme.colors,a=function(t){return Object(B["__spreadArrays"])(Array(t).fill(0).map((function(t,e){return e})))},o=t.length-1,s=[],l=[],u=a(o);return E["each"](u,(function(a){var o=a===u.length-1?0:n.calGapAngle(),h={type:"arc",start:[t[a],e],end:[t[a+1]-o,e],style:{stroke:r[a%r.length],lineWidth:i.stripWidth}},c=E["deepMix"]({},h,{style:{stroke:i.stripBackColor}});l.push(c),s.push(h)})),0!==t[0]&&l.push({type:"arc",start:[0,e],end:[t[0]-this.calGapAngle(),e],style:{stroke:i.stripBackColor,lineWidth:i.stripWidth}}),100!==t[t.length-1]&&l.push({type:"arc",start:[t[t.length-1]+this.calGapAngle(),e],end:[100,e],style:{stroke:i.stripBackColor,lineWidth:i.stripWidth}}),l.concat(s)},e.prototype.statisticHtml=function(){var t=this.options,e=t.value,i=t.format,n=this.options.statistic,r=i(e);return"boolean"===typeof n&&!0===n?null!==e?r:"--":"string"===typeof n?n:"function"===typeof n?n(e,r):null},e.prototype.renderStatistic=function(){var t=this.options,e=t.statistic,i=t.styleMix,n=this.statisticHtml();if("function"!==typeof e){var r={type:"text",content:n,top:!0,position:i.statisticPos,style:{fill:i.statisticColor,fontSize:i.statisticSize,textAlign:"center"}};return r}if("function"===typeof e){var a={type:"html",zIndex:10,position:i.statisticPos,html:n};return a}},e.prototype.calGapAngle=function(){var t=Math.abs(this.options.startAngle-this.options.endAngle)/Math.PI*100,e=this.width/2*tb;return Jx/e*t},e}(Yp),ib=eb;Qp("gauge",eb);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="gauge",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=ib.getDefaultOptions})(Jp),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="area",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=Ov.getDefaultOptions}(Jp);var nb=12,rb=.01,ab=100,ob=12;function sb(t){var e=-1/0,i=1/0,n=-1/0;return E["each"](t,(function(t){i=Math.min(t.x,i),n=Math.max(t.x,n);var r=Math.abs(t.y[0]-t.y[1]);e=Math.max(e,r)})),{xRange:[i,n],maxHeight:e}}function lb(t,e,i){var n=e[0],r=e[e.length-1];E["each"](e,(function(e){if(e.x===t)return e.y[i];e.x<t&&e.x>n.x&&(n=e),e.x>t&&e.x<r.x&&(r=e)}));var a=(t-n.x)/(r.x-n.x);return n.y[i]*(1-a)+r.y[i]*a}function ub(t,e){var i;for(i=0;i<t.length;i++){var n=t[i];if(n.x===e||n.x>e)break}return i}var hb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scaleFactor=[],e}return Object(B["__extends"])(e,t),e.prototype.showLabels=function(e,i){var n=this,r=this.get("element").get("attrs").color.scales[0].field,a=this._groupPoints(e,r),o=[];E["each"](a,(function(t,e){var i=n._drawLabel(t,e);i&&(o.push(E["mix"]({},t[0],i)),n.scaleFactor.push(i.scaleFactor))})),t.prototype.showLabels.call(this,o,i);var s=this.get("labelOptions");s.autoScale&&this._adjuestLabelSize()},e.prototype._groupPoints=function(t,e){var i={};return E["each"](t,(function(t){var n=t._origin[e];E["has"](i,n)||(i[n]=[]),i[n].push(t)})),i},e.prototype._drawLabel=function(t,e){var i=sb(t),n=i.xRange,r=i.maxHeight,a=n[1]-n[0],o=this._getInterpolatedPoints(n[0],a,t),s=this._getLabelBbox(e),l={xRange:n,aspect:s.width/s.height,data:o,justTest:!0},u=this._bisection(ob,r,this._testFit,l,rb,ab);if(null!==u){l.justTest=!1;var h=this._testFit(l);return h.x=h.x,h.y=h.y0+(h.y1-h.y0)/2,h.scaleFactor=u/s.height*.4,h}},e.prototype._getInterpolatedPoints=function(t,e,i){for(var n=[],r=2,a=t;a<e;a+=r){var o=lb(a,i,0),s=lb(a,i,1);n.push({x:a,y:[o,s]})}return n},e.prototype._bisection=function(t,e,i,n,r,a){for(var o=0;o<a;o++){var s=(t+e)/2,l=n;l.height=s,l.width=s*l.aspect;var u=i(l),h=(e-t)/2<r;if(u&&h)return s;u?t=s:e=s}return null},e.prototype._testFit=function(t){for(var e=t.xRange,i=t.width,n=t.height,r=t.data,a=t.justTest,o=0;o<r.length;o++){var s=r[o],l=s.x,u=l+i;if(u>e[1])break;for(var h=ub(r,u),c=-1/0,p=null,f=1/0,d=o;d<h;d++){var g=r[d].y[1],v=r[d].y[0];if(v<f&&(f=v),g>c&&(c=g,p=v),f-c<n)break}if(f-c>=n)return!!a||{x:l,y0:c,y1:p,width:i,height:n}}return!1},e.prototype._getLabelBbox=function(t){var e=this.get("labelOptions").plot,i=E["clone"](e.theme.label.textStyle);i.fontSize=nb;var n=new F["Text"]({attrs:Object(B["__assign"])({text:t,x:0,y:0},i)});return n.getBBox()},e.prototype._adjuestLabelSize=function(){var t=this,e=this.get("labelsRenderer"),i=e.get("group").get("children"),n=this.get("element").get("view");E["each"](i,(function(e,i){var n=t.scaleFactor[i];e.attr("fontSize",nb),e.transform([["t",-e.attr("x"),-e.attr("y")],["s",n,n],["t",e.attr("x"),e.attr("y")]])})),n.get("canvas").draw()},e}(bs);Ts("area",hb);var cb=10,pb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.showLabels=function(e,i){var n=this,r=[];Object(E["each"])(i,(function(t){var e=t.get("origin"),i=Object(E["deepMix"])({},e[e.length-1]),n=t.getBBox();i.x=n.maxX+cb,i.y=i.y[1],r.push(i)})),t.prototype.showLabels.call(this,r,i);var a=this.get("labelsRenderer"),o=a.get("group").get("children"),s=this.get("element").get("view");Object(E["each"])(o,(function(t){t.attr("textAlign","left"),t.attr("textBaseline","middle");var e=t.get("origin"),r=n.get("element").getShapeId(e),a=n._adjustColor(r,i);t.attr("fill",a)})),s.get("canvas").draw()},e.prototype._adjustColor=function(t,e){var i;return Object(E["each"])(e,(function(e){var n=e.id;n===t&&(i=e.attr("fill"))})),i},e}(bs);Ts("areaLine",pb);var fb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stackArea",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{label:{visible:!1,type:"area"}})},e.prototype.label=function(){var t=this.options,e=t.label;if(e&&!1===e.visible)this.area.label=!1;else{var i=this.getLabelType(e);"areaLine"!==i&&"area"!==i||(e.offset=0),"area"===i&&(e.style=E["deepMix"]({},e.style,{lineWidth:0,stroke:"rgba(0,0,0,0)"})),this.area.label=yc("label",Object(B["__assign"])({fields:[this.getLabelField(i,t)],labelType:i,plot:this},e))}},e.prototype.adjustArea=function(t){t.adjust=[{type:"stack"}]},e.prototype.adjustLine=function(t){t.adjust=[{type:"stack"}]},e.prototype.adjustPoint=function(t){t.adjust=[{type:"stack"}]},e.prototype.getLabelField=function(t,e){var i={point:e.yField,areaLine:e.stackField,area:e.stackField};return i[t]},e.prototype.getLabelType=function(t){return"line"===t.type?"areaLine":t.type},e}(Ov),db=fb;Qp("stackArea",fb);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="stackArea",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=db.getDefaultOptions})(Jp);var gb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="percentageStackArea",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{yAxis:{visible:!0,label:{visible:!0,formatter:function(t){var e=/%/gi;return t.replace(e,"")}}}})},e.prototype.processData=function(t){var e=this.options,i=e.xField,n=e.yField;return Gy(t,i,[n])},e.prototype.scale=function(){var e={},i=this.options.yField;e[this.options.yField]={tickCount:6,alias:i+" (%)",min:0,max:1,formatter:function(t){var e=(100*t).toFixed(1);return e+"%"}},this.options.meta=E["deepMix"]({},e,this.options.meta),t.prototype.scale.call(this)},e}(db),vb=gb;Qp("percentageStackArea",gb);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="percentageStackArea",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=vb.getDefaultOptions})(Jp);var yb=i("754d"),mb=i.n(yb);function xb(t){var e=0;return E["each"](t,(function(t){e+=t})),e/t.length}function bb(t,e,i){return(1-i)*t+i*e}Ap("funnel",{});var _b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.setLabelPosition=function(t,e,i){var n=this.get("coord"),r=n.isTransposed,a=n.convertPoint(e.points[0]),o=n.convertPoint(e.points[2]),s=(a.x-o.x)/2*(r?-1:1),l=(a.y-o.y)/2*(r?-1:1);r?t.x-=s:t.y+=l,t.textAlign="center",t.textBaseline="middle"},e.prototype.getLabelPoint=function(t,e,i){var n=t.text.length;function r(e,i){var n=e;return E["isArray"](n)&&(n=1===t.text.length?n.length<=2?n[e.length-1]:xb(n):n[i]),n}var a={text:t.text[i],x:0,y:0,start:{x:0,y:0},color:"#fff"};a.x=r(e.x,i),a.y=r(e.y,i),this.setLabelPosition(a,e,i);var o=this.getLabelOffset(t,i,n);return t.offsetX&&(o.x+=t.offsetX),t.offsetY&&(o.y+=t.offsetY),this.transLabelPoint(a),a.start={x:a.x,y:a.y},a.x+=o.x,a.y+=o.y,a.color=e.color,a},e.prototype.showLabels=function(e,i){var n=this;t.prototype.showLabels.call(this,e,i);var r=this.get("labelsRenderer"),a=r.get("group").get("children"),o=this.get("element").get("view");E["each"](a,(function(t,e){var r=t,a=r.get("origin"),o=n.get("element").getShapeId(a),s=n._getShape(o,i),l=n.get("labelOptions").adjustColor;l&&n.adjustColor(r,s)})),o.get("canvas").draw()},e.prototype.adjustColor=function(t,e){var i=e.attr("fill"),n=E["isNumber"](e.attr("opacity"))?Math.min(Math.max(0,e.attr("opacity")),1):1,r=Nv(i),a=Math.round(.299*r[0]+.587*r[1]+.114*r[2])/n,o=a<156?"#f6f6f6":"#303030";t.attr("fill",o);var s=this.get("coord"),l=e.getBBox(),u=s.invertMatrix(l.x,l.y,1),h=u[0],c=u[1],p=s.invertMatrix(l.width,l.height,0),f=p[0],d=p[1],g=[h+f,c+d],v=g[0],y=g[1],m=Math.min(h,v),x=Math.max(h,v),b=Math.min(c,y),_=Math.max(c,y),w=e.get("__compare__");if(w){var M=w.yValues;t.attr({x:w.transpose?(m+x)/2:bb(m,x,M[0]/(M[0]+M[1])),y:w.transpose?bb(b,_,M[0]/(M[0]+M[1])):(b+_)/2})}var S=t.getBBox(),k=S.minX>=m&&S.maxX<=x&&S.minY>=b&&S.maxY<=_;t.set("visible",k)},e.prototype._getShape=function(t,e){var i;return E["each"](e,(function(e){var n=e,r=n.id;r===t&&(i=n)})),i},e}(bs);function wb(t,e,i){var n=e||{},r=n.duration,a=void 0===r?200:r,o=n.easing,s=n.callback,l=n.reverse,u=t.getBBox(),h=l?u.maxX:u.minX,c=(u.minY+u.maxY)/2,p=t.get("index"),f=Mb(i),d=E["clone"](f.attr("matrix"));f.attr("transform",[["t",-h,-c],["s",0,1],["t",h,c]]);var g=t.attr("fillOpacity");t.attr("fillOpacity",0),t.attr("clip",f),f.animate({matrix:d},a,o,(function(){f.remove(),t.attr("clip",null)}),p*a),t.animate({fillOpacity:g},a,o,null,p*a),s&&setTimeout((function(){return s(t)}),a+p*a)}function Mb(t){var e=t.start,i=t.end,n=t.width,r=t.height,a=new F["Shapes"].Rect({attrs:{x:e.x,y:i.y,width:n,height:r}});return a}function Sb(t,e,i){var n=e||{},r=n.duration,a=void 0===r?200:r,o=n.easing,s=n.callback,l=n.reverse,u=t.getBBox(),h=(u.minX+u.maxX)/2,c=l?u.minY:u.maxY,p=t.get("index"),f=kb(i),d=E["clone"](f.attr("matrix"));f.attr("transform",[["t",-h,-c],["s",1,0],["t",h,c]]);var g=t.attr("fillOpacity");t.attr("fillOpacity",0),t.attr("clip",f),f.animate({matrix:d},a,o,(function(){f.remove(),t.attr("clip",null)}),p*a),t.animate({fillOpacity:g},a,o,null,p*a),s&&setTimeout((function(){return s(t)}),a+p*a)}function kb(t){var e=t.start,i=t.end,n=t.width,r=t.height,a=new F["Shapes"].Rect({attrs:{x:e.x,y:i.y,width:n,height:r}});return a}Ts("funnelLabel",_b),wb.animationName="funnelScaleInX",ye.registerAnimation("appear","funnelScaleInX",wb),Sb.animationName="funnelScaleInY",ye.registerAnimation("appear","funnelScaleInY",Sb);var Ob=i("0b63");function Cb(t){var e=mt.theme.shape.interval.rect.default,i=E["mix"]({},e,t.style);return Object(Ob["setFillStyle"])(i,t),i}function Ab(t,e){void 0===e&&(e=!1);var i,n,r,a,o=t.x,s=t.y,l=t.y0,u=t.size;E["isArray"](s)?(i=s[0],n=s[1]):(i=l,n=s),E["isArray"](o)?(r=o[0],a=o[1]):(r=o-u/2,a=o+u/2);var h=[{x:r,y:i},{x:r,y:n}];return e?h.push({x:a,y:(n+i)/2}):h.push({x:a,y:n},{x:a,y:i}),h}function Lb(t,e){var i=[],n=t.points,r=t.nextPoints;if(e){var a=e.yValues,o=e.yValuesMax,s=e.yValuesNext,l=(n[0].y+n[1].y)/2,u=a[0]+a[1],h=a.map((function(t){return t/u/.5})),c=.9*(o[0]/(o[0]+o[1])-.5),p=.001;if(E["isNil"](r))i.push(["M",n[0].x,c+(n[0].y-l)*h[0]+l],["L",n[1].x,c+l],["L",n[2].x,c+l],["L",n[3].x,c+(n[3].y-l)*h[0]+l],["Z"]),i.push(["M",n[0].x,c+.002+l],["L",n[1].x,c+.002+(n[1].y-l)*h[1]+l],["L",n[2].x,c+.002+(n[2].y-l)*h[1]+l],["L",n[3].x,c+.002+l],["Z"]);else{var f=s[0]+s[1],d=s.map((function(t){return t/f/.5}));i.push(["M",n[0].x,c+(n[0].y-l)*h[0]+l-p],["L",n[1].x,c+l-p],["L",r[1].x,c+l-p],["L",r[0].x,c+(r[3].y-l)*d[0]+l-p],["Z"]),i.push(["M",n[0].x,c+l+p],["L",n[1].x,c+(n[1].y-l)*h[1]+l+p],["L",r[1].x,c+(r[2].y-l)*d[1]+l+p],["L",r[0].x,c+l+p],["Z"])}}else E["isNil"](r)?i.push(["M",n[0].x,n[0].y],["L",n[1].x,n[1].y],["L",n[2].x,n[2].y],["L",n[3].x,n[3].y],["Z"]):i.push(["M",n[0].x,n[0].y],["L",n[1].x,n[1].y],["L",r[1].x,r[1].y],["L",r[0].x,r[0].y],["Z"]);return i}function Pb(t,e,i){return(1-i)*t+i*e}function jb(t){var e=mt.theme.shape.interval.rect.default,i=E["mix"]({},e,t.style);return Object(Ob["setFillStyle"])(i,t),i}function Tb(t,e){var i=e.reverse,n=e.ratioUpper,r=e.ratioLower,a=[],o=t[0],s=(t[1].x+t[2].x)/2,l=1.2,u=.6;if(i){var h=r;r=n,n=h}var c=(o.x-s)*Pb(u,l,r)+s;a.push(["M",c,o.y]);for(var p=1,f=t.length;p<f;p++){var d=t[p].x;switch(p){case 1:case 2:d=(d-s)*Pb(u,l,n)+s;break;case 3:d=(d-s)*Pb(u,l,r)+s;break}a.push(["L",d,t[p].y])}return a.push(["L",c,o.y]),a.push(["z"]),a}Ao("interval","funnel-basic-rect",{getPoints:function(t){return t.size=1.8*t.size,Ab(t)},draw:function(t,e){var i,n=Cb(t),r=E["get"](t,"origin._origin.__compare__"),a=Lb(t,r);return a=this.parsePath(a),e.addShape("path",(i={attrs:Object(B["__assign"])(Object(B["__assign"])({},n),{path:a})},i["__compare__"]=r,i))},getMarkerStyle:function(t){var e={symbol:"square",radius:4};return Object(Ob["setFillStyle"])(e,t),e}}),Ao("interval","funnel-dynamic-rect",{draw:function(t,e){var i=jb(t),n=Tb(t.points,E["get"](t,"origin._origin.__custom__"));return n=this.parsePath(n),e.addShape("path",{attrs:Object(B["__assign"])(Object(B["__assign"])({},i),{path:n})})},getMarkerStyle:function(t){var e=t.isInCircle,i={symbol:e?"circle":"square",radius:e?4.5:4};return Object(Ob["setFillStyle"])(i,t),i}});var Bb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.parseFormatter=function(t){for(var e=this,i=[],n=1;n<arguments.length;n++)i[n-1]=arguments[n];var r=this.originConfig,a=ch(ph(),fh(r.precision),dh(r.suffix)),o=this.plot.options;t.formatter=function(i,n,s){var l=function(t,e){var o=a(t,n,s);return E["isFunction"](r.formatter)?r.formatter(i,n,s,t,e):i+" "+o};if(o.compareField){var u=E["get"](n,"_origin.__compare__.yValues"),h=E["get"](e.plot.getData(),"0.__compare__.yValues");return o.transpose&&E["set"](t,"textStyle.lineHeight",E["get"](t,"textStyle.fontSize",12)),[0,1].map((function(t){var e=u[t],i=h[t];return l(e,i)})).join(o.transpose?"\n\n":" ")}var c=E["get"](n,"_origin."+o.yField),p=E["get"](e.plot.getData(),"0."+o.yField);return l(c,p)}},e}(Nh),Ib=Bb;function Db(t,e,i){return(1-i)*t+i*e}var Fb={column:"interval"},Eb={interval:"funnel"},Rb=function(t){function e(e){var i=t.call(this,e)||this;return i.type="funnel",i.legendsListenerAttached=!1,i.shouldShowLabels=!1,i.shouldResetPercentages=!0,i.shouldResetCompareTexts=!0,i._onLegendContainerMouseDown=function(t){var e=i.options;if("legend-item"==t.target.name){if(i.refreshPercentages(),e.dynamicHeight){var n=i._findCheckedDataByMouseDownLegendItem(t.target);i._genCustomFieldForDynamicHeight(n)}if(e.compareField){n=i._findCheckedDataByMouseDownLegendItem(t.target);i._updateDataForCompare(n),i.refreshCompareTexts()}}},i.adjustProps(i.options),e.dynamicHeight&&i._genCustomFieldForDynamicHeight(i.getData()),e.compareField&&(i.options.data=i._reduceDataForCompare(i.getData())),i}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(e){var i={label:{visible:!0,adjustColor:!0,formatter:e&&(e.compareField||e.transpose)?function(t,e,i,n,r){return""+n}:function(t,e,i,n,r){return t+" "+n}},percentage:{visible:!0,offsetX:e.transpose?0:40,offsetY:e.transpose?40:0,spacing:4,line:{visible:!0,style:{lineWidth:1,stroke:"rgba(0, 0, 0, 0.15)"}},text:{content:"转化率",style:{fill:"rgba(0, 0, 0, 0.65)"}},value:{visible:!0,style:{fill:"black"},formatter:function(t,e){return(100*e/t).toFixed(2)+"%"}}},tooltip:{visible:!0,shared:!0,showTitle:!1,crosshairs:{type:"cross",style:{stroke:null}}},animation:E["deepMix"]({},ye.defaultCfg,{appear:{duration:800}}),dynamicHeight:!1,compareText:{visible:!0,offsetX:-16,offsetY:-16,style:{fill:"black"}}};return E["deepMix"]({},t.getDefaultOptions.call(this),i)},e.prototype.coord=function(){var t=this.options,e={actions:t.transpose?t.dynamicHeight?[["transpose"],["scale",1,-1]]:[["scale",1,-1]]:t.dynamicHeight?[]:[["transpose"],["scale",1,-1]]};this.setConfig("coord",e)},e.prototype.axis=function(){this.setConfig("axes",!1)},e.prototype.adjustFunnel=function(t){var e=this.options;t.shape={values:[e.dynamicHeight?"funnel-dynamic-rect":"funnel-basic-rect"]},t.color={fields:[e.xField],values:e.color&&(Array.isArray(e.color)?e.color:[e.color])},E["isFunction"](e.funnelStyle)?t.style={callback:e.funnelStyle}:t.style={cfg:e.funnelStyle},t.adjust=[{type:e.dynamicHeight?"stack":"symmetric"}]},e.prototype.tooltip=function(){var e=this.options;e.compareField&&E["deepMix"](e.tooltip,{htmlContent:function(t,e){var i,n,r,a;i="g2-tooltip",n=X["createDom"]('<div class="'+i+'"></div>'),X["modifyCSS"](n,mb.a[i]);var o=n;if(t){i="g2-tooltip-title",n=X["createDom"]('<div class="'+i+'"></div>'),X["modifyCSS"](n,mb.a[i]),o.appendChild(n);var s=n;i="g2-tooltip-marker",n=X["createDom"]('<span class="'+i+'"></span>'),X["modifyCSS"](n,mb.a[i]),X["modifyCSS"](n,{width:"10px",height:"10px"}),s.appendChild(n),a=n,n=X["createDom"]("<span>"+t+"</span>"),s.appendChild(n)}if(e){i="g2-tooltip-list",n=X["createDom"]('<ul class="'+i+'"></ul>'),X["modifyCSS"](n,mb.a[i]),o.appendChild(n);var l=n;e.reduce((function(t,e){r||(r=e.color);var i=E["get"](e,"point._origin.__compare__.compareValues"),n=E["get"](e,"point._origin.__compare__.yValues");return n.forEach((function(e,n){return t.push([i[n],e])})),t}),[]).forEach((function(t,e){var r=t[0],a=t[1];i="g2-tooltip-list-item",n=X["createDom"]('<li class="'+i+'" data-index='+e+"></li>"),X["modifyCSS"](n,mb.a[i]),l.appendChild(n);var o=n;n=X["createDom"]("<span>"+r+"</span>"),o.appendChild(n),i="g2-tooltip-value",n=X["createDom"]('<span class="'+i+'">'+a+"</span>"),X["modifyCSS"](n,mb.a[i]),o.appendChild(n)}))}return r&&a&&X["modifyCSS"](a,{backgroundColor:r}),o}}),t.prototype.tooltip.call(this)},e.prototype.addGeometry=function(){var t=this.options,e=Rf("interval","main",{positionFields:[t.dynamicHeight?"_":t.xField,t.yField],plot:this});t.label&&(e.label=this.extractLabel()),this.adjustFunnel(e),this.funnel=e,this.setConfig("element",e)},e.prototype.animation=function(){var t=this,e=this.options;if(!1===e.animation)this.funnel.animate=!1,this.shouldShowLabels=!0;else{var i=E["get"](e,"animation.appear.duration"),n=i/(this.getData().length||1);this.animationAppearTimeoutHandler&&(clearTimeout(this.animationAppearTimeoutHandler),delete this.animationAppearTimeoutHandler),this.animationAppearTimeoutHandler=setTimeout((function(){t._teardownAnimationMask(),t.shouldShowLabels=!0,t.fadeInPercentages(n),e.compareField&&t.fadeInCompareTexts(n),delete t.animationAppearTimeoutHandler}),i),this.funnel.animate=E["deepMix"]({},e.animation,{appear:{animation:e.transpose?"funnelScaleInX":"funnelScaleInY",duration:n,reverse:e.dynamicHeight&&!e.transpose,callback:function(e){t.shouldShowLabels=!0,t.showLabels(e)}}})}},e.prototype.geometryParser=function(t,e){return"g2"===t?Fb[e]:Eb[e]},e.prototype.afterRender=function(){var e=this.options;if(this.resetPercentages(),e.compareField&&this.resetCompareTexts(),"auto"==e.padding){var i=this._findPercentageContainer();i&&this.paddingController.registerPadding(i,"inner",!0);var n=this._findCompareTextContainer();n&&this.paddingController.registerPadding(n,"inner",!0)}if(t.prototype.afterRender.call(this),this.animationAppearTimeoutHandler&&(this._setupAnimationMask(),e.compareField&&this.fadeInCompareTexts()),this.showLabels(),!1===e.animation&&(this.fadeInPercentages(),e.compareField&&this.fadeInCompareTexts()),!this.legendsListenerAttached){this.legendsListenerAttached=!0;var r=this.view.get("legendController").container;r.on("mousedown",this._onLegendContainerMouseDown)}},e.prototype.updateConfig=function(e){e=this.adjustProps(e),t.prototype.updateConfig.call(this,e),this.legendsListenerAttached=!1,this.shouldShowLabels=!1},e.prototype.changeData=function(e){var i=this.options;if(!1!==i.animation&&(this.shouldResetPercentages=!1,this.shouldResetCompareTexts=!1),i.dynamicHeight){var n=this._findCheckedDataInNewData(e);this._genCustomFieldForDynamicHeight(n)}if(i.compareField){e=this._reduceDataForCompare(e);n=this._findCheckedDataInNewData(e);this._updateDataForCompare(n)}t.prototype.changeData.call(this,e),this.refreshPercentages(),i.compareField&&this.refreshCompareTexts(),this._refreshAnimationMaskForPercentageRefresh()},e.prototype.extractLabel=function(){var t=this.options,e=t.label;if(e&&!1===e.visible)return!1;var i=new Ib(E["deepMix"]({textStyle:{stroke:null}},e,{plot:this,labelType:"funnelLabel",position:"middle",textStyle:{opacity:0},fields:[t.xField,t.yField]})).getConfig();return i},e.prototype.showLabels=function(t){this.shouldShowLabels&&this.view.get("elements").forEach((function(e){var i=e.get("labelController").labelsContainer;i&&i.get("labelsRenderer").get("group").get("children").forEach((function(i){t?e.getShapeId(i.get("origin"))==t.id&&i.attr("opacity",1):i.attr("opacity",1)}))}))},e.prototype.adjustProps=function(t){return t.compareField&&(t.dynamicHeight=!1),t.dynamicHeight&&(E["set"](t,"meta."+t.yField+".nice",!1),E["set"](t,"tooltip.shared",!1)),t},e.prototype.resetPercentages=function(){var t=this;if(this.shouldResetPercentages){var e,i=this.options,n=i.percentage||{},r=n.offsetX,a=n.offsetY,o=n.spacing,s=n.line,l=void 0===s?{}:s,u=n.text,h=void 0===u?{}:u,c=n.value,p=void 0===c?{}:c,f=Date.now(),d=this._findPercentageContainer(!0),g=this.view.get("coord"),v=0;this.view.eachShape((function(n,s){if(v++>0){var u=s.getBBox(),c=u.minX,y=u.maxX,m=u.maxY,x=u.minY,b=g.invertMatrix(i.transpose?c:y,i.transpose?i.compareField?x:m:i.dynamicHeight?x:m,1),_=b[0],w=b[1],M=t._findPercentageMembersInContainerByShape(d,s,!0),S=M.line,k=M.text,O=M.value,C=[function(t,s,u,c,d){u&&(u.attr(E["deepMix"]({},l.style,{x1:t,y1:s,x2:i.transpose?t+r:t-r,y2:s-a,opacity:0})),u.set("adjustTimestamp",f));var g=0,v=0,y=function(){c&&(c.attr(E["deepMix"]({},h.style,{x:i.transpose?t+r:t-r-o-v-o,y:i.transpose?s-a-o:s-a,opacity:0,text:h.content,textAlign:i.transpose?"left":"right",textBaseline:i.transpose?"bottom":"middle"})),c.set("adjustTimestamp",f),g=c.getBBox().width)},m=function(){d&&(d.attr(E["deepMix"]({},p.style,{x:i.transpose?t+r+g+o:t-r-o,y:i.transpose?s-a-o:s-a,opacity:0,text:E["isFunction"](p.formatter)?i.compareField?p.formatter(E["get"](e,"__compare__.yValues.0"),E["get"](n,"__compare__.yValues.0")):p.formatter(e[i.yField],n[i.yField]):"",textAlign:i.transpose?"left":"right",textBaseline:i.transpose?"bottom":"middle"})),d.set("adjustTimestamp",f),v=d.getBBox().width)};i.transpose?(y(),m()):(m(),y())},function(t,s,u,c,d){u&&(u.attr(E["deepMix"]({},l.style,{x1:t,y1:s,x2:t+r,y2:i.transpose?i.compareField?s+a:s-a:s+a,opacity:0})),u.set("adjustTimestamp",f));var g=0;c&&(c.attr(E["deepMix"]({},h.style,{x:i.transpose?t+r:t+r+o,y:i.transpose?i.compareField?s+a+o:s-a-o:s+a,opacity:0,text:h.content,textAlign:"left",textBaseline:i.transpose?i.compareField?"top":"bottom":"middle"})),c.set("adjustTimestamp",f),g=c.getBBox().width),d&&(d.attr(E["deepMix"]({},p.style,{x:i.transpose?t+r+g+o:t+r+o+g+o,y:i.transpose?i.compareField?s+a+o:s-a-o:s+a,opacity:0,text:E["isFunction"](p.formatter)?i.compareField?p.formatter(E["get"](e,"__compare__.yValues.1"),E["get"](n,"__compare__.yValues.1")):p.formatter(e[i.yField],n[i.yField]):"",textAlign:"left",textBaseline:i.transpose?i.compareField?"top":"bottom":"middle"})),d.set("adjustTimestamp",f))}];if(i.compareField){var A=g.invertMatrix(c,m,1),L=A[0],P=A[1];[[L,P],[_,w]].forEach((function(t,e){var i=t[0],n=t[1];return C[e](i,n,S&&S[e],k&&k[e],O&&O[e])}))}else C[1](_,w,S,k,O)}e=n})),d.get("children").forEach((function(t){t.get("adjustTimestamp")!=f&&(t.attr({opacity:0}),d.set(t.get("id"),null),setTimeout((function(){return t.remove()})))}))}},e.prototype.fadeInPercentages=function(t,e){var i=this,n=this.options,r=this._findPercentageContainer(),a=function(e){var n={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0};i.view.eachShape((function(a,o){var s=i._findPercentageMembersInContainerByShape(r,o),l={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0},u=function(t){if(t&&"text"==t.get("type")){var e=t.getBBox(),i=e.minX,n=e.maxX,r=e.minY,a=e.maxY;i<l.minX&&(l.minX=i),n>l.maxX&&(l.maxX=n),r<l.minY&&(l.minY=r),a>l.maxY&&(l.maxY=a)}};if(E["each"](s,(function(t){return E["isArray"](t)?u(t[e]):u(t)})),l.minX>n.maxX||l.maxX<n.minX||l.minY>n.maxY||l.maxY<n.minY){var h=function(e){if(e){var i={opacity:1};t?e.animate(i,t):e.attr(i)}};E["each"](s,(function(t){return E["isArray"](t)?h(t[e]):h(t)})),E["assign"](n,l)}}))};n.compareField?[0,1].forEach(a):a(),t&&e&&setTimeout(e,t)},e.prototype.fadeOutPercentages=function(t,e){var i=this,n=this._findPercentageContainer();this.view.eachShape((function(e,r){var a=i._findPercentageMembersInContainerByShape(n,r),o=function(e){if(e){var i={opacity:0};t?e.animate(i,t):e.attr(i)}};E["each"](a,(function(t){return E["isArray"](t)?t.forEach(o):o(t)}))})),t&&e&&setTimeout(e,t)},e.prototype.refreshPercentages=function(t){var e=this,i=this.options;if(!1!==i.animation){var n=this._calcRefreshFadeDurations(),r=n.fadeOutDuration,a=n.fadeInDuration;this.shouldResetPercentages=!1,this.fadeOutPercentages(r,(function(){e.shouldResetPercentages=!0,e.resetPercentages(),e.fadeInPercentages(a,t)}))}},e.prototype._calcRefreshFadeDurations=function(){var t=this.options,e=E["get"](t,"animation.update.duration"),i=E["get"](t,"animation.enter.duration"),n=.6*Math.min(i,e),r=1.2*Math.max(i,e);return{fadeInDuration:n,fadeOutDuration:r}},e.prototype._findPercentageContainer=function(t){var e;if(void 0===t&&(t=!1),this.view){var i=this.view.get("elements");if(i.find((function(t){return e=t.get("percentageContainer")})),!e&&t&&i.length){var n=i[0];e=n.get("container").addGroup(),n.set("percentageContainer",e)}}return e},e.prototype._findPercentageMembersInContainerByShape=function(t,e,i){void 0===i&&(i=!1);var n=this.options,r=n.percentage||{},a=r.visible,o=r.line,s=void 0===o?{}:o,l=r.text,u=void 0===l?{}:l,h=r.value,c=void 0===h?{}:h,p={line:void 0,text:void 0,value:void 0};if(!1===a||!t)return p;if(!1!==s.visible){var f=function(n){var r="_percentage-line-"+e.id+"-"+n,a=t.get(r);return!a&&i&&(a=t.addShape("line",{id:r}),t.set(r,a)),a},d=n.compareField?[0,1].map(f):f(0);p.line=d}if(!1!==u.visible){f=function(n){var r="_percentage-text-"+e.id+"-"+n,a=t.get(r);return!a&&i&&(a=t.addShape("text",{id:r}),t.set(r,a)),a};var g=n.compareField?[0,1].map(f):f(0);p.text=g}if(!1!==c.visible){f=function(n){var r="_percentage-value-"+e.id+"-"+n,a=t.get(r);return!a&&i&&(a=t.addShape("text",{id:r}),t.set(r,a)),a};var v=n.compareField?[0,1].map(f):f(0);p.value=v}return p},e.prototype._genCustomFieldForDynamicHeight=function(t){var e=this.options,i=t.reduce((function(t,i){return t+i[e.yField]}),0),n=1;t.forEach((function(r,a){var o=r[e.yField],s=o/i,l=n-s;r["__custom__"]={datumIndex:a,dataLength:t.length,ratioUpper:n,ratioLower:l,reverse:e.transpose},n=l}))},e.prototype.resetCompareTexts=function(){if(this.shouldResetCompareTexts){var t,e,i=this.options,n=this._findCheckedData(this.getData())[0];if(this.view.eachShape((function(i,r){i==n&&(t=r.get("parent").getBBox(),e=E["get"](i,"__compare__"))})),t&&e&&!1!==E["get"](i,"compareText.visible")){var r=this.view.get("coord"),a=this._findCompareTextContainer(!0),o=e.yValuesMax,s=e.compareValues,l=r.invertMatrix(t.minX,t.minY,1),u=r.invertMatrix(t.maxX,t.maxY,1),h=Math.min(l[0],u[0]),c=Math.max(l[0],u[0]),p=Math.min(l[1],u[1]),f=Math.max(l[1],u[1]),d=a.get("children");[0,1].forEach((function(t){var e=d[t];e||(e=a.addShape("text")),e.attr(E["deepMix"]({},E["get"](i,"compareText.style"),{text:i.transpose?s[t]:t?" "+s[t]:s[t]+" ",x:i.transpose?h+E["get"](i,"compareText.offsetX"):Db(h,c,o[0]/(o[0]+o[1])),y:i.transpose?Db(p,f,o[0]/(o[0]+o[1]))+(t?8:-8):p+E["get"](i,"compareText.offsetY"),opacity:0,textAlign:i.transpose?"right":t?"left":"right",textBaseline:i.transpose&&t?"top":"bottom"}))}))}}},e.prototype.fadeInCompareTexts=function(t,e){var i=this._findCompareTextContainer();if(i){var n=i.get("children");[0,1].forEach((function(e){var i=n[e];if(i){var r={opacity:1};t?i.animate(r,t):i.attr(r)}}))}t&&e&&setTimeout(e,t)},e.prototype.fadeOutCompareTexts=function(t,e){var i=this._findCompareTextContainer();if(i){var n=i.get("children");[0,1].forEach((function(e){var i=n[e];if(i){var r={opacity:0};t?i.animate(r,t):i.attr(r)}}))}t&&e&&setTimeout(e,t)},e.prototype.refreshCompareTexts=function(t){var e=this,i=this.options;if(!1!==i.animation){var n=this._calcRefreshFadeDurations(),r=n.fadeInDuration,a=n.fadeOutDuration;this.shouldResetCompareTexts=!1,this.fadeOutCompareTexts(a,(function(){e.shouldResetCompareTexts=!0,e.resetCompareTexts(),e.fadeInCompareTexts(r,t)}))}},e.prototype._findCompareTextContainer=function(t){var e;if(void 0===t&&(t=!1),this.view){var i=this.view.get("elements");if(i.find((function(t){return e=t.get("compareTextContainer")})),!e&&t&&i.length){var n=i[0];e=n.get("container").addGroup(),n.set("compareTextContainer",e)}}return e},e.prototype._reduceDataForCompare=function(t){var e,i=this.options,n=[-1/0,-1/0];return t=t.reduce((function(t,r){var a,o=r[i.xField],s=r[i.yField],l=r[i.compareField];e||(e=l);var u=t.find((function(t){return t[i.xField]==o}));u||(a={},a[i.xField]=o,a[i.yField]=0,a["__compare__"]={compareValues:[],yValues:[],yValuesMax:[],yValuesNext:void 0,transpose:i.transpose},u=a,t.push(u));var h=l==e?0:1;return u["__compare__"].yValues[h]=s,n[h]<s&&(n[h]=s),u["__compare__"].compareValues[h]=l,t}),[]),t.forEach((function(e,r){e[i.yField]=E["get"](e,"__compare__.yValues",[]).reduce((function(t,e){return t+e}),0),E["set"](e,"__compare__.yValuesMax",n),E["set"](e,"__compare__.yValuesNext",E["get"](t,r+1+".__compare__.yValues"))})),t},e.prototype._updateDataForCompare=function(t){var e=[-1/0,-1/0];t.forEach((function(t){var i=E["get"](t,"__compare__.yValues");[0,1].forEach((function(t){i[t]>e[t]&&(e[t]=i[t])}))})),t.forEach((function(i,n){E["set"](i,"__compare__.yValuesMax",e),E["set"](i,"__compare__.yValuesNext",E["get"](t,n+1+".__compare__.yValues"))}))},e.prototype._findCheckedData=function(t){var e=this.options,i=this.view.get("canvas").findAll((function(t){return"legend-item"==t.name&&t.get("parent").get("checked")})).map((function(t){return t.get("origin").value}));return t.filter((function(t){return E["contains"](i,t[e.xField])}))},e.prototype._findCheckedDataInNewData=function(t){var e=this.options,i=this.view.get("canvas").findAll((function(t){return"legend-item"==t.name&&t.get("parent").get("checked")})).map((function(t){return t.get("origin").value})),n=this.getData(),r=n.map((function(t){return t[e.xField]})).filter((function(t){return!E["contains"](i,t)}));return t.filter((function(t){return!E["contains"](r,t[e.xField])}))},e.prototype._findCheckedDataByMouseDownLegendItem=function(t){var e=this.options,i=t.get("origin"),n=t.get("parent").get("parent").findAll((function(e){return e!=t&&"legend-item"==e.name&&e.get("parent").get("checked")})).map((function(t){return t.get("origin").value})),r=[];return this.getData().forEach((function(a){var o=a[e.xField];(i.value==o&&!t.get("parent").get("checked")||E["contains"](n,o))&&r.push(a)})),r},e.prototype._setupAnimationMask=function(){var t=this.view.get("canvas"),e=t.get("animation-mask");e||(e=t.addShape("rect"),t.set("animation-mask",e)),e.attr({x:0,y:0,fill:"transparent",width:t.get("width"),height:t.get("height")})},e.prototype._teardownAnimationMask=function(){var t=this.view.get("canvas"),e=t.get("animation-mask");e&&e.attr({x:-t.get("width")})},e.prototype._refreshAnimationMaskForPercentageRefresh=function(){var t=this,e=this.options;if(!1!==e.animation){var i=this._calcRefreshFadeDurations(),n=i.fadeOutDuration,r=i.fadeInDuration;this._setupAnimationMask(),setTimeout((function(){return t._teardownAnimationMask()}),n+r)}},e}(Yp),zb=Rb;Qp("funnel",Rb);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="funnel",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=zb.getDefaultOptions})(Jp);var Nb=.3989422804014327,Yb=1/255/16,Hb="_origin",Gb="shadowCanvas",Wb="valueRange",Xb="imageShape",Vb="mappedData",qb="grayScaleBlurredCanvas",Ub="heatmapSize",Zb=function(t){function e(e){return t.call(this,Object(B["__assign"])({type:"linearHeatmap",shapeType:"point",paletteCache:{}},e))||this}return Object(B["__extends"])(e,t),e.prototype._prepareRange=function(){var t=this.get(Vb),e=this.getAttr("color"),i=e.scales[0].field,n=1/0,r=-1/0;t.forEach((function(t){var e=t[Hb][i];e>r&&(r=e),e<n&&(n=e)})),n===r&&(n=r-1);var a=[n,r];this.set(Wb,a)},e.prototype._prepareSize=function(){var t;this.get("radius")?t=this.get("radius"):(t=this.getDefaultValue("size"),E["isNumber"](t)||(t=this.getDefaultSize()));var e=this.get("styleOptions"),i=e&&E["isObject"](e.cfg)?e.cfg.blur:null;E["isFinite"](i)&&null!==i||(i=t/2),this.set(Ub,{blur:i,radius:t})},e.prototype.getDefaultSize=function(){var t=this.getAttr("position"),e=this.get("coord"),i=Math.min(e.width/(4*t.scales[0].ticks.length),e.height/(4*t.scales[1].ticks.length));return i},e.prototype._colorize=function(t){for(var e=this.getAttr("color"),i=t.data,n=this.get("paletteCache"),r=3;r<i.length;r+=4){var a=i[r];if(a){var o=void 0;n[a]?o=n[a]:(o=Nv(e.gradient(a/256)),n[a]=o),i[r-3]=o[0],i[r-2]=o[1],i[r-1]=o[2],i[r]=a}}},e.prototype._prepareGreyScaleBlurredCircle=function(t){var e=this.get(qb);e||(e=document.createElement("canvas"),this.set(qb,e));var i=this.get("intensity")?this.get("intensity"):2,n=Math.sqrt(-2*Math.log(Yb/t/i/Nb))/3*t,r=n-t,a=n+r,o=e.getContext("2d");e.width=e.height=2*a,o.clearRect(0,0,e.width,e.height),o.shadowOffsetX=o.shadowOffsetY=2*a,o.shadowBlur=r,o.shadowColor="black",o.beginPath(),o.arc(-a,-a,t,0,2*Math.PI,!0),o.closePath(),o.fill()},e.prototype._drawGrayScaleBlurredCircle=function(t,e,i,n,r){var a=this.get(qb);r.globalAlpha=n,r.drawImage(a,t-i,e-i)},e.prototype._getShadowCanvasCtx=function(){var t=this.get(Gb);t||(t=document.createElement("canvas"),this.set(Gb,t));var e=this.get("view").get("panelRange");t.width=e.width,t.height=e.height;var i=t.getContext("2d");return i.globalCompositeOperation="lighter",i},e.prototype._clearShadowCanvasCtx=function(){var t=this._getShadowCanvasCtx();t.clearRect(0,0,t.canvas.width,t.canvas.height)},e.prototype._getImageShape=function(){var t=this.get(Xb);if(t)return t;var e=this.get("container");return t=e.addShape("Image",{}),this.set(Xb,t),t},e.prototype.clear=function(){this._clearShadowCanvasCtx(),t.prototype.clear.call(this)},e.prototype.drawWithRange=function(t){var e=this.get("coord"),i=e.start,n=e.end,r=e.width,a=e.height,o=this.getAttr("color").scales[0].field,s=this.get(Ub);this._clearShadowCanvasCtx();var l=this._getShadowCanvasCtx(),u=this.get(Vb);t&&(u=u.filter((function(e){return e[Hb][o]<=t[1]&&e[Hb][o]>=t[0]})));for(var h=this.get("scales")[o],c=0;c<u.length;c++){var p=u[c],f=this.getDrawCfg(p),d=h.scale(p[Hb][o]);this._drawGrayScaleBlurredCircle(f.x-i.x,f.y-n.y,s.radius+s.blur,d,l)}var g=l.getImageData(0,0,r,a);this._clearShadowCanvasCtx(),this._colorize(g),l.putImageData(g,0,0);var v=new Image;v.src=l.canvas.toDataURL("image/png");var y=this._getImageShape();y.attr({x:i.x,y:n.y,width:r,height:a,img:v})},e.prototype.draw=function(t){this.set(Vb,t),this._prepareRange(),this._prepareSize();var e=this.get(Ub);this._prepareGreyScaleBlurredCircle(e.radius);var i=this.get(Wb);this.drawWithRange(i)},e}(Xs);us("linearHeatmap",Zb);var Qb=4,$b=1,Kb=.4,Jb=function(){function t(t){this.destroyed=!1,this.dataSlides={};var e=this.getDefaultOptions();t.plot.options.theme&&"dark"===t.plot.options.theme&&(e=this.getDarkOptions()),this.options=Object(E["deepMix"])({},e,t),this.view=this.options.view,this.afterRender=!0,this.init()}return t.prototype.init=function(){this.layout=this.getLayout(),this.width=this.options.width?this.options.width:this.getDefaultWidth(),this.height=this.options.height?this.options.height:this.getDefaultHeight();var t=this.options.plot.container;this.container=t.addGroup()},t.prototype.render=function(){var t=this.view.get("scales"),e=this.options.plot.options.colorField;this.colorScale=t[e];var i=this.colorScale,n=i.min,r=i.max,a=this.options.plot.options.color;"horizontal"===this.layout?this.renderHorizontal(n,r,a):this.renderVertical(n,r,a),this.legendLayout(),this.addInteraction()},t.prototype.hide=function(){this.container.set("visible",!1),this.options.plot.canvas.draw()},t.prototype.show=function(){this.container.set("visible",!0),this.options.plot.canvas.draw()},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destroy=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getBBox=function(){var t=this.container.getBBox();return new F["BBox"](this.x,this.y,t.width,t.height)},t.prototype.renderVertical=function(t,e,i){var n=this,r=this.width,a=this.height/i.length,o=new F["Group"],s=Object(E["clone"])(i).reverse(),l=(e-t)/i.length;Object(E["each"])(s,(function(t,i){var s=a*i,u={to:e-l*i,from:e-l*(i+1)},h=n.container.addShape("rect",{attrs:{x:0,y:s,width:r,height:a,fill:t,opacity:$b,cursor:"pointer"},name:"grid"});h.set("info",u);var c=n.getDataSlide(u);n.dataSlides[u.from+"-"+u.to]={mode:"active",data:c};o.addShape("path",{attrs:Object(B["__assign"])({path:[["M",0,s+a],["L",r,s+a]]},n.options.gridlineStyle)})}));this.container.addShape("text",{attrs:Object(B["__assign"])({text:e,x:r/2,y:-Qb,textAlign:"center",textBaseline:"bottom"},this.options.text.style)}),this.container.addShape("text",{attrs:Object(B["__assign"])({text:t,x:r/2,y:this.height+Qb,textAlign:"center",textBaseline:"top"},this.options.text.style)}),o.addShape("path",{attrs:Object(B["__assign"])({path:[["M",0,0],["L",this.width,0],["L",this.width,this.height],["L",0,this.height],["L",0,0]]},this.options.gridlineStyle)});this.container.add(o)},t.prototype.renderHorizontal=function(t,e,i){var n=this,r=this.width/i.length,a=this.height,o=new F["Group"],s=(e-t)/i.length;Object(E["each"])(i,(function(t,e){var i=r*e,l={from:s*e,to:s*(e+1)},u=n.container.addShape("rect",{attrs:{x:i,y:0,width:r,height:a,fill:t,opacity:.8,cursor:"pointer"},name:"grid"});u.set("info",l);o.addShape("path",{attrs:Object(B["__assign"])({path:[["M",i+r,0],["L",i+r,a]]},n.options.gridlineStyle)})})),this.container.addShape("text",{attrs:Object(B["__assign"])(Object(B["__assign"])({text:t,x:-Qb,y:a/2},this.options.text.style),{textAlign:"right",textBaseline:"middle"})}),this.container.addShape("text",{attrs:Object(B["__assign"])({text:e,x:this.width+Qb,y:a/2,textAlign:"left",textBaseline:"middle"},this.options.text.style)}),o.addShape("path",{attrs:Object(B["__assign"])({path:[["M",0,0],["L",this.width,0],["L",this.width,this.height],["L",0,this.height],["L",0,0]]},this.options.gridlineStyle)}),this.container.add(o)},t.prototype.getLayout=function(){var t=this.options.position.split("-");return this.position=t[0],"left"===t[0]||"right"===t[0]?"vertical":"horizontal"},t.prototype.getDefaultWidth=function(){if("horizontal"===this.layout){var t=this.options.plot.options.width;return.5*t}return 10},t.prototype.getDefaultHeight=function(){if("vertical"===this.layout){var t=this.options.plot.options.height;return.5*t}return 10},t.prototype.legendLayout=function(){var t=this,e=this.options.plot.getPlotTheme().bleeding;Object(E["isArray"])(e)&&Object(E["each"])(e,(function(i,n){"function"===typeof e[n]&&(e[n]=e[n](t.options.plot.options))}));var i=this.container.getBBox(),n=0,r=0,a=this.options.position.split("-"),o=this.options.plot.width,s=this.options.plot.height;"left"===a[0]?n=e[3]:"right"===a[0]?n=o-e[1]-i.width:"center"===a[1]?n=(o-i.width)/2:"left"===a[1]?n=e[3]:"right"===a[1]&&(n=this.options.plot.width-e[1]-i.width),"bottom"===a[0]?r=s-e[2]-i.height:"top"===a[0]?r=this.getTopPosition(e):"center"===a[1]?r=(s-i.height)/2:"top"===a[1]?r=e[0]:"bottom"===a[1]&&(r=s-e[2]-i.height),this.x=n,this.y=r,this.container.translate(n,r)},t.prototype.getDefaultOptions=function(){return{text:{style:{fontSize:12,fill:"rgba(0, 0, 0, 0.45)"}},gridlineStyle:{lineWidth:1,stroke:"rgba(0, 0, 0, 0.45)"}}},t.prototype.getDarkOptions=function(){return{text:{style:{fontSize:12,fill:"rgba(255, 255, 255, 0.45)"}},gridlineStyle:{lineWidth:1,stroke:"rgba(255, 255, 255, 0.25)"}}},t.prototype.addInteraction=function(){var t=this,e=this.options.plot.options,i=e.colorField;e.data;this.container.on("click",(function(e){var n=e.target;if("grid"===n.get("name")){var r=n.get("info"),a=r.from+"-"+r.to,o=t.dataSlides[a];"active"===o.mode?(o.mode="deactive",n.stopAnimate(),n.animate({opacity:Kb},200)):(o.mode="active",n.stopAnimate(),n.animate({opacity:$b},200));var s=t.getFilteredData();s.length>0&&(t.view.set("data",s),t.view.scale(i,{min:t.colorScale.min,max:t.colorScale.max,nice:t.colorScale.nice}),t.view.render())}}))},t.prototype.getFilteredData=function(){var t=[];return Object(E["each"])(this.dataSlides,(function(e){"active"==e.mode&&t.push.apply(t,e.data)})),t},t.prototype.getDataSlide=function(t){var e=[],i=this.options.plot.options,n=i.colorField,r=i.data;return Object(E["each"])(r,(function(i){var r=i[n];r>=t.from&&r<t.to&&e.push(i)})),e},t.prototype.getTopPosition=function(t){if(this.options.plot.description){var e=this.options.plot.description.getBBox();return e.maxY+10}if(this.options.plot.title){e=this.options.plot.title.getBBox();return e.maxY+10}return t[0]},t}(),t_=Jb,e_=function(t){function e(e){var i=t.call(this)||this;return i.options=e,i.view=i.options.view,i.init(),i}return Object(B["__extends"])(e,t),e.prototype.init=function(){var t=this.view.get("coord");this.width=t.width,this.height=t.height,this.x=t.start.x,this.y=t.end.y;var e=this.options.plot.container;this.container=e.addGroup(),this.container.setZIndex(-100)},e.prototype.render=function(){if("color"===this.options.type)this.renderColorBackground();else if("image"===this.options.type)this.renderImageBackground();else if(this.options.callback){var t={x:this.x,y:this.y,width:this.width,height:this.height,container:this.container};this.options.callback(t)}},e.prototype.renderColorBackground=function(){this.container.addShape("rect",{attrs:{x:this.x,y:this.y,width:this.width,height:this.height,fill:this.options.value}})},e.prototype.renderImageBackground=function(){this.container.addShape("image",{attrs:{x:this.x,y:this.y,width:this.width,height:this.height,img:this.options.src}})},e.prototype.clear=function(){this.container&&(this.container.clear(),this.emit("background:clear"))},e.prototype.destroy=function(){this.container&&(this.container.remove(),this.emit("background:destroy"))},e}(D.a),i_=e_,n_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="heatmap",e.count=0,e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{xAxis:{visible:!0,autoHideLabel:!0,autoRotateLabel:!0,autoRotateTitle:!1,grid:{visible:!1},line:{visible:!0},tickLine:{visible:!0},label:{visible:!0},title:{visible:!0,offset:12}},yAxis:{visible:!0,autoHideLabel:!0,autoRotateLabel:!1,autoRotateTitle:!0,grid:{visible:!1},line:{visible:!0},tickLine:{visible:!0},label:{visible:!0},title:{visible:!0,offset:12}},tooltip:{visible:!0,crosshairs:{type:"cross",style:{lineWidth:2}}},legend:{visible:!0,position:"bottom-center"},color:["rgba(33,102,172,0)","rgb(103,169,207)","rgb(209,229,240)","rgb(253,219,199)","rgb(239,138,98)","rgb(178,24,43)"]})},e.prototype.afterRender=function(){this.options.legend&&this.options.legend.visible&&(this.heatmapLegend=new t_(Object(B["__assign"])({view:this.view,plot:this},this.options.legend)),this.heatmapLegend.render(),this.paddingController.registerPadding(this.heatmapLegend,"outer")),this.options.background&&"auto"!==this.options.padding&&(this.background=new i_(Object(B["__assign"])({view:this.view,plot:this},this.options.background)),this.background.render()),t.prototype.afterRender.call(this),this.count+=1},e.prototype.destroy=function(){this.heatmapLegend&&(this.heatmapLegend.destroy(),this.heatmapLegend=null),this.background&&(this.background.destroy(),this.background=null),t.prototype.destroy.call(this)},e.prototype.scale=function(){var e=this.options,i={};i[e.xField]={},E["has"](e,"xAxis")&&Nf(i[e.xField],e.xAxis),i[e.yField]={},E["has"](e,"yAxis")&&Nf(i[e.yField],e.yAxis),this.setConfig("scales",i),t.prototype.scale.call(this)},e.prototype.coord=function(){},e.prototype.geometryParser=function(t,e){return"heatmap"},e.prototype.addGeometry=function(){var t={type:"linearHeatmap",position:{fields:[this.options.xField,this.options.yField]},color:{fields:[this.options.colorField],values:this.options.color}};this.options.radius&&(t.radius=this.options.radius),this.options.intensity&&(t.intensity=this.options.intensity),this.setConfig("element",t),this.addPoint()},e.prototype.addPoint=function(){var t=this.options,e={visible:!1,size:0};t.point&&t.point.visible?t.point=E["deepMix"](e,t.point):t.point=e;var i=Rf("point","guide",{plot:this});i.active=!1,i.label=this.extractLabel(),this.setConfig("element",i)},e.prototype.extractLabel=function(){var t=this.options,e=t.label;if(e&&!1===e.visible)return!1;var i=yc("label",Object(B["__assign"])({plot:this,labelType:"scatterLabel",fields:[t.xField,t.yField],position:"middle",offset:0},e));return i},e.prototype.legend=function(){this.setConfig("legends",!1)},e.prototype.animation=function(){},e}(Yp),r_=n_;Qp("heatmap",n_);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="heatmap",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=r_.getDefaultOptions})(Jp);var a_=4,o_=function(){function t(t){this.destroyed=!1,this.dataSlides={};var e=this.getDefaultOptions();this.options=Object(E["deepMix"])({},e,t),this.view=this.options.view,this.afterRender=!0,this.init()}return t.prototype.init=function(){this.layout=this.getLayout(),this.width=this.options.width?this.options.width:this.getDefaultWidth(),this.height=this.options.height?this.options.height:this.getDefaultHeight();var t=this.options.plot.container;this.container=t.addGroup()},t.prototype.render=function(){var t=this.view.get("scales"),e=this.options.plot.options.colorField;this.colorScale=t[e];var i=this.colorScale,n=i.min,r=i.max,a=this.options.plot.options.color;"horizontal"===this.layout?this.renderHorizontal(n,r,a):this.renderVertical(n,r,a),this.legendLayout(),this.addInteraction()},t.prototype.hide=function(){this.container.set("visible",!1),this.options.plot.canvas.draw()},t.prototype.show=function(){this.container.set("visible",!0),this.options.plot.canvas.draw()},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destroy=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getBBox=function(){var t=this.container.getBBox();return new F["BBox"](this.x,this.y,t.width,t.height)},t.prototype.renderVertical=function(t,e,i){var n=this,r=(e-t)/(i.length-1),a=1/(i.length-1),o=this.height/(i.length-1),s="l(90)";Object(E["each"])(i,(function(t,e){var i=a*e;s+=i+":"+t+" "})),this.container.addShape("rect",{attrs:{x:0,y:0,width:this.width,height:this.height,fill:s}}),Object(E["each"])(i,(function(t,e){var i=o*e;n.container.addShape("path",{attrs:Object(B["__assign"])({path:[["M",0,i],["L",n.width,i]]},n.options.ticklineStyle)});var a=Math.round(r*e);n.container.addShape("text",{attrs:Object(B["__assign"])({text:a,textAlign:"left",textBaseline:"middle",x:n.width+a_,y:i},n.options.text.style)})}));var l=10,u=14,h=[["M",-l,-u/2],["L",0,0],["L",-l,u/2],["Z"]];this.anchor=this.container.addShape("path",{attrs:Object(B["__assign"])({path:h},this.options.anchorStyle)}),this.anchor.set("visible",!1)},t.prototype.renderHorizontal=function(t,e,i){var n=this,r=(e-t)/(i.length-1),a=1/(i.length-1),o=this.width/(i.length-1),s="l(0)";Object(E["each"])(i,(function(t,e){var i=a*e;s+=i+":"+t+" "})),this.container.addShape("rect",{attrs:{x:0,y:0,width:this.width,height:this.height,fill:s}}),Object(E["each"])(i,(function(t,e){var i=o*e;n.container.addShape("path",{attrs:Object(B["__assign"])({path:[["M",i,0],["L",i,n.height]]},n.options.ticklineStyle)});var a=Math.round(r*e);n.container.addShape("text",{attrs:Object(B["__assign"])({text:a,textAlign:"center",textBaseline:"top",x:i,y:n.height+a_},n.options.text.style)})}));var l=14,u=10,h=[["M",0,0],["L",-l/2,-u],["L",l/2,-u],["Z"]];this.anchor=this.container.addShape("path",{attrs:Object(B["__assign"])({path:h},this.options.anchorStyle)}),this.anchor.set("visible",!1)},t.prototype.getLayout=function(){var t=this.options.position.split("-");return this.position=t[0],"left"===t[0]||"right"===t[0]?"vertical":"horizontal"},t.prototype.getDefaultWidth=function(){if("horizontal"===this.layout){var t=this.view.get("panelRange").width;return t}return 10},t.prototype.getDefaultHeight=function(){if("vertical"===this.layout){var t=this.view.get("panelRange").height;return t}return 10},t.prototype.legendLayout=function(){var t=this,e=this.view.get("panelRange"),i=this.options.plot.getPlotTheme().bleeding;Object(E["isArray"])(i)&&Object(E["each"])(i,(function(e,n){"function"===typeof i[n]&&(i[n]=i[n](t.options.plot.options))}));var n=this.container.getBBox(),r=0,a=0,o=this.options.position.split("-"),s=this.options.plot.width,l=this.options.plot.height;"left"===o[0]?r=i[3]:"right"===o[0]?r=s-i[1]-n.width:"center"===o[1]?r=this.width===e.width?e.x:(s-n.width)/2:"left"===o[1]?r=i[3]:"right"===o[1]&&(r=this.options.plot.width-i[1]-n.width),"bottom"===o[0]?a=l-i[2]-n.height:"top"===o[0]?a=this.getTopPosition(i):"center"===o[1]?a=this.height===e.height?e.y:(l-n.height)/2:"top"===o[1]?a=i[0]:"bottom"===o[1]&&(a=l-i[2]-n.height),this.x=r,this.y=a,this.container.translate(r,a)},t.prototype.getDefaultOptions=function(){return{text:{style:{fontSize:12,fill:"rgba(0, 0, 0, 0.45)"}},ticklineStyle:{lineWidth:1,stroke:"rgba(0, 0, 0, 0.8)"},anchorStyle:{fill:"rgba(0,0,0,0.5)"},triggerOn:"mousemove"}},t.prototype.addInteraction=function(){var t,e=this;t="rect"===this.options.plot.options.shapeType?"polygon":"point";var i=t+":"+this.options.triggerOn,n="label:"+this.options.triggerOn,r=this.options.plot.options.colorField,a=this.colorScale,o=a.min,s=a.max;this.view.on(i,(function(t){var i=t.data._origin[r],n=(i-o)/(s-o);e.moveAnchor(n)})),this.view.on(n,(function(t){var i=t.data[r],n=(i-o)/(s-o);e.moveAnchor(n)})),this.options.plot.canvas.on("mouseleave",(function(t){e.anchor.set("visible",!1)}))},t.prototype.moveAnchor=function(t){if(this.anchor.set("visible",!0),"vertical"===this.layout){var e=this.height*t,i=[1,0,0,0,1,0,0,0,1];i[7]=e,this.anchor.stopAnimate(),this.anchor.animate({matrix:i},400,"easeLinear")}else{e=this.width*t,i=[1,0,0,0,1,0,0,0,1];i[6]=e,this.anchor.stopAnimate(),this.anchor.animate({matrix:i},400,"easeLinear")}},t.prototype.getTopPosition=function(t){if(this.options.plot.description){var e=this.options.plot.description.getBBox();return e.maxY+10}if(this.options.plot.title){e=this.options.plot.title.getBBox();return e.maxY+10}return t[0]},t}(),s_=o_;function l_(t,e,i,n,r){var a=i*r,o=n*r,s=[["M",t-a/2,e+o/2],["Q",t-a/2,e,t-a/2,e-o/2],["Q",t,e-o/2,t+a/2,e-o/2],["Q",t+a/2,e,t+a/2,e+o/2],["Q",t,e+o/2,t-a/2,e+o/2],["Z"]];return s}function u_(t,e,i){var n=[["M",t,e],["m",-i,0],["a",i,i,0,1,0,2*i,0],["a",i,i,0,1,0,-2*i,0],["Z"]];return n}function h_(t,e,i){var n=[["M",t-i,e],["Q",t-i,e-i,t,e-i],["Q",t+i,e-i,t+i,e],["Q",t+i,e+i,t,e+i],["Q",t-i,e+i,t-i,e],["Z"]];return n}Ao("polygon","rect",{draw:function(t,e){var i=this.parsePoints(t.points),n=i[2].x-i[0].x,r=i[0].y-i[1].y,a=i[0].x+n/2,o=i[1].y+r/2,s=l_(a,o,n,r,t.origin.size);return e.addShape("path",{attrs:{path:s,fill:t.color,opacity:1}})}}),Ao("point","curvePoint",{draw:function(t,e){var i=u_(t.x,t.y,t.size);return e.addShape("path",{attrs:{path:i,fill:t.color,opacity:1}})}});var c_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.showLabels=function(e,i){var n=this;t.prototype.showLabels.call(this,e,i);var r=this.get("labelsRenderer"),a=r.get("group").get("children"),o=r.get("items"),s=this.get("element").get("view");E["each"](a,(function(t,e){var r=t,a=(o[e],r.get("origin")),s=n.get("element").getShapeId(a),l=n._getShape(s,i),u=n.get("labelOptions"),h=u.adjustColor,c=u.adjustPosition;h&&n.adjustColor(r,l),c&&n.adjustPosition(r,l)})),s.get("canvas").draw()},e.prototype._getShape=function(t,e){var i;return E["each"](e,(function(e){var n=e,r=n.id;r===t&&(i=n)})),i},e.prototype.adjustColor=function(t,e){var i=t.getBBox(),n=e.getBBox();if(i.minY>=n.minY&&i.maxY<=n.maxY){var r=e.attr("fill"),a=e.attr("opacity")?e.attr("opacity"):1,o=Nv(r),s=Math.round(.299*o[0]+.587*o[1]+.114*o[2])/a,l=[{from:0,to:85,color:"white"},{from:85,to:170,color:"#F6F6F6"},{from:170,to:255,color:"black"}],u=this.mappingColor(l,s);t.attr("fill",u)}},e.prototype.mappingColor=function(t,e){var i;return E["each"](t,(function(t){var n=t;e>=n.from&&e<n.to&&(i=n.color)})),i},e.prototype.adjustPosition=function(t,e){var i=t.getBBox(),n=e.getBBox();(i.width>n.width||i.height>n.height)&&(t.attr("opacity",0),t.attr("fillOpacity",0),t.attr("strokeOpacity",0),t.set("capture",!1))},e}(bs);Ts("matrixLabel",c_);var p_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="matrix",e.gridSize=[],e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{forceSquare:!1,shapeType:"rect",legend:{visible:!0,position:"right-center"},tooltip:{shared:!1,crosshairs:!1},xAxis:{visible:!0,gridAlign:"center",grid:{visible:!0},tickLine:{visible:!0},line:{visible:!1},autoRotateLabel:!0},yAxis:{visible:!0,gridAlign:"center",grid:{visible:!0,align:"center"},tickLine:{visible:!0},autoRotateLabel:!0},color:["#9ae3d5","#66cdbb","#e7a744","#f1e066","#f27664","#e7c1a2"],label:{visible:!0,adjustColor:!0,adjustPosition:!0,offset:0,style:{stroke:"rgba(255,255,255,0)",lineWidth:0}}})},e.prototype.afterInit=function(){if(t.prototype.afterInit.call(this),this.options.forceSquare){var e=this.view.get("panelRange"),i=this.options,n=i.xField,r=i.yField,a=i.data,o=E["valuesOfKey"](a,n).length,s=E["valuesOfKey"](a,r).length,l=Math.min(e.width,e.height),u=Math.max(o,s),h=l/u,c=h*o,p=h*s;this.view.set("panelRange",new F["BBox"](e.x,e.y,c,p))}},e.prototype.afterRender=function(){this.options.legend&&this.options.legend.visible&&(this.matrixLegend=new s_(Object(B["__assign"])({view:this.view,plot:this},this.options.legend)),this.matrixLegend.render(),this.paddingController.registerPadding(this.matrixLegend,"outer")),t.prototype.afterRender.call(this)},e.prototype.changeShape=function(t){if(this.options.shapeType!==t)if(this.options.shapeType=t,"rect"===t){var e=this.view.get("elements")[0],i=e.getShapes();this.circleToRect(i)}else if("circle"===t){e=this.view.get("elements")[0],i=e.getShapes();this.rectToCircle(i)}},e.prototype.mappingSize=function(t){if(!this.options.sizeField||this.options.sizeField!==t){var e=E["valuesOfKey"](this.options.data,t),i=Math.min.apply(Math,e),n=Math.max.apply(Math,e),r=Pi("linear"),a=new r({min:i,max:n}),o=this.view.get("elements")[0],s=o.getShapes();"rect"===this.options.shapeType?this.rectSizeMapping(s,a,t):"circle"===this.options.shapeType&&this.circleSizeMapping(s,a,t)}},e.prototype.disableMappingSize=function(){var t=this.view.get("elements")[0],e=t.getShapes();"rect"===this.options.shapeType?this.rectDisableSizeMapping(e):"circle"===this.options.shapeType&&this.circleDisableSizeMapping(e)},e.prototype.geometryParser=function(){return""},e.prototype.coord=function(){},e.prototype.legend=function(){this.setConfig("legends",!1)},e.prototype.addGeometry=function(){if(this.gridSize=this.getGridSize(),"rect"===this.options.shapeType){var t=this.addRect();this.setConfig("element",t)}else{var e=this.addCircle();this.setConfig("element",e)}},e.prototype.addRect=function(){var t=[.3,.9];this.options.shapeSize&&(t[0]=this.options.shapeSize[0]/this.gridSize[0],t[1]=this.options.shapeSize[1]/this.gridSize[1]);var e={type:"polygon",position:{fields:[this.options.xField,this.options.yField]},color:{fields:[this.options.colorField],values:this.options.color},shape:{values:["rect"]},label:this.extractLabel()};return this.options.sizeField?e.size={fields:[this.options.sizeField],values:t}:e.size={values:[1]},e},e.prototype.addCircle=function(){var t=[.3,.9];this.options.shapeSize?t=this.options.shapeSize:(t[0]=this.gridSize[0]*t[0]*.5,t[1]=this.gridSize[1]*t[1]*.5);var e={type:"point",position:{fields:[this.options.xField,this.options.yField]},color:{fields:[this.options.colorField],values:this.options.color},shape:{values:["curvePoint"]},label:this.extractLabel()};return this.options.sizeField?e.size={fields:[this.options.sizeField],values:t}:e.size={values:[.5*Math.min(this.gridSize[0],this.gridSize[1])*.9]},e},e.prototype.extractLabel=function(){var t=this.options.label;if(!t.visible)return!1;if(!this.options.sizeField&&!this.options.colorField)return!1;var e=yc("label",Object(B["__assign"])({plot:this,top:!0,labelType:"matrixLabel",fields:this.options.colorField?[this.options.colorField]:[this.options.sizeField]},t));return e},e.prototype.getGridSize=function(){if("auto"===this.options.padding)return[0,0];var t=this.getViewRange(),e=this.options,i=e.padding,n=e.xField,r=e.yField,a=e.data,o=t.width-i[1]-i[3],s=t.height-i[0]-i[2],l=E["valuesOfKey"](a,n).length,u=E["valuesOfKey"](a,r).length;return[o/l,s/u]},e.prototype.circleToRect=function(t){var e=this,i=this.gridSize;E["each"](t,(function(t){var n=t.get("origin"),r=n.x,a=n.y,o=n.size,s=2*o/Math.min(i[0],i[1]);e.options.sizeField||(s=1);var l=h_(r,a,o),u=l_(r,a,i[0],i[1],s);t.stopAnimate(),t.attr("path",l),t.animate({path:u},500,"easeLinear")}))},e.prototype.rectToCircle=function(t){var e=this;E["each"](t,(function(t){var i=t.get("coord"),n=t.get("origin").points,r=[];E["each"](n,(function(t){r.push(i.convertPoint(t))}));var a=t.getBBox(),o=a.width,s=a.height,l=a.minX+o/2,u=a.minY+s/2,h=e.options.sizeField?1:.9,c=h_(l,u,Math.min(o,s)/2*h),p=u_(l,u,Math.min(o,s)/2*h);t.stopAnimate(),t.animate({path:c},500,"easeLinear",(function(){t.attr("path",p)}))}))},e.prototype.rectSizeMapping=function(t,e,i){E["each"](t,(function(t){var n=t.get("origin")._origin,r=.3+.6*e.scale(n[i]);t.get("origin").size=r;var a=t.getBBox(),o=a.width,s=a.height,l=a.minX+o/2,u=a.minY+s/2,h=l_(l,u,o,s,r);t.stopAnimate(),t.animate({path:h},500,"easeLinear")}))},e.prototype.circleSizeMapping=function(t,e,i){E["each"](t,(function(t){var n=t.get("origin")._origin,r=.3+.6*e.scale(n[i]),a=t.get("origin"),o=a.x,s=a.y,l=a.size,u=u_(o,s,l*r);t.get("origin").size=l*r,t.stopAnimate(),t.animate({path:u},500,"easeLinear")}))},e.prototype.circleDisableSizeMapping=function(t){var e=this;E["each"](t,(function(t){var i=t.get("origin"),n=i.x,r=i.y,a=.9*Math.min(e.gridSize[0],e.gridSize[1]);t.get("origin").size=a/2;var o=u_(n,r,a/2);t.stopAnimate(),t.animate({path:o},500,"easeLinear")}))},e.prototype.rectDisableSizeMapping=function(t){var e=this;E["each"](t,(function(t){var i=t.getBBox(),n=i.width,r=i.height,a=i.minX+n/2,o=i.minY+r/2,s=l_(a,o,e.gridSize[0],e.gridSize[1],1);t.get("origin").size=1,t.stopAnimate(),t.animate({path:s},500,"easeLinear")}))},e}(Yp),f_=p_;Qp("matrix",p_);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="matrix",t.prototype.createLayers.call(this,i)},e.prototype.changeShape=function(t){var e=this.layers[0];e.changeShape(t)},e.prototype.mappingSize=function(t){var e=this.layers[0];e.mappingSize(t)},e.prototype.disableMappingSize=function(){var t=this.layers[0];t.disableMappingSize()},e.getDefaultOptions=f_.getDefaultOptions})(Jp);function d_(t){for(var e=[],i=0;i<t.length;i++){var n=t[i];if(n){var r=0===i?"M":"L";e.push([r,n.x,n.y])}}var a=t[0];return e.push(["L",a.x,a.y]),e.push(["Z"]),e}var g_={addFillAttrs:function(t,e){e.color&&(t.fill=e.color),E["isNumber"](e.opacity)&&(t.opacity=t.fillOpacity=e.opacity)}};function v_(t){var e=mt.theme.shape.interval,i=E["mix"]({},e,t.style);return g_.addFillAttrs(i,t),t.color&&(i.stroke=i.stroke||t.color),i}Ao("interval","waterfall",{draw:function(t,e){var i=v_(t),n=d_(t.points);n=this.parsePath(n);var r=e.addShape("path",{attrs:E["mix"](i,{path:n})}),a=E["get"](t.style,"leaderLine");if(a&&a.visible){var o=a.style||{};if(t.nextPoints){var s=[["M",t.points[2].x,t.points[2].y],["L",t.nextPoints[0].x,t.nextPoints[0].y]];s=this.parsePath(s);var l=e.addShape("path",{attrs:Object(B["__assign"])({path:s,stroke:"#d3d3d3",lineDash:[4,2],lineWidth:1},o)});l.name="leader-line"}}return r}});var y_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.adjustPosition=function(t,e,i){var n=2,r=e.getBBox(),a=t.get("origin"),o=i.fields[0],s=a[M_],l=a[o],u=E["isArray"](s)?s[1]:s,h=(r.minY+r.maxY)/2,c="bottom";l<0?(h=r.maxY+n,c="top"):h=r.minY-n,t.attr("y",h),t.attr("text",u),t.attr("textBaseline",c)},e}(Hv);function m_(){return{fill:"#fff",fontSize:12,lineHeight:12,stroke:"rgba(0, 0, 0, 0.45)"}}Ts("waterfall",y_);var x_=function(){function t(t){this.textAttrs={},this.view=t.view,this.fields=t.fields,this.formatter=t.formatter,this.textAttrs=E["mix"](m_(),t.style),this._init()}return t.prototype.draw=function(){var t=this;if(this.view&&!this.view.destroyed){var e=E["clone"](this.view.get("data"));this.container=this.view.get("frontgroundGroup").addGroup();var i=this.view.get("elements")[0].getShapes().filter((function(t){return"interval"===t.name})),n=new F["Group"];E["each"](i,(function(r,a){if(r.get("origin")){var o=r.get("origin")._origin,s=r.getBBox(),l=o[M_],u=l;E["isArray"](l)&&(u=l[1]-l[0]),u=u>0?"+"+u:u,o[S_]&&(u=l[0]-l[1]);var h=u;if(t.formatter){var c=i[a].attr("fill");h=t.formatter(""+u,{_origin:e[a],color:c},a)}var p=n.addShape("text",{attrs:Object(B["__assign"])({text:h,textBaseline:"middle",textAlign:"center",x:(s.minX+s.maxX)/2,y:(s.minY+s.maxY)/2},t.textAttrs)});p.getBBox().height>s.height&&p.set("visible",!1)}})),this.container.add(n),this.view.get("canvas").draw()}},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype._init=function(){var t=this;this.view.on("beforerender",(function(){t.clear()})),this.view.on("afterrender",(function(){t.draw()}))},t}(),b_=x_,__={waterfall:"interval"},w_={interval:"waterfall"},M_="$$value$$",S_="$$total$$",k_="$$index$$",O_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="watarfall",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{legend:{visible:!1,position:"bottom"},label:{visible:!0,adjustPosition:!0},diffLabel:{visible:!0},leaderLine:{visible:!0},showTotal:{visible:!0,label:"总计值"},waterfallStyle:{lineWidth:0},tooltip:{visible:!0,shared:!0,crosshairs:{type:"rect"}}})},e.prototype.getOptions=function(e){var i=t.prototype.getOptions.call(this,e);return this.adjustLegendOptions(i),this.adjustMeta(i),i},e.prototype.afterInit=function(){t.prototype.afterInit.call(this);var e=this.options;e.diffLabel&&e.diffLabel.visible?this.diffLabel=new b_({view:this.view,fields:[e.xField,e.yField,M_],formatter:e.diffLabel.formatter,style:e.diffLabel.style}):this.diffLabel&&(this.diffLabel.clear(),this.diffLabel=null)},e.prototype.afterRender=function(){t.prototype.afterRender.call(this);var e=this.options;this.view.on("tooltip:change",(function(t){for(var i=t.items,n=0;n<i.length;n++){var r=i[n],a=E["get"](r.point,"_origin",{});if(r.name=a[e.xField],r.value=a[e.yField],!r.value&&a[S_]){var o=a[M_];r.value=o[0]-o[1]}t.items[n]=r}}))},e.prototype.geometryParser=function(t,e){return"g2"===t?__[e]:w_[e]},e.prototype.addGeometry=function(){var t=this.options,e={type:"interval",position:{fields:[t.xField,M_]},shape:{values:["waterfall"]}};t.label&&(e.label=this.extractLabel()),e.style=this._parseStyle(),e.color=this._parseColor(),this.waterfall=e,this.setConfig("element",e)},e.prototype.processData=function(t){var e,i=[],n=this.options.xField,r=this.options.yField;if(E["map"](t,(function(t,e){var n,a=t[r];if(e>0){var o=i[e-1][M_];a=E["isArray"](o)?[o[1],t[r]+o[1]]:[o,t[r]+o]}i.push(Object(B["__assign"])(Object(B["__assign"])({},t),(n={},n[M_]=a,n[k_]=e,n)))})),this.options.showTotal&&this.options.showTotal.visible){var a=E["map"](t,(function(t){return t[r]})),o=E["reduce"](a,(function(t,e){return t+e}),0);i.push((e={},e[n]=this.options.showTotal.label,e[r]=null,e[M_]=[o,0],e[k_]=i.length,e[S_]=!0,e))}return i},e.prototype.scale=function(){var e=this.options,i={};i[e.xField]={type:"cat"},E["has"](e,"xAxis")&&Nf(i[e.xField],e.xAxis),i[M_]={},E["has"](e,"yAxis")&&Nf(i[M_],e.yAxis),this.setConfig("scales",i),t.prototype.scale.call(this)},e.prototype.axis=function(){var t=yc("axis",{plot:this,dim:"x"}),e=yc("axis",{plot:this,dim:"y"}),i={fields:{}};i.fields[this.options.xField]=t,i.fields[M_]=e,this.setConfig("axes",i)},e.prototype.coord=function(){},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,v)},e.prototype.extractLabel=function(){var t=this.options,e=E["deepMix"]({},t.label);if(!1===e.visible)return!1;var i=yc("label",Object(B["__assign"])({plot:this,labelType:"waterfall",fields:[t.yField]},e));return i},e.prototype._parseStyle=function(){var t=this.options.waterfallStyle,e=this.options.leaderLine,i={};return E["isFunction"](t)?i.callback=function(){for(var i=[],n=0;n<arguments.length;n++)i[n]=arguments[n];return Object.assign({},t.apply(void 0,i),{leaderLine:e})}:i.cfg=Object(B["__assign"])(Object(B["__assign"])({},t),{leaderLine:e}),i},e.prototype._parseColor=function(){var t=this,e=this.options,i=this.options,n=i.xField,r=i.yField,a={fields:[n,r,M_,k_]};if(E["isFunction"](e.color))a.callback=e.color;else{var o="#f4664a",s="#30bf78",l="rgba(0, 0, 0, 0.25)";if(E["isString"](e.color))o=s=l=e.color;else if(E["isObject"](e.color)){var u=e.color,h=u.rising,c=u.falling,p=u.total;o=h,s=c,l=p}a.callback=function(e,i,n,r){return r===t.options.data.length?l||(n[0]>=0?o:s):(E["isArray"](n)?n[1]-n[0]:n)>=0?o:s}}return a},e.prototype.adjustLegendOptions=function(t){var e=t.legend;e&&(e.visible=!1)},e.prototype.adjustMeta=function(t){var e=t.meta;if(e){var i=e?e[t.yField]:{};i.alias=i.alias||t.yField,t.meta[M_]=i}},e}(Yp),C_=O_;Qp("waterfall",O_);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="waterfall",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=C_.getDefaultOptions})(Jp);function A_(t,e,i,n,r){var a=n-e,o=t.children,s=t.value;o.sort((function(t,e){return e.value-t.value}));var l=a/s,u=e;Object(E["each"])(o,(function(t){t.y0=i,t.y1=r,t.x0=u,u+=t.value*l,t.x1=t.x0+t.value*l}))}function L_(t,e,i,n,r){var a=r-i,o=t.children,s=t.value;o.sort((function(t,e){return e.value-t.value}));var l=a/s,u=i;Object(E["each"])(o,(function(t){t.x0=e,t.x1=n,t.y0=u,u+=t.value*l,t.y1=t.y0+t.value*l}))}var P_=(1+Math.sqrt(5))/2;function j_(t,e,i,n,r){var a=t.children,o=t.value;a.sort((function(t,e){return e.value-t.value}));var s,l,u,h,c,p,f,d,g=[],v=0,y=0;while(v<a.length){var m=n-e,x=r-i;for(s=a[y++].value,l=s,u=s,h=Math.max(x/m,m/x)/(o*P_),c=s*s*h,f=Math.max(l/c,c/u);y<a.length;y++){if(d=a[y].value,s+=d,d<u&&(u=d),d>l&&(l=d),c=s*s*h,p=Math.max(l/c,c/u),p>f){s-=d;break}f=p}var b={value:s,dice:m<x,children:a.slice(v,y)};if(g.push(b),b.dice){var _=o?x*s/o:x;A_(b,e,i,n,i+_),o&&(i+=_)}else{var w=o?m*s/o:m;L_(b,e,i,e+w,r),o&&(e+=w)}o-=s,v=y}return g}var T_=function(t){function e(e){var i=t.call(this)||this;return i.container=e.container,i.destroyed=!1,i.group=i.container.addGroup(),i.config=e,i.init(e),i}return Object(B["__extends"])(e,t),e.prototype.getGroup=function(){return this.group},e.prototype.getBBox=function(){return this.getGroup().getBBox()},e.prototype.render=function(){this.renderInner(this.group),this.getCanvas().draw()},e.prototype.update=function(t){this.config=Object(B["__assign"])(Object(B["__assign"])({},this.config),t),this.init(Object(B["__assign"])(Object(B["__assign"])({},this.config),{config:t})),this.group.clear(),this.renderInner(this.group),this.getCanvas().draw()},e.prototype.destroy=function(){this.group.remove(!0),this.destroyed=!0},e.prototype.getCanvas=function(){return this.container.get("canvas")},e.prototype.init=function(t){},e.prototype.renderInner=function(t){},e}(D.a),B_=T_,I_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.listeners=[],e.onItemGroupToggleActive=function(t,i){return function(){var n=t.get("children").find((function(t){return"item-background"===t.get("class")}));n&&n.attr(i?e.itemActiveBackgroundStyle:e.itemBackgroundStyle),e.getCanvas().draw()}},e}return Object(B["__extends"])(e,t),e.prototype.destroy=function(){this.offEvents(),t.prototype.destroy.call(this)},e.prototype.init=function(t){this.x=t.x,this.y=t.y,this.items=t.items||[],this.itemPadding=t.itemPadding||[2,8,2,8],this.backgroundStyle=Object(B["__assign"])({lineWidth:1,stroke:"#ffffff"},t.backgroundStyle||{}),this.itemBackgroundStyle=Object(B["__assign"])({fill:"#fff"},t.itemBackgroundStyle||{}),this.itemActiveBackgroundStyle=Object(B["__assign"])({fill:"#ccc",opacity:.2},t.itemActiveBackgroundStyle||{}),this.separator=t.separator||"/",this.separatorStyle=Object(B["__assign"])({textBaseline:"top",fill:"#000",opacity:.45},t.separatorStyle||{}),this.itemWidth=t.itemWidth,this.itemHeight=t.itemHeight,this.maxItemWidth=t.maxItemWidth,this.textStyle=Object(B["__assign"])({textBaseline:"top",fill:"#000",opacity:.45},t.textStyle||{})},e.prototype.renderInner=function(t){var e=0,i=0;this.offEvents(),this.renderItems(t,e,i),this.group.move(this.x,this.y)},e.prototype.renderItems=function(t,e,i){var n,r=this,a=this.itemPadding,o=a[0],s=a[1],l=a[2],u=a[3],h=t.addShape("rect",{class:"breadcrumb-background",attrs:Object(B["__assign"])({x:e,y:i,width:1,height:1},this.backgroundStyle)});this.items.forEach((function(a,h){var c=t.addGroup({id:"item-group-"+a.key,data:a,class:"item-group",attrs:{cursor:"pointer"}}),p=c.addShape("rect",{id:"item-background-"+a.key,class:"item-background",attrs:Object(B["__assign"])(Object(B["__assign"])({x:e,y:i,width:u+s,height:o+l},r.itemBackgroundStyle),{cursor:"pointer"})});p.name="breadcrumb";var f=c.addShape("text",{id:"item-text-"+a.key,class:"item-text",attrs:Object(B["__assign"])(Object(B["__assign"])({x:e+u,y:i+o,text:a.text},r.textStyle),{cursor:"pointer"})});f.name="breadcrumb";var d=f.getBBox();n=r.itemHeight||d.height;var g=r.itemWidth||d.width;r.maxItemWidth&&(g=Math.min(g,r.maxItemWidth));var v={x:e,y:i,width:g+u+s,height:n+o+l};if(p.attr("width",v.width),p.attr("height",v.height),c.attr("clip",new F["Rect"]({attrs:v})),e+=v.width,h!==r.items.length-1){var y=t.addShape("text",{attrs:Object(B["__assign"])({x:e,y:i+o,text:r.separator},r.separatorStyle),class:"separator"});e+=y.getBBox().width}})),h.attr({width:e,height:n+o+l})},e.prototype.bindEvents=function(t){var e=this,i=this.items,n=t.get("children").filter((function(t){return"item-group"===t.get("class")})),r=function(t,n,r){return function(){var t=n.get("data"),a=i.find((function(e){return e.key===t}));e.emit(r,{item:a})}};n.forEach((function(t){var i=r("click",t,"onItemClick"),n=r("dblclick",t,"onItemDblclick"),a=e.onItemGroupToggleActive(t,!0),o=e.onItemGroupToggleActive(t,!1);t.on("click",i),t.on("dblclick",n),t.on("mouseenter",a),t.on("mouseleave",o),e.listeners.push({target:t,event:"click",callback:i}),e.listeners.push({target:t,event:"dblclick",callback:n}),e.listeners.push({target:t,event:"mouseenter",callback:a}),e.listeners.push({target:t,event:"mouseleave",callback:o})}))},e.prototype.offEvents=function(){this.listeners&&this.listeners.forEach((function(t){var e=t.target,i=t.event,n=t.callback;e.off(i,n)})),this.listeners=[]},e}(B_),D_=I_,F_=[1,0,0,0,1,0,0,0,1],E_=400,R_="easeQuadInOut";function z_(t,e,i){var n=W_(t),r=G_(e),a=r.width/n.width,o=r.height/n.height,s=(r.minX-n.minX)*a,l=(r.minY-n.minY)*o,u={transform:[["s",a,o],["t",s,l]]},h=e.get("elements")[0];V_(h);var c=new F["Rect"]({attrs:{x:r.minX,y:r.minY,width:r.width,height:r.height}}),p=e.get("container").addGroup();p.set("zIndex",-100),p.attr("clip",c);var f=N_(h,p);h.get("container").set("visible",!1),e.get("canvas").draw(),i(),window.setTimeout((function(){Object(E["each"])(f,(function(t,i){0===i?t.animate(u,E_,R_,(function(){p.remove(),e.get("canvas").draw()})):t.animate(u,E_)})),h=e.get("elements")[0],V_(h);var t=h.getShapes();Object(E["each"])(t,(function(t){t.attr("opacity",0),t.animate({opacity:1},E_,R_)}));var i=h.get("container");i.stopAnimate(),i.set("visible",!0),i.attr("matrix",Object(E["clone"])(F_)),i.transform([["s",n.width/r.width,n.height/r.height],["t",n.minX,n.minY]]);var a=Object(E["clone"])(F_);h.get("container").animate({matrix:a},E_,R_,(function(){q_(h)})),e.get("canvas").draw()}),16)}function N_(t,e){var i=t.getShapes(),n=[];return Object(E["each"])(i,(function(t){var i=e.addShape("path",{attrs:Object(E["deepMix"])({},t.attrs,{capture:!1})});n.push(i)})),n}function Y_(t,e,i){var n=e.get("elements")[0];V_(n);var r=n.get("container");r.attr("matrix",Object(E["clone"])(F_));var a=e.get("container").addGroup();a.set("zIndex",-100);var o=N_(n,a);r.set("visible",!1),e.get("canvas").draw(),i(),n=e.get("elements")[0],V_(n),r=n.get("container");var s=H_(n.getShapes(),t),l=W_(s),u=G_(e),h=new F["Rect"]({attrs:{x:u.minX,y:u.minY,width:u.width,height:u.height}}),c=r.get("parent");c.attr("clip")||c.attr("clip",h),X_(a,o,l,u);var p=u.width/l.width,f=u.height/l.height,d=(u.minX-l.minX)*p,g=(u.minY-l.minY)*f;r.transform([["s",p,f],["t",d,g]]),r.set("visible",!0),r.animate({matrix:F_},E_,R_,(function(){q_(n)}))}function H_(t,e){var i;return Object(E["each"])(t,(function(t){var n=t.get("origin")._origin.name;n===e&&(i=t)})),i}function G_(t){var e=t.get("viewRange"),i={minX:e.minX,minY:e.minY,centerX:(e.maxX-e.minX)/2,centerY:(e.maxY-e.minY)/2,width:e.width,height:e.height};return i}function W_(t){var e=t.attr("path"),i=e[0][1],n=e[0][2],r=e[1][1],a=e[2][2],o={minX:i,minY:a,centerX:(r-i)/2,centerY:(n-a)/2,width:Math.abs(r-i),height:Math.abs(n-a)};return o}function X_(t,e,i,n){var r=i.width/n.width,a=i.height/n.height,o={transform:[["s",r,a],["t",i.minX,i.minY]]};t.animate(o,E_,R_,(function(){t.remove()})),Object(E["each"])(e,(function(t){t.animate({opacity:0},E_,R_)}))}function V_(t){var e=t.get("labelController").labelsContainer;e.set("visible",!1)}function q_(t){var e=t.get("labelController").labelsContainer;e.set("visible",!0)}var U_=100,Z_=30,Q_=10,$_=function(t){void 0===t&&(t={});var e=Object(B["__assign"])({x:0,y:0,startNode:{name:"root"},itemWidth:U_,itemHeight:Z_,padding:[0,0,0,0]},t);return e},K_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.getInteractionRange=function(t,e){var i=$_(e),n=i.padding,r=n[0],a=n[1];return new F["BBox"](t.minX,t.maxY-i.itemHeight-r-a,t.width,i.itemHeight+r+a)},e.prototype.start=function(t){var e=this,i=t.data._origin;i.children&&(this.parentNode={shape:t.target,data:{name:Object(E["clone"])(this.currentNode.name),value:Object(E["clone"])(this.currentNode.value)},depth:Object(E["clone"])(this.currentDepth)},this.currentDepth++,z_(t.target,this.view,(function(){e.update(i)})))},e.prototype.update=function(t){Object(E["hasKey"])(this.cache,t.name)||(this.cache[t.name]=t);var e=this.plot.getTreemapData(t,t.depth);this.view.changeData(e),this.adjustScale(this.currentDepth),this.currentNode=t,this.render()},e.prototype.render=function(){if(this.breadcrumb){var t=this.getItems();this.breadcrumb.update({items:t}),this.layout()}else this.initGeometry(),this.cache={},this.saveOriginMapping(),this.container=this.container=this.canvas.addGroup(),this.startNode||(this.startNode={name:"root"}),"root"===this.startNode.name?(this.startNodeName=Object(E["hasKey"])(this.plot.options.data,"name")?this.plot.options.data.name:"root",this.currentNode=this.plot.options.data,this.currentDepth=1):(this.startNodeName=this.startNode.name,this.currentNode=this.startNode),this.y=this.view.get("viewRange").maxY+Q_,this.breadcrumb=new D_({container:this.container,x:0,y:this.y,items:this.getItems()}),this.breadcrumb.render(),this.layout();this.onInteraction()},e.prototype.clear=function(){},e.prototype.layout=function(){var t=this.container.getBBox().width,e=(this.plot.width-t)/2;this.breadcrumb.update({x:e,y:this.y})},e.prototype.getItems=function(){var t=[];if(this.currentNode.name&&this.currentNode.name===this.startNodeName){var e=this.getRootItem();t.push(e)}else{t=[];var i=[];this.findParent(this.currentNode,i),t.push(this.getRootItem()),Object(E["each"])(i,(function(e,i){t.push({key:String(i+2),text:e.name,data:e})})),t.push({key:String(i.length+2),text:this.currentNode.name,data:this.currentNode})}return t},e.prototype.findParent=function(t,e){t.parent&&(Object(E["hasKey"])(this.cache,t.parent.name)?e.push(this.cache[t.parent.name]):e.push(t.parent),this.findParent(t.parent,e))},e.prototype.onInteraction=function(){var t=this;this.container.on("click",(function(e){var i=e.target.get("parent");if(i&&"item-group"===i.get("class")){var n=i.get("data");if(n.data)if(n.text===t.startNodeName){var r=1;t.currentDepth-1===r?Y_(t.currentNode.name,t.view,(function(){t.updateRoot(n)})):t.updateRoot(n),t.currentDepth=1}else{if(t.currentNode===n.data)return;var a=Object(E["clone"])(t.currentDepth);t.currentDepth=parseInt(n.key),a-1===t.currentDepth?Y_(t.currentNode.name,t.view,(function(){t.update(n.data)})):t.update(n.data)}}}))},e.prototype.getRootItem=function(){var t=this.plot.options.data,e=Object(E["hasKey"])(t,"name")?t.name:"root";return{key:"1",text:e,data:this.plot.rootData}},e.prototype.saveOriginMapping=function(){var t=this.plot.options,e=t.colorField,i=t.colors,n={field:e,values:i};this.originMapping=n},e.prototype.adjustScale=function(t){var e=this.view;if(Object(E["hasKey"])(this.mapping,String(t))){var i=Object(E["clone"])(this.mapping[t]);if(i.values&&Object(E["isFunction"])(i.values)){var n=i.values(this.parentNode,this.currentNode);i.values=n}this.view.get("elements")[0].color(i.field,i.values)}else{i=Object(E["clone"])(this.originMapping);this.view.get("elements")[0].color(i.field,i.values)}e.render()},e.prototype.initGeometry=function(){this.geometry=this.view.get("elements")[0];var t=this.view.get("viewRange"),e=this.geometry.get("container"),i=new F["Rect"]({attrs:{x:t.minX,y:t.minY,width:t.width,height:t.height}});e.attr("clip",i)},e.prototype.updateRoot=function(t){this.view.changeData(t.data),this.adjustScale(1),this.currentNode=this.plot.options.data,this.render()},e}(bc),J_=K_;bc.registerInteraction("drilldown",K_);var tw={drilldown:J_},ew={onRectClick:"polygon:click",onRectDblclick:"polygon:dblclick",onRectMousemove:"polygon:mousemove",onRectMouseenter:"polygon:mouseenter",onRectMouseleave:"polygon:mouseleave",onRectMousedown:"polygon:mousedown",onRectMouseup:"polygon:mouseup",onRectContextmenu:"polygon:contextmenu",test:"breadcrumb:click"};E["assign"](R,ew);var iw=4,nw=8;function rw(t,e){return!t.children||t.depth>=e}function aw(t,e){var i=t.attr("fontSize"),n=t.attr("text"),r=new F["Text"]({attrs:{text:"",x:0,y:0,fontSize:i}}),a=n.split("\n"),o=a.map((function(t){for(var i="",n=t.split(""),a=[],o=0;o<n.length;o++){var s=n[o];r.attr("text",i+=s);var l=r.getBBox().width-1;if(l>e){if(0===o)break;a.push(o),i=""}}return lh(n,a)}));return r.remove(),o.join("\n")}function ow(t,e,i){for(var n=new F["Text"]({attrs:{text:"...",x:0,y:0,fontSize:e}}),r=n.getBBox().width,a=new F["Text"]({attrs:{text:"",x:0,y:0,fontSize:e}}),o="",s=i-r,l=0;l<t.length;l++){var u=t[l];a.attr("text",o+=u);var h=a.getBBox().width;if(h>=s){var c=o.substr(0,o.length-1);if(c.length>0)return c+"..."}}return o}var sw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.showLabels=function(e,i){var n=this;t.prototype.showLabels.call(this,e,i);var r=this.get("labelsRenderer"),a=r.get("group").get("children"),o=this.get("element").get("view"),s=this.get("labelOptions").maxLevel;E["each"](a,(function(t,e){var r=t,a=t.get("origin"),o=r.get("origin"),l=rw(a,s),u=n.get("element").getShapeId(o),h=n.getShape(u,i),c=h.getBBox();if(!l&&a.showLabel){var p=c.x+c.width/2,f=c.y+4;t.attr("x",p),t.attr("y",f),t.attr("textBaseline","top"),t.attr("fontWeight",600);var d=c.width-2*iw;if(t.getBBox().width>d){var g=ow(t.attr("text"),t.attr("fontSize"),d);t.attr("text",g)}}else n.leafText(c,t)})),o.get("canvas").draw()},e.prototype.getShape=function(t,e){var i;return E["each"](e,(function(e){var n=e,r=n.id;r===t&&(i=n)})),i},e.prototype.leafText=function(t,e){var i=e.getBBox(),n=E["clone"](e.attr("text")),r=1===e.get("origin").depth?0:2,a=Math.max(e.attr("fontSize")-r,nw),o=t.x+t.width/2,s=t.y+t.height/2;e.attr({x:o,y:s,textAlign:"center",textBaseline:"middle",lineHeight:a,fontSize:a});var l=t.width-2*iw;if(i.width>t.width&&i.height>t.height)e.attr("text","");else if(l<a)e.attr("text","");else if(i.width>t.width){var u=aw(e,l);e.attr({lineHeight:e.attr("fontSize"),text:u});var h=e.getBBox();if(h.height>t.height){var c=ow(n,a,l);e.attr("text",c)}}},e}(bs);Ts("treemapLabel",sw);var lw=4,uw=4,hw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{maxLevel:2,padding:[0,0,0,0],tooltip:{visible:!1},legend:{visible:!1},xAxis:{visible:!1},yAxis:{visible:!1},xField:"x",yField:"y",label:{visible:!0,adjustPosition:!0,style:{stroke:"rgba(0,0,0,0)",lineWidth:0,fontSize:12}},meta:{x:{nice:!1},y:{nice:!1}}})},e.prototype.beforeInit=function(){var t=this,e=this.options.interactions;e&&E["each"](e,(function(e){"drilldown"===e.type&&(t.isDrilldown=!0,t.options.maxLevel=1)}))},e.prototype.geometryParser=function(t,e){return"polygon"},e.prototype.getTreemapData=function(t,e){var i=this.getViewRange(),n=j_(t,i.x,i.y,i.width,i.height);this.recursive(n,1);var r=[];return this.getAllNodes(n,r,e),r.sort((function(t,e){return t.depth-e.depth})),this.options.xField="x",this.options.yField="y",r},e.prototype.processData=function(){return this.rootData},e.prototype.beforInit=function(){t.prototype.beforeInit.call(this);var e=this.options.data,i=this.getTreemapData(e);this.rootData=i},e.prototype.coord=function(){},e.prototype.addGeometry=function(){var t=this,e=this.options,i=e.data,n=e.colorField,r=e.color,a=this.getTreemapData(i);this.rootData=a;var o=this.options.maxLevel;this.rect={type:"polygon",position:{fields:["x","y"]},color:{fields:[n],values:r},style:{fields:["depth"],callback:function(e){var i={lineWidth:1,stroke:"rgba(0,0,0,0.3)",opacity:e/o};return 1===e&&(i={lineWidth:1,stroke:"black",opacity:e/o}),E["deepMix"]({},i,t.options.rectStyle)}},label:this.extractLabel(),tooltip:{fields:["name","value"]}},this.setConfig("element",this.rect)},e.prototype.applyInteractions=function(){var t=this,e=this.options.interactions,i=this.view.get("interactions");E["each"](e,(function(e){var n=tw[e.type];if(n){var r=new n(E["deepMix"]({},{view:t.view,plot:t,startEvent:"polygon:click"},e.cfg));i[e.type]=r}}))},e.prototype.animation=function(){t.prototype.animation.call(this),this.isDrilldown&&(this.rect.animate=!1)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,y)},e.prototype.extractLabel=function(){var t=this.options.label;if(!t.visible)return!1;var e=yc("label",Object(B["__assign"])({labelType:"treemapLabel",plot:this,top:!0,fields:["name"],maxLevel:this.options.maxLevel},t));return e},e.prototype.recursive=function(t,e){var i=this,n=this.options.colorField;E["each"](t,(function(t){E["each"](t.children,(function(r){r.depth=e,e>1&&(r.parent=t),E["hasKey"](r,n)||(r[n]=t[n]),r.showLabel=!0;var a=i.isLeaf(r);if(!a){var o=Math.abs(r.y1-r.y0),s=i.getLabelHeight(),l=o/2>s?s:uw;r.showLabel=l!==uw;var u=j_(r,r.x0+uw,r.y0+l,r.x1-uw,r.y1-uw);i.fillColorField(u,n,r[n]),i.recursive(u,r.depth+1)}}))}))},e.prototype.getAllNodes=function(t,e,i){var n=this,r=i||this.options.maxLevel,a=this.getViewRange();E["each"](t,(function(t){E["hasKey"](t,"x0")&&t.depth<=r&&e.push(Object(B["__assign"])(Object(B["__assign"])({},t),{x:[t.x0,t.x1,t.x1,t.x0],y:[a.height-t.y1,a.height-t.y1,a.height-t.y0,a.height-t.y0]})),E["hasKey"](t,"children")&&n.getAllNodes(t.children,e)}))},e.prototype.fillColorField=function(t,e,i){E["each"](t,(function(t){E["hasKey"](t,e)||(t[e]=i)}))},e.prototype.getLabelHeight=function(){var t=this.options.label,e=this.getTheme().label.textStyle.fontSize,i=0;if(t&&t.visible){var n=t.style;i=n&&n.fontSize?n.fontSize:e}return i+2*lw},e.prototype.isLeaf=function(t){return!t.children||0===t.children.length},e}(Yp),cw=hw;Qp("treemap",hw);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="treemap",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=cw.getDefaultOptions})(Jp);var pw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="step-line",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{step:"hv"})},e}(lv);Qp("step-line",pw);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="step-line",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=pw.getDefaultOptions})(Jp);var fw=i("8c29"),dw=i.n(fw),gw=function(t){function e(e){var i=this,n=E["deepMix"]({},{itemTpl:'<div data-index={index}>\n <span style="background-color:{color};" class="g2-tooltip-marker"></span>\n {name}<span class="g2-tooltip-value">{value}</span></div>'},e);return i=t.call(this,n)||this,i}return Object(B["__extends"])(e,t),e.prototype.show=function(){var t=this.get("container");t.style.visibility="visible",t.style.display="block";var e=this.get("crosshairGroup");e&&e.show();var i=this.get("markerGroup");i&&i.show(),this.set("visible",!0)},e.prototype.hide=function(){var t=this.get("container");t.style.visibility="hidden",t.style.display="none";var e=this.get("crosshairGroup");e&&e.hide();var i=this.get("markerGroup");i&&i.hide(),this.set("visible",!1)},e}(dw.a),vw=gw;
/*!
* wordcloud2.js
* http://timdream.org/wordcloud2.js/
*
* Copyright 2011 - 2013 Tim Chien
* Released under the MIT license
*/
window.setImmediate||(window.setImmediate=function(){return window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||function(){if(!window.postMessage||!window.addEventListener)return null;var t=[void 0],e="zero-timeout-message",i=function(i){var n=t.length;return t.push(i),window.postMessage(e+n.toString(36),"*"),n};return window.addEventListener("message",(function(i){if("string"===typeof i.data&&i.data.substr(0,e.length)===e){i.stopImmediatePropagation();var n=parseInt(i.data.substr(e.length),36);t[n]&&(t[n](),t[n]=void 0)}}),!0),window.clearImmediate=function(e){t[e]&&(t[e]=void 0)},i}()||function(t){window.setTimeout(t,0)}}()),window.clearImmediate||(window.clearImmediate=function(){return window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(t){window.clearTimeout(t)}}());var yw=function(){var t=document.createElement("canvas");if(!t||!t.getContext)return!1;var e=t.getContext("2d");return!!e.getImageData&&(!!e.fillText&&(!!Array.prototype.some&&!!Array.prototype.push))}(),mw=function(){if(yw){var t,e,i=document.createElement("canvas").getContext("2d"),n=20;while(n){if(i.font=n.toString(10)+"px sans-serif",i.measureText("W").width===t&&i.measureText("m").width===e)return n+1;t=i.measureText("W").width,e=i.measureText("m").width,n--}return 0}}(),xw=function(t){for(var e,i,n=t.length;n;e=Math.floor(Math.random()*n),i=t[--n],t[n]=t[e],t[e]=i);return t},bw=function(t,e){if(yw){Array.isArray(t)||(t=[t]),t.forEach((function(e,i){if("string"===typeof e){if(t[i]=document.getElementById(e),!t[i])throw"The element id specified is not found."}else if(!e.tagName&&!e.appendChild)throw"You must pass valid HTML elements, or ID of the element."}));var i={data:[],fontFamily:'"Trebuchet MS", "Heiti TC", "微軟正黑體", "Arial Unicode MS", "Droid Fallback Sans", sans-serif',fontWeight:"normal",color:"random-dark",minFontSize:mw,maxFontSize:60,clearCanvas:!0,backgroundColor:"#fff",gridSize:8,drawOutOfBound:!1,origin:null,drawMask:!1,maskColor:"rgba(255,0,0,0.3)",maskGapWidth:.3,wait:0,abortThreshold:0,abort:function(){},minRotation:-Math.PI/2,maxRotation:Math.PI/2,rotateRatio:.5,rotationSteps:1,shuffle:!0,shape:"circle",ellipticity:1,active:!0,animatable:!0,selected:-1,shadowColor:"#333",shadowBlur:10,classes:null,onWordCloudHover:null,onWordCloudClick:null},n=[];if(e)for(var r in e)if("wordStyle"===r)for(var a in e[r])a in i&&(i[a]=e[r][a]);else r in i&&(i[r]=e[r]);if(i.minFontSize<mw&&(i.minFontSize=mw),i.minFontSize>i.maxFontSize)console.error("minSize cant bigger than maxSize");else{for(var o=0,s=0;s<i.data.length;s++)o<i.data[s].weight&&(o=i.data[s].weight);var l=function(t){return Math.min(Math.max(i.minFontSize,i.maxFontSize*t/o),i.maxFontSize)},u=!1;if("function"!==typeof i.shape)switch(i.shape){case"circle":default:i.shape="circle";break;case"cardioid":i.shape=function(t){return 1-Math.sin(t)},u=!0;break;case"diamond":i.shape=function(t){var e=t%(2*Math.PI/4);return 1/(Math.cos(e)+Math.sin(e))};break;case"square":i.shape=function(t){var e=(t+Math.PI/4)%(2*Math.PI/4);return 1/(Math.cos(e)+Math.sin(e))};break;case"triangle-forward":i.shape=function(t){var e=t%(2*Math.PI/3);return 1/(Math.cos(e)+Math.sqrt(3)*Math.sin(e))};break;case"triangle-backward":i.shape=function(t){var e=(t+Math.PI)%(2*Math.PI/3);return 1/(Math.cos(e)+Math.sqrt(3)*Math.sin(e))};break;case"triangle":case"triangle-up":i.shape=function(t){var e=(t+3*Math.PI/2)%(2*Math.PI/3);return 1/(Math.cos(e)+Math.sqrt(3)*Math.sin(e))};break;case"triangle-down":i.shape=function(t){var e=(t+5*Math.PI/2)%(2*Math.PI/3);return 1/(Math.cos(e)+Math.sqrt(3)*Math.sin(e))};break;case"pentagon":i.shape=function(t){var e=(t+.955)%(2*Math.PI/5);return 1/(Math.cos(e)+.726543*Math.sin(e))};break;case"star":i.shape=function(t){var e=(t+.955)%(2*Math.PI/10);return(t+.955)%(2*Math.PI/5)-2*Math.PI/10>=0?1/(Math.cos(2*Math.PI/10-e)+3.07768*Math.sin(2*Math.PI/10-e)):1/(Math.cos(e)+3.07768*Math.sin(e))};break}i.gridSize=Math.max(Math.floor(i.gridSize),4);var h,c,p,f,d,g,v,y=i.gridSize,m=y-i.maskGapWidth,x=Math.abs(i.maxRotation-i.minRotation),b=Math.min(i.maxRotation,i.minRotation),_=i.rotationSteps;switch(i.color){case"random-dark":v=function(){return W(10,50)};break;case"random-light":v=function(){return W(50,90)};break;default:"function"===typeof i.color&&(v=i.color);break}var w=null;"function"===typeof i.classes&&(w=i.classes);var M,S=!1,k=[],O=function(t){var e,i,n=t.currentTarget,r=n.getBoundingClientRect();t.touches?(e=t.touches[0].clientX,i=t.touches[0].clientY):(e=t.clientX,i=t.clientY);var a=e-r.left,o=i-r.top,s=Math.floor(a*(n.width/r.width||1)/y),l=Math.floor(o*(n.height/r.height||1)/y);return k&&k[s]&&k[s][l]},C=function(t,e,i,n){n(t?t.id:-1)},A=function(t){var e=O(t);if(M!==e){if(!e)return i.onWordCloudHover(void 0,void 0,t,G),void(i.active&&C(void 0,void 0,t,G));i.onWordCloudHover(e.item,e.dimension,t,G),i.active&&C(e.item,e.dimension,t,G),M=e}},L=function(t){var e=O(t);e&&(i.onWordCloudClick(e.item,e.dimension,t),t.preventDefault())},P=[],j=function(t){if(P[t])return P[t];var e=8*t,n=e,r=[];0===t&&r.push([f[0],f[1],0]);while(n--){var a=1;"circle"!==i.shape&&(a=i.shape(n/e*2*Math.PI)),r.push([f[0]+t*a*Math.cos(-n/e*2*Math.PI),f[1]+t*a*Math.sin(-n/e*2*Math.PI)*i.ellipticity,n/e*2*Math.PI])}return P[t]=r,r},T=function(){return i.abortThreshold>0&&(new Date).getTime()-g>i.abortThreshold},B=function(){return 0===i.rotateRatio||Math.random()>i.rotateRatio?0:0===x?b:_>0?b+Math.floor(Math.random()*_)*x/_:b+Math.random()*x},I=function(t,e,n){var r=!1,a=l(e);if(a<=0)return!1;var o=1;a<mw&&(o=function(){var t=2;while(t*a<mw)t+=2;return t}());var s=document.createElement("canvas"),u=s.getContext("2d",{willReadFrequently:!0});u.font=i.fontWeight+" "+(a*o).toString(10)+"px "+i.fontFamily;var h=u.measureText(t).width/o,c=Math.max(a*o,u.measureText("m").width,u.measureText("W").width)/o,p=h+2*c,f=3*c,d=Math.ceil(p/y),g=Math.ceil(f/y);p=d*y,f=g*y;var v,m=-h/2,x=.4*-c,b=Math.ceil((p*Math.abs(Math.sin(n))+f*Math.abs(Math.cos(n)))/y),_=Math.ceil((p*Math.abs(Math.cos(n))+f*Math.abs(Math.sin(n)))/y),w=_*y,M=b*y;s.setAttribute("width",w),s.setAttribute("height",M),r&&(document.body.appendChild(s),u.save()),u.scale(1/o,1/o),u.translate(w*o/2,M*o/2),u.rotate(-n),u.font=i.fontWeight+" "+(a*o).toString(10)+"px "+i.fontFamily,u.fillStyle="#000",u.textBaseline="middle",u.fillText(t,m*o,(x+.5*a)*o);try{v=u.getImageData(0,0,w,M).data}catch(P){return!1}if(T())return!1;r&&(u.strokeRect(m*o,x,h*o,c*o),u.restore());var S,k,O,C=[],A=_,L=[b/2,_/2,b/2,_/2];while(A--){S=b;while(S--){O=y;t:{while(O--){k=y;while(k--)if(v[4*((S*y+O)*w+(A*y+k))+3]){C.push([A,S]),A<L[3]&&(L[3]=A),A>L[1]&&(L[1]=A),S<L[0]&&(L[0]=S),S>L[2]&&(L[2]=S),r&&(u.fillStyle="rgba(255, 0, 0, 0.5)",u.fillRect(A*y,S*y,y-.5,y-.5));break t}}r&&(u.fillStyle="rgba(0, 0, 255, 0.5)",u.fillRect(A*y,S*y,y-.5,y-.5))}}}return r&&(u.fillStyle="rgba(0, 255, 0, 0.5)",u.fillRect(L[3]*y,L[0]*y,(L[1]-L[3]+1)*y,(L[2]-L[0]+1)*y)),{mu:o,occupied:C,bounds:L,gw:_,gh:b,fillTextOffsetX:m,fillTextOffsetY:x,fillTextWidth:h,fillTextHeight:c,fontSize:a}},D=function(t,e,n,r,a){var o=a.length;while(o--){var s=t+a[o][0],l=e+a[o][1];if(s>=c||l>=p||s<0||l<0){if(!i.drawOutOfBound)return!1}else if(!h[s][l])return!1}return!0},F=function(e,r,a,o,s,l,u,h,c,p,f){var d=a.fontSize,g=i.color,m=i.classes;if(f){var x=H(p);g=x?x.color:i.color}else g=v?v(o,s,d,l,u):i.color,m=w?w(o,s,d,l,u):i.classes;var b=a.bounds;b[3],b[0],b[1],b[3],b[2],b[0],t.forEach((function(t){if(t.getContext){var v=t.getContext("2d"),x=a.mu;v.save();var b=i.fontWeight+" "+(d*x).toString(10)+"px "+i.fontFamily;v.scale(1/x,1/x),v.font=b,v.fillStyle=g;var _=(e+a.gw/2)*y*x,w=(r+a.gh/2)*y*x;v.translate(_,w),0!==h&&v.rotate(-h),v.textBaseline="middle",i.selected===p&&(v.shadowColor=i.shadowColor,v.shadowBlur=i.shadowBlur),v.fillText(o,a.fillTextOffsetX*x,(a.fillTextOffsetY+.5*d)*x),f||n.push({gx:e,gy:r,info:a,word:o,weight:s,distance:l,theta:u,rotateDeg:h,attributes:c,id:p,color:g}),v.restore()}else{var M=document.createElement("span"),S="";S="rotate("+-h/Math.PI*180+"deg) ",1!==a.mu&&(S+="translateX(-"+a.fillTextWidth/4+"px) scale("+1/a.mu+")");var k={position:"absolute",display:"block",font:i.fontWeight+" "+d*a.mu+"px "+i.fontFamily,left:(e+a.gw/2)*y+a.fillTextOffsetX+"px",top:(r+a.gh/2)*y+a.fillTextOffsetY+"px",width:a.fillTextWidth+"px",height:a.fillTextHeight+"px",lineHeight:d+"px",whiteSpace:"nowrap",transform:S,webkitTransform:S,msTransform:S,transformOrigin:"50% 40%",webkitTransformOrigin:"50% 40%",msTransformOrigin:"50% 40%"};for(var O in g&&(k.color=g),M.textContent=o,k)M.style[O]=k[O];if(c)for(var C in c)M.setAttribute(C,c[C]);m&&(M.className+=m),t.appendChild(M)}}))},E=function(e,i,n,r,a){if(!(e>=c||i>=p||e<0||i<0)){if(h[e][i]=!1,n){var o=t[0].getContext("2d");o.fillRect(e*y,i*y,m,m)}S&&(k[e][i]={item:a,dimension:r})}},R=function(e,n,r,a,o){var s,l,u=o.occupied,h=i.drawMask;if(h&&(s=t[0].getContext("2d"),s.save(),s.fillStyle=i.maskColor),S){var f=o.bounds;l={x:(e+f[3])*y,y:(n+f[0])*y,w:(f[1]-f[3]+1)*y,h:(f[2]-f[0]+1)*y}}var d=u.length;while(d--){var g=e+u[d][0],v=n+u[d][1];if(!(g>=c||v>=p||g<0||v<0)){var m=H(o.item.id);m&&(o.item.color=m.color),E(g,v,h,l,o.item)}}h&&s.restore()},z=function(t,e,i,n,r,a,o,s){var l=Math.floor(t[0]-e.gw/2),u=Math.floor(t[1]-e.gh/2),h=e.gw,c=e.gh;return!!D(l,u,h,c,e.occupied)&&(F(l,u,e,i,n,r,t[2],a,o,s,!1),R(l,u,h,c,e),{gx:l,gy:u,rot:a,info:e})},N=function(t){var e,n,r,a;Array.isArray(t)?(e=t[0],n=t[1]):(e=t.word,n=t.weight,r=t.attributes,a=t.id);var o=B(),s=I(e,n,o);if(s&&(s["item"]=t),!s)return!1;if(T())return!1;if(!i.drawOutOfBound){var l=s.bounds;if(l[1]-l[3]+1>c||l[2]-l[0]+1>p)return!1}var u=d+1;while(u--){var h=j(d-u);i.shuffle&&(h=[].concat(h),xw(h));for(var f=0;f<h.length;f++){var g=z(h[f],s,e,n,d-u,o,r,a);if(g)return g}}return null},Y=function(e,i,n){if(i)return!t.some((function(t){var r=document.createEvent("CustomEvent");return r.initCustomEvent(e,!0,i,n||{}),!t.dispatchEvent(r)}),this);t.forEach((function(t){var r=document.createEvent("CustomEvent");r.initCustomEvent(e,!0,i,n||{}),t.dispatchEvent(r)}),this)},H=function(t){for(var e=0;e<n.length;e++){var i=n[e];if(n[e].id===t)return i}},G=function(r){if(void 0===r){var a=t[0];if(a.getContext)c=Math.ceil(a.width/y),p=Math.ceil(a.height/y);else{var o=a.getBoundingClientRect();c=Math.ceil(o.width/y),p=Math.ceil(o.height/y)}if(Y("wordcloudstart",!0)){var s,l,v;if(f=i.origin?[i.origin[0]/y,i.origin[1]/y]:[c/2,p/(u?4:2)],d=Math.floor(Math.sqrt(c*c+p*p)),h=[],!a.getContext||i.clearCanvas){t.forEach((function(t){if(t.getContext){var e=t.getContext("2d");e.fillStyle=i.backgroundColor,e.clearRect(0,0,c*(y+1),p*(y+1)),e.fillRect(0,0,c*(y+1),p*(y+1))}else t.textContent="",t.style.backgroundColor=i.backgroundColor,t.style.position="relative"})),s=c;while(s--){h[s]=[],l=p;while(l--)h[s][l]=!0}}else{var m=document.createElement("canvas").getContext("2d");m.fillStyle=i.backgroundColor,m.fillRect(0,0,1,1);var x,b,_=m.getImageData(0,0,1,1).data,w=a.getContext("2d").getImageData(0,0,c*y,p*y).data;s=c;while(s--){h[s]=[],l=p;while(l--){b=y;t:while(b--){x=y;while(x--){v=4;while(v--)if(w[4*((l*y+b)*c*y+(s*y+x))+v]!==_[v]){h[s][l]=!1;break t}}}!1!==h[s][l]&&(h[s][l]=!0)}}w=m=_=void 0}if(i.onWordCloudHover||i.onWordCloudClick){S=!0,s=c+1;while(s--)k[s]=[];i.onWordCloudHover&&a.addEventListener("mousemove",A),i.onWordCloudClick&&(a.addEventListener("click",L),a.addEventListener("touchstart",L),a.addEventListener("touchend",(function(t){t.preventDefault()})),a.style.webkitTapHighlightColor="rgba(0, 0, 0, 0)"),a.addEventListener("wordcloudstart",(function t(){a.removeEventListener("wordcloudstart",t),a.removeEventListener("mousemove",A),a.removeEventListener("click",L),M=void 0}))}if(i.animatable){var O,C;v=0,0!==i.wait?(O=window.setTimeout,C=window.clearTimeout):(O=window.setImmediate,C=window.clearImmediate);var P=function(e,i){t.forEach((function(t){t.addEventListener(e,i)}),this)},j=function(e,i){t.forEach((function(t){t.removeEventListener(e,i)}),this)},B=function t(){j("wordcloudstart",t),C(I)};P("wordcloudstart",B);var I=O((function t(){if(v>=i.data.length)return C(I),Y("wordcloudstop",!1),void j("wordcloudstart",B);g=(new Date).getTime();var e=N(i.data[v]),n=!Y("wordclouddrawn",!0,{item:i.data[v],drawn:e});if(T()||n)return C(I),i.abort(),Y("wordcloudabort",!1),Y("wordcloudstop",!1),void j("wordcloudstart",B);v++,I=O(t,i.wait)}),i.wait)}else{e.maskImage&&t.forEach((function(t){if(t.getContext){var e=t.getContext("2d");e.fillStyle=i.backgroundColor,e.clearRect(0,0,c*(y+1),p*(y+1)),e.fillRect(0,0,c*(y+1),p*(y+1))}}));for(var D=0;D<i.data.length;D++)N(i.data[D])}}}else if(i.selected!==r&&t[0].getContext){i.selected=r;var E=t[0].getContext("2d");E.fillStyle=i.backgroundColor,E.clearRect(0,0,t[0].width,t[0].height),E.fillRect(0,0,t[0].width,t[0].height);for(var R=0;R<n.length;R++){var z=n[R];F(z.gx,z.gy,z.info,z.word,z.weight,z.distance,z.theta,z.rotateDeg,z.attributes,z.id,!0)}}};G()}}function W(t,e){return"hsl("+(360*Math.random()).toFixed()+","+(30*Math.random()+70).toFixed()+"%,"+(Math.random()*(e-t)+t).toFixed()+"%)"}};bw.isSupported=yw,bw.minFontSize=mw;var _w=bw,ww=function(t){function e(e){var i=t.call(this,e)||this;return i._toolTipsAction=function(t,e,n,r){e?(i._toolTips.setContent("",[{color:t.color||"red",name:t.word,value:t.weight}]),i._toolTips.setPosition(n.layerX,n.layerY),i._toolTips.show()):i._toolTips.hide(),i._configHoverAction&&i._configHoverAction(t,e,n,r)},i._configHoverAction=e.onWordCloudHover,i._enableToolTips=E["get"](e,"tooltip.visible",!0),i.options=E["deepMix"]({},{width:400,height:400,enableToolTips:!0},e,{onWordCloudHover:i._enableToolTips?i._toolTipsAction:i._configHoverAction}),i}return Object(B["__extends"])(e,t),e.prototype.init=function(){t.prototype.init.call(this),this._initToolTips()},e.prototype.render=function(){t.prototype.render.call(this),this._render()},e.prototype._initToolTips=function(){this._toolTips=new vw(Object(B["__assign"])(Object(B["__assign"])({},this.options.tooltip),{showTitle:!1,visible:!0,canvas:this.canvas,follow:!0,inPanel:!1}))},e.prototype._render=function(){this._targetCanvas=this.canvas.get("el"),this.options.maskImage?this._handleMaskImage():this._start()},e.prototype._handleMaskImage=function(){var t=this,e=new Image;e.src=this.options.maskImage,e.crossOrigin="Anonymous",e.onload=function(){e.naturalHeight+e.naturalWidth===0||e.width+e.height===0?t._start():t._startWithMaskImage(e)},e.onerror=function(){console.error("image %s load failed !!!",t.options.maskImage),t._start()}},e.prototype._start=function(){this._handleG2PlotConfig(),_w(this._targetCanvas,this.options)},e.prototype._handleG2PlotConfig=function(){var t,e,i,n=this.options.wordStyle.fontSize||[10,60],r=this.options.wordStyle.rotation||[-Math.PI/2,Math.PI/2];this.options.wordStyle.active?(t=!0,e=this.options.wordStyle.active.shadowColor||"#333",i=this.options.wordStyle.active.shadowBlur||10):t=!1,this.options=E["deepMix"]({},this.options,{minFontSize:n[0],maxFontSize:n[1],minRotation:r[0],maxRotation:r[1],active:t,shadowColor:e,shadowBlur:i})},e.prototype._startWithMaskImage=function(t){var e=this._scaleMaskImageCanvas(this._transformWhite2BlackPixels(t)),i=e.maskImageCanvas,n=e.maskImageContext,r=document.createElement("canvas").getContext("2d");r.fillStyle=this.options.backgroundColor||"#fff",r.fillRect(0,0,1,1);for(var a=r.getImageData(0,0,1,1).data,o=n.getImageData(0,0,i.width,i.height),s=n.createImageData(o),l=0;l<o.data.length;l+=4)o.data[l+3]>128?(s.data[l]=a[0],s.data[l+1]=a[1],s.data[l+2]=a[2],s.data[l+3]=a[3]):(s.data[l]=a[0],s.data[l+1]=a[1],s.data[l+2]=a[2],s.data[l+3]=254);n.putImageData(s,0,0);var u=this._targetCanvas.getContext("2d");u.drawImage(i,0,0),this.options=E["deepMix"]({},this.options,{clearCanvas:!1}),this._start()},e.prototype._scaleMaskImageCanvas=function(t){var e=document.createElement("canvas");e.width=this.canvas.get("widthCanvas"),e.height=this.canvas.get("heightCanvas");var i=e.getContext("2d");return i.imageSmoothingEnabled=!0,i.drawImage(t,0,0,t.width,t.height,0,0,e.width,e.height),{maskImageCanvas:e,maskImageContext:i}},e.prototype._transformWhite2BlackPixels=function(t){var e=document.createElement("canvas");e.width=t.width,e.height=t.height;var i=e.getContext("2d");i.drawImage(t,0,0,t.width,t.height);for(var n=i.getImageData(0,0,e.width,e.height),r=4,a=0,o=255,s=0;s<n.data.length;s+=r){var l=n.data[s]+n.data[s+1]+n.data[s+2],u=n.data[s+3];u<128||l>750?(n.data[s]=o,n.data[s+1]=o,n.data[s+2]=o,n.data[s+3]=a):(n.data[s]=a,n.data[s+1]=a,n.data[s+2]=a,n.data[s+3]=o)}return i.putImageData(n,0,0),e},e}(W),Mw=ww;(function(t){function e(e,i){var n=this;return i.renderer="canvas",n=t.call(this,e,i)||this,n}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="wordCloud",t.prototype.createLayers.call(this,i)}})(Jp);function Sw(t,e){var i;return E["each"](t,(function(t){var n=t;e>=n.from&&e<n.to&&(i=n.color)})),i}function kw(t,e){var i=t.getBBox(),n=e.getBBox();if(i.minY>=n.minY&&i.maxY<=n.maxY){var r=e.attr("fill"),a=e.attr("opacity")?e.attr("opacity"):1,o=Nv(r),s=Math.round(.299*o[0]+.587*o[1]+.114*o[2])/a,l=[{from:0,to:85,color:"white"},{from:85,to:170,color:"#F6F6F6"},{from:170,to:255,color:"black"}],u=Sw(l,s);t.attr("fill",u),"black"!==u?(t.attr("stroke",null),t.attr("lineWidth",0)):(t.attr("stroke","white"),t.attr("lineWidth",2))}else if(i.maxY<n.minY){var h=this.get("theme"),c=E["get"](h,"label.textStyle.fill","black");t.attr("fill",c)}}Qp("wordCloud",Mw);var Ow=js("polar"),Cw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.showLabels=function(e,i){var n=this;t.prototype.showLabels.call(this,e,i);var r=this.get("labelsRenderer"),a=r.get("group").get("children"),o=this.get("element").get("view"),s=this.get("labelOptions"),l=s.fields,u=s.offset,h=s.adjustColor,c=s.type,p=o.get("coord"),f=p.center,d=p.startAngle,g=l[0],v=l[2],y=o.get("scales")[g];v||a.forEach((function(t){var e=t.get("origin"),r=n.get("element").getShapeId(e),a=n._getShape(r,i),o=y.scale(e[g]),s=d+2*Math.PI*o,l=a.get("origin"),p=Mh(f,l)+u,v=Vm(f,s,p);t.attr("x",v.x),t.attr("y",v.y),t.attr("textBaseline","middle"),n.adjustTextAlign(t,a),h&&"inner"===c&&kw(t,a)})),o.get("canvas").draw()},e.prototype._getShape=function(t,e){var i;return E["each"](e,(function(e){var n=e,r=n.id;r===t&&(i=n)})),i},e.prototype.adjustTextAlign=function(t,e){var i=t.getBBox(),n={x:i.x+i.width/2,y:i.y+i.height/2},r=e.get("origin"),a=this.get("labelOptions").autoRotate;t.attr("textAlign","center"),a||(n.x>r.x?t.attr("textAlign","left"):n.x<r.x&&t.attr("textAlign","right"))},e}(Ow);Ts("roseLabel",Cw);var Aw={rose:"interval"},Lw={rose:"column"},Pw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rose",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{width:400,height:400,title:{visible:!1},description:{visible:!1},forceFit:!0,padding:"auto",radius:.8,innerRadius:0,label:{visible:!0,type:"inner",autoRotate:!0,adjustColor:!1},legend:{visible:!0,position:"bottom-center"},tooltip:{visible:!0,shared:!1,crosshairs:null},columnStyle:{stroke:"white",lineWidth:1},xAxis:{autoRotateLabel:!0,line:{visible:!1},tickLine:{visible:!1},grid:{visible:!0,style:{lineWidth:.5}},label:{offset:5}},yAxis:{visible:!1}})},e.prototype.getOptions=function(e){var i=t.prototype.getOptions.call(this,e),n=this.constructor.getDefaultOptions(),r=e.sectorStyle,a=e.categoryField,o=e.radiusField;return E["deepMix"]({},i,n,{columnStyle:r,xField:a,yField:o},e)},e.prototype.geometryParser=function(t,e){return"g2"===t?Aw[e]:Lw[e]},e.prototype.scale=function(){var t=this.options,e={};e[t.radiusField]={},e[t.categoryField]={type:"cat"},this.setConfig("scales",e)},e.prototype.axis=function(){t.prototype.axis.call(this);var e=this.options;e.stackField||e.groupField||this.setConfig("axes",!1)},e.prototype.coord=function(){var t=this.options,e={type:"polar",cfg:{radius:t.radius,innerRadius:t.innerRadius||0}};this.setConfig("coord",e)},e.prototype.addGeometry=function(){var t=this.options;this.adjustColorFieldMapping(),this.adjustLegendOptions();var e=Rf("interval","main",{plot:this,positionFields:[t.categoryField,t.radiusField],widthRatio:1});e.label=this.extractLabel(),e.adjust=this.adjustRoseAdjust(),this.rose=e,this.setConfig("element",e)},e.prototype.adjustColorFieldMapping=function(){var t=this.options;(t.stackField||t.groupField)&&(this.options.colorField=null)},e.prototype.adjustRoseAdjust=function(){return this.options.stackField?[{type:"stack"}]:this.options.groupField?[{type:"dodge",marginRatio:0}]:null},e.prototype.animation=function(){t.prototype.animation.call(this);var e=this.options;!1===e.animation&&(this.rose.animate=!1)},e.prototype.annotation=function(){},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,h)},e.prototype.extractLabel=function(){var t=this.options;if(!t.label||!t.label.visible)return!1;var e=E["deepMix"]({},t.label);this.adjustLabelOptions(e);var i=[t.categoryField,t.radiusField];(t.stackField||t.groupField)&&i.push(t.stackField||t.groupField);var n=yc("label",Object(B["__assign"])({plot:this,labelType:"roseLabel",fields:i},e));return n},e.prototype.adjustLabelOptions=function(t){var e=this.options.radiusField;if(t){var i=t.offset,n=t.type,r=t.formatter;"inner"===n?t.offset=i<0?i:-10:"outer"===n&&(t.offset=i>=0?i:10),r||(t.formatter=function(t,i){return""+i._origin[e]})}},e.prototype.adjustLegendOptions=function(){var t=this.options,e=t.legend;e&&(t.stackField||t.groupField||(e.clickable=!1))},e}(Yp),jw=Pw;Qp("rose",Pw);var Tw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="rose",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=jw.getDefaultOptions,e}(Jp),Bw=Tw,Iw=function(){function t(t,e){this.view=t,this.cfg=e,this._init()}return t.prototype.draw=function(){if(this.view&&!this.view.destroyed){this.container=this.view.get("panelGroup").addGroup(),this.container.set("name","rectGroups"),this.container.setZIndex(-100);for(var t=this.view.get("elements")[0].get("shapeContainer").get("children"),e=0;e<this.cfg.ranges.length;e+=1){var i=t[e].getBBox(),n=i.width/t[e].get("origin")._origin[this.cfg.yField];this.drawRect(i,this.cfg.ranges[e]||[0,1],n)}this.view.get("canvas").draw()}},t.prototype.drawRect=function(t,e,i){for(var n,r=this.cfg,a=r.rangeColors,o=t.minX,s=t.minY-t.height*(r.rangeSize-1)/2,l=1;l<e.length;l+=1){var u=(e[l]-e[l-1])*r.rangeMax*i;n=this.container.addShape("rect",{attrs:{width:u,height:t.height*r.rangeSize,x:o,y:s,fill:a[(l-1)%a.length],fillOpacity:.25}}).set("zIndex",-1),o+=u,n.name="bullet-rect"}if(r.axis&&r.axis.visible){var h=r.rangeMax/(r.axis.tickCount-1),c=new F["BBox"](t.x,s,o,t.height*r.rangeSize);this.drawBulletTicks(c,h,i)}},t.prototype.drawBulletTicks=function(t,e,i){for(var n=this.cfg,r=n.axis.style,a=n.axis.tickCount,o=n.axis.position,s=E["get"](r,"lineHeight",0)-r.fontSize/2,l=0;l<a;l+=1){var u=t.minX+e*l*i,h=""+e*l;n.axis.formatter&&(h=n.axis.formatter(h,l));var c=this.container.addShape("text",{attrs:Object(B["__assign"])({x:u,y:"before"===o?t.minY-s:t.maxY+s,text:""+h},r)});if(c.name="tick",n.axis.tickLine&&n.axis.tickLine.visible){var p=n.axis.tickLine;l>0&&l!==a-1&&this.container.addShape("path",{attrs:Object(B["__assign"])({path:[["M",u,t.minY],["L",u,t.maxY]]},p)}).set("zIndex",-1)}}},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destory=function(){this.container&&this.container.remove()},t.prototype._init=function(){var t=this;this.view.on("beforerender",(function(){t.clear()})),this.view.on("afterrender",(function(){t.draw()}))},t}(),Dw=Iw,Fw=function(){function t(t,e){this.view=t,this.cfg=e,this._init()}return t.prototype.draw=function(){if(this.view&&!this.view.destroyed){this.container=this.view.get("frontgroundGroup").addGroup(),this.container.set("name","targetGroups");for(var t=this.view.get("elements")[0].get("shapeContainer").get("children"),e=0;e<this.cfg.targets.length;e+=1){var i=t[e].getBBox(),n=i.width/t[e].get("origin")._origin[this.cfg.yField];this.drawTarget(i,this.cfg.targets[e],n)}this.view.get("canvas").draw()}},t.prototype.drawTarget=function(t,e,i){var n=this,r=this.cfg,a=r.markerColors;e.forEach((function(e,o){var s=r.markerStyle,l=n.container.addShape("rect",{attrs:Object(B["__assign"])(Object(B["__assign"])({width:s.width,height:t.height*r.markerSize-s.width/2,x:t.minX+e*i,y:t.minY-t.height*(r.markerSize-1)/2},s),{fill:a[o%a.length]||s.fill})});l.name="bullet-target"}))},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destory=function(){this.container&&this.container.remove()},t.prototype._init=function(){var t=this;this.view.on("beforerender",(function(){t.clear()})),this.view.on("afterrender",(function(){t.draw()}))},t}(),Ew=Fw,Rw={bullet:"interval"},zw={interval:"bullet"},Nw="$$stackField$$",Yw="$$xField$$",Hw="$$yField$$",Gw=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bullet",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{data:[],stackField:Nw,xField:Yw,yField:Hw,rangeColors:["rgba(91, 143, 249, 0.45)"],measureSize:12,rangeSize:2,markerSize:2,markerColors:[],markerStyle:{width:2,fill:"#5B8FF9",lineWidth:0},axis:{visible:!1,position:"before",tickCount:6,formatter:function(t,e){return""+e},style:{fill:"rgba(0, 0, 0, 0.25)",textBaseline:"middle",textAlign:"center",fontSize:12,lineHeight:16},tickLine:{visible:!0,lineWidth:1,stroke:"#FFF",lineDash:[4,2]}},xAxis:{visible:!0,line:{visible:!1},tickLine:{visible:!1},label:{visible:!0}},yAxis:{visible:!1},tooltip:{visible:!1,trigger:"item",crosshairs:!1},label:{visible:!0,offset:4,style:{fill:"rgba(0, 0, 0, 0.45)",stroke:"#fff",lineWidth:1}}})},e.prototype.scale=function(){var e=this.options,i={};i[e.yField]={},E["has"](e,"yAxis")&&Nf(i[e.yField],e.yAxis),i[e.xField]={type:"cat"},E["has"](e,"xAxis")&&Nf(i[e.xField],e.xAxis),this.setConfig("scales",i),t.prototype.scale.call(this)},e.prototype.getOptions=function(e){var i=t.prototype.getOptions.call(this,e);return this.adjustOptions(i),i},e.prototype.afterInit=function(){t.prototype.afterInit.call(this);var e=this.options,i=e.data.map((function(t){return t.ranges})),n=e.data.map((function(t){return t.targets}));this.bulletRect=new Dw(this.view,{ranges:i,rangeMax:e.rangeMax,yField:e.yField,rangeSize:e.rangeSize,rangeColors:e.rangeColors||[],axis:e.axis}),this.bulletTarget=new Ew(this.view,{targets:n,yField:e.yField,markerSize:e.markerSize,markerColors:e.markerColors||[],markerStyle:e.markerStyle})},e.prototype.geometryParser=function(t,e){return"g2"===t?Rw[e]:zw[e]},e.prototype.coord=function(){var t={actions:[["transpose"]]};this.setConfig("coord",t)},e.prototype.legend=function(){var t=this.options,e=t.markerStyle.fill,i=t.measureColors||this.theme.colors,n=[{value:"实际进度",marker:{symbol:"square",fill:i[0]}},{value:"目标值",marker:{symbol:"line",stroke:e,lineWidth:2}}],r=Object(B["__assign"])(Object(B["__assign"])({custom:!0,items:n},t.legend),{clickable:!1});this.setConfig("legends",r)},e.prototype.addGeometry=function(){var t=this.options,e=Rf("interval","main",{positionFields:[t.xField,t.yField],plot:this});e.adjust=[{type:"stack"}],t.label&&(e.label=this.extractLabel()),this.bullet=e,this.setConfig("element",e)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,m)},e.prototype.extractLabel=function(){var t=this.options,e=E["deepMix"]({},t.label);if(!1===e.visible)return!1;var i=yc("label",Object(B["__assign"])({plot:this,labelType:"barLabel",fields:[t.yField]},e));return i},e.prototype.adjustOptions=function(t){t.barSize=t.measureSize||12,this.adjustYAxisOptions(t)},e.prototype.adjustYAxisOptions=function(t){var e=[];t.data.forEach((function(t){return e.push(t.measures.reduce((function(t,e){return t+e}),0))})),e.push(t.rangeMax),t.yAxis.maxLimit=Math.max.apply([],e)},e.prototype.processData=function(t){var e=this.options,i=[];return t.forEach((function(t,n){for(var r,a=0;a<t.measures.length;a+=1){var o=t.measures[a],s=t.title||""+n;i.push((r={},r[e.xField]=s,r[e.yField]=o,r[e.stackField]=""+a,r))}})),i},e}(Yp),Ww=Gw;Qp("bullet",Gw);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="bullet",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=Ww.getDefaultOptions})(Jp);function Xw(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Vw(t){Zw(t);var e=1,i=1,n=!1,r=1;return t.x0=0,t.y0=0,t.x1=e,t.y1=i/r,Uw(t,qw(i,r)),n&&Uw(t,Xw),t}function qw(t,e){return function(i){i.children&&A_(i,i.x0,t*(i.depth+1)/e,i.x1,t*(i.depth+2)/e);var n=i.x0,r=i.y0,a=i.x1,o=i.y1;a<n&&(n=a=(n+a)/2),o<r&&(r=o=(r+o)/2),i.x0=n,i.y0=r,i.x1=a,i.y1=o}}function Uw(t,e){var i=[t],n=t;while(n=i.pop()){e(n);var r=n.children;if(r)for(var a=r.length-1;a>=0;--a)i.push(r[a])}}function Zw(t){t.x0=0,t.x1=1;var e=t.children;e&&Object(E["each"])(e,(function(e){e.parent=t,e.depth=t.depth+1,Zw(e)}))}var Qw=100,$w=30,Kw=10,Jw=function(t){void 0===t&&(t={});var e=Object(B["__assign"])({x:0,y:0,startNode:{name:"root"},itemWidth:Qw,itemHeight:$w,padding:[0,0,0,0]},t);return e},tM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.getInteractionRange=function(t,e){var i=Jw(e),n=i.padding,r=n[0],a=n[1];return new F["BBox"](t.minX,t.maxY-i.itemHeight-r-a,t.width,i.itemHeight+r+a)},e.prototype.start=function(t){var e=t.data._origin;e.children&&(this.parentNode={shape:t.target,data:{name:Object(E["clone"])(this.currentNode.name),value:Object(E["clone"])(this.currentNode.value)},depth:Object(E["clone"])(this.currentDepth)},this.currentDepth++,this.update(e))},e.prototype.update=function(t){Object(E["hasKey"])(this.cache,t.name)||(this.cache[t.name]=t);var e=this.plot.getSunburstData(t,this.plot.options.maxLevel);this.view.changeData(e),this.currentNode=t,this.render()},e.prototype.render=function(){if(this.breadcrumb){var t=this.getItems();this.breadcrumb.update({items:t}),this.layout()}else this.initGeometry(),this.cache={},this.saveOriginMapping(),this.container=this.container=this.plot.canvas.addGroup(),this.startNode||(this.startNode={name:"root"}),"root"===this.startNode.name?(this.startNodeName=Object(E["hasKey"])(this.plot.options.data,"name")?this.plot.options.data.name:"root",this.currentNode=this.plot.options.data,this.currentDepth=1):(this.startNodeName=this.startNode.name,this.currentNode=this.startNode),this.y=this.view.get("viewRange").maxY+Kw,this.breadcrumb=new D_({container:this.container,x:0,y:this.y,items:this.getItems()}),this.breadcrumb.render(),this.layout();this.onInteraction()},e.prototype.clear=function(){},e.prototype.layout=function(){var t=this.container.getBBox().width,e=(this.plot.width-t)/2;this.breadcrumb.update({x:e,y:this.y})},e.prototype.getItems=function(){var t=[];if(this.currentNode.name&&this.currentNode.name===this.startNodeName){var e=this.getRootItem();t.push(e)}else{t=[];var i=[];this.findParent(this.currentNode,i),i.reverse(),Object(E["each"])(i,(function(e,i){t.push({key:String(i+1),text:e.name,data:e})})),t.push({key:String(i.length+2),text:this.currentNode.name,data:this.currentNode})}return t},e.prototype.findParent=function(t,e){t.parent&&(Object(E["hasKey"])(this.cache,t.parent.name)?e.push(this.cache[t.parent.name]):e.push(t.parent),this.findParent(t.parent,e))},e.prototype.onInteraction=function(){var t=this;this.container.on("click",(function(e){var i=e.target.get("parent");if(i&&"item-group"===i.get("class")){var n=i.get("data");if(n.data)if(n.text===t.startNodeName){t.currentDepth,t.updateRoot(n),t.currentDepth=1}else{if(t.currentNode===n.data)return;Object(E["clone"])(t.currentDepth);t.currentDepth=parseInt(n.key),t.currentDepth,t.update(n.data)}}}))},e.prototype.getRootItem=function(){var t=this.plot.options.data,e=Object(E["hasKey"])(t,"name")?t.name:"root";return{key:"1",text:e,data:this.plot.rootData}},e.prototype.saveOriginMapping=function(){var t=this.plot.options,e=t.colorField,i=t.colors,n={field:e,values:i};this.originMapping=n},e.prototype.initGeometry=function(){this.geometry=this.view.get("elements")[0];var t=this.view.get("viewRange"),e=this.geometry.get("container"),i=new F["Rect"]({attrs:{x:t.minX,y:t.minY,width:t.width,height:t.height}});e.attr("clip",i)},e.prototype.updateRoot=function(t){var e=this.plot.getSunburstData(t.data,this.plot.options.maxLevel);this.view.changeData(e),this.currentNode=this.plot.options.data,this.render()},e}(bc),eM=tM;bc.registerInteraction("drilldown",tM);var iM={drilldown:eM};function nM(t,e){var i=t.getCenter();return Math.atan2(e.y-i.y,e.x-i.x)}var rM=function(){function t(t){this.destroyed=!1,this.view=t.view,this.plot=t.plot;var e=this.getDefaultOptions();this.options=Object(E["deepMix"])(e,t,{}),this.init()}return t.prototype.init=function(){var t=this,e=this.view.get("elements")[0].get("container");this.container=e.addGroup(),this.view.on("beforerender",(function(){t.clear(),t.plot.canvas.draw()}))},t.prototype.render=function(){var t=this,e=this.view.get("elements")[0],i=e.getShapes();Object(E["each"])(i,(function(e){var i=t.options.style,n=t.getPosition(e),r=t.getValue(e),a=t.options.formatter,o=a?a(r):r,s=t.getRotate(n.angle);t.container.addShape("text",{attrs:Object(E["deepMix"])({},i,{x:n.x,y:n.y,text:o,textAlign:"center",textBaseline:"middle",rotate:s})})}));var n=e.get("labelController");n.labelsContainer=this.container,this.plot.canvas.draw()},t.prototype.hide=function(){this.container.set("visible",!1),this.plot.canvas.draw()},t.prototype.show=function(){this.container.set("visible",!0),this.plot.canvas.draw()},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destory=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getBBox=function(){},t.prototype.getDefaultOptions=function(){var t=this.plot.theme,e=Object(E["clone"])(t.label.style);return e.fontSize||(e.fontSize=11),e.lineHeight=e.fontSize,e.stroke=null,{position:"outer",offsetX:0,offsetY:0,style:e,adjustColor:!0,adjustPosition:!0}},t.prototype.getPosition=function(t){var e,i,n=t.get("coord"),r=t.get("origin")._origin;if(r.depth>=1){var a=t.get("origin").points,o=(a[0].x+a[1].x+a[2].x+a[3].x)/4,s=(a[0].y+a[1].y+a[2].y+a[3].y)/4;e=n.convertPoint({x:o,y:s}),i=nM(n,{x:e.x,y:e.y})}else{var l=t.getBBox();o=l.minX+l.width/2,s=l.minY+l.height/2;e={x:o,y:s},i=0}return{x:e.x,y:e.y,angle:i}},t.prototype.getValue=function(t){var e=this.plot.options.colorField,i=t.get("origin")._origin[e];this.plot.options.label&&this.plot.options.label.field&&(i=t.get("origin")._origin[this.plot.options.label.field]);var n=String(i).split(" ");return n.length>1?n.join("\n"):n[0]},t.prototype.getRotate=function(t){var e=180*t/Math.PI;return e&&(e>90?e-=180:e<-90&&(e+=180)),e/180*Math.PI},t}(),aM=rM,oM={onSunburstClick:"polygon:click",onSunburstDblclick:"polygon:dblclick",onSunburstMousemove:"polygon:mousemove",onSunburstMouseenter:"polygon:mouseenter",onSunburstMouseleave:"polygon:mouseleave",onSunburstMousedown:"polygon:mousedown",onSunburstMouseup:"polygon:mouseup",onSunburstContextmenu:"polygon:contextmenu"};E["assign"](R,oM);var sM=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="sunburst",e}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{radius:.8,innerRadius:0,maxLevel:1/0,padding:[0,0,0,0],tooltip:{showTitle:!1,visible:!0,shared:!1,crosshairs:!1},legend:{visible:!1},xAxis:{visible:!1},yAxis:{visible:!1},label:{visible:!0},xField:"x",yField:"y",meta:{x:{nice:!1},y:{nice:!1}}})},e.prototype.beforeInit=function(){var e=this;t.prototype.beforeInit.call(this);var i=this.options.data,n=this.getSunburstData(i);this.rootData=n,this.adjustLinearScale(n);var r=this.options.interactions;r&&E["each"](r,(function(t){"drilldown"===t.type&&(e.isDrilldown=!0)}))},e.prototype.geometryParser=function(t,e){return"polygon"},e.prototype.getSunburstData=function(t,e){t.depth=0;var i=Vw(t),n=[];return this.getAllNodes(i.children,n,e),n.push(Object(B["__assign"])(Object(B["__assign"])({},i),{x:[i.x0,i.x1,i.x1,i.x0,i.x1],y:[i.y1,i.y1,i.y0,i.y0,i.y0]})),n.sort((function(t,e){return t.depth-e.depth})),this.options.xField="x",this.options.yField="y",n},e.prototype.processData=function(){return this.rootData},e.prototype.coord=function(){var t=this.options,e={type:"theta",cfg:{radius:t.radius,innerRadius:t.innerRadius}};this.setConfig("coord",e)},e.prototype.addGeometry=function(){var t=this.options,e=t.data,i=(t.colorField,t.color,this.getSunburstData(e));this.rootData=i,this.rect={type:"polygon",position:{fields:["x","y"]},color:this.getColorConfig(i),tooltip:{fields:["name"]},label:!1,style:{fields:["depth"],callback:function(t){if(t>0)return{stroke:"#ffffff",lineWidth:1}}}},this.setConfig("element",this.rect)},e.prototype.animation=function(){t.prototype.animation.call(this),this.isDrilldown&&(this.rect.animate=!1)},e.prototype.applyInteractions=function(){var t=this,e=this.options.interactions,i=this.view.get("interactions");E["each"](e,(function(e){var n=iM[e.type];if(n){var r=new n(E["deepMix"]({},{view:t.view,plot:t,startEvent:"polygon:click"},e.cfg));i[e.type]=r}}))},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,x)},e.prototype.afterRender=function(){if(this.options.label&&this.options.label.visible){var e=new aM(Object(B["__assign"])({view:this.view,plot:this},this.options.label));e.render()}t.prototype.afterRender.call(this)},e.prototype.getAllNodes=function(t,e,i){var n=this,r=i||this.options.maxLevel;E["each"](t,(function(t){E["hasKey"](t,"x0")&&t.depth<=r&&e.push(Object(B["__assign"])(Object(B["__assign"])({},t),{y:[t.x0,t.x1,t.x1,t.x0],x:[t.y1,t.y1,t.y0,t.y0]})),E["hasKey"](t,"children")&&n.getAllNodes(t.children,e)}))},e.prototype.getColorConfig=function(t){var e=this.options,i=e.colorField,n=e.colors;if(E["isString"](t[0][i])){var r,a=[];if(E["each"](t,(function(t){var e=t[i];E["has"](e,a)||a.push(e)})),n)r=n;else{var o=this.getTheme();r=a.length>=8?o.colors_20:o.colors}var s={};return E["each"](a,(function(t,e){var i=e<=a.length-1?e:e-a.length,n=r[i];s[t]=n})),{fields:[i],callback:function(t){return s[t]}}}return{fields:[i],values:n}},e.prototype.adjustLinearScale=function(t){var e=this.options,i=e.colorField,n=e.meta;if(E["isNumber"](t[0][i])){var r=1/0,a=-1/0;E["each"](t,(function(t){var e=t[i];r=Math.min(e,r),a=Math.max(e,a)}));var o=n[i];n[i]=E["deepMix"]({},o,{min:r,max:a})}},e}(Yp),lM=sM;Qp("sunburst",sM);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="sunburst",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=lM.getDefaultOptions})(Jp);var uM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.getDefaultOptions=function(){return E["deepMix"]({},t.getDefaultOptions.call(this),{title:{visible:!1},description:{visible:!1},padding:[0,0,0,0],legend:{visible:!1},xAxis:{visible:!1},yAxis:{visible:!1},tooltip:{visible:!1}})},e.prototype.coord=function(){},e.prototype.addGeometry=function(){},e.prototype.annotation=function(){var t=this,e=this.options,i=[],n={line:{style:{lineWidth:1,stroke:"#66d6a8"}}};E["each"](e.guideLine,(function(e){var r=yc("guideLine",{plot:t,cfg:E["deepMix"]({},n,e)});i.push(r)})),this.setConfig("annotations",i)},e}(Yp),hM=uM,cM=function(){function t(t){E["assign"](this,t),this.init()}return t.prototype.destroy=function(){this.shape&&this.shape.destroy()},t.prototype.update=function(t,e,i){var n={};if(E["assign"](this,t),this.coord=this.view.get("coord"),t.value){var r=this.coord.convert({x:0,y:this.value}).x,a=[1,0,0,0,1,0,r,0,1];n.matrix=a}if(t.style){var o=this.shape.attrs,s=E["deepMix"]({},o,t.style);n=E["deepMix"]({},s,n)}this.shape.stopAnimate(),this.shape.animate(n,e,i)},t.prototype.init=function(){this.coord=this.view.get("coord"),this.container=this.view.get("container");var t=this.coord.convert({x:0,y:this.value}).x,e=this.coord.center.y-this.progressSize/2-2,i=this.coord.center.y+this.progressSize/2+2,n=E["deepMix"]({},{stroke:"grey",lineWidth:1},this.style);this.shape=this.container.addShape("path",{attrs:Object(B["__assign"])({path:[["M",0,e],["L",0,i]]},n),name:"progress-marker"}),this.shape.move(t,0),this.canvas.draw()},t}(),pM=cM,fM={onProgressClick:"interval:click",onProgressDblclick:"interval:dblclick",onProgressMousemove:"interval:mousemove",onProgressMousedown:"interval:mousedown",onProgressMouseup:"interval:mouseup",onProgressMouseenter:"progress:mouseenter",onProgressMouseleave:"progress:mouseleave",onProgressContextmenu:"interval:contextmenu"};E["assign"](R,fM);var dM={progress:"interval"},gM={interval:"progress"},vM=["#55A6F3","#E8EDF3"],yM=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="progress",e.isEntered=!1,e}return Object(B["__extends"])(e,t),e.prototype.processProps=function(){var t=this.options;t.data=this.processData();var e={padding:[0,0,0,0],xField:"value",yField:"1",stackField:"type",barSize:t.size?t.size:this.getSize(),barStyle:t.progressStyle,color:this.parseColorProps(t)||vM};t=E["mix"](t,e)},e.prototype.init=function(){this.processProps(),t.prototype.init.call(this)},e.prototype.update=function(t){var e=this.options;if(E["hasKey"](t,"percent")&&(e.percent=t.percent,this.changeData(this.processData())),t.style&&(this.styleUpdateAnimation(t.style),this.updateColorConfigByStyle(t.style)),t.color){var i=void 0;E["isArray"](t.color)?(this.options.color=t.color,i=[{fill:t.color[0]},{fill:t.color[1]}]):(this.options.color[0]=t.color,i={fill:t.color}),this.styleUpdateAnimation(i)}t.marker&&(this.updateMarkers(t.marker),this.options.marker=t.marker)},e.prototype.destroy=function(){this.markers&&this.markers.length>0&&(E["each"](this.markers,(function(t){t.destroy()})),this.markers=[]),t.prototype.destroy.call(this)},e.prototype.afterRender=function(){var t=this;this.options.marker&&!this.markers&&(this.markers=[],E["each"](this.options.marker,(function(e){var i=E["mix"]({canvas:t.canvas,view:t.view,progressSize:t.options.barSize},e),n=new pM(i);t.markers.push(n)})));var e=this.view.get("elements")[0].get("container"),i=e.getBBox(),n=e.addShape("rect",{attrs:{width:i.width,height:i.height,x:i.minX,y:i.minY,fill:"rgba(0,0,0,0)"}});this.canvas.draw(),n.on("mouseenter",(function(e){t.isEntered=!0,t.view.emit("progress:mouseenter",e)})),n.on("mouseleave",(function(e){t.isEntered=!1,t.view.emit("progress:mouseleave",e)}));var r=this.canvas.get("canvasDOM");r.addEventListener("mouseleave",(function(e){t.isEntered&&(t.view.emit("progress:mouseleave",e),t.isEntered=!1)}))},e.prototype.geometryParser=function(t,e){return"g2"===t?dM[e]:gM[e]},e.prototype.coord=function(){var t={actions:[["transpose"]]};this.setConfig("coord",t)},e.prototype.addGeometry=function(){var t=this.options,e=Rf("interval","main",{positionFields:[t.yField,t.xField],plot:this});e.adjust=[{type:"stack"}],E["has"](t,"animation")&&(e.animate=t.animation),this.setConfig("element",e)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,b)},e.prototype.parseColorProps=function(t){var e;if(t.color){if(e=E["isFunction"](t.color)?t.color(t.percent):t.color,E["isString"](e)){var i=E["clone"](vM);return i[0]=e,i}return e}return t.color},e.prototype.processData=function(){var t=this.options,e=[{type:"current",value:t.percent},{type:"rest",value:1-t.percent}];return e},e.prototype.updateMarkers=function(t){var e=t.length,i=this.getUpdateAnimationOptions();if(E["each"](this.markers,(function(n,r){r>e-1?n.destroy():n.update(t[r],i.duration,i.easing)})),this.markers.length<e)for(var n=this.markers.length,r=n;r<e;r++){var a=E["deepMix"]({},{canvas:this.canvas,view:this.view,progressSize:this.options.barSize},t[r]),o=new pM(a);this.markers.push(o)}},e.prototype.getSize=function(){var t=this.height;return t>=50?10:4},e.prototype.styleUpdateAnimation=function(t){var e=this.getUpdateAnimationOptions(),i=e.duration,n=e.easing,r=[],a=this.view,o=a.get("elements");E["each"](o,(function(t){if("interval"===t.get("shapeType")){var e=t.getShapes();r.push.apply(r,e)}})),E["isArray"](t)?E["each"](t,(function(t,e){r[e].animate(t,i,n)})):r[0].animate(t,i,n)},e.prototype.getUpdateAnimationOptions=function(){var t=450,e="easeQuadInOut",i=this.options.animation;return i&&i.update&&(i.update.duration&&(t=i.update.duration),i.update.easing&&(e=i.update.easing)),{duration:t,easing:e}},e.prototype.updateColorConfigByStyle=function(t){var e=this;E["isArray"](t)?E["each"](t,(function(t,i){t.fill&&(e.options.color[i]=t.fill)})):t.fill&&(this.options.color[0]=t.fill)},e}(hM),mM=yM;Qp("progress",yM);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="progress",t.prototype.createLayers.call(this,i)},e.prototype.update=function(t,e){var i=this.layers[0];i.update(t,e)},e.getDefaultOptions=mM.getDefaultOptions})(Jp);var xM={};function bM(t,e,i){var n,r=t.attr("path"),a={},o=t.get("index"),s=OM(t,i),l=s.startAngle,u=s.endAngle;if(xM[t.id]){var h=wM(t),c=h.preStart,p=h.preEnd,f=h.prePath,d=MM(c,l),g=SM(c,p,l,u);"antiClockWise"===g&&t.attr("path",f),"start"===d?(n=kM(i,l,p),a.endAngle=u):(n=kM(i,c,u),a.startAngle=l),t.attr("clip",n),t.setSilent("animating",!0),e.callback=function(){t&&!t.get("destroyed")&&(t.attr("clip",null),t.setSilent("cacheShape",null),t.setSilent("animating",!1),n.remove(),"antiClockWise"===g&&t.attr("path",r))};var v=e.delay;E["isFunction"](v)&&(v=e.delay(o));var y=e.easing;E["isFunction"](y)&&(y=e.easing(o)),n.animate(a,e.duration,y,e.callback,v)}_M(t,l,u)}function _M(t,e,i){xM[t.id]||(xM[t.id]={}),xM[t.id].preStart=e,xM[t.id].preEnd=i,xM[t.id].prePath=t.attr("path")}function wM(t){return xM[t.id]||null}function MM(t,e){return t===e?"start":"end"}function SM(t,e,i,n){return t<i||e>n?"antiClockWise":"clockWise"}function kM(t,e,i){var n=200,r=t.getCenter(),a=t.getRadius(),o=new F["Shapes"].Fan({attrs:{x:r.x,y:r.y,rs:0,re:a+n,startAngle:e,endAngle:i}});return o}function OM(t,e){var i,n,r=t.points||t.get("origin").points,a=CM(r),o=e.startAngle,s=e.endAngle,l=s-o;return e.isTransposed?(i=a.maxY*l,n=a.minY*l):(i=a.maxX*l,n=a.minX*l),i+=o,n+=o,{startAngle:n,endAngle:i}}function CM(t){if(E["isEmpty"](t))return null;var e=t[0].x,i=t[0].x,n=t[0].y,r=t[0].y;return E["each"](t,(function(t){e=e>t.x?t.x:e,i=i<t.x?t.x:i,n=n>t.y?t.y:n,r=r<t.y?t.y:r})),{minX:e,maxX:i,minY:n,maxY:r,centerX:(e+i)/2,centerY:(n+r)/2}}ye.registerAnimation("update","groupProgress",bM);var AM={onRingProgressClick:"interval:click",onRingProgressDblclick:"interval:dblclick",onRingProgressMousemove:"interval:mousemove",onRingProgressMousedown:"interval:mousedown",onRingProgressMouseup:"interval:mouseup",onRingProgressMouseenter:"interval:mouseenter",onRingProgressMouseleave:"interval:mouseleave",onRingProgressContextmenu:"interval:contextmenu"};E["assign"](R,AM);var LM=["#55A6F3","#E8EDF3"],PM=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ringProgrsss",e}return Object(B["__extends"])(e,t),e.prototype.processProps=function(){var t=this.options;t.data=this.processData();var e={padding:[0,0,0,0],xField:"value",yField:"1",stackField:"type",barStyle:t.progressStyle,color:this.parseColorProps(t)||LM};t=E["mix"](t,e)},e.prototype.afterRender=function(){t.prototype.afterRender.call(this);var e=this.view.get("coord"),i=this.view.get("elements");E["each"](i,(function(t){var i=t.getShapes();E["each"](i,(function(t){var i=OM(t,e),n=i.startAngle,r=i.endAngle;_M(t,n,r)}))}))},e.prototype.coord=function(){var t={type:"theta",cfg:{radius:1,innerRadius:this.getThickness(this.options.size)}};this.setConfig("coord",t)},e.prototype.annotation=function(){},e.prototype.addGeometry=function(){var t=this.options;this.ring=Rf("interval","main",{positionFields:[t.yField,t.xField],plot:this}),this.ring.adjust=[{type:"stack"}],this.setConfig("element",this.ring)},e.prototype.animation=function(){this.ring.animate={appear:{duration:1e3},update:{easing:"easeLinear",animation:"groupProgress",duration:1e3}}},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,_)},e.prototype.getThickness=function(t){var e=this.width,i=this.height,n=Math.min(e,i);return t?1-t/n:n>=60?1-20/n:1-10/n},e}(mM),jM=PM;Qp("ringProgress",PM);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="ringProgress",t.prototype.createLayers.call(this,i)},e.prototype.update=function(t){var e=this.layers[0];e.update(t)},e.getDefaultOptions=jM.getDefaultOptions})(Jp);var TM={onColumnClick:"interval:click",onColumnDblclick:"interval:dblclick",onColumnMousemove:"interval:mousemove",onColumnMousedown:"interval:mousedown",onColumnMouseup:"interval:mouseup",onColumnMouseenter:"interval:mouseenter",onColumnMouseleave:"interval:mouseleave",onColumnContextmenu:"interval:contextmenu"};E["assign"](R,TM);var BM=.6,IM={column:"interval"},DM={interval:"column"},FM=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tinyColumn",e}return Object(B["__extends"])(e,t),e.prototype.init=function(){this.processProps(),t.prototype.init.call(this)},e.prototype.geometryParser=function(t,e){return"g2"===t?IM[e]:DM[e]},e.prototype.scale=function(){var t=this.options,e={};e[t.xField]={type:"cat"},this.setConfig("scales",e)},e.prototype.addGeometry=function(){var t=this.options,e=Rf("interval","main",{positionFields:[t.xField,t.yField],plot:this});this.setConfig("element",e)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,w)},e.prototype.processProps=function(){var t=this.options,e={padding:[0,0,0,0],columnSize:this.getSize()};t=E["mix"](t,e)},e.prototype.getSize=function(){var t=this.options,e=this.getColumnNum(t.data,t.xField),i=this.width;return i/e*BM},e.prototype.getColumnNum=function(t,e){var i=[];return E["each"](t,(function(t){var n=t[e];i.indexOf(n)<0&&i.push(n)})),i.length},e}(hM),EM=FM;Qp("tinyColumn",FM);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="tinyColumn",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=EM.getDefaultOptions})(Jp);var RM={onAreaClick:"area:click",onAreaDblclick:"area:dblclick",onAreaMousemove:"area:mousemove",onAreaMousedown:"area:mousedown",onAreaMouseup:"area:mouseup",onAreaMouseenter:"area:mouseenter",onAreaMouseleave:"area:mouseleave",onAreaContextmenu:"area:contextmenu",onLineClick:"line:click",onLineDblclick:"line:dblclick",onLineMousemove:"line:mousemove",onLineMousedown:"line:mousedown",onLineMouseup:"line:mouseup",onLineMouseenter:"line:mouseenter",onLineMouseleave:"line:mouseleave",onLineContextmenu:"line:contextmenu"};E["assign"](R,RM);var zM={area:"area",line:"line"},NM=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tinyArea",e}return Object(B["__extends"])(e,t),e.prototype.geometryParser=function(t,e){return zM[e]},e.prototype.addGeometry=function(){this.area=Rf("area","mini",{plot:this}),this.setConfig("element",this.area),this.line=Rf("line","mini",{plot:this}),this.setConfig("element",this.line)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,M)},e}(hM),YM=NM;Qp("tinyArea",NM);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="tinyArea",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=YM.getDefaultOptions})(Jp);var HM={onLineClick:"line:click",onLineDblclick:"line:dblclick",onLineMousemove:"line:mousemove",onLineMousedown:"line:mousedown",onLineMouseup:"line:mouseup",onLineMouseenter:"line:mouseenter",onLineMouseleave:"line:mouseleave",onLineContextmenu:"line:contextmenu"};E["assign"](R,HM);var GM={line:"line"},WM=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tinyLine",e}return Object(B["__extends"])(e,t),e.prototype.geometryParser=function(t,e){return GM[e]},e.prototype.addGeometry=function(){this.line=Rf("line","mini",{plot:this}),this.setConfig("element",this.line)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,S)},e}(hM),XM=WM;Qp("tinyLine",WM);(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(B["__extends"])(e,t),e.prototype.createLayers=function(e){var i=E["deepMix"]({},e);i.type="tinyLine",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=XM.getDefaultOptions})(Jp);var VM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(B["__extends"])(e,t),e.prototype.getDefaultOptions=function(){return{}},e.prototype.getGlobalOptions=function(t){return{xAxis:t.xAxis,yAxis:t.yAxis,theme:t.theme,legend:t.legend}},e.prototype.createComboLayers=function(){this.globalOptions=Object(E["deepMix"])({},this.getDefaultOptions(),this.getGlobalOptions(this.options))},e}(Jp),qM=VM,UM=["line","area","column","bar","bubble","scatter"];function ZM(t,e,i){if(e.color)return{single:!1,color:e.color};var n=QM(t,e),r=Op().colors;return n&&!e.color?{single:!0,color:r[i]}:void 0}function QM(t,e){return!!E["contains"](UM,t)&&(("line"!==t||!E["has"](e,"seriesField"))&&("column"!==t||!E["has"](e,"colorField")))}function $M(t,e){var i=[],n=t.view,r=n.get("elements")[0],a=r.getAttr("color"),o={isInCircle:r.isInCircle(),color:a.values[0]},s=r.get("shapeFactory").getMarkerStyle(r.get("type"),o);if(0===a.scales.length)i.push({value:e.name,checked:!0,marker:s,isSingle:!0,layer:t});else{var l=a.scales[0].values;E["each"](l,(function(e,n){var o=a.values[n],s=e,l={isInCircle:r.isInCircle(),color:o},u=r.get("shapeFactory").getMarkerStyle(r.get("type"),l);i.push({field:a.scales[0].field,value:s,checked:!0,marker:u,isSingle:!1,layer:t})}))}return i}function KM(t){return t}function JM(t,e,i,n,r){var a=Op().legend,s=r.split("-"),l="horizontal";"left"!==s[0]&&"right"!==s[0]||(l="vertical");var u={type:"category-legend",items:t,maxSize:e,container:n.addGroup(),layout:l,textStyle:{fill:"#8C8C8C",fontSize:12,textAlign:"start",textBaseline:"middle",lineHeight:20},titleDistance:10,autoWrap:!0,itemMarginBottom:4,backgroundPadding:0,maxLength:e},h=new o.CanvasCategory(u);eS(e,i,h,r),tS(h);var c,p=h.get("itemsGroup").getBBox(),f=a.innerPadding;return"left"===s[0]?c=new F["BBox"](h.get("x")+f[3],h.get("y"),p.width,p.height):"right"===s[0]?c=new F["BBox"](h.get("x")-f[1],h.get("y"),p.width,p.height):"top"===s[0]?c=new F["BBox"](h.get("x"),h.get("y")+f[0],p.width,p.height):"bottom"===s[0]&&(c=new F["BBox"](h.get("x"),h.get("y")-f[2],p.width,p.height)),{position:s[0],component:h,getBBox:function(){return c}}}function tS(t){var e=[];t.on("itemclick",(function(t){var i=t.item,n=t.checked;if(i.isSingle)n?i.layer.show():i.layer.hide();else{var r=i.layer.view;if(n)E["pull"](e,i.value),r.filter(i.value,(function(t){return!E["contains"](e,t)})),r.repaint(),i.layer.visibility||i.layer.show();else{e.push(i.value),r.filter(i.field,(function(t){return!E["contains"](e,t)})),r.repaint();var a=r.get("filteredData");0===a.length?i.layer.hide():i.layer.visibility||i.layer.show()}}}))}function eS(t,e,i,n){console.log(n);var r=Op().bleeding;E["isArray"](r)&&E["each"](r,(function(t,e){"function"===typeof r[e]&&(r[e]=r[e]({}))}));var a=i.get("itemsGroup").getBBox(),o=0,s=0,l=n.split("-");"left"===l[0]?o=r[3]:"right"===l[0]?o=t-r[1]-a.width:"center"===l[1]?o=(t-a.width)/2:"left"===l[1]?o=r[3]:"right"===l[1]&&(o=t-r[1]-a.width),"bottom"===l[0]?s=e-r[2]-a.height:"top"===l[0]?s=r[0]:"center"===l[1]?s=(e-a.height)/2:"top"===l[1]?s=r[0]:"bottom"===l[1]&&(s=e-r[2]-a.height),i.moveTo(o,s),i.draw()}function iS(t,e){var i=Op().bleeding;E["isArray"](i)&&E["each"](i,(function(t,e){"function"===typeof i[e]&&(i[e]=i[e]({}))}));var n=t.layerBBox.minX,r=t.layerBBox.maxX,a=E["clone"](t.layerBBox.minY),o=t.layerBBox.maxY;E["each"](e,(function(t){var e=t.position,i=t.getBBox(),s=i.minX,l=i.maxX,u=i.minY,h=i.maxY;h>a&&h<o&&"top"===e&&(a=h),u>a&&u<o&&"bottom"===e&&(o=u),l>n&&l<r&&"left"===e&&(n=l),s>n&&l<r&&"right"===e&&(r=s)}));var s=new F["BBox"](n,a,r-n,o-a),l=s.minY-t.layerBBox.minY;0===l&&(l=i[0]);var u=t.layerBBox.maxX-s.maxX,h=t.layerBBox.maxY-s.maxY,c=s.minX-t.layerBBox.minX;return[l,u,h,c]}var nS=4;function rS(t,e,i){var n=t.view,r=n.get("scales"),a=[],o=QM(t.type,e);if(e.xField){var s=r[e.xField],l={dim:"x",scale:s,originalData:e.data};a.push(l)}if(e.yField){var u=r[e.yField];l={dim:"y",scale:u,originalData:e.data,color:o&&i.yAxis.colorMapping?e.color:null,layer:t};a.push(l)}return a}function aS(t,e,i){if("x"===e){var n=t.filter((function(t){if("x"===t.dim)return t}));return oS(n)}var r=t.filter((function(t){if("y"===t.dim)return t}));return sS(r,i.synchroTick)}function oS(t){var e=hS(t);return e?"cat"===t[0].scale.type?uS(t):lS(t,5):[t[0].scale]}function sS(t,e){var i=hS(t),n=t[0].scale.tickCount,r=Pi("linear");return i?lS(t,n):t.map((function(t){var i=t.scale,a=fS(i,n);if(e){var o=new r({min:i.min,max:i.max,ticks:a,tickCount:n,color:t.color});return o.layer=t.layer,o}return i.layer=t.layer,i.color=t.color,i}))}function lS(t,e){for(var i=t[0].scale.min,n=t[0].scale.max,r=0,a=t;r<a.length;r++){var o=a[r];i=Math.min(i,o.scale.min),n=Math.max(n,o.scale.max)}var s=Pi("linear"),l=new s({min:i,max:n,tickCount:e});return l}function uS(t){for(var e=[],i=0,n=t;i<n.length;i++){var r=n[i];e.push.apply(e,r.scale.values)}var a=Pi("cat"),o=new a({values:E["uniq"](e)});return o}function hS(t){for(var e=t[0].originalData,i=t[0].scale.field,n=0,r=t;n<r.length;n++){var a=r[n],o=a.originalData,s=a.scale.field;if(o!==e||s!==i)return!1}return!0}function cS(t,e,i,n,r){var o,s=xS(r),l="x"!==e;o=t.layer?t.layer.container.addGroup():i.addGroup();var u=pS(t,e),h=yc("axis",{dim:e,plot:{options:r,getPlotTheme:function(){return Op()}}}),c=s.axis&&s.axis[e]?mS(s.axis[e]):{};t.color&&(c=vS(t.color,h));var p=E["deepMix"]({},h,{type:"line",group:o,canvas:i,start:n.start,end:n.end,isVertical:l,factor:n.factor,ticks:u,label:function(t){return{text:t,textStyle:h.label.textStyle}}},c),f=new a.Line(p);return f.layer=t.layer,f.render(),f}function pS(t,e){var i=[],n=t.ticks,r=t.range,a=(r[1]-r[0])/(n.length-1);return E["each"](n,(function(t,n){var o="y"===e?1-(r[0]+a*n):r[0]+a*n;i.push({text:t,value:o})})),i}function fS(t,e){for(var i=[],n=t.min,r=t.max,a=(r-n)/e,o=0;o<e;o++){var s=n+a*o;i.push(s)}return i}function dS(t,e,i,n,r,a,o){var s=Op().bleeding;E["each"](i,(function(t,e){0===t&&(i[e]=s[e])}));var l,u,h=[],c=[],p=0;if(t.xAxis.visible&&(l=aS(e,"x"),u=cS(l[0],"x",o,{start:{x:0,y:0},end:{x:r,y:0},factor:1},t),p+=u.get("group").getBBox().height),t.yAxis.visible){var f=aS(e,"y",t.yAxis);E["each"](f,(function(e,n){var r=0===n?-1:1,s=cS(e,"y",o,{start:{x:0,y:i[0]},end:{x:0,y:a-p-i[2]},factor:r},t);0===n&&s.get("group").translate(i[3],0),c.push(s)})),gS(c,h,r,i)}if(t.xAxis.visible){var d=iS(n,h),g=0===c.length?a-p-i[2]:c[0].get("group").getBBox().maxY;u.destroy(),u=cS(l[0],"x",o,{start:{x:d[3],y:g},end:{x:r-d[1],y:g},factor:1},t),h.push({position:"bottom",component:u,getBBox:function(){var t=u.get("group"),e=t.getBBox();return new F["BBox"](e.minX,e.minY+g,e.width,e.height)}})}return h}function gS(t,e,i,n){var r=t[0],a=r.get("group"),o=a.getBBox();a.translate(o.width,0),e.push({position:"left",component:r,getBBox:function(){var t=a.attr("matrix");return new F["BBox"](o.minX+t[6],o.minY,o.width,o.height)}});for(var s=n[1],l=function(n){var r=t[n],a=r.get("group"),o=a.getBBox();a.translate(i-s-o.width,0),s+=o.width+nS;var l={position:"right",component:r,getBBox:function(){var t=a.attr("matrix");return new F["BBox"](o.minX+t[6],o.minX,o.width,o.height)}};e.push(l)},u=t.length-1;u>0;u--)l(u)}function vS(t,e){return{line:e.line?{stroke:t,lineWidth:1}:null,tickLine:e.tickLine?{stroke:t,lineWidth:1,length:5}:null,label:e.label?{textStyle:{fill:t}}:null}}function yS(t,e,i,n){var r=xS(n),a=n.yAxis.grid,o=r.axis.y.grid.style,s=E["deepMix"]({},o,a.style),l=i.addGroup(),u=t.get("labelItems");E["each"](u,(function(t,i){i>0&&l.addShape("path",{attrs:Object(B["__assign"])({path:[["M",e.start.x,t.point.y],["L",e.end.x,t.point.y]]},s)})}))}function mS(t){var e={};return E["each"](t,(function(t,i){E["hasKey"](t,"style")&&(e[i]=t.style)})),e}function xS(t){var e=Op();return t.theme&&(E["isString"](t.theme)?e=Op(t.theme):E["isObject"](t.theme)&&(e=t.theme)),e}var bS=["line","area","path","areaStack"];function _S(t,e,i){var n=MS(e[0],t);return t.on("mousemove",(function(t){var r=[],a={x:t.x/2,y:t.y/2};Object(E["each"])(e,(function(t){var e=t.view;if(e&&t.visibility){var i=e.get("coord"),n=e.get("elements");Object(E["each"])(n,(function(t){var e=t.get("type"),n=t.get("dataArray");if(Object(E["contains"])(["area","line","path","interval"],e)){var o=wS(a,t,e,n,i);r.push.apply(r,o)}else{var s=t.get("shapeContainer"),l=LS(s,a.x);Object(E["each"])(l,(function(e){if(e.get("visible")&&e.get("origin")){var i=t.getTooltipItems(e.get("origin"),null);r.push.apply(r,i)}}))}}))}})),CS(r,t.target,i),r.length>0?(n.setContent("",kS(r)),n.setPosition(a.x,a.y,t.target),n.show()):n.get("visible")&&n.hide()})),n}function wS(t,e,i,n,r){var a=[];return Object(E["each"])(n,(function(n){var o=e.findPoint(t,n);if(o){var s=e.getTooltipItems(o,null);Object(E["each"])(s,(function(t){var n=t.point;if(!Object(E["isNil"])(n)&&!Object(E["isNil"])(n.x)&&!Object(E["isNil"])(n.y)){var o=Object(E["isArray"])(n.x)?n.x[n.x.length-1]:n.x,s=Object(E["isArray"])(n.y)?n.y[n.y.length-1]:n.y;n=r.applyMatrix(o,s,1),t.x=n[0],t.y=n[1],t.showMarker=!0;var l=SS(e,t.color);l.radius=40,t.marker=l,-1!==Object(E["indexOf"])(bS,i)&&a.push(t)}})),a.push.apply(a,s)}})),a}function MS(t,e){var i=Op().tooltip,n={panelGroup:t.view.get("panelGroup"),panelRange:t.view.get("panelRange"),capture:!1,canvas:e,frontgroundGroup:t.view.get("frontgroundGroup"),theme:i,backgroundGroup:t.view.get("backgroundGroup")};return new r.Html(n)}function SS(t,e){var i=t.get("shapeType")||"point",n=t.getDefaultValue("shape")||"circle",r=Lo(i),a={color:e},o=r.getMarkerStyle(n,a);return o}function kS(t){var e=[];return Object(E["each"])(t,(function(t){var i=OS(e,t);-1===i&&e.push(t)})),e}function OS(t,e){var i=-1;return Object(E["each"])(t,(function(t,n){var r=!0;for(var a in e)if(Object(E["has"])(e,a)&&!Object(E["isObject"])(e[a])&&e[a]!==t[a]){r=!1;break}if(r)return i=n,!1})),i}function CS(t,e,i){var n;e.get("origin")&&(n=Object(E["isArray"])(e.get("origin"))?AS(t[0].title,e.get("origin")).data:e.get("origin")._origin,Object(E["each"])(t,(function(t){t.point._origin!==n&&(t.color="#ccc")})));i.sort&&t.sort((function(t,e){return parseFloat(e.value)-parseFloat(t.value)}))}function AS(t,e){for(var i in e){var n=e[i]._origin,r=Object(E["keys"])(n);for(var a in r){var o=r[a];if(n[o]===t)return{data:n,key:o}}}}function LS(t,e){var i=[],n=t.get("children");return Object(E["each"])(n,(function(t){var n=t.getBBox();n.minX<e&&n.maxX>e&&i.push(t)})),i}(function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.options=i,n}Object(B["__extends"])(e,t),e.prototype.getDefaultOptions=function(){return{xAxis:{visible:!0,autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!1,grid:{visible:!1},line:{visible:!0},tickLine:{visible:!0},label:{visible:!0},title:{visible:!1,offset:12}},yAxis:{visible:!0,autoHideLabel:!1,autoRotateLabel:!1,autoRotateTitle:!0,grid:{visible:!0},line:{visible:!0},tickLine:{visible:!0},label:{visible:!0},title:{visible:!1,offset:12},colorMapping:!0,synchroTick:!0},label:{visible:!1},tooltip:{visible:!0,sort:!0},legend:{visible:!0,position:"top-left"}}},e.prototype.createComboLayers=function(){var e=this;t.prototype.createComboLayers.call(this),this.legendInfo=[],this.axisInfo=[],this.paddingComponents=[],this.globalComponents=[],this.singleGeomCount=0,this.backLayer=new W({canvas:this.getCanvas(),width:this.width,height:this.height}),this.options.layers.length>0&&E["each"](this.options.layers,(function(t){var i,n,r=e.getOverlappedConfig(t),a=$p(t.type),o=E["deepMix"]({},t,{canvas:e.canvas,x:0,y:0,width:e.width,height:e.height},r),s=new a(o);s.hide(),s.render(),(i=e.axisInfo).push.apply(i,rS(s,o,e.globalOptions)),(n=e.legendInfo).push.apply(n,$M(s,o)),e.addLayer(s)})),this.topLayer=new W({canvas:this.getCanvas(),width:this.width,height:this.height})},e.prototype.getOverlappedConfig=function(t){var e=ZM(t.type,t,this.singleGeomCount);return e&&e.single&&this.singleGeomCount++,E["deepMix"]({},{xAxis:{visible:!1},yAxis:{visible:!1},legend:{visible:!1},tooltip:{visible:!1},padding:[0,0,0,0],color:e?e.color:null})},e.prototype.overlappingLegend=function(){var t=KM(this.legendInfo);return this.legendContainer=this.topLayer.container.addGroup(),JM(t,this.width,this.height,this.getCanvas(),this.globalOptions.legend.position)},e.prototype.render=function(){var t,e=this;this.doDestroy(),this.createComboLayers();var i=Op().bleeding;if(this.globalOptions.legend.visible){var n=this.overlappingLegend();this.globalComponents.push({type:"legend",component:n.component}),this.paddingComponents.push(n)}var r=iS(this.layers[0],this.paddingComponents),a=dS(this.globalOptions,this.axisInfo,r,this.layers[0],this.width,this.height,this.getCanvas());(t=this.paddingComponents).push.apply(t,a),E["each"](a,(function(t){e.globalComponents.push({type:"axis",component:t.component})}));var o=iS(this.layers[0],this.paddingComponents);if(this.globalOptions.xAxis.visible||(o[2]+=i[2]),E["each"](this.layers,(function(t){t.updateConfig({padding:o}),t.show(),t.render(),t.view.get("backgroundGroup").get("backShape").remove(),t.view.get("panelGroup").get("backShape").remove()})),this.globalOptions.yAxis.grid.visible){var s=a[0].component,l=this.layers[0],u=l.view.get("coord"),h=l.view.get("backgroundGroup");yS(s,u,h,this.globalOptions)}if(this.globalOptions.tooltip.visible){var c=_S(this.canvas,this.layers,this.globalOptions.tooltip);this.globalComponents.push({type:"tooltip",component:c})}},e.prototype.doDestroy=function(){this.clearComponents(),this.eachLayer((function(t){t.destroy()})),this.layers=[]},e.prototype.clearComponents=function(){E["each"](this.globalComponents,(function(t){"legend"!==t.type&&"tooltip"!==t.type||t.component.destroy(),"axis"===t.type&&t.component.clear()})),this.paddingComponents=[],this.globalComponents=[]}})(qM);i.d(e,"b",(function(){return hv})),i.d(e,"a",(function(){return Dy})),i.d(e,"c",(function(){return Rx})),i.d(e,"d",(function(){return Bw}))},"9ab4":function(t,e,i){"use strict";i.r(e),i.d(e,"__extends",(function(){return r})),i.d(e,"__assign",(function(){return a})),i.d(e,"__rest",(function(){return o})),i.d(e,"__decorate",(function(){return s})),i.d(e,"__param",(function(){return l})),i.d(e,"__metadata",(function(){return u})),i.d(e,"__awaiter",(function(){return h})),i.d(e,"__generator",(function(){return c})),i.d(e,"__exportStar",(function(){return p})),i.d(e,"__values",(function(){return f})),i.d(e,"__read",(function(){return d})),i.d(e,"__spread",(function(){return g})),i.d(e,"__spreadArrays",(function(){return v})),i.d(e,"__await",(function(){return y})),i.d(e,"__asyncGenerator",(function(){return m})),i.d(e,"__asyncDelegator",(function(){return x})),i.d(e,"__asyncValues",(function(){return b})),i.d(e,"__makeTemplateObject",(function(){return _})),i.d(e,"__importStar",(function(){return w})),i.d(e,"__importDefault",(function(){return M}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},n(t,e)};function r(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var a=function(){return a=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i],e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},a.apply(this,arguments)};function o(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(t,n[r])&&(i[n[r]]=t[n[r]])}return i}function s(t,e,i,n){var r,a=arguments.length,o=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(o=(a<3?r(o):a>3?r(e,i,o):r(e,i))||o);return a>3&&o&&Object.defineProperty(e,i,o),o}function l(t,e){return function(i,n){e(i,n,t)}}function u(t,e){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(t,e)}function h(t,e,i,n){return new(i||(i=Promise))((function(r,a){function o(t){try{l(n.next(t))}catch(e){a(e)}}function s(t){try{l(n["throw"](t))}catch(e){a(e)}}function l(t){t.done?r(t.value):new i((function(e){e(t.value)})).then(o,s)}l((n=n.apply(t,e||[])).next())}))}function c(t,e){var i,n,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return l([t,e])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(o)try{if(i=1,n&&(r=2&a[0]?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(r=o.trys,!(r=r.length>0&&r[r.length-1])&&(6===a[0]||2===a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=e.call(t,o)}catch(s){a=[6,s],n=0}finally{i=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}function p(t,e){for(var i in t)e.hasOwnProperty(i)||(e[i]=t[i])}function f(t){var e="function"===typeof Symbol&&t[Symbol.iterator],i=0;return e?e.call(t):{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}}function d(t,e){var i="function"===typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,a=i.call(t),o=[];try{while((void 0===e||e-- >0)&&!(n=a.next()).done)o.push(n.value)}catch(s){r={error:s}}finally{try{n&&!n.done&&(i=a["return"])&&i.call(a)}finally{if(r)throw r.error}}return o}function g(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(d(arguments[e]));return t}function v(){for(var t=0,e=0,i=arguments.length;e<i;e++)t+=arguments[e].length;var n=Array(t),r=0;for(e=0;e<i;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,r++)n[r]=a[o];return n}function y(t){return this instanceof y?(this.v=t,this):new y(t)}function m(t,e,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,r=i.apply(t,e||[]),a=[];return n={},o("next"),o("throw"),o("return"),n[Symbol.asyncIterator]=function(){return this},n;function o(t){r[t]&&(n[t]=function(e){return new Promise((function(i,n){a.push([t,e,i,n])>1||s(t,e)}))})}function s(t,e){try{l(r[t](e))}catch(i){c(a[0][3],i)}}function l(t){t.value instanceof y?Promise.resolve(t.value.v).then(u,h):c(a[0][2],t)}function u(t){s("next",t)}function h(t){s("throw",t)}function c(t,e){t(e),a.shift(),a.length&&s(a[0][0],a[0][1])}}function x(t){var e,i;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,r){e[n]=t[n]?function(e){return(i=!i)?{value:y(t[n](e)),done:"return"===n}:r?r(e):e}:r}}function b(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,i=t[Symbol.asyncIterator];return i?i.call(t):(t="function"===typeof f?f(t):t[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(i){e[i]=t[i]&&function(e){return new Promise((function(n,a){e=t[i](e),r(n,a,e.done,e.value)}))}}function r(t,e,i,n){Promise.resolve(n).then((function(e){t({value:e,done:i})}),e)}}function _(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function w(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function M(t){return t&&t.__esModule?t:{default:t}}},"9ab4f":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=typeof t;return null!==t&&"object"===e||"function"===e}},"9c7a":function(t,e,i){"use strict";e.__esModule=!0;var n=i("3e28");e.addEventListener=n["default"];var r=i("381b");e.createDom=r["default"];var a=i("dbd0");e.getHeight=a["default"];var o=i("da70");e.getOuterHeight=o["default"];var s=i("d09b");e.getOuterWidth=s["default"];var l=i("8a09");e.getRatio=l["default"];var u=i("8661");e.getStyle=u["default"];var h=i("2183");e.getWidth=h["default"];var c=i("fd67");e.modifyCSS=c["default"]},"9e26":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("9ab4"),r=i("8937"),a=i("1ca4"),o=i("f8aa"),s=i("6c60"),l=i("907a"),u=function(t){function e(e){var i=this,r=e.backgroundStyle,a=e.fillStyle,o=e.textStyle,s=e.titleStyle,u=n.__rest(e,["backgroundStyle","fillStyle","textStyle","titleStyle"]),h=e.layout,c=void 0===h?"horizontal":h,p={width:"horizontal"===c?156:16,height:"horizontal"===c?16:156};return i=t.call(this,n.__assign(n.__assign({titleDistance:16,layout:"horizontal",operational:!0,handleIcon:"rect",backgroundStyle:n.__assign(n.__assign({},l.SliderMiddleBackgroundStyle),r),fillStyle:n.__assign(n.__assign({},l.SliderMiddleFrontendStyle),a),textStyle:n.__assign(n.__assign({},l.SliderTextStyle),o),titleStyle:n.__assign(n.__assign({},l.DefaultTitleStyle),s),width:156,height:16},p),u))||this,i}return n.__extends(e,t),e.prototype.init=function(){var t=this.get("container");this.set("canvas",t.get("canvas"));var e=t.addGroup();this.set("legendGroup",e);var i=e.addGroup();this.set("itemsGroup",i),e.translate(this.get("offsetX"),this.get("offsetY"))},e.prototype.renderTitle=function(){if(this.isShowTitle()){var t=this.get("title"),e=this.get("legendGroup"),i=this.get("titleStyle"),r=e.addShape("text",{attrs:n.__assign({x:0,y:0,text:t},i)});r.name="legend-title",this.set("titleShape",r)}},e.prototype.renderItems=function(){this.renderSlider()},e.prototype.bindEvents=function(){this.isOperational()},e.prototype.clear=function(){var t=this.get("container");t&&!t.destroyed&&t.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this.get("container");e&&!e.destroyed&&(e.get("parent")&&e.remove(!0),e.destroy())},e.prototype.isHorizontal=function(){return"horizontal"===this.get("layout")},e.prototype.isOperational=function(){return this.get("operational")},e.prototype.isShowTitle=function(){return!!this.get("title")},e.prototype.getSliderConfig=function(){return{layout:this.get("layout"),sliderType:this.get("handleIcon"),sliderSize:this.get("handleSize"),sliderStyle:this.get("handleStyle"),operational:this.isOperational(),width:this.get("width"),height:this.get("height"),min:r.head(this.get("items")).value,max:r.last(this.get("items")).value,range:this.get("range")||[0,1],textStyle:n.__assign({},this.get("textStyle")),formatter:this.formatterValue}},e.prototype.renderSlider=function(){var t=this,e=this.get("itemsGroup"),i=new s.default(this.getSliderConfig());if(i.setBackground(this.createBackgroundGroup()),this.isShowTitle()){var n=this.get("titleDistance"),r=this.get("titleShape").getBBox(),o=r.height;i.translate(0,n+o)}i.on("sliderchange",(function(e){var i=e.value,n=(e.range,new a.Event("itemfilter",e,!0,!0));n.range=i,t.emit("itemfilter",n)})),e.add(i),this.set("slider",i)},e}(o.default);e.default=u},"9e29":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("c83e");e.Size=n.default;var r=i("4d8e");e.Color=r.default},b13e:function(t,e){},bd8b:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={}.toString,r=function(t,e){return n.call(t)==="[object "+e+"]"};e.default=r},c83e:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("9ab4"),r=i("1ca4"),a=i("9e26"),o=2,s=function(t){function e(e){return t.call(this,n.__assign({type:"size-legend"},e))||this}return n.__extends(e,t),e.prototype.getBackgroundShapeAttr=function(){var t=this.get("width"),e=this.get("height"),i=t/2,n=e/2,r=[];return r="rect"===this.get("handleIcon")?this.isHorizontal()?[[0,e],[0,e-4],[t,0],[t,e]]:[[0,0],[t,0],[t,e],[t-4,e]]:this.isHorizontal()?[[0,n+o],[0,n-o],[t,n-o],[t,n+o]]:[[i+o,0],[i-o,0],[i-o,e],[i+o,e]],{points:r}},e.prototype.createBackgroundGroup=function(){var t=this.getBackgroundShapeAttr(),e=this.get("backgroundStyle"),i=this.get("fillStyle"),a=new r.Polygon({attrs:n.__assign(n.__assign({},t),e)}),o=new r.Polygon({attrs:n.__assign(n.__assign(n.__assign({},t),e),i)}),s=new r.Group;return this.isOperational()?(s.add(a),s.add(o)):s.add(o),{group:s,background:a,frontend:o}},e}(a.default);e.default=s},d09b:function(t,e,i){"use strict";e.__esModule=!0;var n=i("8661"),r=i("2183");function a(t,e){var i=r["default"](t,e),a=parseFloat(n["default"](t,"borderLeftWidth"))||0,o=parseFloat(n["default"](t,"paddingLeft"))||0,s=parseFloat(n["default"](t,"paddingRight"))||0,l=parseFloat(n["default"](t,"borderRightWidth"))||0,u=parseFloat(n["default"](t,"marginRight"))||0,h=parseFloat(n["default"](t,"marginLeft"))||0;return i+a+l+o+s+h+u}e["default"]=a},d0df:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("9ab4"),r=i("9c7a"),a=i("1ca4"),o=i("8937"),s=i("2157"),l={backgroundStyle:{position:"absolute",overflow:"auto",top:0,left:0},titleStyle:{marginBottom:"4px"},listStyle:{listStyleType:"none",margin:0,padding:0},itemStyle:{cursor:"pointer",marginBottom:"5px",marginRight:"16px",userSelect:"none"},markerStyle:{width:"9px",height:"9px",borderRadius:"50%",display:"inline-block",marginRight:"8px",verticalAlign:"middle"},pagination:{activeColor:"#000",inactiveColor:"#ccc",arrowSize:8,animation:!0}};function u(t,e){var i=t.className;return o.isNil(i)?t:(i=i.split(" "),i.indexOf(e)>-1?t:t.parentNode?t.parentNode.className===e?t.parentNode:u(t.parentNode,e):null)}function h(t,e){return t.getElementsByClassName(e)[0]}var c=function(t){function e(e){return t.call(this,n.__assign({type:"html-legend",prefixClassName:"g2-legend",pagination:!0,highlight:!1},e))||this}return n.__extends(e,t),e.prototype.init=function(){var t=this.get("fontFamily"),e=this.get("layout"),i=this.get("maxWidth"),a=this.get("maxHeight"),s=this.get("prefixClassName"),u=this.get("containerTpl");u||(u='<div class="'+s+'">\n <div class="'+s+'-title"></div>\n <ul class="'+s+'-list"></ul>\n </div>');var h=r.createDom(u),c=o.deepMix({},l.backgroundStyle,this.get("backgroundStyle"));r.modifyCSS(h,n.__assign({fontFamily:t,maxHeight:a+"px",width:"100%",height:"auto"},c)),"horizontal"===e&&r.modifyCSS(h,{maxWidth:i+"px"});var p=this.get("container");if(p)if(/^\#/.test(p)){var f=p.replace("#","");p=document.getElementById(f),p.appendChild(h)}else p.appendChild(h);else{var d=this.get("canvas"),g=d.get("el").parentNode;g.appendChild(h)}this.set("_legendContainer",h)},e.prototype.renderTitle=function(){var t=this.get("title");if(t){var e=this.get("prefixClassName"),i=this.get("_legendContainer"),n=h(i,e+"-title");n||(n=r.createDom('<div class="'+e+'-title"></div>'),i.appendChild(n)),n.innerHTML=t;var a=o.deepMix({},l.titleStyle,this.get("titleStyle"));r.modifyCSS(n,a),this.set("_titleContainer",n)}},e.prototype.renderItems=function(){var t=this,e=this.get("items");if(e&&e.length){var i=this.get("_legendContainer"),n=this.get("layout"),a=this.get("prefixClassName"),s=this.get("reversed");s&&e.reverse();var u=h(i,a+"-list");u||(u=r.createDom('<ul class="'+a+'-list"></ul>'));var c=o.deepMix({},l.listStyle,this.get("listStyle"));"horizontal"===n&&(c.width="max-content"),r.modifyCSS(u,c);var p=r.createDom("<div></div>");i.appendChild(p),p.appendChild(u),this.set("_clipContainer",p),this.set("_itemGroupContainer",u);var f=this.get("itemTpl");f||(f='<li class="'+a+'-item">\n <span class="'+a+'-item-marker"></span>\n <span class="'+a+'-item-text"></span>\n </li>');var d=this.get("unSelectedColor"),g=o.deepMix({},l.itemStyle,this.get("itemStyle")),v=o.deepMix({},l.markerStyle,this.get("markerStyle"));"horizontal"===n?g.display="inline-block":"vertical"===n&&(g.display="block");var y={};o.each(e,(function(e,i){var n,s=e.checked,l=t.formatterValue(e.value),c=e.marker.fill||e.marker.stroke,p=s?c:d;if(o.isFunction(f)){var m=f(l,p,s,i);n=r.createDom(m)}else{n=r.createDom(f);var x=h(n,a+"-item-text");x.innerHTML=l}g.color=p,v.backgroundColor=p,r.modifyCSS(n,g),n.setAttribute("data-checked",s),n.setAttribute("data-value",e.value),n.setAttribute("data-color",c);var b=h(n,a+"-item-marker");b&&r.modifyCSS(b,v),u.appendChild(n),y[e.value]=e})),this.set("_itemMap",y),"horizontal"===n?this._renderHorizontalPagination():this._renderPagination()}},e.prototype.bindEvents=function(){var t=this,e=this.get("_itemGroupContainer");e&&(this.get("clickable")&&(e.onclick=function(e){return t._onClick(e)}),this.get("hoverable")&&(e.onmousemove=function(e){return t._onMousemove(e)},e.onmouseout=function(e){return t._onMouseout(e)}))},e.prototype.getWidth=function(){var t=this.get("_legendContainer");return r.getOuterWidth(t)},e.prototype.getHeight=function(){var t=this.get("_legendContainer");return r.getOuterHeight(t)},e.prototype.getBBox=function(){return new a.BBox(this.get("x")||0,this.get("y")||0,this.getWidth(),this.getHeight())},e.prototype.moveTo=function(t,e){var i=this.get("_legendContainer");r.modifyCSS(i,{left:t+"px",top:e+"px"}),this.set("x",t),this.set("y",e)},e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this.get("_legendContainer");e&&e.parentNode&&e.parentNode.removeChild(e)},e.prototype.draw=function(){return null},e.prototype._updateStatus=function(t,e,i,n){e&&(e.style.background=i),t.style.color=i,t.setAttribute("data-checked",n)},e.prototype._onClick=function(t){var e=this,i=(this.get("items"),this.get("_itemGroupContainer")),n=this.get("prefixClassName"),r=n+"-item",a=n+"-item-marker",s=t.target,l=s.className.split(" ");if(!(o.indexOf(l,n+"-list")>-1)){var c=u(s,r),p=h(c,a),f=this.get("_itemMap"),d=f[c.getAttribute("data-value")],g=c.getAttribute("data-color"),v=this.get("selectedMode"),y=this.get("unSelectedColor"),m=i.childNodes;if("single"===v)d.checked=!0,o.each(m,(function(t){if(t!==c){var i=h(t,a);e._updateStatus(t,i,y,"false");var n=f[t.getAttribute("data-value")];n.checked=!1}else e._updateStatus(c,p,g,"true")}));else{var x="true"===c.getAttribute("data-checked"),b=0;if(o.each(m,(function(t){"true"===t.getAttribute("data-checked")&&b++})),!this.get("allowAllCanceled")&&x&&1===b)return;d.checked=!d.checked,x?this._updateStatus(c,p,y,"false"):this._updateStatus(c,p,g,"true")}this.emit("itemclick",{item:d,currentTarget:c,checked:"single"===v||d.checked})}},e.prototype._onMousemove=function(t){var e=this.get("_lastActiveItem"),i=(this.get("items"),this.get("_itemMap")),n=this.get("prefixClassName"),r=n+"-list",a=n+"-item",s=t.target,l=s.className.split(" ");if(!(o.indexOf(l,r)>-1)){var h=u(s,a),c=i[h.getAttribute("data-value")];if(c){var p=this.get("highlight");if(c.checked&&e!==c){if(h.className+=" active",p){var f=this.get("_itemGroupContainer"),d=f.childNodes;d.forEach((function(t){t!==h&&"true"===t.getAttribute("data-checked")&&(t.className+=" inactive")}))}this.set("_lastActiveItem",c)}this.emit("itemmouseover",{item:c,currentTarget:h,checked:c.checked})}}},e.prototype._onMouseout=function(t){var e=this.get("_itemGroupContainer"),i=e.childNodes;i.forEach((function(t){var e=t.className.split(" ");o.remove(e,(function(t){return"active"===t||"inactive"===t})),t.className=e.join(" ")})),this.set("_lastActiveItem",null),this.emit("itemmouseleave",t)},e.prototype._renderPagination=function(){var t=this.get("pagination"),e=this.get("_legendContainer"),i=this.get("_itemGroupContainer"),n='\n <div style="position: absolute;bottom: 0;left: 0;user-select: none;margin-top: 5px;">\n <div class="pre-page"\n style="display:inline-block;-webkit-transform: rotate(-135deg);transform: rotate(-135deg);margin-left: 2px;">\n </div>\n <span class="current-page-number">1</span> / <span class="total-page-number">0</span>\n <div class="next-page"\n style="display:inline-block;-webkit-transform: rotate(45deg);transform: rotate(45deg);margin-right: 2px;">\n </div>\n </div>\n ';if(t&&e.scrollHeight>e.offsetHeight){r.modifyCSS(e,{overflow:"hidden",height:this.get("maxHeight")+"px"});var a=r.createDom(n);e.appendChild(a);var s=this.getHeight(),u=this.get("_titleContainer")?r.getOuterHeight(this.get("_titleContainer")):0,c=r.getOuterHeight(a),p=s-u-c,f=i.offsetHeight,d=this.get("_clipContainer");r.modifyCSS(d,{maxHeight:p+"px",overflow:"hidden"});var g=Math.ceil(f/p),v=r.getOuterHeight(i.childNodes[0]),y=Math.floor(p/v),m=y*v,x=h(a,"current-page-number"),b=h(a,"total-page-number"),_=h(a,"pre-page"),w=h(a,"next-page");b.innerHTML=g;var M=o.deepMix({},l.pagination,t),S={cursor:"pointer",border:M.activeColor+" solid",borderWidth:"2px 2px 0 0",width:M.arrowSize+"px",height:M.arrowSize+"px"},k={cursor:"default",border:M.inactiveColor+" solid",borderWidth:"2px 2px 0 0",width:M.arrowSize+"px",height:M.arrowSize+"px"};r.modifyCSS(_,k),r.modifyCSS(w,S),M.animation&&r.modifyCSS(i,{transition:"transform .3s ease-in"});var O=1,C=0;_.onclick=function(){1!==O&&(O-=1,C+=m,x.innerHTML=O,r.modifyCSS(_,S),r.modifyCSS(w,S),r.modifyCSS(i,{transform:"translateY("+C+"px)"}),1===O&&r.modifyCSS(_,k))},w.onclick=function(){O!==g&&(O+=1,C-=m,x.innerHTML=O,r.modifyCSS(w,S),r.modifyCSS(_,S),r.modifyCSS(i,{transform:"translateY("+C+"px)"}),O===g&&r.modifyCSS(w,k))}}},e.prototype._renderHorizontalPagination=function(){var t=this.get("pagination"),e=this.get("_legendContainer"),i=this.get("_itemGroupContainer"),n='\n <div style="position: absolute;bottom: 4px;right: 12px;user-select: none;margin-top: 5px;background: #fff;">\n <div class="pre-page"\n style="display:inline-block;-webkit-transform: rotate(-135deg);transform: rotate(-135deg);margin-left: 2px;">\n </div>\n <span class="current-page-number">1</span> / <span class="total-page-number">0</span>\n <div class="next-page"\n style="display:inline-block;-webkit-transform: rotate(45deg);transform: rotate(45deg);margin-right: 2px;">\n </div>\n </div>\n ';if(t&&e.scrollWidth>e.offsetWidth){r.modifyCSS(e,{overflow:"hidden",width:this.get("maxWidth")+"px"});var a=r.createDom(n);e.appendChild(a);var s=this.getWidth(),u=r.getOuterWidth(a),c=s-u-40,p=i.offsetWidth,f=this.get("_clipContainer");r.modifyCSS(f,{maxWidth:c+"px",overflow:"hidden"});var d=Math.ceil(p/c),g=(r.getOuterWidth(i.childNodes[0]),c),v=h(a,"current-page-number"),y=h(a,"total-page-number"),m=h(a,"pre-page"),x=h(a,"next-page");y.innerHTML=d;var b=o.deepMix({},l.pagination,t),_={cursor:"pointer",border:b.activeColor+" solid",borderWidth:"2px 2px 0 0",width:b.arrowSize+"px",height:b.arrowSize+"px"},w={cursor:"default",border:b.inactiveColor+" solid",borderWidth:"2px 2px 0 0",width:b.arrowSize+"px",height:b.arrowSize+"px"};r.modifyCSS(m,w),r.modifyCSS(x,_),b.animation&&r.modifyCSS(i,{transition:"transform .3s ease-in"});var M=1,S=0;m.onclick=function(){1!==M&&(M-=1,S+=g,v.innerHTML=M,r.modifyCSS(m,_),r.modifyCSS(x,_),r.modifyCSS(i,{transform:"translateX("+S+"px)"}),1===M&&r.modifyCSS(m,w))},x.onclick=function(){M!==d&&(M+=1,S-=g,v.innerHTML=M,r.modifyCSS(x,_),r.modifyCSS(m,_),r.modifyCSS(i,{transform:"translateX("+S+"px)"}),M===d&&r.modifyCSS(x,w))}}},e}(s.default);e.default=c},d9c7:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FONT_FAMILY='"-apple-system", "BlinkMacSystemFont", "Segoe UI", Roboto, "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", SimSun, "sans-serif"'},da70:function(t,e,i){"use strict";e.__esModule=!0;var n=i("8661"),r=i("dbd0");function a(t,e){var i=r["default"](t,e),a=parseFloat(n["default"](t,"borderTopWidth"))||0,o=parseFloat(n["default"](t,"paddingTop"))||0,s=parseFloat(n["default"](t,"paddingBottom"))||0,l=parseFloat(n["default"](t,"borderBottomWidth"))||0,u=parseFloat(n["default"](t,"marginTop"))||0,h=parseFloat(n["default"](t,"marginBottom"))||0;return i+a+l+o+s+u+h}e["default"]=a},dbd0:function(t,e,i){"use strict";e.__esModule=!0;var n=i("8661");function r(t,e){var i=n["default"](t,"height",e);return"auto"===i&&(i=t.offsetHeight),parseFloat(i)}e["default"]=r},df017:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e){return(t%e+e)%e};e.default=n},df70:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("9ab4"),r=i("8937"),a=i("e3b8"),o=function(t){function e(e){var i=t.call(this,n.__assign({type:null,plot:null,panelRange:null,rectStyle:{fill:"#CCD6EC",opacity:.3},lineStyle:{stroke:"rgba(0, 0, 0, 0.25)",lineWidth:1},isTransposed:!1},e))||this;return i._init_(),i.render(),i}return n.__extends(e,t),e.prototype._init_=function(){var t=this.get("plot"),e=t.addGroup();this.set("container",e)},e.prototype._addLineShape=function(t,e){var i=this.get("container"),n=i.addShape("line",{attrs:t,capture:!1});return this.set("crossLineShape"+e,n),n},e.prototype._renderHorizontalLine=function(t,e){var i=r.mix(this.get("lineStyle"),this.get("style")),n=r.mix({x1:e?e.bl.x:t.get("width"),y1:0,x2:e?e.br.x:0,y2:0},i);this._addLineShape(n,"X")},e.prototype._renderVerticalLine=function(t,e){var i=r.mix(this.get("lineStyle"),this.get("style")),n=r.mix({x1:0,y1:e?e.bl.y:t.get("height"),x2:0,y2:e?e.tl.y:0},i);this._addLineShape(n,"Y")},e.prototype._renderBackground=function(t,e){var i=r.mix(this.get("rectStyle"),this.get("style")),n=this.get("container"),a=r.mix({x:e?e.tl.x:0,y:e?e.tl.y:t.get("height"),width:e?e.br.x-e.bl.x:t.get("width"),height:e?Math.abs(e.tl.y-e.bl.y):t.get("height")},i),o=n.addShape("rect",{attrs:a,capture:!1});return this.set("crosshairsRectShape",o),o},e.prototype._updateRectShape=function(t){var e,i=this.get("crosshairsRectShape"),n=this.get("isTransposed"),a=t[0],o=t[t.length-1],s=n?"y":"x",l=n?"height":"width",u=a[s];if(t.length>1&&a[s]>o[s]&&(u=o[s]),this.get("width"))i.attr(s,u-this.get("crosshairs").width/2),i.attr(l,this.get("width"));else if(r.isArray(a.point[s])&&!a.size){var h=a.point[s][1]-a.point[s][0];i.attr(s,a.point[s][0]),i.attr(l,h)}else e=3*a.size/4,i.attr(s,u-e),1===t.length?i.attr(l,3*a.size/2):i.attr(l,Math.abs(o[s]-a[s])+2*e)},e.prototype.render=function(){var t=this.get("canvas"),e=this.get("panelRange"),i=this.get("isTransposed");switch(this.clear(),this.get("type")){case"x":this._renderHorizontalLine(t,e);break;case"y":this._renderVerticalLine(t,e);break;case"cross":this._renderHorizontalLine(t,e),this._renderVerticalLine(t,e);break;case"rect":this._renderBackground(t,e);break;default:i?this._renderHorizontalLine(t,e):this._renderVerticalLine(t,e)}},e.prototype.show=function(){var t=this.get("container");t.show()},e.prototype.hide=function(){var t=this.get("container");t.hide()},e.prototype.clear=function(){var t=this.get("container");this.set("crossLineShapeX",null),this.set("crossLineShapeY",null),this.set("crosshairsRectShape",null),t.clear()},e.prototype.destroy=function(){var e=this.get("container");t.prototype.destroy.call(this),e.remove()},e.prototype.setPosition=function(t,e,i){var n=this.get("crossLineShapeX"),r=this.get("crossLineShapeY"),a=this.get("crosshairsRectShape");r&&!r.get("destroyed")&&r.move(t,0),n&&!n.get("destroyed")&&n.move(0,e),a&&!a.get("destroyed")&&this._updateRectShape(i)},e}(a.default);e.default=o},e0ef:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("01f97"),r=function(t){if("object"!==typeof t||null===t)return t;var e;if(n.default(t)){e=[];for(var i=0,a=t.length;i<a;i++)"object"===typeof t[i]&&null!=t[i]?e[i]=r(t[i]):e[i]=t[i]}else for(var o in e={},t)"object"===typeof t[o]&&null!=t[o]?e[o]=r(t[o]):e[o]=t[o];return e};e.default=r},e3b8:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("9ab4"),r=i("19dd"),a=function(t){function e(e){var i=t.call(this)||this;return i.cfg=n.__assign({id:null,canvas:null,container:null,group:null,capture:!0,offsetX:0,offsetY:0,visible:!0,zIndex:1},e),i.destroyed=!1,i}return n.__extends(e,t),e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){return this.cfg[t]=e,this},e.prototype.destroy=function(){this.off(),this.destroyed=!0},e}(r.default);e.Guide=a,e.default=a},e785:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("9ab4"),r=i("8937"),a=i("e3b8"),o=function(t){function e(e){return t.call(this,n.__assign({x:0,y:0,items:null,titleContent:null,showTitle:!0,panelRange:null,inPanel:!0,crosshairs:null},e))||this}return n.__extends(e,t),e.prototype.isContentChange=function(t,e){var i=this.get("titleContent"),n=this.get("items"),a=!(t===i&&n.length===e.length);return a||r.each(e,(function(t,e){var i=n[e],o=Object.keys(t);if(a=o.some((function(e){return!r.isObject(t[e])&&t[e]!==i[e]})),a)return!1})),a},e.prototype.setContent=function(t,e){return this.set("items",e),this.set("titleContent",t),this.render(),this},e.prototype.setPosition=function(t,e,i){this.set("x",t),this.set("y",e)},e.prototype.setMarkers=function(t,e){var i=this.get("markerGroup"),n=this.get("frontgroundGroup");i?i.clear():(i=n.addGroup({zIndex:1,capture:!1}),this.set("markerGroup",i)),r.each(t,(function(t){i.addShape("marker",{color:t.color,attrs:r.mix({fill:t.color,symbol:"circle",shadowColor:t.color},e,{x:t.x,y:t.y})})})),this.set("markerItems",t)},e.prototype.clearMarkers=function(){var t=this.get("markerGroup");t&&t.clear()},e.prototype.render=function(){},e.prototype.clear=function(){},e.prototype.show=function(){this.set("visible",!0)},e.prototype.hide=function(){this.set("visible",!1)},e}(a.default);e.default=o},e945:function(t,e,i){"use strict";i.r(e);var n=i("8937"),r=/rgba?\(([\s.,0-9]+)\)/,a=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,o=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,s=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,l=function(t){return/^[r,R,L,l]{1}[\s]*\(/.test(t)},u=function(){var t=document.createElement("i");return t.title="Web Colour Picker",t.style.display="none",document.body.appendChild(t),t},h=function(t,e,i,n){return t[n]+(e[n]-t[n])*i};function c(t){return"#"+d(t[0])+d(t[1])+d(t[2])}var p,f=function(t){return[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16)]},d=function(t){var e=Math.round(t).toString(16);return 1===e.length?"0"+e:e},g=function(t,e){var i=isNaN(Number(e))||e<0?0:e>1?1:Number(e),n=t.length-1,r=Math.floor(n*i),a=n*i-r,o=t[r],s=r===n?o:t[r+1];return c([h(o,s,a,0),h(o,s,a,1),h(o,s,a,2)])},v=function(t){if("#"===t[0]&&7===t.length)return t;p||(p=u()),p.style.color=t;var e=document.defaultView.getComputedStyle(p,"").getPropertyValue("color"),i=r.exec(e),n=i[1].split(/\s*,\s*/).map((function(t){return Number(t)}));return e=c(n),e},y=function(t){var e=Object(n["isString"])(t)?t.split("-"):t,i=Object(n["map"])(e,(function(t){return f(-1===t.indexOf("#")?v(t):t)}));return function(t){return g(i,t)}},m=function(t){if(l(t)){var e,i=void 0;if("l"===t[0]){var r=a.exec(t),u=+r[1]+90;i=r[2],e="linear-gradient("+u+"deg, "}else if("r"===t[0]){e="radial-gradient(";r=o.exec(t);i=r[4]}var h=i.match(s);return Object(n["each"])(h,(function(t,i){var n=t.split(":");e+=n[1]+" "+100*n[0]+"%",i!==h.length-1&&(e+=", ")})),e+=")",e}return t};e["default"]={rgb2arr:f,gradient:y,toRGB:Object(n["memoize"])(v),toCSSGradient:m}},ea03:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("33a3");e.CanvasCategory=n.default;var r=i("d0df");e.HtmlCategory=r.default},f2a9:function(t){t.exports={a:"3.6.0-beta.19"}},f8aa:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("9ab4"),r=i("8937"),a=i("e3b8"),o=function(t){function e(e){var i=t.call(this,n.__assign({type:"base",title:null,items:null,formatter:null,offsetX:0,offsetY:0},e))||this;return i.init(),i.render(),i.bindEvents(),i}return n.__extends(e,t),e.prototype.render=function(){this.renderTitle(),this.renderItems()},e.prototype.getWidth=function(){var t=this.get("container"),e=t.getBBox();return e.width},e.prototype.getHeight=function(){var t=this.get("container"),e=t.getBBox();return e.height},e.prototype.getBBox=function(){return this.get("container").getBBox()},e.prototype.moveTo=function(t,e){var i=this.get("container");i.move(t,e),this.set("x",t),this.set("y",e)},e.prototype.draw=function(){this.get("canvas").draw()},e.prototype.formatterValue=function(t){var e=this.get("formatter")||r.identity;return e.call(this,t)},e}(a.default);e.default=o},f8ac:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("1ca4"),r=i("8937"),a={right:90*Math.PI/180,left:270*Math.PI/180,up:0,down:180*Math.PI/180},o=function(){function t(t){this.width=10,this.height=10,this.direction="right",r.assign(this,t),this._init()}return t.prototype._init=function(){var t=this.width/2,e=this.height/2,i=[{x:0,y:-e},{x:-t,y:e},{x:t,y:e}];this.shape=new n.Path({attrs:r.deepMix({path:[["M",i[0].x,i[0].y],["L",i[1].x,i[1].y],["L",i[2].x,i[2].y],["Z"]]},this.attrs)});var o=[];o.push(["r",a[this.direction]]),o.push(["t",this.x,this.y]),this.shape.transform(o)},t}();e.default=o},fd67:function(t,e,i){"use strict";function n(t,e){if(t)for(var i in e)e.hasOwnProperty(i)&&(t.style[i]=e[i]);return t}e.__esModule=!0,e["default"]=n}}]);