!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.G2Plot=e():t.G2Plot=e()}(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=192)}([function(t,e,i){"use strict";i.r(e),i.d(e,"contains",(function(){return r})),i.d(e,"includes",(function(){return r})),i.d(e,"difference",(function(){return a})),i.d(e,"find",(function(){return b})),i.d(e,"findIndex",(function(){return _})),i.d(e,"firstValue",(function(){return O})),i.d(e,"flatten",(function(){return w})),i.d(e,"flattenDeep",(function(){return M})),i.d(e,"getRange",(function(){return C})),i.d(e,"pull",(function(){return T})),i.d(e,"pullAt",(function(){return E})),i.d(e,"reduce",(function(){return L})),i.d(e,"remove",(function(){return I})),i.d(e,"sortBy",(function(){return k})),i.d(e,"union",(function(){return F})),i.d(e,"uniq",(function(){return B})),i.d(e,"valuesOfKey",(function(){return R})),i.d(e,"head",(function(){return N})),i.d(e,"last",(function(){return Y})),i.d(e,"startsWith",(function(){return G})),i.d(e,"endsWith",(function(){return X})),i.d(e,"filter",(function(){return o})),i.d(e,"every",(function(){return V})),i.d(e,"some",(function(){return z})),i.d(e,"group",(function(){return U})),i.d(e,"groupBy",(function(){return W})),i.d(e,"groupToMap",(function(){return q})),i.d(e,"getWrapBehavior",(function(){return K})),i.d(e,"wrapBehavior",(function(){return Z})),i.d(e,"number2color",(function(){return Q})),i.d(e,"parseRadius",(function(){return J})),i.d(e,"clamp",(function(){return tt})),i.d(e,"fixedBase",(function(){return et})),i.d(e,"isDecimal",(function(){return nt})),i.d(e,"isEven",(function(){return rt})),i.d(e,"isInteger",(function(){return ot})),i.d(e,"isNegative",(function(){return at})),i.d(e,"isNumberEqual",(function(){return st})),i.d(e,"isOdd",(function(){return lt})),i.d(e,"isPositive",(function(){return ut})),i.d(e,"maxBy",(function(){return ct})),i.d(e,"minBy",(function(){return ht})),i.d(e,"mod",(function(){return pt})),i.d(e,"toDegree",(function(){return dt})),i.d(e,"toInteger",(function(){return gt})),i.d(e,"toRadian",(function(){return vt})),i.d(e,"forIn",(function(){return mt})),i.d(e,"has",(function(){return xt})),i.d(e,"hasKey",(function(){return bt})),i.d(e,"hasValue",(function(){return Ot})),i.d(e,"keys",(function(){return g})),i.d(e,"isMatch",(function(){return y})),i.d(e,"values",(function(){return _t})),i.d(e,"lowerCase",(function(){return Mt})),i.d(e,"lowerFirst",(function(){return Ct})),i.d(e,"substitute",(function(){return St})),i.d(e,"upperCase",(function(){return jt})),i.d(e,"upperFirst",(function(){return Pt})),i.d(e,"getType",(function(){return At})),i.d(e,"isArguments",(function(){return Et})),i.d(e,"isArray",(function(){return h})),i.d(e,"isArrayLike",(function(){return n})),i.d(e,"isBoolean",(function(){return Lt})),i.d(e,"isDate",(function(){return It})),i.d(e,"isError",(function(){return Dt})),i.d(e,"isFunction",(function(){return u})),i.d(e,"isFinite",(function(){return kt})),i.d(e,"isNil",(function(){return c})),i.d(e,"isNull",(function(){return Bt})),i.d(e,"isNumber",(function(){return it})),i.d(e,"isObject",(function(){return f})),i.d(e,"isObjectLike",(function(){return m})),i.d(e,"isPlainObject",(function(){return x})),i.d(e,"isPrototype",(function(){return Rt})),i.d(e,"isRegExp",(function(){return Nt})),i.d(e,"isString",(function(){return D})),i.d(e,"isType",(function(){return l})),i.d(e,"isUndefined",(function(){return Yt})),i.d(e,"isElement",(function(){return Gt})),i.d(e,"requestAnimationFrame",(function(){return Xt})),i.d(e,"clearAnimationFrame",(function(){return Vt})),i.d(e,"augment",(function(){return Wt})),i.d(e,"clone",(function(){return Ut})),i.d(e,"debounce",(function(){return Kt})),i.d(e,"memoize",(function(){return Zt})),i.d(e,"deepMix",(function(){return Qt})),i.d(e,"each",(function(){return d})),i.d(e,"extend",(function(){return Jt})),i.d(e,"indexOf",(function(){return te})),i.d(e,"isEmpty",(function(){return ie})),i.d(e,"isEqual",(function(){return ne})),i.d(e,"isEqualWith",(function(){return re})),i.d(e,"map",(function(){return oe})),i.d(e,"mapValues",(function(){return se})),i.d(e,"mix",(function(){return Ht})),i.d(e,"assign",(function(){return Ht})),i.d(e,"get",(function(){return le})),i.d(e,"set",(function(){return ue})),i.d(e,"pick",(function(){return he})),i.d(e,"throttle",(function(){return pe})),i.d(e,"toArray",(function(){return fe})),i.d(e,"toString",(function(){return wt})),i.d(e,"uniqueId",(function(){return ge})),i.d(e,"noop",(function(){return ye})),i.d(e,"identity",(function(){return ve})),i.d(e,"size",(function(){return me})),i.d(e,"Cache",(function(){return xe}));var n=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},r=function(t,e){return!!n(t)&&t.indexOf(e)>-1},o=function(t,e){if(!n(t))return t;for(var i=[],r=0;r-1;)j.call(t,o,1);return t},A=Array.prototype.splice,E=function(t,e){if(!n(t))return[];for(var i=t?e.length:0,r=i-1;i--;){var o=void 0,a=e[i];i!==r&&a===o||(o=a,A.call(t,a,1))}return t},L=function(t,e,i){if(!h(t)&&!x(t))return t;var n=i;return d(t,(function(t,i){n=e(n,t,i)})),n},I=function(t,e){var i=[];if(!n(t))return i;for(var r=-1,o=[],a=t.length;++re[r])return 1;if(t[r]i?i:t},et=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))},it=function(t){return l(t,"Number")},nt=function(t){return it(t)&&t%1!=0},rt=function(t){return it(t)&&t%2==0},ot=Number.isInteger?Number.isInteger:function(t){return it(t)&&t%1==0},at=function(t){return it(t)&&t<0};function st(t,e,i){return void 0===i&&(i=1e-5),Math.abs(t-e)0},ct=function(t,e){if(h(t)){var i,n,r=t[0];return i=u(e)?e(t[0]):t[0][e],d(t,(function(t){(n=u(e)?e(t):t[e])>i&&(r=t,i=n)})),r}},ht=function(t,e){if(h(t)){var i,n,r=t[0];return i=u(e)?e(t[0]):t[0][e],d(t,(function(t){(n=u(e)?e(t):t[e])e?(n&&(clearTimeout(n),n=null),s=u,a=t.apply(r,o),n||(r=o=null)):n||!1===i.trailing||(n=setTimeout(l,c)),a};return u.cancel=function(){clearTimeout(n),s=0,n=r=o=null},u},fe=function(t){return n(t)?Array.prototype.slice.call(t):[]},de={},ge=function(t){return de[t=t||"g"]?de[t]+=1:de[t]=1,t+de[t]},ye=function(){},ve=function(t){return t};function me(t){return c(t)?0:n(t)?t.length:Object.keys(t).length}var xe=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}()},function(t,e,i){"use strict";function n(t){return(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})(t)} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */i.r(e),i.d(e,"__extends",(function(){return o})),i.d(e,"__assign",(function(){return a})),i.d(e,"__rest",(function(){return s})),i.d(e,"__decorate",(function(){return l})),i.d(e,"__param",(function(){return u})),i.d(e,"__metadata",(function(){return c})),i.d(e,"__awaiter",(function(){return h})),i.d(e,"__generator",(function(){return p})),i.d(e,"__createBinding",(function(){return f})),i.d(e,"__exportStar",(function(){return d})),i.d(e,"__values",(function(){return g})),i.d(e,"__read",(function(){return y})),i.d(e,"__spread",(function(){return v})),i.d(e,"__spreadArrays",(function(){return m})),i.d(e,"__await",(function(){return x})),i.d(e,"__asyncGenerator",(function(){return b})),i.d(e,"__asyncDelegator",(function(){return _})),i.d(e,"__asyncValues",(function(){return O})),i.d(e,"__makeTemplateObject",(function(){return w})),i.d(e,"__importStar",(function(){return M})),i.d(e,"__importDefault",(function(){return C})),i.d(e,"__classPrivateFieldGet",(function(){return S})),i.d(e,"__classPrivateFieldSet",(function(){return j}));var r=function(t,e){return(r=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 o(t,e){function i(){this.constructor=t}r(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=0;l--)(o=t[l])&&(s=(a<3?o(s):a>3?o(e,i,s):o(e,i))||s);return a>3&&s&&Object.defineProperty(e,i,s),s}function u(t,e){return function(i,n){e(i,n,t)}}function c(t,e){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function h(t,e,i,n){return new(i||(i=Promise))((function(r,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(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(a,s)}l((n=n.apply(t,e||[])).next())}))}function p(t,e){var i,n,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=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 y(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,o=i.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return a}function v(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(i=r[t](e)).value instanceof x?Promise.resolve(i.value.v).then(l,u):c(o[0][2],i)}catch(t){c(o[0][3],t)}var i}function l(t){s("next",t)}function u(t){s("throw",t)}function c(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function _(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:x(t[n](e)),done:"return"===n}:r?r(e):e}:r}}function O(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,i=t[Symbol.asyncIterator];return i?i.call(t):(t=g(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 w(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function M(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 C(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 j(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";function n(t){return(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})(t)} /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */i.r(e),i.d(e,"__extends",(function(){return o})),i.d(e,"__assign",(function(){return a})),i.d(e,"__rest",(function(){return s})),i.d(e,"__decorate",(function(){return l})),i.d(e,"__param",(function(){return u})),i.d(e,"__metadata",(function(){return c})),i.d(e,"__awaiter",(function(){return h})),i.d(e,"__generator",(function(){return p})),i.d(e,"__createBinding",(function(){return f})),i.d(e,"__exportStar",(function(){return d})),i.d(e,"__values",(function(){return g})),i.d(e,"__read",(function(){return y})),i.d(e,"__spread",(function(){return v})),i.d(e,"__spreadArrays",(function(){return m})),i.d(e,"__await",(function(){return x})),i.d(e,"__asyncGenerator",(function(){return b})),i.d(e,"__asyncDelegator",(function(){return _})),i.d(e,"__asyncValues",(function(){return O})),i.d(e,"__makeTemplateObject",(function(){return w})),i.d(e,"__importStar",(function(){return C})),i.d(e,"__importDefault",(function(){return S})),i.d(e,"__classPrivateFieldGet",(function(){return j})),i.d(e,"__classPrivateFieldSet",(function(){return P}));var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)};function o(t,e){function i(){this.constructor=t}r(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=0;l--)(o=t[l])&&(s=(a<3?o(s):a>3?o(e,i,s):o(e,i))||s);return a>3&&s&&Object.defineProperty(e,i,s),s}function u(t,e){return function(i,n){e(i,n,t)}}function c(t,e){if("object"===("undefined"==typeof Reflect?"undefined":n(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function h(t,e,i,n){return new(i||(i=Promise))((function(r,o){function a(t){try{l(n.next(t))}catch(t){o(t)}}function s(t){try{l(n.throw(t))}catch(t){o(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(a,s)}l((n=n.apply(t,e||[])).next())}))}function p(t,e){var i,n,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;a;)try{if(i=1,n&&(r=2&o[0]?n.return:o[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,o[1])).done)return r;switch(n=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]=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 y(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,o=i.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return a}function v(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(i=r[t](e)).value instanceof x?Promise.resolve(i.value.v).then(l,u):c(o[0][2],i)}catch(t){c(o[0][3],t)}var i}function l(t){s("next",t)}function u(t){s("throw",t)}function c(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function _(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:x(t[n](e)),done:"return"===n}:r?r(e):e}:r}}function O(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,i=t[Symbol.asyncIterator];return i?i.call(t):(t=g(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 w(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var M=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function C(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)"default"!==i&&Object.prototype.hasOwnProperty.call(t,i)&&f(e,t,i);return M(e,t),e}function S(t){return t&&t.__esModule?t:{default:t}}function j(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function P(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";i.r(e),i.d(e,"mat3",(function(){return r})),i.d(e,"vec2",(function(){return o})),i.d(e,"vec3",(function(){return a})),i.d(e,"ext",(function(){return n}));var n={};i.r(n),i.d(n,"leftTranslate",(function(){return s})),i.d(n,"leftRotate",(function(){return l})),i.d(n,"leftScale",(function(){return u})),i.d(n,"transform",(function(){return c})),i.d(n,"direction",(function(){return h})),i.d(n,"angleTo",(function(){return p})),i.d(n,"vertical",(function(){return f}));var r=i(50),o=i(83),a=i(72);function s(t,e,i){var n=[0,0,0,0,0,0,0,0,0];return r.fromTranslation(n,i),r.multiply(t,n,e)}function l(t,e,i){var n=[0,0,0,0,0,0,0,0,0];return r.fromRotation(n,i),r.multiply(t,n,e)}function u(t,e,i){var n=[0,0,0,0,0,0,0,0,0];return r.fromScaling(n,i),r.multiply(t,n,e)}function c(t,e){for(var i,n,o,a=t?[].concat(t):[1,0,0,0,1,0,0,0,1],c=0,h=e.length;c=0;return i?r?2*Math.PI-n:n:r?n:2*Math.PI-n}function f(t,e,i){return i?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importDefault(i(22)),o=i(0),a=n.__importDefault(i(259)),s=n.__importDefault(i(262)),l=i(6),u=n.__importDefault(i(53)),c=n.__importDefault(i(15)),h=i(12),p=function(t){function e(e,i){var n=t.call(this)||this;return n.containerDOM="string"==typeof e?document.getElementById(e):e,n.forceFit=o.isNil(i.forceFit)?o.isNil(i.width)&&o.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.localRefresh=i.localRefresh,n.canvasController=new a.default({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 s.default({plot:n,canvas:n.canvasController.canvas}),n.eventController.bindEvents(),n.parseEvents(i),n}return n.__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 c.default&&e.updateConfig(t)}));else{var i=this.layers[0];i instanceof u.default&&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 c.default&&e.changeData(t)}));else{var i=this.layers[0];i instanceof c.default&&i.changeData(t)}},e.prototype.getScaleByField=function(t){return this.layers[0].getScaleByField(t)},e.prototype.getXScale=function(){return this.layers[0].getXScale()},e.prototype.getYScale=function(){return this.layers[0].getYScale()},e.prototype.getColorScale=function(){return this.layers[0].getColorScale()},e.prototype.getPlotTheme=function(){return this.layers[0].getPlotTheme()},e.prototype.getData=function(){return this.layers[0].getData()},e.prototype.bindStateManager=function(t,e){this.eachLayer((function(i){i instanceof c.default&&i.bindStateManager(t,e)}))},e.prototype.setActive=function(t,e){this.eachLayer((function(i){i instanceof c.default&&i.setActive(t,e)}))},e.prototype.setSelected=function(t,e){this.eachLayer((function(i){i instanceof c.default&&i.setSelected(t,e)}))},e.prototype.setDisable=function(t,e){this.eachLayer((function(i){i instanceof c.default&&i.setDisable(t,e)}))},e.prototype.setDefault=function(t,e){this.eachLayer((function(i){i instanceof c.default&&i.setDefault(t,e)}))},e.prototype.getView=function(){return this.layers[0].view},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){o.each(this.layers,t)},e.prototype.addLayer=function(t){o.findIndex(this.layers,(function(e){return e===t}))<0&&this.layers.push(t)},e.prototype.createLayers=function(t){if(t.layers);else if(t.type){var e=new(l.getPlotType(t.type))(o.deepMix({},t,{canvas:this.canvasController.canvas,x:0,y:0,width:this.width,height:this.height}));this.addLayer(e)}},e.prototype.parseEvents=function(t){var e=this,i=o.keys(h.CANVAS_EVENT_MAP);t.events&&o.each(t.events,(function(t,n){if(o.contains(i,n)&&o.isFunction(t)){var r=h.CANVAS_EVENT_MAP[n]||n,a=t;e.on(r,a)}}))},e}(r.default);e.default=p},function(t,e,i){"use strict";i.d(e,"d",(function(){return _})),i.d(e,"b",(function(){return O})),i.d(e,"e",(function(){return w})),i.d(e,"f",(function(){return M})),i.d(e,"l",(function(){return C})),i.d(e,"j",(function(){return S}));var n=i(37),r=i.n(n);i.d(e,"i",(function(){return r.a}));var o=i(31),a=i.n(o);i.d(e,"k",(function(){return a.a}));var s=i(42),l=i.n(s);i.d(e,"h",(function(){return l.a}));var u=i(23),c=i.n(u);i.d(e,"g",(function(){return c.a}));var h=i(32),p=i.n(h);i.d(e,"c",(function(){return p.a}));var f=i(48),d=i.n(f);i.d(e,"o",(function(){return d.a}));var g=i(47),y=i.n(g);i.d(e,"m",(function(){return y.a}));i(62);var v=i(84),m=i.n(v);i.d(e,"n",(function(){return m.a}));var x=i(85),b=i.n(x);function _(){return window?window.devicePixelRatio:1}function O(t,e,i,n){var r=t-i,o=e-n;return Math.sqrt(r*r+o*o)}function w(t,e,i,n,r,o){return r>=t&&r<=t+i&&o>=e&&o<=e+n}function M(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY]*>/,s={tr:document.createElement("tbody"),tbody:r,thead:r,tfoot:r,td:o,th:o,"*":document.createElement("div")});var e=a.test(t)&&RegExp.$1;e&&e in s||(e="*");var i=s[e];t=t.replace(/(^\s*)|(\s*$)/g,""),i.innerHTML=""+t;var n=i.childNodes[0];return i.removeChild(n),n}function u(t,e,i){var n;try{n=window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.style[e]}catch(t){}finally{n=void 0===n?i:n}return n}function c(t,e){var i=u(t,"height",e);return"auto"===i&&(i=t.offsetHeight),parseFloat(i)}function h(t,e){var i=c(t,e),n=parseFloat(u(t,"borderTopWidth"))||0,r=parseFloat(u(t,"paddingTop"))||0,o=parseFloat(u(t,"paddingBottom"))||0;return i+n+(parseFloat(u(t,"borderBottomWidth"))||0)+r+o+(parseFloat(u(t,"marginTop"))||0)+(parseFloat(u(t,"marginBottom"))||0)}function p(t,e){var i=u(t,"width",e);return"auto"===i&&(i=t.offsetWidth),parseFloat(i)}function f(t,e){var i=p(t,e),n=parseFloat(u(t,"borderLeftWidth"))||0,r=parseFloat(u(t,"paddingLeft"))||0,o=parseFloat(u(t,"paddingRight"))||0,a=parseFloat(u(t,"borderRightWidth"))||0,s=parseFloat(u(t,"marginRight"))||0;return i+n+a+r+o+(parseFloat(u(t,"marginLeft"))||0)+s}function d(){return window.devicePixelRatio?window.devicePixelRatio:2}function g(t,e){if(t)for(var i in e)e.hasOwnProperty(i)&&(t.style[i]=e[i]);return t}i.r(e),i.d(e,"addEventListener",(function(){return n})),i.d(e,"createDom",(function(){return l})),i.d(e,"getHeight",(function(){return c})),i.d(e,"getOuterHeight",(function(){return h})),i.d(e,"getOuterWidth",(function(){return f})),i.d(e,"getRatio",(function(){return d})),i.d(e,"getStyle",(function(){return u})),i.d(e,"getWidth",(function(){return p})),i.d(e,"modifyCSS",(function(){return g}))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._ORIGIN=e.ORIGIN=e.TooltipCssConst=e.HtmlTooltipTheme=e.HtmlTooltip=e.InteractionUtils=e.GrammarInteraction=e.GestureController=void 0;var n=i(1),r=n.__importDefault(i(193));e.GestureController=r.default,i(30).registerComponentController("gesture",r.default);var o=i(10);Object.defineProperty(e,"IElement",{enumerable:!0,get:function(){return o.IElement}}),Object.defineProperty(e,"ICanvas",{enumerable:!0,get:function(){return o.ICanvas}}),Object.defineProperty(e,"IGroup",{enumerable:!0,get:function(){return o.IGroup}}),Object.defineProperty(e,"IShape",{enumerable:!0,get:function(){return o.IShape}}),Object.defineProperty(e,"BBox",{enumerable:!0,get:function(){return o.BBox}}),Object.defineProperty(e,"GraphicEvent",{enumerable:!0,get:function(){return o.Event}});var a=i(112);Object.defineProperty(e,"Canvas",{enumerable:!0,get:function(){return a.Canvas}});var s=i(117);Object.defineProperty(e,"SVG",{enumerable:!0,get:function(){return s.Canvas}});var l=i(479);Object.defineProperty(e,"GM",{enumerable:!0,get:function(){return l.GM}}),Object.defineProperty(e,"Wheel",{enumerable:!0,get:function(){return l.Wheel}}),Object.defineProperty(e,"GestureEvent",{enumerable:!0,get:function(){return l.GestureEvent}});var u=i(30);Object.defineProperty(e,"View",{enumerable:!0,get:function(){return u.View}}),Object.defineProperty(e,"registerAnimation",{enumerable:!0,get:function(){return u.registerAnimation}}),Object.defineProperty(e,"registerGeometry",{enumerable:!0,get:function(){return u.registerGeometry}}),Object.defineProperty(e,"Geometry",{enumerable:!0,get:function(){return u.Geometry}}),Object.defineProperty(e,"Interaction",{enumerable:!0,get:function(){return u.Interaction}}),Object.defineProperty(e,"InteractionAction",{enumerable:!0,get:function(){return u.InteractionAction}}),Object.defineProperty(e,"registerInteraction",{enumerable:!0,get:function(){return u.registerInteraction}}),Object.defineProperty(e,"registerAction",{enumerable:!0,get:function(){return u.registerAction}}),Object.defineProperty(e,"registerShape",{enumerable:!0,get:function(){return u.registerShape}}),Object.defineProperty(e,"getTheme",{enumerable:!0,get:function(){return u.getTheme}}),Object.defineProperty(e,"Util",{enumerable:!0,get:function(){return u.Util}}),Object.defineProperty(e,"getShapeFactory",{enumerable:!0,get:function(){return u.getShapeFactory}}),Object.defineProperty(e,"ComponentController",{enumerable:!0,get:function(){return u.ComponentController}}),Object.defineProperty(e,"registerComponentController",{enumerable:!0,get:function(){return u.registerComponentController}});var c=i(43);Object.defineProperty(e,"VIEW_LIFE_CIRCLE",{enumerable:!0,get:function(){return c.VIEW_LIFE_CIRCLE}}),Object.defineProperty(e,"COMPONENT_TYPE",{enumerable:!0,get:function(){return c.COMPONENT_TYPE}}),Object.defineProperty(e,"FIELD_ORIGIN",{enumerable:!0,get:function(){return c.FIELD_ORIGIN}});var h=i(221);Object.defineProperty(e,"TooltipController",{enumerable:!0,get:function(){return h.default}});var p=i(131);Object.defineProperty(e,"MarkerSymbols",{enumerable:!0,get:function(){return p.MarkerSymbols}});var f=i(132);Object.defineProperty(e,"Datum",{enumerable:!0,get:function(){return f.Datum}}),Object.defineProperty(e,"Data",{enumerable:!0,get:function(){return f.Data}}),Object.defineProperty(e,"LooseObject",{enumerable:!0,get:function(){return f.LooseObject}}),Object.defineProperty(e,"Options",{enumerable:!0,get:function(){return f.Options}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return f.Point}}),Object.defineProperty(e,"ShapeInfo",{enumerable:!0,get:function(){return f.ShapeInfo}}),Object.defineProperty(e,"AttributeOption",{enumerable:!0,get:function(){return f.AttributeOption}}),Object.defineProperty(e,"AdjustOption",{enumerable:!0,get:function(){return f.AdjustOption}}),Object.defineProperty(e,"LabelOption",{enumerable:!0,get:function(){return f.LabelOption}}),Object.defineProperty(e,"MappingDatum",{enumerable:!0,get:function(){return f.MappingDatum}});var d=n.__importDefault(i(225));e.GrammarInteraction=d.default;var g=n.__importStar(i(133));e.InteractionUtils=g;var y=i(63);Object.defineProperty(e,"DEFAULT_ANIMATE_CFG",{enumerable:!0,get:function(){return y.DEFAULT_ANIMATE_CFG}}),Object.defineProperty(e,"getDefaultAnimateCfg",{enumerable:!0,get:function(){return y.getDefaultAnimateCfg}}),Object.defineProperty(e,"doAnimate",{enumerable:!0,get:function(){return y.doAnimate}});var v=i(233);Object.defineProperty(e,"Element",{enumerable:!0,get:function(){return v.default}});var m=n.__importDefault(i(235));e.HtmlTooltip=m.default;var x=n.__importDefault(i(136));e.HtmlTooltipTheme=x.default;var b=n.__importStar(i(33));e.TooltipCssConst=b;var _=i(16);Object.defineProperty(e,"GroupComponent",{enumerable:!0,get:function(){return _.GroupComponent}}),Object.defineProperty(e,"Axis",{enumerable:!0,get:function(){return _.Axis}}),Object.defineProperty(e,"Legend",{enumerable:!0,get:function(){return _.Legend}}),Object.defineProperty(e,"Tooltip",{enumerable:!0,get:function(){return _.Tooltip}}),Object.defineProperty(e,"Slider",{enumerable:!0,get:function(){return _.Slider}}),Object.defineProperty(e,"Scrollbar",{enumerable:!0,get:function(){return _.Scrollbar}});var O=i(240);Object.defineProperty(e,"GroupComponentCfg",{enumerable:!0,get:function(){return O.GroupComponentCfg}}),Object.defineProperty(e,"TooltipCfg",{enumerable:!0,get:function(){return O.TooltipCfg}});var w=i(46);Object.defineProperty(e,"Coordinate",{enumerable:!0,get:function(){return w.Coordinate}}),e.ORIGIN="origin",e._ORIGIN="_origin"},function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return r})),i.d(e,"c",(function(){return o}));var n=1e-6,r="undefined"!=typeof Float32Array?Float32Array:Array,o=Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)})},function(t,e,i){"use strict";i.r(e),i.d(e,"version",(function(){return Ve})),i.d(e,"Event",(function(){return R})),i.d(e,"Base",(function(){return ot})),i.d(e,"AbstractCanvas",(function(){return Ye})),i.d(e,"AbstractGroup",(function(){return Ge})),i.d(e,"AbstractShape",(function(){return Xe})),i.d(e,"PathUtil",(function(){return n}));var n={};i.r(n),i.d(n,"catmullRomToBezier",(function(){return u})),i.d(n,"fillPath",(function(){return E})),i.d(n,"fillPathByDiff",(function(){return D})),i.d(n,"formatPath",(function(){return F})),i.d(n,"intersection",(function(){return P})),i.d(n,"parsePathArray",(function(){return v})),i.d(n,"parsePathString",(function(){return l})),i.d(n,"pathToAbsolute",(function(){return h})),i.d(n,"pathToCurve",(function(){return g})),i.d(n,"rectPath",(function(){return w}));var r=i(0),o="\t\n\v\f\r   ᠎              \u2028\u2029",a=new RegExp("([a-z])["+o+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+o+"]*,?["+o+"]*)+)","ig"),s=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+o+"]*,?["+o+"]*","ig"),l=function(t){if(!t)return null;if(Object(r.isArray)(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(a,(function(n,r,o){var a=[],l=r.toLowerCase();if(o.replace(s,(function(t,e){e&&a.push(+e)})),"m"===l&&a.length>2&&(i.push([r].concat(a.splice(0,2))),l="l",r="m"===r?"l":"L"),"o"===l&&1===a.length&&i.push([r,a[0]]),"r"===l)i.push([r].concat(a));else for(;a.length>=e[l]&&(i.push([r].concat(a.splice(0,e[l]))),e[l]););return t})),i},u=function(t,e){for(var i=[],n=0,r=t.length;r-2*!e>n;n+=2){var o=[{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?o[3]={x:+t[0],y:+t[1]}:r-2===n&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4===n?o[3]=o[2]:n||(o[0]={x:+t[n],y:+t[n+1]}),i.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return i},c=function(t,e,i,n,r){var o=[];if(null===r&&null===n&&(n=i),t=+t,e=+e,i=+i,n=+n,null!==r){var a=Math.PI/180,s=t+i*Math.cos(-n*a),l=t+i*Math.cos(-r*a);o=[["M",s,e+i*Math.sin(-n*a)],["A",i,i,0,+(r-n>180),0,l,e+i*Math.sin(-r*a)]]}else o=[["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 o},h=function(t){if(!(t=l(t))||!t.length)return[["M",0,0]];var e,i,n=[],r=0,o=0,a=0,s=0,h=0;"M"===t[0][0]&&(a=r=+t[0][1],s=o=+t[0][2],h++,n[0]=["M",r,o]);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=h,y=t.length;g1&&(n*=O=Math.sqrt(O),r*=O);var w=n*n,M=r*r,C=(a===s?-1:1)*Math.sqrt(Math.abs((w*M-w*_*_-M*b*b)/(w*_*_+M*b*b)));d=C*n*_/r+(e+l)/2,g=C*-r*b/n+(i+u)/2,p=Math.asin(((i-g)/r).toFixed(9)),f=Math.asin(((u-g)/r).toFixed(9)),p=ef&&(p-=2*Math.PI),!s&&f>p&&(f-=2*Math.PI)}var S=f-p;if(Math.abs(S)>y){var j=f,P=l,T=u;f=p+y*(s&&f>p?1:-1),m=t(l=d+n*Math.cos(f),u=g+r*Math.sin(f),n,r,o,0,s,P,T,[f,j,d,g])}S=f-p;var A=Math.cos(p),E=Math.sin(p),L=Math.cos(f),I=Math.sin(f),D=Math.tan(S/4),k=4/3*n*D,B=4/3*r*D,F=[e,i],R=[e+k*E,i-B*A],N=[l+k*I,u-B*L],Y=[l,u];if(R[0]=2*F[0]-R[0],R[1]=2*F[1]-R[1],c)return[R,N,Y].concat(m);for(var G=[],X=0,V=(m=[R,N,Y].concat(m).join().split(",")).length;X7){t[e].shift();for(var o=t[e];o.length;)s[e]="A",r&&(l[e]="A"),t.splice(e++,0,["C"].concat(o.splice(0,6)));t.splice(e,1),i=Math.max(n.length,r&&r.length||0)}},v=function(t,e,o,a,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",a.x,a.y]),o.bx=0,o.by=0,o.x=t[s][1],o.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;m1?1:l<0?0:l)/2,c=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,f=0;f<12;f++){var d=u*c[f]+u,g=m(d,t,i,r,a),y=m(d,e,n,o,s),v=g*g+y*y;p+=h[f]*Math.sqrt(v)}return u*p},b=function(t,e,i,n,r,o,a,s){for(var l,u,c,h,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*a,c=3*i-3*t):(u=6*e-12*n+6*o,l=-3*e+9*n-9*o+3*s,c=3*n-3*e),Math.abs(l)<1e-12){if(Math.abs(u)<1e-12)continue;(h=-c/u)>0&&h<1&&p.push(h)}else{var g=u*u-4*c*l,y=Math.sqrt(g);if(!(g<0)){var v=(-u+y)/(2*l);v>0&&v<1&&p.push(v);var m=(-u-y)/(2*l);m>0&&m<1&&p.push(m)}}for(var x,b=p.length,_=b;b--;)x=1-(h=p[b]),f[0][b]=x*x*x*t+3*x*x*h*i+3*x*h*h*r+h*h*h*a,f[1][b]=x*x*x*e+3*x*x*h*n+3*x*h*h*o+h*h*h*s;return f[0][_]=t,f[1][_]=e,f[0][_+1]=a,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])}}},_=function(t,e,i,n,r,o,a,s){if(!(Math.max(t,i)Math.max(r,a)||Math.max(e,n)Math.max(o,s))){var l=(t-i)*(o-s)-(e-n)*(r-a);if(l){var u=((t*n-e*i)*(r-a)-(t-i)*(r*s-o*a))/l,c=((t*n-e*i)*(o-s)-(e-n)*(r*s-o*a))/l,h=+u.toFixed(2),p=+c.toFixed(2);if(!(h<+Math.min(t,i).toFixed(2)||h>+Math.max(t,i).toFixed(2)||h<+Math.min(r,a).toFixed(2)||h>+Math.max(r,a).toFixed(2)||p<+Math.min(e,n).toFixed(2)||p>+Math.max(e,n).toFixed(2)||p<+Math.min(o,s).toFixed(2)||p>+Math.max(o,s).toFixed(2)))return{x:u,y:c}}}},O=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 o=[["M",t,e],["l",i,0],["l",0,n],["l",-i,0],["z"]];return o.parsePathArray=v,o},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(" ")}},C=function(t,e,i,n,o,a,s,l){Object(r.isArray)(t)||(t=[t,e,i,n,o,a,s,l]);var u=b.apply(null,t);return M(u.min.x,u.min.y,u.max.x-u.min.x,u.max.y-u.min.y)},S=function(t,e,i,n,r,o,a,s,l){var u=1-l,c=Math.pow(u,3),h=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*(o-2*n+e),y=i+2*l*(r-i)+p*(a-2*r+i),v=n+2*l*(o-n)+p*(s-2*o+n);return{x:c*t+3*h*l*i+3*u*l*l*r+f*a,y:c*e+3*h*l*n+3*u*l*l*o+f*s,m:{x:d,y:g},n:{x:y,y:v},start:{x:u*t+l*i,y:u*e+l*n},end:{x:u*r+l*a,y:u*o+l*s},alpha:90-180*Math.atan2(d-y,g-v)/Math.PI}},j=function(t,e,i){if(!function(t,e){return t=M(t),e=M(e),O(e,t.x,t.y)||O(e,t.x2,t.y)||O(e,t.x,t.y2)||O(e,t.x2,t.y2)||O(t,e.x,e.y)||O(t,e.x2,e.y)||O(t,e.x,e.y2)||O(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(C(t),C(e)))return i?0:[];for(var n=~~(x.apply(0,t)/8),r=~~(x.apply(0,e)/8),o=[],a=[],s={},l=i?0:[],u=0;u=0&&b<=1&&w>=0&&w<=1&&(i?l+=1:l.push({x:m.x,y:m.y,t1:b,t2:w}))}}return l},P=function(t,e){return function(t,e,i){var n,r,o,a,s,l,u,c,h,p;t=g(t),e=g(e);for(var f=i?0:[],d=0,y=t.length;d=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e=e.concat(t[t.length-1])}))}(t,e,i));else{var r=[].concat(t);"M"===r[0]&&(r[0]="L");for(var o=0;o<=i-1;o++)n.push(r)}return n},E=function(t,e){if(1===t.length)return t;var i=t.length-1,n=e.length-1,r=i/n,o=[];if(1===t.length&&"M"===t[0][0]){for(var a=0;a=0;l--)a=o[l].index,"add"===o[l].type?t.splice(a,0,[].concat(t[a])):t.splice(a,1)}var h=r-(n=t.length);if(n0)){t[n]=e[n];break}i=k(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=k(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=k(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},R=function(){function t(t,e){this.bubbles=!0,this.target=null,this.currentTarget=null,this.delegateTarget=null,this.delegateObject=null,this.defaultPrevented=!1,this.propagationStopped=!1,this.shape=null,this.fromShape=null,this.toShape=null,this.propagationPath=[],this.type=t,this.name=t,this.originalEvent=e,this.timeStamp=e.timeStamp}return t.prototype.preventDefault=function(){this.defaultPrevented=!0,this.originalEvent.preventDefault&&this.originalEvent.preventDefault()},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.toString=function(){return"[Event (type="+this.type+")]"},t.prototype.save=function(){},t.prototype.restore=function(){},t}(),N=i(1),Y=i(22),G=i(37),X=i.n(G),V=i(42),z=i.n(V),H=i(31),W=i.n(H),q=i(60),U=i.n(q),K=(i(23),i(81)),Z=i.n(K),$=i(32),Q=i.n($),J=i(82),tt=i.n(J);function et(t,e){var i=t.indexOf(e);-1!==i&&t.splice(i,1)}var it="undefined"!=typeof window&&void 0!==window.document;function nt(t,e){if(t.isCanvas())return!0;for(var i=e.getParent(),n=!1;i;){if(i===t){n=!0;break}i=i.getParent()}return n}function rt(t){return t.cfg.visible&&t.cfg.capture}var ot=function(t){function e(e){var i=t.call(this)||this;i.destroyed=!1;var n=i.getDefaultCfg();return i.cfg=Z()(n,e),i}return Object(N.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{}},e.prototype.get=function(t){return this.cfg[t]},e.prototype.set=function(t,e){this.cfg[t]=e},e.prototype.destroy=function(){this.cfg={destroyed:!0},this.off(),this.destroyed=!0},e}(Y.default),at=i(181),st=i(3);function lt(t,e){var i=[],n=t[0],r=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],h=t[8],p=e[0],f=e[1],d=e[2],g=e[3],y=e[4],v=e[5],m=e[6],x=e[7],b=e[8];return i[0]=p*n+f*a+d*u,i[1]=p*r+f*s+d*c,i[2]=p*o+f*l+d*h,i[3]=g*n+y*a+v*u,i[4]=g*r+y*s+v*c,i[5]=g*o+y*l+v*h,i[6]=m*n+x*a+b*u,i[7]=m*r+x*s+b*c,i[8]=m*o+x*l+b*h,i}function ut(t,e){var i=[],n=e[0],r=e[1];return i[0]=t[0]*n+t[3]*r+t[6],i[1]=t[1]*n+t[4]*r+t[7],i}var ct=["zIndex","capture","visible","type"],ht=["repeat"];function pt(t,e){var i={},n=e.attrs;for(var r in t)i[r]=n[r];return i}function ft(t,e){var i={},n=e.attr();return Object(r.each)(t,(function(t,e){-1!==ht.indexOf(e)||Object(r.isEqual)(n[e],t)||(i[e]=t)})),i}function dt(t,e){if(e.onFrame)return t;var i=e.startTime,n=e.delay,o=e.duration,a=Object.prototype.hasOwnProperty;return Object(r.each)(t,(function(t){i+nt.delay&&Object(r.each)(e.toAttrs,(function(e,i){a.call(t.toAttrs,i)&&(delete t.toAttrs[i],delete t.fromAttrs[i])}))})),t}var gt=function(t){function e(e){var i=t.call(this,e)||this;i.attrs={};var n=i.getDefaultAttrs();return Object(r.mix)(n,e.attrs),i.attrs=n,i.initAttrs(n),i.initAnimate(),i}return Object(N.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{visible:!0,capture:!0,zIndex:0}},e.prototype.getDefaultAttrs=function(){return{matrix:this.getDefaultMatrix(),opacity:1}},e.prototype.onCanvasChange=function(t){},e.prototype.initAttrs=function(t){},e.prototype.initAnimate=function(){this.set("animable",!0),this.set("animating",!1)},e.prototype.isGroup=function(){return!1},e.prototype.getParent=function(){return this.get("parent")},e.prototype.getCanvas=function(){return this.get("canvas")},e.prototype.attr=function(){for(var t,e=[],i=0;i0?n=dt(n,x):i.addAnimator(this),n.push(x),this.set("animations",n),this.set("_pause",{isPaused:!1})},e.prototype.stopAnimate=function(t){var e=this;void 0===t&&(t=!0);var i=this.get("animations");Object(r.each)(i,(function(i){t&&(i.onFrame?e.attr(i.onFrame(1)):e.attr(i.toAttrs)),i.callback&&i.callback()})),this.set("animating",!1),this.set("animations",[])},e.prototype.pauseAnimate=function(){var t=this.get("timeline"),e=this.get("animations"),i=t.getTime();return Object(r.each)(e,(function(t){t._paused=!0,t._pauseTime=i,t.pauseCallback&&t.pauseCallback()})),this.set("_pause",{isPaused:!0,pauseTime:i}),this},e.prototype.resumeAnimate=function(){var t=this.get("timeline").getTime(),e=this.get("animations"),i=this.get("_pause").pauseTime;return Object(r.each)(e,(function(e){e.startTime=e.startTime+(t-i),e._paused=!1,e._pauseTime=null,e.resumeCallback&&e.resumeCallback()})),this.set("_pause",{isPaused:!1}),this.set("animations",e),this},e.prototype.emitDelegation=function(t,e){var i,n=this,o=e.propagationPath;this.getEvents();"mouseenter"===t?i=e.fromShape:"mouseleave"===t&&(i=e.toShape);for(var a=function(t){var a=o[t],l=a.get("name");if(l){if((a.isGroup()||a.isCanvas&&a.isCanvas())&&i&&nt(a,i))return"break";Object(r.isArray)(l)?Object(r.each)(l,(function(t){n.emitDelegateEvent(a,t,e)})):s.emitDelegateEvent(a,l,e)}},s=this,l=0;l0)}));return a.length>0?(Q()(a,(function(t){var e=t.getBBox();r.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,r),e=Math.max.apply(null,r),i=Math.min.apply(null,o),n=Math.max.apply(null,o)):(t=0,e=0,i=0,n=0),{x:t,y:i,minX:t,minY:i,maxX:e,maxY:n,width:e-t,height:n-i}},e.prototype.getCanvasBBox=function(){var t=1/0,e=-1/0,i=1/0,n=-1/0,r=[],o=[],a=this.getChildren().filter((function(t){return t.get("visible")&&(!t.isGroup()||t.isGroup()&&t.getChildren().length>0)}));return a.length>0?(Q()(a,(function(t){var e=t.getCanvasBBox();r.push(e.minX,e.maxX),o.push(e.minY,e.maxY)})),t=Math.min.apply(null,r),e=Math.max.apply(null,r),i=Math.min.apply(null,o),n=Math.max.apply(null,o)):(t=0,e=0,i=0,n=0),{x:t,y:i,minX:t,minY:i,maxX:e,maxY:n,width:e-t,height:n-i}},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.children=[],e},e.prototype.onAttrChange=function(e,i,n){if(t.prototype.onAttrChange.call(this,e,i,n),"matrix"===e){var r=this.getTotalMatrix();this._applyChildrenMarix(r)}},e.prototype.applyMatrix=function(e){var i=this.getTotalMatrix();t.prototype.applyMatrix.call(this,e);var n=this.getTotalMatrix();n!==i&&this._applyChildrenMarix(n)},e.prototype._applyChildrenMarix=function(t){var e=this.getChildren();Q()(e,(function(e){e.applyMatrix(t)}))},e.prototype.addShape=function(){for(var t=[],e=0;e=0;o--){var a=t[o];if(rt(a)&&(a.isGroup()?r=a.getShape(e,i,n):a.isHit(e,i)&&(r=a)),r)break}return r},e.prototype.add=function(t){var e=this.getCanvas(),i=this.getChildren(),n=this.get("timeline"),r=t.getParent();r&&function(t,e,i){void 0===i&&(i=!0),i?e.destroy():(e.set("parent",null),e.set("canvas",null)),et(t.getChildren(),e)}(r,t,!1),t.set("parent",this),e&&function t(e,i){if(e.set("canvas",i),e.isGroup()){var n=e.get("children");n.length&&n.forEach((function(e){t(e,i)}))}}(t,e),n&&function t(e,i){if(e.set("timeline",i),e.isGroup()){var n=e.get("children");n.length&&n.forEach((function(e){t(e,i)}))}}(t,n),i.push(t),function(t){t.isGroup()?(t.isEntityGroup()||t.get("children").length)&&t.onCanvasChange("add"):t.onCanvasChange("add")}(t),this._applyElementMatrix(t)},e.prototype._applyElementMatrix=function(t){var e=this.getTotalMatrix();e&&t.applyMatrix(e)},e.prototype.getChildren=function(){return this.get("children")},e.prototype.sort=function(){var t,e=this.getChildren();Q()(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.onCanvasChange("sort")},e.prototype.clear=function(){if(this.set("clearing",!0),!this.destroyed){for(var t=this.getChildren(),e=t.length-1;e>=0;e--)t[e].destroy();this.set("children",[]),this.onCanvasChange("clear"),this.set("clearing",!1)}},e.prototype.destroy=function(){this.get("destroyed")||(this.clear(),t.prototype.destroy.call(this))},e.prototype.getFirst=function(){return this.getChildByIndex(0)},e.prototype.getLast=function(){var t=this.getChildren();return this.getChildByIndex(t.length-1)},e.prototype.getChildByIndex=function(t){return this.getChildren()[t]},e.prototype.getCount=function(){return this.getChildren().length},e.prototype.contain=function(t){return this.getChildren().indexOf(t)>-1},e.prototype.removeChild=function(t,e){void 0===e&&(e=!0),this.contain(t)&&t.remove(e)},e.prototype.findAll=function(t){var e=[],i=this.getChildren();return Q()(i,(function(i){t(i)&&e.push(i),i.isGroup()&&(e=e.concat(i.findAll(t)))})),e},e.prototype.find=function(t){var e=null,i=this.getChildren();return Q()(i,(function(i){if(t(i)?e=i:i.isGroup()&&(e=i.find(t)),e)return!1})),e},e.prototype.findById=function(t){return this.find((function(e){return e.get("id")===t}))},e.prototype.findByClassName=function(t){return this.find((function(e){return e.get("className")===t}))},e.prototype.findAllByName=function(t){return this.findAll((function(e){return e.get("name")===t}))},e}(gt);function mt(t){return(mt="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)}var xt,bt,_t=0,Ot=0,wt=0,Mt=0,Ct=0,St=0,jt="object"===("undefined"==typeof performance?"undefined":mt(performance))&&performance.now?performance:Date,Pt="object"===("undefined"==typeof window?"undefined":mt(window))&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Tt(){return Ct||(Pt(At),Ct=jt.now()+St)}function At(){Ct=0}function Et(){this._call=this._time=this._next=null}function Lt(t,e,i){var n=new Et;return n.restart(t,e,i),n}function It(){Ct=(Mt=jt.now())+St,_t=Ot=0;try{!function(){Tt(),++_t;for(var t,e=xt;e;)(t=Ct-e._time)>=0&&e._call.call(null,t),e=e._next;--_t}()}finally{_t=0,function(){var t,e,i=xt,n=1/0;for(;i;)i._call?(n>i._time&&(n=i._time),t=i,i=i._next):(e=i._next,i._next=null,i=t?t._next=e:xt=e);bt=t,kt(n)}(),Ct=0}}function Dt(){var t=jt.now(),e=t-Mt;e>1e3&&(St-=e,Mt=t)}function kt(t){_t||(Ot&&(Ot=clearTimeout(Ot)),t-Ct>24?(t<1/0&&(Ot=setTimeout(It,t-jt.now()-St)),wt&&(wt=clearInterval(wt))):(wt||(Mt=jt.now(),wt=setInterval(Dt,1e3)),_t=1,Pt(It)))}Et.prototype=Lt.prototype={constructor:Et,restart:function(t,e,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?Tt():+i)+(null==e?0:+e),this._next||bt===this||(bt?bt._next=this:xt=this,bt=this),this._call=t,this._time=i,kt()},stop:function(){this._call&&(this._call=null,this._time=1/0,kt())}};var Bt=i(79),Ft=function(t,e,i){t.prototype=e.prototype=i,i.constructor=t};function Rt(t,e){var i=Object.create(t.prototype);for(var n in e)i[n]=e[n];return i}function Nt(){}var Yt="\\s*([+-]?\\d+)\\s*",Gt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Xt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vt=/^#([0-9a-f]{3,8})$/,zt=new RegExp("^rgb\\("+[Yt,Yt,Yt]+"\\)$"),Ht=new RegExp("^rgb\\("+[Xt,Xt,Xt]+"\\)$"),Wt=new RegExp("^rgba\\("+[Yt,Yt,Yt,Gt]+"\\)$"),qt=new RegExp("^rgba\\("+[Xt,Xt,Xt,Gt]+"\\)$"),Ut=new RegExp("^hsl\\("+[Gt,Xt,Xt]+"\\)$"),Kt=new RegExp("^hsla\\("+[Gt,Xt,Xt,Gt]+"\\)$"),Zt={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 $t(){return this.rgb().formatHex()}function Qt(){return this.rgb().formatRgb()}function Jt(t){var e,i;return t=(t+"").trim().toLowerCase(),(e=Vt.exec(t))?(i=e[1].length,e=parseInt(e[1],16),6===i?te(e):3===i?new re(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===i?ee(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===i?ee(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=zt.exec(t))?new re(e[1],e[2],e[3],1):(e=Ht.exec(t))?new re(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Wt.exec(t))?ee(e[1],e[2],e[3],e[4]):(e=qt.exec(t))?ee(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ut.exec(t))?le(e[1],e[2]/100,e[3]/100,1):(e=Kt.exec(t))?le(e[1],e[2]/100,e[3]/100,e[4]):Zt.hasOwnProperty(t)?te(Zt[t]):"transparent"===t?new re(NaN,NaN,NaN,0):null}function te(t){return new re(t>>16&255,t>>8&255,255&t,1)}function ee(t,e,i,n){return n<=0&&(t=e=i=NaN),new re(t,e,i,n)}function ie(t){return t instanceof Nt||(t=Jt(t)),t?new re((t=t.rgb()).r,t.g,t.b,t.opacity):new re}function ne(t,e,i,n){return 1===arguments.length?ie(t):new re(t,e,i,null==n?1:n)}function re(t,e,i,n){this.r=+t,this.g=+e,this.b=+i,this.opacity=+n}function oe(){return"#"+se(this.r)+se(this.g)+se(this.b)}function ae(){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 se(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function le(t,e,i,n){return n<=0?t=e=i=NaN:i<=0||i>=1?t=e=NaN:e<=0&&(t=NaN),new ce(t,e,i,n)}function ue(t){if(t instanceof ce)return new ce(t.h,t.s,t.l,t.opacity);if(t instanceof Nt||(t=Jt(t)),!t)return new ce;if(t instanceof ce)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),a=NaN,s=o-r,l=(o+r)/2;return s?(a=e===o?(i-n)/s+6*(i0&&l<1?0:a,new ce(a,s,l,t.opacity)}function ce(t,e,i,n){this.h=+t,this.s=+e,this.l=+i,this.opacity=+n}function he(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 pe(t,e,i,n,r){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*i+(1+3*t+3*o-3*a)*n+a*r)/6}Ft(Nt,Jt,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:$t,formatHex:$t,formatHsl:function(){return ue(this).formatHsl()},formatRgb:Qt,toString:Qt}),Ft(re,ne,Rt(Nt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new re(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new re(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:oe,formatHex:oe,formatRgb:ae,toString:ae})),Ft(ce,(function(t,e,i,n){return 1===arguments.length?ue(t):new ce(t,e,i,null==n?1:n)}),Rt(Nt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ce(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ce(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 re(he(t>=240?t-240:t+120,r,n),he(t,r,n),he(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 fe=function(t){return function(){return t}};function de(t,e){return function(i){return t+i*e}}function ge(t){return 1==(t=+t)?ye: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):fe(isNaN(e)?i:e)}}function ye(t,e){var i=e-t;return i?de(t,i):fe(isNaN(t)?e:t)}var ve=function t(e){var i=ge(e);function n(t,e){var n=i((t=ne(t)).r,(e=ne(e)).r),r=i(t.g,e.g),o=i(t.b,e.b),a=ye(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=r(e),t.b=o(e),t.opacity=a(e),t+""}}return n.gamma=t,n}(1);function me(t){return function(e){var i,n,r=e.length,o=new Array(r),a=new Array(r),s=new Array(r);for(i=0;i=1?(i=1,e-1):Math.floor(i*e),r=t[n],o=t[n+1],a=n>0?t[n-1]:2*r-o,s=no&&(r=e.slice(o,r),s[a]?s[a]+=r:s[++a]=r),(i=i[0])===(n=n[0])?s[a]?s[a]+=n:s[++a]=n:(s[++a]=null,l.push({i:a,x:we(i,n)})),o=je.lastIndex;return od.length?(f=l(a[p]),d=l(o[p]),d=D(d,f),d=F(d,f),e.fromAttrs.path=d,e.toAttrs.path=f):e.pathFormatted||(f=l(a[p]),d=l(o[p]),d=F(d,f),e.fromAttrs.path=d,e.toAttrs.path=f,e.pathFormatted=!0),n[p]=[];for(var g=0;g0){for(var o=n.animators.length-1;o>=0;o--)if((t=n.animators[o]).destroyed)n.removeAnimator(o);else{if(!t.isAnimatePaused())for(var a=(e=t.get("animations")).length-1;a>=0;a--)i=e[a],Le(t,i,r)&&(e.splice(a,1),!1,i.callback&&i.callback());0===e.length&&n.removeAnimator(o)}n.canvas.get("autoDraw")||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(t){void 0===t&&(t=!0),this.animators.forEach((function(e){e.stopAnimate(t)})),this.animators=[],this.canvas.draw()},t.prototype.getTime=function(){return this.current},t}(),De=["mousedown","mouseup","dblclick","mouseout","mouseover","mousemove","mouseleave","mouseenter","touchstart","touchmove","touchend","dragenter","dragover","dragleave","drop","contextmenu","mousewheel"];function ke(t,e,i){i.name=e,i.target=t,i.currentTarget=t,i.delegateTarget=t,t.emit(e,i)}function Be(t,e,i){if(i.bubbles){var n=void 0,r=!1;if("mouseenter"===e?(n=i.fromShape,r=!0):"mouseleave"===e&&(r=!0,n=i.toShape),t.isCanvas()&&r)return;if(n&&nt(t,n))return void(i.bubbles=!1);i.name=e,i.currentTarget=t,i.delegateTarget=t,t.emit(e,i)}}var Fe=function(){function t(t){var e=this;this.draggingShape=null,this.dragging=!1,this.currentShape=null,this.mousedownShape=null,this.mousedownPoint=null,this._eventCallback=function(t){var i=t.type;e._triggerEvent(i,t)},this._onDocumentMove=function(t){if(e.canvas.get("el")!==t.target&&(e.dragging||e.currentShape)){var i=e._getPointInfo(t);e.dragging&&e._emitEvent("drag",t,i,e.draggingShape)}},this._onDocumentMouseUp=function(t){if(e.canvas.get("el")!==t.target&&e.dragging){var i=e._getPointInfo(t);e.draggingShape&&e._emitEvent("drop",t,i,null),e._emitEvent("dragend",t,i,e.draggingShape),e._afterDrag(e.draggingShape,i,t)}},this.canvas=t.canvas}return t.prototype.init=function(){this._bindEvents()},t.prototype._bindEvents=function(){var t=this,e=this.canvas.get("el");Q()(De,(function(i){e.addEventListener(i,t._eventCallback)})),document&&(document.addEventListener("mousemove",this._onDocumentMove),document.addEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._clearEvents=function(){var t=this,e=this.canvas.get("el");Q()(De,(function(i){e.removeEventListener(i,t._eventCallback)})),document&&(document.removeEventListener("mousemove",this._onDocumentMove),document.removeEventListener("mouseup",this._onDocumentMouseUp))},t.prototype._getEventObj=function(t,e,i,n,r,o){var a=new R(t,e);return a.fromShape=r,a.toShape=o,a.x=i.x,a.y=i.y,a.clientX=i.clientX,a.clientY=i.clientY,a.propagationPath.push(n),a},t.prototype._getShape=function(t,e){return this.canvas.getShape(t.x,t.y,e)},t.prototype._getPointInfo=function(t){var e=this.canvas,i=e.getClientByEvent(t),n=e.getPointByEvent(t);return{x:n.x,y:n.y,clientX:i.x,clientY:i.y}},t.prototype._triggerEvent=function(t,e){var i=this._getPointInfo(e),n=this._getShape(i,e),r=this["_on"+t],o=!1;if(r)r.call(this,i,n,e);else{var a=this.currentShape;"mouseenter"===t||"dragenter"===t||"mouseover"===t?(this._emitEvent(t,e,i,null,null,n),n&&this._emitEvent(t,e,i,n,null,n),"mouseenter"===t&&this.draggingShape&&this._emitEvent("dragenter",e,i,null)):"mouseleave"===t||"dragleave"===t||"mouseout"===t?(o=!0,a&&this._emitEvent(t,e,i,a,a,null),this._emitEvent(t,e,i,null,a,null),"mouseleave"===t&&this.draggingShape&&this._emitEvent("dragleave",e,i,null)):this._emitEvent(t,e,i,n,null,null)}if(o||(this.currentShape=n),n&&!n.get("destroyed")){var s=this.canvas;s.get("el").style.cursor=n.attr("cursor")||s.get("cursor")}},t.prototype._onmousedown=function(t,e,i){0===i.button&&(this.mousedownShape=e,this.mousedownPoint=t,this.mousedownTimeStamp=i.timeStamp),this._emitEvent("mousedown",i,t,e,null,null)},t.prototype._emitMouseoverEvents=function(t,e,i,n){var r=this.canvas.get("el");i!==n&&(i&&(this._emitEvent("mouseout",t,e,i,i,n),this._emitEvent("mouseleave",t,e,i,i,n),n&&!n.get("destroyed")||(r.style.cursor=this.canvas.get("cursor"))),n&&(this._emitEvent("mouseover",t,e,n,i,n),this._emitEvent("mouseenter",t,e,n,i,n)))},t.prototype._emitDragoverEvents=function(t,e,i,n,r){n?(n!==i&&(i&&this._emitEvent("dragleave",t,e,i,i,n),this._emitEvent("dragenter",t,e,n,i,n)),r||this._emitEvent("dragover",t,e,n)):i&&this._emitEvent("dragleave",t,e,i,i,n),r&&this._emitEvent("dragover",t,e,n)},t.prototype._afterDrag=function(t,e,i){t&&(t.set("capture",!0),this.draggingShape=null),this.dragging=!1;var n=this._getShape(e,i);n!==t&&this._emitMouseoverEvents(i,e,t,n),this.currentShape=n},t.prototype._onmouseup=function(t,e,i){if(0===i.button){var n=this.draggingShape;this.dragging?(n&&this._emitEvent("drop",i,t,e),this._emitEvent("dragend",i,t,n),this._afterDrag(n,t,i)):(this._emitEvent("mouseup",i,t,e),e===this.mousedownShape&&this._emitEvent("click",i,t,e),this.mousedownShape=null,this.mousedownPoint=null)}},t.prototype._ondragover=function(t,e,i){i.preventDefault();var n=this.currentShape;this._emitDragoverEvents(i,t,n,e,!0)},t.prototype._onmousemove=function(t,e,i){var n=this.canvas,r=this.currentShape,o=this.draggingShape;if(this.dragging)o&&this._emitDragoverEvents(i,t,r,e,!1),this._emitEvent("drag",i,t,o);else{var a=this.mousedownPoint;if(a){var s=this.mousedownShape,l=i.timeStamp-this.mousedownTimeStamp,u=a.clientX-t.clientX,c=a.clientY-t.clientY;l>120||u*u+c*c>40?s&&s.get("draggable")?((o=this.mousedownShape).set("capture",!1),this.draggingShape=o,this.dragging=!0,this._emitEvent("dragstart",i,t,o),this.mousedownShape=null,this.mousedownPoint=null):!s&&n.get("draggable")?(this.dragging=!0,this._emitEvent("dragstart",i,t,null),this.mousedownShape=null,this.mousedownPoint=null):(this._emitMouseoverEvents(i,t,r,e),this._emitEvent("mousemove",i,t,e)):(this._emitMouseoverEvents(i,t,r,e),this._emitEvent("mousemove",i,t,e))}else this._emitMouseoverEvents(i,t,r,e),this._emitEvent("mousemove",i,t,e)}},t.prototype._emitEvent=function(t,e,i,n,r,o){var a=this._getEventObj(t,e,i,n,r,o);if(n){a.shape=n,ke(n,t,a);for(var s=n.getParent();s;)s.emitDelegation(t,a),a.propagationStopped||Be(s,t,a),a.propagationPath.push(s),s=s.getParent()}else{ke(this.canvas,t,a)}},t.prototype.destroy=function(){this._clearEvents(),this.canvas=null,this.currentShape=null,this.draggingShape=null,this.mousedownPoint=null,this.mousedownShape=null,this.mousedownTimeStamp=null},t}(),Re=Object(at.detect)(),Ne=Re&&"firefox"===Re.name,Ye=function(t){function e(e){var i=t.call(this,e)||this;return i.initContainer(),i.initDom(),i.initEvents(),i.initTimeline(),i}return Object(N.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.cursor="default",e.supportCSSTransform=!1,e},e.prototype.initContainer=function(){var t=this.get("container");W()(t)&&(t=document.getElementById(t),this.set("container",t))},e.prototype.initDom=function(){var t=this.createDom();this.set("el",t),this.get("container").appendChild(t),this.setDOMSize(this.get("width"),this.get("height"))},e.prototype.initEvents=function(){var t=new Fe({canvas:this});t.init(),this.set("eventController",t)},e.prototype.initTimeline=function(){var t=new Ie(this);this.set("timeline",t)},e.prototype.setDOMSize=function(t,e){var i=this.get("el");it&&(i.style.width=t+"px",i.style.height=e+"px")},e.prototype.changeSize=function(t,e){this.setDOMSize(t,e),this.set("width",t),this.set("height",e),this.onCanvasChange("changeSize")},e.prototype.getRenderer=function(){return this.get("renderer")},e.prototype.getCursor=function(){return this.get("cursor")},e.prototype.setCursor=function(t){this.set("cursor",t);var e=this.get("el");it&&e&&(e.style.cursor=t)},e.prototype.getPointByEvent=function(t){if(this.get("supportCSSTransform")){if(Ne&&!X()(t.layerX)&&t.layerX!==t.offsetX)return{x:t.layerX,y:t.layerY};if(!X()(t.offsetX))return{x:t.offsetX,y:t.offsetY}}var e=this.getClientByEvent(t),i=e.x,n=e.y;return this.getPointByClient(i,n)},e.prototype.getClientByEvent=function(t){var e=t;return t.touches&&(e="touchend"===t.type?t.changedTouches[0]:t.touches[0]),{x:e.clientX,y:e.clientY}},e.prototype.getPointByClient=function(t,e){var i=this.get("el").getBoundingClientRect();return{x:t-i.left,y:e-i.top}},e.prototype.getClientByPoint=function(t,e){var i=this.get("el").getBoundingClientRect();return{x:t+i.left,y:e+i.top}},e.prototype.draw=function(){},e.prototype.removeDom=function(){var t=this.get("el");t.parentNode.removeChild(t)},e.prototype.clearEvents=function(){this.get("eventController").destroy()},e.prototype.isCanvas=function(){return!0},e.prototype.getParent=function(){return null},e.prototype.destroy=function(){var e=this.get("timeline");this.get("destroyed")||(this.clear(),e&&e.stop(),this.clearEvents(),this.removeDom(),t.prototype.destroy.call(this))},e}(vt),Ge=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(N.__extends)(e,t),e.prototype.isGroup=function(){return!0},e.prototype.isEntityGroup=function(){return!1},e.prototype.clone=function(){for(var e=t.prototype.clone.call(this),i=this.getChildren(),n=0;n=t&&i.minY<=e&&i.maxY>=e},e.prototype.afterAttrsChange=function(e){t.prototype.afterAttrsChange.call(this,e),this.clearCacheBBox()},e.prototype.getBBox=function(){var t=this.get("bbox");return t||(t=this.calculateBBox(),this.set("bbox",t)),t},e.prototype.getCanvasBBox=function(){var t=this.get("canvasBox");return t||(t=this.calculateCanvasBBox(),this.set("canvasBox",t)),t},e.prototype.applyMatrix=function(e){t.prototype.applyMatrix.call(this,e),this.set("canvasBox",null)},e.prototype.calculateCanvasBBox=function(){var t=this.getBBox(),e=this.getTotalMatrix(),i=t.minX,n=t.minY,r=t.maxX,o=t.maxY;if(e){var a=ut(e,[t.minX,t.minY]),s=ut(e,[t.maxX,t.minY]),l=ut(e,[t.minX,t.maxY]),u=ut(e,[t.maxX,t.maxY]);i=Math.min(a[0],s[0],l[0],u[0]),r=Math.max(a[0],s[0],l[0],u[0]),n=Math.min(a[1],s[1],l[1],u[1]),o=Math.max(a[1],s[1],l[1],u[1])}var c=this.attrs;if(c.shadowColor){var h=c.shadowBlur,p=void 0===h?0:h,f=c.shadowOffsetX,d=void 0===f?0:f,g=c.shadowOffsetY,y=void 0===g?0:g,v=i-p+d,m=r+p+d,x=n-p+y,b=o+p+y;i=Math.min(i,v),r=Math.max(r,m),n=Math.min(n,x),o=Math.max(o,b)}return{x:i,y:n,minX:i,minY:n,maxX:r,maxY:o,width:r-i,height:o-n}},e.prototype.clearCacheBBox=function(){this.set("bbox",null),this.set("canvasBox",null)},e.prototype.isClipShape=function(){return this.get("isClipShape")},e.prototype.isInShape=function(t,e){return!1},e.prototype.isOnlyHitBox=function(){return!1},e.prototype.isHit=function(t,e){var i=this.get("startArrowShape"),n=this.get("endArrowShape"),r=[t,e,1],o=(r=this.invertFromMatrix(r))[0],a=r[1],s=this._isInBBox(o,a);if(this.isOnlyHitBox())return s;if(s&&!this.isClipped(o,a)){if(this.isInShape(o,a))return!0;if(i&&i.isHit(o,a))return!0;if(n&&n.isHit(o,a))return!0}return!1},e}(gt),Ve=i(194).version},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(143);Object.defineProperty(e,"getGlobalTheme",{enumerable:!0,get:function(){return n.getGlobalTheme}}),Object.defineProperty(e,"registerGlobalTheme",{enumerable:!0,get:function(){return n.registerGlobalTheme}});var r=i(145);Object.defineProperty(e,"getTheme",{enumerable:!0,get:function(){return r.getTheme}}),Object.defineProperty(e,"registerTheme",{enumerable:!0,get:function(){return r.registerTheme}});var o=i(257);Object.defineProperty(e,"convertToG2Theme",{enumerable:!0,get:function(){return o.convertToG2Theme}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.onEvent=e.LAYER_EVENT_MAP=e.CANVAS_EVENT_MAP=e.EVENT_MAP=e.getMobileEventMap=e.getRegionEventMap=e.getEventMap=void 0;var n=i(0),r=["click","dblclick","mousemove","mouseenter","mouseleave","mousedown","mouseup","contextmenu"],o=[],a=n.deepMix(u({title:"title",description:"description",breadcrumb:"breadcrumb"}),c("Plot",r));e.CANVAS_EVENT_MAP=a;var s=c("Layer",r);e.LAYER_EVENT_MAP=s;var l=n.deepMix({},u({axis:"axis-label",label:"label",legend:"legend-item"}),c("View",r),h());function u(t){var e={};return n.each(t,(function(t,i){var o="on"+n.upperFirst(i),a=t+":";n.each(r,(function(t){var i=n.upperFirst(t),r=""+a+t;e[""+o+i]=r}))})),e}function c(t,e){var i={};return n.each(e,(function(e){var r=n.upperFirst(e);i["on"+t+r]=e})),i}function h(){var t={};return n.each(o,(function(e){var i=n.upperFirst(e);t["on"+i]=e})),t}e.EVENT_MAP=l,e.onEvent=function(t,e,i){t.view.on(e,(function(e){var n={x:null==e?void 0:e.x,y:null==e?void 0:e.y,clientX:null==e?void 0:e.clientX,clientY:null==e?void 0:e.clientY,target:null==e?void 0:e.target,data:(null==e?void 0:e.data)?e.data.data:null,plot:t,canvas:t.canvas,gEvent:null==e?void 0:e.gEvent};i(n)}))},e.getEventMap=u,e.getRegionEventMap=c,e.getMobileEventMap=h},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(134),o=i(43);Object.defineProperty(e,"DIRECTION",{enumerable:!0,get:function(){return o.DIRECTION}});var a=i(132);Object.defineProperty(e,"Padding",{enumerable:!0,get:function(){return a.Padding}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return a.Point}}),Object.defineProperty(e,"Region",{enumerable:!0,get:function(){return a.Region}});var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.fromBBoxObject=function(t){return new e(t.x,t.y,t.width,t.height)},e}(r.BBox);e.default=s},function(t,e,i){"use strict";i.d(e,"a",(function(){return p})),i.d(e,"b",(function(){return f})),i.d(e,"c",(function(){return d})),i.d(e,"f",(function(){return g})),i.d(e,"d",(function(){return y})),i.d(e,"e",(function(){return v}));var n=i(0),r=i(73),o=i(5);function a(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function s(t,e){return a(t)*a(e)?(t[0]*e[0]+t[1]*e[1])/(a(t)*a(e)):1}function l(t,e){return(t[0]*e[1]1&&(i*=Math.sqrt(y),n*=Math.sqrt(y));var v=i*i*(g*g)+n*n*(d*d),m=v?Math.sqrt((i*i*(n*n)-v)/v):1;a===u&&(m*=-1),isNaN(m)&&(m=0);var x=n?m*i*g/n:0,b=i?m*-n*d/i:0,_=(c+p)/2+Math.cos(r)*x-Math.sin(r)*b,O=(h+f)/2+Math.sin(r)*x+Math.cos(r)*b,w=[(d-x)/i,(g-b)/n],M=[(-1*d-x)/i,(-1*g-b)/n],C=l([1,0],w),S=l(w,M);return s(w,M)<=-1&&(S=Math.PI),s(w,M)>=1&&(S=0),0===u&&S>0&&(S-=2*Math.PI),1===u&&S<0&&(S+=2*Math.PI),{cx:_,cy:O,rx:Object(o.j)(t,[p,f])?0:i,ry:Object(o.j)(t,[p,f])?0:n,startAngle:C,endAngle:C+S,xRotation:r,arcFlag:a,sweepFlag:u}}var c=i(19),h={fill:"fillStyle",stroke:"strokeStyle",opacity:"globalAlpha"};function p(t,e){var i=e.attr();for(var o in i){var a=i[o],s=h[o]?h[o]:o;"matrix"===s&&a?t.transform(a[0],a[1],a[3],a[4],a[6],a[7]):"lineDash"===s&&t.setLineDash?Object(n.isArray)(a)&&t.setLineDash(a):("strokeStyle"===s||"fillStyle"===s?a=Object(r.b)(t,e,a):"globalAlpha"===s&&(a*=t.globalAlpha),t[s]=a)}}function f(t,e,i){for(var n=0;nO?_:O,P=_>O?1:_/O,T=_>O?O/_:1;e.translate(x,b),e.rotate(C),e.scale(P,T),e.arc(0,0,j,w,M,1-S),e.scale(1/P,1/T),e.rotate(-C),e.translate(-x,-b)}break;case"Z":e.closePath()}if("Z"===d)s=l;else{var A=f.length;s=[f[A-2],f[A-1]]}}}function g(t,e){var i=t.get("canvas");i&&("remove"===e&&(t._cacheCanvasBBox=t.get("cacheCanvasBBox")),t.get("hasChanged")||(i.refreshElement(t,e,i),i.get("autoDraw")&&i.draw(),t.set("hasChanged",!0)))}function y(t){if(!t.length)return null;var e=[],i=[],r=[],a=[];return Object(n.each)(t,(function(t){var n=function(t){var e;if(t.destroyed)e=t._cacheCanvasBBox;else{var i=t.get("cacheCanvasBBox"),n=i&&!(!i.width||!i.height),r=t.getCanvasBBox(),a=r&&!(!r.width||!r.height);n&&a?e=Object(o.l)(i,r):n?e=i:a&&(e=r)}return e}(t);n&&(e.push(n.minX),i.push(n.minY),r.push(n.maxX),a.push(n.maxY))})),{minX:Math.min.apply(null,e),minY:Math.min.apply(null,i),maxX:Math.max.apply(null,r),maxY:Math.max.apply(null,a)}}function v(t,e){return t&&e&&Object(o.f)(t,e)?{minX:Math.max(t.minX,e.minX),minY:Math.max(t.minY,e.minY),maxX:Math.min(t.maxX,e.maxX),maxY:Math.min(t.maxY,e.maxY)}:null}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(8),a=n.__importDefault(i(137)),s=i(20),l=i(26),u=n.__importDefault(i(247)),c=i(12),h=n.__importDefault(i(255)),p=n.__importDefault(i(64)),f=n.__importDefault(i(89)),d=n.__importDefault(i(53)),g=i(38),y=n.__importStar(i(13)),v=i(141),m=function(t){function e(e){var i=t.call(this,e)||this;return i.interactions=[],i.labels=[],i.options=i.getOptions(e),i.initialOptions=r.deepMix({},i.options),i.paddingController=new h.default({plot:i}),i.stateController=new p.default({plot:i}),i.themeController=new f.default,i}return n.__extends(e,t),e.getDefaultOptions=function(){return{renderer:"canvas",title:{visible:!1,alignTo:"left",text:""},description:{visible:!1,text:"",alignTo:"left"},padding:"auto",legend:{visible:!0,position:"bottom-center"},tooltip:{visible:!0,shared:!0,showCrosshairs:!0,crosshairs:{type:"x"},offset:20},xAxis:{visible:!0,grid:{visible:!1},line:{visible:!0},tickLine:{visible:!0},label:{visible:!0,autoRotate:!0,autoHide:!0},title:{visible:!1,spacing:12}},yAxis:{visible:!0,grid:{visible:!0},line:{visible:!1},tickLine:{visible:!1},label:{visible:!0,autoHide:!0,autoRotate:!1},title:{autoRotate:!0,visible:!1,spacing:12}},label:{visible:!1},interactions:[{type:"tooltip"},{type:"legend-active"},{type:"legend-filter"}],animation:!0}},e.prototype.getOptions=function(e){var i=this.options||{},o=t.prototype.getOptions.call(this,e),a=this.constructor.getDefaultOptions(e),s=r.reduce(r.flatten(r.map([o,a,r.hasKey(e,"interactions")?e:i],(function(t){return r.get(t,"interactions",[])}))),(function(t,e){var i=r.findIndex(t,(function(t){return t.type===e.type}));return i>=0&&t.splice(i,1),n.__spreadArrays(t,[e])}),[]);return r.deepMix({},o,a,i,e,{interactions:s})},e.prototype.beforeInit=function(){this.emit(v.VIEW_LAYER_LIFE_CYCLE.BEFORE_INIT),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={data:this.processData(this.options.data),scales:{},legends:{},tooltip:{showTitle:!0},axes:{},coordinate:{type:"cartesian"},geometries:[],annotations:[],interactions:[],theme:this.theme,panelRange:{},animate:{},views:[]},this.paddingController.clear(),this.drawTitle(),this.drawDescription(),this.interaction(),this.coord(),this.scale(),this.axis(),this.tooltip(),this.legend(),this.addGeometry(),this.annotation(),this.animation(),this.viewRange=this.getViewRange();var i=this.viewRangeToRegion(this.viewRange);this.view=new o.View({parent:null,canvas:this.canvas,backgroundGroup:this.container.addGroup(),middleGroup:this.container.addGroup(),foregroundGroup:this.container.addGroup(),padding:this.paddingController.getPadding(),theme:this.theme,options:this.config,limitInPlot:this.isLimitInPlot(),region:i}),this.applyInteractions(),this.view.on(o.VIEW_LIFE_CIRCLE.AFTER_RENDER,(function(){e.afterRender()}))},e.prototype.afterInit=function(){t.prototype.afterInit.call(this),this.view&&!this.view.destroyed&&("auto"!==this.options.padding&&this.parseEvents(),this.emit(v.VIEW_LAYER_LIFE_CYCLE.AFTER_INIT))},e.prototype.afterRender=function(){var t,e;if(this.view&&!this.view.destroyed){var i=this.options,n=i.padding?i.padding:this.config.theme.padding;i.defaultState&&"auto"!==n&&this.stateController.defaultStates(i.defaultState),"auto"===n&&this.paddingController.processAutoPadding(),(null===(e=null===(t=i.tooltip)||void 0===t?void 0:t.custom)||void 0===e?void 0:e.onChange)&&"auto"!==i.padding&&this.customTooltip()}},e.prototype.render=function(){this.emit(v.VIEW_LAYER_LIFE_CYCLE.BEFORE_RENDER),t.prototype.render.call(this);var e=this.options.data;r.isEmpty(e)||this.view.render(),this.emit(v.VIEW_LAYER_LIFE_CYCLE.AFTER_RENDER)},e.prototype.repaint=function(){this.canvas&&this.canvas.draw()},e.prototype.getScaleByField=function(t){return this.view.getScaleByField(t)},e.prototype.getXScale=function(){var t=this.options.xField;if(t)return this.view.getScaleByField(t)},e.prototype.getYScale=function(){var t=this.options.yField;if(t)return this.view.getScaleByField(t)},e.prototype.getColorScale=function(){var t=this.options;if(r.contains(t,"colorField"))return this.view.getScaleByField(t)},e.prototype.getShapes=function(){var t=this.view.geometries,e={};return r.each(t,(function(t){var i=t.type;e[i]=t.getShapes()})),e},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=this.getOptions(t),this.processOptions(this.options)},e.prototype.changeData=function(t){this.emit(v.VIEW_LAYER_LIFE_CYCLE.BEFORE_CHANGE_DATA);var e=r.isEmpty(this.options.data);this.options.data=this.processData(t),e?(this.options.padding=this.initialOptions.padding||"auto",this.view.data(this.options.data),this.view.render()):this.view.changeData(this.options.data),this.emit(v.VIEW_LAYER_LIFE_CYCLE.AFTER_CHANGE_DATA)},e.prototype.getPlot=function(){return this.view},e.prototype.getLabels=function(){return this.labels},e.prototype.getTheme=function(){return this.theme?this.theme:this.themeController.getTheme(this.options,this.type)},e.prototype.getResponsiveTheme=function(){return this.themeController.getResponsiveTheme(this.type)},e.prototype.getPlotTheme=function(){return this.themeController.getPlotTheme(this.options,this.type)},e.prototype.getInteractions=function(){return this.interactions},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.setDefault=function(t,e){this.stateController.setState({type:"default",condition:t,style:e})},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=r.mapValues(this.config.scales,(function(t){var e=t.type;return e?{type:e}:{}})),e=r.deepMix({},this.config.scales,this.options.meta||{},t);this.setConfig("scales",e)},e.prototype.axis=function(){var t=l.getComponent("axis",{plot:this,dim:"x"}),e=l.getComponent("axis",{plot:this,dim:"y"}),i={};i[this.options.xField]=t,i[this.options.yField]=e,this.setConfig("axes",i)},e.prototype.tooltip=function(){var t,e;if(!1!==this.options.tooltip.visible){var i=r.get(this.options,"tooltip");(null===(t=i.custom)||void 0===t?void 0:t.container)&&(i.container=i.custom.container),(null===(e=i.custom)||void 0===e?void 0:e.customContent)&&(i.customContent=i.custom.customContent),this.setConfig("tooltip",r.deepMix({},i)),r.deepMix(this.config.theme.tooltip,this.options.tooltip.domStyles)}else this.setConfig("tooltip",!1)},e.prototype.createTooltipContainer=function(){var t=document.createElement("div");return t.className="g2-tooltip",t},e.prototype.customTooltip=function(){var t,e=this.options.tooltip.custom;e.container&&(t=r.isString(e.container)?document.getElementById(e.container):e.container),t||(t=this.createTooltipContainer()),this.view.on("tooltip:show",(function(i){(null==e?void 0:e.onChange)&&e.onChange(t,i)})),this.view.hideTooltip(),this.view.on("tooltip:change",(function(i){e.onChange(t,i)}))},e.prototype.getLegendPosition=function(t){var e=t.split("-");return e&&e.length>1&&"center"===e[1]?e[0]:t},e.prototype.legend=function(){var t;if(!1!==this.options.legend.visible){var e=r.deepMix({},this.theme.legend,this.options.legend),i={position:this.getLegendPosition(r.get(e,"position")),offsetX:r.get(e,"offsetX"),offsetY:r.get(e,"offsetY"),flipPage:r.get(e,"flipPage"),marker:r.get(e,"marker"),title:(null===(t=e.title)||void 0===t?void 0:t.visible)?r.get(e,"title"):null,itemName:r.get(e,"text")};this.setConfig("legends",i)}else this.setConfig("legends",!1)},e.prototype.annotation=function(){var t=this,e=[];"cartesian"===this.config.coordinate.type&&this.options.guideLine&&r.each(this.options.guideLine,(function(i){var n=l.getComponent("guideLine",{plot:t,cfg:i});e.push(n)})),this.setConfig("annotations",e)},e.prototype.interaction=function(){var t=this,e=this.options.interactions,i=void 0===e?[]:e;r.each(i,(function(e){var i=e.type;if("slider"===i||"scrollbar"===i){t.options.xAxis=r.deepMix({},t.options.xAxis,{label:{autoHide:!0,autoRotate:!1}})}t.setConfig("interaction",e)}))},e.prototype.animation=function(){!1===this.options.animation&&this.setConfig("animate",!1)},e.prototype.applyInteractions=function(){var t=this,e=y.default.fromBBoxObject(this.layerBBox),i=this.title||this.description,n=new y.default(e.minX,e.minY,e.width,i?i.getBBox().maxY:0);e=e.cut(n,y.DIRECTION.TOP);var r=this.options.interactions,o=void 0===r?[]:r;this.interactions&&this.interactions.forEach((function(t){t.destroy()})),this.interactions=[],o.forEach((function(i){var n=u.default.getInteraction(i.type,t.type);if(n){var r=new n({view:t.view},t,n.getInteractionRange(e,i.cfg),i.cfg);r.render(),t.interactions.push(r)}}))},e.prototype.setConfig=function(t,e){"geometry"!==t?"interaction"!==t?!1!==e?r.assign(this.config[t],e):this.config[t]=!1:this.config.interactions.push(e):this.config.geometries.push(e)},e.prototype.parseEvents=function(e){var i=this,n=this.options;if(n.events){t.prototype.parseEvents.call(this,n.events);var o=e?e.EVENT_MAP:c.EVENT_MAP;r.each(n.events,(function(t,e){if(r.isFunction(t)){var n=o[e]||e,a=t;c.onEvent(i,n,a)}}))}},e.prototype.drawTitle=function(){var t=this.options,e=this.layerBBox;if(this.title&&(this.title.destroy(),this.title=null),g.isTextUsable(t.title)){var i=this.width,n=this.config.theme,o=new a.default({leftMargin:e.minX+n.title.padding[3],rightMargin:e.maxX-n.title.padding[1],topMargin:e.minY+n.title.padding[0],text:t.title.text,style:r.mix(n.title,t.title.style),wrapperWidth:i-n.title.padding[3]-n.title.padding[1],container:this.container.addGroup(),theme:n,index:g.isTextUsable(t.description)?0:1,plot:this,alignTo:t.title.alignTo,name:"title"});this.title=o,this.paddingController.registerPadding(o,"outer")}},e.prototype.drawDescription=function(){var t=this.options,e=this.layerBBox;if(this.description&&(this.description.destroy(),this.description=null),g.isTextUsable(t.description)){var i=this.width,n=this.config.theme,o=0;if(this.title){var s=this.title.getBBox();o+=s.minY+s.height,o+=n.description.padding[0]}else o+=e.minY+n.title.padding[0];var l=new a.default({leftMargin:e.minX+n.description.padding[3],topMargin:o,rightMargin:e.maxX-n.title.padding[1],text:t.description.text,style:r.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,alignTo:t.description.alignTo,name:"description"});this.description=l,this.paddingController.registerPadding(l,"outer")}},e.prototype.doRenderLabel=function(t,e){r.each(this.labels,(function(t){t.destroy()})),this.labels=[];var i={layer:this,container:t.labelsContainer,geometry:t,label:e},n=s.getLabelComponent(e.type);if(n){var o=new n(i);o.init(),o.render(),this.labels.push(o)}},e.prototype.doDestroy=function(){this.doDestroyInteractions(),this.doDestroyLabels(),this.view.destroyed||this.view.destroy()},e.prototype.doDestroyInteractions=function(){this.interactions&&this.interactions.forEach((function(t){t.destroy()})),this.interactions=[]},e.prototype.doDestroyLabels=function(){r.each(this.labels,(function(t){t.destroy()})),this.labels=[]},e.prototype.getViewRange=function(){var t=this,e=this.options.interactions,i=void 0===e?[]:e,n=this.paddingController.processOuterPadding();return i.forEach((function(e){var i=u.default.getInteraction(e.type,t.type),r=i&&i.getInteractionRange(n,e.cfg),o="";r&&(r.maxY===n.maxY&&r.minY>n.minY?o="bottom":r.maxX===n.maxX&&r.minX>n.minX?o="right":r.minX===n.minX&&r.maxX>n.maxX?o="left":r.minY===n.minY&&r.maxY=0;i--)t.removeChild(e[i])}function j(t){var e=t.start,i=t.end,n=Math.min(e.x,i.x),r=Math.min(e.y,i.y),o=Math.max(e.x,i.x),a=Math.max(e.y,i.y);return{x:n,y:r,minX:n,minY:r,maxX:o,maxY:a,width:o-n,height:a-r}}function P(t,e,i,n){return{x:t,y:e,width:i,height:n,minX:t,minY:e,maxX:t+i,maxY:e+n}}function T(t,e,i){return(1-i)*t+e*i}function A(t,e,i){return{x:t.x+Math.cos(i)*e,y:t.y+Math.sin(i)*e}}function E(t){var e,i,n,r,o,a=t.getClip(),s=a&&a.getBBox();if(t.isGroup()){var l=1/0,u=-1/0,c=1/0,h=-1/0,p=t.getChildren();p.length>0?Object(g.each)(p,(function(t){if(t.get("visible")){if(t.isGroup()&&0===t.get("children").length)return!0;var e=E(t),i=t.applyToMatrix([e.minX,e.minY,1]),n=t.applyToMatrix([e.minX,e.maxY,1]),r=t.applyToMatrix([e.maxX,e.minY,1]),o=t.applyToMatrix([e.maxX,e.maxY,1]),a=Math.min(i[0],n[0],r[0],o[0]),s=Math.max(i[0],n[0],r[0],o[0]),p=Math.min(i[1],n[1],r[1],o[1]),f=Math.max(i[1],n[1],r[1],o[1]);au&&(u=s),ph&&(h=f)}})):(l=0,u=0,c=0,h=0),e=P(l,c,u-l,h-c)}else e=t.getBBox();return s?(i=e,n=s,r=Math.max(i.minX,n.minX),o=Math.max(i.minY,n.minY),P(r,o,Math.min(i.maxX,n.maxX)-r,Math.min(i.maxY,n.maxY)-o)):e}function L(t){return t+"px"}function I(t,e,i,n){var r,o,a,s,l=n/(r=t,a=(o=e).x-r.x,s=o.y-r.y,Math.sqrt(a*a+s*s)),u=0;return"start"===i?u=0-l:"end"===i&&(u=1+l),{x:T(t.x,e.x,u),y:T(t.y,e.y,u)}}var D=i(10),k={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},B=function(t){function e(e){var i=t.call(this,e)||this;return i.initCfg(),i}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){return{id:"",name:"",type:"",locationType:"none",offsetX:0,offsetY:0,animate:!1,capture:!0,updateAutoRender:!1,animateOption:{appear:null,update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},events:null,defaultCfg:{},visible:!0}},e.prototype.clear=function(){},e.prototype.update=function(t){var e=this,i=this.get("defaultCfg");Object(g.each)(t,(function(t,n){var r=t;e.get(n)!==t&&(Object(g.isObject)(t)&&i[n]&&(r=Object(g.deepMix)({},i[n],t)),e.set(n,r))})),this.updateInner(t),this.afterUpdate(t)},e.prototype.updateInner=function(t){},e.prototype.afterUpdate=function(t){Object(g.hasKey)(t,"visible")&&(t.visible?this.show():this.hide()),Object(g.hasKey)(t,"capture")&&this.setCapture(t.capture)},e.prototype.getLayoutBBox=function(){return this.getBBox()},e.prototype.getLocationType=function(){return this.get("locationType")},e.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},e.prototype.setOffset=function(t,e){this.update({offsetX:t,offsetY:e})},e.prototype.setLocation=function(t){var e=Object(d.__assign)({},t);this.update(e)},e.prototype.getLocation=function(){var t=this,e={},i=this.get("locationType"),n=k[i];return Object(g.each)(n,(function(i){e[i]=t.get(i)})),e},e.prototype.isList=function(){return!1},e.prototype.isSlider=function(){return!1},e.prototype.init=function(){},e.prototype.initCfg=function(){var t=this,e=this.get("defaultCfg");Object(g.each)(e,(function(e,i){var n=t.get(i);if(Object(g.isObject)(n)){var r=Object(g.deepMix)({},e,n);t.set(i,r)}}))},e}(D.Base),F=["visible","tip","delegateObject"],R=["container","group","shapesMap","isRegister","isUpdating","destroyed"],N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{container:null,shapesMap:{},group:null,capture:!0,isRegister:!1,isUpdating:!1,isInit:!0})},e.prototype.remove=function(){this.clear(),this.get("group").remove()},e.prototype.clear=function(){this.get("group").clear(),this.set("shapesMap",{}),this.clearOffScreenCache(),this.set("isInit",!0)},e.prototype.getChildComponentById=function(t){var e=this.getElementById(t);return e&&e.get("component")},e.prototype.getElementById=function(t){return this.get("shapesMap")[t]},e.prototype.getElementByLocalId=function(t){var e=this.getElementId(t);return this.getElementById(e)},e.prototype.getElementsByName=function(t){var e=[];return Object(g.each)(this.get("shapesMap"),(function(i){i.get("name")===t&&e.push(i)})),e},e.prototype.getContainer=function(){return this.get("container")},e.prototype.updateInner=function(t){this.offScreenRender(),this.get("updateAutoRender")&&this.render()},e.prototype.render=function(){var t=this.get("offScreenGroup");t||(t=this.offScreenRender());var e=this.get("group");this.updateElements(t,e),this.deleteElements(),this.applyOffset(),this.get("eventInitted")||(this.initEvent(),this.set("eventInitted",!0)),this.set("isInit",!1)},e.prototype.show=function(){this.get("group").show(),this.set("visible",!0)},e.prototype.hide=function(){this.get("group").hide(),this.set("visible",!1)},e.prototype.setCapture=function(t){this.get("group").set("capture",t),this.set("capture",t)},e.prototype.destroy=function(){this.removeEvent(),this.remove(),t.prototype.destroy.call(this)},e.prototype.getBBox=function(){return this.get("group").getCanvasBBox()},e.prototype.getLayoutBBox=function(){var t=this.get("group"),e=this.getInnerLayoutBBox(),i=t.getTotalMatrix();return i&&(e=function(t,e){var i=O(t,[e.minX,e.minY]),n=O(t,[e.maxX,e.minY]),r=O(t,[e.minX,e.maxY]),o=O(t,[e.maxX,e.maxY]),a=Math.min(i[0],n[0],r[0],o[0]),s=Math.max(i[0],n[0],r[0],o[0]),l=Math.min(i[1],n[1],r[1],o[1]),u=Math.max(i[1],n[1],r[1],o[1]);return{x:a,y:l,minX:a,minY:l,maxX:s,maxY:u,width:s-a,height:u-l}}(i,e)),e},e.prototype.on=function(t,e,i){return this.get("group").on(t,e,i),this},e.prototype.off=function(t,e){var i=this.get("group");return i&&i.off(t,e),this},e.prototype.emit=function(t,e){this.get("group").emit(t,e)},e.prototype.init=function(){t.prototype.init.call(this),this.get("group")||this.initGroup(),this.offScreenRender()},e.prototype.getInnerLayoutBBox=function(){return this.get("offScreenBBox")||this.get("group").getBBox()},e.prototype.delegateEmit=function(t,e){var i=this.get("group");e.target=i,i.emit(t,e),function(t,e,i){var n=new v.a(e,i);n.target=t,n.propagationPath.push(t),t.emitDelegation(e,n);for(var r=t.getParent();r;)r.emitDelegation(e,n),n.propagationPath.push(r),r=r.getParent()}(i,t,e)},e.prototype.createOffScreenGroup=function(){return new(this.get("group").getGroupBase())({delegateObject:this.getDelegateObject()})},e.prototype.applyOffset=function(){var t=this.get("offsetX"),e=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t,y:e})},e.prototype.initGroup=function(){var t=this.get("container");this.set("group",t.addGroup({id:this.get("id"),name:this.get("name"),capture:this.get("capture"),visible:this.get("visible"),isComponent:!0,component:this,delegateObject:this.getDelegateObject()}))},e.prototype.offScreenRender=function(){this.clearOffScreenCache();var t=this.createOffScreenGroup();return this.renderInner(t),this.set("offScreenGroup",t),this.set("offScreenBBox",E(t)),t},e.prototype.addGroup=function(t,e){this.appendDelegateObject(t,e);var i=t.addGroup(e);return this.get("isRegister")&&this.registerElement(i),i},e.prototype.addShape=function(t,e){this.appendDelegateObject(t,e);var i=t.addShape(e);return this.get("isRegister")&&this.registerElement(i),i},e.prototype.addComponent=function(t,e){var i=e.id,n=e.component,r=Object(d.__rest)(e,["id","component"]),o=new n(Object(d.__assign)(Object(d.__assign)({},r),{id:i,container:t,updateAutoRender:this.get("updateAutoRender")}));return o.init(),o.render(),this.get("isRegister")&&this.registerElement(o.get("group")),o},e.prototype.initEvent=function(){},e.prototype.removeEvent=function(){this.get("group").off()},e.prototype.getElementId=function(t){return this.get("id")+"-"+this.get("name")+"-"+t},e.prototype.registerElement=function(t){var e=t.get("id");this.get("shapesMap")[e]=t},e.prototype.unregisterElement=function(t){var e=t.get("id");delete this.get("shapesMap")[e]},e.prototype.moveElementTo=function(t,e){var i=_(e);t.attr("matrix",i)},e.prototype.addAnimation=function(t,e,i){var n=e.attr("opacity");Object(g.isNil)(n)&&(n=1),e.attr("opacity",0),e.animate({opacity:n},i)},e.prototype.removeAnimation=function(t,e,i){e.animate({opacity:0},i)},e.prototype.updateAnimation=function(t,e,i,n){e.animate(i,n)},e.prototype.updateElements=function(t,e){var i,n=this,r=this.get("animate"),o=this.get("animateOption"),a=t.getChildren().slice(0);Object(g.each)(a,(function(t){var a=t.get("id"),s=n.getElementById(a),l=t.get("name");if(s)if(t.get("isComponent")){var u=t.get("component"),c=s.get("component"),h=Object(g.pick)(u.cfg,Object(g.difference)(Object(g.keys)(u.cfg),R));c.update(h),s.set("update_status","update")}else{var p=n.getReplaceAttrs(s,t);r&&o.update?n.updateAnimation(l,s,p,o.update):s.attr(p),t.isGroup()&&n.updateElements(t,s),Object(g.each)(F,(function(e){s.set(e,t.get(e))})),function(t,e){if(t.getClip()||e.getClip()){var i=e.getClip();if(i){var n={type:i.get("type"),attrs:i.attr()};t.setClip(n)}else t.setClip(null)}}(s,t),i=s,s.set("update_status","update")}else{e.add(t);var f=e.getChildren();if(f.splice(f.length-1,1),i){var d=f.indexOf(i);f.splice(d+1,0,t)}else f.unshift(t);if(n.registerElement(t),t.set("update_status","add"),t.get("isComponent"))(u=t.get("component")).set("container",e);else t.isGroup()&&n.registerNewGroup(t);if(i=t,r){var y=n.get("isInit")?o.appear:o.enter;y&&n.addAnimation(l,t,y)}}}))},e.prototype.clearUpdateStatus=function(t){var e=t.getChildren();Object(g.each)(e,(function(t){t.set("update_status",null)}))},e.prototype.clearOffScreenCache=function(){var t=this.get("offScreenGroup");t&&t.destroy(),this.set("offScreenGroup",null),this.set("offScreenBBox",null)},e.prototype.getDelegateObject=function(){var t;return(t={})[this.get("name")]=this,t.component=this,t},e.prototype.appendDelegateObject=function(t,e){var i=t.get("delegateObject");e.delegateObject||(e.delegateObject={}),Object(g.mix)(e.delegateObject,i)},e.prototype.getReplaceAttrs=function(t,e){var i=t.attr(),n=e.attr();return Object(g.each)(i,(function(t,e){void 0===n[e]&&(n[e]=void 0)})),n},e.prototype.registerNewGroup=function(t){var e=this,i=t.getChildren();Object(g.each)(i,(function(t){e.registerElement(t),t.set("update_status","add"),t.isGroup()&&e.registerNewGroup(t)}))},e.prototype.deleteElements=function(){var t=this,e=this.get("shapesMap"),i=[];Object(g.each)(e,(function(t,e){!t.get("update_status")||t.destroyed?i.push([e,t]):t.set("update_status",null)}));var n=this.get("animate"),r=this.get("animateOption");Object(g.each)(i,(function(i){var o=i[0],a=i[1];if(!a.destroyed){var s=a.get("name");if(n&&r.leave){var l=Object(g.mix)({callback:function(){t.removeElement(a)}},r.leave);t.removeAnimation(s,a,l)}else t.removeElement(a)}delete e[o]}))},e.prototype.removeElement=function(t){if(t.get("isGroup")){var e=t.get("component");e&&e.destroy()}t.remove()},e}(B);function Y(t,e){return t.charCodeAt(e)>0&&t.charCodeAt(e)<128?1:2}function G(t){var e=0;return Object(g.each)(t,(function(t){var i=t.getBBox().width;e=0?function(t,e,i){void 0===i&&(i="tail");var n=t.length,r="";if("tail"===i){for(var o=0,a=0;o1||n<0)&&(n=1),{x:T(t.x,e.x,n),y:T(t.y,e.y,n)}},e.prototype.renderLabel=function(t){var e=this.get("text"),i=this.get("start"),n=this.get("end"),r=e.position,o=e.content,a=e.style,s=e.offsetX,l=e.offsetY,u=e.autoRotate,c=e.maxLength,h=e.autoEllipsis,p=e.ellipsisPosition,f=e.background,d=e.isVertical,g=void 0!==d&&d,y=this.getLabelPoint(i,n,r),v=y.x+s,m=y.y+l,x={id:this.getElementId("line-text"),name:"annotation-line-text",x:v,y:m,content:o,style:a,maxLength:c,autoEllipsis:h,ellipsisPosition:p,background:f,isVertical:g};if(u){var b=[n.x-i.x,n.y-i.y];x.rotate=Math.atan2(b[1],b[0])}V(t,x)},e}(N),W=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"text",locationType:"point",x:0,y:0,content:"",rotate:null,style:{},background:null,maxLength:null,autoEllipsis:!0,isVertical:!1,ellipsisPosition:"tail",defaultCfg:{style:{fill:z.textColor,fontSize:12,textAlign:"center",textBaseline:"middle",fontFamily:z.fontFamily}}})},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.renderInner=function(t){var e=this.getLocation(),i=e.x,n=e.y,r=this.get("content"),o=this.get("style");V(t,{id:this.getElementId("text"),name:this.get("name")+"-text",x:i,y:n,content:r,style:o,maxLength:this.get("maxLength"),autoEllipsis:this.get("autoEllipsis"),isVertical:this.get("isVertical"),ellipsisPosition:this.get("ellipsisPosition"),background:this.get("background"),rotate:this.get("rotate")})},e.prototype.resetLocation=function(){var t=this.getElementByLocalId("text-group");if(t){var e=this.getLocation(),i=e.x,n=e.y,r=this.get("rotate");M(t,i,n),w(t,r,i,n)}},e}(N),q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"arc",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2,style:{stroke:"#999",lineWidth:1}})},e.prototype.renderInner=function(t){this.renderArc(t)},e.prototype.getArcPath=function(){var t=this.getLocation(),e=t.center,i=t.radius,n=t.startAngle,r=t.endAngle,o=A(e,i,n),a=A(e,i,r),s=r-n>Math.PI?1:0,l=[["M",o.x,o.y]];if(r-n==2*Math.PI){var u=A(e,i,n+Math.PI);l.push(["A",i,i,0,s,1,u.x,u.y]),l.push(["A",i,i,0,s,1,a.x,a.y])}else l.push(["A",i,i,0,s,1,a.x,a.y]);return l},e.prototype.renderArc=function(t){var e=this.getArcPath(),i=this.get("style");this.addShape(t,{type:"path",id:this.getElementId("arc"),name:"annotation-arc",attrs:Object(d.__assign)({path:e},i)})},e}(N),U=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"region",locationType:"region",start:null,end:null,style:{},defaultCfg:{style:{lineWidth:0,fill:z.regionColor,opacity:.4}}})},e.prototype.renderInner=function(t){this.renderRegion(t)},e.prototype.renderRegion=function(t){var e=this.get("start"),i=this.get("end"),n=this.get("style"),r=j({start:e,end:i});this.addShape(t,{type:"rect",id:this.getElementId("region"),name:"annotation-region",attrs:Object(d.__assign)({x:r.x,y:r.y,width:r.width,height:r.height},n)})},e}(N),K=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"image",locationType:"region",start:null,end:null,src:null,style:{}})},e.prototype.renderInner=function(t){this.renderImage(t)},e.prototype.getImageAttrs=function(){var t=this.get("start"),e=this.get("end"),i=this.get("style"),n=j({start:t,end:e}),r=this.get("src");return Object(d.__assign)({x:n.x,y:n.y,img:r,width:n.width,height:n.height},i)},e.prototype.renderImage=function(t){this.addShape(t,{type:"image",id:this.getElementId("image"),name:"annotation-image",attrs:this.getImageAttrs()})},e}(N),Z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"dataMarker",locationType:"point",x:0,y:0,point:{},line:{},text:{},direction:"upward",autoAdjust:!0,coordinateBBox:null,defaultCfg:{point:{display:!0,style:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2}},line:{display:!0,length:20,style:{stroke:z.lineColor,lineWidth:1}},text:{content:"",display:!0,style:{fill:z.textColor,opacity:.65,fontSize:12,textAlign:"start",fontFamily:z.fontFamily}}}})},e.prototype.renderInner=function(t){Object(g.get)(this.get("line"),"display")&&this.renderLine(t),Object(g.get)(this.get("text"),"display")&&this.renderText(t),Object(g.get)(this.get("point"),"display")&&this.renderPoint(t),this.get("autoAdjust")&&this.autoAdjust(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x")+this.get("offsetX"),y:this.get("y")+this.get("offsetY")})},e.prototype.renderPoint=function(t){var e=this.getShapeAttrs().point;this.addShape(t,{type:"circle",id:this.getElementId("point"),name:"annotation-point",attrs:e})},e.prototype.renderLine=function(t){var e=this.getShapeAttrs().line;this.addShape(t,{type:"path",id:this.getElementId("line"),name:"annotation-line",attrs:e})},e.prototype.renderText=function(t){var e=this.getShapeAttrs().text,i=e.x,n=e.y,r=e.text,o=Object(d.__rest)(e,["x","y","text"]),a=this.get("text"),s=a.background,l=a.maxLength,u=a.autoEllipsis,c=a.isVertival,h=a.ellipsisPosition;V(t,{x:i,y:n,id:this.getElementId("text"),name:"annotation-text",content:r,style:o,background:s,maxLength:l,autoEllipsis:u,isVertival:c,ellipsisPosition:h})},e.prototype.autoAdjust=function(t){var e=this.get("direction"),i=this.get("x"),n=this.get("y"),r=Object(g.get)(this.get("line"),"length",0),o=this.get("coordinateBBox"),a=t.getBBox(),s=a.minX,l=a.maxX,u=a.minY,c=a.maxY,h=t.findById(this.getElementId("text-group")),p=t.findById(this.getElementId("text")),f=t.findById(this.getElementId("line"));if(o){if(h){if(i+s<=o.minX){var d=o.minX-(i+s);M(h,h.attr("x")+d,h.attr("y"))}if(i+l>=o.maxX){d=i+l-o.maxX;M(h,h.attr("x")-d,h.attr("y"))}}if("upward"===e&&n+u<=o.minY||"upward"!==e&&n+c>=o.maxY){var y=void 0,v=void 0;"upward"===e&&n+u<=o.minY?(y="top",v=1):(y="bottom",v=-1),p.attr("textBaseline",y),f&&f.attr("path",[["M",0,0],["L",0,r*v]]),M(h,h.attr("x"),(r+2)*v)}}},e.prototype.getShapeAttrs=function(){var t=Object(g.get)(this.get("line"),"display"),e=Object(g.get)(this.get("point"),"style",{}),i=Object(g.get)(this.get("line"),"style",{}),n=Object(g.get)(this.get("text"),"style",{}),r=this.get("direction"),o=t?Object(g.get)(this.get("line"),"length",0):0,a="upward"===r?-1:1;return{point:Object(d.__assign)({x:0,y:0},e),line:Object(d.__assign)({path:[["M",0,0],["L",0,o*a]]},i),text:Object(d.__assign)({x:0,y:(o+2)*a,text:Object(g.get)(this.get("text"),"content",""),textBaseline:"upward"===r?"bottom":"top"},n)}},e}(N),$=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"dataRegion",locationType:"points",points:[],lineLength:0,region:{},text:{},defaultCfg:{region:{style:{lineWidth:0,fill:z.regionColor,opacity:.4}},text:{content:"",style:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:z.textColor,fontFamily:z.fontFamily}}}})},e.prototype.renderInner=function(t){var e=Object(g.get)(this.get("region"),"style",{}),i=(Object(g.get)(this.get("text"),"style",{}),this.get("lineLength")||0),n=this.get("points");if(n.length){var r=function(t){var e=t.map((function(t){return t.x})),i=t.map((function(t){return t.y})),n=Math.min.apply(Math,e),r=Math.min.apply(Math,i),o=Math.max.apply(Math,e),a=Math.max.apply(Math,i);return{x:n,y:r,minX:n,minY:r,maxX:o,maxY:a,width:o-n,height:a-r}}(n),o=[];o.push(["M",n[0].x,r.minY-i]),n.forEach((function(t){o.push(["L",t.x,t.y])})),o.push(["L",n[n.length-1].x,n[n.length-1].y-i]),this.addShape(t,{type:"path",id:this.getElementId("region"),name:"annotation-region",attrs:Object(d.__assign)({path:o},e)}),V(t,Object(d.__assign)({id:this.getElementId("text"),name:"annotation-text",x:(r.minX+r.maxX)/2,y:r.minY-i},this.get("text")))}},e}(N),Q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"annotation",type:"regionFilter",locationType:"region",start:null,end:null,color:null,shape:[]})},e.prototype.renderInner=function(t){var e=this,i=this.get("start"),n=this.get("end"),r=this.addGroup(t,{id:this.getElementId("region-filter"),capture:!1});Object(g.each)(this.get("shapes"),(function(t,i){var n=t.get("type"),o=Object(g.clone)(t.attr());e.adjustShapeAttrs(o),e.addShape(r,{id:e.getElementId("shape-"+n+"-"+i),capture:!1,type:n,attrs:o})}));var o=j({start:i,end:n});r.setClip({type:"rect",attrs:{x:o.minX,y:o.minY,width:o.width,height:o.height}})},e.prototype.adjustShapeAttrs=function(t){var e=this.get("color");t.fill&&(t.fill=t.fillStyle=e),t.stroke=t.strokeStyle=e},e}(N);function J(t,e,i){var n=e+"Style",r=null;return Object(g.each)(i,(function(e,i){t[i]&&e[n]&&(r||(r={}),Object(g.mix)(r,e[n]))})),r}var tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"axis",ticks:[],line:{},tickLine:{},subTickLine:null,title:null,label:{},verticalFactor:1,verticalLimitLength:null,overlapOrder:["autoRotate","autoEllipsis","autoHide"],tickStates:{},defaultCfg:{line:{style:{lineWidth:1,stroke:z.lineColor}},tickLine:{style:{lineWidth:1,stroke:z.lineColor},alignTick:!0,length:5,displayWithLabel:!0},subTickLine:{style:{lineWidth:1,stroke:z.lineColor},count:4,length:2},label:{autoRotate:!0,autoHide:!1,autoEllipsis:!1,style:{fontSize:12,fill:z.textColor,textBaseline:"middle",fontFamily:z.fontFamily,fontWeight:"normal"},offset:10},title:{autoRotate:!0,spacing:5,position:"center",style:{fontSize:12,fill:z.textColor,textBaseline:"middle",fontFamily:z.fontFamily,textAlign:"center"}},tickStates:{active:{labelStyle:{fontWeight:500},tickLineStyle:{lineWidth:2}},inactive:{labelStyle:{fill:z.uncheckedColor}}}}})},e.prototype.renderInner=function(t){this.get("line")&&this.drawLine(t),this.drawTicks(t),this.get("title")&&this.drawTitle(t)},e.prototype.isList=function(){return!0},e.prototype.getItems=function(){return this.get("ticks")},e.prototype.setItems=function(t){this.update({ticks:t})},e.prototype.updateItem=function(t,e){Object(g.mix)(t,e),this.clear(),this.render()},e.prototype.clearItems=function(){var t=this.getElementByLocalId("label-group");t&&t.clear()},e.prototype.setItemState=function(t,e,i){t[e]=i,this.updateTickStates(t)},e.prototype.hasState=function(t,e){return!!t[e]},e.prototype.getItemStates=function(t){var e=this.get("tickStates"),i=[];return Object(g.each)(e,(function(e,n){t[n]&&i.push(n)})),i},e.prototype.clearItemsState=function(t){var e=this,i=this.getItemsByState(t);Object(g.each)(i,(function(i){e.setItemState(i,t,!1)}))},e.prototype.getItemsByState=function(t){var e=this,i=this.getItems();return Object(g.filter)(i,(function(i){return e.hasState(i,t)}))},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.getTextAnchor=function(t){var e;return Object(g.isNumberEqual)(t[0],0)?e="center":t[0]>0?e="start":t[0]<0&&(e="end"),e},e.prototype.processOverlap=function(t){},e.prototype.drawLine=function(t){var e=this.getLinePath(),i=this.get("line");this.addShape(t,{type:"path",id:this.getElementId("line"),name:"axis-line",attrs:Object(g.mix)({path:e},i.style)})},e.prototype.getTickLineItems=function(t){var e=this,i=[],n=this.get("tickLine"),r=n.alignTick,o=n.length,a=1;return t.length>=2&&(a=t[1].value-t[0].value),Object(g.each)(t,(function(t){var n=t.point;r||(n=e.getTickPoint(t.value-a/2));var s=e.getSidePoint(n,o);i.push({startPoint:n,tickValue:t.value,endPoint:s,tickId:t.id,id:"tickline-"+t.id})})),i},e.prototype.getSubTickLineItems=function(t){var e=[],i=this.get("subTickLine"),n=i.count,r=t.length;if(r>=2)for(var o=0;o1){u=Math.ceil(u);for(var h=0;hi:a=o>Math.abs(r[1].attr("x")-r[0].attr("x"));a&&function(t,e){Object(g.each)(t,(function(t){var i=b({x:t.attr("x"),y:t.attr("y")},e);t.attr("matrix",i)}))}(r,n(i,o));return a}function gt(){return yt}function yt(t,e,i){return dt(t,e,i,(function(){return t?z.verticalAxisRotate:z.horizontalAxisRotate}))}function vt(t,e,i){return dt(t,e,i,(function(e,i){if(!e)return t?z.verticalAxisRotate:z.horizontalAxisRotate;if(t)return-Math.acos(e/i);var n=0;return(e>i||(n=Math.asin(e/i))>Math.PI/4)&&(n=Math.PI/4),n}))}var mt,xt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getLinePath=function(){var t=this.get("start"),e=this.get("end"),i=[];return i.push(["M",t.x,t.y]),i.push(["L",e.x,e.y]),i},e.prototype.getInnerLayoutBBox=function(){var e=this.get("start"),i=this.get("end"),n=t.prototype.getInnerLayoutBBox.call(this),r=Math.min(e.x,i.x,n.x),o=Math.min(e.y,i.y,n.y),a=Math.max(e.x,i.x,n.maxX),s=Math.max(e.y,i.y,n.maxY);return{x:r,y:o,minX:r,minY:o,maxX:a,maxY:s,width:a-r,height:s-o}},e.prototype.isVertical=function(){var t=this.get("start"),e=this.get("end");return Object(g.isNumberEqual)(t.x,e.x)},e.prototype.isHorizontal=function(){var t=this.get("start"),e=this.get("end");return Object(g.isNumberEqual)(t.y,e.y)},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.getSideVector=function(t){var e=this.getAxisVector(),i=m.vec2.normalize([0,0],e),n=this.get("verticalFactor"),r=[i[1],-1*i[0]];return m.vec2.scale([0,0],r,t*n)},e.prototype.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},e.prototype.processOverlap=function(t){var e=this,i=this.isVertical(),n=this.isHorizontal();if(i||n){var r=this.get("label"),o=this.get("title"),a=this.get("verticalLimitLength"),s=r.offset,l=a,u=0,c=0;o&&(u=o.style.fontSize,c=o.spacing),l&&(l=l-s-c-u);var h=this.get("overlapOrder");if(Object(g.each)(h,(function(i){r[i]&&e.autoProcessOverlap(i,r[i],t,l)})),o){var p=t.getBBox(),f=i?p.width:p.height;Object(g.isNil)(o.offset)&&(o.offset=s+f+c+u/2)}}},e.prototype.autoProcessOverlap=function(t,e,i,n){var r=this,o=this.isVertical(),a=!1,l=s[t];if(!0===e?a=l.getDefault()(o,i,n):Object(g.isFunction)(e)?a=e(o,i,n):l[e]&&(a=l[e](o,i,n)),"autoRotate"===t){if(a){var u=i.getChildren(),c=this.get("verticalFactor");Object(g.each)(u,(function(t){if("center"===t.attr("textAlign")){var e=c>0?"end":"start";t.attr("textAlign",e)}}))}}else if("autoHide"===t){var h=i.getChildren().slice(0);Object(g.each)(h,(function(t){t.get("visible")||(r.get("isRegister")&&r.unregisterElement(t),t.remove())}))}},e}(tt),bt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"circle",locationType:"circle",center:null,radius:null,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getLinePath=function(){var t=this.get("center"),e=t.x,i=t.y,n=this.get("radius"),r=n,o=this.get("startAngle"),a=this.get("endAngle"),s=[];if(Math.abs(a-o)===2*Math.PI)s=[["M",e,i-r],["A",n,r,0,1,1,e,i+r],["A",n,r,0,1,1,e,i-r],["Z"]];else{var l=this.getCirclePoint(o),u=this.getCirclePoint(a),c=Math.abs(a-o)>Math.PI?1:0,h=o>a?0:1;s=[["M",e,i],["L",l.x,l.y],["A",n,r,0,c,h,u.x,u.y],["L",e,i]]}return s},e.prototype.getTickPoint=function(t){var e=this.get("startAngle"),i=e+(this.get("endAngle")-e)*t;return this.getCirclePoint(i)},e.prototype.getSideVector=function(t,e){var i=this.get("center"),n=[e.x-i.x,e.y-i.y],r=this.get("verticalFactor"),o=m.vec2.length(n);return m.vec2.scale(n,n,r*t/o),n},e.prototype.getAxisVector=function(t){var e=this.get("center"),i=[t.x-e.x,t.y-e.y];return[i[1],-1*i[0]]},e.prototype.getCirclePoint=function(t,e){var i=this.get("center");return e=e||this.get("radius"),{x:i.x+Math.cos(t)*e,y:i.y+Math.sin(t)*e}},e}(tt),_t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"crosshair",type:"base",line:{},text:null,textBackground:{},capture:!1,defaultCfg:{line:{style:{lineWidth:1,stroke:z.lineColor}},text:{position:"start",offset:10,autoRotate:!1,content:null,style:{fill:z.textColor,textAlign:"center",textBaseline:"middle",fontFamily:z.fontFamily}},textBackground:{padding:5,style:{stroke:z.lineColor}}}})},e.prototype.renderInner=function(t){this.get("line")&&this.renderLine(t),this.get("text")&&(this.renderText(t),this.renderBackground(t))},e.prototype.renderText=function(t){var e=this.get("text"),i=e.style,n=e.autoRotate,r=e.content;if(!Object(g.isNil)(r)){var o=this.getTextPoint(),a=null;if(n)a=b(o,this.getRotateAngle());this.addShape(t,{type:"text",name:"crosshair-text",id:this.getElementId("text"),attrs:Object(d.__assign)(Object(d.__assign)(Object(d.__assign)({},o),{text:r,matrix:a}),i)})}},e.prototype.renderLine=function(t){var e=this.getLinePath(),i=this.get("line").style;this.addShape(t,{type:"path",name:"crosshair-line",id:this.getElementId("line"),attrs:Object(d.__assign)({path:e},i)})},e.prototype.renderBackground=function(t){var e=this.getElementId("text"),i=t.findById(e),n=this.get("textBackground");if(n&&i){var r=i.getBBox(),o=C(n.padding),a=n.style;this.addShape(t,{type:"rect",name:"crosshair-text-background",id:this.getElementId("text-background"),attrs:Object(d.__assign)({x:r.x-o[3],y:r.y-o[0],width:r.width+o[1]+o[3],height:r.height+o[0]+o[2],matrix:i.attr("matrix")},a)}).toBack()}},e}(N),Ot=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"line",locationType:"region",start:null,end:null})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.start,i=t.end,n=this.get("text").position,r=Math.atan2(i.y-e.y,i.x-e.x);return"start"===n?r-Math.PI/2:r+Math.PI/2},e.prototype.getTextPoint=function(){var t=this.getLocation(),e=t.start,i=t.end,n=this.get("text");return I(e,i,n.position,n.offset)},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.start,i=t.end;return[["M",e.x,e.y],["L",i.x,i.y]]},e}(_t),wt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"circle",locationType:"circle",center:null,radius:100,startAngle:-Math.PI/2,endAngle:3*Math.PI/2})},e.prototype.getRotateAngle=function(){var t=this.getLocation(),e=t.startAngle,i=t.endAngle;return"start"===this.get("text").position?e+Math.PI/2:i-Math.PI/2},e.prototype.getTextPoint=function(){var t=this.get("text"),e=t.position,i=t.offset,n=this.getLocation(),r=n.center,o=n.radius,a=n.startAngle,s=n.endAngle,l="start"===e?a:s,u=this.getRotateAngle()-Math.PI,c=A(r,o,l),h=Math.cos(u)*i,p=Math.sin(u)*i;return{x:c.x+h,y:c.y+p}},e.prototype.getLinePath=function(){var t=this.getLocation(),e=t.center,i=t.radius,n=t.startAngle,r=t.endAngle,o=null;if(r-n==2*Math.PI){var a=e.x,s=e.y;o=[["M",a,s-i],["A",i,i,0,1,1,a,s+i],["A",i,i,0,1,1,a,s-i],["Z"]]}else{var l=A(e,i,n),u=A(e,i,r),c=Math.abs(r-n)>Math.PI?1:0,h=n>r?0:1;o=[["M",l.x,l.y],["A",i,i,0,c,h,u.x,u.y]]}return o},e}(_t),Mt=i(7),Ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{container:null,containerTpl:"
",updateAutoRender:!0,containerClassName:"",parent:null})},e.prototype.getContainer=function(){return this.get("container")},e.prototype.show=function(){this.get("container").style.display="",this.set("visible",!0)},e.prototype.hide=function(){this.get("container").style.display="none",this.set("visible",!1)},e.prototype.setCapture=function(t){var e=t?"auto":"none";this.getContainer().style.pointerEvents=e,this.set("capture",t)},e.prototype.getBBox=function(){var t=this.getContainer();return P(parseFloat(t.style.left)||0,parseFloat(t.style.top)||0,t.clientWidth,t.clientHeight)},e.prototype.clear=function(){S(this.get("container"))},e.prototype.destroy=function(){this.removeEvent(),this.removeDom(),t.prototype.destroy.call(this)},e.prototype.init=function(){t.prototype.init.call(this),this.initContainer(),this.initDom(),this.resetStyles(),this.applyStyles(),this.initEvent(),this.initCapture(),this.initVisible()},e.prototype.initCapture=function(){this.setCapture(this.get("capture"))},e.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},e.prototype.initDom=function(){},e.prototype.initContainer=function(){var t=this.get("container");if(Object(g.isNil)(t)){t=this.createDom();var e=this.get("parent");Object(g.isString)(e)&&(e=document.getElementById(e),this.set("parent",e)),e.appendChild(t),this.set("container",t)}else Object(g.isString)(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},e.prototype.resetStyles=function(){var t=this.get("domStyles"),e=this.get("defaultStyles");t=t?Object(g.deepMix)({},e,t):e,this.set("domStyles",t)},e.prototype.applyStyles=function(){var t=this.get("domStyles");if(t){var e=this.getContainer();this.applyChildrenStyles(e,t);var i,n=this.get("containerClassName");if(n&&(i=n,e.className.match(new RegExp("(\\s|^)"+i+"(\\s|$)")))){var r=t[n];Object(Mt.modifyCSS)(e,r)}}},e.prototype.applyChildrenStyles=function(t,e){Object(g.each)(e,(function(e,i){var n=t.getElementsByClassName(i);Object(g.each)(n,(function(t){Object(Mt.modifyCSS)(t,e)}))}))},e.prototype.applyStyle=function(t,e){var i=this.get("domStyles");Object(Mt.modifyCSS)(e,i[t])},e.prototype.createDom=function(){var t=this.get("containerTpl");return Object(Mt.createDom)(t)},e.prototype.initEvent=function(){},e.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode.removeChild(t)},e.prototype.removeEvent=function(){},e.prototype.updateInner=function(t){Object(g.hasKey)(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},e.prototype.resetPosition=function(){},e}(B),St=((mt={})["g2-crosshair"]={position:"relative"},mt["g2-crosshair-line"]={position:"absolute",backgroundColor:"rgba(0, 0, 0, 0.25)"},mt["g2-crosshair-text"]={position:"absolute",color:z.textColor,fontFamily:z.fontFamily},mt),jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"crosshair",type:"html",locationType:"region",start:{x:0,y:0},end:{x:0,y:0},capture:!1,text:null,containerTpl:'
',crosshairTpl:'
',textTpl:'{content}',domStyles:null,containerClassName:"g2-crosshair",defaultStyles:St,defaultCfg:{text:{position:"start",content:null,align:"center",offset:10}}})},e.prototype.render=function(){this.resetText(),this.resetPosition()},e.prototype.initCrossHair=function(){var t=this.getContainer(),e=this.get("crosshairTpl"),i=Object(Mt.createDom)(e);t.appendChild(i),this.applyStyle("g2-crosshair-line",i),this.set("crosshairEl",i)},e.prototype.getTextPoint=function(){var t=this.getLocation(),e=t.start,i=t.end,n=this.get("text");return I(e,i,n.position,n.offset)},e.prototype.resetText=function(){var t=this.get("text"),e=this.get("textEl");if(t){var i=t.content;if(!e){var n=this.getContainer(),r=Object(g.substitute)(this.get("textTpl"),t);e=Object(Mt.createDom)(r),n.appendChild(e),this.applyStyle("g2-crosshair-text",e),this.set("textEl",e)}e.innerHTML=i}else e&&e.remove()},e.prototype.isVertical=function(t,e){return t.x===e.x},e.prototype.resetPosition=function(){var t=this.get("crosshairEl");t||(this.initCrossHair(),t=this.get("crosshairEl"));var e=this.get("start"),i=this.get("end"),n=Math.min(e.x,i.x),r=Math.min(e.y,i.y);this.isVertical(e,i)?Object(Mt.modifyCSS)(t,{width:"1px",height:L(Math.abs(i.y-e.y))}):Object(Mt.modifyCSS)(t,{height:"1px",width:L(Math.abs(i.x-e.x))}),Object(Mt.modifyCSS)(t,{top:L(r),left:L(n)}),this.alignText()},e.prototype.alignText=function(){var t=this.get("textEl");if(t){var e=this.get("text").align,i=t.clientWidth,n=this.getTextPoint();switch(e){case"center":n.x=n.x-i/2;break;case"right":n.x=n.x-i}Object(Mt.modifyCSS)(t,{top:L(n.y),left:L(n.x)})}},e.prototype.updateInner=function(e){Object(g.hasKey)(e,"text")&&this.resetText(),t.prototype.updateInner.call(this,e)},e}(Ct),Pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"grid",line:{},alternateColor:null,capture:!1,items:[],closed:!1,defaultCfg:{line:{type:"line",style:{lineWidth:1,stroke:z.lineColor}}}})},e.prototype.getLineType=function(){return(this.get("line")||this.get("defaultCfg").line).type},e.prototype.renderInner=function(t){this.drawGrid(t)},e.prototype.getAlternatePath=function(t,e){var i=this.getGridPath(t),n=e.slice(0).reverse(),r=this.getGridPath(n,!0);return this.get("closed")?i=i.concat(r):(r[0][0]="L",(i=i.concat(r)).push(["Z"])),i},e.prototype.getPathStyle=function(){return this.get("line").style},e.prototype.drawGrid=function(t){var e=this,i=this.get("line"),n=this.get("items"),r=this.get("alternateColor"),o=null;Object(g.each)(n,(function(n,a){var s=n.id||a;if(i){var l=e.getPathStyle(),u=e.getElementId("line-"+s),c=e.getGridPath(n.points);e.addShape(t,{type:"path",name:"grid-line",id:u,attrs:Object(g.mix)({path:c},l)})}if(r&&a>0){var h=e.getElementId("region-"+s),p=a%2==0;if(Object(g.isString)(r))p&&e.drawAlternateRegion(h,t,o.points,n.points,r);else{var f=p?r[1]:r[0];e.drawAlternateRegion(h,t,o.points,n.points,f)}}o=n}))},e.prototype.drawAlternateRegion=function(t,e,i,n,r){var o=this.getAlternatePath(i,n);this.addShape(e,{type:"path",id:t,name:"grid-region",attrs:{path:o,fill:r}})},e}(N);var Tt,At=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"circle",center:null,closed:!0})},e.prototype.getGridPath=function(t,e){var i,n,r,o,a,s,l=this.getLineType(),u=this.get("closed"),c=[];if(t.length)if("circle"===l){var h=this.get("center"),p=t[0],f=(i=h.x,n=h.y,r=p.x,o=p.y,a=r-i,s=o-n,Math.sqrt(a*a+s*s)),d=e?0:1;u?(c.push(["M",h.x,h.y-f]),c.push(["A",f,f,0,0,d,h.x,h.y+f]),c.push(["A",f,f,0,0,d,h.x,h.y-f]),c.push(["Z"])):Object(g.each)(t,(function(t,e){0===e?c.push(["M",t.x,t.y]):c.push(["A",f,f,0,0,d,t.x,t.y])}))}else Object(g.each)(t,(function(t,e){0===e?c.push(["M",t.x,t.y]):c.push(["L",t.x,t.y])})),u&&c.push(["Z"]);return c},e}(Pt),Et=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"line"})},e.prototype.getGridPath=function(t){var e=[];return Object(g.each)(t,(function(t,i){0===i?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])})),e},e}(Pt),Lt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"legend",layout:"horizontal",locationType:"point",x:0,y:0,offsetX:0,offsetY:0,title:null,background:null})},e.prototype.getLayoutBBox=function(){var e=t.prototype.getLayoutBBox.call(this),i=this.get("x"),n=this.get("y"),r=this.get("offsetX"),o=this.get("offsetY"),a=this.get("maxWidth"),s=this.get("maxHeight"),l=i+r,u=n+o,c=e.maxX-l,h=e.maxY-u;return a&&(c=Math.min(c,a)),s&&(h=Math.min(h,s)),P(l,u,c,h)},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetLocation()},e.prototype.resetLocation=function(){var t=this.get("x"),e=this.get("y"),i=this.get("offsetX"),n=this.get("offsetY");this.moveElementTo(this.get("group"),{x:t+i,y:e+n})},e.prototype.applyOffset=function(){this.resetLocation()},e.prototype.getDrawPoint=function(){return this.get("currentPoint")},e.prototype.setDrawPoint=function(t){return this.set("currentPoint",t)},e.prototype.renderInner=function(t){this.resetDraw(),this.get("title")&&this.drawTitle(t),this.drawLegendContent(t),this.get("background")&&this.drawBackground(t)},e.prototype.drawBackground=function(t){var e=this.get("background"),i=t.getBBox(),n=C(e.padding),r=Object(d.__assign)({x:0,y:0,width:i.width+n[1]+n[3],height:i.height+n[0]+n[2]},e.style);this.addShape(t,{type:"rect",id:this.getElementId("background"),name:"legend-background",attrs:r}).toBack()},e.prototype.drawTitle=function(t){var e=this.get("currentPoint"),i=this.get("title"),n=i.spacing,r=i.style,o=i.text,a=this.addShape(t,{type:"text",id:this.getElementId("title"),name:"legend-title",attrs:Object(d.__assign)({text:o,x:e.x,y:e.y},r)}).getBBox();this.set("currentPoint",{x:e.x,y:a.maxY+n})},e.prototype.resetDraw=function(){var t=this.get("background"),e={x:0,y:0};if(t){var i=C(t.padding);e.x=i[3],e.y=i[0]}this.set("currentPoint",e)},e}(N),It=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.currentPageIndex=1,e.totalPagesCnt=1,e.pageWidth=0,e.pageHeight=0,e.startX=0,e.startY=0,e.onNavigationBack=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndex>1){e.currentPageIndex-=1,e.updateNavigation();var i=e.getCurrentNavigationMatrix();e.get("animate")?t.animate({matrix:i},100):t.attr({matrix:i})}},e.onNavigationAfter=function(){var t=e.getElementByLocalId("item-group");if(e.currentPageIndexf&&(f=v),"horizontal"===c?(d&&dm&&(m=e.width)})),x=m,m+=c,s&&(m=Math.min(s,m),x=Math.min(s,x)),this.pageWidth=m,this.pageHeight=l-Math.max(f.height,h);var b=Math.floor(this.pageHeight/h);Object(g.each)(a,(function(t,e){0!==e&&e%b==0&&(y+=1,d.x+=m,d.y=r),i.moveElementTo(t,d),t.getParent().setClip({type:"rect",attrs:{x:d.x,y:d.y,width:m,height:h}}),d.y+=h})),this.totalPagesCnt=y,this.moveElementTo(p,{x:n+x/2-f.width/2-f.minX,y:l-f.height-f.minY})}this.pageHeight&&this.pageWidth&&e.getParent().setClip({type:"rect",attrs:{x:this.startX,y:this.startY,width:this.pageWidth,height:this.pageHeight}}),this.totalPagesCnt=y,this.currentPageIndex>this.totalPagesCnt&&(this.currentPageIndex=1),this.updateNavigation(p),e.attr("matrix",this.getCurrentNavigationMatrix())},e.prototype.drawNavigation=function(t,e,i,n){var r={x:0,y:0},o=this.addGroup(t,{id:this.getElementId("navigation-group"),name:"legend-navigation"}),a=this.drawArrow(o,r,"navigation-arrow-left","horizontal"===e?"up":"left",n);a.on("click",this.onNavigationBack);var s=a.getBBox();r.x+=s.width+2;var l=this.addShape(o,{type:"text",id:this.getElementId("navigation-text"),name:"navigation-text",attrs:{x:r.x,y:r.y+n/2,text:i,fontSize:12,fill:"#ccc",textBaseline:"middle"}}).getBBox();return r.x+=l.width+2,this.drawArrow(o,r,"navigation-arrow-right","horizontal"===e?"down":"right",n).on("click",this.onNavigationAfter),o},e.prototype.updateNavigation=function(t){var e=this.currentPageIndex+"/"+this.totalPagesCnt,i=t?t.getChildren()[1]:this.getElementByLocalId("navigation-text"),n=t?t.findById(this.getElementId("navigation-arrow-left")):this.getElementByLocalId("navigation-arrow-left"),r=t?t.findById(this.getElementId("navigation-arrow-right")):this.getElementByLocalId("navigation-arrow-right"),o=i.getBBox();i.attr("text",e);var a=i.getBBox();i.attr("x",i.attr("x")-(a.width-o.width)/2),n.attr("opacity",1===this.currentPageIndex?.45:1),n.attr("cursor",1===this.currentPageIndex?"not-allowed":"pointer"),r.attr("opacity",this.currentPageIndex===this.totalPagesCnt?.45:1),r.attr("cursor",this.currentPageIndex===this.totalPagesCnt?"not-allowed":"pointer")},e.prototype.drawArrow=function(t,e,i,n,r){var o=e.x,a=e.y,s={right:90*Math.PI/180,left:270*Math.PI/180,up:0,down:180*Math.PI/180},l=this.addShape(t,{type:"path",id:this.getElementId(i),name:i,attrs:{path:[["M",o+r/2,a],["L",o,a+r],["L",o+r,a+r],["Z"]],fill:"#000",cursor:"pointer"}});return l.attr("matrix",b({x:o+r/2,y:a+r/2},s[n])),l},e.prototype.getCurrentNavigationMatrix=function(){var t=this.currentPageIndex,e=this.pageWidth,i=this.pageHeight;return _("horizontal"===this.get("layout")?{x:0,y:i*(1-t)}:{x:e*(1-t),y:0})},e.prototype.applyItemStates=function(t,e){if(this.getItemStates(t).length>0){var i=e.getChildren(),n=this.get("itemStates");Object(g.each)(i,(function(e){var i=e.get("name").split("-")[2],r=J(t,i,n);r&&(e.attr(r),"marker"!==i||e.get("isStroke")&&e.get("isFill")||(e.get("isStroke")&&e.attr("fill",null),e.get("isFill")&&e.attr("stroke",null)))}))}},e.prototype.getLimitItemWidth=function(){var t=this.get("itemWidth"),e=this.get("maxItemWidth");return e?t&&(e=t<=e?t:e):t&&(e=t),e},e}(Lt),Dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{type:"continue",min:0,max:100,value:null,colors:[],track:{},rail:{},label:{},handler:{},slidable:!0,tip:null,step:null,maxWidth:null,maxHeight:null,defaultCfg:{label:{align:"rail",spacing:5,formatter:null,style:{fontSize:12,fill:z.textColor,textBaseline:"middle",fontFamily:z.fontFamily}},handler:{size:10,style:{fill:"#fff",stroke:"#333"}},track:{},rail:{type:"color",size:20,defaultLength:100,style:{fill:"#DCDEE2"}},title:{spacing:5,style:{fill:z.textColor,fontSize:12,textAlign:"start",textBaseline:"top"}}}})},e.prototype.isSlider=function(){return!0},e.prototype.getValue=function(){return this.getCurrentValue()},e.prototype.getRange=function(){return{min:this.get("min"),max:this.get("max")}},e.prototype.setRange=function(t,e){this.update({min:t,max:e})},e.prototype.setValue=function(t){var e=this.getValue();this.set("value",t);var i=this.get("group");this.resetTrackClip(),this.get("slidable")&&this.resetHandlers(i),this.delegateEmit("valuechanged",{originValue:e,value:t})},e.prototype.initEvent=function(){var t=this.get("group");this.bindSliderEvent(t),this.bindRailEvent(t),this.bindTrackEvent(t)},e.prototype.drawLegendContent=function(t){this.drawRail(t),this.drawLabels(t),this.fixedElements(t),this.resetTrack(t),this.resetTrackClip(t),this.get("slidable")&&this.resetHandlers(t)},e.prototype.bindSliderEvent=function(t){this.bindHandlersEvent(t)},e.prototype.bindHandlersEvent=function(t){var e=this;t.on("legend-handler-min:drag",(function(t){var i=e.getValueByCanvasPoint(t.x,t.y),n=e.getCurrentValue()[1];ni&&(n=i),e.setValue([n,i])}))},e.prototype.bindRailEvent=function(t){},e.prototype.bindTrackEvent=function(t){var e=this,i=null;t.on("legend-track:dragstart",(function(t){i={x:t.x,y:t.y}})),t.on("legend-track:drag",(function(t){if(i){var n=e.getValueByCanvasPoint(i.x,i.y),r=e.getValueByCanvasPoint(t.x,t.y),o=e.getCurrentValue(),a=o[1]-o[0],s=e.getRange(),l=r-n;l<0?o[0]+l>s.min?e.setValue([o[0]+l,o[1]+l]):e.setValue([s.min,s.min+a]):l>0&&(l>0&&o[1]+lr&&(l=r),l0&&this.changeRailLength(n,r,i[r]-u)}},e.prototype.changeRailLength=function(t,e,i){var n,r=t.getBBox();n="height"===e?this.getRailPath(r.x,r.y,r.width,i):this.getRailPath(r.x,r.y,i,r.height),t.attr("path",n)},e.prototype.changeRailPosition=function(t,e,i){var n=t.getBBox(),r=this.getRailPath(e,i,n.width,n.height);t.attr("path",r)},e.prototype.fixedHorizontal=function(t,e,i,n){var r=this.get("label"),o=r.align,a=r.spacing,s=i.getBBox(),l=t.getBBox(),u=e.getBBox(),c=s.height;this.fitRailLength(l,u,s,i),s=i.getBBox(),"rail"===o?(t.attr({x:n.x,y:n.y+c/2}),this.changeRailPosition(i,n.x+l.width+a,n.y),e.attr({x:n.x+l.width+s.width+2*a,y:n.y+c/2})):"top"===o?(t.attr({x:n.x,y:n.y}),e.attr({x:n.x+s.width,y:n.y}),this.changeRailPosition(i,n.x,n.y+l.height+a)):(this.changeRailPosition(i,n.x,n.y),t.attr({x:n.x,y:n.y+s.height+a}),e.attr({x:n.x+s.width,y:n.y+s.height+a}))},e.prototype.fixedVertail=function(t,e,i,n){var r=this.get("label"),o=r.align,a=r.spacing,s=i.getBBox(),l=t.getBBox(),u=e.getBBox();if(this.fitRailLength(l,u,s,i),s=i.getBBox(),"rail"===o)t.attr({x:n.x,y:n.y}),this.changeRailPosition(i,n.x,n.y+l.height+a),e.attr({x:n.x,y:n.y+l.height+s.height+2*a});else if("right"===o)t.attr({x:n.x+s.width+a,y:n.y}),this.changeRailPosition(i,n.x,n.y),e.attr({x:n.x+s.width+a,y:n.y+s.height});else{var c=Math.max(l.width,u.width);t.attr({x:n.x,y:n.y}),this.changeRailPosition(i,n.x+c+a,n.y),e.attr({x:n.x,y:n.y+s.height})}},e}(Lt),kt=i(40),Bt="g2-tooltip",Ft="g2-tooltip-title",Rt="g2-tooltip-list",Nt="g2-tooltip-list-item",Yt="g2-tooltip-marker",Gt="g2-tooltip-value",Xt="g2-tooltip-name",Vt="g2-tooltip-crosshair-x",zt="g2-tooltip-crosshair-y",Ht=((Tt={})[""+Bt]={position:"absolute",visibility:"visible",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:z.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},Tt[""+Ft]={marginBottom:"4px"},Tt[""+Rt]={margin:"0px",listStyleType:"none",padding:"0px"},Tt[""+Nt]={listStyleType:"none",marginBottom:"4px"},Tt[""+Yt]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},Tt[""+Gt]={display:"inline-block",float:"right",marginLeft:"30px"},Tt[""+Vt]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Tt[""+zt]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},Tt);var Wt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"tooltip",type:"html",x:0,y:0,items:[],customContent:null,containerTpl:'
    ',itemTpl:'
  • \n \n {name}:\n {value}\n
  • ',xCrosshairTpl:'
    ',yCrosshairTpl:'
    ',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:Bt,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:Ht})},e.prototype.render=function(){this.get("customContent")?this.renderCustomContent():(this.resetTitle(),this.renderItems()),this.resetPosition()},e.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},e.prototype.show=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!0),Object(Mt.modifyCSS)(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},e.prototype.hide=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!1),Object(Mt.modifyCSS)(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},e.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},e.prototype.setCrossHairsVisible=function(t){var e=t?"":"none",i=this.get("xCrosshairDom"),n=this.get("yCrosshairDom");i&&Object(Mt.modifyCSS)(i,{display:e}),n&&Object(Mt.modifyCSS)(n,{display:e})},e.prototype.initContainer=function(){if(t.prototype.initContainer.call(this),this.get("customContent")){this.get("container")&&this.get("container").remove();var e=this.getHtmlContentNode();this.get("parent").appendChild(e),this.set("container",e),this.resetStyles(),this.applyStyles()}},e.prototype.updateInner=function(e){var i,n,r;this.get("customContent")?this.renderCustomContent():(i=e,n=["title","showTitle"],r=!1,Object(g.each)(n,(function(t){if(Object(g.hasKey)(i,t))return r=!0,!1})),r&&this.resetTitle(),Object(g.hasKey)(e,"items")&&this.renderItems()),t.prototype.updateInner.call(this,e)},e.prototype.initDom=function(){this.cacheDoms()},e.prototype.removeDom=function(){t.prototype.removeDom.call(this),this.clearCrosshairs()},e.prototype.resetPosition=function(){var t,e=this.get("x"),i=this.get("y"),n=this.get("offset"),r=this.getOffset(),o=r.offsetX,a=r.offsetY,s=this.get("position"),l=this.get("region"),u=this.getContainer(),c=this.getBBox(),h=c.width,p=c.height;l&&(t=j(l));var f=function(t,e,i,n,r,o,a){var s=function(t,e,i,n,r,o){var a=t,s=e;switch(o){case"left":a=t-n-i,s=e-r/2;break;case"right":a=t+i,s=e-r/2;break;case"top":a=t-n/2,s=e-r-i;break;case"bottom":a=t-n/2,s=e+i;break;default:a=t+i,s=e-r-i}return{x:a,y:s}}(t,e,i,n,r,o);if(a){var l=function(t,e,i,n,r){return{left:tr.x+r.width,top:er.y+r.height}}(s.x,s.y,n,r,a);"auto"===o?(l.right&&(s.x=Math.max(0,t-n-i)),l.top&&(s.y=Math.max(0,e-r-i))):"top"===o||"bottom"===o?(l.left&&(s.x=a.x),l.right&&(s.x=a.x+a.width-n),"top"===o&&l.top&&(s.y=e+i),"bottom"===o&&l.bottom&&(s.y=e-r-i)):(l.top&&(s.y=a.y),l.bottom&&(s.y=a.y+a.height-r),"left"===o&&l.left&&(s.x=t+i),"right"===o&&l.right&&(s.x=t-n-i))}return s}(e,i,n,h,p,s,t);Object(Mt.modifyCSS)(u,{left:L(f.x+o),top:L(f.y+a)}),this.resetCrosshairs()},e.prototype.renderCustomContent=function(){var t=this.getHtmlContentNode(),e=this.get("parent"),i=this.get("container");i&&i.parentNode===e?e.replaceChild(t,i):e.appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()},e.prototype.getHtmlContentNode=function(){var t,e=this.get("customContent");if(e){var i=e(this.get("title"),this.get("items"));t=Object(g.isElement)(i)?i:Object(Mt.createDom)(i)}return t},e.prototype.cacheDoms=function(){var t=this.getContainer(),e=t.getElementsByClassName(Ft)[0],i=t.getElementsByClassName(Rt)[0];this.set("titleDom",e),this.set("listDom",i)},e.prototype.resetTitle=function(){var t=this.get("title");this.get("showTitle")&&t?this.setTitle(t):this.setTitle("")},e.prototype.setTitle=function(t){var e=this.get("titleDom");e&&(e.innerText=t)},e.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),e=this.get("crosshairs");if(t&&e){var i=j(t),n=this.get("xCrosshairDom"),r=this.get("yCrosshairDom");"x"===e?(this.resetCrosshair("x",i),r&&(r.remove(),this.set("yCrosshairDom",null))):"y"===e?(this.resetCrosshair("y",i),n&&(n.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",i),this.resetCrosshair("y",i)),this.setCrossHairsVisible(this.get("visible"))}else this.clearCrosshairs()},e.prototype.resetCrosshair=function(t,e){var i=this.checkCrosshair(t),n=this.get(t);"x"===t?Object(Mt.modifyCSS)(i,{left:L(n),top:L(e.y),height:L(e.height)}):Object(Mt.modifyCSS)(i,{top:L(n),left:L(e.x),width:L(e.width)})},e.prototype.checkCrosshair=function(t){var e=t+"CrosshairDom",i=t+"CrosshairTpl",n="CROSSHAIR_"+t.toUpperCase(),r=p[n],o=this.get(e),a=this.get("parent");return o||(o=Object(Mt.createDom)(this.get(i)),this.applyStyle(r,o),a.appendChild(o),this.set(e,o)),o},e.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),e=this.get("itemTpl"),i=this.get("listDom");i&&(Object(g.each)(t,(function(t){var n=kt.default.toCSSGradient(t.color),r=Object(d.__assign)(Object(d.__assign)({},t),{color:n}),o=Object(g.substitute)(e,r),a=Object(Mt.createDom)(o);i.appendChild(a)})),this.applyChildrenStyles(i,this.get("domStyles")))},e.prototype.clearItemDoms=function(){this.get("listDom")&&S(this.get("listDom"))},e.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),e=this.get("yCrosshairDom");t&&t.remove(),e&&e.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},e}(Ct),qt={opacity:0},Ut={stroke:"#C5C5C5",strokeOpacity:.85},Kt={fill:"#CACED4",opacity:.85},Zt=i(78),$t=i(21);function Qt(t){return function(t){return Object(g.map)(t,(function(t,e){return[0===e?"M":"L",t[0],t[1]]}))}(t)}function Jt(t,e,i,n){void 0===n&&(n=!0);var r=new $t.Linear({values:t}),o=new $t.Category({values:Object(g.map)(t,(function(t,e){return e}))}),a=Object(g.map)(t,(function(t,n){return[o.scale(n)*e,i-r.scale(t)*i]}));return n?function(t){if(t.length<=2)return Qt(t);var e=[];Object(g.each)(t,(function(t){Object(g.isEqual)(t,e.slice(e.length-2))||e.push(t[0],t[1])}));var i=Object(Zt.a)(e,!1),n=Object(g.head)(t),r=n[0],o=n[1];return i.unshift(["M",r,o]),i}(a):Qt(a)}var te=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"trend",x:0,y:0,width:200,height:16,smooth:!0,isArea:!1,data:[],backgroundStyle:qt,lineStyle:Ut,areaStyle:Kt})},e.prototype.renderInner=function(t){var e=this.cfg,i=e.width,n=e.height,r=e.data,o=e.smooth,a=e.isArea,s=e.backgroundStyle,l=e.lineStyle,u=e.areaStyle;this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:Object(d.__assign)({x:0,y:0,width:i,height:n},s)});var c=Jt(r,i,n,o);if(this.addShape(t,{id:this.getElementId("line"),type:"path",attrs:Object(d.__assign)({path:c},l)}),a){var h=function(t,e,i){var n=Object(d.__spreadArrays)(t);return n.push(["L",e,0]),n.push(["L",0,i]),n.push(["Z"]),n}(c,i,n);this.addShape(t,{id:this.getElementId("area"),type:"path",attrs:Object(d.__assign)({path:h},u)})}},e.prototype.applyOffset=function(){var t=this.cfg,e=t.x,i=t.y;this.moveElementTo(this.get("group"),{x:e,y:i})},e}(N),ee={fill:"#416180",opacity:.05},ie={fill:"#5B8FF9",opacity:.15,cursor:"move"},ne={width:10,height:24},re={textBaseline:"middle",fill:"#000",opacity:.45},oe={fill:"#F7F7F7",stroke:"#BFBFBF",radius:2,opacity:1,cursor:"ew-resize",highLightFill:"#FFF"},ae=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(d.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"handler",x:0,y:0,width:10,height:24,style:oe})},e.prototype.renderInner=function(t){var e=this.cfg,i=e.width,n=e.height,r=e.style,o=r.fill,a=r.stroke,s=r.radius,l=r.opacity,u=r.cursor;this.addShape(t,{type:"rect",id:this.getElementId("background"),attrs:{x:0,y:0,width:i,height:n,fill:o,stroke:a,radius:s,opacity:l,cursor:u}});var c=1/3*i,h=2/3*i,p=1/4*n,f=3/4*n;this.addShape(t,{id:this.getElementId("line-left"),type:"line",attrs:{x1:c,y1:p,x2:c,y2:f,stroke:a,cursor:u}}),this.addShape(t,{id:this.getElementId("line-right"),type:"line",attrs:{x1:h,y1:p,x2:h,y2:f,stroke:a,cursor:u}})},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.bindEvents=function(){var t=this;this.get("group").on("mouseenter",(function(){var e=t.get("style").highLightFill;t.getElementByLocalId("background").attr("fill",e),t.draw()})),this.get("group").on("mouseleave",(function(){var e=t.get("style").fill;t.getElementByLocalId("background").attr("fill",e),t.draw()}))},e.prototype.draw=function(){var t=this.get("container").get("canvas");t&&t.draw()},e}(N),se=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onMouseDown=function(t){return function(i){e.currentTarget=t;var n=i.originalEvent;n.stopPropagation(),n.preventDefault(),e.prevX=Object(g.get)(n,"touches.0.pageX",n.pageX),e.prevY=Object(g.get)(n,"touches.0.pageY",n.pageY);var r=e.getContainerDOM();r.addEventListener("mousemove",e.onMouseMove),r.addEventListener("mouseup",e.onMouseUp),r.addEventListener("mouseleave",e.onMouseUp),r.addEventListener("touchmove",e.onMouseMove),r.addEventListener("touchend",e.onMouseUp),r.addEventListener("touchcancel",e.onMouseUp)}},e.onMouseMove=function(t){var i=e.cfg.width,n=[e.get("start"),e.get("end")];t.stopPropagation(),t.preventDefault();var r=Object(g.get)(t,"touches.0.pageX",t.pageX),o=Object(g.get)(t,"touches.0.pageY",t.pageY),a=r-e.prevX,s=e.adjustOffsetRange(a/i);e.updateStartEnd(s),e.updateUI(e.getElementByLocalId("foreground"),e.getElementByLocalId("minText"),e.getElementByLocalId("maxText")),e.prevX=r,e.prevY=o,e.draw(),e.emit("sliderchange",[e.get("start"),e.get("end")].sort()),e.delegateEmit("valuechanged",{originValue:n,value:[e.get("start"),e.get("end")]})},e.onMouseUp=function(){e.currentTarget&&(e.currentTarget=void 0);var t=e.getContainerDOM();t&&(t.removeEventListener("mousemove",e.onMouseMove),t.removeEventListener("mouseup",e.onMouseUp),t.removeEventListener("mouseleave",e.onMouseUp),t.removeEventListener("touchmove",e.onMouseMove),t.removeEventListener("touchend",e.onMouseUp),t.removeEventListener("touchcancel",e.onMouseUp))},e}return Object(d.__extends)(e,t),e.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e);var i=this.get("start"),n=this.get("end"),r=Object(g.clamp)(i,t,e),o=Object(g.clamp)(n,t,e);this.get("isInit")||i===r&&n===o||this.setValue([r,o])},e.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},e.prototype.setValue=function(t){var e=this.getRange();if(Object(g.isArray)(t)&&2===t.length){var i=[this.get("start"),this.get("end")];this.update({start:Object(g.clamp)(t[0],e.min,e.max),end:Object(g.clamp)(t[1],e.min,e.max)}),this.get("updateAutoRender")||this.render(),this.delegateEmit("valuechanged",{originValue:i,value:t})}},e.prototype.getValue=function(){return[this.get("start"),this.get("end")]},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"slider",x:0,y:0,width:100,height:16,backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},defaultCfg:{backgroundStyle:ee,foregroundStyle:ie,handlerStyle:ne,textStyle:re}})},e.prototype.update=function(e){var i=e.start,n=e.end,r=Object(d.__assign)({},e);Object(g.isNil)(i)||(r.start=Object(g.clamp)(i,0,1)),Object(g.isNil)(n)||(r.end=Object(g.clamp)(n,0,1)),t.prototype.update.call(this,r),this.minHandler=this.getChildComponentById(this.getElementId("minHandler")),this.maxHandler=this.getChildComponentById(this.getElementId("maxHandler"))},e.prototype.init=function(){this.set("start",Object(g.clamp)(this.get("start"),0,1)),this.set("end",Object(g.clamp)(this.get("end"),0,1)),t.prototype.init.call(this)},e.prototype.renderInner=function(t){var e=this.cfg,i=(e.start,e.end,e.width),n=e.height,r=e.trendCfg,o=void 0===r?{}:r,a=e.minText,s=e.maxText,l=e.backgroundStyle,u=void 0===l?{}:l,c=e.foregroundStyle,h=void 0===c?{}:c,p=e.textStyle,f=void 0===p?{}:p,y=e.handlerStyle,v=void 0===y?{}:y;Object(g.size)(Object(g.get)(o,"data"))&&this.addComponent(t,Object(d.__assign)({component:te,id:this.getElementId("trend"),x:0,y:0,width:i,height:n},o)),this.addShape(t,{id:this.getElementId("background"),type:"rect",attrs:Object(d.__assign)({x:0,y:0,width:i,height:n},u)});var m=this.addShape(t,{id:this.getElementId("minText"),type:"text",attrs:Object(d.__assign)({y:n/2,textAlign:"right",text:a,silent:!1},f)}),x=this.addShape(t,{id:this.getElementId("maxText"),type:"text",attrs:Object(d.__assign)({y:n/2,textAlign:"left",text:s,silent:!1},f)}),b=this.addShape(t,{id:this.getElementId("foreground"),name:"foreground",type:"rect",attrs:Object(d.__assign)({y:0,height:n},h)}),_=Object(g.get)(v,"height",24);this.minHandler=this.addComponent(t,Object(d.__assign)({component:ae,id:this.getElementId("minHandler"),name:"handler-min",x:0,y:(n-_)/2,width:i,height:_,cursor:"ew-resize"},v)),this.maxHandler=this.addComponent(t,Object(d.__assign)({component:ae,id:this.getElementId("maxHandler"),name:"handler-max",x:0,y:(n-_)/2,width:i,height:_,cursor:"ew-resize"},v)),this.updateUI(b,m,x)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.updateUI=function(t,e,i){var n=this.cfg,r=n.start,o=n.end,a=n.width,s=n.minText,l=n.maxText,u=n.handlerStyle,c=r*a,h=o*a;t.attr("x",c),t.attr("width",h-c);var p=Object(g.get)(u,"width",10);e.attr("text",s),i.attr("text",l);var f=this._dodgeText([c,h],e,i),d=f[0],y=f[1];this.minHandler&&(this.minHandler.update({x:c-p/2}),this.get("updateAutoRender")||this.minHandler.render()),Object(g.each)(d,(function(t,i){return e.attr(i,t)})),this.maxHandler&&(this.maxHandler.update({x:h-p/2}),this.get("updateAutoRender")||this.maxHandler.render()),Object(g.each)(y,(function(t,e){return i.attr(e,t)}))},e.prototype.bindEvents=function(){var t=this.get("group");t.on("handler-min:mousedown",this.onMouseDown("minHandler")),t.on("handler-min:touchstart",this.onMouseDown("minHandler")),t.on("handler-max:mousedown",this.onMouseDown("maxHandler")),t.on("handler-max:touchstart",this.onMouseDown("maxHandler"));var e=t.findById(this.getElementId("foreground"));e.on("mousedown",this.onMouseDown("foreground")),e.on("touchstart",this.onMouseDown("foreground"))},e.prototype.adjustOffsetRange=function(t){var e=this.cfg,i=e.start,n=e.end;switch(this.currentTarget){case"minHandler":var r=0-i,o=1-i;return Math.min(o,Math.max(r,t));case"maxHandler":r=0-n,o=1-n;return Math.min(o,Math.max(r,t));case"foreground":r=0-i,o=1-n;return Math.min(o,Math.max(r,t))}},e.prototype.updateStartEnd=function(t){var e=this.cfg,i=e.start,n=e.end;switch(this.currentTarget){case"minHandler":i+=t;break;case"maxHandler":n+=t;break;case"foreground":i+=t,n+=t}this.set("start",i),this.set("end",n)},e.prototype._dodgeText=function(t,e,i){var n,r,o=this.cfg,a=o.handlerStyle,s=o.width,l=Object(g.get)(a,"width",10),u=t[0],c=t[1],h=!1;u>c&&(u=(n=[c,u])[0],c=n[1],e=(r=[i,e])[0],i=r[1],h=!0);var p=e.getBBox(),f=i.getBBox(),d=p.width>u-2?{x:u+l/2+2,textAlign:"left"}:{x:u-l/2-2,textAlign:"right"},y=f.width>s-c-2?{x:c-l/2-2,textAlign:"right"}:{x:c+l/2+2,textAlign:"left"};return h?[y,d]:[d,y]},e.prototype.draw=function(){var t=this.get("container"),e=t&&t.get("canvas");e&&e.draw()},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e}(N),le={default:{trackColor:"rgba(0,0,0,0)",thumbColor:"rgba(0,0,0,0.15)",size:8,lineCap:"round"},hover:{thumbColor:"rgba(0,0,0,0.2)"}},ue=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.clearEvents=g.noop,e.onStartEvent=function(t){return function(i){e.isMobile=t,i.originalEvent.preventDefault();var n=t?Object(g.get)(i.originalEvent,"touches.0.clientX"):i.clientX,r=t?Object(g.get)(i.originalEvent,"touches.0.clientY"):i.clientY;e.startPos=e.cfg.isHorizontal?n:r,e.bindLaterEvent()}},e.bindLaterEvent=function(){var t=e.getContainerDOM(),i=[];i=e.isMobile?[Object(Mt.addEventListener)(t,"touchmove",e.onMouseMove),Object(Mt.addEventListener)(t,"touchend",e.onMouseUp),Object(Mt.addEventListener)(t,"touchcancel",e.onMouseUp)]:[Object(Mt.addEventListener)(t,"mousemove",e.onMouseMove),Object(Mt.addEventListener)(t,"mouseup",e.onMouseUp),Object(Mt.addEventListener)(t,"mouseleave",e.onMouseUp)],e.clearEvents=function(){i.forEach((function(t){t.remove()}))}},e.onMouseMove=function(t){var i=e.cfg,n=i.isHorizontal,r=i.thumbOffset;t.preventDefault();var o=e.isMobile?Object(g.get)(t,"touches.0.clientX"):t.clientX,a=e.isMobile?Object(g.get)(t,"touches.0.clientY"):t.clientY,s=n?o:a,l=s-e.startPos;e.startPos=s,e.updateThumbOffset(r+l)},e.onMouseUp=function(t){t.preventDefault(),e.clearEvents()},e.onTrackClick=function(t){var i=e.cfg,n=i.isHorizontal,r=i.x,o=i.y,a=i.thumbLen,s=e.getContainerDOM().getBoundingClientRect(),l=t.clientX,u=t.clientY,c=n?l-s.left-r-a/2:u-s.top-o-a/2,h=e.validateRange(c);e.updateThumbOffset(h)},e.onThumbMouseOver=function(){var t=e.cfg.theme.hover.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e.onThumbMouseOut=function(){var t=e.cfg.theme.default.thumbColor;e.getElementByLocalId("thumb").attr("stroke",t),e.draw()},e}return Object(d.__extends)(e,t),e.prototype.setRange=function(t,e){this.set("minLimit",t),this.set("maxLimit",e);var i=this.getValue(),n=Object(g.clamp)(i,t,e);i===n||this.get("isInit")||this.setValue(n)},e.prototype.getRange=function(){return{min:this.get("minLimit")||0,max:this.get("maxLimit")||1}},e.prototype.setValue=function(t){var e=this.getRange(),i=this.getValue();this.update({thumbOffset:(this.get("trackLen")-this.get("thumbLen"))*Object(g.clamp)(t,e.min,e.max)}),this.delegateEmit("valuechange",{originalValue:i,value:this.getValue()})},e.prototype.getValue=function(){return Object(g.clamp)(this.get("thumbOffset")/(this.get("trackLen")-this.get("thumbLen")),0,1)},e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return Object(d.__assign)(Object(d.__assign)({},e),{name:"scrollbar",isHorizontal:!0,minThumbLen:20,thumbOffset:0,theme:le})},e.prototype.renderInner=function(t){this.renderTrackShape(t),this.renderThumbShape(t)},e.prototype.applyOffset=function(){this.moveElementTo(this.get("group"),{x:this.get("x"),y:this.get("y")})},e.prototype.initEvent=function(){this.bindEvents()},e.prototype.renderTrackShape=function(t){var e=this.cfg,i=e.trackLen,n=e.theme,r=(void 0===n?{default:{}}:n).default,o=r.lineCap,a=r.trackColor,s=r.size,l=this.get("isHorizontal")?{x1:0+s/2,y1:s/2,x2:i-s/2,y2:s/2,lineWidth:s,stroke:a,lineCap:o}:{x1:s/2,y1:0+s/2,x2:s/2,y2:i-s/2,lineWidth:s,stroke:a,lineCap:o};return this.addShape(t,{id:this.getElementId("track"),name:"track",type:"line",attrs:l})},e.prototype.renderThumbShape=function(t){var e=this.cfg,i=e.thumbOffset,n=e.thumbLen,r=e.theme,o=(void 0===r?{default:{}}:r).default,a=o.size,s=o.lineCap,l=o.thumbColor,u=this.get("isHorizontal")?{x1:i+a/2,y1:a/2,x2:i+n-a/2,y2:a/2,lineWidth:a,stroke:l,lineCap:s,cursor:"default"}:{x1:a/2,y1:i+a/2,x2:a/2,y2:i+n-a/2,lineWidth:a,stroke:l,lineCap:s,cursor:"default"};return this.addShape(t,{id:this.getElementId("thumb"),name:"thumb",type:"line",attrs:u})},e.prototype.bindEvents=function(){var t=this.get("group");t.on("mousedown",this.onStartEvent(!1)),t.on("mouseup",this.onMouseUp),t.on("touchstart",this.onStartEvent(!0)),t.on("touchend",this.onMouseUp),t.findById(this.getElementId("track")).on("click",this.onTrackClick);var e=t.findById(this.getElementId("thumb"));e.on("mouseover",this.onThumbMouseOver),e.on("mouseout",this.onThumbMouseOut)},e.prototype.getContainerDOM=function(){var t=this.get("container"),e=t&&t.get("canvas");return e&&e.get("container")},e.prototype.validateRange=function(t){var e=this.cfg,i=e.thumbLen,n=e.trackLen,r=t;return t+i>n?r=n-i:t+i(i-t)*(i-t)+(r-e)*(r-e)?n.distance(i,r,o,a):this.pointToLine(t,e,i,r,o,a)},pointToLine:function(t,e,i,n,o,a){var s=[i-t,n-e];if(r.exactEquals(s,[0,0]))return Math.sqrt((o-t)*(o-t)+(a-e)*(a-e));var l=[-s[1],s[0]];r.normalize(l,l);var u=[o-t,a-e];return Math.abs(r.dot(u,l))},tangentAngle:function(t,e,i,n){return Math.atan2(n-e,i-t)}}},function(t,e,i){"use strict";i.d(e,"c",(function(){return p})),i.d(e,"b",(function(){return f})),i.d(e,"a",(function(){return d}));var n=i(1),r=i(35);function o(t){return(o="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)}var a=Math.sin,s=Math.cos,l=Math.atan2,u=Math.PI;function c(t,e,i,n,o,c,h){var p=e.stroke,f=e.lineWidth,d=l(n-c,i-o),g=new r.Path({type:"path",canvas:t.get("canvas"),isArrowShape:!0,attrs:{path:"M"+10*s(u/6)+","+10*a(u/6)+" L0,0 L"+10*s(u/6)+",-"+10*a(u/6),stroke:p,lineWidth:f}});g.translate(o,c),g.rotateAtPoint(o,c,d),t.set(h?"startArrowShape":"endArrowShape",g)}function h(t,e,i,o,u,c,h){var p=e.startArrow,f=e.endArrow,d=e.stroke,g=e.lineWidth,y=h?p:f,v=y.d,m=y.fill,x=y.stroke,b=y.lineWidth,_=Object(n.__rest)(y,["d","fill","stroke","lineWidth"]),O=l(o-c,i-u);v&&(u-=s(O)*v,c-=a(O)*v);var w=new r.Path({type:"path",canvas:t.get("canvas"),isArrowShape:!0,attrs:Object(n.__assign)(Object(n.__assign)({},_),{stroke:x||d,lineWidth:b||g,fill:m})});w.translate(u,c),w.rotateAtPoint(u,c,O),t.set(h?"startArrowShape":"endArrowShape",w)}function p(t,e,i,n,r){var o=l(n-e,i-t);return{dx:s(o)*r,dy:a(o)*r}}function f(t,e,i,n,r,a){"object"===o(e.startArrow)?h(t,e,i,n,r,a,!0):e.startArrow?c(t,e,i,n,r,a,!0):t.set("startArrowShape",null)}function d(t,e,i,n,r,a){"object"===o(e.endArrow)?h(t,e,i,n,r,a,!1):e.endArrow?c(t,e,i,n,r,a,!1):t.set("startArrowShape",null)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLabelComponent=e.registerLabelComponent=void 0;var n=i(1),r=i(0),o=n.__importDefault(i(54)),a=i(8),s=n.__importDefault(i(13)),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.labelsCfgMap={},e.lastLabelsCfgMap={},e}return n.__extends(e,t),e.prototype.getGeometry=function(){return this.geometry},e.prototype.getLabels=function(){return this.labels},e.prototype.show=function(){this.container.show()},e.prototype.hide=function(){this.container.hide()},e.prototype.initConfig=function(t){var e=this;this.layer=t.layer;var i=this.layer.view;this.view=i,this.geometry=t.geometry,this.coord=i.getCoordinate(),this.options=r.deepMix(this.getDefaultOptions(),t.label);var n=function(){e.clear(),e.labelsCfgMap={},e.lastLabelsCfgMap={},e.render()};i.on(a.VIEW_LIFE_CIRCLE.AFTER_PAINT,n),this.addDisposable((function(){i.off(a.VIEW_LIFE_CIRCLE.AFTER_PAINT,n)}))},e.prototype.renderInner=function(t){var e=this;this.labels=[],this.labelsCfgMap={},r.each(this.geometry.elements,(function(i,n){var o=[].concat(e.drawLabelItem(t,i,n));r.each(o,(function(t,n){e.adjustLabel(t,i,n),t.destroyed||(e.labels.push(t),e.labelsCfgMap[t.get("id")]=r.clone(t.attrs))}))})),this.layoutLabels(this.geometry,this.labels);var i=this.lastLabelsCfgMap,o=this.labelsCfgMap,s=!!this.geometry.animateOption&&a.getDefaultAnimateCfg("label",this.coord);r.each(o,(function(o,l){var u=t.findById(l);if(u)if(i[l]){var c=i[l],h=r.get(s,"update");h&&(u.stopAnimate(),u.attr(c),a.doAnimate(u,h,{toAttrs:n.__assign({},o),coordinate:e.coord}))}else{var p=r.get(s,"appear");p&&(u.stopAnimate(),a.doAnimate(u,p,{toAttrs:n.__assign({},u.attr()),coordinate:e.coord}))}delete i[l]})),r.each(i,(function(i,n){var o=r.get(s,"leave");if(o){var l=t.addShape("text",{attrs:i,id:n,name:"label"});l.stopAnimate(),a.doAnimate(l,o,{toAttrs:null,coordinate:e.coord})}})),this.lastLabelsCfgMap=this.labelsCfgMap},e.prototype.drawLabelText=function(t,e,i){return void 0===i&&(i={}),t.addShape("text",n.__assign({attrs:e},i))},e.prototype.drawLabelItem=function(t,e,i){var o=this,s=e.getModel(),l=[].concat(this.getLabelItemAttrs(e,i)),u=this.getDefaultOffset(),c=this.getLabelOffset();return r.map(l,(function(i,l){var h,p={x:i.x+c.x,y:i.y+c.y},f=r.isArray(s.mappingData)?s.mappingData[l]:s.mappingData,d=o.getLabelId(f);return o.drawLabelText(t,n.__assign(n.__assign({},i),p),((h={id:d,name:"label",offset:u,element:e})[a.ORIGIN]=f,h))}))},e.prototype.getDefaultOffset=function(){return Number(this.options.offset)},e.prototype.getLabelOffset=function(){var t=this.options,e=t.offsetX,i=t.offsetY;return{x:r.isNumber(e)?e:0,y:r.isNumber(i)?i:0}},e.prototype.getLabelOffsetByDimAndFactor=function(t,e){var i=this.options,n=i.offsetX,o=i.offsetY,a=this.getDefaultOffset(),s={x:0,y:0};return s[t]=a*e,r.isNumber(n)&&(s.x+=n),r.isNumber(o)&&(s.y+=o),s},e.prototype.getDefaultOptions=function(){return{}},e.prototype.layoutLabels=function(t,e){},e.prototype.getLabelId=function(t){var e=t._origin,i=this.geometry.type,n=this.geometry.getXScale(),r=this.geometry.getYScale(),o=this.geometry.getElementId(t);return"line"===i||"area"===i?o+=" "+e[n.field]:"path"===i&&(o+=" "+e[n.field]+"-"+e[r.field]),o},e.prototype.getCoordinateBBox=function(){var t=this.coord,e=t.start,i=t.end;return new s.default(Math.min(e.x,i.x),Math.min(e.y,i.y),t.getWidth(),t.getHeight())},e}(o.default);e.default=l;var u={};e.registerLabelComponent=function(t,e){u[t]=e},e.getLabelComponent=function(t){return u[t]}},function(t,e,i){"use strict";i.r(e),i.d(e,"Category",(function(){return u})),i.d(e,"Identity",(function(){return L})),i.d(e,"Linear",(function(){return b})),i.d(e,"Log",(function(){return M})),i.d(e,"Pow",(function(){return C})),i.d(e,"Time",(function(){return S})),i.d(e,"TimeCat",(function(){return m})),i.d(e,"Quantile",(function(){return P})),i.d(e,"Quantize",(function(){return j})),i.d(e,"Scale",(function(){return s})),i.d(e,"getScale",(function(){return A})),i.d(e,"registerScale",(function(){return E})),i.d(e,"getTickMethod",(function(){return o})),i.d(e,"registerTickMethod",(function(){return a}));var n=i(0),r={};function o(t){return r[t]}function a(t,e){r[t]=e}var s=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(n.assign)(this.__cfg__,t),this.init()},t.prototype.clone=function(){return this.constructor(this.__cfg__)},t.prototype.getTicks=function(){var t=this;return Object(n.map)(this.ticks,(function(e,i){return Object(n.isObject)(e)?e:{text:t.getText(e,i),tickValue:e,value:t.scale(e)}}))},t.prototype.getText=function(t,e){var i=this.formatter,r=i?i(t,e):t;return Object(n.isNil)(r)||!Object(n.isFunction)(r.toString)?"":r.toString()},t.prototype.getConfig=function(t){return this.__cfg__[t]},t.prototype.init=function(){Object(n.assign)(this,this.__cfg__),this.setDomain(),Object(n.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(n.isString)(t)){var i=o(t);if(!i)throw new Error("There is no method to to calculate ticks!");e=i(this)}else Object(n.isFunction)(t)&&(e=t(this));return e},t.prototype.rangeMin=function(){return Object(n.head)(this.range)},t.prototype.rangeMax=function(){return Object(n.last)(this.range)},t.prototype.calcPercent=function(t,e,i){return Object(n.isNumber)(t)?(t-e)/(i-e):NaN},t.prototype.calcValue=function(t,e,i){return e+t*(i-e)},t}(),l=i(2),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cat",e.isCategory=!0,e}return Object(l.__extends)(e,t),e.prototype.translate=function(t){var e=Object(n.indexOf)(this.values,t);return-1===e?Object(n.isNumber)(t)?t:NaN:e},e.prototype.scale=function(t){var e=this.translate(t),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 nthis.max?NaN:this.values[n]},e.prototype.getText=function(e){for(var i=[],r=1;r1?t-1:t}},e}(s),c=i(36);function h(t,e){return(c.format||c.default.format)(t,e)}function p(t){return Object(n.isString)(t)&&(t=t.indexOf("T")>0?new Date(t).getTime():new Date(t.replace(/-/gi,"/")).getTime()),Object(n.isDate)(t)&&(t=t.getTime()),t}var f=36e5,d=24*f,g=31*d,y=[["HH:mm:ss",1e3],["HH:mm:ss",1e4],["HH:mm:ss",3e4],["HH:mm",6e4],["HH:mm",6e5],["HH:mm",18e5],["HH",f],["HH",6*f],["HH",12*f],["YYYY-MM-DD",d],["YYYY-MM-DD",4*d],["YYYY-WW",7*d],["YYYY-MM",g],["YYYY-MM",4*g],["YYYY-MM",6*g],["YYYY",380*d]];function v(t,e,i){var r,o=(r=function(t){return t[1]},function(t,e,i,o){for(var a=Object(n.isNil)(i)?0:i,s=Object(n.isNil)(o)?t.length:o;a>>1;r(t[l])>e?s=l:a=l+1}return a})(y,(e-t)/i)-1,a=y[o];return o<0?a=y[0]:o>=y.length&&(a=Object(n.last)(y)),a}var m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="timeCat",e}return Object(l.__extends)(e,t),e.prototype.translate=function(t){t=p(t);var e=this.values.indexOf(t);return-1===e&&(e=Object(n.isNumber)(t)&&t-1){var n=this.values[i],r=this.formatter;return n=r?r(n,e):h(n,this.mask)}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(n.each)(e,(function(t,i){e[i]=p(t)})),e.sort((function(t,e){return t-e})),t.prototype.setDomain.call(this)},e}(u),x=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isContinuous=!0,e}return Object(l.__extends)(e,t),e.prototype.scale=function(t){if(Object(n.isNil)(t))return NaN;var e=this.rangeMin(),i=this.rangeMax();return this.max===this.min?e:e+this.getScalePercent(t)*(i-e)},e.prototype.init=function(){t.prototype.init.call(this);var e=this.ticks,i=Object(n.head)(e),r=Object(n.last)(e);ithis.max&&(this.max=r),Object(n.isNil)(this.minLimit)||(this.min=i),Object(n.isNil)(this.maxLimit)||(this.max=r)},e.prototype.setDomain=function(){var t=Object(n.getRange)(this.values),e=t.min,i=t.max;Object(n.isNil)(this.min)&&(this.min=e),Object(n.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(n.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}(s),b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="linear",e.isLinear=!0,e}return Object(l.__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}(x);function _(t,e){var i=Math.E;return e>=0?Math.pow(i,Math.log(e)/t):-1*Math.pow(i,Math.log(-e)/t)}function O(t,e){return 1===t?1:Math.log(e)/Math.log(t)}function w(t,e,i){Object(n.isNil)(i)&&(i=Math.max.apply(null,t));var r=i;return Object(n.each)(t,(function(t){t>0&&t1&&(r=1),r}var M=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e}return Object(l.__extends)(e,t),e.prototype.invert=function(t){var e,i=this.base,n=O(i,this.max),r=this.rangeMin(),o=this.rangeMax()-r,a=this.positiveMin;if(a){if(0===t)return 0;var s=1/(n-(e=O(i,a/i)))*o;if(t=0?1:-1;return Math.pow(o,i)*a},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;return(_(n,t)-_(n,i))/(_(n,e)-_(n,i))},e}(x),S=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="time",e}return Object(l.__extends)(e,t),e.prototype.getText=function(t,e){var i=this.translate(t),n=this.formatter;return n?n(i,e):h(i,this.mask)},e.prototype.scale=function(e){var i=e;return(Object(n.isString)(i)||Object(n.isDate)(i))&&(i=this.translate(i)),t.prototype.scale.call(this,i)},e.prototype.translate=function(t){return p(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(n.isNil)(e)&&Object(n.isNumber)(e)||(this.min=this.translate(this.min)),Object(n.isNil)(i)&&Object(n.isNumber)(i)||(this.max=this.translate(this.max)),t&&t.length){var r=[],o=1/0,a=o,s=0;Object(n.each)(t,(function(t){var e=p(t);if(isNaN(e))throw new TypeError("Invalid Time: "+t+" in time scale!");o>e?(a=o,o=e):a>e&&(a=e),s1&&(this.minTickInterval=a-o),Object(n.isNil)(e)&&(this.min=o),Object(n.isNil)(i)&&(this.max=s)}},e}(b),j=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantize",e}return Object(l.__extends)(e,t),e.prototype.invert=function(t){var e=this.ticks,i=e.length,r=this.getInvertPercent(t),o=Math.floor(r*(i-1));if(o>=i-1)return Object(n.last)(e);if(o<0)return Object(n.head)(e);var a=e[o],s=o/(i-1);return a+(r-s)/((o+1)/(i-1)-s)*(e[o+1]-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(n.last)(e)!==this.max&&e.push(this.max),Object(n.head)(e)!==this.min&&e.unshift(this.min)),e},e.prototype.getScalePercent=function(t){var e=this.ticks;if(tObject(n.last)(e))return 1;var i=0;return Object(n.each)(e,(function(e,n){if(!(t>=e))return!1;i=n})),i/(e.length-1)},e}(x),P=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="quantile",e}return Object(l.__extends)(e,t),e.prototype.initCfg=function(){this.tickMethod="quantile",this.tickCount=5,this.nice=!0},e}(j),T={};function A(t){return T[t]}function E(t,e){if(A(t))throw new Error("type '"+t+"' existed.");T[t]=e}var L=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="identity",e.isIdentity=!0,e}return Object(l.__extends)(e,t),e.prototype.calculateTicks=function(){return this.values},e.prototype.scale=function(t){return this.values[0]!==t&&Object(n.isNumber)(t)?t:this.range[0]},e.prototype.invert=function(t){var e=this.range;return te[1]?NaN:this.values[0]},e}(s),I=[1,5,2,2.5,4,3],D=100*Number.EPSILON;function k(t,e,i,r,o,a){var s=Object(n.size)(e),l=Object(n.indexOf)(e,t),u=0,c=function(t,e){return(t%e+e)%e}(r,a);return(c=0&&(u=1),1-l/(s-1)-i+u}function B(t,e,i){var r=Object(n.size)(e);return 1-Object(n.indexOf)(e,t)/(r-1)-i+1}function F(t,e,i,n,r,o){var a=(t-1)/(o-r),s=(e-1)/(Math.max(o,n)-Math.min(i,r));return 2-Math.max(a/s,s/a)}function R(t,e){return t>=e?2-(t-1)/(e-1):1}function N(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 Y(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 G(t,e,i,r,o,a){if(void 0===i&&(i=5),void 0===r&&(r=!0),void 0===o&&(o=I),void 0===a&&(a=[.25,.2,.5,.05]),t===e||1===i)return{min:t,max:e,ticks:[t]};for(var s={score:-2,lmin:0,lmax:0,lstep:0},l=1;l<1/0;){for(var u=0,c=o;ub)y+=1;else{for(var _=x;_<=b;_+=1){var O=_*(v/l),w=O+v*(f-1),M=v,C=k(h,o,l,O,w,M),S=N(t,e,O,w),j=F(f,i,t,e,O,w),P=a[0]*C+a[1]*S+a[2]*j+1*a[3];P>s.score&&(!r||O<=t&&w>=e)&&(s.lmin=O,s.lmax=w,s.lstep=M,s.score=P)}y+=1}}f+=1}}l+=1}for(var T=Number.isInteger(s.lstep)?0:Math.ceil(Math.abs(Math.log10(s.lstep))),A=[],E=s.lmin;E<=s.lmax;E+=s.lstep)A.push(E);var L=T?Object(n.map)(A,(function(t){return Number.parseFloat(t.toFixed(T))})):A;return{min:Math.min(t,Object(n.head)(L)),max:Math.max(e,Object(n.last)(L)),ticks:L}}function X(t){var e=t.values,i=t.tickInterval,r=t.tickCount,o=e;if(Object(n.isNumber)(i))return Object(n.filter)(o,(function(t,e){return e%i==0}));var a=t.min,s=t.max;if(Object(n.isNil)(a)&&(a=0),Object(n.isNil)(s)&&(s=e.length-1),Object(n.isNumber)(r)&&r=a&&t<=s})).map((function(t){return e[t]}))}return e.slice(a,s+1)}var V=Math.sqrt(50),z=Math.sqrt(10),H=Math.sqrt(2),W=function(){function t(){this._domain=[0,1]}return t.prototype.domain=function(t){return t?(this._domain=Array.from(t,Number),this):this._domain.slice()},t.prototype.nice=function(t){var e,i;void 0===t&&(t=5);var n,r=this._domain.slice(),o=0,a=this._domain.length-1,s=this._domain[o],l=this._domain[a];return l0?n=q(s=Math.floor(s/n)*n,l=Math.ceil(l/n)*n,t):n<0&&(n=q(s=Math.ceil(s*n)/n,l=Math.floor(l*n)/n,t)),n>0?(r[o]=Math.floor(s/n)*n,r[a]=Math.ceil(l/n)*n,this.domain(r)):n<0&&(r[o]=Math.ceil(s*n)/n,r[a]=Math.floor(l*n)/n,this.domain(r)),this},t.prototype.ticks=function(t){return void 0===t&&(t=5),function(t,e,i){var n,r,o,a,s=-1;if(i=+i,(t=+t)===(e=+e)&&i>0)return[t];(n=e0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(r=Math.ceil(e-t+1));++s=0?(o>=V?10:o>=z?5:o>=H?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=V?10:o>=z?5:o>=H?2:1)}function U(t,e,i){return("ceil"===i?Math.ceil(t/e):"floor"===i?Math.floor(t/e):Math.round(t/e))*e}function K(t,e,i){var r=U(t,i,"floor"),o=U(e,i,"ceil");r=Object(n.fixedBase)(r,i),o=Object(n.fixedBase)(o,i);for(var a=[],s=r;s<=o;s+=i){var l=Object(n.fixedBase)(s,i);a.push(l)}return{min:r,max:o,ticks:a}}function Z(t,e,i){var r,o=t.minLimit,a=t.maxLimit,s=t.min,l=t.max,u=t.tickCount,c=void 0===u?5:u,h=Object(n.isNil)(o)?Object(n.isNil)(e)?s:e:o,p=Object(n.isNil)(a)?Object(n.isNil)(i)?l:i:a;if(h>p&&(p=(r=[h,p])[0],h=r[1]),c<=2)return[h,p];for(var f=(p-h)/(c-1),d=[],g=0;g1&&(r*=Math.ceil(a)),n&&r31536e6)for(var l=J(i),u=Math.ceil(r/31536e6),c=s;c<=l+u;c+=u)a.push(tt(c));else if(r>g){var h=Math.ceil(r/g),p=et(e),y=function(t,e){var i=J(t),n=J(e),r=et(t);return 12*(n-i)+(et(e)-r)%12}(e,i);for(c=0;c<=y+h;c+=h)a.push(it(s,c+p))}else if(r>d){var v=(O=new Date(e)).getFullYear(),m=O.getMonth(),x=O.getDate(),b=Math.ceil(r/d),_=function(t,e){return Math.ceil((e-t)/d)}(e,i);for(c=0;c<_+b;c+=b)a.push(new Date(v,m,x+c).getTime())}else if(r>f){v=(O=new Date(e)).getFullYear(),m=O.getMonth(),b=O.getDate();var O,w=O.getHours(),M=Math.ceil(r/f),C=function(t,e){return Math.ceil((e-t)/f)}(e,i);for(c=0;c<=C+M;c+=M)a.push(new Date(v,m,b,w+c).getTime())}else if(r>6e4){var S=function(t,e){return Math.ceil((e-t)/6e4)}(e,i),j=Math.ceil(r/6e4);for(c=0;c<=S+j;c+=j)a.push(e+6e4*c)}else{var P=r;P<1e3&&(P=1e3);var T=1e3*Math.floor(e/1e3),A=Math.ceil((i-e)/1e3),E=Math.ceil(P/1e3);for(c=0;c0)e=Math.floor(O(i,r));else{var l=w(a,i,o);e=Math.floor(O(i,l))}for(var u=s-e,c=Math.ceil(u/n),h=[],p=e;p=0?1:-1;return Math.pow(t,e)*i}))})),a("quantile",(function(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=[],o=0;o=e&&t<=i}e.dotProduct2D=a,e.angleTo=function(t,e){var i=o(t),n=o(e),r=a(t,e);return Math.acos(r/i/n)},e.crossProduct2D=function(t,e){var i=o(t),n=o(e),r=a(t,e),s=Math.acos(r/i/n);return i*n*Math.sin(s)},e.crossProduct3D=function(t,e){var i=t.x,n=t.y,r=t.z,o=e.x,a=e.y,s=e.z;return{x:n*s-r*a,y:r*o-i*s,z:i*a-n*o}},e.sub2D=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},e.applyMatrix=s,e.isBetween=l;function u(t,e){for(var i=!1,n=0,r=e.length-1;nt.y!=l>t.y&&t.x<=(s-o)*(t.y-a)/(l-a)+o&&(i=!i)}return i}function c(t){return t*t}function h(t,e){return Math.sqrt(c(t.x-e.x)+c(t.y-e.y))}function p(t,e,i){var n=h(e,i);if(0===n)return h(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 o=h(t,{x:e.x+r*(i.x-e.x),y:e.y+r*(i.y-e.y)});return Math.sqrt(o)}function f(t,e){var i=1/0;r.each(e,(function(e){var n=Math.sqrt(h(e,t));i>n&&(i=n)}));for(var n=0,o=e.length-1;nc&&(i=c)}return i}function d(t,e){for(var i=0,n=t;i.001*(a*a+s*s)*(u*u+c*c)){var f=(r*c-o*u)/h,d=(r*s-o*a)/h;l(f,0,1)&&l(d,0,1)&&(p={x:t.x+f*a,y:t.y+f*s})}return p},e.isPointInPolygon=u,e.dist2=h,e.distBetweenPoints=function(t,e){return Math.sqrt(c(t.x-e.x)+c(t.y-e.y))},e.distBetweenPointLine=p,e.isPolygonIntersection=d,e.minDistBetweenConvexPolygon=function(t,e){if(d(t,e))return 0;var i=1/0,n=1/0;return r.each(t,(function(t){var n=f(t,e);i>n&&(i=n)})),r.each(e,(function(e){var i=f(e,t);n>i&&(n=i)})),Math.min(i,n)},e.bboxOnRotate=function(t){var e,i=t.getBBox(),n=i.minX,r=i.minY,o=i.maxX-i.minX,a=i.maxY-i.minY,l=t.attr("matrix"),u=s({x:0,y:0},e=l?[l[0],l[1],0,l[3],l[4],0,0,0,1]:[1,0,0,0,1,0,0,0,1]);u.x+=n,u.y+=r;var c=s({x:o,y:0},e);c.x+=n,c.y+=r;var h=s({x:0,y:a},e);h.x+=n,h.y+=r;var p=s({x:o,y:a},e);p.x+=n,p.y+=r;var f=[u,c,h,p];f.sort((function(t,e){return t.y-e.y}));var d=f[0].y,g=f[f.length-1].y,y=[f[0],f[1]],v=[f[2],f[3]],m=y[0].xr&&(r=c,o=s)}if(r>i){var h=t(e.slice(0,o+1),i),f=t(e.slice(o,e.length),i);n=h.concat(f)}else n=[e[0],e[e.length-1]];return n}(t,2)},e.getMedian=function(t){var e=r.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},e.getMean=function(t){var e=0;return r.each(t,(function(t){e+=t})),e/t.length},e.sturges=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},e.getStrokePoints=function(t,e,i,n,r){void 0===r&&(r=2);for(var o=[],a=t;a<=t+i;a+=r)o.push([a,e]);for(var s=e;s<=e+n;s+=r)o.push([t+i,s]);for(a=t+i;a>=t;a-=r)o.push([a,e+n]);for(s=e+n;s>=e;s-=r)o.push([t,s]);return o}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkShapeOverlap=e.getOverlapArea=e.moveInPanel=e.checkOriginEqual=e.forEachElement=e.forEachGeometry=e.getGeometryShapes=e.getGeometryByType=e.getAllGeometryByType=void 0;var n=i(0),r=i(8);function o(t,e){return n.filter(t.geometries,(function(t){return t.type===e}))}function a(t,e,i){return void 0===i&&(i=0),Math.max(0,Math.min(t.x+t.width+i,e.x+e.width+i)-Math.max(t.x-i,e.x-i))*Math.max(0,Math.min(t.y+t.height+i,e.y+e.height+i)-Math.max(t.y-i,e.y-i))}e.getAllGeometryByType=o,e.getGeometryByType=function(t,e){return n.head(o(t,e))},e.getGeometryShapes=function(t){return n.map(t.elements,(function(t){return t.shape}))},e.forEachGeometry=function(t,e){t.geometries.forEach(e)},e.forEachElement=function(t,e){t.geometries.forEach((function(t){t.elements.forEach((function(t){e(t)}))}))},e.checkOriginEqual=function(t,e,i){return n.some(e,(function(e){return i(e.get(r.ORIGIN),t.get(r.ORIGIN))}))},e.moveInPanel=function(t,e){var i=t.getBBox(),n=0,r=0;i.minXe.maxX&&(n=i.maxX-e.maxX),n&&t.attr("x",t.attr("x")-n),i.minYe.maxY&&(r=i.maxY-e.maxY),r&&t.attr("y",t.attr("y")-r)},e.getOverlapArea=a,e.checkShapeOverlap=function(t,e){var i=t.getBBox();return n.some(e,(function(t){var e=t.getBBox();return a(i,e,2)>0}))}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getComponentStateMethod=e.getComponent=void 0;var n=i(1),r=n.__importDefault(i(241)),o=n.__importDefault(i(242)),a=n.__importDefault(i(243)),s=n.__importDefault(i(244)),l=n.__importDefault(i(245)),u=n.__importDefault(i(246)),c={axis:r.default,label:a.default,guideLine:o.default},h={tooltip:u.default,label:l.default,axis:s.default};e.getComponent=function(t,e){return new(0,c[t])(e).config},e.getComponentStateMethod=function(t,e){return h[t][e]}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.trySetScaleMinToZero=e.extractScale=void 0;var n=i(0),r=i(119);e.extractScale=function(t,e){if(!e)return t;var i,n,o,a,s;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=(i=e.tickInterval,n=r.timeIntervals,o=i.split(" "),a=n[o[1]],s=parseInt(o[0],10),[a.format,s*a.value]):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,"minLimit")&&(t.minLimit=e.minLimit),Object.prototype.hasOwnProperty.call(e,"maxLimit")&&(t.maxLimit=e.maxLimit),Object.prototype.hasOwnProperty.call(e,"nice")&&(t.nice=e.nice),Object.prototype.hasOwnProperty.call(e,"formatter")&&(t.formatter=e.formatter),Object.prototype.hasOwnProperty.call(e,"exponent")&&(t.exponent=e.exponent),Object.prototype.hasOwnProperty.call(e,"base")&&(t.base=e.base),e.tickMethod&&(t.tickMethod=e.tickMethod)},e.trySetScaleMinToZero=function(t,e){var i=n.filter(e,(function(t){return n.isNumber(t)})),r=Math.min.apply(Math,i),o=Math.max.apply(Math,i);r>0?n.isNil(t.min)&&(t.min=0):o<0&&n.isNil(t.max)&&(t.max=0)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isContrastColorWhite=e.mappingColor=e.arr2rgb=e.toHex=e.rgb2arr=void 0;var n=i(0);function r(t){var e=0===t.indexOf("#")?t.substr(1):t,i=[];return i.push(parseInt(e.substr(0,2),16)),i.push(parseInt(e.substr(2,2),16)),i.push(parseInt(e.substr(4,2),16)),i}function o(t){var e;return 1===(e=(e=Math.round(t)).toString(16)).length&&(e="0"+t),e}e.rgb2arr=r,e.toHex=o,e.arr2rgb=function(t){return"#"+(o(t[0])+o(t[1])+o(t[2]))},e.mappingColor=function(t,e){var i;return n.each(t,(function(t){var n=t;e>=n.from&&e0?1:-1:(n.x-i.x)*(i.y-e.y)>0?-1:1}function Y(t,e){return Object(s.get)(t,["components","axis",e],{})}function G(t){var e=t.x,i=t.y,n=t.circleCenter,r=i.start>i.end,o=t.isTransposed?t.convert({x:r?0:1,y:0}):t.convert({x:0,y:r?0:1}),a=[o.x-n.x,o.y-n.y],s=[1,0],l=o.y>n.y?B.vec2.angle(a,s):-1*B.vec2.angle(a,s),u=l+(e.end-e.start);return{center:n,radius:Math.sqrt(Math.pow(o.x-n.x,2)+Math.pow(o.y-n.y,2)),startAngle:l,endAngle:u}}function X(t,e){return Object(s.isBoolean)(t)?!1!==t&&{}:Object(s.get)(t,[e])}function V(t,e){return Object(s.get)(t,"position",e)}function z(t,e){return Object(s.get)(e,["title","text"],k(t))}var H=function(){function t(t,e){this.destroyed=!1,this.facets=[],this.view=t,this.cfg=Object(s.deepMix)({},this.getDefaultCfg(),e)}return t.prototype.init=function(){this.container||(this.container=this.createContainer());var t=this.view.getData();this.facets=this.generateFacets(t)},t.prototype.render=function(){this.renderViews()},t.prototype.update=function(){},t.prototype.clear=function(){this.clearFacetViews()},t.prototype.destroy=function(){this.clear(),this.container&&(this.container.remove(!0),this.container=void 0),this.destroyed=!0,this.view=void 0,this.facets=[]},t.prototype.facetToView=function(t){var e=t.region,i=t.data,n=t.padding,r=void 0===n?this.cfg.padding:n,o=this.view.createView({region:e,padding:r});o.data(i||[]),t.view=o,this.beforeEachView(o,t);var a=this.cfg.eachView;return a&&a(o,t),this.afterEachView(o,t),o},t.prototype.createContainer=function(){return this.view.getLayer(n.FORE).addGroup()},t.prototype.renderViews=function(){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;Object(s.each)(this.facets,(function(e){e.view&&(t.view.removeView(e.view),e.view=void 0)}))},t.prototype.getFieldValues=function(t,e){var i=[],n={};return Object(s.each)(t,(function(t){var r=t[e];Object(s.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),o=1/(0===t?1:t);return{start:{x:r*i,y:o*n},end:{x:r*(i+1),y:o*(n+1)}}},t.prototype.getDefaultCfg=function(){return{eachView:void 0,showTitle:!0,padding:10,fields:[]}},t.prototype.getDefaultTitleCfg=function(){return{style:{fontSize:14,fill:"#666",fontFamily:this.view.getTheme().fontFamily}}},t.prototype.processAxis=function(t,e){var i=t.getOptions(),n=i.coordinate,r=t.geometries;if("rect"===Object(s.get)(n,"type","rect")&&r.length){Object(s.isNil)(i.axes)&&(i.axes={});var o=i.axes,a=r[0].getXYFields(),l=a[0],u=a[1],c=X(o,l),h=X(o,u);!1!==c&&(i.axes[l]=this.getXAxisOption(l,o,c,e)),!1!==h&&(i.axes[u]=this.getYAxisOption(u,o,h,e))}},t.prototype.getFacetDataFilter=function(t){return function(e){return Object(s.every)(t,(function(t){var i=t.field,n=t.value;return!(!Object(s.isNil)(n)&&i)||e[i]===n}))}},t}(),W={},q=function(t){return W[Object(s.lowerCase)(t)]},U=function(t,e){W[Object(s.lowerCase)(t)]=e},K=function(){function t(t,e){this.context=t,this.cfg=e,t.addAction(this)}return t.prototype.applyCfg=function(t){Object(s.assign)(this,t)},t.prototype.init=function(){this.applyCfg(this.cfg)},t.prototype.destroy=function(){this.context.removeAction(this),this.context=null},t}(),Z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.execute=function(){this.callback&&this.callback(this.context)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.callback=null},e}(K),$={};function Q(t){var e=$[t];return Object(s.get)(e,"ActionClass")}function J(t,e,i){$[t]={ActionClass:e,cfg:i}}function tt(t,e){var i=new Z(e);return i.callback=t,i.name="callback",i}function et(t,e,i,n){return{x:t+i*Math.cos(n),y:e+i*Math.sin(n)}}function it(t,e,i,n,r,o){void 0===o&&(o=0);var a=et(t,e,i,n),s=et(t,e,i,r),l=et(t,e,o,n),u=et(t,e,o,r);if(r-n==2*Math.PI){var c=et(t,e,i,n+Math.PI),h=et(t,e,o,n+Math.PI),p=[["M",a.x,a.y],["A",i,i,0,1,1,c.x,c.y],["A",i,i,0,1,1,s.x,s.y],["M",l.x,l.y]];return o&&(p.push(["A",o,o,0,1,0,h.x,h.y]),p.push(["A",o,o,0,1,0,u.x,u.y])),p.push(["M",a.x,a.y]),p.push(["Z"]),p}var f=r-n<=Math.PI?0:1,d=[["M",a.x,a.y],["A",i,i,0,f,1,s.x,s.y],["L",u.x,u.y]];return o&&d.push(["A",o,o,0,f,0,l.x,l.y]),d.push(["L",a.x,a.y]),d.push(["Z"]),d}function nt(t,e,i,n,r){var o=et(t,e,i,n),a=et(t,e,i,r);if(Object(s.isNumberEqual)(r-n,2*Math.PI)){var l=et(t,e,i,n+Math.PI);return[["M",o.x,o.y],["A",i,i,0,1,1,l.x,l.y],["A",i,i,0,1,1,o.x,o.y],["A",i,i,0,1,0,l.x,l.y],["A",i,i,0,1,0,o.x,o.y],["Z"]]}var u=r-n<=Math.PI?0:1;return[["M",o.x,o.y],["A",i,i,0,u,1,a.x,a.y]]}function rt(t,e){var i,n,r=function(t){if(Object(s.isEmpty)(t))return null;var e=t[0].x,i=t[0].x,n=t[0].y,r=t[0].y;return Object(s.each)(t,(function(t){e=e>t.x?t.x:e,i=it.y?t.y:n,r=r=n&&t<=r}function st(t,e){return e.forEach((function(e){delete t[e]})),t}function lt(t,e,i){void 0===e&&(e=[]),void 0===i&&(i={});for(var n=0,r=t;n=a[u]?1:0,p=c>Math.PI?1:0,f=i.convert(s),d=ct(i,f);if(d>=.5)if(c===2*Math.PI){var g={x:(s.x+a.x)/2,y:(s.y+a.y)/2},y=i.convert(g);l.push(["A",d,d,0,p,h,y.x,y.y]),l.push(["A",d,d,0,p,h,f.x,f.y])}else l.push(["A",d,d,0,p,h,f.x,f.y]);return l}(i,n,t)):o.push(dt(a,t));break;case"z":default:o.push(a)}})),function(t){Object(s.each)(t,(function(e,i){if("a"===e[0].toLowerCase()){var n=t[i-1],r=t[i+1];r&&"a"===r[0].toLowerCase()?n&&"l"===n[0].toLowerCase()&&(n[0]="M"):n&&"a"===n[0].toLowerCase()&&r&&"l"===r[0].toLowerCase()&&(r[0]="M")}}))}(o),o}var xt=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.x=t,this.y=e,this.height=n,this.width=i}return t.fromRange=function(e,i,n,r){return new t(e,i,n-e,r-i)},Object.defineProperty(t.prototype,"minX",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tl",{get:function(){return{x:this.x,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tr",{get:function(){return{x:this.maxX,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bl",{get:function(){return{x:this.x,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"br",{get:function(){return{x:this.maxX,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return{x:this.x+this.width/2,y:this.minY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return{x:this.maxX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return{x:this.x+this.width/2,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return{x:this.minX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.add=function(){for(var t=[],e=0;e=e||i.height>=e?i:null}function wt(t){var e,i=t.event.target;return i&&(e=i.get("element")),e}function Mt(t){var e,i=t.event.target;return i&&(e=i.get("delegateObject")),e}function Ct(t){var e=t.event.gEvent;return!(e&&e.fromShape&&e.toShape&&e.fromShape.get("element")===e.toShape.get("element"))}function St(t){return t&&t.component&&t.component.isList()}function jt(t){return t&&t.component&&t.component.isSlider()}function Pt(t){var e=t.event.target;return e&&"mask"===e.get("name")}function Tt(t,e){var i,n,r,o;if("path"===t.event.target.get("type")){var a=function(t,e){var i=t.event.target,n=i.getCanvasBBox();return n.width>=e||n.height>=e?i.attr("path"):null}(t,e);if(!a)return;return i=t.view,n=a,r=Et(i),o=kt(n),r.filter((function(t){var e,i,n=t.shape;if("path"===n.get("type"))e=kt(n.attr("path"));else{var r=n.getCanvasBBox();e=[[(i=r).minX,i.minY],[i.maxX,i.minY],[i.maxX,i.maxY],[i.minX,i.maxY]]}return _t()(o,e)}))}var s=Ot(t,e);return s?Dt(t.view,s):null}function At(t,e,i){var n=Ot(t,i);if(!n)return null;var r=t.view,o=Yt(r,e,{x:n.x,y:n.y}),a=Yt(r,e,{x:n.maxX,y:n.maxY});return Dt(e,{minX:o.x,minY:o.y,maxX:a.x,maxY:a.y})}function Et(t){var e=t.geometries,i=[];return Object(s.each)(e,(function(t){var e=t.elements;i=i.concat(e)})),t.views&&t.views.length&&Object(s.each)(t.views,(function(t){i=i.concat(Et(t))})),i}function Lt(t,e){var i=t.geometries,n=[];return Object(s.each)(i,(function(t){var i=t.getElementsBy((function(t){return t.hasState(e)}));n=n.concat(i)})),n}function It(t,e){var i=t.getModel().data;return Object(s.isArray)(i)?i[0][e]:i[e]}function Dt(t,e){var i=Et(t),n=[];return Object(s.each)(i,(function(t){var i,r,o=t.shape.getCanvasBBox();i=e,(r=o).minX>i.maxX||r.maxXi.maxY||r.maxY=e.x&&t.y<=e.y&&t.maxY>e.y}function Nt(t){var e=t.parent,i=null;return e&&(i=e.views.filter((function(e){return e!==t}))),i}function Yt(t,e,i){var n=function(t,e){return t.getCoordinate().invert(e)}(t,i);return e.getCoordinate().convert(n)}function Gt(t,e,i,n){var r=!1;return Object(s.each)(t,(function(t){if(t[i]===e[i]&&t[n]===e[n])return r=!0,!1})),r}function Xt(t,e){var i=t.getScaleByField(e);return!i&&t.views&&Object(s.each)(t.views,(function(t){if(i=Xt(t,e))return!1})),i}var Vt=function(){function t(t){this.actions=[],this.event=null,this.cacheMap={},this.view=t}return t.prototype.cache=function(){for(var t=[],e=0;e=0&&e.splice(i,1)},t.prototype.getCurrentPoint=function(){var t=this.event;return t?t.target instanceof HTMLElement?this.view.getCanvas().getPointByClient(t.clientX,t.clientY):{x:t.x,y:t.y}:null},t.prototype.getCurrentShape=function(){return Object(s.get)(this.event,["gEvent","shape"])},t.prototype.isInPlot=function(){var t=this.getCurrentPoint();return!!t&&this.view.isPointInPlot(t)},t.prototype.isInShape=function(t){var e=this.getCurrentShape();return!!e&&e.get("name")===t},t.prototype.isInComponent=function(t){var e=Bt(this.view),i=this.getCurrentPoint();return!!i&&!!e.find((function(e){var n=e.getBBox();return t?e.get("name")===t&&Rt(n,i):Rt(n,i)}))},t.prototype.destroy=function(){this.view=null,this.event=null,Object(s.each)(this.actions.slice(),(function(t){t.destroy()})),this.actions=null,this.cacheMap=null},t}(),zt=function(){function t(t,e){this.view=t,this.cfg=e}return t.prototype.init=function(){this.initEvents()},t.prototype.initEvents=function(){},t.prototype.clearEvents=function(){},t.prototype.destroy=function(){this.clearEvents()},t}();function Ht(t,e){var i=t.split(":"),n=i[0],r=e.getAction(n)||function(t,e){var i=$[t],n=null;return i&&((n=new(0,i.ActionClass)(e,i.cfg)).name=t,n.init()),n}(n,e);if(!r)throw new Error("There is no action named "+n);return{action:r,methodName:i[1]}}function Wt(t){var e=t.action,i=t.methodName;if(!e[i])throw new Error("Action("+e.name+") doesn't have a method called "+i);e[i]()}var qt="start",Ut="showEnable",Kt="end",Zt="rollback",$t="processing",Qt=function(t){function e(e,i){var n=t.call(this,e,i)||this;return n.callbackCaches={},n.emitCaches={},n.steps=i,n}return Object(a.__extends)(e,t),e.prototype.init=function(){this.initContext(),t.prototype.init.call(this)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.steps=null,this.context&&(this.context.destroy(),this.context=null),this.callbackCaches=null,this.view=null},e.prototype.initEvents=function(){var t=this;Object(s.each)(this.steps,(function(e,i){Object(s.each)(e,(function(e){var n=t.getActionCallback(i,e);n&&t.bindEvent(e.trigger,n)}))}))},e.prototype.clearEvents=function(){var t=this;Object(s.each)(this.steps,(function(e,i){Object(s.each)(e,(function(e){var n=t.getActionCallback(i,e);n&&t.offEvent(e.trigger,n)}))}))},e.prototype.initContext=function(){var t=this.view,e=new Vt(t);this.context=e;var i=this.steps;Object(s.each)(i,(function(t){Object(s.each)(t,(function(t){if(Object(s.isFunction)(t.action))t.actionObject={action:tt(t.action,e),methodName:"execute"};else if(Object(s.isString)(t.action))t.actionObject=Ht(t.action,e);else if(Object(s.isArray)(t.action)){var i=t.action;t.actionObject=[],Object(s.each)(i,(function(i){t.actionObject.push(Ht(i,e))}))}}))}))},e.prototype.isAllowStep=function(t){var e=this.currentStepName,i=this.steps;if(e===t)return!0;if(t===Ut)return!0;if(t===$t)return e===qt;if(t===qt)return e!==$t;if(t===Kt)return e===$t||e===qt;if(t===Zt){if(i[Kt])return e===Kt;if(e===qt)return!0}return!1},e.prototype.isAllowExcute=function(t,e){if(this.isAllowStep(t)){var i=this.getKey(t,e);return(!e.once||!this.emitCaches[i])&&(!e.isEnable||e.isEnable(this.context))}return!1},e.prototype.enterStep=function(t){this.currentStepName=t,this.emitCaches={}},e.prototype.afterExecute=function(t,e){t!==Ut&&this.currentStepName!==t&&this.enterStep(t);var i=this.getKey(t,e);this.emitCaches[i]=!0},e.prototype.getKey=function(t,e){return t+e.trigger+e.action},e.prototype.getActionCallback=function(t,e){var i=this,n=this.context,r=this.callbackCaches,o=e.actionObject;if(e.action&&o){var a=this.getKey(t,e);if(!r[a]){var l=function(r){n.event=r,i.isAllowExcute(t,e)?(Object(s.isArray)(o)?Object(s.each)(o,(function(t){n.event=r,Wt(t)})):(n.event=r,Wt(o)),i.afterExecute(t,e),e.callback&&(n.event=r,e.callback(n))):n.event=null};e.debounce?r[a]=Object(s.debounce)(l,e.debounce.wait,e.debounce.immediate):e.throttle?r[a]=Object(s.throttle)(l,e.throttle.wait,{leading:e.throttle.leading,trailing:e.throttle.trailing}):r[a]=l}return r[a]}return null},e.prototype.bindEvent=function(t,e){var i=t.split(":");"window"===i[0]?window.addEventListener(i[1],e):"document"===i[0]?document.addEventListener(i[1],e):this.view.on(t,e)},e.prototype.offEvent=function(t,e){var i=t.split(":");"window"===i[0]?window.removeEventListener(i[1],e):"document"===i[0]?document.removeEventListener(i[1],e):this.view.off(t,e)},e}(zt),Jt={};function te(t){return Jt[Object(s.lowerCase)(t)]}function ee(t,e){Jt[Object(s.lowerCase)(t)]=e}var ie=i(33);function ne(t){var e,i={point:{default:{fill:t.pointFillColor,r:t.pointSize,stroke:t.pointBorderColor,lineWidth:t.pointBorder,fillOpacity:t.pointFillOpacity},active:{stroke:t.pointActiveBorderColor,lineWidth:t.pointActiveBorder},selected:{stroke:t.pointSelectedBorderColor,lineWidth:t.pointSelectedBorder},inactive:{fillOpacity:t.pointInactiveFillOpacity,strokeOpacity:t.pointInactiveBorderOpacity}},hollowPoint:{default:{fill:t.hollowPointFillColor,lineWidth:t.hollowPointBorder,stroke:t.hollowPointBorderColor,strokeOpacity:t.hollowPointBorderOpacity,r:t.hollowPointSize},active:{stroke:t.hollowPointActiveBorderColor,strokeOpacity:t.hollowPointActiveBorderOpacity},selected:{lineWidth:t.hollowPointSelectedBorder,stroke:t.hollowPointSelectedBorderColor,strokeOpacity:t.hollowPointSelectedBorderOpacity},inactive:{strokeOpacity:t.hollowPointInactiveBorderOpacity}},area:{default:{fill:t.areaFillColor,fillOpacity:t.areaFillOpacity,stroke:null},active:{fillOpacity:t.areaActiveFillOpacity},selected:{fillOpacity:t.areaSelectedFillOpacity},inactive:{fillOpacity:t.areaInactiveFillOpacity}},hollowArea:{default:{fill:null,stroke:t.hollowAreaBorderColor,lineWidth:t.hollowAreaBorder,strokeOpacity:t.hollowAreaBorderOpacity},active:{fill:null,lineWidth:t.hollowAreaActiveBorder},selected:{fill:null,lineWidth:t.hollowAreaSelectedBorder},inactive:{strokeOpacity:t.hollowAreaInactiveBorderOpacity}},interval:{default:{fill:t.intervalFillColor,fillOpacity:t.intervalFillOpacity},active:{stroke:t.intervalActiveBorderColor,lineWidth:t.intervalActiveBorder},selected:{stroke:t.intervalSelectedBorderColor,lineWidth:t.intervalSelectedBorder},inactive:{fillOpacity:t.intervalInactiveFillOpacity,strokeOpacity:t.intervalInactiveBorderOpacity}},hollowInterval:{default:{fill:t.hollowIntervalFillColor,stroke:t.hollowIntervalBorderColor,lineWidth:t.hollowIntervalBorder,strokeOpacity:t.hollowIntervalBorderOpacity},active:{stroke:t.hollowIntervalActiveBorderColor,lineWidth:t.hollowIntervalActiveBorder,strokeOpacity:t.hollowIntervalActiveBorderOpacity},selected:{stroke:t.hollowIntervalSelectedBorderColor,lineWidth:t.hollowIntervalSelectedBorder,strokeOpacity:t.hollowIntervalSelectedBorderOpacity},inactive:{stroke:t.hollowIntervalInactiveBorderColor,lineWidth:t.hollowIntervalInactiveBorder,strokeOpacity:t.hollowIntervalInactiveBorderOpacity}},line:{default:{stroke:t.lineBorderColor,lineWidth:t.lineBorder,strokeOpacity:t.lineBorderOpacity,fill:null,lineAppendWidth:10},active:{lineWidth:t.lineActiveBorder},selected:{lineWidth:t.lineSelectedBorder},inactive:{strokeOpacity:t.lineInactiveBorderOpacity}}},n={title:{autoRotate:!0,position:"center",style:{fill:t.axisTitleTextFillColor,fontSize:t.axisTitleTextFontSize,lineHeight:t.axisTitleTextLineHeight,textBaseline:"middle",fontFamily:t.fontFamily}},label:{autoRotate:!0,autoEllipsis:!0,autoHide:!0,offset:16,style:{fill:t.axisLabelFillColor,fontSize:t.axisLabelFontSize,lineHeight:t.axisLabelLineHeight,textBaseline:"middle",fontFamily:t.fontFamily}},line:{style:{lineWidth:t.axisLineBorder,stroke:t.axisLineBorderColor}},tickLine:{style:{lineWidth:t.axisTickLineBorder,stroke:t.axisTickLineBorderColor},alignTick:!0,length:t.axisTickLineLength},subTickLine:null,animate:!0},r={line:{type:"line",style:{stroke:t.axisGridBorderColor,lineWidth:t.axisGridBorder,lineDash:t.axisGridLineDash}},alignTick:!0,animate:!0},o={title:null,marker:{symbol:"circle",style:{r:t.legendCircleMarkerSize,fill:t.legendMarkerColor}},itemName:{spacing:5,style:{fill:t.legendItemNameFillColor,fontFamily:t.fontFamily,fontSize:t.legendItemNameFontSize,lineHeight:t.legendItemNameLineHeight,fontWeight:t.legendItemNameFontWeight,textAlign:"start",textBaseline:"middle"}},flipPage:!0,animate:!1,maxItemWidth:.2};return{background:t.backgroundColor,defaultColor:t.brandColor,padding:"auto",fontFamily:t.fontFamily,columnWidthRatio:.5,maxColumnWidth:null,minColumnWidth:null,roseWidthRatio:.9999999,multiplePieWidthRatio:1/1.3,colors10:t.paletteQualitative10,colors20:t.paletteQualitative20,shapes:{point:["hollow-circle","hollow-square","hollow-bowtie","hollow-diamond","hollow-hexagon","hollow-triangle","hollow-triangle-down","circle","square","bowtie","diamond","hexagon","triangle","triangle-down","cross","tick","plus","hyphen","line"],line:["line","dash","dot","smooth"],area:["area","smooth","line","smooth-line"],interval:["rect","hollow-rect","line","tick"]},sizes:[1,10],geometries:{interval:{rect:{default:{style:i.interval.default},active:{style:i.interval.active},inactive:{style:i.interval.inactive},selected:{style:function(t){var e=t.geometry.coordinate;if(e.isPolar&&e.isTransposed){var n=rt(t.getModel(),e),r=(n.startAngle+n.endAngle)/2,o=7.5*Math.cos(r),a=7.5*Math.sin(r);return{matrix:B.ext.transform(null,[["t",o,a]])}}return i.interval.selected}}},"hollow-rect":{default:{style:i.hollowInterval.default},active:{style:i.hollowInterval.active},inactive:{style:i.hollowInterval.inactive},selected:{style:i.hollowInterval.selected}},line:{default:{style:i.hollowInterval.default},active:{style:i.hollowInterval.active},inactive:{style:i.hollowInterval.inactive},selected:{style:i.hollowInterval.selected}},tick:{default:{style:i.hollowInterval.default},active:{style:i.hollowInterval.active},inactive:{style:i.hollowInterval.inactive},selected:{style:i.hollowInterval.selected}},funnel:{default:{style:i.interval.default},active:{style:i.interval.active},inactive:{style:i.interval.inactive},selected:{style:i.interval.selected}},pyramid:{default:{style:i.interval.default},active:{style:i.interval.active},inactive:{style:i.interval.inactive},selected:{style:i.interval.selected}}},line:{line:{default:{style:i.line.default},active:{style:i.line.active},inactive:{style:i.line.inactive},selected:{style:i.line.selected}},dot:{default:{style:Object(a.__assign)(Object(a.__assign)({},i.line.default),{lineDash:[1,1]})},active:{style:Object(a.__assign)(Object(a.__assign)({},i.line.active),{lineDash:[1,1]})},inactive:{style:Object(a.__assign)(Object(a.__assign)({},i.line.inactive),{lineDash:[1,1]})},selected:{style:Object(a.__assign)(Object(a.__assign)({},i.line.selected),{lineDash:[1,1]})}},dash:{default:{style:Object(a.__assign)(Object(a.__assign)({},i.line.default),{lineDash:[5.5,1]})},active:{style:Object(a.__assign)(Object(a.__assign)({},i.line.active),{lineDash:[5.5,1]})},inactive:{style:Object(a.__assign)(Object(a.__assign)({},i.line.inactive),{lineDash:[5.5,1]})},selected:{style:Object(a.__assign)(Object(a.__assign)({},i.line.selected),{lineDash:[5.5,1]})}},smooth:{default:{style:i.line.default},active:{style:i.line.active},inactive:{style:i.line.inactive},selected:{style:i.line.selected}},hv:{default:{style:i.line.default},active:{style:i.line.active},inactive:{style:i.line.inactive},selected:{style:i.line.selected}},vh:{default:{style:i.line.default},active:{style:i.line.active},inactive:{style:i.line.inactive},selected:{style:i.line.selected}},hvh:{default:{style:i.line.default},active:{style:i.line.active},inactive:{style:i.line.inactive},selected:{style:i.line.selected}},vhv:{default:{style:i.line.default},active:{style:i.line.active},inactive:{style:i.line.inactive},selected:{style:i.line.selected}}},polygon:{polygon:{default:{style:i.interval.default},active:{style:i.interval.active},inactive:{style:i.interval.inactive},selected:{style:i.interval.selected}}},point:{circle:{default:{style:i.point.default},active:{style:i.point.active},inactive:{style:i.point.inactive},selected:{style:i.point.selected}},square:{default:{style:i.point.default},active:{style:i.point.active},inactive:{style:i.point.inactive},selected:{style:i.point.selected}},bowtie:{default:{style:i.point.default},active:{style:i.point.active},inactive:{style:i.point.inactive},selected:{style:i.point.selected}},diamond:{default:{style:i.point.default},active:{style:i.point.active},inactive:{style:i.point.inactive},selected:{style:i.point.selected}},hexagon:{default:{style:i.point.default},active:{style:i.point.active},inactive:{style:i.point.inactive},selected:{style:i.point.selected}},triangle:{default:{style:i.point.default},active:{style:i.point.active},inactive:{style:i.point.inactive},selected:{style:i.point.selected}},"triangle-down":{default:{style:i.point.default},active:{style:i.point.active},inactive:{style:i.point.inactive},selected:{style:i.point.selected}},"hollow-circle":{default:{style:i.hollowPoint.default},active:{style:i.hollowPoint.active},inactive:{style:i.hollowPoint.inactive},selected:{style:i.hollowPoint.selected}},"hollow-square":{default:{style:i.hollowPoint.default},active:{style:i.hollowPoint.active},inactive:{style:i.hollowPoint.inactive},selected:{style:i.hollowPoint.selected}},"hollow-bowtie":{default:{style:i.hollowPoint.default},active:{style:i.hollowPoint.active},inactive:{style:i.hollowPoint.inactive},selected:{style:i.hollowPoint.selected}},"hollow-diamond":{default:{style:i.hollowPoint.default},active:{style:i.hollowPoint.active},inactive:{style:i.hollowPoint.inactive},selected:{style:i.hollowPoint.selected}},"hollow-hexagon":{default:{style:i.hollowPoint.default},active:{style:i.hollowPoint.active},inactive:{style:i.hollowPoint.inactive},selected:{style:i.hollowPoint.selected}},"hollow-triangle":{default:{style:i.hollowPoint.default},active:{style:i.hollowPoint.active},inactive:{style:i.hollowPoint.inactive},selected:{style:i.hollowPoint.selected}},"hollow-triangle-down":{default:{style:i.hollowPoint.default},active:{style:i.hollowPoint.active},inactive:{style:i.hollowPoint.inactive},selected:{style:i.hollowPoint.selected}},cross:{default:{style:i.hollowPoint.default},active:{style:i.hollowPoint.active},inactive:{style:i.hollowPoint.inactive},selected:{style:i.hollowPoint.selected}},tick:{default:{style:i.hollowPoint.default},active:{style:i.hollowPoint.active},inactive:{style:i.hollowPoint.inactive},selected:{style:i.hollowPoint.selected}},plus:{default:{style:i.hollowPoint.default},active:{style:i.hollowPoint.active},inactive:{style:i.hollowPoint.inactive},selected:{style:i.hollowPoint.selected}},hyphen:{default:{style:i.hollowPoint.default},active:{style:i.hollowPoint.active},inactive:{style:i.hollowPoint.inactive},selected:{style:i.hollowPoint.selected}},line:{default:{style:i.hollowPoint.default},active:{style:i.hollowPoint.active},inactive:{style:i.hollowPoint.inactive},selected:{style:i.hollowPoint.selected}}},area:{area:{default:{style:i.area.default},active:{style:i.area.active},inactive:{style:i.area.inactive},selected:{style:i.area.selected}},smooth:{default:{style:i.area.default},active:{style:i.area.active},inactive:{style:i.area.inactive},selected:{style:i.area.selected}},line:{default:{style:i.hollowArea.default},active:{style:i.hollowArea.active},inactive:{style:i.hollowArea.inactive},selected:{style:i.hollowArea.selected}},"smooth-line":{default:{style:i.hollowArea.default},active:{style:i.hollowArea.active},inactive:{style:i.hollowArea.inactive},selected:{style:i.hollowArea.selected}}},schema:{candle:{default:{style:i.hollowInterval.default},active:{style:i.hollowInterval.active},inactive:{style:i.hollowInterval.inactive},selected:{style:i.hollowInterval.selected}},box:{default:{style:i.hollowInterval.default},active:{style:i.hollowInterval.active},inactive:{style:i.hollowInterval.inactive},selected:{style:i.hollowInterval.selected}}},edge:{line:{default:{style:i.line.default},active:{style:i.line.active},inactive:{style:i.line.inactive},selected:{style:i.line.selected}},vhv:{default:{style:i.line.default},active:{style:i.line.active},inactive:{style:i.line.inactive},selected:{style:i.line.selected}},smooth:{default:{style:i.line.default},active:{style:i.line.active},inactive:{style:i.line.inactive},selected:{style:i.line.selected}},arc:{default:{style:i.line.default},active:{style:i.line.active},inactive:{style:i.line.inactive},selected:{style:i.line.selected}}}},components:{axis:{top:Object(s.deepMix)({},n,{position:"top",grid:null,title:null,verticalLimitLength:.5}),bottom:Object(s.deepMix)({},n,{position:"bottom",grid:null,title:null,verticalLimitLength:.5}),left:Object(s.deepMix)({},n,{position:"left",label:{offset:8},title:null,line:null,tickLine:null,grid:r,verticalLimitLength:1/3}),right:Object(s.deepMix)({},n,{position:"right",label:{offset:8},title:null,line:null,tickLine:null,grid:r,verticalLimitLength:1/3}),circle:Object(s.deepMix)({},n,{title:null,label:{offset:8},grid:Object(s.deepMix)({},r,{line:{type:"line"}})}),radius:Object(s.deepMix)({},n,{title:null,label:{offset:8},grid:Object(s.deepMix)({},r,{line:{type:"circle"}})})},legend:{right:Object(s.deepMix)({},o,{layout:"vertical"}),left:Object(s.deepMix)({},o,{layout:"vertical"}),top:Object(s.deepMix)({},o,{layout:"horizontal"}),bottom:Object(s.deepMix)({},o,{layout:"horizontal"}),continuous:{title:null,background:null,track:{},rail:{type:"color",size:t.sliderRailHeight,defaultLength:t.sliderRailWidth,style:{fill:t.sliderRailFillColor,stroke:t.sliderRailBorderColor,lineWidth:t.sliderRailBorder}},label:{align:"rail",spacing:4,formatter:null,style:{fill:t.sliderLabelTextFillColor,fontSize:t.sliderLabelTextFontSize,lineHeight:t.sliderLabelTextLineHeight,textBaseline:"middle",fontFamily:t.fontFamily}},handler:{size:t.sliderHandlerWidth,style:{fill:t.sliderHandlerFillColor,stroke:t.sliderHandlerBorderColor}},slidable:!0},margin:[0,0,0,0]},tooltip:{showContent:!0,follow:!0,showCrosshairs:!1,showMarkers:!0,shared:!1,enterable:!1,position:"auto",marker:{symbol:"circle",stroke:"#fff",shadowBlur:10,shadowOffsetX:0,shadowOffSetY:0,shadowColor:"rgba(0,0,0,0.09)",lineWidth:2,r:4},crosshairs:{line:{style:{stroke:t.tooltipCrosshairsBorderColor,lineWidth:t.tooltipCrosshairsBorder}},text:null,textBackground:{padding:2,style:{fill:"rgba(0, 0, 0, 0.25)",lineWidth:0,stroke:null}},follow:!1},domStyles:(e={},e[""+ie.CONTAINER_CLASS]={position:"absolute",visibility:"hidden",zIndex:8,transition:"left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s",backgroundColor:t.tooltipContainerFillColor,opacity:t.tooltipContainerFillOpacity,boxShadow:t.tooltipContainerShadow,borderRadius:t.tooltipContainerBorderRadius+"px",color:t.tooltipTextFillColor,fontSize:t.tooltipTextFontSize+"px",fontFamily:t.fontFamily,lineHeight:t.tooltipTextLineHeight+"px",padding:"0 12px 0 12px"},e[""+ie.TITLE_CLASS]={marginBottom:"12px",marginTop:"12px"},e[""+ie.LIST_CLASS]={margin:0,listStyleType:"none",padding:0},e[""+ie.LIST_ITEM_CLASS]={listStyleType:"none",padding:0,marginBottom:"12px",marginTop:"12px",marginLeft:0,marginRight:0},e[""+ie.MARKER_CLASS]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},e[""+ie.VALUE_CLASS]={display:"inline-block",float:"right",marginLeft:"30px"},e)},annotation:{arc:{style:{stroke:t.annotationArcBorderColor,lineWidth:t.annotationArcBorder},animate:!0},line:{style:{stroke:t.annotationLineBorderColor,lineDash:t.annotationLineDash,lineWidth:t.annotationLineBorder},text:{position:"start",autoRotate:!0,style:{fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,textAlign:"start",fontFamily:t.fontFamily,textBaseline:"bottom"}},animate:!0},text:{style:{fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,textBaseline:"middle",textAlign:"start",fontFamily:t.fontFamily},animate:!0},region:{top:!1,style:{lineWidth:t.annotationRegionBorder,stroke:t.annotationRegionBorderColor,fill:t.annotationRegionFillColor,fillOpacity:t.annotationRegionFillOpacity},animate:!0},image:{top:!1,animate:!0},dataMarker:{top:!0,point:{style:{r:3,stroke:t.brandColor,lineWidth:2}},line:{style:{stroke:t.annotationLineBorderColor,lineWidth:t.annotationLineBorder},length:t.annotationDataMarkerLineLength},text:{style:{textAlign:"start",fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,fontFamily:t.fontFamily}},direction:"upward",autoAdjust:!0,animate:!0},dataRegion:{style:{region:{fill:t.annotationRegionFillColor,fillOpacity:t.annotationRegionFillOpacity},text:{textAlign:"center",textBaseline:"bottom",fill:t.annotationTextFillColor,stroke:t.annotationTextBorderColor,lineWidth:t.annotationTextBorder,fontSize:t.annotationTextFontSize,fontFamily:t.fontFamily}},animate:!0}}},labels:{offset:12,style:{fill:t.labelFillColor,fontSize:t.labelFontSize,fontFamily:t.fontFamily,stroke:t.labelBorderColor,lineWidth:t.labelBorder},autoRotate:!0},innerLabels:{style:{fill:t.innerLabelFillColor,fontSize:t.innerLabelFontSize,fontFamily:t.fontFamily,stroke:t.innerLabelBorderColor,lineWidth:t.innerLabelBorder},autoRotate:!0},pieLabels:{labelHeight:14,offset:30,labelLine:{style:{lineWidth:t.labelLineBorder}},autoRotate:!0}}}var re="#000",oe="#595959",ae="#8C8C8C",se="#BFBFBF",le="#D9D9D9",ue="#FFFFFF",ce=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E86452","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],he={default:ne({backgroundColor:"transparent",brandColor:ce[0],paletteQualitative10:ce,paletteQualitative20:["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#E86452","#F8D0CB","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",fontFamily:'"-apple-system", "Segoe UI", Roboto, "Helvetica Neue", Arial,\n "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",\n "Noto Color Emoji"',axisLineBorderColor:se,axisLineBorder:.5,axisLineDash:null,axisTitleTextFillColor:oe,axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTickLineBorderColor:se,axisTickLineLength:4,axisTickLineBorder:.5,axisSubTickLineBorderColor:le,axisSubTickLineLength:2,axisSubTickLineBorder:.5,axisLabelFillColor:ae,axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisGridBorderColor:le,axisGridBorder:.5,axisGridLineDash:null,legendTitleTextFillColor:ae,legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:ce[0],legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:oe,legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",sliderRailFillColor:le,sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:ae,sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:"#F0F0F0",sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:se,annotationArcBorderColor:le,annotationArcBorder:.5,annotationLineBorderColor:se,annotationLineBorder:.5,annotationLineDash:null,annotationTextFillColor:oe,annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:"#F2F2F2",annotationTextBorder:1.5,annotationRegionFillColor:re,annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:se,tooltipCrosshairsBorder:.5,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"rgb(255, 255, 255)",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 0px 10px #aeaeae",tooltipContainerBorderRadius:3,tooltipTextFillColor:oe,tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:oe,labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:ue,innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,labelLineBorder:.5,labelLineBorderColor:se,pointFillColor:ce[0],pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:ue,pointBorderOpacity:1,pointActiveBorderColor:re,pointSelectedBorder:2,pointSelectedBorderColor:re,pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:ce[0],hollowPointBorderOpacity:.95,hollowPointFillColor:ue,hollowPointActiveBorder:1,hollowPointActiveBorderColor:re,hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:re,hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:ce[0],lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:ce[0],areaFillOpacity:.25,areaActiveFillColor:ce[0],areaActiveFillOpacity:.5,areaSelectedFillColor:ce[0],areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:ce[0],hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:re,hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:re,hollowAreaInactiveBorderOpacity:.3,intervalFillColor:ce[0],intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:re,intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:re,intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:ce[0],hollowIntervalBorderOpacity:1,hollowIntervalFillColor:ue,hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:re,hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:re,hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3})};function pe(t){return Object(s.get)(he,Object(s.lowerCase)(t),he.default)}function fe(t,e){he[Object(s.lowerCase)(t)]=Object(s.deepMix)({},he.default,e)}function de(t,e,i){var n=i.translate(t),r=i.translate(e);return Object(s.isNumberEqual)(n,r)}function ge(t,e,i){var n=i.coordinate,r=i.getYScale(),o=r.field,a=n.invert(e),l=r.invert(a.y);return Object(s.find)(t,(function(t){var e=t._origin;return e[o][0]<=l&&e[o][1]>=l}))||t[t.length-1]}var ye=Object(s.memoize)((function(t){if(t.isCategory)return 1;for(var e=t.values,i=e.length,n=t.translate(e[0]),r=n,o=0;or&&(r=s)}return(r-n)/(i-1)}));function ve(t){for(var e,i=0,n=function(t){var e=Object(s.values)(t.attributes);return Object(s.filter)(e,(function(t){return Object(s.contains)(d,t.type)}))}(t);i(1+o)/2&&(s=a),n.translate(n.invert(s))}(t,i),_=m._origin[a],O=m._origin[l],w=x._origin[a],M=o.isLinear&&Object(s.isArray)(O);if(Object(s.isArray)(_)){for(d=0;d=b){if(!M){u=A;break}Object(s.isArray)(u)||(u=[]),u.push(A)}}Object(s.isArray)(u)&&(u=ge(u,t,i))}else{var C=void 0;if(r.isLinear||"timeCat"===r.type){if((b>r.translate(w)||br.max||bMath.abs(r.translate(C._origin[a])-b)&&(x=C)}var E=ye(i.getXScale());return!u&&Math.abs(r.translate(x._origin[a])-b)<=E/2&&(u=x),u}function xe(t,e,i){void 0===i&&(i="");var n,r=t._origin,o=function(t,e,i){var n=i;i||(n=e.getAttribute("position").getFields()[0]);var r=e.scales;return r[n]?r[n].getText(t[n]):Object(s.hasKey)(t,n)?t[n]:n}(r,e,i),l=e.tooltipOption,u=e.theme.defaultColor,c=[];function h(e,i){if(!Object(s.isNil)(i)&&""!==i){var n={title:o,data:r,mappingData:t,name:e,value:i,color:t.color||u,marker:!0};c.push(n)}}if(Object(s.isObject)(l)){var p=l.fields,f=l.callback;if(f){var d=p.map((function(e){return t._origin[e]})),g=f.apply(void 0,d),y=Object(a.__assign)({data:t._origin,mappingData:t,title:o,color:t.color||u,marker:!0},g);c.push(y)}else for(var v=e.scales,m=0,x=p;m');A.appendChild(E);var L=b(A,u,r,o),I=new(y(v).Canvas)(Object(a.__assign)({container:E,pixelRatio:x,localRefresh:O},L));return(i=t.call(this,{parent:null,canvas:I,backgroundGroup:I.addGroup({zIndex:f}),middleGroup:I.addGroup({zIndex:p}),foregroundGroup:I.addGroup({zIndex:h}),padding:c,appendPadding:d,visible:M,options:j,limitInPlot:P,theme:T})||this).onResize=Object(s.debounce)((function(){i.forceFit()}),300),i.ele=A,i.canvas=I,i.width=L.width,i.height=L.height,i.autoFit=u,i.localRefresh=O,i.renderer=v,i.wrapperElement=E,i.updateCanvasStyle(),i.bindAutoFit(),i.initDefaultInteractions(S),i}return Object(a.__extends)(e,t),e.prototype.initDefaultInteractions=function(t){var e=this;Object(s.each)(t,(function(t){e.interaction(t)}))},e.prototype.changeSize=function(t,e){return this.width===t&&this.height===e||(this.width=t,this.height=e,this.canvas.changeSize(t,e),this.render(!0)),this},e.prototype.destroy=function(){var e,i;t.prototype.destroy.call(this),this.unbindAutoFit(),this.canvas.destroy(),e=this.wrapperElement,(i=e.parentNode)&&i.removeChild(e),this.wrapperElement=null},e.prototype.changeVisible=function(e){return t.prototype.changeVisible.call(this,e),this.wrapperElement.style.display=e?"":"none",this},e.prototype.forceFit=function(){if(!this.destroyed){var t=b(this.ele,!0,this.width,this.height),e=t.width,i=t.height;this.changeSize(e,i)}},e.prototype.updateCanvasStyle=function(){Object(m.modifyCSS)(this.canvas.get("el"),{display:"inline-block",verticalAlign:"middle"})},e.prototype.bindAutoFit=function(){this.autoFit&&window.addEventListener("resize",this.onResize)},e.prototype.unbindAutoFit=function(){this.autoFit&&window.removeEventListener("resize",this.onResize)},e}(Ee),Ie=function(){function t(t){this.visible=!0,this.components=[],this.view=t}return t.prototype.clear=function(){Object(s.each)(this.components,(function(t){t.component.destroy()})),this.components=[]},t.prototype.destroy=function(){this.clear()},t.prototype.getComponents=function(){return this.components},t.prototype.changeVisible=function(t){this.visible!==t&&(this.components.forEach((function(e){t?e.component.show():e.component.hide()})),this.visible=t)},t}(),De=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,o=this.yField,a=i.indexOf(e),s=i.length;return!o&&this.isAdjust("y")?(n=0,r=1):s>1?(n=i[0===a?0:a-1],r=i[a===s-1?s-1:a+1],0!==a?n+=(e-n)/2:n-=(r-e)/2,a!==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);s.each(t,(function(t,e){s.each(n,(function(n,r){i.adjustDim(r,n,t,e)}))}))},t.prototype.groupData=function(t,e){return s.each(t,(function(t){void 0===t[e]&&(t[e]=0)})),s.groupBy(t,e)},t.prototype.adjustDim=function(t,e,i,n){},t.prototype.getDimValues=function(t){var e=this.xField,i=this.yField,n={},r=[];if(e&&this.isAdjust("x")&&r.push(e),i&&this.isAdjust("y")&&r.push(i),r.forEach((function(e){n[e]=s.valuesOfKey(t,e).sort((function(t,e){return t-e}))})),!i&&this.isAdjust("y")){n.y=[0,1]}return n},t}(),ke={},Be=function(t){return ke[t.toLowerCase()]},Fe=function(t,e){if(Be(t))throw new Error("Adjust type '"+t+"' existed.");ke[t.toLowerCase()]=e},Re=i(1),Ne=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?.5:n,o=e.dodgeRatio,a=void 0===o?.5:o,s=e.dodgeBy;return i.marginRatio=r,i.dodgeRatio=a,i.dodgeBy=s,i}return Object(Re.__extends)(e,t),e.prototype.process=function(t){var e=s.clone(t),i=s.flatten(e),n=this.dodgeBy,r=n?s.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,o=this.getDistribution(t),a=this.groupData(i,t);return s.each(a,(function(i,a){var l;l=1===e.length?{pre:e[0]-1,next:e[0]+1}:r.getAdjustRange(t,parseFloat(a),e),s.each(i,(function(e){var i=e[t],a=o[i],s=a.indexOf(n);e[t]=r.getDodgeOffset(l,s,a.length)}))})),[]},e.prototype.getDodgeOffset=function(t,e,i){var n=this.dodgeRatio,r=this.marginRatio,o=t.pre,a=t.next,s=a-o,l=s*n/i,u=r*l;return(o+a)/2+(.5*(s-i*l-(i-1)*u)+((e+1)*l+e*u)-.5*l-.5*s)},e.prototype.getDistribution=function(t){var e=this.adjustDataArray,i=this.cacheMap,n=i[t];return n||(n={},s.each(e,(function(e,i){var r=s.valuesOfKey(e,t);r.length||r.push(0),s.each(r,(function(t){n[t]||(n[t]=[]),n[t].push(i)}))})),i[t]=n),n},e}(De);var Ye=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(Re.__extends)(e,t),e.prototype.process=function(t){var e=s.clone(t),i=s.flatten(e);return this.adjustData(e,i),e},e.prototype.adjustDim=function(t,e,i){var n=this,r=this.groupData(i,t);return s.each(r,(function(i,r){return n.adjustGroup(i,t,parseFloat(r),e)}))},e.prototype.getAdjustOffset=function(t){var e,i=t.pre,n=t.next,r=.05*(n-i);return(n-r-(e=i+r))*Math.random()+e},e.prototype.adjustGroup=function(t,e,i,n){var r=this,o=this.getAdjustRange(e,i,n);return s.each(t,(function(t){t[e]=r.getAdjustOffset(o)})),t},e}(De),Ge=s.Cache,Xe=function(t){function e(e){var i=t.call(this,e)||this,n=e.adjustNames,r=void 0===n?["y"]:n,o=e.height,a=void 0===o?NaN:o,s=e.size,l=void 0===s?10:s,u=e.reverseOrder,c=void 0!==u&&u;return i.adjustNames=r,i.height=a,i.size=l,i.reverseOrder=c,i}return Object(Re.__extends)(e,t),e.prototype.process=function(t){var e=this.yField,i=this.reverseOrder,n=e?this.processStack(t):this.processOneDimStack(t);return i?this.reverse(n):n},e.prototype.reverse=function(t){return t.slice(0).reverse()},e.prototype.processStack=function(t){var e=this.xField,i=this.yField,n=this.reverseOrder?this.reverse(t):t,r=new Ge,o=new Ge;return n.map((function(t){return t.map((function(t){var n,a=s.get(t,e,0),l=s.get(t,i),u=a.toString();if(l=s.isArray(l)?l[1]:l,!s.isNil(l)){var c=l>=0?r:o;c.has(u)||c.set(u,0);var h=c.get(u),p=l+h;return c.set(u,p),Object(Re.__assign)(Object(Re.__assign)({},t),((n={})[i]=[h,p],n))}return t}))}))},e.prototype.processOneDimStack=function(t){var e=this,i=this.xField,n=this.height,r=this.reverseOrder,o=r?this.reverse(t):t,a=new Ge;return o.map((function(t){return t.map((function(t){var r,o=e.size,s=t[i],l=2*o/n;a.has(s)||a.set(s,l/2);var u=a.get(s);return a.set(s,u+l),Object(Re.__assign)(Object(Re.__assign)({},t),((r={}).y=u,r))}))}))},e}(De),Ve=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(Re.__extends)(e,t),e.prototype.process=function(t){var e=s.flatten(t),i=this.xField,n=this.yField,r=this.getXValuesMaxMap(e),o=Math.max.apply(Math,Object.keys(r).map((function(t){return r[t]})));return s.map(t,(function(t){return s.map(t,(function(t){var e,a,l=t[n],u=t[i];if(s.isArray(l)){var c=(o-r[u])/2;return Object(Re.__assign)(Object(Re.__assign)({},t),((e={})[n]=s.map(l,(function(t){return c+t})),e))}var h=(o-l)/2;return Object(Re.__assign)(Object(Re.__assign)({},t),((a={})[n]=[h,l+h],a))}))}))},e.prototype.getXValuesMaxMap=function(t){var e=this,i=this.xField,n=this.yField,r=s.groupBy(t,(function(t){return t[i]}));return s.mapValues(r,(function(t){return e.getDimMaxValue(t,n)}))},e.prototype.getDimMaxValue=function(t,e){var i=s.map(t,(function(t){return s.get(t,e,[])})),n=s.flatten(i);return Math.max.apply(Math,n)},e}(De);Fe("Dodge",Ne),Fe("Jitter",Ye),Fe("Stack",Xe),Fe("Symmetric",Ve);var ze={};function He(t){return ze[t.toLowerCase()]}function We(t,e){ze[t.toLowerCase()]=e}var qe={appear:{duration:450,easing:"easeQuadOut"},update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},Ue={interval:function(t){return{enter:{animation:t.isRect?t.isTransposed?"scale-in-x":"scale-in-y":"fade-in"},update:{animation:t.isPolar&&t.isTransposed?"sector-path-update":null},leave:{animation:"fade-out"}}},line:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},path:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},point:{appear:{animation:"zoom-in"},enter:{animation:"zoom-in"},leave:{animation:"zoom-out"}},area:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},polygon:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},schema:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},edge:{enter:{animation:"fade-in"},leave:{animation:"fade-out"}},label:{appear:{animation:"fade-in",delay:450},enter:{animation:"fade-in"},update:{animation:"position-update"},leave:{animation:"fade-out"}}},Ke={line:function(){return{animation:"wave-in"}},area:function(){return{animation:"wave-in"}},path:function(){return{animation:"fade-in"}},interval:function(t){var e;return t.isRect?e=t.isTransposed?"grow-in-x":"grow-in-y":(e="grow-in-xy",t.isPolar&&t.isTransposed&&(e="wave-in")),{animation:e}},schema:function(t){return{animation:t.isRect?t.isTransposed?"grow-in-x":"grow-in-y":"grow-in-xy"}},polygon:function(){return{animation:"fade-in",duration:500}},edge:function(){return{animation:"fade-in"}}};function Ze(t,e,i){var n=Ue[t];return n&&(Object(s.isFunction)(n)&&(n=n(e)),n=Object(s.deepMix)({},qe,n),i)?n[i]:n}function $e(t,e,i){var n=Object(s.get)(t.get("origin"),"data","_origin"),r=e.animation,o=function(t,e){return{delay:Object(s.isFunction)(t.delay)?t.delay(e):t.delay,easing:Object(s.isFunction)(t.easing)?t.easing(e):t.easing,duration:Object(s.isFunction)(t.duration)?t.duration(e):t.duration,callback:t.callback}}(e,n);if(r){var a=He(r);a&&a(t,o,i)}else t.animate(i.toAttrs,o)}var Qe=i(111),Je=function(t){function e(e){var i=t.call(this,e)||this;i.states=[];var n=e.shapeFactory,r=e.container,o=e.offscreenGroup,a=e.visible,s=void 0===a||a;return i.shapeFactory=n,i.container=r,i.offscreenGroup=o,i.visible=s,i}return Object(a.__extends)(e,t),e.prototype.draw=function(t,e){void 0===e&&(e=!1),this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.drawShape(t,e),!1===this.visible&&this.changeVisible(!1)},e.prototype.update=function(t){var e=this.shapeFactory,i=this.shape;if(i){this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.setShapeInfo(i,t);var n=this.getOffscreenGroup(),r=e.drawShape(this.shapeType,t,n);r.cfg.data=this.data,r.cfg.origin=t,this.syncShapeStyle(i,r,"",this.getAnimateCfg("update"))}},e.prototype.destroy=function(){var e=this.shapeFactory,i=this.shape;if(i){var n=this.getAnimateCfg("leave");n?$e(i,n,{coordinate:e.coordinate,toAttrs:Object(a.__assign)({},i.attr())}):i.remove(!0)}this.states=[],this.shapeFactory=void 0,this.container=void 0,this.shape=void 0,this.animate=void 0,this.geometry=void 0,this.labelShape=void 0,this.model=void 0,this.data=void 0,this.offscreenGroup=void 0,this.statesStyle=void 0,t.prototype.destroy.call(this)},e.prototype.changeVisible=function(e){t.prototype.changeVisible.call(this,e),e?(this.shape&&this.shape.show(),this.labelShape&&this.labelShape.forEach((function(t){t.show()}))):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach((function(t){t.hide()})))},e.prototype.setState=function(t,e){var i=this,n=this,r=n.states,o=n.shapeFactory,a=n.model,s=n.shape,l=n.shapeType,u=r.indexOf(t);if(e){if(u>-1)return;r.push(t),"active"!==t&&"selected"!==t||s.toFront()}else{if(-1===u)return;r.splice(u,1),"active"!==t&&"selected"!==t||s.toBack()}var c=o.drawShape(l,a,this.getOffscreenGroup());r.length?r.forEach((function(t){i.syncShapeStyle(s,c,t,null)})):this.syncShapeStyle(s,c,"reset",null),c.remove(!0);var h={state:t,stateStatus:e,element:this,target:this.container};this.container.emit("statechange",h),Object(Qe.propagationDelegate)(this.shape,"statechange",h)},e.prototype.clearStates=function(){var t=this,e=this.states;Object(s.each)(e,(function(e){t.setState(e,!1)})),this.states=[]},e.prototype.hasState=function(t){return this.states.includes(t)},e.prototype.getStates=function(){return this.states},e.prototype.getData=function(){return this.data},e.prototype.getModel=function(){return this.model},e.prototype.getBBox=function(){var t=this.shape,e=this.labelShape,i={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return t&&(i=t.getCanvasBBox()),e&&e.forEach((function(t){var e=t.getCanvasBBox();i.x=Math.min(e.x,i.x),i.y=Math.min(e.y,i.y),i.minX=Math.min(e.minX,i.minX),i.minY=Math.min(e.minY,i.minY),i.maxX=Math.max(e.maxX,i.maxX),i.maxY=Math.max(e.maxY,i.maxY)})),i.width=i.maxX-i.minX,i.height=i.maxY-i.minY,i},e.prototype.getStatesStyle=function(){if(!this.statesStyle){var t=this.shapeType,e=this.geometry,i=this.shapeFactory,n=e.stateOption,r=i.defaultShapeType,o=i.theme[t]||i.theme[r];this.statesStyle=Object(s.deepMix)({},o,n)}return this.statesStyle},e.prototype.getStateStyle=function(t,e){var i=this.getStatesStyle(),n=Object(s.get)(i,[t,"style"],{}),r=n[e]||n;return Object(s.isFunction)(r)?r(this):r},e.prototype.getAnimateCfg=function(t){var e=this.animate;return e?e[t]:null},e.prototype.drawShape=function(t,e){void 0===e&&(e=!1);var i=this.shapeFactory,n=this.container,r=this.shapeType;if(this.shape=i.drawShape(r,t,n),this.shape){this.setShapeInfo(this.shape,t);var o=this.shape.cfg.name;o?Object(s.isString)(o)&&(this.shape.cfg.name=["element",o]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var l=e?"enter":"appear",u=this.getAnimateCfg(l);u&&$e(this.shape,u,{coordinate:i.coordinate,toAttrs:Object(a.__assign)({},this.shape.attr())})}},e.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},e.prototype.setShapeInfo=function(t,e){var i=this;(t.cfg.origin=e,t.cfg.element=this,t.isGroup())&&t.get("children").forEach((function(t){i.setShapeInfo(t,e)}))},e.prototype.syncShapeStyle=function(t,e,i,n,r){if(void 0===i&&(i=""),void 0===r&&(r=0),t.isGroup())for(var o=t.get("children"),a=e.get("children"),l=0;l=0?e:i<=0?i:0},e.prototype.createAttrOption=function(t,e,i){if(Object(s.isNil)(e)||Object(s.isObject)(e))Object(s.isObject)(e)&&Object(s.isEqual)(Object.keys(e),["values"])?Object(s.set)(this.attributeOption,t,{fields:e.values}):Object(s.set)(this.attributeOption,t,e);else{var n={};Object(s.isNumber)(e)?n.values=[e]:n.fields=di(e),i&&(Object(s.isFunction)(i)?n.callback=i:n.values=i),Object(s.set)(this.attributeOption,t,n)}},e.prototype.initAttributes=function(){var t=this,e=this.attributes,i=this.attributeOption,n=this.theme,r=this.shapeType;this.groupScales=[];var o={},s=function(s){if(i.hasOwnProperty(s)){var l=i[s];if(!l)return{value:void 0};var u=Object(a.__assign)({},l),c=u.callback,h=u.values,p=u.fields,f=(void 0===p?[]:p).map((function(e){var i=t.scales[e];return i.isCategory&&!o[e]&&d.includes(s)&&(t.groupScales.push(i),o[e]=!0),i}));u.scales=f,"position"!==s&&1===f.length&&"identity"===f[0].type?u.values=f[0].values:c||h||("size"===s?u.values=n.sizes:"shape"===s?u.values=n.shapes[r]||[]:"color"===s&&(f.length?u.values=f[0].values.length<=10?n.colors10:n.colors20:u.values=n.colors10));var g=Object(O.getAttribute)(s);e[s]=new g(u)}};for(var l in i){var u=s(l);if("object"===gi(u))return u.value}},e.prototype.processData=function(t){this.hasSorted=!1;for(var e=this.getAttribute("position").scales.filter((function(t){return t.isCategory})),i=this.groupData(t),n=[],r=0,o=i.length;ro&&(o=c)}var h=this.scaleDefs,p={};rt.max&&!Object(s.get)(h,[n,"max"])&&(p.max=o),t.change(p)},e.prototype.beforeMapping=function(t){var e=t;if(this.sortable&&this.sort(e),this.generatePoints)for(var i=0,n=e.length;i1)for(var h=0;h0||1===i?n*a:n*a*-1,s},t.prototype.getLabelPoint=function(t,e,i){var n=this.getCoordinate(),r=t.content.length;function o(e,i){var n,r,o=e;return Object(s.isArray)(o)&&(1===t.content.length?o.length<=2?o=o[e.length-1]:(n=o,r=0,Object(s.each)(n,(function(t){r+=t})),o=r/n.length):o=o[i]),o}var a={content:t.content[i],x:0,y:0,start:{x:0,y:0},color:"#fff"};if(e&&"polygon"===this.geometry.type){var l=function(t,e){if(Object(s.isNumber)(t)&&Object(s.isNumber)(e))return[t,e];for(var i,n,r=-1,o=0,a=0,l=t.length-1,u=0;++r1&&0===e&&("right"===n?n="left":"left"===n&&(n="right"))}return n},t.prototype.getLabelId=function(t){var e=this.geometry,i=e.type,n=e.getXScale(),r=e.getYScale(),o=t._origin,a=e.getElementId(t);return"line"===i||"area"===i?a+=" "+o[n.field]:"path"===i&&(a+=" "+o[n.field]+"-"+o[r.field]),a},t.prototype.getLabelsRenderer=function(){var t=this.geometry,e=t.labelsContainer,i=t.labelOption,n=t.canvasRegion,r=t.animateOption,o=this.geometry.coordinate,a=this.labelsRenderer;return a||(a=new bi({container:e,layout:Object(s.get)(i,["cfg","layout"],{type:this.defaultLayout})}),this.labelsRenderer=a),a.region=n,a.animate=!!r&&Ze("label",o),a},t.prototype.getLabelCfgs=function(t){var e=this,i=this.geometry,n=this.getDefaultLabelCfg(),r=i.type,o=i.theme,l=i.labelOption,u=i.scales,c=i.coordinate,h=l,p=h.fields,f=h.callback,d=h.cfg,g=p.map((function(t){return u[t]})),y=[];return Object(s.each)(t,(function(t,i){var l,u=t._origin,h=e.getLabelText(u,g);if(f){var v=p.map((function(t){return u[t]}));if(l=f.apply(void 0,v),Object(s.isNil)(l))return void y.push(null)}var m=Object(a.__assign)(Object(a.__assign)({id:e.getLabelId(t),data:u,mappingData:t,coordinate:c},d),l),x=m.content;Object(s.isFunction)(x)?m.content=x(u,t,i):Object(s.isUndefined)(x)&&(m.content=h[0]),Object(s.isFunction)(m.position)&&(m.position=m.position(u,t,i)),m="polygon"===r||m.offset<0&&!["line","point","path"].includes(r)?Object(s.deepMix)({},n,o.innerLabels,m):Object(s.deepMix)({},n,o.labels,m),y.push(m)})),y},t.prototype.getLabelText=function(t,e){var i=[];return Object(s.each)(e,(function(e){var n=t[e.field];n=Object(s.isArray)(n)?n.map((function(t){return e.getText(t)})):e.getText(n),Object(s.isNil)(n)||""===n?i.push(null):i.push(n)})),i},t.prototype.getOffsetVector=function(t){void 0===t&&(t=0);var e=this.getCoordinate();return e.isTransposed?e.applyMatrix(t,0):e.applyMatrix(0,t)},t.prototype.getGeometryShapes=function(){var t=this.geometry,e={};return Object(s.each)(t.elementsMap,(function(t,i){e[i]=t.shape})),Object(s.each)(t.getOffscreenGroup().getChildren(),(function(i){var n=t.getElementId(i.get("origin").mappingData);e[n]=i})),e},t}(),Oi=i(122),wi="4.0.15",Mi="#000",Ci="#FFFFFF",Si="#A6A6A6",ji="#737373",Pi="#404040",Ti="#262626",Ai=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E86452","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"],Ei={backgroundColor:"#141414",brandColor:Ai[0],paletteQualitative10:Ai,paletteQualitative20:["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#E86452","#F8D0CB","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"],paletteSemanticRed:"#F4664A",paletteSemanticGreen:"#30BF78",paletteSemanticYellow:"#FAAD14",fontFamily:'"-apple-system", "Segoe UI", Roboto, "Helvetica Neue", Arial,\n "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",\n "Noto Color Emoji"',axisLineBorderColor:Pi,axisLineBorder:.5,axisLineDash:null,axisTitleTextFillColor:Si,axisTitleTextFontSize:12,axisTitleTextLineHeight:12,axisTitleTextFontWeight:"normal",axisTickLineBorderColor:Pi,axisTickLineLength:4,axisTickLineBorder:.5,axisSubTickLineBorderColor:Ti,axisSubTickLineLength:2,axisSubTickLineBorder:.5,axisLabelFillColor:ji,axisLabelFontSize:12,axisLabelLineHeight:12,axisLabelFontWeight:"normal",axisGridBorderColor:Ti,axisGridBorder:.5,axisGridLineDash:null,legendTitleTextFillColor:ji,legendTitleTextFontSize:12,legendTitleTextLineHeight:21,legendTitleTextFontWeight:"normal",legendMarkerColor:Ai[0],legendMarkerSize:4,legendCircleMarkerSize:4,legendSquareMarkerSize:4,legendLineMarkerSize:5,legendItemNameFillColor:Si,legendItemNameFontSize:12,legendItemNameLineHeight:12,legendItemNameFontWeight:"normal",sliderRailFillColor:Ti,sliderRailBorder:0,sliderRailBorderColor:null,sliderRailWidth:100,sliderRailHeight:12,sliderLabelTextFillColor:ji,sliderLabelTextFontSize:12,sliderLabelTextLineHeight:12,sliderLabelTextFontWeight:"normal",sliderHandlerFillColor:"#F0F0F0",sliderHandlerWidth:10,sliderHandlerHeight:14,sliderHandlerBorder:1,sliderHandlerBorderColor:"#BFBFBF",annotationArcBorderColor:Ti,annotationArcBorder:.5,annotationLineBorderColor:Pi,annotationLineBorder:.5,annotationLineDash:null,annotationTextFillColor:Si,annotationTextFontSize:12,annotationTextLineHeight:12,annotationTextFontWeight:"normal",annotationTextBorderColor:"#0D0D0D",annotationTextBorder:1.5,annotationRegionFillColor:Ci,annotationRegionFillOpacity:.06,annotationRegionBorder:0,annotationRegionBorderColor:null,annotationDataMarkerLineLength:16,tooltipCrosshairsBorderColor:Pi,tooltipCrosshairsBorder:.5,tooltipCrosshairsLineDash:null,tooltipContainerFillColor:"#1f1f1f",tooltipContainerFillOpacity:.95,tooltipContainerShadow:"0px 2px 4px rgba(0,0,0,.5)",tooltipContainerBorderRadius:3,tooltipTextFillColor:Si,tooltipTextFontSize:12,tooltipTextLineHeight:12,tooltipTextFontWeight:"bold",labelFillColor:Si,labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",labelBorderColor:null,labelBorder:0,innerLabelFillColor:Mi,innerLabelFontSize:12,innerLabelLineHeight:12,innerLabelFontWeight:"normal",innerLabelBorderColor:null,innerLabelBorder:0,labelLineBorder:.5,labelLineBorderColor:Pi,pointFillColor:Ai[0],pointFillOpacity:.95,pointSize:4,pointBorder:1,pointBorderColor:Mi,pointBorderOpacity:1,pointActiveBorderColor:Ci,pointSelectedBorder:2,pointSelectedBorderColor:Ci,pointInactiveFillOpacity:.3,pointInactiveBorderOpacity:.3,hollowPointSize:4,hollowPointBorder:1,hollowPointBorderColor:Ai[0],hollowPointBorderOpacity:.95,hollowPointFillColor:Mi,hollowPointActiveBorder:1,hollowPointActiveBorderColor:Ci,hollowPointActiveBorderOpacity:1,hollowPointSelectedBorder:2,hollowPointSelectedBorderColor:Ci,hollowPointSelectedBorderOpacity:1,hollowPointInactiveBorderOpacity:.3,lineBorder:2,lineBorderColor:Ai[0],lineBorderOpacity:1,lineActiveBorder:3,lineSelectedBorder:3,lineInactiveBorderOpacity:.3,areaFillColor:Ai[0],areaFillOpacity:.25,areaActiveFillColor:Ai[0],areaActiveFillOpacity:.5,areaSelectedFillColor:Ai[0],areaSelectedFillOpacity:.5,areaInactiveFillOpacity:.3,hollowAreaBorderColor:Ai[0],hollowAreaBorder:2,hollowAreaBorderOpacity:1,hollowAreaActiveBorder:3,hollowAreaActiveBorderColor:Ci,hollowAreaSelectedBorder:3,hollowAreaSelectedBorderColor:Ci,hollowAreaInactiveBorderOpacity:.3,intervalFillColor:Ai[0],intervalFillOpacity:.95,intervalActiveBorder:1,intervalActiveBorderColor:Ci,intervalActiveBorderOpacity:1,intervalSelectedBorder:2,intervalSelectedBorderColor:Ci,intervalSelectedBorderOpacity:1,intervalInactiveBorderOpacity:.3,intervalInactiveFillOpacity:.3,hollowIntervalBorder:2,hollowIntervalBorderColor:Ai[0],hollowIntervalBorderOpacity:1,hollowIntervalFillColor:Mi,hollowIntervalActiveBorder:2,hollowIntervalActiveBorderColor:Ci,hollowIntervalSelectedBorder:3,hollowIntervalSelectedBorderColor:Ci,hollowIntervalSelectedBorderOpacity:1,hollowIntervalInactiveBorderOpacity:.3},Li=i(112),Ii=i(117);function Di(t){return!t&&(null==t||isNaN(t))}function ki(t){if(Object(s.isArray)(t))return Di(t[1].y);var e=t.y;return Object(s.isArray)(e)?Di(e[0]):Di(e)}function Bi(t,e,i){if(void 0===e&&(e=!1),void 0===i&&(i=!0),!t.length||1===t.length&&!i)return[];if(e){for(var n=[],r=0,o=t.length;r0&&(u[0][0]="L")),o=o.concat(u)})),o.push(["Z"])}return o}function Hi(t,e,i,n,r){for(var o=Fi(t,e,!e,"lineWidth"),a=t.connectNulls,s=t.isInCircle,l=Bi(t.points,a,t.showSinglePoint),u=[],c=0,h=l.length;cn&&(n=r),r=e[0]})));for(var h=this.scales[u],p=0,f=t;p1){r.sort();var l=function(t,e){var i=t.length,n=t;Object(s.isString)(n[0])&&(n=t.map((function(t){return e.translate(t)})));for(var r=n[1]-n[0],o=2;oa&&(r=a)}return r}(r,n);a=(n.max-n.min)/l,r.length>a&&(a=r.length)}var u=n.range,c=1/a,h=1;(i.isPolar?h=i.isTransposed&&a>1?e.multiplePieWidthRatio:e.roseWidthRatio:(n.isLinear&&(c*=u[1]-u[0]),h=e.columnWidthRatio),c*=h,t.getAdjust("dodge"))&&(c/=function(t,e){if(e){var i=Object(s.flatten)(t);return Object(s.valuesOfKey)(i,e).length}return t.length}(o,t.getAdjust("dodge").dodgeBy));var p=e.maxColumnWidth,f=e.minColumnWidth,d=ut(t.coordinate);if(p){var g=p/d;c>g&&(c=g)}if(f){var y=f/d;c0&&!Object(s.get)(i,[n,"min"])&&e.change({min:0}),o<=0&&!Object(s.get)(i,[n,"max"])&&e.change({max:0}))}},e}(yi),nn=function(t){function e(e){var i=t.call(this,e)||this;i.type="line";var n=e.sortable,r=void 0===n||n;return i.sortable=r,i}return Object(a.__extends)(e,t),e}(Vi),rn={hexagon:function(t,e,i){var n=i/2*Math.sqrt(3);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]]}},on=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"];function an(t,e,i,n,r){var o=Fi(e,r,!r,"r"),s=t.parsePoints(e.points),l=s[0];if(e.isStack)l=s[1];else if(s.length>1){for(var u=i.addGroup(),c=0,h=s;c2?"weight":"normal";if(t.isInCircle){var s={x:0,y:1};return"normal"===o?i=function(t,e,i){var n=hn(e,i),r=[["M",t.x,t.y]];return r.push(n),r}(r[0],r[1],s):(n.fill=n.stroke,i=function(t,e){var i=hn(t[1],e),n=hn(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}(r,s)),i=this.parsePath(i),e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},n),{path:i})})}if("normal"===o)return i=nt(((r=this.parsePoints(r))[1].x+r[0].x)/2,r[0].y,Math.abs(r[1].x-r[0].x)/2,Math.PI,2*Math.PI),e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},n),{path:i})});var l=cn(r[1],r[3]),u=cn(r[2],r[0]);return i=[["M",r[0].x,r[0].y],["L",r[1].x,r[1].y],l,["L",r[3].x,r[3].y],["L",r[2].x,r[2].y],u,["Z"]],i=this.parsePath(i),n.fill=n.stroke,e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},n),{path:i})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}}),hi("edge","smooth",{draw:function(t,e){var i=Fi(t,!0,!1,"lineWidth"),n=t.points,r=this.parsePath(function(t,e){var i=cn(t,e),n=[["M",t.x,t.y]];return n.push(i),n}(n[0],n[1]));return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},i),{path:r})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}});hi("edge","vhv",{draw:function(t,e){var i=Fi(t,!0,!1,"lineWidth"),n=t.points,r=this.parsePath(function(t,e){var i=[];i.push({x:t.x,y:t.y*(1-1/3)+e.y*(1/3)}),i.push({x:e.x,y:t.y*(1-1/3)+e.y*(1/3)}),i.push(e);var n=[["M",t.x,t.y]];return Object(s.each)(i,(function(t){n.push(["L",t.x,t.y])})),n}(n[0],n[1]));return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},i),{path:r})})},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}}),hi("interval","funnel",{getPoints:function(t){return t.size=2*t.size,$i(t)},draw:function(t,e){var i=Fi(t,!1,!0),n=this.parsePath(Ji(t.points,t.nextPoints,!1));return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},i),{path:n}),name:"interval"})},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}}),hi("interval","hollow-rect",{draw:function(t,e){var i=Fi(t,!0,!1),n=this.parsePath(Qi(t.points));return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},i),{path:n}),name:"interval"})},getMarker:function(t){var e=t.color;return t.isInPolar?{symbol:"circle",style:{r:4.5,stroke:e,fill:null}}:{symbol:"square",style:{r:4,stroke:e,fill:null}}}}),hi("interval","line",{getPoints:function(t){return i=(e=t).x,n=e.y,r=e.y0,Object(s.isArray)(n)?n.map((function(t,e){return{x:Object(s.isArray)(i)?i[e]:i,y:t}})):[{x:i,y:r},{x:i,y:n}];var e,i,n,r},draw:function(t,e){var i=Fi(t,!0,!1,"lineWidth"),n=this.parsePath(Qi(t.points,!1));return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},i),{path:n}),name:"interval"})},getMarker:function(t){return{symbol:function(t,e,i){return[["M",t,e-i],["L",t,e+i]]},style:{r:5,stroke:t.color}}}}),hi("interval","pyramid",{getPoints:function(t){return t.size=2*t.size,$i(t,!0)},draw:function(t,e){var i=Fi(t,!1,!0),n=this.parsePath(Ji(t.points,t.nextPoints,!0));return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},i),{path:n}),name:"interval"})},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}}),hi("interval","tick",{getPoints:function(t){return function(t){var e,i,n=t.x,r=t.y,o=t.y0,a=t.size;Object(s.isArray)(r)?(e=r[0],i=r[1]):(e=o,i=r);var l=n+a/2,u=n-a/2;return[{x:n,y:e},{x:n,y:i},{x:u,y:e},{x:l,y:e},{x:u,y:i},{x:l,y:i}]}(t)},draw:function(t,e){var i,n=Fi(t,!0,!1),r=this.parsePath([["M",(i=t.points)[0].x,i[0].y],["L",i[1].x,i[1].y],["M",i[2].x,i[2].y],["L",i[3].x,i[3].y],["M",i[4].x,i[4].y],["L",i[5].x,i[5].y]]);return e.addShape("path",{attrs:Object(a.__assign)(Object(a.__assign)({},n),{path:r}),name:"interval"})},getMarker:function(t){return{symbol: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]]},style:{r:5,stroke:t.color}}}});function pn(t,e){var i=Bi(t.points,t.connectNulls,t.showSinglePoint),n=[];return Object(s.each)(i,(function(t){var i=function(t,e){var i=[];return Object(s.each)(t,(function(n,r){var o=t[r+1];if(i.push(n),o){var a=function(t,e,i){var n,r=t.x,o=t.y,a=e.x,s=e.y;switch(i){case"hv":n=[{x:a,y:o}];break;case"vh":n=[{x:r,y:s}];break;case"hvh":var l=(a+r)/2;n=[{x:l,y:o},{x:l,y:s}];break;case"vhv":var u=(o+s)/2;n=[{x:r,y:u},{x:a,y:u}]}return n}(n,o,e);i=i.concat(a)}})),i}(t,e);n=n.concat(function(t){return t.map((function(t,e){return 0===e?["M",t.x,t.y]:["L",t.x,t.y]}))}(i))})),Object(a.__assign)(Object(a.__assign)({},Fi(t,!0,!1,"lineWidth")),{path:n})}function fn(t){var e=Object(s.isArray)(t)?t:[t],i=e[0],n=e[e.length-1],r=e.length>1?e[1]:i;return{min:i,max:n,min1:r,max1:e.length>3?e[3]:n,median:e.length>2?e[2]:r}}function dn(t,e,i){var n,r=i/2;if(Object(s.isArray)(e)){var o=fn(e),a=o.min,l=o.max,u=o.median,c=o.min1,h=t-r,p=t+r;n=[[h,l],[p,l],[t,l],[t,f=o.max1],[h,c],[h,f],[p,f],[p,c],[t,c],[t,a],[h,a],[p,a],[h,u],[p,u]]}else{e=Object(s.isNil)(e)?.5:e;var f,d=fn(t),g=(a=d.min,l=d.max,u=d.median,e-r),y=e+r;n=[[a,g],[a,y],[a,e],[c=d.min1,e],[c,g],[c,y],[f=d.max1,y],[f,g],[f,e],[l,e],[l,g],[l,y],[u,g],[u,y]]}return n.map((function(t){return{x:t[0],y:t[1]}}))}function gn(t){var e=(Object(s.isArray)(t)?t:[t]).sort((function(t,e){return e-t}));return function(t,e,i){if(Object(s.isString)(t))return t.padEnd(e,i);if(Object(s.isArray)(t)){var n=t.length;if(n1){for(var o=e.addGroup(),a=0,s=n;a=-Math.PI/2?"left":"right";else if(i.isTransposed){var n=i.getCenter(),r=this.getDefaultOffset(t.offset);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.getLabelPoint=function(t,e,i){var n,r=1,o=t.content[i];this.isToMiddle(e)?n=this.getMiddlePoint(e.points):(1===t.content.length&&0===i?i=1:0===i&&(r=-1),n=this.getArcPoint(e,i));var a=this.getDefaultOffset(t.offset)*r,s=this.getPointAngle(n),l=t.labelEmit,u=this.getCirclePoint(s,a,n,l);return 0===u.r?u.content="":(u.content=o,u.angle=s,u.color=e.color),u.rotate=t.autoRotate?this.getLabelRotate(s,a,l):t.rotate,u.start={x:n.x,y:n.y},u},e.prototype.getArcPoint=function(t,e){return void 0===e&&(e=0),Object(s.isArray)(t.x)||Object(s.isArray)(t.y)?{x:Object(s.isArray)(t.x)?t.x[e]:t.x,y:Object(s.isArray)(t.y)?t.y[e]:t.y}:{x:t.x,y:t.y}},e.prototype.getPointAngle=function(t){return pt(this.getCoordinate(),t)},e.prototype.getCirclePoint=function(t,e,i,n){var r=this.getCoordinate(),o=r.getCenter(),s=ct(r,i);if(0===s)return Object(a.__assign)(Object(a.__assign)({},o),{r:s});var l=t;r.isTransposed&&s>e&&!n?l=t+2*Math.asin(e/(2*s)):s+=e;return{x:o.x+s*Math.cos(l),y:o.y+s*Math.sin(l),r:s}},e.prototype.getLabelRotate=function(t,e,i){var n=t+xn;return i&&(n-=xn),n&&(n>xn?n-=Math.PI:n<-xn&&(n+=Math.PI)),n},e.prototype.getMiddlePoint=function(t){var e=this.getCoordinate(),i=t.length,n={x:0,y:0};return Object(s.each)(t,(function(t){n.x+=t.x,n.y+=t.y})),n.x/=i,n.y/=i,n=e.convert(n)},e.prototype.isToMiddle=function(t){return t.x.length>2},e}(_i),_n=function(t){function e(e){var i=t.call(this,e)||this;return i.defaultLayout="distribute",i}return Object(a.__extends)(e,t),e.prototype.getDefaultLabelCfg=function(){return Object(s.get)(this.geometry.theme,"pieLabels",{})},e.prototype.getDefaultOffset=function(t){return t||0},e.prototype.getLabelRotate=function(t,e,i){var n;return e<0&&((n=t)>Math.PI/2&&(n-=Math.PI),n<-Math.PI/2&&(n+=Math.PI)),n},e.prototype.getLabelAlign=function(t){var e,i=this.getCoordinate().getCenter();return e=t.angle<=Math.PI/2&&t.x>=i.x?"left":"right",this.getDefaultOffset(t.offset)<=0&&(e="right"===e?"left":"right"),e},e.prototype.getArcPoint=function(t){return t},e.prototype.getPointAngle=function(t){var e,i=this.getCoordinate(),n={x:Object(s.isArray)(t.x)?t.x[0]:t.x,y:t.y[0]},r={x:Object(s.isArray)(t.x)?t.x[1]:t.x,y:t.y[1]},o=pt(i,n);if(t.points&&t.points[0].y===t.points[1].y)e=o;else{var a=pt(i,r);o>=a&&(a+=2*Math.PI),e=o+(a-o)/2}return e},e.prototype.getCirclePoint=function(t,e,i){var n=this.getCoordinate(),r=n.getCenter(),o=n.getRadius()+e;return Object(a.__assign)(Object(a.__assign)({},et(r.x,r.y,o,t)),{angle:t,r:o})},e}(bn);var On=function(){function t(t){void 0===t&&(t={}),this.bitmap={};var e=t.xGap,i=void 0===e?1:e,n=t.yGap,r=void 0===n?8:n;this.xGap=i,this.yGap=r}return t.prototype.hasGap=function(t){for(var e=!0,i=this.bitmap,n=Math.round(t.minX),r=Math.round(t.maxX),o=Math.round(t.minY),a=Math.round(t.maxY),s=n;s<=r;s+=1)if(i[s]){if(s===n||s===r){for(var l=o;l<=a;l++)if(i[s][l]){e=!1;break}}else if(i[s][o]||i[s][a]){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),o=Math.round(t.maxY),a=i;a<=n;a+=1)e[a]||(e[a]={});for(a=i;a<=n;a+=this.xGap){for(var s=r;s<=o;s+=this.yGap)e[a][s]=!0;e[a][o]=!0}if(1!==this.yGap)for(a=r;a<=o;a+=1)e[i][a]=!0,e[n][a]=!0;if(1!==this.xGap)for(a=i;a<=n;a+=1)e[a][r]=!0,e[a][o]=!0},t.prototype.destroy=function(){this.bitmap={}},t}();function wn(t,e,i,n){var r=t.getCanvasBBox(),o=r.width,a=r.height,s={x:e,y:i,textAlign:"center"};switch(n){case 0:s.y-=a+1,s.x+=1,s.textAlign="left";break;case 1:s.y-=a+1,s.x-=1,s.textAlign="right";break;case 2:s.y+=a+1,s.x-=1,s.textAlign="right";break;case 3:s.y+=a+1,s.x+=1,s.textAlign="left";break;case 5:s.y-=2*a+2;break;case 6:s.y+=2*a+2;break;case 7:s.x+=o+1,s.textAlign="left";break;case 8:s.x-=o+1,s.textAlign="right"}return t.attr(s),t.getCanvasBBox()}function Mn(t,e,i,n,r){var o,a,s=i.start,l=i.end,u=i.getWidth(),c=i.getHeight();"y"===r?(o=s.x+u/2,a=n.ys.x?n.x:s.x,a=s.y+c/2):"xy"===r&&(i.isPolar?(o=i.getCenter().x,a=i.getCenter().y):(o=(s.x+l.x)/2,a=(s.y+l.y)/2));var h=function(t,e,i){var n,r=e[0],o=e[1];return t.applyToMatrix([r,o,1]),"x"===i?(t.setMatrix(B.ext.transform(t.getMatrix(),[["t",-r,-o],["s",.01,1],["t",r,o]])),n=B.ext.transform(t.getMatrix(),[["t",-r,-o],["s",100,1],["t",r,o]])):"y"===i?(t.setMatrix(B.ext.transform(t.getMatrix(),[["t",-r,-o],["s",1,.01],["t",r,o]])),n=B.ext.transform(t.getMatrix(),[["t",-r,-o],["s",1,100],["t",r,o]])):"xy"===i&&(t.setMatrix(B.ext.transform(t.getMatrix(),[["t",-r,-o],["s",.01,.01],["t",r,o]])),n=B.ext.transform(t.getMatrix(),[["t",-r,-o],["s",100,100],["t",r,o]])),n}(t,[o,a],r);t.animate({matrix:h},e)}var Cn=i(184),Sn=i.n(Cn);function jn(t,e){var i,n=Sn()(t,e),r=n.startAngle,o=n.endAngle;return!Object(s.isNumberEqual)(r,.5*-Math.PI)&&r<.5*-Math.PI&&(r+=2*Math.PI),!Object(s.isNumberEqual)(o,.5*-Math.PI)&&o<.5*-Math.PI&&(o+=2*Math.PI),0===e[5]&&(r=(i=[o,r])[0],o=i[1]),Object(s.isNumberEqual)(r,1.5*Math.PI)&&(r=-.5*Math.PI),Object(s.isNumberEqual)(o,-.5*Math.PI)&&(o=1.5*Math.PI),{startAngle:r,endAngle:o}}function Pn(t){var e;return"M"===t[0]||"L"===t[0]?e=[t[1],t[2]]:"a"!==t[0]&&"A"!==t[0]||(e=[t[t.length-2],t[t.length-1]]),e}function Tn(t){var e,i,n,r=t.filter((function(t){return"A"===t[0]||"a"===t[0]})),o=r[0],a=r.length>1?r[1]:r[0],l=t.indexOf(o),u=t.indexOf(a),c=Pn(t[l-1]),h=Pn(t[u-1]),p=jn(c,o),f=p.startAngle,d=p.endAngle,g=jn(h,a),y=g.startAngle,v=g.endAngle;Object(s.isNumberEqual)(f,y)&&Object(s.isNumberEqual)(d,v)?(i=f,n=d):(i=Math.min(f,y),n=Math.max(d,v));var m=o[1],x=r[r.length-1][1];return m=0;r--)for(var o=0,a=this.getFacetsByLevel(t,r);o=i){var r=n.parsePosition([t[l],t[a.field]]);r&&p.push(r)}if(t[l]===h)return!1})),p},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.parsePercentPosition=function(t){var e=parseFloat(t[0])/100,i=parseFloat(t[1])/100,n=this.view.getCoordinate(),r=n.start,o=n.end,a=Math.min(r.x,o.x),s=Math.min(r.y,o.y);return{x:n.getWidth()*e+a,y:n.getHeight()*i+s}},e.prototype.getCoordinateBBox=function(){var t=this.view.getCoordinate(),e=t.start,i=t.end,n=t.getWidth(),r=t.getHeight(),o={x:Math.min(e.x,i.x),y:Math.min(e.y,i.y)};return{x:o.x,y:o.y,minX:o.x,minY:o.y,maxX:o.x+n,maxY:o.y+r,width:n,height:r}},e.prototype.getAnnotationCfg=function(t,e,i){var n=this.view.getCoordinate(),r={};if(Object(s.isNil)(e))return null;if("arc"===t){var o=e,l=o.start,u=o.end,c=this.parsePosition(l),h=this.parsePosition(u),p=pt(n,c),f=pt(n,h);p>f&&(f=2*Math.PI+f),r={center:n.getCenter(),radius:ct(n,c),startAngle:p,endAngle:f}}else if("image"===t){var d=e;l=d.start,u=d.end;r={start:this.parsePosition(l),end:this.parsePosition(u),src:e.src}}else if("line"===t){var g=e;l=g.start,u=g.end;r={start:this.parsePosition(l),end:this.parsePosition(u),text:Object(s.get)(e,"text",null)}}else if("region"===t){var y=e;l=y.start,u=y.end;r={start:this.parsePosition(l),end:this.parsePosition(u)}}else if("text"===t){var v=this.view.getData(),m=e,x=m.position,b=m.content,_=Object(a.__rest)(m,["position","content"]),O=b;Object(s.isFunction)(b)&&(O=b(v)),r=Object(a.__assign)(Object(a.__assign)(Object(a.__assign)({},this.parsePosition(x)),_),{content:O})}else if("dataMarker"===t){var w=e,M=(x=w.position,w.point),C=w.line,S=w.text,j=w.autoAdjust,P=w.direction;r=Object(a.__assign)(Object(a.__assign)({},this.parsePosition(x)),{coordinateBBox:this.getCoordinateBBox(),point:M,line:C,text:S,autoAdjust:j,direction:P})}else if("dataRegion"===t){var T=e,A=(l=T.start,u=T.end,T.region),E=(S=T.text,T.lineLength);r={points:this.getRegionPoints(l,u),region:A,text:S,lineLength:E}}else if("regionFilter"===t){var L=e,I=(l=L.start,u=L.end,L.apply),D=L.color,k=this.view.geometries,B=[],F=function t(e){e&&(e.isGroup()?e.getChildren().forEach((function(e){return t(e)})):B.push(e))};Object(s.each)(k,(function(t){I?Object(s.contains)(I,t.type)&&Object(s.each)(t.elements,(function(t){F(t.shape)})):Object(s.each)(t.elements,(function(t){F(t.shape)}))})),r={color:D,shapes:B,start:this.parsePosition(l),end:this.parsePosition(u)}}var R=Object(s.deepMix)({},i,Object(a.__assign)(Object(a.__assign)({},r),{top:e.top,style:e.style,offsetX:e.offsetX,offsetY:e.offsetY}));return R.container=this.getComponentContainer(R),R.animate=this.view.getOptions().animate&&R.animate&&Object(s.get)(e,"animate",R.animate),R.animateOption=Object(s.deepMix)({},qe,R.animateOption,e.animateOption),R},e.prototype.isTop=function(t){return Object(s.get)(t,"top",!0)},e.prototype.getComponentContainer=function(t){return this.isTop(t)?this.foregroundContainer:this.backgroundContainer},e.prototype.getAnnotationTheme=function(t){return Object(s.get)(this.view.getTheme(),["components","annotation",t],{})},e}(Ie);function Yn(t,e){return Object(s.get)(t,["components","axis",e,"grid"],{})}function Gn(t,e,i,n){var r=[],o=e.getTicks();return t.isPolar&&o.push({value:1,text:"",tickValue:""}),o.reduce((function(e,o,a){var s=o.value;if(n)r.push({points:[t.convert("y"===i?{x:0,y:s}:{x:s,y:0}),t.convert("y"===i?{x:1,y:s}:{x:s,y:1})]});else if(a){var l=(e.value+s)/2;r.push({points:[t.convert("y"===i?{x:0,y:l}:{x:l,y:0}),t.convert("y"===i?{x:1,y:l}:{x:l,y:1})]})}return o}),o[0]),r}function Xn(t,e,i,n,r){var o=e.values.length,a=[],l=i.getTicks();return l.reduce((function(e,i){var l=e?e.value:i.value,u=i.value,c=(l+u)/2;return"x"===r?a.push({points:[t.convert({x:n?u:c,y:0}),t.convert({x:n?u:c,y:1})]}):a.push({points:Object(s.map)(Array(o+1),(function(e,i){return t.convert({x:i/o,y:n?u:c})}))}),i}),l[0]),a}function Vn(t,e){var i=Object(s.get)(e,"grid");if(null===i)return!1;var n=Object(s.get)(t,"grid");return!(void 0===i&&null===n)}var zn=["container"],Hn=Object(a.__assign)(Object(a.__assign)({},qe),{appear:null}),Wn=function(t){function e(e){var i=t.call(this,e)||this;return i.cache=new Map,i.gridContainer=i.view.getLayer(n.BG).addGroup(),i.axisContainer=i.view.getLayer(n.BG).addGroup(),i}return Object(a.__extends)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"axis"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){this.update()},e.prototype.layout=function(){var t=this,e=this.view.getCoordinate();Object(s.each)(this.getComponents(),(function(i){var n,r=i.component,a=i.direction,s=i.type,l=i.extra,u=l.dim,c=l.scale,h=l.alignTick;if(s===o.AXIS)e.isPolar?"x"===u?n=e.isTransposed?F(e,a):G(e):"y"===u&&(n=e.isTransposed?G(e):F(e,a)):n=F(e,a);else if(s===o.GRID)if(e.isPolar){n={items:e.isTransposed?"x"===u?Xn(e,t.view.getYScales()[0],c,h,u):Gn(e,c,u,h):"x"===u?Gn(e,c,u,h):Xn(e,t.view.getXScale(),c,h,u),center:t.view.getCoordinate().getCenter()}}else n={items:Gn(e,c,u,h)};r.update(n)}))},e.prototype.update=function(){this.option=this.view.getOptions().axes;var t=new Map;this.updateXAxes(t),this.updateYAxes(t);var e=new Map;this.cache.forEach((function(i,n){t.has(n)?e.set(n,i):i.component.destroy()})),this.cache=e},e.prototype.clear=function(){t.prototype.clear.call(this),this.cache.clear(),this.gridContainer.clear(),this.axisContainer.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.gridContainer.remove(!0),this.axisContainer.remove(!0)},e.prototype.getComponents=function(){var t=[];return this.cache.forEach((function(e){t.push(e)})),t},e.prototype.updateXAxes=function(t){var e=this.view.getXScale();if(e&&!e.isIdentity){var i=X(this.option,e.field);if(!1!==i){var o=V(i,r.BOTTOM),a=n.BG,l=this.view.getCoordinate(),u=this.getId("axis",e.field),c=this.getId("grid",e.field);if(l.isRect){if(h=this.cache.get(u))st(f=this.getLineAxisCfg(e,i,o),zn),h.component.update(f),t.set(u,h);else h=this.createLineAxis(e,i,a,o,"x"),this.cache.set(u,h),t.set(u,h);if(p=this.cache.get(c))st(f=this.getLineGridCfg(e,i,o,"x"),zn),p.component.update(f),t.set(c,p);else(p=this.createLineGrid(e,i,a,o,"x"))&&(this.cache.set(c,p),t.set(c,p))}else if(l.isPolar){var h,p;if(h=this.cache.get(u)){st(f=l.isTransposed?this.getLineAxisCfg(e,i,r.RADIUS):this.getCircleAxisCfg(e,i,o),zn),h.component.update(f),t.set(u,h)}else{if(l.isTransposed){if(Object(s.isUndefined)(i))return;h=this.createLineAxis(e,i,a,r.RADIUS,"x")}else h=this.createCircleAxis(e,i,a,o,"x");this.cache.set(u,h),t.set(u,h)}if(p=this.cache.get(c)){var f;st(f=l.isTransposed?this.getCircleGridCfg(e,i,r.RADIUS,"x"):this.getLineGridCfg(e,i,r.CIRCLE,"x"),zn),p.component.update(f),t.set(c,p)}else{if(l.isTransposed){if(Object(s.isUndefined)(i))return;p=this.createCircleGrid(e,i,a,r.RADIUS,"x")}else p=this.createLineGrid(e,i,a,r.CIRCLE,"x");p&&(this.cache.set(c,p),t.set(c,p))}}}}},e.prototype.updateYAxes=function(t){var e=this,i=this.view.getYScales();Object(s.each)(i,(function(i,o){if(i&&!i.isIdentity){var a=i.field,l=X(e.option,a);if(!1!==l){var u=n.BG,c=e.getId("axis",a),h=e.getId("grid",a),p=e.view.getCoordinate();if(p.isRect){var f=V(l,0===o?r.LEFT:r.RIGHT);if(d=e.cache.get(c))st(y=e.getLineAxisCfg(i,l,f),zn),d.component.update(y),t.set(c,d);else d=e.createLineAxis(i,l,u,f,"y"),e.cache.set(c,d),t.set(c,d);if(g=e.cache.get(h))st(y=e.getLineGridCfg(i,l,f,"y"),zn),g.component.update(y),t.set(h,g);else(g=e.createLineGrid(i,l,u,f,"y"))&&(e.cache.set(h,g),t.set(h,g))}else if(p.isPolar){var d,g;if(d=e.cache.get(c)){st(y=p.isTransposed?e.getCircleAxisCfg(i,l,r.CIRCLE):e.getLineAxisCfg(i,l,r.RADIUS),zn),d.component.update(y),t.set(c,d)}else{if(p.isTransposed){if(Object(s.isUndefined)(l))return;d=e.createCircleAxis(i,l,u,r.CIRCLE,"y")}else d=e.createLineAxis(i,l,u,r.RADIUS,"y");e.cache.set(c,d),t.set(c,d)}if(g=e.cache.get(h)){var y;st(y=p.isTransposed?e.getLineGridCfg(i,l,r.CIRCLE,"y"):e.getCircleGridCfg(i,l,r.RADIUS,"y"),zn),g.component.update(y),t.set(h,g)}else{if(p.isTransposed){if(Object(s.isUndefined)(l))return;g=e.createLineGrid(i,l,u,r.CIRCLE,"y")}else g=e.createCircleGrid(i,l,u,r.RADIUS,"y");g&&(e.cache.set(h,g),t.set(h,g))}}}}}))},e.prototype.createLineAxis=function(t,e,i,n,a){var s={component:new S(this.getLineAxisCfg(t,e,n)),layer:i,direction:n===r.RADIUS?r.NONE:n,type:o.AXIS,extra:{dim:a,scale:t}};return s.component.set("field",t.field),s.component.init(),s},e.prototype.createLineGrid=function(t,e,i,n,a){var l=this.getLineGridCfg(t,e,n,a);if(l){var u={component:new P(l),layer:i,direction:r.NONE,type:o.GRID,extra:{dim:a,scale:t,alignTick:Object(s.get)(l,"alignTick",!0)}};return u.component.init(),u}},e.prototype.createCircleAxis=function(t,e,i,n,r){var a={component:new j(this.getCircleAxisCfg(t,e,n)),layer:i,direction:n,type:o.AXIS,extra:{dim:r,scale:t}};return a.component.set("field",t.field),a.component.init(),a},e.prototype.createCircleGrid=function(t,e,i,n,a){var l=this.getCircleGridCfg(t,e,n,a);if(l){var u={component:new T(l),layer:i,direction:r.NONE,type:o.GRID,extra:{dim:a,scale:t,alignTick:Object(s.get)(l,"alignTick",!0)}};return u.component.init(),u}},e.prototype.getLineAxisCfg=function(t,e,i){var n=this.axisContainer,r=this.view.getCoordinate(),o=F(r,i),l=z(t,e),u=Y(this.view.getTheme(),i),c=Object(s.get)(e,["title"])?Object(s.deepMix)({title:{style:{text:l}}},e):e,h=Object(s.deepMix)(Object(a.__assign)(Object(a.__assign)({container:n},o),{ticks:t.getTicks().map((function(t){return{id:""+t.tickValue,name:t.text,value:t.value}})),verticalFactor:r.isPolar?-1*N(o,r.getCenter()):N(o,r.getCenter())}),u,c),p=this.getAnimateCfg(h),f=p.animate,d=p.animateOption;h.animateOption=d,h.animate=f;var g=R(o),y=Object(s.get)(h,"verticalLimitLength",g?1/3:.5);if(y<=1){var v=this.view.getCanvas().get("width"),m=this.view.getCanvas().get("height");h.verticalLimitLength=y*(g?v:m)}return h},e.prototype.getLineGridCfg=function(t,e,i,n){if(Vn(Y(this.view.getTheme(),i),e)){var r=Yn(this.view.getTheme(),i),o=Object(s.deepMix)({container:this.gridContainer},r,Object(s.get)(e,"grid"),this.getAnimateCfg(e));return o.items=Gn(this.view.getCoordinate(),t,n,Object(s.get)(o,"alignTick",!0)),o}},e.prototype.getCircleAxisCfg=function(t,e,i){var n=this.axisContainer,o=this.view.getCoordinate(),l=t.getTicks().map((function(t){return{id:""+t.tickValue,name:t.text,value:t.value}}));t.isCategory||Math.abs(o.endAngle-o.startAngle)!==2*Math.PI||l.pop();var u=z(t,e),c=Y(this.view.getTheme(),r.CIRCLE),h=Object(s.get)(e,["title"])?Object(s.deepMix)({title:{style:{text:u}}},e):e,p=Object(s.deepMix)(Object(a.__assign)(Object(a.__assign)({container:n},G(this.view.getCoordinate())),{ticks:l,verticalFactor:1}),c,h),f=this.getAnimateCfg(p),d=f.animate,g=f.animateOption;return p.animate=d,p.animateOption=g,p},e.prototype.getCircleGridCfg=function(t,e,i,n){if(Vn(Y(this.view.getTheme(),i),e)){var o=Yn(this.view.getTheme(),r.RADIUS),a=Object(s.deepMix)({container:this.gridContainer,center:this.view.getCoordinate().getCenter()},o,Object(s.get)(e,"grid"),this.getAnimateCfg(e)),l=Object(s.get)(a,"alignTick",!0),u="x"===n?this.view.getYScales()[0]:this.view.getXScale();return a.items=Xn(this.view.getCoordinate(),u,t,l,n),a}},e.prototype.getId=function(t,e){return t+"-"+e+"-"+this.view.getCoordinate().type},e.prototype.getAnimateCfg=function(t){return{animate:this.view.getOptions().animate&&Object(s.get)(t,"animate"),animateOption:t&&t.animateOption?Object(s.deepMix)({},Hn,t.animateOption):Hn}},e}(Ie);function qn(t,e,i){return i===r.TOP?[t.minX+t.width/2-e.width/2,t.minY]:i===r.BOTTOM?[t.minX+t.width/2-e.width/2,t.maxY-e.height]:i===r.LEFT?[t.minX,t.minY+t.height/2-e.height/2]:i===r.RIGHT?[t.maxX-e.width,t.minY+t.height/2-e.height/2]:i===r.TOP_LEFT||i===r.LEFT_TOP?[t.tl.x,t.tl.y]:i===r.TOP_RIGHT||i===r.RIGHT_TOP?[t.tr.x-e.width,t.tr.y]:i===r.BOTTOM_LEFT||i===r.LEFT_BOTTOM?[t.bl.x,t.bl.y-e.height]:i===r.BOTTOM_RIGHT||i===r.RIGHT_BOTTOM?[t.br.x-e.width,t.br.y-e.height]:[0,0]}function Un(t,e,i){if(!t)return i;var n;if(t.callback&&t.callback.length>1){var r=Array(t.callback.length-1).fill("");n=t.mapping.apply(t,Object(a.__spreadArrays)([e],r)).join("")}else n=t.mapping(e).join("");return n||i}function Kn(t){var e=t.symbol;Object(s.isString)(e)&&rn[e]&&(t.symbol=rn[e])}function Zn(t){return t.startsWith(r.LEFT)||t.startsWith(r.RIGHT)?"vertical":"horizontal"}function $n(t,e){return Object(s.isBoolean)(t)?!1!==t&&{}:Object(s.get)(t,[e],t)}function Qn(t){return Object(s.get)(t,"position",r.BOTTOM)}var Jn=function(t){function e(e){var i=t.call(this,e)||this;return i.container=i.view.getLayer(n.FORE).addGroup(),i}return Object(a.__extends)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"legend"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){var t=this;this.option=this.view.getOptions().legends;if(Object(s.get)(this.option,"custom")){var e=this.createCustomLegend(void 0,void 0,void 0,this.option);if(e){e.init();var i=n.FORE,r=Qn(this.option);this.components.push({id:"global-custom",component:e,layer:i,direction:r,type:o.LEGEND,extra:void 0})}}else this.loopLegends((function(e,i,n){var r=t.createFieldLegend(e,i,n);r&&(r.component.init(),t.components.push(r))}))},e.prototype.layout=function(){var t=this;this.layoutBBox=this.view.viewBBox;var e=Object(s.get)(this.view.getTheme(),["components","legend","margin"],[0,0,0,0]);Object(s.each)(this.components,(function(i){var n=i.component,r=i.direction,o=Zn(r),a=t.getCategoryLegendSizeCfg(o),s=n.get("maxWidth"),l=n.get("maxHeight");n.update({maxWidth:Math.min(a.maxWidth,s||0),maxHeight:Math.min(a.maxHeight,l||0)});var u=n.getLayoutBBox(),c=new xt(u.x,u.y,u.width,u.height),h=qn(t.view.viewBBox,c,r),p=h[0],f=h[1],d=qn(t.layoutBBox,c,r),g=d[0],y=d[1],v=0,m=0;r.startsWith("top")||r.startsWith("bottom")?(v=p,m=y):(v=g,m=f),r.indexOf("left")>=0&&(v+=e[3]),r.indexOf("right")>=0&&(v-=e[1]),r.indexOf("top")>=0&&(m+=e[0]),r.indexOf("bottom")>=0&&(m-=e[2]),n.update({x:v,y:m}),t.layoutBBox=t.layoutBBox.cut(c,r)}))},e.prototype.update=function(){var t=this;this.option=this.view.getOptions().legends;var e={};if(Object(s.get)(this.option,"custom")){var i="global-custom",r=this.getComponentById(i);if(r){var a=this.getCategoryCfg(void 0,void 0,void 0,this.option,!0);st(a,["container"]),r.component.update(a),e[i]=!0}else{var l=this.createCustomLegend(void 0,void 0,void 0,this.option);if(l){l.init();var u=n.FORE,c=Qn(this.option);this.components.push({id:i,component:l,layer:u,direction:c,type:o.LEGEND,extra:void 0}),e[i]=!0}}}else this.loopLegends((function(i,n,r){var o=t.getId(r.field),a=t.getComponentById(o);if(a){var l=void 0,u=$n(t.option,r.field);!1!==u&&(Object(s.get)(u,"custom")?l=t.getCategoryCfg(i,n,r,u,!0):r.isLinear?l=t.getContinuousCfg(i,n,r,u):r.isCategory&&(l=t.getCategoryCfg(i,n,r,u))),l&&(st(l,["container"]),a.direction=Qn(u),a.component.update(l),e[o]=!0)}else{var c=t.createFieldLegend(i,n,r);c&&(c.component.init(),t.components.push(c),e[o]=!0)}}));var h=[];Object(s.each)(this.getComponents(),(function(t){e[t.id]?h.push(t):t.component.destroy()})),this.components=h},e.prototype.clear=function(){t.prototype.clear.call(this),this.container.clear()},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.container.remove(!0)},e.prototype.getGeometries=function(t){var e=this,i=t.geometries;return Object(s.each)(t.views,(function(t){i=i.concat(e.getGeometries(t))})),i},e.prototype.loopLegends=function(t){if(this.view.getRootView()===this.view){var e=this.getGeometries(this.view),i={};Object(s.each)(e,(function(e){var n=e.getGroupAttributes();Object(s.each)(n,(function(n){var r=n.getScale(n.type);r&&"identity"!==r.type&&!i[r.field]&&(t(e,n,r),i[r.field]=!0)}))}))}},e.prototype.createFieldLegend=function(t,e,i){var r,a=$n(this.option,i.field),l=n.FORE,u=Qn(a);if(!1!==a&&(Object(s.get)(a,"custom")?r=this.createCustomLegend(t,e,i,a):i.isLinear?r=this.createContinuousLegend(t,e,i,a):i.isCategory&&(r=this.createCategoryLegend(t,e,i,a))),r)return r.set("field",i.field),{id:this.getId(i.field),component:r,layer:l,direction:u,type:o.LEGEND,extra:{scale:i}}},e.prototype.createCustomLegend=function(t,e,i,n){var r=this.getCategoryCfg(t,e,i,n,!0);return new A(r)},e.prototype.createContinuousLegend=function(t,e,i,n){var r=this.getContinuousCfg(t,e,i,n);return new E(r)},e.prototype.createCategoryLegend=function(t,e,i,n){var r=this.getCategoryCfg(t,e,i,n);return new A(r)},e.prototype.getContinuousCfg=function(t,e,i,n){var r=i.getTicks(),o=Object(s.find)(r,(function(t){return 0===t.value})),a=Object(s.find)(r,(function(t){return 1===t.value})),l=r.map((function(t){var n=t.value,r=t.tickValue,o=e.mapping(i.invert(n)).join("");return{value:r,attrValue:o,color:o,scaleValue:n}}));o||l.push({value:i.min,attrValue:e.mapping(i.invert(0)).join(""),color:e.mapping(i.invert(0)).join(""),scaleValue:0}),a||l.push({value:i.max,attrValue:e.mapping(i.invert(1)).join(""),color:e.mapping(i.invert(1)).join(""),scaleValue:1}),l.sort((function(t,e){return t.value-e.value}));var u={min:Object(s.head)(l).value,max:Object(s.last)(l).value,colors:[],rail:{type:e.type},track:{}};"size"===e.type&&(u.track={style:{fill:"size"===e.type?this.view.getTheme().defaultColor:void 0}}),"color"===e.type&&(u.colors=l.map((function(t){return t.attrValue})));var c=this.container,h=Zn(Qn(n)),p=Object(s.get)(n,"title");return p&&(p=Object(s.deepMix)({text:k(i)},p)),u.container=c,u.layout=h,u.title=p,u.animateOption=qe,this.mergeLegendCfg(u,n,"continuous")},e.prototype.getCategoryCfg=function(t,e,i,n,o){var a=this.container,l=Object(s.get)(n,"position",r.BOTTOM),u=Object(s.get)(this.view.getTheme(),["components","legend",l,"marker"]),c=Object(s.get)(n,"marker"),h=Zn(l),p=o?function(t,e,i){return i.map((function(i){var n=Object(s.deepMix)({},t,e,i.marker);return Kn(n),i.marker=n,i}))}(u,c,n.items):function(t,e,i,n,r){var o=i.getScale(i.type);if(o.isCategory){var a=o.field,l=e.getAttribute("color"),u=e.getAttribute("shape"),c=t.getTheme().defaultColor,h=e.coordinate.isPolar;return o.getTicks().map((function(i){var p,f=i.text,d=i.value,g=f,y=o.invert(d),v=0===t.filterFieldData(a,[(p={},p[a]=y,p)]).length,m=Un(l,y,c),x=Un(u,y,"point"),b=e.getShapeMarker(x,{color:m,isInPolar:h});return Kn(b=Object(s.deepMix)({},n,b,r)),{id:y,name:g,value:y,marker:b,unchecked:v}}))}return[]}(this.view,t,e,u,c),f=Object(s.get)(n,"title");f&&(f=Object(s.deepMix)({text:i?k(i):""},f));var d=this.getCategoryLegendSizeCfg(h);d.container=a,d.layout=h,d.items=p,d.title=f,d.animateOption=qe;var g=this.mergeLegendCfg(d,n,l);g.reversed&&g.items.reverse();var y=Object(s.get)(g,"maxItemWidth");return y&&y<=1&&(g.maxItemWidth=this.view.viewBBox.width*y),g},e.prototype.mergeLegendCfg=function(t,e,i){var n=i.split("-")[0],r=Object(s.get)(this.view.getTheme(),["components","legend",n],{});return Object(s.deepMix)({},r,t,e)},e.prototype.getId=function(t){return this.name+"-"+t},e.prototype.getComponentById=function(t){return Object(s.find)(this.components,(function(e){return e.id===t}))},e.prototype.getCategoryLegendSizeCfg=function(t){var e=this.view.viewBBox,i=e.width,n=e.height;return"vertical"===t?{maxWidth:.25*i,maxHeight:n}:{maxWidth:i,maxHeight:.25*n}},e}(Ie),tr=function(t){function e(e){var i=t.call(this,e)||this;return i.onValueChanged=function(t){var e=t[0],n=t[1];i.updateMinMaxText(e,n),i.view.render(!0)},i.container=i.view.getLayer(n.FORE).addGroup(),i}return Object(a.__extends)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"slider"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){if(this.option=this.view.getOptions().slider,this.option){this.slider?this.slider=this.updateSlider():(this.slider=this.createSlider(),this.slider.component.on("sliderchange",this.onValueChanged));var t=this.slider.component.get("start")||0,e=this.slider.component.get("end")||1;this.updateMinMaxText(t,e)}else this.slider&&(this.slider.component.destroy(),this.slider=void 0)},e.prototype.layout=function(){if(this.slider){var t=this.view.coordinateBBox.width,e=this.slider.component.getLayoutBBox(),i=new xt(e.x,e.y,Math.min(e.width,t),e.height),n=qn(this.view.viewBBox,i,r.BOTTOM),o=(n[0],n[1]),a=qn(this.view.coordinateBBox,i,r.BOTTOM),s=a[0];a[1];this.slider.component.update({x:s,y:o,width:t})}},e.prototype.update=function(){this.render()},e.prototype.createSlider=function(){var t=this.getSliderCfg(),e=new C.Slider(Object(a.__assign)({container:this.container},t));return e.init(),{component:e,layer:n.FORE,direction:r.BOTTOM,type:o.OTHER}},e.prototype.updateSlider=function(){var t=this.getSliderCfg();return st(t,["x","y","width","start","end","minText","maxText"]),this.slider.component.update(t),this.slider},e.prototype.getSliderCfg=function(){if(Object(s.isObject)(this.option)){var t=Object(a.__assign)({data:this.getData()},Object(s.get)(this.option,"trendCfg",{})),e=this.view.coordinateBBox.width,i=Object(s.deepMix)({},{x:0,y:0,width:e},this.option);return Object(a.__assign)(Object(a.__assign)({},i),{trendCfg:t})}return{}},e.prototype.getData=function(){var t=this.view.getOptions().data,e=this.view.getYScales()[0],i=this.view.getGroupScales();if(i.length){var n=i[0],r=n.field,o=n.ticks;return t.reduce((function(t,i){return i[r]===o[0]&&t.push(i[e.field]),t}),[])}return t.map((function(t){return t[e.field]||0}))},e.prototype.updateMinMaxText=function(t,e){var i=this.view.getOptions().data,n=this.view.getXScale(),r=Object(s.size)(i);if(n&&r){var o=n.field,a=i.reduce((function(t,e){return t.includes(e[o])||t.push(e[o]),t}),[]),l=Object(s.size)(a),u=Math.floor(t*(l-1)),c=Math.floor(e*(l-1)),h=Object(s.get)(a,[u]),p=Object(s.get)(a,[c]),f=this.getSliderCfg().formatter;f&&(h=f(h,i[u],u),p=f(p,i[c],c)),this.slider.component.update({minText:h,maxText:p,start:t,end:e}),this.view.filter(n.field,(function(t,e){var i=a.indexOf(t);return!(i>-1)||at(i,u,c)}))}},e.prototype.getComponents=function(){return this.slider?[this.slider]:[]},e}(Ie);var er=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isLocked=!1,e}return Object(a.__extends)(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"tooltip"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.isVisible=function(){return!1!==this.view.getOptions().tooltip},e.prototype.render=function(){},e.prototype.showTooltip=function(t){if(this.point=t,this.isVisible()){var e=this.view,i=this.getTooltipItems(t);if(i.length){var n=this.getTitle(i),r={x:i[0].x,y:i[0].y};e.emit("tooltip:show",Object(a.__assign)({items:i,title:n},t));var o=this.getTooltipCfg(),l=o.follow,u=o.showMarkers,c=o.showCrosshairs,h=o.showContent,p=o.marker,f=this.items,d=this.title;if(Object(s.isEqual)(d,n)&&Object(s.isEqual)(f,i)?(this.tooltip&&l&&(this.tooltip.update(t),this.tooltip.show()),this.tooltipMarkersGroup&&this.tooltipMarkersGroup.show()):(e.emit("tooltip:change",Object(a.__assign)({items:i,title:n},t)),h&&(this.tooltip||this.renderTooltip(),this.tooltip.update(Object(s.mix)({},o,{items:i,title:n},l?t:{})),this.tooltip.show()),u&&this.renderTooltipMarkers(i,p)),this.items=i,this.title=n,c){var g=Object(s.get)(o,["crosshairs","follow"],!1);this.renderCrosshairs(g?t:r,o)}}else this.hideTooltip()}},e.prototype.hideTooltip=function(){if(this.getTooltipCfg().follow){var t=this.tooltipMarkersGroup;t&&t.hide();var e=this.xCrosshair,i=this.yCrosshair;e&&e.hide(),i&&i.hide();var n=this.tooltip;n&&n.hide(),this.view.emit("tooltip:hide",{}),this.point=null}else this.point=null},e.prototype.lockTooltip=function(){this.isLocked=!0,this.tooltip&&this.tooltip.setCapture(!0)},e.prototype.unlockTooltip=function(){this.isLocked=!1;var t=this.getTooltipCfg();this.tooltip&&this.tooltip.setCapture(t.capture)},e.prototype.isTooltipLocked=function(){return this.isLocked},e.prototype.clear=function(){var t=this.tooltip,e=this.xCrosshair,i=this.yCrosshair,n=this.tooltipMarkersGroup;t&&(t.hide(),t.clear()),e&&e.clear(),i&&i.clear(),n&&n.clear()},e.prototype.destroy=function(){this.tooltip&&this.tooltip.destroy(),this.xCrosshair&&this.xCrosshair.destroy(),this.yCrosshair&&this.yCrosshair.destroy(),this.guideGroup&&this.guideGroup.remove(!0),this.items=null,this.title=null,this.tooltipMarkersGroup=null,this.tooltipCrosshairsGroup=null,this.xCrosshair=null,this.yCrosshair=null,this.tooltip=null,this.guideGroup=null,this.isLocked=!1,this.point=null},e.prototype.changeVisible=function(t){if(this.visible!==t){var e=this.tooltip,i=this.tooltipMarkersGroup,n=this.xCrosshair,r=this.yCrosshair;t?(e&&e.show(),i&&i.show(),n&&n.show(),r&&r.show()):(e&&e.hide(),i&&i.hide(),n&&n.hide(),r&&r.hide()),this.visible=t}},e.prototype.getTooltipItems=function(t){var e=this.findItemsFromView(this.view,t);if(e.length){for(var i=0,n=e=Object(s.flatten)(e);i1){for(var h=e[0],p=Math.abs(t.y-h[0].y),f=0,d=e;fc.maxY&&(c=e)):(e.minXc.maxX&&(c=e)),h.x=Math.min(e.minX,h.minX),h.y=Math.min(e.minY,h.minY),h.width=Math.max(e.maxX,h.maxX)-h.x,h.height=Math.max(e.maxY,h.maxY)-h.y}));var p=t.backgroundGroup,f=t.coordinateBBox,d=void 0;if(l.isRect){var g=t.getXScale().isLinear?0:.25,y=void 0,v=void 0,m=void 0,x=void 0;l.isTransposed?(y=f.minX,v=Math.min(c.minY,u.minY)-g*c.height,m=f.width,x=h.height+2*g*c.height):(y=Math.min(u.minX,c.minX)-g*u.width,v=Math.min(f.minY,u.minY),m=h.width+2*g*u.width,x=f.height),d=[["M",y,v],["L",y+m,v],["L",y+m,v+x],["L",y,v+x],["Z"]]}else{var b=Object(s.head)(o),_=Object(s.last)(o),O=rt(b.getModel(),l).startAngle,w=rt(_.getModel(),l).endAngle,M=l.getCenter(),C=l.getRadius(),S=l.innerRadius*C;d=it(M.x,M.y,C,O,w,S)}this.regionPath?(this.regionPath.attr("path",d),this.regionPath.show()):this.regionPath=p.addShape({type:"path",name:"active-region",capture:!1,attrs:{path:d,fill:"#CCD6EC",opacity:.3}})}}},e.prototype.hide=function(){this.regionPath&&this.regionPath.hide(),this.items=null},e.prototype.destroy=function(){this.hide(),this.regionPath&&this.regionPath.remove(!0),t.prototype.destroy.call(this)},e}(K),nr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.timeStamp=0,e}return Object(a.__extends)(e,t),e.prototype.show=function(){var t=this.context,e=t.event,i=t.view;if(!i.isTooltipLocked()){var n=this.timeStamp,r=+new Date;if(r-n>16){var o=this.location,a={x:e.x,y:e.y};o&&Object(s.isEqual)(o,a)||this.showTooltip(i,a),this.timeStamp=r,this.location=a}}},e.prototype.hide=function(){var t=this.context.view;t.isTooltipLocked()||(this.hideTooltip(t),this.location=null)},e.prototype.showTooltip=function(t,e){t.showTooltip(e)},e.prototype.hideTooltip=function(t){t.hideTooltip()},e}(K),rr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.showTooltip=function(t,e){var i=Nt(t);Object(s.each)(i,(function(i){var n=Yt(t,i,e);i.showTooltip(n)}))},e.prototype.hideTooltip=function(t){var e=Nt(t);Object(s.each)(e,(function(t){t.hideTooltip()}))},e}(nr),or=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.timeStamp=0,e}return Object(a.__extends)(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.tooltip&&this.tooltip.destroy()},e.prototype.show=function(){var t=this.context.event,e=this.timeStamp,i=+new Date;if(i-e>16){var n=this.location,r={x:t.x,y:t.y};n&&Object(s.isEqual)(n,r)||this.showTooltip(r),this.timeStamp=i,this.location=r}},e.prototype.hide=function(){this.hideTooltip(),this.location=null},e.prototype.showTooltip=function(t){var e=this.context.event.target;if(e&&e.get("tip")){this.tooltip||this.renderTooltip();var i=e.get("tip");this.tooltip.update(Object(a.__assign)({title:i},t)),this.tooltip.show()}},e.prototype.hideTooltip=function(){this.tooltip&&this.tooltip.hide()},e.prototype.renderTooltip=function(){var t=this.context.view,e=t.canvas,i={start:{x:0,y:0},end:{x:e.get("width"),y:e.get("height")}},n=t.getTheme(),r=Object(s.get)(n,["components","tooltip","domStyles"],{}),o=new L({parent:e.get("el").parentNode,region:i,visible:!1,crosshairs:null,domStyles:r});o.init(),o.setCapture(!1),this.tooltip=o},e}(K),ar=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="",e}return Object(a.__extends)(e,t),e.prototype.hasState=function(t){return t.hasState(this.stateName)},e.prototype.setElementState=function(t,e){t.setState(this.stateName,e)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.clear=function(){var t=this.context.view;this.clearViewState(t)},e.prototype.clearViewState=function(t){var e=this,i=Lt(t,this.stateName);Object(s.each)(i,(function(t){e.setElementState(t,!1)}))},e}(K);function sr(t){return Object(s.get)(t.get("delegateObject"),"item")}var lr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.ignoreListItemStates=["unchecked"],e}return Object(a.__extends)(e,t),e.prototype.isItemIgnore=function(t,e){return!!this.ignoreListItemStates.filter((function(i){return e.hasState(t,i)})).length},e.prototype.setStateByComponent=function(t,e,i){var n=this.context.view,r=t.get("field"),o=Et(n);this.setElementsStateByItem(o,r,e,i)},e.prototype.setStateByElement=function(t,e){this.setElementState(t,e)},e.prototype.isMathItem=function(t,e,i){var n=Xt(this.context.view,e),r=It(t,e);return!Object(s.isNil)(r)&&i.name===n.getText(r)},e.prototype.setElementsStateByItem=function(t,e,i,n){var r=this;Object(s.each)(t,(function(t){r.isMathItem(t,e,i)&&t.setState(r.stateName,n)}))},e.prototype.setStateEnable=function(t){var e=wt(this.context);if(e)Ct(this.context)&&this.setStateByElement(e,t);else{var i=Mt(this.context);if(St(i)){var n=i.item,r=i.component;if(n&&r&&!this.isItemIgnore(n,r)){var o=this.context.event.gEvent;if(o&&o.fromShape&&o.toShape&&sr(o.fromShape)===sr(o.toShape))return;this.setStateByComponent(r,n,t)}}}},e.prototype.toggle=function(){var t=wt(this.context);if(t){var e=t.hasState(this.stateName);this.setElementState(t,!e)}},e.prototype.reset=function(){this.setStateEnable(!1)},e}(ar),ur=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return Object(a.__extends)(e,t),e.prototype.active=function(){this.setState()},e}(lr),cr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cache={},e}return Object(a.__extends)(e,t),e.prototype.getColorScale=function(t,e){var i=e.geometry.getAttribute("color");return i?t.getScaleByField(i.getFields()[0]):null},e.prototype.getLinkPath=function(t,e){var i=t.shape.getCanvasBBox(),n=e.shape.getCanvasBBox();return[["M",i.maxX,i.minY],["L",n.minX,n.minY],["L",n.minX,n.maxY],["L",i.maxX,i.maxY],["Z"]]},e.prototype.addLinkShape=function(t,e,i){t.addShape({type:"path",attrs:{opacity:.4,fill:e.shape.attr("fill"),path:this.getLinkPath(e,i)}})},e.prototype.linkByElement=function(t){var e=this,i=this.context.view,n=this.getColorScale(i,t);if(n){var r=It(t,n.field);if(!this.cache[r]){var o=function(t,e,i){return Et(t).filter((function(t){return It(t,e)===i}))}(i,n.field,r),a=this.linkGroup.addGroup();this.cache[r]=a;var l=o.length;Object(s.each)(o,(function(t,i){if(i=0}),e)},e}(hr),wr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return Object(a.__extends)(e,t),e.prototype.highlight=function(){this.setState()},e.prototype.setElementState=function(t,e){yr(Et(this.context.view),(function(e){return t===e}),e)},e.prototype.clear=function(){gr(this.context.view)},e}(fr),Mr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return Object(a.__extends)(e,t),e.prototype.selected=function(){this.setState()},e}(hr),Cr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return Object(a.__extends)(e,t),e.prototype.selected=function(){this.setState()},e}(lr),Sr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return Object(a.__extends)(e,t),e.prototype.selected=function(){this.setState()},e}(fr),jr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="",e.ignoreItemStates=[],e}return Object(a.__extends)(e,t),e.prototype.getTriggerListInfo=function(){var t=Mt(this.context),e=null;return St(t)&&(e={item:t.item,list:t.component}),e},e.prototype.getAllowComponents=function(){var t=this,e=Bt(this.context.view),i=[];return Object(s.each)(e,(function(e){e.isList()&&t.allowSetStateByElement(e)&&i.push(e)})),i},e.prototype.hasState=function(t,e){return t.hasState(e,this.stateName)},e.prototype.clearAllComponentsState=function(){var t=this,e=this.getAllowComponents();Object(s.each)(e,(function(e){e.clearItemsState(t.stateName)}))},e.prototype.allowSetStateByElement=function(t){var e=t.get("field");if(!e)return!1;if(this.cfg&&this.cfg.componentNames){var i=t.get("name");if(-1===this.cfg.componentNames.indexOf(i))return!1}var n=Xt(this.context.view,e);return n&&n.isCategory},e.prototype.allowSetStateByItem=function(t,e){var i=this.ignoreItemStates;return!i.length||0===i.filter((function(i){return e.hasState(t,i)})).length},e.prototype.setStateByElement=function(t,e,i){var n=t.get("field"),r=Xt(this.context.view,n),o=It(e,n),a=r.getText(o);this.setItemsState(t,a,i)},e.prototype.setStateEnable=function(t){var e=this,i=wt(this.context);if(i){var n=this.getAllowComponents();Object(s.each)(n,(function(n){e.setStateByElement(n,i,t)}))}else{var r=Mt(this.context);if(St(r)){var o=r.item,a=r.component;this.allowSetStateByElement(a)&&this.allowSetStateByItem(o,a)&&this.setItemState(a,o,t)}}},e.prototype.setItemsState=function(t,e,i){var n=this,r=t.getItems();Object(s.each)(r,(function(r){r.name===e&&n.setItemState(t,r,i)}))},e.prototype.setItemState=function(t,e,i){t.setItemState(e,this.stateName,i)},e.prototype.setState=function(){this.setStateEnable(!0)},e.prototype.reset=function(){this.setStateEnable(!1)},e.prototype.toggle=function(){var t=this.getTriggerListInfo();if(t&&t.item){var e=t.list,i=t.item,n=this.hasState(e,i);this.setItemState(e,i,!n)}},e.prototype.clear=function(){var t=this.getTriggerListInfo();t?t.list.clearItemsState(this.stateName):this.clearAllComponentsState()},e}(K),Pr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e}return Object(a.__extends)(e,t),e.prototype.active=function(){this.setState()},e}(jr);var Tr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="active",e.ignoreItemStates=["unchecked"],e}return Object(a.__extends)(e,t),e.prototype.setItemsState=function(t,e,i){this.setHighlightBy(t,(function(t){return t.name===e}),i)},e.prototype.setItemState=function(t,e,i){t.getItems();this.setHighlightBy(t,(function(t){return t===e}),i)},e.prototype.setHighlightBy=function(t,e,i){var n=t.getItems();if(i)Object(s.each)(n,(function(i){e(i)?(t.hasState(i,"inactive")&&t.setItemState(i,"inactive",!1),t.setItemState(i,"active",!0)):t.hasState(i,"active")||t.setItemState(i,"inactive",!0)}));else{var r=t.getItemsByState("active"),o=!0;Object(s.each)(r,(function(t){if(!e(t))return o=!1,!1})),o?this.clear():Object(s.each)(n,(function(i){e(i)&&(t.hasState(i,"active")&&t.setItemState(i,"active",!1),t.setItemState(i,"inactive",!0))}))}},e.prototype.highlight=function(){this.setState()},e.prototype.clear=function(){var t,e,i=this.getTriggerListInfo();if(i)t=i.list,e=t.getItems(),Object(s.each)(e,(function(e){t.hasState(e,"active")&&t.setItemState(e,"active",!1),t.hasState(e,"inactive")&&t.setItemState(e,"inactive",!1)}));else{var n=this.getAllowComponents();Object(s.each)(n,(function(t){t.clearItemsState("active"),t.clearItemsState("inactive")}))}},e}(jr),Ar=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="selected",e}return Object(a.__extends)(e,t),e.prototype.selected=function(){this.setState()},e}(jr),Er=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.stateName="unchecked",e}return Object(a.__extends)(e,t),e.prototype.unchecked=function(){this.setState()},e}(jr),Lr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.maskShape=null,e.points=[],e.starting=!1,e.moving=!1,e.preMovePoint=null,e.shapeType="path",e}return Object(a.__extends)(e,t),e.prototype.getCurrentPoint=function(){var t=this.context.event;return{x:t.x,y:t.y}},e.prototype.emitEvent=function(t){var e="mask:"+t,i=this.context.view,n=this.context.event;i.emit(e,{target:this.maskShape,shape:this.maskShape,points:this.points,x:n.x,y:n.y})},e.prototype.createMask=function(){var t=this.context.view,e=this.getMaskAttrs();return t.foregroundGroup.addShape({type:this.shapeType,name:"mask",draggable:!0,attrs:Object(a.__assign)({fill:"#C5D4EB",opacity:.3},e)})},e.prototype.getMaskPath=function(){return[]},e.prototype.show=function(){this.maskShape&&(this.maskShape.show(),this.emitEvent("show"))},e.prototype.start=function(){this.starting=!0,this.moving=!1,this.points=[this.getCurrentPoint()],this.maskShape||(this.maskShape=this.createMask(),this.maskShape.set("capture",!1)),this.updateMask(),this.emitEvent("start")},e.prototype.moveStart=function(){this.moving=!0,this.preMovePoint=this.getCurrentPoint()},e.prototype.move=function(){if(this.moving&&this.maskShape){var t=this.getCurrentPoint(),e=this.preMovePoint,i=t.x-e.x,n=t.y-e.y,r=this.points;Object(s.each)(r,(function(t){t.x+=i,t.y+=n})),this.updateMask(),this.emitEvent("change"),this.preMovePoint=t}},e.prototype.updateMask=function(){var t=this.getMaskAttrs();this.maskShape.attr(t)},e.prototype.moveEnd=function(){this.moving=!1,this.preMovePoint=null},e.prototype.end=function(){this.starting=!1,this.emitEvent("end"),this.maskShape&&this.maskShape.set("capture",!0)},e.prototype.hide=function(){this.maskShape&&(this.maskShape.hide(),this.emitEvent("hide"))},e.prototype.resize=function(){this.starting&&this.maskShape&&(this.points.push(this.getCurrentPoint()),this.updateMask(),this.emitEvent("change"))},e.prototype.destroy=function(){this.points=[],this.maskShape&&this.maskShape.remove(),this.maskShape=null,this.preMovePoint=null,t.prototype.destroy.call(this)},e}(K),Ir=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="circle",e}return Object(a.__extends)(e,t),e.prototype.getMaskAttrs=function(){var t=this.points,e=Object(s.last)(this.points),i=0,n=0,r=0;if(t.length){var o=t[0];i=Ft(o,e)/2,n=(e.x+o.x)/2,r=(e.y+o.y)/2}return{x:n,y:r,r:i}},e}(Lr),Dr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.shapeType="rect",e}return Object(a.__extends)(e,t),e.prototype.getRegion=function(){var t=this.points;return{start:Object(s.head)(t),end:Object(s.last)(t)}},e.prototype.getMaskAttrs=function(){var t=this.getRegion(),e=t.start,i=t.end;return{x:Math.min(e.x,i.x),y:Math.min(e.y,i.y),width:Math.abs(i.x-e.x),height:Math.abs(i.y-e.y)}},e}(Lr);function kr(t){t.x=Object(s.clamp)(t.x,0,1),t.y=Object(s.clamp)(t.y,0,1)}var Br=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dim="x",e.inPlot=!0,e}return Object(a.__extends)(e,t),e.prototype.getRegion=function(){var t=null,e=null,i=this.points,n=this.dim,r=this.context.view.getCoordinate(),o=r.invert(Object(s.head)(i)),a=r.invert(Object(s.last)(i));return this.inPlot&&(kr(o),kr(a)),"x"===n?(t=r.convert({x:o.x,y:0}),e=r.convert({x:a.x,y:1})):(t=r.convert({x:0,y:o.y}),e=r.convert({x:1,y:a.y})),{start:t,end:e}},e}(Dr),Fr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.getMaskPath=function(){var t=this.points,e=[];return t.length&&(Object(s.each)(t,(function(t,i){0===i?e.push(["M",t.x,t.y]):e.push(["L",t.x,t.y])})),e.push(["L",t[0].x,t[0].y])),e},e.prototype.getMaskAttrs=function(){return{path:this.getMaskPath()}},e.prototype.addPoint=function(){this.resize()},e}(Lr),Rr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.getMaskPath=function(){return function(t,e){if(t.length<=2)return yt(t,!1);var i=t[0],n=[];Object(s.each)(t,(function(t){n.push(t.x),n.push(t.y)}));var r=gt(n,e,null);return r.unshift(["M",i.x,i.y]),r}(this.points,!0)},e}(Fr),Nr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.setCursor=function(t){this.context.view.getCanvas().setCursor(t)},e.prototype.default=function(){this.setCursor("default")},e.prototype.pointer=function(){this.setCursor("pointer")},e.prototype.move=function(){this.setCursor("move")},e.prototype.crosshair=function(){this.setCursor("crosshair")},e.prototype.wait=function(){this.setCursor("wait")},e.prototype.help=function(){this.setCursor("help")},e.prototype.text=function(){this.setCursor("text")},e.prototype.eResize=function(){this.setCursor("e-resize")},e.prototype.wResize=function(){this.setCursor("w-resize")},e.prototype.nResize=function(){this.setCursor("n-resize")},e.prototype.sResize=function(){this.setCursor("s-resize")},e.prototype.neResize=function(){this.setCursor("ne-resize")},e.prototype.nwResize=function(){this.setCursor("nw-resize")},e.prototype.seResize=function(){this.setCursor("se-resize")},e.prototype.swResize=function(){this.setCursor("sw-resize")},e.prototype.nsResize=function(){this.setCursor("ns-resize")},e.prototype.ewResize=function(){this.setCursor("ew-resize")},e}(K),Yr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.filterView=function(t,e,i){var n=this;t.getScaleByField(e)&&t.filter(e,i),t.views&&t.views.length&&Object(s.each)(t.views,(function(t){n.filterView(t,e,i)}))},e.prototype.filter=function(){var t=Mt(this.context);if(t){var e=this.context.view,i=t.component,n=i.get("field");if(St(t)){if(n){var r=i.getItemsByState("unchecked"),o=Xt(e,n),a=r.map((function(t){return t.name}));a.length?this.filterView(e,n,(function(t){var e=o.getText(t);return!a.includes(e)})):this.filterView(e,n,null),e.render(!0)}}else if(jt(t)){var s=i.getValue(),l=s[0],u=s[1];this.filterView(e,n,(function(t){return t>=l&&t<=u})),e.render(!0)}}},e}(K);function Gr(t,e,i,n){var r=Math.min(i[e],n[e]),o=Math.max(i[e],n[e]),a=t.range,s=a[0],l=a[1];if(rl&&(o=l),r===l&&o===l)return null;var u=t.invert(r),c=t.invert(o);if(t.isCategory){var h=t.values.indexOf(u),p=t.values.indexOf(c),f=t.values.slice(h,p+1);return function(t){return f.includes(t)}}return function(t){return t>=u&&t<=c}}var Xr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=["x","y"],e.startPoint=null,e.isStarted=!1,e}return Object(a.__extends)(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.start=function(){var t=this.context;this.isStarted=!0,this.startPoint=t.getCurrentPoint()},e.prototype.filter=function(){var t,e;if(Pt(this.context)){var i=this.context.event.target.getCanvasBBox();t={x:i.x,y:i.y},e={x:i.maxX,y:i.maxY}}else{if(!this.isStarted)return;t=this.startPoint,e=this.context.getCurrentPoint()}if(!(Math.abs(t.x-e.x)<5||Math.abs(t.x-e.y)<5)){var n=this.context.view,r=n.getCoordinate(),o=r.invert(e),a=r.invert(t);if(this.hasDim("x")){var s=n.getXScale(),l=Gr(s,"x",o,a);this.filterView(n,s.field,l)}if(this.hasDim("y")){var u=n.getYScales()[0];l=Gr(u,"y",o,a);this.filterView(n,u.field,l)}this.reRender(n)}},e.prototype.end=function(){this.isStarted=!1},e.prototype.reset=function(){var t=this.context.view;if(this.isStarted=!1,this.hasDim("x")){var e=t.getXScale();this.filterView(t,e.field,null)}if(this.hasDim("y")){var i=t.getYScales()[0];this.filterView(t,i.field,null)}this.reRender(t)},e.prototype.filterView=function(t,e,i){t.filter(e,i)},e.prototype.reRender=function(t){t.render(!0)},e}(K),Vr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.filterView=function(t,e,i){var n=Nt(t);Object(s.each)(n,(function(t){t.filter(e,i)}))},e.prototype.reRender=function(t){var e=Nt(t);Object(s.each)(e,(function(t){t.render(!0)}))},e}(Xr),zr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(a.__extends)(e,t),e.prototype.filter=function(){var t=Mt(this.context),e=this.context.view,i=Et(e);if(Pt(this.context)){var n=Tt(this.context,10);n&&Object(s.each)(i,(function(t){n.includes(t)?t.show():t.hide()}))}else if(t){var r=t.component,o=r.get("field");if(St(t)){if(o){var a=r.getItemsByState("unchecked"),l=Xt(e,o),u=a.map((function(t){return t.name}));Object(s.each)(i,(function(t){var e=It(t,o),i=l.getText(e);u.indexOf(i)>=0?t.hide():t.show()}))}}else if(jt(t)){var c=r.getValue(),h=c[0],p=c[1];Object(s.each)(i,(function(t){var e=It(t,o);e>=h&&e<=p?t.show():t.hide()}))}}},e.prototype.clear=function(){var t=Et(this.context.view);Object(s.each)(t,(function(t){t.show()}))},e.prototype.reset=function(){this.clear()},e}(K),Hr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.byRecord=!1,e}return Object(a.__extends)(e,t),e.prototype.filter=function(){Pt(this.context)&&(this.byRecord?this.filterByRecord():this.filterByBBox())},e.prototype.filterByRecord=function(){var t=this.context.view,e=Tt(this.context,10);if(e){var i=t.getXScale().field,n=t.getYScales()[0].field,r=e.map((function(t){return t.getModel().data})),o=Nt(t);Object(s.each)(o,(function(t){var e=Et(t);Object(s.each)(e,(function(t){var e=t.getModel().data;Gt(r,e,i,n)?t.show():t.hide()}))}))}},e.prototype.filterByBBox=function(){var t=this,e=Nt(this.context.view);Object(s.each)(e,(function(e){var i=At(t.context,e,10),n=Et(e);i&&Object(s.each)(n,(function(t){i.includes(t)?t.show():t.hide()}))}))},e.prototype.reset=function(){var t=Nt(this.context.view);Object(s.each)(t,(function(t){var e=Et(t);Object(s.each)(e,(function(t){t.show()}))}))},e}(K),Wr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.buttonGroup=null,e.buttonCfg={name:"button",text:"button",textStyle:{x:0,y:0,fontSize:12,fill:"#333333",cursor:"pointer"},padding:[8,10],style:{fill:"#f7f7f7",stroke:"#cccccc",cursor:"pointer"},activeStyle:{fill:"#e6e6e6"}},e}return Object(a.__extends)(e,t),e.prototype.getButtonCfg=function(){return Object(s.deepMix)(this.buttonCfg,this.cfg)},e.prototype.drawButton=function(){var t=this.getButtonCfg(),e=this.context.view.foregroundGroup.addGroup({name:t.name}),i=e.addShape({type:"text",name:"button-text",attrs:Object(a.__assign)({text:t.text},t.textStyle)}).getBBox(),n=Ce(t.padding),r=e.addShape({type:"rect",name:"button-rect",attrs:Object(a.__assign)({x:i.x-n[3],y:i.y-n[0],width:i.width+n[1]+n[3],height:i.height+n[0]+n[2]},t.style)});r.toBack(),e.on("mouseenter",(function(){r.attr(t.activeStyle)})),e.on("mouseleave",(function(){r.attr(t.style)})),this.buttonGroup=e},e.prototype.resetPosition=function(){var t=this.context.view.getCoordinate().convert({x:1,y:1}),e=this.buttonGroup,i=e.getBBox(),n=B.ext.transform(null,[["t",t.x-i.width-10,t.y+i.height+5]]);e.setMatrix(n)},e.prototype.show=function(){this.buttonGroup||this.drawButton(),this.resetPosition(),this.buttonGroup.show()},e.prototype.hide=function(){this.buttonGroup&&this.buttonGroup.hide()},e.prototype.destroy=function(){var e=this.buttonGroup;e&&e.remove(),t.prototype.destroy.call(this)},e}(K),qr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.dragStart=!1,e}return Object(a.__extends)(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint()},e.prototype.drag=function(){if(this.startPoint){var t=this.context.getCurrentPoint(),e=this.context.view,i=this.context.event;this.dragStart?e.emit("drag",{target:i.target,x:i.x,y:i.y}):Ft(t,this.startPoint)>4&&(e.emit("dragstart",{target:i.target,x:i.x,y:i.y}),this.dragStart=!0)}},e.prototype.end=function(){if(this.dragStart){var t=this.context.view,e=this.context.event;t.emit("dragend",{target:e.target,x:e.x,y:e.y})}this.starting=!1,this.dragStart=!1},e}(K),Ur=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.starting=!1,e.isMoving=!1,e.startPoint=null,e.startMatrix=null,e}return Object(a.__extends)(e,t),e.prototype.start=function(){this.starting=!0,this.startPoint=this.context.getCurrentPoint(),this.startMatrix=this.context.view.middleGroup.getMatrix()},e.prototype.move=function(){if(this.starting){var t=this.startPoint,e=this.context.getCurrentPoint();if(Ft(t,e)>5&&!this.isMoving&&(this.isMoving=!0),this.isMoving){var i=this.context.view,n=B.ext.transform(this.startMatrix,[["t",e.x-t.x,e.y-t.y]]);i.backgroundGroup.setMatrix(n),i.foregroundGroup.setMatrix(n),i.middleGroup.setMatrix(n)}}},e.prototype.end=function(){this.isMoving&&(this.isMoving=!1),this.startMatrix=null,this.starting=!1,this.startPoint=null},e.prototype.reset=function(){this.starting=!1,this.startPoint=null,this.isMoving=!1;var t=this.context.view;t.backgroundGroup.resetMatrix(),t.foregroundGroup.resetMatrix(),t.middleGroup.resetMatrix(),this.isMoving=!1},e}(K),Kr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.dims=["x","y"],e.cfgFields=["dims"],e.cacheScaleDefs={},e}return Object(a.__extends)(e,t),e.prototype.hasDim=function(t){return this.dims.includes(t)},e.prototype.getScale=function(t){var e=this.context.view;return"x"===t?e.getXScale():e.getYScales()[0]},e.prototype.resetDim=function(t){var e=this.context.view;if(this.hasDim(t)&&this.cacheScaleDefs[t]){var i=this.getScale(t);e.scale(i.field,this.cacheScaleDefs[t]),this.cacheScaleDefs[t]=null}},e.prototype.reset=function(){this.resetDim("x"),this.resetDim("y"),this.context.view.render(!0)},e}(K),Zr=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.startPoint=null,e.starting=!1,e.startCache={},e}return Object(a.__extends)(e,t),e.prototype.start=function(){var t=this;this.startPoint=this.context.getCurrentPoint(),this.starting=!0;var e=this.dims;Object(s.each)(e,(function(e){var i=t.getScale(e),n=i.min,r=i.max,o=i.values;t.startCache[e]={min:n,max:r,values:o}}))},e.prototype.end=function(){this.startPoint=null,this.starting=!1,this.startCache={}},e.prototype.translate=function(){var t=this;if(this.starting){var e=this.startPoint,i=this.context.view.getCoordinate(),n=this.context.getCurrentPoint(),r=i.invert(e),o=i.invert(n),a=o.x-r.x,l=o.y-r.y,u=this.context.view,c=this.dims;Object(s.each)(c,(function(e){t.translateDim(e,{x:-1*a,y:-1*l})})),u.render(!0)}},e.prototype.translateDim=function(t,e){if(this.hasDim(t)){var i=this.getScale(t);i.isLinear&&this.translateLinear(t,i,e)}},e.prototype.translateLinear=function(t,e,i){var n=this.context.view,r=this.startCache[t],o=r.min,a=r.max,s=a-o,l=i[t]*s;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:o,max:a}),n.scale(e.field,{nice:!1,min:o+l,max:a+l})},e.prototype.reset=function(){t.prototype.reset.call(this),this.startPoint=null,this.starting=!1},e}(Kr),$r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.zoomRatio=.05,e}return Object(a.__extends)(e,t),e.prototype.zoomIn=function(){this.zoom(this.zoomRatio)},e.prototype.zoom=function(t){var e=this,i=this.dims;Object(s.each)(i,(function(i){e.zoomDim(i,t)})),this.context.view.render(!0)},e.prototype.zoomOut=function(){this.zoom(-1*this.zoomRatio)},e.prototype.zoomDim=function(t,e){if(this.hasDim(t)){var i=this.getScale(t);i.isLinear&&this.zoomLinear(t,i,e)}},e.prototype.zoomLinear=function(t,e,i){var n=this.context.view;this.cacheScaleDefs[t]||(this.cacheScaleDefs[t]={nice:e.nice,min:e.min,max:e.max});var r=this.cacheScaleDefs[t],o=r.max-r.min,a=e.min,s=e.max,l=i*o,u=a-l,c=s+l,h=(c-u)/o;c>u&&h<100&&h>.01&&n.scale(e.field,{nice:!1,min:a-l,max:s+l})},e}(Kr);function Qr(t){return t.isInPlot()}function Jr(t){return t.gEvent.preventDefault(),t.gEvent.originalEvent.deltaY>0}fe("dark",ne(Ei)),v("canvas",Li),v("svg",Ii),Ae("Polygon",ln),Ae("Interval",en),Ae("Schema",un),Ae("Path",Vi),Ae("Point",sn),Ae("Line",nn),Ae("Area",qi),Ae("Edge",Ui),Ae("Heatmap",Zi),ni("base",_i),ni("interval",mn),ni("pie",_n),ni("polar",bn),oi("overlap",(function(t,e,i,n){var r=new On;Object(s.each)(e,(function(t){for(var e=t.find((function(t){return"text"===t.get("type")})),i=e.attr(),n=i.x,o=i.y,a=!1,s=0;s<=8;s++){var l=wn(e,n,o,s);if(r.hasGap(l)){r.fillGap(l),a=!0;break}}a||t.remove(!0)})),r.destroy()})),oi("distribute",(function(t,e,i,n){var r=t[0]?t[0].offset:0,o=e[0].get("coordinate"),a=o.getRadius(),l=o.getCenter();if(r>0){var u=2*(a+r)+28,c={start:o.start,end:o.end},h=[[],[]];t.forEach((function(t){t&&("right"===t.textAlign?h[0].push(t):h[1].push(t))})),h.forEach((function(t,i){var n=u/14;t.length>n&&(t.sort((function(t,e){return e["..percent"]-t["..percent"]})),t.splice(n,t.length-n)),t.sort((function(t,e){return t.y-e.y})),function(t,e,i,n,r,o){var a,l=!0,u=n.start,c=n.end,h=Math.min(u.y,c.y),p=Math.abs(u.y-c.y),f=0,d=Number.MIN_VALUE,g=e.map((function(t){return t.y>f&&(f=t.y),t.yp&&(p=f-h);l;)for(g.forEach((function(t){var e=(Math.min.apply(d,t.targets)+Math.max.apply(d,t.targets))/2;t.pos=Math.min(Math.max(d,e-t.size/2),p-t.size)})),l=!1,a=g.length;a--;)if(a>0){var y=g[a-1],v=g[a];y.pos+y.size>v.pos&&(y.size+=v.size,y.targets=y.targets.concat(v.targets),y.pos+y.size>p&&(y.pos=p-y.size),g.splice(a,1),l=!0)}a=0,g.forEach((function(t){var n=h+i/2;t.targets.forEach((function(){e[a].y=t.pos+n,n+=i,a++}))}));for(var m={},x=0,b=t;xr.maxX||n.maxY>r.maxY)&&t.remove(!0)}))})),oi("limit-in-canvas",(function(t,e,i,n){Object(s.each)(e,(function(t){var e=n.minX,i=n.minY,r=n.maxX,o=n.maxY,a=t.getCanvasBBox(),s=a.minX,l=a.minY,u=a.maxX,c=a.maxY,h=a.x,p=a.y,f=a.width,d=a.height,g=h,y=p;(sr?g=r-f:u>r&&(g-=u-r),l>o?y=o-d:c>o&&(y-=c-o),g===h&&y===p||mi(t,g-h,y-p)}))})),oi("pie-outer",(function(t,e,i,n){var r=t[0]?t[0].offset:0,o=e[0].get("coordinate"),a=o.getRadius(),l=o.getCenter();if(r>0){var u=Object(s.get)(t[0],"labelHeight",14),c=a+r,h=2*c+2*u,p={start:o.start,end:o.end},f=[[],[]];t.forEach((function(t){t&&(t.xn&&(t.sort((function(t,e){return e["data.percent"]-t["data.percent"]})),t.splice(n,t.length-n+1).forEach((function(t){var i=e.findIndex((function(e){return e.get("id")===t.id}));e[i]&&(e[i].remove(!0),e.splice(i,1))})));!function(t,e,i,n,r,o,a){e.sort((function(t,e){return t.y-e.y}));var s,l=n.start,u=n.end,c=Math.min(l.y,u.y),h=Math.max(l.y,u.y),p=e.map((function(t){return{content:t.content,size:i,pos:t.y,targets:[t.y]}})),f=Math.max.apply(Math,p.map((function(t){return t.pos}))),d=Math.min.apply(Math,p.map((function(t){return t.pos})));if(a){for(var g=Math.min(d,h-(p.length-1)*i),y=Math.max(g+p.length*i,f+i),v=!0;v;)for(v=!1,s=p.length;s--;)if(s>0){var m=p[s-1],x=p[s];m.pos+m.size>x.pos&&(x.pos+s*i0){m=p[s-1],x=p[s];m.pos+m.size>x.pos&&(m.pos-g>s*i?m.pos-=m.size:(m.size+=x.size,m.targets=m.targets.concat(x.targets),p.splice(s,1)),v=!0)}s=0,p.forEach((function(t){var n=t.pos;t.targets.forEach((function(){e[s].y=n,n+=i,s++}))}));for(var b={},_=0,O=t;_0?1:-1),o=t.y+Object(s.get)(t,"offsetY",0)*(Math.sin(e)>0?1:-1),u={x:n-4*Math.cos(e),y:o-4*Math.sin(e)},c=t.labelLine.smooth,h=[],p=u.x-l.x,f=u.y-l.y,d=Math.atan(f/p);if(p<0&&(d+=Math.PI),!1===c){Object(s.isObject)(t.labelLine)||(t.labelLine={});var g=0;(e<0&&e>-Math.PI/2||e>1.5*Math.PI)&&u.y>i.y&&(g=1),e>=0&&ei.y&&(g=1),e>=Math.PI/2&&eu.y&&(g=1),(e<-Math.PI/2||e>=Math.PI&&e<1.5*Math.PI)&&i.y>u.y&&(g=1);var y=r/2>4?4:Math.max(r/2-1,0),v=et(l.x,l.y,a+y,e),m=et(l.x,l.y,a+r/2,d);h.push("M "+i.x+" "+i.y),h.push("L "+v.x+" "+v.y),h.push("A "+l.x+" "+l.y+" 0 0 "+g+" "+m.x+" "+m.y),h.push("L "+u.x+" "+u.y)}else{v=et(l.x,l.y,a+(r/2>4?4:Math.max(r/2-1,0)),e);var x=i.xMath.pow(Math.E,-16)&&h.push.apply(h,["C",u.x+4*x,u.y,2*v.x-i.x,2*v.y-i.y,i.x,i.y]),h.push("L "+i.x+" "+i.y)}t.labelLine.path=h.join(" ")}}))})),We("fade-in",(function(t,e,i){var n={fillOpacity:Object(s.isNil)(t.attr("fillOpacity"))?1:t.attr("fillOpacity"),strokeOpacity:Object(s.isNil)(t.attr("strokeOpacity"))?1:t.attr("strokeOpacity"),opacity:Object(s.isNil)(t.attr("opacity"))?1:t.attr("opacity")};t.attr({fillOpacity:0,strokeOpacity:0,opacity:0}),t.animate(n,e)})),We("fade-out",(function(t,e,i){var n=e.easing,r=e.duration,o=e.delay;t.animate({fillOpacity:0,strokeOpacity:0,opacity:0},r,n,(function(){t.remove(!0)}),o)})),We("grow-in-x",(function(t,e,i){Mn(t,e,i.coordinate,i.minYPoint,"x")})),We("grow-in-xy",(function(t,e,i){Mn(t,e,i.coordinate,i.minYPoint,"xy")})),We("grow-in-y",(function(t,e,i){Mn(t,e,i.coordinate,i.minYPoint,"y")})),We("scale-in-x",(function(t,e,i){var n=t.getBBox(),r=t.get("origin").mappingData.points,o=r[0].y-r[1].y>0?n.maxX:n.minX,a=(n.minY+n.maxY)/2;t.applyToMatrix([o,a,1]);var s=B.ext.transform(t.getMatrix(),[["t",-o,-a],["s",.01,1],["t",o,a]]);t.setMatrix(s),t.animate({matrix:B.ext.transform(t.getMatrix(),[["t",-o,-a],["s",100,1],["t",o,a]])},e)})),We("scale-in-y",(function(t,e,i){var n=t.getBBox(),r=t.get("origin").mappingData,o=(n.minX+n.maxX)/2,a=r.points,s=a[0].y-a[1].y<=0?n.maxY:n.minY;t.applyToMatrix([o,s,1]);var l=B.ext.transform(t.getMatrix(),[["t",-o,-s],["s",1,.01],["t",o,s]]);t.setMatrix(l),t.animate({matrix:B.ext.transform(t.getMatrix(),[["t",-o,-s],["s",1,100],["t",o,s]])},e)})),We("wave-in",(function(t,e,i){var n=ft(i.coordinate,20),r=n.type,o=n.startState,s=n.endState,l=t.setClip({type:r,attrs:o});l.animate(s,Object(a.__assign)(Object(a.__assign)({},e),{callback:function(){t&&!t.get("destroyed")&&t.set("clipShape",null),l.remove(!0)}}))})),We("zoom-in",(function(t,e,i){An(t,e,"zoomIn")})),We("zoom-out",(function(t,e,i){An(t,e,"zoomOut")})),We("position-update",(function(t,e,i){var n=i.toAttrs,r=n.x,o=n.y;delete n.x,delete n.y,t.attr(n),t.animate({x:r,y:o},e)})),We("sector-path-update",(function(t,e,i){var n=i.toAttrs,r=i.coordinate,o=n.path,l=o.map((function(t){return t[0]})),u=Tn(o),c=u.startAngle,h=u.endAngle,p=u.radius,f=u.innerRadius,d=Tn(t.attr("path")),g=d.startAngle,y=d.endAngle,v=r.getCenter(),m=c-g,x=h-y;t.animate((function(t){var e=g+t*m,i=y+t*x;return Object(a.__assign)(Object(a.__assign)({},n),{path:Object(s.isEqual)(l,["M","A","A","Z"])?nt(v.x,v.y,p,e,i):it(v.x,v.y,p,e,i,f)})}),Object(a.__assign)(Object(a.__assign)({},e),{callback:function(){t.attr("path",o)}}))})),We("path-in",(function(t,e,i){var n=t.getTotalLength();t.attr("lineDash",[n]),t.animate((function(t){return{lineDashOffset:(1-t)*n}}),e)})),U("rect",Fn),U("mirror",Bn),U("list",Dn),U("matrix",kn),U("circle",In),U("tree",Rn),_e("axis",Wn),_e("legend",Jn),_e("tooltip",er),_e("annotation",Nn),_e("slider",tr),J("tooltip",nr),J("sibling-tooltip",rr),J("ellipsis-text",or),J("element-active",ur),J("element-single-active",dr),J("element-range-active",pr),J("element-highlight",xr),J("element-highlight-by-x",_r),J("element-highlight-by-color",br),J("element-single-highlight",wr),J("element-range-highlight",Or),J("element-sibling-highlight",Or,{effectSiblings:!0,effectByRecord:!0}),J("element-selected",Cr),J("element-single-selected",Sr),J("element-range-selected",Mr),J("element-link-by-color",cr),J("active-region",ir),J("list-active",Pr),J("list-selected",Ar),J("list-highlight",Tr),J("list-unchecked",Er),J("legend-item-highlight",Tr,{componentNames:["legend"]}),J("axis-label-highlight",Tr,{componentNames:["axis"]}),J("rect-mask",Dr),J("x-rect-mask",Br,{dim:"x"}),J("y-rect-mask",Br,{dim:"y"}),J("circle-mask",Ir),J("path-mask",Fr),J("smooth-path-mask",Rr),J("cursor",Nr),J("data-filter",Yr),J("brush",Xr),J("brush-x",Xr,{dims:["x"]}),J("brush-y",Xr,{dims:["y"]}),J("sibling-filter",Vr),J("sibling-x-filter",Vr),J("sibling-y-filter",Vr),J("element-filter",zr),J("element-sibling-filter",Hr),J("element-sibling-filter-record",Hr,{byRecord:!0}),J("view-drag",qr),J("view-move",Ur),J("scale-translate",Zr),J("scale-zoom",$r),J("reset-button",Wr,{name:"reset-button",text:"reset"}),ee("tooltip",{start:[{trigger:"plot:mousemove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"plot:touchmove",action:"tooltip:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"plot:mouseleave",action:"tooltip:hide"},{trigger:"plot:leave",action:"tooltip:hide"},{trigger:"plot:touchend",action:"tooltip:hide"}]}),ee("ellipsis-text",{start:[{trigger:"legend-item-name:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"legend-item-name:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:mousemove",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"axis-label:touchstart",action:"ellipsis-text:show",throttle:{wait:50,leading:!0,trailing:!1}}],end:[{trigger:"legend-item-name:mouseleave",action:"ellipsis-text:hide"},{trigger:"legend-item-name:touchend",action:"ellipsis-text:hide"},{trigger:"axis-label:mouseleave",action:"ellipsis-text:hide"},{trigger:"axis-label:touchend",action:"ellipsis-text:hide"}]}),ee("element-active",{start:[{trigger:"element:mouseenter",action:"element-active:active"}],end:[{trigger:"element:mouseleave",action:"element-active:reset"}]}),ee("element-selected",{start:[{trigger:"element:click",action:"element-selected:toggle"}]}),ee("element-highlight",{start:[{trigger:"element:mouseenter",action:"element-highlight:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight:reset"}]}),ee("element-highlight-by-x",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-x:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-x:reset"}]}),ee("element-highlight-by-color",{start:[{trigger:"element:mouseenter",action:"element-highlight-by-color:highlight"}],end:[{trigger:"element:mouseleave",action:"element-highlight-by-color:reset"}]}),ee("legend-active",{start:[{trigger:"legend-item:mouseenter",action:["list-active:active","element-active:active"]}],end:[{trigger:"legend-item:mouseleave",action:["list-active:reset","element-active:reset"]}]}),ee("legend-highlight",{start:[{trigger:"legend-item:mouseenter",action:["legend-item-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"legend-item:mouseleave",action:["legend-item-highlight:reset","element-highlight:reset"]}]}),ee("axis-label-highlight",{start:[{trigger:"axis-label:mouseenter",action:["axis-label-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"axis-label:mouseleave",action:["axis-label-highlight:reset","element-highlight:reset"]}]}),ee("element-list-highlight",{start:[{trigger:"element:mouseenter",action:["list-highlight:highlight","element-highlight:highlight"]}],end:[{trigger:"element:mouseleave",action:["list-highlight:reset","element-highlight:reset"]}]}),ee("element-range-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"mask:mouseenter",action:"cursor:move"},{trigger:"plot:mouseleave",action:"cursor:default"},{trigger:"mask:mouseleave",action:"cursor:crosshair"}],start:[{trigger:"plot:mousedown",isEnable:function(t){return!t.isInShape("mask")},action:["rect-mask:start","rect-mask:show"]},{trigger:"mask:dragstart",action:["rect-mask:moveStart"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:drag",action:["rect-mask:move"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end"]},{trigger:"mask:dragend",action:["rect-mask:moveEnd"]},{trigger:"document:mouseup",isEnable:function(t){return!t.isInPlot()},action:["element-range-highlight:clear","rect-mask:end","rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["element-range-highlight:clear","rect-mask:hide"]}]}),ee("brush",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Qr,action:["brush:start","rect-mask:start","rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Qr,action:["rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Qr,action:["brush:filter","brush:end","rect-mask:end","rect-mask:hide","reset-button:show"]}],rollback:[{trigger:"reset-button:click",action:["brush:reset","reset-button:hide","cursor:crosshair"]}]}),ee("brush-visible",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"plot:mousedown",action:["rect-mask:start","rect-mask:show"]}],processing:[{trigger:"plot:mousemove",action:["rect-mask:resize"]},{trigger:"mask:change",action:["element-range-highlight:highlight"]}],end:[{trigger:"plot:mouseup",action:["rect-mask:end","rect-mask:hide","element-filter:filter","element-range-highlight:clear"]}],rollback:[{trigger:"dblclick",action:["element-filter:clear"]}]}),ee("brush-x",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Qr,action:["brush-x:start","x-rect-mask:start","x-rect-mask:show"]}],processing:[{trigger:"mousemove",isEnable:Qr,action:["x-rect-mask:resize"]}],end:[{trigger:"mouseup",isEnable:Qr,action:["brush-x:filter","brush-x:end","x-rect-mask:end","x-rect-mask:hide"]}],rollback:[{trigger:"dblclick",action:["brush-x:reset"]}]}),ee("element-path-highlight",{showEnable:[{trigger:"plot:mouseenter",action:"cursor:crosshair"},{trigger:"plot:mouseleave",action:"cursor:default"}],start:[{trigger:"mousedown",isEnable:Qr,action:"path-mask:start"},{trigger:"mousedown",isEnable:Qr,action:"path-mask:show"}],processing:[{trigger:"mousemove",action:"path-mask:addPoint"}],end:[{trigger:"mouseup",action:"path-mask:end"}],rollback:[{trigger:"dblclick",action:"path-mask:hide"}]}),ee("element-single-selected",{start:[{trigger:"element:click",action:"element-single-selected:toggle"}]}),ee("legend-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["list-unchecked:toggle","data-filter:filter"]}]}),ee("continuous-filter",{start:[{trigger:"legend:valuechanged",action:"data-filter:filter"}]}),ee("continuous-visible-filter",{start:[{trigger:"legend:valuechanged",action:"element-filter:filter"}]}),ee("legend-visible-filter",{showEnable:[{trigger:"legend-item:mouseenter",action:"cursor:pointer"},{trigger:"legend-item:mouseleave",action:"cursor:default"}],start:[{trigger:"legend-item:click",action:["list-unchecked:toggle","element-filter:filter"]}]}),ee("active-region",{start:[{trigger:"plot:mousemove",action:"active-region:show"}],end:[{trigger:"plot:mouseleave",action:"active-region:hide"}]}),ee("view-zoom",{start:[{trigger:"plot:mousewheel",isEnable:function(t){return Jr(t.event)},action:"scale-zoom:zoomOut",throttle:{wait:100,leading:!0,trailing:!1}},{trigger:"plot:mousewheel",isEnable:function(t){return!Jr(t.event)},action:"scale-zoom:zoomIn",throttle:{wait:100,leading:!0,trailing:!1}}]}),ee("sibling-tooltip",{start:[{trigger:"plot:mousemove",action:"sibling-tooltip:show"}],end:[{trigger:"plot:mouseleave",action:"sibling-tooltip:hide"}]});var to={translate:mi,rotate:xi,zoom:function(t,e){var i=t.getBBox(),n=(i.minX+i.maxX)/2,r=(i.minY+i.maxY)/2;t.applyToMatrix([n,r,1]);var o=vi(t.getMatrix(),[["t",-n,-r],["s",e,e],["t",n,r]]);t.setMatrix(o)},transform:vi,getAngle:rt,polarToCartesian:et}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(80);e.default=function(t){return n.default(t,"String")}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(23),r=i(60);e.default=function(t,e){if(t)if(n.default(t))for(var i=0,o=t.length;i0&&(Object(a.i)(r)||1===r||(t.globalAlpha=r),this.stroke(t)),this.afterDrawPath(t)},e.prototype.createPath=function(t){},e.prototype.afterDrawPath=function(t){},e.prototype.isInShape=function(t,e){var i=this.isStroke(),n=this.isFill(),r=this.getHitLineWidth();return this.isInStrokeOrPath(t,e,i,n,r)},e.prototype.isInStrokeOrPath=function(t,e,i,n,r){return!1},e.prototype.getHitLineWidth=function(){if(!this.isStroke())return 0;var t=this.attrs;return t.lineWidth+t.lineAppendWidth},e}(o.AbstractShape),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,r:0})},e.prototype.isInStrokeOrPath=function(t,e,i,n,r){var o=this.attr(),s=o.x,l=o.y,u=o.r,c=r/2,h=Object(a.b)(s,l,t,e);return n&&i?h<=u+c:n?h<=u:!!i&&(h>=u-c&&h<=u+c)},e.prototype.createPath=function(t){var e=this.attr(),i=e.x,n=e.y,r=e.r;t.beginPath(),t.arc(i,n,r,0,2*Math.PI,!1),t.closePath()},e}(c);function p(t,e,i,n){return t/(i*i)+e/(n*n)}var f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.isInStrokeOrPath=function(t,e,i,n,r){var o=this.attr(),a=r/2,s=o.x,l=o.y,u=o.rx,c=o.ry,h=(t-s)*(t-s),f=(e-l)*(e-l);return n&&i?p(h,f,u+a,c+a)<=1:n?p(h,f,u,c)<=1:!!i&&(p(h,f,u-a,c-a)>=1&&p(h,f,u+a,c+a)<=1)},e.prototype.createPath=function(t){var e=this.attr(),i=e.x,n=e.y,r=e.rx,o=e.ry;if(t.beginPath(),t.ellipse)t.ellipse(i,n,r,o,0,0,2*Math.PI,!1);else{var a=r>o?r:o,s=r>o?1:r/o,l=r>o?o/r:1;t.save(),t.translate(i,n),t.scale(s,l),t.arc(0,0,a,0,2*Math.PI),t.restore(),t.closePath()}},e}(c);function d(t){return t instanceof HTMLElement&&Object(a.k)(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase()}var g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,width:0,height:0})},e.prototype.initAttrs=function(t){this._setImage(t.img)},e.prototype.isStroke=function(){return!1},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._afterLoading=function(){if(!0===this.get("toDraw")){var t=this.get("canvas");t?t.draw():this.createPath(this.get("context"))}},e.prototype._setImage=function(t){var e=this,i=this.attrs;if(Object(a.k)(t)){var n=new Image;n.onload=function(){if(e.destroyed)return!1;e.attr("img",n),e.set("loading",!1),e._afterLoading();var t=e.get("callback");t&&t.call(e)},n.src=t,n.crossOrigin="Anonymous",this.set("loading",!0)}else t instanceof Image?(i.width||(i.width=t.width),i.height||(i.height=t.height)):d(t)&&(i.width||(i.width=Number(t.getAttribute("width"))),i.height||(i.height,Number(t.getAttribute("height"))))},e.prototype.onAttrChange=function(e,i,n){t.prototype.onAttrChange.call(this,e,i,n),"img"===e&&this._setImage(i)},e.prototype.createPath=function(t){if(this.get("loading"))return this.set("toDraw",!0),void this.set("context",t);var e=this.attr(),i=e.x,n=e.y,r=e.width,o=e.height,s=e.sx,l=e.sy,u=e.swidth,c=e.sheight,h=e.img;(h instanceof Image||d(h))&&(Object(a.i)(s)||Object(a.i)(l)||Object(a.i)(u)||Object(a.i)(c)?t.drawImage(h,i,n,r,o):t.drawImage(h,s,l,u,c,i,n,r,o))},e}(c),y=i(18),v=i.n(y);function m(t,e,i,n,r,o,a){var s=Math.min(t,i),l=Math.max(t,i),u=Math.min(e,n),c=Math.max(e,n),h=r/2;return o>=s-h&&o<=l+h&&a>=u-h&&a<=c+h&&v.a.pointToLine(t,e,i,n,o,a)<=r/2}var x=i(19),b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.initAttrs=function(t){this.setArrow()},e.prototype.onAttrChange=function(e,i,n){t.prototype.onAttrChange.call(this,e,i,n),this.setArrow()},e.prototype.setArrow=function(){var t=this.attr(),e=t.x1,i=t.y1,n=t.x2,r=t.y2,o=t.startArrow,a=t.endArrow;o&&x.b(this,t,n,r,e,i),a&&x.a(this,t,e,i,n,r)},e.prototype.isInStrokeOrPath=function(t,e,i,n,r){if(!i||!r)return!1;var o=this.attr();return m(o.x1,o.y1,o.x2,o.y2,r,t,e)},e.prototype.createPath=function(t){var e=this.attr(),i=e.x1,n=e.y1,r=e.x2,o=e.y2,a=e.startArrow,s=e.endArrow,l={dx:0,dy:0},u={dx:0,dy:0};a&&a.d&&(l=x.c(i,n,r,o,e.startArrow.d)),s&&s.d&&(u=x.c(i,n,r,o,e.endArrow.d)),t.beginPath(),t.moveTo(i+l.dx,n+l.dy),t.lineTo(r-u.dx,o-u.dy)},e.prototype.afterDrawPath=function(t){var e=this.get("startArrowShape"),i=this.get("endArrowShape");e&&e.draw(t),i&&i.draw(t)},e.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,i=t.y1,n=t.x2,r=t.y2;return v.a.length(e,i,n,r)},e.prototype.getPoint=function(t){var e=this.attr(),i=e.x1,n=e.y1,r=e.x2,o=e.y2;return v.a.pointAt(i,n,r,o,t)},e}(c),_=i(0),O=i(76),w=i.n(O),M={circle:function(t,e,i){return[["M",t-i,e],["A",i,i,0,1,0,t+i,e],["A",i,i,0,1,0,t-i,e]]},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"]]},"triangle-down":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"]]}},C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.initAttrs=function(t){this._resetParamsCache()},e.prototype._resetParamsCache=function(){this.set("paramsCache",{})},e.prototype.onAttrChange=function(e,i,n){t.prototype.onAttrChange.call(this,e,i,n),-1!==["symbol","x","y","r","radius"].indexOf(e)&&this._resetParamsCache()},e.prototype.isOnlyHitBox=function(){return!0},e.prototype._getR=function(t){return Object(_.isNil)(t.r)?t.radius:t.r},e.prototype._getPath=function(){var t,i,n=this.attr(),r=n.x,o=n.y,s=n.symbol||"circle",l=this._getR(n);return Object(a.h)(s)?(i=(t=s)(r,o,l),i=w()(i)):i=(t=e.Symbols[s])(r,o,l),t?i:(console.warn(s+" marker is not supported."),null)},e.prototype.createPath=function(t){var e=this._getPath(),i=this.get("paramsCache");Object(s.c)(this,t,{path:e},i)},e.Symbols=M,e}(c),S=i(41),j=i.n(S),P=i(116),T=i.n(P),A=i(114);function E(t,e,i){var n=Object(A.getOffScreenContext)();return t.createPath(n),n.isPointInPath(e,i)}function L(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function I(t,e,i){return(i[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(i[1]-t[1])&&Math.min(t[0],e[0])<=i[0]&&i[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=i[1]&&i[1]<=Math.max(t[1],e[1])}function D(t,e,i){var n=!1,r=t.length;if(r<=2)return!1;for(var o=0;o0!=L(s[1]-i)>0&&L(e-(i-a[1])*(a[0]-s[0])/(a[1]-s[1])-a[0])<0&&(n=!n)}return n}var k=i(115),B=i.n(k);function F(t,e,i,n,r,o,s,l){var u=(Math.atan2(l-e,s-t)+2*Math.PI)%(2*Math.PI);if(ur)return!1;var c={x:t+i*Math.cos(u),y:e+i*Math.sin(u)};return Object(a.b)(c.x,c.y,s,l)<=o/2}var R=i(50),N=i(72);var Y=Object(r.__assign)({hasArc:function(t){for(var e=!1,i=t.length,n=0;n0&&n.push(r),{polygons:i,polylines:n}},isPointInStroke:function(t,e,i,n){for(var r=!1,o=e/2,s=0;sv?y:v,C=y>v?1:y/v,S=y>v?v/y:1;R.translate(w,w,[-d,-g]),R.rotate(w,w,-_),R.scale(w,w,[1/C,1/S]),N.transformMat3(O,O,w),r=F(0,0,M,x,b,e,O[0],O[1])}if(r)break}}return r}},o.PathUtil);function G(t,e,i){for(var n=!1,r=0;r=n[0]&&t<=n[1]&&(e=(t-n[0])/(n[1]-n[0]),i=r)}));var o=r[i];if(Object(_.isNil)(o)||Object(_.isNil)(i))return null;var a=o.length,s=r[i+1];return j.a.pointAt(o[a-2],o[a-1],s[1],s[2],s[3],s[4],s[5],s[6],e)},e.prototype._calculateCurve=function(){var t=this.attr().path;this.set("curve",Y.pathToCurve(t))},e.prototype._setTcache=function(){var t,e,i,n,r=0,o=0,a=[],s=this.get("curve");s&&(Object(_.each)(s,(function(t,e){i=s[e+1],n=t.length,i&&(r+=j.a.length(t[n-2],t[n-1],i[1],i[2],i[3],i[4],i[5],i[6])||0)})),this.set("totalLength",r),0!==r?(Object(_.each)(s,(function(l,u){i=s[u+1],n=l.length,i&&((t=[])[0]=o/r,e=j.a.length(l[n-2],l[n-1],i[1],i[2],i[3],i[4],i[5],i[6]),o+=e||0,t[1]=o/r,a.push(t))})),this.set("tCache",a)):this.set("tCache",[]))},e.prototype.getStartTangent=function(){var t,e=this.getSegments();if(e.length>1){var i=e[0].currentPoint,n=e[1].currentPoint,r=e[1].startTangent;t=[],r?(t.push([i[0]-r[0],i[1]-r[1]]),t.push([i[0],i[1]])):(t.push([n[0],n[1]]),t.push([i[0],i[1]]))}return t},e.prototype.getEndTangent=function(){var t,e=this.getSegments(),i=e.length;if(i>1){var n=e[i-2].currentPoint,r=e[i-1].currentPoint,o=e[i-1].endTangent;t=[],o?(t.push([r[0]-o[0],r[1]-o[1]]),t.push([r[0],r[1]])):(t.push([n[0],n[1]]),t.push([r[0],r[1]]))}return t},e}(c);function V(t,e,i,n,r){var o=t.length;if(o<2)return!1;for(var a=0;a=n[0]&&t<=n[1]&&(e=(t-n[0])/(n[1]-n[0]),i=r)})),v.a.pointAt(n[i][0],n[i][1],n[i+1][0],n[i+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var i,n,r=0,o=[];Object(_.each)(t,(function(a,s){t[s+1]&&((i=[])[0]=r/e,n=v.a.length(a[0],a[1],t[s+1][0],t[s+1][1]),r+=n,i[1]=r/e,o.push(i))})),this.set("tCache",o)}}},e.prototype.getStartTangent=function(){var t=this.attr().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.attr().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}(c),U=i(73);var K=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.isInStrokeOrPath=function(t,e,i,n,r){var o=this.attr(),s=o.x,l=o.y,u=o.width,c=o.height,h=o.radius;if(h){var p=!1;return i&&(p=function(t,e,i,n,r,o,a,s){return m(t+r,e,t+i-r,e,o,a,s)||m(t+i,e+r,t+i,e+n-r,o,a,s)||m(t+i-r,e+n,t+r,e+n,o,a,s)||m(t,e+n-r,t,e+r,o,a,s)||F(t+i-r,e+r,r,1.5*Math.PI,2*Math.PI,o,a,s)||F(t+i-r,e+n-r,r,0,.5*Math.PI,o,a,s)||F(t+r,e+n-r,r,.5*Math.PI,Math.PI,o,a,s)||F(t+r,e+r,r,Math.PI,1.5*Math.PI,o,a,s)}(s,l,u,c,h,r,t,e)),!p&&n&&(p=E(this,t,e)),p}var f=r/2;return n&&i?Object(a.e)(s-f,l-f,u+f,c+f,t,e):n?Object(a.e)(s,l,u,c,t,e):i?function(t,e,i,n,r,o,s){var l=r/2;return Object(a.e)(t-l,e-l,i,r,o,s)||Object(a.e)(t+i-l,e-l,r,n,o,s)||Object(a.e)(t+l,e+n-l,i,r,o,s)||Object(a.e)(t-l,e+l,r,n,o,s)}(s,l,u,c,r,t,e):void 0},e.prototype.createPath=function(t){var e=this.attr(),i=e.x,n=e.y,r=e.width,o=e.height,a=e.radius;if(t.beginPath(),0===a)t.rect(i,n,r,o);else{var s=Object(U.a)(a),l=s[0],u=s[1],c=s[2],h=s[3];t.moveTo(i+l,n),t.lineTo(i+r-u,n),0!==u&&t.arc(i+r-u,n+u,u,-Math.PI/2,0),t.lineTo(i+r,n+o-c),0!==c&&t.arc(i+r-c,n+o-c,c,0,Math.PI/2),t.lineTo(i+h,n+o),0!==h&&t.arc(i+h,n+o-h,h,Math.PI/2,Math.PI),t.lineTo(i,n+l),0!==l&&t.arc(i+l,n+l,l,Math.PI,1.5*Math.PI),t.closePath()}},e}(c),Z=i(75),$=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.isOnlyHitBox=function(){return!0},e.prototype.initAttrs=function(t){this._assembleFont(),t.text&&this._setText(t.text)},e.prototype._assembleFont=function(){var t=this.attrs;t.font=Object(Z.assembleFont)(t)},e.prototype._setText=function(t){var e=null;Object(a.k)(t)&&-1!==t.indexOf("\n")&&(e=t.split("\n")),this.set("textArr",e)},e.prototype.onAttrChange=function(e,i,n){t.prototype.onAttrChange.call(this,e,i,n),e.startsWith("font")&&this._assembleFont(),"text"===e&&this._setText(i)},e.prototype._getSpaceingY=function(){var t=this.attrs,e=t.lineHeight,i=1*t.fontSize;return e?e-i:.14*i},e.prototype._drawTextArr=function(t,e,i){var n,r=this.attrs,o=r.textBaseline,s=r.x,l=r.y,u=1*r.fontSize,c=this._getSpaceingY(),h=Object(Z.getTextHeight)(r.text,r.fontSize,r.lineHeight);Object(a.c)(e,(function(e,r){n=l+r*(c+u)-h+u,"middle"===o&&(n+=h-u-(h-u)/2),"top"===o&&(n+=h-u),i?t.fillText(e,s,n):t.strokeText(e,s,n)}))},e.prototype._drawText=function(t,e){var i=this.attr(),n=i.x,r=i.y,o=this.get("textArr");if(o)this._drawTextArr(t,o,e);else{var a=i.text;e?t.fillText(a,n,r):t.strokeText(a,n,r)}},e.prototype.strokeAndFill=function(t){var e=this.attrs,i=e.lineWidth,n=e.opacity,r=e.strokeOpacity,o=e.fillOpacity;this.isStroke()&&i>0&&(Object(a.i)(r)||1===r||(t.globalAlpha=n),this.stroke(t)),this.isFill()&&(Object(a.i)(o)||1===o?this.fill(t):(t.globalAlpha=o,this.fill(t),t.globalAlpha=n)),this.afterDrawPath(t)},e.prototype.fill=function(t){this._drawText(t,!0)},e.prototype.stroke=function(t){this._drawText(t,!1)},e}(c)},function(t,e,i){"use strict";i.r(e),i.d(e,"assign",(function(){return l})),i.d(e,"format",(function(){return S})),i.d(e,"parse",(function(){return j})),i.d(e,"defaultI18n",(function(){return p})),i.d(e,"setGlobalDateI18n",(function(){return d})),i.d(e,"setGlobalDateMasks",(function(){return C}));var n=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,r="[^\\s]+",o=/\[([^]*?)\]/gm;function a(t,e){for(var i=[],n=0,r=t.length;n-1?n:null}};function l(t){for(var e=[],i=1;i3?0:(t-t%10!=10?1:0)*t%10]}},f=l({},p),d=function(t){return f=l(f,t)},g=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},y=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length0?"-":"+")+y(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+y(Math.floor(Math.abs(e)/60),2)+":"+y(Math.abs(e)%60,2)}},m=function(t){return+t-1},x=[null,"[1-9]\\d?"],b=[null,r],_=["isPm",r,function(t,e){var i=t.toLowerCase();return i===e.amPm[0]?0:i===e.amPm[1]?1:null}],O=["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}],w={D:["day","[1-9]\\d?"],DD:["day","\\d\\d"],Do:["day","[1-9]\\d?"+r,function(t){return parseInt(t,10)}],M:["month","[1-9]\\d?",m],MM:["month","\\d\\d",m],YY:["year","\\d\\d",function(t){var e=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+t>68?e-1:e)+t)}],h:["hour","[1-9]\\d?",void 0,"isPm"],hh:["hour","\\d\\d",void 0,"isPm"],H:["hour","[1-9]\\d?"],HH:["hour","\\d\\d"],m:["minute","[1-9]\\d?"],mm:["minute","\\d\\d"],s:["second","[1-9]\\d?"],ss:["second","\\d\\d"],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(t){return 100*+t}],SS:["millisecond","\\d\\d",function(t){return 10*+t}],SSS:["millisecond","\\d{3}"],d:x,dd:x,ddd:b,dddd:b,MMM:["month",r,s("monthNamesShort")],MMMM:["month",r,s("monthNames")],a:_,A:_,ZZ:O,Z:O},M={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},C=function(t){return l(M,t)},S=function(t,e,i){if(void 0===e&&(e=M.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");var r=[];e=(e=M[e]||e).replace(o,(function(t,e){return r.push(e),"@@@"}));var a=l(l({},f),i);return(e=e.replace(n,(function(e){return v[e](t,a)}))).replace(/@@@/g,(function(){return r.shift()}))};function j(t,e,i){if(void 0===i&&(i={}),"string"!=typeof e)throw new Error("Invalid format in fecha parse");if(e=M[e]||e,t.length>1e3)return null;var r={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},a=[],s=[],u=e.replace(o,(function(t,e){return s.push(g(e)),"@@@"})),c={},h={};u=g(u).replace(n,(function(t){var e=w[t],i=e[0],n=e[1],r=e[3];if(c[i])throw new Error("Invalid format. "+i+" specified twice in format");return c[i]=!0,r&&(h[r]=!0),a.push(e),"("+n+")"})),Object.keys(h).forEach((function(t){if(!c[t])throw new Error("Invalid format. "+t+" is required in specified format")})),u=u.replace(/@@@/g,(function(){return s.shift()}));var p=t.match(new RegExp(u,"i"));if(!p)return null;for(var d=l(l({},f),i),y=1;y0&&!(e>=t[i-1]);)i-=1;return i},e.isBBoxIntersect=function(t,e){return!(t.maxY1?1:Number(e),n=t.length-1,r=Math.floor(n*i),o=n*i-r,a=t[r],s=r===n?a:t[r+1];return u([l(a,s,o,0),l(a,s,o,1),l(a,s,o,2)])}(i,t)}},toRGB:Object(n.memoize)(f),toCSSGradient:function(t){if(/^[r,R,L,l]{1}[\s]*\(/.test(t)){var e,i=void 0;if("l"===t[0]){var r=+(l=o.exec(t))[1]+90;i=l[2],e="linear-gradient("+r+"deg, "}else if("r"===t[0]){var l;e="radial-gradient(",i=(l=a.exec(t))[4]}var u=i.match(s);return Object(n.each)(u,(function(t,i){var n=t.split(":");e+=n[1]+" "+100*n[0]+"%",i!==u.length-1&&(e+=", ")})),e+=")"}return t}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(29),r=i(18),o=i(123);function a(t,e,i,n,r){var o=1-r;return o*o*o*t+3*e*r*o*o+3*i*r*r*o+n*r*r*r}function s(t,e,i,n,r){var o=1-r;return 3*(o*o*(e-t)+2*o*r*(i-e)+r*r*(n-i))}function l(t,e,i,r){var o,a,s,l=-3*t+9*e-9*i+3*r,u=6*t-12*e+6*i,c=3*e-3*t,h=[];if(n.isNumberEqual(l,0))n.isNumberEqual(u,0)||(o=-c/u)>=0&&o<=1&&h.push(o);else{var p=u*u-4*l*c;n.isNumberEqual(p,0)?h.push(-u/(2*l)):p>0&&(a=(-u-(s=Math.sqrt(p)))/(2*l),(o=(-u+s)/(2*l))>=0&&o<=1&&h.push(o),a>=0&&a<=1&&h.push(a))}return h}function u(t,e,i,n,o,s,l,u,c){var h=a(t,i,o,l,c),p=a(e,n,s,u,c),f=r.default.pointAt(t,e,i,n,c),d=r.default.pointAt(i,n,o,s,c),g=r.default.pointAt(o,s,l,u,c),y=r.default.pointAt(f.x,f.y,d.x,d.y,c),v=r.default.pointAt(d.x,d.y,g.x,g.y,c);return[[t,e,f.x,f.y,y.x,y.y,h,p],[h,p,v.x,v.y,g.x,g.y,l,u]]}e.default={extrema:l,box:function(t,e,i,r,o,s,u,c){for(var h=[t,u],p=[e,c],f=l(t,i,o,u),d=l(e,r,s,c),g=0;g=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&&(i=(e=[n,i])[0],n=e[1]);var r=this.convertDim(i,"x"),o=this.a*r,a=this.convertDim(n,"y");return{x:this.center.x+Math.cos(r)*(o+a),y:this.center.y+Math.sin(r)*(o+a)}},e.prototype.invertPoint=function(t){var e,i=this.d+this.y.start,n=r.vec2.subtract([0,0],[t.x,t.y],[this.center.x,this.center.y]),a=r.ext.angleTo(n,[1,0],!0),s=a*this.a;r.vec2.length(n)this.width/n?(e=this.width/n,this.circleCenter={x:this.center.x-(.5-o)*this.width,y:this.center.y-(.5-a)*e*r}):(e=this.height/r,this.circleCenter={x:this.center.x-(.5-o)*e*n,y:this.center.y-(.5-a)*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&&(n=(e=[r,n])[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];r.ext.leftRotate(n,n,this.startAngle);var a=[1,0,0];r.vec3.transformMat3(a,a,n);var s=[a[0],a[1]],l=r.ext.angleTo(s,i,this.endAngle0?c:-c;var h=this.invertDim(u,"y"),p={x:0,y:0};return p.x=this.isTransposed?h:c,p.y=this.isTransposed?c:h,p},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=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=o.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(){for(var t=this.x,e=this.y,i=this.parent;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 s.default(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 o.deepMix({},n,t)},e.prototype.eachLayer=function(t){o.each(this.layers,t)},e.prototype.parseEvents=function(t){var e=this,i=o.keys(a.LAYER_EVENT_MAP);o.each(t,(function(t,n){if(o.contains(i,n)&&o.isFunction(t)){var r=a.LAYER_EVENT_MAP[n]||n,s=t;e.on(r,s),e.eventHandlers.push({name:r,handler:s})}}))},e.prototype.getLayerBBox=function(){return new s.default(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;return{start:{x:(this.x-i)/t,y:(this.y-n)/e},end:{x:(this.x+this.width-i)/t,y:(this.y+this.height-n)/e}}}return{start:{x:0,y:0},end:{x:1,y:1}}},e}(r.default);e.default=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importDefault(i(22)),o=i(0),a=function(t){function e(e){var i=t.call(this)||this;return i.container=e.container,i.destroyed=!1,i.config=e,i.disposables=[],i}return n.__extends(e,t),e.prototype.init=function(){this.group||this.initGroup(),this.initConfig(this.config)},e.prototype.getGroup=function(){return this.group},e.prototype.getConfig=function(){return this.config},e.prototype.getBBox=function(){return this.getGroup().getBBox()},e.prototype.clear=function(){this.group.clear()},e.prototype.render=function(){this.group.clear(),this.renderInner(this.group),this.getCanvas().draw()},e.prototype.update=function(t){this.config=n.__assign(n.__assign({},this.config),t),this.initConfig(this.config)},e.prototype.destroy=function(){o.each(this.disposables,(function(t){t()})),this.disposables=[],this.group.remove(!0),this.destroyed=!0},e.prototype.initGroup=function(){this.group=this.container.addGroup()},e.prototype.getCanvas=function(){return this.container.get("canvas")},e.prototype.addDisposable=function(t){this.disposables.push(t)},e.prototype.initConfig=function(t){},e}(r.default);e.default=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rotate=e.translate=e.move=e.transform=e.groupTransform=void 0;var n=i(3),r=i(0),o=i(8);e.groupTransform=function(t,e){var i=n.ext.transform([1,0,0,0,1,0,0,0,1],e);t.setMatrix(i)},e.transform=function(t,e){var i=e?r.clone(e):[1,0,0,0,1,0,0,0,1];return n.ext.transform(i,t)},e.move=function(t,e,i,n){var o=n?r.clone(n):[1,0,0,0,1,0,0,0,1];o[6]=e,o[7]=i,t.setMatrix(o)},e.translate=function(t,e,i){o.Util.translate(t,e,i)},e.rotate=function(t,e){o.Util.rotate(t,e)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=function(){function t(t){n.assign(this,t),this.init()}return t.prototype.init=function(){this.config={type:this.type,position:{fields:this.positionFields}}},t}();e.default=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(8),a=n.__importStar(i(20)),s=i(28),l=n.__importDefault(i(13)),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.getLabelItemAttrs=function(t,e){var i,a,s=this.options,l=s.style,u=s.formatter,c=[].concat(t.getModel().mappingData),h=this.getValue(t);return r.deepMix({},l,n.__assign(n.__assign({},this.getPosition(t)),{text:u?u(h,(i={},i[o._ORIGIN]=null===(a=c[0])||void 0===a?void 0:a._origin,i.mappingDatum=c[0],i.mappingDatumIndex=0,i.element=t,i.elementIndex=e,i),e):h,fill:this.getTextFill(t),stroke:this.getTextStroke(t),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseLine()}))},e.prototype.getDefaultOptions=function(){var t=this.layer.theme.label,e=void 0===t?{}:t;return n.__assign({offsetX:0,offsetY:0,adjustPosition:!0},e)},e.prototype.adjustLabel=function(t,e){if(this.options.adjustPosition){var i=this.getDefaultOffset(),n=t.getBBox(),r=this.getElementShapeBBox(e);if(r.height<=n.height){var o=r.minY+this.options.offsetY-i;t.attr("y",o),t.attr("textBaseline","bottom"),t.attr("fill",this.options.style.fill)}}},e.prototype.getValue=function(t){return r.get(t.getData(),this.layer.options.yField)},e.prototype.getPosition=function(t){var e,i=this.getDefaultOffset(),n=this.getValue(t),r=this.getElementShapeBBox(t),o=r.minX,a=r.minY,s=r.maxY,l=r.height,u=r.width,c=this.options,h=c.offsetX,p=c.offsetY,f=c.position,d=n>0?-1:1;if("top"===f)e=(n>0?a:s)+i*d+p;else if("bottom"===f){e=(n>0?s:a)+i*d+p}else e=a+l/2+p;return{x:o+u/2+h,y:e}},e.prototype.getTextFill=function(t){var e=t.shape;if(this.options.adjustColor&&"top"!==this.options.position){var i=e.attr("fill"),n=e.attr("opacity")?e.attr("opacity"):1,r=s.rgb2arr(i),o=Math.round(.299*r[0]+.587*r[1]+.114*r[2])/n;return s.mappingColor([{from:0,to:85,color:"white"},{from:85,to:170,color:"#F6F6F6"},{from:170,to:255,color:"black"}],o)}return this.options.style.fill},e.prototype.getTextStroke=function(t){var e=this.getTextFill(t),i=this.options,n=i.position,r=i.adjustColor;return"top"!==n&&r&&"black"!==e?null:void 0},e.prototype.getElementShapeBBox=function(t){var e=this,i=t.shape,n=[];r.each(i.get("origin").points,(function(t){n.push(e.coord.convertPoint(t))}));var o=n.map((function(t){return t.x})),a=Math.min.apply(Math,o),s=Math.max.apply(Math,o),u=n.map((function(t){return t.y})),c=Math.min.apply(Math,u),h=Math.max.apply(Math,u);return new l.default(a,c,s-a,h-c)},e.prototype.getTextAlign=function(){return"center"},e.prototype.getTextBaseLine=function(){return"middle"},e.prototype.getLabelOffset=function(){return{x:0,y:0}},e}(a.default);e.default=u,a.registerLabelComponent("column",u)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(15)),a=i(26);i(147);var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.getDefaultOptions=function(){return r.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"}}};r.each(e.guideLine,(function(e){var o=a.getComponent("guideLine",{plot:t,cfg:r.deepMix({},n,e)});i.push(o)})),this.setConfig("annotations",i)},e}(o.default);e.default=s},function(t,e,i){"use strict";i.r(e),i.d(e,"registerAttribute",(function(){return y})),i.d(e,"getAttribute",(function(){return g})),i.d(e,"Attribute",(function(){return o})),i.d(e,"Color",(function(){return l})),i.d(e,"Opacity",(function(){return u})),i.d(e,"Position",(function(){return c})),i.d(e,"Shape",(function(){return h})),i.d(e,"Size",(function(){return p})),i.d(e,"Scale",(function(){return f.Scale}));var n=i(0),r=function(t,e){return Object(n.isString)(e)?e:t.invert(t.scale(e))},o=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=0;o--){var s=t[o],l=s.getBBox(),u=n.getBBox();if(s.get("parent").get("visible")&&(r=a.getOverlapArea(l,u),!a.near(r,0))){n.get("parent").set("visible",!1);break}}t.forEach((function(t){return function(t,e){var i=t.getBBox();e.y<=i.y&&e.y+e.height>=i.y+i.height||t.get("parent").set("visible",!1)}(t,e)}))},t.prototype.adjustItem=function(t){},t.prototype.init=function(){var t=this;this.container=this.getGeometry().labelsContainer,this.plot.view.on("beforerender",(function(){t.clear(),t.plot.canvas.draw()}))},t.prototype.render=function(){this.clear(),this.initArcPoints(),this.drawTexts(),this.drawLines()},t.prototype.clear=function(){this.container&&this.container.clear()},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.destroy=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getFilteredSum=function(){var t=this.plot.options.angleField;return(this.plot.view.filteredData||[]).reduce((function(e,i){return e+i[t]}),0)},t.prototype.drawTexts=function(){var t=this,e=this.options,i=e.style,n=e.formatter,r=e.autoRotate,s=e.offsetX,l=e.offsetY,u=e.adjustPosition,c=e.allowOverlap,h=this.getItems(),p=[];h.map((function(e,r){var a=o.deepMix({},e,i),u=t.getFilteredSum(),c=t.plot.options.angleField,h=e.origin[c]/u,f=n?n(e.name,{_origin:e.origin,percent:h},r):e.name,d=t.container.addGroup({name:"itemGroup",index:r,capture:!1}).addShape("text",{attrs:o.deepMix({},a,{x:e.x+s,y:e.y+l,text:f})});d.set("id","text-"+e.name+"-"+r),p.push(d)})),p.forEach((function(e){var i=t.coordinateBBox;t.adjustText(e,i)})),u&&this.layout(p,h,this.coordinateBBox),c||this.adjustOverlap(p,this.coordinateBBox),p.forEach((function(e,i){r&&t.rotateLabel(e,a.getLabelRotate(h[i].angle))}))},t.prototype.adjustText=function(t,e){var i=t.getBBox(),n=i.width;if(i.maxX>e.maxX?n=e.maxX-i.minX:i.minX4?4:0,u=t.getLinePath(o,a,l),c=t.options.line;e.addShape("path",{attrs:n.__assign({path:u,stroke:a.color},c)}),o.attr("x",o.attr("x")+(s?-l:l))}))}},t.prototype.getLinePath=function(t,e,i){var n=!!this.options.line&&this.options.line.smooth,r=e.angle,o=this.getCoordinate(),s=o.center,l=o.radius,u=a.getEndPoint(s,r,l+i);i<4&&(u=e);var c=e.xr.x?"left":"right";return{x:d.x,y:d.y,color:c,name:g,origin:h,angle:a.getAngleByPoint(t.getGeometry().coordinate,d),textAlign:y}}));this.arcPoints=c},t}();e.default=u},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WEEKS=e.MONTHS=e.FORMATTER=e.IS_MONTH_CENTER_FIELD=e.DATE_FIELD=e.WEEK_FIELD=e.DAY_FIELD=void 0,e.DAY_FIELD="$$day$$",e.WEEK_FIELD="$$week$$",e.DATE_FIELD="$$date$$",e.IS_MONTH_CENTER_FIELD="$$is_month_center$$",e.FORMATTER="YYYY-MM-DD",e.MONTHS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e.WEEKS=["S","M","T","W","T","F","S"]},function(t,e,i){"use strict";i.r(e),i.d(e,"create",(function(){return r})),i.d(e,"clone",(function(){return o})),i.d(e,"length",(function(){return a})),i.d(e,"fromValues",(function(){return s})),i.d(e,"copy",(function(){return l})),i.d(e,"set",(function(){return u})),i.d(e,"add",(function(){return c})),i.d(e,"subtract",(function(){return h})),i.d(e,"multiply",(function(){return p})),i.d(e,"divide",(function(){return f})),i.d(e,"ceil",(function(){return d})),i.d(e,"floor",(function(){return g})),i.d(e,"min",(function(){return y})),i.d(e,"max",(function(){return v})),i.d(e,"round",(function(){return m})),i.d(e,"scale",(function(){return x})),i.d(e,"scaleAndAdd",(function(){return b})),i.d(e,"distance",(function(){return _})),i.d(e,"squaredDistance",(function(){return O})),i.d(e,"squaredLength",(function(){return w})),i.d(e,"negate",(function(){return M})),i.d(e,"inverse",(function(){return C})),i.d(e,"normalize",(function(){return S})),i.d(e,"dot",(function(){return j})),i.d(e,"cross",(function(){return P})),i.d(e,"lerp",(function(){return T})),i.d(e,"hermite",(function(){return A})),i.d(e,"bezier",(function(){return E})),i.d(e,"random",(function(){return L})),i.d(e,"transformMat4",(function(){return I})),i.d(e,"transformMat3",(function(){return D})),i.d(e,"transformQuat",(function(){return k})),i.d(e,"rotateX",(function(){return B})),i.d(e,"rotateY",(function(){return F})),i.d(e,"rotateZ",(function(){return R})),i.d(e,"angle",(function(){return N})),i.d(e,"zero",(function(){return Y})),i.d(e,"str",(function(){return G})),i.d(e,"exactEquals",(function(){return X})),i.d(e,"equals",(function(){return V})),i.d(e,"sub",(function(){return H})),i.d(e,"mul",(function(){return W})),i.d(e,"div",(function(){return q})),i.d(e,"dist",(function(){return U})),i.d(e,"sqrDist",(function(){return K})),i.d(e,"len",(function(){return Z})),i.d(e,"sqrLen",(function(){return $})),i.d(e,"forEach",(function(){return Q}));var n=i(9);function r(){var t=new n.a(3);return n.a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function o(t){var e=new n.a(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(t){var e=t[0],i=t[1],n=t[2];return Math.hypot(e,i,n)}function s(t,e,i){var r=new n.a(3);return r[0]=t,r[1]=e,r[2]=i,r}function l(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function u(t,e,i,n){return t[0]=e,t[1]=i,t[2]=n,t}function c(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 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){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function g(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function y(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 v(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 m(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function x(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*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}function _(t,e){var i=e[0]-t[0],n=e[1]-t[1],r=e[2]-t[2];return Math.hypot(i,n,r)}function O(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 w(t){var e=t[0],i=t[1],n=t[2];return e*e+i*i+n*n}function M(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 S(t,e){var i=e[0],n=e[1],r=e[2],o=i*i+n*n+r*r;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function j(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],o=e[2],a=i[0],s=i[1],l=i[2];return t[0]=r*l-o*s,t[1]=o*a-n*l,t[2]=n*s-r*a,t}function T(t,e,i,n){var r=e[0],o=e[1],a=e[2];return t[0]=r+n*(i[0]-r),t[1]=o+n*(i[1]-o),t[2]=a+n*(i[2]-a),t}function A(t,e,i,n,r,o){var a=o*o,s=a*(2*o-3)+1,l=a*(o-2)+o,u=a*(o-1),c=a*(3-2*o);return t[0]=e[0]*s+i[0]*l+n[0]*u+r[0]*c,t[1]=e[1]*s+i[1]*l+n[1]*u+r[1]*c,t[2]=e[2]*s+i[2]*l+n[2]*u+r[2]*c,t}function E(t,e,i,n,r,o){var a=1-o,s=a*a,l=o*o,u=s*a,c=3*o*s,h=3*l*a,p=l*o;return t[0]=e[0]*u+i[0]*c+n[0]*h+r[0]*p,t[1]=e[1]*u+i[1]*c+n[1]*h+r[1]*p,t[2]=e[2]*u+i[2]*c+n[2]*h+r[2]*p,t}function L(t,e){e=e||1;var i=2*n.c()*Math.PI,r=2*n.c()-1,o=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(i)*o,t[1]=Math.sin(i)*o,t[2]=r*e,t}function I(t,e,i){var n=e[0],r=e[1],o=e[2],a=i[3]*n+i[7]*r+i[11]*o+i[15];return a=a||1,t[0]=(i[0]*n+i[4]*r+i[8]*o+i[12])/a,t[1]=(i[1]*n+i[5]*r+i[9]*o+i[13])/a,t[2]=(i[2]*n+i[6]*r+i[10]*o+i[14])/a,t}function D(t,e,i){var n=e[0],r=e[1],o=e[2];return t[0]=n*i[0]+r*i[3]+o*i[6],t[1]=n*i[1]+r*i[4]+o*i[7],t[2]=n*i[2]+r*i[5]+o*i[8],t}function k(t,e,i){var n=i[0],r=i[1],o=i[2],a=i[3],s=e[0],l=e[1],u=e[2],c=r*u-o*l,h=o*s-n*u,p=n*l-r*s,f=r*p-o*h,d=o*c-n*p,g=n*h-r*c,y=2*a;return c*=y,h*=y,p*=y,f*=2,d*=2,g*=2,t[0]=s+c+f,t[1]=l+h+d,t[2]=u+p+g,t}function B(t,e,i,n){var r=[],o=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],o[0]=r[0],o[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),o[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),t[0]=o[0]+i[0],t[1]=o[1]+i[1],t[2]=o[2]+i[2],t}function F(t,e,i,n){var r=[],o=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],o[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),o[1]=r[1],o[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),t[0]=o[0]+i[0],t[1]=o[1]+i[1],t[2]=o[2]+i[2],t}function R(t,e,i,n){var r=[],o=[];return r[0]=e[0]-i[0],r[1]=e[1]-i[1],r[2]=e[2]-i[2],o[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),o[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),o[2]=r[2],t[0]=o[0]+i[0],t[1]=o[1]+i[1],t[2]=o[2]+i[2],t}function N(t,e){var i=t[0],n=t[1],r=t[2],o=e[0],a=e[1],s=e[2],l=Math.sqrt(i*i+n*n+r*r)*Math.sqrt(o*o+a*a+s*s),u=l&&j(t,e)/l;return Math.acos(Math.min(Math.max(u,-1),1))}function Y(t){return t[0]=0,t[1]=0,t[2]=0,t}function G(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function X(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function V(t,e){var i=t[0],r=t[1],o=t[2],a=e[0],s=e[1],l=e[2];return Math.abs(i-a)<=n.b*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(r-s)<=n.b*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(o-l)<=n.b*Math.max(1,Math.abs(o),Math.abs(l))}var z,H=h,W=p,q=f,U=_,K=O,Z=a,$=w,Q=(z=r(),function(t,e,i,n,r,o){var a,s;for(e||(e=3),i||(i=0),s=n?Math.min(n*e+i,t.length):t.length,a=i;a=0&&s<.5*Math.PI?(n={x:c.minX,y:c.minY},o={x:c.maxX,y:c.maxY}):.5*Math.PI<=s&&s1?e*r+o(e,i)*(r-1):e},e.getLineSpaceing=o,e.getTextWidth=function(t,e){var i=r.getOffScreenContext(),o=0;if(n.isNil(t)||""===t)return o;if(i.save(),i.font=e,n.isString(t)&&t.includes("\n")){var a=t.split("\n");n.each(a,(function(t){var e=i.measureText(t).width;o=0){i=!0;break}}if(!i)return e;var l=[],u=0,c=0,h=0,p=0,f=0,d=e[0];"M"!==d[0]&&"m"!==d[0]||(h=u=+d[1],p=c=+d[2],f++,l[0]=["M",u,c]),a=f;for(var g=e.length;an;n+=2){var o=[{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?o[3]={x:+t[0],y:+t[1]}:r-2===n&&(o[2]={x:+t[0],y:+t[1]},o[3]={x:+t[2],y:+t[3]}):o[0]={x:+t[r-2],y:+t[r-1]}:r-4===n?o[3]=o[2]:n||(o[0]={x:+t[n],y:+t[n+1]}),i.push(["C",(-o[0].x+6*o[1].x+o[2].x)/6,(-o[0].y+6*o[1].y+o[2].y)/6,(o[1].x+6*o[2].x-o[3].x)/6,(o[1].y+6*o[2].y-o[3].y)/6,o[2].x,o[2].y])}return i}i(182);i(0);var a="\t\n\v\f\r   ᠎              \u2028\u2029",s=new RegExp("([a-z])["+a+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+a+"]*,?["+a+"]*)+)","ig"),l=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+a+"]*,?["+a+"]*","ig");function u(t){if(!t)return null;if(r()(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(s,(function(t,n,r){var o=[],a=n.toLowerCase();if(r.replace(l,(function(t,e){e&&o.push(+e)})),"m"===a&&o.length>2&&(i.push([n].concat(o.splice(0,2))),a="l",n="m"===n?"l":"L"),"o"===a&&1===o.length&&i.push([n,o[0]]),"r"===a)i.push([n].concat(o));else for(;o.length>=e[a]&&(i.push([n].concat(o.splice(0,e[a]))),e[a]););return""})),i}i(47),i(48)},function(t,e,i){"use strict";function n(t){return+t}function r(t){return t*t}function o(t){return t*(2-t)}function a(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}i.r(e),i.d(e,"easeLinear",(function(){return n})),i.d(e,"easeQuad",(function(){return a})),i.d(e,"easeQuadIn",(function(){return r})),i.d(e,"easeQuadOut",(function(){return o})),i.d(e,"easeQuadInOut",(function(){return a})),i.d(e,"easeCubic",(function(){return s.b})),i.d(e,"easeCubicIn",(function(){return s.a})),i.d(e,"easeCubicOut",(function(){return s.c})),i.d(e,"easeCubicInOut",(function(){return s.b})),i.d(e,"easePoly",(function(){return c})),i.d(e,"easePolyIn",(function(){return l})),i.d(e,"easePolyOut",(function(){return u})),i.d(e,"easePolyInOut",(function(){return c})),i.d(e,"easeSin",(function(){return g})),i.d(e,"easeSinIn",(function(){return f})),i.d(e,"easeSinOut",(function(){return d})),i.d(e,"easeSinInOut",(function(){return g})),i.d(e,"easeExp",(function(){return x})),i.d(e,"easeExpIn",(function(){return v})),i.d(e,"easeExpOut",(function(){return m})),i.d(e,"easeExpInOut",(function(){return x})),i.d(e,"easeCircle",(function(){return O})),i.d(e,"easeCircleIn",(function(){return b})),i.d(e,"easeCircleOut",(function(){return _})),i.d(e,"easeCircleInOut",(function(){return O})),i.d(e,"easeBounce",(function(){return C})),i.d(e,"easeBounceIn",(function(){return M})),i.d(e,"easeBounceOut",(function(){return C})),i.d(e,"easeBounceInOut",(function(){return S})),i.d(e,"easeBack",(function(){return T})),i.d(e,"easeBackIn",(function(){return j})),i.d(e,"easeBackOut",(function(){return P})),i.d(e,"easeBackInOut",(function(){return T})),i.d(e,"easeElastic",(function(){return L})),i.d(e,"easeElasticIn",(function(){return E})),i.d(e,"easeElasticOut",(function(){return L})),i.d(e,"easeElasticInOut",(function(){return I}));var s=i(51),l=function t(e){function i(t){return Math.pow(t,e)}return e=+e,i.exponent=t,i}(3),u=function t(e){function i(t){return 1-Math.pow(1-t,e)}return e=+e,i.exponent=t,i}(3),c=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),h=Math.PI,p=h/2;function f(t){return 1==+t?1:1-Math.cos(t*p)}function d(t){return Math.sin(t*p)}function g(t){return(1-Math.cos(h*t))/2}function y(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function v(t){return y(1-+t)}function m(t){return 1-y(t)}function x(t){return((t*=2)<=1?y(1-t):2-y(t-1))/2}function b(t){return 1-Math.sqrt(1-t*t)}function _(t){return Math.sqrt(1- --t*t)}function O(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var w=7.5625;function M(t){return 1-C(1-t)}function C(t){return(t=+t)<4/11?w*t*t:t<8/11?w*(t-=6/11)*t+3/4:t<10/11?w*(t-=9/11)*t+15/16:w*(t-=21/22)*t+63/64}function S(t){return((t*=2)<=1?1-C(1-t):C(t-1)+1)/2}var j=function t(e){function i(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,i.overshoot=t,i}(1.70158),P=function t(e){function i(t){return--t*t*((t+1)*e+t)+1}return e=+e,i.overshoot=t,i}(1.70158),T=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),A=2*Math.PI,E=function t(e,i){var n=Math.asin(1/(e=Math.max(1,e)))*(i/=A);function r(t){return e*y(- --t)*Math.sin((n-t)/i)}return r.amplitude=function(e){return t(e,i*A)},r.period=function(i){return t(e,i)},r}(1,.3),L=function t(e,i){var n=Math.asin(1/(e=Math.max(1,e)))*(i/=A);function r(t){return 1-e*y(t=+t)*Math.sin((t+n)/i)}return r.amplitude=function(e){return t(e,i*A)},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/=A);function r(t){return((t=2*t-1)<0?e*y(-t)*Math.sin((n-t)/i):2-e*y(t)*Math.sin((n+t)/i))/2}return r.amplitude=function(e){return t(e,i*A)},r.period=function(i){return t(e,i)},r}(1,.3)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={}.toString;e.default=function(t,e){return n.call(t)==="[object "+e+"]"}},function(t,e,i){"use strict";function n(t,e){for(var i in e)e.hasOwnProperty(i)&&"constructor"!==i&&void 0!==e[i]&&(t[i]=e[i])}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,i,r){return e&&n(t,e),i&&n(t,i),r&&n(t,r),t}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(195);e.default=function(t){var e=n.default(t);return e.charAt(0).toUpperCase()+e.substring(1)}},function(t,e,i){"use strict";i.r(e),i.d(e,"create",(function(){return r})),i.d(e,"clone",(function(){return o})),i.d(e,"fromValues",(function(){return a})),i.d(e,"copy",(function(){return s})),i.d(e,"set",(function(){return l})),i.d(e,"add",(function(){return u})),i.d(e,"subtract",(function(){return c})),i.d(e,"multiply",(function(){return h})),i.d(e,"divide",(function(){return p})),i.d(e,"ceil",(function(){return f})),i.d(e,"floor",(function(){return d})),i.d(e,"min",(function(){return g})),i.d(e,"max",(function(){return y})),i.d(e,"round",(function(){return v})),i.d(e,"scale",(function(){return m})),i.d(e,"scaleAndAdd",(function(){return x})),i.d(e,"distance",(function(){return b})),i.d(e,"squaredDistance",(function(){return _})),i.d(e,"length",(function(){return O})),i.d(e,"squaredLength",(function(){return w})),i.d(e,"negate",(function(){return M})),i.d(e,"inverse",(function(){return C})),i.d(e,"normalize",(function(){return S})),i.d(e,"dot",(function(){return j})),i.d(e,"cross",(function(){return P})),i.d(e,"lerp",(function(){return T})),i.d(e,"random",(function(){return A})),i.d(e,"transformMat2",(function(){return E})),i.d(e,"transformMat2d",(function(){return L})),i.d(e,"transformMat3",(function(){return I})),i.d(e,"transformMat4",(function(){return D})),i.d(e,"rotate",(function(){return k})),i.d(e,"angle",(function(){return B})),i.d(e,"zero",(function(){return F})),i.d(e,"str",(function(){return R})),i.d(e,"exactEquals",(function(){return N})),i.d(e,"equals",(function(){return Y})),i.d(e,"len",(function(){return X})),i.d(e,"sub",(function(){return V})),i.d(e,"mul",(function(){return z})),i.d(e,"div",(function(){return H})),i.d(e,"dist",(function(){return W})),i.d(e,"sqrDist",(function(){return q})),i.d(e,"sqrLen",(function(){return U})),i.d(e,"forEach",(function(){return K}));var n=i(9);function r(){var t=new n.a(2);return n.a!=Float32Array&&(t[0]=0,t[1]=0),t}function o(t){var e=new n.a(2);return e[0]=t[0],e[1]=t[1],e}function a(t,e){var i=new n.a(2);return i[0]=t,i[1]=e,i}function s(t,e){return t[0]=e[0],t[1]=e[1],t}function l(t,e,i){return t[0]=e,t[1]=i,t}function u(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function c(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function h(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){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t}function d(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t}function g(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function y(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}function v(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function m(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function x(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function b(t,e){var i=e[0]-t[0],n=e[1]-t[1];return Math.hypot(i,n)}function _(t,e){var i=e[0]-t[0],n=e[1]-t[1];return i*i+n*n}function O(t){var e=t[0],i=t[1];return Math.hypot(e,i)}function w(t){var e=t[0],i=t[1];return e*e+i*i}function M(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 S(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 j(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 T(t,e,i,n){var r=e[0],o=e[1];return t[0]=r+n*(i[0]-r),t[1]=o+n*(i[1]-o),t}function A(t,e){e=e||1;var i=2*n.c()*Math.PI;return t[0]=Math.cos(i)*e,t[1]=Math.sin(i)*e,t}function E(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 L(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 I(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 D(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 k(t,e,i,n){var r=e[0]-i[0],o=e[1]-i[1],a=Math.sin(n),s=Math.cos(n);return t[0]=r*s-o*a+i[0],t[1]=r*a+o*s+i[1],t}function B(t,e){var i=t[0],n=t[1],r=e[0],o=e[1],a=Math.sqrt(i*i+n*n)*Math.sqrt(r*r+o*o),s=a&&(i*r+n*o)/a;return Math.acos(Math.min(Math.max(s,-1),1))}function F(t){return t[0]=0,t[1]=0,t}function R(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],r=t[1],o=e[0],a=e[1];return Math.abs(i-o)<=n.b*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(r-a)<=n.b*Math.max(1,Math.abs(r),Math.abs(a))}var G,X=O,V=c,z=h,H=p,W=b,q=_,U=w,K=(G=r(),function(t,e,i,n,r,o){var a,s;for(e||(e=2),i||(i=0),s=n?Math.min(n*e+i,t.length):t.length,a=i;at.x?t.x:e,i=it.y?t.y:r,o=o=s[c]?1:0,f=h>Math.PI?1:0,d=i.convertPoint(l),g=o(i,d);if(g>=.5)if(h===2*Math.PI){var y={x:(l.x+s.x)/2,y:(l.y+s.y)/2},v=i.convertPoint(y);u.push(["A",g,g,0,f,p,v.x,v.y]),u.push(["A",g,g,0,f,p,d.x,d.y])}else u.push(["A",g,g,0,f,p,d.x,d.y]);return u}(i,n,t)):l.push(a(r,t));break;case"z":default:l.push(r)}})),function(t){r.each(t,(function(e,i){if("a"===e[0].toLowerCase()){var n=t[i-1],r=t[i+1];r&&"a"===r[0].toLowerCase()?n&&"l"===n[0].toLowerCase()&&(n[0]="M"):n&&"a"===n[0].toLowerCase()&&r&&"l"===r[0].toLowerCase()&&(r[0]="M")}}))}(l),l}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__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||r.get(t,["line","style"]))&&this.parseStyle()},e.prototype.parseSize=function(){var t=this.plot.options.lineSize,e={};r.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]),r.has(t,"color")){var i=t.color;r.isString(i)?e.values=[i]:r.isFunction(i)?e.callback=i:r.isArray(i)&&(t.seriesField?e.values=i:i.length>0&&(e.values=[i[0]]))}this.config.color=e},e.prototype.parseStyle=function(){var t=this.plot.options,e=t.lineStyle||r.get(t,["line","style"]),i={fields:null,callback:null,cfg:null};r.isFunction(e)&&t.seriesField?(i.fields=[t.seriesField],i.callback=e):i.cfg=e,this.config.style=i},e}(n.__importDefault(i(56)).default);e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(8),a=n.__importStar(i(20)),s=i(38),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.getDefaultOptions=function(){var t=this.layer.theme.label,e=void 0===t?{}:t;return n.__assign({offsetX:0,offsetY:0},e)},e.prototype.getLabelOffset=function(){return this.getLabelOffsetByDimAndFactor("y",-1)},e.prototype.getLabelItemAttrs=function(t,e){var i=this,a=this.options,s=a.style,l=a.formatter,u=r.get(t,"model.mappingData",[]);return r.map(u,(function(r,a){var u,c=i.getValue(r);return n.__assign(n.__assign(n.__assign({},i.getPosition(r)),{text:l?l(c,(u={},u[o._ORIGIN]=r._origin,u.mappingDatum=r,u.mappingDatumIndex=a,u.element=t,u.elementIndex=e,u),e):c,textAlign:"center",textBaseline:"middle"}),s)}))},e.prototype.getValue=function(t){return r.get(t._origin,this.layer.options.yField)},e.prototype.getPosition=function(t){return{x:r.isArray(t.x)?r.last(t.x):t.x,y:r.isArray(t.y)?r.last(t.y):t.y}},e.prototype.layoutLabels=function(t,e){var i=this;if(this.options.adjustPosition){var n=this.isOverlapped(e);if(n){var o=this.getGlobalTolerance(e);r.each(e,(function(t,n){n>1&&i.labelResamplingByChange(t,e,n,o)}))}(n=this.isOverlapped(e))&&r.each(e,(function(t,n){t.get("visible")&&i.clearOverlapping(t,e,n)}))}},e.prototype.adjustLabel=function(){},e.prototype.labelResamplingByChange=function(t,e,i,n){var r=this.findPrevious(i,e),o=this.getCenter(t),a=this.getCenter(r),s=a.x-o.x,l=a.y-o.y;Math.sqrt(s*s+l*l)0&&(n.push(t),n.sort((function(t,e){return e.minY-t.minY})),r.each(n,(function(t,e){e>0&&t.set("visible",!1)})))},e.prototype.isOverlapped=function(t){for(var e=0;e0;i--)if(e[i].get("visible"))return e[i]},e.prototype.getCenter=function(t){var e=t.getBBox(),i=e.minX,n=e.maxX,r=e.minY;return{x:i+(n-i)/2,y:r+(e.maxY-r)/2}},e}(a.default);e.default=l,a.registerLabelComponent("point",l)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_BAR_THEME=void 0;var n=i(11);e.DEFAULT_BAR_THEME={label:{darkStyle:{fill:"#2c3542",stroke:"#ffffff",fillOpacity:.85},lightStyle:{fill:"#ffffff",stroke:"#ffffff",fillOpacity:1}},columnStyle:{normal:{},active:function(t){return{opacity:.5*(t.opacity||1)}},disable:function(t){return{opacity:.5*(t.opacity||1)}},selected:{lineWidth:1,stroke:"black"}}},n.registerTheme("bar",e.DEFAULT_BAR_THEME)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(8),a=n.__importStar(i(20)),s=i(28),l=n.__importDefault(i(13)),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.getLabelItemAttrs=function(t,e){var i,a=this.options,s=a.style,l=a.formatter,u=[].concat(t.getModel().mappingData),c=this.getValue(t);return r.deepMix({},s,n.__assign(n.__assign({},this.getPosition(t)),{text:l?l(c,(i={},i[o._ORIGIN]=u[0]._origin,i.mappingDatum=u[0],i.mappingDatumIndex=0,i.element=t,i.elementIndex=e,i),e):c,fill:this.getTextFill(t),stroke:this.getTextStroke(t),textAlign:this.getTextAlign(t),textBaseline:this.getTextBaseline()}))},e.prototype.adjustLabel=function(t,e){var i=this.options,n=i.adjustPosition,r=i.style;if(n){var o=this.getDefaultOffset(),a=t.getBBox(),s=this.getElementShapeBBox(e);if(s.width<=a.width){var l=s.maxX+this.options.offsetX+o;t.attr("x",l),t.attr("fill",r.fill)}}},e.prototype.getDefaultOptions=function(){var t=this.layer.theme.label,e=void 0===t?{}:t;return n.__assign({offsetX:0,offsetY:0,adjustPosition:!0},e)},e.prototype.getValue=function(t){return r.get(t.getData(),this.layer.options.xField)},e.prototype.getPosition=function(t){var e,i=this.getDefaultOffset(),n=this.getValue(t),r=this.getElementShapeBBox(t),o=r.minX,a=r.maxX,s=r.minY,l=r.height,u=r.width,c=this.options,h=c.offsetX,p=c.offsetY,f=c.position,d=n<0?-1:1;if("left"===f)e=(n>0?o:a)+i*d+h;else if("right"===f){e=(n>0?a:o)+i*d+h}else e=o+u/2+h;return{x:e,y:s+l/2+p}},e.prototype.getTextFill=function(t){var e=t.shape;if(this.options.adjustColor&&"right"!==this.options.position){var i=e.attr("fill"),n=e.attr("opacity")?e.attr("opacity"):1,r=s.rgb2arr(i),o=Math.round(.299*r[0]+.587*r[1]+.114*r[2])/n;return s.mappingColor([{from:0,to:85,color:"white"},{from:85,to:170,color:"#F6F6F6"},{from:170,to:255,color:"black"}],o)}return this.options.style.fill},e.prototype.getTextStroke=function(t){var e=this.getTextFill(t),i=this.options,n=i.position,r=i.adjustColor;return"right"!==n&&r&&"black"!==e?null:void 0},e.prototype.getTextAlign=function(t){var e=this.getValue(t),i=this.options.position;return e<0?{right:"right",left:"right",middle:"center"}[i]:{right:"left",left:"left",middle:"center"}[i]},e.prototype.getTextBaseline=function(){return"middle"},e.prototype.getElementShapeBBox=function(t){var e=this,i=t.shape,n=[];r.each(i.get("origin").points,(function(t){n.push(e.coord.convertPoint(t))}));var o=n.map((function(t){return t.x})),a=Math.min.apply(Math,o),s=Math.max.apply(Math,o),u=n.map((function(t){return t.y})),c=Math.min.apply(Math,u),h=Math.max.apply(Math,u);return new l.default(a,c,s-a,h-c)},e.prototype.getLabelOffset=function(){return{x:0,y:0}},e}(a.default);e.default=u,a.registerLabelComponent("bar",u)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(6),a=n.__importDefault(i(68));i(320),i(321),i(322);var s=i(25),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stackedBar",e.baseType="bar",e}return n.__extends(e,t),e.getDefaultOptions=function(){return r.deepMix({},t.getDefaultOptions.call(this),{xAxis:{visible:!0,autoRotateTitle:!1,grid:{visible:!0},line:{visible:!1},tickLine:{visible:!0},label:{visible:!0,autoRotate:!0,autoHide:!0},title:{visible:!0,spacing:12}},yAxis:{visible:!0,autoRotateTitle:!0,grid:{visible:!1},line:{visible:!1},tickLine:{visible:!1},label:{visible:!0,autoRotate:!0,autoHide:!0},title:{visible:!1,spacing:12}},legend:{visible:!0,position:"top-left",offsetY:0}})},e.prototype.getColorScale=function(){var t=this.options.stackField;return this.view.getScaleByField(t)},e.prototype.adjustBar=function(t){t.adjust=[{type:"stack"}]},e.prototype.renderLabel=function(){var t=this.config.scales,e=this.options,i=e.label,r=t[e.xField];if(null==i?void 0:i.visible){var o=s.getGeometryByType(this.view,"interval");this.doRenderLabel(o,n.__assign({type:"stacked-bar",formatter:r.formatter&&function(t){return r.formatter(t)}},this.options.label))}},e.prototype.geometryTooltip=function(){this.bar.tooltip={};var t=this.options.tooltip;t.fields&&(this.bar.tooltip.fields=t.fields),t.formatter&&(this.bar.tooltip.callback=t.formatter,t.fields||(this.bar.tooltip.fields=[this.options.xField,this.options.yField,this.options.stackField]))},e}(a.default);e.default=l,o.registerPlotType("stackedBar",l)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformDataPercentage=void 0;var n=i(1),r=i(0);e.transformDataPercentage=function(t,e,i){var o=r.groupBy(t,e);o=r.mapValues(o,(function(t){return r.map(t,(function(t){return r.map(i,(function(e){return t[e]}))}))})),o=r.mapValues(o,r.flatten),o=r.mapValues(o,(function(t){return r.map(t,(function(t){var e=Number.parseFloat(t);return!r.isNumber(e)||isNaN(e)?0:e}))}));var a=r.mapValues(o,(function(t){return r.reduce(t,(function(t,e){return t+e}),0)})),s=r.map(t,(function(t){var o=n.__assign(n.__assign({},t),{_origin:t,total:a[t[e]]});return r.each(i,(function(i){o[i]=t[i]/(a[t[e]]||1)})),o}));return r.each(r.groupBy(s,e),(function(t){var e=0;r.each(t,(function(n,o){r.each(i,(function(r,a){(e+n[r]>=1||o===t.length-1&&a===i.length-1&&e>0)&&(n[r]=1-e),e+=n[r]}))}))})),s}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(6),a=n.__importDefault(i(15)),s=i(17);i(165),i(166);var l=i(27),u=n.__importDefault(i(331)),c=n.__importStar(i(333));i(167);var h=i(25),p={area:"area",line:"line",point:"point"},f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e}return n.__extends(e,t),e.getDefaultOptions=function(){return r.deepMix({},t.getDefaultOptions.call(this),{smooth:!1,areaStyle:{opacity:.25},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},tooltip:{visible:!0,shared:!0,showCrosshairs:!0,crosshairs:{type:"x"},offset:20}})},e.prototype.beforeInit=function(){t.prototype.beforeInit.call(this),this.options.responsive&&"auto"!==this.options.padding&&this.applyResponsive("preRender")},e.prototype.afterRender=function(){this.renderLabel(),this.options.responsive&&"auto"!==this.options.padding&&this.applyResponsive("afterRender"),t.prototype.afterRender.call(this)},e.prototype.geometryParser=function(t,e){return p[e]},e.prototype.scale=function(){var e=this.options,i={};i[e.xField]={type:"cat"},r.has(e,"xAxis")&&l.extractScale(i[e.xField],e.xAxis),i[e.yField]={},r.has(e,"yAxis")&&l.extractScale(i[e.yField],e.yAxis),this.setConfig("scales",i),t.prototype.scale.call(this)},e.prototype.coord=function(){return null},e.prototype.addGeometry=function(){var t=this.options,e=s.getGeom("area","main",{plot:this});this.area=e,t.label&&this.label(),t.tooltip&&(t.tooltip.fields||t.tooltip.formatter)&&this.geometryTooltip(),this.adjustArea(e),this.setConfig("geometry",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=r.deepMix({},t.line);if(e.visible){var i=s.getGeom("line","guide",{type:"line",plot:this,line:e});this.adjustLine(i),this.setConfig("geometry",i),this.line=i}},e.prototype.addPoint=function(){var t=this.options;if(r.deepMix({},t.point).visible){var e=s.getGeom("point","guide",{plot:this});this.adjustPoint(e),this.setConfig("geometry",e),this.point=e}},e.prototype.renderLabel=function(){var t=this.config.scales,e=this.options,i=e.label,r=t[e.yField];if(i.visible){var o=h.getGeometryByType(this.view,"area");this.doRenderLabel(o,n.__assign({type:"area-point",formatter:r.formatter&&function(t){return r.formatter(t)}},this.options.label))}},e.prototype.animation=function(){t.prototype.animation.call(this),!1===this.options.animation&&(this.area.animate=!1,this.line&&(this.line.animate=!1),this.point&&(this.point.animate=!1))},e.prototype.label=function(){},e.prototype.geometryTooltip=function(){this.area.tooltip={};var t=this.options.tooltip;t.fields&&(this.area.tooltip.fields=t.fields),t.formatter&&(this.area.tooltip.callback=t.formatter,t.fields||(this.area.tooltip.fields=[this.options.xField,this.options.yField],this.options.seriesField&&this.area.tooltip.fields.push(this.options.seriesField)))},e.prototype.parseEvents=function(){t.prototype.parseEvents.call(this,c)},e.prototype.applyResponsive=function(t){var e=this,i=u.default[t];r.each(i,(function(t){t.method(e)}))},e}(a.default);e.default=f,o.registerPlotType("area",f)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(6),a=n.__importDefault(i(97)),s=i(335);i(338),i(339),i(340);var l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.plotComponents=[],e.type="stackedArea",e.baseType="area",e}return n.__extends(e,t),e.getDefaultOptions=function(){return r.deepMix({},t.getDefaultOptions.call(this),{label:{visible:!1,type:"area"}})},e.prototype.beforeInit=function(){var e=r.get(this.options,["label","visible"]),i=r.get(this.options,["label","type"]),n=this.options;e&&("line"===i&&(n.lineLabel=this.options.label),"area"===i&&(n.areaLabel=this.options.label)),t.prototype.beforeInit.call(this)},e.prototype.getColorScale=function(){var t=this.options.stackField;return this.view.getScaleByField(t)},e.prototype.label=function(){var t=this.options.label;if(t&&!1===t.visible)return this.line&&(this.line.label=!1),this.point&&(this.point.label=!1),void(this.area.label=!1)},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.afterRender=function(){this.renderPlotComponents(),this.options.responsive=!1,t.prototype.afterRender.call(this)},e.prototype.geometryTooltip=function(){this.area.tooltip={};var t=this.options.tooltip;t.fields&&(this.area.tooltip.fields=t.fields),t.formatter&&(this.area.tooltip.callback=t.formatter,t.fields||(this.area.tooltip.fields=[this.options.xField,this.options.yField,this.options.stackField]))},e.prototype.renderPlotComponents=function(){var t=this;r.each(["areaLabel","lineLabel"],(function(e){var i=n.__assign({view:t.view,plot:t},t.options[e]),r=s.getPlotComponents(t,e,i);r&&(r.render(),t.plotComponents.push(r))}))},e}(a.default);e.default=l,o.registerPlotType("stackedArea",l)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_COLUMN_THEME=void 0;var n=i(11);e.DEFAULT_COLUMN_THEME={label:{darkStyle:{fill:"#2c3542",stroke:"#ffffff",fillOpacity:.85},lightStyle:{fill:"#ffffff",stroke:"#ffffff",fillOpacity:1}},columnStyle:{normal:{},active:function(t){return{opacity:.5*(t.opacity||1)}},disable:function(t){var e=t.opacity||1;return{opacity:.5*e,fillOpacity:.5*e}},selected:{lineWidth:1,stroke:"black"}}},n.registerTheme("column",e.DEFAULT_COLUMN_THEME)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(6),a=n.__importDefault(i(45));i(348);var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.baseType="column",e.type="groupedColumn",e}return n.__extends(e,t),e.getDefaultOptions=function(){return r.deepMix({},t.getDefaultOptions.call(this),{yAxis:{title:{visible:!0}}})},e.prototype.getResponsiveTheme=function(){return this.themeController.getResponsiveTheme("column")},e.prototype.getColorScale=function(){var t=this.options.groupField;if(t)return this.view.getScaleByField(t)},e.prototype.addGeometry=function(){t.prototype.addGeometry.call(this)},e.prototype.adjustColumn=function(t){t.adjust=[{type:"dodge",marginRatio:.1}]},e.prototype.geometryTooltip=function(){this.column.tooltip={};var t=this.options.tooltip;t.fields&&(this.column.tooltip.fields=t.fields),t.formatter&&(this.column.tooltip.callback=t.formatter,t.fields||(this.column.tooltip.fields=[this.options.xField,this.options.yField,this.options.groupField]))},e}(a.default);e.default=s,o.registerPlotType("groupedColumn",s)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.percentageField=void 0;var n=i(1),r=i(0),o=n.__importStar(i(359)),a=n.__importDefault(i(15)),s=i(17),l=i(360),u=n.__importDefault(i(364)),c=i(6);i(365),e.percentageField="$$percentage$$";var h={pie:"interval"},p={pie:"column"},f=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e}return n.__extends(i,t),i.getDefaultOptions=function(){return r.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,adjustPosition:!0,allowOverlap:!1,line:{visible:!0,smooth:!0}},legend:{visible:!0,position:"right-center"},tooltip:{visible:!0,shared:!1,showCrosshairs:!1,showMarkers:!1},pieStyle:{stroke:"white",lineWidth:1}})},i.prototype.afterInit=function(){t.prototype.afterInit.call(this);var e=this.options,i=e.angleField,n=e.colorField,o=e.data;r.every(o,(function(t){return 0===t[i]}))&&this.view.geometries[0].tooltip(n+"*"+i)},i.prototype.afterRender=function(){t.prototype.afterRender.call(this);var i=this.options;if(i.label&&i.label.visible){this.labelComponent&&this.labelComponent.clear();var o=i.label;if("spider"===o.type){var a=i.data,s=i.colorField,c=i.angleField,h=r.every(a,(function(t){return 0===t[c]})),p=h?e.percentageField:c;this.labelComponent=new u.default(n.__assign({view:this.view,fields:s?[p,s]:[p],angleField:c,allZero:h},this.options.label)),this.labelComponent.render()}else{var f=l.getPieLabel(o.type);this.labelComponent=new f(this,i.label),this.labelComponent.render()}}},i.prototype.getAngleScale=function(){var t=this.options.angleField;if(t)return this.view.getScaleByField(t)},i.prototype.geometryParser=function(t,e){return"g2"===t?h[e]:p[e]},i.prototype.scale=function(){var e=this.options;t.prototype.scale.call(this);var i={};i[e.angleField]={},i[e.colorField]={type:"cat"},i=r.deepMix({},this.config.scales,i),this.setConfig("scales",i)},i.prototype.processData=function(t){var i=this.options.angleField;return r.every(t,(function(t){return 0===t[i]}))?t.map((function(r){var o;return n.__assign(n.__assign({},r),((o={})[i]="string"==typeof r[i]?Number.parseFloat(r[i]):r[i],o[e.percentageField]=1/t.length,o))})):t.map((function(t){var e,r=t[i];return n.__assign(n.__assign({},t),((e={})[i]=r&&!isNaN(r)?+r:r,e))}))},i.prototype.axis=function(){},i.prototype.coord=function(){var t=this.options,e={type:"theta",cfg:{radius:t.radius,innerRadius:t.innerRadius||0}};this.setConfig("coordinate",e)},i.prototype.addGeometry=function(){var t,i=this.options,n=i.data,o=i.angleField;(t=r.every(n,(function(t){return 0===t[o]}))?s.getGeom("interval","main",{plot:this,positionFields:[1,e.percentageField]}):s.getGeom("interval","main",{plot:this,positionFields:[1,i.angleField]})).adjust=[{type:"stack"}],this.pie=t,i.label&&this.label(),i.tooltip&&(i.tooltip.fields||i.tooltip.formatter)&&this.geometryTooltip(),this.setConfig("geometry",t)},i.prototype.geometryTooltip=function(){this.pie.tooltip={};var t=this.options.tooltip;t.fields?this.pie.tooltip.fields=t.fields:this.pie.tooltip.fields=[this.options.angleField,this.options.colorField],t.formatter&&(this.pie.tooltip.callback=t.formatter,t.fields||(this.pie.tooltip.fields=[this.options.angleField,this.options.colorField]))},i.prototype.animation=function(){t.prototype.animation.call(this),!1===this.options.animation&&(this.pie.animate=!1)},i.prototype.annotation=function(){},i.prototype.parseEvents=function(e){e?t.prototype.parseEvents.call(this,e):t.prototype.parseEvents.call(this,o)},i.prototype.label=function(){this.pie.label=!1},i}(a.default);e.default=f,c.registerPlotType("pie",f)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLabelRotate=e.getAngleByPoint=e.near=e.inPanel=e.getOverlapInfo=e.getOverlapArea=e.getCenter=e.getEndPoint=void 0,e.getEndPoint=function(t,e,i){return{x:t.x+i*Math.cos(e),y:t.y+i*Math.sin(e)}},e.getCenter=function(t){return{x:t.x+t.width/2,y:t.y+t.height/2}},e.getOverlapArea=function(t,e,i){return void 0===i&&(i=0),Math.max(0,Math.min(t.x+t.width+i,e.x+e.width+i)-Math.max(t.x-i,e.x-i))*Math.max(0,Math.min(t.y+t.height+i,e.y+e.height+i)-Math.max(t.y-i,e.y-i))},e.getOverlapInfo=function(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.xe.x+e.width&&t.ye.y+e.height},e.near=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)e||i<-e)&&(i+=Math.PI),i}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(6),a=n.__importDefault(i(15)),s=i(26),l=i(17),u=n.__importStar(i(384)),c={rose:"interval"},h={rose:"column"},p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rose",e}return n.__extends(e,t),e.getDefaultOptions=function(){return r.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:"right"},tooltip:{visible:!0,shared:!1,showCrosshairs:!1,showMarkers:!1},columnStyle:{stroke:"white",lineWidth:1},xAxis:{visible:!1,line:{visible:!1},tickLine:{visible:!1},grid:{visible:!0,alignTick:!1,style:{lineWidth:.5}},label:{offset:5,autoRotate:!0}},yAxis:{visible:!1}})},e.prototype.getOptions=function(e){var i=t.prototype.getOptions.call(this,e),n=e.sectorStyle,o=e.categoryField,a=e.radiusField;return r.deepMix({},i,{columnStyle:n,xField:o,yField:a})},e.prototype.getRadiusScale=function(){var t=this.options.radiusField;t&&this.view.getScaleByField(t)},e.prototype.getAngleScale=function(){var t=this.options.categoryField;t&&this.view.getScaleByField(t)},e.prototype.geometryParser=function(t,e){return"g2"===t?c[e]:h[e]},e.prototype.scale=function(){var t=this.options,e={};e[t.radiusField]={},e[t.categoryField]={type:"cat"},this.setConfig("scales",e)},e.prototype.coord=function(){var t=this.options,e={type:"polar",cfg:{radius:t.radius,innerRadius:t.innerRadius||0}};this.setConfig("coordinate",e)},e.prototype.addGeometry=function(){var t=this.options,e=l.getGeom("interval","main",{plot:this,positionFields:[t.categoryField,t.radiusField],widthRatio:{rose:1}});e.label=this.extractLabel(),e.adjust=this.adjustRoseAdjust(),this.rose=e,t.tooltip&&(t.tooltip.fields||t.tooltip.formatter)&&this.geometryTooltip(),this.setConfig("geometry",e)},e.prototype.adjustRoseAdjust=function(){},e.prototype.geometryTooltip=function(){this.rose.tooltip={};var t=this.options.tooltip;t.fields&&(this.rose.tooltip.fields=t.fields),t.formatter&&(this.rose.tooltip.callback=t.formatter,t.fields||(this.rose.tooltip.fields=[this.options.radiusField,this.options.categoryField,this.options.colorField]))},e.prototype.animation=function(){t.prototype.animation.call(this),!1===this.options.animation&&(this.rose.animate=!1)},e.prototype.annotation=function(){},e.prototype.parseEvents=function(){t.prototype.parseEvents.call(this,u)},e.prototype.extractLabel=function(){var t=this.options;if(!t.label||!t.label.visible)return!1;var e=r.deepMix({},t.label);this.adjustLabelOptions(e);var i=[t.categoryField,t.radiusField];return s.getComponent("label",n.__assign({plot:this,labelType:"polar",fields:i},e))},e.prototype.adjustLabelOptions=function(t){var e=this.options.radiusField;if(t){var i=t.offset,n=t.type,r=t.content;"inner"===n?t.offset=i<0?i:-10:"outer"===n&&(t.offset=i>=0?i:10),r||(t.content=function(t,i){return""+i._origin[e]})}},e}(a.default);e.default=p,o.registerPlotType("rose",p)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getStyle=void 0;var n=i(2),r=i(0);e.getStyle=function(t,e,i,o){void 0===o&&(o="");var a=t.style,s=void 0===a?{}:a,l=t.defaultStyle,u=t.color,c=t.size,h=n.__assign(n.__assign({},l),s);return u&&(e&&(s.stroke||(h.stroke=u)),i&&(s.fill||(h.fill=u))),o&&r.isNil(s[o])&&!r.isNil(c)&&(h[o]=c),h}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INDEX_FIELD=e.IS_TOTAL=e.VALUE_FIELD=void 0;var n=i(1),r=i(0),o=i(6);i(416);var a=n.__importDefault(i(15)),s=i(27),l=i(26),u=n.__importStar(i(417));i(418);var c=n.__importDefault(i(419)),h=i(25),p={waterfall:"interval"},f={interval:"waterfall"};e.VALUE_FIELD="$$value$$",e.IS_TOTAL="$$total$$",e.INDEX_FIELD="$$index$$";var d=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="watarfall",e}return n.__extends(i,t),i.getDefaultOptions=function(){return r.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,showCrosshairs:!1,showMarkers:!1}})},i.prototype.getOptions=function(e){var i=t.prototype.getOptions.call(this,e);return this.adjustLegendOptions(i),this.adjustMeta(i),i},i.prototype.afterInit=function(){t.prototype.afterInit.call(this);var i=this.options;i.diffLabel&&i.diffLabel.visible?this.diffLabel=new c.default({view:this.view,fields:[i.xField,i.yField,e.VALUE_FIELD],formatter:i.diffLabel.formatter,style:i.diffLabel.style}):this.diffLabel&&(this.diffLabel.clear(),this.diffLabel=null)},i.prototype.afterRender=function(){t.prototype.afterRender.call(this);var i=this.options;this.view.on("tooltip:change",(function(t){for(var n=t.items,o=0;o0){var u=o[i-1][e.VALUE_FIELD];l=r.isArray(u)?[u[1],t[s]+u[1]]:[u,t[s]+u]}o.push(n.__assign(n.__assign({},t),((a={})[e.VALUE_FIELD]=l,a[e.INDEX_FIELD]=i,a)))})),this.options.showTotal&&this.options.showTotal.visible){var l=r.map(t,(function(t){return t[s]})),u=r.reduce(l,(function(t,e){return t+e}),0);o.push(((i={})[a]=this.options.showTotal.label,i[s]=null,i[e.VALUE_FIELD]=[u,0],i[e.INDEX_FIELD]=o.length,i[e.IS_TOTAL]=!0,i))}return o},i.prototype.scale=function(){var t=this.options,i={};i[t.xField]={type:"cat"},r.has(t,"xAxis")&&s.extractScale(i[t.xField],t.xAxis),i[e.VALUE_FIELD]={},r.has(t,"yAxis")&&s.extractScale(i[e.VALUE_FIELD],t.yAxis),this.setConfig("scales",i)},i.prototype.axis=function(){var t=l.getComponent("axis",{plot:this,dim:"x"}),i=l.getComponent("axis",{plot:this,dim:"y"}),n={};n[this.options.xField]=t,n[e.VALUE_FIELD]=i,this.setConfig("axes",n)},i.prototype.coord=function(){},i.prototype.parseEvents=function(){t.prototype.parseEvents.call(this,u)},i.prototype.geometryTooltip=function(){this.waterfall.tooltip={};var t=this.options.tooltip;t.fields&&(this.waterfall.tooltip.fields=t.fields),t.formatter&&(this.waterfall.tooltip.callback=t.formatter,t.fields||(this.waterfall.tooltip.fields=[this.options.xField,e.VALUE_FIELD]))},i.prototype._parseStyle=function(){var t=this.options.waterfallStyle,e=this.options.leaderLine,i={};return r.isFunction(t)?i.callback=function(){for(var i=[],n=0;n=0?a:s):(r.isArray(n)?n[1]-n[0]:n)>=0?a:s}}return o},i.prototype.adjustLegendOptions=function(t){var e=t.legend;e&&(e.visible=!1)},i.prototype.adjustMeta=function(t){var i=t.meta;if(i){var n=i?i[t.yField]:{};n.alias=n.alias||t.yField,t.meta[e.VALUE_FIELD]=n}},i}(a.default);e.default=d,o.registerPlotType("waterfall",d)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.advanceBy=e.getDay=e.getWeek=e.isLastDayOfMonth=e.isLastWeekOfMonth=e.getYearRange=e.getDateRange=e.DAY_MS=void 0;var n=i(1),r=i(0),o=n.__importDefault(i(36)),a=i(71);function s(t,e){return t.setMilliseconds(t.getMilliseconds()+e),t}e.DAY_MS=864e5,e.getDateRange=function(t){var e=n.__spreadArrays(t).sort((function(t,e){return t.getTime()-e.getTime()}));return[o.default.format(r.head(e),a.FORMATTER),o.default.format(r.last(e),a.FORMATTER)]},e.getYearRange=function(t){var e=t||new Date;return[o.default.format(new Date(e.getFullYear(),0,1),a.FORMATTER),o.default.format(new Date(e.getFullYear(),11,30),a.FORMATTER)]},e.isLastWeekOfMonth=function(t){return t.getMonth()!==s(new Date(t),7*e.DAY_MS).getMonth()},e.isLastDayOfMonth=function(t){return t.getMonth()!==s(new Date(t),e.DAY_MS).getMonth()},e.getWeek=function(t){var i=new Date(t.getFullYear(),0,1);return Math.ceil(((t.getTime()-i.getTime())/e.DAY_MS+i.getDay()+1)/7)},e.getDay=function(t){return t.getDay()},e.advanceBy=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(6),a=n.__importDefault(i(15)),s=i(27),l=i(177),u=n.__importStar(i(441)),c=function(t){function e(e){var i=t.call(this,e)||this;return i.type="gauge",i}return n.__extends(e,t),e.getDefaultOptions=function(){return r.deepMix({},t.getDefaultOptions.call(this),{startAngle:-7/6,endAngle:1/6,rangeBackgroundStyle:{fill:"#f0f0f0"},rangeSize:24,statistic:{position:["50%","80%"]},axis:{visible:!0,offset:-10,tickCount:21,subTickCount:4,tickLine:{visible:!0,length:5,style:{stroke:"#aaa",lineWidth:2}},label:{visible:!0,offset:8,style:{fill:"#aaa",fontSize:16,textAlign:"center",textBaseline:"middle"}}},pivot:{visible:!0,thickness:6,pin:{visible:!0,size:2,style:{fill:"#2E364B"}},base:{visible:!0,style:{fill:"#EEEEEE"}},pointer:{visible:!0,style:{fill:"#CFCFCF"}}}})},e.prototype.init=function(){var e=this.options,i=e.value,n=(e.range||[]).map((function(t){return+t})).sort((function(t,e){return t-e})),r=this.options,o=r.min,a=void 0===o?n[0]:o,s=r.max,l=void 0===s?n[n.length-1]:s,u=r.format,c=void 0===u?function(t){return""+t}:u,h=c(i);this.options.data=[{value:i||0}],this.options.valueText=h,this.options.min=a,this.options.max=l,this.options.format=c,this.initG2Shape(),t.prototype.init.call(this)},e.prototype.initG2Shape=function(){this.gaugeShape=new l.GaugeShape(r.uniqueId()),this.gaugeShape.setOption(this.type,r.deepMix({},this.options,{radius:.6,angle:240,textPosition:"100%"})),this.gaugeShape.render()},e.prototype.geometryParser=function(){return"gauge"},e.prototype.scale=function(){var e=this.options,i=e.min,n=e.max,r=e.format,o={value:{}};s.extractScale(o.value,{min:i,max:n,minLimit:i,maxLimit:n,nice:!0,formatter:r,tickInterval:20}),this.setConfig("scales",o),t.prototype.scale.call(this)},e.prototype.coord=function(){var t={type:"polar",cfg:{radius:1,startAngle:this.options.startAngle*Math.PI,endAngle:this.options.endAngle*Math.PI}};this.setConfig("coordinate",t)},e.prototype.axis=function(){var t,e=this.options.axis,i={value:{line:null,grid:null,tickLine:null}};t=e.offset<0?e.offset-this.options.rangeSize-e.tickLine.length-e.label.offset:e.offset+e.tickLine.length+e.label.offset,e.label.visible?i.value.label={offset:t,textStyle:e.label.style,autoRotate:!0}:i.value.label={style:{opacity:0}},i[1]=!1,i.value=!!e.visible&&i.value,this.setConfig("axes",i)},e.prototype.addGeometry=function(){var t={type:"point",position:{fields:["value","1"]},shape:{values:["gauge"]},color:{values:[this.options.pivot.pointer.style.fill||this.theme.defaultColor]}};this.setConfig("geometry",t)},e.prototype.annotation=function(){var t=this.options.statistic,e=[];if(t&&t.visible){var i=this.renderStatistic();e.push(i)}this.setConfig("annotations",e)},e.prototype.renderStatistic=function(){var t=Math.max(this.options.width,this.options.height)/20,e=this.options.statistic;return{type:"text",content:e.text,top:!0,position:e.position,style:{fill:e.color,fontSize:e.size?e.size:1.2*t,textAlign:"center",textBaseline:"middle"}}},e.prototype.parseEvents=function(){t.prototype.parseEvents.call(this,u)},e}(a.default);e.default=c,o.registerPlotType("gauge",c)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(16),o=i(6),a=n.__importDefault(i(179)),s=n.__importDefault(i(66)),l=n.__importDefault(i(45)),u=i(0),c=i(11),h={color:"#f5bc32",lineSize:4,connectNull:!0,point:{visible:!1,size:3,shape:"circle",style:{stroke:"#fff"}},label:{visible:!1}},p={color:"#5B8FF9"},f={visible:!0,colorMapping:!0,grid:{visible:!0},line:{visible:!1},tickLine:{visible:!1},label:{visible:!0,autoHide:!0,autoRotate:!1},title:{autoRotate:!0,visible:!1,spacing:12}},d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="columnLine",e.legends=[],e}return n.__extends(e,t),e.getDefaultOptions=function(){return u.deepMix({},t.getDefaultOptions.call(this),{yAxis:{leftConfig:f,rightConfig:f},lineConfig:h,columnConfig:p,legend:{visible:!0}})},e.prototype.beforeInit=function(){var t,e,i=this.options,n=this.initialOptions;if(i.lineSeriesField&&(i.yAxis.rightConfig.colorMapping=!1,(null===(t=n.lineConfig)||void 0===t?void 0:t.lineSize)||(i.lineConfig.lineSize=3),!(null===(e=n.lineConfig)||void 0===e?void 0:e.color))){var r=c.getGlobalTheme(),o=r.colors,a=r.colors_20,s=this.getValueBySeriesField(),l=s.length>o.length?a:o,h=[];u.each(s,(function(t,e){h.push(l[e+1])})),i.lineConfig.color=h}},e.prototype.init=function(){if(t.prototype.init.call(this),this.checkData()){var e=this.options,i=e.data,r=e.meta,o=e.xField,a=e.yField,l=e.lineSeriesField,c=e.legend,h=e.lineConfig,p=e.columnConfig,f=e.events,d=e.customMeta;this.colors=[p.color,h.color],this.drawColumn();var g={};g[a[1]]={ticks:this.getTicks()},this.createLayer(s.default,i[1],n.__assign({xField:o,yField:a[1],seriesField:l,meta:d?r:u.deepMix({},r,g),xAxis:{visible:!1},yAxis:u.deepMix({},{position:"right",grid:{visible:!1},nice:!0},this.yAxis(1)),tooltip:{visible:!1},legend:{visible:!1},events:f},h)).render(),c.visible&&this.customLegend(),this.adjustLayout()}},e.prototype.drawColumn=function(){var t=this,e=this.options,i=e.data,r=e.xField,o=e.yField,a=e.xAxis,s=e.tooltip,c=e.columnConfig,h=e.meta,p=e.events;this.createLayer(l.default,i[0],n.__assign({xField:r,yField:o[0],meta:h,xAxis:a,yAxis:u.deepMix({},{grid:{visible:!0},nice:!0},this.yAxis(0)),tooltip:u.deepMix({},{showMarkers:!1,custom:{onChange:function(e,i){t.tooltip(e,i)}}},s),events:p},c)).render()},e.prototype.tooltip=function(t,e){var i=this,r=this.options,o=r.xField,a=r.yField,s=r.tooltip,l=u.clone(e.items[0]),c=this.getDataByXField(e.title,1),h=u.get(s,"formatter");if(c&&u.each(c,(function(t,r){var s=i.geomLayers[1].options.seriesField,p=s?t[s]:a[1],f=h?h(t[o],t[a[1]],t[s]):{name:p,value:t[a[1]]};e.items.push(n.__assign(n.__assign(n.__assign(n.__assign({},l),{mappingData:u.deepMix({},l.mappingData,{_origin:c}),data:t}),f),{color:u.isArray(i.colors[1])?i.colors[1][r]:i.colors[1]}))})),this.options.legend.visible){var p=this.getUnCheckedValue(),f=this.legends[0].get("items").length+this.legends[1].get("items").length;if(p.length===f)return void(t.style.display="none");t.style.display="block";var d=[],g=[];u.each(e.items,(function(t){var e=t.name;u.contains(d,e)||u.contains(p,e)||(d.push(e),g.push(t))})),u.each(e.items,(function(t,i){i1){var a=t[0],s=t[i-1];e.push({from:{x:s[0],y:s[1]},to:{x:a[0],y:a[1]}})}return e}function s(t){var e=t.map((function(t){return t[0]})),i=t.map((function(t){return t[1]}));return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,i),maxY:Math.max.apply(null,i)}}e.default=function(t,e){if(t.length<2||e.length<2)return!1;var i,l,u=s(t),c=s(e);if(i=u,(l=c).minX>i.maxX||l.maxXi.maxY||l.maxY=0?[o]:[]}function l(t,e,i,n){return 2*(1-n)*(e-t)+2*n*(i-e)}function u(t,e,i,r,o,s,l){var u=a(t,i,o,l),c=a(e,r,s,l),h=n.default.pointAt(t,e,i,r,l),p=n.default.pointAt(i,r,o,s,l);return[[t,e,h.x,h.y,u,c],[u,c,p.x,p.y,o,s]]}e.default={box:function(t,e,i,n,o,l){var u=s(t,i,o)[0],c=s(e,n,l)[0],h=[t,o],p=[e,l];return void 0!==u&&h.push(a(t,i,o,u)),void 0!==c&&p.push(a(e,n,l,c)),r.getBBoxByArray(h,p)},length:function(t,e,i,n,o,a){return function t(e,i,n,o,a,s,l){if(0===l)return(r.distance(e,i,n,o)+r.distance(n,o,a,s)+r.distance(e,i,a,s))/2;var c=u(e,i,n,o,a,s,.5),h=c[0],p=c[1];return h.push(l-1),p.push(l-1),t.apply(null,h)+t.apply(null,p)}(t,e,i,n,o,a,3)},nearestPoint:function(t,e,i,n,r,s,l,u){return o.nearestPoint([t,i,r],[e,n,s],l,u,a)},pointDistance:function(t,e,i,n,o,a,s,l){var u=this.nearestPoint(t,e,i,n,o,a,s,l);return r.distance(u.x,u.y,s,l)},interpolationAt:a,pointAt:function(t,e,i,n,r,o,s){return{x:a(t,i,r,s),y:a(e,n,o,s)}},divide:function(t,e,i,n,r,o,a){return u(t,e,i,n,r,o,a)},tangentAngle:function(t,e,i,n,o,a,s){var u=l(t,i,o,s),c=l(e,n,a,s),h=Math.atan2(c,u);return r.piMod(h)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(124),r=i(124),o=i(213);function a(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}e.default=function(t){for(var e=[],i=null,s=null,l=null,u=0,c=(t=o.default(t)).length,h=0;he)i.insertBefore(t,r);else if(o0&&(e?"stroke"in i?this._setColor(t,"stroke",o):"strokeStyle"in i&&this._setColor(t,"stroke",a):this._setColor(t,"stroke",o||a),u&&h.setAttribute(l.strokeOpacity,u),c&&h.setAttribute(l.lineWidth,c))},e.prototype._setColor=function(t,e,i){var n=this.get("el");if(i)if(i=i.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(i))(r=t.find("gradient",i))||(r=t.addGradient(i)),n.setAttribute(l[e],"url(#"+r+")");else if(/^[p,P]{1}[\s]*\(/.test(i)){var r;(r=t.find("pattern",i))||(r=t.addPattern(i)),n.setAttribute(l[e],"url(#"+r+")")}else n.setAttribute(l[e],i);else n.setAttribute(l[e],"none")},e.prototype.shadow=function(t,e){var i=this.attr(),n=e||i,r=n.shadowOffsetX,o=n.shadowOffsetY,a=n.shadowBlur,s=n.shadowColor;(r||o||a||s)&&function(t,e){var i=t.cfg.el,n=t.attr(),r={dx:n.shadowOffsetX,dy:n.shadowOffsetY,blur:n.shadowBlur,color:n.shadowColor};if(r.dx||r.dy||r.blur||r.color){var o=e.find("filter",r);o||(o=e.addShadow(r)),i.setAttribute("filter","url(#"+o+")")}else i.removeAttribute("filter")}(this,t)},e.prototype.transform=function(t){var e=this.attr();(t||e).matrix&&p(this)},e.prototype.isInShape=function(t,e){return this.isPointInPath(t,e)},e.prototype.isPointInPath=function(t,e){var i=this.get("el"),n=this.get("canvas").get("el").getBoundingClientRect(),r=t+n.left,o=e+n.top,a=document.elementFromPoint(r,o);return!(!a||!a.isEqualNode(i))},e.prototype.getHitLineWidth=function(){var t=this.attrs,e=t.lineWidth,i=t.lineAppendWidth;return this.isStroke()?e+i:0},e}(o.AbstractShape),x=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="circle",e.canFill=!0,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,r:0})},e.prototype.createPath=function(t,e){var i=this.attr(),n=this.get("el");Object(a.each)(e||i,(function(t,e){"x"===e||"y"===e?n.setAttribute("c"+e,t):l[e]&&n.setAttribute(l[e],t)}))},e}(m),b=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dom",e.canFill=!1,e.canStroke=!1,e}return Object(r.__extends)(e,t),e.prototype.createPath=function(t,e){var i=this.attr(),n=this.get("el");Object(a.each)(e||i,(function(t,e){l[e]&&n.setAttribute(l[e],t)})),n.innerHTML=i.html},e}(m),_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ellipse",e.canFill=!0,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,rx:0,ry:0})},e.prototype.createPath=function(t,e){var i=this.attr(),n=this.get("el");Object(a.each)(e||i,(function(t,e){"x"===e||"y"===e?n.setAttribute("c"+e,t):l[e]&&n.setAttribute(l[e],t)}))},e}(m),O=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="image",e.canFill=!1,e.canStroke=!1,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,width:0,height:0})},e.prototype.createPath=function(t,e){var i=this,n=this.attr(),r=this.get("el");Object(a.each)(e||n,(function(t,e){"img"===e?i._setImage(n.img):l[e]&&r.setAttribute(l[e],t)}))},e.prototype.setAttr=function(t,e){this.attrs[t]=e,"img"===t&&this._setImage(e)},e.prototype._setImage=function(t){var e=this.attr(),i=this.get("el");if(Object(a.isString)(t))i.setAttribute("href",t);else if(t instanceof window.Image)e.width||(i.setAttribute("width",t.width),this.attr("width",t.width)),e.height||(i.setAttribute("height",t.height),this.attr("height",t.height)),i.setAttribute("href",t.src);else if(t instanceof HTMLElement&&Object(a.isString)(t.nodeName)&&"CANVAS"===t.nodeName.toUpperCase())i.setAttribute("href",t.toDataURL());else if(t instanceof ImageData){var n=document.createElement("canvas");n.setAttribute("width",""+t.width),n.setAttribute("height",""+t.height),n.getContext("2d").putImageData(t,0,0),e.width||(i.setAttribute("width",""+t.width),this.attr("width",t.width)),e.height||(i.setAttribute("height",""+t.height),this.attr("height",t.height)),i.setAttribute("href",n.toDataURL())}},e}(m),w=i(18),M=i.n(w),C=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.canFill=!1,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x1:0,y1:0,x2:0,y2:0,startArrow:!1,endArrow:!1})},e.prototype.createPath=function(t,e){var i=this.attr(),n=this.get("el");Object(a.each)(e||i,(function(e,r){if("startArrow"===r||"endArrow"===r)if(e){var o=Object(a.isObject)(e)?t.addArrow(i,l[r]):t.getDefaultArrow(i,l[r]);n.setAttribute(l[r],"url(#"+o+")")}else n.removeAttribute(l[r]);else l[r]&&n.setAttribute(l[r],e)}))},e.prototype.getTotalLength=function(){var t=this.attr(),e=t.x1,i=t.y1,n=t.x2,r=t.y2;return M.a.length(e,i,n,r)},e.prototype.getPoint=function(t){var e=this.attr(),i=e.x1,n=e.y1,r=e.x2,o=e.y2;return M.a.pointAt(i,n,r,o,t)},e}(m),S={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"]]}},j={get:function(t){return S[t]},register:function(t,e){S[t]=e},remove:function(t){delete S[t]},getAll:function(){return S}},P=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 Object(r.__extends)(e,t),e.prototype.createPath=function(t){this.get("el").setAttribute("d",this._assembleMarker())},e.prototype._assembleMarker=function(){var t=this._getPath();return Object(a.isArray)(t)?t.map((function(t){return t.join(" ")})).join(""):t},e.prototype._getPath=function(){var t,e=this.attr(),i=e.x,n=e.y,r=e.r||e.radius,o=e.symbol||"circle";return(t=Object(a.isFunction)(o)?o:j.get(o))?t(i,n,r):(console.warn(t+" symbol is not exist."),null)},e.symbolsFactory=j,e}(m),T=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="path",e.canFill=!0,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{startArrow:!1,endArrow:!1})},e.prototype.createPath=function(t,e){var i=this,n=this.attr(),r=this.get("el");Object(a.each)(e||n,(function(e,o){if("path"===o&&Object(a.isArray)(e))r.setAttribute("d",i._formatPath(e));else if("startArrow"===o||"endArrow"===o)if(e){var s=Object(a.isObject)(e)?t.addArrow(n,l[o]):t.getDefaultArrow(n,l[o]);r.setAttribute(l[o],"url(#"+s+")")}else r.removeAttribute(l[o]);else l[o]&&r.setAttribute(l[o],e)}))},e.prototype._formatPath=function(t){var e=t.map((function(t){return t.join(" ")})).join("");return~e.indexOf("NaN")?"":e},e.prototype.getTotalLength=function(){var t=this.get("el");return t?t.getTotalLength():null},e.prototype.getPoint=function(t){var e=this.get("el"),i=this.getTotalLength(),n=e?e.getPointAtLength(t*i):null;return n?{x:n.x,y:n.y}:null},e}(m),A=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polygon",e.canFill=!0,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.createPath=function(t,e){var i=this.attr(),n=this.get("el");Object(a.each)(e||i,(function(t,e){"points"===e&&Object(a.isArray)(t)&&t.length>=2?n.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):l[e]&&n.setAttribute(l[e],t)}))},e}(m),E=i(77),L=i.n(E),I=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="polyline",e.canFill=!0,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{startArrow:!1,endArrow:!1})},e.prototype.onAttrChange=function(e,i,n){t.prototype.onAttrChange.call(this,e,i,n),-1!==["points"].indexOf(e)&&this._resetCache()},e.prototype._resetCache=function(){this.set("totalLength",null),this.set("tCache",null)},e.prototype.createPath=function(t,e){var i=this.attr(),n=this.get("el");Object(a.each)(e||i,(function(t,e){"points"===e&&Object(a.isArray)(t)&&t.length>=2?n.setAttribute("points",t.map((function(t){return t[0]+","+t[1]})).join(" ")):l[e]&&n.setAttribute(l[e],t)}))},e.prototype.getTotalLength=function(){var t=this.attr().points,e=this.get("totalLength");return Object(a.isNil)(e)?(this.set("totalLength",L.a.length(t)),this.get("totalLength")):e},e.prototype.getPoint=function(t){var e,i,n=this.attr().points,r=this.get("tCache");return r||(this._setTcache(),r=this.get("tCache")),Object(a.each)(r,(function(n,r){t>=n[0]&&t<=n[1]&&(e=(t-n[0])/(n[1]-n[0]),i=r)})),M.a.pointAt(n[i][0],n[i][1],n[i+1][0],n[i+1][1],e)},e.prototype._setTcache=function(){var t=this.attr().points;if(t&&0!==t.length){var e=this.getTotalLength();if(!(e<=0)){var i,n,r=0,o=[];Object(a.each)(t,(function(a,s){t[s+1]&&((i=[])[0]=r/e,n=M.a.length(a[0],a[1],t[s+1][0],t[s+1][1]),r+=n,i[1]=r/e,o.push(i))})),this.set("tCache",o)}}},e.prototype.getStartTangent=function(){var t=this.attr().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.attr().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}(m);var D=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rect",e.canFill=!0,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,width:0,height:0,radius:0})},e.prototype.createPath=function(t,e){var i=this,n=this.attr(),r=this.get("el"),o=!1,s=["x","y","width","height","radius"];Object(a.each)(e||n,(function(t,e){-1===s.indexOf(e)||o?-1===s.indexOf(e)&&l[e]&&r.setAttribute(l[e],t):(r.setAttribute("d",i._assembleRect(n)),o=!0)}))},e.prototype._assembleRect=function(t){var e=t.x,i=t.y,n=t.width,r=t.height,o=t.radius;if(!o)return"M "+e+","+i+" l "+n+",0 l 0,"+r+" l"+-n+" 0 z";var s=function(t){var e=0,i=0,n=0,r=0;return Object(a.isArray)(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}}(o);return Object(a.isArray)(o)?1===o.length?s.r1=s.r2=s.r3=s.r4=o[0]:2===o.length?(s.r1=s.r3=o[0],s.r2=s.r4=o[1]):3===o.length?(s.r1=o[0],s.r2=s.r4=o[1],s.r3=o[2]):(s.r1=o[0],s.r2=o[1],s.r3=o[2],s.r4=o[3]):s.r1=s.r2=s.r3=s.r4=o,[["M "+(e+s.r1)+","+i],["l "+(n-s.r1-s.r2)+",0"],["a "+s.r2+","+s.r2+",0,0,1,"+s.r2+","+s.r2],["l 0,"+(r-s.r2-s.r3)],["a "+s.r3+","+s.r3+",0,0,1,"+-s.r3+","+s.r3],["l "+(s.r3+s.r4-n)+",0"],["a "+s.r4+","+s.r4+",0,0,1,"+-s.r4+","+-s.r4],["l 0,"+(s.r4+s.r1-r)],["a "+s.r1+","+s.r1+",0,0,1,"+s.r1+","+-s.r1],["z"]].join(" ")},e}(m),k=i(183),B={top:"before-edge",middle:"central",bottom:"after-edge",alphabetic:"baseline",hanging:"hanging"},F={top:"text-before-edge",middle:"central",bottom:"text-after-edge",alphabetic:"alphabetic",hanging:"hanging"},R={left:"left",start:"left",center:"middle",right:"end",end:"end"},N=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="text",e.canFill=!0,e.canStroke=!0,e}return Object(r.__extends)(e,t),e.prototype.getDefaultAttrs=function(){var e=t.prototype.getDefaultAttrs.call(this);return Object(r.__assign)(Object(r.__assign)({},e),{x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"})},e.prototype.createPath=function(t,e){var i=this,n=this.attr(),r=this.get("el");this._setFont(),Object(a.each)(e||n,(function(t,e){"text"===e?i._setText(""+t):"matrix"===e&&t?p(i):l[e]&&r.setAttribute(l[e],t)})),r.setAttribute("paint-order","stroke"),r.setAttribute("style","stroke-linecap:butt; stroke-linejoin:miter;")},e.prototype._setFont=function(){var t=this.get("el"),e=this.attr(),i=e.textBaseline,n=e.textAlign,r=Object(k.detect)();r&&"firefox"===r.name?t.setAttribute("dominant-baseline",F[i]||"alphabetic"):t.setAttribute("alignment-baseline",B[i]||"baseline"),t.setAttribute("text-anchor",R[n]||"left")},e.prototype._setText=function(t){var e=this.get("el"),i=this.attr(),n=i.x,r=i.textBaseline,o=void 0===r?"bottom":r;if(t)if(~t.indexOf("\n")){var s=t.split("\n"),l=s.length-1,u="";Object(a.each)(s,(function(t,e){0===e?"alphabetic"===o?u+=''+t+"":"top"===o?u+=''+t+"":"middle"===o?u+=''+t+"":"bottom"===o?u+=''+t+"":"hanging"===o&&(u+=''+t+""):u+=''+t+""})),e.innerHTML=u}else e.innerHTML=t;else e.innerHTML=""},e}(m),Y=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,G=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,X=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function V(t){var e=t.match(X);if(!e)return"";var i="";return e.sort((function(t,e){return t=t.split(":"),e=e.split(":"),Number(t[0])-Number(e[0])})),Object(a.each)(e,(function(t){t=t.split(":"),i+=''})),i}var z=function(){function t(t){this.cfg={};var e=null,i=Object(a.uniqueId)("gradient_");return"l"===t.toLowerCase()[0]?function(t,e){var i,n,r=Y.exec(t),o=Object(a.mod)(Object(a.toRadian)(parseFloat(r[1])),2*Math.PI),s=r[2];o>=0&&o<.5*Math.PI?(i={x:0,y:0},n={x:1,y:1}):.5*Math.PI<=o&&o';e.innerHTML=i},t}(),U=function(){function t(t,e){this.cfg={};var i=u("marker"),n=Object(a.uniqueId)("marker_");i.setAttribute("id",n);var r=u("path");r.setAttribute("stroke",t.stroke||"none"),r.setAttribute("fill",t.fill||"none"),i.appendChild(r),i.setAttribute("overflow","visible"),i.setAttribute("orient","auto-start-reverse"),this.el=i,this.child=r,this.id=n;var o=t["marker-start"===e?"startArrow":"endArrow"];return this.stroke=t.stroke||"#000",!0===o?this._setDefaultPath(e,r):(this.cfg=o,this._setMarker(t.lineWidth,r)),this}return t.prototype.match=function(){return!1},t.prototype._setDefaultPath=function(t,e){var i=this.el;e.setAttribute("d","M0,0 L"+10*Math.cos(Math.PI/6)+",5 L0,10"),i.setAttribute("refX",""+10*Math.cos(Math.PI/6)),i.setAttribute("refY","5")},t.prototype._setMarker=function(t,e){var i=this.el,n=this.cfg.path,r=this.cfg.d;Object(a.isArray)(n)&&(n=n.map((function(t){return t.join(" ")})).join("")),e.setAttribute("d",n),i.appendChild(e),r&&i.setAttribute("refX",""+r/t)},t.prototype.update=function(t){var e=this.child;e.attr?e.attr("fill",t):e.setAttribute("fill",t)},t}(),K=function(){function t(t){this.type="clip",this.cfg={};var e=u("clipPath");this.el=e,this.id=Object(a.uniqueId)("clip_"),e.id=this.id;var i=t.cfg.el;return e.appendChild(i),this.cfg=t,this}return t.prototype.match=function(){return!1},t.prototype.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}(),Z=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,$=function(){function t(t){this.cfg={};var e=u("pattern");e.setAttribute("patternUnits","userSpaceOnUse");var i=u("image");e.appendChild(i);var n=Object(a.uniqueId)("pattern_");e.id=n,this.el=e,this.id=n,this.cfg=t;var r=Z.exec(t)[2];i.setAttribute("href",r);var o=new Image;function s(){e.setAttribute("width",""+o.width),e.setAttribute("height",""+o.height)}return r.match(/^data:/i)||(o.crossOrigin="Anonymous"),o.src=r,o.complete?s():(o.onload=s,o.src=o.src),this}return t.prototype.match=function(t,e){return this.cfg===e},t}(),Q=function(){function t(t){var e=u("defs"),i=Object(a.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;r1)for(var i=1;i200&&(c=a/10);for(var h=1/c,p=h/10,f=0;f<=c;f++){var d=f*h,g=[o.apply(null,t.concat([d])),o.apply(null,e.concat([d]))];(x=n.distance(u[0],u[1],g[0],g[1]))=0&&x1&&(i*=Math.sqrt(m),o*=Math.sqrt(m));var x=i*i*(v*v)+o*o*(y*y),b=x?Math.sqrt((i*i*(o*o)-x)/x):1;c===h&&(b*=-1),isNaN(b)&&(b=0);var _=o?b*i*v/o:0,O=i?b*-o*y/i:0,w=(p+d)/2+Math.cos(u)*_-Math.sin(u)*O,M=(f+g)/2+Math.sin(u)*_+Math.cos(u)*O,C=[(y-_)/i,(v-O)/o],S=[(-1*y-_)/i,(-1*v-O)/o],j=s([1,0],C),P=s(C,S);return a(C,S)<=-1&&(P=Math.PI),a(C,S)>=1&&(P=0),0===h&&P>0&&(P-=2*Math.PI),1===h&&P<0&&(P+=2*Math.PI),{cx:w,cy:M,rx:l(t,[d,g])?0:i,ry:l(t,[d,g])?0:o,startAngle:j,endAngle:j+P,xRotation:u,arcFlag:c,sweepFlag:h}}},function(t,e,i){"use strict";i.r(e);var n=i(126);for(var r in n)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(r)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,i){"use strict";i.r(e);var n=i(128);for(var r in n)["default"].indexOf(r)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(r)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Slider=e.HtmlTooltip=e.ContinuousLegend=e.CategoryLegend=e.CircleGrid=e.LineGrid=e.CircleAxis=e.LineAxis=e.Annotation=e.Crosshair=e.Component=e.GroupComponent=e.HtmlComponent=void 0;var n=i(10);Object.defineProperty(e,"Event",{enumerable:!0,get:function(){return n.Event}}),Object.defineProperty(e,"AbstractGroup",{enumerable:!0,get:function(){return n.AbstractGroup}}),Object.defineProperty(e,"AbstractShape",{enumerable:!0,get:function(){return n.AbstractShape}});var r=i(52);Object.defineProperty(e,"registerAdjust",{enumerable:!0,get:function(){return r.registerAdjust}}),Object.defineProperty(e,"getAdjust",{enumerable:!0,get:function(){return r.getAdjust}}),Object.defineProperty(e,"Adjust",{enumerable:!0,get:function(){return r.Adjust}});var o=i(61);Object.defineProperty(e,"getAttribute",{enumerable:!0,get:function(){return o.getAttribute}}),Object.defineProperty(e,"Attribute",{enumerable:!0,get:function(){return o.Attribute}});var a=i(59);Object.defineProperty(e,"Color",{enumerable:!0,get:function(){return a.Color}});var s=i(46);Object.defineProperty(e,"getCoordinate",{enumerable:!0,get:function(){return s.getCoordinate}}),Object.defineProperty(e,"registerCoordinate",{enumerable:!0,get:function(){return s.registerCoordinate}}),Object.defineProperty(e,"Coordinate",{enumerable:!0,get:function(){return s.Coordinate}});var l=i(21);Object.defineProperty(e,"getScale",{enumerable:!0,get:function(){return l.getScale}}),Object.defineProperty(e,"registerScale",{enumerable:!0,get:function(){return l.registerScale}}),Object.defineProperty(e,"Scale",{enumerable:!0,get:function(){return l.Scale}});var u=i(16);Object.defineProperty(e,"Annotation",{enumerable:!0,get:function(){return u.Annotation}}),Object.defineProperty(e,"Component",{enumerable:!0,get:function(){return u.Component}}),Object.defineProperty(e,"Crosshair",{enumerable:!0,get:function(){return u.Crosshair}}),Object.defineProperty(e,"GroupComponent",{enumerable:!0,get:function(){return u.GroupComponent}}),Object.defineProperty(e,"HtmlComponent",{enumerable:!0,get:function(){return u.HtmlComponent}}),Object.defineProperty(e,"Slider",{enumerable:!0,get:function(){return u.Slider}});var c=u.Axis.Line,h=u.Axis.Circle;e.LineAxis=c,e.CircleAxis=h;var p=u.Grid.Line,f=u.Grid.Circle;e.LineGrid=p,e.CircleGrid=f;var d=u.Legend.Category,g=u.Legend.Continuous;e.CategoryLegend=d,e.ContinuousLegend=g;var y=u.Tooltip.Html;e.HtmlTooltip=y},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCoordinateClipCfg=e.getAngleByPoint=e.isPointInCoordinate=e.getDistanceToCenter=e.isFullCircle=e.getXDimensionLength=void 0;var n=i(87),r=i(222);e.getXDimensionLength=function(t){if(t.isPolar&&!t.isTransposed)return(t.endAngle-t.startAngle)*t.getRadius();var e=t.convert({x:0,y:0}),i=t.convert({x:1,y:0});return Math.sqrt(Math.pow(i.x-e.x,2)+Math.pow(i.y-e.y,2))},e.isFullCircle=function(t){if(t.isPolar){var e=t.startAngle;return t.endAngle-e==2*Math.PI}return!1},e.getDistanceToCenter=function(t,e){var i=t.getCenter();return Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2))},e.isPointInCoordinate=function(t,e){var i=!1;if(t)if("theta"===t.type){var n=t.start,o=t.end;i=r.isBetween(e.x,n.x,o.x)&&r.isBetween(e.y,n.y,o.y)}else{var a=t.invert(e);i=r.isBetween(a.x,0,1)&&r.isBetween(a.y,0,1)}return i},e.getAngleByPoint=function(t,e){var i=t.getCenter();return Math.atan2(e.y-i.y,e.x-i.x)},e.getCoordinateClipCfg=function(t,e){void 0===e&&(e=0);var i,r=t.start,o=t.end,a=t.getWidth(),s=t.getHeight();if(t.isPolar){var l=t.startAngle,u=t.endAngle,c=t.getCenter(),h=t.getRadius();return{type:"path",startState:{path:n.getSectorPath(c.x,c.y,h+e,l,l)},endState:function(t){var i=(u-l)*t+l;return{path:n.getSectorPath(c.x,c.y,h+e,l,i)}},attrs:{path:n.getSectorPath(c.x,c.y,h+e,l,u)}}}return i=t.isTransposed?{height:s+2*e}:{width:a+2*e},{type:"rect",startState:{x:r.x-e,y:o.y-e,width:t.isTransposed?a+2*e:0,height:t.isTransposed?0:s+2*e},endState:i,attrs:{x:r.x-e,y:o.y-e,width:a+2*e,height:s+2*e}}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerSymbols=void 0,e.MarkerSymbols={hexagon:function(t,e,i){var n=i/2*Math.sqrt(3);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]]}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getScaleByField=e.isInRecords=e.getSiblingPoint=e.getSilbings=e.isInBox=e.getSpline=e.distance=e.getComponents=e.getElementsByPath=e.getIntersectElements=e.intersectRect=e.getElementValue=e.getElementsByState=e.getElementsByField=e.getElements=e.getSiblingMaskElements=e.getMaskedElements=e.isMask=e.isSlider=e.isList=e.isElementChange=e.getDelegationObject=e.getCurrentElement=void 0;var n=i(2),r=i(0),o=i(230),a=i(134),s=n.__importDefault(i(110));function l(t,e){var i=t.event.target.getCanvasBBox();return i.width>=e||i.height>=e?i:null}function u(t){var e=t.geometries,i=[];return r.each(e,(function(t){var e=t.elements;i=i.concat(e)})),t.views&&t.views.length&&r.each(t.views,(function(t){i=i.concat(u(t))})),i}function c(t,e){var i=t.getModel().data;return r.isArray(i)?i[0][e]:i[e]}function h(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY=e||n.height>=e?i.attr("path"):null}(t,e);if(!i)return;return d(t.view,i)}var n=l(t,e);return n?p(t.view,n):null},e.getSiblingMaskElements=function(t,e,i){var n=l(t,i);if(!n)return null;var r=t.view,o=g(r,e,{x:n.x,y:n.y}),a=g(r,e,{x:n.maxX,y:n.maxY});return p(e,{minX:o.x,minY:o.y,maxX:a.x,maxY:a.y})},e.getElements=u,e.getElementsByField=function(t,e,i){return u(t).filter((function(t){return c(t,e)===i}))},e.getElementsByState=function(t,e){var i=t.geometries,n=[];return r.each(i,(function(t){var i=t.getElementsBy((function(t){return t.hasState(e)}));n=n.concat(i)})),n},e.getElementValue=c,e.intersectRect=h,e.getIntersectElements=p,e.getElementsByPath=d,e.getComponents=function(t){return t.getComponents().map((function(t){return t.component}))},e.distance=function(t,e){var i=e.x-t.x,n=e.y-t.y;return Math.sqrt(i*i+n*n)},e.getSpline=function(t,e){if(t.length<=2)return o.getLinePath(t,!1);var i=t[0],n=[];r.each(t,(function(t){n.push(t.x),n.push(t.y)}));var a=o.catmullRom2bezier(n,e,null);return a.unshift(["M",i.x,i.y]),a},e.isInBox=function(t,e){return t.x<=e.x&&t.maxX>=e.x&&t.y<=e.y&&t.maxY>e.y},e.getSilbings=function(t){var e=t.parent,i=null;return e&&(i=e.views.filter((function(e){return e!==t}))),i},e.getSiblingPoint=g,e.isInRecords=function(t,e,i,n){var o=!1;return r.each(t,(function(t){if(t[i]===e[i]&&t[n]===e[n])return o=!0,!1})),o},e.getScaleByField=function t(e,i){var n=e.getScaleByField(i);return!n&&e.views&&r.each(e.views,(function(e){if(n=t(e,i))return!1})),n}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toPoints=e.getRegionBBox=e.BBox=void 0;var n=i(0),r=i(43),o=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.x=t,this.y=e,this.height=n,this.width=i}return t.fromRange=function(e,i,n,r){return new t(e,i,n-e,r-i)},Object.defineProperty(t.prototype,"minX",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tl",{get:function(){return{x:this.x,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tr",{get:function(){return{x:this.maxX,y:this.y}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bl",{get:function(){return{x:this.x,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"br",{get:function(){return{x:this.maxX,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return{x:this.x+this.width/2,y:this.minY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return{x:this.maxX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return{x:this.x+this.width/2,y:this.maxY}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return{x:this.minX,y:this.y+this.height/2}},enumerable:!1,configurable:!0}),t.prototype.isEqual=function(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.add=function(){for(var t=[],e=0;e=0;i--)t.removeChild(e[i])},e.hasClass=function(t,e){return!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))},e.regionToBBox=function(t){var e=t.start,i=t.end,n=Math.min(e.x,i.x),r=Math.min(e.y,i.y),o=Math.max(e.x,i.x),a=Math.max(e.y,i.y);return{x:n,y:r,minX:n,minY:r,maxX:o,maxY:a,width:o-n,height:a-r}},e.pointsToBBox=function(t){var e=t.map((function(t){return t.x})),i=t.map((function(t){return t.y})),n=Math.min.apply(Math,e),r=Math.min.apply(Math,i),o=Math.max.apply(Math,e),a=Math.max.apply(Math,i);return{x:n,y:r,minX:n,minY:r,maxX:o,maxY:a,width:o-n,height:a-r}},e.createBBox=r,e.getValueByPercent=o,e.getCirclePoint=function(t,e,i){return{x:t.x+Math.cos(i)*e,y:t.y+Math.sin(i)*e}},e.distance=a,e.wait=function(t){return new Promise((function(e){setTimeout(e,t)}))},e.near=function(t,e){return[t,e].includes(1/0)?Math.abs(t)===Math.abs(e):Math.abs(t-e)0?n.each(p,(function(e){if(e.get("visible")){if(e.isGroup()&&0===e.get("children").length)return!0;var i=t(e),n=e.applyToMatrix([i.minX,i.minY,1]),r=e.applyToMatrix([i.minX,i.maxY,1]),o=e.applyToMatrix([i.maxX,i.minY,1]),a=e.applyToMatrix([i.maxX,i.maxY,1]),s=Math.min(n[0],r[0],o[0],a[0]),p=Math.max(n[0],r[0],o[0],a[0]),f=Math.min(n[1],r[1],o[1],a[1]),d=Math.max(n[1],r[1],o[1],a[1]);su&&(u=p),fh&&(h=d)}})):(l=0,u=0,c=0,h=0),i=r(l,c,u-l,h-c)}else i=e.getBBox();return a?s(i,a):i},e.updateClip=function(t,e){if(t.getClip()||e.getClip()){var i=e.getClip();if(i){var n={type:i.get("type"),attrs:i.attr()};t.setClip(n)}else t.setClip(null)}},e.toPx=function(t){return t+"px"},e.getTextPoint=function(t,e,i,n){var r=n/a(t,e),s=0;return"start"===i?s=0-r:"end"===i&&(s=1+r),{x:o(t.x,e.x,s),y:o(t.y,e.y,s)}}},function(t,e,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0});var r=i(238),o=i(33);e.default=((n={})[""+o.CONTAINER_CLASS]={position:"absolute",visibility:"visible",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:r.default.fontFamily,lineHeight:"20px",padding:"10px 10px 6px 10px"},n[""+o.TITLE_CLASS]={marginBottom:"4px"},n[""+o.LIST_CLASS]={margin:"0px",listStyleType:"none",padding:"0px"},n[""+o.LIST_ITEM_CLASS]={listStyleType:"none",marginBottom:"4px"},n[""+o.MARKER_CLASS]={width:"8px",height:"8px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},n[""+o.VALUE_CLASS]={display:"inline-block",float:"right",marginLeft:"30px"},n[""+o.CROSSHAIR_X]={position:"absolute",width:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},n[""+o.CROSSHAIR_Y]={position:"absolute",height:"1px",backgroundColor:"rgba(0, 0, 0, 0.25)"},n)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(38),a=n.__importDefault(i(13)),s=function(){function t(t){this.position="top",this.destroyed=!1,r.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 a.default.fromBBoxObject(e);var i=this.plot.theme.description.padding;return r.isArray(i)&&r.each(i,(function(e,n){"function"==typeof i[n]&&(i[n]=i[n](t.plot.options.legend.position))})),new a.default(e.maxX,e.minY,e.width,e.height)}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(),e=this.getPosition(),i=e.x,n=e.y;this.shape=this.container.addShape("text",{attrs:r.mix({x:i,y:n,text:t},this.style,{textAlign:this.getTextAlign()})}),this.shape.name=this.name},t.prototype.getPosition=function(){return"left"===this.alignTo?{x:this.leftMargin,y:this.topMargin}:"middle"===this.alignTo?{x:this.leftMargin+this.wrapperWidth/2,y:this.topMargin}:{x:this.rightMargin,y:this.topMargin}},t.prototype.getTextAlign=function(){return"left"===this.alignTo?"left":"middle"===this.alignTo?"center":"right"},t.prototype.textWrapper=function(){var t=this.wrapperWidth,e=this.style,i=this.text,r=this.container.addShape("text",{attrs:n.__assign({text:"",x:0,y:0},e)}),a=i.split("\n").map((function(e){for(var i="",n=e.split(""),a=[],s=0;st){if(0===s)break;a.push(s),i=""}}return o.breakText(n,a)}));return r.remove(),a.join("\n")},t}();e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSuffixFormatter=e.getPrecisionFormatter=e.getNoopFormatter=e.combineFormatter=void 0;var n=i(0);e.combineFormatter=function(){for(var t=[],e=0;eu&&l>u);)if(c.push(s),u-=l,!(o=o.substr(16)))return c.join("");for(;s=o.substr(0,1),!((l=e.measureTextWidth(s,n))+a>u);)if(c.push(s),u-=l,!(o=o.substr(1)))return c.join("");return c.join("")+"..."}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getGlobalTheme=e.registerGlobalTheme=void 0;var n=i(0),r=i(144),o=i(256),a={default:r.DEFAULT_GLOBAL_THEME,dark:o.DEFAULT_DARK_THEME};function s(t){void 0===t&&(t="default");var e=a[t.toLowerCase()];return e||(console.warn("error in theme: Can't find the theme named %s. Please register theme first.",t),r.DEFAULT_GLOBAL_THEME)}e.registerGlobalTheme=function(t,e){var i=s();a[t.toLowerCase()]=n.deepMix({},i,e)},e.getGlobalTheme=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_GLOBAL_THEME=e.BOTTOM_BLEEDING=e.TOP_BLEEDING=e.DESCRIPTION_BOTTOM_MARGIN=e.COLOR_PLATE_20=e.COLOR_PLATE_10=void 0;e.COLOR_PLATE_10=["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E8684A","#6DC8EC","#9270CA","#FF9D4D","#269A99","#FF99C3"],e.COLOR_PLATE_20=["#5B8FF9","#BDD2FD","#5AD8A6","#BDEFDB","#5D7092","#C2C8D5","#F6BD16","#FBE5A2","#E8684A","#F6C3B7","#6DC8EC","#B6E3F5","#9270CA","#D3C6EA","#FF9D4D","#FFD8B8","#269A99","#AAD8D8","#FF99C3","#FFD6E7"];var n=i(0);e.DESCRIPTION_BOTTOM_MARGIN=function(t){return t&&"top"===t.split("-")[0]?12:24},e.TOP_BLEEDING=function(t){var e=t.title&&t.title.visible,i=t.description&&t.description.visible;return e||i?12:24},e.BOTTOM_BLEEDING=function(t){return n.some(t.interactions||[],(function(t){return("slider"===t.type||"scrollbar"===t.type)&&"vertical"!==(t.cfg&&t.cfg.type)}))?8:24},e.DEFAULT_GLOBAL_THEME={width:400,height:400,bleeding:[e.TOP_BLEEDING,24,e.BOTTOM_BLEEDING,24],padding:"auto",defaultColor:"#5B8FF9",colors:e.COLOR_PLATE_10,colors_20:e.COLOR_PLATE_20,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,e.DESCRIPTION_BOTTOM_MARGIN,24],fontFamily:"PingFang SC",fontSize:12,fill:"grey",textAlign:"left",textBaseline:"top",lineHeight:16,alignWithAxis:!1},axis:{y:{visible:!0,position:"left",autoRotateTitle:!0,grid:{visible:!0,line:{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},autoRotate:!1,autoHide:!0},title:{visible:!1,spacing:12,style:{fill:"rgba(0, 0, 0, 0.65)",fontSize:12,textBaseline:"bottom"}}},x:{visible:!0,position:"bottom",autoRotateTitle:!1,grid:{visible:!1,line:{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,autoRotate:!0,autoHide:!0},title:{visible:!1,spacing:12,style:{fill:"rgba(0, 0, 0, 0.65)",fontSize:12}}},circle:{autoHideLabel:!1,grid:{line:{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},autoRotate:!0,autoHide:!0},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",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)"},offset:10},components:{legend:{margin:[0,24,24,24]},tooltipIndicator:{title:{style:{fontSize:14,fill:"#262626"}},line:{style:{opacity:1},inactiveStyle:{opacity:.3}},itemTitle:{style:{fontSize:12,fill:"#8C8C8C",opacity:1},inactiveStyle:{opacity:.3}},itemName:{style:{fontSize:12,fill:"#8C8C8C",opacity:1},inactiveStyle:{opacity:.3}},itemValue:{style:{fontSize:14,fontWeight:"bold",fill:"#595959",opacity:1},inactiveStyle:{opacity:.3}}}}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTheme=e.registerTheme=e.convertThemeToG2Theme=void 0;var n=i(0),r={};function o(t,e){var i={lineStyle:"line.line",columnStyle:"interval.rect",pointStyle:"point.circle"},r={};"area"===t&&(i={areaStyle:"area.area",lineStyle:"area.line",pointStyle:"point.circle"});var o={};return n.each(e,(function(t,e){var a;if(n.has(i,e)){var s=i[e];n.each(t,(function(t,e){n.set(o,s+"."+["normal"===e?"default":"disable"===e?"inactive":e]+".style",t)}))}else r=n.deepMix({},r,((a={})[e]=t,a))})),n.isEmpty(o)||(r=n.deepMix({},r,{geometries:o})),r}e.convertThemeToG2Theme=o,e.registerTheme=function(t,e){r[t.toLowerCase()]=o(t,e)},e.getTheme=function(t){return r[t.toLowerCase()]||{}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__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),r.has(t,"color")){var n=t.color;r.isString(n)?e.values=[n]:r.isFunction(n)?e.callback=n:r.isArray(n)&&(i?e.values=n:n.length>0&&(e.values=[n[0]]))}this.config.color=e},e.prototype.parseStyle=function(){var t=this.plot.options,e=t.areaStyle?t.areaStyle:t.area.style,i={};r.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=0,i=["stackField","seriesField"];ethis.iterationTime-1);)this._iteration(),t=this._constraintsTest(),this.iterationIndex++;this.constraintIndex0&&(u.push(l),u.sort((function(t,e){return e.top-t.top})),r.each(u,(function(t,e){if(e>0){var i=t.shape;o.default(i),i.set("blank",!0)}})))},e.isNodeOverlap=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTime=void 0;var n=i(1),r=i(0),o=n.__importDefault(i(36)),a=864e5;function s(t,e){var i,n=Math.abs(t-e),o={minute:[6e4,36e5],hour:[36e5,a],day:[a,26784e5],month:[26784e5,31536e6],year:[31536e6,1/0]};return r.each(o,(function(t,e){n>=t[0]&&n=e)){var n=Math.floor(Math.log10(t));return Math.abs(n-i)}var r=t%e;if(r>0){var o=Math.floor(Math.log10(r));return Math.abs(o-i)}return 0}(function(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}(l),d)},u).num;t.attr("text",h+p)}}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isKeep=void 0;var n=i(1),r=i(0),o=n.__importDefault(i(44));function a(t,e,i){var n=[];r.each(t,(function(t){"start"===t?n.push(0===e):"end"===t?n.push(e===i.length-1):r.isNumber(t)&&n.push(e===t)}));for(var o=0,a=n;o0&&n.push(e.shift()),e.length>0&&n.push(e.pop()),n.push.apply(n,e),n},e}(a.default);e.default=c,o.registerLabelComponent("point-auto",c)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=function(){function t(t){this.destroyed=!1,this.view=t.view,this.plot=t.plot;var e=this.getDefaultOptions();this.options=n.deepMix(e,t,{}),this.init()}return t.prototype.init=function(){var t=this;this.container=this.getGeometry().labelsContainer,this.view.on("beforerender",(function(){t.clear(),t.plot.canvas.draw()}))},t.prototype.render=function(){var t=this,e=this.getGeometry().elements;n.each(e,(function(e){var i=t.getShapeInfo(e.shape),r=t.options,o=r.style,a=r.offsetX,s=r.offsetY,l=t.options.formatter,u=l?l(i.name):i.name;t.container.addShape("text",{attrs:n.deepMix({},{x:i.x+a,y:i.y+s,text:u,fill:i.color,textAlign:"left",textBaseline:"middle"},o),name:"label"})}))},t.prototype.clear=function(){this.container&&this.container.clear()},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.destroy=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getBBox=function(){return this.container.getBBox()},t.prototype.getDefaultOptions=function(){var t=this.plot.theme,e=n.clone(t.label.style);return delete e.fill,{offsetX:8,offsetY:0,style:e}},t.prototype.getGeometry=function(){return n.find(this.view.geometries,(function(t){return"line"===t.type}))},t.prototype.getShapeInfo=function(t){var e=t.get("origin").points,i=e[e.length-1],n=t.attr("stroke"),r=this.plot.options.seriesField,o=t.get("origin").data[0][r];return{x:i.x,y:i.y,color:n,name:o}},t}();e.default=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(63),o=i(0);function a(t,e){var i=[],n=t.get("origin").points;return o.each(n,(function(t){i.push(e.convertPoint(t))})),i}var s=function(){function t(t){o.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:o.deepMix({},r.DEFAULT_ANIMATE_CFG)}},t.prototype._init=function(){var t=this,e=this.view.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,o=this.transpose,a=this.view.getScaleByField(this.field).values,s=this.view.geometries[0].getShapes();o?s.forEach((function(t,o){e=a[o],o++>0&&r._drawTag(i,n,t,e),n=e,i=t})):s.forEach((function(i,o){n=a[o],o++>0&&r._drawTag(i,n,t,e),e=n,t=i}))},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destroy=function(){this.container&&this.container.remove()},t.prototype._drawTag=function(t,e,i,n){var r=this.transpose,o=this.view.geometries[0].coordinate,s=a(t,o)[r?3:0],l=a(i,o)[r?0:3];this._drawTagArrow(s,l),this._drawTagValue(s,e,l,n)},t.prototype._drawTagArrow=function(t,e){var i,r=this.spacing,o=this.size,a=this.offset,s=this.animation,l=this.transpose,u=this.arrow.headSize,c=e.y-t.y,h=e.x-t.x;l?(h-u)/2h){var f=p/u.length,d=Math.max(1,Math.ceil(h/f)-1),g=u.slice(0,d)+"...";c.attr("text",g)}}!1!==s&&this._fadeInTagShape(c)},t.prototype._fadeInTagShape=function(t){var e=this.animation,i=t.attr("opacity");t.attr("opacity",0);var n=o.get(e,"appear",r.DEFAULT_ANIMATE_CFG.appear).duration;t.animate({opacity:i},n)},t}();e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(20),a=i(8),s=n.__importDefault(i(94)),l=i(25),u=n.__importDefault(i(13)),c=i(28),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.getPosition=function(t){var e=this.getDefaultOffset(),i=this.getValue(t),n=this.getElementShapeBBox(t),r=n.minX,o=n.maxX,a=n.minY,s=n.height,l=this.options;return{x:(i>0?o:r)+e*(i<0?-1:1)+l.offsetX,y:a+s/2+l.offsetY}},e.prototype.getTextAlign=function(t){return this.getValue(t)>0?"left":"right"},e.prototype.getTextFill=function(t){return this.options.style.fill},e.prototype.getTextStroke=function(t){},e.prototype.adjustLabel=function(t,e){},e.prototype.layoutLabels=function(t,e){this.shouldInShapeLabels(e)&&this.inShapeLabels(t,e),this.autoHideLabels(t,e)},e.prototype.shouldInShapeLabels=function(t){var e=this;return r.every(t,(function(t){var i=t.getBBox(),n=t.get("element");return e.getElementShapeBBox(n).height>=i.height}))},e.prototype.inShapeLabels=function(t,e){var i=this,n=this.getCoordinateBBox(),o=t.getXYFields()[0],s=this.options,h=s.darkStyle,p=s.lightStyle,f=r.groupBy(e,(function(t){return t.get(a.ORIGIN)[a.FIELD_ORIGIN][o]}));r.each(e,(function(t){var e=f[t.get(a.ORIGIN)[a.FIELD_ORIGIN][o]]||[],s=t.get("element"),d=s.shape,g=c.isContrastColorWhite(d.attr("fill")),y=i.getElementShapeBBox(s),v=u.default.fromBBoxObject(t.getBBox());(l.getOverlapArea(n,y)<=0&&t.set("visible",!1),v.width>y.width)?r.findIndex(e,(function(e){return e===t}))!==e.length-1&&t.set("visible",!1):(t.attr({x:y.x+y.width/2,textAlign:"center"}),v.width>y.width||v.height>y.height?t.attr({stroke:null==p?void 0:p.stroke}):t.attr({fill:g?null==p?void 0:p.fill:null==h?void 0:h.fill,fillOpacity:g?null==p?void 0:p.fillOpacity:null==h?void 0:h.fillOpacity,stroke:void 0}))}))},e.prototype.autoHideLabels=function(t,e){var i,n=this.getCoordinateBBox(),o=this.filterLabels(e),s=t.getXYFields()[0],u=[],c=[],h=r.groupBy(o,(function(t){return t.get(a.ORIGIN)[a.FIELD_ORIGIN][s]})),p=r.uniq(r.map(o,(function(t){return t.get(a.ORIGIN)[a.FIELD_ORIGIN][s]})));for(r.size(p)>0&&(i=p.shift(),r.each(h[i],(function(t){return c.push(t)}))),r.size(p)>0&&(i=p.pop(),r.each(h[i],(function(t){return c.push(t)}))),r.each(p.reverse(),(function(t){r.each(h[t],(function(t){return c.push(t)}))}));c.length>0;){var f=c.shift();f.get("visible")&&(l.moveInPanel(f,n),l.checkShapeOverlap(f,u)?f.set("visible",!1):u.push(f))}},e.prototype.filterLabels=function(t){var e=[],i=Math.max(Math.floor(t.length/500),1);return r.each(t,(function(t,n){n%i==0?e.push(t):t.set("visible",!1)})),e},e}(s.default);e.default=h,o.registerLabelComponent("bar-auto",h)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(6),a=n.__importDefault(i(68));i(324);var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="groupedBar",e.baseType="bar",e}return n.__extends(e,t),e.getDefaultOptions=function(){return r.deepMix({},t.getDefaultOptions.call(this),{xAxis:{visible:!0,grid:{visible:!0}},yAxis:{visible:!0,title:{visible:!1}},label:{visible:!0,position:"right",adjustColor:!0},legend:{visible:!0,position:"right-top",offsetY:0}})},e.prototype.afterRender=function(){t.prototype.afterRender.call(this);var e=r.valuesOfKey(this.options.data,this.options.groupField)||[];this.view.on("tooltip:change",(function(t){var i=t.items,n=void 0===i?[]:i;r.sortBy(n.slice(),(function(t){return e.indexOf(t.name)})).reverse().forEach((function(e,i){t.items[i]=e}))}))},e.prototype.getColorScale=function(){var t=this.options.groupField;if(t)return this.view.getScaleByField(t)},e.prototype.scale=function(){var e={};e[this.options.groupField]={values:r.valuesOfKey(this.options.data,this.options.groupField)},this.options.meta?this.options.meta=r.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.prototype.geometryTooltip=function(){this.bar.tooltip={};var t=this.options.tooltip;t.fields&&(this.bar.tooltip.fields=t.fields),t.formatter&&(this.bar.tooltip.callback=t.formatter,t.fields||(this.bar.tooltip.fields=[this.options.xField,this.options.yField,this.options.groupField]))},e}(a.default);e.default=s,o.registerPlotType("groupedBar",s)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(6),a=n.__importDefault(i(95)),s=i(96),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="percentStackedBar",e}return n.__extends(e,t),e.getDefaultOptions=function(){return r.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){return t.replace(/%/gi,"")}}}})},e.prototype.processData=function(e){var i=this.options,n=i.xField,r=i.yField,o=t.prototype.processData.call(this,e);return s.transformDataPercentage(o,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){return(100*t).toFixed(1)+"%"}},this.options.meta=r.deepMix({},this.options.meta,e),t.prototype.scale.call(this)},e}(a.default);e.default=l,o.registerPlotType("percentStackedBar",l)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(20),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(n.__importDefault(i(92)).default);e.default=o,r.registerLabelComponent("area-point",o)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(20),a=n.__importDefault(i(159)),s=i(25),l=i(24),u=i(28),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.layoutLabels=function(e,i){t.prototype.layoutLabels.call(this,e,i),this.adjustAreaLabelsStyle(i)},e.prototype.adjustAreaLabelsStyle=function(t){var e=this.view,i=this.options,n=i.darkStyle,o=i.lightStyle,a=s.getGeometryByType(e,"area"),c=s.getGeometryShapes(a).sort((function(t,e){return e.getBBox().height-t.getBBox().height}));r.each(t,(function(t){var e=t.getBBox(),i=l.getStrokePoints(e.x,e.y,e.width,e.height),a=r.map(c,(function(t){return{area:t,matches:r.filter(i,(function(e){return!!t.isHit(e[0],e[1])})).length}})).sort((function(t,e){return t.matches-e.matches}));if(r.last(a).matches>0){var s=r.last(a).area.attr("fill"),h=u.isContrastColorWhite(s);t.attr({fill:h?null==o?void 0:o.fill:null==n?void 0:n.fill,fillOpacity:h?o.fillOpacity:n.fillOpacity,stroke:h?null==o?void 0:o.stroke:null==n?void 0:n.stroke})}}))},e}(a.default);e.default=c,o.registerLabelComponent("area-point-auto",c)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_AREA_THEME=void 0;var n=i(11);e.DEFAULT_AREA_THEME={areaStyle:{normal:{},active:function(t){return{opacity:t.opacity||1}},disable:function(t){return{opacity:.5*(t.opacity||1)}},selected:{lineWidth:1,stroke:"#333333"}},lineStyle:{normal:{},active:function(t){return{opacity:t.opacity||1}},disable:function(t){return{opacity:.5*(t.opacity||1)}},selected:function(t){return{lineWidth:(t.lineWidth||1)+2}}},pointStyle:{normal:{},active: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}},disable:function(t){return{opacity:.5*(t.opacity||t.fillOpacity||1)}},selected: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}}},label:{darkStyle:{fill:"#2c3542",stroke:"#ffffff",fillOpacity:.85},lightStyle:{fill:"#ffffff",fillOpacity:1,stroke:"#2c3542"}}},n.registerTheme("area",e.DEFAULT_AREA_THEME)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(6),a=n.__importDefault(i(98)),s=i(96),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="percentStackedArea",e.baseType="stackedArea",e}return n.__extends(e,t),e.getDefaultOptions=function(){return r.deepMix({},t.getDefaultOptions.call(this),{yAxis:{visible:!0,label:{visible:!0,formatter:function(t){return t.replace(/%/gi,"")}}}})},e.prototype.processData=function(t){var e=this.options,i=e.xField,n=e.yField;return s.transformDataPercentage(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){return(100*t).toFixed(1)+"%"}},this.options.meta=r.deepMix({},e,this.options.meta),t.prototype.scale.call(this)},e}(a.default);e.default=l,o.registerPlotType("percentStackedArea",l)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(20),a=i(8),s=n.__importDefault(i(57)),l=i(25),u=n.__importDefault(i(13)),c=i(28),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.getPosition=function(t){var e=this.getDefaultOffset(),i=this.getValue(t),n=this.getElementShapeBBox(t),r=n.minX,o=n.minY,a=n.maxY,s=n.width,l=this.options;return{x:r+s/2+l.offsetX,y:(i>0?o:a)+e*(i>0?-1:1)+l.offsetY}},e.prototype.getTextFill=function(t){return this.options.style.fill},e.prototype.getTextStroke=function(t){},e.prototype.adjustLabel=function(t,e){},e.prototype.layoutLabels=function(t,e){this.shouldInShapeLabels(e)&&this.inShapeLabels(t,e),this.autoHideLabels(t,e)},e.prototype.shouldInShapeLabels=function(t){var e=this;return r.every(t,(function(t){var i=t.getBBox(),n=t.get("element");return e.getElementShapeBBox(n).width>=i.width}))},e.prototype.inShapeLabels=function(t,e){var i=this,n=this.getCoordinateBBox(),o=t.getXYFields()[0],s=this.options,h=s.darkStyle,p=s.lightStyle,f=r.groupBy(e,(function(t){return t.get(a.ORIGIN)[a.FIELD_ORIGIN][o]}));r.each(e,(function(t){var e=f[t.get(a.ORIGIN)[a.FIELD_ORIGIN][o]]||[],s=t.get("element"),d=s.shape,g=c.isContrastColorWhite(d.attr("fill")),y=i.getElementShapeBBox(s),v=u.default.fromBBoxObject(t.getBBox());(l.getOverlapArea(n,y)<=0&&t.set("visible",!1),v.height>y.height)?0!==r.findIndex(e,(function(e){return e===t}))&&t.set("visible",!1):(t.attr({y:y.y+y.height/2,textBaseline:"middle"}),v.width>y.width||v.height>y.height?t.attr({stroke:null==p?void 0:p.stroke}):t.attr({fill:g?null==p?void 0:p.fill:null==h?void 0:h.fill,fillOpacity:g?null==p?void 0:p.fillOpacity:null==h?void 0:h.fillOpacity,stroke:void 0}))}))},e.prototype.autoHideLabels=function(t,e){var i,n=this.getCoordinateBBox(),o=this.filterLabels(e),s=t.getXYFields()[0],u=[],c=[],h=r.groupBy(o,(function(t){return t.get(a.ORIGIN)[a.FIELD_ORIGIN][s]})),p=r.uniq(r.map(o,(function(t){return t.get(a.ORIGIN)[a.FIELD_ORIGIN][s]})));for(r.size(p)>0&&(i=p.shift(),r.each(h[i],(function(t){return c.push(t)}))),r.size(p)>0&&(i=p.pop(),r.each(h[i],(function(t){return c.push(t)}))),r.each(p.reverse(),(function(t){r.each(h[t],(function(t){return c.push(t)}))}));c.length>0;){var f=c.shift();f.get("visible")&&(l.moveInPanel(f,n),l.checkShapeOverlap(f,u)?f.set("visible",!1):u.push(f))}},e.prototype.filterLabels=function(t){var e=[],i=Math.max(Math.floor(t.length/500),1);return r.each(t,(function(t,n){n%i==0?e.push(t):t.set("visible",!1)})),e},e}(s.default);e.default=h,o.registerLabelComponent("column-auto",h)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.onEvent=e.EVENT_MAP=void 0;var n=i(0),r=i(12);Object.defineProperty(e,"EVENT_MAP",{enumerable:!0,get:function(){return r.EVENT_MAP}}),Object.defineProperty(e,"onEvent",{enumerable:!0,get:function(){return r.onEvent}});var o=r.getEventMap({column:"interval"});n.assign(r.EVENT_MAP,o)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(20),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.adjustLabel=function(t,e){if(this.options.adjustPosition){var i=t.getBBox(),n=this.getElementShapeBBox(e);(n.height'),this.container.appendChild(this.wrapperNode),r.modifyCSS(this.wrapperNode,{position:"absolute",pointerEvents:"none"});var t=this.html;this.wrapperNode.appendChild(t),this.setDomPosition(this.x,this.y)}},t.prototype.updateHtml=function(t){n.isType(t,"HTMLDivElement")?(this.wrapperNode.innerHTML="",this.wrapperNode.appendChild(t)):this.wrapperNode.innerHTML=t,this.setDomPosition(this.x,this.y)},t.prototype.updatePosition=function(t,e){this.x=t,this.y=e,this.setDomPosition(t,e)},t.prototype.destroy=function(){this.container.removeChild(this.wrapperNode)},t.prototype.getDefaultOptions=function(){return{x:0,y:0,width:0,height:0,html:"",container:null,alignX:"middle",alignY:"middle"}},t.prototype.setDomPosition=function(t,e){var i=t,n=e,o=r.getOuterWidth(this.wrapperNode),a=r.getOuterHeight(this.wrapperNode);"middle"===this.options.alignX&&(i=t-o/2),"middle"===this.options.alignY&&(n=e-a/2),r.modifyCSS(this.wrapperNode,{top:Math.round(n)+"px",left:Math.round(i)+"px",transform:o>0?"none":"translate(-50%, -50%)"})},t}();e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(7),o=i(0),a=i(6),s=n.__importDefault(i(101)),l=n.__importStar(i(412)),u=n.__importDefault(i(413)),c={ring:"interval"},h={interval:"ring"},p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e}return n.__extends(e,t),e.getDefaultOptions=function(){return o.deepMix({},t.getDefaultOptions.call(this),{radius:.8,innerRadius:.64,tooltip:{visible:!1},statistic:{visible:!0,totalLabel:"总计",triggerOn:"mouseenter",triggerOff:"mouseleave"}})},e.prototype.beforeInit=function(){t.prototype.beforeInit.call(this),e.centralId++,this.statisticClass="statisticClassId"+e.centralId,this.adjustLabelDefaultOptions()},e.prototype.afterRender=function(){var e=this.canvas.get("container");if(this.statistic&&(e.removeChild(this.statistic.wrapperNode),this.statistic=null),this.options.statistic&&this.options.statistic.visible){var i=this.canvas.get("container");r.modifyCSS(i,{position:"relative"}),this.statistic=new u.default(n.__assign({container:i,view:this.view,plot:this,statisticClass:this.statisticClass},this.options.statistic)),this.statistic.render(),this.options.statistic.triggerOn&&this.statistic.triggerOn()}t.prototype.afterRender.call(this)},e.prototype.destroy=function(){this.statistic&&this.statistic.destroy(),t.prototype.destroy.call(this)},e.prototype.geometryParser=function(t,e){return"g2"===t?c[e]:h[e]},e.prototype.coord=function(){var t=this.options,e={type:"theta",cfg:{radius:t.radius,innerRadius:t.innerRadius}};this.setConfig("coordinate",e)},e.prototype.parseEvents=function(){t.prototype.parseEvents.call(this,l)},e.prototype.adjustLabelDefaultOptions=function(){var t=this.options.label;if(t&&"inner"===t.type){var e=t.style||{};e.textAlign||(e.textAlign="center"),t.style=e,t.offset||(t.offset=(this.options.innerRadius-1)/2*100+"%")}},e.centralId=0,e}(s.default);e.default=p,a.registerPlotType("donut",p)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(6),a=n.__importDefault(i(15)),s=i(17),l=i(27),u=n.__importDefault(i(421)),c=n.__importDefault(i(422)),h=n.__importStar(i(176)),p=i(26);i(423);var f={scatter:"point"},d={point:"point"},g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e}return n.__extends(e,t),e.getDefaultOptions=function(){return r.deepMix({},t.getDefaultOptions.call(this),{pointSize:4,pointStyle:{lineWidth:1,strokeOpacity:1,fillOpacity:.95,stroke:"#fff"},xAxis:{nice:!0,grid:{visible:!0},line:{visible:!0}},yAxis:{nice:!0,grid:{visible:!0},line:{visible:!0}},tooltip:{visible:!0,shared:null,showTitle:!1,showMarkers:!1,showCrosshairs:!1},label:{visible:!1},shape:"circle"})},e.prototype.afterRender=function(){t.prototype.afterRender.call(this),this.quadrant&&this.quadrant.destroy(),this.trendline&&this.trendline.destroy(),this.options.quadrant&&this.options.quadrant.visible&&(this.quadrant=new u.default(n.__assign({view:this.view,plotOptions:this.options},this.options.quadrant)),this.quadrant.render()),this.options.trendline&&this.options.trendline.visible&&(this.trendline=new c.default(n.__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.isValidLinearValue=function(t){return!r.isNil(t)&&!Number.isNaN(Number(t))},e.prototype.processData=function(t){var e=this,i=this.options,o=i.xField,a=i.yField,s=r.get(this.options,["xAxis","type"],"linear"),l=r.get(this.options,["yAxis","type"],"linear");return s&&l?t.filter((function(t){return!("linear"===s&&!e.isValidLinearValue(t[o]))&&!("linear"===l&&!e.isValidLinearValue(t[a]))})).map((function(t){var e;return n.__assign(n.__assign({},t),((e={})[o]="linear"===s?Number(t[o]):String(t[o]),e[a]="linear"===l?Number(t[a]):String(t[a]),e))})):t},e.prototype.geometryParser=function(t,e){return"g2"===t?f[e]:d[e]},e.prototype.scale=function(){var e=this.options,i={};i[e.xField]={},r.has(e,"xAxis")&&l.extractScale(i[e.xField],e.xAxis),i[e.yField]={},r.has(e,"yAxis")&&l.extractScale(i[e.yField],e.yAxis);var n=r.find(e.interactions,(function(t){return"timeline"===t.type}));if(n&&r.get(n,"cfg.key")){var o=n.cfg.key;i[o]?i[o].key=!0:i[o]={key:!0}}this.setConfig("scales",i),t.prototype.scale.call(this)},e.prototype.coord=function(){},e.prototype.annotation=function(){},e.prototype.addGeometry=function(){var t=s.getGeom("point","circle",{plot:this});if(this.points=t,this.options.tooltip&&this.options.tooltip.visible){var e=this.options.tooltip,i=e.showTitle,r=e.titleField;this.extractTooltip(),this.setConfig("tooltip",n.__assign({showTitle:i,title:i?r:void 0},this.options.tooltip))}this.options.label&&this.label(),this.setConfig("geometry",t)},e.prototype.label=function(){var t=this.options;if(!1!==t.label.visible){var e=p.getComponent("label",n.__assign(n.__assign({fields:t.label.field?[t.label.field]:[t.yField]},t.label),{plot:this}));this.points&&(this.points.label=e)}else this.points&&(this.points.label=!1)},e.prototype.animation=function(){t.prototype.animation.call(this),!1===this.options.animation&&(this.points.animate=!1)},e.prototype.parseEvents=function(e){t.prototype.parseEvents.call(this,e||h)},e.prototype.extractTooltip=function(){this.points.tooltip={};var t=this.options.tooltip;t.fields?this.points.tooltip.fields=t.fields:this.points.tooltip.fields=[this.options.xField,this.options.yField],t.formatter&&(this.points.tooltip.callback=t.formatter,this.options.colorField&&this.points.tooltip.fields.push(this.options.colorField))},e}(a.default);e.default=g,o.registerPlotType("scatter",g)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.onEvent=e.EVENT_MAP=void 0;var n=i(0),r=i(12);Object.defineProperty(e,"EVENT_MAP",{enumerable:!0,get:function(){return r.EVENT_MAP}}),Object.defineProperty(e,"onEvent",{enumerable:!0,get:function(){return r.onEvent}});var o=r.getEventMap({point:"point",trendline:"trendline",confidence:"confidence",quadrant:"quadrant",quadrantLabel:"quadrant-label",quadrantLine:"quadrant-line"});n.assign(r.EVENT_MAP,o)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GaugeShape=void 0;var n=i(1),r=i(0),o=i(30),a=i(11),s=i(38),l=function(){function t(t){this.uid=t}return t.prototype.setOption=function(t,e){this.type=t,this.options=e,this.axis=e.axis,this.pivot=e.pivot},t.prototype.render=function(){var t=this;o.registerShape("point","gauge",{draw:function(e,i){var n,r,o;this.gauge={},this.gauge.options=t.options,this.gauge.axis=t.axis,this.gauge.pivot=t.pivot,this.gauge.type=t.type;var a=this.gauge,s=this.gauge.type,l=e.points[0],u=this.parsePoint({x:0,y:0}),c=this.parsePoint({x:l.x||0,y:1});a.center=u,a.group=i;var h=u.x-c.x,p=u.y-c.y;this.gauge.ringRadius=Math.sqrt(h*h+p*p);var f=this.getAngleRange(),d=f.starAngle,g=f.endAngle,y=l.x*(g-d)+d;switch(s){case"meterGauge":this.drawBarGauge(y),this.gauge.axis.visible&&(null===(n=this.gauge.axis.tickLine)||void 0===n?void 0:n.visible)&&this.drawInSideAxis();break;case"fanGauge":this.drawGauge(y),this.gauge.axis.visible&&(null===(r=this.gauge.axis.tickLine)||void 0===r?void 0:r.visible)&&this.drawOutSideAxis();break;case"standardGauge":default:this.drawGauge(y),this.gauge.axis.visible&&(null===(o=this.gauge.axis.tickLine)||void 0===o?void 0:o.visible)&&this.drawAxis()}this.gauge.pivot.visible&&this.drawPivot(e,i)},drawGauge:function(t){var e=this.gauge.options.range;this.drawBottomRing(),e&&e.length?this.drawRangeColor():this.drawCurrentRing(t)},drawRangeColor:function(){for(var t=this.gauge.options,e=t.min,i=t.max,n=t.range,o=t.color,s=t.rangeStyle,l=o||a.getGlobalTheme().colors,u=this.getAngleRange(),c={min:e,max:i,starAngle:u.starAngle,endAngle:u.endAngle},h=0;h=p){var d=this.getPath(p,f),g=r.deepMix({fill:l[h]},s);this.drawRing(d,g)}}},drawBottomRing:function(){var t=this.getAngleRange(),e=t.starAngle,i=t.endAngle,n=this.gauge.options.rangeBackgroundStyle,r=this.getPath(e,i);this.drawRing(r,n)},drawCurrentRing:function(t){var e=this.getAngleRange().starAngle,i=this.gauge.rangeStyle,n=this.getPath(e,t);this.drawRing(n,i)},drawInSideAxis:function(){for(var t=this.gauge.options,e=t.min,i=t.max,n=t.axis,r=this.getAngleRange(),o={min:e,max:i,starAngle:r.starAngle,endAngle:r.endAngle},a=(i-e)/n.tickCount,s=0;s=b?r.deepMix({},{fill:u},c):h;this.drawRing(_,O)}},getAngleRange:function(){var t=90-.5*(360-this.gauge.options.angle);return{starAngle:(180-t)*Math.PI/180,endAngle:(360+t)*Math.PI/180}},valueToAngle:function(t,e){var i=e.min,n=e.max,r=e.starAngle,o=e.endAngle;if(t===n)return o;if(t===i)return r;var a=(t-i)/(n-i);n===i&&(a=1);var s=a*(o-r)+r;return s=Math.max(s,r),s=Math.min(s,o)},drawRing:function(t,e){this.gauge.group.addShape("path",{attrs:r.deepMix({},{path:t},e)})},drawRect:function(t,e){var i,o=this.gauge.axis,a=n.__assign(n.__assign({},o),e),s=a.offset,l=a.length,u=this.gauge.center,c=(i=s<0?this.gauge.ringRadius-this.gauge.options.rangeSize+s:this.gauge.ringRadius+s)*Math.cos(t)+u.x,h=i*Math.sin(t)+u.y,p=(i+l)*Math.cos(t)+u.x,f=(i+l)*Math.sin(t)+u.y;this.gauge.group.addShape("line",{attrs:r.deepMix({},{x1:c,y1:h,x2:p,y2:f},e.style)}).set("name","axis-tickLine")},getPath:function(t,e){var i=this.gauge.center,n=this.gauge.ringRadius,r=this.gauge.options.rangeSize,o=n*Math.cos(t)+i.x,a=n*Math.sin(t)+i.y,s=(n-r)*Math.cos(t)+i.x,l=(n-r)*Math.sin(t)+i.y,u=n*Math.cos(e)+i.x,c=n*Math.sin(e)+i.y,h=(n-r)*Math.cos(e)+i.x,p=(n-r)*Math.sin(e)+i.y,f=Math.abs(t-e)>Math.PI?1:0;return[["M",o,a],["A",n,n,0,f,1,u,c],["L",h,p],["A",n-r,n-r,0,f,0,s,l],["Z"]]},drawPivot:function(t){var e=this.getAngleRange(),i=e.starAngle,n=e.endAngle,o=this.gauge.options,a=o.radius,s=o.rangeSize,l=this.gauge.pivot,u=l.thickness,c=l.thickness/2.5,h=this.gauge.group,p=t.points[0],f=this.parsePoint({x:0,y:0}),d=p.x*(n-i)+i,g={x:(this.gauge.ringRadius-s)*a*Math.cos(d)+this.gauge.center.x,y:(this.gauge.ringRadius-s)*a*Math.sin(d)+this.gauge.center.y};if(l.base.visible&&h.addShape("circle",{attrs:r.deepMix({},{x:f.x,y:f.y,r:l.base.size?l.base.size/2:2.2*u},l.base.style)}),l.pointer.visible){var y={x:f.x-g.x,y:f.y-g.y},v=Math.sqrt(y.x*y.x+y.y*y.y);y.x*=1/v,y.y*=1/v;var m=-Math.PI/2,x=Math.cos(m)*y.x-Math.sin(m)*y.y,b=Math.sin(m)*y.x+Math.cos(m)*y.y,_=Math.PI/2,O=Math.cos(_)*y.x-Math.sin(_)*y.y,w=Math.sin(_)*y.x+Math.cos(_)*y.y,M=[["M",g.x+x*c,g.y+b*c],["L",f.x+x*u,f.y+b*u],["L",f.x+O*u,f.y+w*u],["L",g.x+O*c,g.y+w*c],["Z"]];h.addShape("path",{attrs:r.deepMix({},{path:M},l.pointer.style)}),h.addShape("circle",{attrs:{x:g.x,y:g.y,r:c,fill:l.pointer.style.fill}}),h.addShape("circle",{attrs:{x:f.x,y:f.y,r:u,fill:l.pointer.style.fill}})}l.pin.visible&&h.addShape("circle",{attrs:r.deepMix({},{x:f.x,y:f.y,r:c/1.2},l.pin.style)})}})},t}();e.GaugeShape=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(6),a=i(17),s=n.__importDefault(i(58)),l=n.__importDefault(i(457)),u=n.__importStar(i(458)),c={progress:"interval"},h={interval:"progress"},p=["#55A6F3","#E8EDF3"],f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="progress",e.isEntered=!1,e}return n.__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)||p};t=r.mix(t,e)},e.prototype.init=function(){this.processProps(),t.prototype.init.call(this)},e.prototype.beforeInit=function(){var t=this.options.percent;if(!r.isNumber(t))throw new Error("Percent value is required, and the type of percent must be Number.")},e.prototype.update=function(t){var e=this.options;if(r.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;r.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&&(r.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=[],r.each(this.options.marker,(function(e){var i=r.mix({canvas:t.canvas,view:t.view,progressSize:t.options.barSize},e),n=new l.default(i);t.markers.push(n)})));var e=this.view.geometries[0].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)})),this.canvas.get("container").addEventListener("mouseleave",(function(e){t.isEntered&&(t.view.emit("progress:mouseleave",e),t.isEntered=!1)}))},e.prototype.geometryParser=function(t,e){return"g2"===t?c[e]:h[e]},e.prototype.coord=function(){this.setConfig("coordinate",{actions:[["transpose"]]})},e.prototype.addGeometry=function(){var t=this.options,e=a.getGeom("interval","main",{positionFields:[t.yField,t.xField],plot:this});e.adjust=[{type:"stack"}],r.has(t,"animation")&&(e.animate=t.animation),this.setConfig("geometry",e)},e.prototype.parseEvents=function(e){e?t.prototype.parseEvents.call(this,e):t.prototype.parseEvents.call(this,u)},e.prototype.parseColorProps=function(t){var e;if(t.color){if(e=r.isFunction(t.color)?t.color(t.percent):t.color,r.isString(e)){var i=r.clone(p);return i[0]=e,i}return e}return t.color},e.prototype.processData=function(){var t=this.options;return[{type:"current",value:t.percent},{type:"rest",value:1-t.percent}]},e.prototype.updateMarkers=function(t){var e=t.length,i=this.getUpdateAnimationOptions();if(r.each(this.markers,(function(n,r){r>e-1?n.destroy():n.update(t[r],i.duration,i.easing)})),this.markers.length=50?10:4},e.prototype.styleUpdateAnimation=function(t){var e=this.getUpdateAnimationOptions(),i=e.duration,n=e.easing,o=[],a=this.view.geometries;r.each(a,(function(t){if("interval"===t.type){var e=t.elements;r.each(e,(function(t){o.push.apply(o,t.shape)}))}})),r.isArray(t)?r.each(t,(function(t,e){o[e].animate(t,i,n)})):o[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;r.isArray(t)?r.each(t,(function(t,i){t.fill&&(e.options.color[i]=t.fill)})):t.fill&&(this.options.color[0]=t.fill)},e}(s.default);e.default=f,o.registerPlotType("progress",f)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(21),a=n.__importDefault(i(137)),s=n.__importDefault(i(13)),l=n.__importDefault(i(53)),u=i(38),c=n.__importDefault(i(89)),h=i(11),p=function(t){function e(e){var i=t.call(this,e)||this;return i.geomLayers=[],i.legends=[],i.requiredField=["xField","yField"],i.options=i.getOptions(e),i.initialOptions=r.deepMix({},e),i.themeController=new c.default,i}return n.__extends(e,t),e.getDefaultOptions=function(){return{title:{visible:!1,alignTo:"left",text:""},description:{visible:!1,text:"",alignTo:"left"}}},e.prototype.getOptions=function(e){var i=this.options||{},n=t.prototype.getOptions.call(this,e),o=this.constructor.getDefaultOptions(e);return r.deepMix({},n,o,i,e)},e.prototype.checkData=function(){for(var t,e,i=this,n=this.options,o=n.data,a=n.xField,s=n.yField,l=0;l=i&&c<=n&&"top"===o&&(i=c),u>=i&&u<=n&&"bottom"===o&&(n=u),l>t&&l<=e&&"left"===o&&(t=l),s>=t&&l<=e&&"right"===o&&(e=s)}})),new s.default(t,i,e-t,n-i)},e.prototype.getMockData=function(t){var e=this.options,i=e.xField,n=e.yField,r={};return r[i]="null",r[n[t]]=0,[r]},e}(l.default);e.default=p},function(t,e,i){"use strict";var n=i(1),r=i(10),o=i(113),a=i(118);function s(t,e,i){var n=t.getTotalMatrix();if(n){var r=function(t,e){if(e){var i=Object(a.invert)(e);return Object(a.multiplyVec2)(i,t)}return t}([e,i,1],n);return[r[0],r[1]]}return[e,i]}function l(t,e,i){if(t.isCanvas&&t.isCanvas())return!0;if(!Object(o.isAllowCapture)(t)&&!1===t.cfg.isInView)return!1;if(t.cfg.clipShape){var n=s(t,e,i),r=n[0],a=n[1];if(t.isClipped(r,a))return!1}var l=t.cfg.cacheCanvasBBox;return l||(l=t.getCanvasBBox()),e>=l.minX&&e<=l.maxX&&i>=l.minY&&i<=l.maxY}var u=i(35),c=i(49),h=i(14),p=i(5),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(n.__extends)(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return e.renderer="canvas",e.autoDraw=!0,e.localRefresh=!0,e.refreshElements=[],e.clipView=!0,e.quickHit=!1,e},e.prototype.onCanvasChange=function(t){"attr"!==t&&"sort"!==t&&"changeSize"!==t||(this.set("refreshElements",[this]),this.draw())},e.prototype.getShapeBase=function(){return u},e.prototype.getGroupBase=function(){return c.a},e.prototype.getPixelRatio=function(){var t=this.get("pixelRatio")||Object(p.d)();return t>=1?Math.ceil(t):1},e.prototype.getViewRange=function(){return{minX:0,minY:0,maxX:this.get("width"),maxY:this.get("height")}},e.prototype.createDom=function(){var t=document.createElement("canvas"),e=t.getContext("2d");return this.set("context",e),t},e.prototype.setDOMSize=function(e,i){t.prototype.setDOMSize.call(this,e,i);var n=this.get("context"),r=this.get("el"),o=this.getPixelRatio();r.width=o*e,r.height=o*i,o>1&&n.scale(o,o)},e.prototype.clear=function(){t.prototype.clear.call(this),this._clearFrame();var e=this.get("context"),i=this.get("el");e.clearRect(0,0,i.width,i.height)},e.prototype.getShape=function(e,i){return this.get("quickHit")?function t(e,i,n){if(!l(e,i,n))return null;for(var r=null,o=e.getChildren(),a=o.length-1;a>=0;a--){var u=o[a];if(u.isGroup())r=t(u,i,n);else if(l(u,i,n)){var c=u,h=s(u,i,n),p=h[0],f=h[1];c.isInShape(p,f)&&(r=u)}if(r)break}return r}(this,e,i):t.prototype.getShape.call(this,e,i,null)},e.prototype._getRefreshRegion=function(){var t,e=this.get("refreshElements"),i=this.getViewRange();e.length&&e[0]===this?t=i:(t=Object(h.d)(e))&&(t.minX=Math.floor(t.minX),t.minY=Math.floor(t.minY),t.maxX=Math.ceil(t.maxX),t.maxY=Math.ceil(t.maxY),this.get("clipView")&&(t=Object(h.e)(t,i)));return t},e.prototype.refreshElement=function(t){this.get("refreshElements").push(t)},e.prototype._clearFrame=function(){var t=this.get("drawFrame");t&&(Object(p.a)(t),this.set("drawFrame",null),this.set("refreshElements",[]))},e.prototype.draw=function(){var t=this.get("drawFrame");this.get("autoDraw")&&t||this._startDraw()},e.prototype._drawAll=function(){var t=this.get("context"),e=this.get("el"),i=this.getChildren();t.clearRect(0,0,e.width,e.height),Object(h.a)(t,this),Object(h.b)(t,i),this.set("refreshElements",[])},e.prototype._drawRegion=function(){var t=this.get("context"),e=this.get("refreshElements"),i=this.getChildren(),n=this._getRefreshRegion();n&&(t.clearRect(n.minX,n.minY,n.maxX-n.minX,n.maxY-n.minY),t.save(),t.beginPath(),t.rect(n.minX,n.minY,n.maxX-n.minX,n.maxY-n.minY),t.clip(),Object(h.a)(t,this),Object(h.b)(t,i,n),t.restore()),Object(p.c)(e,(function(t){t.get("hasChanged")&&t.set("hasChanged",!1)})),this.set("refreshElements",[])},e.prototype._startDraw=function(){var t=this,e=this.get("drawFrame");e||(e=Object(p.n)((function(){t.get("localRefresh")?t._drawRegion():t._drawAll(),t.set("drawFrame",null)})),this.set("drawFrame",e))},e.prototype.skipDraw=function(){},e}(r.AbstractCanvas);e.a=f},function(t,e,i){"use strict";(function(t){var i=this&&this.__spreadArrays||function(){for(var t=0,e=0,i=arguments.length;e1&&(i*=Math.sqrt(y),r*=Math.sqrt(y));var v=i*i*(g*g)+r*r*(d*d),m=v?Math.sqrt((i*i*(r*r)-v)/v):1;l===u&&(m*=-1),isNaN(m)&&(m=0);var x=r?m*i*g/r:0,b=i?m*-r*d/i:0,_=(c+p)/2+Math.cos(s)*x-Math.sin(s)*b,O=(h+f)/2+Math.sin(s)*x+Math.cos(s)*b,w=[(d-x)/i,(g-b)/r],M=[(-1*d-x)/i,(-1*g-b)/r],C=a([1,0],w),S=a(w,M);return o(w,M)<=-1&&(S=Math.PI),o(w,M)>=1&&(S=0),0===u&&S>0&&(S-=2*Math.PI),1===u&&S<0&&(S+=2*Math.PI),{cx:_,cy:O,rx:n.isSamePoint(t,[p,f])?0:i,ry:n.isSamePoint(t,[p,f])?0:r,startAngle:C,endAngle:C+S,xRotation:s,arcFlag:l,sweepFlag:u}}},,,,,,,,function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.G2=void 0;var n=i(1);n.__exportStar(i(119),e);var r=i(53);Object.defineProperty(e,"Layer",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"LayerConfig",{enumerable:!0,get:function(){return r.LayerConfig}});var o=i(15);Object.defineProperty(e,"ViewLayer",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ViewConfig",{enumerable:!0,get:function(){return o.ViewConfig}});var a=i(4);Object.defineProperty(e,"Base",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"PlotConfig",{enumerable:!0,get:function(){return a.PlotConfig}}),n.__exportStar(i(263),e);var s=i(58);Object.defineProperty(e,"TinyLayerConfig",{enumerable:!0,get:function(){return s.TinyLayerConfig}});var l=i(456);Object.defineProperty(e,"Progress",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"ProgressConfig",{enumerable:!0,get:function(){return l.ProgressConfig}});var u=i(459);Object.defineProperty(e,"RingProgress",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"RingProgressConfig",{enumerable:!0,get:function(){return u.RingProgressConfig}});var c=i(462);Object.defineProperty(e,"TinyColumn",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"TinyColumnConfig",{enumerable:!0,get:function(){return c.TinyColumnConfig}});var h=i(465);Object.defineProperty(e,"TinyArea",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"TinyAreaConfig",{enumerable:!0,get:function(){return h.TinyAreaConfig}});var p=i(468);Object.defineProperty(e,"TinyLine",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"TinyLineConfig",{enumerable:!0,get:function(){return p.TinyLineConfig}});var f=i(471);Object.defineProperty(e,"DualLine",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"DualLineConfig",{enumerable:!0,get:function(){return f.DualLineConfig}});var d=i(473);Object.defineProperty(e,"ColumnLine",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"ColumnLineConfig",{enumerable:!0,get:function(){return d.ColumnLineConfig}});var g=i(474);Object.defineProperty(e,"GroupedColumnLine",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"GroupedColumnLineConfig",{enumerable:!0,get:function(){return g.GroupedColumnLineConfig}});var y=i(476);Object.defineProperty(e,"StackedColumnLine",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(e,"StackedColumnLineConfig",{enumerable:!0,get:function(){return y.StackedColumnLineConfig}});var v=i(11);Object.defineProperty(e,"registerTheme",{enumerable:!0,get:function(){return v.registerTheme}}),Object.defineProperty(e,"registerGlobalTheme",{enumerable:!0,get:function(){return v.registerGlobalTheme}});var m=i(150);Object.defineProperty(e,"registerResponsiveConstraint",{enumerable:!0,get:function(){return m.registerResponsiveConstraint}}),Object.defineProperty(e,"IConstraint",{enumerable:!0,get:function(){return m.IConstraint}});var x=i(151);Object.defineProperty(e,"registerResponsiveRule",{enumerable:!0,get:function(){return x.registerResponsiveRule}});var b=i(65);Object.defineProperty(e,"registerResponsiveTheme",{enumerable:!0,get:function(){return b.registerResponsiveTheme}}),Object.defineProperty(e,"getResponsiveTheme",{enumerable:!0,get:function(){return b.getResponsiveTheme}});var _=i(139);Object.defineProperty(e,"StateManager",{enumerable:!0,get:function(){return _.default}});var O=n.__importStar(i(30));e.G2=O},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(2),r=i(120),o=function(t,e){var i=e.x-t.x,n=e.y-t.y;return Math.abs(i)>Math.abs(n)?i>0?"right":"left":n>0?"down":"up"},a=function(t,e){var i=Math.abs(e.x-t.x),n=Math.abs(e.y-t.y);return Math.sqrt(i*i+n*n)},s=function(t,e){if(t){for(var i=[],n=t.length,r=0;r1?(i.startDistance=a(r[0],r[1]),i.center=(e=r[0],n=r[1],{x:(e.x+n.x)/2,y:(e.y+n.y)/2})):i.pressTimeout=setTimeout((function(){t.direction="none",i.emitStart("press",t),i.emitEvent("press",t),i.eventType="press"}),250))},i.touchMove=function(t){var e=s(t.originalEvent.touches,i.canvas);if(e){i.clearPressTimeout(),t.points=e;var n=i.startPoints;if(n)if(e.length>1){var r=i.startDistance,l=a(e[0],e[1]);t.zoom=l/r,t.center=i.center,i.emitStart("pinch",t),i.emitEvent("pinch",t)}else{var u=e[0].x-n[0].x,c=e[0].y-n[0].y,h=i.direction||o(n[0],e[0]);i.direction=h;var p=i.getEventType(e);t.direction=h,t.deltaX=u,t.deltaY=c,i.emitStart(p,t),i.emitEvent(p,t);var f=i.lastMoveTime,d=Date.now();d-f>0&&(i.prevMoveTime=f,i.prevMovePoints=i.lastMovePoints,i.lastMoveTime=d,i.lastMovePoints=e)}}},i.touchEnd=function(t){i.emitEnd(t);var e=i.lastMoveTime;if(Date.now()-e<100){var n=e-(i.prevMoveTime||i.startTime);if(n>0){var r=i.prevMovePoints||i.startPoints,s=i.lastMovePoints,l=a(r[0],s[0])/n;l>.3&&(t.velocity=l,t.direction=o(r[0],s[0]),i.emitEvent("swipe",t))}}i.reset();var u=t.touches;u&&u.length>0&&i.touchStart(t)},i.canvas=e.getCanvas(),i.delegateEvent(),i.processEvent={},i}return n.__extends(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return"gesture"},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.render=function(){},e.prototype.layout=function(){},e.prototype.update=function(){},e.prototype.destroy=function(){this.reset(),this.offEvent(),this.processEvent=null},e.prototype.delegateEvent=function(){this.canvas.on("touchstart",this.touchStart),this.canvas.on("touchmove",this.touchMove),this.canvas.on("touchend",this.touchEnd)},e.prototype.offEvent=function(){this.canvas.off("touchstart",this.touchStart),this.canvas.off("touchmove",this.touchMove),this.canvas.off("touchend",this.touchEnd)},e.prototype.emitEvent=function(t,e){this.view.emit(t,e)},e.prototype.emitStart=function(t,e){this.isProcess(t)||(this.enable(t),this.emitEvent(t+"start",e))},e.prototype.emitEnd=function(t){var e=this,i=this.processEvent;Object.keys(i).forEach((function(n){e.emitEvent(n+"end",t),delete i[n]}))},e.prototype.enable=function(t){this.processEvent[t]=!0},e.prototype.isProcess=function(t){return this.processEvent[t]},e.prototype.reset=function(){this.clearPressTimeout(),this.startTime=0,this.startPoints=null,this.startDistance=0,this.direction=null,this.eventType=null,this.prevMoveTime=0,this.prevMovePoints=null,this.lastMoveTime=0,this.lastMovePoints=null},e.prototype.clearPressTimeout=function(){this.pressTimeout&&(clearTimeout(this.pressTimeout),this.pressTimeout=0)},e.prototype.getEventType=function(t){var e,i=this.eventType,n=this.view,r=this.startTime,o=this.startPoints;if(i)return i;var s=n.getEvents().pan;s&&s.length?e=Date.now()-r>250&&a(o[0],t[0])<10?"press":"pan":e="press";return this.eventType=e,e},e}(r.Controller);e.default=l},function(t){t.exports=JSON.parse('{"name":"@antv/g-base","version":"0.4.7","description":"A common util collection for antv projects","main":"lib/index.js","module":"esm/index.js","types":"lib/index.d.ts","files":["package.json","esm","lib","LICENSE","README.md"],"scripts":{"build":"npm run clean && run-p build:*","build:esm":"tsc -p tsconfig.json --target ES5 --module ESNext --outDir esm","build:cjs":"tsc -p tsconfig.json --target ES5 --module commonjs --outDir lib","clean":"rm -rf esm lib","watch:cjs":"tsc-watch -p tsconfig.json --target ES5 --module commonjs --outDir lib --compiler typescript/bin/tsc","coverage":"npm run coverage-generator && npm run coverage-viewer","coverage-generator":"torch --coverage --compile --source-pattern src/*.js,src/**/*.js --opts tests/mocha.opts","coverage-viewer":"torch-coverage","test":"torch --renderer --compile --opts tests/mocha.opts","test-live":"torch --compile --interactive --opts tests/mocha.opts","tsc":"tsc --noEmit","typecheck":"tsc --noEmit"},"repository":{"type":"git","url":"git+https://github.com/antvis/util.git"},"keywords":["util","antv","g"],"publishConfig":{"access":"public"},"author":"https://github.com/orgs/antvis/people","license":"ISC","bugs":{"url":"https://github.com/antvis/util/issues"},"devDependencies":{"@antv/torch":"^1.0.0","gl-matrix":"^3.0.0","less":"^3.9.0","npm-run-all":"^4.1.5","tsc-watch":"^4.0.0"},"homepage":"https://github.com/antvis/util#readme","dependencies":{"@antv/event-emitter":"^0.1.1","@antv/g-math":"^0.1.3","@antv/matrix-util":"^3.1.0-beta.1","@antv/path-util":"~2.0.5","@antv/util":"~2.0.0","@types/d3-timer":"^1.0.9","d3-ease":"^1.0.5","d3-interpolate":"^1.3.2","d3-timer":"^1.0.9","detect-browser":"^5.1.0"},"__npminstall_done":"Tue Sep 22 2020 09:06:45 GMT+0800 (中国标准时间)","gitHead":"eb6a2503cb7bb8154697592b10680939d954a31a","_from":"@antv/g-base@0.4.7","_resolved":"https://registry.npm.alibaba-inc.com/@antv/g-base/download/@antv/g-base-0.4.7.tgz"}')},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(37);e.default=function(t){return n.default(t)?"":t.toString()}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=i(197),o=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,o=this.yField,a=i.indexOf(e),s=i.length;return!o&&this.isAdjust("y")?(n=0,r=1):s>1?(n=i[0===a?0:a-1],r=i[a===s-1?s-1:a+1],0!==a?n+=(e-n)/2:n-=(r-e)/2,a!==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,r=this.getDimValues(e);n.each(t,(function(t,e){n.each(r,(function(n,r){i.adjustDim(r,n,t,e)}))}))},t.prototype.groupData=function(t,e){return n.each(t,(function(t){void 0===t[e]&&(t[e]=r.DEFAULT_Y)})),n.groupBy(t,e)},t.prototype.adjustDim=function(t,e,i,n){},t.prototype.getDimValues=function(t){var e=this.xField,i=this.yField,o={},a=[];if(e&&this.isAdjust("x")&&a.push(e),i&&this.isAdjust("y")&&a.push(i),a.forEach((function(e){o[e]=n.valuesOfKey(t,e).sort((function(t,e){return t-e}))})),!i&&this.isAdjust("y")){o.y=[r.DEFAULT_Y,1]}return o},t}();e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_Y=0,e.MARGIN_RATIO=.5,e.DODGE_RATIO=.5,e.GAP=.05},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=function(t,e){return n.isString(e)?e:t.invert(t.scale(e))},o=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;i0!=n(u[1]-i)>0&&n(e-(i-l[1])*(l[0]-u[0])/(l[1]-u[1])-l[0])<0&&(o=!o)}return o}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e,i){return t>=e&&t<=i};e.default=function(t,e,i,r){var o=i.x-t.x,a=i.y-t.y,s=e.x-t.x,l=e.y-t.y,u=r.x-i.x,c=r.y-i.y,h=s*c-l*u,p=null;if(h*h>.001*(s*s+l*l)*(u*u+c*c)){var f=(o*c-a*u)/h,d=(o*l-a*s)/h;n(f,0,1)&&n(d,0,1)&&(p={x:t.x+f*s,y:t.y+f*l})}return p}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=new Map;e.register=function(t,e){n.set(t,e)},e.getMethod=function(t){return n.get(t)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.attr();return{x:e.x,y:e.y,width:e.width,height:e.height}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.attr(),i=e.x,n=e.y,r=e.r;return{x:i-r,y:n-r,width:2*r,height:2*r}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(29),r=i(86);e.default=function(t){for(var e=t.attr().points,i=[],o=[],a=0;aMath.PI/2?Math.PI-c:c,h=h>Math.PI/2?Math.PI-h:h,{xExtra:Math.cos(u/2-c)*(e/2*(1/Math.sin(u/2)))-e/2||0,yExtra:Math.cos(h-u/2)*(e/2*(1/Math.sin(u/2)))-e/2||0}}e.default=function(t){var e=t.attr(),i=e.path,s=e.stroke?e.lineWidth:0,c=function(t,e){for(var i=[],a=[],s=[],l=0;lh&&(h=g)}var y=function(t,e,i){return Math.atan(e/(t*Math.tan(i)))}(i,n,r),v=1/0,m=-1/0,x=[s,l];for(f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var b=y+f;sm&&(m=_)}return{x:c,y:v,width:h-c,height:m-v}},length:function(t,e,i,n,r,o,a){},nearestPoint:function(t,e,i,n,o,a,u,c,h){var p=l(c-t,h-e,-o),f=p[0],d=p[1],g=r.default.nearestPoint(0,0,i,n,f,d),y=function(t,e,i,n){return(Math.atan2(n*t,i*e)+2*Math.PI)%(2*Math.PI)}(i,n,g.x,g.y);yu&&(g=s(i,n,u));var v=l(g.x,g.y,o);return{x:v[0]+t,y:v[1]+e}},pointDistance:function(t,e,i,r,o,a,s,l,u){var c=this.nearestPoint(t,e,i,r,l,u);return n.distance(c.x,c.y,l,u)},pointAt:function(t,e,i,n,r,s,l,u){var c=(l-s)*u+s;return{x:o(t,0,i,n,r,c),y:a(0,e,i,n,r,c)}},tangentAngle:function(t,e,i,r,o,a,s,l){var u=(s-a)*l+a,c=function(t,e,i,n,r,o,a,s){return-1*i*Math.cos(r)*Math.sin(s)-n*Math.sin(r)*Math.cos(s)}(0,0,i,r,o,0,0,u),h=function(t,e,i,n,r,o,a,s){return-1*i*Math.sin(r)*Math.sin(s)+n*Math.cos(r)*Math.cos(s)}(0,0,i,r,o,0,0,u);return n.piMod(Math.atan2(h,c))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(29);function r(t,e){var i=Math.abs(t);return e>0?i:-1*i}e.default={box:function(t,e,i,n){return{x:t-i,y:e-n,width:2*i,height:2*n}},length:function(t,e,i,n){return Math.PI*(3*(i+n)-Math.sqrt((3*i+n)*(i+3*n)))},nearestPoint:function(t,e,i,n,o,a){var s=i,l=n;if(0===s||0===l)return{x:t,y:e};for(var u,c,h=o-t,p=a-e,f=Math.abs(h),d=Math.abs(p),g=s*s,y=l*l,v=Math.PI/4,m=0;m<4;m++){u=s*Math.cos(v),c=l*Math.sin(v);var x=(g-y)*Math.pow(Math.cos(v),3)/s,b=(y-g)*Math.pow(Math.sin(v),3)/l,_=u-x,O=c-b,w=f-x,M=d-b,C=Math.hypot(O,_),S=Math.hypot(M,w);v+=C*Math.asin((_*M-O*w)/(C*S))/Math.sqrt(g+y-u*u-c*c),v=Math.min(Math.PI/2,Math.max(0,v))}return{x:t+r(u,h),y:e+r(c,p)}},pointDistance:function(t,e,i,r,o,a){var s=this.nearestPoint(t,e,i,r,o,a);return n.distance(s.x,s.y,o,a)},pointAt:function(t,e,i,n,r){var o=2*Math.PI*r;return{x:t+i*Math.cos(o),y:e+n*Math.sin(o)}},tangentAngle:function(t,e,i,r,o){var a=2*Math.PI*o,s=Math.atan2(r*Math.cos(a),-i*Math.sin(a));return n.piMod(s)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(32),r=i(23),o=i(31),a=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,s=/[^\s\,]+/gi;e.default=function(t){var e=t||[];return r.default(e)?e:o.default(e)?(e=e.match(a),n.default(e,(function(t,i){if((t=t.match(s))[0].length>1){var r=t[0].charAt(0);t.splice(1,0,t[0].substr(1)),t[0]=r}n.default(t,(function(e,i){isNaN(e)||(t[i]=+e)})),e[i]=t})),e):void 0}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(86);e.default=function(t){var e=t.attr(),i=e.x1,r=e.y1,o=e.x2,a=e.y2,s={minX:Math.min(i,o),maxX:Math.max(i,o),minY:Math.min(r,a),maxY:Math.max(r,a)};return{x:(s=n.mergeArrowBBox(t,s)).minX,y:s.minY,width:s.maxX-s.minX,height:s.maxY-s.minY}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=t.attr(),i=e.x,n=e.y,r=e.rx,o=e.ry;return{x:i-r,y:n-o,width:2*r,height:2*o}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(23),r="\t\n\v\f\r   ᠎              \u2028\u2029",o=new RegExp("([a-z])["+r+",]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?["+r+"]*,?["+r+"]*)+)","ig"),a=new RegExp("(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)["+r+"]*,?["+r+"]*","ig");e.default=function(t){if(!t)return null;if(n.default(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(o,(function(t,n,r){var o=[],s=n.toLowerCase();if(r.replace(a,(function(t,e){e&&o.push(+e)})),"m"===s&&o.length>2&&(i.push([n].concat(o.splice(0,2))),s="l",n="m"===n?"l":"L"),"o"===s&&1===o.length&&i.push([n,o[0]]),"r"===s)i.push([n].concat(o));else for(;o.length>=e[s]&&(i.push([n].concat(o.splice(0,e[s]))),e[s]););return""})),i}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.distanceAtSegment=e.angleAtSegments=e.pointAtSegments=e.lengthOfSegment=void 0;var n=i(18),r=i(29);function o(t){for(var e=0,i=[],n=0;n1||e<0||t.length<2)return null;var i=o(t),r=i.segments,a=i.totalLength;if(0===a)return{x:t[0][0],y:t[0][1]};for(var s=0,l=null,u=0;u=s&&e<=s+f){var d=(e-s)/f;l=n.default.pointAt(h[0],h[1],p[0],p[1],d);break}s+=f}return l},e.angleAtSegments=function(t,e){if(e>1||e<0||t.length<2)return 0;for(var i=o(t),n=i.segments,r=i.totalLength,a=0,s=0,l=0;l=a&&e<=a+p){s=Math.atan2(h[1]-c[1],h[0]-c[0]);break}a+=p}return s},e.distanceAtSegment=function(t,e,i){for(var r=1/0,o=0;o=t&&r<=t+i&&o>=e&&o<=e+n},e.intersectRect=function(t,e){return!(e.minX>t.maxX||e.maxXt.maxY||e.maxY1){for(var h=e[0],p=Math.abs(t.y-h[0].y),f=0,d=e;f=n&&t<=r},e.padEnd=function(t,e,i){if(n.isString(t))return t.padEnd(e,i);if(n.isArray(t)){var r=t.length;if(r=u}))||t[t.length-1]}var u=r.memoize((function(t){if(t.isCategory)return 1;for(var e=t.values,i=e.length,n=t.translate(e[0]),r=n,o=0;or&&(r=s)}return(r-n)/(i-1)}));function c(t){for(var e,i=0,n=function(t){var e=r.values(t.attributes);return r.filter(e,(function(t){return r.contains(o.GROUP_ATTRS,t.type)}))}(t);i(1+o)/2&&(s=a),n.translate(n.invert(s))}(t,i),C=O[o.FIELD_ORIGIN][h],S=O[o.FIELD_ORIGIN][p],j=w[o.FIELD_ORIGIN][h],P=c.isLinear&&r.isArray(S);if(r.isArray(C)){for(m=0;m=M){if(!P){f=D;break}r.isArray(f)||(f=[]),f.push(D)}}r.isArray(f)&&(f=l(f,t,i))}else{var T=void 0;if(a.isLinear||"timeCat"===a.type){if((M>a.translate(j)||Ma.max||MMath.abs(a.translate(T[o.FIELD_ORIGIN][h])-M)&&(w=T)}var k=u(i.getXScale());return!f&&Math.abs(a.translate(w[o.FIELD_ORIGIN][h])-M)<=k/2&&(f=w),f},e.getTooltipItems=function(t,e,i){void 0===i&&(i="");var s,l=t[o.FIELD_ORIGIN],u=function(t,e,i){var n=i;i||(n=e.getAttribute("position").getFields()[0]);var o=e.scales;return o[n]?o[n].getText(t[n]):r.hasKey(t,n)?t[n]:n}(l,e,i),h=e.tooltipOption,p=e.theme.defaultColor,f=[];function d(e,i){if(!r.isNil(i)&&""!==i){var n={title:u,data:l,mappingData:t,name:e,value:i,color:t.color||p,marker:!0};f.push(n)}}if(r.isObject(h)){var g=h.fields,y=h.callback;if(y){var v=g.map((function(e){return t[o.FIELD_ORIGIN][e]})),m=y.apply(void 0,v),x=n.__assign({data:t[o.FIELD_ORIGIN],mappingData:t,title:u,color:t.color||p,marker:!0},m);f.push(x)}else for(var b=e.scales,_=0,O=g;_=0&&e.splice(i,1)},t.prototype.getCurrentPoint=function(){var t=this.event;return t?t.target instanceof HTMLElement?this.view.getCanvas().getPointByClient(t.clientX,t.clientY):{x:t.x,y:t.y}:null},t.prototype.getCurrentShape=function(){return n.get(this.event,["gEvent","shape"])},t.prototype.isInPlot=function(){var t=this.getCurrentPoint();return!!t&&this.view.isPointInPlot(t)},t.prototype.isInShape=function(t){var e=this.getCurrentShape();return!!e&&e.get("name")===t},t.prototype.isInComponent=function(t){var e=r.getComponents(this.view),i=this.getCurrentPoint();return!!i&&!!e.find((function(e){var n=e.getBBox();return t?e.get("name")===t&&r.isInBox(n,i):r.isInBox(n,i)}))},t.prototype.destroy=function(){this.view=null,this.event=null,n.each(this.actions.slice(),(function(t){t.destroy()})),this.actions=null,this.cacheMap=null},t}();e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertPolarPath=e.convertNormalPath=e.getSplinePath=e.getLinePath=e.catmullRom2bezier=e.smoothBezier=void 0;var n=i(3),r=i(0),o=i(130);function a(t,e){for(var i=[t[0]],n=1,r=t.length;n=s[c]?1:0,f=h>Math.PI?1:0,d=i.convert(l),g=o.getDistanceToCenter(i,d);if(g>=.5)if(h===2*Math.PI){var y={x:(l.x+s.x)/2,y:(l.y+s.y)/2},v=i.convert(y);u.push(["A",g,g,0,f,p,v.x,v.y]),u.push(["A",g,g,0,f,p,d.x,d.y])}else u.push(["A",g,g,0,f,p,d.x,d.y]);return u}(i,n,t)):l.push(a(r,t));break;case"z":default:l.push(r)}})),function(t){r.each(t,(function(e,i){if("a"===e[0].toLowerCase()){var n=t[i-1],r=t[i+1];r&&"a"===r[0].toLowerCase()?n&&"l"===n[0].toLowerCase()&&(n[0]="M"):n&&"a"===n[0].toLowerCase()&&r&&"l"===r[0].toLowerCase()&&(r[0]="M")}}))}(l),l}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){this.view=t,this.cfg=e}return t.prototype.init=function(){this.initEvents()},t.prototype.initEvents=function(){},t.prototype.clearEvents=function(){},t.prototype.destroy=function(){this.clearEvents()},t}();e.default=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerAnimation=e.getAnimation=void 0;var n={};e.getAnimation=function(t){return n[t.toLowerCase()]},e.registerAnimation=function(t,e){n[t.toLowerCase()]=e}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(2),r=i(0),o=i(63),a=n.__importDefault(i(234)),s=i(87),l=i(111),u=function(t){function e(e){var i=t.call(this,e)||this;i.states=[];var n=e.shapeFactory,r=e.container,o=e.offscreenGroup,a=e.visible,s=void 0===a||a;return i.shapeFactory=n,i.container=r,i.offscreenGroup=o,i.visible=s,i}return n.__extends(e,t),e.prototype.draw=function(t,e){void 0===e&&(e=!1),this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.drawShape(t,e),!1===this.visible&&this.changeVisible(!1)},e.prototype.update=function(t){var e=this.shapeFactory,i=this.shape;if(i){this.model=t,this.data=t.data,this.shapeType=this.getShapeType(t),this.setShapeInfo(i,t);var n=this.getOffscreenGroup(),r=e.drawShape(this.shapeType,t,n);r.cfg.data=this.data,r.cfg.origin=t,this.syncShapeStyle(i,r,"",this.getAnimateCfg("update"))}},e.prototype.destroy=function(){var e=this.shapeFactory,i=this.shape;if(i){var r=this.getAnimateCfg("leave");r?o.doAnimate(i,r,{coordinate:e.coordinate,toAttrs:n.__assign({},i.attr())}):i.remove(!0)}this.states=[],this.shapeFactory=void 0,this.container=void 0,this.shape=void 0,this.animate=void 0,this.geometry=void 0,this.labelShape=void 0,this.model=void 0,this.data=void 0,this.offscreenGroup=void 0,this.statesStyle=void 0,t.prototype.destroy.call(this)},e.prototype.changeVisible=function(e){t.prototype.changeVisible.call(this,e),e?(this.shape&&this.shape.show(),this.labelShape&&this.labelShape.forEach((function(t){t.show()}))):(this.shape&&this.shape.hide(),this.labelShape&&this.labelShape.forEach((function(t){t.hide()})))},e.prototype.setState=function(t,e){var i=this,n=this,r=n.states,o=n.shapeFactory,a=n.model,s=n.shape,u=n.shapeType,c=r.indexOf(t);if(e){if(c>-1)return;r.push(t),"active"!==t&&"selected"!==t||s.toFront()}else{if(-1===c)return;r.splice(c,1),"active"!==t&&"selected"!==t||s.toBack()}var h=o.drawShape(u,a,this.getOffscreenGroup());r.length?r.forEach((function(t){i.syncShapeStyle(s,h,t,null)})):this.syncShapeStyle(s,h,"reset",null),h.remove(!0);var p={state:t,stateStatus:e,element:this,target:this.container};this.container.emit("statechange",p),l.propagationDelegate(this.shape,"statechange",p)},e.prototype.clearStates=function(){var t=this,e=this.states;r.each(e,(function(e){t.setState(e,!1)})),this.states=[]},e.prototype.hasState=function(t){return this.states.includes(t)},e.prototype.getStates=function(){return this.states},e.prototype.getData=function(){return this.data},e.prototype.getModel=function(){return this.model},e.prototype.getBBox=function(){var t=this.shape,e=this.labelShape,i={x:0,y:0,minX:0,minY:0,maxX:0,maxY:0,width:0,height:0};return t&&(i=t.getCanvasBBox()),e&&e.forEach((function(t){var e=t.getCanvasBBox();i.x=Math.min(e.x,i.x),i.y=Math.min(e.y,i.y),i.minX=Math.min(e.minX,i.minX),i.minY=Math.min(e.minY,i.minY),i.maxX=Math.max(e.maxX,i.maxX),i.maxY=Math.max(e.maxY,i.maxY)})),i.width=i.maxX-i.minX,i.height=i.maxY-i.minY,i},e.prototype.getStatesStyle=function(){if(!this.statesStyle){var t=this.shapeType,e=this.geometry,i=this.shapeFactory,n=e.stateOption,o=i.defaultShapeType,a=i.theme[t]||i.theme[o];this.statesStyle=r.deepMix({},a,n)}return this.statesStyle},e.prototype.getStateStyle=function(t,e){var i=this.getStatesStyle(),n=r.get(i,[t,"style"],{}),o=n[e]||n;return r.isFunction(o)?o(this):o},e.prototype.getAnimateCfg=function(t){var e=this.animate;return e?e[t]:null},e.prototype.drawShape=function(t,e){void 0===e&&(e=!1);var i=this.shapeFactory,a=this.container,s=this.shapeType;if(this.shape=i.drawShape(s,t,a),this.shape){this.setShapeInfo(this.shape,t);var l=this.shape.cfg.name;l?r.isString(l)&&(this.shape.cfg.name=["element",l]):this.shape.cfg.name=["element",this.shapeFactory.geometryType];var u=e?"enter":"appear",c=this.getAnimateCfg(u);c&&o.doAnimate(this.shape,c,{coordinate:i.coordinate,toAttrs:n.__assign({},this.shape.attr())})}},e.prototype.getOffscreenGroup=function(){if(!this.offscreenGroup){var t=this.container.getGroupBase();this.offscreenGroup=new t({})}return this.offscreenGroup},e.prototype.setShapeInfo=function(t,e){var i=this;(t.cfg.origin=e,t.cfg.element=this,t.isGroup())&&t.get("children").forEach((function(t){i.setShapeInfo(t,e)}))},e.prototype.syncShapeStyle=function(t,e,i,n,a){if(void 0===i&&(i=""),void 0===a&&(a=0),t.isGroup())for(var l=t.get("children"),u=e.get("children"),c=0;c
      ',itemTpl:'
    • \n \n {name}:\n {value}\n
    • ',xCrosshairTpl:'
      ',yCrosshairTpl:'
      ',title:null,showTitle:!0,region:null,crosshairsRegion:null,containerClassName:u.CONTAINER_CLASS,crosshairs:null,offset:10,position:"right",domStyles:null,defaultStyles:c.default})},e.prototype.render=function(){this.get("customContent")?this.renderCustomContent():(this.resetTitle(),this.renderItems()),this.resetPosition()},e.prototype.clear=function(){this.clearCrosshairs(),this.setTitle(""),this.clearItemDoms()},e.prototype.show=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!0),o.modifyCSS(t,{visibility:"visible"}),this.setCrossHairsVisible(!0))},e.prototype.hide=function(){var t=this.getContainer();t&&!this.destroyed&&(this.set("visible",!1),o.modifyCSS(t,{visibility:"hidden"}),this.setCrossHairsVisible(!1))},e.prototype.getLocation=function(){return{x:this.get("x"),y:this.get("y")}},e.prototype.setLocation=function(t){this.set("x",t.x),this.set("y",t.y),this.resetPosition()},e.prototype.setCrossHairsVisible=function(t){var e=t?"":"none",i=this.get("xCrosshairDom"),n=this.get("yCrosshairDom");i&&o.modifyCSS(i,{display:e}),n&&o.modifyCSS(n,{display:e})},e.prototype.initContainer=function(){if(t.prototype.initContainer.call(this),this.get("customContent")){this.get("container")&&this.get("container").remove();var e=this.getHtmlContentNode();this.get("parent").appendChild(e),this.set("container",e),this.resetStyles(),this.applyStyles()}},e.prototype.updateInner=function(e){var i,n,r;this.get("customContent")?this.renderCustomContent():(i=e,n=["title","showTitle"],r=!1,a.each(n,(function(t){if(a.hasKey(i,t))return r=!0,!1})),r&&this.resetTitle(),a.hasKey(e,"items")&&this.renderItems()),t.prototype.updateInner.call(this,e)},e.prototype.initDom=function(){this.cacheDoms()},e.prototype.removeDom=function(){t.prototype.removeDom.call(this),this.clearCrosshairs()},e.prototype.resetPosition=function(){var t,e=this.get("x"),i=this.get("y"),n=this.get("offset"),r=this.getOffset(),a=r.offsetX,s=r.offsetY,u=this.get("position"),c=this.get("region"),p=this.getContainer(),f=this.getBBox(),d=f.width,g=f.height;c&&(t=l.regionToBBox(c));var y=h.getAlignPoint(e,i,n,d,g,u,t);o.modifyCSS(p,{left:l.toPx(y.x+a),top:l.toPx(y.y+s)}),this.resetCrosshairs()},e.prototype.renderCustomContent=function(){var t=this.getHtmlContentNode(),e=this.get("parent"),i=this.get("container");i&&i.parentNode===e?e.replaceChild(t,i):e.appendChild(t),this.set("container",t),this.resetStyles(),this.applyStyles()},e.prototype.getHtmlContentNode=function(){var t,e=this.get("customContent");if(e){var i=e(this.get("title"),this.get("items"));t=a.isElement(i)?i:o.createDom(i)}return t},e.prototype.cacheDoms=function(){var t=this.getContainer(),e=t.getElementsByClassName(u.TITLE_CLASS)[0],i=t.getElementsByClassName(u.LIST_CLASS)[0];this.set("titleDom",e),this.set("listDom",i)},e.prototype.resetTitle=function(){var t=this.get("title");this.get("showTitle")&&t?this.setTitle(t):this.setTitle("")},e.prototype.setTitle=function(t){var e=this.get("titleDom");e&&(e.innerText=t)},e.prototype.resetCrosshairs=function(){var t=this.get("crosshairsRegion"),e=this.get("crosshairs");if(t&&e){var i=l.regionToBBox(t),n=this.get("xCrosshairDom"),r=this.get("yCrosshairDom");"x"===e?(this.resetCrosshair("x",i),r&&(r.remove(),this.set("yCrosshairDom",null))):"y"===e?(this.resetCrosshair("y",i),n&&(n.remove(),this.set("xCrosshairDom",null))):(this.resetCrosshair("x",i),this.resetCrosshair("y",i)),this.setCrossHairsVisible(this.get("visible"))}else this.clearCrosshairs()},e.prototype.resetCrosshair=function(t,e){var i=this.checkCrosshair(t),n=this.get(t);"x"===t?o.modifyCSS(i,{left:l.toPx(n),top:l.toPx(e.y),height:l.toPx(e.height)}):o.modifyCSS(i,{top:l.toPx(n),left:l.toPx(e.x),width:l.toPx(e.width)})},e.prototype.checkCrosshair=function(t){var e=t+"CrosshairDom",i=t+"CrosshairTpl",n="CROSSHAIR_"+t.toUpperCase(),r=u[n],a=this.get(e),s=this.get("parent");return a||(a=o.createDom(this.get(i)),this.applyStyle(r,a),s.appendChild(a),this.set(e,a)),a},e.prototype.renderItems=function(){this.clearItemDoms();var t=this.get("items"),e=this.get("itemTpl"),i=this.get("listDom");i&&(a.each(t,(function(t){var s=r.default.toCSSGradient(t.color),l=n.__assign(n.__assign({},t),{color:s}),u=a.substitute(e,l),c=o.createDom(u);i.appendChild(c)})),this.applyChildrenStyles(i,this.get("domStyles")))},e.prototype.clearItemDoms=function(){this.get("listDom")&&l.clearDom(this.get("listDom"))},e.prototype.clearCrosshairs=function(){var t=this.get("xCrosshairDom"),e=this.get("yCrosshairDom");t&&t.remove(),e&&e.remove(),this.set("xCrosshairDom",null),this.set("yCrosshairDom",null)},e}(s.default);e.default=p},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(7),o=i(0),a=i(135),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return n.__assign(n.__assign({},e),{container:null,containerTpl:"
      ",updateAutoRender:!0,containerClassName:"",parent:null})},e.prototype.getContainer=function(){return this.get("container")},e.prototype.show=function(){this.get("container").style.display="",this.set("visible",!0)},e.prototype.hide=function(){this.get("container").style.display="none",this.set("visible",!1)},e.prototype.setCapture=function(t){var e=t?"auto":"none";this.getContainer().style.pointerEvents=e,this.set("capture",t)},e.prototype.getBBox=function(){var t=this.getContainer(),e=parseFloat(t.style.left)||0,i=parseFloat(t.style.top)||0;return a.createBBox(e,i,t.clientWidth,t.clientHeight)},e.prototype.clear=function(){var t=this.get("container");a.clearDom(t)},e.prototype.destroy=function(){this.removeEvent(),this.removeDom(),t.prototype.destroy.call(this)},e.prototype.init=function(){t.prototype.init.call(this),this.initContainer(),this.initDom(),this.resetStyles(),this.applyStyles(),this.initEvent(),this.initCapture(),this.initVisible()},e.prototype.initCapture=function(){this.setCapture(this.get("capture"))},e.prototype.initVisible=function(){this.get("visible")?this.show():this.hide()},e.prototype.initDom=function(){},e.prototype.initContainer=function(){var t=this.get("container");if(o.isNil(t)){t=this.createDom();var e=this.get("parent");o.isString(e)&&(e=document.getElementById(e),this.set("parent",e)),e.appendChild(t),this.set("container",t)}else o.isString(t)&&(t=document.getElementById(t),this.set("container",t));this.get("parent")||this.set("parent",t.parentNode)},e.prototype.resetStyles=function(){var t=this.get("domStyles"),e=this.get("defaultStyles");t=t?o.deepMix({},e,t):e,this.set("domStyles",t)},e.prototype.applyStyles=function(){var t=this.get("domStyles");if(t){var e=this.getContainer();this.applyChildrenStyles(e,t);var i=this.get("containerClassName");if(i&&a.hasClass(e,i)){var n=t[i];r.modifyCSS(e,n)}}},e.prototype.applyChildrenStyles=function(t,e){o.each(e,(function(e,i){var n=t.getElementsByClassName(i);o.each(n,(function(t){r.modifyCSS(t,e)}))}))},e.prototype.applyStyle=function(t,e){var i=this.get("domStyles");r.modifyCSS(e,i[t])},e.prototype.createDom=function(){var t=this.get("containerTpl");return r.createDom(t)},e.prototype.initEvent=function(){},e.prototype.removeDom=function(){var t=this.get("container");t&&t.parentNode.removeChild(t)},e.prototype.removeEvent=function(){},e.prototype.updateInner=function(t){o.hasKey(t,"domStyles")&&(this.resetStyles(),this.applyStyles()),this.resetPosition()},e.prototype.resetPosition=function(){},e}(i(237).default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(10),o=i(0),a={none:[],point:["x","y"],region:["start","end"],points:["points"],circle:["center","radius","startAngle","endAngle"]},s=function(t){function e(e){var i=t.call(this,e)||this;return i.initCfg(),i}return n.__extends(e,t),e.prototype.getDefaultCfg=function(){return{id:"",name:"",type:"",locationType:"none",offsetX:0,offsetY:0,animate:!1,capture:!0,updateAutoRender:!1,animateOption:{appear:null,update:{duration:400,easing:"easeQuadInOut"},enter:{duration:400,easing:"easeQuadInOut"},leave:{duration:350,easing:"easeQuadIn"}},events:null,defaultCfg:{},visible:!0}},e.prototype.clear=function(){},e.prototype.update=function(t){var e=this,i=this.get("defaultCfg");o.each(t,(function(t,n){var r=t;e.get(n)!==t&&(o.isObject(t)&&i[n]&&(r=o.deepMix({},i[n],t)),e.set(n,r))})),this.updateInner(t),this.afterUpdate(t)},e.prototype.updateInner=function(t){},e.prototype.afterUpdate=function(t){o.hasKey(t,"visible")&&(t.visible?this.show():this.hide()),o.hasKey(t,"capture")&&this.setCapture(t.capture)},e.prototype.getLayoutBBox=function(){return this.getBBox()},e.prototype.getLocationType=function(){return this.get("locationType")},e.prototype.getOffset=function(){return{offsetX:this.get("offsetX"),offsetY:this.get("offsetY")}},e.prototype.setOffset=function(t,e){this.update({offsetX:t,offsetY:e})},e.prototype.setLocation=function(t){var e=n.__assign({},t);this.update(e)},e.prototype.getLocation=function(){var t=this,e={},i=this.get("locationType"),n=a[i];return o.each(n,(function(i){e[i]=t.get(i)})),e},e.prototype.isList=function(){return!1},e.prototype.isSlider=function(){return!1},e.prototype.init=function(){},e.prototype.initCfg=function(){var t=this,e=this.get("defaultCfg");o.each(e,(function(e,i){var n=t.get(i);if(o.isObject(n)){var r=o.deepMix({},e,n);t.set(i,r)}}))},e}(r.Base);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={fontFamily:'\n "-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto,"Helvetica Neue",\n Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",\n SimSun, "sans-serif"',textColor:"#2C3542",activeTextColor:"#333333",uncheckedColor:"#D8D8D8",lineColor:"#416180",regionColor:"#CCD7EB",verticalAxisRotate:-Math.PI/4,horizontalAxisRotate:Math.PI/4}},function(t,e,i){"use strict";function n(t,e,i,n,r){return{left:tr.x+r.width,top:er.y+r.height}}function r(t,e,i,n,r,o){var a=t,s=e;switch(o){case"left":a=t-n-i,s=e-r/2;break;case"right":a=t+i,s=e-r/2;break;case"top":a=t-n/2,s=e-r-i;break;case"bottom":a=t-n/2,s=e+i;break;default:a=t+i,s=e-r-i}return{x:a,y:s}}Object.defineProperty(e,"__esModule",{value:!0}),e.getAlignPoint=e.getPointByPosition=e.getOutSides=void 0,e.getOutSides=n,e.getPointByPosition=r,e.getAlignPoint=function(t,e,i,o,a,s,l){var u=r(t,e,i,o,a,s);if(l){var c=n(u.x,u.y,o,a,l);"auto"===s?(c.right&&(u.x=Math.max(0,t-o-i)),c.top&&(u.y=Math.max(0,e-a-i))):"top"===s||"bottom"===s?(c.left&&(u.x=l.x),c.right&&(u.x=l.x+l.width-o),"top"===s&&c.top&&(u.y=e+i),"bottom"===s&&c.bottom&&(u.y=e-a-i)):(c.top&&(u.y=l.y),c.bottom&&(u.y=l.y+l.height-a),"left"===s&&c.left&&(u.x=t+i),"right"===s&&c.right&&(u.x=t-o-i))}return u}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(138);function a(t,e,i){t[i]&&(e[i]=t[i])}var s=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=n.__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,a(this.localProps,this.config,"autoHideLabel"),a(this.localProps,this.config,"autoRotateLabel"),a(this.localProps,this.config,"autoRotateTitle")},t.prototype._needDraw=function(){var t=this.plot.options,e=t[this.dim+"Axis"]?t[this.dim+"Axis"]:{},i=r.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={style:this.localProps.line.style}),this.applyThemeConfig("line")},t.prototype._gridParser=function(){var t,e,i,n,o,a=this,s=null===(e=null===(t=this.localProps.grid)||void 0===t?void 0:t.line)||void 0===e?void 0:e.style,l=null===(n=null===(i=this.localProps.grid)||void 0===i?void 0:i.line)||void 0===n?void 0:n.type,u=null===(o=this.localProps.grid)||void 0===o?void 0:o.alternateColor;r.isFunction(s)?this.config.grid=function(t,e,i){var n=s(t,e,i);return{line:{type:l,style:r.deepMix({},r.get(a.themeConfig,"grid.line.style"),n)},alternateColor:u}}:s&&(this.config.grid={line:{type:l,style:s},alternateColor:u},this.applyThemeConfig("grid"))},t.prototype._tickLineParser=function(){this.config.tickLine=this.localProps.tickLine,this.localProps.tickLine.style&&(this.config.tickLine={style:this.localProps.tickLine.style}),this.applyThemeConfig("tickLine")},t.prototype._labelParser=function(){var t=this.localProps.label,e=t.style,i=n.__rest(t,["style"]),o=n.__assign({},i);e&&(o.style=n.__assign({},this.localProps.label.style)),o.style=r.deepMix({},r.get(this.themeConfig,"label.style"),o.style);var a=this.parseFormatter(o);o.formatter=a,this.config.label=o},t.prototype._titleParser=function(){var t=n.__assign({},this.localProps.title),e=this.localProps.title,i=e.visible,o=e.style,a=e.text;i?(this.config.showTitle=!0,o&&(t.style=o),t.style=r.deepMix({},r.get(this.config,"title.style"),t.textStyle),a&&(t.text=a)):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]=r.deepMix({},r.get(this.themeConfig,t+".style"),this.config[t])},t.prototype.parseFormatter=function(t){var e=o.combineFormatter(o.getNoopFormatter(),o.getPrecisionFormatter(t.precision),o.getSuffixFormatter(t.suffix));return t.formatter&&(e=o.combineFormatter(e,t.formatter)),e},t}();e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(21),r=i(0),o=i(24),a=function(){function t(t){r.assign(this,t),this._init()}return t.prototype._init=function(){var t=this.plot.options,e=t.yField,i=t.data,n=this.plot.processData(i);if(!r.isEmpty(n)&&r.isNumber(n[0][e])){var o=this.getDefaultStyle(),a={type:"line",top:!0,start:this.cfg.start,end:this.cfg.end};if(a.style=r.deepMix({},o.line.style,this.cfg.lineStyle),a.text=r.deepMix({},o.text,this.cfg.text),this.cfg.type){var s=this._getState(this.cfg.type),l=100*(1-this.getYScale().scale(s))+"%",u=["0%",l],c=["100%",l];this.config=r.mix({start:u,end:c},a)}else{var h=this.cfg,p=h.start,f=h.end;this.config=r.clone(a);var d=this.getXScale(),g=this.getYScale(),y=r.clone(p),v=r.clone(f);r.each(p,(function(t,e){r.contains(r.toArray(p[e]),"%")&&!r.isNumber(p[e])||(y[e]=0===e?100*d.scale(p[0])+"%":100*(1-g.scale(p[1]))+"%")})),r.each(f,(function(t,e){r.contains(r.toArray(f[e]),"%")&&!r.isNumber(f[e])||(v[e]=0===e?100*d.scale(f[0])+"%":100*(1-g.scale(f[1]))+"%")})),this.config.start=y,this.config.end=v}}},t.prototype.getYScale=function(){var t=this._getState("min"),e=this._getState("max");return new(n.getScale("linear"))(r.mix({},{min:"column"===this.plot.type?0:t,max:e,nice:!0,values:this.values},this.plot.config.scales[this.plot.options.yField]))},t.prototype.getXScale=function(){var t=this.extractXValue();if(r.isString(t[0]))return new(n.getScale("cat"))(r.mix({},{values:t},this.plot.config.scales[this.plot.options.xField]));var e=Math.min.apply(Math,t),i=Math.max.apply(Math,t);return new(n.getScale("linear"))(r.mix({},{min:e,max:i,nice:!0,values:t},this.plot.config.scales[this.plot.options.xField]))},t.prototype._getState=function(t){return this.values=this._extractValues(),"median"===t?o.getMedian(this.values):"mean"===t?o.getMean(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=[],n=this.plot.processData(t.data);return r.each(n,(function(t){r.isArray(t[e])?i.push.apply(i,t[e]):i.push(t[e])})),i},t.prototype.extractXValue=function(){var t=this.plot.options,e=t.xField,i=[],n=this.plot.processData(t.data);return r.each(n,(function(t){r.isArray(t[e])?i.push.apply(i,t[e]):i.push(t[e])})),i},t.prototype.getDefaultStyle=function(){return this.getDefaultTextAlign(),{line:{style:{lineWidth:2,stroke:"#333333",opacity:.7,lineDash:[0,0]}},text:{content:"",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}();e.default=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(138),a=function(){function t(t){this.config={};var e=t.plot,i=n.__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;r.assign(this.config,t),this.config.callback=function(t){return e.parseCallBack(t)}},t.prototype.parseCallBack=function(t){var e=this.originConfig,i=this.plot.getPlotTheme(),o=n.__assign({},e);return this.parseOffset(e,o),e.position&&(r.isFunction(e.position)?o.position=e.position(t):o.position=e.position),this.parseFormatter(o),e.style&&(r.isFunction(e.style)?o.textStyle=e.style(t):o.textStyle=e.style),o.textStyle=r.deepMix({},r.get(i,"label.style"),o.textStyle),e.autoRotate&&(o.autoRotate=e.autoRotate),o},t.prototype.parseOffset=function(t,e){var i=0;r.each(["offset","offsetX","offsetY"],(function(n){r.has(t,n)&&(e[n]=t[n],i++)})),0===i&&"middle"===r.get(t,"position")&&(e.offset=0)},t.prototype.parseFormatter=function(t){var e=this.originConfig;t.content=function(t,i){var n=t[e.fields[0]];return o.combineFormatter(o.getNoopFormatter(),o.getPrecisionFormatter(e.precision),o.getSuffixFormatter(e.suffix),e.formatter?e.formatter:o.getNoopFormatter())(n,t,i)}},t}();e.default=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,r,o=i(0);function a(t,e){n||s(t),o.each(n,(function(t){var i=l(t,e);if(u(i.labelData,i.con)){var n={opacity:1,fontWeight:600,fill:"red"};t.shape.attr(n)}}))}function s(t){var e;n=[],r=[];var i=null===(e=t.view.getController("axis"))||void 0===e?void 0:e.getComponents();o.each(i,(function(e){var i=e.component,a=[],s=function(t,e){var i=t.options,n="y",r=e.get("position");"bottom"!==r&&"top"!==r||(n="x");var o=i[n+"Field"];return t.view.get("scales")[o]}(t,i),l=i.get("labelRenderer").get("group").get("children");if(o.each(l,(function(t){"text"===t.type&&(a.push({shape:t}),r.push(t.attr()))})),s){var u=s.ticks,c=s.field;o.each(a,(function(t,e){t.value=u[e],t.scaleField=c,t.type=s.type}))}n.push.apply(n,a)}))}function l(t,e){var i,n=((i={})[t.scaleField]=t.value,i),r=o.clone(e);return"time"===t.type&&o.isObject(e)&&!o.isFunction(r.exp)&&(r.exp=new Date(r.exp).getTime()),{labelData:n,con:r}}function u(t,e){if(!o.isFunction(e)){var i=e.name,n=e.exp;return!!t[i]&&(o.isFunction(n)?n(t[i]):t[i]===n)}return e(t)}e.default={active:a,selected:a,disable:function(t,e){n||s(t),o.each(n,(function(t,i){var n=l(t,e);if(u(n.labelData,n.con)){var o=r[i],a={opacity:.2*(o.opacity||1)};t.shape.attr(a)}}))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,r,o=i(0),a=i(64);function s(t,e){n||l(t),o.each(n,(function(t,i){var n=t.get("origin");if(a.compare(n,e)){var s=r[i],l=o.mix({},s,{opacity:1});t.attr(l)}}))}function l(t){n=[],r=[];var e=t.view.get("elements");o.each(e,(function(t){var e=t.get("labels");e&&o.each(e,(function(t){n.push(t),r.push(t.attr())}))}))}e.default={active:s,selected:s,disable:function(t,e){n||l(t),o.each(n,(function(t,i){var n=t.get("origin");if(a.compare(n,e)){var o=r[i],s={opacity:.2*(o.opacity||1)};t.attr(s)}}))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=i(64),o=["xField","yField","angleField"];function a(t,e){var i=t.options;if(function(t,e){var i=function(t){var e=[];return n.each(o,(function(i){n.has(t,i)&&e.push(i)})),e}(t);return!n.isFunction(e)&&i.indexOf(e.name)}(i,e)){var a=i.data;n.each(a,(function(i){if(r.compare(i,e)){var n=t.view.getXY(i);t.view.on("tooltip:create",(function(t){s(e,t,!1)})),t.view.showTooltip(n)}}))}}function s(t,e,i){var o=!i,a=n.clone(e.items);e.items.splice(0),n.each(a,(function(i){var n=i.point._origin;r.compare(n,t)===o&&e.items.push(i)}))}e.default={active:a,selected:a,disable:function(t,e){t.view.on("tooltip:change",(function(t){s(e,t,!0)}))}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importDefault(i(39)),o=n.__importDefault(i(248)),a=n.__importDefault(i(249)),s=n.__importDefault(i(250)),l=n.__importDefault(i(253));r.default.registerInteraction("slider",a.default),r.default.registerInteraction("scrollbar",o.default),r.default.registerInteraction("timeline",s.default),r.default.registerInteraction("tooltip-indicator",l.default),n.__exportStar(i(39),e),e.default=r.default},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(8),o=n.__importDefault(i(13)),a=i(0),s=n.__importDefault(i(39)),l=i(140),u=i(43),c=i(141),h=function(t){void 0===t&&(t={});var e=n.__assign({type:"horizontal",categorySize:32,width:8,height:8,padding:[0,0,0,0]},t);return t.padding||(e.padding="horizontal"===e.type?[4,0,4,0]:[0,4,0,4]),e},p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onChangeFn=a.throttle(e.onChange.bind(e),20,{leading:!0}),e}return n.__extends(e,t),e.getInteractionRange=function(t,e){var i=h(e),n=i.padding,r=n[0],a=n[1],s=n[2],l=n[3];return"horizontal"===i.type?new o.default(t.minX,t.maxY-i.height-r-s,t.width,i.height+r+s):new o.default(t.maxX-i.width-l-a,t.minY,i.width+l+a,t.height)},e.prototype.render=function(){var t=this,e=this.getViewLayer(),i=this.view;this.ratio=0,this.thumbOffset=0;var n=function(){var e=t.view.padding;"auto"===e||a.isEqual(e,[0,0,0,1])||(t.trackLen?t.renderScrollbar():(t.measureScrollBar(),t.changeViewData(t.getScrollRange(),!0)))},r=function(){t.trackLen=0};i.on(u.VIEW_LIFE_CIRCLE.AFTER_PAINT,n),this.addDisposable((function(){return i.off(u.VIEW_LIFE_CIRCLE.AFTER_PAINT,n)})),i.on(u.VIEW_LIFE_CIRCLE.AFTER_RENDER,n),this.addDisposable((function(){return i.off(u.VIEW_LIFE_CIRCLE.AFTER_RENDER,n)})),e.on(c.VIEW_LAYER_LIFE_CYCLE.BEFORE_CHANGE_DATA,r),this.addDisposable((function(){return e.off(c.VIEW_LAYER_LIFE_CYCLE.BEFORE_CHANGE_DATA,r)}))},e.prototype.start=function(){},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=h(this.getInteractionConfig()),e=this.getRange(),i="vertical"!==t.type,n=this.view.coordinateBBox,o=t.padding,a=o[0],s=o[3],l=i?{x:n.minX+s,y:e.minY+a}:{x:e.minX+s,y:n.minY+a};this.scrollbar?(this.scrollbar.update({trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:this.thumbOffset,x:l.x,y:l.y}),this.scrollbar.render()):(this.container=this.canvas.addGroup(),this.scrollbar=new r.Scrollbar({container:this.container,x:l.x,y:l.y,isHorizontal:i,trackLen:this.trackLen,thumbLen:this.thumbLen,thumbOffset:this.ratio*this.trackLen}),this.scrollbar.init(),this.scrollbar.render(),this.scrollbar.get("group").set("zIndex",999),this.scrollbar.on("scrollchange",this.onChangeFn))},e.prototype.measureScrollBar=function(){var t=h(this.getInteractionConfig()),e=t.padding,i=e[0],n=e[1],r=e[2],o=e[3],s="vertical"!==t.type,l=this.view.coordinateBBox,u=this.view.getXScale(),c=this.view.getYScales().filter((function(t){return t}));this.cnt=u.values.length,this.xScaleCfg={field:u.field,values:u.values||[]},this.yScalesCfg=c,this.step=Math.floor((s?l.width:l.height)/t.categorySize),this.trackLen=s?l.width-o-n:l.height-i-r,this.thumbLen=Math.max(this.trackLen*a.clamp(this.step/u.values.length,0,1),20)},e.prototype.getScrollRange=function(){var t=Math.floor((this.cnt-this.step)*a.clamp(this.ratio,0,1));return[t,Math.min(t+this.step,this.cnt)]},e.prototype.changeViewData=function(t,e){var i=this,r=t[0],o=t[1],s=h(this.getInteractionConfig()),u=this.getViewLayer(),c=u.options.meta,p=u.getData(),f=l.getDataByScaleRange(this.xScaleCfg.field,this.xScaleCfg.values,p,[r,o],"vertical"===s.type);this.yScalesCfg.forEach((function(t){var e=a.get(c,t.field)||{};i.view.scale(t.field,n.__assign(n.__assign({formatter:t.formatter},e),{type:t.type,min:t.min,max:t.max}))})),e?(this.view.data(f),this.view.render()):this.view.changeData(f)},e.prototype.onChange=function(t){var e=t.ratio,i=t.thumbOffset;this.ratio=e,this.thumbOffset=i;var n=this.view.getOptions().animate;this.view.animate(!1),this.changeViewData(this.getScrollRange(),!0),this.view.animate(n),this.renderScrollbar()},e}(s.default);e.default=p},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(8),o=n.__importDefault(i(13)),a=i(0),s=n.__importDefault(i(39)),l=i(140),u=function(t){void 0===t&&(t={});var e=n.__assign({type:"horizontal",start:0,end:1,width:void 0,height:void 0,padding:[0,0,0,0],backgroundStyle:{},foregroundStyle:{},handlerStyle:{},textStyle:{},trendCfg:{}},t);t.padding||(e.padding="horizontal"===e.type?[4,0,4,0]:[0,4,0,4]),t.height||(e.height=16),t.width||(e.width=16);var i=a.clamp(Math.min(e.start,e.end),0,1),r=a.clamp(Math.max(e.start,e.end),0,1);return e.start=i,e.end=r,e},c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onChangeFn=a.throttle(e.onChange.bind(e),20,{leading:!0}),e}return n.__extends(e,t),e.getInteractionRange=function(t,e){var i=u(e),n=i.padding||[0,0,0,0],r=n[0],a=n[1],s=n[2],l=n[3];return"horizontal"===i.type?new o.default(t.minX,t.maxY-i.height-r-s,t.width,i.height+r+s):new o.default(t.maxX-i.width-l-a,t.minY,i.width+l+a,t.height)},e.prototype.render=function(){var t=this,e=this.getViewLayer(),i=this.view,n=u(this.getInteractionConfig());this.curStart=n.start,this.curEnd=n.end,this.xScaleCfg=void 0;var o=function(){var n=t.view.padding;if("auto"!==n&&!a.isEqual(n,[0,0,0,1])&&!a.isEmpty(e.options.data))if(t.xScaleCfg)t.renderSlider();else{var r=i.getXScale();t.xScaleCfg={field:r.field,values:r.values||[]},i.data(t.getSliderData(t.curStart,t.curEnd)),i.render()}};i.on(r.VIEW_LIFE_CIRCLE.AFTER_PAINT,o),this.addDisposable((function(){return i.off(r.VIEW_LIFE_CIRCLE.AFTER_PAINT,o)})),i.on(r.VIEW_LIFE_CIRCLE.AFTER_RENDER,o),this.addDisposable((function(){return i.off(r.VIEW_LIFE_CIRCLE.AFTER_RENDER,o)}))},e.prototype.start=function(){},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.slider.render()):(this.container=this.canvas.addGroup(),this.slider=new r.Slider(n.__assign(n.__assign({},this.getSliderConfig()),{container:this.container})),this.slider.init(),this.slider.render(),this.slider.on("sliderchange",this.onChangeFn))},e.prototype.getSliderConfig=function(){var t=this.view.coordinateBBox,e=this.getRange(),i=u(this.getInteractionConfig())||{},r=i.padding,o=void 0===r?[0,0,0,0]:r,a=i.backgroundStyle,s=i.foregroundStyle,l=i.handlerStyle,c=i.textStyle,h=i.trendCfg,p=void 0===h?{}:h,f=o[0],d=o[1],g=o[2],y=o[3],v=this.getSliderMinMaxText(this.curStart,this.curEnd),m=v.minText,x=v.maxText;return{x:t.minX+y,y:e.minY+f,width:t.width-y-d,height:e.height-f-g,start:this.curStart,end:this.curEnd,minText:m,maxText:x,backgroundStyle:a,foregroundStyle:s,handlerStyle:l,textStyle:c,trendCfg:n.__assign(n.__assign({isArea:!1,smooth:!1},p),{data:this.getSliderTrendData()})}},e.prototype.getSliderTrendData=function(){var t=this.getViewLayer().options,e=t.data,i=t.yField;return a.map(e,(function(t){return t[i]}))},e.prototype.getSliderData=function(t,e){var i=this.getViewLayer().getData(),n=a.size(this.xScaleCfg.values),r=Math.round(t*n),o=Math.max(r+1,Math.round(e*n));return l.getDataByScaleRange(this.xScaleCfg.field,this.xScaleCfg.values,i,[r,o])},e.prototype.getSliderMinMaxText=function(t,e){var i=this.getViewLayer().options,n=i.data,r=void 0===n?[]:n,o=i.xField,s=a.size(r),l=Math.round(t*s),u=Math.max(l+1,Math.round(e*s)),c=r.slice(l,u);return{minText:c.length>0?a.head(c)[o]:"",maxText:c.length>0?a.last(c)[o]:""}},e.prototype.onChange=function(t){var e=this.view,i=a.clamp(Math.min(t[0],t[1]),0,1),n=a.clamp(Math.max(t[0],t[1]),0,1),r=this.getSliderData(i,n),o=this.getSliderMinMaxText(i,n),s=o.minText,l=o.maxText;this.curStart=i,this.curEnd=n,this.slider.update({start:i,end:n,minText:s,maxText:l}),this.slider.render();var u=e.getOptions().animate;e.animate(!1),e.data(r),e.render(),e.animate(u)},e}(s.default);e.default=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(8),a=n.__importDefault(i(39)),s=n.__importDefault(i(13)),l=n.__importDefault(i(251));function u(t){return n.__assign({loop:!1,auto:!0,height:40,padding:[0,20,0,0],speed:2},t)}var c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onChangeFn=r.throttle(e.onChange.bind(e),20,{leading:!0}),e}return n.__extends(e,t),e.getInteractionRange=function(t,e){var i=u(e),n=i.padding[0],r=i.padding[2];return new s.default(t.minX,t.maxY-i.height-n-r,t.width,i.height+n+r)},e.prototype.setAnimate=function(t){var e=this.view.geometries;this.view.animate(t),e.forEach((function(e){e.animate(t)}))},e.prototype.start=function(){},e.prototype.renderTimeLine=function(){var t=this;this.config=u(this.getInteractionConfig());var e=this.view.viewBBox,i=this.config,o=i.loop,a=i.padding,s=i.speed,c=a[0],h=a[1],p=a[2],f=a[3],d=this.getRange(),g=this.getTicks(),y=e.width-f-h,v={x:e.minX+f,y:d.tl.y+c,width:y,height:d.height-c-p,loop:o,ticks:g,speed:s,defaultCurrentTick:g[0]};this.timeline?r.isEqual(v,this.timeLineConfig)||(this.timeLineConfig=v,this.timeline.update(v)):(this.container=this.canvas.addGroup(),this.timeline=new l.default(n.__assign({container:this.container},v)),this.timeline.init(),this.timeline.render(),this.timeline.on("timelinestart",(function(){t.originAnimation=t.view.getOptions().animate,t.setAnimate(!0)})),this.timeline.on("timelineend",(function(){t.setAnimate(t.originAnimation)})),this.timeline.on("timelinechange",this.onChangeFn),this.timeline.on("timelineupdate",this.onChange.bind(this)),this.view.data(this.getFilterData(g[0])),this.timeLineConfig=v)},e.prototype.onChange=function(t){var e=this.getFilterData(t);this.view.changeData(e)},e.prototype.getFilterData=function(t){var e=this.config.field;return this.getViewLayer().options.data.filter((function(i){return i[e]===t}))},e.prototype.getTicks=function(){var t=this.config.field,e=this.getViewLayer().options.data;return r.uniq(e.map((function(e){return e[t]})))},e.prototype.render=function(){var t=this;this.firstRender=!0,this.view.on(o.VIEW_LIFE_CIRCLE.BEFORE_RENDER,(function(){t.renderTimeLine()})),this.view.on(o.VIEW_LIFE_CIRCLE.BEFORE_PAINT,(function(){t.renderTimeLine()})),this.view.on(o.VIEW_LIFE_CIRCLE.AFTER_PAINT,(function(){t.config.auto&&t.firstRender&&(t.timeline.isPlay=!0,t.timeline.changePlayStatus()),t.firstRender=!1})),this.view.on(o.VIEW_LIFE_CIRCLE.AFTER_RENDER,(function(){t.config.auto&&t.firstRender&&(t.timeline.isPlay=!0,t.timeline.changePlayStatus()),t.firstRender=!1}))},e.prototype.clear=function(){this.timeline&&(this.timeline.destroy(),this.timeline=null),this.container&&(this.container.remove(!0),this.container=null)},e}(a.default);e.default=c},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(252)),a=n.__importDefault(i(54)),s=function(t){function e(e){var i=t.call(this,r.deepMix({},{speed:1,loop:!1},e))||this;return i.onTimeSelectMouseMove=function(t){t.stopPropagation(),t.preventDefault();var e=r.get(t,"touches.0.pageX",t.pageX),n=e-i.prevX;i.setTimeSelectX(n),i.prevX=e},i.onTimeSelectMouseUp=function(){i.syncCurrnentTick(),i.emit("timelineend",null);var t=i.getCanvas().get("container");t&&(t.removeEventListener("mousemove",i.onTimeSelectMouseMove),t.removeEventListener("mouseup",i.onTimeSelectMouseUp),t.removeEventListener("mouseleave",i.onTimeSelectMouseUp),t.removeEventListener("touchmove",i.onTimeSelectMouseMove),t.removeEventListener("touchend",i.onTimeSelectMouseUp),t.removeEventListener("touchcancel",i.onTimeSelectMouseUp))},i.onTimeSelectMouseDown=function(t){var e=t.originalEvent;e.stopPropagation(),e.preventDefault(),!1===i.isPlay?i.emit("timelinestart",null):(i.isPlay=!1,i.changePlayStatus(!1)),i.prevX=r.get(e,"touches.0.pageX",e.pageX);var n=i.getCanvas().get("container");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}return n.__extends(e,t),e.prototype.renderInner=function(t){var e=this.config,i=e.ticks,n=e.defaultCurrentTick;i&&i.length&&(this.currentTick=this.config.ticks.includes(n)?n:i[0],this.renderPlayButton(t),this.renderTimeLine(t),this.renderTimeSelect(t,this.currentTick),this.initEvent())},e.prototype.update=function(e){t.prototype.update.call(this,e),this.emit("timelineupdate",this.currentTick)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.timeLineButton.destroy(),this.timeLineButton.off(),this.timeSelect.off(),this.playHandler&&window.cancelAnimationFrame(this.playHandler)},e.prototype.renderPlayButton=function(t){var e=this.config,i=e.height,n=e.x,r=e.y,a=i/2*.8;this.timeLineButton?this.timeLineButton.update({x:n+a,y:r+a+i*(1-.8)/2,r:a}):(this.timeLineButton=new o.default({container:t,x:n+a,y:r+a+i*(1-.8)/2,r:a,isPlay:this.isPlay}),this.timeLineButton.init()),this.timeLineButton.render()},e.prototype.getTimeLinePath=function(){var t=this.timeLine,e=t.x,i=t.y,n=t.width,r=t.height,o=r/2;return n>0?"M"+e+", "+i+"A"+o+","+o+" 90 0,0 "+e+","+(i+r)+"L"+(e+n)+", "+(i+r)+"A"+o+","+o+" 90 0,0 "+(e+n)+","+i+"L"+e+", "+i:[]},e.prototype.renderTimeLine=function(t){var e=this,i=this.config,n=i.width,r=i.height,o=i.ticks,a=i.x,s=i.y;this.timeLine||(this.timeLine={}),this.timeLine.height=.15*r,this.timeLine.x=a+r+20,this.timeLine.y=s+(r/2-this.timeLine.height/2),this.timeLine.width=n-this.timeLine.x-20,this.timeLine&&this.timeLine.shape?this.timeLine.shape.attr("path",this.getTimeLinePath()):this.timeLine.shape=t.addShape("path",{attrs:{path:this.getTimeLinePath(),fill:"#607889",opacity:.2}});var l=this.timeLine.width/(o.length-1);this.tickPosList=[],this.timeLine.textList&&this.timeLine.textList.length&&this.timeLine.textList.forEach((function(t){t.destroy()}));var u=-1/0;this.timeLine.textList=o.map((function(i,n){e.tickPosList.push(e.timeLine.x+n*l);var r=t.addShape("text",{attrs:{x:e.timeLine.x+n*l,y:e.timeLine.y+e.timeLine.height+5,text:i,textAlign:"center",textBaseline:"top",fill:"#607889",opacity:.35}}),o=r.getBBox();return o.minX>u?(r.show(),u=o.minX+o.width+10):r.hide(),r}))},e.prototype.renderTimeSelect=function(t,e){var i=this.config,n=i.ticks,o=i.height,a=this.timeLine.width/(n.length-1),s=r.findIndex(n,(function(t){return t===e})),l=this.timeLine.x+s*a,u=this.config.y+o/2,c=.15*o;this.timeSelect?(this.timeSelect.attr("x",l),this.timeSelect.attr("y",u),this.timeSelect.attr("r",c)):this.timeSelect=t.addShape("circle",{attrs:{x:l,y:u,r:c,fill:"#607889"}}),this.timeSelectText?(this.timeSelectText.attr("x",l),this.timeSelectText.attr("y",u-.15*o-14),this.timeSelectText.attr("text",this.currentTick)):this.timeSelectText=t.addShape("text",{attrs:{x:l,y:u-.15*o-14,text:this.currentTick,textAlign:"center",textBaseline:"top",fill:"#607889"}})},e.prototype.adjustTickIndex=function(t){for(var e=0;ethis.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("timelinechange",this.currentTick)),this.getCanvas().draw()},e.prototype.syncCurrnentTick=function(){var t=this,e=this.config.ticks,i=this.timeLine.width/(e.length-1),n=r.findIndex(e,(function(e){return e===t.currentTick})),o=this.timeLine.x+n*i;this.timeSelect.attr("x",o),this.timeSelectText.attr("x",o),this.getCanvas().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/n.length/(1e3*i/60);t.setTimeSelectX(r),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("timelinestart",null)):this.playHandler&&(window.cancelAnimationFrame(this.playHandler),t&&(this.syncCurrnentTick(),this.emit("timelineend",null))),this.getCanvas().draw()},e.prototype.initEvent=function(){var t=this;this.timeLineButton.off("click"),this.timeLineButton.on("click",(function(){t.isPlay=!t.isPlay,t.changePlayStatus()})),this.timeSelect.off("mousedown"),this.timeSelect.on("mousedown",(function(e){t.onTimeSelectMouseDown(e)}))},e}(a.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=function(t){function e(e){return t.call(this,r.deepMix({},e))||this}return n.__extends(e,t),e.prototype.renderInner=function(t){var e=this;this.initElement(t),this.updateElement(),this.renderMarker(),t.off("click"),t.on("click",(function(){e.emit("click")}))},e.prototype.destroy=function(){this.group.off(),t.prototype.destroy.call(this)},e.prototype.initElement=function(t){this.circle=t.addShape("circle",{attrs:{x:this.config.x,y:this.config.y,r:this.config.r,fill:"#607889"}}),this.startMarker=t.addShape("path",{attrs:{path:this.getStartMarkerPath(),fill:"#ffffff"}}),this.pauseGroupMarker=t.addGroup();var e=1/4*this.config.r,i=.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-i/2,width:e,height:i,fill:"#ffffff"}}),this.pauseRightMarker=this.pauseGroupMarker.addShape("rect",{attrs:{x:this.config.x+1/8*this.config.r,y:this.config.y-i/2,width:e,height:i,fill:"#ffffff"}})},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}(n.__importDefault(i(54)).default);e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TooltipIndicationAction=e.TOOLTIP_INDICATOR_EVENTS=void 0;var n,r=i(1),o=i(0),a=r.__importDefault(i(39)),s=i(8),l=r.__importStar(i(254)),u=i(25),c=r.__importDefault(i(13)),h=function(t){return void 0===t&&(t={}),r.__assign({showTotal:!1,showPercent:!1,padding:[8,24,8,24],height:t.showPercent?72:54},t)};!function(t){t.ACTIVE_ELEMENT="tooltip_indicator_active_element",t.ACTIVE_ELEMENT_BY_X="tooltip_indicator_active_element_by_x"}(n=e.TOOLTIP_INDICATOR_EVENTS||(e.TOOLTIP_INDICATOR_EVENTS={}));var p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state="selected",e.isSingle=!1,e}return r.__extends(e,t),e.prototype.active=function(){var t=s.InteractionUtils.getCurrentElement(this.context);t.hasState("selected")?this.isSingle?this.setStateByX(t):this.setState(t):this.setStateByX(t)},e.prototype.setState=function(t){var e=this;u.forEachElement(this.getView(),(function(i){i===t?i.hasState(e.state)||i.setState(e.state,!0):i.setState(e.state,!1)})),this.isSingle=!0,this.getView().emit(n.ACTIVE_ELEMENT,{element:t,isSingle:!0})},e.prototype.setStateByX=function(t){var e=this,i=this.getXField(),r=t.getData()[i];u.forEachElement(this.getView(),(function(t){t.getData()[i]===r?t.hasState(e.state)||t.setState(e.state,!0):t.setState(e.state,!1)})),this.isSingle=!1,this.getView().emit(n.ACTIVE_ELEMENT_BY_X,{element:t,isSingle:!1})},e.prototype.setStateByField=function(t,e){var i=this,n=this.getView().getXScale().field,r=this.getView().getGroupScales()[0].field;u.forEachElement(this.getView(),(function(o){var a=o.getData();o.setState(i.state,a[n]===t&&(void 0===e||a[r]===e))}))},e.prototype.getView=function(){return this.context.view},e.prototype.getXField=function(){return this.context.view.getXScale().field},e}(s.InteractionAction);e.TooltipIndicationAction=p,s.registerAction("tooltip-indicator",p),s.registerInteraction("element-tooltip-indicator",{start:[{trigger:"element:mousemove",action:"tooltip-indicator:active",throttle:{wait:50,leading:!0,trailing:!1}},{trigger:"element:touchmove",action:"tooltip-indicator:active",throttle:{wait:50,leading:!0,trailing:!1}}]});var f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.onElementActive=function(t){var i=t.element,n=t.isSingle,r=e.view.getXScale(),o=e.view.getXScale().field,a=e.view.getGroupScales()[0].field,s=i.getData(),l=s[o],u=e.getLegendItems(l);e.component.update({items:u,title:{text:r.getText(l)}}),e.component.render(),n&&e.component.selectItem(s[a]),e.curX=l},e.onSelectTooltipIndicatorItem=function(t){e.component&&t&&e.getInteractionAction().setStateByField(e.curX,t)},e}return r.__extends(e,t),e.getInteractionRange=function(t,e){var i=h(e),n=i.padding,r=n[0],o=n[2];return new c.default(t.minX,t.minY,t.width,i.height+r+o)},e.prototype.clear=function(){this.component&&this.component.destroy(),this.container&&this.container.remove(!0),this.component=null,this.container=null},e.prototype.render=function(){var t=this,e=this.view,i=function(){var e=t.view.getXScale(),i=o.last(e.getTicks()).tickValue,n=t.view.padding;o.isEqual([0,0,0,0],n)||(t.component?t.updateComponent():(t.createComponent(),t.component.on(l.EVENTS.ON_SELECT_ITEM,t.onSelectTooltipIndicatorItem)),t.curX=i,t.component.update({title:{text:e.getText(t.curX)}}),t.component.render(),t.getInteractionAction().setStateByField(i))};e.legend(!1),e.removeInteraction("active-region"),e.removeInteraction("tooltip"),e.interaction("element-tooltip-indicator"),e.on(s.VIEW_LIFE_CIRCLE.AFTER_PAINT,i),e.on(s.VIEW_LIFE_CIRCLE.AFTER_RENDER,i),e.on(n.ACTIVE_ELEMENT,this.onElementActive),e.on(n.ACTIVE_ELEMENT_BY_X,this.onElementActive)},e.prototype.getInteractionAction=function(){var t=this.view.interactions["element-tooltip-indicator"];return t&&t.context.getAction("tooltip-indicator")},e.prototype.createComponent=function(){var t=h(this.getInteractionConfig()).padding,e=t[0],i=t[1],n=t[2],r=t[3],a=this.getLegendItems(),s=this.getRange(),u=this.view.getXScale(),c=o.last(u.getTicks()).tickValue;this.container=this.canvas.addGroup(),this.component=new l.default({container:this.container,x:s.x+r,y:s.y+e,width:s.width-r-i,height:s.height-e-n,theme:this.getViewLayer().getPlotTheme(),items:a}),this.component.init(),this.getInteractionAction().setStateByField(c)},e.prototype.updateComponent=function(){var t=this.getLegendItems();this.component.update({items:t})},e.prototype.getLegendItems=function(t){var e=this.view,i=e.getData(),n=e.getTheme().defaultColor,r=e.getXScale(),a=e.getYScales()[0],s=t||o.last(r.getTicks()).tickValue,l=e.getLegendAttributes().find((function(t){return"color"===t.type})),u=[],c=e.getGroupScales()[0],h=c.field;c&&c.isCategory&&c.getTicks().forEach((function(t){var e=t.text,i=t.tickValue,r=l.mapping(i).join("")||n;u.push({id:i,title:e,color:r,values:[]})}));var p=(null==i?void 0:i.filter((function(t){return t[r.field]===s})))||[];return u.forEach((function(t){var e=p.find((function(e){return e[h]===t.id}));t.values.push({value:a.formatter?a.formatter(e[a.field]):e[a.field]})})),u},e}(a.default);e.default=f},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EVENTS=e.ELEMENT_NAMES=void 0;var n,r,o,a=i(1),s=i(0),l=a.__importDefault(i(54)),u=i(8),c=i(55),h=i(142),p=a.__importDefault(i(13));!function(t){t.TOOLTIP_INDICATOR_INNER="tooltip_indicator-inner",t.TOOLTIP_INDICATOR_TITLE="tooltip_indicator-title",t.TOOLTIP_INDICATOR_BODY="tooltip_indicator-body",t.TOOLTIP_INDICATOR_ITEM_GROUP="tooltip_indicator-item-group",t.TOOLTIP_INDICATOR_ITEM_BACKGROUND="tooltip_indicator-item-background",t.TOOLTIP_INDICATOR_ITEM_LINE="tooltip_indicator-item-line",t.TOOLTIP_INDICATOR_ITEM_TITLE="tooltip_indicator-item-title",t.TOOLTIP_INDICATOR_ITEM_BODY="tooltip_indicator-item-body",t.TOOLTIP_INDICATOR_ITEM_VALUE_GROUP="tooltip_indicator-item-value-group",t.TOOLTIP_INDICATOR_ITEM_NAME="tooltip_indicator-item-name",t.TOOLTIP_INDICATOR_ITEM_VALUE="tooltip_indicator-item-value"}(n=e.ELEMENT_NAMES||(e.ELEMENT_NAMES={})),function(t){t.ON_SELECT_ITEM="onSelectItem"}(r=e.EVENTS||(e.EVENTS={})),function(t){t[t.LARGE=12]="LARGE",t[t.NORMAL=8]="NORMAL",t[t.SMALL=4]="SMALL"}(o||(o={}));var f=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curX=0,e.curY=0,e.offsetX=0,e.scrollWidth=0,e.onBodyGroupMousemove=function(t){var i=d(t.target,(function(t){return t.get("name")===n.TOOLTIP_INDICATOR_ITEM_GROUP}));if(i){var r=i.get("delegateObject");e.doSelectItem(r.item.id)}},e.onWheel=function(t){var i=e.config.width,n=void 0===i?0:i,r=t.deltaX,o=Math.min(e.scrollWidth-n,0)-(e.scrollWidth/2+Math.max(0,(e.scrollWidth-n)/2)),a=Math.max(e.scrollWidth-n,0)+e.scrollWidth/2+Math.max(0,(e.scrollWidth-n)/2),l=s.clamp(e.offsetX+r,o,a);l!==e.offsetX&&(c.translate(e.bodyGroup,e.offsetX-l,0),e.offsetX=l)},e}return a.__extends(e,t),e.prototype.destroy=function(){this.offEvents(),t.prototype.destroy.call(this)},e.prototype.selectItem=function(t){this.doSelectItem(t)},e.prototype.resetSelect=function(){this.doSelectItem(this.selectedItemId)},e.prototype.initConfig=function(t){var e,i=t.theme,n=void 0===i?{}:i,r={x:0,y:0,title:{text:"",spacingY:o.NORMAL,style:{}},line:{spacingX:o.SMALL,width:2,style:{}},itemTitle:{spacingX:0,spacingY:o.SMALL,style:{}},itemName:{spacingX:o.NORMAL,spacingY:o.SMALL,style:{}},itemValue:{style:{}},itemBackground:{style:{opacity:0,fill:"#000"}},itemSpacing:o.LARGE};this.config=s.deepMix({},null===(e=null==n?void 0:n.components)||void 0===e?void 0:e.tooltipIndicator,r,t),this.selectedItemId=this.config.selectedItem},e.prototype.renderInner=function(t){var e=this;this.resetRender();var i=this.config,r=i.items,o=i.x,a=i.y,s=[],l=t.addGroup({name:n.TOOLTIP_INDICATOR_INNER});this.renderTitle(l),this.bodyGroup=l.addGroup({name:n.TOOLTIP_INDICATOR_BODY}),null==r||r.forEach((function(t,i){s.push(e.renderItem(e.bodyGroup,t,i))})),this.layoutItems(l),c.move(l,o,a),this.applyClip(t),this.bindEvents(l)},e.prototype.renderTitle=function(t){var e=this.config.title;if(null==e?void 0:e.text){var i=t.addShape({type:"text",name:n.TOOLTIP_INDICATOR_TITLE,attrs:a.__assign({text:null==e?void 0:e.text,textAlign:"left",textBaseline:"top"},(null==e?void 0:e.style)||{})}),r=i.getBBox();return this.curY+=r.height,this.curY+=e.spacingY||0,i}},e.prototype.renderItem=function(t,e,i){var r=this.config.itemBackground,o=t.addGroup({name:n.TOOLTIP_INDICATOR_ITEM_GROUP,delegateObject:{item:e,index:i}}),s=this.curX,l=this.curY,u=o.addShape({name:n.TOOLTIP_INDICATOR_ITEM_BACKGROUND,type:"rect",attrs:a.__assign({x:this.curX,y:this.curY,width:1,height:1},r.style||{})}),c=this.renderLine(o,e);this.renderItemTitle(o,e),this.renderItemValues(o,e);var h=o.getBBox();return c.attr({y2:c.attr("y1")+h.height}),this.curX=s+h.width,this.curX+=this.config.itemSpacing||0,u.attr({width:this.curX-s-2*u.attr("lineWidth"),height:this.curY-l-2*u.attr("lineWidth")}),this.curY=l,o},e.prototype.renderLine=function(t,e){var i=this.config.line,r=i.width||2,o=a.__assign({x1:this.curX+r/2,y1:this.curY,x2:this.curX+r/2,y2:this.curY,lineWidth:r,stroke:e.color},(null==i?void 0:i.style)||{}),s=t.addShape({name:n.TOOLTIP_INDICATOR_ITEM_LINE,type:"line",attrs:o}),l=s.getBBox();return this.curX+=l.width,this.curX+=i.spacingX||0,s},e.prototype.renderItemTitle=function(t,e){var i=this.config.itemTitle,r=h.getEllipsisText(e.title,160,i.style||{}),o=t.addShape({name:n.TOOLTIP_INDICATOR_ITEM_TITLE,type:"text",attrs:a.__assign({x:this.curX,y:this.curY,textAlign:"left",textBaseline:"top",text:r},i.style||{})}),s=o.getBBox();return this.curY+=s.height,this.curY+=i.spacingY||0,o},e.prototype.renderItemValues=function(t,e){var i,r=this,o=t.addGroup({name:n.TOOLTIP_INDICATOR_ITEM_BODY}),a=this.curX;return null===(i=e.values)||void 0===i||i.forEach((function(t,i){var s=o.addGroup({name:n.TOOLTIP_INDICATOR_ITEM_VALUE_GROUP,delegateObject:{item:e,valueIndex:i}});r.curX=a,r.renderItemValueName(s,t),r.renderItemValueValue(s,t)})),this.layoutItemValues(o),o},e.prototype.renderItemValueName=function(t,e){var i=this.config.itemName;if(e.name){var r=t.addShape({name:n.TOOLTIP_INDICATOR_ITEM_NAME,type:"text",attrs:a.__assign({x:this.curX,y:this.curY,textAlign:"left",textBaseline:"top",text:e.name},i.style||{})}),o=r.getBBox();return e.wrapLine?(this.curY+=o.height,this.curY+=i.spacingY||0):(this.curX+=o.width,this.curX+=i.spacingX||0),r}},e.prototype.renderItemValueValue=function(t,e){var i=this.config,r=i.itemName,o=i.itemValue,s=t.addShape({name:n.TOOLTIP_INDICATOR_ITEM_VALUE,type:"text",attrs:a.__assign({x:this.curX,y:this.curY,textAlign:"left",textBaseline:"top",text:e.value},o.style||{})}),l=s.getBBox();return this.curY+=l.height,this.curY+=r.spacingY||0,s},e.prototype.layoutItems=function(t){var e=t.findAllByName(n.TOOLTIP_INDICATOR_BODY)[0],i=t.findAllByName(n.TOOLTIP_INDICATOR_ITEM_GROUP);if(e&&0!==i.length){var r=e.getBBox();this.scrollWidth=r.width}},e.prototype.layoutItemValues=function(t){var e=t.findAllByName(n.TOOLTIP_INDICATOR_ITEM_VALUE_GROUP),i=e.map((function(t){return p.default.fromBBoxObject(t.getBBox())})),r=t.findAllByName(n.TOOLTIP_INDICATOR_ITEM_VALUE).map((function(t){return p.default.fromBBoxObject(t.getBBox())})),o=Math.max.apply(Math,r.map((function(t){return t.maxX})));e.forEach((function(t,e){var r=i[e],a=t.findAllByName(n.TOOLTIP_INDICATOR_ITEM_NAME)[0],s=t.findAllByName(n.TOOLTIP_INDICATOR_ITEM_VALUE)[0];if(a&&s){var l=p.default.fromBBoxObject(a.getBBox()),u=p.default.fromBBoxObject(s.getBBox());l.height=i&&c<=n&&"top"===o&&(i=c),u>=i&&u<=n&&"bottom"===o&&(n=u),l>t&&l<=e&&"left"===o&&(t=l),s>=t&&l<=e&&"right"===o&&(e=s)}})),new o.default(t,i,e-t,n-i)},t.prototype._getInnerAutoPadding=function(){var t,e=this.plot.options,i=this.plot.view,n=i.coordinateBBox,a=n.maxX,s=n.maxY,l=n.minY,u=n.minX,c=this.plot.config.theme.bleeding;r.isArray(c)&&r.each(c,(function(t,i){"function"==typeof c[i]&&(c[i]=c[i](e))})),this.bleeding=r.clone(c);var h=[new o.default(n.minX,n.minY,n.width,n.height)];"cartesian"===(null===(t=this.plot.config.coordinate)||void 0===t?void 0:t.type)&&this._getCartesianAxis(i,h[0],h);var p=this._mergeBBox(h);this._getLegend(i,p,h),p=this._mergeBBox(h);var f=this.innerPaddingComponents;r.each(f,(function(t){var e=t.getBBox();h.push(e)}));var d=[l-(p=this._mergeBBox(h)).minY+this.bleeding[0],p.maxX-a+this.bleeding[1],p.maxY-s+this.bleeding[2],u-p.minX+this.bleeding[3]],g=this._getPanel(i);return d[0]+=g[0],d[1]+=g[1],d[2]+=g[2],d[3]+=g[3],d},t.prototype._getCartesianAxis=function(t,e,i){var n=a.getAxisComponents(t),s=t.getCoordinate().isTransposed;r.each(n,(function(t){if(0!==t.get("group").get("children").length){var n=t.get("position"),r=t.getLayoutBBox(),a=r.minX,l=r.minY,u=r.width,c=r.height;s?"bottom"===n?i.push(new o.default(e.minX-u,l,u,c)):"left"===n?i.push(new o.default(a,e.maxY,u,c)):"top"===n&&i.push(new o.default(e.maxX,l,u,c)):"left"===n?i.push(new o.default(e.minX-u,l,u,c)):"bottom"===n?i.push(new o.default(a,e.maxY,u,c)):"right"===n&&i.push(new o.default(e.maxX,l,u,c))}}))},t.prototype._getLegend=function(t,e,i){var n=a.getLegendComponents(t);r.each(n,(function(t){var n=t.get("position").split("-")[0],r=t.getLayoutBBox(),a=r.minX,s=r.minY,l=r.width,u=r.height;"top"===n?i.push(new o.default(a,e.minY-u,l,u)):"bottom"===n?i.push(new o.default(a,e.maxY,l,u)):"left"===n?i.push(new o.default(e.minX-l,s,l,u)):i.push(new o.default(e.maxX,s,l,u))}))},t.prototype._getPanel=function(t){var e=[],i=t.geometries;r.each(i,(function(t){t.labelsContainer&&e.push(t.labelsContainer)}));var n=1/0,o=-1/0,a=1/0,s=-1/0;r.each(e,(function(t){t.get("children").forEach((function(t){if("group"!==t.type||0!==t.get("children").length){var e=t.getBBox();e.minXo&&(o=e.maxX),e.minYs&&(s=e.maxY)}}))}));var l=t.coordinateBBox,u=Math.max(o-parseFloat(l.maxX),0);u>0&&(u*=l.width/(l.width+u));var c=Math.max(parseFloat(l.minX)-n,0);c>0&&(c*=l.width/(l.width+c));var h=Math.max(parseFloat(l.minY)-a,0);h>0&&(h*=l.height/(l.height+h));var p=Math.max(s-parseFloat(l.maxY),0);p>0&&(p*=l.height/(l.height+p));return[h,u,p,c]},t.prototype._mergeBBox=function(t){var e=1/0,i=-1/0,n=1/0,o=-1/0;return r.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)})),{minX:e,maxX:i,minY:n,maxY:o}},t}();e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_DARK_THEME=void 0;var n=i(144);e.DEFAULT_DARK_THEME={backgroundStyle:{fill:"#262626"},defaultColor:"#5B8FF9",width:400,height:400,bleeding:[n.TOP_BLEEDING,24,n.BOTTOM_BLEEDING,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,n.DESCRIPTION_BOTTOM_MARGIN,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",autoRotateTitle:!0,grid:{visible:!0,line:{style:{stroke:"rgba(255, 255, 255, 0.15)",lineWidth:1,lineDash:null}}},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,autoRotate:!1,autoHide:!0,textStyle:{fill:"rgba(255, 255, 255, 0.45)",fontSize:12}},title:{visible:!1,spacing:12,style:{fill:"rgba(255, 255, 255, 0.65)",fontSize:12,textBaseline:"bottom"}}},x:{visible:!0,position:"bottom",autoRotateTitle:!1,grid:{visible:!1,line:{style:{stroke:"rgba(255, 255, 255, 0.15)",lineWidth:1,lineDash:null}}},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,autoHide:!0,autoRotate:!0},title:{visible:!1,spacing:12,style:{fill:"rgba(255, 255, 255, 0.65)",fontSize:12}}},circle:{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},autoRotate:!0,autoHide:!0},title:{offset:12,style:{fill:"#767b84",fontSize:12}}},radius:{label:{offset:12,textStyle:{fill:"#a0a4aa",fontSize:12}}}},legend:{flipPage:!1,position:"bottom",innerPadding:[16,16,16,16],title:{visible:!1,style:{fill:"#bdc8d3"}},text:{style:{fill:"#bdc8d3"}}},label:{offset:12,textStyle:{fill:"rgba(255, 255, 255, 0.65)"},style:{fill:"rgba(255, 255, 255, 0.65)",lineWidth:1}},components:{tooltip:{domStyles:{"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)"}}}}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertToG2Theme=void 0;var n=i(0);e.convertToG2Theme=function(t){var e=n.clone(t);return e.legend||(e.legend={}),e}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_RESPONSIVE_THEME=void 0,e.DEFAULT_RESPONSIVE_THEME={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"}]}}}}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(7),o=i(8),a=i(0),s=n.__importDefault(i(260)),l=i(143),u=n.__importDefault(i(89)),c=function(){function t(t){var e=this;this.onResize=a.debounce((function(){if(!e.plot.destroyed){var t=e.getCanvasSize(),i=t.width,n=t.height;e.width===i&&e.height===n||(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=l.getGlobalTheme(),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("container")},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=u.default.getGlobalTheme(t),i=a.get(e,"backgroundStyle.fill");i&&this.updateCanvasStyle({backgroundColor:i})},t.prototype.updateCanvasStyle=function(t){r.modifyCSS(this.getCanvasDOM(),t),r.modifyCSS(this.canvas.get("el"),{display:"inline-block",verticalAlign:"middle"})},t.prototype.destroy=function(){this.resizeObserver&&(this.resizeObserver.unobserve(this.containerDOM),this.resizeObserver.disconnect(),this.containerDOM=null),this.canvas.destroy()},t.prototype.bindForceFit=function(){this.plot.forceFit&&(this.resizeObserver=new s.default(this.onResize),this.resizeObserver.observe(this.containerDOM))},t.prototype.init=function(){this.initGCanvas(),this.bindForceFit(),this.updateCanvasStyle({position:"relative"})},t.prototype.initGCanvas=function(){var t=this.plot,e=t.renderer,i=void 0===e?"canvas":e,n=t.pixelRatio,r=t.localRefresh,a=void 0!==r&&r,s=this.getCanvasSize(),l=s.width,u=s.height,c="canvas"===i?o.Canvas:o.SVG;this.canvas=new c({localRefresh:a,container:this.containerDOM,width:l,height:u,pixelRatio:n}),this.width=l,this.height=u,this.updateCanvasTheme()},t}();e.default=c},function(t,e,i){"use strict";i.r(e),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__;i0},t.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(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;a.some((function(t){return!!~i.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),u=function(t,e){for(var i=0,n=Object.keys(e);i0},t}(),_="undefined"!=typeof WeakMap?new WeakMap:new i,O=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=l.getInstance(),n=new b(e,i,this);_.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){O.prototype[t]=function(){var e;return(e=_.get(this))[t].apply(e,arguments)}}));var w=void 0!==r.ResizeObserver?r.ResizeObserver:O;e.default=w}.call(this,i(261))},function(t,e){function i(t){return(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)}var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"===("undefined"==typeof window?"undefined":i(window))&&(n=window)}t.exports=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0);var r=function(){function t(t){this.plot=t.plot,this.canvas=t.canvas,this.eventHandlers=[]}return t.prototype.bindEvents=function(){this.addEvent(this.canvas,"mousedown",n.wrapBehavior(this,"onEvents")),this.addEvent(this.canvas,"mousemove",n.wrapBehavior(this,"onMove")),this.addEvent(this.canvas,"mouseup",n.wrapBehavior(this,"onEvents")),this.addEvent(this.canvas,"click",n.wrapBehavior(this,"onEvents")),this.addEvent(this.canvas,"dblclick",n.wrapBehavior(this,"onEvents")),this.addEvent(this.canvas,"contextmenu",n.wrapBehavior(this,"onEvents")),this.addEvent(this.canvas,"wheel",n.wrapBehavior(this,"onEvents"))},t.prototype.clearEvents=function(){var t=this.eventHandlers;n.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;!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,i,n=t.target,r=this.getEventObj(t);!this.isShapeInView(n)&&n.name&&(this.plot.emit(n.name+":"+t.type,r),!this.lastShape||(e=n,i=this.lastShape,e&&i&&e===i)||(this.lastShape&&this.plot.emit(this.lastShape.name+":mouseleave",r),this.plot.emit(n.name+":mouseenter",r)),this.lastShape=n),this.plot.emit("mousemove",r);var o=this.plot.getLayers();o.length>0&&this.onLayerEvent(o,r,"mousemove")},t.prototype.isShapeInView=function(t){for(var e=["frontgroundGroup","backgroundGroup","panelGroup"],i=t.get("parent");i;){var r=i.get("name");if(r&&n.contains(e,r))return!0;i=i.get("parent")}return!1},t.prototype.getEventObj=function(t){return{clientX:t.clientX,clientY:t.clientY,x:t.x,y:t.y,plot:this.plot,data:t.data?t.data.data:null,canvas:this.canvas,target:t.target,gEvent:t}},t.prototype.onLayerEvent=function(t,e,i){var r=this;n.each(t,(function(t){var n=t.getGlobalBBox();if(function(t,e){return t.x>=e.minX&&t.x<=e.maxX&&t.y>=e.minY&&t.y<=e.maxY}({x:e.x,y:e.y},n)){t.emit(""+i,e);var o=t.layers;o.length>0&&r.onLayerEvent(o,e,i)}}))},t}();e.default=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(264);Object.defineProperty(e,"Line",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"LineConfig",{enumerable:!0,get:function(){return r.LineConfig}});var o=i(302);Object.defineProperty(e,"Treemap",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"TreemapConfig",{enumerable:!0,get:function(){return o.TreemapConfig}});var a=i(313);Object.defineProperty(e,"StepLine",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"StepLineConfig",{enumerable:!0,get:function(){return a.StepLineConfig}});var s=i(315);Object.defineProperty(e,"Bar",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"BarConfig",{enumerable:!0,get:function(){return s.BarConfig}});var l=i(319);Object.defineProperty(e,"StackedBar",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"StackedBarConfig",{enumerable:!0,get:function(){return l.StackedBarConfig}});var u=i(323);Object.defineProperty(e,"GroupedBar",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"GroupedBarConfig",{enumerable:!0,get:function(){return u.GroupedBarConfig}});var c=i(325);Object.defineProperty(e,"PercentStackedBar",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"PercentStackedBarConfig",{enumerable:!0,get:function(){return c.PercentStackedBarConfig}});var h=i(326);Object.defineProperty(e,"RangeBar",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"RangeBarConfig",{enumerable:!0,get:function(){return h.RangeBarConfig}});var p=i(330);Object.defineProperty(e,"Area",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"AreaConfig",{enumerable:!0,get:function(){return p.AreaConfig}});var f=i(334);Object.defineProperty(e,"StackedArea",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"StackedAreaConfig",{enumerable:!0,get:function(){return f.StackedAreaConfig}});var d=i(341);Object.defineProperty(e,"PercentStackedArea",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"PercentStackedAreaConfig",{enumerable:!0,get:function(){return d.PercentStackedAreaConfig}});var g=i(342);Object.defineProperty(e,"Column",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"ColumnConfig",{enumerable:!0,get:function(){return g.ColumnConfig}});var y=i(57);Object.defineProperty(e,"ColumnLabel",{enumerable:!0,get:function(){return y.default}});var v=i(347);Object.defineProperty(e,"GroupedColumn",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(e,"GroupedColumnConfig",{enumerable:!0,get:function(){return v.GroupedColumnConfig}});var m=i(349);Object.defineProperty(e,"StackedColumn",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"StackedColumnConfig",{enumerable:!0,get:function(){return m.StackedColumnConfig}});var x=i(171);Object.defineProperty(e,"StackedColumnLabel",{enumerable:!0,get:function(){return x.default}});var b=i(353);Object.defineProperty(e,"RangeColumn",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"RangeColumnConfig",{enumerable:!0,get:function(){return b.RangeColumnConfig}});var _=i(357);Object.defineProperty(e,"PercentStackedColumn",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(e,"PercentStackedColumnConfig",{enumerable:!0,get:function(){return _.PercentStackedColumnConfig}});var O=i(358);Object.defineProperty(e,"Pie",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(e,"PieConfig",{enumerable:!0,get:function(){return O.PieConfig}});var w=i(366);Object.defineProperty(e,"DensityHeatmap",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(e,"DensityHeatmapConfig",{enumerable:!0,get:function(){return w.DensityHeatmapConfig}});var M=i(373);Object.defineProperty(e,"Heatmap",{enumerable:!0,get:function(){return M.default}}),Object.defineProperty(e,"HeatmapConfig",{enumerable:!0,get:function(){return M.HeatmapConfig}});var C=i(379);Object.defineProperty(e,"WordCloud",{enumerable:!0,get:function(){return C.default}}),Object.defineProperty(e,"WordCloudConfig",{enumerable:!0,get:function(){return C.WordCloudConfig}});var S=i(383);Object.defineProperty(e,"Rose",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(e,"RoseConfig",{enumerable:!0,get:function(){return S.RoseConfig}});var j=i(385);Object.defineProperty(e,"Funnel",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(e,"FunnelConfig",{enumerable:!0,get:function(){return j.FunnelConfig}});var P=i(392);Object.defineProperty(e,"StackedRose",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(e,"StackedRoseConfig",{enumerable:!0,get:function(){return P.StackedRoseConfig}});var T=i(394);Object.defineProperty(e,"GroupedRose",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(e,"GroupedRoseConfig",{enumerable:!0,get:function(){return T.GroupedRoseConfig}});var A=i(396);Object.defineProperty(e,"Radar",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(e,"RadarConfig",{enumerable:!0,get:function(){return A.RadarConfig}});var E=i(400);Object.defineProperty(e,"Liquid",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(e,"LiquidConfig",{enumerable:!0,get:function(){return E.LiquidConfig}});var L=i(407);Object.defineProperty(e,"Histogram",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(e,"HistogramConfig",{enumerable:!0,get:function(){return L.HistogramConfig}});var I=i(409);Object.defineProperty(e,"Density",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(e,"DensityConfig",{enumerable:!0,get:function(){return I.DensityConfig}});var D=i(411);Object.defineProperty(e,"Donut",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(e,"DonutConfig",{enumerable:!0,get:function(){return D.DonutConfig}});var k=i(415);Object.defineProperty(e,"Waterfall",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(e,"WaterfallConfig",{enumerable:!0,get:function(){return k.WaterfallConfig}});var B=i(420);Object.defineProperty(e,"Scatter",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(e,"ScatterConfig",{enumerable:!0,get:function(){return B.ScatterConfig}});var F=i(424);Object.defineProperty(e,"Bubble",{enumerable:!0,get:function(){return F.default}}),Object.defineProperty(e,"BubbleConfig",{enumerable:!0,get:function(){return F.BubbleConfig}});var R=i(429);Object.defineProperty(e,"Bullet",{enumerable:!0,get:function(){return R.default}}),Object.defineProperty(e,"BulletConfig",{enumerable:!0,get:function(){return R.BulletConfig}});var N=i(435);Object.defineProperty(e,"Calendar",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(e,"CalendarConfig",{enumerable:!0,get:function(){return N.CalendarConfig}});var Y=i(440);Object.defineProperty(e,"Gauge",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(e,"GaugeConfig",{enumerable:!0,get:function(){return Y.GaugeConfig}});var G=i(442);Object.defineProperty(e,"FanGauge",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(e,"FanGaugeConfig",{enumerable:!0,get:function(){return G.FanGaugeConfig}});var X=i(444);Object.defineProperty(e,"MeterGauge",{enumerable:!0,get:function(){return X.default}}),Object.defineProperty(e,"MeterGaugeConfig",{enumerable:!0,get:function(){return X.MeterGaugeConfig}}),n.__exportStar(i(446),e)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(66)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="line",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importDefault(i(146)),o=n.__importDefault(i(266));e.default={main:r.default,mini:o.default}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(8),o=i(0),a=i(24),s=i(90),l=n.__importDefault(i(146)),u=i(11);function c(t,e,i){var n=[],r=[];o.each(t.points,(function(t){n.push(t[1]),r.push(t[0])})),r=e.parsePoints(r.reverse()),n=a.lineSimplification(e.parsePoints(n));var l=i?s.getSplinePath(n,!1,[[0,0],[1,1]]):h(n),u=h(r);return u[0][0]="L",l.concat(u)}function h(t){for(var e=[],i=0;i0&&(i.values=[t.color[0]]):r.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={};r.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,i=this.config.color,n=this.plot.options[t],o={};r.isFunction(n)?(o.fields=(null==i?void 0:i.fields)||[e.xField,e.yField],o.callback=n):o.cfg=n,this.config.style=o},e.prototype._getSizeProps=function(t){for(var e=0,i=["columnSize","barSize"];e0&&(e.values=[t.color[0]])),this.config.color=e},e.prototype.parseStyle=function(){var t=this.plot.options.line.style,e={};r.isFunction(t)?(e.fields=this.config.position.fields,e.callback=t):e.cfg=t,this.config.style=e},e.prototype._needParseAttribute=function(t){var e=this.plot.options;return!!e[t]||!!e.line[t]},e.prototype._getColorMappingField=function(){for(var t=this.plot.options,e=0,i=["stackField","seriesField"];e0&&(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={};r.isString(t)?e.values=[t]:r.isObject(t)&&(e.fields=t.fields,e.callback=t.callback),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);r.isFunction(e)?(i.fields=[t.xField,t.yField],i.callback=e,n&&i.fields.unshift(n)):i.cfg=e,this.config.style=i},e.prototype._parseColorByField=function(t,e,i){if(e.fields=[i],t.point.color){for(var n=function(t,e){var i=[];return r.each(e,(function(e){var n=e[t];i.push(n)})),r.uniq(i)}(i,t.data).length,o=[],a=0;a0&&(e.values=[t.color[0]]))},e.prototype._needParseAttribute=function(t){var e=this.plot.options;return e.point&&r.has(e.point,t)},e.prototype._getColorMappingField=function(t){for(var e=0,i=a;e=a.x&&r<=s.x){var l=(s.y-a.y)/(s.x-a.x);return[r,a.y+l*(r-a.x)]}}}e.getPlotOption=function(t){n=t},r.registerAnimation("clipingWithData",(function(t,e){var i=o.deepMix({},e,{easing:"easeLinear",duration:1e4}),r=t.get("element").geometry;r.labelsContainer.set("visible",!1);var s=t.get("index"),l=r.coordinate,u=r.scales[n.options.yField],c=o.clone(t.get("origin"));!function(t,e){var i=e.start,n=e.end,r=e.height;t.setClip({type:"rect",attrs:{x:i.x,y:n.y,width:0,height:r}})}(t,l);var h=t.get("clipShape"),p=t.get("parent"),f=null,d=n.options.seriesField;d&&(f=p.addShape("text",{attrs:{x:l.start.x+12,y:0,text:c.data[0][d],fill:t.attr("stroke"),fontSize:12,textAlign:"start",textBaseline:"middle"}}));var g=f?16:0,y=p.addShape("text",{attrs:{x:l.start.x+12,y:g,text:"test"+s,fill:t.attr("stroke"),fontSize:12,textAlign:"start",textBaseline:"middle"}});i.callback=function(){t&&!t.get("destroyed")&&(t.setClip(null),h.remove(),y.animate({opacity:0},300,(function(){y.remove(),o.isNil(f)||f.remove();var t=r.labelsContainer;t.get("visible")||t.set("visible",!0)})))};var v=i.delay;o.isFunction(v)&&(v=i.delay(s));var m=i.easing;o.isFunction(m)&&(m=i.easing(s)),h.animate({width:l.getWidth()},i.duration,m,i.callback,v),i.onFrame=function(t){var e=a(t,c,l);if(e){y.attr("x",e[0]+12),y.attr("y",e[1]+g);var i=function(t,e,i){var n=(e-i.start.y)/(i.end.y-i.start.y);return t.invert(n).toFixed(2)}(u,e[1],l);u.formatter&&(i=u.formatter(i)),y.attr("text",i)}},y.animate(i.onFrame,{duration:i.duration,easing:m,callback:i.callback,delay:v}),f&&f.animate({onFrame:function(t){var e=a(t,c,l);e&&(f.attr("x",e[0]+12),f.attr("y",e[1]))}},i.duration,m,i.callback,v)}))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importDefault(i(276)),o=n.__importDefault(i(292)),a=[{name:"responsiveAxis",method:r.default},{name:"responsivePointLabel",method:o.default}];e.default={preRender:[],afterRender:a}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1).__importDefault(i(67));e.default=function(t){var e=t.getResponsiveTheme(),i=t.canvas;new n.default({plot:t,responsiveTheme:e,dim:"x"}),new n.default({plot:t,responsiveTheme:e,dim:"y"}),i.draw()}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={type:"padding",usage:"assign",expression:function(t,e,i){return void 0===i&&(i={ratio:.6}),e.width*i.ratio}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1).__importStar(i(24));e.default={type:"group",usage:"compare",expression:function(t,e){var i=[t.topLeft,t.topRight,t.bottomRight,t.bottomLeft],r=[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft],o=n.minDistBetweenConvexPolygon(i,r);return Math.round(o)>=2}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1).__importStar(i(24));e.default={type:"chain",usage:"compare",expression:function(t,e,i){void 0===i&&(i={value:4});var r=[t.topLeft,t.topRight,t.bottomRight,t.bottomLeft],o=[e.topLeft,e.topRight,e.bottomRight,e.bottomLeft],a=n.minDistBetweenConvexPolygon(r,o);return Math.round(a)>=i.value}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={type:"chain",usage:"compare",expression:function(t,e,i){void 0===i&&(i={value:5});var n=Math.abs(t.bottom-e.top);return Math.round(n)>=i.value}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={type:"padding",usage:"compare",expression:function(t,e,i){return void 0===i&&(i={ratio:.15}),t.width90&&t<=180)return 180-t;if(t>180&&t<270)return t-180;return 360-t}(l);var u=Math.abs(t.centerX-e.centerX),c=Math.abs(t.centerY-e.centerY);l>45?i="x":l<45&&(i="y");return{dir:i,distX:u,distY:c}}(r[e],r[e+1]).dir,a=t.get("startPoint");"x"===o&&t.attr("y",a.y+20)}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=i(152);e.default=function(t,e,i,o){var a=o.nodes.nodes;if(0!==i){var s=a[i],l=a[i-1];if(r.isNodeOverlap(s,l)){var u=o.plot.view.geometries[0].elements[0],c=l.top-s.height/2;if(c-10>o.region.top){var h=s.shape.get("origin"),p=function(t,e){var i;return n.each(e,(function(e){var n=e;n.get("id")===t&&(i=n)})),i}(u.getShapeId(h),u.getShapes()).get("box"),f=p.left+p.width/2,d=p.top,g=u.get("labelController").labelsContainer.addShape("path",{attrs:{path:[["M",f,d],["L",s.shape.attr("x"),c]],stroke:"#ccc",lineWidth:1}}),y={x:t.attr("x"),y:t.attr("y")};s.shape.attr("y",c-10),a[i]=o.nodes.measure(s.shape),a[i].line=g,a[i].origin_position=y}}}}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(155),o=n.__importDefault(i(44));e.default=function(t,e,i,n){var a=n.nodes.nodes;r.isKeep(e.keep,i,a)||t.attr("text")!==t.get("delegateObject").item.name&&o.default(t)}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(44));e.default=function(t,e,i,n){var a=n.nodes.nodes,s=function(t){var e=r.deepMix([],t);return e.sort((function(t,e){return e.width-t.width})),Math.round(e[0].width)}(a);if(!(i<=1)){var l=a[i],u=function(t,e){for(var i=t-1;i>0;i--){var n=e[i];if(!n.shape.get("blank"))return n}}(i,a),c=u.centerX-l.centerX,h=u.centerY-l.centerY;Math.sqrt(c*c+h*h)1&&(o.parent=t),r.hasKey(o,n)||(o[n]=t[n]),o.showLabel=!0,!i.isLeaf(o)){var a=Math.abs(o.y1-o.y0),l=i.getLabelHeight(),u=a/2>l?l:4;o.showLabel=4!==u;var c=s.default(o,o.x0+4,o.y0+u,o.x1-4,o.y1-4);i.fillColorField(c,n,o[n]),i.recursive(c,o.depth+1)}}))}))},e.prototype.getAllNodes=function(t,e,i){var o=this,a=i||this.options.maxLevel,s=this.getViewRange();r.each(t,(function(t){r.hasKey(t,"x0")&&t.depth<=a&&e.push(n.__assign(n.__assign({},t),{x:[t.x0,t.x1,t.x1,t.x0],y:[s.height-t.y1,s.height-t.y1,s.height-t.y0,s.height-t.y0]})),r.hasKey(t,"children")&&o.getAllNodes(t.children,e)}))},e.prototype.fillColorField=function(t,e,i){r.each(t,(function(t){r.hasKey(t,e)||(t[e]=i)}))},e.prototype.getLabelHeight=function(){var t=this.options.label,e=this.getPlotTheme().label.style.fontSize,i=0;if(t&&t.visible){var n=t.style;i=n&&n.fontSize?n.fontSize:e}return i+8},e.prototype.isLeaf=function(t){return!t.children||0===t.children.length},e.prototype.isNested=function(t){if(1===this.options.maxLevel)return!1;for(var e=!1,i=0;ih&&(h=v),d=(c+=v)*c*f,(g=Math.max(h/d,d/p))>y){c-=v;break}y=g}var w={value:c,dice:_=l){var h=s.substr(0,s.length-1);if(h.length>0)return h+"..."}}return a.remove(),r.remove(),s}var a=function(){function t(t){this.destroyed=!1,this.view=t.view,this.plot=t.plot;var e=this.getDefaultOptions();this.options=n.deepMix(e,t,{}),this.init()}return t.prototype.init=function(){var t=this;this.container=this.getGeometry().labelsContainer,this.view.on("beforerender",(function(){t.clear(),t.plot.canvas.draw()}))},t.prototype.render=function(){var t=this,e=this.getGeometry().elements;n.each(e,(function(e){var i=e.shape,r=i.get("origin").data,o=function(t,e){return!t.children||t.depth>=e}(r,t.plot.options.maxLevel);if(r.showLabel){var a=n.clone(t.options.style),s=t.getPosition(i,o),l=t.options.formatter,u=l?l(r.name):r.name,c=t.getTextBaseLine(o),h=t.container.addShape("text",{attrs:n.deepMix({},a,{x:s.x,y:s.y,text:u,fill:"black",textAlign:"center",textBaseline:c,fontWeight:o?300:600}),name:"label"});t.adjustLabel(h,i,o)}}))},t.prototype.clear=function(){this.container&&this.container.clear()},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.destroy=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getBBox=function(){return this.container.getBBox()},t.prototype.getPosition=function(t,e){var i=t.getBBox(),n=0,r=0;return e?(n=i.minX+i.width/2,r=i.minY+i.height/2):(n=i.x+i.width/2,r=i.y+4),{x:n,y:r}},t.prototype.getTextBaseLine=function(t){return t?"middle":"top"},t.prototype.adjustLabel=function(t,e,i){i?this.adjustLeafLabel(t,e):this.adjustParentLabel(t,e)},t.prototype.adjustLeafLabel=function(t,e){var i=e.getBBox(),a=t.getBBox(),s=n.clone(t.attr("text")),l=Math.max(t.attr("fontSize")-2,8),u=i.x+i.width/2,c=i.y+i.height/2;t.attr({x:u,y:c,textAlign:"center",textBaseline:"middle",lineHeight:l,fontSize:l});var h=i.width-8;if(a.width>i.width&&a.height>i.height)t.attr("text","");else if(hi.width){var p=function(t,e,i){var n=t.attr("fontSize"),o=t.attr("text"),a=i.addShape("text",{attrs:{text:"",x:0,y:0,fontSize:n}}),s=o.split("\n").map((function(t){for(var i="",n=t.split(""),o=[],s=0;se){if(0===s)break;o.push(s),i=""}}return r.breakText(n,o)}));return a.remove(),s.join("\n")}(t,h,this.container);if(t.attr({lineHeight:t.attr("fontSize"),text:p}),t.getBBox().height>i.height){var f=o(s,l,h,this.container);t.attr("text",f)}}},t.prototype.adjustParentLabel=function(t,e){var i=e.getBBox().width-8;if(t.getBBox().width>i){var n=o(t.attr("text"),t.attr("fontSize"),i,this.container);t.attr("text",n)}},t.prototype.getDefaultOptions=function(){var t=this.plot.theme.label.style;return{offsetX:0,offsetY:0,style:n.clone(t)}},t.prototype.getGeometry=function(){return n.find(this.view.geometries,(function(t){return"polygon"===t.type}))},t}();e.default=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(314),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="step-line",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=o.StepLineLayer.getDefaultOptions,e}(n.__importDefault(i(4)).default);e.default=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StepLineLayer=void 0;var n=i(1),r=i(0),o=n.__importDefault(i(66)),a=i(6),s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="step-line",e}return n.__extends(e,t),e.getDefaultOptions=function(){return r.deepMix({},t.getDefaultOptions.call(this),{step:"hv"})},e}(o.default);e.StepLineLayer=s,a.registerPlotType("step-line",s)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(68)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="bar",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=[{name:"responsiveAxis",method:i(1).__importDefault(i(317)).default}];e.default={preRender:[],afterRender:n}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1).__importDefault(i(67));e.default=function(t){var e=t.getResponsiveTheme(),i=t.canvas;new n.default({plot:t,responsiveTheme:e,dim:"x"}),new n.default({plot:t,responsiveTheme:e,dim:"y"}),i.draw()}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.onEvent=e.EVENT_MAP=void 0;var n=i(0),r=i(12);Object.defineProperty(e,"EVENT_MAP",{enumerable:!0,get:function(){return r.EVENT_MAP}}),Object.defineProperty(e,"onEvent",{enumerable:!0,get:function(){return r.onEvent}});var o=r.getEventMap({bar:"interval"});n.assign(r.EVENT_MAP,o)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(95)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="stackedBar",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(11),r=i(93);n.registerTheme("stackedBar",r.DEFAULT_BAR_THEME)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(20),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.adjustLabel=function(t,e){if(this.options.adjustPosition){var i=t.getBBox();this.getElementShapeBBox(e).maxX<=i.maxX&&t.set("visible",!1)}},e}(n.__importDefault(i(94)).default);e.default=o,r.registerLabelComponent("stacked-bar",o)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(20),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.shouldInShapeLabels=function(t){return!0},e}(n.__importDefault(i(162)).default);e.default=o,r.registerLabelComponent("stacked-bar-auto",o)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(163)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="groupedBar",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(11),r=i(93);n.registerTheme("groupedBar",r.DEFAULT_BAR_THEME)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(164)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="percentStackedBar",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(327)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="rangeBar",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(6),a=n.__importDefault(i(68)),s=n.__importDefault(i(328)),l=i(329),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="rangeBar",e}return n.__extends(e,t),e.getDefaultOptions=function(){return r.deepMix(t.getDefaultOptions.call(this),{label:{visible:!0,position:"outer"},xAxis:{visible:!0,autoRotateTitle:!1,grid:{visible:!0},line:{visible:!1},tickLine:{visible:!1},label:{visible:!0,autoRotate:!0,autoHide:!0},title:{visible:!0,spacing:12}},yAxis:{visible:!0,autoRotateTitle:!0,grid:{visible:!1},line:{visible:!0},tickLine:{visible:!0},label:{visible:!0,autoHide:!0,autoRotate:!1},title:{visible:!1,spacing:12}}},{})},e.prototype.afterRender=function(){this.renderLabel();var e=[],i=this.view.geometries;r.each(i,(function(t){var i=t.elements;r.each(i,(function(t){e.push(t.shape)}))})),l.setShapeCache(e),t.prototype.afterRender.call(this)},e.prototype.renderLabel=function(){this.options.label&&this.options.label.visible&&new s.default(n.__assign({view:this.view,plot:this},this.options.label)).render()},e.prototype.animation=function(){t.prototype.animation.call(this)},e}(a.default);e.default=u,o.registerPlotType("rangeBar",u)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(28),a=n.__importDefault(i(13));var s=function(){function t(t){this.destroyed=!1,this.view=t.view,this.plot=t.plot;var e=this.getDefaultOptions();this.options=r.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;this.container=this.getGeometry().labelsContainer,this.view.on("beforerender",(function(){t.clear(),t.plot.canvas.draw()}))},t.prototype.render=function(){var t=this,e=this.getGeometry(),i=e.elements,n=e.coordinate;this.coord=n,r.each(i,(function(e){var i=e.shape,n=t.getPosition(i),o=t.getValue(i),a=t.getTextAlign(),s=[];r.each(n,(function(e,n){var l=0===n?t.options.leftStyle:t.options.rightStyle,u=t.getTextColor(i,n);"inner"===t.options.position&&t.options.adjustColor&&"black"!==u&&(l.stroke=null);var c=t.options.formatter,h=c?c(o[n]):o[n],p=t.container.addShape("text",{attrs:r.deepMix({},l,{x:e.x,y:e.y,text:h,fill:u,textAlign:a[n],textBaseline:"middle"}),name:"label"});s.push(p),t.doAnimation(p)})),i.set("labelShapes",s),t.adjustPosition(s[0],s[1],i)})),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.destroy=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getBBox=function(){return this.container.getBBox()},t.prototype.getShapeBbox=function(t){var e=this,i=[];return r.each(t.get("origin").points,(function(t){i.push(e.coord.convertPoint(t))})),new a.default(i[0].x,i[1].y,Math.abs(i[2].x-i[0].x),Math.abs(i[0].y-i[1].y))},t.prototype.getDefaultOptions=function(){var t=this.plot.theme.label.style;return{position:"outer",offsetX:8,offsetY:0,style:r.clone(t),adjustColor:!0,adjustPosition:!0}},t.prototype.getPosition=function(t){var e,i,n=this.getShapeBbox(t),r=n.minX,o=n.maxX,a=n.minY,s=n.height,l=this.options,u=l.offsetX,c=a+s/2+l.offsetY;return"outer"===this.options.position?(e=r-u,i=o+u):(e=r+u,i=o-u),[{x:e,y:c},{x:i,y:c}]},t.prototype.getValue=function(t){var e=this.plot.options.xField;return t.get("origin").data[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,a=o.rgb2arr(i);return function(t,e){var i;return r.each(t,(function(t){var n=t;e>=n.from&&e2||h>a)&&(u=r-this.options.offsetX,t.attr("fill",this.options.leftStyle.fill),t.attr("textAlign","right"),l[0]=t.getBBox(),c=o+this.options.offsetX,e.attr("fill",this.options.rightStyle.fill),e.attr("textAlign","left"),l[1]=e.getBBox())}l[0].minXn.x&&(n=e),e.x>t&&e.xe)break}return i}var s=function(){function t(t){this.destroyed=!1,this.scaleFactor=[],this.view=t.view,this.plot=t.plot;var e=this.getDefaultOptions();this.options=r.deepMix(e,t,{}),this.init()}return t.prototype.init=function(){var t=this;this.container=this.getGeometry().labelsContainer,this.view.on("beforerender",(function(){t.clear(),t.plot.canvas.draw()}))},t.prototype.render=function(){var t=this,e=this.plot.options.stackField,i=this.getGeometry().dataArray,n=[];r.each(i,(function(e,i){var o=t.drawLabel(e,i);o&&(n.push(r.deepMix({},e[0],o)),t.scaleFactor.push(o.scaleFactor))}));var o=[];r.each(n,(function(i,n){var a=t.options,s=a.style,l=a.offsetX,u=a.offsetY,c=t.getFontSize(n),h=t.options.formatter,p=h?h(i._origin[e]):i._origin[e],f=t.container.addShape("text",{attrs:r.deepMix({},{x:i.x+l,y:i.y+u,text:p,fill:i.color,fontSize:c,textAlign:"center",textBaseline:"top"},s),name:"label"});o.push(f)})),this.plot.canvas.draw()},t.prototype.clear=function(){this.container&&this.container.clear()},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.destroy=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getBBox=function(){return this.container.getBBox()},t.prototype.getDefaultOptions=function(){var t=this.plot.theme,e=r.clone(t.label.style);return e.stroke=null,delete e.fill,{offsetX:0,offsetY:0,style:e,autoScale:!0}},t.prototype.drawLabel=function(t,e){var i=function(t){var e=-1/0,i=1/0,n=-1/0;return r.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}}(t),n=i.xRange,o=i.maxHeight,a=n[1]-n[0],s=this.getInterpolatedPoints(n[0],a,t),l=this.getLabelBbox(e),u={xRange:n,aspect:l.width/l.height,data:s,justTest:!0},c=this.bisection(12,o,this.testFit,u,.01,100);if(null!==c){u.justTest=!1;var h=this.testFit(u);return h.x=h.x,h.y=h.y0+(h.y1-h.y0)/2,h.scaleFactor=c/l.height*.2,h}},t.prototype.getInterpolatedPoints=function(t,e,i){for(var n=[],r=t;re[1])break;for(var c=a(r,u),h=-1/0,p=null,f=1/0,d=s;dh&&(h=g,p=y),f-h=n)return!!o||{x:l,y0:h,y1:p,width:i,height:n}}return!1},t.prototype.getLabelBbox=function(t){var e=r.clone(this.plot.theme.label.textStyle);e.fontSize=12;var i=this.container.addShape("text",{attrs:n.__assign({text:t,x:0,y:0},e)}),o=i.getBBox();return i.remove(),o},t.prototype.getGeometry=function(){return r.find(this.view.geometries,(function(t){return"area"===t.type}))},t.prototype.getFontSize=function(t){return this.options.autoScale?12*this.scaleFactor[t]:12},t}();e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(20),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(n.__importDefault(i(165)).default);e.default=o,r.registerLabelComponent("stackedArea-point",o)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(20),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.sortLabels=function(t,e){var i=[];return e.length>0&&i.push(e.shift()),e.length>0&&i.push(e.pop()),i.push.apply(i,e),i},e}(n.__importDefault(i(166)).default);e.default=o,r.registerLabelComponent("stackedArea-point-auto",o)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(11),r=i(167);n.registerTheme("stackedArea",r.DEFAULT_AREA_THEME)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(168)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="percentStackedArea",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(45)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="column",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=n.__importDefault(i(344)),o=n.__importDefault(i(345)),a=[{name:"responsiveAxis",method:r.default},{name:"responsiveLabel",method:o.default}];e.default={preRender:[],afterRender:a}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1).__importDefault(i(67));e.default=function(t){var e=t.getResponsiveTheme(),i=t.canvas;new n.default({plot:t,responsiveTheme:e,dim:"x"}),new n.default({plot:t,responsiveTheme:e,dim:"y"}),i.draw()}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.getType=function(){return r.get(this.plot.options,["label","position"],"inner")},e}(n.__importDefault(i(158)).default);e.default=function(t){var e=t.getResponsiveTheme();new o({plot:t,responsiveTheme:e})}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});i(65).registerResponsiveTheme("column",{label:{top:{constraints:[{name:"elementCollision"}],rules:{elementCollision:[{name:"nodeJitterUpward"},{name:"nodesResamplingByState",option:{keep:["min","max","median"]}},{name:"textHide"}]}}}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(100)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="groupedColumn",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(11),r=i(99);n.registerTheme("groupedColumn",r.DEFAULT_COLUMN_THEME)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(69)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="stackedColumn",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(0),r=i(64);function o(t,e){var i=[],r=t.get("origin").points;return n.each(r,(function(t){i.push(e.convertPoint(t))})),i}var a=function(){function t(t){this.areas=[],this.lines=[],this._areaStyle={},this._lineStyle={},n.assign(this,t),this._init()}return t.prototype.draw=function(){var t=this,e=this._getGroupedShapes();n.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.destroy=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.backgroundGroup;this.container=e.addGroup(),this.draw(),this.view.on("beforerender",(function(){t.clear()}))},t.prototype._getGroupedShapes=function(){var t=this,e=this.view.getScaleByField(this.field).values,i=this.view.geometries[0].getShapes(),r={};return n.each(e,(function(t){r[t]=[]})),n.each(i,(function(e){var i=e.get("origin").data[t.field];r[i].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 r=this.view.geometries[0].coordinate,a=0;a=n.from&&e2||h>a)&&(c=r-this.options.offsetY,e.attr("fill",this.options.topStyle.fill),e.attr("textBaseline","bottom"),u=o+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-8&&(u=s.maxY-4,t.attr("textBaseline","bottom")),t.attr("y",u),e.attr("y",c),this.plot.canvas.draw()},t.prototype.getGeometry=function(){return r.find(this.view.geometries,(function(t){return"interval"===t.type}))},t}();e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setShapeCache=void 0;var n,r=i(8),o=i(0);function a(t,e){var i=t.getBBox(),n=i.minY+i.height/2;t.setClip({type:"rect",attrs:{x:i.minX,y:n,width:i.width,height:0}}),t.get("clipShape").animate({height:i.height,y:i.minY},e.duration,e.easing,(function(){t.setClip(null)}),e.delay)}function s(t,e){var i=function(t){var e,i=t.id;return o.each(n,(function(t){t.id===i&&(e=t)})),e}(t).attr("path"),r=o.clone(t.attr("path"));t.attr("path",i),t.animate({path:r},e.duration,e.easing,e.callback,100)}a.animationName="clipInFromCenterVertical",e.setShapeCache=function(t){n=t},s.animationName="updateFromCenterVertical",r.registerAnimation("clipInFromCenterVertical",a),r.registerAnimation("updateFromCenterVertical",s)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(172)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="percentStackedColumn",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(101)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="pie",t.prototype.createLayers.call(this,i)},e.prototype.getAngleScale=function(){return this.layers[0].getAngleScale()},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.onEvent=e.EVENT_MAP=void 0;var n=i(0),r=i(12);Object.defineProperty(e,"EVENT_MAP",{enumerable:!0,get:function(){return r.EVENT_MAP}}),Object.defineProperty(e,"onEvent",{enumerable:!0,get:function(){return r.onEvent}});var o=r.getEventMap({pie:"interval"});n.assign(r.EVENT_MAP,o)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieLabelConfig=e.getPieLabel=void 0;var n=i(1),r=i(70);Object.defineProperty(e,"PieLabelConfig",{enumerable:!0,get:function(){return r.PieLabelConfig}});var o=n.__importDefault(i(361)),a=n.__importDefault(i(362)),s=n.__importDefault(i(363)),l={inner:o.default,outer:a.default,"outer-center":s.default};e.getPieLabel=function(t){if(l[t])return l[t];console.warn("this label "+t+" is not registered")}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.percent2Number=void 0;var n=i(1),r=i(0),o=n.__importDefault(i(70)),a=i(102),s=i(24);e.percent2Number=function(t){return Number(t.endsWith("%")?t.slice(0,-1):t)/100};var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.adjustOption=function(e){t.prototype.adjustOption.call(this,e),e.offset>0&&(e.offset=0)},e.prototype.adjustItem=function(t){t.textAlign="middle"},e.prototype.drawLines=function(){},e.prototype.layout=function(t,e){var i=this;t.forEach((function(n,o){o>0&&r.each(t.slice(0,o),(function(t){i.resolveCollision(n,t,e[o])}))}))},e.prototype.getDefaultOptions=function(){var t=this.plot.theme.label.style;return{offsetX:0,offsetY:0,offset:"-30%",style:n.__assign(n.__assign({},t),{textAlign:"center",textBaseline:"middle"})}},e.prototype.resolveCollision=function(t,e,i){var n=this.getCoordinate().center,o=i.angle,l=t.getBBox(),u=e.getBBox(),c={x:(l.minX+l.maxX)/2,y:(l.minY+l.maxY)/2},h=r.clone(c),p=r.clone(c);if(e.get("id")!==t.get("id")){var f=a.getOverlapInfo(l,u),d=f.xOverlap,g=f.yOverlap;if(d&&(h.x=c.x+d,h.y=c.y+Math.tan(o)*d),g){var y=g;y=c.y0?y:u.maxY-l.minY,p.y=c.y+y,p.x=c.x+y/Math.tan(o)}var v=s.distBetweenPoints(c,h)o.x})),a].forEach((function(t,e){n._antiCollision(t,!e,i)}))},e.prototype._antiCollision=function(t,e,i){var n=this,o=this.getLabelHeight(t),s=this.getCoordinate(),l=s.center,u=s.radius,c=this.options.offset,h=u+c,p=Math.min(i.height,Math.max(2*h+2*o,t.length*o)),f=Math.floor(p/o);this.options.allowOverlap||t.slice(f).forEach((function(t){t.get("parent").set("visible",!1)})),t.splice(f,t.length-f),t.sort((function(t,e){return t.getBBox().y-e.getBBox().y}));for(var d,g=!0,y=l.y+p/2,v=l.y-p/2,m=t.map((function(t){var e=t.getBBox();return e.maxY>y&&(y=Math.min(i.maxY,e.maxY)),e.minY0){var b=m[d-1],_=m[d];if(b.pos+b.size>_.pos){b.size+=_.size,b.targets=b.targets.concat(_.targets);var O=r.last(b.targets);b.pos+b.size>O&&(b.pos=O-b.size),m.splice(d,1),g=!0}else b.targets.splice(-1,1,_.pos)}d=0,m.forEach((function(e){var i=o/2;e.targets.forEach((function(){t[d].attr("y",e.pos+i),i+=o,d++}))}));var w=[],M=[];t.forEach((function(t,e){var i=n.arcPoints[e];i.angle>=0&&i.angle<=Math.PI?M.push(t):w.push(t)})),[w,M].forEach((function(o,s){if(o.length){var p=s?r.last(o).getBBox().maxY-l.y:l.y-r.head(o).getBBox().minY;p=Math.max(h,p);var f=c>4?4:0,d=Math.max.apply(0,r.map(t,(function(t){return t.getBBox().width})))+c+f,g=Math.max(h,Math.min((p+h)/2,l.x-(i.minX+d))),y=g*g,v=p*p;o.forEach((function(t,i){var r=n.arcPoints[i],o=t.getBBox(),s=(o.minX,o.width,o.minY+o.height/2),c=Math.pow(s-l.y,2),h=a.getEndPoint(l,r.angle,u),p=(e?1:-1)*f*2;if(c>v)console.warn("异常(一般不会出现)",t.attr("text")),t.attr("x",h.x+p);else{var d=l.x+(e?1:-1)*Math.sqrt((1-c/v)*y);(l.x===h.x&&s===h.y||l.y===h.y&&d===h.x)&&(d=h.x),t.attr("x",d+p)}}))}}))},e.prototype.getLabelHeight=function(t){return this.options.labelHeight?this.options.labelHeight:r.head(t)?r.head(t).getBBox().height:14},e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_OFFSET=void 0;var n=i(1),r=n.__importDefault(i(70));e.DEFAULT_OFFSET=16;var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.adjustOption=function(e){t.prototype.adjustOption.call(this,e),e.offset<0&&(e.offset=0)},e.prototype.getDefaultOptions=function(){var t=this.plot.theme.label.style;return{offsetX:0,offsetY:0,offset:12,style:n.__assign(n.__assign({},t),{textBaseline:"middle"})}},e.prototype.adjustItem=function(t){var e=this.options.offset;"left"===t.textAlign?t.x+=e>4?4:e/2:"right"===t.textAlign&&(t.x-=e>4?4:e/2)},e.prototype.layout=function(t,e,i){},e}(r.default);e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(101);function a(t,e,i){return{x:t.x+i*Math.cos(e),y:t.y+i*Math.sin(e)}}var s=function(){function t(t){this.destroyed=!1,this.view=t.view,this.options=r.deepMix({},this.getDefaultOptions(),t),this._adjustOptions(this.options),this.init()}return t.prototype.init=function(){var t=this;this.container=this.view.geometries[0].labelsContainer,this.view.on("beforerender",(function(){t.clear()}))},t.prototype.render=function(){var t=this;if(this.view&&!this.view.destroyed){var e=r.clone(this.view.getData());this.halves=[[],[]];var i=[],n=this.view.geometries[0].elements;r.each(n,(function(t){i.push(t.shape)})),this.coord=this.view.geometries[0].coordinate;var s=this.options,l=s.allZero,u=s.angleField,c=this.options.fields[0],h=this.view.getScalesByDim("y")[c],p=this.coord.getCenter(),f=this.coord.startAngle,d=this.coord.polarRadius,g=this.view.coordinateBBox,y=g.width,v=g.height;this.width=y,this.height=v;for(var m=f,x=function(t){var n=e[t],s=h.scale(n[c]),f=m+2*Math.PI*s,g=m+(f-m)/2;m=f;var y=a(p,g,d+0),v=a(p,g,d+15),x="#CCC";if(2===b.options.fields.length){var _=b.options.fields[1],O=b.view.geometries[0].scales[_].scale(n[_]);if(O){var w=Math.floor(O*(i.length-1));x=i[w].attr("fill")}}var M={_anchor:y,_inflection:v,_data:n,x:v.x,y:v.y,r:d+15,fill:x,textGroup:null,_side:null},C=[];if(r.each(b.options.fields,(function(t){l&&t===o.percentageField?C.push(n[u]):C.push(n[t])})),b.options.formatter){var S=b.options.formatter(n[u],{_origin:n,color:x},t);r.isString(S)&&(S=[S]),C=S}var j=b.container.addGroup({capture:!1,visible:!1}),P={x:0,y:0,fontSize:b.options.text.fontSize,lineHeight:b.options.text.fontSize,fontWeight:b.options.text.fontWeight,fill:b.options.text.fill},T=n[u];b.options.formatter&&(T=C[0]);var A=r.clone(P);(2===C.length&&(A.fontWeight=700),j.addShape("text",{attrs:r.mix({textBaseline:2===C.length?"top":"middle",text:T},A),data:n,offsetY:2===C.length?2:0,name:"label"}).name="label",2===C.length)&&(j.addShape("text",{attrs:r.mix({textBaseline:"bottom",text:C[1]},P),data:n,offsetY:-2,name:"label"}).name="label");M.textGroup=j,y.xO&&e.splice(O,e.length-O),e.sort((function(t,e){return t.y-e.y})),t._antiCollision(e)})),this.view.canvas.draw()}},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.hide=function(){this.container.set("visible",!1),this.view.canvas.draw()},t.prototype.show=function(){this.container.set("visible",!0),this.view.canvas.draw()},t.prototype.destroy=function(){this.container&&this.container.remove(),this.destroyed=!0},t.prototype.getDefaultOptions=function(){return{text:{fill:"rgba(0, 0, 0, 0.65)",fontSize:12},line:{lineWidth:.5,stroke:"rgba(0, 0, 0, 0.45)"},lineHeight:32,sidePadding:20}},t.prototype._antiCollision=function(t){var e,i=this,n=this.coord,r=n.getHeight(),o=n.center,a=n.getRadius(),s=o.y-a-15-this.options.lineHeight,l=!0,u=r,c=0,h=Number.MIN_VALUE,p=0,f=t.map((function(t){var e=t.y;e>c&&(c=e),e=p&&(p=n),{size:i.options.lineHeight,targets:[e-s]}}));c-s>u&&(u=c-s);for(;l;)for(f.forEach((function(t){var e=(Math.min.apply(h,t.targets)+Math.max.apply(h,t.targets))/2;t.pos=Math.min(Math.max(h,e-t.size/2),u-t.size)})),l=!1,e=f.length;e--;)if(e>0){var d=f[e-1],g=f[e];d.pos+d.size>g.pos&&(d.size+=g.size,d.targets=d.targets.concat(g.targets),d.pos+d.size>u&&(d.pos=u-d.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.options.lineHeight/2,r+=i.options.lineHeight,e++}))}));var y=[];t.forEach((function(t){var e=i._drawLabel(t);i._drawLabelLine(t,p,e),y.push(e)}))},t.prototype._drawLabel=function(t){var e=this.coord,i=e.getCenter(),r=e.getRadius(),o=t.y,a=t.textGroup,s=a.get("children"),l="left"===t._side?1:-1,u=n.__assign({textAlign:"left"===t._side?"right":"left",x:"left"===t._side?i.x-r-this.options.sidePadding:i.x+r+this.options.sidePadding},this.options.style);return this.options.offsetX&&(u.x+=this.options.offsetX*l),s.forEach((function(t){var e=t.get("offsetY"),i=o+e;t.attr(u),t.attr("y",i)})),a.show(),a},t.prototype._drawLabelLine=function(t,e,i){var n=[t._anchor.x,t._anchor.y],r=[t._inflection.x,t._inflection.y],o=t.y,a=t.textGroup;if(a){var s=["left"===t._side?a.getBBox().maxX+4:a.getBBox().minX-4,o],l=[n,r,s];if(r[1]!==o)if(r[1]=this.height/2&&r[1]>o){var u=r,c=s[0]+15,h=s[0]-15,p=["left"===t._side?c:h,r[1]];l=[n,u,p,s],("right"===t._side&&p[0]u[0])&&(l=[n,u,s])}else l=[n,[r[0],o],s];for(var f=[],d=0;d1){var t={type:"linearheatmap",position:{fields:[this.options.xField,this.options.yField]},color:{fields:[this.options.colorField],values:this.options.color},cfg:{intensity:this.options.intensity,radius:this.options.radius}};this.options.radius&&(t.radius=this.options.radius),this.options.intensity&&(t.intensity=this.options.intensity),this.options.tooltip&&(this.options.tooltip.fields||this.options.tooltip.formatter)&&this.geometryTooltip(t),this.setConfig("geometry",t),this.addPoint()}},e.prototype.addPoint=function(){var t=this.options,e={visible:!1,size:0};t.point&&t.point.visible?t.point=r.deepMix(e,t.point):t.point=e;var i=l.getGeom("point","guide",{plot:this});i.active=!1,this.setConfig("geometry",i)},e.prototype.extractLabel=function(){var t=this.options,e=t.label;return(!e||!1!==e.visible)&&s.getComponent("label",n.__assign({plot:this,labelType:"scatterLabel",fields:[t.xField,t.yField],position:"middle",offset:0},e))},e.prototype.legend=function(){this.setConfig("legends",!1)},e.prototype.geometryTooltip=function(t){t.tooltip={};var e=this.options.tooltip;e.fields&&(t.tooltip.fields=e.fields),e.formatter&&(t.tooltip.callback=e.formatter,e.fields||(t.tooltip.fields=[this.options.xField,this.options.yField],this.options.colorField&&t.tooltip.fields.push(this.options.colorField)))},e.prototype.parseEvents=function(){t.prototype.parseEvents.call(this,h)},e.prototype.renderPlotComponents=function(){var t=this;r.each(this.plotComponents,(function(t){t.destroy()}));r.each(["legend","background"],(function(e){var i=n.__assign({view:t.view,plot:t},t.options[e]),r=c.getPlotComponents(t,e,i);r&&(r.render(),t.plotComponents.push(r))}))},e}(a.default);e.default=p,o.registerPlotType("densityHeatmap",p)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(8),o=i(0),a=n.__importStar(i(28)),s=function(t){function e(e){var i=t.call(this,e)||this;return i.type="heatmap",i.paletteCache={},i.intensity=e.intensity,i.radius=e.radius,i}return n.__extends(e,t),e.prototype.createElements=function(t){var e=this.prepareRange(t);return this.prepareSize(),this.prepareBlur(),this.prepareGreyScaleBlurredCircle(this.radius),this.drawWithRange(t,e),null},e.prototype.clear=function(){this.clearShadowCanvasCtx(),t.prototype.clear.call(this)},e.prototype.prepareRange=function(t){var e=this.getAttribute("color").getFields()[0],i=1/0,n=-1/0;return t.forEach((function(t){var r=t._origin[e];r>n&&(n=r),r=e[0]})));for(var u=this.scales[s],c=0;c0&&(t.view.changeData(s),t.view.scale(e,{min:t.colorScale.min,max:t.colorScale.max,nice:t.colorScale.nice}),t.view.render())}}))},t.prototype.getFilteredData=function(){var t=[];return r.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,o=i.data;return r.each(o,(function(i){var r=i[n];r>=t.from&&rn.width||i.height>n.height)&&t.attr("text","")},t}();e.default=o},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(13)),a=function(){function t(t){this.destroyed=!1,this.dataSlides={},this.interactiveEvents={};var e=this.getDefaultOptions();this.options=r.deepMix({},e,t),this.view=this.options.view,this.afterRender=!0,this.init()}return t.prototype.init=function(){var t=this;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 e=this.options.plot.container;this.container&&this.container.remove(),this.container=e.addGroup(),this.view.on("beforerender",(function(){t.clear(),t.options.plot.canvas.draw()}))},t.prototype.render=function(){var t=this.view.geometries[0].scales,e=this.options.plot.options.colorField;this.colorScale=t[e];var i=this.colorScale,n=i.min,r=i.max,o=this.options.plot.options.color;"horizontal"===this.layout?this.renderHorizontal(n,r,o):this.renderVertical(n,r,o),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.offEvent(),this.destroyed=!0},t.prototype.getBBox=function(){var t=this.container.getBBox();return new o.default(this.x,this.y,t.width,t.height)},t.prototype.renderVertical=function(t,e,i){var o=this,a=(e-t)/(i.length-1),s=1/(i.length-1),l=this.height/(i.length-1),u="l(90)";r.each(i,(function(t,e){u+=s*e+":"+t+" "})),this.container.addShape("rect",{attrs:{x:0,y:0,width:this.width,height:this.height,fill:u},name:"legend"}),r.each(i,(function(t,e){var i=l*e;o.container.addShape("path",{attrs:n.__assign({path:[["M",0,i],["L",o.width,i]]},o.options.ticklineStyle)});var r=Math.round(a*e);o.container.addShape("text",{attrs:n.__assign({text:r,textAlign:"left",textBaseline:"middle",x:o.width+4,y:i},o.options.text.style),name:"legend-label"})}));var c=[["M",-10,-7],["L",0,0],["L",-10,7],["Z"]];this.anchor=this.container.addShape("path",{attrs:n.__assign({path:c},this.options.anchorStyle)}),this.anchor.set("visible",!1)},t.prototype.renderHorizontal=function(t,e,i){var o=this,a=(e-t)/(i.length-1),s=1/(i.length-1),l=this.width/(i.length-1),u="l(0)";r.each(i,(function(t,e){u+=s*e+":"+t+" "})),this.container.addShape("rect",{attrs:{x:0,y:0,width:this.width,height:this.height,fill:u},name:"legend"}),r.each(i,(function(t,e){var i=l*e;o.container.addShape("path",{attrs:n.__assign({path:[["M",i,0],["L",i,o.height]]},o.options.ticklineStyle),name:"legend-label"});var r=Math.round(a*e);o.container.addShape("text",{attrs:n.__assign({text:r,textAlign:"center",textBaseline:"top",x:i,y:o.height+4},o.options.text.style)})}));var c=[["M",0,0],["L",-7,-10],["L",7,-10],["Z"]];this.anchor=this.container.addShape("path",{attrs:n.__assign({path:c},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(){return"horizontal"===this.layout?this.view.coordinateBBox.width:10},t.prototype.getDefaultHeight=function(){return"vertical"===this.layout?this.view.coordinateBBox.height:10},t.prototype.legendLayout=function(){var t=this,e=this.view.coordinateBBox,i=this.options.plot.getPlotTheme().bleeding;r.isArray(i)&&r.each(i,(function(e,n){"function"==typeof i[n]&&(i[n]=i[n](t.options.plot.options))}));var n=this.container.getBBox(),o=0,a=0,s=this.options.position.split("-"),l=this.options.plot.width,u=this.options.plot.height;"left"===s[0]?o=i[3]:"right"===s[0]?o=l-i[1]-n.width:"center"===s[1]?o=this.width===e.width?e.x:(l-n.width)/2:"left"===s[1]?o=i[3]:"right"===s[1]&&(o=this.options.plot.width-i[1]-n.width),"bottom"===s[0]?a=u-i[2]-n.height:"top"===s[0]?a=this.getTopPosition(i):"center"===s[1]?a=this.height===e.height?e.y:(u-n.height)/2:"top"===s[1]?a=i[0]:"bottom"===s[1]&&(a=u-i[2]-n.height),this.x=o,this.y=a,this.container.translate(o,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=this,e=("rect"===this.options.plot.options.shapeType?"polygon":"point")+":"+this.options.triggerOn,i=this.options.plot.options.colorField,n=this.colorScale,r=n.min,o=n.max,a=function(e){var n=(e.data.data[i]-r)/(o-r);t.moveAnchor(n)};this.view.on(e,a),this.interactiveEvents[e]={target:this.view,handler:a};var s=function(){t.anchor.set("visible",!1)};this.options.plot.canvas.on("mouseleave",s),this.interactiveEvents.mouseleave={target:this.options.plot.canvas,handler:s}},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])[7]=e,this.anchor.stopAnimate(),this.anchor.animate({matrix:i},400,"easeLinear")}else{var i;e=this.width*t;(i=[1,0,0,0,1,0,0,0,1])[6]=e,this.anchor.stopAnimate(),this.anchor.animate({matrix:i},400,"easeLinear")}},t.prototype.getTopPosition=function(t){return this.options.plot.description?this.options.plot.description.getBBox().maxY+10:this.options.plot.title?this.options.plot.title.getBBox().maxY+10:t[0]},t.prototype.offEvent=function(){r.each(this.interactiveEvents,(function(t,e){var i=t.target,n=t.handler;i.off(e,n)}))},t}();e.default=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(380)),s=i(6),l=function(t){function e(e,i){return i.renderer="canvas",t.call(this,e,i)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="wordCloud",i.container=this.containerDOM,t.prototype.createLayers.call(this,i)},e}(o.default);e.default=l,s.registerPlotType("wordCloud",a.default)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(53)),a=n.__importDefault(i(381)),s=n.__importDefault(i(382)),l=function(t){function e(e){var i=t.call(this,e)||this;return i._toolTipsAction=function(t,e,n,r){e?(i._toolTips.update({items:[{color:t.color||"red",name:t.word,value:t.weight}],x:n.offsetX,y:n.offsetY}),i._toolTips.show()):i._toolTips.hide(),i._toolTips.render(),i._configHoverAction&&i._configHoverAction(t,e,n,r)},i._configHoverAction=e.onWordCloudHover,i._enableToolTips=r.get(e,"tooltip.visible",!0),i.options=r.deepMix({},{width:400,height:400,enableToolTips:!0},e,{onWordCloudHover:i._enableToolTips?i._toolTipsAction:i._configHoverAction}),i}return n.__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 a.default({showTitle:!1,visible:!1,parent:this.options.container,follow:!0,inPanel:!1,items:[]}),this._toolTips.init()},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+"?"+(new Date).getTime(),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();var t=this._targetCanvas.getContext("2d"),e=this.canvas.get("width")/this.canvas.get("el").width;t.scale(e,e),s.default(this._targetCanvas,this.options)},e.prototype._handleG2PlotConfig=function(){var t,e,i,n=this.options.wordStyle.fontSize||[10,60],o=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=r.deepMix({},this.options,{minFontSize:n[0],maxFontSize:n[1],minRotation:o[0],maxRotation:o[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,o=document.createElement("canvas").getContext("2d");o.fillStyle=this.options.backgroundColor||"#fff",o.fillRect(0,0,1,1);for(var a=o.getImageData(0,0,1,1).data,s=n.getImageData(0,0,i.width,i.height),l=n.createImageData(s),u=0;u128?(l.data[u]=a[0],l.data[u+1]=a[1],l.data[u+2]=a[2],l.data[u+3]=a[3]):(l.data[u]=a[0],l.data[u+1]=a[1],l.data[u+2]=a[2],l.data[u+3]=254);n.putImageData(l,0,0),this._targetCanvas.getContext("2d").drawImage(i,0,0),this.options=r.deepMix({},this.options,{clearCanvas:!1}),this._start()},e.prototype._scaleMaskImageCanvas=function(t){var e=document.createElement("canvas");e.width=this.canvas.get("width"),e.height=this.canvas.get("height");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=0;r750?(n.data[r]=255,n.data[r+1]=255,n.data[r+2]=255,n.data[r+3]=0):(n.data[r]=0,n.data[r+1]=0,n.data[r+2]=0,n.data[r+3]=255)}return i.putImageData(n,0,0),e},e}(o.default);e.default=l},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=function(t){function e(e){var i=r.deepMix({},e,{itemTpl:'
      \n \n {name}{value}
      '},e);return t.call(this,i)||this}return n.__extends(e,t),e}(i(8).HtmlTooltip);e.default=o},function(t,e,i){"use strict"; /*! * wordcloud2.js * http://timdream.org/wordcloud2.js/ * * Copyright 2011 - 2013 Tim Chien * Released under the MIT license */Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0);window.setImmediate||(window.setImmediate=window.msSetImmediate||window.webkitSetImmediate||window.mozSetImmediate||window.oSetImmediate||function(){if(!window.postMessage||!window.addEventListener)return null;var t=[void 0],e="zero-timeout-message";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)},function(i){var n=t.length;return t.push(i),window.postMessage(e+n.toString(36),"*"),n}}()||function(t){window.setTimeout(t,0)}),window.clearImmediate||(window.clearImmediate=window.msClearImmediate||window.webkitClearImmediate||window.mozClearImmediate||window.oClearImmediate||function(t){window.clearTimeout(t)});var o=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))}(),a=function(){if(o){for(var t,e,i=document.createElement("canvas").getContext("2d"),n=20;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}}(),s=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},l=function(t,e){if(o){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:a,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,fontScale:1.2,classes:null,onWordCloudHover:null,onWordCloudClick:null},l=[];if(e)for(var u in e)if("wordStyle"===u)for(var c in e[u])c in i&&(i[c]=e[u][c]);else u in i&&(i[u]=e[u]);if(i.minFontSizei.maxFontSize)console.error("minSize cant bigger than maxSize");else{for(var h=0,p=0;p=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))}}i.gridSize=Math.max(Math.floor(i.gridSize),4);var d,g,y,v,m,x,b,_=i.gridSize,O=_-i.maskGapWidth,w=Math.abs(i.maxRotation-i.minRotation),M=Math.min(i.maxRotation,i.minRotation),C=i.rotationSteps;switch(i.color){case"random-dark":b=function(){return W(10,50)};break;case"random-light":b=function(){return W(50,90)};break;default:"function"==typeof i.color&&(b=i.color)}var S=null;"function"==typeof i.classes&&(S=i.classes);var j,P,T=!1,A=[],E=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 o=e-r.left,a=i-r.top,s=Math.floor(o*(n.width/r.width||1)/_),l=Math.floor(a*(n.height/r.height||1)/_);return A&&A[s]&&A[s][l]},L=function(t,e,i,n){n(t?t.id:-1)},I=function(t){var e=E(t);if(j!==e&&(!(P&&e&&e.item)||r.get(e,["item","twiceRender"]))){if(!e)return i.onWordCloudHover(void 0,void 0,t,H),void(i.active&&L(void 0,0,0,H));i.onWordCloudHover(e.item,e.dimension,t,H),i.active&&L(e.item,e.dimension,0,H),j=e}},D=function(t){var e=E(t);e&&(i.onWordCloudClick(e.item,e.dimension,t),t.preventDefault())},k=[],B=function(t){if(k[t])return k[t];var e=8*t,n=e,r=[];for(0===t&&r.push([v[0],v[1],0]);n--;){var o=1;"circle"!==i.shape&&(o=i.shape(n/e*2*Math.PI)),r.push([v[0]+t*o*Math.cos(-n/e*2*Math.PI),v[1]+t*o*Math.sin(-n/e*2*Math.PI)*i.ellipticity,n/e*2*Math.PI])}return k[t]=r,r},F=function(){return i.abortThreshold>0&&(new Date).getTime()-x>i.abortThreshold},R=function(t,e,n){var r=function(t){var e=Math.min(Math.max(i.minFontSize,i.maxFontSize*t/h),i.maxFontSize);return P?e*i.fontScale:e}(e);if(r<=0)return!1;var o=1;rA[1]&&(A[1]=T),MA[2]&&(A[2]=M);break t}0}}return{mu:o,occupied:j,bounds:A,gw:b,gh:x,fillTextOffsetX:v,fillTextOffsetY:m,fillTextWidth:u,fillTextHeight:c,fontSize:r}},N=function(e,n,r,o,a,s,u,c,h,p,f){var d=r.fontSize,g=i.color,y=i.classes;if(f){var v=z(p);g=v?v.color:i.color}else g=b?b(o,a,d,s,u):i.color,y=S?S(o,a,d,s,u):i.classes;var m=r.bounds;m[3],m[0],m[1],m[3],m[2],m[0],t.forEach((function(t){if(t.getContext){var v=t.getContext("2d"),m=r.mu;v.save();var x=i.fontWeight+" "+(d*m).toString(10)+"px "+i.fontFamily;v.scale(1/m,1/m),v.font=x,v.fillStyle=g;var b=(e+r.gw/2)*_*m,O=(n+r.gh/2)*_*m;v.translate(b,O),0!==c&&v.rotate(-c),v.textBaseline="middle",i.selected===p&&(v.shadowColor=i.shadowColor,v.shadowBlur=i.shadowBlur),v.fillText(o,r.fillTextOffsetX*m,(r.fillTextOffsetY+.5*d)*m),f||l.push({gx:e,gy:n,info:r,word:o,weight:a,distance:s,theta:u,rotateDeg:c,attributes:h,id:p,color:g}),v.restore()}else{var w=document.createElement("span"),M="";M="rotate("+-c/Math.PI*180+"deg) ",1!==r.mu&&(M+="translateX(-"+r.fillTextWidth/4+"px) scale("+1/r.mu+")");var C={position:"absolute",display:"block",font:i.fontWeight+" "+d*r.mu+"px "+i.fontFamily,left:(e+r.gw/2)*_+r.fillTextOffsetX+"px",top:(n+r.gh/2)*_+r.fillTextOffsetY+"px",width:r.fillTextWidth+"px",height:r.fillTextHeight+"px",lineHeight:d+"px",whiteSpace:"nowrap",transform:M,webkitTransform:M,msTransform:M,transformOrigin:"50% 40%",webkitTransformOrigin:"50% 40%",msTransformOrigin:"50% 40%"};for(var S in g&&(C.color=g),w.textContent=o,C)w.style[S]=C[S];if(h)for(var j in h)w.setAttribute(j,h[j]);y&&(w.className+=y),t.appendChild(w)}}))},Y=function(e,i,n,r,o){if(!(e>=g||i>=y||e<0||i<0)){if(d[e][i]=!1,n)t[0].getContext("2d").fillRect(e*_,i*_,O,O);T&&(A[e][i]={item:o,dimension:r})}},G=function(e,n,r,o,a,s,l,u){var c=Math.floor(e[0]-n.gw/2),h=Math.floor(e[1]-n.gh/2);n.gw,n.gh;return!!function(t,e,n,r,o){for(var a=o.length;a--;){var s=t+o[a][0],l=e+o[a][1];if(s>=g||l>=y||s<0||l<0){if(!i.drawOutOfBound)return!1}else if(!d[s][l])return!1}return!0}(c,h,0,0,n.occupied)&&(N(c,h,n,r,o,a,e[2],s,l,u,!1),function(e,n,r,o,a){var s,l,u=a.occupied,c=i.drawMask;if(c&&((s=t[0].getContext("2d")).save(),s.fillStyle=i.maskColor),T){var h=a.bounds;l={x:(e+h[3])*_,y:(n+h[0])*_,w:(h[1]-h[3]+1)*_,h:(h[2]-h[0]+1)*_}}for(var p=u.length;p--;){var f=e+u[p][0],d=n+u[p][1];if(!(f>=g||d>=y||f<0||d<0)){var v=z(a.item.id);v&&(a.item.color=v.color),Y(f,d,c,l,a.item)}}c&&s.restore()}(c,h,0,0,n),{gx:c,gy:h,rot:s,info:n})},X=function(t){var e,n,o,a;Array.isArray(t)?(e=t[0],n=t[1]):(e=t.word,n=t.weight,o=t.attributes,a=t.id);var l=r.isNil(t.rotateDeg)?0===i.rotateRatio||Math.random()>i.rotateRatio?0:0===w?M:C>0?M+Math.floor(Math.random()*C)*w/C:M+Math.random()*w:t.rotateDeg,u=R(e,n,l);if(u&&(u.item=t),!u)return!1;if(F())return!1;if(!i.drawOutOfBound){var c=u.bounds;if(c[1]-c[3]+1>g||c[2]-c[0]+1>y)return!1}for(var h=m+1;h--;){var p=B(m-h);i.shuffle&&(p=[].concat(p),s(p));for(var f=0;f=i.data.length)return S(k),V("wordcloudstop",!1),void E("wordcloudstart",L);x=(new Date).getTime();var e=X(i.data[h]),n=!V("wordclouddrawn",!0,{item:i.data[h],drawn:e});if(F()||n)return S(k),i.abort(),V("wordcloudabort",!1),V("wordcloudstop",!1),void E("wordcloudstart",L);h++,k=C(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,g*(_+1),y*(_+1)),e.fillRect(0,0,g*(_+1),y*(_+1))}}));for(var B=[],R=0;R'),o.modifyCSS(n,a.HtmlTooltipTheme[i]);var u=n;if(t){i=a.TooltipCssConst.TITLE_CLASS,n=o.createDom('
      '),o.modifyCSS(n,a.HtmlTooltipTheme[i]),u.appendChild(n);var c=n;i=a.TooltipCssConst.MARKER_CLASS,n=o.createDom(''),o.modifyCSS(n,a.HtmlTooltipTheme[i]),o.modifyCSS(n,{width:"10px",height:"10px"}),c.appendChild(n),l=n,n=o.createDom(""+t+""),c.appendChild(n)}if(e){i=a.TooltipCssConst.LIST_CLASS,n=o.createDom('
        '),o.modifyCSS(n,a.HtmlTooltipTheme[i]),u.appendChild(n);var h=n;e.reduce((function(t,e){s||(s=e.color);var i=r.get(e,"point._origin.__compare__.compareValues");return r.get(e,"point._origin.__compare__.yValues").forEach((function(e,n){return t.push([i[n],e])})),t}),[]).forEach((function(t,e){var r=t[0],s=t[1];i=a.TooltipCssConst.LIST_ITEM_CLASS,n=o.createDom('
      • '+r+""),o.modifyCSS(n,a.HtmlTooltipTheme[i]),l.appendChild(n),i=a.TooltipCssConst.VALUE_CLASS,n=o.createDom(''+s+""),o.modifyCSS(n,a.HtmlTooltipTheme[i]),l.appendChild(n)}))}return s&&l&&o.modifyCSS(l,{backgroundColor:s}),u}}),t.prototype.tooltip.call(this)},e.prototype.addGeometry=function(){var t=this.options,e=u.getGeom("interval","main",{positionFields:[t.dynamicHeight?"_":t.xField,t.yField],plot:this});this.adjustFunnel(e),this.funnel=e,this.setConfig("geometry",e),t.compareField||this.geometryTooltip()},e.prototype.geometryTooltip=function(){var t=this.options.tooltip;t.fields&&(this.funnel.tooltip||(this.funnel.tooltip={}),this.funnel.tooltip.fields=t.fields),t.formatter&&(this.funnel.tooltip||(this.funnel.tooltip={}),this.funnel.tooltip.callback=t.formatter,t.fields||(this.funnel.tooltip.fields=[this.options.xField,this.options.yField]))},e.prototype.animation=function(){var e=this;t.prototype.animation.call(this);var i=this.options;if(!1===i.animation)this.funnel.animate=!1;else{var n=this.getData(),o=r.get(i,"animation.appear.duration"),a=o/(n.length||1);this._animationAppearTimeoutHandler&&(clearTimeout(this._animationAppearTimeoutHandler),delete this._animationAppearTimeoutHandler),this._animationAppearTimeoutHandler=setTimeout((function(){e.fadeInPercentages(a),i.compareField&&e.fadeInCompareTexts(a),delete e._animationAppearTimeoutHandler}),o),this.funnel.animate=r.deepMix({},i.animation,{appear:{animation:i.transpose?"funnelScaleInX":"funnelScaleInY",duration:a,delay:function(t){return r.findIndex(n,(function(e){return r.isEqual(e,t)}))*a},callback:function(t){e.fadeInLabels(t,.5*a)}},enter:{animation:"fade-in"}})}},e.prototype.afterRender=function(){var e=this.options;if(this.resetLabels(),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)}(t.prototype.afterRender.call(this),!1===e.animation&&(this.fadeInLabels(),this.fadeInPercentages(),e.compareField&&this.fadeInCompareTexts()),this._legendsListenerAttached)||(this._legendsListenerAttached=!0,this.view.getController("legend").container.on("mousedown",this._onLegendContainerMouseDown))},e.prototype.updateConfig=function(e){e=this.adjustProps(e),t.prototype.updateConfig.call(this,e),this._legendsListenerAttached=!1},e.prototype.changeData=function(e){var i=this.options;if(!1!==i.animation&&(this._shouldResetPercentages=!1,this._shouldResetLabels=!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(),this.refreshLabels(),i.compareField&&this.fadeInCompareTexts()},e.prototype.geometryParser=function(t,e){return"g2"===t?p[e]:f[e]},e.prototype.adjustProps=function(t){return t.compareField&&(t.dynamicHeight=!1),t.dynamicHeight&&(r.set(t,"meta."+t.yField+".nice",!1),r.set(t,"tooltip.shared",!1)),t},e.prototype.resetPercentages=function(){var t=this;if(this._shouldResetPercentages){var e=this.options,i=e.percentage||{},n=i.offsetX,o=i.offsetY,a=i.spacing,s=i.line,l=void 0===s?{}:s,u=i.text,c=void 0===u?{}:u,h=i.value,p=void 0===h?{}:h,f=Date.now(),d=this._findPercentageContainer(!0);this._eachShape((function(i,s,u,h){if(s>0){var g=i.getBBox(),y=g.minX,v=g.maxX,m=g.maxY,x=g.minY,b=e.transpose?y:v,_=e.transpose&&e.compareField?m:x,O=t._findPercentageMembersInContainerByIndex(d,s,!0),w=O.line,M=O.text,C=O.value,S=[function(t,i,s,d,g){s&&(s.attr(r.deepMix({},l.style,{x1:t,y1:i,x2:e.transpose?t+n:t-n,y2:e.transpose?i-o:i+o,opacity:0})),s.set("adjustTimestamp",f));var y=0,v=0,m=function(){d&&(d.attr(r.deepMix({},c.style,{x:e.transpose?t+n:t-n-a-v-a,y:e.transpose?i-o-a:i+o,opacity:0,text:c.content,textAlign:e.transpose?"left":"right",textBaseline:e.transpose?"bottom":"middle"})),d.set("adjustTimestamp",f),y=d.getBBox().width)},x=function(){g&&(g.attr(r.deepMix({},p.style,{x:e.transpose?t+n+y+a:t-n-a,y:e.transpose?i-o-a:i+o,opacity:0,text:r.isFunction(p.formatter)?e.compareField?p.formatter(r.get(h,"__compare__.yValues.0"),r.get(u,"__compare__.yValues.0")):p.formatter(h[e.yField],u[e.yField]):"",textAlign:e.transpose?"left":"right",textBaseline:e.transpose?"bottom":"middle"})),g.set("adjustTimestamp",f),v=g.getBBox().width)};e.transpose?(m(),x()):(x(),m())},function(t,i,s,d,g){s&&(s.attr(r.deepMix({},l.style,{x1:t,y1:i,x2:t+n,y2:e.transpose?e.compareField?i+o:i-o:i+o,opacity:0})),s.set("adjustTimestamp",f));var y=0;d&&(d.attr(r.deepMix({},c.style,{x:e.transpose?t+n:t+n+a,y:e.transpose?e.compareField?i+o+a:i-o-a:i+o,opacity:0,text:c.content,textAlign:"left",textBaseline:e.transpose?e.compareField?"top":"bottom":"middle"})),d.set("adjustTimestamp",f),y=d.getBBox().width),g&&(g.attr(r.deepMix({},p.style,{x:e.transpose?t+n+y+a:t+n+a+y+a,y:e.transpose?e.compareField?i+o+a:i-o-a:i+o,opacity:0,text:r.isFunction(p.formatter)?e.compareField?p.formatter(r.get(h,"__compare__.yValues.1"),r.get(u,"__compare__.yValues.1")):p.formatter(h[e.yField],u[e.yField]):"",textAlign:"left",textBaseline:e.transpose?e.compareField?"top":"bottom":"middle"})),g.set("adjustTimestamp",f))}];if(e.compareField){var j=[y,x];[[j[0],j[1]],[b,_]].forEach((function(t,e){var i=t[0],n=t[1];return S[e](i,n,w&&w[e],M&&M[e],C&&C[e])}))}else S[1](b,_,w,M,C)}h=u,s++})),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()}),0))}))}},e.prototype.fadeInPercentages=function(t,e){var i=this,n=this.options,o=this._findPercentageContainer(),a=function(e){var n={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0};i._eachShape((function(a,s){var l=i._findPercentageMembersInContainerByIndex(o,s),u={minX:1/0,maxX:-1/0,minY:1/0,maxY:-1/0},c=function(t){if(t&&"text"==t.get("type")){var e=t.getBBox(),i=e.minX,n=e.maxX,r=e.minY,o=e.maxY;iu.maxX&&(u.maxX=n),ru.maxY&&(u.maxY=o)}};if(r.each(l,(function(t){return r.isArray(t)?c(t[e]):c(t)})),u.minX>n.maxX||u.maxXn.maxY||u.maxY=s.minX&&l.maxX<=s.maxX&&l.minY>=s.minY&&l.maxY<=s.maxY){var u={opacity:1};e?a.animate(u,e):a.attr(u)}}}})),e&&i&&setTimeout(i,e)},e.prototype.fadeOutLabels=function(t,e,i){var n=this,r=this._getGeometry().labelsContainer;this._eachShape((function(i,o){if(!t||t==i){var a=n._findLabelInContainerByIndex(r,o);if(a){var s={opacity:0};e?a.animate(s,e):a.attr(s)}}})),e&&i&&setTimeout(i,e)},e.prototype.refreshLabels=function(t){var e=this;if(!1!==this.options.animation){var i=this._calcRefreshFadeDurations(),n=i.fadeOutDuration,r=i.fadeInDuration;this._shouldResetLabels=!1,this.fadeOutLabels(null,n,(function(){e._shouldResetLabels=!0,e.resetLabels(),e.fadeInLabels(null,r,t)}))}},e.prototype._findLabelInContainerByIndex=function(t,e,i){var n,r;if(void 0===i&&(i=!1),!1===(null===(n=this.options.label)||void 0===n?void 0:n.visible))return r;var o="_label-"+e;return!(r=t.get(o))&&i&&(r=t.addShape({id:o,type:"text",attrs:{}}),t.set(o,r)),r},e.prototype.resetCompareTexts=function(){if(this._shouldResetCompareTexts){var t,e,i=this.options;if(this._eachShape((function(i,n,o){0==n&&(t=i.get("parent").getBBox(),e=r.get(o,"__compare__"))})),t&&e&&!1!==r.get(i,"compareText.visible")){var n=this._findCompareTextContainer(!0),o=e.yValuesMax,a=e.compareValues,s=t.minX,l=t.maxX,u=t.minY,c=t.maxY,p=n.get("children");[0,1].forEach((function(t){var e=p[t];e||(e=n.addShape({type:"text"})),e.attr(r.deepMix({},r.get(i,"compareText.style"),{text:i.transpose?a[t]:t?" "+a[t]:a[t]+" ",x:i.transpose?s+r.get(i,"compareText.offsetX"):h(s,l,o[0]/(o[0]+o[1])),y:i.transpose?h(u,c,o[0]/(o[0]+o[1]))+(t?8:-8):u+r.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;if(!1!==this.options.animation){var i=this._calcRefreshFadeDurations(),n=i.fadeInDuration,r=i.fadeOutDuration;this._shouldResetCompareTexts=!1,this.fadeOutCompareTexts(r,(function(){e._shouldResetCompareTexts=!0,e.resetCompareTexts(),e.fadeInCompareTexts(n,t)}))}},e.prototype._findCompareTextContainer=function(t){void 0===t&&(t=!1);var e=this.view.middleGroup,i=e.get("compareTextContainer");return!i&&t&&(i=e.addGroup(),e.set("compareTextContainer",i)),i},e.prototype._eachShape=function(t){var e,i,n=this._findCheckedData(this.getData()),r=n.length,o=0;null===(e=this._getGeometry())||void 0===e||e.elements.forEach((function(e,a){var s=e.shape,l=n[o];oe[t]&&(e[t]=i[t])}))})),t.forEach((function(i,n){r.set(i,"__compare__.yValuesMax",e),r.set(i,"__compare__.yValuesNext",r.get(t,n+1+".__compare__.yValues"))}))},e}(l.default);e.default=d,s.registerPlotType("funnel",d)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});i(11).registerTheme("funnel",{columnStyle:{normal:{},active:function(t){return{opacity:.5*(t.opacity||1)}},disable:function(t){return{opacity:.5*(t.opacity||1)}},selected:{lineWidth:1,stroke:"black"}}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(30),a=i(104);o.registerShape("interval","funnel-basic-rect",{getPoints:function(t){return t.size=1.8*t.size,function(t,e){void 0===e&&(e=!1);var i,n,o,a,s=t.x,l=t.y,u=t.y0,c=t.size;r.isArray(l)?(i=l[0],n=l[1]):(i=u,n=l),r.isArray(s)?(o=s[0],a=s[1]):(o=s-c/2,a=s+c/2);var h=[{x:o,y:i},{x:o,y:n}];return e?h.push({x:a,y:(n+i)/2}):h.push({x:a,y:n},{x:a,y:i}),h}(t)},draw:function(t,e){var i,o=a.getStyle(t,!1,!0),s=r.get(t,"data.__compare__"),l=this.parsePath(function(t,e){var i=[],n=t.points,o=t.nextPoints;if(e){var a=e.yValues,s=e.yValuesMax,l=e.yValuesNext,u=(n[0].y+n[1].y)/2,c=a[0]+a[1],h=a.map((function(t){return t/c/.5})),p=.9*(s[0]/(s[0]+s[1])-.5);if(r.isNil(o))i.push(["M",n[0].x,p+(n[0].y-u)*h[0]+u],["L",n[1].x,p+u],["L",n[2].x,p+u],["L",n[3].x,p+(n[3].y-u)*h[0]+u],["Z"]),i.push(["M",n[0].x,p+.002+u],["L",n[1].x,p+.002+(n[1].y-u)*h[1]+u],["L",n[2].x,p+.002+(n[2].y-u)*h[1]+u],["L",n[3].x,p+.002+u],["Z"]);else{var f=l[0]+l[1],d=l.map((function(t){return t/f/.5}));i.push(["M",n[0].x,p+(n[0].y-u)*h[0]+u-.001],["L",n[1].x,p+u-.001],["L",o[1].x,p+u-.001],["L",o[0].x,p+(o[3].y-u)*d[0]+u-.001],["Z"]),i.push(["M",n[0].x,p+u+.001],["L",n[1].x,p+(n[1].y-u)*h[1]+u+.001],["L",o[1].x,p+(o[2].y-u)*d[1]+u+.001],["L",o[0].x,p+u+.001],["Z"])}}else r.isNil(o)?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",o[1].x,o[1].y],["L",o[0].x,o[0].y],["Z"]);return i}(t,s));return e.addShape("path",((i={name:"interval",attrs:n.__assign(n.__assign({},o),{path:l})}).__compare__=s,i))},getMarker:function(t){return{symbol:"square",style:{r:4,fill:t.color}}}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(30),a=i(104);function s(t,e,i){return(1-i)*t+i*e}o.registerShape("interval","funnel-dynamic-rect",{draw:function(t,e){var i=a.getStyle(t,!1,!0),o=r.get(t,"data.__custom__"),l=this.parsePath(function(t,e){var i=e.reverse,n=e.ratioUpper,r=e.ratioLower,o=[],a=t[0],l=(t[1].x+t[2].x)/2;if(i){var u=r;r=n,n=u}var c=(a.x-l)*s(.6,1.2,r)+l;o.push(["M",c,a.y]);for(var h=1,p=t.length;h.55){var a=this.options.color,s=h.rgb2arr(a);return Math.round(.299*s[0]+.587*s[1]+.114*s[2])/.8<156?{fill:"#f6f6f6",shadowColor:"black"}:e}return e},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,o=e.minY,s=e.width,l=e.height,u=Math.min(s,l)-2*n,c=r+s/2-u/2,h=o+l/2-u/2;return new a.default(c,h,u,u)},e}(l.default);e.default=y,s.registerPlotType("liquid",y)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(173)),a=i(403),s=function(t){function e(e){var i=t.call(this,e)||this;return i.view=e.view,i.plot=e.plot,i.statisticClass=e.statisticClass,i.adjustOptions(),i}return n.__extends(e,t),e.prototype.getTotalHtmlString=function(){var t=document.createElement("div"),e=this.plot.options,i=e.value,n=void 0===i?0:i,o=e.statistic;if(o&&!o.visible)return t;var s=this.options.htmlContent(n);return r.isType(s,"HTMLDivElement")?t.appendChild(s):t.innerHTML=a.getTemplate(s,this.statisticClass),t},e.prototype.adjustOptions=function(){this.html=this.getTotalHtmlString();var t=this.view.coordinateBBox,e=t.minX,i=t.minY,n=t.width,r=t.height;this.x=e+n/2,this.y=i+r/2},e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTemplate=void 0;e.getTemplate=function(t,e){return'
        "+(''+t+"")+"
        "}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.onEvent=e.EVENT_MAP=void 0;var n=i(0),r=i(12);Object.defineProperty(e,"EVENT_MAP",{enumerable:!0,get:function(){return r.EVENT_MAP}}),Object.defineProperty(e,"onEvent",{enumerable:!0,get:function(){return r.onEvent}});var o=r.getEventMap({liquid:"intervl",statistic:"annotation-text"});n.assign(r.EVENT_MAP,o)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(8),r=i(0),o=i(11),a=i(55),s=o.getGlobalTheme(),l=function(t,e){e.color&&!t.fill&&(t.fill=e.color),r.isNumber(e.opacity)&&(t.opacity=t.fillOpacity=e.opacity)},u=function(t,e){e.color&&!t.stroke&&(t.stroke=e.color),r.isNumber(e.opacity)&&(t.opacity=t.strokeOpacity=e.opacity)},c=function(t,e,i){return(1-i)*t+i*e},h=function(t){var e={fill:"#fff",stroke:s.color,fillOpacity:0,lineWidth:2},i=r.mix({},e,t.style);return u(i,t),i};function p(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 f(t,e,i,n,r,o,a){for(var s=2*Math.ceil(2*t/i*4),l=[],u=n;u<2*-Math.PI;)u+=2*Math.PI;for(;u>0;)u-=2*Math.PI;var c=o-t+(u=u/Math.PI/2*i)-2*t;l.push(["M",c,e]);for(var h=0,f=0;f"+(t?''+t+"
        ":"")+(''+e+"")+""}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(105)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="waterfall",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0);i(8).registerShape("interval","waterfall",{draw:function(t,e){var i=function(t,e,i){var r=t.style,o=t.defaultStyle,a=t.color,s=n.__assign(n.__assign({},o),r);return a&&(e&&(s.stroke=a),i&&(s.fill=a)),s}(t,!1,!0),o=this.parsePath(function(t){var e=[],i=t[0];e.push(["M",i.x,i.y]);for(var n=1,r=t.length;n0?"+"+h:h,l[o.IS_TOTAL]&&(h=c[0]-c[1]);var p=h;if(t.formatter){var f=i[s].attr("fill");p=t.formatter(""+h,{_origin:e[s],color:f},s)}var d=t.container.addShape("text",{attrs:n.__assign({text:p,textBaseline:"middle",textAlign:"center",x:(u.minX+u.maxX)/2,y:(u.minY+u.maxY)/2},t.textAttrs),name:"dill-label"});d.getBBox().height>u.height&&d.set("visible",!1)}})),this.view.getCanvas().draw()}},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype._init=function(){var t=this;this.view.on(a.VIEW_LIFE_CIRCLE.BEFORE_RENDER,(function(){t.clear()})),this.view.on(a.VIEW_LIFE_CIRCLE.AFTER_RENDER,(function(){t.draw()}))},t}();e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(175)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="scatter",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(13)),a=function(){function t(t){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.options,i=e.xBaseline,n=e.yBaseline,r=this.view.getCoordinate(),a=this.view.getScaleByField(this.options.plotOptions.xField),s=this.view.getScaleByField(this.options.plotOptions.yField);if(i>a.min&&is.min&&n1){var f={name:"top-right",bbox:new o.default(t[1].minX,t[1].minY,t[1].width,t[1].height*(1-l)),index:2};this.regionData.push(f);var d={name:"bottom-right",bbox:new o.default(t[1].minX,t[1].minY+t[1].height*(1-l),t[1].width,t[1].height*l),index:3};this.regionData.push(d)}}else if(2===t.length)if(n<=s.min){var g={name:"top-left",bbox:t[0],index:0};this.regionData.push(g);f={name:"top-right",bbox:t[1],index:2};this.regionData.push(f)}else{var y={name:"bottom-left",bbox:t[0],index:1};this.regionData.push(y);d={name:"bottom-right",bbox:t[1],index:3};this.regionData.push(d)}else if(i<=a.min)if(n<=s.min){f={name:"top-right",bbox:t[0],index:2};this.regionData.push(f)}else{d={name:"bottom-right",bbox:t[0],index:3};this.regionData.push(d)}else if(n<=s.min){g={name:"top-left",bbox:t[0],index:0};this.regionData.push(g)}else{y={name:"bottom-left",bbox:t[0],index:1};this.regionData.push(y)}this.container=this.view.backgroundGroup.addGroup()},t.prototype.render=function(){var t=this;if(this.regionData.length>0){var e=this.getDefaultStyle(),i=this.getRegionStyle(this.regionData);r.each(this.regionData,(function(o){var a=o.index,s=t.container.addGroup(),l=s.addShape("rect",{attrs:n.__assign({x:o.bbox.minX,y:o.bbox.minY,width:o.bbox.width,height:o.bbox.height},i[a]),name:"quadrant"});if(t.options.label&&t.options.label.text){var u=r.deepMix({},e.label,t.options.label),c=t.getLabelConfig(o,u);s.addShape("text",{attrs:n.__assign({},c),name:"quadrant-label"})}l.set("data",o),t.quadrantGroups.push(s)}));var o=r.deepMix({},e.line,this.options.lineStyle);r.each(this.lineData,(function(e){t.container.addShape("path",{attrs:n.__assign({path:[["M",e.start.x,e.start.y],["L",e.end.x,e.end.y]]},o),name:"quadrant-line"})})),this.view.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},regionStyle:[{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=this.getDefaultStyle().regionStyle;if(this.options.regionStyle){var i=this.options.regionStyle;r.isArray(i)?e=e.map((function(t,e){return i.length>e&&i[e]?i[e]:t})):r.isFunction(i)&&r.each(t,(function(t,n){e[n]=i(t)}))}return e},t.prototype.getLabelConfig=function(t,e){var i=t.index,o=0,a=0,s={},l=e.text;r.isFunction(l)?l=l(t):r.isArray(l)&&(l=l[i]);var u=e.position.split("-"),c=t.name.split("-");return"left"===c[1]?("inner"===u[0]&&(o=t.bbox.maxX-e.offset,s.textAlign="right"),"outter"===u[0]&&(o=t.bbox.minX+e.offset,s.textAlign="left")):"right"===c[1]&&("inner"===u[0]&&(o=t.bbox.minX+e.offset,s.textAlign="left"),"outter"===u[0]&&(o=t.bbox.maxX-e.offset,s.textAlign="right")),"top"===c[0]?("inner"===u[1]&&(a=t.bbox.maxY-e.offset,s.textBaseline="bottom"),"outter"===u[1]&&(a=t.bbox.minY+e.offset,s.textBaseline="top")):"bottom"===c[0]&&("inner"===u[1]&&(a=t.bbox.minY+e.offset,s.textBaseline="top"),"outter"===u[1]&&(a=t.bbox.maxY-e.offset,s.textBaseline="bottom")),(s=r.deepMix({},e.style,s)).lineHeight=s.fontSize,n.__assign({x:o,y:a,text:l},s)},t}();e.default=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(21),a=i(478),s=i(90),l={exp:a.regressionExp,linear:a.regressionLinear,loess:a.regressionLoess,log:a.regressionLog,poly:a.regressionPoly,pow:a.regressionPow,quad:a.regressionQuad};var u=function(){function t(t){this.options=r.deepMix({},{type:"linear",style:{stroke:"#9ba29a",lineWidth:2,opacity:.5,lineJoin:"round",lineCap:"round"},showConfidence:!1,confidenceStyle:{fill:"#ccc",opacity:.1}},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=l[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.backgroundGroup.addGroup()},t.prototype.render=function(){var t=this.view.getScaleByField(this.options.plotOptions.xField),e=this.view.getScaleByField(this.options.plotOptions.yField),i=this.view.getCoordinate(),r=this.data.trendlineData,a=o.getScale("linear"),l=this.adjustScale(t,r,"x"),u=new a({min:l.min,max:l.max}),c=this.adjustScale(e,r,"y"),h=new a({min:c.min,max:c.max});if(this.options.showConfidence){var p=this.getConfidencePath(u,h,i);this.container.addShape("path",{attrs:n.__assign({path:p},this.options.confidenceStyle),name:"confidence"})}var f=this.getTrendlinePoints(u,h,i),d=s.getSplinePath(f,!1,[[0,0],[1,1]]);this.shape=this.container.addShape("path",{attrs:n.__assign({path:d},this.options.style),name:"trendline"})},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 r.each(t,(function(n){e.push({x:n[0],y:n[1]});var r,o,a=(r=t.rSquared,o=n[1],1.96*Math.sqrt(r*(1-r)/o));i.push({x:n[0],y0:n[1]-a,y1:n[1]+a})})),{trendlineData:e,confidenceData:i}},t.prototype.getTrendlinePoints=function(t,e,i){var n=[];return r.each(this.data.trendlineData,(function(r){var o=t.scale(r.x),a=e.scale(r.y),s=i.start.x+i.width*o,l=i.start.y-i.height*a;n.push({x:s,y:l})})),n},t.prototype.getConfidencePath=function(t,e,i){var n=[],o=[],a=[];r.each(this.data.confidenceData,(function(r){var a=t.scale(r.x),s=e.scale(r.y0),l=e.scale(r.y1),u=i.start.x+i.width*a,c=i.start.y-i.height*s,h=i.start.y-i.height*l;n.push({x:u,y:c}),o.push({x:u,y:h})}));for(var s=0;s0;c--){u=o[c];isNaN(u.x)||isNaN(u.y)||a.push(["L",u.x,u.y])}return a},t.prototype.adjustScale=function(t,e,i){var n=t.min,o=t.max,a=this.options.plotOptions,s=a.data,l=a.xField,u=a.yField,c="x"===i?l:u,h=r.minBy(s,c)[c],p=r.maxBy(s,c)[c],f=(n-h)/(p-h),d=(o-p)/(p-h),g=r.minBy(e,i)[i],y=r.maxBy(e,i)[i];return{min:g+f*(y-g),max:y+d*(y-g)}},t}();e.default=u},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});i(11).registerTheme("scatter",{pointStyle:{normal:{},active:function(t){return{stroke:t.stroke||"#000"}},selected:function(t){return{stroke:t.stroke||"#000",lineWidth:t.lineWidth||2}},inactive:function(t){return{fillOpacity:t.fillOpacity||t.opacity||.3}}}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(425)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="bubble",t.prototype.createLayers.call(this,i)},e.prototype.getSizeScale=function(){return this.layers[0].getSizeScale()},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(6),a=n.__importStar(i(176)),s=n.__importDefault(i(175));i(426),i(428);var l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e}return n.__extends(e,t),e.getDefaultOptions=function(){return r.deepMix({},t.getDefaultOptions.call(this),{pointSize:[2,32],pointStyle:{stroke:null,strokeOpacity:1,fillOpacity:.5},label:{position:"middle",style:{stroke:"#fff",lineWidth:2}},shape:"bubble-point"})},e.prototype.getSizeScale=function(){var t=this.options.sizeField;t&&this.view.getScaleByField(t)},e.prototype.legend=function(){var e;t.prototype.legend.call(this),this.options.legend&&!1===this.options.legend.visible||this.setConfig("legends",((e={})[this.options.sizeField]=!1,e))},e.prototype.parseEvents=function(){t.prototype.parseEvents.call(this,a)},e}(s.default);e.default=l,o.registerPlotType("bubble",l)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(30),r=i(427);n.registerShape("point","bubble-point",{draw:function(t,e){var i=r.drawPoints(this,t,e,"circle",!1);if(!t.style.stroke){var n=i.attr("fill");i.attr("stroke",n)}return i},getMarker:function(t){return{symbol:"circle",style:{r:4.5,fill:t.color}}}})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.drawPoints=e.HOLLOW_SHAPES=e.SHAPES=void 0;var n=i(2),r=i(131),o=i(104);e.SHAPES=["circle","square","bowtie","diamond","hexagon","triangle","triangle-down"],e.HOLLOW_SHAPES=["cross","tick","plus","hyphen","line"],e.drawPoints=function(t,e,i,a,s){var l=o.getStyle(e,s,!s,"r"),u=t.parsePoints(e.points),c=u[0];if(e.isStack)c=u[1];else if(u.length>1){for(var h=i.addGroup(),p=0,f=u;p0&&c!==s-1&&this.container.addShape("path",{attrs:n.__assign({path:[["M",h,t.minY],["L",h,t.maxY]]},f)}).set("zIndex",-1)}}},t.prototype.clear=function(){this.container&&this.container.clear()},t.prototype.destroy=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.prototype.getGeometry=function(){return r.find(this.view.geometries,(function(t){return"interval"===t.type}))},t}();e.default=a},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=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.foregroundGroup.addGroup(),this.container.set("name","targetGroups");for(var t=r.map(this.getGeometry().elements,(function(t){return t.shape})),e=0;es&&(s=(e=[o,s])[0],o=e[1]),[o,s]}e.generateCalendarData=function(t,e,i){for(var u=[],c=l(e),h=c[0],p=c[1],f=new Date(h),d=function(){var e,l=r.default.format(f,a.FORMATTER),c=o.find(t,(function(t){return t[i]===l}));u.push(n.__assign(((e={})[a.DAY_FIELD]=s.getDay(f),e[a.WEEK_FIELD]=""+s.getWeek(f),e[i]=l,e[a.DATE_FIELD]=new Date(f),e),c)),s.advanceBy(f,s.DAY_MS)};f<=p;)d();return u},e.getMonthCenterWeek=function(t){var e=l(t),i=e[0],n=e[1],r=new Map;function a(t){var e=t.getMonth(),i=s.getWeek(t);r.has(e)||r.set(e,[]),r.get(e).push(i)}for(var u=new Date(i);u<=n;)a(u),s.advanceBy(u,7*s.DAY_MS);n=60?1-20/n:1-10/n},e}(s.default);e.default=c,o.registerPlotType("ringProgress",c)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.onEvent=e.EVENT_MAP=void 0;var n=i(0),r=i(12);Object.defineProperty(e,"EVENT_MAP",{enumerable:!0,get:function(){return r.EVENT_MAP}}),Object.defineProperty(e,"onEvent",{enumerable:!0,get:function(){return r.onEvent}});var o=r.getEventMap({ringProgress:"interval"});n.assign(r.EVENT_MAP,o)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(463)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="tinyColumn",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=i(6),a=i(17),s=n.__importDefault(i(58)),l=n.__importStar(i(464)),u={column:"interval"},c={interval:"column"},h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tinyColumn",e}return n.__extends(e,t),e.prototype.init=function(){this.processProps(),t.prototype.init.call(this)},e.prototype.geometryParser=function(t,e){return"g2"===t?u[e]:c[e]},e.prototype.scale=function(){var t={};t[this.options.xField]={type:"cat"},this.setConfig("scales",t)},e.prototype.addGeometry=function(){var t=this.options,e=a.getGeom("interval","main",{positionFields:[t.xField,t.yField],plot:this});this.setConfig("geometry",e)},e.prototype.parseEvents=function(){t.prototype.parseEvents.call(this,l)},e.prototype.processProps=function(){var t={padding:[0,0,0,0],columnSize:this.getSize()};this.options=r.mix(this.options,t)},e.prototype.getSize=function(){var t=this.options,e=this.getColumnNum(t.data,t.xField);return this.width/e*.6},e.prototype.getColumnNum=function(t,e){var i=[];return r.each(t,(function(t){var n=t[e];i.indexOf(n)<0&&i.push(n)})),i.length},e}(s.default);e.default=h,o.registerPlotType("tinyColumn",h)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.onEvent=e.EVENT_MAP=void 0;var n=i(0),r=i(12);Object.defineProperty(e,"EVENT_MAP",{enumerable:!0,get:function(){return r.EVENT_MAP}}),Object.defineProperty(e,"onEvent",{enumerable:!0,get:function(){return r.onEvent}});n.assign(r.EVENT_MAP,{onColumnClick:"interval:click",onColumnDblclick:"interval:dblclick",onColumnMousemove:"interval:mousemove",onColumnMousedown:"interval:mousedown",onColumnMouseup:"interval:mouseup",onColumnMouseenter:"interval:mouseenter",onColumnMouseleave:"interval:mouseleave",onColumnContextmenu:"interval:contextmenu"})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(466)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="tinyArea",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(6),o=i(17),a=n.__importDefault(i(58)),s=n.__importStar(i(467)),l={area:"area",line:"line"},u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tinyArea",e}return n.__extends(e,t),e.prototype.geometryParser=function(t,e){return l[e]},e.prototype.addGeometry=function(){this.area=o.getGeom("area","mini",{plot:this}),this.setConfig("geometry",this.area),this.line=o.getGeom("line","mini",{plot:this}),this.setConfig("geometry",this.line)},e.prototype.parseEvents=function(){t.prototype.parseEvents.call(this,s)},e}(a.default);e.default=u,r.registerPlotType("tinyArea",u)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.onEvent=e.EVENT_MAP=void 0;var n=i(0),r=i(12);Object.defineProperty(e,"EVENT_MAP",{enumerable:!0,get:function(){return r.EVENT_MAP}}),Object.defineProperty(e,"onEvent",{enumerable:!0,get:function(){return r.onEvent}});n.assign(r.EVENT_MAP,{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"})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(469)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="tinyLine",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(6),o=i(17),a=n.__importDefault(i(58)),s=n.__importStar(i(470)),l={line:"line"},u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tinyLine",e}return n.__extends(e,t),e.prototype.geometryParser=function(t,e){return l[e]},e.prototype.addGeometry=function(){this.line=o.getGeom("line","mini",{plot:this}),this.setConfig("geometry",this.line)},e.prototype.parseEvents=function(){t.prototype.parseEvents.call(this,s)},e}(a.default);e.default=u,r.registerPlotType("tinyLine",u)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.onEvent=e.EVENT_MAP=void 0;var n=i(0),r=i(12);Object.defineProperty(e,"EVENT_MAP",{enumerable:!0,get:function(){return r.EVENT_MAP}}),Object.defineProperty(e,"onEvent",{enumerable:!0,get:function(){return r.onEvent}});n.assign(r.EVENT_MAP,{onLineClick:"line:click",onLineDblclick:"line:dblclick",onLineMousemove:"line:mousemove",onLineMousedown:"line:mousedown",onLineMouseup:"line:mouseup",onLineMouseenter:"line:mouseenter",onLineMouseleave:"line:mouseleave",onLineContextmenu:"line:contextmenu"})},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(472)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="dualLine",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(16),o=i(6),a=n.__importDefault(i(179)),s=n.__importDefault(i(66)),l=i(0),u={lineSize:2,connectNull:!0,point:{visible:!1,size:3,shape:"circle",style:{stroke:"#fff"}},label:{visible:!1}},c={visible:!0,colorMapping:!0,grid:{visible:!0},line:{visible:!1},tickLine:{visible:!1},label:{visible:!0,autoHide:!0,autoRotate:!1},title:{autoRotate:!0,visible:!1,offset:12}},h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dualLine",e}return n.__extends(e,t),e.getDefaultOptions=function(){return l.deepMix({},t.getDefaultOptions.call(this),{legend:{visible:!0},yAxis:{leftConfig:c,rightConfig:c},lineConfigs:[l.deepMix({},u,{color:"#5B8FF9"}),l.deepMix({},u,{color:"#e76c5e"})]})},e.prototype.init=function(){var e=this;if(t.prototype.init.call(this),this.checkData()){var i=this.options,r=i.data,o=i.meta,a=i.xField,u=i.yField,c=i.xAxis,h=i.tooltip,p=i.lineConfigs,f=i.legend,d=i.events,g=i.customMeta;this.colors=[p[0].color,p[1].color];var y=this.getYAxisGlobalConfig();this.createLayer(s.default,r[0],n.__assign({meta:o,xField:a,yField:u[0],xAxis:{visible:!1},yAxis:l.deepMix({},y,{grid:{visible:!1},nice:!0},this.yAxis(0)),tooltip:{visible:!1},events:d},p[0])).render();var v={};v[u[1]]={ticks:this.getTicks()},this.createLayer(s.default,r[1],n.__assign({xField:a,yField:u[1],meta:g?o:l.deepMix({},o,v),serieField:u[1],xAxis:c,yAxis:l.deepMix({},y,{position:"right",nice:!1},this.yAxis(1)),tooltip:l.deepMix({},{showMarkers:!1,custom:{onChange:function(t,i){e.tooltip(t,i)}}},h),events:d},p[1])).render(),f.visible&&this.customLegend(),this.adjustLayout()}},e.prototype.tooltip=function(t,e){if(this.getUnCheckedValue().length!==this.colors.length){t.style.display="block";var i=this.options,r=i.yField,o=i.legend,a=l.clone(e.items[0]),s=this.getDataByXField(e.title,0)[0];s&&l.findIndex(e.items,(function(t){return t.name===r[0]}))<0&&e.items.push(n.__assign(n.__assign({},a),{mappingData:l.deepMix({},a.mappingData,{_origin:s}),data:s,name:r[0],value:s[r[0]],color:this.colors[0]})),o.visible&&l.each(this.legends,(function(t,i){if(t.get("items")[0].unchecked){var n=0===i?1:0;e.items.splice(n,1)}}))}else t.style.display="none"},e.prototype.customLegend=function(){var t=this,e=this.options,i=e.yField,n=e.legend,o=this.colors,a=this.container.addGroup(),s=n;l.each(this.geomLayers,(function(e,n){var u=l.deepMix({},{symbol:"circle",style:{r:4,fill:o[n]}},s.marker),c=[{name:i[n],unchecked:!1,marker:u}],h=new r.Legend.Category({id:t.type,container:a,x:0,y:0,items:c,updateAutoRender:!0,itemBackground:null,itemName:s.text});h.init(),h.render(),t.legends.push(h)})),l.each(this.geomLayers,(function(e,i){t.legendFilter(i)}))},e}(a.default);e.default=h,o.registerPlotType("dualLine",h)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(108)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="columnLine",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(475)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="groupedColumnLine",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(6),o=i(0),a=n.__importDefault(i(108)),s=n.__importDefault(i(100)),l=i(11),u={color:"#f5bc32",lineSize:4,connectNull:!0,point:{visible:!1,size:3,shape:"circle",style:{stroke:"#fff"}},label:{visible:!1}},c={color:["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E8684A","#6DC8EC","#9270CA","#FF9D4D","#269A99","#FF99C3"]},h={visible:!0,colorMapping:!0,grid:{visible:!0},line:{visible:!1},tickLine:{visible:!1},label:{visible:!0,autoHide:!0,autoRotate:!1},title:{autoRotate:!0,visible:!1,spacing:12}},p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="groupedColumnLine",e.requiredField=["xField","yField","columnGroupField"],e}return n.__extends(e,t),e.getDefaultOptions=function(){return o.deepMix({},t.getDefaultOptions.call(this),{yAxis:{leftConfig:o.deepMix({},h,{colorMapping:!1}),rightConfig:h},lineConfig:u,columnConfig:c,legend:{visible:!0}})},e.prototype.beforeInit=function(){var t,e,i=this.options,n=this.initialOptions,r=this.getValueByGroupField();if(i.lineSeriesField&&(i.yAxis.rightConfig.colorMapping=!1,(null===(t=n.lineConfig)||void 0===t?void 0:t.lineSize)||(i.lineConfig.lineSize=3),!(null===(e=n.lineConfig)||void 0===e?void 0:e.color))){var a=l.getGlobalTheme(),s=a.colors,u=a.colors_20,c=this.getValueBySeriesField(),h=c.length>s.length?u:s,p=[],f=r.length;o.each(c,(function(t,e){p.push(h[e+f])})),i.lineConfig.color=p}var d=this.options.columnConfig.color;this.options.columnConfig.color=d.slice(0,r.length)},e.prototype.drawColumn=function(){var t=this,e=this.options,i=e.data,r=e.xField,a=e.yField,l=e.columnGroupField,u=e.xAxis,c=e.tooltip,h=e.columnConfig,p=e.events;this.createLayer(s.default,i[0],n.__assign({xField:r,yField:a[0],groupField:l,xAxis:u,yAxis:o.deepMix({},this.yAxis(0),{grid:{visible:!0},nice:!0}),legend:{visible:!1},tooltip:o.deepMix({},c,{showMarkers:!1,custom:{onChange:function(e,i){t.tooltip(e,i)}}}),events:p},h)).render()},e.prototype.customLegend=function(){var t=this,e=this.options,i=e.yField,n=e.legend,r=this.colors,a=this.container.addGroup(),s=n,l=["square","circle"];o.each(this.geomLayers,(function(e,n){var o;if(e.options.seriesField){var u=t.getValueBySeriesField();o=t.createNormalLegend(u,l[n],r[n],s,a)}else if(e.options.groupField){u=t.getValueByGroupField();o=t.createNormalLegend(u,l[n],r[n],s,a)}else o=t.createSingleLegend(i[n],l[n],r[n],s,a);t.legends.push(o)})),o.each(this.geomLayers,(function(e,i){e.options.seriesField?t.multipleLegendFilter(i,e.options.seriesField):e.options.groupField?t.multipleLegendFilter(i,e.options.groupField):t.legendFilter(i)}))},e.prototype.getValueByGroupField=function(){var t=this.options,e=t.columnGroupField,i=t.data[0],n=[];return o.each(i,(function(t){var i=t[e];o.contains(n,i)||n.push(i)})),n},e.prototype.getMockData=function(t){var e=this.options,i=e.xField,n=e.yField,r=e.columnGroupField,o={};o[i]="null_1",o[n[t]]=0,o[r]="null_a";var a={};return a[i]="null_1",a[n[t]]=1,a[r]="null_a",[o,a]},e}(a.default);e.default=p,r.registerPlotType("groupedColumnLine",p)},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(0),o=n.__importDefault(i(4)),a=n.__importDefault(i(477)),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.createLayers=function(e){var i=r.deepMix({},e);i.type="stackedColumnLine",t.prototype.createLayers.call(this,i)},e.getDefaultOptions=a.default.getDefaultOptions,e}(o.default);e.default=s},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1),r=i(6),o=i(0),a=n.__importDefault(i(108)),s=n.__importDefault(i(69)),l=i(11),u={color:"#f5bc32",lineSize:4,connectNull:!0,point:{visible:!1,size:3,shape:"circle",style:{stroke:"#fff"}},label:{visible:!1}},c={color:["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#E8684A","#6DC8EC","#9270CA","#FF9D4D","#269A99","#FF99C3"]},h={visible:!0,colorMapping:!0,grid:{visible:!0},line:{visible:!1},tickLine:{visible:!1},label:{visible:!0,autoHide:!0,autoRotate:!1},title:{autoRotate:!0,visible:!1,spacing:12}},p=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="groupedColumnLine",e.requiredField=["xField","yField","columnStackField"],e}return n.__extends(e,t),e.getDefaultOptions=function(){return o.deepMix({},t.getDefaultOptions.call(this),{yAxis:{leftConfig:o.deepMix({},h,{colorMapping:!1}),rightConfig:h},lineConfig:u,columnConfig:c,legend:{visible:!0}})},e.prototype.beforeInit=function(){var t,e,i=this.getValueByStackField(),n=this.options,r=this.initialOptions;if(n.lineSeriesField&&(n.yAxis.rightConfig.colorMapping=!1,(null===(t=r.lineConfig)||void 0===t?void 0:t.lineSize)||(n.lineConfig.lineSize=3),!(null===(e=r.lineConfig)||void 0===e?void 0:e.color))){var a=l.getGlobalTheme(),s=a.colors,u=a.colors_20,c=this.getValueBySeriesField(),h=c.length>s.length?u:s,p=[],f=i.length;o.each(c,(function(t,e){p.push(h[e+f])})),n.lineConfig.color=p}var d=this.options.columnConfig.color;this.options.columnConfig.color=d.slice(0,i.length)},e.prototype.drawColumn=function(){var t=this,e=this.options,i=e.data,r=e.xField,a=e.yField,l=e.columnStackField,u=e.xAxis,c=e.tooltip,h=e.columnConfig,p=e.events;this.createLayer(s.default,i[0],n.__assign({xField:r,yField:a[0],stackField:l,xAxis:u,yAxis:o.deepMix({},this.yAxis(0),{grid:{visible:!0},nice:!0}),legend:{visible:!1},tooltip:o.deepMix({},c,{showMarkers:!1,custom:{onChange:function(e,i){t.tooltip(e,i)}}}),events:p},h)).render()},e.prototype.customLegend=function(){var t=this,e=this.options,i=e.yField,n=e.legend,r=this.colors,a=this.container.addGroup(),s=n,l=["square","circle"];o.each(this.geomLayers,(function(e,n){var o;if(e.options.seriesField){var u=t.getValueBySeriesField();o=t.createNormalLegend(u,l[n],r[n],s,a)}else if(e.options.stackField){u=t.getValueByStackField();o=t.createNormalLegend(u,l[n],r[n],s,a)}else o=t.createSingleLegend(i[n],l[n],r[n],s,a);t.legends.push(o)})),o.each(this.geomLayers,(function(e,i){e.options.seriesField?t.multipleLegendFilter(i,e.options.seriesField):e.options.stackField?t.multipleLegendFilter(i,e.options.stackField):t.legendFilter(i)}))},e.prototype.getValueByStackField=function(){var t=this.options,e=t.columnStackField,i=t.data[0],n=[];return o.each(i,(function(t){var i=t[e];o.contains(n,i)||n.push(i)})),n},e.prototype.getUnCheckedValue=function(){var t=[];return o.each(this.legends,(function(e){var i=e.getItemsByState("unchecked");o.each(i,(function(e){t.push(e.name)}))})),t},e.prototype.getMockData=function(t){var e=this.options,i=e.xField,n=e.yField,r=e.columnStackField,o={};o[i]="null_1",o[n[t]]=0,o[r]="null_a";var a={};return a[i]="null_1",a[n[t]]=1,a[r]="null_a",[o,a]},e}(a.default);e.default=p,r.registerPlotType("stackedColumnLine",p)},function(t,e,i){"use strict";function n(t,e,i,n){t=t.filter((function(t){var n=e(t),r=i(t);return null!=n&&isFinite(n)&&null!=r&&isFinite(r)})),n&&t.sort((function(t,i){return e(t)-e(i)}));for(var r,o,a,s=t.length,l=new Float64Array(s),u=new Float64Array(s),c=0,h=0,p=0;pr&&(t.splice(o+1,0,p),n=!0)}return n}}function l(t,e,i,n){var r=n-t*t,o=Math.abs(r)<1e-24?0:(i-t*e)/r;return[e-o*t,o]}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],n=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return c(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return c(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);iy&&(y=e))}));var v=u(l(p/c,h/c,f/c,d/c),2),m=v[0],x=v[1];m=Math.exp(m);var b=function(t){return m*Math.exp(x*t)},_=s(g,y,b);return _.a=m,_.b=x,_.predict=b,_.rSquared=o(n,e,i,c,b),_}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 p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],n=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);id&&(d=e))}));var g=p(l(s,u,c,h),2),y=g[0],v=g[1],m=function(t){return v*t+y},x=[[f,m(f)],[d,m(d)]];return x.a=v,x.b=y,x.predict=m,x.rSquared=o(n,e,i,u,m),x}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 g(t){t.sort((function(t,e){return t-e}));var e=t.length/2;return e%1==0?(t[e-1]+t[e])/2:t[Math.floor(e)]}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],n=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return v(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return v(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);ia[C]-w?M:C,j=0,P=0,T=0,A=0,E=0,L=1/Math.abs(a[S]-w||1),I=M;I<=C;++I){var D=a[I],k=s[I],B=x(Math.abs(w-D)*L)*v[I],F=D*B;j+=B,P+=F,T+=k*B,A+=k*F,E+=D*F}var R=y(l(P/j,T/j,A/j,E/j),2),N=R[0],Y=R[1];f[O]=N+Y*w,d[O]=Math.abs(s[O]-f[O]),b(a,O+1,_)}if(2===m)break;var G=g(d);if(Math.abs(G)<1e-12)break;for(var X,V,z=0;z=1?1e-12:(V=1-X*X)*V}return function(t,e,i,n){for(var r,o=t.length,a=[],s=0,l=0,u=[];s=t.length))for(;e>r&&t[o]-n<=n-t[r];)i[0]=++r,i[1]=o,++o}function _(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],n=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return O(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return O(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);id&&(d=e))}));var g=_(l(u,c,h,p),2),y=g[0],v=g[1],m=function(t){return v*Math.log(t)+y},x=s(f,d,m);return x.a=v,x.b=y,x.predict=m,x.rSquared=o(n,e,i,c,m),x}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 M(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],n=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return C(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return C(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);ij&&(j=e))}));var P=b-m*m,T=m*P-x*x,A=(O*m-_*x)/T,E=(_*P-O*x)/T,L=-A*m,I=function(t){return A*(t-=g)*t+E*t+L+y},D=s(S,j,I);return D.a=A,D.b=E-2*A*g,D.c=L-E*g+A*g*g+y,D.predict=I,D.rSquared=o(a,e,i,w,I),D}return a.domain=function(e){return arguments.length?(t=e,a):t},a.x=function(t){return arguments.length?(e=t,a):e},a.y=function(t){return arguments.length?(i=t,a):i},a};function j(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],n=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return P(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return P(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);iE&&(E=e))})),h=0;hMath.abs(t[e][r])&&(r=i);for(n=e;n=e;n--)t[n][i]-=t[n][e]*t[e][i]/t[e][e]}for(i=a-1;i>=0;--i){for(o=0,n=i+1;n=0;--r)for(a=e[r],s=1,l[r]+=a,o=1;o<=r;++o)s*=(r+1-o)/o,l[r-o]+=a*Math.pow(i,o)*s;return l[0]+=n,l}(C,L,-b,_),D.predict=I,D.rSquared=o(l,e,i,P,I),D}return l.domain=function(e){return arguments.length?(t=e,l):t},l.x=function(t){return arguments.length?(e=t,l):e},l.y=function(t){return arguments.length?(i=t,l):i},l.order=function(t){return arguments.length?(a=t,l):a},l};function A(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],n=!0,r=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!e||i.length!==e);n=!0);}catch(t){r=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return E(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return E(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);ig&&(g=e))}));var y=A(l(u,c,h,p),2),v=y[0],m=y[1];v=Math.exp(v);var x=function(t){return v*Math.pow(t,m)},b=s(d,g,x);return b.a=v,b.b=m,b.predict=x,b.rSquared=o(n,e,i,f,x),b}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(t,e,i){"use strict";i.r(e),i.d(e,"GM",(function(){return p})),i.d(e,"Wheel",(function(){return d}));var n=i(1),r=i(22),o=function(){function t(t){this.EVENT="gesture",this.gm=t}return t.prototype.do=function(t){switch(t.type){case"touchstart":this.onTouchStart(t);break;case"touchmove":this.onTouchMove(t);break;case"touchend":this.onTouchEnd(t);break;case"touchcancel":this.onTouchCancel(t);break;default:return}},t.prototype.emit=function(t){this.gm.emit(this.EVENT,t)},t}(),a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.EVENT="pan",e}return Object(n.__extends)(e,t),e.prototype.onTouchCancel=function(t){},e.prototype.onTouchEnd=function(t){},e.prototype.onTouchMove=function(t){var e=t.x,i=t.y,n=e-this.preX,r=i-this.preY;this.preX=e,this.preY=i,this.emit({x:e,y:i,deltaX:n,deltaY:r,event:t})},e.prototype.onTouchStart=function(t){var e=t.x,i=t.y;this.preX=e,this.preY=i},e}(o);function s(t){return(s="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)}var l="object"===("undefined"==typeof performance?"undefined":s(performance))&&performance.now?performance:Date,u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.EVENT="press",e}return Object(n.__extends)(e,t),e.prototype.onTouchCancel=function(t){this.clearTimeout()},e.prototype.onTouchEnd=function(t){this.clearTimeout()},e.prototype.onTouchMove=function(t){var e=t.x,i=t.y;(e-this.touchStartX>10||i-this.touchStartY>10)&&this.clearTimeout()},e.prototype.onTouchStart=function(t){var e=this;this.clearTimeout();var i=t.x,n=t.y;this.touchStartTime=l.now(),this.touchStartX=i,this.touchStartY=n,this.pressTimeout=window.setTimeout((function(){e.emit({x:i,y:n,event:t})}),300)},e.prototype.clearTimeout=function(){window.clearTimeout(this.pressTimeout)},e}(o),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.EVENT="swipe",e.latestMoveTime=0,e.ms=0,e.speedX=0,e.speedY=0,e.preX=0,e.preY=0,e}return Object(n.__extends)(e,t),e.prototype.onTouchCancel=function(t){},e.prototype.onTouchEnd=function(t){var e=this.speedX,i=this.speedY;if(l.now()-this.latestMoveTime<100){var n=t.x,r=t.y;this.emit({x:n,y:r,speedX:e,speedY:i,event:t})}},e.prototype.onTouchMove=function(t){var e=t.x,i=t.y,n=l.now(),r=e-this.preX,o=i-this.preY,a=n-this.ms;this.speedX=r/a,this.speedY=o/a,this.latestMoveTime=n},e.prototype.onTouchStart=function(t){var e=t.x,i=t.y;this.speedX=this.speedY=0,this.preX=e,this.preY=i,this.ms=l.now()},e}(o),h={Pan:a,Press:u,Swipe:c,Tap:function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.EVENT="tap",e}return Object(n.__extends)(e,t),e.prototype.onTouchCancel=function(t){},e.prototype.onTouchEnd=function(t){var e=t.x,i=t.y;e-this.touchStartX<2&&i-this.touchStartY<2&&l.now()-this.touchStartTime<300&&this.emit({x:e,y:i,event:t})},e.prototype.onTouchMove=function(t){},e.prototype.onTouchStart=function(t){var e=t.x,i=t.y;this.touchStartTime=l.now(),this.touchStartX=e,this.touchStartY=i},e}(o)},p=function(t){function e(e,i){void 0===i&&(i={});var n=t.call(this)||this;return n.onTouchStart=function(t){n.preventEvent(t),n.element.on("touchmove",n.onTouchMove),n.element.on("touchend",n.onTouchEnd),n.element.on("touchcancel",n.onTouchCancel),n.emit("touchdown",t),n.doGestures(t)},n.onTouchMove=function(t){n.preventEvent(t),n.emit("touchmove",t),n.doGestures(t)},n.onTouchEnd=function(t){n.preventEvent(t),n.emit("touchend",t),n.element.off("touchmove",n.onTouchMove),n.element.off("touchend",n.onTouchEnd),n.element.off("touchcancel",n.onTouchCancel),n.doGestures(t)},n.onTouchCancel=function(t){n.preventEvent(t),n.emit("touchcancel",t),n.element.off("touchmove",n.onTouchMove),n.element.off("touchend",n.onTouchEnd),n.element.off("touchcancel",n.onTouchCancel),n.doGestures(t)},n.element=e,n.options=i,n.initialGestures(),n.bindTouchStart(),n}return Object(n.__extends)(e,t),e.prototype.destroy=function(){this.element.off("touchstart",this.onTouchStart),this.off()},e.prototype.initialGestures=function(){var t=this,e=this.options.gestures||["Pan","Press","Swipe","Tap"];this.gestures=e.map((function(e){return new(0,h[e])(t)}))},e.prototype.bindTouchStart=function(){this.element.on("touchstart",this.onTouchStart)},e.prototype.preventEvent=function(t){var e=t.type;(this.options.prevents||[]).includes(e)&&t.preventDefault()},e.prototype.doGestures=function(t){this.gestures.forEach((function(e){e.do(t)}))},e}(r.default),f=i(51).a,d=function(t){function e(e){var i=t.call(this)||this;return i.rafMs=0,i.onPan=function(t){var e=t.deltaX,n=t.deltaY,r=i.getWrapperEvent(t,e,n);i.emit("wheel",r)},i.onSwipe=function(t){var e=t.speedX,n=t.speedY;i.rafMs=l.now(),i.ms=i.rafMs,0===e&&0===n||i.rafInertia(t)},i.element=e,i.gm=new p(e,{gestures:["Pan","Swipe"]}),i.gm.on("swipe",i.onSwipe),i.gm.on("pan",i.onPan),i}return Object(n.__extends)(e,t),e.prototype.destroy=function(){window.cancelAnimationFrame(this.raf),this.gm.destroy(),this.off()},e.prototype.rafInertia=function(t){var e=this,i=t.speedX,n=t.speedY;this.raf=window.requestAnimationFrame((function(){var r=l.now(),o=(r-e.ms)/800;if(o<1){o=f(1-o);var a=r-e.rafMs,s=i*o*a,u=n*o*a,c=e.getWrapperEvent(t,s,u);e.emit("wheel",c),e.rafMs=r,e.rafInertia(t)}}))},e.prototype.getWrapperEvent=function(t,e,i){return Object(n.__assign)(Object(n.__assign)({},t),{deltaX:-e,deltaY:-i})},e}(r.default)}])})); //# sourceMappingURL=g2plot.js.map