define(["gpui-style-inject","react","mobx"],(function(e,t,i){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var n="default"in t?t.default:t,r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,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.
    ***************************************************************************** */function a(e,t,i,n){var r,a=arguments.length,o=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,i,o):r(t,i))||o);return a>3&&o&&Object.defineProperty(t,i,o),o}function o(e,t,i,n){return new(i||(i=Promise))((function(r,a){function o(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,s)}l((n=n.apply(e,t||[])).next())}))}function s(e,t){var i,n,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(r=2&a[0]?n.return:a[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;switch(n=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(6===a[0]&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{i=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function l(){for(var e=0,t=0,i=arguments.length;t<i;t++)e+=arguments[t].length;var n=Array(e),r=0;for(t=0;t<i;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,r++)n[r]=a[o];return n}e("html, body, #root {\n  width: 100%;\n  height: 100%;\n  margin: 0;\n  padding: 0;\n  overflow: hidden; }\n\n.g__index {\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  height: 100%; }\n");var u={main:"index-module_main__3lQca",total:"index-module_total__N25Cl",data:"index-module_data__2XGdy",icon:"index-module_icon__1FmT2",chart:"index-module_chart__coI3q",animation:"index-module_animation__3bWZJ",twinkling:"index-module_twinkling__2xjSI"};if(e(".index-module_main__3lQca {\n  position: relative;\n  width: 100%;\n  height: 100%; }\n  .index-module_main__3lQca .index-module_total__N25Cl {\n    position: absolute;\n    left: 5vh;\n    bottom: 5vh;\n    display: flex;\n    align-items: center;\n    box-sizing: border-box;\n    padding: 0 3vh;\n    height: 6vh;\n    font-size: 2.4vh;\n    color: #cde0ff;\n    background-color: rgba(20, 142, 199, 0.13); }\n    .index-module_main__3lQca .index-module_total__N25Cl::before {\n      content: ' ';\n      position: absolute;\n      top: 0;\n      left: 0;\n      height: 100%;\n      border-left: 1vh solid #00C4FF; }\n    .index-module_main__3lQca .index-module_total__N25Cl .index-module_data__2XGdy {\n      margin-left: 1vh;\n      font-size: 3vh;\n      color: #00C4FF; }\n    .index-module_main__3lQca .index-module_total__N25Cl .index-module_icon__1FmT2 {\n      width: 3vh;\n      height: 3vh; }\n  .index-module_main__3lQca .index-module_chart__coI3q {\n    width: 100%;\n    height: 100%; }\n\n.index-module_animation__3bWZJ {\n  animation: index-module_twinkling__2xjSI 4s infinite ease-in-out; }\n\n@keyframes index-module_twinkling__2xjSI {\n  0% {\n    opacity: 1; }\n  50% {\n    opacity: 0.6; }\n  100% {\n    opacity: 1; } }\n"),!t.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!i.spy)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function h(){var e=t.useState(0)[1];return t.useCallback((function(){e((function(e){return e+1}))}),[])}function d(e){return i.getDependencyTree(e)}var p,f=1e4,g=new Set;function m(){void 0===p&&(p=setTimeout(v,1e4))}function v(){p=void 0;var e=Date.now();g.forEach((function(t){var i=t.current;i&&e>=i.cleanAt&&(i.reaction.dispose(),t.current=null,g.delete(t))})),g.size>0&&m()}var y={};function x(e){return"observer"+e}function _(e,t,r){void 0===t&&(t="observed"),void 0===r&&(r=y);var a,o=(r.useForceUpdate||h)(),s=n.useRef(null);if(!s.current){var l=new i.Reaction(x(t),(function(){u.mounted?o():(l.dispose(),s.current=null)})),u=function(e){return{cleanAt:Date.now()+f,reaction:e}}(l);s.current=u,a=s,g.add(a),m()}var c,p,v=s.current.reaction;if(n.useDebugValue(v,d),n.useEffect((function(){var e;return e=s,g.delete(e),s.current?s.current.mounted=!0:(s.current={reaction:new i.Reaction(x(t),(function(){o()})),cleanAt:1/0},o()),function(){s.current.reaction.dispose(),s.current=null}}),[]),v.track((function(){try{c=e()}catch(e){p=e}})),p)throw p;return c}function b(e,i){var n,r=c({forwardRef:!1},i),a=e.displayName||e.name,o=function(t,i){return _((function(){return e(t,i)}),a)};return o.displayName=a,n=r.forwardRef?t.memo(t.forwardRef(o)):t.memo(o),function(e,t){Object.keys(e).forEach((function(i){w[i]||Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))}))}(e,n),n.displayName=a,n}var w={$$typeof:!0,render:!0,compare:!0,type:!0};function S(e){var t=e.children,i=e.render,n=t||i;return"function"!=typeof n?null:_(n)}function M(e,t,i,n,r){var a="children"===t?"render":"children",o="function"==typeof e[t],s="function"==typeof e[a];return o&&s?new Error("MobX Observer: Do not use children and render in the same time in`"+i):o||s?null:new Error("Invalid prop `"+r+"` of type `"+typeof e[t]+"` supplied to `"+i+"`, expected `function`.")}S.propTypes={children:M,render:M},S.displayName="Observer";var I=0;var T={};function A(e){return T[e]||(T[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var t="__$mobx-react "+e+" ("+I+")";return I++,t}(e)),T[e]}function C(e,t){if(D(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var i=Object.keys(e),n=Object.keys(t);if(i.length!==n.length)return!1;for(var r=0;r<i.length;r++)if(!Object.hasOwnProperty.call(t,i[r])||!D(e[i[r]],t[i[r]]))return!1;return!0}function D(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function L(e,t,i){Object.hasOwnProperty.call(e,t)?e[t]=i:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:i})}var P=A("patchMixins"),k=A("patchedDefinition");function O(e,t){for(var i=this,n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];t.locks++;try{var o;return null!=e&&(o=e.apply(this,r)),o}finally{t.locks--,0===t.locks&&t.methods.forEach((function(e){e.apply(i,r)}))}}function R(e,t){return function(){for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];O.call.apply(O,[this,e,t].concat(n))}}function N(e,t,i){var n=function(e,t){var i=e[P]=e[P]||{},n=i[t]=i[t]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}(e,t);n.methods.indexOf(i)<0&&n.methods.push(i);var r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r[k]){var a=e[t],o=function e(t,i,n,r,a){var o,s=R(a,r);return(o={})[k]=!0,o.get=function(){return s},o.set=function(a){if(this===t)s=R(a,r);else{var o=e(this,i,n,r,a);Object.defineProperty(this,i,o)}},o.configurable=!0,o.enumerable=n,o}(e,t,r?r.enumerable:void 0,n,a);Object.defineProperty(e,t,o)}}var E=i.$mobx||"$mobx",z=A("isUnmounted"),B=A("skipRender"),V=A("isForcingUpdate");function F(e){var i=e.prototype;if(i.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==t.PureComponent)if(i.shouldComponentUpdate){if(i.shouldComponentUpdate!==H)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else i.shouldComponentUpdate=H;W(i,"props"),W(i,"state");var n=i.render;return i.render=function(){return G.call(this,n)},N(i,"componentWillUnmount",(function(){this.render[E]&&this.render[E].dispose(),this[z]=!0})),e}function G(e){var n=this;L(this,B,!1),L(this,V,!1);var r,a=(r=this).displayName||r.name||r.constructor&&(r.constructor.displayName||r.constructor.name)||"<component>",o=e.bind(this),s=!1,l=new i.Reaction(a+".render()",(function(){if(!s&&(s=!0,!0!==n[z])){var e=!0;try{L(n,V,!0),n[B]||t.Component.prototype.forceUpdate.call(n),e=!1}finally{L(n,V,!1),e&&l.dispose()}}}));function u(){s=!1;var e=void 0,t=void 0;if(l.track((function(){try{t=i._allowStateChanges(!1,o)}catch(t){e=t}})),e)throw e;return t}return l.reactComponent=this,u[E]=l,this.render=u,u.call(this)}function H(e,t){return this.state!==t||!C(this.props,e)}function W(e,t){var n=A("reactProp_"+t+"_valueHolder"),r=A("reactProp_"+t+"_atomHolder");function a(){return this[r]||L(this,r,i.createAtom("reactive "+t)),this[r]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=!1;return i._allowStateReadsStart&&i._allowStateReadsEnd&&(e=i._allowStateReadsStart(!0)),a.call(this).reportObserved(),i._allowStateReadsStart&&i._allowStateReadsEnd&&i._allowStateReadsEnd(e),this[n]},set:function(e){this[V]||C(this[n],e)?L(this,n,e):(L(this,n,e),L(this,B,!0),a.call(this).reportChanged(),L(this,B,!1))}})}var j="function"==typeof Symbol&&Symbol.for,U=j?Symbol.for("react.forward_ref"):"function"==typeof t.forwardRef&&t.forwardRef((function(e){return null})).$$typeof,Z=j?Symbol.for("react.memo"):"function"==typeof t.memo&&t.memo((function(e){return null})).$$typeof;function Y(e){if(!0===e.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),Z&&e.$$typeof===Z)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(U&&e.$$typeof===U){var i=e.render;if("function"!=typeof i)throw new Error("render property of ForwardRef was not a function");return t.forwardRef((function(){var e=arguments;return t.createElement(S,null,(function(){return i.apply(void 0,e)}))}))}return"function"!=typeof e||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(t.Component,e)?F(e):b(e)}if(!t.Component)throw new Error("mobx-react requires React to be available");if(!i.observable)throw new Error("mobx-react requires mobx to be available");var q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function X(e,t,i){return e(i={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&i.path)}},i.exports),i.exports}var K=2311;var Q=function(){return K++};var J="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(e){var t={},i=e.match(/Firefox\/([\d.]+)/),n=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),r=e.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(e);i&&(t.firefox=!0,t.version=i[1]);n&&(t.ie=!0,t.version=n[1]);r&&(t.edge=!0,t.version=r[1]);a&&(t.weChat=!0);return{browser:t,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!t.ie&&!t.edge,pointerEventsSupported:"onpointerdown"in window&&(t.edge||t.ie&&t.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),$={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},ee={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},te=Object.prototype.toString,ie=Array.prototype,ne=ie.forEach,re=ie.filter,ae=ie.slice,oe=ie.map,se=ie.reduce,le={};function ue(e){if(null==e||"object"!=typeof e)return e;var t=e,i=te.call(e);if("[object Array]"===i){if(!_e(e)){t=[];for(var n=0,r=e.length;n<r;n++)t[n]=ue(e[n])}}else if(ee[i]){if(!_e(e)){var a=e.constructor;if(e.constructor.from)t=a.from(e);else{t=new a(e.length);for(n=0,r=e.length;n<r;n++)t[n]=ue(e[n])}}}else if(!$[i]&&!_e(e)&&!xe(e))for(var o in t={},e)e.hasOwnProperty(o)&&(t[o]=ue(e[o]));return t}function ce(e,t,i){if(!ve(t)||!ve(e))return i?ue(t):e;for(var n in t)if(t.hasOwnProperty(n)){var r=e[n],a=t[n];!ve(a)||!ve(r)||me(a)||me(r)||xe(a)||xe(r)||ye(a)||ye(r)||_e(a)||_e(r)?!i&&n in e||(e[n]=ue(t[n])):ce(r,a,i)}return e}function he(e,t,i){for(var n in t)t.hasOwnProperty(n)&&(i?null!=t[n]:null==e[n])&&(e[n]=t[n]);return e}var de,pe=function(){return le.createCanvas()};function fe(e,t,i){if(e&&t)if(e.forEach&&e.forEach===ne)e.forEach(t,i);else if(e.length===+e.length)for(var n=0,r=e.length;n<r;n++)t.call(i,e[n],n,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(i,e[a],a,e)}function ge(e,t){var i=ae.call(arguments,2);return function(){return e.apply(t,i.concat(ae.call(arguments)))}}function me(e){return"[object Array]"===te.call(e)}function ve(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function ye(e){return!!$[te.call(e)]}function xe(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}le.createCanvas=function(){return document.createElement("canvas")};function _e(e){return e.__ec_primitive__}function be(e){var t=me(e);this.data={};var i=this;function n(e,n){t?i.set(e,n):i.set(n,e)}e instanceof be?e.each(n):e&&fe(e,n)}be.prototype={constructor:be,get:function(e){return this.data.hasOwnProperty(e)?this.data[e]:null},set:function(e,t){return this.data[e]=t},each:function(e,t){for(var i in void 0!==t&&(e=ge(e,t)),this.data)this.data.hasOwnProperty(i)&&e(this.data[i],i)},removeKey:function(e){delete this.data[e]}};var we={$override:function(e,t){"createCanvas"===e&&(de=null),le[e]=t},clone:ue,merge:ce,mergeAll:function(e,t){for(var i=e[0],n=1,r=e.length;n<r;n++)i=ce(i,e[n],t);return i},extend:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);return e},defaults:he,createCanvas:pe,getContext:function(){return de||(de=pe().getContext("2d")),de},indexOf:function(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i}return-1},inherits:function(e,t){var i=e.prototype;function n(){}for(var r in n.prototype=t.prototype,e.prototype=new n,i)i.hasOwnProperty(r)&&(e.prototype[r]=i[r]);e.prototype.constructor=e,e.superClass=t},mixin:function(e,t,i){he(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,i)},isArrayLike:function(e){if(e)return"string"!=typeof e&&"number"==typeof e.length},each:fe,map:function(e,t,i){if(e&&t){if(e.map&&e.map===oe)return e.map(t,i);for(var n=[],r=0,a=e.length;r<a;r++)n.push(t.call(i,e[r],r,e));return n}},reduce:function(e,t,i,n){if(e&&t){if(e.reduce&&e.reduce===se)return e.reduce(t,i,n);for(var r=0,a=e.length;r<a;r++)i=t.call(n,i,e[r],r,e);return i}},filter:function(e,t,i){if(e&&t){if(e.filter&&e.filter===re)return e.filter(t,i);for(var n=[],r=0,a=e.length;r<a;r++)t.call(i,e[r],r,e)&&n.push(e[r]);return n}},find:function(e,t,i){if(e&&t)for(var n=0,r=e.length;n<r;n++)if(t.call(i,e[n],n,e))return e[n]},bind:ge,curry:function(e){var t=ae.call(arguments,1);return function(){return e.apply(this,t.concat(ae.call(arguments)))}},isArray:me,isFunction:function(e){return"function"==typeof e},isString:function(e){return"[object String]"===te.call(e)},isObject:ve,isBuiltInObject:ye,isTypedArray:function(e){return!!ee[te.call(e)]},isDom:xe,eqNaN:function(e){return e!=e},retrieve:function(e){for(var t=0,i=arguments.length;t<i;t++)if(null!=arguments[t])return arguments[t]},retrieve2:function(e,t){return null!=e?e:t},retrieve3:function(e,t,i){return null!=e?e:null!=t?t:i},slice:function(){return Function.call.apply(ae,arguments)},normalizeCssArray:function(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e},assert:function(e,t){if(!e)throw new Error(t)},trim:function(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},setAsPrimitive:function(e){e.__ec_primitive__=!0},isPrimitive:_e,createHashMap:function(e){return new be(e)},concatArray:function(e,t){for(var i=new e.constructor(e.length+t.length),n=0;n<e.length;n++)i[n]=e[n];var r=e.length;for(n=0;n<t.length;n++)i[n+r]=t[n];return i},noop:function(){}},Se="undefined"==typeof Float32Array?Array:Float32Array;function Me(e){return Math.sqrt(Ie(e))}function Ie(e){return e[0]*e[0]+e[1]*e[1]}function Te(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}function Ae(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Ce={create:function(e,t){var i=new Se(2);return null==e&&(e=0),null==t&&(t=0),i[0]=e,i[1]=t,i},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e},clone:function(e){var t=new Se(2);return t[0]=e[0],t[1]=e[1],t},set:function(e,t,i){return e[0]=t,e[1]=i,e},add:function(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e},scaleAndAdd:function(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e},sub:function(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e},len:Me,length:Me,lenSquare:Ie,lengthSquare:Ie,mul:function(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e},div:function(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},scale:function(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e},normalize:function(e,t){var i=Me(t);return 0===i?(e[0]=0,e[1]=0):(e[0]=t[0]/i,e[1]=t[1]/i),e},distance:Te,dist:Te,distanceSquare:Ae,distSquare:Ae,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},lerp:function(e,t,i,n){return e[0]=t[0]+n*(i[0]-t[0]),e[1]=t[1]+n*(i[1]-t[1]),e},applyTransform:function(e,t,i){var n=t[0],r=t[1];return e[0]=i[0]*n+i[2]*r+i[4],e[1]=i[1]*n+i[3]*r+i[5],e},min:function(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e},max:function(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e}};function De(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function Le(e,t){return{target:e,topTarget:t&&t.topTarget}}De.prototype={constructor:De,_dragStart:function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.dispatchToElement(Le(t,e),"dragstart",e.event))},_drag:function(e){var t=this._draggingTarget;if(t){var i=e.offsetX,n=e.offsetY,r=i-this._x,a=n-this._y;this._x=i,this._y=n,t.drift(r,a,e),this.dispatchToElement(Le(t,e),"drag",e.event);var o=this.findHover(i,n,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.dispatchToElement(Le(s,e),"dragleave",e.event),o&&o!==s&&this.dispatchToElement(Le(o,e),"dragenter",e.event))}},_dragEnd:function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.dispatchToElement(Le(t,e),"dragend",e.event),this._dropTarget&&this.dispatchToElement(Le(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null}};var Pe=De,ke=Array.prototype.slice,Oe=function(e){this._$handlers={},this._$eventProcessor=e};function Re(e,t,i,n,r,a){var o=e._$handlers;if("function"==typeof i&&(r=n,n=i,i=null),!n||!t)return e;i=function(e,t){var i=e._$eventProcessor;return null!=t&&i&&i.normalizeQuery&&(t=i.normalizeQuery(t)),t}(e,i),o[t]||(o[t]=[]);for(var s=0;s<o[t].length;s++)if(o[t][s].h===n)return e;var l={h:n,one:a,query:i,ctx:r||e,callAtLast:n.zrEventfulCallAtLast},u=o[t].length-1,c=o[t][u];return c&&c.callAtLast?o[t].splice(u,0,l):o[t].push(l),e}Oe.prototype={constructor:Oe,one:function(e,t,i,n){return Re(this,e,t,i,n,!0)},on:function(e,t,i,n){return Re(this,e,t,i,n,!1)},isSilent:function(e){var t=this._$handlers;return!t[e]||!t[e].length},off:function(e,t){var i=this._$handlers;if(!e)return this._$handlers={},this;if(t){if(i[e]){for(var n=[],r=0,a=i[e].length;r<a;r++)i[e][r].h!==t&&n.push(i[e][r]);i[e]=n}i[e]&&0===i[e].length&&delete i[e]}else delete i[e];return this},trigger:function(e){var t=this._$handlers[e],i=this._$eventProcessor;if(t){var n=arguments,r=n.length;r>3&&(n=ke.call(n,1));for(var a=t.length,o=0;o<a;){var s=t[o];if(i&&i.filter&&null!=s.query&&!i.filter(e,s.query))o++;else{switch(r){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(t.splice(o,1),a--):o++}}}return i&&i.afterTrigger&&i.afterTrigger(e),this},triggerWithContext:function(e){var t=this._$handlers[e],i=this._$eventProcessor;if(t){var n=arguments,r=n.length;r>4&&(n=ke.call(n,1,n.length-1));for(var a=n[n.length-1],o=t.length,s=0;s<o;){var l=t[s];if(i&&i.filter&&null!=l.query&&!i.filter(e,l.query))s++;else{switch(r){case 1:l.h.call(a);break;case 2:l.h.call(a,n[1]);break;case 3:l.h.call(a,n[1],n[2]);break;default:l.h.apply(a,n)}l.one?(t.splice(s,1),o--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(e),this}};var Ne=Oe,Ee=Math.log(2);function ze(e,t,i,n,r,a){var o=n+"-"+r,s=e.length;if(a.hasOwnProperty(o))return a[o];if(1===t){var l=Math.round(Math.log((1<<s)-1&~r)/Ee);return e[i][l]}for(var u=n|1<<i,c=i+1;n&1<<c;)c++;for(var h=0,d=0,p=0;d<s;d++){var f=1<<d;f&r||(h+=(p%2?-1:1)*e[i][d]*ze(e,t-1,c,u,r|f,a),p++)}return a[o]=h,h}var Be={buildTransformer:function(e,t){var i=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],n={},r=ze(i,8,0,0,0,n);if(0!==r){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)null==a[s]&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*ze(i,7,0===o?1:0,1<<o,1<<s,n)/r*t[o];return function(e,t,i){var n=t*a[6]+i*a[7]+1;e[0]=(t*a[0]+i*a[1]+a[2])/n,e[1]=(t*a[3]+i*a[4]+a[5])/n}}}}.buildTransformer,Ve=[];function Fe(e,t,i,n,r){if(t.getBoundingClientRect&&J.domSupported&&!Ge(t)){var a=t.___zrEVENTSAVED||(t.___zrEVENTSAVED={}),o=function(e,t,i){for(var n=i?"invTrans":"trans",r=t[n],a=t.srcCoords,o=!0,s=[],l=[],u=0;u<4;u++){var c=e[u].getBoundingClientRect(),h=2*u,d=c.left,p=c.top;s.push(d,p),o=o&&a&&d===a[h]&&p===a[h+1],l.push(e[u].offsetLeft,e[u].offsetTop)}return o&&r?r:(t.srcCoords=s,t[n]=i?Be(l,s):Be(s,l))}(function(e,t){var i=t.markers;if(i)return i;i=t.markers=[];for(var n=["left","right"],r=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",r[u]+":0",n[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),e.appendChild(o),i.push(o)}return i}(t,a),a,r);if(o)return o(e,i,n),!0}return!1}function Ge(e){return"CANVAS"===e.nodeName.toUpperCase()}var He={transformLocalCoord:function(e,t,i,n,r){return Fe(Ve,t,n,r,!0)&&Fe(e,i,Ve[0],Ve[1])},transformCoordWithViewport:Fe,isCanvasEl:Ge},We=Ne,je=He.isCanvasEl,Ue=He.transformCoordWithViewport,Ze="undefined"!=typeof window&&!!window.addEventListener,Ye=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,qe=[];function Xe(e,t,i,n){return i=i||{},n||!J.canvasSupported?Ke(e,t,i):J.browser.firefox&&null!=t.layerX&&t.layerX!==t.offsetX?(i.zrX=t.layerX,i.zrY=t.layerY):null!=t.offsetX?(i.zrX=t.offsetX,i.zrY=t.offsetY):Ke(e,t,i),i}function Ke(e,t,i){if(J.domSupported&&e.getBoundingClientRect){var n=t.clientX,r=t.clientY;if(je(e)){var a=e.getBoundingClientRect();return i.zrX=n-a.left,void(i.zrY=r-a.top)}if(Ue(qe,e,n,r))return i.zrX=qe[0],void(i.zrY=qe[1])}i.zrX=i.zrY=0}function Qe(e){return e||window.event}var Je={Dispatcher:We,clientToLocal:Xe,getNativeEvent:Qe,normalizeEvent:function(e,t,i){if(null!=(t=Qe(t)).zrX)return t;var n=t.type;if(n&&n.indexOf("touch")>=0){var r="touchend"!==n?t.targetTouches[0]:t.changedTouches[0];r&&Xe(e,r,t,i)}else Xe(e,t,t,i),t.zrDelta=t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3;var a=t.button;return null==t.which&&void 0!==a&&Ye.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t},addEventListener:function(e,t,i,n){Ze?e.addEventListener(t,i,n):e.attachEvent("on"+t,i)},removeEventListener:function(e,t,i,n){Ze?e.removeEventListener(t,i,n):e.detachEvent("on"+t,i)},stop:Ze?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0},isMiddleOrRightButtonOnMouseUpDown:function(e){return 2===e.which||3===e.which},notLeftMouse:function(e){return e.which>1}},$e=function(){this._track=[]};function et(e){var t=e[1][0]-e[0][0],i=e[1][1]-e[0][1];return Math.sqrt(t*t+i*i)}$e.prototype={constructor:$e,recognize:function(e,t,i){return this._doTrack(e,t,i),this._recognize(e)},clear:function(){return this._track.length=0,this},_doTrack:function(e,t,i){var n=e.touches;if(n){for(var r={points:[],touches:[],target:t,event:e},a=0,o=n.length;a<o;a++){var s=n[a],l=Je.clientToLocal(i,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(e){for(var t in tt)if(tt.hasOwnProperty(t)){var i=tt[t](this._track,e);if(i)return i}}};var tt={pinch:function(e,t){var i=e.length;if(i){var n,r=(e[i-1]||{}).points,a=(e[i-2]||{}).points||r;if(a&&a.length>1&&r&&r.length>1){var o=et(r)/et(a);!isFinite(o)&&(o=1),t.pinchScale=o;var s=[((n=r)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}},it=$e;function nt(){Je.stop(this.event)}function rt(){}rt.prototype.dispose=function(){};var at=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ot=function(e,t,i,n){Ne.call(this),this.storage=e,this.painter=t,this.painterRoot=n,i=i||new rt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,Pe.call(this),this.setHandlerProxy(i)};function st(e,t,i){if(e[e.rectHover?"rectContain":"contain"](t,i)){for(var n,r=e;r;){if(r.clipPath&&!r.clipPath.contain(t,i))return!1;r.silent&&(n=!0),r=r.parent}return!n||"silent"}return!1}function lt(e,t,i){var n=e.painter;return t<0||t>n.getWidth()||i<0||i>n.getHeight()}ot.prototype={constructor:ot,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(we.each(at,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},mousemove:function(e){var t=e.zrX,i=e.zrY,n=lt(this,t,i),r=this._hovered,a=r.target;a&&!a.__zr&&(a=(r=this.findHover(r.x,r.y)).target);var o=this._hovered=n?{x:t,y:i}:this.findHover(t,i),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(r,"mouseout",e),this.dispatchToElement(o,"mousemove",e),s&&s!==a&&this.dispatchToElement(o,"mouseover",e)},mouseout:function(e){var t=e.zrEventControl,i=e.zrIsToLocalDOM;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&!i&&this.trigger("globalout",{type:"globalout",event:e})},resize:function(e){this._hovered={}},dispatch:function(e,t){var i=this[e];i&&i.call(this,t)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},dispatchToElement:function(e,t,i){var n=(e=e||{}).target;if(!n||!n.silent){for(var r="on"+t,a=function(e,t,i){return{type:e,event:i,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:nt}}(t,e,i);n&&(n[r]&&(a.cancelBubble=n[r].call(n,a)),n.trigger(t,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer((function(e){"function"==typeof e[r]&&e[r].call(e,a),e.trigger&&e.trigger(t,a)})))}},findHover:function(e,t,i){for(var n=this.storage.getDisplayList(),r={x:e,y:t},a=n.length-1;a>=0;a--){var o;if(n[a]!==i&&!n[a].ignore&&(o=st(n[a],e,t))&&(!r.topTarget&&(r.topTarget=n[a]),"silent"!==o)){r.target=n[a];break}}return r},processGesture:function(e,t){this._gestureMgr||(this._gestureMgr=new it);var i=this._gestureMgr;"start"===t&&i.clear();var n=i.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&i.clear(),n){var r=n.type;e.gestureEvent=r,this.dispatchToElement({target:n.target},r,n.event)}}},we.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){ot.prototype[e]=function(t){var i,n,r=t.zrX,a=t.zrY,o=lt(this,r,a);if("mouseup"===e&&o||(n=(i=this.findHover(r,a)).target),"mousedown"===e)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===e)this._upEl=n;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||Ce.dist(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,e,t)}})),we.mixin(ot,Ne),we.mixin(ot,Pe);var ut=ot,ct="undefined"==typeof Float32Array?Array:Float32Array;function ht(){var e=new ct(6);return dt(e),e}function dt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function pt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}var ft={create:ht,identity:dt,copy:pt,mul:function(e,t,i){var n=t[0]*i[0]+t[2]*i[1],r=t[1]*i[0]+t[3]*i[1],a=t[0]*i[2]+t[2]*i[3],o=t[1]*i[2]+t[3]*i[3],s=t[0]*i[4]+t[2]*i[5]+t[4],l=t[1]*i[4]+t[3]*i[5]+t[5];return e[0]=n,e[1]=r,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e},translate:function(e,t,i){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+i[0],e[5]=t[5]+i[1],e},rotate:function(e,t,i){var n=t[0],r=t[2],a=t[4],o=t[1],s=t[3],l=t[5],u=Math.sin(i),c=Math.cos(i);return e[0]=n*c+o*u,e[1]=-n*u+o*c,e[2]=r*c+s*u,e[3]=-r*u+c*s,e[4]=c*a+u*l,e[5]=c*l-u*a,e},scale:function(e,t,i){var n=i[0],r=i[1];return e[0]=t[0]*n,e[1]=t[1]*r,e[2]=t[2]*n,e[3]=t[3]*r,e[4]=t[4]*n,e[5]=t[5]*r,e},invert:function(e,t){var i=t[0],n=t[2],r=t[4],a=t[1],o=t[3],s=t[5],l=i*o-a*n;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-n*l,e[3]=i*l,e[4]=(n*s-o*r)*l,e[5]=(a*r-i*s)*l,e):null},clone:function(e){var t=ht();return pt(t,e),t}},gt=ft.identity;function mt(e){return e>5e-5||e<-5e-5}var vt=function(e){(e=e||{}).position||(this.position=[0,0]),null==e.rotation&&(this.rotation=0),e.scale||(this.scale=[1,1]),this.origin=this.origin||null},yt=vt.prototype;yt.transform=null,yt.needLocalTransform=function(){return mt(this.rotation)||mt(this.position[0])||mt(this.position[1])||mt(this.scale[0]-1)||mt(this.scale[1]-1)};var xt=[];yt.updateTransform=function(){var e=this.parent,t=e&&e.transform,i=this.needLocalTransform(),n=this.transform;if(i||t){n=n||ft.create(),i?this.getLocalTransform(n):gt(n),t&&(i?ft.mul(n,e.transform,n):ft.copy(n,e.transform)),this.transform=n;var r=this.globalScaleRatio;if(null!=r&&1!==r){this.getGlobalScale(xt);var a=xt[0]<0?-1:1,o=xt[1]<0?-1:1,s=((xt[0]-a)*r+a)/xt[0]||0,l=((xt[1]-o)*r+o)/xt[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||ft.create(),ft.invert(this.invTransform,n)}else n&&gt(n)},yt.getLocalTransform=function(e){return vt.getLocalTransform(this,e)},yt.setTransform=function(e){var t=this.transform,i=e.dpr||1;t?e.setTransform(i*t[0],i*t[1],i*t[2],i*t[3],i*t[4],i*t[5]):e.setTransform(i,0,0,i,0,0)},yt.restoreTransform=function(e){var t=e.dpr||1;e.setTransform(t,0,0,t,0,0)};var _t=[],bt=ft.create();yt.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],i=e[2]*e[2]+e[3]*e[3],n=this.position,r=this.scale;mt(t-1)&&(t=Math.sqrt(t)),mt(i-1)&&(i=Math.sqrt(i)),e[0]<0&&(t=-t),e[3]<0&&(i=-i),n[0]=e[4],n[1]=e[5],r[0]=t,r[1]=i,this.rotation=Math.atan2(-e[1]/i,e[0]/t)}},yt.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(ft.mul(_t,e.invTransform,t),t=_t);var i=this.origin;i&&(i[0]||i[1])&&(bt[4]=i[0],bt[5]=i[1],ft.mul(_t,t,bt),_t[4]-=i[0],_t[5]-=i[1],t=_t),this.setLocalTransform(t)}},yt.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},yt.transformCoordToLocal=function(e,t){var i=[e,t],n=this.invTransform;return n&&Ce.applyTransform(i,i,n),i},yt.transformCoordToGlobal=function(e,t){var i=[e,t],n=this.transform;return n&&Ce.applyTransform(i,i,n),i},vt.getLocalTransform=function(e,t){gt(t=t||[]);var i=e.origin,n=e.scale||[1,1],r=e.rotation||0,a=e.position||[0,0];return i&&(t[4]-=i[0],t[5]-=i[1]),ft.scale(t,t,n),r&&ft.rotate(t,t,r),i&&(t[4]+=i[0],t[5]+=i[1]),t[4]+=a[0],t[5]+=a[1],t};var wt=vt,St={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,i=.1;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,i=.1,n=.4;return 0===e?0:1===e?1:(!i||i<1?(i=1,t=.1):t=n*Math.asin(1/i)/(2*Math.PI),(e*=2)<1?i*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((t+1)*e-t)*.5:.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-St.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*St.bounceIn(2*e):.5*St.bounceOut(2*e-1)+.5}},Mt=St;function It(e){this._target=e.target,this._life=e.life||1e3,this._delay=e.delay||0,this._initialized=!1,this.loop=null!=e.loop&&e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart,this._pausedTime=0,this._paused=!1}It.prototype={constructor:It,step:function(e,t){if(this._initialized||(this._startTime=e+this._delay,this._initialized=!0),this._paused)this._pausedTime+=t;else{var i=(e-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,r="string"==typeof n?Mt[n]:n,a="function"==typeof r?r(i):i;return this.fire("frame",a),1===i?this.loop?(this.restart(e),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(e){var t=(e-this._startTime-this._pausedTime)%this._life;this._startTime=e-t+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(e,t){this[e="on"+e]&&this[e](this._target,t)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Tt=It,At=function(){this.head=null,this.tail=null,this._len=0},Ct=At.prototype;Ct.insert=function(e){var t=new Dt(e);return this.insertEntry(t),t},Ct.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},Ct.remove=function(e){var t=e.prev,i=e.next;t?t.next=i:this.head=i,i?i.prev=t:this.tail=t,e.next=e.prev=null,this._len--},Ct.len=function(){return this._len},Ct.clear=function(){this.head=this.tail=null,this._len=0};var Dt=function(e){this.value=e,this.next,this.prev},Lt=function(e){this._list=new At,this._map={},this._maxSize=e||10,this._lastRemovedEntry=null},Pt=Lt.prototype;Pt.put=function(e,t){var i=this._list,n=this._map,r=null;if(null==n[e]){var a=i.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=i.head;i.remove(s),delete n[s.key],r=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Dt(t),o.key=e,i.insertEntry(o),n[e]=o}return r},Pt.get=function(e){var t=this._map[e],i=this._list;if(null!=t)return t!==i.tail&&(i.remove(t),i.insertEntry(t)),t.value},Pt.clear=function(){this._list.clear(),this._map={}};var kt=Lt,Ot={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Rt(e){return(e=Math.round(e))<0?0:e>255?255:e}function Nt(e){return e<0?0:e>1?1:e}function Et(e){return e.length&&"%"===e.charAt(e.length-1)?Rt(parseFloat(e)/100*255):Rt(parseInt(e,10))}function zt(e){return e.length&&"%"===e.charAt(e.length-1)?Nt(parseFloat(e)/100):Nt(parseFloat(e))}function Bt(e,t,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?e+(t-e)*i*6:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function Vt(e,t,i){return e+(t-e)*i}function Ft(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=n,e[3]=r,e}function Gt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ht=new kt(20),Wt=null;function jt(e,t){Wt&&Gt(Wt,t),Wt=Ht.put(e,Wt||t.slice())}function Ut(e,t){if(e){t=t||[];var i=Ht.get(e);if(i)return Gt(t,i);var n,r=(e+="").replace(/ /g,"").toLowerCase();if(r in Ot)return Gt(t,Ot[r]),jt(e,t),t;if("#"===r.charAt(0))return 4===r.length?(n=parseInt(r.substr(1),16))>=0&&n<=4095?(Ft(t,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),jt(e,t),t):void Ft(t,0,0,0,1):7===r.length?(n=parseInt(r.substr(1),16))>=0&&n<=16777215?(Ft(t,(16711680&n)>>16,(65280&n)>>8,255&n,1),jt(e,t),t):void Ft(t,0,0,0,1):void 0;var a=r.indexOf("("),o=r.indexOf(")");if(-1!==a&&o+1===r.length){var s=r.substr(0,a),l=r.substr(a+1,o-(a+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Ft(t,0,0,0,1);u=zt(l.pop());case"rgb":return 3!==l.length?void Ft(t,0,0,0,1):(Ft(t,Et(l[0]),Et(l[1]),Et(l[2]),u),jt(e,t),t);case"hsla":return 4!==l.length?void Ft(t,0,0,0,1):(l[3]=zt(l[3]),Zt(l,t),jt(e,t),t);case"hsl":return 3!==l.length?void Ft(t,0,0,0,1):(Zt(l,t),jt(e,t),t);default:return}}Ft(t,0,0,0,1)}}function Zt(e,t){var i=(parseFloat(e[0])%360+360)%360/360,n=zt(e[1]),r=zt(e[2]),a=r<=.5?r*(n+1):r+n-r*n,o=2*r-a;return Ft(t=t||[],Rt(255*Bt(o,a,i+1/3)),Rt(255*Bt(o,a,i)),Rt(255*Bt(o,a,i-1/3)),1),4===e.length&&(t[3]=e[3]),t}function Yt(e,t,i){if(t&&t.length&&e>=0&&e<=1){i=i||[];var n=e*(t.length-1),r=Math.floor(n),a=Math.ceil(n),o=t[r],s=t[a],l=n-r;return i[0]=Rt(Vt(o[0],s[0],l)),i[1]=Rt(Vt(o[1],s[1],l)),i[2]=Rt(Vt(o[2],s[2],l)),i[3]=Nt(Vt(o[3],s[3],l)),i}}function qt(e,t,i){if(t&&t.length&&e>=0&&e<=1){var n=e*(t.length-1),r=Math.floor(n),a=Math.ceil(n),o=Ut(t[r]),s=Ut(t[a]),l=n-r,u=Xt([Rt(Vt(o[0],s[0],l)),Rt(Vt(o[1],s[1],l)),Rt(Vt(o[2],s[2],l)),Nt(Vt(o[3],s[3],l))],"rgba");return i?{color:u,leftIndex:r,rightIndex:a,value:n}:u}}function Xt(e,t){if(e&&e.length){var i=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(i+=","+e[3]),t+"("+i+")"}}var Kt={parse:Ut,lift:function(e,t){var i=Ut(e);if(i){for(var n=0;n<3;n++)i[n]=t<0?i[n]*(1-t)|0:(255-i[n])*t+i[n]|0,i[n]>255?i[n]=255:e[n]<0&&(i[n]=0);return Xt(i,4===i.length?"rgba":"rgb")}},toHex:function(e){var t=Ut(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},fastLerp:Yt,fastMapToColor:Yt,lerp:qt,mapToColor:qt,modifyHSL:function(e,t,i,n){if(e=Ut(e))return e=function(e){if(e){var t,i,n=e[0]/255,r=e[1]/255,a=e[2]/255,o=Math.min(n,r,a),s=Math.max(n,r,a),l=s-o,u=(s+o)/2;if(0===l)t=0,i=0;else{i=u<.5?l/(s+o):l/(2-s-o);var c=((s-n)/6+l/2)/l,h=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?t=d-h:r===s?t=1/3+c-d:a===s&&(t=2/3+h-c),t<0&&(t+=1),t>1&&(t-=1)}var p=[360*t,i,u];return null!=e[3]&&p.push(e[3]),p}}(e),null!=t&&(e[0]=function(e){return(e=Math.round(e))<0?0:e>360?360:e}(t)),null!=i&&(e[1]=zt(i)),null!=n&&(e[2]=zt(n)),Xt(Zt(e),"rgba")},modifyAlpha:function(e,t){if((e=Ut(e))&&null!=t)return e[3]=Nt(t),Xt(e,"rgba")},stringify:Xt},Qt=we.isArrayLike,Jt=Array.prototype.slice;function $t(e,t){return e[t]}function ei(e,t,i){e[t]=i}function ti(e,t,i){return(t-e)*i+e}function ii(e,t,i){return i>.5?t:e}function ni(e,t,i,n,r){var a=e.length;if(1===r)for(var o=0;o<a;o++)n[o]=ti(e[o],t[o],i);else{var s=a&&e[0].length;for(o=0;o<a;o++)for(var l=0;l<s;l++)n[o][l]=ti(e[o][l],t[o][l],i)}}function ri(e,t,i){var n=e.length,r=t.length;if(n!==r)if(n>r)e.length=r;else for(var a=n;a<r;a++)e.push(1===i?t[a]:Jt.call(t[a]));var o=e[0]&&e[0].length;for(a=0;a<e.length;a++)if(1===i)isNaN(e[a])&&(e[a]=t[a]);else for(var s=0;s<o;s++)isNaN(e[a][s])&&(e[a][s]=t[a][s])}function ai(e,t,i){if(e===t)return!0;var n=e.length;if(n!==t.length)return!1;if(1===i){for(var r=0;r<n;r++)if(e[r]!==t[r])return!1}else{var a=e[0].length;for(r=0;r<n;r++)for(var o=0;o<a;o++)if(e[r][o]!==t[r][o])return!1}return!0}function oi(e,t,i,n,r,a,o,s,l){var u=e.length;if(1===l)for(var c=0;c<u;c++)s[c]=si(e[c],t[c],i[c],n[c],r,a,o);else{var h=e[0].length;for(c=0;c<u;c++)for(var d=0;d<h;d++)s[c][d]=si(e[c][d],t[c][d],i[c][d],n[c][d],r,a,o)}}function si(e,t,i,n,r,a,o){var s=.5*(i-e),l=.5*(n-t);return(2*(t-i)+s+l)*o+(-3*(t-i)-2*s-l)*a+s*r+t}function li(e){if(Qt(e)){var t=e.length;if(Qt(e[0])){for(var i=[],n=0;n<t;n++)i.push(Jt.call(e[n]));return i}return Jt.call(e)}return e}function ui(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}function ci(e,t,i,n,r,a){var o=e._getter,s=e._setter,l="spline"===t,u=n.length;if(u){var c,h=n[0].value,d=Qt(h),p=!1,f=!1,g=d?function(e){var t=e[e.length-1].value;return Qt(t&&t[0])?2:1}(n):0;n.sort((function(e,t){return e.time-t.time})),c=n[u-1].time;for(var m=[],v=[],y=n[0].value,x=!0,_=0;_<u;_++){m.push(n[_].time/c);var b=n[_].value;if(d&&ai(b,y,g)||!d&&b===y||(x=!1),y=b,"string"==typeof b){var w=Kt.parse(b);w?(b=w,p=!0):f=!0}v.push(b)}if(a||!x){var S=v[u-1];for(_=0;_<u-1;_++)d?ri(v[_],S,g):!isNaN(v[_])||isNaN(S)||f||p||(v[_]=S);d&&ri(o(e._target,r),S,g);var M,I,T,A,C,D=0,L=0;if(p)var P=[0,0,0,0];var k=new Tt({target:e._target,life:c,loop:e._loop,delay:e._delay,onframe:function(e,t){var i;if(t<0)i=0;else if(t<L){for(i=Math.min(D+1,u-1);i>=0&&!(m[i]<=t);i--);i=Math.min(i,u-2)}else{for(i=D;i<u&&!(m[i]>t);i++);i=Math.min(i-1,u-2)}D=i,L=t;var n=m[i+1]-m[i];if(0!==n)if(M=(t-m[i])/n,l)if(T=v[i],I=v[0===i?i:i-1],A=v[i>u-2?u-1:i+1],C=v[i>u-3?u-1:i+2],d)oi(I,T,A,C,M,M*M,M*M*M,o(e,r),g);else{if(p)a=oi(I,T,A,C,M,M*M,M*M*M,P,1),a=ui(P);else{if(f)return ii(T,A,M);a=si(I,T,A,C,M,M*M,M*M*M)}s(e,r,a)}else if(d)ni(v[i],v[i+1],M,o(e,r),g);else{var a;if(p)ni(v[i],v[i+1],M,P,1),a=ui(P);else{if(f)return ii(v[i],v[i+1],M);a=ti(v[i],v[i+1],M)}s(e,r,a)}},ondestroy:i});return t&&"spline"!==t&&(k.easing=t),k}}}var hi=function(e,t,i,n){this._tracks={},this._target=e,this._loop=t||!1,this._getter=i||$t,this._setter=n||ei,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};hi.prototype={when:function(e,t){var i=this._tracks;for(var n in t)if(t.hasOwnProperty(n)){if(!i[n]){i[n]=[];var r=this._getter(this._target,n);if(null==r)continue;0!==e&&i[n].push({time:0,value:li(r)})}i[n].push({time:e,value:t[n]})}return this},during:function(e){return this._onframeList.push(e),this},pause:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].pause();this._paused=!0},resume:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var e=this._doneList,t=e.length,i=0;i<t;i++)e[i].call(this)},start:function(e,t){var i,n=this,r=0,a=function(){--r||n._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=ci(this,e,a,this._tracks[o],o,t);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(e,t){l(e,t);for(var i=0;i<n._onframeList.length;i++)n._onframeList[i](e,t)}}return r||this._doneCallback(),this},stop:function(e){for(var t=this._clipList,i=this.animation,n=0;n<t.length;n++){var r=t[n];e&&r.onframe(this._target,1),i&&i.removeClip(r)}t.length=0},delay:function(e){return this._delay=e,this},done:function(e){return e&&this._doneList.push(e),this},getClips:function(){return this._clipList}};var di=hi,pi=1;"undefined"!=typeof window&&(pi=Math.max(window.devicePixelRatio||1,1));var fi={debugMode:0,devicePixelRatio:pi},gi=function(){},mi=we.isString,vi=we.isFunction,yi=we.isObject,xi=we.isArrayLike,_i=we.indexOf,bi=function(){this.animators=[]};function wi(e,t,i,n,r,a,o,s){mi(n)?(a=r,r=n,n=0):vi(r)?(a=r,r="linear",n=0):vi(n)?(a=n,n=0):vi(i)?(a=i,i=500):i||(i=500),e.stopAnimation(),function e(t,i,n,r,a,o,s){var l={},u=0;for(var c in r)r.hasOwnProperty(c)&&(null!=n[c]?yi(r[c])&&!xi(r[c])?e(t,i?i+"."+c:c,n[c],r[c],a,o,s):(s?(l[c]=n[c],Si(t,i,c,r[c])):l[c]=r[c],u++):null==r[c]||s||Si(t,i,c,r[c]));u>0&&t.animate(i,!1).when(null==a?500:a,l).delay(o||0)}(e,"",e,t,i,n,s);var l=e.animators.slice(),u=l.length;function c(){--u||a&&a()}u||a&&a();for(var h=0;h<l.length;h++)l[h].done(c).start(r,o)}function Si(e,t,i,n){if(t){var r={};r[t]={},r[t][i]=n,e.attr(r)}else e.attr(i,n)}bi.prototype={constructor:bi,animate:function(e,t){var i,n=!1,r=this,a=this.__zr;if(e){var o=e.split("."),s=r;n="shape"===o[0];for(var l=0,u=o.length;l<u;l++)s&&(s=s[o[l]]);s&&(i=s)}else i=r;if(i){var c=r.animators,h=new di(i,t);return h.during((function(e){r.dirty(n)})).done((function(){c.splice(_i(c,h),1)})),c.push(h),a&&a.animation.addAnimator(h),h}gi('Property "'+e+'" is not existed in element '+r.id)},stopAnimation:function(e){for(var t=this.animators,i=t.length,n=0;n<i;n++)t[n].stop(e);return t.length=0,this},animateTo:function(e,t,i,n,r,a){wi(this,e,t,i,n,r,a)},animateFrom:function(e,t,i,n,r,a){wi(this,e,t,i,n,r,a,!0)}};var Mi=bi,Ii=function(e){wt.call(this,e),Ne.call(this,e),Mi.call(this,e),this.id=e.id||Q()};Ii.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(e,t){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=t,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(e,t){},attrKV:function(e,t){if("position"===e||"scale"===e||"origin"===e){if(t){var i=this[e];i||(i=this[e]=[]),i[0]=t[0],i[1]=t[1]}}else this[e]=t},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(we.isObject(e))for(var i in e)e.hasOwnProperty(i)&&this.attrKV(i,e[i]);return this.dirty(!1),this},setClipPath:function(e){var t=this.__zr;t&&e.addSelfToZr(t),this.clipPath&&this.clipPath!==e&&this.removeClipPath(),this.clipPath=e,e.__zr=t,e.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var e=this.clipPath;e&&(e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(e){this.__zr=e;var t=this.animators;if(t)for(var i=0;i<t.length;i++)e.animation.addAnimator(t[i]);this.clipPath&&this.clipPath.addSelfToZr(e)},removeSelfFromZr:function(e){this.__zr=null;var t=this.animators;if(t)for(var i=0;i<t.length;i++)e.animation.removeAnimator(t[i]);this.clipPath&&this.clipPath.removeSelfFromZr(e)}},we.mixin(Ii,Mi),we.mixin(Ii,wt),we.mixin(Ii,Ne);var Ti,Ai,Ci,Di,Li=Ii,Pi=Ce.applyTransform,ki=Math.min,Oi=Math.max;function Ri(e,t,i,n){i<0&&(e+=i,i=-i),n<0&&(t+=n,n=-n),this.x=e,this.y=t,this.width=i,this.height=n}Ri.prototype={constructor:Ri,union:function(e){var t=ki(e.x,this.x),i=ki(e.y,this.y);this.width=Oi(e.x+e.width,this.x+this.width)-t,this.height=Oi(e.y+e.height,this.y+this.height)-i,this.x=t,this.y=i},applyTransform:(Ti=[],Ai=[],Ci=[],Di=[],function(e){if(e){Ti[0]=Ci[0]=this.x,Ti[1]=Di[1]=this.y,Ai[0]=Di[0]=this.x+this.width,Ai[1]=Ci[1]=this.y+this.height,Pi(Ti,Ti,e),Pi(Ai,Ai,e),Pi(Ci,Ci,e),Pi(Di,Di,e),this.x=ki(Ti[0],Ai[0],Ci[0],Di[0]),this.y=ki(Ti[1],Ai[1],Ci[1],Di[1]);var t=Oi(Ti[0],Ai[0],Ci[0],Di[0]),i=Oi(Ti[1],Ai[1],Ci[1],Di[1]);this.width=t-this.x,this.height=i-this.y}}),calculateTransform:function(e){var t=this,i=e.width/t.width,n=e.height/t.height,r=ft.create();return ft.translate(r,r,[-t.x,-t.y]),ft.scale(r,r,[i,n]),ft.translate(r,r,[e.x,e.y]),r},intersect:function(e){if(!e)return!1;e instanceof Ri||(e=Ri.create(e));var t=this,i=t.x,n=t.x+t.width,r=t.y,a=t.y+t.height,o=e.x,s=e.x+e.width,l=e.y,u=e.y+e.height;return!(n<o||s<i||a<l||u<r)},contain:function(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height},clone:function(){return new Ri(this.x,this.y,this.width,this.height)},copy:function(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Ri.create=function(e){return new Ri(e.x,e.y,e.width,e.height)};var Ni=Ri,Ei=function(e){for(var t in e=e||{},Li.call(this,e),e)e.hasOwnProperty(t)&&(this[t]=e[t]);this._children=[],this.__storage=null,this.__dirty=!0};Ei.prototype={constructor:Ei,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(e){return this._children[e]},childOfName:function(e){for(var t=this._children,i=0;i<t.length;i++)if(t[i].name===e)return t[i]},childCount:function(){return this._children.length},add:function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},addBefore:function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var i=this._children,n=i.indexOf(t);n>=0&&(i.splice(n,0,e),this._doAdd(e))}return this},_doAdd:function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__storage,i=this.__zr;t&&t!==e.__storage&&(t.addToStorage(e),e instanceof Ei&&e.addChildrenToStorage(t)),i&&i.refresh()},remove:function(e){var t=this.__zr,i=this.__storage,n=this._children,r=we.indexOf(n,e);return r<0||(n.splice(r,1),e.parent=null,i&&(i.delFromStorage(e),e instanceof Ei&&e.delChildrenFromStorage(i)),t&&t.refresh()),this},removeAll:function(){var e,t,i=this._children,n=this.__storage;for(t=0;t<i.length;t++)e=i[t],n&&(n.delFromStorage(e),e instanceof Ei&&e.delChildrenFromStorage(n)),e.parent=null;return i.length=0,this},eachChild:function(e,t){for(var i=this._children,n=0;n<i.length;n++){var r=i[n];e.call(t,r,n)}return this},traverse:function(e,t){for(var i=0;i<this._children.length;i++){var n=this._children[i];e.call(t,n),"group"===n.type&&n.traverse(e,t)}return this},addChildrenToStorage:function(e){for(var t=0;t<this._children.length;t++){var i=this._children[t];e.addToStorage(i),i instanceof Ei&&i.addChildrenToStorage(e)}},delChildrenFromStorage:function(e){for(var t=0;t<this._children.length;t++){var i=this._children[t];e.delFromStorage(i),i instanceof Ei&&i.delChildrenFromStorage(e)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(e){for(var t=null,i=new Ni(0,0,0,0),n=e||this._children,r=[],a=0;a<n.length;a++){var o=n[a];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(r);l?(i.copy(s),i.applyTransform(l),(t=t||i.clone()).union(i)):(t=t||s.clone()).union(s)}}return t||i}},we.inherits(Ei,Li);var zi=Ei;function Bi(e,t,i,n){var r=t+1;if(r===i)return 1;if(n(e[r++],e[t])<0){for(;r<i&&n(e[r],e[r-1])<0;)r++;!function(e,t,i){i--;for(;t<i;){var n=e[t];e[t++]=e[i],e[i--]=n}}(e,t,r)}else for(;r<i&&n(e[r],e[r-1])>=0;)r++;return r-t}function Vi(e,t,i,n,r){for(n===t&&n++;n<i;n++){for(var a,o=e[n],s=t,l=n;s<l;)r(o,e[a=s+l>>>1])<0?l=a:s=a+1;var u=n-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=o}}function Fi(e,t,i,n,r,a){var o=0,s=0,l=1;if(a(e,t[i+r])>0){for(s=n-r;l<s&&a(e,t[i+r+l])>0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;l<s&&a(e,t[i+r-l])<=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}for(o++;o<l;){var c=o+(l-o>>>1);a(e,t[i+c])>0?o=c+1:l=c}return l}function Gi(e,t,i,n,r,a){var o=0,s=0,l=1;if(a(e,t[i+r])<0){for(s=r+1;l<s&&a(e,t[i+r-l])<0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}else{for(s=n-r;l<s&&a(e,t[i+r+l])>=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;o<l;){var c=o+(l-o>>>1);a(e,t[i+c])<0?l=c:o=c+1}return l}function Hi(e,t){var i,n,r=7,a=0;e.length;var o=[];function s(s){var l=i[s],u=n[s],c=i[s+1],h=n[s+1];n[s]=u+h,s===a-3&&(i[s+1]=i[s+2],n[s+1]=n[s+2]),a--;var d=Gi(e[c],e,l,u,0,t);l+=d,0!==(u-=d)&&0!==(h=Fi(e[l+u-1],e,c,h,h-1,t))&&(u<=h?function(i,n,a,s){var l=0;for(l=0;l<n;l++)o[l]=e[i+l];var u=0,c=a,h=i;if(e[h++]=e[c++],0==--s){for(l=0;l<n;l++)e[h+l]=o[u+l];return}if(1===n){for(l=0;l<s;l++)e[h+l]=e[c+l];return void(e[h+s]=o[u])}var d,p,f,g=r;for(;;){d=0,p=0,f=!1;do{if(t(e[c],o[u])<0){if(e[h++]=e[c++],p++,d=0,0==--s){f=!0;break}}else if(e[h++]=o[u++],d++,p=0,1==--n){f=!0;break}}while((d|p)<g);if(f)break;do{if(0!==(d=Gi(e[c],o,u,n,0,t))){for(l=0;l<d;l++)e[h+l]=o[u+l];if(h+=d,u+=d,(n-=d)<=1){f=!0;break}}if(e[h++]=e[c++],0==--s){f=!0;break}if(0!==(p=Fi(o[u],e,c,s,0,t))){for(l=0;l<p;l++)e[h+l]=e[c+l];if(h+=p,c+=p,0===(s-=p)){f=!0;break}}if(e[h++]=o[u++],1==--n){f=!0;break}g--}while(d>=7||p>=7);if(f)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===n){for(l=0;l<s;l++)e[h+l]=e[c+l];e[h+s]=o[u]}else{if(0===n)throw new Error;for(l=0;l<n;l++)e[h+l]=o[u+l]}}(l,u,c,h):function(i,n,a,s){var l=0;for(l=0;l<s;l++)o[l]=e[a+l];var u=i+n-1,c=s-1,h=a+s-1,d=0,p=0;if(e[h--]=e[u--],0==--n){for(d=h-(s-1),l=0;l<s;l++)e[d+l]=o[l];return}if(1===s){for(p=(h-=n)+1,d=(u-=n)+1,l=n-1;l>=0;l--)e[p+l]=e[d+l];return void(e[h]=o[c])}var f=r;for(;;){var g=0,m=0,v=!1;do{if(t(o[c],e[u])<0){if(e[h--]=e[u--],g++,m=0,0==--n){v=!0;break}}else if(e[h--]=o[c--],m++,g=0,1==--s){v=!0;break}}while((g|m)<f);if(v)break;do{if(0!==(g=n-Gi(o[c],e,i,n,n-1,t))){for(n-=g,p=(h-=g)+1,d=(u-=g)+1,l=g-1;l>=0;l--)e[p+l]=e[d+l];if(0===n){v=!0;break}}if(e[h--]=o[c--],1==--s){v=!0;break}if(0!==(m=s-Fi(e[u],o,0,s,s-1,t))){for(s-=m,p=(h-=m)+1,d=(c-=m)+1,l=0;l<m;l++)e[p+l]=o[d+l];if(s<=1){v=!0;break}}if(e[h--]=e[u--],0==--n){v=!0;break}f--}while(g>=7||m>=7);if(v)break;f<0&&(f=0),f+=2}(r=f)<1&&(r=1);if(1===s){for(p=(h-=n)+1,d=(u-=n)+1,l=n-1;l>=0;l--)e[p+l]=e[d+l];e[h]=o[c]}else{if(0===s)throw new Error;for(d=h-(s-1),l=0;l<s;l++)e[d+l]=o[l]}}(l,u,c,h))}i=[],n=[],this.mergeRuns=function(){for(;a>1;){var e=a-2;if(e>=1&&n[e-1]<=n[e]+n[e+1]||e>=2&&n[e-2]<=n[e]+n[e-1])n[e-1]<n[e+1]&&e--;else if(n[e]>n[e+1])break;s(e)}},this.forceMergeRuns=function(){for(;a>1;){var e=a-2;e>0&&n[e-1]<n[e+1]&&e--,s(e)}},this.pushRun=function(e,t){i[a]=e,n[a]=t,a+=1}}var Wi=function(e,t,i,n){i||(i=0),n||(n=e.length);var r=n-i;if(!(r<2)){var a=0;if(r<32)Vi(e,i,n,i+(a=Bi(e,i,n,t)),t);else{var o=new Hi(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(r);do{if((a=Bi(e,i,n,t))<s){var l=r;l>s&&(l=s),Vi(e,i,i+l,i+a,t),a=l}o.pushRun(i,a),o.mergeRuns(),r-=a,i+=a}while(0!==r);o.forceMergeRuns()}}};function ji(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Ui=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Ui.prototype={constructor:Ui,traverse:function(e,t){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(e,t)},getDisplayList:function(e,t){return t=t||!1,e&&this.updateDisplayList(t),this._displayList},updateDisplayList:function(e){this._displayListLen=0;for(var t=this._roots,i=this._displayList,n=0,r=t.length;n<r;n++)this._updateAndAddDisplayable(t[n],null,e);i.length=this._displayListLen,J.canvasSupported&&Wi(i,ji)},_updateAndAddDisplayable:function(e,t,i){if(!e.ignore||i){e.beforeUpdate(),e.__dirty&&e.update(),e.afterUpdate();var n=e.clipPath;if(n){t=t?t.slice():[];for(var r=n,a=e;r;)r.parent=a,r.updateTransform(),t.push(r),a=r,r=r.clipPath}if(e.isGroup){for(var o=e._children,s=0;s<o.length;s++){var l=o[s];e.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,t,i)}e.__dirty=!1}else e.__clipPaths=t,this._displayList[this._displayListLen++]=e}},addRoot:function(e){e.__storage!==this&&(e instanceof zi&&e.addChildrenToStorage(this),this.addToStorage(e),this._roots.push(e))},delRoot:function(e){if(null==e){for(var t=0;t<this._roots.length;t++){var i=this._roots[t];i instanceof zi&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(e instanceof Array){t=0;for(var n=e.length;t<n;t++)this.delRoot(e[t])}else{var r=we.indexOf(this._roots,e);r>=0&&(this.delFromStorage(e),this._roots.splice(r,1),e instanceof zi&&e.delChildrenFromStorage(this))}},addToStorage:function(e){return e&&(e.__storage=this,e.dirty(!1)),this},delFromStorage:function(e){return e&&(e.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:ji};var Zi=Ui,Yi={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};var qi=function(e,t,i){return Yi.hasOwnProperty(t)?i*e.dpr:i},Xi={ContextCachedBy:{NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},WILL_BE_RESTORED:9},Ki=Xi.ContextCachedBy,Qi=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Ji=function(e){this.extendFrom(e,!1)};function $i(e,t,i){var n=null==t.x?0:t.x,r=null==t.x2?1:t.x2,a=null==t.y?0:t.y,o=null==t.y2?0:t.y2;return t.global||(n=n*i.width+i.x,r=r*i.width+i.x,a=a*i.height+i.y,o=o*i.height+i.y),n=isNaN(n)?0:n,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o,e.createLinearGradient(n,a,r,o)}function en(e,t,i){var n=i.width,r=i.height,a=Math.min(n,r),o=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(o=o*n+i.x,s=s*r+i.y,l*=a),e.createRadialGradient(o,s,0,o,s,l)}for(var tn=Ji.prototype={constructor:Ji,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(e,t,i){var n=i&&i.style,r=!n||e.__attrCachedBy!==Ki.STYLE_BIND;e.__attrCachedBy=Ki.STYLE_BIND;for(var a=0;a<Qi.length;a++){var o=Qi[a],s=o[0];(r||this[s]!==n[s])&&(e[s]=qi(e,s,this[s]||o[1]))}if((r||this.fill!==n.fill)&&(e.fillStyle=this.fill),(r||this.stroke!==n.stroke)&&(e.strokeStyle=this.stroke),(r||this.opacity!==n.opacity)&&(e.globalAlpha=null==this.opacity?1:this.opacity),(r||this.blend!==n.blend)&&(e.globalCompositeOperation=this.blend||"source-over"),this.hasStroke()){var l=this.lineWidth;e.lineWidth=l/(this.strokeNoScale&&t&&t.getLineScale?t.getLineScale():1)}},hasFill:function(){var e=this.fill;return null!=e&&"none"!==e},hasStroke:function(){var e=this.stroke;return null!=e&&"none"!==e&&this.lineWidth>0},extendFrom:function(e,t){if(e)for(var i in e)!e.hasOwnProperty(i)||!0!==t&&(!1===t?this.hasOwnProperty(i):null==e[i])||(this[i]=e[i])},set:function(e,t){"string"==typeof e?this[e]=t:this.extendFrom(e,!0)},clone:function(){var e=new this.constructor;return e.extendFrom(this,!0),e},getGradient:function(e,t,i){for(var n=("radial"===t.type?en:$i)(e,t,i),r=t.colorStops,a=0;a<r.length;a++)n.addColorStop(r[a].offset,r[a].color);return n}},nn=0;nn<Qi.length;nn++){var rn=Qi[nn];rn[0]in tn||(tn[rn[0]]=rn[1])}Ji.getGradient=tn.getGradient;var an=Ji,on=function(e,t){this.image=e,this.repeat=t,this.type="pattern"};on.prototype.getCanvasPattern=function(e){return e.createPattern(this.image,this.repeat||"repeat")};var sn=on,ln=fi.devicePixelRatio;function un(){return!1}function cn(e,t,i){var n=we.createCanvas(),r=t.getWidth(),a=t.getHeight(),o=n.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=r+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",e)),n.width=r*i,n.height=a*i,n}var hn=function(e,t,i){var n;i=i||ln,"string"==typeof e?n=cn(e,t,i):we.isObject(e)&&(e=(n=e).id),this.id=e,this.dom=n;var r=n.style;r&&(n.onselectstart=un,r["-webkit-user-select"]="none",r["user-select"]="none",r["-webkit-touch-callout"]="none",r["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",r.padding=0,r.margin=0,r["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=t,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};hn.prototype={constructor:hn,__dirty:!0,__used:!1,__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var e=this.dpr;this.domBack=cn("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},resize:function(e,t){var i=this.dpr,n=this.dom,r=n.style,a=this.domBack;r&&(r.width=e+"px",r.height=t+"px"),n.width=e*i,n.height=t*i,a&&(a.width=e*i,a.height=t*i,1!==i&&this.ctxBack.scale(i,i))},clear:function(e,t){var i,n=this.dom,r=this.ctx,a=n.width,o=n.height,s=(t=t||this.clearColor,this.motionBlur&&!e),l=this.lastFrameAlpha,u=this.dpr;(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,a/u,o/u)),r.clearRect(0,0,a,o),t&&"transparent"!==t)&&(t.colorStops?(i=t.__canvasGradient||an.getGradient(r,t,{x:0,y:0,width:a,height:o}),t.__canvasGradient=i):t.image&&(i=sn.prototype.getCanvasPattern.call(t,r)),r.save(),r.fillStyle=i||t,r.fillRect(0,0,a,o),r.restore());if(s){var c=this.domBack;r.save(),r.globalAlpha=l,r.drawImage(c,0,0,a,o),r.restore()}}};var dn=hn,pn="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){setTimeout(e,16)},fn=new kt(50);function gn(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var i=e.pending[t],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}e.pending.length=0}function mn(e){return e&&e.width&&e.height}var vn={findExistImage:function(e){if("string"==typeof e){var t=fn.get(e);return t&&t.image}return e},createOrUpdateImage:function(e,t,i,n,r){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!i)return t;var a=fn.get(e),o={hostEl:i,cb:n,cbPayload:r};return a?!mn(t=a.image)&&a.pending.push(o):((t=new Image).onload=t.onerror=gn,fn.put(e,t.__cachedImgObj={image:t,pending:[o]}),t.src=t.__zrImageSrc=e),t}return e}return t},isImageReady:mn},yn=we.getContext,xn=we.extend,_n=we.retrieve2,bn=we.retrieve3,wn=we.trim,Sn={},Mn=0,In=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Tn={};function An(e,t){var i=e+":"+(t=t||"12px sans-serif");if(Sn[i])return Sn[i];for(var n=(e+"").split("\n"),r=0,a=0,o=n.length;a<o;a++)r=Math.max(En(n[a],t).width,r);return Mn>5e3&&(Mn=0,Sn={}),Mn++,Sn[i]=r,r}function Cn(e,t,i){return"right"===i?e-=t:"center"===i&&(e-=t/2),e}function Dn(e,t,i){return"middle"===i?e-=t/2:"bottom"===i&&(e-=t),e}function Ln(e,t,i){var n=t.textPosition,r=t.textDistance,a=i.x,o=i.y;r=r||0;var s=i.height,l=i.width,u=s/2,c="left",h="top";switch(n){case"left":a-=r,o+=u,c="right",h="middle";break;case"right":a+=r+l,o+=u,h="middle";break;case"top":a+=l/2,o-=r,c="center",h="bottom";break;case"bottom":a+=l/2,o+=s+r,c="center";break;case"inside":a+=l/2,o+=u,c="center",h="middle";break;case"insideLeft":a+=r,o+=u,h="middle";break;case"insideRight":a+=l-r,o+=u,c="right",h="middle";break;case"insideTop":a+=l/2,o+=r,c="center";break;case"insideBottom":a+=l/2,o+=s-r,c="center",h="bottom";break;case"insideTopLeft":a+=r,o+=r;break;case"insideTopRight":a+=l-r,o+=r,c="right";break;case"insideBottomLeft":a+=r,o+=s-r,h="bottom";break;case"insideBottomRight":a+=l-r,o+=s-r,c="right",h="bottom"}return(e=e||{}).x=a,e.y=o,e.textAlign=c,e.textVerticalAlign=h,e}function Pn(e,t,i,n,r){if(!t)return"";var a=(e+"").split("\n");r=kn(t,i,n,r);for(var o=0,s=a.length;o<s;o++)a[o]=On(a[o],r);return a.join("\n")}function kn(e,t,i,n){(n=xn({},n)).font=t;i=_n(i,"...");n.maxIterations=_n(n.maxIterations,2);var r=n.minChar=_n(n.minChar,0);n.cnCharWidth=An("国",t);var a=n.ascCharWidth=An("a",t);n.placeholder=_n(n.placeholder,"");for(var o=e=Math.max(0,e-1),s=0;s<r&&o>=a;s++)o-=a;var l=An(i,t);return l>o&&(i="",l=0),o=e-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=o,n.containerWidth=e,n}function On(e,t){var i=t.containerWidth,n=t.font,r=t.contentWidth;if(!i)return"";var a=An(e,n);if(a<=i)return e;for(var o=0;;o++){if(a<=r||o>=t.maxIterations){e+=t.ellipsis;break}var s=0===o?Rn(e,r,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*r/a):0;a=An(e=e.substr(0,s),n)}return""===e&&(e=t.placeholder),e}function Rn(e,t,i,n){for(var r=0,a=0,o=e.length;a<o&&r<t;a++){var s=e.charCodeAt(a);r+=0<=s&&s<=127?i:n}return a}function Nn(e){return An("国",e)}function En(e,t){return Tn.measureText(e,t)}function zn(e,t,i,n,r){null!=e&&(e+="");var a=_n(n,Nn(t)),o=e?e.split("\n"):[],s=o.length*a,l=s,u=!0;if(i&&(l+=i[0]+i[2]),e&&r){u=!1;var c=r.outerHeight,h=r.outerWidth;if(null!=c&&l>c)e="",o=[];else if(null!=h)for(var d=kn(h-(i?i[1]+i[3]:0),t,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),p=0,f=o.length;p<f;p++)o[p]=On(o[p],d)}return{lines:o,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function Bn(e,t){var i={lines:[],width:0,height:0};if(null!=e&&(e+=""),!e)return i;for(var n,r=In.lastIndex=0;null!=(n=In.exec(e));){var a=n.index;a>r&&Vn(i,e.substring(r,a)),Vn(i,n[2],n[1]),r=In.lastIndex}r<e.length&&Vn(i,e.substring(r,e.length));var o=i.lines,s=0,l=0,u=[],c=t.textPadding,h=t.truncate,d=h&&h.outerWidth,p=h&&h.outerHeight;c&&(null!=d&&(d-=c[1]+c[3]),null!=p&&(p-=c[0]+c[2]));for(var f=0;f<o.length;f++){for(var g=o[f],m=0,v=0,y=0;y<g.tokens.length;y++){var x=(D=g.tokens[y]).styleName&&t.rich[D.styleName]||{},_=D.textPadding=x.textPadding,b=D.font=x.font||t.font,w=D.textHeight=_n(x.textHeight,Nn(b));if(_&&(w+=_[0]+_[2]),D.height=w,D.lineHeight=bn(x.textLineHeight,t.textLineHeight,w),D.textAlign=x&&x.textAlign||t.textAlign,D.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=p&&s+D.lineHeight>p)return{lines:[],width:0,height:0};D.textWidth=An(D.text,b);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))D.percentWidth=S,u.push(D),S=0;else{if(M){S=D.textWidth;var I=x.textBackgroundColor,T=I&&I.image;T&&(T=vn.findExistImage(T),vn.isImageReady(T)&&(S=Math.max(S,T.width*w/T.height)))}var A=_?_[1]+_[3]:0;S+=A;var C=null!=d?d-v:null;null!=C&&C<S&&(!M||C<A?(D.text="",D.textWidth=S=0):(D.text=Pn(D.text,C-A,b,h.ellipsis,{minChar:h.minChar}),D.textWidth=An(D.text,b),S=D.textWidth+A))}v+=D.width=S,x&&(m=Math.max(m,D.lineHeight))}g.width=v,g.lineHeight=m,s+=m,l=Math.max(l,v)}i.outerWidth=i.width=_n(t.textWidth,l),i.outerHeight=i.height=_n(t.textHeight,s),c&&(i.outerWidth+=c[1]+c[3],i.outerHeight+=c[0]+c[2]);for(f=0;f<u.length;f++){var D,L=(D=u[f]).percentWidth;D.width=parseInt(L,10)/100*l}return i}function Vn(e,t,i){for(var n=""===t,r=t.split("\n"),a=e.lines,o=0;o<r.length;o++){var s=r[o],l={styleName:i,text:s,isLineHolder:!s&&!n};if(o)a.push({tokens:[l]});else{var u=(a[a.length-1]||(a[0]={tokens:[]})).tokens,c=u.length;1===c&&u[0].isLineHolder?u[0]=l:(s||!c||n)&&u.push(l)}}}Tn.measureText=function(e,t){var i=yn();return i.font=t||"12px sans-serif",i.measureText(e)};var Fn={DEFAULT_FONT:"12px sans-serif",$override:function(e,t){Tn[e]=t},getWidth:An,getBoundingRect:function(e,t,i,n,r,a,o,s){return o?function(e,t,i,n,r,a,o,s){var l=Bn(e,{rich:o,truncate:s,font:t,textAlign:i,textPadding:r,textLineHeight:a}),u=l.outerWidth,c=l.outerHeight,h=Cn(0,u,i),d=Dn(0,c,n);return new Ni(h,d,u,c)}(e,t,i,n,r,a,o,s):function(e,t,i,n,r,a,o){var s=zn(e,t,r,a,o),l=An(e,t);r&&(l+=r[1]+r[3]);var u=s.outerHeight,c=Cn(0,l,i),h=Dn(0,u,n),d=new Ni(c,h,l,u);return d.lineHeight=s.lineHeight,d}(e,t,i,n,r,a,s)},adjustTextX:Cn,adjustTextY:Dn,calculateTextPosition:Ln,adjustTextPositionOnRect:function(e,t,i){return Ln({},{textPosition:e,textDistance:i},t)},truncateText:Pn,getLineHeight:Nn,measureText:En,parsePlainText:zn,parseRichText:Bn,makeFont:function(e){var t=(e.fontSize||e.fontFamily)&&[e.fontStyle,e.fontWeight,(e.fontSize||12)+"px",e.fontFamily||"sans-serif"].join(" ");return t&&wn(t)||e.textFont||e.font}};var Gn={buildPath:function(e,t){var i,n,r,a,o,s=t.x,l=t.y,u=t.width,c=t.height,h=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof h?i=n=r=a=h:h instanceof Array?1===h.length?i=n=r=a=h[0]:2===h.length?(i=r=h[0],n=a=h[1]):3===h.length?(i=h[0],n=a=h[1],r=h[2]):(i=h[0],n=h[1],r=h[2],a=h[3]):i=n=r=a=0,i+n>u&&(i*=u/(o=i+n),n*=u/o),r+a>u&&(r*=u/(o=r+a),a*=u/o),n+r>c&&(n*=c/(o=n+r),r*=c/o),i+a>c&&(i*=c/(o=i+a),a*=c/o),e.moveTo(s+i,l),e.lineTo(s+u-n,l),0!==n&&e.arc(s+u-n,l+n,n,-Math.PI/2,0),e.lineTo(s+u,l+c-r),0!==r&&e.arc(s+u-r,l+c-r,r,0,Math.PI/2),e.lineTo(s+a,l+c),0!==a&&e.arc(s+a,l+c-a,a,Math.PI/2,Math.PI),e.lineTo(s,l+i),0!==i&&e.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}},Hn=we.retrieve2,Wn=we.retrieve3,jn=we.each,Un=we.normalizeCssArray,Zn=we.isString,Yn=we.isObject,qn=Xi.ContextCachedBy,Xn=Xi.WILL_BE_RESTORED,Kn=Fn.DEFAULT_FONT,Qn={left:1,right:1,center:1},Jn={top:1,bottom:1,middle:1},$n=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],er={},tr={};function ir(e){if(e){e.font=Fn.makeFont(e);var t=e.textAlign;"middle"===t&&(t="center"),e.textAlign=null==t||Qn[t]?t:"left";var i=e.textVerticalAlign||e.textBaseline;"center"===i&&(i="middle"),e.textVerticalAlign=null==i||Jn[i]?i:"top",e.textPadding&&(e.textPadding=Un(e.textPadding))}}function nr(e,t,i,n,r,a){var o,s=sr(n),l=!1,u=t.__attrCachedBy===qn.PLAIN_TEXT;a!==Xn?(a&&(o=a.style,l=!s&&u&&o),t.__attrCachedBy=s?qn.NONE:qn.PLAIN_TEXT):u&&(t.__attrCachedBy=qn.NONE);var c=n.font||Kn;l&&c===(o.font||Kn)||(t.font=c);var h=e.__computedFont;e.__styleFont!==c&&(e.__styleFont=c,h=e.__computedFont=t.font);var d=n.textPadding,p=n.textLineHeight,f=e.__textCotentBlock;f&&!e.__dirtyText||(f=e.__textCotentBlock=Fn.parsePlainText(i,h,d,p,n.truncate));var g=f.outerHeight,m=f.lines,v=f.lineHeight,y=cr(tr,e,n,r),x=y.baseX,_=y.baseY,b=y.textAlign||"left",w=y.textVerticalAlign;ar(t,n,r,x,_);var S=Fn.adjustTextY(_,g,w),M=x,I=S;if(s||d){var T=Fn.getWidth(i,h);d&&(T+=d[1]+d[3]);var A=Fn.adjustTextX(x,T,b);s&&lr(e,t,n,A,S,T,g),d&&(M=gr(x,b,d),I+=d[0])}t.textAlign=b,t.textBaseline="middle",t.globalAlpha=n.opacity||1;for(var C=0;C<$n.length;C++){var D=$n[C],L=D[0],P=D[1],k=n[L];l&&k===o[L]||(t[P]=qi(t,P,k||D[2]))}I+=v/2;var O=n.textStrokeWidth,R=l?o.textStrokeWidth:null,N=!l||O!==R,E=!l||N||n.textStroke!==o.textStroke,z=dr(n.textStroke,O),B=pr(n.textFill);if(z&&(N&&(t.lineWidth=O),E&&(t.strokeStyle=z)),B&&(l&&n.textFill===o.textFill||(t.fillStyle=B)),1===m.length)z&&t.strokeText(m[0],M,I),B&&t.fillText(m[0],M,I);else for(C=0;C<m.length;C++)z&&t.strokeText(m[C],M,I),B&&t.fillText(m[C],M,I),I+=v}function rr(e,t,i,n,r,a){a!==Xn&&(t.__attrCachedBy=qn.NONE);var o=e.__textCotentBlock;o&&!e.__dirtyText||(o=e.__textCotentBlock=Fn.parseRichText(i,n)),function(e,t,i,n,r){var a=i.width,o=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=cr(tr,e,n,r),c=u.baseX,h=u.baseY,d=u.textAlign,p=u.textVerticalAlign;ar(t,n,r,c,h);var f=Fn.adjustTextX(c,o,d),g=Fn.adjustTextY(h,s,p),m=f,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;sr(n)&&lr(e,t,n,f,g,o,s);for(var x=0;x<i.lines.length;x++){for(var _,b=i.lines[x],w=b.tokens,S=w.length,M=b.lineHeight,I=b.width,T=0,A=m,C=y,D=S-1;T<S&&(!(_=w[T]).textAlign||"left"===_.textAlign);)or(e,t,_,n,M,v,A,"left"),I-=_.width,A+=_.width,T++;for(;D>=0&&"right"===(_=w[D]).textAlign;)or(e,t,_,n,M,v,C,"right"),I-=_.width,C-=_.width,D--;for(A+=(a-(A-m)-(y-C)-I)/2;T<=D;)_=w[T],or(e,t,_,n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}(e,t,o,n,r)}function ar(e,t,i,n,r){if(i&&t.textRotation){var a=t.textOrigin;"center"===a?(n=i.width/2+i.x,r=i.height/2+i.y):a&&(n=a[0]+i.x,r=a[1]+i.y),e.translate(n,r),e.rotate(-t.textRotation),e.translate(-n,-r)}}function or(e,t,i,n,r,a,o,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,c=a+r/2;"top"===u?c=a+i.height/2:"bottom"===u&&(c=a+r-i.height/2),!i.isLineHolder&&sr(l)&&lr(e,t,l,"right"===s?o-i.width:"center"===s?o-i.width/2:o,c-i.height/2,i.width,i.height);var h=i.textPadding;h&&(o=gr(o,s,h),c-=i.height/2-h[2]-i.textHeight/2),hr(t,"shadowBlur",Wn(l.textShadowBlur,n.textShadowBlur,0)),hr(t,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),hr(t,"shadowOffsetX",Wn(l.textShadowOffsetX,n.textShadowOffsetX,0)),hr(t,"shadowOffsetY",Wn(l.textShadowOffsetY,n.textShadowOffsetY,0)),hr(t,"textAlign",s),hr(t,"textBaseline","middle"),hr(t,"font",i.font||Kn);var d=dr(l.textStroke||n.textStroke,f),p=pr(l.textFill||n.textFill),f=Hn(l.textStrokeWidth,n.textStrokeWidth);d&&(hr(t,"lineWidth",f),hr(t,"strokeStyle",d),t.strokeText(i.text,o,c)),p&&(hr(t,"fillStyle",p),t.fillText(i.text,o,c))}function sr(e){return!!(e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor)}function lr(e,t,i,n,r,a,o){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,c=Zn(s);if(hr(t,"shadowBlur",i.textBoxShadowBlur||0),hr(t,"shadowColor",i.textBoxShadowColor||"transparent"),hr(t,"shadowOffsetX",i.textBoxShadowOffsetX||0),hr(t,"shadowOffsetY",i.textBoxShadowOffsetY||0),c||l&&u){t.beginPath();var h=i.textBorderRadius;h?Gn.buildPath(t,{x:n,y:r,width:a,height:o,r:h}):t.rect(n,r,a,o),t.closePath()}if(c)if(hr(t,"fillStyle",s),null!=i.fillOpacity){var d=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,t.fill(),t.globalAlpha=d}else t.fill();else if(Yn(s)){var p=s.image;(p=vn.createOrUpdateImage(p,null,e,ur,s))&&vn.isImageReady(p)&&t.drawImage(p,n,r,a,o)}if(l&&u)if(hr(t,"lineWidth",l),hr(t,"strokeStyle",u),null!=i.strokeOpacity){d=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,t.stroke(),t.globalAlpha=d}else t.stroke()}function ur(e,t){t.image=e}function cr(e,t,i,n){var r=i.x||0,a=i.y||0,o=i.textAlign,s=i.textVerticalAlign;if(n){var l=i.textPosition;if(l instanceof Array)r=n.x+fr(l[0],n.width),a=n.y+fr(l[1],n.height);else{var u=t&&t.calculateTextPosition?t.calculateTextPosition(er,i,n):Fn.calculateTextPosition(er,i,n);r=u.x,a=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var c=i.textOffset;c&&(r+=c[0],a+=c[1])}return(e=e||{}).baseX=r,e.baseY=a,e.textAlign=o,e.textVerticalAlign=s,e}function hr(e,t,i){return e[t]=qi(e,t,i),e[t]}function dr(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function pr(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function fr(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function gr(e,t,i){return"right"===t?e-i[1]:"center"===t?e+i[3]/2-i[1]/2:e+i[3]}var mr={normalizeTextStyle:function(e){return ir(e),jn(e.rich,ir),e},renderText:function(e,t,i,n,r,a){n.rich?rr(e,t,i,n,r,a):nr(e,t,i,n,r,a)},getBoxPosition:cr,getStroke:dr,getFill:pr,parsePercent:fr,needDrawText:function(e,t){return null!=e&&(e||t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor||t.textPadding)}},vr=Xi.WILL_BE_RESTORED,yr=new Ni,xr=function(){};xr.prototype={constructor:xr,drawRectText:function(e,t){var i=this.style;t=i.textRect||t,this.__dirty&&mr.normalizeTextStyle(i,!0);var n=i.text;if(null!=n&&(n+=""),mr.needDrawText(n,i)){e.save();var r=this.transform;i.transformText?this.setTransform(e):r&&(yr.copy(t),yr.applyTransform(r),t=yr),mr.renderText(this,e,n,i,t,vr),e.restore()}}};var _r=xr;function br(e){for(var t in e=e||{},Li.call(this,e),e)e.hasOwnProperty(t)&&"style"!==t&&(this[t]=e[t]);this.style=new an(e.style,this),this._rect=null,this.__clipPaths=null}br.prototype={constructor:br,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(e){},afterBrush:function(e){},brush:function(e,t){},getBoundingRect:function(){},contain:function(e,t){return this.rectContain(e,t)},traverse:function(e,t){e.call(t,this)},rectContain:function(e,t){var i=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(e){return this.animate("style",e)},attrKV:function(e,t){"style"!==e?Li.prototype.attrKV.call(this,e,t):this.style.set(t)},setStyle:function(e,t){return this.style.set(e,t),this.dirty(!1),this},useStyle:function(e){return this.style=new an(e,this),this.dirty(!1),this},calculateTextPosition:null},we.inherits(br,Li),we.mixin(br,_r);var wr=br;function Sr(e){wr.call(this,e)}Sr.prototype={constructor:Sr,type:"image",brush:function(e,t){var i=this.style,n=i.image;i.bind(e,this,t);var r=this._image=vn.createOrUpdateImage(n,this._image,this,this.onload);if(r&&vn.isImageReady(r)){var a=i.x||0,o=i.y||0,s=i.width,l=i.height,u=r.width/r.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=r.width,l=r.height),this.setTransform(e),i.sWidth&&i.sHeight){var c=i.sx||0,h=i.sy||0;e.drawImage(r,c,h,i.sWidth,i.sHeight,a,o,s,l)}else if(i.sx&&i.sy){var d=s-(c=i.sx),p=l-(h=i.sy);e.drawImage(r,c,h,d,p,a,o,s,l)}else e.drawImage(r,a,o,s,l);null!=i.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))}},getBoundingRect:function(){var e=this.style;return this._rect||(this._rect=new Ni(e.x||0,e.y||0,e.width||0,e.height||0)),this._rect}},we.inherits(Sr,wr);var Mr=Sr,Ir=fi.devicePixelRatio;function Tr(e){return parseInt(e,10)}var Ar=new Ni(0,0,0,0),Cr=new Ni(0,0,0,0);var Dr=function(e,t,i){this.type="canvas";var n=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=i=we.extend({},i||{}),this.dpr=i.devicePixelRatio||Ir,this._singleCanvas=n,this.root=e;var r=e.style;r&&(r["-webkit-tap-highlight-color"]="transparent",r["-webkit-user-select"]=r["user-select"]=r["-webkit-touch-callout"]="none",e.innerHTML=""),this.storage=t;var a=this._zlevelList=[],o=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var s=e.width,l=e.height;null!=i.width&&(s=i.width),null!=i.height&&(l=i.height),this.dpr=i.devicePixelRatio||1,e.width=s*this.dpr,e.height=l*this.dpr,this._width=s,this._height=l;var u=new dn(e,this,this.dpr);u.__builtin__=!0,u.initContext(),o[314159]=u,u.zlevel=314159,a.push(314159),this._domRoot=e}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=function(e,t){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);e.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};Dr.prototype={constructor:Dr,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(e){var t=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,e,this._redrawId);for(var n=0;n<i.length;n++){var r=i[n],a=this._layers[r];if(!a.__builtin__&&a.refresh){var o=0===n?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(e,t){if(!e.__hoverMir){var i=new e.constructor({style:e.style,shape:e.shape,z:e.z,z2:e.z2,silent:e.silent});return i.__from=e,e.__hoverMir=i,t&&i.setStyle(t),this._hoverElements.push(i),i}},removeHover:function(e){var t=e.__hoverMir,i=this._hoverElements,n=we.indexOf(i,t);n>=0&&i.splice(n,1),e.__hoverMir=null},clearHover:function(e){for(var t=this._hoverElements,i=0;i<t.length;i++){var n=t[i].__from;n&&(n.__hoverMir=null)}t.length=0},refreshHover:function(){var e=this._hoverElements,t=e.length,i=this._hoverlayer;if(i&&i.clear(),t){Wi(e,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(1e5));var n={};i.ctx.save();for(var r=0;r<t;){var a=e[r],o=a.__from;o&&o.__zr?(r++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,i,!0,n))):(e.splice(r,1),o.__hoverMir=null,t--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(e,t,i){if(this._redrawId===i){t=t||!1,this._updateLayerStatus(e);var n=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var r=this;pn((function(){r._paintList(e,t,i)}))}}},_compositeManually:function(){var e=this.getLayer(314159).ctx,t=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,t,i),this.eachBuiltinLayer((function(n){n.virtual&&e.drawImage(n.dom,0,0,t,i)}))},_doPaintList:function(e,t){for(var i=[],n=0;n<this._zlevelList.length;n++){var r=this._zlevelList[n];(s=this._layers[r]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||t)&&i.push(s)}for(var a=!0,o=0;o<i.length;o++){var s,l=(s=i[o]).ctx,u={};l.save();var c=t?s.__startIndex:s.__drawIndex,h=!t&&s.incremental&&Date.now,d=h&&Date.now(),p=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,p);else if(c===s.__startIndex){var f=e[c];f.incremental&&f.notClear&&!t||s.clear(!1,p)}-1===c&&(console.error("For some unknown reason. drawIndex is -1"),c=s.__startIndex);for(var g=c;g<s.__endIndex;g++){var m=e[g];if(this._doPaintEl(m,s,t,u),m.__dirty=m.__dirtyText=!1,h)if(Date.now()-d>15)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return J.wxa&&we.each(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),a},_doPaintEl:function(e,t,i,n){var r=t.ctx,a=e.transform;if((t.__dirty||i)&&!e.invisible&&0!==e.style.opacity&&(!a||a[0]||a[3])&&(!e.culling||!function(e,t,i){return Ar.copy(e.getBoundingRect()),e.transform&&Ar.applyTransform(e.transform),Cr.width=t,Cr.height=i,!Ar.intersect(Cr)}(e,this._width,this._height))){var o=e.__clipPaths,s=n.prevElClipPaths;s&&!function(e,t){if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var i=0;i<e.length;i++)if(e[i]!==t[i])return!0;return!1}(o,s)||(s&&(r.restore(),n.prevElClipPaths=null,n.prevEl=null),o&&(r.save(),function(e,t){for(var i=0;i<e.length;i++){var n=e[i];n.setTransform(t),t.beginPath(),n.buildPath(t,n.shape),t.clip(),n.restoreTransform(t)}}(o,r),n.prevElClipPaths=o)),e.beforeBrush&&e.beforeBrush(r),e.brush(r,n.prevEl||null),n.prevEl=e,e.afterBrush&&e.afterBrush(r)}},getLayer:function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=314159);var i=this._layers[e];return i||((i=new dn("zr_"+e,this,this.dpr)).zlevel=e,i.__builtin__=!0,this._layerConfig[e]?we.merge(i,this._layerConfig[e],!0):this._layerConfig[e-.01]&&we.merge(i,this._layerConfig[e-.01],!0),t&&(i.virtual=t),this.insertLayer(e,i),i.initContext()),i},insertLayer:function(e,t){var i=this._layers,n=this._zlevelList,r=n.length,a=null,o=-1,s=this._domRoot;if(!i[e]&&function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(r>0&&e>n[0]){for(o=0;o<r-1&&!(n[o]<e&&n[o+1]>e);o++);a=i[n[o]]}if(n.splice(o+1,0,e),i[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(t.dom,l.nextSibling):s.appendChild(t.dom)}else s.firstChild?s.insertBefore(t.dom,s.firstChild):s.appendChild(t.dom)}},eachLayer:function(e,t){var i,n,r=this._zlevelList;for(n=0;n<r.length;n++)i=r[n],e.call(t,this._layers[i],i)},eachBuiltinLayer:function(e,t){var i,n,r,a=this._zlevelList;for(r=0;r<a.length;r++)n=a[r],(i=this._layers[n]).__builtin__&&e.call(t,i,n)},eachOtherLayer:function(e,t){var i,n,r,a=this._zlevelList;for(r=0;r<a.length;r++)n=a[r],(i=this._layers[n]).__builtin__||e.call(t,i,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(e){function t(e){r&&(r.__endIndex!==e&&(r.__dirty=!0),r.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var i=1;i<e.length;i++){if((o=e[i]).zlevel!==e[i-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var n,r=null,a=0;for(i=0;i<e.length;i++){var o,s,l=(o=e[i]).zlevel;n!==l&&(n=l,a=0),o.incremental?((s=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):s=this.getLayer(l+(a>0?.01:0),this._needsManuallyCompositing),s.__builtin__||gi("ZLevel "+l+" has been used by unkown layer "+s.id),s!==r&&(s.__used=!0,s.__startIndex!==i&&(s.__dirty=!0),s.__startIndex=i,s.incremental?s.__drawIndex=-1:s.__drawIndex=i,t(i),r=s),o.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=i))}t(i),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(e){e.clear()},setBackgroundColor:function(e){this._backgroundColor=e},configLayer:function(e,t){if(t){var i=this._layerConfig;i[e]?we.merge(i[e],t,!0):i[e]=t;for(var n=0;n<this._zlevelList.length;n++){var r=this._zlevelList[n];if(r===e||r===e+.01){var a=this._layers[r];we.merge(a,i[e],!0)}}}},delLayer:function(e){var t=this._layers,i=this._zlevelList,n=t[e];n&&(n.dom.parentNode.removeChild(n.dom),delete t[e],i.splice(we.indexOf(i,e),1))},resize:function(e,t){if(this._domRoot.style){var i=this._domRoot;i.style.display="none";var n=this._opts;if(null!=e&&(n.width=e),null!=t&&(n.height=t),e=this._getSize(0),t=this._getSize(1),i.style.display="",this._width!==e||t!==this._height){for(var r in i.style.width=e+"px",i.style.height=t+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(e,t);we.each(this._progressiveLayers,(function(i){i.resize(e,t)})),this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(314159).resize(e,t)}return this},clearLayer:function(e){var t=this._layers[e];t&&t.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[314159].dom;var t=new dn("image",this,e.pixelRatio||this.dpr);if(t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor),e.pixelRatio<=this.dpr){this.refresh();var i=t.dom.width,n=t.dom.height,r=t.ctx;this.eachLayer((function(e){e.__builtin__?r.drawImage(e.dom,0,0,i,n):e.renderToCanvas&&(t.ctx.save(),e.renderToCanvas(t.ctx),t.ctx.restore())}))}else for(var a={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[s];this._doPaintEl(l,t,!0,a)}return t.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,i=["width","height"][e],n=["clientWidth","clientHeight"][e],r=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=t[i]&&"auto"!==t[i])return parseFloat(t[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[n]||Tr(s[i])||Tr(o.style[i]))-(Tr(s[r])||0)-(Tr(s[a])||0)|0},pathToImage:function(e,t){t=t||this.dpr;var i=document.createElement("canvas"),n=i.getContext("2d"),r=e.getBoundingRect(),a=e.style,o=a.shadowBlur*t,s=a.shadowOffsetX*t,l=a.shadowOffsetY*t,u=a.hasStroke()?a.lineWidth:0,c=Math.max(u/2,-s+o),h=Math.max(u/2,s+o),d=Math.max(u/2,-l+o),p=Math.max(u/2,l+o),f=r.width+c+h,g=r.height+d+p;i.width=f*t,i.height=g*t,n.scale(t,t),n.clearRect(0,0,f,g),n.dpr=t;var m={position:e.position,rotation:e.rotation,scale:e.scale};e.position=[c-r.x,d-r.y],e.rotation=0,e.scale=[1,1],e.updateTransform(),e&&e.brush(n);var v=new Mr({style:{x:0,y:0,image:i}});return null!=m.position&&(v.position=e.position=m.position),null!=m.rotation&&(v.rotation=e.rotation=m.rotation),null!=m.scale&&(v.scale=e.scale=m.scale),v}};var Lr=Dr,Pr=Je.Dispatcher,kr=function(e){e=e||{},this.stage=e.stage||{},this.onframe=e.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Pr.call(this)};kr.prototype={constructor:kr,addClip:function(e){this._clips.push(e)},addAnimator:function(e){e.animation=this;for(var t=e.getClips(),i=0;i<t.length;i++)this.addClip(t[i])},removeClip:function(e){var t=we.indexOf(this._clips,e);t>=0&&this._clips.splice(t,1)},removeAnimator:function(e){for(var t=e.getClips(),i=0;i<t.length;i++)this.removeClip(t[i]);e.animation=null},_update:function(){for(var e=(new Date).getTime()-this._pausedTime,t=e-this._time,i=this._clips,n=i.length,r=[],a=[],o=0;o<n;o++){var s=i[o],l=s.step(e,t);l&&(r.push(l),a.push(s))}for(o=0;o<n;)i[o]._needsRemove?(i[o]=i[n-1],i.pop(),n--):o++;n=r.length;for(o=0;o<n;o++)a[o].fire(r[o]);this._time=e,this.onframe(t),this.trigger("frame",t),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,pn((function t(){e._running&&(pn(t),!e._paused&&e._update())}))},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(e,t){var i=new di(e,(t=t||{}).loop,t.getter,t.setter);return this.addAnimator(i),i}},we.mixin(kr,Pr);var Or,Rr,Nr=kr,Er=Je.addEventListener,zr=Je.removeEventListener,Br=Je.normalizeEvent,Vr=Je.getNativeEvent,Fr=J.domSupported,Gr=(Rr={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Or=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:we.map(Or,(function(e){var t=e.replace("mouse","pointer");return Rr.hasOwnProperty(t)?t:e}))}),Hr=["mousemove","mouseup"],Wr=["pointermove","pointerup"];function jr(e){return"mousewheel"===e&&J.browser.firefox?"DOMMouseScroll":e}function Ur(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Zr(e){e&&(e.zrByTouch=!0)}function Yr(e,t){for(var i=t,n=!1;i&&9!==i.nodeType&&!(n=i.domBelongToZr||i!==t&&i===e.painterRoot);)i=i.parentNode;return n}function qr(e,t){this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}var Xr=qr.prototype;Xr.stopPropagation=Xr.stopImmediatePropagation=Xr.preventDefault=we.noop;var Kr={mousedown:function(e){e=Br(this.dom,e),this._mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Br(this.dom,e);var t=this._mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||ia(this,!0),this.trigger("mousemove",e)},mouseup:function(e){e=Br(this.dom,e),ia(this,!1),this.trigger("mouseup",e)},mouseout:function(e){e=Br(this.dom,e),this._pointerCapturing&&(e.zrEventControl="no_globalout");var t=e.toElement||e.relatedTarget;e.zrIsToLocalDOM=Yr(this,t),this.trigger("mouseout",e)},touchstart:function(e){Zr(e=Br(this.dom,e)),this._lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Kr.mousemove.call(this,e),Kr.mousedown.call(this,e)},touchmove:function(e){Zr(e=Br(this.dom,e)),this.handler.processGesture(e,"change"),Kr.mousemove.call(this,e)},touchend:function(e){Zr(e=Br(this.dom,e)),this.handler.processGesture(e,"end"),Kr.mouseup.call(this,e),+new Date-this._lastTouchMoment<300&&Kr.click.call(this,e)},pointerdown:function(e){Kr.mousedown.call(this,e)},pointermove:function(e){Ur(e)||Kr.mousemove.call(this,e)},pointerup:function(e){Kr.mouseup.call(this,e)},pointerout:function(e){Ur(e)||Kr.mouseout.call(this,e)}};we.each(["click","mousewheel","dblclick","contextmenu"],(function(e){Kr[e]=function(t){t=Br(this.dom,t),this.trigger(e,t)}}));var Qr={pointermove:function(e){Ur(e)||Qr.mousemove.call(this,e)},pointerup:function(e){Qr.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this._pointerCapturing;ia(this,!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function Jr(e,t){var i=t.domHandlers;J.pointerEventsSupported?we.each(Gr.pointer,(function(n){ea(t,n,(function(t){i[n].call(e,t)}))})):(J.touchEventsSupported&&we.each(Gr.touch,(function(n){ea(t,n,(function(r){i[n].call(e,r),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),we.each(Gr.mouse,(function(n){ea(t,n,(function(r){r=Vr(r),t.touching||i[n].call(e,r)}))})))}function $r(e,t){function i(i){ea(t,i,(function(n){n=Vr(n),Yr(e,n.target)||(n=function(e,t){return Br(e.dom,new qr(e,t),!0)}(e,n),t.domHandlers[i].call(e,n))}),{capture:!0})}J.pointerEventsSupported?we.each(Wr,i):J.touchEventsSupported||we.each(Hr,i)}function ea(e,t,i,n){e.mounted[t]=i,e.listenerOpts[t]=n,Er(e.domTarget,jr(t),i,n)}function ta(e){var t=e.mounted;for(var i in t)t.hasOwnProperty(i)&&zr(e.domTarget,jr(i),t[i],e.listenerOpts[i]);e.mounted={}}function ia(e,t){if(e._mayPointerCapture=null,Fr&&e._pointerCapturing^t){e._pointerCapturing=t;var i=e._globalHandlerScope;t?$r(e,i):ta(i)}}function na(e,t){this.domTarget=e,this.domHandlers=t,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function ra(e,t){Ne.call(this),this.dom=e,this.painterRoot=t,this._localHandlerScope=new na(e,Kr),Fr&&(this._globalHandlerScope=new na(document,Qr)),this._pointerCapturing=!1,this._mayPointerCapture=null,Jr(this,this._localHandlerScope)}var aa=ra.prototype;aa.dispose=function(){ta(this._localHandlerScope),Fr&&ta(this._globalHandlerScope)},aa.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},we.mixin(ra,Ne);var oa=ra,sa=!J.canvasSupported,la={canvas:Lr},ua={};var ca=function(e,t,i){i=i||{},this.dom=t,this.id=e;var n=this,r=new Zi,a=i.renderer;if(sa){if(!la.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&la[a]||(a="canvas");var o=new la[a](t,r,i,e);this.storage=r,this.painter=o;var s=J.node||J.worker?null:new oa(o.getViewportRoot(),o.root);this.handler=new ut(r,o,s,o.root),this.animation=new Nr({stage:{update:we.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=r.delFromStorage,u=r.addToStorage;r.delFromStorage=function(e){l.call(r,e),e&&e.removeSelfFromZr(n)},r.addToStorage=function(e){u.call(r,e),e.addSelfToZr(n)}};ca.prototype={constructor:ca,getId:function(){return this.id},add:function(e){this.storage.addRoot(e),this._needsRefresh=!0},remove:function(e){this.storage.delRoot(e),this._needsRefresh=!0},configLayer:function(e,t){this.painter.configLayer&&this.painter.configLayer(e,t),this._needsRefresh=!0},setBackgroundColor:function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var e;this._needsRefresh&&(e=!0,this.refreshImmediately()),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately()),e&&this.trigger("rendered")},addHover:function(e,t){if(this.painter.addHover){var i=this.painter.addHover(e,t);return this.refreshHover(),i}},removeHover:function(e){this.painter.removeHover&&(this.painter.removeHover(e),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(e,t){return this.painter.pathToImage(e,t)},setCursorStyle:function(e){this.handler.setCursorStyle(e)},findHover:function(e,t){return this.handler.findHover(e,t)},on:function(e,t,i){this.handler.on(e,t,i)},off:function(e,t){this.handler.off(e,t)},trigger:function(e,t){this.handler.trigger(e,t)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,e=this.id,delete ua[e]}};var ha={version:"4.3.1",init:function(e,t){var i=new ca(Q(),e,t);return ua[i.id]=i,i},dispose:function(e){if(e)e.dispose();else{for(var t in ua)ua.hasOwnProperty(t)&&ua[t].dispose();ua={}}return this},getInstance:function(e){return ua[e]},registerPainter:function(e,t){la[e]=t}},da=we.each,pa=we.isObject,fa=we.isArray;function ga(e){return e instanceof Array?e:null==e?[]:[e]}function ma(e){return pa(e)&&e.id&&0===(e.id+"").indexOf("\0_ec_\0")}var va=0;function ya(e,t){return e&&e.hasOwnProperty(t)}var xa={normalizeToArray:ga,defaultEmphasis:function(e,t,i){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var n=0,r=i.length;n<r;n++){var a=i[n];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}},TEXT_STYLE_OPTIONS:["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"],getDataItemValue:function(e){return!pa(e)||fa(e)||e instanceof Date?e:e.value},isDataItemOption:function(e){return pa(e)&&!(e instanceof Array)},mappingToExists:function(e,t){t=(t||[]).slice();var i=we.map(e||[],(function(e,t){return{exist:e}}));return da(t,(function(e,n){if(pa(e)){for(var r=0;r<i.length;r++)if(!i[r].option&&null!=e.id&&i[r].exist.id===e.id+"")return i[r].option=e,void(t[n]=null);for(r=0;r<i.length;r++){var a=i[r].exist;if(!(i[r].option||null!=a.id&&null!=e.id||null==e.name||ma(e)||ma(a)||a.name!==e.name+""))return i[r].option=e,void(t[n]=null)}}})),da(t,(function(e,t){if(pa(e)){for(var n=0;n<i.length;n++){var r=i[n].exist;if(!i[n].option&&!ma(r)&&null==e.id){i[n].option=e;break}}n>=i.length&&i.push({option:e})}})),i},makeIdAndName:function(e){var t=we.createHashMap();da(e,(function(e,i){var n=e.exist;n&&t.set(n.id,e)})),da(e,(function(e,i){var n=e.option;we.assert(!n||null==n.id||!t.get(n.id)||t.get(n.id)===e,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})})),da(e,(function(e,i){var n=e.exist,r=e.option,a=e.keyInfo;if(pa(r)){if(a.name=null!=r.name?r.name+"":n?n.name:"series\0"+i,n)a.id=n.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do{a.id="\0"+a.name+"\0"+o++}while(t.get(a.id))}t.set(a.id,e)}}))},isNameSpecified:function(e){var t=e.name;return!(!t||!t.indexOf("series\0"))},isIdInner:ma,compressBatches:function(e,t){var i={},n={};return r(e||[],i),r(t||[],n,i),[a(i),a(n)];function r(e,t,i){for(var n=0,r=e.length;n<r;n++)for(var a=e[n].seriesId,o=ga(e[n].dataIndex),s=i&&i[a],l=0,u=o.length;l<u;l++){var c=o[l];s&&s[c]?s[c]=null:(t[a]||(t[a]={}))[c]=1}}function a(e,t){var i=[];for(var n in e)if(e.hasOwnProperty(n)&&null!=e[n])if(t)i.push(+n);else{var r=a(e[n],!0);r.length&&i.push({seriesId:n,dataIndex:r})}return i}},queryDataIndex:function(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?we.isArray(t.dataIndex)?we.map(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?we.isArray(t.name)?we.map(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0},makeInner:function(){var e="__\0ec_inner_"+va+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}},parseFinder:function(e,t,i){if(we.isString(t)){var n={};n[t+"Index"]=0,t=n}var r=i&&i.defaultMainType;!r||ya(t,r+"Index")||ya(t,r+"Id")||ya(t,r+"Name")||(t[r+"Index"]=0);var a={};return da(t,(function(n,r){n=t[r];if("dataIndex"!==r&&"dataIndexInside"!==r){var o=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includeMainTypes&&we.indexOf(i.includeMainTypes,s)<0)){var u={mainType:s};"index"===l&&"all"===n||(u[l]=n);var c=e.queryComponents(u);a[s+"Models"]=c,a[s+"Model"]=c[0]}}else a[r]=n})),a},setAttribute:function(e,t,i){e.setAttribute?e.setAttribute(t,i):e[t]=i},getAttribute:function(e,t){return e.getAttribute?e.getAttribute(t):e[t]},getTooltipRenderMode:function(e){return"auto"===e?J.domSupported?"html":"richText":e||"html"},groupData:function(e,t){var i=we.createHashMap(),n=[];return we.each(e,(function(e){var r=t(e);(i.get(r)||(n.push(r),i.set(r,[]))).push(e)})),{keys:n,buckets:i}}},_a="___EC__COMPONENT__CONTAINER___";function ba(e){var t={main:"",sub:""};return e&&(e=e.split("."),t.main=e[0]||"",t.sub=e[1]||""),t}var wa=0;function Sa(e,t){var i=we.slice(arguments,2);return this.superClass.prototype[t].apply(e,i)}function Ma(e,t,i){return this.superClass.prototype[t].apply(e,i)}var Ia={parseClassType:ba,enableClassExtend:function(e,t){e.$constructor=e,e.extend=function(e){var t=this,i=function(){e.$constructor?e.$constructor.apply(this,arguments):t.apply(this,arguments)};return we.extend(i.prototype,e),i.extend=this.extend,i.superCall=Sa,i.superApply=Ma,we.inherits(i,this),i.superClass=t,i}},enableClassCheck:function(e){var t=["__\0is_clz",wa++,Math.random().toFixed(3)].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}},enableClassManagement:function(e,t){t=t||{};var i={};if(e.registerClass=function(e,t){if(t)if(function(e){we.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}(t),(t=ba(t)).sub){if(t.sub!==_a){(function(e){var t=i[e.main];t&&t[_a]||((t=i[e.main]={})[_a]=!0);return t}(t))[t.sub]=e}}else i[t.main]=e;return e},e.getClass=function(e,t,n){var r=i[e];if(r&&r[_a]&&(r=t?r[t]:null),n&&!r)throw new Error(t?"Component "+e+"."+(t||"")+" not exists. Load it first.":e+".type should be specified.");return r},e.getClassesByMainType=function(e){e=ba(e);var t=[],n=i[e.main];return n&&n[_a]?we.each(n,(function(e,i){i!==_a&&t.push(e)})):t.push(n),t},e.hasClass=function(e){return e=ba(e),!!i[e.main]},e.getAllClassMainTypes=function(){var e=[];return we.each(i,(function(t,i){e.push(i)})),e},e.hasSubTypes=function(e){e=ba(e);var t=i[e.main];return t&&t[_a]},e.parseClassType=ba,t.registerWhenExtend){var n=e.extend;n&&(e.extend=function(t){var i=n.call(this,t);return e.registerClass(i,t.type)})}return e},setReadOnly:function(e,t){}};var Ta=function(e){for(var t=0;t<e.length;t++)e[t][1]||(e[t][1]=e[t][0]);return function(t,i,n){for(var r={},a=0;a<e.length;a++){var o=e[a][1];if(!(i&&we.indexOf(i,o)>=0||n&&we.indexOf(n,o)<0)){var s=t.getShallow(o);null!=s&&(r[e[a][0]]=s)}}return r}},Aa=Ta([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Ca={getLineStyle:function(e){var t=Aa(this,e);return t.lineDash=this.getLineDash(t.lineWidth),t},getLineDash:function(e){null==e&&(e=1);var t=this.get("type"),i=Math.max(e,2),n=4*e;return"solid"!==t&&null!=t&&("dashed"===t?[n,n]:[i,i])}},Da=Ta([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),La={getAreaStyle:function(e,t){return Da(this,e,t)}},Pa=Ce.create,ka=Ce.distSquare,Oa=Math.pow,Ra=Math.sqrt,Na=Ra(3),Ea=Pa(),za=Pa(),Ba=Pa();function Va(e){return e>-1e-8&&e<1e-8}function Fa(e){return e>1e-8||e<-1e-8}function Ga(e,t,i,n,r){var a=1-r;return a*a*(a*e+3*r*t)+r*r*(r*n+3*a*i)}function Ha(e,t,i,n){var r=1-n;return r*(r*e+2*n*t)+n*n*i}var Wa={cubicAt:Ga,cubicDerivativeAt:function(e,t,i,n,r){var a=1-r;return 3*(((t-e)*a+2*(i-t)*r)*a+(n-i)*r*r)},cubicRootAt:function(e,t,i,n,r,a){var o=n+3*(t-i)-e,s=3*(i-2*t+e),l=3*(t-e),u=e-r,c=s*s-3*o*l,h=s*l-9*o*u,d=l*l-3*s*u,p=0;if(Va(c)&&Va(h)){if(Va(s))a[0]=0;else(M=-l/s)>=0&&M<=1&&(a[p++]=M)}else{var f=h*h-4*c*d;if(Va(f)){var g=h/c,m=-g/2;(M=-s/o+g)>=0&&M<=1&&(a[p++]=M),m>=0&&m<=1&&(a[p++]=m)}else if(f>0){var v=Ra(f),y=c*s+1.5*o*(-h+v),x=c*s+1.5*o*(-h-v);(M=(-s-((y=y<0?-Oa(-y,1/3):Oa(y,1/3))+(x=x<0?-Oa(-x,1/3):Oa(x,1/3))))/(3*o))>=0&&M<=1&&(a[p++]=M)}else{var _=(2*c*s-3*o*h)/(2*Ra(c*c*c)),b=Math.acos(_)/3,w=Ra(c),S=Math.cos(b),M=(-s-2*w*S)/(3*o),I=(m=(-s+w*(S+Na*Math.sin(b)))/(3*o),(-s+w*(S-Na*Math.sin(b)))/(3*o));M>=0&&M<=1&&(a[p++]=M),m>=0&&m<=1&&(a[p++]=m),I>=0&&I<=1&&(a[p++]=I)}}return p},cubicExtrema:function(e,t,i,n,r){var a=6*i-12*t+6*e,o=9*t+3*n-3*e-9*i,s=3*t-3*e,l=0;if(Va(o)){if(Fa(a))(c=-s/a)>=0&&c<=1&&(r[l++]=c)}else{var u=a*a-4*o*s;if(Va(u))r[0]=-a/(2*o);else if(u>0){var c,h=Ra(u),d=(-a-h)/(2*o);(c=(-a+h)/(2*o))>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l},cubicSubdivide:function(e,t,i,n,r,a){var o=(t-e)*r+e,s=(i-t)*r+t,l=(n-i)*r+i,u=(s-o)*r+o,c=(l-s)*r+s,h=(c-u)*r+u;a[0]=e,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=c,a[6]=l,a[7]=n},cubicProjectPoint:function(e,t,i,n,r,a,o,s,l,u,c){var h,d,p,f,g,m=.005,v=1/0;Ea[0]=l,Ea[1]=u;for(var y=0;y<1;y+=.05)za[0]=Ga(e,i,r,o,y),za[1]=Ga(t,n,a,s,y),(f=ka(Ea,za))<v&&(h=y,v=f);v=1/0;for(var x=0;x<32&&!(m<1e-4);x++)d=h-m,p=h+m,za[0]=Ga(e,i,r,o,d),za[1]=Ga(t,n,a,s,d),f=ka(za,Ea),d>=0&&f<v?(h=d,v=f):(Ba[0]=Ga(e,i,r,o,p),Ba[1]=Ga(t,n,a,s,p),g=ka(Ba,Ea),p<=1&&g<v?(h=p,v=g):m*=.5);return c&&(c[0]=Ga(e,i,r,o,h),c[1]=Ga(t,n,a,s,h)),Ra(v)},quadraticAt:Ha,quadraticDerivativeAt:function(e,t,i,n){return 2*((1-n)*(t-e)+n*(i-t))},quadraticRootAt:function(e,t,i,n,r){var a=e-2*t+i,o=2*(t-e),s=e-n,l=0;if(Va(a)){if(Fa(o))(c=-s/o)>=0&&c<=1&&(r[l++]=c)}else{var u=o*o-4*a*s;if(Va(u))(c=-o/(2*a))>=0&&c<=1&&(r[l++]=c);else if(u>0){var c,h=Ra(u),d=(-o-h)/(2*a);(c=(-o+h)/(2*a))>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l},quadraticExtremum:function(e,t,i){var n=e+i-2*t;return 0===n?.5:(e-t)/n},quadraticSubdivide:function(e,t,i,n,r){var a=(t-e)*n+e,o=(i-t)*n+t,s=(o-a)*n+a;r[0]=e,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=i},quadraticProjectPoint:function(e,t,i,n,r,a,o,s,l){var u,c=.005,h=1/0;Ea[0]=o,Ea[1]=s;for(var d=0;d<1;d+=.05){za[0]=Ha(e,i,r,d),za[1]=Ha(t,n,a,d),(m=ka(Ea,za))<h&&(u=d,h=m)}h=1/0;for(var p=0;p<32&&!(c<1e-4);p++){var f=u-c,g=u+c;za[0]=Ha(e,i,r,f),za[1]=Ha(t,n,a,f);var m=ka(za,Ea);if(f>=0&&m<h)u=f,h=m;else{Ba[0]=Ha(e,i,r,g),Ba[1]=Ha(t,n,a,g);var v=ka(Ba,Ea);g<=1&&v<h?(u=g,h=v):c*=.5}}return l&&(l[0]=Ha(e,i,r,u),l[1]=Ha(t,n,a,u)),Ra(h)}},ja=Math.min,Ua=Math.max,Za=Math.sin,Ya=Math.cos,qa=2*Math.PI,Xa=Ce.create(),Ka=Ce.create(),Qa=Ce.create();var Ja=[],$a=[];var eo={fromPoints:function(e,t,i){if(0!==e.length){var n,r=e[0],a=r[0],o=r[0],s=r[1],l=r[1];for(n=1;n<e.length;n++)r=e[n],a=ja(a,r[0]),o=Ua(o,r[0]),s=ja(s,r[1]),l=Ua(l,r[1]);t[0]=a,t[1]=s,i[0]=o,i[1]=l}},fromLine:function(e,t,i,n,r,a){r[0]=ja(e,i),r[1]=ja(t,n),a[0]=Ua(e,i),a[1]=Ua(t,n)},fromCubic:function(e,t,i,n,r,a,o,s,l,u){var c,h=Wa.cubicExtrema,d=Wa.cubicAt,p=h(e,i,r,o,Ja);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,c=0;c<p;c++){var f=d(e,i,r,o,Ja[c]);l[0]=ja(f,l[0]),u[0]=Ua(f,u[0])}for(p=h(t,n,a,s,$a),c=0;c<p;c++){var g=d(t,n,a,s,$a[c]);l[1]=ja(g,l[1]),u[1]=Ua(g,u[1])}l[0]=ja(e,l[0]),u[0]=Ua(e,u[0]),l[0]=ja(o,l[0]),u[0]=Ua(o,u[0]),l[1]=ja(t,l[1]),u[1]=Ua(t,u[1]),l[1]=ja(s,l[1]),u[1]=Ua(s,u[1])},fromQuadratic:function(e,t,i,n,r,a,o,s){var l=Wa.quadraticExtremum,u=Wa.quadraticAt,c=Ua(ja(l(e,i,r),1),0),h=Ua(ja(l(t,n,a),1),0),d=u(e,i,r,c),p=u(t,n,a,h);o[0]=ja(e,r,d),o[1]=ja(t,a,p),s[0]=Ua(e,r,d),s[1]=Ua(t,a,p)},fromArc:function(e,t,i,n,r,a,o,s,l){var u=Ce.min,c=Ce.max,h=Math.abs(r-a);if(h%qa<1e-4&&h>1e-4)return s[0]=e-i,s[1]=t-n,l[0]=e+i,void(l[1]=t+n);if(Xa[0]=Ya(r)*i+e,Xa[1]=Za(r)*n+t,Ka[0]=Ya(a)*i+e,Ka[1]=Za(a)*n+t,u(s,Xa,Ka),c(l,Xa,Ka),(r%=qa)<0&&(r+=qa),(a%=qa)<0&&(a+=qa),r>a&&!o?a+=qa:r<a&&o&&(r+=qa),o){var d=a;a=r,r=d}for(var p=0;p<a;p+=Math.PI/2)p>r&&(Qa[0]=Ya(p)*i+e,Qa[1]=Za(p)*n+t,u(s,Qa,s),c(l,Qa,l))}},to=fi.devicePixelRatio,io={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},no=[],ro=[],ao=[],oo=[],so=Math.min,lo=Math.max,uo=Math.cos,co=Math.sin,ho=Math.sqrt,po=Math.abs,fo="undefined"!=typeof Float32Array,go=function(e){this._saveData=!e,this._saveData&&(this.data=[]),this._ctx=null};go.prototype={constructor:go,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(e,t,i){i=i||0,this._ux=po(i/to/e)||0,this._uy=po(i/to/t)||0},getContext:function(){return this._ctx},beginPath:function(e){return this._ctx=e,e&&e.beginPath(),e&&(this.dpr=e.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(e,t){return this.addData(io.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},lineTo:function(e,t){var i=po(e-this._xi)>this._ux||po(t-this._yi)>this._uy||this._len<5;return this.addData(io.L,e,t),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(e,t):this._ctx.lineTo(e,t)),i&&(this._xi=e,this._yi=t),this},bezierCurveTo:function(e,t,i,n,r,a){return this.addData(io.C,e,t,i,n,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(e,t,i,n,r,a):this._ctx.bezierCurveTo(e,t,i,n,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(e,t,i,n){return this.addData(io.Q,e,t,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(e,t,i,n):this._ctx.quadraticCurveTo(e,t,i,n)),this._xi=i,this._yi=n,this},arc:function(e,t,i,n,r,a){return this.addData(io.A,e,t,i,i,n,r-n,0,a?0:1),this._ctx&&this._ctx.arc(e,t,i,n,r,a),this._xi=uo(r)*i+e,this._yi=co(r)*i+t,this},arcTo:function(e,t,i,n,r){return this._ctx&&this._ctx.arcTo(e,t,i,n,r),this},rect:function(e,t,i,n){return this._ctx&&this._ctx.rect(e,t,i,n),this.addData(io.R,e,t,i,n),this},closePath:function(){this.addData(io.Z);var e=this._ctx,t=this._x0,i=this._y0;return e&&(this._needsDash()&&this._dashedLineTo(t,i),e.closePath()),this._xi=t,this._yi=i,this},fill:function(e){e&&e.fill(),this.toStatic()},stroke:function(e){e&&e.stroke(),this.toStatic()},setLineDash:function(e){if(e instanceof Array){this._lineDash=e,this._dashIdx=0;for(var t=0,i=0;i<e.length;i++)t+=e[i];this._dashSum=t}return this},setLineDashOffset:function(e){return this._dashOffset=e,this},len:function(){return this._len},setData:function(e){var t=e.length;this.data&&this.data.length===t||!fo||(this.data=new Float32Array(t));for(var i=0;i<t;i++)this.data[i]=e[i];this._len=t},appendPath:function(e){e instanceof Array||(e=[e]);for(var t=e.length,i=0,n=this._len,r=0;r<t;r++)i+=e[r].len();fo&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(r=0;r<t;r++)for(var a=e[r].data,o=0;o<a.length;o++)this.data[n++]=a[o];this._len=n},addData:function(e){if(this._saveData){var t=this.data;this._len+arguments.length>t.length&&(this._expandData(),t=this.data);for(var i=0;i<arguments.length;i++)t[this._len++]=arguments[i];this._prevCmd=e}},_expandData:function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(e,t){var i,n,r=this._dashSum,a=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,c=e-l,h=t-u,d=ho(c*c+h*h),p=l,f=u,g=o.length;for(a<0&&(a=r+a),p-=(a%=r)*(c/=d),f-=a*(h/=d);c>0&&p<=e||c<0&&p>=e||0===c&&(h>0&&f<=t||h<0&&f>=t);)p+=c*(i=o[n=this._dashIdx]),f+=h*i,this._dashIdx=(n+1)%g,c>0&&p<l||c<0&&p>l||h>0&&f<u||h<0&&f>u||s[n%2?"moveTo":"lineTo"](c>=0?so(p,e):lo(p,e),h>=0?so(f,t):lo(f,t));c=p-e,h=f-t,this._dashOffset=-ho(c*c+h*h)},_dashedBezierTo:function(e,t,i,n,r,a){var o,s,l,u,c,h=this._dashSum,d=this._dashOffset,p=this._lineDash,f=this._ctx,g=this._xi,m=this._yi,v=Wa.cubicAt,y=0,x=this._dashIdx,_=p.length,b=0;for(d<0&&(d=h+d),d%=h,o=0;o<1;o+=.1)s=v(g,e,i,r,o+.1)-v(g,e,i,r,o),l=v(m,t,n,a,o+.1)-v(m,t,n,a,o),y+=ho(s*s+l*l);for(;x<_&&!((b+=p[x])>d);x++);for(o=(b-d)/y;o<=1;)u=v(g,e,i,r,o),c=v(m,t,n,a,o),x%2?f.moveTo(u,c):f.lineTo(u,c),o+=p[x]/y,x=(x+1)%_;x%2!=0&&f.lineTo(r,a),s=r-u,l=a-c,this._dashOffset=-ho(s*s+l*l)},_dashedQuadraticTo:function(e,t,i,n){var r=i,a=n;i=(i+2*e)/3,n=(n+2*t)/3,e=(this._xi+2*e)/3,t=(this._yi+2*t)/3,this._dashedBezierTo(e,t,i,n,r,a)},toStatic:function(){var e=this.data;e instanceof Array&&(e.length=this._len,fo&&(this.data=new Float32Array(e)))},getBoundingRect:function(){no[0]=no[1]=ao[0]=ao[1]=Number.MAX_VALUE,ro[0]=ro[1]=oo[0]=oo[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,i=0,n=0,r=0,a=0;a<e.length;){var o=e[a++];switch(1===a&&(n=t=e[a],r=i=e[a+1]),o){case io.M:t=n=e[a++],i=r=e[a++],ao[0]=n,ao[1]=r,oo[0]=n,oo[1]=r;break;case io.L:eo.fromLine(t,i,e[a],e[a+1],ao,oo),t=e[a++],i=e[a++];break;case io.C:eo.fromCubic(t,i,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],ao,oo),t=e[a++],i=e[a++];break;case io.Q:eo.fromQuadratic(t,i,e[a++],e[a++],e[a],e[a+1],ao,oo),t=e[a++],i=e[a++];break;case io.A:var s=e[a++],l=e[a++],u=e[a++],c=e[a++],h=e[a++],d=e[a++]+h;a+=1;var p=1-e[a++];1===a&&(n=uo(h)*u+s,r=co(h)*c+l),eo.fromArc(s,l,u,c,h,d,p,ao,oo),t=uo(d)*u+s,i=co(d)*c+l;break;case io.R:n=t=e[a++],r=i=e[a++];var f=e[a++],g=e[a++];eo.fromLine(n,r,n+f,r+g,ao,oo);break;case io.Z:t=n,i=r}Ce.min(no,no,ao),Ce.max(ro,ro,oo)}return 0===a&&(no[0]=no[1]=ro[0]=ro[1]=0),new Ni(no[0],no[1],ro[0]-no[0],ro[1]-no[1])},rebuildPath:function(e){for(var t,i,n,r,a,o,s=this.data,l=this._ux,u=this._uy,c=this._len,h=0;h<c;){var d=s[h++];switch(1===h&&(t=n=s[h],i=r=s[h+1]),d){case io.M:t=n=s[h++],i=r=s[h++],e.moveTo(n,r);break;case io.L:a=s[h++],o=s[h++],(po(a-n)>l||po(o-r)>u||h===c-1)&&(e.lineTo(a,o),n=a,r=o);break;case io.C:e.bezierCurveTo(s[h++],s[h++],s[h++],s[h++],s[h++],s[h++]),n=s[h-2],r=s[h-1];break;case io.Q:e.quadraticCurveTo(s[h++],s[h++],s[h++],s[h++]),n=s[h-2],r=s[h-1];break;case io.A:var p=s[h++],f=s[h++],g=s[h++],m=s[h++],v=s[h++],y=s[h++],x=s[h++],_=s[h++],b=g>m?g:m,w=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(e.translate(p,f),e.rotate(x),e.scale(w,S),e.arc(0,0,b,v,M,1-_),e.scale(1/w,1/S),e.rotate(-x),e.translate(-p,-f)):e.arc(p,f,b,v,M,1-_),1===h&&(t=uo(v)*g+p,i=co(v)*m+f),n=uo(M)*g+p,r=co(M)*m+f;break;case io.R:t=n=s[h],i=r=s[h+1],e.rect(s[h++],s[h++],s[h++],s[h++]);break;case io.Z:e.closePath(),n=t,r=i}}}},go.CMD=io;var mo=go;var vo={containStroke:function(e,t,i,n,r,a,o){if(0===r)return!1;var s=r,l=0;if(o>t+s&&o>n+s||o<t-s&&o<n-s||a>e+s&&a>i+s||a<e-s&&a<i-s)return!1;if(e===i)return Math.abs(a-e)<=s/2;var u=(l=(t-n)/(e-i))*a-o+(e*n-i*t)/(e-i);return u*u/(l*l+1)<=s/2*s/2}};var yo={containStroke:function(e,t,i,n,r,a,o,s,l,u,c){if(0===l)return!1;var h=l;return!(c>t+h&&c>n+h&&c>a+h&&c>s+h||c<t-h&&c<n-h&&c<a-h&&c<s-h||u>e+h&&u>i+h&&u>r+h&&u>o+h||u<e-h&&u<i-h&&u<r-h&&u<o-h)&&Wa.cubicProjectPoint(e,t,i,n,r,a,o,s,u,c,null)<=h/2}},xo=Wa.quadraticProjectPoint;var _o={containStroke:function(e,t,i,n,r,a,o,s,l){if(0===o)return!1;var u=o;return!(l>t+u&&l>n+u&&l>a+u||l<t-u&&l<n-u&&l<a-u||s>e+u&&s>i+u&&s>r+u||s<e-u&&s<i-u&&s<r-u)&&xo(e,t,i,n,r,a,s,l,null)<=u/2}},bo=2*Math.PI;var wo={normalizeRadian:function(e){return(e%=bo)<0&&(e+=bo),e}},So=wo.normalizeRadian,Mo=2*Math.PI;var Io={containStroke:function(e,t,i,n,r,a,o,s,l){if(0===o)return!1;var u=o;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>i||c+u<i)return!1;if(Math.abs(n-r)%Mo<1e-4)return!0;if(a){var h=n;n=So(r),r=So(h)}else n=So(n),r=So(r);n>r&&(r+=Mo);var d=Math.atan2(l,s);return d<0&&(d+=Mo),d>=n&&d<=r||d+Mo>=n&&d+Mo<=r}};var To=function(e,t,i,n,r,a){if(a>t&&a>n||a<t&&a<n)return 0;if(n===t)return 0;var o=n<t?1:-1,s=(a-t)/(n-t);1!==s&&0!==s||(o=n<t?.5:-.5);var l=s*(i-e)+e;return l===r?1/0:l>r?o:0},Ao=wo.normalizeRadian,Co=mo.CMD,Do=2*Math.PI;var Lo=[-1,-1,-1],Po=[-1,-1];function ko(e,t,i,n,r,a,o,s,l,u){if(u>t&&u>n&&u>a&&u>s||u<t&&u<n&&u<a&&u<s)return 0;var c,h=Wa.cubicRootAt(t,n,a,s,u,Lo);if(0===h)return 0;for(var d,p,f=0,g=-1,m=0;m<h;m++){var v=Lo[m],y=0===v||1===v?.5:1;Wa.cubicAt(e,i,r,o,v)<l||(g<0&&(g=Wa.cubicExtrema(t,n,a,s,Po),Po[1]<Po[0]&&g>1&&(c=void 0,c=Po[0],Po[0]=Po[1],Po[1]=c),d=Wa.cubicAt(t,n,a,s,Po[0]),g>1&&(p=Wa.cubicAt(t,n,a,s,Po[1]))),2===g?v<Po[0]?f+=d<t?y:-y:v<Po[1]?f+=p<d?y:-y:f+=s<p?y:-y:v<Po[0]?f+=d<t?y:-y:f+=s<d?y:-y)}return f}function Oo(e,t,i,n,r,a,o,s){if(s>t&&s>n&&s>a||s<t&&s<n&&s<a)return 0;var l=Wa.quadraticRootAt(t,n,a,s,Lo);if(0===l)return 0;var u=Wa.quadraticExtremum(t,n,a);if(u>=0&&u<=1){for(var c=0,h=Wa.quadraticAt(t,n,a,u),d=0;d<l;d++){var p=0===Lo[d]||1===Lo[d]?.5:1;Wa.quadraticAt(e,i,r,Lo[d])<o||(Lo[d]<u?c+=h<t?p:-p:c+=a<h?p:-p)}return c}p=0===Lo[0]||1===Lo[0]?.5:1;return Wa.quadraticAt(e,i,r,Lo[0])<o?0:a<t?p:-p}function Ro(e,t,i,n,r,a,o,s){if((s-=t)>i||s<-i)return 0;var l=Math.sqrt(i*i-s*s);Lo[0]=-l,Lo[1]=l;var u=Math.abs(n-r);if(u<1e-4)return 0;if(u%Do<1e-4){n=0,r=Do;var c=a?1:-1;return o>=Lo[0]+e&&o<=Lo[1]+e?c:0}if(a){l=n;n=Ao(r),r=Ao(l)}else n=Ao(n),r=Ao(r);n>r&&(r+=Do);for(var h=0,d=0;d<2;d++){var p=Lo[d];if(p+e>o){var f=Math.atan2(s,p);c=a?1:-1;f<0&&(f=Do+f),(f>=n&&f<=r||f+Do>=n&&f+Do<=r)&&(f>Math.PI/2&&f<1.5*Math.PI&&(c=-c),h+=c)}}return h}function No(e,t,i,n,r){for(var a,o,s=0,l=0,u=0,c=0,h=0,d=0;d<e.length;){var p=e[d++];switch(p===Co.M&&d>1&&(i||(s+=To(l,u,c,h,n,r))),1===d&&(c=l=e[d],h=u=e[d+1]),p){case Co.M:l=c=e[d++],u=h=e[d++];break;case Co.L:if(i){if(vo.containStroke(l,u,e[d],e[d+1],t,n,r))return!0}else s+=To(l,u,e[d],e[d+1],n,r)||0;l=e[d++],u=e[d++];break;case Co.C:if(i){if(yo.containStroke(l,u,e[d++],e[d++],e[d++],e[d++],e[d],e[d+1],t,n,r))return!0}else s+=ko(l,u,e[d++],e[d++],e[d++],e[d++],e[d],e[d+1],n,r)||0;l=e[d++],u=e[d++];break;case Co.Q:if(i){if(_o.containStroke(l,u,e[d++],e[d++],e[d],e[d+1],t,n,r))return!0}else s+=Oo(l,u,e[d++],e[d++],e[d],e[d+1],n,r)||0;l=e[d++],u=e[d++];break;case Co.A:var f=e[d++],g=e[d++],m=e[d++],v=e[d++],y=e[d++],x=e[d++];d+=1;var _=1-e[d++],b=Math.cos(y)*m+f,w=Math.sin(y)*v+g;d>1?s+=To(l,u,b,w,n,r):(c=b,h=w);var S=(n-f)*v/m+f;if(i){if(Io.containStroke(f,g,v,y,y+x,_,t,S,r))return!0}else s+=Ro(f,g,v,y,y+x,_,S,r);l=Math.cos(y+x)*m+f,u=Math.sin(y+x)*v+g;break;case Co.R:c=l=e[d++],h=u=e[d++];b=c+e[d++],w=h+e[d++];if(i){if(vo.containStroke(c,h,b,h,t,n,r)||vo.containStroke(b,h,b,w,t,n,r)||vo.containStroke(b,w,c,w,t,n,r)||vo.containStroke(c,w,c,h,t,n,r))return!0}else s+=To(b,h,b,w,n,r),s+=To(c,w,c,h,n,r);break;case Co.Z:if(i){if(vo.containStroke(l,u,c,h,t,n,r))return!0}else s+=To(l,u,c,h,n,r);l=c,u=h}}return i||(a=u,o=h,Math.abs(a-o)<1e-4)||(s+=To(l,u,c,h,n,r)||0),0!==s}var Eo={contain:function(e,t,i){return No(e,0,!1,t,i)},containStroke:function(e,t,i,n){return No(e,t,!0,i,n)}},zo=sn.prototype.getCanvasPattern,Bo=Math.abs,Vo=new mo(!0);function Fo(e){wr.call(this,e),this.path=null}Fo.prototype={constructor:Fo,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(e,t){var i,n=this.style,r=this.path||Vo,a=n.hasStroke(),o=n.hasFill(),s=n.fill,l=n.stroke,u=o&&!!s.colorStops,c=a&&!!l.colorStops,h=o&&!!s.image,d=a&&!!l.image;(n.bind(e,this,t),this.setTransform(e),this.__dirty)&&(u&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(e,s,i)),c&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(e,l,i)));u?e.fillStyle=this._fillGradient:h&&(e.fillStyle=zo.call(s,e)),c?e.strokeStyle=this._strokeGradient:d&&(e.strokeStyle=zo.call(l,e));var p=n.lineDash,f=n.lineDashOffset,g=!!e.setLineDash,m=this.getGlobalScale();if(r.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||p&&!g&&a?(r.beginPath(e),p&&!g&&(r.setLineDash(p),r.setLineDashOffset(f)),this.buildPath(r,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(e.beginPath(),this.path.rebuildPath(e)),o)if(null!=n.fillOpacity){var v=e.globalAlpha;e.globalAlpha=n.fillOpacity*n.opacity,r.fill(e),e.globalAlpha=v}else r.fill(e);if(p&&g&&(e.setLineDash(p),e.lineDashOffset=f),a)if(null!=n.strokeOpacity){v=e.globalAlpha;e.globalAlpha=n.strokeOpacity*n.opacity,r.stroke(e),e.globalAlpha=v}else r.stroke(e);p&&g&&e.setLineDash([]),null!=n.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))},buildPath:function(e,t,i){},createPathProxy:function(){this.path=new mo},getBoundingRect:function(){var e=this._rect,t=this.style,i=!e;if(i){var n=this.path;n||(n=this.path=new mo),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),e=n.getBoundingRect()}if(this._rect=e,t.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=e.clone());if(this.__dirty||i){r.copy(e);var a=t.lineWidth,o=t.strokeNoScale?this.getLineScale():1;t.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(r.width+=a/o,r.height+=a/o,r.x-=a/o/2,r.y-=a/o/2)}return r}return e},contain:function(e,t){var i=this.transformCoordToLocal(e,t),n=this.getBoundingRect(),r=this.style;if(e=i[0],t=i[1],n.contain(e,t)){var a=this.path.data;if(r.hasStroke()){var o=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Eo.containStroke(a,o/s,e,t)))return!0}if(r.hasFill())return Eo.contain(a,e,t)}return!1},dirty:function(e){null==e&&(e=!0),e&&(this.__dirtyPath=e,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(e){return this.animate("shape",e)},attrKV:function(e,t){"shape"===e?(this.setShape(t),this.__dirtyPath=!0,this._rect=null):wr.prototype.attrKV.call(this,e,t)},setShape:function(e,t){var i=this.shape;if(i){if(we.isObject(e))for(var n in e)e.hasOwnProperty(n)&&(i[n]=e[n]);else i[e]=t;this.dirty(!0)}return this},getLineScale:function(){var e=this.transform;return e&&Bo(e[0]-1)>1e-10&&Bo(e[3]-1)>1e-10?Math.sqrt(Bo(e[0]*e[3]-e[2]*e[1])):1}},Fo.extend=function(e){var t=function(t){Fo.call(this,t),e.style&&this.style.extendFrom(e.style,!1);var i=e.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var r in i)!n.hasOwnProperty(r)&&i.hasOwnProperty(r)&&(n[r]=i[r])}e.init&&e.init.call(this,t)};for(var i in we.inherits(t,Fo),e)"style"!==i&&"shape"!==i&&(t.prototype[i]=e[i]);return t},we.inherits(Fo,wr);var Go=Fo,Ho=Ce.applyTransform,Wo=mo.CMD,jo=[[],[],[]],Uo=Math.sqrt,Zo=Math.atan2;var Yo=function(e,t){var i,n,r,a,o,s=e.data,l=Wo.M,u=Wo.C,c=Wo.L,h=Wo.R,d=Wo.A,p=Wo.Q;for(r=0,a=0;r<s.length;){switch(i=s[r++],a=r,n=0,i){case l:case c:n=1;break;case u:n=3;break;case p:n=2;break;case d:var f=t[4],g=t[5],m=Uo(t[0]*t[0]+t[1]*t[1]),v=Uo(t[2]*t[2]+t[3]*t[3]),y=Zo(-t[1]/v,t[0]/m);s[r]*=m,s[r++]+=f,s[r]*=v,s[r++]+=g,s[r++]*=m,s[r++]*=v,s[r++]+=y,s[r++]+=y,a=r+=2;break;case h:x[0]=s[r++],x[1]=s[r++],Ho(x,x,t),s[a++]=x[0],s[a++]=x[1],x[0]+=s[r++],x[1]+=s[r++],Ho(x,x,t),s[a++]=x[0],s[a++]=x[1]}for(o=0;o<n;o++){var x;(x=jo[o])[0]=s[r++],x[1]=s[r++],Ho(x,x,t),s[a++]=x[0],s[a++]=x[1]}}},qo=Math.sqrt,Xo=Math.sin,Ko=Math.cos,Qo=Math.PI,Jo=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},$o=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(Jo(e)*Jo(t))},es=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos($o(e,t))};function ts(e,t,i,n,r,a,o,s,l,u,c){var h=l*(Qo/180),d=Ko(h)*(e-i)/2+Xo(h)*(t-n)/2,p=-1*Xo(h)*(e-i)/2+Ko(h)*(t-n)/2,f=d*d/(o*o)+p*p/(s*s);f>1&&(o*=qo(f),s*=qo(f));var g=(r===a?-1:1)*qo((o*o*(s*s)-o*o*(p*p)-s*s*(d*d))/(o*o*(p*p)+s*s*(d*d)))||0,m=g*o*p/s,v=g*-s*d/o,y=(e+i)/2+Ko(h)*m-Xo(h)*v,x=(t+n)/2+Xo(h)*m+Ko(h)*v,_=es([1,0],[(d-m)/o,(p-v)/s]),b=[(d-m)/o,(p-v)/s],w=[(-1*d-m)/o,(-1*p-v)/s],S=es(b,w);$o(b,w)<=-1&&(S=Qo),$o(b,w)>=1&&(S=0),0===a&&S>0&&(S-=2*Qo),1===a&&S<0&&(S+=2*Qo),c.addData(u,y,x,o,s,_,S,h,a)}var is=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,ns=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function rs(e,t){var i=function(e){if(!e)return new mo;for(var t,i=0,n=0,r=i,a=n,o=new mo,s=mo.CMD,l=e.match(is),u=0;u<l.length;u++){for(var c,h=l[u],d=h.charAt(0),p=h.match(ns)||[],f=p.length,g=0;g<f;g++)p[g]=parseFloat(p[g]);for(var m=0;m<f;){var v,y,x,_,b,w,S,M=i,I=n;switch(d){case"l":i+=p[m++],n+=p[m++],c=s.L,o.addData(c,i,n);break;case"L":i=p[m++],n=p[m++],c=s.L,o.addData(c,i,n);break;case"m":i+=p[m++],n+=p[m++],c=s.M,o.addData(c,i,n),r=i,a=n,d="l";break;case"M":i=p[m++],n=p[m++],c=s.M,o.addData(c,i,n),r=i,a=n,d="L";break;case"h":i+=p[m++],c=s.L,o.addData(c,i,n);break;case"H":i=p[m++],c=s.L,o.addData(c,i,n);break;case"v":n+=p[m++],c=s.L,o.addData(c,i,n);break;case"V":n=p[m++],c=s.L,o.addData(c,i,n);break;case"C":c=s.C,o.addData(c,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),i=p[m-2],n=p[m-1];break;case"c":c=s.C,o.addData(c,p[m++]+i,p[m++]+n,p[m++]+i,p[m++]+n,p[m++]+i,p[m++]+n),i+=p[m-2],n+=p[m-1];break;case"S":v=i,y=n;var T=o.len(),A=o.data;t===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),c=s.C,M=p[m++],I=p[m++],i=p[m++],n=p[m++],o.addData(c,v,y,M,I,i,n);break;case"s":v=i,y=n;T=o.len(),A=o.data;t===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),c=s.C,M=i+p[m++],I=n+p[m++],i+=p[m++],n+=p[m++],o.addData(c,v,y,M,I,i,n);break;case"Q":M=p[m++],I=p[m++],i=p[m++],n=p[m++],c=s.Q,o.addData(c,M,I,i,n);break;case"q":M=p[m++]+i,I=p[m++]+n,i+=p[m++],n+=p[m++],c=s.Q,o.addData(c,M,I,i,n);break;case"T":v=i,y=n;T=o.len(),A=o.data;t===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i=p[m++],n=p[m++],c=s.Q,o.addData(c,v,y,i,n);break;case"t":v=i,y=n;T=o.len(),A=o.data;t===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i+=p[m++],n+=p[m++],c=s.Q,o.addData(c,v,y,i,n);break;case"A":x=p[m++],_=p[m++],b=p[m++],w=p[m++],S=p[m++],ts(M=i,I=n,i=p[m++],n=p[m++],w,S,x,_,b,c=s.A,o);break;case"a":x=p[m++],_=p[m++],b=p[m++],w=p[m++],S=p[m++],ts(M=i,I=n,i+=p[m++],n+=p[m++],w,S,x,_,b,c=s.A,o)}}"z"!==d&&"Z"!==d||(c=s.Z,o.addData(c),i=r,n=a),t=c}return o.toStatic(),o}(e);return(t=t||{}).buildPath=function(e){if(e.setData){e.setData(i.data),(t=e.getContext())&&e.rebuildPath(t)}else{var t=e;i.rebuildPath(t)}},t.applyTransform=function(e){Yo(i,e),this.dirty(!0)},t}var as={createFromString:function(e,t){return new Go(rs(e,t))},extendFromString:function(e,t){return Go.extend(rs(e,t))},mergePath:function(e,t){for(var i=[],n=e.length,r=0;r<n;r++){var a=e[r];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var o=new Go(t);return o.createPathProxy(),o.buildPath=function(e){e.appendPath(i);var t=e.getContext();t&&e.rebuildPath(t)},o}},os=Xi.ContextCachedBy,ss=function(e){wr.call(this,e)};ss.prototype={constructor:ss,type:"text",brush:function(e,t){var i=this.style;this.__dirty&&mr.normalizeTextStyle(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),mr.needDrawText(n,i)?(this.setTransform(e),mr.renderText(this,e,n,i,null,t),this.restoreTransform(e)):e.__attrCachedBy=os.NONE},getBoundingRect:function(){var e=this.style;if(this.__dirty&&mr.normalizeTextStyle(e,!0),!this._rect){var t=e.text;null!=t?t+="":t="";var i=Fn.getBoundingRect(e.text+"",e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich);if(i.x+=e.x||0,i.y+=e.y||0,mr.getStroke(e.textStroke,e.textStrokeWidth)){var n=e.textStrokeWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect}},we.inherits(ss,wr);var ls=ss,us=Go.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(e,t,i){i&&e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI,!0)}}),cs=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];var hs=function(e){return J.browser.ie&&J.browser.version>=11?function(){var t,i=this.__clipPaths,n=this.style;if(i)for(var r=0;r<i.length;r++){var a=i[r],o=a&&a.shape,s=a&&a.type;if(o&&("sector"===s&&o.startAngle===o.endAngle||"rect"===s&&(!o.width||!o.height))){for(var l=0;l<cs.length;l++)cs[l][2]=n[cs[l][0]],n[cs[l][0]]=cs[l][1];t=!0;break}}if(e.apply(this,arguments),t)for(l=0;l<cs.length;l++)n[cs[l][0]]=cs[l][2]}:e},ds=Go.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:hs(Go.prototype.brush),buildPath:function(e,t){var i=t.cx,n=t.cy,r=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=t.startAngle,s=t.endAngle,l=t.clockwise,u=Math.cos(o),c=Math.sin(o);e.moveTo(u*r+i,c*r+n),e.lineTo(u*a+i,c*a+n),e.arc(i,n,a,o,s,!l),e.lineTo(Math.cos(s)*r+i,Math.sin(s)*r+n),0!==r&&e.arc(i,n,r,s,o,l),e.closePath()}}),ps=Go.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(e,t){var i=t.cx,n=t.cy,r=2*Math.PI;e.moveTo(i+t.r,n),e.arc(i,n,t.r,0,r,!1),e.moveTo(i+t.r0,n),e.arc(i,n,t.r0,0,r,!0)}}),fs=Ce.distance;function gs(e,t,i,n,r,a,o){var s=.5*(i-e),l=.5*(n-t);return(2*(t-i)+s+l)*o+(-3*(t-i)-2*s-l)*a+s*r+t}var ms=function(e,t){for(var i=e.length,n=[],r=0,a=1;a<i;a++)r+=fs(e[a-1],e[a]);var o=r/2;for(o=o<i?i:o,a=0;a<o;a++){var s,l,u,c=a/(o-1)*(t?i:i-1),h=Math.floor(c),d=c-h,p=e[h%i];t?(s=e[(h-1+i)%i],l=e[(h+1)%i],u=e[(h+2)%i]):(s=e[0===h?h:h-1],l=e[h>i-2?i-1:h+1],u=e[h>i-3?i-1:h+2]);var f=d*d,g=d*f;n.push([gs(s[0],p[0],l[0],u[0],d,f,g),gs(s[1],p[1],l[1],u[1],d,f,g)])}return n},vs=Ce.min,ys=Ce.max,xs=Ce.scale,_s=Ce.distance,bs=Ce.add,ws=Ce.clone,Ss=Ce.sub;var Ms=function(e,t,i,n){var r,a,o,s,l=[],u=[],c=[],h=[];if(n){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=e.length;d<p;d++)vs(o,o,e[d]),ys(s,s,e[d]);vs(o,o,n[0]),ys(s,s,n[1])}for(d=0,p=e.length;d<p;d++){var f=e[d];if(i)r=e[d?d-1:p-1],a=e[(d+1)%p];else{if(0===d||d===p-1){l.push(ws(e[d]));continue}r=e[d-1],a=e[d+1]}Ss(u,a,r),xs(u,u,t);var g=_s(f,r),m=_s(f,a),v=g+m;0!==v&&(g/=v,m/=v),xs(c,u,-g),xs(h,u,m);var y=bs([],f,c),x=bs([],f,h);n&&(ys(y,y,o),vs(y,y,s),ys(x,x,o),vs(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l};var Is={buildPath:function(e,t,i){var n=t.points,r=t.smooth;if(n&&n.length>=2){if(r&&"spline"!==r){var a=Ms(n,r,i,t.smoothConstraint);e.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(i?o:o-1);s++){var l=a[2*s],u=a[2*s+1],c=n[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{"spline"===r&&(n=ms(n,i)),e.moveTo(n[0][0],n[0][1]);s=1;for(var h=n.length;s<h;s++)e.lineTo(n[s][0],n[s][1])}i&&e.closePath()}}},Ts=Go.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(e,t){Is.buildPath(e,t,!0)}}),As=Go.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(e,t){Is.buildPath(e,t,!1)}}),Cs=Math.round;function Ds(e,t,i){if(!t)return e;var n=Cs(2*e);return(n+Cs(t))%2==0?n/2:(n+(i?1:-1))/2}var Ls={subPixelOptimizeLine:function(e,t,i){if(t){var n=t.x1,r=t.x2,a=t.y1,o=t.y2;e.x1=n,e.x2=r,e.y1=a,e.y2=o;var s=i&&i.lineWidth;s&&(Cs(2*n)===Cs(2*r)&&(e.x1=e.x2=Ds(n,s,!0)),Cs(2*a)===Cs(2*o)&&(e.y1=e.y2=Ds(a,s,!0)))}},subPixelOptimizeRect:function(e,t,i){if(t){var n=t.x,r=t.y,a=t.width,o=t.height;e.x=n,e.y=r,e.width=a,e.height=o;var s=i&&i.lineWidth;s&&(e.x=Ds(n,s,!0),e.y=Ds(r,s,!0),e.width=Math.max(Ds(n+a,s,!1)-e.x,0===a?0:1),e.height=Math.max(Ds(r+o,s,!1)-e.y,0===o?0:1))}},subPixelOptimize:Ds},Ps=Ls.subPixelOptimizeRect,ks={},Os=Go.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(e,t){var i,n,r,a;this.subPixelOptimize?(Ps(ks,t,this.style),i=ks.x,n=ks.y,r=ks.width,a=ks.height,ks.r=t.r,t=ks):(i=t.x,n=t.y,r=t.width,a=t.height),t.r?Gn.buildPath(e,t):e.rect(i,n,r,a),e.closePath()}}),Rs=Ls.subPixelOptimizeLine,Ns={},Es=Go.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var i,n,r,a;this.subPixelOptimize?(Rs(Ns,t,this.style),i=Ns.x1,n=Ns.y1,r=Ns.x2,a=Ns.y2):(i=t.x1,n=t.y1,r=t.x2,a=t.y2);var o=t.percent;0!==o&&(e.moveTo(i,n),o<1&&(r=i*(1-o)+r*o,a=n*(1-o)+a*o),e.lineTo(r,a))},pointAt:function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]}}),zs=Wa.quadraticSubdivide,Bs=Wa.cubicSubdivide,Vs=Wa.quadraticAt,Fs=Wa.cubicAt,Gs=Wa.quadraticDerivativeAt,Hs=Wa.cubicDerivativeAt,Ws=[];function js(e,t,i){var n=e.cpx2,r=e.cpy2;return null===n||null===r?[(i?Hs:Fs)(e.x1,e.cpx1,e.cpx2,e.x2,t),(i?Hs:Fs)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(i?Gs:Vs)(e.x1,e.cpx1,e.x2,t),(i?Gs:Vs)(e.y1,e.cpy1,e.y2,t)]}var Us=Go.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var i=t.x1,n=t.y1,r=t.x2,a=t.y2,o=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(i,n),null==l||null==u?(c<1&&(zs(i,o,r,c,Ws),o=Ws[1],r=Ws[2],zs(n,s,a,c,Ws),s=Ws[1],a=Ws[2]),e.quadraticCurveTo(o,s,r,a)):(c<1&&(Bs(i,o,l,r,c,Ws),o=Ws[1],l=Ws[2],r=Ws[3],Bs(n,s,u,a,c,Ws),s=Ws[1],u=Ws[2],a=Ws[3]),e.bezierCurveTo(o,s,l,u,r,a)))},pointAt:function(e){return js(this.shape,e,!1)},tangentAt:function(e){var t=js(this.shape,e,!0);return Ce.normalize(t,t)}}),Zs=Go.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(e,t){var i=t.cx,n=t.cy,r=Math.max(t.r,0),a=t.startAngle,o=t.endAngle,s=t.clockwise,l=Math.cos(a),u=Math.sin(a);e.moveTo(l*r+i,u*r+n),e.arc(i,n,r,a,o,!s)}}),Ys=Go.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var e=this.__dirtyPath,t=this.shape.paths,i=0;i<t.length;i++)e=e||t[i].__dirtyPath;this.__dirtyPath=e,this.__dirty=this.__dirty||e},beforeBrush:function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),i=0;i<e.length;i++)e[i].path||e[i].createPathProxy(),e[i].path.setScale(t[0],t[1],e[i].segmentIgnoreThreshold)},buildPath:function(e,t){for(var i=t.paths||[],n=0;n<i.length;n++)i[n].buildPath(e,i[n].shape,!0)},afterBrush:function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Go.prototype.getBoundingRect.call(this)}}),qs=function(e){this.colorStops=e||[]};qs.prototype={constructor:qs,addColorStop:function(e,t){this.colorStops.push({offset:e,color:t})}};var Xs=qs,Ks=function(e,t,i,n,r,a){this.x=null==e?0:e,this.y=null==t?0:t,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=a||!1,Xs.call(this,r)};Ks.prototype={constructor:Ks},we.inherits(Ks,Xs);var Qs=Ks,Js=function(e,t,i,n,r){this.x=null==e?.5:e,this.y=null==t?.5:t,this.r=null==i?.5:i,this.type="radial",this.global=r||!1,Xs.call(this,n)};Js.prototype={constructor:Js},we.inherits(Js,Xs);var $s=Js,el=we.inherits;function tl(e){wr.call(this,e),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}tl.prototype.incremental=!0,tl.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},tl.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.dirty()},tl.prototype.addDisplayables=function(e,t){t=t||!1;for(var i=0;i<e.length;i++)this.addDisplayable(e[i],t)},tl.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},tl.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){(t=this._displayables[e]).parent=this,t.update(),t.parent=null}for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},tl.prototype.brush=function(e,t){for(var i=this._cursor;i<this._displayables.length;i++){(n=this._displayables[i]).beforeBrush&&n.beforeBrush(e),n.brush(e,i===this._cursor?null:this._displayables[i-1]),n.afterBrush&&n.afterBrush(e)}this._cursor=i;for(i=0;i<this._temporaryDisplayables.length;i++){var n;(n=this._temporaryDisplayables[i]).beforeBrush&&n.beforeBrush(e),n.brush(e,0===i?null:this._temporaryDisplayables[i-1]),n.afterBrush&&n.afterBrush(e)}this._temporaryDisplayables=[],this.notClear=!0};var il=[];tl.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Ni(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var i=this._displayables[t],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(il)),e.union(n)}this._rect=e}return this._rect},tl.prototype.contain=function(e,t){var i=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(i[0],i[1]))for(var n=0;n<this._displayables.length;n++){if(this._displayables[n].contain(e,t))return!0}return!1},el(tl,wr);var nl=tl,rl=Mr,al=zi,ol=ls,sl=us,ll=ds,ul=ps,cl=Ts,hl=As,dl=Os,pl=Es,fl=Us,gl=Zs,ml=Ys,vl=Qs,yl=$s,xl=Ni,_l=nl,bl=Math.max,wl=Math.min,Sl={},Ml=1,Il={},Tl={};function Al(e,t){Tl[e]=t}function Cl(e,t,i,n){var r=as.createFromString(e,t);return i&&("center"===n&&(i=Dl(i,r.getBoundingRect())),Pl(r,i)),r}function Dl(e,t){var i,n=t.width/t.height,r=e.height*n;return i=r<=e.width?e.height:(r=e.width)/n,{x:e.x+e.width/2-r/2,y:e.y+e.height/2-i/2,width:r,height:i}}var Ll=as.mergePath;function Pl(e,t){if(e.applyTransform){var i=e.getBoundingRect().calculateTransform(t);e.applyTransform(i)}}var kl=Ls.subPixelOptimize;function Ol(e){return null!=e&&"none"!==e}var Rl=we.createHashMap(),Nl=0;function El(e){var t=e.__hoverStl;if(t&&!e.__highlighted){var i=e.__zr,n=e.useHoverLayer&&i&&"canvas"===i.painter.type;if(e.__highlighted=n?"layer":"plain",!(e.isGroup||!i&&e.useHoverLayer)){var r=e,a=e.style;n&&(a=(r=i.addHover(e)).style),Jl(a),n||function(e){if(e.__hoverStlDirty){e.__hoverStlDirty=!1;var t=e.__hoverStl;if(t){var i=e.__cachedNormalStl={};e.__cachedNormalZ2=e.z2;var n=e.style;for(var r in t)null!=t[r]&&(i[r]=n[r]);i.fill=n.fill,i.stroke=n.stroke}else e.__cachedNormalStl=e.__cachedNormalZ2=null}}(r),a.extendFrom(t),zl(a,t,"fill"),zl(a,t,"stroke"),Ql(a),n||(e.dirty(!1),e.z2+=1)}}}function zl(e,t,i){!Ol(t[i])&&Ol(e[i])&&(e[i]=function(e){if("string"!=typeof e)return e;var t=Rl.get(e);return t||(t=Kt.lift(e,-.1),Nl<1e4&&(Rl.set(e,t),Nl++)),t}(e[i]))}function Bl(e){var t=e.__highlighted;if(t&&(e.__highlighted=!1,!e.isGroup))if("layer"===t)e.__zr&&e.__zr.removeHover(e);else{var i=e.style,n=e.__cachedNormalStl;n&&(Jl(i),e.setStyle(n),Ql(i));var r=e.__cachedNormalZ2;null!=r&&e.z2-r==1&&(e.z2=r)}}function Vl(e,t,i){var n,r="normal",a="normal";e.__highlighted&&(r="emphasis",n=!0),t(e,i),e.__highlighted&&(a="emphasis",n=!0),e.isGroup&&e.traverse((function(e){!e.isGroup&&t(e,i)})),n&&e.__highDownOnUpdate&&e.__highDownOnUpdate(r,a)}function Fl(e,t){t=e.__hoverStl=!1!==t&&(e.hoverStyle||t||{}),e.__hoverStlDirty=!0,e.__highlighted&&(e.__cachedNormalStl=null,Bl(e),El(e))}function Gl(e){!Ul(this,e)&&!this.__highByOuter&&Vl(this,El)}function Hl(e){!Ul(this,e)&&!this.__highByOuter&&Vl(this,Bl)}function Wl(e){this.__highByOuter|=1<<(e||0),Vl(this,El)}function jl(e){!(this.__highByOuter&=~(1<<(e||0)))&&Vl(this,Bl)}function Ul(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Zl(e,t){var i=!1===t;if(e.__highDownSilentOnTouch=e.highDownSilentOnTouch,e.__highDownOnUpdate=e.highDownOnUpdate,!i||e.__highDownDispatcher){var n=i?"off":"on";e[n]("mouseover",Gl)[n]("mouseout",Hl),e[n]("emphasis",Wl)[n]("normal",jl),e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!i}}function Yl(e,t,i,n,r){return ql(e,t,n,r),i&&we.extend(e,i),e}function ql(e,t,i,n){if((i=i||Sl).isRectText){var r;i.getTextPosition?r=i.getTextPosition(t,n):"outside"===(r=t.getShallow("position")||(n?null:"inside"))&&(r="top"),e.textPosition=r,e.textOffset=t.getShallow("offset");var a=t.getShallow("rotate");null!=a&&(a*=Math.PI/180),e.textRotation=a,e.textDistance=we.retrieve2(t.getShallow("distance"),n?null:5)}var o,s=t.ecModel,l=s&&s.option.textStyle,u=function(e){var t;for(;e&&e!==e.ecModel;){var i=(e.option||Sl).rich;if(i)for(var n in t=t||{},i)i.hasOwnProperty(n)&&(t[n]=1);e=e.parentModel}return t}(t);if(u)for(var c in o={},u)if(u.hasOwnProperty(c)){var h=t.getModel(["rich",c]);Xl(o[c]={},h,l,i,n)}return e.rich=o,Xl(e,t,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),e}function Xl(e,t,i,n,r,a){i=!r&&i||Sl,e.textFill=Kl(t.getShallow("color"),n)||i.color,e.textStroke=Kl(t.getShallow("textBorderColor"),n)||i.textBorderColor,e.textStrokeWidth=we.retrieve2(t.getShallow("textBorderWidth"),i.textBorderWidth),r||(a&&(e.insideRollbackOpt=n,Ql(e)),null==e.textFill&&(e.textFill=n.autoColor)),e.fontStyle=t.getShallow("fontStyle")||i.fontStyle,e.fontWeight=t.getShallow("fontWeight")||i.fontWeight,e.fontSize=t.getShallow("fontSize")||i.fontSize,e.fontFamily=t.getShallow("fontFamily")||i.fontFamily,e.textAlign=t.getShallow("align"),e.textVerticalAlign=t.getShallow("verticalAlign")||t.getShallow("baseline"),e.textLineHeight=t.getShallow("lineHeight"),e.textWidth=t.getShallow("width"),e.textHeight=t.getShallow("height"),e.textTag=t.getShallow("tag"),a&&n.disableBox||(e.textBackgroundColor=Kl(t.getShallow("backgroundColor"),n),e.textPadding=t.getShallow("padding"),e.textBorderColor=Kl(t.getShallow("borderColor"),n),e.textBorderWidth=t.getShallow("borderWidth"),e.textBorderRadius=t.getShallow("borderRadius"),e.textBoxShadowColor=t.getShallow("shadowColor"),e.textBoxShadowBlur=t.getShallow("shadowBlur"),e.textBoxShadowOffsetX=t.getShallow("shadowOffsetX"),e.textBoxShadowOffsetY=t.getShallow("shadowOffsetY")),e.textShadowColor=t.getShallow("textShadowColor")||i.textShadowColor,e.textShadowBlur=t.getShallow("textShadowBlur")||i.textShadowBlur,e.textShadowOffsetX=t.getShallow("textShadowOffsetX")||i.textShadowOffsetX,e.textShadowOffsetY=t.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function Kl(e,t){return"auto"!==e?e:t&&t.autoColor?t.autoColor:null}function Ql(e){var t,i=e.textPosition,n=e.insideRollbackOpt;if(n&&null==e.textFill){var r=n.autoColor,a=n.isRectText,o=n.useInsideStyle,s=!1!==o&&(!0===o||a&&i&&"string"==typeof i&&i.indexOf("inside")>=0),l=!s&&null!=r;(s||l)&&(t={textFill:e.textFill,textStroke:e.textStroke,textStrokeWidth:e.textStrokeWidth}),s&&(e.textFill="#fff",null==e.textStroke&&(e.textStroke=r,null==e.textStrokeWidth&&(e.textStrokeWidth=2))),l&&(e.textFill=r)}e.insideRollback=t}function Jl(e){var t=e.insideRollback;t&&(e.textFill=t.textFill,e.textStroke=t.textStroke,e.textStrokeWidth=t.textStrokeWidth,e.insideRollback=null)}function $l(e,t,i,n,r,a){if("function"==typeof r&&(a=r,r=null),n&&n.isAnimationEnabled()){var o=e?"Update":"",s=n.getShallow("animationDuration"+o),l=n.getShallow("animationEasing"+o),u=n.getShallow("animationDelay"+o);"function"==typeof u&&(u=u(r,n.getAnimationDelayParams?n.getAnimationDelayParams(t,r):null)),"function"==typeof s&&(s=s(r)),s>0?t.animateTo(i,s,u||0,l,a,!!a):(t.stopAnimation(),t.attr(i),a&&a())}else t.stopAnimation(),t.attr(i),a&&a()}function eu(e,t,i,n,r){$l(!0,e,t,i,n,r)}function tu(e,t,i){return t&&!we.isArrayLike(t)&&(t=wt.getLocalTransform(t)),i&&(t=ft.invert([],t)),Ce.applyTransform([],e,t)}function iu(e,t,i,n,r,a,o,s){var l,u=i-e,c=n-t,h=o-r,d=s-a,p=nu(h,d,u,c);if((l=p)<=1e-6&&l>=-1e-6)return!1;var f=e-r,g=t-a,m=nu(f,g,u,c)/p;if(m<0||m>1)return!1;var v=nu(f,g,h,d)/p;return!(v<0||v>1)}function nu(e,t,i,n){return e*n-i*t}Al("circle",us),Al("sector",ds),Al("ring",ps),Al("polygon",Ts),Al("polyline",As),Al("rect",Os),Al("line",Es),Al("bezierCurve",Us),Al("arc",Zs);var ru={Image:rl,Group:al,Text:ol,Circle:sl,Sector:ll,Ring:ul,Polygon:cl,Polyline:hl,Rect:dl,Line:pl,BezierCurve:fl,Arc:gl,CompoundPath:ml,LinearGradient:vl,RadialGradient:yl,BoundingRect:xl,IncrementalDisplayable:_l,Z2_EMPHASIS_LIFT:1,CACHED_LABEL_STYLE_PROPERTIES:{color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},extendShape:function(e){return Go.extend(e)},extendPath:function(e,t){return as.extendFromString(e,t)},registerShape:Al,getShapeClass:function(e){if(Tl.hasOwnProperty(e))return Tl[e]},makePath:Cl,makeImage:function(e,t,i){var n=new Mr({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===i){var r={width:e.width,height:e.height};n.setStyle(Dl(t,r))}}});return n},mergePath:Ll,resizePath:Pl,subPixelOptimizeLine:function(e){return Ls.subPixelOptimizeLine(e.shape,e.shape,e.style),e},subPixelOptimizeRect:function(e){return Ls.subPixelOptimizeRect(e.shape,e.shape,e.style),e},subPixelOptimize:kl,setElementHoverStyle:Fl,setHoverStyle:function(e,t){Zl(e,!0),Vl(e,Fl,t)},setAsHighDownDispatcher:Zl,isHighDownDispatcher:function(e){return!(!e||!e.__highDownDispatcher)},getHighlightDigit:function(e){var t=Il[e];return null==t&&Ml<=32&&(t=Il[e]=Ml++),t},setLabelStyle:function(e,t,i,n,r,a,o){var s,l=(r=r||Sl).labelFetcher,u=r.labelDataIndex,c=r.labelDimIndex,h=r.labelProp,d=i.getShallow("show"),p=n.getShallow("show");(d||p)&&(l&&(s=l.getFormattedLabel(u,"normal",null,c,h)),null==s&&(s=we.isFunction(r.defaultText)?r.defaultText(u,r):r.defaultText));var f=d?s:null,g=p?we.retrieve2(l?l.getFormattedLabel(u,"emphasis",null,c,h):null,s):null;null==f&&null==g||(Yl(e,i,a,r),Yl(t,n,o,r,!0)),e.text=f,t.text=g},modifyLabelStyle:function(e,t,i){var n=e.style;t&&(Jl(n),e.setStyle(t),Ql(n)),n=e.__hoverStl,i&&n&&(Jl(n),we.extend(n,i),Ql(n))},setTextStyle:Yl,setText:function(e,t,i){var n,r={isRectText:!0};!1===i?n=!0:r.autoColor=i,ql(e,t,r,n)},getFont:function(e,t){var i=t&&t.getModel("textStyle");return we.trim([e.fontStyle||i&&i.getShallow("fontStyle")||"",e.fontWeight||i&&i.getShallow("fontWeight")||"",(e.fontSize||i&&i.getShallow("fontSize")||12)+"px",e.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))},updateProps:eu,initProps:function(e,t,i,n,r){$l(!1,e,t,i,n,r)},getTransform:function(e,t){for(var i=ft.identity([]);e&&e!==t;)ft.mul(i,e.getLocalTransform(),i),e=e.parent;return i},applyTransform:tu,transformDirection:function(e,t,i){var n=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),r=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),a=["left"===e?-n:"right"===e?n:0,"top"===e?-r:"bottom"===e?r:0];return a=tu(a,t,i),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},groupTransition:function(e,t,i,n){if(e&&t){var r,a=(r={},e.traverse((function(e){!e.isGroup&&e.anid&&(r[e.anid]=e)})),r);t.traverse((function(e){if(!e.isGroup&&e.anid){var t=a[e.anid];if(t){var n=o(e);e.attr(o(t)),eu(e,n,i,e.dataIndex)}}}))}function o(e){var t={position:Ce.clone(e.position),rotation:e.rotation};return e.shape&&(t.shape=we.extend({},e.shape)),t}},clipPointsByRect:function(e,t){return we.map(e,(function(e){var i=e[0];i=bl(i,t.x),i=wl(i,t.x+t.width);var n=e[1];return n=bl(n,t.y),[i,n=wl(n,t.y+t.height)]}))},clipRectByRect:function(e,t){var i=bl(e.x,t.x),n=wl(e.x+e.width,t.x+t.width),r=bl(e.y,t.y),a=wl(e.y+e.height,t.y+t.height);if(n>=i&&a>=r)return{x:i,y:r,width:n-i,height:a-r}},createIcon:function(e,t,i){var n=(t=we.extend({rectHover:!0},t)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(n.image=e.slice(8),we.defaults(n,i),new Mr(t)):Cl(e.replace("path://",""),t,i,"center")},linePolygonIntersect:function(e,t,i,n,r){for(var a=0,o=r[r.length-1];a<r.length;a++){var s=r[a];if(iu(e,t,i,n,s[0],s[1],o[0],o[1]))return!0;o=s}},lineLineIntersect:iu},au=["textStyle","color"],ou={getTextColor:function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(au):null)},getFont:function(){return ru.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(e){return Fn.getBoundingRect(e,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},su=Ta([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),lu={getItemStyle:function(e,t){var i=su(this,e,t),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var e=this.get("borderType");return"solid"===e||null==e?null:"dashed"===e?[5,5]:[1,1]}},uu=xa.makeInner,cu=Ia.enableClassExtend,hu=Ia.enableClassCheck,du=we.mixin,pu=uu();function fu(e,t,i){this.parentModel=t,this.ecModel=i,this.option=e}function gu(e,t,i){for(var n=0;n<t.length&&(!t[n]||null!=(e=e&&"object"==typeof e?e[t[n]]:null));n++);return null==e&&i&&(e=i.get(t)),e}function mu(e,t){var i=pu(e).getParent;return i?i.call(e,t):e.parentModel}fu.prototype={constructor:fu,init:null,mergeOption:function(e){we.merge(this.option,e,!0)},get:function(e,t){return null==e?this.option:gu(this.option,this.parsePath(e),!t&&mu(this,e))},getShallow:function(e,t){var i=this.option,n=null==i?i:i[e],r=!t&&mu(this,e);return null==n&&r&&(n=r.getShallow(e)),n},getModel:function(e,t){var i;return new fu(null==e?this.option:gu(this.option,e=this.parsePath(e)),t=t||(i=mu(this,e))&&i.getModel(e),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(we.clone(this.option))},setReadOnly:function(e){},parsePath:function(e){return"string"==typeof e&&(e=e.split(".")),e},customizeGetParent:function(e){pu(this).getParent=e},isAnimationEnabled:function(){if(!J.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},cu(fu),hu(fu),du(fu,Ca),du(fu,La),du(fu,ou),du(fu,lu);var vu=fu,yu=Ia.parseClassType,xu=0;var _u={getUID:function(e){return[e||"",xu++,Math.random().toFixed(5)].join("_")},enableSubTypeDefaulter:function(e){var t={};return e.registerSubTypeDefaulter=function(e,i){e=yu(e),t[e.main]=i},e.determineSubType=function(i,n){var r=n.type;if(!r){var a=yu(i).main;e.hasSubTypes(i)&&t[a]&&(r=t[a](n))}return r},e},enableTopologicalTravel:function(e,t){function i(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,n,r,a){if(e.length){var o=function(e){var n={},r=[];return we.each(e,(function(a){var o=i(n,a),s=function(e,t){var i=[];return we.each(e,(function(e){we.indexOf(t,e)>=0&&i.push(e)})),i}(o.originalDeps=t(a),e);o.entryCount=s.length,0===o.entryCount&&r.push(a),we.each(s,(function(e){we.indexOf(o.predecessor,e)<0&&o.predecessor.push(e);var t=i(n,e);we.indexOf(t.successor,e)<0&&t.successor.push(a)}))})),{graph:n,noEntryList:r}}(n),s=o.graph,l=o.noEntryList,u={};for(we.each(e,(function(e){u[e]=!0}));l.length;){var c=l.pop(),h=s[c],d=!!u[c];d&&(r.call(a,c,h.originalDeps.slice()),delete u[c]),we.each(h.successor,d?f:p)}we.each(u,(function(){throw new Error("Circle dependency may exists")}))}function p(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function f(e){u[e]=!0,p(e)}}}};var bu=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function wu(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return e/Math.pow(10,t)>=10&&t++,t}var Su={linearMap:function(e,t,i,n){var r=t[1]-t[0],a=i[1]-i[0];if(0===r)return 0===a?i[0]:(i[0]+i[1])/2;if(n)if(r>0){if(e<=t[0])return i[0];if(e>=t[1])return i[1]}else{if(e>=t[0])return i[0];if(e<=t[1])return i[1]}else{if(e===t[0])return i[0];if(e===t[1])return i[1]}return(e-t[0])/r*a+i[0]},parsePercent:function(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return"string"==typeof e?(i=e,i.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var i},round:function(e,t,i){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),i?e:+e},asc:function(e){return e.sort((function(e,t){return e-t})),e},getPrecision:function(e){if(e=+e,isNaN(e))return 0;for(var t=1,i=0;Math.round(e*t)/t!==e;)t*=10,i++;return i},getPrecisionSafe:function(e){var t=e.toString(),i=t.indexOf("e");if(i>0){var n=+t.slice(i+1);return n<0?-n:0}var r=t.indexOf(".");return r<0?0:t.length-1-r},getPixelPrecision:function(e,t){var i=Math.log,n=Math.LN10,r=Math.floor(i(e[1]-e[0])/n),a=Math.round(i(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20},getPercentWithPrecision:function(e,t,i){if(!e[t])return 0;var n=we.reduce(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===n)return 0;for(var r=Math.pow(10,i),a=we.map(e,(function(e){return(isNaN(e)?0:e)/n*r*100})),o=100*r,s=we.map(a,(function(e){return Math.floor(e)})),l=we.reduce(s,(function(e,t){return e+t}),0),u=we.map(a,(function(e,t){return e-s[t]}));l<o;){for(var c=Number.NEGATIVE_INFINITY,h=null,d=0,p=u.length;d<p;++d)u[d]>c&&(c=u[d],h=d);++s[h],u[h]=0,++l}return s[t]/r},MAX_SAFE_INTEGER:9007199254740991,remRadian:function(e){var t=2*Math.PI;return(e%t+t)%t},isRadianAroundZero:function(e){return e>-1e-4&&e<1e-4},parseDate:function(e){if(e instanceof Date)return e;if("string"==typeof e){var t=bu.exec(e);if(!t)return new Date(NaN);if(t[8]){var i=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(i-=t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,i,+(t[5]||0),+t[6]||0,+t[7]||0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,+t[7]||0)}return null==e?new Date(NaN):new Date(Math.round(e))},quantity:function(e){return Math.pow(10,wu(e))},quantityExponent:wu,nice:function(e,t){var i=wu(e),n=Math.pow(10,i),r=e/n;return e=(t?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*n,i>=-20?+e.toFixed(i<0?-i:0):e},quantile:function(e,t){var i=(e.length-1)*t+1,n=Math.floor(i),r=+e[n-1],a=i-n;return a?r+a*(e[n]-r):r},reformIntervals:function(e){e.sort((function(e,t){return function e(t,i,n){return t.interval[n]<i.interval[n]||t.interval[n]===i.interval[n]&&(t.close[n]-i.close[n]==(n?-1:1)||!n&&e(t,i,1))}(e,t,0)?-1:1}));for(var t=-1/0,i=1,n=0;n<e.length;){for(var r=e[n].interval,a=e[n].close,o=0;o<2;o++)r[o]<=t&&(r[o]=t,a[o]=o?1:1-i),t=r[o],i=a[o];r[0]===r[1]&&a[0]*a[1]!=1?e.splice(n,1):n++}return e},isNumeric:function(e){return e-parseFloat(e)>=0}};var Mu=we.normalizeCssArray,Iu=/([&<>"'])/g,Tu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Au(e){return null==e?"":(e+"").replace(Iu,(function(e,t){return Tu[t]}))}var Cu=["a","b","c","d","e","f","g"],Du=function(e,t){return"{"+e+(null==t?"":t)+"}"};function Lu(e,t){return"0000".substr(0,t-(e+="").length)+e}var Pu={addCommas:function(e){return isNaN(e)?"-":(e=(e+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")},toCamelCase:function(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e},normalizeCssArray:Mu,encodeHTML:Au,formatTpl:function(e,t,i){we.isArray(t)||(t=[t]);var n=t.length;if(!n)return"";for(var r=t[0].$vars||[],a=0;a<r.length;a++){var o=Cu[a];e=e.replace(Du(o),Du(o,0))}for(var s=0;s<n;s++)for(var l=0;l<r.length;l++){var u=t[s][r[l]];e=e.replace(Du(Cu[l],s),i?Au(u):u)}return e},formatTplSimple:function(e,t,i){return we.each(t,(function(t,n){e=e.replace("{"+n+"}",i?Au(t):t)})),e},getTooltipMarker:function(e,t){var i=(e=we.isString(e)?{color:e,extraCssText:t}:e||{}).color,n=e.type,r=(t=e.extraCssText,e.renderMode||"html"),a=e.markerId||"X";return i?"html"===r?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Au(i)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Au(i)+";"+(t||"")+'"></span>':{renderMode:r,content:"{marker"+a+"|}  ",style:{color:i}}:""},formatTime:function(e,t,i){"week"!==e&&"month"!==e&&"quarter"!==e&&"half-year"!==e&&"year"!==e||(e="MM-dd\nyyyy");var n=Su.parseDate(t),r=i?"UTC":"",a=n["get"+r+"FullYear"](),o=n["get"+r+"Month"]()+1,s=n["get"+r+"Date"](),l=n["get"+r+"Hours"](),u=n["get"+r+"Minutes"](),c=n["get"+r+"Seconds"](),h=n["get"+r+"Milliseconds"]();return e=e.replace("MM",Lu(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",Lu(s,2)).replace("d",s).replace("hh",Lu(l,2)).replace("h",l).replace("mm",Lu(u,2)).replace("m",u).replace("ss",Lu(c,2)).replace("s",c).replace("SSS",Lu(h,3))},capitalFirst:function(e){return e?e.charAt(0).toUpperCase()+e.substr(1):e},truncateText:Fn.truncateText,getTextBoundingRect:function(e){return Fn.getBoundingRect(e.text,e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich,e.truncate)},getTextRect:function(e,t,i,n,r,a,o,s){return Fn.getBoundingRect(e,t,i,n,r,s,a,o)},windowOpen:function(e,t){if("_blank"===t||"blank"===t){var i=window.open();i.opener=null,i.location=e}else window.open(e,t)}},ku=Su.parsePercent,Ou=we.each,Ru=["left","right","top","bottom","width","height"],Nu=[["width","left","right"],["height","top","bottom"]];function Eu(e,t,i,n,r){var a=0,o=0;null==n&&(n=1/0),null==r&&(r=1/0);var s=0;t.eachChild((function(l,u){var c,h,d=l.position,p=l.getBoundingRect(),f=t.childAt(u+1),g=f&&f.getBoundingRect();if("horizontal"===e){var m=p.width+(g?-g.x+p.x:0);(c=a+m)>n||l.newline?(a=0,c=m,o+=s+i,s=p.height):s=Math.max(s,p.height)}else{var v=p.height+(g?-g.y+p.y:0);(h=o+v)>r||l.newline?(a+=s+i,o=0,h=v,s=p.width):s=Math.max(s,p.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===e?a=c+i:o=h+i)}))}var zu=Eu,Bu=we.curry(Eu,"vertical"),Vu=we.curry(Eu,"horizontal");function Fu(e,t,i){i=Pu.normalizeCssArray(i||0);var n=t.width,r=t.height,a=ku(e.left,n),o=ku(e.top,r),s=ku(e.right,n),l=ku(e.bottom,r),u=ku(e.width,n),c=ku(e.height,r),h=i[2]+i[0],d=i[1]+i[3],p=e.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(c)&&(c=r-l-h-o),null!=p&&(isNaN(u)&&isNaN(c)&&(p>n/r?u=.8*n:c=.8*r),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(a)&&(a=n-s-u-d),isNaN(o)&&(o=r-l-c-h),e.left||e.right){case"center":a=n/2-u/2-i[3];break;case"right":a=n-u-d}switch(e.top||e.bottom){case"middle":case"center":o=r/2-c/2-i[0];break;case"bottom":o=r-c-h}a=a||0,o=o||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(c)&&(c=r-h-o-(l||0));var f=new Ni(a+i[3],o+i[0],u,c);return f.margin=i,f}function Gu(e,t){return t&&e&&Ou(Ru,(function(i){t.hasOwnProperty(i)&&(e[i]=t[i])})),e}var Hu={LOCATION_PARAMS:Ru,HV_NAMES:Nu,box:zu,vbox:Bu,hbox:Vu,getAvailableSize:function(e,t,i){var n=t.width,r=t.height,a=ku(e.x,n),o=ku(e.y,r),s=ku(e.x2,n),l=ku(e.y2,r);return(isNaN(a)||isNaN(parseFloat(e.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(e.x2)))&&(s=n),(isNaN(o)||isNaN(parseFloat(e.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(e.y2)))&&(l=r),i=Pu.normalizeCssArray(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-o-i[0]-i[2],0)}},getLayoutRect:Fu,positionElement:function(e,t,i,n,r){var a=!r||!r.hv||r.hv[0],o=!r||!r.hv||r.hv[1],s=r&&r.boundingMode||"all";if(a||o){var l;if("raw"===s)l="group"===e.type?new Ni(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();(l=l.clone()).applyTransform(u)}t=Fu(we.defaults({width:l.width,height:l.height},t),i,n);var c=e.position,h=a?t.x-l.x:0,d=o?t.y-l.y:0;e.attr("position","raw"===s?[h,d]:[c[0]+h,c[1]+d])}},sizeCalculable:function(e,t){return null!=e[Nu[t][0]]||null!=e[Nu[t][1]]&&null!=e[Nu[t][2]]},mergeLayoutParam:function(e,t,i){!we.isObject(i)&&(i={});var n=i.ignoreSize;!we.isArray(n)&&(n=[n,n]);var r=o(Nu[0],0),a=o(Nu[1],1);function o(i,r){var a={},o=0,u={},c=0;if(Ou(i,(function(t){u[t]=e[t]})),Ou(i,(function(e){s(t,e)&&(a[e]=u[e]=t[e]),l(a,e)&&o++,l(u,e)&&c++})),n[r])return l(t,i[1])?u[i[2]]=null:l(t,i[2])&&(u[i[1]]=null),u;if(2!==c&&o){if(o>=2)return a;for(var h=0;h<i.length;h++){var d=i[h];if(!s(a,d)&&s(e,d)){a[d]=e[d];break}}return a}return u}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,i){Ou(e,(function(e){t[e]=i[e]}))}u(Nu[0],e,r),u(Nu[1],e,a)},getLayoutParams:function(e){return Gu({},e)},copyLayoutParams:Gu},Wu={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}},ju=Ia.enableClassManagement,Uu=Ia.parseClassType,Zu=(0,xa.makeInner)(),Yu=vu.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(e,t,i,n){vu.call(this,e,t,i,n),this.uid=_u.getUID("ec_cpt_model")},init:function(e,t,i,n){this.mergeDefaultAndTheme(e,i)},mergeDefaultAndTheme:function(e,t){var i=this.layoutMode,n=i?Hu.getLayoutParams(e):{},r=t.getTheme();we.merge(e,r.get(this.mainType)),we.merge(e,this.getDefaultOption()),i&&Hu.mergeLayoutParam(e,n,i)},mergeOption:function(e,t){we.merge(this.option,e,!0);var i=this.layoutMode;i&&Hu.mergeLayoutParam(this.option,e,i)},optionUpdated:function(e,t){},getDefaultOption:function(){var e=Zu(this);if(!e.defaultOption){for(var t=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&t.push(n),i=i.superClass}for(var r={},a=t.length-1;a>=0;a--)r=we.merge(r,t[a],!0);e.defaultOption=r}return e.defaultOption},getReferringComponents:function(e){return this.ecModel.queryComponents({mainType:e,index:this.get(e+"Index",!0),id:this.get(e+"Id",!0)})}});ju(Yu,{registerWhenExtend:!0}),_u.enableSubTypeDefaulter(Yu),_u.enableTopologicalTravel(Yu,(function(e){var t=[];we.each(Yu.getClassesByMainType(e),(function(e){t=t.concat(e.prototype.dependencies||[])})),t=we.map(t,(function(e){return Uu(e).main})),"dataset"!==e&&we.indexOf(t,"dataset")<=0&&t.unshift("dataset");return t})),we.mixin(Yu,Wu);var qu=Yu,Xu="";"undefined"!=typeof navigator&&(Xu=navigator.platform||"");var Ku={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Xu.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Qu=xa.makeInner,Ju=xa.normalizeToArray,$u=Qu();var ec={clearColorPalette:function(){$u(this).colorIdx=0,$u(this).colorNameMap={}},getColorFromPalette:function(e,t,i){var n=$u(t=t||this),r=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(e))return a[e];var o=Ju(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?function(e,t){for(var i=e.length,n=0;n<i;n++)if(e[n].length>t)return e[n];return e[i-1]}(s,i):o;if((l=l||o)&&l.length){var u=l[r];return e&&(a[e]=u),n.colorIdx=(r+1)%l.length,u}}},tc={SOURCE_FORMAT_ORIGINAL:"original",SOURCE_FORMAT_ARRAY_ROWS:"arrayRows",SOURCE_FORMAT_OBJECT_ROWS:"objectRows",SOURCE_FORMAT_KEYED_COLUMNS:"keyedColumns",SOURCE_FORMAT_UNKNOWN:"unknown",SOURCE_FORMAT_TYPED_ARRAY:"typedArray",SERIES_LAYOUT_BY_COLUMN:"column",SERIES_LAYOUT_BY_ROW:"row"},ic=we.createHashMap,nc=we.isTypedArray,rc=Ia.enableClassCheck,ac=tc.SOURCE_FORMAT_ORIGINAL,oc=tc.SERIES_LAYOUT_BY_COLUMN,sc=tc.SOURCE_FORMAT_UNKNOWN,lc=tc.SOURCE_FORMAT_TYPED_ARRAY,uc=tc.SOURCE_FORMAT_KEYED_COLUMNS;function cc(e){this.fromDataset=e.fromDataset,this.data=e.data||(e.sourceFormat===uc?{}:[]),this.sourceFormat=e.sourceFormat||sc,this.seriesLayoutBy=e.seriesLayoutBy||oc,this.dimensionsDefine=e.dimensionsDefine,this.encodeDefine=e.encodeDefine&&ic(e.encodeDefine),this.startIndex=e.startIndex||0,this.dimensionsDetectCount=e.dimensionsDetectCount}cc.seriesDataToSource=function(e){return new cc({data:e,sourceFormat:nc(e)?lc:ac,fromDataset:!1})},rc(cc);var hc=cc,dc=xa.makeInner,pc=xa.getDataItemValue,fc=we.createHashMap,gc=we.each,mc=we.map,vc=we.isArray,yc=we.isString,xc=we.isObject,_c=we.isTypedArray,bc=we.isArrayLike,wc=we.extend,Sc=tc.SOURCE_FORMAT_ORIGINAL,Mc=tc.SOURCE_FORMAT_ARRAY_ROWS,Ic=tc.SOURCE_FORMAT_OBJECT_ROWS,Tc=tc.SOURCE_FORMAT_KEYED_COLUMNS,Ac=tc.SOURCE_FORMAT_UNKNOWN,Cc=tc.SOURCE_FORMAT_TYPED_ARRAY,Dc=tc.SERIES_LAYOUT_BY_ROW,Lc={Must:1,Might:2,Not:3},Pc=dc();function kc(e){if(e){var t=fc();return mc(e,(function(e,i){if(null==(e=wc({},xc(e)?e:{name:e})).name)return e;e.name+="",null==e.displayName&&(e.displayName=e.name);var n=t.get(e.name);return n?e.name+="-"+n.count++:t.set(e.name,{count:1}),e}))}}function Oc(e,t,i,n){if(null==n&&(n=1/0),t===Dc)for(var r=0;r<i.length&&r<n;r++)e(i[r]?i[r][0]:null,r);else{var a=i[0]||[];for(r=0;r<a.length&&r<n;r++)e(a[r],r)}}function Rc(e){var t=e.option;if(!t.data)return e.ecModel.getComponent("dataset",t.datasetIndex||0)}function Nc(e,t,i,n,r,a){var o,s,l;if(_c(e))return Lc.Not;if(n){var u=n[a];xc(u)?(s=u.name,l=u.type):yc(u)&&(s=u)}if(null!=l)return"ordinal"===l?Lc.Must:Lc.Not;if(t===Mc)if(i===Dc){for(var c=e[a],h=0;h<(c||[]).length&&h<5;h++)if(null!=(o=g(c[r+h])))return o}else for(h=0;h<e.length&&h<5;h++){var d=e[r+h];if(d&&null!=(o=g(d[a])))return o}else if(t===Ic){if(!s)return Lc.Not;for(h=0;h<e.length&&h<5;h++){if((p=e[h])&&null!=(o=g(p[s])))return o}}else if(t===Tc){if(!s)return Lc.Not;if(!(c=e[s])||_c(c))return Lc.Not;for(h=0;h<c.length&&h<5;h++)if(null!=(o=g(c[h])))return o}else if(t===Sc)for(h=0;h<e.length&&h<5;h++){var p=e[h],f=pc(p);if(!vc(f))return Lc.Not;if(null!=(o=g(f[a])))return o}function g(e){var t=yc(e);return null!=e&&isFinite(e)&&""!==e?t?Lc.Might:Lc.Not:t&&"-"!==e?Lc.Must:void 0}return Lc.Not}var Ec={BE_ORDINAL:Lc,detectSourceFormat:function(e){var t=e.option.source,i=Ac;if(_c(t))i=Cc;else if(vc(t)){0===t.length&&(i=Mc);for(var n=0,r=t.length;n<r;n++){var a=t[n];if(null!=a){if(vc(a)){i=Mc;break}if(xc(a)){i=Ic;break}}}}else if(xc(t)){for(var o in t)if(t.hasOwnProperty(o)&&bc(t[o])){i=Tc;break}}else if(null!=t)throw new Error("Invalid data");Pc(e).sourceFormat=i},getSource:function(e){return Pc(e).source},resetSourceDefaulter:function(e){Pc(e).datasetMap=fc()},prepareSource:function(e){var t=e.option,i=t.data,n=_c(i)?Cc:Sc,r=!1,a=t.seriesLayoutBy,o=t.sourceHeader,s=t.dimensions,l=Rc(e);if(l){var u=l.option;i=u.source,n=Pc(l).sourceFormat,r=!0,a=a||u.seriesLayoutBy,null==o&&(o=u.sourceHeader),s=s||u.dimensions}var c=function(e,t,i,n,r){if(!e)return{dimensionsDefine:kc(r)};var a,o;if(t===Mc)"auto"===n||null==n?Oc((function(e){null!=e&&"-"!==e&&(yc(e)?null==o&&(o=1):o=0)}),i,e,10):o=n?1:0,r||1!==o||(r=[],Oc((function(e,t){r[t]=null!=e?e:""}),i,e)),a=r?r.length:i===Dc?e.length:e[0]?e[0].length:null;else if(t===Ic)r||(r=function(e){var t,i=0;for(;i<e.length&&!(t=e[i++]););if(t){var n=[];return gc(t,(function(e,t){n.push(t)})),n}}(e));else if(t===Tc)r||(r=[],gc(e,(function(e,t){r.push(t)})));else if(t===Sc){var s=pc(e[0]);a=vc(s)&&s.length||1}return{startIndex:o,dimensionsDefine:kc(r),dimensionsDetectCount:a}}(i,n,a,o,s);Pc(e).source=new hc({data:i,fromDataset:r,seriesLayoutBy:a,sourceFormat:n,dimensionsDefine:c.dimensionsDefine,startIndex:c.startIndex,dimensionsDetectCount:c.dimensionsDetectCount,encodeDefine:t.encode})},makeSeriesEncodeForAxisCoordSys:function(e,t,i){var n={},r=Rc(t);if(!r||!e)return n;var a,o,s=[],l=[],u=t.ecModel,c=Pc(u).datasetMap,h=r.uid+"_"+i.seriesLayoutBy;e=e.slice(),gc(e,(function(t,i){!xc(t)&&(e[i]={name:t}),"ordinal"===t.type&&null==a&&(a=i,o=f(e[i])),n[t.name]=[]}));var d=c.get(h)||c.set(h,{categoryWayDim:o,valueWayDim:0});function p(e,t,i){for(var n=0;n<i;n++)e.push(t+n)}function f(e){var t=e.dimsDef;return t?t.length:1}return gc(e,(function(e,t){var i=e.name,r=f(e);if(null==a){var o=d.valueWayDim;p(n[i],o,r),p(l,o,r),d.valueWayDim+=r}else if(a===t)p(n[i],0,r),p(s,0,r);else{o=d.categoryWayDim;p(n[i],o,r),p(l,o,r),d.categoryWayDim+=r}})),s.length&&(n.itemName=s),l.length&&(n.seriesName=l),n},makeSeriesEncodeForNameBased:function(e,t,i){var n={};if(!Rc(e))return n;var r,a=t.sourceFormat,o=t.dimensionsDefine;a!==Ic&&a!==Tc||gc(o,(function(e,t){"name"===(xc(e)?e.name:e)&&(r=t)}));var s=function(){for(var e={},n={},s=[],l=0,u=Math.min(5,i);l<u;l++){var c=Nc(t.data,a,t.seriesLayoutBy,o,t.startIndex,l);s.push(c);var h=c===Lc.Not;if(h&&null==e.v&&l!==r&&(e.v=l),(null==e.n||e.n===e.v||!h&&s[e.n]===Lc.Not)&&(e.n=l),d(e)&&s[e.n]!==Lc.Not)return e;h||(c===Lc.Might&&null==n.v&&l!==r&&(n.v=l),null!=n.n&&n.n!==n.v||(n.n=l))}function d(e){return null!=e.v&&null!=e.n}return d(e)?e:d(n)?n:null}();if(s){n.value=s.v;var l=null!=r?r:s.n;n.itemName=[l],n.seriesName=[l]}return n},guessOrdinal:function(e,t){return Nc(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}},zc=we.each,Bc=we.filter,Vc=we.map,Fc=we.isArray,Gc=we.indexOf,Hc=we.isObject,Wc=we.isString,jc=we.createHashMap,Uc=we.assert,Zc=we.clone,Yc=we.merge,qc=we.extend,Xc=we.mixin,Kc=Ec.resetSourceDefaulter,Qc=vu.extend({init:function(e,t,i,n){i=i||{},this.option=null,this._theme=new vu(i),this._optionManager=n},setOption:function(e,t){Uc(!("\0_ec_inner"in e),"please use chart.getOption()"),this._optionManager.setOption(e,t),this.resetOption(null)},resetOption:function(e){var t=!1,i=this._optionManager;if(!e||"recreate"===e){var n=i.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this.mergeOption(n)):Jc.call(this,n),t=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var r=i.getTimelineOption(this);r&&(this.mergeOption(r),t=!0)}if(!e||"recreate"===e||"media"===e){var a=i.getMediaOption(this,this._api);a.length&&zc(a,(function(e){this.mergeOption(e,t=!0)}),this)}return t},mergeOption:function(e){var t=this.option,i=this._componentsMap,n=[];Kc(this),zc(e,(function(e,i){null!=e&&(qu.hasClass(i)?i&&n.push(i):t[i]=null==t[i]?Zc(e):Yc(t[i],e,!0))})),qu.topologicalTravel(n,qu.getAllClassMainTypes(),(function(n,r){var a=xa.normalizeToArray(e[n]),o=xa.mappingToExists(i.get(n),a);xa.makeIdAndName(o),zc(o,(function(e,t){var i=e.option;Hc(i)&&(e.keyInfo.mainType=n,e.keyInfo.subType=function(e,t,i){return t.type?t.type:i?i.subType:qu.determineSubType(e,t)}(n,i,e.exist))}));var s=function(e,t){Fc(t)||(t=t?[t]:[]);var i={};return zc(t,(function(t){i[t]=(e.get(t)||[]).slice()})),i}(i,r);t[n]=[],i.set(n,[]),zc(o,(function(e,r){var a=e.exist,o=e.option;if(Uc(Hc(o)||a,"Empty component definition"),o){var l=qu.getClass(n,e.keyInfo.subType,!0);if(a&&a.constructor===l)a.name=e.keyInfo.name,a.mergeOption(o,this),a.optionUpdated(o,!1);else{var u=qc({dependentModels:s,componentIndex:r},e.keyInfo);a=new l(o,this,this,u),qc(a,u),a.init(o,this,this,u),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);i.get(n)[r]=a,t[n][r]=a.option}),this),"series"===n&&$c(this,i.get("series"))}),this),this._seriesIndicesMap=jc(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var e=Zc(this.option);return zc(e,(function(t,i){if(qu.hasClass(i)){for(var n=(t=xa.normalizeToArray(t)).length-1;n>=0;n--)xa.isIdInner(t[n])&&t.splice(n,1);e[i]=t}})),delete e["\0_ec_inner"],e},getTheme:function(){return this._theme},getComponent:function(e,t){var i=this._componentsMap.get(e);if(i)return i[t||0]},queryComponents:function(e){var t=e.mainType;if(!t)return[];var i,n=e.index,r=e.id,a=e.name,o=this._componentsMap.get(t);if(!o||!o.length)return[];if(null!=n)Fc(n)||(n=[n]),i=Bc(Vc(n,(function(e){return o[e]})),(function(e){return!!e}));else if(null!=r){var s=Fc(r);i=Bc(o,(function(e){return s&&Gc(r,e.id)>=0||!s&&e.id===r}))}else if(null!=a){var l=Fc(a);i=Bc(o,(function(e){return l&&Gc(a,e.name)>=0||!l&&e.name===a}))}else i=o.slice();return eh(i,e)},findComponents:function(e){var t,i,n,r,a,o=e.query,s=e.mainType,l=(i=s+"Index",n=s+"Id",r=s+"Name",!(t=o)||null==t[i]&&null==t[n]&&null==t[r]?null:{mainType:s,index:t[i],id:t[n],name:t[r]}),u=l?this.queryComponents(l):this._componentsMap.get(s);return a=eh(u,e),e.filter?Bc(a,e.filter):a},eachComponent:function(e,t,i){var n=this._componentsMap;if("function"==typeof e)i=t,t=e,n.each((function(e,n){zc(e,(function(e,r){t.call(i,n,e,r)}))}));else if(Wc(e))zc(n.get(e),t,i);else if(Hc(e)){var r=this.findComponents(e);zc(r,t,i)}},getSeriesByName:function(e){var t=this._componentsMap.get("series");return Bc(t,(function(t){return t.name===e}))},getSeriesByIndex:function(e){return this._componentsMap.get("series")[e]},getSeriesByType:function(e){var t=this._componentsMap.get("series");return Bc(t,(function(t){return t.subType===e}))},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(e,t){zc(this._seriesIndices,(function(i){var n=this._componentsMap.get("series")[i];e.call(t,n,i)}),this)},eachRawSeries:function(e,t){zc(this._componentsMap.get("series"),e,t)},eachSeriesByType:function(e,t,i){zc(this._seriesIndices,(function(n){var r=this._componentsMap.get("series")[n];r.subType===e&&t.call(i,r,n)}),this)},eachRawSeriesByType:function(e,t,i){return zc(this.getSeriesByType(e),t,i)},isSeriesFiltered:function(e){return null==this._seriesIndicesMap.get(e.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(e,t){$c(this,Bc(this._componentsMap.get("series"),e,t))},restoreData:function(e){var t=this._componentsMap;$c(this,t.get("series"));var i=[];t.each((function(e,t){i.push(t)})),qu.topologicalTravel(i,qu.getAllClassMainTypes(),(function(i,n){zc(t.get(i),(function(t){("series"!==i||!function(e,t){if(t){var i=t.seiresIndex,n=t.seriesId,r=t.seriesName;return null!=i&&e.componentIndex!==i||null!=n&&e.id!==n||null!=r&&e.name!==r}}(t,e))&&t.restoreData()}))}))}});function Jc(e){e=e,this.option={},this.option["\0_ec_inner"]=1,this._componentsMap=jc({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(e,t){var i=e.color&&!e.colorLayer;zc(t,(function(t,n){"colorLayer"===n&&i||qu.hasClass(n)||("object"==typeof t?e[n]=e[n]?Yc(e[n],t,!1):Zc(t):null==e[n]&&(e[n]=t))}))}(e,this._theme.option),Yc(e,Ku,!1),this.mergeOption(e)}function $c(e,t){e._seriesIndicesMap=jc(e._seriesIndices=Vc(t,(function(e){return e.componentIndex}))||[])}function eh(e,t){return t.hasOwnProperty("subType")?Bc(e,(function(e){return e.subType===t.subType})):e}Xc(Qc,ec);var th=Qc,ih=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var nh=function(e){we.each(ih,(function(t){this[t]=we.bind(e[t],e)}),this)},rh={};function ah(){this._coordinateSystems=[]}ah.prototype={constructor:ah,create:function(e,t){var i=[];we.each(rh,(function(n,r){var a=n.create(e,t);i=i.concat(a||[])})),this._coordinateSystems=i},update:function(e,t){we.each(this._coordinateSystems,(function(i){i.update&&i.update(e,t)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},ah.register=function(e,t){rh[e]=t},ah.get=function(e){return rh[e]};var oh=ah,sh=we.each,lh=we.clone,uh=we.map,ch=we.merge,hh=/^(min|max)?(.+)$/;function dh(e){this._api=e,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function ph(e,t,i){var n,r,a=[],o=[],s=e.timeline;if(e.baseOption&&(r=e.baseOption),(s||e.options)&&(r=r||{},a=(e.options||[]).slice()),e.media){r=r||{};var l=e.media;sh(l,(function(e){e&&e.option&&(e.query?o.push(e):n||(n=e))}))}return r||(r=e),r.timeline||(r.timeline=s),sh([r].concat(a).concat(we.map(o,(function(e){return e.option}))),(function(e){sh(t,(function(t){t(e,i)}))})),{baseOption:r,timelineOptions:a,mediaDefault:n,mediaList:o}}function fh(e,t,i){var n={width:t,height:i,aspectratio:t/i},r=!0;return we.each(e,(function(e,t){var i=t.match(hh);if(i&&i[1]&&i[2]){var a=i[1],o=i[2].toLowerCase();(function(e,t,i){return"min"===i?e>=t:"max"===i?e<=t:e===t})(n[o],e,a)||(r=!1)}})),r}dh.prototype={constructor:dh,setOption:function(e,t){e&&we.each(xa.normalizeToArray(e.series),(function(e){e&&e.data&&we.isTypedArray(e.data)&&we.setAsPrimitive(e.data)})),e=lh(e);var i,n,r=this._optionBackup,a=ph.call(this,e,t,!r);this._newBaseOption=a.baseOption,r?(i=r.baseOption,n=a.baseOption,sh(n=n||{},(function(e,t){if(null!=e){var n=i[t];if(qu.hasClass(t)){e=xa.normalizeToArray(e),n=xa.normalizeToArray(n);var r=xa.mappingToExists(n,e);i[t]=uh(r,(function(e){return e.option&&e.exist?ch(e.exist,e.option,!0):e.exist||e.option}))}else i[t]=ch(n,e,!0)}})),a.timelineOptions.length&&(r.timelineOptions=a.timelineOptions),a.mediaList.length&&(r.mediaList=a.mediaList),a.mediaDefault&&(r.mediaDefault=a.mediaDefault)):this._optionBackup=a},mountOption:function(e){var t=this._optionBackup;return this._timelineOptions=uh(t.timelineOptions,lh),this._mediaList=uh(t.mediaList,lh),this._mediaDefault=lh(t.mediaDefault),this._currentMediaIndices=[],lh(e?t.baseOption:this._newBaseOption)},getTimelineOption:function(e){var t,i=this._timelineOptions;if(i.length){var n=e.getComponent("timeline");n&&(t=lh(i[n.getCurrentIndex()],!0))}return t},getMediaOption:function(e){var t,i,n=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,o=this._mediaDefault,s=[],l=[];if(!a.length&&!o)return l;for(var u=0,c=a.length;u<c;u++)fh(a[u].query,n,r)&&s.push(u);return!s.length&&o&&(s=[-1]),s.length&&(t=s,i=this._currentMediaIndices,t.join(",")!==i.join(","))&&(l=uh(s,(function(e){return lh(-1===e?o.option:a[e].option)}))),this._currentMediaIndices=s,l}};var gh=dh,mh=we.each,vh=we.isObject,yh=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function xh(e){var t=e&&e.itemStyle;if(t)for(var i=0,n=yh.length;i<n;i++){var r=yh[i],a=t.normal,o=t.emphasis;a&&a[r]&&(e[r]=e[r]||{},e[r].normal?we.merge(e[r].normal,a[r]):e[r].normal=a[r],a[r]=null),o&&o[r]&&(e[r]=e[r]||{},e[r].emphasis?we.merge(e[r].emphasis,o[r]):e[r].emphasis=o[r],o[r]=null)}}function _h(e,t,i){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var n=e[t].normal,r=e[t].emphasis;n&&(i?(e[t].normal=e[t].emphasis=null,we.defaults(e[t],n)):e[t]=n),r&&(e.emphasis=e.emphasis||{},e.emphasis[t]=r)}}function bh(e){_h(e,"itemStyle"),_h(e,"lineStyle"),_h(e,"areaStyle"),_h(e,"label"),_h(e,"labelLine"),_h(e,"upperLabel"),_h(e,"edgeLabel")}function wh(e,t){var i=vh(e)&&e[t],n=vh(i)&&i.textStyle;if(n)for(var r=0,a=xa.TEXT_STYLE_OPTIONS.length;r<a;r++){t=xa.TEXT_STYLE_OPTIONS[r];n.hasOwnProperty(t)&&(i[t]=n[t])}}function Sh(e){e&&(bh(e),wh(e,"label"),e.emphasis&&wh(e.emphasis,"label"))}function Mh(e){return we.isArray(e)?e:e?[e]:[]}function Ih(e){return(we.isArray(e)?e[0]:e)||{}}var Th=function(e,t){mh(Mh(e.series),(function(e){vh(e)&&function(e){if(vh(e)){xh(e),bh(e),wh(e,"label"),wh(e,"upperLabel"),wh(e,"edgeLabel"),e.emphasis&&(wh(e.emphasis,"label"),wh(e.emphasis,"upperLabel"),wh(e.emphasis,"edgeLabel")),(i=e.markPoint)&&(xh(i),Sh(i)),(n=e.markLine)&&(xh(n),Sh(n));var t=e.markArea;t&&Sh(t);var i,n,r=e.data;if("graph"===e.type){r=r||e.nodes;var a=e.links||e.edges;if(a&&!we.isTypedArray(a))for(var o=0;o<a.length;o++)Sh(a[o]);we.each(e.categories,(function(e){bh(e)}))}if(r&&!we.isTypedArray(r))for(o=0;o<r.length;o++)Sh(r[o]);if((i=e.markPoint)&&i.data){var s=i.data;for(o=0;o<s.length;o++)Sh(s[o])}if((n=e.markLine)&&n.data){var l=n.data;for(o=0;o<l.length;o++)we.isArray(l[o])?(Sh(l[o][0]),Sh(l[o][1])):Sh(l[o])}"gauge"===e.type?(wh(e,"axisLabel"),wh(e,"title"),wh(e,"detail")):"treemap"===e.type?(_h(e.breadcrumb,"itemStyle"),we.each(e.levels,(function(e){bh(e)}))):"tree"===e.type&&bh(e.leaves)}}(e)}));var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),mh(i,(function(t){mh(Mh(e[t]),(function(e){e&&(wh(e,"axisLabel"),wh(e.axisPointer,"label"))}))})),mh(Mh(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;wh(t,"axisLabel"),wh(t&&t.axisPointer,"label")})),mh(Mh(e.calendar),(function(e){_h(e,"itemStyle"),wh(e,"dayLabel"),wh(e,"monthLabel"),wh(e,"yearLabel")})),mh(Mh(e.radar),(function(e){wh(e,"name")})),mh(Mh(e.geo),(function(e){vh(e)&&(Sh(e),mh(Mh(e.regions),(function(e){Sh(e)})))})),mh(Mh(e.timeline),(function(e){Sh(e),_h(e,"label"),_h(e,"itemStyle"),_h(e,"controlStyle",!0);var t=e.data;we.isArray(t)&&we.each(t,(function(e){we.isObject(e)&&(_h(e,"label"),_h(e,"itemStyle"))}))})),mh(Mh(e.toolbox),(function(e){_h(e,"iconStyle"),mh(e.feature,(function(e){_h(e,"iconStyle")}))})),wh(Ih(e.axisPointer),"label"),wh(Ih(e.tooltip).axisPointer,"label")},Ah=we.each,Ch=we.isArray,Dh=we.isObject,Lh=xa.normalizeToArray;function Ph(e){Ah(kh,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var kh=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Oh=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];var Rh=function(e,t){Th(e,t),e.series=Lh(e.series),Ah(e.series,(function(e){if(Dh(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t)null!=e.clockWise&&(e.clockwise=e.clockWise);else if("gauge"===t){var i=function(e,t){t=t.split(",");for(var i=e,n=0;n<t.length&&null!=(i=i&&i[t[n]]);n++);return i}(e,"pointer.color");null!=i&&function(e,t,i,n){t=t.split(",");for(var r,a=e,o=0;o<t.length-1;o++)null==a[r=t[o]]&&(a[r]={}),a=a[r];(n||null==a[t[o]])&&(a[t[o]]=i)}(e,"itemStyle.color",i)}Ph(e)}})),e.dataRange&&(e.visualMap=e.dataRange),Ah(Oh,(function(t){var i=e[t];i&&(Ch(i)||(i=[i]),Ah(i,(function(e){Ph(e)})))}))},Nh=we.createHashMap,Eh=we.each;function zh(e){Eh(e,(function(t,i){var n=[],r=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=o.map(a,(function(a,l,u){var c,h,d=o.get(t.stackedDimension,u);if(isNaN(d))return r;s?h=o.getRawIndex(u):c=o.get(t.stackedByDimension,u);for(var p=NaN,f=i-1;f>=0;f--){var g=e[f];if(s||(h=g.data.rawIndexOf(g.stackedByDimension,c)),h>=0){var m=g.data.getByRawIndex(g.stackResultDimension,h);if(d>=0&&m>0||d<=0&&m<0){d+=m,p=m;break}}}return n[0]=d,n[1]=p,n}));o.hostModel.setData(l),t.data=l}))}var Bh=function(e){var t=Nh();e.eachSeries((function(e){var i=e.get("stack");if(i){var n=t.get(i)||t.set(i,[]),r=e.getData(),a={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:e};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;n.length&&r.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(a)}})),t.each(zh)},Vh=we.extend,Fh=we.each,Gh=we.isObject,Hh=xa.getDataItemValue,Wh=xa.isDataItemOption,jh=Su.parseDate,Uh=tc.SOURCE_FORMAT_TYPED_ARRAY,Zh=tc.SOURCE_FORMAT_ARRAY_ROWS,Yh=tc.SOURCE_FORMAT_ORIGINAL,qh=tc.SOURCE_FORMAT_OBJECT_ROWS;function Xh(e,t){hc.isInstance(e)||(e=hc.seriesDataToSource(e)),this._source=e;var i=this._data=e.data,n=e.sourceFormat;n===Uh&&(this._offset=0,this._dimSize=t,this._data=i);var r=Qh[n===Zh?n+"_"+e.seriesLayoutBy:n];Vh(this,r)}var Kh=Xh.prototype;Kh.pure=!1,Kh.persistent=!0,Kh.getSource=function(){return this._source};var Qh={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(e){return this._data[e+this._source.startIndex]},appendData:ed},arrayRows_row:{pure:!0,count:function(){var e=this._data[0];return e?Math.max(0,e.length-this._source.startIndex):0},getItem:function(e){e+=this._source.startIndex;for(var t=[],i=this._data,n=0;n<i.length;n++){var r=i[n];t.push(r?r[e]:null)}return t},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Jh,getItem:$h,appendData:ed},keyedColumns:{pure:!0,count:function(){var e=this._source.dimensionsDefine[0].name,t=this._data[e];return t?t.length:0},getItem:function(e){for(var t=[],i=this._source.dimensionsDefine,n=0;n<i.length;n++){var r=this._data[i[n].name];t.push(r?r[e]:null)}return t},appendData:function(e){var t=this._data;Fh(e,(function(e,i){for(var n=t[i]||(t[i]=[]),r=0;r<(e||[]).length;r++)n.push(e[r])}))}},original:{count:Jh,getItem:$h,appendData:ed},typedArray:{persistent:!1,pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(e,t){e-=this._offset,t=t||[];for(var i=this._dimSize*e,n=0;n<this._dimSize;n++)t[n]=this._data[i+n];return t},appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}}};function Jh(){return this._data.length}function $h(e){return this._data[e]}function ed(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}var td={arrayRows:id,objectRows:function(e,t,i,n){return null!=i?e[n]:e},keyedColumns:id,original:function(e,t,i,n){var r=Hh(e);return null!=i&&r instanceof Array?r[i]:r},typedArray:id};function id(e,t,i,n){return null!=i?e[i]:e}function nd(e,t,i,n){return rd(e[n],this._dimensionInfos[t])}function rd(e,t){var i=t&&t.type;if("ordinal"===i){var n=t&&t.ordinalMeta;return n?n.parseAndCollect(e):e}return"time"===i&&"number"!=typeof e&&null!=e&&"-"!==e&&(e=+jh(e)),null==e||""===e?NaN:+e}var ad={DefaultDataProvider:Xh,defaultDimValueGetters:{arrayRows:nd,objectRows:function(e,t,i,n){return rd(e[t],this._dimensionInfos[t])},keyedColumns:nd,original:function(e,t,i,n){var r=e&&(null==e.value?e:e.value);return!this._rawData.pure&&Wh(e)&&(this.hasItemOption=!0),rd(r instanceof Array?r[n]:r,this._dimensionInfos[t])},typedArray:function(e,t,i,n){return e[n]}},retrieveRawValue:function(e,t,i){if(e){var n=e.getRawDataItem(t);if(null!=n){var r,a,o=e.getProvider().getSource().sourceFormat,s=e.getDimensionInfo(i);return s&&(r=s.name,a=s.index),td[o](n,t,a,r)}}},retrieveRawAttr:function(e,t,i){if(e){var n=e.getProvider().getSource().sourceFormat;if(n===Yh||n===qh){var r=e.getRawDataItem(t);return n!==Yh||Gh(r)||(r=null),r?r[i]:void 0}}}},od=ad.retrieveRawValue,sd=Pu.getTooltipMarker,ld=Pu.formatTpl,ud=xa.getTooltipRenderMode,cd=/\{@(.+?)\}/g,hd={getDataParams:function(e,t){var i=this.getData(t),n=this.getRawValue(e,t),r=i.getRawIndex(e),a=i.getName(e),o=i.getRawDataItem(e),s=i.getItemVisual(e,"color"),l=i.getItemVisual(e,"borderColor"),u=this.ecModel.getComponent("tooltip"),c=u&&u.get("renderMode"),h=ud(c),d=this.mainType,p="series"===d,f=i.userOutput;return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:p?this.subType:null,seriesIndex:this.seriesIndex,seriesId:p?this.id:null,seriesName:p?this.name:null,name:a,dataIndex:r,data:o,dataType:t,value:n,color:s,borderColor:l,dimensionNames:f?f.dimensionNames:null,encode:f?f.encode:null,marker:sd({color:s,renderMode:h}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(e,t,i,n,r){t=t||"normal";var a=this.getData(i),o=a.getItemModel(e),s=this.getDataParams(e,i);null!=n&&s.value instanceof Array&&(s.value=s.value[n]);var l=o.get("normal"===t?[r||"label","formatter"]:[t,r||"label","formatter"]);return"function"==typeof l?(s.status=t,s.dimensionIndex=n,l(s)):"string"==typeof l?ld(l,s).replace(cd,(function(t,i){var n=i.length;return"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1)),od(a,e,i)})):void 0},getRawValue:function(e,t){return od(this.getData(t),e)},formatTooltip:function(){}},dd=we.isArray;function pd(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0,this.context}var fd=pd.prototype;fd.perform=function(e){var t,i=this._upstream,n=e&&e.skip;if(this._dirty&&i){var r=this.context;r.data=r.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!n&&(t=this._plan(this.context));var a,o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}o===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,a=function(e,t){var i,n;e._dueIndex=e._outputDueEnd=e._dueEnd=0,e._settedOutputEnd=null,!t&&e._reset&&((i=e._reset(e.context))&&i.progress&&(n=i.forceFirstProgress,i=i.progress),dd(i)&&!i.length&&(i=null));e._progress=i,e._modBy=e._modDataCount=null;var r=e._downstream;return r&&r.dirty(),n}(this,n)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(a||d<p)){var f=this._progress;if(dd(f))for(var g=0;g<f.length;g++)md(this,f[g],d,p,l,u);else md(this,f,d,p,l,u)}this._dueIndex=p;var m=null!=this._settedOutputEnd?this._settedOutputEnd:p;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var gd=function(){var e,t,i,n,r,a={reset:function(l,u,c,h){t=l,e=u,i=c,n=h,r=Math.ceil(n/i),a.next=i>1&&n>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var a=t%r*i+Math.ceil(t/r),o=t>=e?null:a<n?a:t;return t++,o}}();function md(e,t,i,n,r,a){gd.reset(i,n,r,a),e._callingProgress=t,e._callingProgress({start:i,end:n,count:n-i,next:gd.next},e.context)}fd.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},fd.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},fd.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},fd.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},fd.getUpstream=function(){return this._upstream},fd.getDownstream=function(){return this._downstream},fd.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e};var vd={createTask:function(e){return new pd(e)}},yd=Pu.formatTime,xd=Pu.encodeHTML,_d=Pu.addCommas,bd=Pu.getTooltipMarker,wd=Hu.getLayoutParams,Sd=Hu.mergeLayoutParam,Md=vd.createTask,Id=Ec.prepareSource,Td=Ec.getSource,Ad=ad.retrieveRawValue,Cd=xa.makeInner(),Dd=qu.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(e,t,i,n){this.seriesIndex=this.componentIndex,this.dataTask=Md({count:Pd,reset:kd}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,i),Id(this);var r=this.getInitialData(e,i);Rd(r,this),this.dataTask.context.data=r,Cd(this).dataBeforeProcessed=r,Ld(this)},mergeDefaultAndTheme:function(e,t){var i=this.layoutMode,n=i?wd(e):{},r=this.subType;qu.hasClass(r)&&(r+="Series"),we.merge(e,t.getTheme().get(this.subType)),we.merge(e,this.getDefaultOption()),xa.defaultEmphasis(e,"label",["show"]),this.fillDataTextStyle(e.data),i&&Sd(e,n,i)},mergeOption:function(e,t){e=we.merge(this.option,e,!0),this.fillDataTextStyle(e.data);var i=this.layoutMode;i&&Sd(this.option,e,i),Id(this);var n=this.getInitialData(e,t);Rd(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,Cd(this).dataBeforeProcessed=n,Ld(this)},fillDataTextStyle:function(e){if(e&&!we.isTypedArray(e))for(var t=["show"],i=0;i<e.length;i++)e[i]&&e[i].label&&xa.defaultEmphasis(e[i],"label",t)},getInitialData:function(){},appendData:function(e){this.getRawData().appendData(e.data)},getData:function(e){var t=Ed(this);if(t){var i=t.context.data;return null==e?i:i.getLinkedData(e)}return Cd(this).data},setData:function(e){var t=Ed(this);if(t){var i=t.context;i.data!==e&&t.modifyOutputEnd&&t.setOutputEnd(e.count()),i.outputData=e,t!==this.dataTask&&(i.data=e)}Cd(this).data=e},getSource:function(){return Td(this)},getRawData:function(){return Cd(this).dataBeforeProcessed},getBaseAxis:function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},formatTooltip:function(e,t,i,n){var r=this,a="html"===(n=n||"html")?"<br/>":"\n",o="richText"===n,s={},l=0;function u(e){return{renderMode:n,content:xd(_d(e)),style:s}}var c=this.getData(),h=c.mapDimension("defaultedTooltip",!0),d=h.length,p=this.getRawValue(e),f=we.isArray(p),g=c.getItemVisual(e,"color");we.isObject(g)&&g.colorStops&&(g=(g.colorStops[0]||{}).color),g=g||"transparent";var m=(d>1||f&&!d?function(i){var a=we.reduce(i,(function(e,t,i){var n=c.getDimensionInfo(i);return e|(n&&!1!==n.tooltip&&null!=n.displayName)}),0),u=[];function d(e,i){var h=c.getDimensionInfo(i);if(h&&!1!==h.otherDims.tooltip){var d=h.type,p="sub"+r.seriesIndex+"at"+l,f=bd({color:g,type:"subItem",renderMode:n,markerId:p}),m="string"==typeof f?f:f.content,v=(a?m+xd(h.displayName||"-")+": ":"")+xd("ordinal"===d?e+"":"time"===d?t?"":yd("yyyy/MM/dd hh:mm:ss",e):_d(e));v&&u.push(v),o&&(s[p]=g,++l)}}h.length?we.each(h,(function(t){d(Ad(c,e,t),t)})):we.each(i,d);var p=a?o?"\n":"<br/>":"",f=p+u.join(p||", ");return{renderMode:n,content:f,style:s}}(p):u(d?Ad(c,e,h[0]):f?p[0]:p)).content,v=r.seriesIndex+"at"+l,y=bd({color:g,type:"item",renderMode:n,markerId:v});s[v]=g,++l;var x=c.getName(e),_=this.name;xa.isNameSpecified(this)||(_=""),_=_?xd(_)+(t?": ":a):"";var b="string"==typeof y?y:y.content;return{html:t?b+_+m:_+b+(x?xd(x)+": "+m:m),markers:s}},isAnimationEnabled:function(){if(J.node)return!1;var e=this.getShallow("animation");return e&&this.getData().count()>this.getShallow("animationThreshold")&&(e=!1),e},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(e,t,i){var n=this.ecModel,r=ec.getColorFromPalette.call(this,e,t,i);return r||(r=n.getColorFromPalette(e,t,i)),r},coordDimToDataDim:function(e){return this.getRawData().mapDimension(e,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function Ld(e){var t=e.name;xa.isNameSpecified(e)||(e.name=function(e){var t=e.getRawData(),i=t.mapDimension("seriesName",!0),n=[];return we.each(i,(function(e){var i=t.getDimensionInfo(e);i.displayName&&n.push(i.displayName)})),n.join(" ")}(e)||t)}function Pd(e){return e.model.getRawData().count()}function kd(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Od}function Od(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Rd(e,t){we.each(e.CHANGABLE_METHODS,(function(i){e.wrapMethod(i,we.curry(Nd,t))}))}function Nd(e){var t=Ed(e);t&&t.setOutputEnd(this.count())}function Ed(e){var t=(e.ecModel||{}).scheduler,i=t&&t.getPipeline(e.uid);if(i){var n=i.currentTask;if(n){var r=n.agentStubMap;r&&(n=r.get(e.uid))}return n}}we.mixin(Dd,hd),we.mixin(Dd,ec);var zd=Dd,Bd=function(){this.group=new zi,this.uid=_u.getUID("viewComponent")},Vd=Bd.prototype={constructor:Bd,init:function(e,t){},render:function(e,t,i,n){},dispose:function(){},filterForExposedEvent:null};Vd.updateView=Vd.updateLayout=Vd.updateVisual=function(e,t,i,n){},Ia.enableClassExtend(Bd),Ia.enableClassManagement(Bd,{registerWhenExtend:!0});var Fd=Bd,Gd=xa.makeInner;var Hd=function(){var e=Gd();return function(t){var i=e(t),n=t.pipelineContext,r=i.large,a=i.progressiveRender,o=i.large=n&&n.large,s=i.progressiveRender=n&&n.progressiveRender;return!!(r^o||a^s)&&"reset"}},Wd=we.each,jd=vd.createTask,Ud=xa.makeInner(),Zd=Hd();function Yd(){this.group=new zi,this.uid=_u.getUID("viewChart"),this.renderTask=jd({plan:Qd,reset:Jd}),this.renderTask.context={view:this}}Yd.prototype={type:"chart",init:function(e,t){},render:function(e,t,i,n){},highlight:function(e,t,i,n){Kd(e.getData(),n,"emphasis")},downplay:function(e,t,i,n){Kd(e.getData(),n,"normal")},remove:function(e,t){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var qd=Yd.prototype;function Xd(e,t,i){if(e&&(e.trigger(t,i),e.isGroup&&!ru.isHighDownDispatcher(e)))for(var n=0,r=e.childCount();n<r;n++)Xd(e.childAt(n),t,i)}function Kd(e,t,i){var n=xa.queryDataIndex(e,t),r=t&&null!=t.highlightKey?ru.getHighlightDigit(t.highlightKey):null;null!=n?Wd(xa.normalizeToArray(n),(function(t){Xd(e.getItemGraphicEl(t),i,r)})):e.eachItemGraphicEl((function(e){Xd(e,i,r)}))}function Qd(e){return Zd(e.model)}function Jd(e){var t=e.model,i=e.ecModel,n=e.api,r=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=r&&Ud(r).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](t,i,n,r),$d[l]}qd.updateView=qd.updateLayout=qd.updateVisual=function(e,t,i,n){this.render(e,t,i,n)},Ia.enableClassExtend(Yd,["dispose"]),Ia.enableClassManagement(Yd,{registerWhenExtend:!0}),Yd.markUpdateMethod=function(e,t){Ud(e).updateMethod=t};var $d={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},ep=Yd,tp="\0__throttleOriginMethod",ip="\0__throttleRate";function np(e,t,i){var n,r,a,o,s,l=0,u=0,c=null;function h(){u=(new Date).getTime(),c=null,e.apply(a,o||[])}t=t||0;var d=function(){n=(new Date).getTime(),a=this,o=arguments;var e=s||t,d=s||i;s=null,r=n-(d?l:u)-e,clearTimeout(c),d?c=setTimeout(h,e):r>=0?h():c=setTimeout(h,-r),l=n};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(e){s=e},d}var rp={throttle:np,createOrUpdate:function(e,t,i,n){var r=e[t];if(r){var a=r[tp]||r,o=r["\0__throttleType"];if(r[ip]!==i||o!==n){if(null==i||!n)return e[t]=a;(r=e[t]=np(a,i,"debounce"===n))[tp]=a,r["\0__throttleType"]=n,r[ip]=i}return r}},clear:function(e,t){var i=e[t];i&&i[tp]&&(e[t]=i[tp])}},ap=we.isFunction,op={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var i=e.getData(),n=(e.visualColorAccessPath||"itemStyle.color").split("."),r=e.get(n),a=!ap(r)||r instanceof Xs?null:r;r&&!a||(r=e.getColorFromPalette(e.name,null,t.getSeriesCount())),i.setVisual("color",r);var o=(e.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=e.get(o);if(i.setVisual("borderColor",s),!t.isSeriesFiltered(e)){a&&i.each((function(t){i.setItemVisual(t,"color",a(e.getDataParams(t)))}));return{dataEach:i.hasItemOption?function(e,t){var i=e.getItemModel(t),r=i.get(n,!0),a=i.get(o,!0);null!=r&&e.setItemVisual(t,"color",r),null!=a&&e.setItemVisual(t,"borderColor",a)}:null}}}},sp={legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表，"},series:{single:{prefix:"",withName:"图表类型是{seriesType}，表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType}，",withoutName:"第{seriesId}个系列是一个{seriesType}，",separator:{middle:"；",end:"。"}}},data:{allData:"其数据是——",partialData:"其中，前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:"，",end:""}}}},lp=ad.retrieveRawValue;var up=function(e,t){var i=t.getModel("aria");if(i.get("show"))if(i.get("description"))e.setAttribute("aria-label",i.get("description"));else{var n=0;t.eachSeries((function(e,t){++n}),this);var r,a=i.get("data.maxCount")||10,o=i.get("series.maxCount")||10,s=Math.min(n,o);if(!(n<1)){var l=function(){var e=t.getModel("title").option;e&&e.length&&(e=e[0]);return e&&e.text}();r=l?c(h("general.withTitle"),{title:l}):h("general.withoutTitle");var u=[];r+=c(h(n>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:n}),t.eachSeries((function(e,t){if(t<s){var i,r=e.get("name"),o="series."+(n>1?"multiple":"single")+".";i=c(i=h(r?o+"withName":o+"withoutName"),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(m=e.subType,sp.series.typeNames[m]||"自定义图")});var l=e.getData();window.data=l,l.count()>a?i+=c(h("data.partialData"),{displayCnt:a}):i+=h("data.allData");for(var d=[],p=0;p<l.count();p++)if(p<a){var f=l.getName(p),g=lp(l,p);d.push(c(h(f?"data.withName":"data.withoutName"),{name:f,value:g}))}i+=d.join(h("data.separator.middle"))+h("data.separator.end"),u.push(i)}var m})),r+=u.join(h("series.multiple.separator.middle"))+h("series.multiple.separator.end"),e.setAttribute("aria-label",r)}}function c(e,t){if("string"!=typeof e)return e;var i=e;return we.each(t,(function(e,t){i=i.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)})),i}function h(e){var t=i.get(e);if(null==t){for(var n=e.split("."),r=sp.aria,a=0;a<n.length;++a)r=r[n[a]];return r}return t}},cp=Math.PI;var hp=function(e,t){t=t||{},we.defaults(t,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var i=new ru.Group,n=new ru.Rect({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});i.add(n);var r=t.fontSize+" sans-serif",a=new ru.Rect({style:{fill:"none",text:t.text,font:r,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});if(i.add(a),t.showSpinner){var o=new ru.Arc({shape:{startAngle:-cp/2,endAngle:-cp/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001});o.animateShape(!0).when(1e3,{endAngle:3*cp/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*cp/2}).delay(300).start("circularInOut"),i.add(o)}return i.resize=function(){var i=Fn.getWidth(t.text,r),s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&i?10:0)-i)/2-(t.showSpinner?0:i/2),u=e.getHeight()/2;t.showSpinner&&o.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),n.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},i.resize(),i},dp=we.each,pp=we.map,fp=we.isFunction,gp=we.createHashMap,mp=we.noop,vp=vd.createTask,yp=_u.getUID,xp=xa.normalizeToArray;function _p(e,t,i,n){this.ecInstance=e,this.api=t,this.unfinished;i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=gp()}var bp=_p.prototype;function wp(e,t,i,n,r){var a;function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}r=r||{},dp(t,(function(t,s){if(!r.visualType||r.visualType===t.visualType){var l=e._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var h,d=c.agentStubMap;d.each((function(e){o(r,e)&&(e.dirty(),h=!0)})),h&&c.dirty(),Sp(c,n);var p=e.getPerformArgs(c,r.block);d.each((function(e){e.perform(p)})),a|=c.perform(p)}else u&&u.each((function(s,l){o(r,s)&&s.dirty();var u=e.getPerformArgs(s,r.block);u.skip=!t.performRawSeries&&i.isSeriesFiltered(s.context.model),Sp(s,n),a|=s.perform(u)}))}})),e.unfinished|=a}bp.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},bp.getPerformArgs=function(e,t){if(e.__pipeline){var i=this._pipelineMap.get(e.__pipeline.id),n=i.context,r=!t&&i.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>i.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:r,modBy:null!=a?Math.ceil(a/r):null,modDataCount:a}}},bp.getPipeline=function(e){return this._pipelineMap.get(e)},bp.updateStreamModes=function(e,t){var i=this._pipelineMap.get(e.uid),n=e.getData().count(),r=i.progressiveEnabled&&t.incrementalPrepareRender&&n>=i.threshold,a=e.get("large")&&n>=e.get("largeThreshold"),o="mod"===e.get("progressiveChunkMode")?n:null;e.pipelineContext=i.context={progressiveRender:r,modDataCount:o,large:a}},bp.restorePipelines=function(e){var t=this,i=t._pipelineMap=gp();e.eachSeries((function(e){var n=e.getProgressive(),r=e.uid;i.set(r,{id:r,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:n&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),Op(t,e,e.dataTask)}))},bp.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.ecInstance.getModel(),i=this.api;dp(this._allHandlers,(function(n){var r=e.get(n.uid)||e.set(n.uid,[]);n.reset&&function(e,t,i,n,r){var a=i.seriesTaskMap||(i.seriesTaskMap=gp()),o=t.seriesType,s=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(l):o?n.eachRawSeriesByType(o,l):s&&s(n,r).each(l);function l(i){var o=i.uid,s=a.get(o)||a.set(o,vp({plan:Cp,reset:Dp,count:kp}));s.context={model:i,ecModel:n,api:r,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:e},Op(e,i,s)}var u=e._pipelineMap;a.each((function(e,t){u.get(t)||(e.dispose(),a.removeKey(t))}))}(this,n,r,t,i),n.overallReset&&function(e,t,i,n,r){var a=i.overallTask=i.overallTask||vp({reset:Mp});a.context={ecModel:n,api:r,overallReset:t.overallReset,scheduler:e};var o=a.agentStubMap=a.agentStubMap||gp(),s=t.seriesType,l=t.getTargetSeries,u=!0,c=t.modifyOutputEnd;s?n.eachRawSeriesByType(s,h):l?l(n,r).each(h):(u=!1,dp(n.getSeries(),h));function h(t){var i=t.uid,n=o.get(i);n||(n=o.set(i,vp({reset:Ip,onDirty:Ap})),a.dirty()),n.context={model:t,overallProgress:u,modifyOutputEnd:c},n.agent=a,n.__block=u,Op(e,t,n)}var d=e._pipelineMap;o.each((function(e,t){d.get(t)||(e.dispose(),a.dirty(),o.removeKey(t))}))}(this,n,r,t,i)}),this)},bp.prepareView=function(e,t,i,n){var r=e.renderTask,a=r.context;a.model=t,a.ecModel=i,a.api=n,r.__block=!e.incrementalPrepareRender,Op(this,t,r)},bp.performDataProcessorTasks=function(e,t){wp(this,this._dataProcessorHandlers,e,t,{block:!0})},bp.performVisualTasks=function(e,t,i){wp(this,this._visualHandlers,e,t,i)},bp.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t|=e.dataTask.perform()})),this.unfinished|=t},bp.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))};var Sp=bp.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)};function Mp(e){e.overallReset(e.ecModel,e.api,e.payload)}function Ip(e,t){return e.overallProgress&&Tp}function Tp(){this.agent.dirty(),this.getDownstream().dirty()}function Ap(){this.agent&&this.agent.dirty()}function Cp(e){return e.plan&&e.plan(e.model,e.ecModel,e.api,e.payload)}function Dp(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=xp(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?pp(t,(function(e,t){return Pp(t)})):Lp}var Lp=Pp(0);function Pp(e){return function(t,i){var n=i.data,r=i.resetDefines[e];if(r&&r.dataEach)for(var a=t.start;a<t.end;a++)r.dataEach(n,a);else r&&r.progress&&r.progress(t,n)}}function kp(e){return e.data.count()}function Op(e,t,i){var n=t.uid,r=e._pipelineMap.get(n);!r.head&&(r.head=i),r.tail&&r.tail.pipe(i),r.tail=i,i.__idxInPipeline=r.count++,i.__pipeline=r}function Rp(e){Np=null;try{e(Ep,zp)}catch(e){}return Np}_p.wrapStageHandler=function(e,t){return fp(e)&&(e={overallReset:e,seriesType:Rp(e)}),e.uid=yp("stageHandler"),t&&(e.visualType=t),e};var Np,Ep={},zp={};function Bp(e,t){for(var i in t.prototype)e[i]=mp}Bp(Ep,th),Bp(zp,nh),Ep.eachSeriesByType=Ep.eachRawSeriesByType=function(e){Np=e},Ep.eachComponent=function(e){"series"===e.mainType&&e.subType&&(Np=e.subType)};var Vp=_p,Fp=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Gp={color:Fp,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Fp]},Hp=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],Wp={color:Hp,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:"#eee"},crossStyle:{color:"#eee"},label:{color:"#000"}}},legend:{textStyle:{color:"#eee"}},textStyle:{color:"#eee"},title:{textStyle:{color:"#eee"}},toolbox:{iconStyle:{normal:{borderColor:"#eee"}}},dataZoom:{textStyle:{color:"#eee"}},visualMap:{textStyle:{color:"#eee"}},timeline:{lineStyle:{color:"#eee"},itemStyle:{normal:{color:Hp[1]}},label:{normal:{textStyle:{color:"#eee"}}},controlStyle:{normal:{color:"#eee",borderColor:"#eee"}}},timeAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},logAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},valueAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},categoryAxis:{axisLine:{lineStyle:{color:"#eee"}},axisTick:{lineStyle:{color:"#eee"}},axisLabel:{textStyle:{color:"#eee"}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:Hp},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};Wp.categoryAxis.splitLine.show=!1;var jp=Wp,Up=Ec.detectSourceFormat,Zp=tc.SERIES_LAYOUT_BY_COLUMN;qu.extend({type:"dataset",defaultOption:{seriesLayoutBy:Zp,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){Up(this)}}),Fd.extend({type:"dataset"});var Yp=Go.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(e,t){var i=.5522848,n=t.cx,r=t.cy,a=t.rx,o=t.ry,s=a*i,l=o*i;e.moveTo(n-a,r),e.bezierCurveTo(n-a,r-l,n-s,r-o,n,r-o),e.bezierCurveTo(n+s,r-o,n+a,r-l,n+a,r),e.bezierCurveTo(n+a,r+l,n+s,r+o,n,r+o),e.bezierCurveTo(n-s,r+o,n-a,r+l,n-a,r),e.closePath()}}),qp=as.createFromString,Xp=we.isString,Kp=we.extend,Qp=we.defaults,Jp=we.trim,$p=we.each,ef=/[\s,]+/;function tf(e){Xp(e)&&(e=(new DOMParser).parseFromString(e,"text/xml"));for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}function nf(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}nf.prototype.parse=function(e,t){t=t||{};var i=tf(e);if(!i)throw new Error("Illegal svg");var n=new zi;this._root=n;var r=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||t.width),o=parseFloat(i.getAttribute("height")||t.height);isNaN(a)&&(a=null),isNaN(o)&&(o=null),uf(i,n,null,!0);for(var s,l,u=i.firstChild;u;)this._parseNode(u,n),u=u.nextSibling;if(r){var c=Jp(r).split(ef);c.length>=4&&(s={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(s&&null!=a&&null!=o&&(l=ff(s,a,o),!t.ignoreViewBox)){var h=n;(n=new zi).add(h),h.scale=l.scale.slice(),h.position=l.position.slice()}return t.ignoreRootClip||null==a||null==o||n.setClipPath(new Os({shape:{x:0,y:0,width:a,height:o}})),{root:n,width:a,height:o,viewBoxRect:s,viewBoxTransform:l}},nf.prototype._parseNode=function(e,t){var i,n,r=e.nodeName.toLowerCase();if("defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine){if(n=af[r]){var a=n.call(this,e),o=e.getAttribute("id");o&&(this._defs[o]=a)}}else(n=rf[r])&&(i=n.call(this,e,t),t.add(i));for(var s=e.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},nf.prototype._parseText=function(e,t){if(1===e.nodeType){var i=e.getAttribute("dx")||0,n=e.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var r=new ls({style:{text:e.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});of(t,r),uf(e,r,this._defs);var a=r.style.fontSize;a&&a<9&&(r.style.fontSize=9,r.scale=r.scale||[1,1],r.scale[0]*=a/9,r.scale[1]*=a/9);var o=r.getBoundingRect();return this._textX+=o.width,t.add(r),r};var rf={g:function(e,t){var i=new zi;return of(t,i),uf(e,i,this._defs),i},rect:function(e,t){var i=new Os;return of(t,i),uf(e,i,this._defs),i.setShape({x:parseFloat(e.getAttribute("x")||0),y:parseFloat(e.getAttribute("y")||0),width:parseFloat(e.getAttribute("width")||0),height:parseFloat(e.getAttribute("height")||0)}),i},circle:function(e,t){var i=new us;return of(t,i),uf(e,i,this._defs),i.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),r:parseFloat(e.getAttribute("r")||0)}),i},line:function(e,t){var i=new Es;return of(t,i),uf(e,i,this._defs),i.setShape({x1:parseFloat(e.getAttribute("x1")||0),y1:parseFloat(e.getAttribute("y1")||0),x2:parseFloat(e.getAttribute("x2")||0),y2:parseFloat(e.getAttribute("y2")||0)}),i},ellipse:function(e,t){var i=new Yp;return of(t,i),uf(e,i,this._defs),i.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),rx:parseFloat(e.getAttribute("rx")||0),ry:parseFloat(e.getAttribute("ry")||0)}),i},polygon:function(e,t){var i=e.getAttribute("points");i&&(i=sf(i));var n=new Ts({shape:{points:i||[]}});return of(t,n),uf(e,n,this._defs),n},polyline:function(e,t){var i=new Go;of(t,i),uf(e,i,this._defs);var n=e.getAttribute("points");return n&&(n=sf(n)),new As({shape:{points:n||[]}})},image:function(e,t){var i=new Mr;return of(t,i),uf(e,i,this._defs),i.setStyle({image:e.getAttribute("xlink:href"),x:e.getAttribute("x"),y:e.getAttribute("y"),width:e.getAttribute("width"),height:e.getAttribute("height")}),i},text:function(e,t){var i=e.getAttribute("x")||0,n=e.getAttribute("y")||0,r=e.getAttribute("dx")||0,a=e.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(r),this._textY=parseFloat(n)+parseFloat(a);var o=new zi;return of(t,o),uf(e,o,this._defs),o},tspan:function(e,t){var i=e.getAttribute("x"),n=e.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var r=e.getAttribute("dx")||0,a=e.getAttribute("dy")||0,o=new zi;return of(t,o),uf(e,o,this._defs),this._textX+=r,this._textY+=a,o},path:function(e,t){var i=e.getAttribute("d")||"",n=qp(i);return of(t,n),uf(e,n,this._defs),n}},af={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||0,10),i=parseInt(e.getAttribute("y1")||0,10),n=parseInt(e.getAttribute("x2")||10,10),r=parseInt(e.getAttribute("y2")||0,10),a=new Qs(t,i,n,r);return function(e,t){var i=e.firstChild;for(;i;){if(1===i.nodeType){var n=i.getAttribute("offset");n=n.indexOf("%")>0?parseInt(n,10)/100:n?parseFloat(n):0;var r=i.getAttribute("stop-color")||"#000000";t.addColorStop(n,r)}i=i.nextSibling}}(e,a),a},radialgradient:function(e){}};function of(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),Qp(t.__inheritedStyle,e.__inheritedStyle))}function sf(e){for(var t=Jp(e).split(ef),i=[],n=0;n<t.length;n+=2){var r=parseFloat(t[n]),a=parseFloat(t[n+1]);i.push([r,a])}return i}var lf={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function uf(e,t,i,n){var r=t.__inheritedStyle||{},a="text"===t.type;if(1===e.nodeType&&(function(e,t){var i=e.getAttribute("transform");if(i){i=i.replace(/,/g," ");var n=null,r=[];i.replace(df,(function(e,t,i){r.push(t,i)}));for(var a=r.length-1;a>0;a-=2){var o=r[a],s=r[a-1];switch(n=n||ft.create(),s){case"translate":o=Jp(o).split(ef),ft.translate(n,n,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=Jp(o).split(ef),ft.scale(n,n,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=Jp(o).split(ef),ft.rotate(n,n,parseFloat(o[0]));break;case"skew":o=Jp(o).split(ef),console.warn("Skew transform is not supported yet");break;case"matrix":o=Jp(o).split(ef);n[0]=parseFloat(o[0]),n[1]=parseFloat(o[1]),n[2]=parseFloat(o[2]),n[3]=parseFloat(o[3]),n[4]=parseFloat(o[4]),n[5]=parseFloat(o[5])}}t.setLocalTransform(n)}}(e,t),Kp(r,function(e){var t=e.getAttribute("style"),i={};if(!t)return i;var n,r={};pf.lastIndex=0;for(;null!=(n=pf.exec(t));)r[n[1]]=n[2];for(var a in lf)lf.hasOwnProperty(a)&&null!=r[a]&&(i[lf[a]]=r[a]);return i}(e)),!n))for(var o in lf)if(lf.hasOwnProperty(o)){var s=e.getAttribute(o);null!=s&&(r[lf[o]]=s)}var l=a?"textFill":"fill",u=a?"textStroke":"stroke";t.style=t.style||new an;var c=t.style;null!=r.fill&&c.set(l,hf(r.fill,i)),null!=r.stroke&&c.set(u,hf(r.stroke,i)),$p(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(e){var t="lineWidth"===e&&a?"textStrokeWidth":e;null!=r[e]&&c.set(t,parseFloat(r[e]))})),r.textBaseline&&"auto"!==r.textBaseline||(r.textBaseline="alphabetic"),"alphabetic"===r.textBaseline&&(r.textBaseline="bottom"),"start"===r.textAlign&&(r.textAlign="left"),"end"===r.textAlign&&(r.textAlign="right"),$p(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(e){null!=r[e]&&c.set(e,r[e])})),r.lineDash&&(t.style.lineDash=Jp(r.lineDash).split(ef)),c[u]&&"none"!==c[u]&&(t[u]=!0),t.__inheritedStyle=r}var cf=/url\(\s*#(.*?)\)/;function hf(e,t){var i=t&&e&&e.match(cf);return i?t[Jp(i[1])]:e}var df=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var pf=/([^\s:;]+)\s*:\s*([^:;]+)/g;function ff(e,t,i){var n=t/e.width,r=i/e.height,a=Math.min(n,r);return{scale:[a,a],position:[-(e.x+e.width/2)*a+t/2,-(e.y+e.height/2)*a+i/2]}}var gf={parseXML:tf,makeViewBoxTransform:ff,parseSVG:function(e,t){return(new nf).parse(e,t)}},mf=we.createHashMap,vf=we.isString,yf=we.isArray,xf=we.each,_f=gf.parseXML,bf=mf(),wf={registerMap:function(e,t,i){var n;return yf(t)?n=t:t.svg?n=[{type:"svg",source:t.svg,specialAreas:t.specialAreas}]:(t.geoJson&&!t.features&&(i=t.specialAreas,t=t.geoJson),n=[{type:"geoJSON",source:t,specialAreas:i}]),xf(n,(function(e){var t=e.type;"geoJson"===t&&(t=e.type="geoJSON"),(0,Sf[t])(e)})),bf.set(e,n)},retrieveMap:function(e){return bf.get(e)}},Sf={geoJSON:function(e){var t=e.source;e.geoJSON=vf(t)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(t):new Function("return ("+t+");")():t},svg:function(e){e.svgXML=_f(e.source)}},Mf=wf;function If(e){return e}function Tf(e,t,i,n,r){this._old=e,this._new=t,this._oldKeyGetter=i||If,this._newKeyGetter=n||If,this.context=r}function Af(e,t,i,n,r){for(var a=0;a<e.length;a++){var o="_ec_"+r[n](e[a],a),s=t[o];null==s?(i.push(o),t[o]=a):(s.length||(t[o]=s=[s]),s.push(a))}}Tf.prototype={constructor:Tf,add:function(e){return this._add=e,this},update:function(e){return this._update=e,this},remove:function(e){return this._remove=e,this},execute:function(){var e=this._old,t=this._new,i={},n=[],r=[];for(Af(e,{},n,"_oldKeyGetter",this),Af(t,i,r,"_newKeyGetter",this),a=0;a<e.length;a++){if(null!=(s=i[o=n[a]]))(u=s.length)?(1===u&&(i[o]=null),s=s.shift()):i[o]=null,this._update&&this._update(s,a);else this._remove&&this._remove(a)}for(var a=0;a<r.length;a++){var o=r[a];if(i.hasOwnProperty(o)){var s;if(null==(s=i[o]))continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var Cf=Tf,Df=we.each,Lf=we.createHashMap,Pf=Lf(["tooltip","label","itemName","itemId","seriesName"]);function kf(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var Of={OTHER_DIMENSIONS:Pf,summarizeDimensions:function(e){var t={},i=t.encode={},n=Lf(),r=[],a=[],o=t.userOutput={dimensionNames:e.dimensions.slice(),encode:{}};Df(e.dimensions,(function(t){var s,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var c=l.coordDimIndex;kf(i,u)[c]=t,l.isExtraCoord||(n.set(u,1),"ordinal"!==(s=l.type)&&"time"!==s&&(r[0]=t),kf(o.encode,u)[c]=l.index),l.defaultTooltip&&a.push(t)}Pf.each((function(e,t){var n=kf(i,t),r=l.otherDims[t];null!=r&&!1!==r&&(n[r]=l.name)}))}));var s=[],l={};n.each((function(e,t){var n=i[t];l[t]=n[0],s=s.concat(n)})),t.dataDimsOnCoord=s,t.encodeFirstDimNotExtra=l;var u=i.label;u&&u.length&&(r=u.slice());var c=i.tooltip;return c&&c.length?a=c.slice():a.length||(a=r.slice()),i.defaultedLabel=r,i.defaultedTooltip=a,t},getDimensionTypeByAxis:function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}};var Rf=function(e){null!=e&&we.extend(this,e),this.otherDims={}},Nf=ad.defaultDimValueGetters,Ef=ad.DefaultDataProvider,zf=Of.summarizeDimensions,Bf=we.isObject,Vf={float:"undefined"==typeof Float64Array?Array:Float64Array,int:"undefined"==typeof Int32Array?Array:Int32Array,ordinal:Array,number:Array,time:Array},Ff="undefined"==typeof Uint32Array?Array:Uint32Array,Gf="undefined"==typeof Int32Array?Array:Int32Array,Hf="undefined"==typeof Uint16Array?Array:Uint16Array;function Wf(e){return e._rawCount>65535?Ff:Hf}var jf=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],Uf=["_extent","_approximateExtent","_rawExtent"];function Zf(e,t){we.each(jf.concat(t.__wrappedMethods||[]),(function(i){t.hasOwnProperty(i)&&(e[i]=t[i])})),e.__wrappedMethods=t.__wrappedMethods,we.each(Uf,(function(i){e[i]=we.clone(t[i])})),e._calculationInfo=we.extend(t._calculationInfo)}var Yf=function(e,t){e=e||["x","y"];for(var i={},n=[],r={},a=0;a<e.length;a++){var o=e[a];we.isString(o)?o=new Rf({name:o}):o instanceof Rf||(o=new Rf(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},n.push(s),i[s]=o,o.index=a,o.createInvertedIndices&&(r[s]=[])}this.dimensions=n,this._dimensionInfos=i,this.hostModel=t,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=zf(this),this._invertedIndicesMap=r,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},qf=Yf.prototype;function Xf(e,t,i,n,r){var a=Vf[t.type],o=n-1,s=t.name,l=e[s][o];if(l&&l.length<i){for(var u=new a(Math.min(r-o*i,i)),c=0;c<l.length;c++)u[c]=l[c];e[s][o]=u}for(var h=n*i;h<r;h+=i)e[s].push(new a(Math.min(r-h,i)))}function Kf(e){var t=e._invertedIndicesMap;we.each(t,(function(i,n){var r=e._dimensionInfos[n].ordinalMeta;if(r){i=t[n]=new Gf(r.categories.length);for(var a=0;a<i.length;a++)i[a]=-1;for(a=0;a<e._count;a++)i[e.get(n,a)]=a}}))}function Qf(e,t,i){var n;if(null!=t){var r=e._chunkSize,a=Math.floor(i/r),o=i%r,s=e.dimensions[t],l=e._storage[s][a];if(l){n=l[o];var u=e._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(n=u.categories[n])}}return n}function Jf(e){return e}function $f(e){return e<this._count&&e>=0?this._indices[e]:-1}function eg(e,t){var i=e._idList[t];return null==i&&(i=Qf(e,e._idDimIdx,t)),null==i&&(i="e\0\0"+t),i}function tg(e){return we.isArray(e)||(e=[e]),e}function ig(e,t){var i=e.dimensions,n=new Yf(we.map(i,e.getDimensionInfo,e),e.hostModel);Zf(n,e);for(var r=n._storage={},a=e._storage,o=0;o<i.length;o++){var s=i[o];a[s]&&(we.indexOf(t,s)>=0?(r[s]=ng(a[s]),n._rawExtent[s]=rg(),n._extent[s]=null):r[s]=a[s])}return n}function ng(e){for(var t,i,n=new Array(e.length),r=0;r<e.length;r++)n[r]=(t=e[r],i=void 0,(i=t.constructor)===Array?t.slice():new i(t));return n}function rg(){return[1/0,-1/0]}qf.type="list",qf.hasItemOption=!0,qf.getDimension=function(e){return"number"!=typeof e&&(isNaN(e)||this._dimensionInfos.hasOwnProperty(e))||(e=this.dimensions[e]),e},qf.getDimensionInfo=function(e){return this._dimensionInfos[this.getDimension(e)]},qf.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},qf.mapDimension=function(e,t){var i=this._dimensionsSummary;if(null==t)return i.encodeFirstDimNotExtra[e];var n=i.encode[e];return!0===t?(n||[]).slice():n&&n[t]},qf.initData=function(e,t,i){(hc.isInstance(e)||we.isArrayLike(e))&&(e=new Ef(e,this.dimensions.length)),this._rawData=e,this._storage={},this._indices=null,this._nameList=t||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=Nf[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Nf.arrayRows,this._rawExtent={},this._initDataFromProvider(0,e.count()),e.pure&&(this.hasItemOption=!1)},qf.getProvider=function(){return this._rawData},qf.appendData=function(e){var t=this._rawData,i=this.count();t.appendData(e);var n=t.count();t.persistent||(n+=i),this._initDataFromProvider(i,n)},qf.appendValues=function(e,t){for(var i=this._chunkSize,n=this._storage,r=this.dimensions,a=r.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t?t.length:0),u=this._chunkCount,c=0;c<a;c++){o[v=r[c]]||(o[v]=rg()),n[v]||(n[v]=[]),Xf(n,this._dimensionInfos[v],i,u,l),this._chunkCount=n[v].length}for(var h=new Array(a),d=s;d<l;d++){for(var p=d-s,f=Math.floor(d/i),g=d%i,m=0;m<a;m++){var v=r[m],y=this._dimValueGetterArrayRows(e[p]||h,v,p,m);n[v][f][g]=y;var x=o[v];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}t&&(this._nameList[d]=t[p])}this._rawCount=this._count=l,this._extent={},Kf(this)},qf._initDataFromProvider=function(e,t){if(!(e>=t)){for(var i,n=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,u=this._nameList,c=this._idList,h=this._rawExtent,d=this._nameRepeatCount={},p=this._chunkCount,f=0;f<s;f++){h[b=o[f]]||(h[b]=rg());var g=l[b];0===g.otherDims.itemName&&(i=this._nameDimIdx=f),0===g.otherDims.itemId&&(this._idDimIdx=f),a[b]||(a[b]=[]),Xf(a,g,n,p,t),this._chunkCount=a[b].length}for(var m=new Array(s),v=e;v<t;v++){m=r.getItem(v,m);for(var y=Math.floor(v/n),x=v%n,_=0;_<s;_++){var b,w=a[b=o[_]][y],S=this._dimValueGetter(m,b,v,_);w[x]=S;var M=h[b];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!r.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var T=o[i],A=a[T][y];if(A){I=A[x];var C=l[T].ordinalMeta;C&&C.categories.length&&(I=C.categories[I])}}var D=null==m?null:m.id;null==D&&null!=I&&(d[I]=d[I]||0,D=I,d[I]>0&&(D+="__ec__"+d[I]),d[I]++),null!=D&&(c[v]=D)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent={},Kf(this)}},qf.count=function(){return this._count},qf.getIndices=function(){var e=this._indices;if(e){var t=e.constructor,i=this._count;if(t===Array){r=new t(i);for(var n=0;n<i;n++)r[n]=e[n]}else r=new t(e.buffer,0,i)}else{var r=new(t=Wf(this))(this.count());for(n=0;n<r.length;n++)r[n]=n}return r},qf.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var i=this._storage;if(!i[e])return NaN;t=this.getRawIndex(t);var n=Math.floor(t/this._chunkSize),r=t%this._chunkSize;return i[e][n][r]},qf.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var i=this._storage[e];if(!i)return NaN;var n=Math.floor(t/this._chunkSize),r=t%this._chunkSize;return i[n][r]},qf._getFast=function(e,t){var i=Math.floor(t/this._chunkSize),n=t%this._chunkSize;return this._storage[e][i][n]},qf.getValues=function(e,t){var i=[];we.isArray(e)||(t=e,e=this.dimensions);for(var n=0,r=e.length;n<r;n++)i.push(this.get(e[n],t));return i},qf.hasValue=function(e){for(var t=this._dimensionsSummary.dataDimsOnCoord,i=0,n=t.length;i<n;i++)if(isNaN(this.get(t[i],e)))return!1;return!0},qf.getDataExtent=function(e){e=this.getDimension(e);var t=this._storage[e],i=rg();if(!t)return i;var n,r=this.count();if(!this._indices)return this._rawExtent[e].slice();if(n=this._extent[e])return n.slice();for(var a=(n=i)[0],o=n[1],s=0;s<r;s++){var l=this._getFast(e,this.getRawIndex(s));l<a&&(a=l),l>o&&(o=l)}return n=[a,o],this._extent[e]=n,n},qf.getApproximateExtent=function(e){return e=this.getDimension(e),this._approximateExtent[e]||this.getDataExtent(e)},qf.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},qf.getCalculationInfo=function(e){return this._calculationInfo[e]},qf.setCalculationInfo=function(e,t){Bf(e)?we.extend(this._calculationInfo,e):this._calculationInfo[e]=t},qf.getSum=function(e){var t=0;if(this._storage[e])for(var i=0,n=this.count();i<n;i++){var r=this.get(e,i);isNaN(r)||(t+=r)}return t},qf.getMedian=function(e){var t=[];this.each(e,(function(e,i){isNaN(e)||t.push(e)}));var i=[].concat(t).sort((function(e,t){return e-t})),n=this.count();return 0===n?0:n%2==1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},qf.rawIndexOf=function(e,t){var i=(e&&this._invertedIndicesMap[e])[t];return null==i||isNaN(i)?-1:i},qf.indexOfName=function(e){for(var t=0,i=this.count();t<i;t++)if(this.getName(t)===e)return t;return-1},qf.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,i=t[e];if(null!=i&&i<this._count&&i===e)return e;for(var n=0,r=this._count-1;n<=r;){var a=(n+r)/2|0;if(t[a]<e)n=a+1;else{if(!(t[a]>e))return a;r=a-1}}return-1},qf.indicesOfNearest=function(e,t,i){var n=[];if(!this._storage[e])return n;null==i&&(i=1/0);for(var r=1/0,a=-1,o=0,s=0,l=this.count();s<l;s++){var u=t-this.get(e,s),c=Math.abs(u);c<=i&&((c<r||c===r&&u>=0&&a<0)&&(r=c,a=u,o=0),u===a&&(n[o++]=s))}return n.length=o,n},qf.getRawIndex=Jf,qf.getRawDataItem=function(e){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(e));for(var t=[],i=0;i<this.dimensions.length;i++){var n=this.dimensions[i];t.push(this.get(n,e))}return t},qf.getName=function(e){var t=this.getRawIndex(e);return this._nameList[t]||Qf(this,this._nameDimIdx,t)||""},qf.getId=function(e){return eg(this,this.getRawIndex(e))},qf.each=function(e,t,i,n){if(this._count){"function"==typeof e&&(n=i,i=t,t=e,e=[]),i=i||n||this;for(var r=(e=we.map(tg(e),this.getDimension,this)).length,a=0;a<this.count();a++)switch(r){case 0:t.call(i,a);break;case 1:t.call(i,this.get(e[0],a),a);break;case 2:t.call(i,this.get(e[0],a),this.get(e[1],a),a);break;default:for(var o=0,s=[];o<r;o++)s[o]=this.get(e[o],a);s[o]=a,t.apply(i,s)}}},qf.filterSelf=function(e,t,i,n){if(this._count){"function"==typeof e&&(n=i,i=t,t=e,e=[]),i=i||n||this,e=we.map(tg(e),this.getDimension,this);for(var r=this.count(),a=new(Wf(this))(r),o=[],s=e.length,l=0,u=e[0],c=0;c<r;c++){var h,d=this.getRawIndex(c);if(0===s)h=t.call(i,c);else if(1===s){var p=this._getFast(u,d);h=t.call(i,p,c)}else{for(var f=0;f<s;f++)o[f]=this._getFast(u,d);o[f]=c,h=t.apply(i,o)}h&&(a[l++]=d)}return l<r&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?$f:Jf,this}},qf.selectRange=function(e){if(this._count){var t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i);var n=t.length;if(n){var r=this.count(),a=new(Wf(this))(r),o=0,s=t[0],l=e[s][0],u=e[s][1],c=!1;if(!this._indices){var h=0;if(1===n){for(var d=this._storage[t[0]],p=0;p<this._chunkCount;p++)for(var f=d[p],g=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;m<g;m++){((b=f[m])>=l&&b<=u||isNaN(b))&&(a[o++]=h),h++}c=!0}else if(2===n){d=this._storage[s];var v=this._storage[t[1]],y=e[t[1]][0],x=e[t[1]][1];for(p=0;p<this._chunkCount;p++){f=d[p];var _=v[p];for(g=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;m<g;m++){var b=f[m],w=_[m];(b>=l&&b<=u||isNaN(b))&&(w>=y&&w<=x||isNaN(w))&&(a[o++]=h),h++}}c=!0}}if(!c)if(1===n)for(m=0;m<r;m++){var S=this.getRawIndex(m);((b=this._getFast(s,S))>=l&&b<=u||isNaN(b))&&(a[o++]=S)}else for(m=0;m<r;m++){var M=!0;for(S=this.getRawIndex(m),p=0;p<n;p++){var I=t[p];((b=this._getFast(i,S))<e[I][0]||b>e[I][1])&&(M=!1)}M&&(a[o++]=this.getRawIndex(m))}return o<r&&(this._indices=a),this._count=o,this._extent={},this.getRawIndex=this._indices?$f:Jf,this}}},qf.mapArray=function(e,t,i,n){"function"==typeof e&&(n=i,i=t,t=e,e=[]),i=i||n||this;var r=[];return this.each(e,(function(){r.push(t&&t.apply(this,arguments))}),i),r},qf.map=function(e,t,i,n){i=i||n||this;var r=ig(this,e=we.map(tg(e),this.getDimension,this));r._indices=this._indices,r.getRawIndex=r._indices?$f:Jf;for(var a=r._storage,o=[],s=this._chunkSize,l=e.length,u=this.count(),c=[],h=r._rawExtent,d=0;d<u;d++){for(var p=0;p<l;p++)c[p]=this.get(e[p],d);c[l]=d;var f=t&&t.apply(i,c);if(null!=f){"object"!=typeof f&&(o[0]=f,f=o);for(var g=this.getRawIndex(d),m=Math.floor(g/s),v=g%s,y=0;y<f.length;y++){var x=e[y],_=f[y],b=h[x],w=a[x];w&&(w[m][v]=_),_<b[0]&&(b[0]=_),_>b[1]&&(b[1]=_)}}}return r},qf.downSample=function(e,t,i,n){for(var r=ig(this,[e]),a=r._storage,o=[],s=Math.floor(1/t),l=a[e],u=this.count(),c=this._chunkSize,h=r._rawExtent[e],d=new(Wf(this))(u),p=0,f=0;f<u;f+=s){s>u-f&&(s=u-f,o.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(f+g),v=Math.floor(m/c),y=m%c;o[g]=l[v][y]}var x=i(o),_=this.getRawIndex(Math.min(f+n(o,x)||0,u-1)),b=_%c;l[Math.floor(_/c)][b]=x,x<h[0]&&(h[0]=x),x>h[1]&&(h[1]=x),d[p++]=_}return r._count=p,r._indices=d,r.getRawIndex=$f,r},qf.getItemModel=function(e){var t=this.hostModel;return new vu(this.getRawDataItem(e),t,t&&t.ecModel)},qf.diff=function(e){var t=this;return new Cf(e?e.getIndices():[],this.getIndices(),(function(t){return eg(e,t)}),(function(e){return eg(t,e)}))},qf.getVisual=function(e){var t=this._visual;return t&&t[e]},qf.setVisual=function(e,t){if(Bf(e))for(var i in e)e.hasOwnProperty(i)&&this.setVisual(i,e[i]);else this._visual=this._visual||{},this._visual[e]=t},qf.setLayout=function(e,t){if(Bf(e))for(var i in e)e.hasOwnProperty(i)&&this.setLayout(i,e[i]);else this._layout[e]=t},qf.getLayout=function(e){return this._layout[e]},qf.getItemLayout=function(e){return this._itemLayouts[e]},qf.setItemLayout=function(e,t,i){this._itemLayouts[e]=i?we.extend(this._itemLayouts[e]||{},t):t},qf.clearItemLayouts=function(){this._itemLayouts.length=0},qf.getItemVisual=function(e,t,i){var n=this._itemVisuals[e],r=n&&n[t];return null!=r||i?r:this.getVisual(t)},qf.setItemVisual=function(e,t,i){var n=this._itemVisuals[e]||{},r=this.hasItemVisual;if(this._itemVisuals[e]=n,Bf(t))for(var a in t)t.hasOwnProperty(a)&&(n[a]=t[a],r[a]=!0);else n[t]=i,r[t]=!0},qf.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var ag=function(e){e.seriesIndex=this.seriesIndex,e.dataIndex=this.dataIndex,e.dataType=this.dataType};qf.setItemGraphicEl=function(e,t){var i=this.hostModel;t&&(t.dataIndex=e,t.dataType=this.dataType,t.seriesIndex=i&&i.seriesIndex,"group"===t.type&&t.traverse(ag,t)),this._graphicEls[e]=t},qf.getItemGraphicEl=function(e){return this._graphicEls[e]},qf.eachItemGraphicEl=function(e,t){we.each(this._graphicEls,(function(i,n){i&&e&&e.call(t,i,n)}))},qf.cloneShallow=function(e){if(!e){var t=we.map(this.dimensions,this.getDimensionInfo,this);e=new Yf(t,this.hostModel)}if(e._storage=this._storage,Zf(e,this),this._indices){var i=this._indices.constructor;e._indices=new i(this._indices)}else e._indices=null;return e.getRawIndex=e._indices?$f:Jf,e},qf.wrapMethod=function(e,t){var i=this[e];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=i.apply(this,arguments);return t.apply(this,[e].concat(we.slice(arguments)))})},qf.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],qf.CHANGABLE_METHODS=["filterSelf","selectRange"];var og=Yf,sg=we.createHashMap,lg=we.each,ug=we.isString,cg=we.defaults,hg=we.extend,dg=we.isObject,pg=we.clone,fg=xa.normalizeToArray,gg=Ec.guessOrdinal,mg=Ec.BE_ORDINAL,vg=Of.OTHER_DIMENSIONS;function yg(e,t,i){if(i||null!=t.get(e)){for(var n=0;null!=t.get(e+n);)n++;e+=n}return t.set(e,!0),e}var xg=function(e,t,i){hc.isInstance(t)||(t=hc.seriesDataToSource(t)),i=i||{},e=(e||[]).slice();for(var n=(i.dimsDef||[]).slice(),r=sg(),a=sg(),o=[],s=function(e,t,i,n){var r=Math.max(e.dimensionsDetectCount||1,t.length,i.length,n||0);return lg(t,(function(e){var t=e.dimsDef;t&&(r=Math.max(r,t.length))})),r}(t,e,n,i.dimCount),l=0;l<s;l++){var u=n[l]=hg({},dg(n[l])?n[l]:{name:n[l]}),c=u.name,h=o[l]=new Rf;null!=c&&null==r.get(c)&&(h.name=h.displayName=c,r.set(c,l)),null!=u.type&&(h.type=u.type),null!=u.displayName&&(h.displayName=u.displayName)}var d=i.encodeDef;!d&&i.encodeDefaulter&&(d=i.encodeDefaulter(t,s)),(d=sg(d)).each((function(e,t){if(1===(e=fg(e).slice()).length&&!ug(e[0])&&e[0]<0)d.set(t,!1);else{var i=d.set(t,[]);lg(e,(function(e,n){ug(e)&&(e=r.get(e)),null!=e&&e<s&&(i[n]=e,f(o[e],t,n))}))}}));var p=0;function f(e,t,i){null!=vg.get(t)?e.otherDims[t]=i:(e.coordDim=t,e.coordDimIndex=i,a.set(t,!0))}lg(e,(function(e,t){var i,n,r;if(ug(e))i=e,e={};else{i=e.name;var a=e.ordinalMeta;e.ordinalMeta=null,(e=pg(e)).ordinalMeta=a,n=e.dimsDef,r=e.otherDims,e.name=e.coordDim=e.coordDimIndex=e.dimsDef=e.otherDims=null}if(!1!==(s=d.get(i))){var s;if(!(s=fg(s)).length)for(var l=0;l<(n&&n.length||1);l++){for(;p<o.length&&null!=o[p].coordDim;)p++;p<o.length&&s.push(p++)}lg(s,(function(t,a){var s=o[t];if(f(cg(s,e),i,a),null==s.name&&n){var l=n[a];!dg(l)&&(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}r&&cg(s.otherDims,r)}))}}));var g=i.generateCoord,m=i.generateCoordCount,v=null!=m;m=g?m||1:0;for(var y=g||"value",x=0;x<s;x++){null==(h=o[x]=o[x]||new Rf).coordDim&&(h.coordDim=yg(y,a,v),h.coordDimIndex=0,(!g||m<=0)&&(h.isExtraCoord=!0),m--),null==h.name&&(h.name=yg(h.coordDim,r)),null!=h.type||gg(t,x,h.name)!==mg.Must&&(!h.isExtraCoord||null==h.otherDims.itemName&&null==h.otherDims.seriesName)||(h.type="ordinal")}return o};var _g=function(e,t){return xg((t=t||{}).coordDimensions||[],e,{dimsDef:t.dimensionsDefine||e.dimensionsDefine,encodeDef:t.encodeDefine||e.encodeDefine,dimCount:t.dimensionsCount,encodeDefaulter:t.encodeDefaulter,generateCoord:t.generateCoord,generateCoordCount:t.generateCoordCount})},bg=we.createHashMap,wg=we.each;function Sg(e){this.coordSysName=e,this.coordSysDims=[],this.axisMap=bg(),this.categoryAxisMap=bg(),this.firstCategoryDimIndex=null}var Mg={cartesian2d:function(e,t,i,n){var r=e.getReferringComponents("xAxis")[0],a=e.getReferringComponents("yAxis")[0];t.coordSysDims=["x","y"],i.set("x",r),i.set("y",a),Ig(r)&&(n.set("x",r),t.firstCategoryDimIndex=0),Ig(a)&&(n.set("y",a),t.firstCategoryDimIndex,t.firstCategoryDimIndex=1)},singleAxis:function(e,t,i,n){var r=e.getReferringComponents("singleAxis")[0];t.coordSysDims=["single"],i.set("single",r),Ig(r)&&(n.set("single",r),t.firstCategoryDimIndex=0)},polar:function(e,t,i,n){var r=e.getReferringComponents("polar")[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",o),Ig(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),Ig(o)&&(n.set("angle",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,i,n){t.coordSysDims=["lng","lat"]},parallel:function(e,t,i,n){var r=e.ecModel,a=r.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();wg(a.parallelAxisIndex,(function(e,a){var s=r.getComponent("parallelAxis",e),l=o[a];i.set(l,s),Ig(s)&&null==t.firstCategoryDimIndex&&(n.set(l,s),t.firstCategoryDimIndex=a)}))}};function Ig(e){return"category"===e.get("type")}var Tg={getCoordSysInfoBySeries:function(e){var t=e.get("coordinateSystem"),i=new Sg(t),n=Mg[t];if(n)return n(e,i,i.axisMap,i.categoryAxisMap),i}},Ag=we.each,Cg=we.isString;function Dg(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}var Lg={enableDataStack:function(e,t,i){var n,r,a,o,s=(i=i||{}).byIndex,l=i.stackedCoordDimension,u=!(!e||!e.get("stack"));if(Ag(t,(function(e,i){Cg(e)&&(t[i]=e={name:e}),u&&!e.isExtraCoord&&(s||n||!e.ordinalMeta||(n=e),r||"ordinal"===e.type||"time"===e.type||l&&l!==e.coordDim||(r=e))})),!r||s||n||(s=!0),r){a="__\0ecstackresult",o="__\0ecstackedover",n&&(n.createInvertedIndices=!0);var c=r.coordDim,h=r.type,d=0;Ag(t,(function(e){e.coordDim===c&&d++})),t.push({name:a,coordDim:c,coordDimIndex:d,type:h,isExtraCoord:!0,isCalculationCoord:!0}),d++,t.push({name:o,coordDim:o,coordDimIndex:d,type:h,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:a}},isDimensionStacked:Dg,getStackedDimension:function(e,t){return Dg(e,t)?e.getCalculationInfo("stackResultDimension"):t}},Pg=tc.SOURCE_FORMAT_ORIGINAL,kg=Of.getDimensionTypeByAxis,Og=xa.getDataItemValue,Rg=Tg.getCoordSysInfoBySeries,Ng=Lg.enableDataStack,Eg=Ec.makeSeriesEncodeForAxisCoordSys;var zg=function(e,t,i){i=i||{},hc.isInstance(e)||(e=hc.seriesDataToSource(e));var n,r=t.get("coordinateSystem"),a=oh.get(r),o=Rg(t);o&&(n=we.map(o.coordSysDims,(function(e){var t={name:e},i=o.axisMap.get(e);if(i){var n=i.get("type");t.type=kg(n)}return t}))),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=_g(e,{coordDimensions:n,generateCoord:i.generateCoord,encodeDefaulter:i.useEncodeDefaulter?we.curry(Eg,n,t):null});o&&we.each(u,(function(e,t){var i=e.coordDim,n=o.categoryAxisMap.get(i);n&&(null==s&&(s=t),e.ordinalMeta=n.getOrdinalMeta()),null!=e.otherDims.itemName&&(l=!0)})),l||null==s||(u[s].otherDims.itemName=0);var c=Ng(t,u),h=new og(u,t);h.setCalculationInfo(c);var d=null!=s&&function(e){if(e.sourceFormat===Pg){var t=function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[]);return null!=t&&!we.isArray(Og(t))}}(e)?function(e,t,i,n){return n===s?i:this.defaultDimValueGetter(e,t,i,n)}:null;return h.hasItemOption=!1,h.initData(e,null,d),h};function Bg(e){this._setting=e||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}Bg.prototype.parse=function(e){return e},Bg.prototype.getSetting=function(e){return this._setting[e]},Bg.prototype.contain=function(e){var t=this._extent;return e>=t[0]&&e<=t[1]},Bg.prototype.normalize=function(e){var t=this._extent;return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},Bg.prototype.scale=function(e){var t=this._extent;return e*(t[1]-t[0])+t[0]},Bg.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},Bg.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},Bg.prototype.getExtent=function(){return this._extent.slice()},Bg.prototype.setExtent=function(e,t){var i=this._extent;isNaN(e)||(i[0]=e),isNaN(t)||(i[1]=t)},Bg.prototype.isBlank=function(){return this._isBlank},Bg.prototype.setBlank=function(e){this._isBlank=e},Bg.prototype.getLabel=null,Ia.enableClassExtend(Bg),Ia.enableClassManagement(Bg,{registerWhenExtend:!0});var Vg=Bg,Fg=we.createHashMap,Gg=we.isObject,Hg=we.map;function Wg(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this._map}Wg.createByAxisModel=function(e){var t=e.option,i=t.data,n=i&&Hg(i,Zg);return new Wg({categories:n,needCollect:!n,deduplication:!1!==t.dedplication})};var jg=Wg.prototype;function Ug(e){return e._map||(e._map=Fg(e.categories))}function Zg(e){return Gg(e)&&null!=e.value?e.value:e+""}jg.getOrdinal=function(e){return Ug(this).get(e)},jg.parseAndCollect=function(e){var t,i=this._needCollect;if("string"!=typeof e&&!i)return e;if(i&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var n=Ug(this);return null==(t=n.get(e))&&(i?(t=this.categories.length,this.categories[t]=e,n.set(e,t)):t=NaN),t};var Yg=Wg,qg=Vg.prototype,Xg=Vg.extend({type:"ordinal",init:function(e,t){e&&!we.isArray(e)||(e=new Yg({categories:e})),this._ordinalMeta=e,this._extent=t||[0,e.categories.length-1]},parse:function(e){return"string"==typeof e?this._ordinalMeta.getOrdinal(e):Math.round(e)},contain:function(e){return e=this.parse(e),qg.contain.call(this,e)&&null!=this._ordinalMeta.categories[e]},normalize:function(e){return qg.normalize.call(this,this.parse(e))},scale:function(e){return Math.round(qg.scale.call(this,e))},getTicks:function(){for(var e=[],t=this._extent,i=t[0];i<=t[1];)e.push(i),i++;return e},getLabel:function(e){if(!this.isBlank())return this._ordinalMeta.categories[e]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(e,t){this.unionExtent(e.getApproximateExtent(t))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:we.noop,niceExtent:we.noop});Xg.create=function(){return new Xg};var Kg=Xg,Qg=Su.round;function Jg(e){return Su.getPrecisionSafe(e)+2}function $g(e,t,i){e[t]=Math.max(Math.min(e[t],i[1]),i[0])}function em(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),$g(e,0,t),$g(e,1,t),e[0]>e[1]&&(e[0]=e[1])}var tm={intervalScaleNiceTicks:function(e,t,i,n){var r={},a=e[1]-e[0],o=r.interval=Su.nice(a/t,!0);null!=i&&o<i&&(o=r.interval=i),null!=n&&o>n&&(o=r.interval=n);var s=r.intervalPrecision=Jg(o);return em(r.niceTickExtent=[Qg(Math.ceil(e[0]/o)*o,s),Qg(Math.floor(e[1]/o)*o,s)],e),r},getIntervalPrecision:Jg,fixExtent:em},im=Su.round,nm=Vg.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(e,t){var i=this._extent;isNaN(e)||(i[0]=parseFloat(e)),isNaN(t)||(i[1]=parseFloat(t))},unionExtent:function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),nm.prototype.setExtent.call(this,t[0],t[1])},getInterval:function(){return this._interval},setInterval:function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=tm.getIntervalPrecision(e)},getTicks:function(e){var t=this._interval,i=this._extent,n=this._niceExtent,r=this._intervalPrecision,a=[];if(!t)return a;i[0]<n[0]&&(e?a.push(im(n[0]-t,r)):a.push(i[0]));for(var o=n[0];o<=n[1]&&(a.push(o),(o=im(o+t,r))!==a[a.length-1]);)if(a.length>1e4)return[];var s=a.length?a[a.length-1]:n[1];return i[1]>s&&(e?a.push(im(s+t,r)):a.push(i[1])),a},getMinorTicks:function(e){for(var t=this.getTicks(!0),i=[],n=this.getExtent(),r=1;r<t.length;r++){for(var a=t[r],o=t[r-1],s=0,l=[],u=(a-o)/e;s<e-1;){var c=Su.round(o+(s+1)*u);c>n[0]&&c<n[1]&&l.push(c),s++}i.push(l)}return i},getLabel:function(e,t){if(null==e)return"";var i=t&&t.precision;return null==i?i=Su.getPrecisionSafe(e)||0:"auto"===i&&(i=this._intervalPrecision),e=im(e,i,!0),Pu.addCommas(e)},niceTicks:function(e,t,i){e=e||5;var n=this._extent,r=n[1]-n[0];if(isFinite(r)){r<0&&(r=-r,n.reverse());var a=tm.intervalScaleNiceTicks(n,e,t,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var i=t[0];e.fixMax||(t[1]+=i/2),t[0]-=i/2}else t[1]=1;var n=t[1]-t[0];isFinite(n)||(t[0]=0,t[1]=1),this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var r=this._interval;e.fixMin||(t[0]=im(Math.floor(t[0]/r)*r)),e.fixMax||(t[1]=im(Math.ceil(t[1]/r)*r))}});nm.create=function(){return new nm};var rm=nm,am=Su.parsePercent,om=Lg.isDimensionStacked,sm="undefined"!=typeof Float32Array?Float32Array:Array;function lm(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function um(e){return e.dim+e.index}function cm(e,t){var i=[];return t.eachSeriesByType(e,(function(e){gm(e)&&!mm(e)&&i.push(e)})),i}function hm(e){var t=function(e){var t={};we.each(e,(function(e){var i=e.coordinateSystem.getBaseAxis();if("time"===i.type||"value"===i.type)for(var n=e.getData(),r=i.dim+"_"+i.index,a=n.mapDimension(i.dim),o=0,s=n.count();o<s;++o){var l=n.get(a,o);t[r]?t[r].push(l):t[r]=[l]}}));var i=[];for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];if(r){r.sort((function(e,t){return e-t}));for(var a=null,o=1;o<r.length;++o){var s=r[o]-r[o-1];s>0&&(a=null===a?s:Math.min(a,s))}i[n]=a}}return i}(e),i=[];return we.each(e,(function(e){var n,r=e.coordinateSystem.getBaseAxis(),a=r.getExtent();if("category"===r.type)n=r.getBandWidth();else if("value"===r.type||"time"===r.type){var o=r.dim+"_"+r.index,s=t[o],l=Math.abs(a[1]-a[0]),u=r.scale.getExtent(),c=Math.abs(u[1]-u[0]);n=s?l/c*s:l}else{var h=e.getData();n=Math.abs(a[1]-a[0])/h.count()}var d=am(e.get("barWidth"),n),p=am(e.get("barMaxWidth"),n),f=am(e.get("barMinWidth")||1,n),g=e.get("barGap"),m=e.get("barCategoryGap");i.push({bandWidth:n,barWidth:d,barMaxWidth:p,barMinWidth:f,barGap:g,barCategoryGap:m,axisKey:um(r),stackId:lm(e)})})),dm(i)}function dm(e){var t={};we.each(e,(function(e,i){var n=e.axisKey,r=e.bandWidth,a=t[n]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=a.stacks;t[n]=a;var s=e.stackId;o[s]||a.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var u=e.barMaxWidth;u&&(o[s].maxWidth=u);var c=e.barMinWidth;c&&(o[s].minWidth=c);var h=e.barGap;null!=h&&(a.gap=h);var d=e.barCategoryGap;null!=d&&(a.categoryGap=d)}));var i={};return we.each(t,(function(e,t){i[t]={};var n=e.stacks,r=e.bandWidth,a=am(e.categoryGap,r),o=am(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-a)/(l+(l-1)*o);u=Math.max(u,0),we.each(n,(function(e){var t=e.maxWidth,i=e.minWidth;if(e.width){n=e.width;t&&(n=Math.min(n,t)),i&&(n=Math.max(n,i)),e.width=n,s-=n+o*n,l--}else{var n=u;t&&t<n&&(n=Math.min(t,s)),i&&i>n&&(n=i),n!==u&&(e.width=n,s-=n+o*n,l--)}})),u=(s-a)/(l+(l-1)*o),u=Math.max(u,0);var c,h=0;we.each(n,(function(e,t){e.width||(e.width=u),c=e,h+=e.width*(1+o)})),c&&(h-=c.width*o);var d=-h/2;we.each(n,(function(e,n){i[t][n]=i[t][n]||{bandWidth:r,offset:d,width:e.width},d+=e.width*(1+o)}))})),i}function pm(e,t,i){if(e&&t){var n=e[um(t)];return null!=n&&null!=i&&(n=n[lm(i)]),n}}var fm={seriesType:"bar",plan:Hd(),reset:function(e){if(gm(e)&&mm(e)){var t=e.getData(),i=e.coordinateSystem,n=i.grid.getRect(),r=i.getBaseAxis(),a=i.getOtherAxis(r),o=t.mapDimension(a.dim),s=t.mapDimension(r.dim),l=a.isHorizontal(),u=l?0:1,c=pm(hm([e]),r,e).width;return c>.5||(c=.5),{progress:function(e,t){var h,d=e.count,p=new sm(2*d),f=new sm(2*d),g=new sm(d),m=[],v=[],y=0,x=0;for(;null!=(h=e.next());)v[u]=t.get(o,h),v[1-u]=t.get(s,h),m=i.dataToPoint(v,null,m),f[y]=l?n.x+n.width:m[0],p[y++]=m[0],f[y]=l?m[1]:n.y+n.height,p[y++]=m[1],g[x++]=h;t.setLayout({largePoints:p,largeDataIndices:g,largeBackgroundPoints:f,barWidth:c,valueAxisStart:vm(r,a),backgroundStart:l?n.x:n.y,valueAxisHorizontal:l})}}}}};function gm(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function mm(e){return e.pipelineContext&&e.pipelineContext.large}function vm(e,t,i){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}var ym={getLayoutOnAxis:function(e){var t=[],i=e.axis;if("category"===i.type){for(var n=i.getBandWidth(),r=0;r<e.count;r++)t.push(we.defaults({bandWidth:n,axisKey:"axis0",stackId:"__ec_stack_"+r},e));var a=dm(t),o=[];for(r=0;r<e.count;r++){var s=a.axis0["__ec_stack_"+r];s.offsetCenter=s.offset+s.width/2,o.push(s)}return o}},prepareLayoutBarSeries:cm,makeColumnLayout:hm,retrieveColumnLayout:pm,layout:function(e,t){var i=cm(e,t),n=hm(i),r={};we.each(i,(function(e){var t=e.getData(),i=e.coordinateSystem,a=i.getBaseAxis(),o=lm(e),s=n[um(a)][o],l=s.offset,u=s.width,c=i.getOtherAxis(a),h=e.get("barMinHeight")||0;r[o]=r[o]||[],t.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=t.mapDimension(c.dim),p=t.mapDimension(a.dim),f=om(t,d),g=c.isHorizontal(),m=vm(a,c),v=0,y=t.count();v<y;v++){var x,_,b,w,S,M=t.get(d,v),I=t.get(p,v),T=M>=0?"p":"n",A=m;if(f&&(r[o][I]||(r[o][I]={p:m,n:m}),A=r[o][I][T]),g)x=A,_=(S=i.dataToPoint([M,I]))[1]+l,b=S[0]-m,w=u,Math.abs(b)<h&&(b=(b<0?-1:1)*h),isNaN(b)||f&&(r[o][I][T]+=b);else x=(S=i.dataToPoint([I,M]))[0]+l,_=A,b=u,w=S[1]-m,Math.abs(w)<h&&(w=(w<=0?-1:1)*h),isNaN(w)||f&&(r[o][I][T]+=w);t.setItemLayout(v,{x:x,y:_,width:b,height:w})}}),this)},largeLayout:fm},xm=rm.prototype,_m=Math.ceil,bm=Math.floor,wm=864e5,Sm=rm.extend({type:"time",getLabel:function(e){var t=this._stepLvl,i=new Date(e);return Pu.formatTime(t[0],i,this.getSetting("useUTC"))},niceExtent:function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=wm,t[1]+=wm),t[1]===-1/0&&t[0]===1/0){var i=new Date;t[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),t[0]=t[1]-wm}this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var n=this._interval;e.fixMin||(t[0]=Su.round(bm(t[0]/n)*n)),e.fixMax||(t[1]=Su.round(_m(t[1]/n)*n))},niceTicks:function(e,t,i){e=e||10;var n=this._extent,r=n[1]-n[0],a=r/e;null!=t&&a<t&&(a=t),null!=i&&a>i&&(a=i);var o=Mm.length,s=function(e,t,i,n){for(;i<n;){var r=i+n>>>1;e[r][1]<t?i=r+1:n=r}return i}(Mm,a,0,o),l=Mm[Math.min(s,o-1)],u=l[1];if("year"===l[0]){var c=r/u;u*=Su.nice(c/e,!0)}var h=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,d=[Math.round(_m((n[0]-h)/u)*u+h),Math.round(bm((n[1]-h)/u)*u+h)];tm.fixExtent(d,n),this._stepLvl=l,this._interval=u,this._niceExtent=d},parse:function(e){return+Su.parseDate(e)}});we.each(["contain","normalize"],(function(e){Sm.prototype[e]=function(t){return xm[e].call(this,this.parse(t))}}));var Mm=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",wm],["MM-dd\nyyyy",2*wm],["MM-dd\nyyyy",3*wm],["MM-dd\nyyyy",4*wm],["MM-dd\nyyyy",5*wm],["MM-dd\nyyyy",6*wm],["week",7*wm],["MM-dd\nyyyy",10*wm],["week",14*wm],["week",21*wm],["month",31*wm],["week",42*wm],["month",62*wm],["week",70*wm],["quarter",95*wm],["month",31*wm*4],["month",31*wm*5],["half-year",380*wm/2],["month",31*wm*8],["month",31*wm*10],["year",380*wm]];Sm.create=function(e){return new Sm({useUTC:e.ecModel.get("useUTC")})};var Im=Vg.prototype,Tm=rm.prototype,Am=Su.getPrecisionSafe,Cm=Su.round,Dm=Math.floor,Lm=Math.ceil,Pm=Math.pow,km=Math.log,Om=Vg.extend({type:"log",base:10,$constructor:function(){Vg.apply(this,arguments),this._originalScale=new rm},getTicks:function(e){var t=this._originalScale,i=this._extent,n=t.getExtent();return we.map(Tm.getTicks.call(this,e),(function(e){var r=Su.round(Pm(this.base,e));return r=e===i[0]&&t.__fixMin?Rm(r,n[0]):r,r=e===i[1]&&t.__fixMax?Rm(r,n[1]):r}),this)},getMinorTicks:Tm.getMinorTicks,getLabel:Tm.getLabel,scale:function(e){return e=Im.scale.call(this,e),Pm(this.base,e)},setExtent:function(e,t){var i=this.base;e=km(e)/km(i),t=km(t)/km(i),Tm.setExtent.call(this,e,t)},getExtent:function(){var e=this.base,t=Im.getExtent.call(this);t[0]=Pm(e,t[0]),t[1]=Pm(e,t[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(t[0]=Rm(t[0],n[0])),i.__fixMax&&(t[1]=Rm(t[1],n[1])),t},unionExtent:function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=km(e[0])/km(t),e[1]=km(e[1])/km(t),Im.unionExtent.call(this,e)},unionExtentFromData:function(e,t){this.unionExtent(e.getApproximateExtent(t))},niceTicks:function(e){e=e||10;var t=this._extent,i=t[1]-t[0];if(!(i===1/0||i<=0)){var n=Su.quantity(i);for(e/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var r=[Su.round(Lm(t[0]/n)*n),Su.round(Dm(t[1]/n)*n)];this._interval=n,this._niceExtent=r}},niceExtent:function(e){Tm.niceExtent.call(this,e);var t=this._originalScale;t.__fixMin=e.fixMin,t.__fixMax=e.fixMax}});function Rm(e,t){return Cm(e,Am(t))}we.each(["contain","normalize"],(function(e){Om.prototype[e]=function(t){return t=km(t)/km(this.base),Im[e].call(this,t)}})),Om.create=function(){return new Om};var Nm=Om,Em=ym.prepareLayoutBarSeries,zm=ym.makeColumnLayout,Bm=ym.retrieveColumnLayout;function Vm(e,t){var i,n,r,a=e.type,o=t.getMin(),s=t.getMax(),l=e.getExtent();"ordinal"===a?i=t.getCategories().length:(n=t.get("boundaryGap"),we.isArray(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Su.parsePercent(n[0],1),n[1]=Su.parsePercent(n[1],1),r=l[1]-l[0]||Math.abs(l[0])),"dataMin"===o?o=l[0]:"function"==typeof o&&(o=o({min:l[0],max:l[1]})),"dataMax"===s?s=l[1]:"function"==typeof s&&(s=s({min:l[0],max:l[1]}));var u=null!=o,c=null!=s;null==o&&(o="ordinal"===a?i?0:NaN:l[0]-n[0]*r),null==s&&(s="ordinal"===a?i?i-1:NaN:l[1]+n[1]*r),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN),e.setBlank(we.eqNaN(o)||we.eqNaN(s)||"ordinal"===a&&!e.getOrdinalMeta().categories.length),t.getNeedCrossZero()&&(o>0&&s>0&&!u&&(o=0),o<0&&s<0&&!c&&(s=0));var h=t.ecModel;if(h&&"time"===a){var d,p=Em("bar",h);if(we.each(p,(function(e){d|=e.getBaseAxis()===t.axis})),d){var f=zm(p),g=function(e,t,i,n){var r=i.axis.getExtent(),a=r[1]-r[0],o=Bm(n,i.axis);if(void 0===o)return{min:e,max:t};var s=1/0;we.each(o,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;we.each(o,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,h=c/(1-(s+l)/a)-c;return{min:e-=h*(s/u),max:t+=h*(l/u)}}(o,s,t,f);o=g.min,s=g.max}}return{extent:[o,s],fixMin:u,fixMax:c}}function Fm(e){var t,i=e.getLabelModel().get("formatter"),n="category"===e.type?e.scale.getExtent()[0]:null;return"string"==typeof i?(t=i,i=function(i){return i=e.scale.getLabel(i),t.replace("{value}",null!=i?i:"")}):"function"==typeof i?function(t,r){return null!=n&&(r=t-n),i(Gm(e,t),r)}:function(t){return e.scale.getLabel(t)}}function Gm(e,t){return"category"===e.type?e.scale.getLabel(t):t}function Hm(e,t){var i=t*Math.PI/180,n=e.plain(),r=n.width,a=n.height,o=r*Math.cos(i)+a*Math.sin(i),s=r*Math.sin(i)+a*Math.cos(i);return new Ni(n.x,n.y,o,s)}function Wm(e){var t=e.get("interval");return null==t?"auto":t}var jm={getScaleExtent:Vm,niceScaleExtent:function(e,t){var i=Vm(e,t),n=i.extent,r=t.get("splitNumber");"log"===e.type&&(e.base=t.get("logBase"));var a=e.type;e.setExtent(n[0],n[1]),e.niceExtent({splitNumber:r,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:"interval"===a||"time"===a?t.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?t.get("maxInterval"):null});var o=t.get("interval");null!=o&&e.setInterval&&e.setInterval(o)},createScaleByModel:function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new Kg(e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),[1/0,-1/0]);case"value":return new rm;default:return(Vg.getClass(t)||rm).create(e)}},ifAxisCrossZero:function(e){var t=e.scale.getExtent(),i=t[0],n=t[1];return!(i>0&&n>0||i<0&&n<0)},makeLabelFormatter:Fm,getAxisRawValue:Gm,estimateLabelUnionRect:function(e){var t=e.model,i=e.scale;if(t.get("axisLabel.show")&&!i.isBlank()){var n,r,a="category"===e.type,o=i.getExtent();r=a?i.count():(n=i.getTicks()).length;var s,l=e.getLabelModel(),u=Fm(e),c=1;r>40&&(c=Math.ceil(r/40));for(var h=0;h<r;h+=c){var d=u(n?n[h]:o[0]+h),p=Hm(l.getTextRect(d),l.get("rotate")||0);s?s.union(p):s=p}return s}},getOptionCategoryInterval:Wm,shouldShowAllLabels:function(e){return"category"===e.type&&0===Wm(e.getLabelModel())}},Um={getMin:function(e){var t=this.option,i=e||null==t.rangeStart?t.min:t.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!we.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(e){var t=this.option,i=e||null==t.rangeEnd?t.max:t.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!we.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var e=this.option;return null==e.rangeStart&&null==e.rangeEnd&&!e.scale},getCoordSysModel:we.noop,setRange:function(e,t){this.option.rangeStart=e,this.option.rangeEnd=t},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Zm=Fn.calculateTextPosition,Ym=ru.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var i=t.cx,n=t.cy,r=t.width/2,a=t.height/2;e.moveTo(i,n-a),e.lineTo(i+r,n+a),e.lineTo(i-r,n+a),e.closePath()}}),qm=ru.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var i=t.cx,n=t.cy,r=t.width/2,a=t.height/2;e.moveTo(i,n-a),e.lineTo(i+r,n),e.lineTo(i,n+a),e.lineTo(i-r,n),e.closePath()}}),Xm=ru.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var i=t.x,n=t.y,r=t.width/5*3,a=Math.max(r,t.height),o=r/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,h=Math.sin(u),d=Math.cos(u),p=.6*o,f=.7*o;e.moveTo(i-c,l+s),e.arc(i,l,o,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(i+c-h*p,l+s+d*p,i,n-f,i,n),e.bezierCurveTo(i,n-f,i-c+h*p,l+s+d*p,i-c,l+s),e.closePath()}}),Km=ru.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var i=t.height,n=t.width,r=t.x,a=t.y,o=n/3*2;e.moveTo(r,a),e.lineTo(r+o,a+i),e.lineTo(r,a+i/4*3),e.lineTo(r-o,a+i),e.lineTo(r,a),e.closePath()}}),Qm={line:ru.Line,rect:ru.Rect,roundRect:ru.Rect,square:ru.Rect,circle:ru.Circle,diamond:qm,pin:Xm,arrow:Km,triangle:Ym},Jm={line:function(e,t,i,n,r){r.x1=e,r.y1=t+n/2,r.x2=e+i,r.y2=t+n/2},rect:function(e,t,i,n,r){r.x=e,r.y=t,r.width=i,r.height=n},roundRect:function(e,t,i,n,r){r.x=e,r.y=t,r.width=i,r.height=n,r.r=Math.min(i,n)/4},square:function(e,t,i,n,r){var a=Math.min(i,n);r.x=e,r.y=t,r.width=a,r.height=a},circle:function(e,t,i,n,r){r.cx=e+i/2,r.cy=t+n/2,r.r=Math.min(i,n)/2},diamond:function(e,t,i,n,r){r.cx=e+i/2,r.cy=t+n/2,r.width=i,r.height=n},pin:function(e,t,i,n,r){r.x=e+i/2,r.y=t+n/2,r.width=i,r.height=n},arrow:function(e,t,i,n,r){r.x=e+i/2,r.y=t+n/2,r.width=i,r.height=n},triangle:function(e,t,i,n,r){r.cx=e+i/2,r.cy=t+n/2,r.width=i,r.height=n}},$m={};we.each(Qm,(function(e,t){$m[t]=new e}));var ev=ru.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,i){var n=Zm(e,t,i),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===t.textPosition&&(n.y=i.y+.4*i.height),n},buildPath:function(e,t,i){var n=t.symbolType;if("none"!==n){var r=$m[n];r||(r=$m[n="rect"]),Jm[n](t.x,t.y,t.width,t.height,r.shape),r.buildPath(e,r.shape,i)}}});function tv(e,t){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=e:this.__isEmptyBrush?(i.stroke=e,i.fill=t||"#fff"):(i.fill&&(i.fill=e),i.stroke&&(i.stroke=e)),this.dirty(!1)}}var iv={createSymbol:function(e,t,i,n,r,a,o){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?ru.makeImage(e.slice(8),new Ni(t,i,n,r),o?"center":"cover"):0===e.indexOf("path://")?ru.makePath(e.slice(7),{},new Ni(t,i,n,r),o?"center":"cover"):new ev({shape:{symbolType:e,x:t,y:i,width:n,height:r}})).__isEmptyBrush=l,s.setColor=tv,s.setColor(a),s}},nv=Hu.getLayoutRect,rv=Lg.enableDataStack,av=Lg.isDimensionStacked,ov=Lg.getStackedDimension;var sv={getLayoutRect:nv,completeDimensions:xg,createDimensions:_g,createSymbol:iv.createSymbol,createList:function(e){return zg(e.getSource(),e)},dataStack:{isDimensionStacked:av,enableDataStack:rv,getStackedDimension:ov},createScale:function(e,t){var i=t;vu.isInstance(t)||(i=new vu(t),we.mixin(i,Um));var n=jm.createScaleByModel(i);return n.setExtent(e[0],e[1]),jm.niceScaleExtent(n,i),n},mixinAxisModelCommonMethods:function(e){we.mixin(e,Um)}};function lv(e,t){return Math.abs(e-t)<1e-8}var uv={contain:function(e,t,i){var n=0,r=e[0];if(!r)return!1;for(var a=1;a<e.length;a++){var o=e[a];n+=To(r[0],r[1],o[0],o[1],t,i),r=o}var s=e[0];return lv(r[0],s[0])&&lv(r[1],s[1])||(n+=To(r[0],r[1],s[0],s[1],t,i)),0!==n}};function cv(e,t,i){if(this.name=e,this.geometries=t,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}cv.prototype={constructor:cv,properties:null,getBoundingRect:function(){var e=this._rect;if(e)return e;for(var t=Number.MAX_VALUE,i=[t,t],n=[-t,-t],r=[],a=[],o=this.geometries,s=0;s<o.length;s++)if("polygon"===o[s].type){var l=o[s].exterior;eo.fromPoints(l,r,a),Ce.min(i,i,r),Ce.max(n,n,a)}return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new Ni(i[0],i[1],n[0]-i[0],n[1]-i[1])},contain:function(e){var t=this.getBoundingRect(),i=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var n=0,r=i.length;n<r;n++)if("polygon"===i[n].type){var a=i[n].exterior,o=i[n].interiors;if(uv.contain(a,e[0],e[1])){for(var s=0;s<(o?o.length:0);s++)if(uv.contain(o[s]))continue e;return!0}}return!1},transformTo:function(e,t,i,n){var r=this.getBoundingRect(),a=r.width/r.height;i?n||(n=i/a):i=a*n;for(var o=new Ni(e,t,i,n),s=r.calculateTransform(o),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var c=l[u].exterior,h=l[u].interiors,d=0;d<c.length;d++)Ce.applyTransform(c[d],c[d],s);for(var p=0;p<(h?h.length:0);p++)for(d=0;d<h[p].length;d++)Ce.applyTransform(h[p][d],h[p][d],s)}(r=this._rect).copy(o),this.center=[r.x+r.width/2,r.y+r.height/2]},cloneShallow:function(e){null==e&&(e=this.name);var t=new cv(e,this.geometries,this.center);return t._rect=this._rect,t.transformTo=null,t}};var hv=cv;function dv(e,t,i){for(var n=[],r=t[0],a=t[1],o=0;o<e.length;o+=2){var s=e.charCodeAt(o)-64,l=e.charCodeAt(o+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),r=s+=r,a=l+=a,n.push([s/i,l/i])}return n}var pv=function(e,t){return function(e){if(!e.UTF8Encoding)return e;var t=e.UTF8Scale;null==t&&(t=1024);for(var i=e.features,n=0;n<i.length;n++)for(var r=i[n].geometry,a=r.coordinates,o=r.encodeOffsets,s=0;s<a.length;s++){var l=a[s];if("Polygon"===r.type)a[s]=dv(l,o[s],t);else if("MultiPolygon"===r.type)for(var u=0;u<l.length;u++){var c=l[u];l[u]=dv(c,o[s][u],t)}}e.UTF8Encoding=!1}(e),we.map(we.filter(e.features,(function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0})),(function(e){var i=e.properties,n=e.geometry,r=n.coordinates,a=[];"Polygon"===n.type&&a.push({type:"polygon",exterior:r[0],interiors:r.slice(1)}),"MultiPolygon"===n.type&&we.each(r,(function(e){e[0]&&a.push({type:"polygon",exterior:e[0],interiors:e.slice(1)})}));var o=new hv(i[t||"name"],a,i.cp);return o.properties=i,o}))},fv=xa.makeInner,gv=jm.makeLabelFormatter,mv=jm.getOptionCategoryInterval,vv=jm.shouldShowAllLabels,yv=fv();function xv(e,t){var i,n,r=_v(e,"labels"),a=mv(t),o=bv(r,a);return o||(we.isFunction(a)?i=Mv(e,a):(n="auto"===a?function(e){var t=yv(e).autoInterval;return null!=t?t:yv(e).autoInterval=e.calculateCategoryInterval()}(e):a,i=Sv(e,n)),wv(r,a,{labels:i,labelCategoryInterval:n}))}function _v(e,t){return yv(e)[t]||(yv(e)[t]=[])}function bv(e,t){for(var i=0;i<e.length;i++)if(e[i].key===t)return e[i].value}function wv(e,t,i){return e.push({key:t,value:i}),i}function Sv(e,t,i){var n=gv(e),r=e.scale,a=r.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],c=r.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=vv(e),d=o.get("showMinLabel")||h,p=o.get("showMaxLabel")||h;d&&u!==a[0]&&g(a[0]);for(var f=u;f<=a[1];f+=l)g(f);function g(e){s.push(i?e:{formattedLabel:n(e),rawLabel:r.getLabel(e),tickValue:e})}return p&&f-l!==a[1]&&g(a[1]),s}function Mv(e,t,i){var n=e.scale,r=gv(e),a=[];return we.each(n.getTicks(),(function(e){var o=n.getLabel(e);t(e,o)&&a.push(i?e:{formattedLabel:r(e),rawLabel:o,tickValue:e})})),a}var Iv={createAxisLabels:function(e){return"category"===e.type?function(e){var t=e.getLabelModel(),i=xv(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(e):function(e){var t=e.scale.getTicks(),i=gv(e);return{labels:we.map(t,(function(t,n){return{formattedLabel:i(t,n),rawLabel:e.scale.getLabel(t),tickValue:t}}))}}(e)},createAxisTicks:function(e,t){return"category"===e.type?function(e,t){var i,n,r=_v(e,"ticks"),a=mv(t),o=bv(r,a);if(o)return o;t.get("show")&&!e.scale.isBlank()||(i=[]);if(we.isFunction(a))i=Mv(e,a,!0);else if("auto"===a){var s=xv(e,e.getLabelModel());n=s.labelCategoryInterval,i=we.map(s.labels,(function(e){return e.tickValue}))}else i=Sv(e,n=a,!0);return wv(r,a,{ticks:i,tickCategoryInterval:n})}(e,t):{ticks:e.scale.getTicks()}},calculateCategoryInterval:function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),i=gv(e),n=(t.axisRotate-t.labelRotate)/180*Math.PI,r=e.scale,a=r.getExtent(),o=r.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(n)),h=Math.abs(u*Math.sin(n)),d=0,p=0;l<=a[1];l+=s){var f,g,m=Fn.getBoundingRect(i(l),t.font,"center","top");f=1.3*m.width,g=1.3*m.height,d=Math.max(d,f,7),p=Math.max(p,g,7)}var v=d/c,y=p/h;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=yv(e.model),b=e.getExtent(),w=_.lastAutoInterval,S=_.lastTickCount;return null!=w&&null!=S&&Math.abs(w-x)<=1&&Math.abs(S-o)<=1&&w>x&&_.axisExtend0===b[0]&&_.axisExtend1===b[1]?x=w:(_.lastTickCount=o,_.lastAutoInterval=x,_.axisExtend0=b[0],_.axisExtend1=b[1]),x}},Tv=we.each,Av=we.map,Cv=Su.linearMap,Dv=Su.getPixelPrecision,Lv=Su.round,Pv=Iv.createAxisTicks,kv=Iv.createAxisLabels,Ov=Iv.calculateCategoryInterval,Rv=[0,1],Nv=function(e,t,i){this.dim=e,this.scale=t,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};function Ev(e,t){var i=(e[1]-e[0])/t/2;e[0]+=i,e[1]-=i}Nv.prototype={constructor:Nv,contain:function(e){var t=this._extent,i=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return e>=i&&e<=n},containData:function(e){return this.scale.contain(e)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(e){return Dv(e||this.scale.getExtent(),this._extent)},setExtent:function(e,t){var i=this._extent;i[0]=e,i[1]=t},dataToCoord:function(e,t){var i=this._extent,n=this.scale;return e=n.normalize(e),this.onBand&&"ordinal"===n.type&&Ev(i=i.slice(),n.count()),Cv(e,Rv,i,t)},coordToData:function(e,t){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&Ev(i=i.slice(),n.count());var r=Cv(e,i,Rv,t);return this.scale.scale(r)},pointToData:function(e,t){},getTicksCoords:function(e){var t=(e=e||{}).tickModel||this.getTickModel(),i=Pv(this,t).ticks,n=Av(i,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this);return function(e,t,i,n){var r=t.length;if(!e.onBand||i||!r)return;var a,o,s=e.getExtent();if(1===r)t[0].coord=s[0],a=t[1]={coord:s[0]};else{var l=t[r-1].tickValue-t[0].tickValue,u=(t[r-1].coord-t[0].coord)/l;Tv(t,(function(e){e.coord-=u/2}));var c=e.scale.getExtent();o=1+c[1]-t[r-1].tickValue,a={coord:t[r-1].coord+u*o},t.push(a)}var h=s[0]>s[1];d(t[0].coord,s[0])&&(n?t[0].coord=s[0]:t.shift());n&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]});d(s[1],a.coord)&&(n?a.coord=s[1]:t.pop());n&&d(a.coord,s[1])&&t.push({coord:s[1]});function d(e,t){return e=Lv(e),t=Lv(t),h?e>t:e<t}}(this,n,t.get("alignWithLabel"),e.clamp),n},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");e>0&&e<100||(e=5);var t=this.scale.getMinorTicks(e);return Av(t,(function(e){return Av(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},getViewLabels:function(){return kv(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var e=this._extent,t=this.scale.getExtent(),i=t[1]-t[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return Ov(this)}};var zv=Nv,Bv=ha,Vv=ft,Fv=Ce,Gv=Kt,Hv=Su,Wv=Pu,jv=rp.throttle,Uv=sv,Zv=pv,Yv=og,qv=vu,Xv=zv,Kv=J,Qv=pv,Jv={};we.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(e){Jv[e]=we[e]}));var $v={};we.each(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],(function(e){$v[e]=ru[e]}));var ey={zrender:Bv,matrix:Vv,vector:Fv,color:Gv,number:Hv,format:Wv,throttle:jv,helper:Uv,parseGeoJSON:Zv,List:Yv,Model:qv,Axis:Xv,env:Kv,parseGeoJson:Qv,util:Jv,graphic:$v},ty=X((function(e,t){var i=rp.throttle,n=we.assert,r=we.each,a=we.isFunction,o=we.isObject,s=qu.parseClassType,l={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:3500,COMPONENT:4e3,BRUSH:5e3}},u="__flagInMainProcess",c=/^[a-zA-Z0-9_]+$/;function h(e,t){return function(i,n,r){t||!this._disposed?(i=i&&i.toLowerCase(),Ne.prototype[e].call(this,i,n,r)):this.id}}function d(){Ne.call(this)}function p(e,t,n){n=n||{},"string"==typeof t&&(t=z[t]),this.id,this.group,this._dom=e;var r=this._zr=ha.init(e,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=i(we.bind(r.flush,r),17),(t=we.clone(t))&&Rh(t,!0),this._theme=t,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new oh;var a,o,s=this._api=(o=(a=this)._coordSysMgr,we.extend(new nh(a),{getCoordinateSystems:we.bind(o.getCoordinateSystems,o),getComponentByElement:function(e){for(;e;){var t=e.__ecComponentInfo;if(null!=t)return a._model.getComponent(t.mainType,t.index);e=e.parent}}}));function l(e,t){return e.__prio-t.__prio}Wi(E,l),Wi(O,l),this._scheduler=new Vp(this,s,O,E),Ne.call(this,this._ecEventProcessor=new L),this._messageCenter=new d,this._initEvents(),this.resize=we.bind(this.resize,this),this._pendingActions=[],r.animation.on("frame",this._onframe,this),function(e,t){e.on("rendered",(function(){t.trigger("rendered"),!e.animation.isFinished()||t.__optionUpdated||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))}(r,this),we.setAsPrimitive(this)}d.prototype.on=h("on",!0),d.prototype.off=h("off",!0),d.prototype.one=h("one",!0),we.mixin(d,Ne);var f=p.prototype;function g(e,t,i){if(this._disposed)this.id;else{var n,r=this._model,a=this._coordSysMgr.getCoordinateSystems();t=xa.parseFinder(r,t);for(var o=0;o<a.length;o++){var s=a[o];if(s[e]&&null!=(n=s[e](r,t,i)))return n}}}f._onframe=function(){if(!this._disposed){var e=this._scheduler;if(this.__optionUpdated){var t=this.__optionUpdated.silent;this[u]=!0,v(this),m.update.call(this),this[u]=!1,this.__optionUpdated=!1,b.call(this,t),w.call(this,t)}else if(e.unfinished){var i=1,n=this._model,r=this._api;e.unfinished=!1;do{var a=+new Date;e.performSeriesTasks(n),e.performDataProcessorTasks(n),x(this,n),e.performVisualTasks(n),T(this,this._model,r,"remain"),i-=+new Date-a}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},f.getDom=function(){return this._dom},f.getZr=function(){return this._zr},f.setOption=function(e,t,i){if(this._disposed)this.id;else{var n;if(o(t)&&(i=t.lazyUpdate,n=t.silent,t=t.notMerge),this[u]=!0,!this._model||t){var r=new gh(this._api),a=this._theme,s=this._model=new th;s.scheduler=this._scheduler,s.init(null,null,a,r)}this._model.setOption(e,R),i?(this.__optionUpdated={silent:n},this[u]=!1):(v(this),m.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this[u]=!1,b.call(this,n),w.call(this,n))}},f.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},f.getModel=function(){return this._model},f.getOption=function(){return this._model&&this._model.getOption()},f.getWidth=function(){return this._zr.getWidth()},f.getHeight=function(){return this._zr.getHeight()},f.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},f.getRenderedCanvas=function(e){if(J.canvasSupported)return(e=e||{}).pixelRatio=e.pixelRatio||1,e.backgroundColor=e.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(e)},f.getSvgDataURL=function(){if(J.svgSupported){var e=this._zr,t=e.storage.getDisplayList();return we.each(t,(function(e){e.stopAnimation(!0)})),e.painter.toDataURL()}},f.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,i=this._model,n=[],a=this;r(t,(function(e){i.eachComponent({mainType:e},(function(e){var t=a._componentsMap[e.__viewId];t.group.ignore||(n.push(t),t.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return r(n,(function(e){e.group.ignore=!1})),o}this.id},f.getConnectedDataURL=function(e){if(this._disposed)this.id;else if(J.canvasSupported){var t="svg"===e.type,i=this.group,n=Math.min,a=Math.max;if(F[i]){var o=1/0,s=1/0,l=-1/0,u=-1/0,c=[],h=e&&e.pixelRatio||1;we.each(V,(function(r,h){if(r.group===i){var d=t?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(we.clone(e)),p=r.getDom().getBoundingClientRect();o=n(p.left,o),s=n(p.top,s),l=a(p.right,l),u=a(p.bottom,u),c.push({dom:d,left:p.left,top:p.top})}}));var d=(l*=h)-(o*=h),p=(u*=h)-(s*=h),f=we.createCanvas(),g=ha.init(f,{renderer:t?"svg":"canvas"});if(g.resize({width:d,height:p}),t){var m="";return r(c,(function(e){var t=e.left-o,i=e.top-s;m+='<g transform="translate('+t+","+i+')">'+e.dom+"</g>"})),g.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new ru.Rect({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),r(c,(function(e){var t=new ru.Image({style:{x:e.left*h-o,y:e.top*h-s,image:e.dom}});g.add(t)})),g.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}},f.convertToPixel=we.curry(g,"convertToPixel"),f.convertFromPixel=we.curry(g,"convertFromPixel"),f.containPixel=function(e,t){if(!this._disposed){var i,n=this._model;return e=xa.parseFinder(n,e),we.each(e,(function(e,n){n.indexOf("Models")>=0&&we.each(e,(function(e){var r=e.coordinateSystem;if(r&&r.containPoint)i|=!!r.containPoint(t);else if("seriesModels"===n){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(i|=a.containPoint(t,e))}}),this)}),this),!!i}this.id},f.getVisual=function(e,t){var i=this._model,n=(e=xa.parseFinder(i,e,{defaultMainType:"series"})).seriesModel.getData(),r=e.hasOwnProperty("dataIndexInside")?e.dataIndexInside:e.hasOwnProperty("dataIndex")?n.indexOfRawIndex(e.dataIndex):null;return null!=r?n.getItemVisual(r,t):n.getVisual(t)},f.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},f.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]};var m={prepareAndUpdate:function(e){v(this),m.update.call(this,e)},update:function(e){var t=this._model,i=this._api,n=this._zr,r=this._coordSysMgr,a=this._scheduler;if(t){a.restoreData(t,e),a.performSeriesTasks(t),r.create(t,i),a.performDataProcessorTasks(t,e),x(this,t),r.update(t,i),M(t),a.performVisualTasks(t,e),I(this,t,i,e);var o=t.get("backgroundColor")||"transparent";if(J.canvasSupported)n.setBackgroundColor(o);else{var s=Kt.parse(o);o=Kt.stringify(s,"rgb"),0===s[3]&&(o="transparent")}A(t,i)}},updateTransform:function(e){var t=this._model,i=this,n=this._api;if(t){var r=[];t.eachComponent((function(a,o){var s=i.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,t,n,e);l&&l.update&&r.push(s)}else r.push(s)}));var a=we.createHashMap();t.eachSeries((function(r){var o=i._chartsMap[r.__viewId];if(o.updateTransform){var s=o.updateTransform(r,t,n,e);s&&s.update&&a.set(r.uid,1)}else a.set(r.uid,1)})),M(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0,dirtyMap:a}),T(i,t,n,e,a),A(t,this._api)}},updateView:function(e){var t=this._model;t&&(ep.markUpdateMethod(e,"updateView"),M(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0}),I(this,this._model,this._api,e),A(t,this._api))},updateVisual:function(e){m.update.call(this,e)},updateLayout:function(e){m.update.call(this,e)}};function v(e){var t=e._model,i=e._scheduler;i.restorePipelines(t),i.prepareStageTasks(),S(e,"component",t,i),S(e,"chart",t,i),i.plan()}function y(e,t,i,n,a){var o=e._model;if(n){var s={};s[n+"Id"]=i[n+"Id"],s[n+"Index"]=i[n+"Index"],s[n+"Name"]=i[n+"Name"];var l={mainType:n,query:s};a&&(l.subType=a);var u=i.excludeSeriesId;null!=u&&(u=we.createHashMap(xa.normalizeToArray(u))),o&&o.eachComponent(l,(function(t){u&&null!=u.get(t.id)||c(e["series"===n?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else r(e._componentsViews.concat(e._chartsViews),c);function c(n){n&&n.__alive&&n[t]&&n[t](n.__model,o,e._api,i)}}function x(e,t){var i=e._chartsMap,n=e._scheduler;t.eachSeries((function(e){n.updateStreamModes(e,i[e.__viewId])}))}function _(e,t){var i=e.type,n=e.escapeConnect,a=P[i],o=a.actionInfo,l=(o.update||"update").split(":"),c=l.pop();l=null!=l[0]&&s(l[0]),this[u]=!0;var h=[e],d=!1;e.batch&&(d=!0,h=we.map(e.batch,(function(t){return(t=we.defaults(we.extend({},t),e)).batch=null,t})));var p,f=[],g="highlight"===i||"downplay"===i;r(h,(function(e){(p=(p=a.action(e,this._model,this._api))||we.extend({},e)).type=o.event||p.type,f.push(p),g?y(this,c,e,"series"):l&&y(this,c,e,l.main,l.sub)}),this),"none"===c||g||l||(this.__optionUpdated?(v(this),m.update.call(this,e),this.__optionUpdated=!1):m[c].call(this,e)),p=d?{type:o.event||i,escapeConnect:n,batch:f}:f[0],this[u]=!1,!t&&this._messageCenter.trigger(p.type,p)}function b(e){for(var t=this._pendingActions;t.length;){var i=t.shift();_.call(this,i,e)}}function w(e){!e&&this.trigger("updated")}function S(e,t,i,n){for(var r="component"===t,a=r?e._componentsViews:e._chartsViews,o=r?e._componentsMap:e._chartsMap,l=e._zr,u=e._api,c=0;c<a.length;c++)a[c].__alive=!1;function h(e){var t="_ec_"+e.id+"_"+e.type,c=o[t];if(!c){var h=s(e.type);(c=new(r?Fd.getClass(h.main,h.sub):ep.getClass(h.sub))).init(i,u),o[t]=c,a.push(c),l.add(c.group)}e.__viewId=c.__id=t,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!r&&n.prepareView(c,e,i,u)}r?i.eachComponent((function(e,t){"series"!==e&&h(t)})):i.eachSeries(h);for(c=0;c<a.length;){var d=a[c];d.__alive?c++:(!r&&d.renderTask.dispose(),l.remove(d.group),d.dispose(i,u),a.splice(c,1),delete o[d.__id],d.__id=d.group.__ecComponentInfo=null)}}function M(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function I(e,t,i,n){!function(e,t,i,n,a){r(a||e._componentsViews,(function(e){var r=e.__model;e.render(r,t,i,n),D(r,e)}))}(e,t,i,n),r(e._chartsViews,(function(e){e.__alive=!1})),T(e,t,i,n),r(e._chartsViews,(function(e){e.__alive||e.remove(t,i)}))}function T(e,t,i,n,r){var a,o=e._scheduler;t.eachSeries((function(t){var i=e._chartsMap[t.__viewId];i.__alive=!0;var s=i.renderTask;o.updatePayload(s,n),r&&r.get(t.uid)&&s.dirty(),a|=s.perform(o.getPerformArgs(s)),i.group.silent=!!t.get("silent"),D(t,i),function(e,t){var i=e.get("blendMode")||null;t.group.traverse((function(e){e.isGroup||e.style.blend!==i&&e.setStyle("blend",i),e.eachPendingDisplayable&&e.eachPendingDisplayable((function(e){e.setStyle("blend",i)}))}))}(t,i)})),o.unfinished|=a,function(e,t){var i=e._zr.storage,n=0;i.traverse((function(e){n++})),n>t.get("hoverLayerThreshold")&&!J.node&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var i=e._chartsMap[t.__viewId];i.__alive&&i.group.traverse((function(e){e.useHoverLayer=!0}))}}))}(e,t),up(e._zr.dom,t)}function A(e,t){r(N,(function(i){i(e,t)}))}f.resize=function(e){if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var i=t.resetOption("media"),n=e&&e.silent;this[u]=!0,i&&v(this),m.update.call(this),this[u]=!1,b.call(this,n),w.call(this,n)}}},f.showLoading=function(e,t){if(this._disposed)this.id;else if(o(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),B[e]){var i=B[e](this._api,t),n=this._zr;this._loadingFX=i,n.add(i)}},f.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},f.makeActionFromEvent=function(e){var t=we.extend({},e);return t.type=k[e.type],t},f.dispatchAction=function(e,t){this._disposed?this.id:(o(t)||(t={silent:!!t}),P[e.type]&&this._model&&(this[u]?this._pendingActions.push(e):(_.call(this,e,t.silent),t.flush?this._zr.flush(!0):!1!==t.flush&&J.browser.weChat&&this._throttledZrFlush(),b.call(this,t.silent),w.call(this,t.silent))))},f.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0}},f.on=h("on",!1),f.off=h("off",!1),f.one=h("one",!1);var C=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function D(e,t){var i=e.get("z"),n=e.get("zlevel");t.group.traverse((function(e){"group"!==e.type&&(null!=i&&(e.z=i),null!=n&&(e.zlevel=n))}))}function L(){this.eventInfo}f._initEvents=function(){r(C,(function(e){var t=function(t){var i,n=this.getModel(),r=t.target;if("globalout"===e)i={};else if(r&&null!=r.dataIndex){var a=r.dataModel||n.getSeriesByIndex(r.seriesIndex);i=a&&a.getDataParams(r.dataIndex,r.dataType,r)||{}}else r&&r.eventData&&(i=we.extend({},r.eventData));if(i){var o=i.componentType,s=i.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",s=i.seriesIndex);var l=o&&null!=s&&n.getComponent(o,s),u=l&&this["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];i.event=t,i.type=e,this._ecEventProcessor.eventInfo={targetEl:r,packedEvent:i,model:l,view:u},this.trigger(e,i)}};t.zrEventfulCallAtLast=!0,this._zr.on(e,t,this)}),this),r(k,(function(e,t){this._messageCenter.on(t,(function(e){this.trigger(t,e)}),this)}),this)},f.isDisposed=function(){return this._disposed},f.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},f.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,xa.setAttribute(this.getDom(),W,"");var e=this._api,t=this._model;r(this._componentsViews,(function(i){i.dispose(t,e)})),r(this._chartsViews,(function(i){i.dispose(t,e)})),this._zr.dispose(),delete V[this.id]}},we.mixin(p,Ne),L.prototype={constructor:L,normalizeQuery:function(e){var t={},i={},n={};if(we.isString(e)){var r=s(e);t.mainType=r.main||null,t.subType=r.sub||null}else{var a=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};we.each(e,(function(e,r){for(var s=!1,l=0;l<a.length;l++){var u=a[l],c=r.lastIndexOf(u);if(c>0&&c===r.length-u.length){var h=r.slice(0,c);"data"!==h&&(t.mainType=h,t[u.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(r)&&(i[r]=e,s=!0),s||(n[r]=e)}))}return{cptQuery:t,dataQuery:i,otherQuery:n}},filter:function(e,t,i){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,r,a));function c(e,t,i,n){return null==e[i]||t[n||i]===e[i]}},afterTrigger:function(){this.eventInfo=null}};var P={},k={},O=[],R=[],N=[],E=[],z={},B={},V={},F={},G=new Date-0,H=new Date-0,W="_echarts_instance_";function j(e){F[e]=!1}var U=j;function Z(e){return V[xa.getAttribute(e,W)]}function Y(e,t){z[e]=t}function q(e){R.push(e)}function X(e,t){$(O,e,t,1e3)}function K(e,t,i){"function"==typeof t&&(i=t,t="");var r=o(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,n(c.test(r)&&c.test(t)),P[r]||(P[r]={action:i,actionInfo:e}),k[t]=r}function Q(e,t){$(E,e,t,3e3,"visual")}function $(e,t,i,n,r){(a(t)||o(t))&&(i=t,t=n);var s=Vp.wrapStageHandler(i,r);return s.__prio=t,s.__raw=i,e.push(s),s}function ee(e,t){B[e]=t}Q(2e3,op),q(Rh),X(900,Bh),ee("default",hp),K({type:"highlight",event:"highlight",update:"highlight"},we.noop),K({type:"downplay",event:"downplay",update:"downplay"},we.noop),Y("light",Gp),Y("dark",jp);t.version="4.8.0",t.dependencies={zrender:"4.3.1"},t.PRIORITY=l,t.init=function(e,t,i){var n=Z(e);if(n)return n;var a=new p(e,t,i);return a.id="ec_"+G++,V[a.id]=a,xa.setAttribute(e,W,a.id),function(e){var t="__connectUpdateStatus";function i(e,i){for(var n=0;n<e.length;n++){e[n][t]=i}}r(k,(function(n,a){e._messageCenter.on(a,(function(n){if(F[e.group]&&0!==e[t]){if(n&&n.escapeConnect)return;var a=e.makeActionFromEvent(n),o=[];r(V,(function(t){t!==e&&t.group===e.group&&o.push(t)})),i(o,0),r(o,(function(e){1!==e[t]&&e.dispatchAction(a)})),i(o,2)}}))}))}(a),a},t.connect=function(e){if(we.isArray(e)){var t=e;e=null,r(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+H++,r(t,(function(t){t.group=e}))}return F[e]=!0,e},t.disConnect=j,t.disconnect=U,t.dispose=function(e){"string"==typeof e?e=V[e]:e instanceof p||(e=Z(e)),e instanceof p&&!e.isDisposed()&&e.dispose()},t.getInstanceByDom=Z,t.getInstanceById=function(e){return V[e]},t.registerTheme=Y,t.registerPreprocessor=q,t.registerProcessor=X,t.registerPostUpdate=function(e){N.push(e)},t.registerAction=K,t.registerCoordinateSystem=function(e,t){oh.register(e,t)},t.getCoordinateSystemDimensions=function(e){var t=oh.get(e);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},t.registerLayout=function(e,t){$(E,e,t,1e3,"layout")},t.registerVisual=Q,t.registerLoading=ee,t.extendComponentModel=function(e){return qu.extend(e)},t.extendComponentView=function(e){return Fd.extend(e)},t.extendSeriesModel=function(e){return zd.extend(e)},t.extendChartView=function(e){return ep.extend(e)},t.setCanvasCreator=function(e){we.$override("createCanvas",e)},t.registerMap=function(e,t,i){Mf.registerMap(e,t,i)},t.getMap=function(e){var t=Mf.retrieveMap(e);return t&&t[0]&&{geoJson:t[0].geoJSON,specialAreas:t[0].specialAreas}},t.dataTool={},function(){for(var e in ey)ey.hasOwnProperty(e)&&(t[e]=ey[e])}()})),iy=(ty.version,ty.dependencies,ty.PRIORITY,ty.init,ty.connect,ty.disConnect,ty.disconnect,ty.dispose,ty.getInstanceByDom,ty.getInstanceById,ty.registerTheme,ty.registerPreprocessor,ty.registerProcessor,ty.registerPostUpdate,ty.registerAction,ty.registerCoordinateSystem,ty.getCoordinateSystemDimensions,ty.registerLayout,ty.registerVisual,ty.registerLoading,ty.extendComponentModel,ty.extendComponentView,ty.extendSeriesModel,ty.extendChartView,ty.setCanvasCreator,ty.registerMap,ty.getMap,ty.dataTool,we.extend),ny=we.isArray;for(var ry=function(e,t,i){t=ny(t)&&{coordDimensions:t}||iy({},t);var n=e.getSource(),r=_g(n,t),a=new og(r,e);return a.initData(n,i),a},ay={updateSelectedMap:function(e){this._targetList=we.isArray(e)?e.slice():[],this._selectTargetMap=we.reduce(e||[],(function(e,t){return e.set(t.name,t),e}),we.createHashMap())},select:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);"single"===this.get("selectedMode")&&this._selectTargetMap.each((function(e){e.selected=!1})),i&&(i.selected=!0)},unSelect:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);i&&(i.selected=!1)},toggleSelected:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);if(null!=i)return this[i.selected?"unSelect":"select"](e,t),i.selected},isSelected:function(e,t){var i=null!=t?this._targetList[t]:this._selectTargetMap.get(e);return i&&i.selected}},oy=[126,25],sy=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],ly=0;ly<sy.length;ly++)for(var uy=0;uy<sy[ly].length;uy++)sy[ly][uy][0]/=10.5,sy[ly][uy][1]/=-14,sy[ly][uy][0]+=oy[0],sy[ly][uy][1]+=oy[1];var cy=function(e,t){"china"===e&&t.push(new hv("南海诸岛",we.map(sy,(function(e){return{type:"polygon",exterior:e}})),oy))},hy={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};var dy=function(e,t){if("china"===e){var i=hy[t.name];if(i){var n=t.center;n[0]+=i[0]/10.5,n[1]+=-i[1]/14}}},py={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};var fy=function(e,t){if("world"===e){var i=py[t.name];if(i){var n=t.center;n[0]=i[0],n[1]=i[1]}}},gy=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var my=function(e,t){"china"===e&&"台湾"===t.name&&t.geometries.push({type:"polygon",exterior:gy[0]})},vy=we.each,yy=(0,xa.makeInner)();function xy(e){for(var t,i=0;i<e.length;i++){var n=e[i].getBoundingRect();(t=t||n.clone()).union(n)}return t}var _y={load:function(e,t,i){var n=yy(t).parsed;if(n)return n;var r,a=t.specialAreas||{},o=t.geoJSON;try{r=o?pv(o,i):[]}catch(e){throw new Error("Invalid geoJson format\n"+e.message)}return cy(e,r),vy(r,(function(t){var i=t.name;dy(e,t),fy(e,t),my(e,t);var n=a[i];n&&t.transformTo(n.left,n.top,n.width,n.height)})),yy(t).parsed={regions:r,boundingRect:xy(r)}}},by=gf.parseSVG,wy=gf.makeViewBoxTransform,Sy=we.assert,My=we.createHashMap,Iy=(0,xa.makeInner)();function Ty(e,t){var i,n,r=e.svgXML;try{n=(i=r&&by(r,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root,Sy(null!=n)}catch(e){throw new Error("Invalid svg format\n"+e.message)}var a=i.width,o=i.height,s=i.viewBoxRect;if(t||(t=null==a||null==o?n.getBoundingRect():new Ni(0,0,0,0),null!=a&&(t.width=a),null!=o&&(t.height=o)),s){var l=wy(s,t.width,t.height),u=n;(n=new zi).add(u),u.scale=l.scale,u.position=l.position}return n.setClipPath(new Os({shape:t.plain()})),{root:n,boundingRect:t}}var Ay={load:function(e,t){var i=Iy(t).originRoot;if(i)return{root:i,boundingRect:Iy(t).boundingRect};var n=Ty(t);return Iy(t).originRoot=n.root,Iy(t).boundingRect=n.boundingRect,n},makeGraphic:function(e,t,i){var n=Iy(t),r=n.rootMap||(n.rootMap=My()),a=r.get(i);if(a)return a;var o=n.originRoot,s=n.boundingRect;return n.originRootHostKey?a=Ty(t,s).root:(n.originRootHostKey=i,a=o),r.set(i,a)},removeGraphic:function(e,t,i){var n=Iy(t),r=n.rootMap;r&&r.removeKey(i),i===n.originRootHostKey&&(n.originRootHostKey=null)}},Cy=we.each,Dy=we.createHashMap,Ly={geoJSON:_y,svg:Ay};function Py(e){return function(t,i){var n=ky(t),r=[];return Cy(n,(function(n){var a=Ly[n.type][e];a&&r.push(a(t,n,i))})),r}}function ky(e){return Mf.retrieveMap(e)||[]}var Oy={load:function(e,t,i){var n,r=[],a=Dy(),o=Dy(),s=ky(e);return Cy(s,(function(s){var l=Ly[s.type].load(e,s,i);Cy(l.regions,(function(e){var i=e.name;t&&t.hasOwnProperty(i)&&(e=e.cloneShallow(i=t[i])),r.push(e),a.set(i,e),o.set(i,e.center)}));var u=l.boundingRect;u&&(n?n.union(u):n=u.clone())})),{regions:r,regionsMap:a,nameCoordMap:o,boundingRect:n||new Ni(0,0,0,0)}},makeGraphic:Py("makeGraphic"),removeGraphic:Py("removeGraphic")},Ry=Pu.encodeHTML,Ny=Pu.addCommas,Ey=ad.retrieveRawAttr,zy=Ec.makeSeriesEncodeForNameBased,By=zd.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(e){for(var t=ry(this,{coordDimensions:["value"],encodeDefaulter:we.curry(zy,this)}),i=t.mapDimension("value"),n=we.createHashMap(),r=[],a=[],o=0,s=t.count();o<s;o++){var l=t.getName(o);n.set(l,!0),r.push({name:l,value:t.get(i,o),selected:Ey(t,o,"selected")})}var u=Oy.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return we.each(u.regions,(function(e){var t=e.name;n.get(t)||(r.push({name:t}),a.push(t))})),this.updateSelectedMap(r),t.appendValues([],a),t},getHostGeoModel:function(){var e=this.option.geoIndex;return null!=e?this.dependentModels.geo[e]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(e){var t=this.getData();return t.get(t.mapDimension("value"),e)},getRegionModel:function(e){var t=this.getData();return t.getItemModel(t.indexOfName(e))},formatTooltip:function(e){for(var t=this.getData(),i=Ny(this.getRawValue(e)),n=t.getName(e),r=this.seriesGroup,a=[],o=0;o<r.length;o++){var s=r[o].originalData.indexOfName(n),l=t.mapDimension("value");isNaN(r[o].originalData.get(l,s))||a.push(Ry(r[o].name))}return a.join(", ")+"<br />"+Ry(n+" : "+i)},getTooltipPosition:function(e){if(null!=e){var t=this.getData().getName(e),i=this.coordinateSystem,n=i.getRegion(t);return n&&i.dataToPoint(n.center)}},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}});we.mixin(By,ay);var Vy="\0_ec_interaction_mutex";function Fy(e){return e[Vy]||(e[Vy]={})}ty.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){}));var Gy={take:function(e,t,i){Fy(e)[t]=i},release:function(e,t,i){var n=Fy(e);n[t]===i&&(n[t]=null)},isTaken:function(e,t){return!!Fy(e)[t]}};function Hy(e){this.pointerChecker,this._zr=e,this._opt={};var t=we.bind,i=t(Wy,this),n=t(jy,this),r=t(Uy,this),a=t(Zy,this),o=t(Yy,this);Ne.call(this),this.setPointerChecker=function(e){this.pointerChecker=e},this.enable=function(t,s){this.disable(),this._opt=we.defaults(we.clone(s)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",n),e.on("mouseup",r)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",o))},this.disable=function(){e.off("mousedown",i),e.off("mousemove",n),e.off("mouseup",r),e.off("mousewheel",a),e.off("pinch",o)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Wy(e){if(!(Je.isMiddleOrRightButtonOnMouseUpDown(e)||e.target&&e.target.draggable)){var t=e.offsetX,i=e.offsetY;this.pointerChecker&&this.pointerChecker(e,t,i)&&(this._x=t,this._y=i,this._dragging=!0)}}function jy(e){if(this._dragging&&Ky("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!Gy.isTaken(this._zr,"globalPan")){var t=e.offsetX,i=e.offsetY,n=this._x,r=this._y,a=t-n,o=i-r;this._x=t,this._y=i,this._opt.preventDefaultMouseMove&&Je.stop(e.event),Xy(this,"pan","moveOnMouseMove",e,{dx:a,dy:o,oldX:n,oldY:r,newX:t,newY:i})}}function Uy(e){Je.isMiddleOrRightButtonOnMouseUpDown(e)||(this._dragging=!1)}function Zy(e){var t=Ky("zoomOnMouseWheel",e,this._opt),i=Ky("moveOnMouseWheel",e,this._opt),n=e.wheelDelta,r=Math.abs(n),a=e.offsetX,o=e.offsetY;if(0!==n&&(t||i)){if(t){var s=r>3?1.4:r>1?1.2:1.1;qy(this,"zoom","zoomOnMouseWheel",e,{scale:n>0?s:1/s,originX:a,originY:o})}if(i){var l=Math.abs(n);qy(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(n>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:a,originY:o})}}}function Yy(e){Gy.isTaken(this._zr,"globalPan")||qy(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY})}function qy(e,t,i,n,r){e.pointerChecker&&e.pointerChecker(n,r.originX,r.originY)&&(Je.stop(n.event),Xy(e,t,i,n,r))}function Xy(e,t,i,n,r){r.isAvailableBehavior=we.bind(Ky,null,i,n),e.trigger(t,r)}function Ky(e,t,i){var n=i[e];return!e||n&&(!we.isString(n)||t.event[n+"Key"])}we.mixin(Hy,Ne);var Qy=Hy;var Jy={updateViewOnPan:function(e,t,i){var n=e.target,r=n.position;r[0]+=t,r[1]+=i,n.dirty()},updateViewOnZoom:function(e,t,i,n){var r=e.target,a=e.zoomLimit,o=r.position,s=r.scale,l=e.zoom=e.zoom||1;if(l*=t,a){var u=a.min||0,c=a.max||1/0;l=Math.max(Math.min(c,l),u)}var h=l/e.zoom;e.zoom=l,o[0]-=(i-o[0])*(h-1),o[1]-=(n-o[1])*(h-1),s[0]*=h,s[1]*=h,r.dirty()}},$y={axisPointer:1,tooltip:1,brush:1};var ex={onIrrelevantElement:function(e,t,i){var n=t.getComponentByElement(e.topTarget),r=n&&n.coordinateSystem;return n&&n!==i&&!$y[n.mainType]&&r&&r.model!==i}},tx=ex.onIrrelevantElement,ix=_u.getUID;function nx(e){var t=e.getItemStyle(),i=e.get("areaColor");return null!=i&&(t.fill=i),t}function rx(e,t){t.eachChild((function(t){we.each(t.__regions,(function(i){t.trigger(e.isSelected(i.name)?"emphasis":"normal")}))}))}function ax(e,t){var i=new ru.Group;this.uid=ix("ec_map_draw"),this._controller=new Qy(e.getZr()),this._controllerHost={target:t?i:null},this.group=i,this._updateGroup=t,this._mouseDownFlag,this._mapName,this._initialized,i.add(this._regionsGroup=new ru.Group),i.add(this._backgroundGroup=new ru.Group)}ax.prototype={constructor:ax,draw:function(e,t,i,n,r){var a="geo"===e.mainType,o=e.getData&&e.getData();a&&t.eachComponent({mainType:"series",subType:"map"},(function(t){o||t.getHostGeoModel()!==e||(o=t.getData())}));var s=e.coordinateSystem;this._updateBackground(s);var l,u=this._regionsGroup,c=this.group,h=s.getTransformInfo(),d=!u.childAt(0)||r;if(d)c.transform=h.roamTransform,c.decomposeTransform(),c.dirty();else{var p=new wt;p.transform=h.roamTransform,p.decomposeTransform();var f={scale:p.scale,position:p.position};l=p.scale,ru.updateProps(c,f,e)}var g=h.rawScale,m=h.rawPosition;u.removeAll();var v=["itemStyle"],y=["emphasis","itemStyle"],x=["label"],_=["emphasis","label"],b=we.createHashMap();we.each(s.regions,(function(t){var i=b.get(t.name)||b.set(t.name,new ru.Group),n=new ru.CompoundPath({segmentIgnoreThreshold:1,shape:{paths:[]}});i.add(n);var r,s=(R=e.getRegionModel(t.name)||e).getModel(v),h=R.getModel(y),p=nx(s),f=nx(h),w=R.getModel(x),S=R.getModel(_);if(o){r=o.indexOfName(t.name);var M=o.getItemVisual(r,"color",!0);M&&(p.fill=M)}var I=function(e){return[e[0]*g[0]+m[0],e[1]*g[1]+m[1]]};we.each(t.geometries,(function(e){if("polygon"===e.type){for(var t=[],i=0;i<e.exterior.length;++i)t.push(I(e.exterior[i]));n.shape.paths.push(new ru.Polygon({segmentIgnoreThreshold:1,shape:{points:t}}));for(i=0;i<(e.interiors?e.interiors.length:0);++i){for(var r=e.interiors[i],a=(t=[],0);a<r.length;++a)t.push(I(r[a]));n.shape.paths.push(new ru.Polygon({segmentIgnoreThreshold:1,shape:{points:t}}))}}})),n.setStyle(p),n.style.strokeNoScale=!0,n.culling=!0;var T=w.get("show"),A=S.get("show"),C=o&&isNaN(o.get(o.mapDimension("value"),r)),D=o&&o.getItemLayout(r);if(a||C&&(T||A)||D&&D.showLabel){var L,P=a?t.name:r;(!o||r>=0)&&(L=e);var k=new ru.Text({position:I(t.center.slice()),scale:[1/c.scale[0],1/c.scale[1]],z2:10,silent:!0});if(ru.setLabelStyle(k.style,k.hoverStyle={},w,S,{labelFetcher:L,labelDataIndex:P,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!d){var O=[1/l[0],1/l[1]];ru.updateProps(k,{scale:O},e)}i.add(k)}if(o)o.setItemGraphicEl(r,i);else{var R=e.getRegionModel(t.name);n.eventData={componentType:"geo",componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:t.name,region:R&&R.option||{}}}(i.__regions||(i.__regions=[])).push(t),i.highDownSilentOnTouch=!!e.get("selectedMode"),ru.setHoverStyle(i,f),u.add(i)})),this._updateController(e,t,i),function(e,t,i,n,r){i.off("click"),i.off("mousedown"),t.get("selectedMode")&&(i.on("mousedown",(function(){e._mouseDownFlag=!0})),i.on("click",(function(a){if(e._mouseDownFlag){e._mouseDownFlag=!1;for(var o=a.target;!o.__regions;)o=o.parent;if(o){var s={type:("geo"===t.mainType?"geo":"map")+"ToggleSelect",batch:we.map(o.__regions,(function(e){return{name:e.name,from:r.uid}}))};s[t.mainType+"Id"]=t.id,n.dispatchAction(s),rx(t,i)}}})))}(this,e,u,i,n),rx(e,u)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&Oy.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(e){var t=e.map;this._mapName!==t&&we.each(Oy.makeGraphic(t,this.uid),(function(e){this._backgroundGroup.add(e)}),this),this._mapName=t},_updateController:function(e,t,i){var n=e.coordinateSystem,r=this._controller,a=this._controllerHost;a.zoomLimit=e.get("scaleLimit"),a.zoom=n.getZoom(),r.enable(e.get("roam")||!1);var o=e.mainType;function s(){var t={type:"geoRoam",componentType:o};return t[o+"Id"]=e.id,t}r.off("pan").on("pan",(function(e){this._mouseDownFlag=!1,Jy.updateViewOnPan(a,e.dx,e.dy),i.dispatchAction(we.extend(s(),{dx:e.dx,dy:e.dy}))}),this),r.off("zoom").on("zoom",(function(e){if(this._mouseDownFlag=!1,Jy.updateViewOnZoom(a,e.scale,e.originX,e.originY),i.dispatchAction(we.extend(s(),{zoom:e.scale,originX:e.originX,originY:e.originY})),this._updateGroup){var t=this.group.scale;this._regionsGroup.traverse((function(e){"text"===e.type&&e.attr("scale",[1/t[0],1/t[1]])}))}}),this),r.setPointerChecker((function(t,r,a){return n.getViewRectAfterRoam().contain(r,a)&&!tx(t,i,e)}))}};var ox=ax;ty.extendChartView({type:"map",render:function(e,t,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var r=this.group;if(r.removeAll(),!e.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===e.id)(a=this._mapDraw)&&r.add(a.group);else if(e.needsDrawMap){var a=this._mapDraw||new ox(i,!0);r.add(a.group),a.draw(e,t,i,this,n),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&t.getComponent("legend")&&this._renderSymbols(e,t,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(e,t,i){var n=e.originalData,r=this.group;n.each(n.mapDimension("value"),(function(t,i){if(!isNaN(t)){var a=n.getItemLayout(i);if(a&&a.point){var o=a.point,s=a.offset,l=new ru.Circle({style:{fill:e.getData().getVisual("color")},shape:{cx:o[0]+9*s,cy:o[1],r:3},silent:!0,z2:8+(s?0:ru.Z2_EMPHASIS_LIFT+1)});if(!s){var u=e.mainSeries.getData(),c=n.getName(i),h=u.indexOfName(c),d=n.getItemModel(i),p=d.getModel("label"),f=d.getModel("emphasis.label"),g=u.getItemGraphicEl(h),m=we.retrieve2(e.getFormattedLabel(h,"normal"),c),v=we.retrieve2(e.getFormattedLabel(h,"emphasis"),m),y=g.__seriesMapHighDown,x=Math.random();if(!y){y=g.__seriesMapHighDown={};var _=we.curry(sx,!0),b=we.curry(sx,!1);g.on("mouseover",_).on("mouseout",b).on("emphasis",_).on("normal",b)}g.__seriesMapCallKey=x,we.extend(y,{recordVersion:x,circle:l,labelModel:p,hoverLabelModel:f,emphasisText:v,normalText:m}),lx(y,!1)}r.add(l)}}}))}});function sx(e){var t=this.__seriesMapHighDown;t&&t.recordVersion===this.__seriesMapCallKey&&lx(t,e)}function lx(e,t){var i=e.circle,n=e.labelModel,r=e.hoverLabelModel,a=e.emphasisText,o=e.normalText;t?(i.style.extendFrom(ru.setTextStyle({},r,{text:r.get("show")?a:null},{isRectText:!0,useInsideStyle:!1},!0)),i.__mapOriginalZ2=i.z2,i.z2+=ru.Z2_EMPHASIS_LIFT):(ru.setTextStyle(i.style,n,{text:n.get("show")?o:null,textPosition:n.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),i.dirty(!1),null!=i.__mapOriginalZ2&&(i.z2=i.__mapOriginalZ2,i.__mapOriginalZ2=null))}var ux={updateCenterAndZoom:function(e,t,i){var n=e.getZoom(),r=e.getCenter(),a=t.zoom,o=e.dataToPoint(r);if(null!=t.dx&&null!=t.dy){o[0]-=t.dx,o[1]-=t.dy;r=e.pointToData(o);e.setCenter(r)}if(null!=a){if(i){var s=i.min||0,l=i.max||1/0;a=Math.max(Math.min(n*a,l),s)/n}e.scale[0]*=a,e.scale[1]*=a;var u=e.position,c=(t.originX-u[0])*(a-1),h=(t.originY-u[1])*(a-1);u[0]-=c,u[1]-=h,e.updateTransform();r=e.pointToData(o);e.setCenter(r),e.setZoom(a*n)}return{center:e.getCenter(),zoom:e.getZoom()}}},cx=ux.updateCenterAndZoom;ty.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(e,t){var i=e.componentType||"series";t.eachComponent({mainType:i,query:e},(function(t){var n=t.coordinateSystem;if("geo"===n.type){var r=cx(n,e,t.get("scaleLimit"));t.setCenter&&t.setCenter(r.center),t.setZoom&&t.setZoom(r.zoom),"series"===i&&we.each(t.seriesGroup,(function(e){e.setCenter(r.center),e.setZoom(r.zoom)}))}}))}));var hx=Ce.applyTransform;function dx(){wt.call(this)}function px(e){this.name=e,this.zoomLimit,wt.call(this),this._roamTransformable=new dx,this._rawTransformable=new dx,this._center,this._zoom}function fx(e,t,i,n){var r=i.seriesModel,a=r?r.coordinateSystem:null;return a===this?a[e](n):null}we.mixin(dx,wt),px.prototype={constructor:px,type:"view",dimensions:["x","y"],setBoundingRect:function(e,t,i,n){return this._rect=new Ni(e,t,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(e,t,i,n){this.transformTo(e,t,i,n),this._viewRect=new Ni(e,t,i,n)},transformTo:function(e,t,i,n){var r=this.getBoundingRect(),a=this._rawTransformable;a.transform=r.calculateTransform(new Ni(e,t,i,n)),a.decomposeTransform(),this._updateTransform()},setCenter:function(e){e&&(this._center=e,this._updateCenterAndZoom())},setZoom:function(e){e=e||1;var t=this.zoomLimit;t&&(null!=t.max&&(e=Math.min(t.max,e)),null!=t.min&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},getDefaultCenter:function(){var e=this.getBoundingRect();return[e.x+e.width/2,e.y+e.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),r=this.getZoom();n=Ce.applyTransform([],n,e),i=Ce.applyTransform([],i,e),t.origin=n,t.position=[i[0]-n[0],i[1]-n[1]],t.scale=[r,r],this._updateTransform()},_updateTransform:function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),ft.copy(this.transform||(this.transform=[]),t.transform||ft.create()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],ft.invert(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var e=this._roamTransformable.transform,t=this._rawTransformable;return{roamTransform:e?we.slice(e):ft.create(),rawScale:we.slice(t.scale),rawPosition:we.slice(t.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},dataToPoint:function(e,t,i){var n=t?this._rawTransform:this.transform;return i=i||[],n?hx(i,e,n):Ce.copy(i,e)},pointToData:function(e){var t=this.invTransform;return t?hx([],e,t):[e[0],e[1]]},convertToPixel:we.curry(fx,"dataToPoint"),convertFromPixel:we.curry(fx,"pointToData"),containPoint:function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])}},we.mixin(px,wt);var gx=px;function mx(e,t,i,n){gx.call(this,e),this.map=t;var r=Oy.load(t,i);this._nameCoordMap=r.nameCoordMap,this._regionsMap=r.regionsMap,this._invertLongitute=null==n||n,this.regions=r.regions,this._rect=r.boundingRect}function vx(e,t,i,n){var r=i.geoModel,a=i.seriesModel,o=r?r.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return o===this?o[e](n):null}mx.prototype={constructor:mx,type:"geo",dimensions:["lng","lat"],containCoord:function(e){for(var t=this.regions,i=0;i<t.length;i++)if(t[i].contain(e))return!0;return!1},transformTo:function(e,t,i,n){var r=this.getBoundingRect(),a=this._invertLongitute;r=r.clone(),a&&(r.y=-r.y-r.height);var o=this._rawTransformable;if(o.transform=r.calculateTransform(new Ni(e,t,i,n)),o.decomposeTransform(),a){var s=o.scale;s[1]=-s[1]}o.updateTransform(),this._updateTransform()},getRegion:function(e){return this._regionsMap.get(e)},getRegionByCoord:function(e){for(var t=this.regions,i=0;i<t.length;i++)if(t[i].contain(e))return t[i]},addGeoCoord:function(e,t){this._nameCoordMap.set(e,t)},getGeoCoord:function(e){return this._nameCoordMap.get(e)},getBoundingRect:function(){return this._rect},dataToPoint:function(e,t,i){if("string"==typeof e&&(e=this.getGeoCoord(e)),e)return gx.prototype.dataToPoint.call(this,e,t,i)},convertToPixel:we.curry(vx,"dataToPoint"),convertFromPixel:we.curry(vx,"pointToData")},we.mixin(mx,gx);var yx=mx;function xx(e,t){var i=e.get("boundingCoords");if(null!=i){var n=i[0],r=i[1];isNaN(n[0])||isNaN(n[1])||isNaN(r[0])||isNaN(r[1])||this.setBoundingRect(n[0],n[1],r[0]-n[0],r[1]-n[1])}var a,o=this.getBoundingRect(),s=e.get("layoutCenter"),l=e.get("layoutSize"),u=t.getWidth(),c=t.getHeight(),h=o.width/o.height*this.aspectScale,d=!1;if(s&&l&&(s=[Su.parsePercent(s[0],u),Su.parsePercent(s[1],c)],l=Su.parsePercent(l,Math.min(u,c)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0)),d){var p={};h>1?(p.width=l,p.height=l/h):(p.height=l,p.width=l*h),p.y=s[1]-p.height/2,p.x=s[0]-p.width/2}else(a=e.getBoxLayoutParams()).aspect=h,p=Hu.getLayoutRect(a,{width:u,height:c});this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(e.get("center")),this.setZoom(e.get("zoom"))}function _x(e,t){we.each(t.get("geoCoord"),(function(t,i){e.addGeoCoord(i,t)}))}var bx={dimensions:yx.prototype.dimensions,create:function(e,t){var i=[];e.eachComponent("geo",(function(e,n){var r=e.get("map"),a=e.get("aspectScale"),o=!0,s=Mf.retrieveMap(r);s&&s[0]&&"svg"===s[0].type?(null==a&&(a=1),o=!1):null==a&&(a=.75);var l=new yx(r+n,r,e.get("nameMap"),o);l.aspectScale=a,l.zoomLimit=e.get("scaleLimit"),i.push(l),_x(l,e),e.coordinateSystem=l,l.model=e,l.resize=xx,l.resize(e,t)})),e.eachSeries((function(e){if("geo"===e.get("coordinateSystem")){var t=e.get("geoIndex")||0;e.coordinateSystem=i[t]}}));var n={};return e.eachSeriesByType("map",(function(e){if(!e.getHostGeoModel()){var t=e.getMapType();n[t]=n[t]||[],n[t].push(e)}})),we.each(n,(function(e,n){var r=we.map(e,(function(e){return e.get("nameMap")})),a=new yx(n,n,we.mergeAll(r));a.zoomLimit=we.retrieve.apply(null,we.map(e,(function(e){return e.get("scaleLimit")}))),i.push(a),a.resize=xx,a.aspectScale=e[0].get("aspectScale"),a.resize(e[0],t),we.each(e,(function(e){e.coordinateSystem=a,_x(a,e)}))})),i},getFilledRegions:function(e,t,i){for(var n=(e||[]).slice(),r=we.createHashMap(),a=0;a<n.length;a++)r.set(n[a].name,n[a]);var o=Oy.load(t,i);return we.each(o.regions,(function(e){var t=e.name;!r.get(t)&&n.push({name:t})})),n}};ty.registerCoordinateSystem("geo",bx);var Sx=bx;var Mx=function(e){var t={};e.eachSeriesByType("map",(function(i){var n=i.getMapType();if(!i.getHostGeoModel()&&!t[n]){var r={};we.each(i.seriesGroup,(function(t){var i=t.coordinateSystem,n=t.originalData;t.get("showLegendSymbol")&&e.getComponent("legend")&&n.each(n.mapDimension("value"),(function(e,t){var a=n.getName(t),o=i.getRegion(a);if(o&&!isNaN(e)){var s=r[a]||0,l=i.dataToPoint(o.center);r[a]=s+1,n.setItemLayout(t,{point:l,offset:s})}}))}));var a=i.getData();a.each((function(e){var t=a.getName(e),i=a.getItemLayout(e)||{};i.showLabel=!r[t],a.setItemLayout(e,i)})),t[n]=!0}}))};var Ix=function(e){e.eachSeriesByType("map",(function(e){var t=e.get("color"),i=e.getModel("itemStyle"),n=i.get("areaColor"),r=i.get("color")||t[e.seriesIndex%t.length];e.getData().setVisual({areaColor:n,color:r})}))};var Tx=function(e){var t={};e.eachSeriesByType("map",(function(e){var i=e.getHostGeoModel(),n=i?"o"+i.id:"i"+e.getMapType();(t[n]=t[n]||[]).push(e)})),we.each(t,(function(e,t){for(var i,n,r,a=(i=we.map(e,(function(e){return e.getData()})),n=e[0].get("mapValueCalculation"),r={},we.each(i,(function(e){e.each(e.mapDimension("value"),(function(t,i){var n="ec-"+e.getName(i);r[n]=r[n]||[],isNaN(t)||r[n].push(t)}))})),i[0].map(i[0].mapDimension("value"),(function(e,t){for(var a,o="ec-"+i[0].getName(t),s=0,l=1/0,u=-1/0,c=r[o].length,h=0;h<c;h++)l=Math.min(l,r[o][h]),u=Math.max(u,r[o][h]),s+=r[o][h];return a="min"===n?l:"max"===n?u:"average"===n?s/c:s,0===c?NaN:a}))),o=0;o<e.length;o++)e[o].originalData=e[o].getData();for(o=0;o<e.length;o++)e[o].seriesGroup=e,e[o].needsDrawMap=0===o&&!e[o].getHostGeoModel(),e[o].setData(a.cloneShallow()),e[o].mainSeries=e[0]}))};var Ax=function(e){we.each(e.series,(function(e){e&&"map"===e.type&&(e.map=e.map||e.mapType,we.defaults(e,e.mapLocation))}))};var Cx=function(e,t){we.each(t,(function(t){t.update="updateView",ty.registerAction(t,(function(i,n){var r={};return n.eachComponent({mainType:"series",subType:e,query:i},(function(e){e[t.method]&&e[t.method](i.name,i.dataIndex);var n=e.getData();n.each((function(t){var i=n.getName(t);r[i]=e.isSelected(i)||!1}))})),{name:i.name,selected:r,seriesId:i.seriesId}}))}))};ty.registerLayout(Mx),ty.registerVisual(Ix),ty.registerProcessor(ty.PRIORITY.PROCESSOR.STATISTIC,Tx),ty.registerPreprocessor(Ax),Cx("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var Dx=we.concatArray,Lx=we.mergeAll,Px=we.map,kx=Pu.encodeHTML,Ox="undefined"==typeof Uint32Array?Array:Uint32Array,Rx="undefined"==typeof Float64Array?Array:Float64Array;function Nx(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=Px(t,(function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),Lx([t,e[0],e[1]])})))}var Ex=zd.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(e){e.data=e.data||[],Nx(e);var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count)),Ex.superApply(this,"init",arguments)},mergeOption:function(e){if(e.data=e.data||[],Nx(e),e.data){var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count))}Ex.superApply(this,"mergeOption",arguments)},appendData:function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=Dx(this._flatCoords,t.flatCoords),this._flatCoordsOffset=Dx(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},_getCoordsFromItemModel:function(e){var t=this.getData().getItemModel(e);return t.option instanceof Array?t.option:t.getShallow("coords")},getLineCoordsCount:function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},getLineCoords:function(e,t){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*e],n=this._flatCoordsOffset[2*e+1],r=0;r<n;r++)t[r]=t[r]||[],t[r][0]=this._flatCoords[i+2*r],t[r][1]=this._flatCoords[i+2*r+1];return n}var a=this._getCoordsFromItemModel(e);for(r=0;r<a.length;r++)t[r]=t[r]||[],t[r][0]=a[r][0],t[r][1]=a[r][1];return a.length},_processFlatCoordsArray:function(e){var t=0;if(this._flatCoords&&(t=this._flatCoords.length),"number"==typeof e[0]){for(var i=e.length,n=new Ox(i),r=new Rx(i),a=0,o=0,s=0,l=0;l<i;){s++;var u=e[l++];n[o++]=a+t,n[o++]=u;for(var c=0;c<u;c++){var h=e[l++],d=e[l++];r[a++]=h,r[a++]=d}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,o),flatCoords:r,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},getInitialData:function(e,t){var i=new og(["value"],this);return i.hasItemOption=!1,i.initData(e.data,[],(function(e,t,n,r){if(e instanceof Array)return NaN;i.hasItemOption=!0;var a=e.value;return null!=a?a instanceof Array?a[r]:a:void 0})),i},formatTooltip:function(e){var t=this.getData().getItemModel(e),i=t.get("name");if(i)return i;var n=t.get("fromName"),r=t.get("toName"),a=[];return null!=n&&a.push(n),null!=r&&a.push(r),kx(a.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},getProgressiveThreshold:function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),zx=ru.Line.prototype,Bx=ru.BezierCurve.prototype;function Vx(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var Fx=ru.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(e,t){this[Vx(t)?"_buildPathLine":"_buildPathCurve"](e,t)},_buildPathLine:zx.buildPath,_buildPathCurve:Bx.buildPath,pointAt:function(e){return this[Vx(this.shape)?"_pointAtLine":"_pointAtCurve"](e)},_pointAtLine:zx.pointAt,_pointAtCurve:Bx.pointAt,tangentAt:function(e){var t=this.shape,i=Vx(t)?[t.x2-t.x1,t.y2-t.y1]:this._tangentAtCurve(e);return Ce.normalize(i,i)},_tangentAtCurve:Bx.tangentAt}),Gx=Su.round,Hx=["fromSymbol","toSymbol"];function Wx(e){return"_"+e+"Type"}function jx(e,t,i){var n=t.getItemVisual(i,"color"),r=t.getItemVisual(i,e),a=t.getItemVisual(i,e+"Size");if(r&&"none"!==r){we.isArray(a)||(a=[a,a]);var o=iv.createSymbol(r,-a[0]/2,-a[1]/2,a[0],a[1],n);return o.name=e,o}}function Ux(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var i=t[2];i?(e.cpx1=i[0],e.cpy1=i[1]):(e.cpx1=NaN,e.cpy1=NaN)}function Zx(e,t,i){ru.Group.call(this),this._createLine(e,t,i)}var Yx=Zx.prototype;Yx.beforeUpdate=function(){var e=this.childOfName("fromSymbol"),t=this.childOfName("toSymbol"),i=this.childOfName("label");if(e||t||!i.ignore){for(var n=1,r=this.parent;r;)r.scale&&(n/=r.scale[0]),r=r.parent;var a=this.childOfName("line");if(this.__dirty||a.__dirty){var o=a.shape.percent,s=a.pointAt(0),l=a.pointAt(o),u=Ce.sub([],l,s);if(Ce.normalize(u,u),e){e.attr("position",s);var c=a.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[n*o,n*o])}if(t){t.attr("position",l);c=a.tangentAt(1);t.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),t.attr("scale",[n*o,n*o])}if(!i.ignore){var h,d,p,f;i.attr("position",l);var g=i.__labelDistance,m=g[0]*n,v=g[1]*n,y=o/2,x=[(c=a.tangentAt(y))[1],-c[0]],_=a.pointAt(y);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var b,w=c[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var S=-Math.atan2(c[1],c[0]);l[0]<s[0]&&(S=Math.PI+S),i.attr("rotation",S)}switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":b=-v,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":b=v,p="top";break;default:b=0,p="middle"}switch(i.__position){case"end":h=[u[0]*m+l[0],u[1]*v+l[1]],d=u[0]>.8?"left":u[0]<-.8?"right":"center",p=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";break;case"start":h=[-u[0]*m+s[0],-u[1]*v+s[1]],d=u[0]>.8?"right":u[0]<-.8?"left":"center",p=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":h=[m*w+s[0],s[1]+b],d=c[0]<0?"right":"left",f=[-m*w,-b];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":h=[_[0],_[1]+b],d="center",f=[0,-b];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":h=[-m*w+l[0],l[1]+b],d=c[0]>=0?"right":"left",f=[m*w,-b]}i.attr({style:{textVerticalAlign:i.__verticalAlign||p,textAlign:i.__textAlign||d},position:h,scale:[n,n],origin:f})}}}},Yx._createLine=function(e,t,i){var n=e.hostModel,r=function(e){var t=new Fx({name:"line",subPixelOptimize:!0});return Ux(t.shape,e),t}(e.getItemLayout(t));r.shape.percent=0,ru.initProps(r,{shape:{percent:1}},n,t),this.add(r);var a=new ru.Text({name:"label",lineLabelOriginalOpacity:1});this.add(a),we.each(Hx,(function(i){var n=jx(i,e,t);this.add(n),this[Wx(i)]=e.getItemVisual(t,i)}),this),this._updateCommonStl(e,t,i)},Yx.updateData=function(e,t,i){var n=e.hostModel,r=this.childOfName("line"),a=e.getItemLayout(t),o={shape:{}};Ux(o.shape,a),ru.updateProps(r,o,n,t),we.each(Hx,(function(i){var n=e.getItemVisual(t,i),r=Wx(i);if(this[r]!==n){this.remove(this.childOfName(i));var a=jx(i,e,t);this.add(a)}this[r]=n}),this),this._updateCommonStl(e,t,i)},Yx._updateCommonStl=function(e,t,i){var n=e.hostModel,r=this.childOfName("line"),a=i&&i.lineStyle,o=i&&i.hoverLineStyle,s=i&&i.labelModel,l=i&&i.hoverLabelModel;if(!i||e.hasItemOption){var u=e.getItemModel(t);a=u.getModel("lineStyle").getLineStyle(),o=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var c=e.getItemVisual(t,"color"),h=we.retrieve3(e.getItemVisual(t,"opacity"),a.opacity,1);r.useStyle(we.defaults({strokeNoScale:!0,fill:"none",stroke:c,opacity:h},a)),r.hoverStyle=o,we.each(Hx,(function(e){var t=this.childOfName(e);t&&(t.setColor(c),t.setStyle({opacity:h}))}),this);var d,p,f=s.getShallow("show"),g=l.getShallow("show"),m=this.childOfName("label");if((f||g)&&(d=c||"#000",null==(p=n.getFormattedLabel(t,"normal",e.dataType)))){var v=n.getRawValue(t);p=null==v?e.getName(t):isFinite(v)?Gx(v):v}var y=f?p:null,x=g?we.retrieve2(n.getFormattedLabel(t,"emphasis",e.dataType),p):null,_=m.style;if(null!=y||null!=x){ru.setTextStyle(m.style,s,{text:y},{autoColor:d}),m.__textAlign=_.textAlign,m.__verticalAlign=_.textVerticalAlign,m.__position=s.get("position")||"middle";var b=s.get("distance");we.isArray(b)||(b=[b,b]),m.__labelDistance=b}m.hoverStyle=null!=x?{text:x,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},m.ignore=!f&&!g,ru.setHoverStyle(this)},Yx.highlight=function(){this.trigger("emphasis")},Yx.downplay=function(){this.trigger("normal")},Yx.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},Yx.setLinePoints=function(e){var t=this.childOfName("line");Ux(t.shape,e),t.dirty()},we.inherits(Zx,ru.Group);var qx=Zx;function Xx(e){this._ctor=e||qx,this.group=new ru.Group}var Kx=Xx.prototype;function Qx(e){var t=e.hostModel;return{lineStyle:t.getModel("lineStyle").getLineStyle(),hoverLineStyle:t.getModel("emphasis.lineStyle").getLineStyle(),labelModel:t.getModel("label"),hoverLabelModel:t.getModel("emphasis.label")}}function Jx(e){return isNaN(e[0])||isNaN(e[1])}function $x(e){return!Jx(e[0])&&!Jx(e[1])}Kx.isPersistent=function(){return!0},Kx.updateData=function(e){var t=this,i=t.group,n=t._lineData;t._lineData=e,n||i.removeAll();var r=Qx(e);e.diff(n).add((function(i){!function(e,t,i,n){if(!$x(t.getItemLayout(i)))return;var r=new e._ctor(t,i,n);t.setItemGraphicEl(i,r),e.group.add(r)}(t,e,i,r)})).update((function(i,a){!function(e,t,i,n,r,a){var o=t.getItemGraphicEl(n);if(!$x(i.getItemLayout(r)))return void e.group.remove(o);o?o.updateData(i,r,a):o=new e._ctor(i,r,a);i.setItemGraphicEl(r,o),e.group.add(o)}(t,n,e,a,i,r)})).remove((function(e){i.remove(n.getItemGraphicEl(e))})).execute()},Kx.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,i){t.updateLayout(e,i)}),this)},Kx.incrementalPrepareUpdate=function(e){this._seriesScope=Qx(e),this._lineData=null,this.group.removeAll()},Kx.incrementalUpdate=function(e,t){function i(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=e.useHoverLayer=!0)}for(var n=e.start;n<e.end;n++){if($x(t.getItemLayout(n))){var r=new this._ctor(t,n,this._seriesScope);r.traverse(i),this.group.add(r),t.setItemGraphicEl(n,r)}}},Kx.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Kx._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var e_=Xx,t_=iv.createSymbol;function i_(e,t,i){ru.Group.call(this),this.add(this.createLine(e,t,i)),this._updateEffectSymbol(e,t)}var n_=i_.prototype;n_.createLine=function(e,t,i){return new qx(e,t,i)},n_._updateEffectSymbol=function(e,t){var i=e.getItemModel(t).getModel("effect"),n=i.get("symbolSize"),r=i.get("symbol");we.isArray(n)||(n=[n,n]);var a=i.get("color")||e.getItemVisual(t,"color"),o=this.childAt(1);this._symbolType!==r&&(this.remove(o),(o=t_(r,-.5,-.5,1,1,a)).z2=100,o.culling=!0,this.add(o)),o&&(o.setStyle("shadowColor",a),o.setStyle(i.getItemStyle(["color"])),o.attr("scale",n),o.setColor(a),o.attr("scale",n),this._symbolType=r,this._symbolScale=n,this._updateEffectAnimation(e,i,t))},n_._updateEffectAnimation=function(e,t,i){var n=this.childAt(1);if(n){var r=this,a=e.getItemLayout(i),o=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantSpeed"),u=we.retrieve(t.get("delay"),(function(t){return t/e.count()*o/3})),c="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,a),l>0&&(o=this.getLineLength(n)/l*1e3),o!==this._period||s!==this._loop){n.stopAnimation();var h=u;c&&(h=u(i)),n.__t>0&&(h=-o*n.__t),n.__t=0;var d=n.animate("",s).when(o,{__t:1}).delay(h).during((function(){r.updateSymbolPosition(n)}));s||d.done((function(){r.remove(n)})),d.start()}this._period=o,this._loop=s}},n_.getLineLength=function(e){return Ce.dist(e.__p1,e.__cp1)+Ce.dist(e.__cp1,e.__p2)},n_.updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},n_.updateData=function(e,t,i){this.childAt(0).updateData(e,t,i),this._updateEffectSymbol(e,t)},n_.updateSymbolPosition=function(e){var t=e.__p1,i=e.__p2,n=e.__cp1,r=e.__t,a=e.position,o=[a[0],a[1]],s=Wa.quadraticAt,l=Wa.quadraticDerivativeAt;a[0]=s(t[0],n[0],i[0],r),a[1]=s(t[1],n[1],i[1],r);var u=l(t[0],n[0],i[0],r),c=l(t[1],n[1],i[1],r);if(e.rotation=-Math.atan2(c,u)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==e.__lastT&&e.__lastT<e.__t){var h=1.05*Ce.dist(o,a);e.attr("scale",[e.scale[0],h]),1===r&&(a[0]=o[0]+(a[0]-o[0])/2,a[1]=o[1]+(a[1]-o[1])/2)}else if(1===e.__lastT){h=2*Ce.dist(t,a);e.attr("scale",[e.scale[0],h])}else e.attr("scale",this._symbolScale);e.__lastT=e.__t,e.ignore=!1},n_.updateLayout=function(e,t){this.childAt(0).updateLayout(e,t);var i=e.getItemModel(t).getModel("effect");this._updateEffectAnimation(e,i,t)},we.inherits(i_,ru.Group);var r_=i_;function a_(e,t,i){ru.Group.call(this),this._createPolyline(e,t,i)}var o_=a_.prototype;o_._createPolyline=function(e,t,i){var n=e.getItemLayout(t),r=new ru.Polyline({shape:{points:n}});this.add(r),this._updateCommonStl(e,t,i)},o_.updateData=function(e,t,i){var n=e.hostModel,r=this.childAt(0),a={shape:{points:e.getItemLayout(t)}};ru.updateProps(r,a,n,t),this._updateCommonStl(e,t,i)},o_._updateCommonStl=function(e,t,i){var n=this.childAt(0),r=e.getItemModel(t),a=e.getItemVisual(t,"color"),o=i&&i.lineStyle,s=i&&i.hoverLineStyle;i&&!e.hasItemOption||(o=r.getModel("lineStyle").getLineStyle(),s=r.getModel("emphasis.lineStyle").getLineStyle()),n.useStyle(we.defaults({strokeNoScale:!0,fill:"none",stroke:a},o)),n.hoverStyle=s,ru.setHoverStyle(this)},o_.updateLayout=function(e,t){this.childAt(0).setShape("points",e.getItemLayout(t))},we.inherits(a_,ru.Group);var s_=a_;function l_(e,t,i){r_.call(this,e,t,i),this._lastFrame=0,this._lastFramePercent=0}var u_=l_.prototype;u_.createLine=function(e,t,i){return new s_(e,t,i)},u_.updateAnimationPoints=function(e,t){this._points=t;for(var i=[0],n=0,r=1;r<t.length;r++){var a=t[r-1],o=t[r];n+=Ce.dist(a,o),i.push(n)}if(0!==n){for(r=0;r<i.length;r++)i[r]/=n;this._offsets=i,this._length=n}},u_.getLineLength=function(e){return this._length},u_.updateSymbolPosition=function(e){var t=e.__t,i=this._points,n=this._offsets,r=i.length;if(n){var a=this._lastFrame;if(t<this._lastFramePercent){for(o=Math.min(a+1,r-1);o>=0&&!(n[o]<=t);o--);o=Math.min(o,r-2)}else{for(var o=a;o<r&&!(n[o]>t);o++);o=Math.min(o-1,r-2)}Ce.lerp(e.position,i[o],i[o+1],(t-n[o])/(n[o+1]-n[o]));var s=i[o+1][0]-i[o][0],l=i[o+1][1]-i[o][1];e.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},we.inherits(l_,r_);var c_=l_,h_=ru.extendShape({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(e,t){var i=t.segs,n=t.curveness;if(t.polyline)for(var r=0;r<i.length;){var a=i[r++];if(a>0){e.moveTo(i[r++],i[r++]);for(var o=1;o<a;o++)e.lineTo(i[r++],i[r++])}}else for(r=0;r<i.length;){var s=i[r++],l=i[r++],u=i[r++],c=i[r++];if(e.moveTo(s,l),n>0){var h=(s+u)/2-(l-c)*n,d=(l+c)/2-(u-s)*n;e.quadraticCurveTo(h,d,u,c)}else e.lineTo(u,c)}},findDataIndex:function(e,t){var i=this.shape,n=i.segs,r=i.curveness;if(i.polyline)for(var a=0,o=0;o<n.length;){var s=n[o++];if(s>0)for(var l=n[o++],u=n[o++],c=1;c<s;c++){var h=n[o++],d=n[o++];if(vo.containStroke(l,u,h,d))return a}a++}else for(a=0,o=0;o<n.length;){l=n[o++],u=n[o++],h=n[o++],d=n[o++];if(r>0){var p=(l+h)/2-(u-d)*r,f=(u+d)/2-(h-l)*r;if(_o.containStroke(l,u,p,f,h,d))return a}else if(vo.containStroke(l,u,h,d))return a;a++}return-1}});function d_(){this.group=new ru.Group}var p_=d_.prototype;p_.isPersistent=function(){return!this._incremental},p_.updateData=function(e){this.group.removeAll();var t=new h_({rectHover:!0,cursor:"default"});t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e),this.group.add(t),this._incremental=null},p_.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>5e5?(this._incremental||(this._incremental=new nl({silent:!0})),this.group.add(this._incremental)):this._incremental=null},p_.incrementalUpdate=function(e,t){var i=new h_;i.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(i,t,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=e.start,this.group.add(i))},p_.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},p_._setCommon=function(e,t,i){var n=t.hostModel;e.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),e.useStyle(n.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var r=t.getVisual("color");r&&e.setStyle("stroke",r),e.setStyle("fill"),i||(e.seriesIndex=n.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>0&&(e.dataIndex=i+e.__startIndex)})))},p_._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var f_=d_,g_={seriesType:"lines",plan:Hd(),reset:function(e){var t=e.coordinateSystem,i=e.get("polyline"),n=e.pipelineContext.large;return{progress:function(r,a){var o=[];if(n){var s,l=r.end-r.start;if(i){for(var u=0,c=r.start;c<r.end;c++)u+=e.getLineCoordsCount(c);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);var h=0,d=[];for(c=r.start;c<r.end;c++){var p=e.getLineCoords(c,o);i&&(s[h++]=p);for(var f=0;f<p;f++)d=t.dataToPoint(o[f],!1,d),s[h++]=d[0],s[h++]=d[1]}a.setLayout("linesPoints",s)}else for(c=r.start;c<r.end;c++){var g=a.getItemModel(c),m=(p=e.getLineCoords(c,o),[]);if(i)for(var v=0;v<p;v++)m.push(t.dataToPoint(o[v]));else{m[0]=t.dataToPoint(o[0]),m[1]=t.dataToPoint(o[1]);var y=g.get("lineStyle.curveness");+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}a.setItemLayout(c,m)}}}}},m_=Su.round;function v_(e,t,i){var n=e.getArea(),r=e.getBaseAxis().isHorizontal(),a=n.x,o=n.y,s=n.width,l=n.height,u=i.get("lineStyle.width")||2;a-=u/2,o-=u/2,s+=u,l+=u,a=Math.floor(a),s=Math.round(s);var c=new ru.Rect({shape:{x:a,y:o,width:s,height:l}});return t&&(c.shape[r?"width":"height"]=0,ru.initProps(c,{shape:{width:s,height:l}},i)),c}function y_(e,t,i){var n=e.getArea(),r=new ru.Sector({shape:{cx:m_(e.cx,1),cy:m_(e.cy,1),r0:m_(n.r0,1),r:m_(n.r,1),startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});return t&&(r.shape.endAngle=n.startAngle,ru.initProps(r,{shape:{endAngle:n.endAngle}},i)),r}var x_={createGridClipPath:v_,createPolarClipPath:y_,createClipPath:function(e,t,i){return e?"polar"===e.type?y_(e,t,i):"cartesian2d"===e.type?v_(e,t,i):null:null}},__=x_.createClipPath;ty.extendChartView({type:"lines",init:function(){},render:function(e,t,i){var n=e.getData(),r=this._updateLineDraw(n,e),a=e.get("zlevel"),o=e.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(a).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&o&&(l||s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})),r.updateData(n);var u=e.get("clip",!0)&&__(e.coordinateSystem,!1,e);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},incrementalPrepareRender:function(e,t,i){var n=e.getData();this._updateLineDraw(n,e).incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(e,t,i){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,i){var n=e.getData(),r=e.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var a=g_.reset(e);a.progress&&a.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(e,t){var i=this._lineDraw,n=this._showEffect(t),r=!!t.get("polyline"),a=t.pipelineContext.large;return i&&n===this._hasEffet&&r===this._isPolyline&&a===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=a?new f_:new e_(r?n?c_:s_:n?r_:qx),this._hasEffet=n,this._isPolyline=r,this._isLargeDraw=a,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(e){return!!e.get("effect.show")},_clearLayer:function(e){var t=e.getZr();"svg"===t.painter.getType()||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},dispose:function(){}});function b_(e){return e instanceof Array||(e=[e,e]),e}var w_="lineStyle.opacity".split("."),S_={seriesType:"lines",reset:function(e,t,i){var n=b_(e.get("symbol")),r=b_(e.get("symbolSize")),a=e.getData();return a.setVisual("fromSymbol",n&&n[0]),a.setVisual("toSymbol",n&&n[1]),a.setVisual("fromSymbolSize",r&&r[0]),a.setVisual("toSymbolSize",r&&r[1]),a.setVisual("opacity",e.get(w_)),{dataEach:a.hasItemOption?function(e,t){var i=e.getItemModel(t),n=b_(i.getShallow("symbol",!0)),r=b_(i.getShallow("symbolSize",!0)),a=i.get(w_);n[0]&&e.setItemVisual(t,"fromSymbol",n[0]),n[1]&&e.setItemVisual(t,"toSymbol",n[1]),r[0]&&e.setItemVisual(t,"fromSymbolSize",r[0]),r[1]&&e.setItemVisual(t,"toSymbolSize",r[1]),e.setItemVisual(t,"opacity",a)}:null}}};ty.registerLayout(g_),ty.registerVisual(S_);var M_=qu.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(e){qu.prototype.init.apply(this,arguments),xa.defaultEmphasis(e,"label",["show"])},optionUpdated:function(){var e=this.option,t=this;e.regions=Sx.getFilledRegions(e.regions,e.map,e.nameMap),this._optionModelMap=we.reduce(e.regions||[],(function(e,i){return i.name&&e.set(i.name,new vu(i,t)),e}),we.createHashMap()),this.updateSelectedMap(e.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(e){return this._optionModelMap.get(e)||new vu(null,this,this.ecModel)},getFormattedLabel:function(e,t){var i=this.getRegionModel(e).get("label"+("normal"===t?".":t+".")+"formatter"),n={name:e};return"function"==typeof i?(n.status=t,i(n)):"string"==typeof i?i.replace("{a}",null!=e?e:""):void 0},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e}});we.mixin(M_,ay);ty.extendComponentView({type:"geo",init:function(e,t){var i=new ox(t,!0);this._mapDraw=i,this.group.add(i.group)},render:function(e,t,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var r=this._mapDraw;e.get("show")?r.draw(e,t,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=e.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});function I_(e,t){t.update="updateView",ty.registerAction(t,(function(t,i){var n={};return i.eachComponent({mainType:"geo",query:t},(function(i){i[e](t.name);var r=i.coordinateSystem;we.each(r.regions,(function(e){n[e.name]=i.isSelected(e.name)||!1}))})),{selected:n,name:t.name}}))}I_("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),I_("select",{type:"geoSelect",event:"geoselected"}),I_("unSelect",{type:"geoUnSelect",event:"geounselected"});zd.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(e,t){return zg(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var T_=ad.retrieveRawValue;var A_={getDefaultLabel:function(e,t){var i=e.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return T_(e,t,i[0]);if(n){for(var r=[],a=0;a<i.length;a++){var o=T_(e,t,i[a]);r.push(o)}return r.join(" ")}}},C_=iv.createSymbol,D_=Su.parsePercent,L_=A_.getDefaultLabel;function P_(e,t,i){ru.Group.call(this),this.updateData(e,t,i)}var k_=P_.prototype,O_=P_.getSymbolSize=function(e,t){var i=e.getItemVisual(t,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};function R_(e){return[e[0]/2,e[1]/2]}function N_(e,t){this.parent.drift(e,t)}k_._createSymbol=function(e,t,i,n,r){this.removeAll();var a=t.getItemVisual(i,"color"),o=C_(e,-1,-1,2,2,a,r);o.attr({z2:100,culling:!0,scale:R_(n)}),o.drift=N_,this._symbolType=e,this.add(o)},k_.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(e)},k_.getSymbolPath=function(){return this.childAt(0)},k_.getScale=function(){return this.childAt(0).scale},k_.highlight=function(){this.childAt(0).trigger("emphasis")},k_.downplay=function(){this.childAt(0).trigger("normal")},k_.setZ=function(e,t){var i=this.childAt(0);i.zlevel=e,i.z=t},k_.setDraggable=function(e){var t=this.childAt(0);t.draggable=e,t.cursor=e?"move":t.cursor},k_.updateData=function(e,t,i){this.silent=!1;var n=e.getItemVisual(t,"symbol")||"circle",r=e.hostModel,a=O_(e,t),o=n!==this._symbolType;if(o){var s=e.getItemVisual(t,"symbolKeepAspect");this._createSymbol(n,e,t,a,s)}else{(l=this.childAt(0)).silent=!1,ru.updateProps(l,{scale:R_(a)},r,t)}if(this._updateCommon(e,t,a,i),o){var l=this.childAt(0),u=i&&i.fadeIn,c={scale:l.scale.slice()};u&&(c.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),ru.initProps(l,c,r,t)}this._seriesModel=r};var E_=["itemStyle"],z_=["emphasis","itemStyle"],B_=["label"],V_=["emphasis","label"];function F_(e,t){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===t){var i=this.__symbolOriginalScale,n=i[1]/i[0],r={scale:[Math.max(1.1*i[0],i[0]+3),Math.max(1.1*i[1],i[1]+3*n)]};this.animateTo(r,400,"elasticOut")}else"normal"===t&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}k_._updateCommon=function(e,t,i,n){var r=this.childAt(0),a=e.hostModel,o=e.getItemVisual(t,"color");"image"!==r.type?r.useStyle({strokeNoScale:!0}):r.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=n&&n.itemStyle,l=n&&n.hoverItemStyle,u=n&&n.symbolOffset,c=n&&n.labelModel,h=n&&n.hoverLabelModel,d=n&&n.hoverAnimation,p=n&&n.cursorStyle;if(!n||e.hasItemOption){var f=n&&n.itemModel?n.itemModel:e.getItemModel(t);s=f.getModel(E_).getItemStyle(["color"]),l=f.getModel(z_).getItemStyle(),u=f.getShallow("symbolOffset"),c=f.getModel(B_),h=f.getModel(V_),d=f.getShallow("hoverAnimation"),p=f.getShallow("cursor")}else l=we.extend({},l);var g=r.style,m=e.getItemVisual(t,"symbolRotate");r.attr("rotation",(m||0)*Math.PI/180||0),u&&r.attr("position",[D_(u[0],i[0]),D_(u[1],i[1])]),p&&r.attr("cursor",p),r.setColor(o,n&&n.symbolInnerColor),r.setStyle(s);var v=e.getItemVisual(t,"opacity");null!=v&&(g.opacity=v);var y=e.getItemVisual(t,"liftZ"),x=r.__z2Origin;null!=y?null==x&&(r.__z2Origin=r.z2,r.z2+=y):null!=x&&(r.z2=x,r.__z2Origin=null);var _=n&&n.useNameLabel;ru.setLabelStyle(g,l,c,h,{labelFetcher:a,labelDataIndex:t,defaultText:function(t,i){return _?e.getName(t):L_(e,t)},isRectText:!0,autoColor:o}),r.__symbolOriginalScale=R_(i),r.hoverStyle=l,r.highDownOnUpdate=d&&a.isAnimationEnabled()?F_:null,ru.setHoverStyle(r)},k_.fadeOut=function(e,t){var i=this.childAt(0);this.silent=i.silent=!0,(!t||!t.keepLabel)&&(i.style.text=null),ru.updateProps(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,e)},we.inherits(P_,ru.Group);var G_=P_,H_=we.isObject;function W_(e){this.group=new ru.Group,this._symbolCtor=e||G_}var j_=W_.prototype;function U_(e,t,i,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(i))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(i,"symbol")}function Z_(e){return null==e||H_(e)||(e={isIgnore:e}),e||{}}function Y_(e){var t=e.hostModel;return{itemStyle:t.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:t.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),labelModel:t.getModel("label"),hoverLabelModel:t.getModel("emphasis.label"),cursorStyle:t.get("cursor")}}j_.updateData=function(e,t){t=Z_(t);var i=this.group,n=e.hostModel,r=this._data,a=this._symbolCtor,o=Y_(e);r||i.removeAll(),e.diff(r).add((function(n){var r=e.getItemLayout(n);if(U_(e,r,n,t)){var s=new a(e,n,o);s.attr("position",r),e.setItemGraphicEl(n,s),i.add(s)}})).update((function(s,l){var u=r.getItemGraphicEl(l),c=e.getItemLayout(s);U_(e,c,s,t)?(u?(u.updateData(e,s,o),ru.updateProps(u,{position:c},n)):(u=new a(e,s)).attr("position",c),i.add(u),e.setItemGraphicEl(s,u)):i.remove(u)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&t.fadeOut((function(){i.remove(t)}))})).execute(),this._data=e},j_.isPersistent=function(){return!0},j_.updateLayout=function(){var e=this._data;e&&e.eachItemGraphicEl((function(t,i){var n=e.getItemLayout(i);t.attr("position",n)}))},j_.incrementalPrepareUpdate=function(e){this._seriesScope=Y_(e),this._data=null,this.group.removeAll()},j_.incrementalUpdate=function(e,t,i){function n(e){e.isGroup||(e.incremental=e.useHoverLayer=!0)}i=Z_(i);for(var r=e.start;r<e.end;r++){var a=t.getItemLayout(r);if(U_(t,a,r,i)){var o=new this._symbolCtor(t,r,this._seriesScope);o.traverse(n),o.attr("position",a),this.group.add(o),t.setItemGraphicEl(r,o)}}},j_.remove=function(e){var t=this.group,i=this._data;i&&e?i.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}))})):t.removeAll()};var q_=W_,X_=Lg.isDimensionStacked,K_=we.map;var Q_={prepareDataCoordInfo:function(e,t,i){var n,r=e.getBaseAxis(),a=e.getOtherAxis(r),o=function(e,t){var i=0,n=e.scale.getExtent();"start"===t?i=n[0]:"end"===t?i=n[1]:n[0]>0?i=n[0]:n[1]<0&&(i=n[1]);return i}(a,i),s=r.dim,l=a.dim,u=t.mapDimension(l),c=t.mapDimension(s),h="x"===l||"radius"===l?1:0,d=K_(e.dimensions,(function(e){return t.mapDimension(e)})),p=t.getCalculationInfo("stackResultDimension");return(n|=X_(t,d[0]))&&(d[0]=p),(n|=X_(t,d[1]))&&(d[1]=p),{dataDimsForPoint:d,valueStart:o,valueAxisDim:l,baseAxisDim:s,stacked:!!n,valueDim:u,baseDim:c,baseDataOffset:h,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}},getStackedOnPoint:function(e,t,i,n){var r=NaN;e.stacked&&(r=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(r)&&(r=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=i.get(e.baseDim,n),o[1-a]=r,t.dataToPoint(o)}},J_=Q_.prepareDataCoordInfo,$_=Q_.getStackedOnPoint;var eb=function(e,t,i,n,r,a,o,s){for(var l=function(e,t){var i=[];return t.diff(e).add((function(e){i.push({cmd:"+",idx:e})})).update((function(e,t){i.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){i.push({cmd:"-",idx:e})})).execute(),i}(e,t),u=[],c=[],h=[],d=[],p=[],f=[],g=[],m=J_(r,t,o),v=J_(a,e,s),y=0;y<l.length;y++){var x=l[y],_=!0;switch(x.cmd){case"=":var b=e.getItemLayout(x.idx),w=t.getItemLayout(x.idx1);(isNaN(b[0])||isNaN(b[1]))&&(b=w.slice()),u.push(b),c.push(w),h.push(i[x.idx]),d.push(n[x.idx1]),g.push(t.getRawIndex(x.idx1));break;case"+":var S=x.idx;u.push(r.dataToPoint([t.get(m.dataDimsForPoint[0],S),t.get(m.dataDimsForPoint[1],S)])),c.push(t.getItemLayout(S).slice()),h.push($_(m,r,t,S)),d.push(n[S]),g.push(t.getRawIndex(S));break;case"-":S=x.idx;var M=e.getRawIndex(S);M!==S?(u.push(e.getItemLayout(S)),c.push(a.dataToPoint([e.get(v.dataDimsForPoint[0],S),e.get(v.dataDimsForPoint[1],S)])),h.push(i[S]),d.push($_(v,a,e,S)),g.push(M)):_=!1}_&&(p.push(x),f.push(f.length))}f.sort((function(e,t){return g[e]-g[t]}));var I=[],T=[],A=[],C=[],D=[];for(y=0;y<f.length;y++){S=f[y];I[y]=u[S],T[y]=c[S],A[y]=h[S],C[y]=d[S],D[y]=p[S]}return{current:I,next:T,stackedOnCurrent:A,stackedOnNext:C,status:D}},tb=Ce.min,ib=Ce.max,nb=Ce.scaleAndAdd,rb=Ce.copy,ab=[],ob=[],sb=[];function lb(e){return isNaN(e[0])||isNaN(e[1])}function ub(e,t,i,n,r,a,o,s,l,u,c){return"none"!==u&&u?cb.apply(this,arguments):hb.apply(this,arguments)}function cb(e,t,i,n,r,a,o,s,l,u,c){for(var h=0,d=i,p=0;p<n;p++){var f=t[d];if(d>=r||d<0)break;if(lb(f)){if(c){d+=a;continue}break}if(d===i)e[a>0?"moveTo":"lineTo"](f[0],f[1]);else if(l>0){var g=t[h],m="y"===u?1:0,v=(f[m]-g[m])*l;rb(ob,g),ob[m]=g[m]+v,rb(sb,f),sb[m]=f[m]-v,e.bezierCurveTo(ob[0],ob[1],sb[0],sb[1],f[0],f[1])}else e.lineTo(f[0],f[1]);h=d,d+=a}return p}function hb(e,t,i,n,r,a,o,s,l,u,c){for(var h=0,d=i,p=0;p<n;p++){var f=t[d];if(d>=r||d<0)break;if(lb(f)){if(c){d+=a;continue}break}if(d===i)e[a>0?"moveTo":"lineTo"](f[0],f[1]),rb(ob,f);else if(l>0){var g=d+a,m=t[g];if(c)for(;m&&lb(t[g]);)m=t[g+=a];var v=.5,y=t[h];if(!(m=t[g])||lb(m))rb(sb,f);else{var x,_;if(lb(m)&&!c&&(m=f),Ce.sub(ab,m,y),"x"===u||"y"===u){var b="x"===u?0:1;x=Math.abs(f[b]-y[b]),_=Math.abs(f[b]-m[b])}else x=Ce.dist(f,y),_=Ce.dist(f,m);nb(sb,f,ab,-l*(1-(v=_/(_+x))))}tb(ob,ob,s),ib(ob,ob,o),tb(sb,sb,s),ib(sb,sb,o),e.bezierCurveTo(ob[0],ob[1],sb[0],sb[1],f[0],f[1]),nb(ob,f,ab,l*v)}else e.lineTo(f[0],f[1]);h=d,d+=a}return p}function db(e,t){var i=[1/0,1/0],n=[-1/0,-1/0];if(t)for(var r=0;r<e.length;r++){var a=e[r];a[0]<i[0]&&(i[0]=a[0]),a[1]<i[1]&&(i[1]=a[1]),a[0]>n[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:t?i:n,max:t?n:i}}var pb={Polyline:Go.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:hs(Go.prototype.brush),buildPath:function(e,t){var i=t.points,n=0,r=i.length,a=db(i,t.smoothConstraint);if(t.connectNulls){for(;r>0&&lb(i[r-1]);r--);for(;n<r&&lb(i[n]);n++);}for(;n<r;)n+=ub(e,i,n,r,r,1,a.min,a.max,t.smooth,t.smoothMonotone,t.connectNulls)+1}}),Polygon:Go.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:hs(Go.prototype.brush),buildPath:function(e,t){var i=t.points,n=t.stackedOnPoints,r=0,a=i.length,o=t.smoothMonotone,s=db(i,t.smoothConstraint),l=db(n,t.smoothConstraint);if(t.connectNulls){for(;a>0&&lb(i[a-1]);a--);for(;r<a&&lb(i[r]);r++);}for(;r<a;){var u=ub(e,i,r,a,a,1,s.min,s.max,t.smooth,o,t.connectNulls);ub(e,n,r+u-1,u,a,-1,l.min,l.max,t.stackedOnSmooth,o,t.connectNulls),r+=u+1,e.closePath()}}})},fb=eo.fromPoints,gb=pb.Polyline,mb=pb.Polygon,vb=Q_.prepareDataCoordInfo,yb=Q_.getStackedOnPoint,xb=x_.createGridClipPath,_b=x_.createPolarClipPath;function bb(e,t){if(e.length===t.length){for(var i=0;i<e.length;i++){var n=e[i],r=t[i];if(n[0]!==r[0]||n[1]!==r[1])return}return!0}}function wb(e,t){var i=[],n=[],r=[],a=[];return fb(e,i,n),fb(t,r,a),Math.max(Math.abs(i[0]-r[0]),Math.abs(i[1]-r[1]),Math.abs(n[0]-a[0]),Math.abs(n[1]-a[1]))}function Sb(e){return"number"==typeof e?e:e?.5:0}function Mb(e,t,i){for(var n=t.getBaseAxis(),r="x"===n.dim||"radius"===n.dim?0:1,a=[],o=0;o<e.length-1;o++){var s=e[o+1],l=e[o];a.push(l);var u=[];switch(i){case"end":u[r]=s[r],u[1-r]=l[1-r],a.push(u);break;case"middle":var c=(l[r]+s[r])/2,h=[];u[r]=h[r]=c,u[1-r]=l[1-r],h[1-r]=s[1-r],a.push(u),a.push(h);break;default:u[r]=l[r],u[1-r]=s[1-r],a.push(u)}}return e[o]&&a.push(e[o]),a}function Ib(e,t,i){var n=e.get("showAllSymbol"),r="auto"===n;if(!n||r){var a=i.getAxesByScale("ordinal")[0];if(a&&(!r||!function(e,t){var i=e.getExtent(),n=Math.abs(i[1]-i[0])/e.scale.count();isNaN(n)&&(n=0);for(var r=t.count(),a=Math.max(1,Math.round(r/5)),o=0;o<r;o+=a)if(1.5*G_.getSymbolSize(t,o)[e.isHorizontal()?1:0]>n)return!1;return!0}(a,t))){var o=t.mapDimension(a.dim),s={};return we.each(a.getViewLabels(),(function(e){s[e.tickValue]=1})),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function Tb(e,t,i){if("cartesian2d"===e.type){var n=e.getBaseAxis().isHorizontal(),r=xb(e,t,i);if(!i.get("clip",!0)){var a=r.shape,o=Math.max(a.width,a.height);n?(a.y-=o,a.height+=2*o):(a.x-=o,a.width+=2*o)}return r}return _b(e,t,i)}ep.extend({type:"line",init:function(){var e=new ru.Group,t=new q_;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},render:function(e,t,i){var n=e.coordinateSystem,r=this.group,a=e.getData(),o=e.getModel("lineStyle"),s=e.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),u="polar"===n.type,c=this._coordSys,h=this._symbolDraw,d=this._polyline,p=this._polygon,f=this._lineGroup,g=e.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(e,t,i){if(!i.valueDim)return[];for(var n=[],r=0,a=t.count();r<a;r++)n.push(yb(i,e,t,r));return n}(n,a,vb(n,a,v)),x=e.get("showSymbol"),_=x&&!u&&Ib(e,a,n),b=this._data;b&&b.eachItemGraphicEl((function(e,t){e.__temp&&(r.remove(e),b.setItemGraphicEl(t,null))})),x||h.remove(),r.add(f);var w,S=!u&&e.get("step");n&&n.getArea&&e.get("clip",!0)&&(null!=(w=n.getArea()).width?(w.x-=.1,w.y-=.1,w.width+=.2,w.height+=.2):w.r0&&(w.r0-=.5,w.r1+=.5)),this._clipShapeForSymbol=w,d&&c.type===n.type&&S===this._step?(m&&!p?p=this._newPolygon(l,y,n,g):p&&!m&&(f.remove(p),p=this._polygon=null),f.setClipPath(Tb(n,!1,e)),x&&h.updateData(a,{isIgnore:_,clipShape:w}),a.eachItemGraphicEl((function(e){e.stopAnimation(!0)})),bb(this._stackedOnPoints,y)&&bb(this._points,l)||(g?this._updateAnimation(a,y,n,i,S,v):(S&&(l=Mb(l,n,S),y=Mb(y,n,S)),d.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:y})))):(x&&h.updateData(a,{isIgnore:_,clipShape:w}),S&&(l=Mb(l,n,S),y=Mb(y,n,S)),d=this._newPolyline(l,n,g),m&&(p=this._newPolygon(l,y,n,g)),f.setClipPath(Tb(n,!0,e)));var M=function(e,t){var i=e.getVisual("visualMeta");if(i&&i.length&&e.count()&&"cartesian2d"===t.type){for(var n,r,a=i.length-1;a>=0;a--){var o=i[a].dimension,s=e.dimensions[o],l=e.getDimensionInfo(s);if("x"===(n=l&&l.coordDim)||"y"===n){r=i[a];break}}if(r){var u=t.getAxis(n),c=we.map(r.stops,(function(e){return{coord:u.toGlobalCoord(u.dataToCoord(e.value)),color:e.color}})),h=c.length,d=r.outerColors.slice();h&&c[0].coord>c[h-1].coord&&(c.reverse(),d.reverse());var p=c[0].coord-10,f=c[h-1].coord+10,g=f-p;if(g<.001)return"transparent";we.each(c,(function(e){e.offset=(e.coord-p)/g})),c.push({offset:h?c[h-1].offset:.5,color:d[1]||"transparent"}),c.unshift({offset:h?c[0].offset:.5,color:d[0]||"transparent"});var m=new ru.LinearGradient(0,0,0,0,c,!0);return m[n]=p,m[n+"2"]=f,m}}}(a,n)||a.getVisual("color");d.useStyle(we.defaults(o.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=e.get("smooth");if(I=Sb(e.get("smooth")),d.setShape({smooth:I,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")}),p){var T=a.getCalculationInfo("stackedOnSeries"),A=0;p.useStyle(we.defaults(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),T&&(A=Sb(T.get("smooth"))),p.setShape({smooth:I,stackedOnSmooth:A,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")})}this._data=a,this._coordSys=n,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(e,t,i,n){var r=e.getData(),a=xa.queryDataIndex(r,n);if(!(a instanceof Array)&&null!=a&&a>=0){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(o=new G_(r,a)).position=s,o.setZ(e.get("zlevel"),e.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,r.setItemGraphicEl(a,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else ep.prototype.highlight.call(this,e,t,i,n)},downplay:function(e,t,i,n){var r=e.getData(),a=xa.queryDataIndex(r,n);if(null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else ep.prototype.downplay.call(this,e,t,i,n)},_newPolyline:function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new gb({shape:{points:e},silent:!0,z2:10}),this._lineGroup.add(t),this._polyline=t,t},_newPolygon:function(e,t){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new mb({shape:{points:e,stackedOnPoints:t},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(e,t,i,n,r,a){var o=this._polyline,s=this._polygon,l=e.hostModel,u=eb(this._data,e,this._stackedOnPoints,t,this._coordSys,i,this._valueOrigin,a),c=u.current,h=u.stackedOnCurrent,d=u.next,p=u.stackedOnNext;if(r&&(c=Mb(u.current,i,r),h=Mb(u.stackedOnCurrent,i,r),d=Mb(u.next,i,r),p=Mb(u.stackedOnNext,i,r)),wb(c,d)>3e3||s&&wb(h,p)>3e3)return o.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:p}));o.shape.__points=u.current,o.shape.points=c,ru.updateProps(o,{shape:{points:d}},l),s&&(s.setShape({points:c,stackedOnPoints:h}),ru.updateProps(s,{shape:{points:d,stackedOnPoints:p}},l));for(var f=[],g=u.status,m=0;m<g.length;m++){if("="===g[m].cmd){var v=e.getItemGraphicEl(g[m].idx1);v&&f.push({el:v,ptIdx:m})}}o.animators&&o.animators.length&&o.animators[0].during((function(){for(var e=0;e<f.length;e++){f[e].el.attr("position",o.shape.__points[f[e].ptIdx])}}))},remove:function(e){var t=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl((function(e,n){e.__temp&&(t.remove(e),i.setItemGraphicEl(n,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var Ab=we.isFunction;var Cb=function(e,t,i){return{seriesType:e,performRawSeries:!0,reset:function(e,n,r){var a=e.getData(),o=e.get("symbol"),s=e.get("symbolSize"),l=e.get("symbolKeepAspect"),u=e.get("symbolRotate"),c=Ab(o),h=Ab(s),d=Ab(u),p=c||h||d,f=!c&&o?o:t,g=h?null:s;if(a.setVisual({legendSymbol:i||f,symbol:f,symbolSize:g,symbolKeepAspect:l,symbolRotate:u}),!n.isSeriesFiltered(e))return{dataEach:a.hasItemOption||p?function(t,i){if(p){var n=e.getRawValue(i),r=e.getDataParams(i);c&&t.setItemVisual(i,"symbol",o(n,r)),h&&t.setItemVisual(i,"symbolSize",s(n,r)),d&&t.setItemVisual(i,"symbolRotate",u(n,r))}if(t.hasItemOption){var a=t.getItemModel(i),l=a.getShallow("symbol",!0),f=a.getShallow("symbolSize",!0),g=a.getShallow("symbolRotate",!0),m=a.getShallow("symbolKeepAspect",!0);null!=l&&t.setItemVisual(i,"symbol",l),null!=f&&t.setItemVisual(i,"symbolSize",f),null!=g&&t.setItemVisual(i,"symbolRotate",g),null!=m&&t.setItemVisual(i,"symbolKeepAspect",m)}}:null}}}},Db=we.map,Lb=Lg.isDimensionStacked;var Pb=function(e){return{seriesType:e,plan:Hd(),reset:function(e){var t=e.getData(),i=e.coordinateSystem,n=e.pipelineContext.large;if(i){var r=Db(i.dimensions,(function(e){return t.mapDimension(e)})).slice(0,2),a=r.length,o=t.getCalculationInfo("stackResultDimension");return Lb(t,r[0])&&(r[0]=o),Lb(t,r[1])&&(r[1]=o),a&&{progress:function(e,t){for(var o=e.end-e.start,s=n&&new Float32Array(o*a),l=e.start,u=0,c=[],h=[];l<e.end;l++){var d;if(1===a){var p=t.get(r[0],l);d=!isNaN(p)&&i.dataToPoint(p,null,h)}else{p=c[0]=t.get(r[0],l);var f=c[1]=t.get(r[1],l);d=!isNaN(p)&&!isNaN(f)&&i.dataToPoint(c,null,h)}n?(s[u++]=d?d[0]:NaN,s[u++]=d?d[1]:NaN):t.setItemLayout(l,d&&d.slice()||[NaN,NaN])}n&&t.setLayout("symbolPoints",s)}}}}}},kb={average:function(e){for(var t=0,i=0,n=0;n<e.length;n++)isNaN(e[n])||(t+=e[n],i++);return 0===i?NaN:t/i},sum:function(e){for(var t=0,i=0;i<e.length;i++)t+=e[i]||0;return t},max:function(e){for(var t=-1/0,i=0;i<e.length;i++)e[i]>t&&(t=e[i]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,i=0;i<e.length;i++)e[i]<t&&(t=e[i]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},Ob=function(e,t){return Math.round(e.length/2)};var Rb=function(e){return{seriesType:e,modifyOutputEnd:!0,reset:function(e,t,i){var n=e.getData(),r=e.get("sampling"),a=e.coordinateSystem;if("cartesian2d"===a.type&&r){var o,s=a.getBaseAxis(),l=a.getOtherAxis(s),u=s.getExtent(),c=u[1]-u[0],h=Math.round(n.count()/c);if(h>1)"string"==typeof r?o=kb[r]:"function"==typeof r&&(o=r),o&&e.setData(n.downSample(n.mapDimension(l.dim),1/h,o,Ob))}}}};function Nb(e){return this._axes[e]}var Eb=function(e){this._axes={},this._dimList=[],this.name=e||""};Eb.prototype={constructor:Eb,type:"cartesian",getAxis:function(e){return this._axes[e]},getAxes:function(){return we.map(this._dimList,Nb,this)},getAxesByScale:function(e){return e=e.toLowerCase(),we.filter(this.getAxes(),(function(t){return t.scale.type===e}))},addAxis:function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},dataToCoord:function(e){return this._dataCoordConvert(e,"dataToCoord")},coordToData:function(e){return this._dataCoordConvert(e,"coordToData")},_dataCoordConvert:function(e,t){for(var i=this._dimList,n=e instanceof Array?[]:{},r=0;r<i.length;r++){var a=i[r],o=this._axes[a];n[a]=o[t](e[a])}return n}};var zb=Eb;function Bb(e){zb.call(this,e)}Bb.prototype={constructor:Bb,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(e){var t=this.getAxis("x"),i=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&i.contain(i.toLocalCoord(e[1]))},containData:function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},dataToPoint:function(e,t,i){var n=this.getAxis("x"),r=this.getAxis("y");return(i=i||[])[0]=n.toGlobalCoord(n.dataToCoord(e[0])),i[1]=r.toGlobalCoord(r.dataToCoord(e[1])),i},clampData:function(e,t){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,r=i.getExtent(),a=n.getExtent(),o=i.parse(e[0]),s=n.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),o),Math.max(r[0],r[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},pointToData:function(e,t){var i=this.getAxis("x"),n=this.getAxis("y");return(t=t||[])[0]=i.coordToData(i.toLocalCoord(e[0])),t[1]=n.coordToData(n.toLocalCoord(e[1])),t},getOtherAxis:function(e){return this.getAxis("x"===e.dim?"y":"x")},getArea:function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1]),n=Math.min(t[0],t[1]),r=Math.max(e[0],e[1])-i,a=Math.max(t[0],t[1])-n;return new Ni(i,n,r,a)}},we.inherits(Bb,zb);var Vb=Bb,Fb=function(e,t,i,n,r){zv.call(this,e,t,i),this.type=n||"value",this.position=r||"bottom"};Fb.prototype={constructor:Fb,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var e=this.position;return"top"===e||"bottom"===e},getGlobalExtent:function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},toLocalCoord:null,toGlobalCoord:null},we.inherits(Fb,zv);var Gb=Fb,Hb={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},Wb={};Wb.categoryAxis=we.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Hb),Wb.valueAxis=we.merge({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},Hb),Wb.timeAxis=we.defaults({scale:!0,min:"dataMin",max:"dataMax"},Wb.valueAxis),Wb.logAxis=we.defaults({scale:!0,logBase:10},Wb.valueAxis);var jb=Wb,Ub=Hu.getLayoutParams,Zb=Hu.mergeLayoutParam,Yb=["value","category","time","log"];var qb=function(e,t,i,n){we.each(Yb,(function(r){t.extend({type:e+"Axis."+r,mergeDefaultAndTheme:function(t,n){var a=this.layoutMode,o=a?Ub(t):{},s=n.getTheme();we.merge(t,s.get(r+"Axis")),we.merge(t,this.getDefaultOption()),t.type=i(e,t),a&&Zb(t,o,a)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Yg.createByAxisModel(this))},getCategories:function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:we.mergeAll([{},jb[r+"Axis"],n],!0)})})),qu.registerSubTypeDefaulter(e+"Axis",we.curry(i,e))},Xb=qu.extend({type:"cartesian2dAxis",axis:null,init:function(){Xb.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Xb.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Xb.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Kb(e,t){return t.type||(t.data?"category":"value")}we.merge(Xb.prototype,Um);var Qb={offset:0};qb("x",Xb,Kb,Qb),qb("y",Xb,Kb,Qb);qu.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Jb=we.isObject,$b=we.each,ew=we.map,tw=we.indexOf,iw=Hu.getLayoutRect,nw=jm.createScaleByModel,rw=jm.ifAxisCrossZero,aw=jm.niceScaleExtent,ow=jm.estimateLabelUnionRect,sw=Lg.getStackedDimension;function lw(e,t,i){return e.getCoordSysModel()===t}function uw(e,t,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(e,t,i),this.model=e}var cw=uw.prototype;function hw(e,t,i,n){i.getAxesOnZeroOf=function(){return r?[r]:[]};var r,a=e[t],o=i.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)dw(a[l])&&(r=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&dw(a[u])&&!n[c(a[u])]){r=a[u];break}r&&(n[c(r)]=!0)}function c(e){return e.dim+"_"+e.index}}function dw(e){return e&&"category"!==e.type&&"time"!==e.type&&rw(e)}cw.type="grid",cw.axisPointerEnabled=!0,cw.getRect=function(){return this._rect},cw.update=function(e,t){var i=this._axesMap;this._updateScale(e,this.model),$b(i.x,(function(e){aw(e.scale,e.model)})),$b(i.y,(function(e){aw(e.scale,e.model)}));var n={};$b(i.x,(function(e){hw(i,"y",e,n)})),$b(i.y,(function(e){hw(i,"x",e,n)})),this.resize(this.model,t)},cw.resize=function(e,t,i){var n=iw(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});this._rect=n;var r=this._axesList;function a(){$b(r,(function(e){var t=e.isHorizontal(),i=t?[0,n.width]:[0,n.height],r=e.inverse?1:0;e.setExtent(i[r],i[1-r]),function(e,t){var i=e.getExtent(),n=i[0]+i[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return n-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return n-e+t}}(e,t?n.x:n.y)}))}a(),!i&&e.get("containLabel")&&($b(r,(function(e){if(!e.model.get("axisLabel.inside")){var t=ow(e);if(t){var i=e.isHorizontal()?"height":"width",r=e.model.get("axisLabel.margin");n[i]-=t[i]+r,"top"===e.position?n.y+=t.height+r:"left"===e.position&&(n.x+=t.width+r)}}})),a())},cw.getAxis=function(e,t){var i=this._axesMap[e];if(null!=i){if(null==t)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[t]}},cw.getAxes=function(){return this._axesList.slice()},cw.getCartesian=function(e,t){if(null!=e&&null!=t){var i="x"+e+"y"+t;return this._coordsMap[i]}Jb(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,r=this._coordsList;n<r.length;n++)if(r[n].getAxis("x").index===e||r[n].getAxis("y").index===t)return r[n]},cw.getCartesians=function(){return this._coordsList.slice()},cw.convertToPixel=function(e,t,i){var n=this._findConvertTarget(e,t);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},cw.convertFromPixel=function(e,t,i){var n=this._findConvertTarget(e,t);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},cw._findConvertTarget=function(e,t){var i,n,r=t.seriesModel,a=t.xAxisModel||r&&r.getReferringComponents("xAxis")[0],o=t.yAxisModel||r&&r.getReferringComponents("yAxis")[0],s=t.gridModel,l=this._coordsList;if(r)i=r.coordinateSystem,tw(l,i)<0&&(i=null);else if(a&&o)i=this.getCartesian(a.componentIndex,o.componentIndex);else if(a)n=this.getAxis("x",a.componentIndex);else if(o)n=this.getAxis("y",o.componentIndex);else if(s){s.coordinateSystem===this&&(i=this._coordsList[0])}return{cartesian:i,axis:n}},cw.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},cw._initCartesian=function(e,t,i){var n={left:!1,right:!1,top:!1,bottom:!1},r={x:{},y:{}},a={x:0,y:0};if(t.eachComponent("xAxis",o("x"),this),t.eachComponent("yAxis",o("y"),this),!a.x||!a.y)return this._axesMap={},void(this._axesList=[]);function o(t){return function(i,o){if(lw(i,e)){var s=i.get("position");"x"===t?"top"!==s&&"bottom"!==s&&(s=n.bottom?"top":"bottom"):"left"!==s&&"right"!==s&&(s=n.left?"right":"left"),n[s]=!0;var l=new Gb(t,nw(i),[0,0],i.get("type"),s),u="category"===l.type;l.onBand=u&&i.get("boundaryGap"),l.inverse=i.get("inverse"),i.axis=l,l.model=i,l.grid=this,l.index=o,this._axesList.push(l),r[t][o]=l,a[t]++}}}this._axesMap=r,$b(r.x,(function(t,i){$b(r.y,(function(n,r){var a="x"+i+"y"+r,o=new Vb(a);o.grid=this,o.model=e,this._coordsMap[a]=o,this._coordsList.push(o),o.addAxis(t),o.addAxis(n)}),this)}),this)},cw._updateScale=function(e,t){function i(e,t,i){$b(e.mapDimension(t.dim,!0),(function(i){t.scale.unionExtentFromData(e,sw(e,i))}))}$b(this._axesList,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeries((function(e){if(gw(e)){var n=fw(e),r=n[0],a=n[1];if(!lw(r,t)||!lw(a,t))return;var o=this.getCartesian(r.componentIndex,a.componentIndex),s=e.getData(),l=o.getAxis("x"),u=o.getAxis("y");"list"===s.type&&(i(s,l),i(s,u))}}),this)},cw.getTooltipAxes=function(e){var t=[],i=[];return $b(this.getCartesians(),(function(n){var r=null!=e&&"auto"!==e?n.getAxis(e):n.getBaseAxis(),a=n.getOtherAxis(r);tw(t,r)<0&&t.push(r),tw(i,a)<0&&i.push(a)})),{baseAxes:t,otherAxes:i}};var pw=["xAxis","yAxis"];function fw(e,t){return ew(pw,(function(t){return e.getReferringComponents(t)[0]}))}function gw(e){return"cartesian2d"===e.get("coordinateSystem")}uw.create=function(e,t){var i=[];return e.eachComponent("grid",(function(n,r){var a=new uw(n,e,t);a.name="grid_"+r,a.resize(n,t,!0),n.coordinateSystem=a,i.push(a)})),e.eachSeries((function(e){if(gw(e)){var t=fw(e),i=t[0],n=t[1],r=i.getCoordSysModel().coordinateSystem;e.coordinateSystem=r.getCartesian(i.componentIndex,n.componentIndex)}})),i},uw.dimensions=uw.prototype.dimensions=Vb.prototype.dimensions,oh.register("cartesian2d",uw);var mw=we.retrieve,vw=we.defaults,yw=we.extend,xw=we.each,_w=Su.isRadianAroundZero,bw=Su.remRadian,ww=iv.createSymbol,Sw=Ce.applyTransform,Mw=jm.shouldShowAllLabels,Iw=Math.PI,Tw=function(e,t){this.opt=t,this.axisModel=e,vw(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new ru.Group;var i=new ru.Group({position:t.position.slice(),rotation:t.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};Tw.prototype={constructor:Tw,hasBuilder:function(e){return!!Aw[e]},add:function(e){Aw[e].call(this)},getGroup:function(){return this.group}};var Aw={axisLine:function(){var e=this.opt,t=this.axisModel;if(t.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,r=[i[0],0],a=[i[1],0];n&&(Sw(r,r,n),Sw(a,a,n));var o=yw({lineCap:"round"},t.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new ru.Line({anid:"line",subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:a[0],y2:a[1]},style:o,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1}));var s=t.get("axisLine.symbol"),l=t.get("axisLine.symbolSize"),u=t.get("axisLine.symbolOffset")||0;if("number"==typeof u&&(u=[u,u]),null!=s){"string"==typeof s&&(s=[s,s]),"string"!=typeof l&&"number"!=typeof l||(l=[l,l]);var c=l[0],h=l[1];xw([{rotate:e.rotation+Math.PI/2,offset:u[0],r:0},{rotate:e.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((r[0]-a[0])*(r[0]-a[0])+(r[1]-a[1])*(r[1]-a[1]))}],(function(t,i){if("none"!==s[i]&&null!=s[i]){var n=ww(s[i],-c/2,-h/2,c,h,o.stroke,!0),a=t.r+t.offset,l=[r[0]+a*Math.cos(e.rotation),r[1]-a*Math.sin(e.rotation)];n.attr({rotation:t.rotate,position:l,silent:!0,z2:11}),this.group.add(n)}}),this)}}},axisTickLabel:function(){var e=this.axisModel,t=this.opt,i=function(e,t,i){var n=t.axis,r=t.getModel("axisTick");if(!r.get("show")||n.scale.isBlank())return;for(var a=r.getModel("lineStyle"),o=i.tickDirection*r.get("length"),s=Rw(n.getTicksCoords(),e._transform,o,vw(a.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}),"ticks"),l=0;l<s.length;l++)e.group.add(s[l]);return s}(this,e,t),n=function(e,t,i){var n=t.axis;if(!mw(i.axisLabelShow,t.get("axisLabel.show"))||n.scale.isBlank())return;var r=t.getModel("axisLabel"),a=r.get("margin"),o=n.getViewLabels(),s=(mw(i.labelRotate,r.get("rotate"))||0)*Iw/180,l=Dw(i.rotation,s,i.labelDirection),u=t.getCategories&&t.getCategories(!0),c=[],h=Lw(t),d=t.get("triggerEvent");return xw(o,(function(o,s){var p=o.tickValue,f=o.formattedLabel,g=o.rawLabel,m=r;u&&u[p]&&u[p].textStyle&&(m=new vu(u[p].textStyle,r,t.ecModel));var v=m.getTextColor()||t.get("axisLine.lineStyle.color"),y=[n.dataToCoord(p),i.labelOffset+i.labelDirection*a],x=new ru.Text({anid:"label_"+p,position:y,rotation:l.rotation,silent:h,z2:10});ru.setTextStyle(x.style,m,{text:f,textAlign:m.getShallow("align",!0)||l.textAlign,textVerticalAlign:m.getShallow("verticalAlign",!0)||m.getShallow("baseline",!0)||l.textVerticalAlign,textFill:"function"==typeof v?v("category"===n.type?g:"value"===n.type?p+"":p,s):v}),d&&(x.eventData=Cw(t),x.eventData.targetType="axisLabel",x.eventData.value=g),e._dumbGroup.add(x),x.updateTransform(),c.push(x),e.group.add(x),x.decomposeTransform()})),c}(this,e,t);!function(e,t,i){if(Mw(e.axis))return;var n=e.get("axisLabel.showMinLabel"),r=e.get("axisLabel.showMaxLabel");i=i||[];var a=(t=t||[])[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=i[0],c=i[1],h=i[i.length-1],d=i[i.length-2];!1===n?(Pw(a),Pw(u)):kw(a,o)&&(n?(Pw(o),Pw(c)):(Pw(a),Pw(u)));!1===r?(Pw(s),Pw(h)):kw(l,s)&&(r?(Pw(l),Pw(d)):(Pw(s),Pw(h)))}(e,n,i),function(e,t,i){var n=t.axis,r=t.getModel("minorTick");if(!r.get("show")||n.scale.isBlank())return;var a=n.getMinorTicksCoords();if(!a.length)return;for(var o=r.getModel("lineStyle"),s=i.tickDirection*r.get("length"),l=vw(o.getLineStyle(),vw(t.getModel("axisTick").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})),u=0;u<a.length;u++)for(var c=Rw(a[u],e._transform,s,l,"minorticks_"+u),h=0;h<c.length;h++)e.group.add(c[h])}(this,e,t)},axisName:function(){var e=this.opt,t=this.axisModel,i=mw(e.axisName,t.get("name"));if(i){var n,r,a=t.get("nameLocation"),o=e.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=this.axisModel.axis.getExtent(),c=u[0]>u[1]?-1:1,h=["start"===a?u[0]-c*l:"end"===a?u[1]+c*l:(u[0]+u[1])/2,Ow(a)?e.labelOffset+o*l:0],d=t.get("nameRotate");null!=d&&(d=d*Iw/180),Ow(a)?n=Dw(e.rotation,null!=d?d:e.rotation,o):(n=function(e,t,i,n){var r,a,o=bw(i-e.rotation),s=n[0]>n[1],l="start"===t&&!s||"start"!==t&&s;_w(o-Iw/2)?(a=l?"bottom":"top",r="center"):_w(o-1.5*Iw)?(a=l?"top":"bottom",r="center"):(a="middle",r=o<1.5*Iw&&o>Iw/2?l?"left":"right":l?"right":"left");return{rotation:o,textAlign:r,textVerticalAlign:a}}(e,a,d||0,u),null!=(r=e.axisNameAvailableWidth)&&(r=Math.abs(r/Math.sin(n.rotation)),!isFinite(r)&&(r=null)));var p=s.getFont(),f=t.get("nameTruncate",!0)||{},g=f.ellipsis,m=mw(e.nameTruncateMaxWidth,f.maxWidth,r),v=null!=g&&null!=m?Pu.truncateText(i,m,p,g,{minChar:2,placeholder:f.placeholder}):i,y=t.get("tooltip",!0),x=t.mainType,_={componentType:x,name:i,$vars:["name"]};_[x+"Index"]=t.componentIndex;var b=new ru.Text({anid:"name",__fullText:i,__truncatedText:v,position:h,rotation:n.rotation,silent:Lw(t),z2:1,tooltip:y&&y.show?yw({content:i,formatter:function(){return i},formatterParams:_},y):null});ru.setTextStyle(b.style,s,{text:v,textFont:p,textFill:s.getTextColor()||t.get("axisLine.lineStyle.color"),textAlign:s.get("align")||n.textAlign,textVerticalAlign:s.get("verticalAlign")||n.textVerticalAlign}),t.get("triggerEvent")&&(b.eventData=Cw(t),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},Cw=Tw.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},Dw=Tw.innerTextLayout=function(e,t,i){var n,r,a=bw(t-e);return _w(a)?(r=i>0?"top":"bottom",n="center"):_w(a-Iw)?(r=i>0?"bottom":"top",n="center"):(r="middle",n=a>0&&a<Iw?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:n,textVerticalAlign:r}};var Lw=Tw.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)};function Pw(e){e&&(e.ignore=!0)}function kw(e,t,i){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(n&&r){var a=ft.identity([]);return ft.rotate(a,a,-e.rotation),n.applyTransform(ft.mul([],a,e.getLocalTransform())),r.applyTransform(ft.mul([],a,t.getLocalTransform())),n.intersect(r)}}function Ow(e){return"middle"===e||"center"===e}function Rw(e,t,i,n,r){for(var a=[],o=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=i,t&&(Sw(o,o,t),Sw(s,s,t));var c=new ru.Line({anid:r+"_"+e[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,silent:!0});a.push(c)}return a}var Nw=Tw,Ew=we.each,zw=we.curry;function Bw(e,t){return"all"===e||we.isArray(e)&&we.indexOf(e,t)>=0||e===t}function Vw(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Gw(e)]}function Fw(e){return!!e.get("handle.show")}function Gw(e){return e.type+"||"+e.id}var Hw={collect:function(e,t){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,i){var n=t.getComponent("tooltip"),r=t.getComponent("axisPointer"),a=r.get("link",!0)||[],o=[];Ew(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var s=Gw(i.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=i;var u=i.model.getModel("tooltip",n);if(Ew(i.getAxes(),zw(p,!1,null)),i.getTooltipAxes&&n&&u.get("show")){var c="axis"===u.get("trigger"),h="cross"===u.get("axisPointer.type"),d=i.getTooltipAxes(u.get("axisPointer.axis"));(c||h)&&Ew(d.baseAxes,zw(p,!h||"cross",c)),h&&Ew(d.otherAxes,zw(p,"cross",!1))}}function p(n,s,c){var h=c.model.getModel("axisPointer",r),d=h.get("show");if(d&&("auto"!==d||n||Fw(h))){null==s&&(s=h.get("triggerTooltip"));var p=(h=n?function(e,t,i,n,r,a){var o=t.getModel("axisPointer"),s={};Ew(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=we.clone(o.get(e))})),s.snap="category"!==e.type&&!!a,"cross"===o.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===r){var u=o.get("label.show");if(l.show=null==u||u,!a){var c=s.lineStyle=o.get("crossStyle");c&&we.defaults(l,c.textStyle)}}return e.model.getModel("axisPointer",new vu(s,i,n))}(c,u,r,t,n,s):h).get("snap"),f=Gw(c.model),g=s||p||"category"===c.type,m=e.axesInfo[f]={key:f,axis:c,coordSys:i,axisPointerModel:h,triggerTooltip:s,involveSeries:g,snap:p,useHandle:Fw(h),seriesModels:[]};l[f]=m,e.seriesInvolved|=g;var v=function(e,t){for(var i=t.model,n=t.dim,r=0;r<e.length;r++){var a=e[r]||{};if(Bw(a[n+"AxisId"],i.id)||Bw(a[n+"AxisIndex"],i.componentIndex)||Bw(a[n+"AxisName"],i.name))return r}}(a,c);if(null!=v){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[f]=m,y.mapper=a[v].mapper,m.linkGroup=y}}}}))}(i,e,t),i.seriesInvolved&&function(e,t){t.eachSeries((function(t){var i=t.coordinateSystem,n=t.get("tooltip.trigger",!0),r=t.get("tooltip.show",!0);i&&"none"!==n&&!1!==n&&"item"!==n&&!1!==r&&!1!==t.get("axisPointer.show",!0)&&Ew(e.coordSysAxesInfo[Gw(i.model)],(function(e){var n=e.axis;i.getAxis(n.dim)===n&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}),this)}(i,e),i},fixValue:function(e){var t=Vw(e);if(t){var i=t.axisPointerModel,n=t.axis.scale,r=i.option,a=i.get("status"),o=i.get("value");null!=o&&(o=n.parse(o));var s=Fw(i);null==a&&(r.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),r.value=o,s&&(r.status=t.axis.scale.isBlank()?"hide":"show")}},getAxisInfo:Vw,getAxisPointerModel:function(e){var t=Vw(e);return t&&t.axisPointerModel},makeKey:Gw},Ww=ty.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(e,t,i,n){this.axisPointerClass&&Hw.fixValue(e),Ww.superApply(this,"render",arguments),jw(this,e,t,i,n,!0)},updateAxisPointer:function(e,t,i,n,r){jw(this,e,t,i,n,!1)},remove:function(e,t){var i=this._axisPointer;i&&i.remove(t),Ww.superApply(this,"remove",arguments)},dispose:function(e,t){Uw(this,t),Ww.superApply(this,"dispose",arguments)}});function jw(e,t,i,n,r,a){var o=Ww.getAxisPointerClass(e.axisPointerClass);if(o){var s=Hw.getAxisPointerModel(t);s?(e._axisPointer||(e._axisPointer=new o)).render(t,s,n,a):Uw(e,n)}}function Uw(e,t,i){var n=e._axisPointer;n&&n.dispose(t,i),e._axisPointer=null}var Zw=[];Ww.registerAxisPointerClass=function(e,t){Zw[e]=t},Ww.getAxisPointerClass=function(e){return e&&Zw[e]};var Yw=Ww;var qw={layout:function(e,t,i){i=i||{};var n=e.coordinateSystem,r=t.axis,a={},o=r.getAxesOnZeroOf()[0],s=r.position,l=o?"onZero":s,u=r.dim,c=n.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,f="x"===u?[h[2]-p,h[3]+p]:[h[0]-p,h[1]+p];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));f[d.onZero]=Math.max(Math.min(g,f[1]),f[0])}a.position=["y"===u?f[d[l]]:h[0],"x"===u?f[d[l]]:h[3]],a.rotation=Math.PI/2*("x"===u?0:1),a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],a.labelOffset=o?f[d[s]]-f[d.onZero]:0,t.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),we.retrieve(i.labelInside,t.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var m=t.get("axisLabel.rotate");return a.labelRotate="top"===l?-m:m,a.z2=1,a}};var Xw={rectCoordAxisBuildSplitArea:function(e,t,i,n){var r=i.axis;if(!r.scale.isBlank()){var a=i.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=r.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var c=s.length,h=e.__splitAreaColors,d=we.createHashMap(),p=0;if(h)for(var f=0;f<u.length;f++){var g=h.get(u[f].tickValue);if(null!=g){p=(g+(c-1)*f)%c;break}}var m=r.toGlobalCoord(u[0].coord),v=o.getAreaStyle();s=we.isArray(s)?s:[s];for(f=1;f<u.length;f++){var y,x,_,b,w=r.toGlobalCoord(u[f].coord);r.isHorizontal()?(y=m,x=l.y,_=w-y,b=l.height,m=y+_):(y=l.x,x=m,_=l.width,m=x+(b=w-x));var S=u[f-1].tickValue;null!=S&&d.set(S,p),t.add(new ru.Rect({anid:null!=S?"area_"+S:null,shape:{x:y,y:x,width:_,height:b},style:we.defaults({fill:s[p]},v),silent:!0})),p=(p+1)%c}e.__splitAreaColors=d}}},rectCoordAxisHandleRemove:function(e){e.__splitAreaColors=null}},Kw=Xw.rectCoordAxisBuildSplitArea,Qw=Xw.rectCoordAxisHandleRemove,Jw=["axisLine","axisTickLabel","axisName"],$w=["splitArea","splitLine","minorSplitLine"],eS=Yw.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,i,n){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new ru.Group,this.group.add(this._axisGroup),e.get("show")){var a=e.getCoordSysModel(),o=qw.layout(a,e),s=new Nw(e,o);we.each(Jw,s.add,s),this._axisGroup.add(s.getGroup()),we.each($w,(function(t){e.get(t+".show")&&this["_"+t](e,a)}),this),ru.groupTransition(r,this._axisGroup,e),eS.superCall(this,"render",e,t,i,n)}},remove:function(){Qw(this)},_splitLine:function(e,t){var i=e.axis;if(!i.scale.isBlank()){var n=e.getModel("splitLine"),r=n.getModel("lineStyle"),a=r.get("color");a=we.isArray(a)?a:[a];for(var o=t.coordinateSystem.getRect(),s=i.isHorizontal(),l=0,u=i.getTicksCoords({tickModel:n}),c=[],h=[],d=r.getLineStyle(),p=0;p<u.length;p++){var f=i.toGlobalCoord(u[p].coord);s?(c[0]=f,c[1]=o.y,h[0]=f,h[1]=o.y+o.height):(c[0]=o.x,c[1]=f,h[0]=o.x+o.width,h[1]=f);var g=l++%a.length,m=u[p].tickValue;this._axisGroup.add(new ru.Line({anid:null!=m?"line_"+u[p].tickValue:null,subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]},style:we.defaults({stroke:a[g]},d),silent:!0}))}}},_minorSplitLine:function(e,t){var i=e.axis,n=e.getModel("minorSplitLine").getModel("lineStyle"),r=t.coordinateSystem.getRect(),a=i.isHorizontal(),o=i.getMinorTicksCoords();if(o.length)for(var s=[],l=[],u=n.getLineStyle(),c=0;c<o.length;c++)for(var h=0;h<o[c].length;h++){var d=i.toGlobalCoord(o[c][h].coord);a?(s[0]=d,s[1]=r.y,l[0]=d,l[1]=r.y+r.height):(s[0]=r.x,s[1]=d,l[0]=r.x+r.width,l[1]=d),this._axisGroup.add(new ru.Line({anid:"minor_line_"+o[c][h].tickValue,subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,silent:!0}))}},_splitArea:function(e,t){Kw(this,this._axisGroup,e,t)}});eS.extend({type:"xAxis"}),eS.extend({type:"yAxis"}),ty.extendComponentView({type:"grid",render:function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new ru.Rect({shape:e.coordinateSystem.getRect(),style:we.defaults({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))}}),ty.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})),ty.registerVisual(Cb("line","circle","line")),ty.registerLayout(Pb("line")),ty.registerProcessor(ty.PRIORITY.PROCESSOR.STATISTIC,Rb("line"));var tS=zd.extend({type:"series.__base_bar__",getInitialData:function(e,t){return zg(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(e){var t=this.coordinateSystem;if(t){var i=t.dataToPoint(t.clampData(e)),n=this.getData(),r=n.getLayout("offset"),a=n.getLayout("size");return i[t.getBaseAxis().isHorizontal()?0:1]+=r+a/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}}),iS=(tS.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}}),A_.getDefaultLabel);function nS(e,t){"outside"===e.textPosition&&(e.textPosition=t)}var rS={setLabel:function(e,t,i,n,r,a,o){var s=i.getModel("label"),l=i.getModel("emphasis.label");ru.setLabelStyle(e,t,s,l,{labelFetcher:r,labelDataIndex:a,defaultText:iS(r.getData(),a),isRectText:!0,autoColor:n}),nS(e),nS(t)}},aS=Ta([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),oS={getBarItemStyle:function(e){var t=aS(this,e);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(t.lineDash=i)}return t}},sS=(0,ru.extendShape)({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(e,t){var i=t.cx,n=t.cy,r=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=.5*(a-r),s=r+o,l=t.startAngle,u=t.endAngle,c=t.clockwise,h=Math.cos(l),d=Math.sin(l),p=Math.cos(u),f=Math.sin(u);(c?u-l<2*Math.PI:l-u<2*Math.PI)&&(e.moveTo(h*r+i,d*r+n),e.arc(h*s+i,d*s+n,o,-Math.PI+l,l,!c)),e.arc(i,n,a,l,u,!c),e.moveTo(p*a+i,f*a+n),e.arc(p*s+i,f*s+n,o,u-2*Math.PI,u-Math.PI,!c),0!==r&&(e.arc(i,n,r,u,l,c),e.moveTo(h*r+i,f*r+n)),e.closePath()}}),lS=rS.setLabel,uS=rp.throttle,cS=x_.createClipPath,hS=["itemStyle","barBorderWidth"],dS=[0,0];we.extend(vu.prototype,oS);ty.extendChartView({type:"bar",render:function(e,t,i){this._updateDrawMode(e);var n=e.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||(this._isLargeDraw?this._renderLarge(e,t,i):this._renderNormal(e,t,i)),this.group},incrementalPrepareRender:function(e,t,i){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,i,n){this._incrementalRenderLarge(e,t)},_updateDrawMode:function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(e,t,i){var n,r=this.group,a=e.getData(),o=this._data,s=e.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?n=l.isHorizontal():"polar"===s.type&&(n="angle"===l.dim);var u=e.isAnimationEnabled()?e:null,c=e.get("clip",!0),h=function(e,t){var i=e.getArea&&e.getArea();if("cartesian2d"===e.type){var n=e.getBaseAxis();if("category"!==n.type||!n.onBand){var r=t.getLayout("bandWidth");n.isHorizontal()?(i.x-=r,i.width+=2*r):(i.y-=r,i.height+=2*r)}}return i}(s,a);r.removeClipPath();var d=e.get("roundCap",!0),p=e.get("showBackground",!0),f=e.getModel("backgroundStyle"),g=f.get("barBorderRadius")||0,m=[],v=this._backgroundEls||[];a.diff(o).add((function(t){var i=a.getItemModel(t),o=xS[s.type](a,t,i);if(p){var l=xS[s.type](a,t),v=function(e,t,i){return new("polar"===e.type?ru.Sector:ru.Rect)({shape:IS(t,i,e),silent:!0,z2:0})}(s,n,l);v.useStyle(f.getBarItemStyle()),"cartesian2d"===s.type&&v.setShape("r",g),m[t]=v}if(a.hasValue(t)){if(c)if(gS[s.type](h,o))return void r.remove(y);var y=mS[s.type](t,o,n,u,!1,d);a.setItemGraphicEl(t,y),r.add(y),bS(y,a,t,i,o,e,n,"polar"===s.type)}})).update((function(t,i){var l=a.getItemModel(t),y=xS[s.type](a,t,l);if(p){var x=v[i];x.useStyle(f.getBarItemStyle()),"cartesian2d"===s.type&&x.setShape("r",g),m[t]=x;var _=xS[s.type](a,t),b=IS(n,_,s);ru.updateProps(x,{shape:b},u,t)}var w=o.getItemGraphicEl(i);if(a.hasValue(t)){if(c)if(gS[s.type](h,y))return void r.remove(w);w?ru.updateProps(w,{shape:y},u,t):w=mS[s.type](t,y,n,u,!0,d),a.setItemGraphicEl(t,w),r.add(w),bS(w,a,t,l,y,e,n,"polar"===s.type)}else r.remove(w)})).remove((function(e){var t=o.getItemGraphicEl(e);"cartesian2d"===s.type?t&&vS(e,u,t):t&&yS(e,u,t)})).execute();var y=this._backgroundGroup||(this._backgroundGroup=new zi);y.removeAll();for(var x=0;x<m.length;++x)y.add(m[x]);r.add(y),this._backgroundEls=m,this._data=a},_renderLarge:function(e,t,i){this._clear(),SS(e,this.group);var n=e.get("clip",!0)?cS(e.coordinateSystem,!1,e):null;n?this.group.setClipPath(n):this.group.removeClipPath()},_incrementalRenderLarge:function(e,t){this._removeBackground(),SS(t,this.group,!0)},dispose:we.noop,remove:function(e){this._clear(e)},_clear:function(e){var t=this.group,i=this._data;e&&e.get("animation")&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl((function(t){"sector"===t.type?yS(t.dataIndex,e,t):vS(t.dataIndex,e,t)}))):t.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var pS=Math.max,fS=Math.min,gS={cartesian2d:function(e,t){var i=t.width<0?-1:1,n=t.height<0?-1:1;i<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var r=pS(t.x,e.x),a=fS(t.x+t.width,e.x+e.width),o=pS(t.y,e.y),s=fS(t.y+t.height,e.y+e.height);t.x=r,t.y=o,t.width=a-r,t.height=s-o;var l=t.width<0||t.height<0;return i<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),l},polar:function(e){return!1}},mS={cartesian2d:function(e,t,i,n,r){var a=new ru.Rect({shape:we.extend({},t),z2:1});if(a.name="item",n){var o=i?"height":"width",s={};a.shape[o]=0,s[o]=t[o],ru[r?"updateProps":"initProps"](a,{shape:s},n,e)}return a},polar:function(e,t,i,n,r,a){var o=t.startAngle<t.endAngle,s=new(!i&&a?sS:ru.Sector)({shape:we.defaults({clockwise:o},t),z2:1});if(s.name="item",n){var l=i?"r":"endAngle",u={};s.shape[l]=i?0:t.startAngle,u[l]=t[l],ru[r?"updateProps":"initProps"](s,{shape:u},n,e)}return s}};function vS(e,t,i){i.style.text=null,ru.updateProps(i,{shape:{width:0}},t,e,(function(){i.parent&&i.parent.remove(i)}))}function yS(e,t,i){i.style.text=null,ru.updateProps(i,{shape:{r:i.shape.r0}},t,e,(function(){i.parent&&i.parent.remove(i)}))}var xS={cartesian2d:function(e,t,i){var n=e.getItemLayout(t),r=i?function(e,t){var i=e.get(hS)||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),r=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(i,n,r)}(i,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*r/2,y:n.y+o*r/2,width:n.width-a*r,height:n.height-o*r}},polar:function(e,t,i){var n=e.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}};function _S(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}function bS(e,t,i,n,r,a,o,s){var l=t.getItemVisual(i,"color"),u=t.getItemVisual(i,"opacity"),c=t.getVisual("borderColor"),h=n.getModel("itemStyle"),d=n.getModel("emphasis.itemStyle").getBarItemStyle();s||e.setShape("r",h.get("barBorderRadius")||0),e.useStyle(we.defaults({stroke:_S(r)?"none":c,fill:_S(r)?"none":l,opacity:u},h.getBarItemStyle()));var p=n.getShallow("cursor");p&&e.attr("cursor",p);var f=o?r.height>0?"bottom":"top":r.width>0?"left":"right";s||lS(e.style,d,n,l,a,i,f),_S(r)&&(d.fill=d.stroke="none"),ru.setHoverStyle(e,d)}var wS=Go.extend({type:"largeBar",shape:{points:[]},buildPath:function(e,t){for(var i=t.points,n=this.__startPoint,r=this.__baseDimIdx,a=0;a<i.length;a+=2)n[r]=i[a+r],e.moveTo(n[0],n[1]),e.lineTo(i[a],i[a+1])}});function SS(e,t,i){var n=e.getData(),r=[],a=n.getLayout("valueAxisHorizontal")?1:0;r[1-a]=n.getLayout("valueAxisStart");var o=n.getLayout("largeDataIndices"),s=n.getLayout("barWidth"),l=e.getModel("backgroundStyle");if(e.get("showBackground",!0)){var u=n.getLayout("largeBackgroundPoints"),c=[];c[1-a]=n.getLayout("backgroundStart");var h=new wS({shape:{points:u},incremental:!!i,__startPoint:c,__baseDimIdx:a,__largeDataIndices:o,__barWidth:s,silent:!0,z2:0});!function(e,t,i){var n=t.get("borderColor")||t.get("color"),r=t.getItemStyle(["color","borderColor"]);e.useStyle(r),e.style.fill=null,e.style.stroke=n,e.style.lineWidth=i.getLayout("barWidth")}(h,l,n),t.add(h)}var d=new wS({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:r,__baseDimIdx:a,__largeDataIndices:o,__barWidth:s});t.add(d),function(e,t,i){var n=i.getVisual("borderColor")||i.getVisual("color"),r=t.getModel("itemStyle").getItemStyle(["color","borderColor"]);e.useStyle(r),e.style.fill=null,e.style.stroke=n,e.style.lineWidth=i.getLayout("barWidth")}(d,e,n),d.seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",MS),d.on("mousemove",MS))}var MS=uS((function(e){var t=function(e,t,i){var n=e.__baseDimIdx,r=1-n,a=e.shape.points,o=e.__largeDataIndices,s=Math.abs(e.__barWidth/2),l=e.__startPoint[r];dS[0]=t,dS[1]=i;for(var u=dS[n],c=dS[1-n],h=u-s,d=u+s,p=0,f=a.length/2;p<f;p++){var g=2*p,m=a[g+n],v=a[g+r];if(m>=h&&m<=d&&(l<=v?c>=l&&c<=v:c>=v&&c<=l))return o[p]}return-1}(this,e.offsetX,e.offsetY);this.dataIndex=t>=0?t:null}),30,!1);function IS(e,t,i){var n,r="polar"===i.type;return n=r?i.getArea():i.grid.getRect(),r?{cx:n.cx,cy:n.cy,r0:e?n.r0:t.r0,r:e?n.r:t.r,startAngle:e?t.startAngle:0,endAngle:e?t.endAngle:2*Math.PI}:{x:e?t.x:n.x,y:e?n.y:t.y,width:e?t.width:n.width,height:e?n.height:t.height}}var TS=ym.layout,AS=ym.largeLayout;ty.registerLayout(ty.PRIORITY.VISUAL.LAYOUT,we.curry(TS,"bar")),ty.registerLayout(ty.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,AS),ty.registerVisual({seriesType:"bar",reset:function(e){e.getData().setVisual("legendSymbol","roundRect")}});var CS=function(e,t){this.getAllNames=function(){var e=t();return e.mapArray(e.getName)},this.containName=function(e){return t().indexOfName(e)>=0},this.indexOfName=function(t){return e().indexOfName(t)},this.getItemVisual=function(t,i){return e().getItemVisual(t,i)}},DS=Su.getPercentWithPrecision,LS=ad.retrieveRawAttr,PS=Ec.makeSeriesEncodeForNameBased,kS=ty.extendSeriesModel({type:"series.pie",init:function(e){kS.superApply(this,"init",arguments),this.legendVisualProvider=new CS(we.bind(this.getData,this),we.bind(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(e)},mergeOption:function(e){kS.superCall(this,"mergeOption",e),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(e,t){return ry(this,{coordDimensions:["value"],encodeDefaulter:we.curry(PS,this)})},_createSelectableList:function(){for(var e=this.getRawData(),t=e.mapDimension("value"),i=[],n=0,r=e.count();n<r;n++)i.push({name:e.getName(n),value:e.get(t,n),selected:LS(e,n,"selected")});return i},getDataParams:function(e){var t=this.getData(),i=kS.superCall(this,"getDataParams",e),n=[];return t.each(t.mapDimension("value"),(function(e){n.push(e)})),i.percent=DS(n,e,t.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(e){xa.defaultEmphasis(e,"labelLine",["show"]);var t=e.labelLine,i=e.emphasis.labelLine;t.show=t.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});function OS(e,t,i,n){var r=t.getData(),a=this.dataIndex,o=r.getName(a),s=t.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:e,name:o,seriesId:t.id}),r.each((function(e){RS(r.getItemGraphicEl(e),r.getItemLayout(e),t.isSelected(r.getName(e)),s,i)}))}function RS(e,t,i,n,r){var a=(t.startAngle+t.endAngle)/2,o=i?n:0,s=[Math.cos(a)*o,Math.sin(a)*o];r?e.animate().when(200,{position:s}).start("bounceOut"):e.attr("position",s)}function NS(e,t){ru.Group.call(this);var i=new ru.Sector({z2:2}),n=new ru.Polyline,r=new ru.Text;this.add(i),this.add(n),this.add(r),this.updateData(e,t,!0)}we.mixin(kS,ay);var ES=NS.prototype;ES.updateData=function(e,t,i){var n=this.childAt(0),r=this.childAt(1),a=this.childAt(2),o=e.hostModel,s=e.getItemModel(t),l=e.getItemLayout(t),u=we.extend({},l);u.label=null;var c=o.getShallow("animationTypeUpdate");i?(n.setShape(u),"scale"===o.getShallow("animationType")?(n.shape.r=l.r0,ru.initProps(n,{shape:{r:l.r}},o,t)):(n.shape.endAngle=l.startAngle,ru.updateProps(n,{shape:{endAngle:l.endAngle}},o,t))):"expansion"===c?n.setShape(u):ru.updateProps(n,{shape:u},o,t);var h=e.getItemVisual(t,"color");n.useStyle(we.defaults({lineJoin:"bevel",fill:h},s.getModel("itemStyle").getItemStyle())),n.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var d=s.getShallow("cursor");d&&n.attr("cursor",d),RS(this,e.getItemLayout(t),o.isSelected(e.getName(t)),o.get("selectedOffset"),o.get("animation"));var p=!i&&"transition"===c;this._updateLabel(e,t,p),this.highDownOnUpdate=o.get("silent")?null:function(e,t){var i=o.isAnimationEnabled()&&s.get("hoverAnimation");"emphasis"===t?(r.ignore=r.hoverIgnore,a.ignore=a.hoverIgnore,i&&(n.stopAnimation(!0),n.animateTo({shape:{r:l.r+o.get("hoverOffset")}},300,"elasticOut"))):(r.ignore=r.normalIgnore,a.ignore=a.normalIgnore,i&&(n.stopAnimation(!0),n.animateTo({shape:{r:l.r}},300,"elasticOut")))},ru.setHoverStyle(this)},ES._updateLabel=function(e,t,i){var n=this.childAt(1),r=this.childAt(2),a=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,l=e.getItemVisual(t,"color");if(!s||isNaN(s.x)||isNaN(s.y))r.ignore=r.normalIgnore=r.hoverIgnore=n.ignore=n.normalIgnore=n.hoverIgnore=!0;else{var u={points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]},c={x:s.x,y:s.y};i?(ru.updateProps(n,{shape:u},a,t),ru.updateProps(r,{style:c},a,t)):(n.attr({shape:u}),r.attr({style:c})),r.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var h=o.getModel("label"),d=o.getModel("emphasis.label"),p=o.getModel("labelLine"),f=o.getModel("emphasis.labelLine");l=e.getItemVisual(t,"color");ru.setLabelStyle(r.style,r.hoverStyle={},h,d,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:s.text,autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:e.getItemVisual(t,"opacity")}),r.ignore=r.normalIgnore=!h.get("show"),r.hoverIgnore=!d.get("show"),n.ignore=n.normalIgnore=!p.get("show"),n.hoverIgnore=!f.get("show"),n.setStyle({stroke:l,opacity:e.getItemVisual(t,"opacity")}),n.setStyle(p.getModel("lineStyle").getLineStyle()),n.hoverStyle=f.getModel("lineStyle").getLineStyle();var g=p.get("smooth");g&&!0===g&&(g=.4),n.setShape({smooth:g})}},we.inherits(NS,ru.Group);ep.extend({type:"pie",init:function(){var e=new ru.Group;this._sectorGroup=e},render:function(e,t,i,n){if(!n||n.from!==this.uid){var r=e.getData(),a=this._data,o=this.group,s=t.get("animation"),l=!a,u=e.get("animationType"),c=e.get("animationTypeUpdate"),h=we.curry(OS,this.uid,e,s,i),d=e.get("selectedMode");if(r.diff(a).add((function(e){var t=new NS(r,e);l&&"scale"!==u&&t.eachChild((function(e){e.stopAnimation(!0)})),d&&t.on("click",h),r.setItemGraphicEl(e,t),o.add(t)})).update((function(e,t){var i=a.getItemGraphicEl(t);l||"transition"===c||i.eachChild((function(e){e.stopAnimation(!0)})),i.updateData(r,e),i.off("click"),d&&i.on("click",h),o.add(i),r.setItemGraphicEl(e,i)})).remove((function(e){var t=a.getItemGraphicEl(e);o.remove(t)})).execute(),s&&r.count()>0&&(l?"scale"!==u:"transition"!==c)){for(var p=r.getItemLayout(0),f=1;isNaN(p.startAngle)&&f<r.count();++f)p=r.getItemLayout(f);var g=Math.max(i.getWidth(),i.getHeight())/2,m=we.bind(o.removeClipPath,o);o.setClipPath(this._createClipPath(p.cx,p.cy,g,p.startAngle,p.clockwise,m,e,l))}else o.removeClipPath();this._data=r}},dispose:function(){},_createClipPath:function(e,t,i,n,r,a,o,s){var l=new ru.Sector({shape:{cx:e,cy:t,r0:0,r:i,startAngle:n,endAngle:n,clockwise:r}});return(s?ru.initProps:ru.updateProps)(l,{shape:{endAngle:n+(r?1:-1)*Math.PI*2}},o,a),l},containPoint:function(e,t){var i=t.getData().getItemLayout(0);if(i){var n=e[0]-i.cx,r=e[1]-i.cy,a=Math.sqrt(n*n+r*r);return a<=i.r&&a>=i.r0}}});var zS=we.createHashMap;var BS=function(e){return{getTargetSeries:function(t){var i={},n=zS();return t.eachSeriesByType(e,(function(e){e.__paletteScope=i,n.set(e.uid,e)})),n},reset:function(e,t){var i=e.getRawData(),n={},r=e.getData();r.each((function(e){var t=r.getRawIndex(e);n[t]=e})),i.each((function(t){var a,o=n[t],s=null!=o&&r.getItemVisual(o,"color",!0),l=null!=o&&r.getItemVisual(o,"borderColor",!0);if(s&&l||(a=i.getItemModel(t)),!s){var u=a.get("itemStyle.color")||e.getColorFromPalette(i.getName(t)||t+"",e.__paletteScope,i.count());null!=o&&r.setItemVisual(o,"color",u)}if(!l){var c=a.get("itemStyle.borderColor");null!=o&&r.setItemVisual(o,"borderColor",c)}}))}}},VS=Su.parsePercent,FS=Math.PI/180;function GS(e,t,i,n,r,a,o,s,l,u){function c(t,i,n,r){for(var a=t;a<i&&!(e[a].y+n>l+o);a++)if(e[a].y+=n,a>t&&a+1<i&&e[a+1].y>e[a].y+e[a].height)return void h(a,n/2);h(i-1,n/2)}function h(t,i){for(var n=t;n>=0&&!(e[n].y-i<l)&&(e[n].y-=i,!(n>0&&e[n].y>e[n-1].y+e[n-1].height));n--);}function d(e,t,i,n,r,a){for(var o=t?Number.MAX_VALUE:0,s=0,l=e.length;s<l;s++)if("none"===e[s].labelAlignTo){var u=Math.abs(e[s].y-n),c=e[s].len,h=e[s].len2,d=u<r+c?Math.sqrt((r+c+h)*(r+c+h)-u*u):Math.abs(e[s].x-i);t&&d>=o&&(d=o-10),!t&&d<=o&&(d=o+10),e[s].x=i+d*a,o=d}}e.sort((function(e,t){return e.y-t.y}));for(var p,f=0,g=e.length,m=[],v=[],y=0;y<g;y++){if("outer"===e[y].position&&"labelLine"===e[y].labelAlignTo){var x=e[y].x-u;e[y].linePoints[1][0]+=x,e[y].x=u}(p=e[y].y-f)<0&&c(y,g,-p),f=e[y].y+e[y].height}o-f<0&&h(g-1,f-o);for(y=0;y<g;y++)e[y].y>=i?v.push(e[y]):m.push(e[y]);d(m,!1,t,i,n,r),d(v,!0,t,i,n,r)}function HS(e){return"center"===e.position}var WS=function(e,t,i,n,r,a){var o,s,l=e.getData(),u=[],c=!1,h=(e.get("minShowLabelAngle")||0)*FS;l.each((function(n){var a=l.getItemLayout(n),d=l.getItemModel(n),p=d.getModel("label"),f=p.get("position")||d.get("emphasis.label.position"),g=p.get("distanceToLabelLine"),m=p.get("alignTo"),v=VS(p.get("margin"),i),y=p.get("bleedMargin"),x=p.getFont(),_=d.getModel("labelLine"),b=_.get("length");b=VS(b,i);var w=_.get("length2");if(w=VS(w,i),!(a.angle<h)){var S,M,I,T,A=(a.startAngle+a.endAngle)/2,C=Math.cos(A),D=Math.sin(A);o=a.cx,s=a.cy;var L,P=e.getFormattedLabel(n,"normal")||l.getName(n),k=Fn.getBoundingRect(P,x,T,"top"),O="inside"===f||"inner"===f;if("center"===f)S=a.cx,M=a.cy,T="center";else{var R=(O?(a.r+a.r0)/2*C:a.r*C)+o,N=(O?(a.r+a.r0)/2*D:a.r*D)+s;if(S=R+3*C,M=N+3*D,!O){var E=R+C*(b+t-a.r),z=N+D*(b+t-a.r),B=E+(C<0?-1:1)*w;S="edge"===m?C<0?r+v:r+i-v:B+(C<0?-g:g),M=z,I=[[R,N],[E,z],[B,z]]}T=O?"center":"edge"===m?C>0?"right":"left":C>0?"left":"right"}var V=p.get("rotate");L="number"==typeof V?V*(Math.PI/180):V?C<0?-A+Math.PI:-A:0,c=!!L,a.label={x:S,y:M,position:f,height:k.height,len:b,len2:w,linePoints:I,textAlign:T,verticalAlign:"middle",rotation:L,inside:O,labelDistance:g,labelAlignTo:m,labelMargin:v,bleedMargin:y,textRect:k,text:P,font:x},O||u.push(a.label)}})),!c&&e.get("avoidLabelOverlap")&&function(e,t,i,n,r,a,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,d=0;d<e.length;d++)HS(e[d])||(e[d].x<t?(c=Math.min(c,e[d].x),l.push(e[d])):(h=Math.max(h,e[d].x),u.push(e[d])));for(GS(u,t,i,n,1,0,a,0,s,h),GS(l,t,i,n,-1,0,a,0,s,c),d=0;d<e.length;d++){var p=e[d];if(!HS(p)){var f=p.linePoints;if(f){var g,m="edge"===p.labelAlignTo,v=p.textRect.width;(g=m?p.x<t?f[2][0]-p.labelDistance-o-p.labelMargin:o+r-p.labelMargin-f[2][0]-p.labelDistance:p.x<t?p.x-o-p.bleedMargin:o+r-p.x-p.bleedMargin)<p.textRect.width&&(p.text=Fn.truncateText(p.text,g,p.font),"edge"===p.labelAlignTo&&(v=Fn.getWidth(p.text,p.font)));var y=f[1][0]-f[2][0];m?p.x<t?f[2][0]=o+p.labelMargin+v+p.labelDistance:f[2][0]=o+r-p.labelMargin-v-p.labelDistance:(p.x<t?f[2][0]=p.x+p.labelDistance:f[2][0]=p.x-p.labelDistance,f[1][0]=f[2][0]+y),f[1][1]=f[2][1]=p.y}}}}(u,o,s,t,i,n,r,a)},jS=Su.parsePercent,US=Su.linearMap,ZS=2*Math.PI,YS=Math.PI/180;var qS=function(e,t,i,n){t.eachSeriesByType(e,(function(e){var t=e.getData(),n=t.mapDimension("value"),r=function(e,t){return Hu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,i),a=e.get("center"),o=e.get("radius");we.isArray(o)||(o=[0,o]),we.isArray(a)||(a=[a,a]);var s=jS(r.width,i.getWidth()),l=jS(r.height,i.getHeight()),u=Math.min(s,l),c=jS(a[0],s)+r.x,h=jS(a[1],l)+r.y,d=jS(o[0],u/2),p=jS(o[1],u/2),f=-e.get("startAngle")*YS,g=e.get("minAngle")*YS,m=0;t.each(n,(function(e){!isNaN(e)&&m++}));var v=t.getSum(n),y=Math.PI/(v||m)*2,x=e.get("clockwise"),_=e.get("roseType"),b=e.get("stillShowZeroSum"),w=t.getDataExtent(n);w[0]=0;var S=ZS,M=0,I=f,T=x?1:-1;if(t.each(n,(function(e,i){var n;if(isNaN(e))t.setItemLayout(i,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:c,cy:h,r0:d,r:_?NaN:p,viewRect:r});else{(n="area"!==_?0===v&&b?y:e*y:ZS/m)<g?(n=g,S-=g):M+=e;var a=I+T*n;t.setItemLayout(i,{angle:n,startAngle:I,endAngle:a,clockwise:x,cx:c,cy:h,r0:d,r:_?US(e,w,[d,p]):p,viewRect:r}),I=a}})),S<ZS&&m)if(S<=.001){var A=ZS/m;t.each(n,(function(e,i){if(!isNaN(e)){var n=t.getItemLayout(i);n.angle=A,n.startAngle=f+T*i*A,n.endAngle=f+T*(i+1)*A}}))}else y=S/M,I=f,t.each(n,(function(e,i){if(!isNaN(e)){var n=t.getItemLayout(i),r=n.angle===g?g:e*y;n.startAngle=I,n.endAngle=I+T*r,I+=T*r}}));WS(e,p,r.width,r.height,r.x,r.y)}))};var XS=function(e){return{seriesType:e,reset:function(e,t){var i=t.findComponents({mainType:"legend"});if(i&&i.length){var n=e.getData();n.filterSelf((function(e){for(var t=n.getName(e),r=0;r<i.length;r++)if(!i[r].isSelected(t))return!1;return!0}))}}}};Cx("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),ty.registerVisual(BS("pie")),ty.registerLayout(we.curry(qS,"pie")),ty.registerProcessor(XS("pie"));zd.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(e,t){return zg(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},getProgressiveThreshold:function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});var KS=iv.createSymbol,QS=ru.extendShape({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(e,t){var i=t.points,n=t.size,r=this.symbolProxy,a=r.shape;if(!((e.getContext?e.getContext():e)&&n[0]<4))for(var o=0;o<i.length;){var s=i[o++],l=i[o++];isNaN(s)||isNaN(l)||(this.softClipShape&&!this.softClipShape.contain(s,l)||(a.x=s-n[0]/2,a.y=l-n[1]/2,a.width=n[0],a.height=n[1],r.buildPath(e,a,!0)))}},afterBrush:function(e){var t=this.shape,i=t.points,n=t.size;if(n[0]<4){this.setTransform(e);for(var r=0;r<i.length;){var a=i[r++],o=i[r++];isNaN(a)||isNaN(o)||(this.softClipShape&&!this.softClipShape.contain(a,o)||e.fillRect(a-n[0]/2,o-n[1]/2,n[0],n[1]))}this.restoreTransform(e)}},findDataIndex:function(e,t){for(var i=this.shape,n=i.points,r=i.size,a=Math.max(r[0],4),o=Math.max(r[1],4),s=n.length/2-1;s>=0;s--){var l=2*s,u=n[l]-a/2,c=n[l+1]-o/2;if(e>=u&&t>=c&&e<=u+a&&t<=c+o)return s}return-1}});function JS(){this.group=new ru.Group}var $S=JS.prototype;$S.isPersistent=function(){return!this._incremental},$S.updateData=function(e,t){this.group.removeAll();var i=new QS({rectHover:!0,cursor:"default"});i.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(i,e,!1,t),this.group.add(i),this._incremental=null},$S.updateLayout=function(e){if(!this._incremental){var t=e.getLayout("symbolPoints");this.group.eachChild((function(e){if(null!=e.startIndex){var i=2*(e.endIndex-e.startIndex),n=4*e.startIndex*2;t=new Float32Array(t.buffer,n,i)}e.setShape("points",t)}))}},$S.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>2e6?(this._incremental||(this._incremental=new nl({silent:!0})),this.group.add(this._incremental)):this._incremental=null},$S.incrementalUpdate=function(e,t,i){var n;this._incremental?(n=new QS,this._incremental.addDisplayable(n,!0)):((n=new QS({rectHover:!0,cursor:"default",startIndex:e.start,endIndex:e.end})).incremental=!0,this.group.add(n)),n.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(n,t,!!this._incremental,i)},$S._setCommon=function(e,t,i,n){var r=t.hostModel;n=n||{};var a=t.getVisual("symbolSize");e.setShape("size",a instanceof Array?a:[a,a]),e.softClipShape=n.clipShape||null,e.symbolProxy=KS(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<4;e.useStyle(r.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("color");s&&e.setColor(s),i||(e.seriesIndex=r.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>=0&&(e.dataIndex=i+(e.startIndex||0))})))},$S.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},$S._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var eM=JS;function tM(e,t,i){zv.call(this,e,t,i),this.type="value",this.angle=0,this.name="",this.model}ty.extendChartView({type:"scatter",render:function(e,t,i){var n=e.getData();this._updateSymbolDraw(n,e).updateData(n,{clipShape:this._getClipShape(e)}),this._finished=!0},incrementalPrepareRender:function(e,t,i){var n=e.getData();this._updateSymbolDraw(n,e).incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(e,t,i){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,i){var n=e.getData();if(this.group.dirty(),!this._finished||n.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=Pb().reset(e);r.progress&&r.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_getClipShape:function(e){var t=e.coordinateSystem,i=t&&t.getArea&&t.getArea();return e.get("clip",!0)?i:null},_updateSymbolDraw:function(e,t){var i=this._symbolDraw,n=t.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new eM:new q_,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),ty.registerVisual(Cb("scatter","circle")),ty.registerLayout(Pb("scatter")),we.inherits(tM,zv);var iM=tM,nM=jm.getScaleExtent,rM=jm.niceScaleExtent;function aM(e,t,i){this._model=e,this.dimensions=[],this._indicatorAxes=we.map(e.getIndicatorModels(),(function(e,t){var i="indicator_"+t,n=new iM(i,"log"===e.get("axisType")?new Nm:new rm);return n.name=e.get("name"),n.model=e,e.axis=n,this.dimensions.push(i),n}),this),this.resize(e,i),this.cx,this.cy,this.r,this.r0,this.startAngle}aM.prototype.getIndicatorAxes=function(){return this._indicatorAxes},aM.prototype.dataToPoint=function(e,t){var i=this._indicatorAxes[t];return this.coordToPoint(i.dataToCoord(e),t)},aM.prototype.coordToPoint=function(e,t){var i=this._indicatorAxes[t].angle;return[this.cx+e*Math.cos(i),this.cy-e*Math.sin(i)]},aM.prototype.pointToData=function(e){var t=e[0]-this.cx,i=e[1]-this.cy,n=Math.sqrt(t*t+i*i);t/=n,i/=n;for(var r,a=Math.atan2(-i,t),o=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],c=Math.abs(a-u.angle);c<o&&(r=u,s=l,o=c)}return[s,+(r&&r.coordToData(n))]},aM.prototype.resize=function(e,t){var i=e.get("center"),n=t.getWidth(),r=t.getHeight(),a=Math.min(n,r)/2;this.cx=Su.parsePercent(i[0],n),this.cy=Su.parsePercent(i[1],r),this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");"string"!=typeof o&&"number"!=typeof o||(o=[0,o]),this.r0=Su.parsePercent(o[0],a),this.r=Su.parsePercent(o[1],a),we.each(this._indicatorAxes,(function(e,t){e.setExtent(this.r0,this.r);var i=this.startAngle+t*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),e.angle=i}),this)},aM.prototype.update=function(e,t){var i=this._indicatorAxes,n=this._model;we.each(i,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeriesByType("radar",(function(t,r){if("radar"===t.get("coordinateSystem")&&e.getComponent("radar",t.get("radarIndex"))===n){var a=t.getData();we.each(i,(function(e){e.scale.unionExtentFromData(a,a.mapDimension(e.dim))}))}}),this);var r=n.get("splitNumber");function a(e){var t=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),i=e/t;return 2===i?i=5:i*=2,i*t}we.each(i,(function(e,t){var i=nM(e.scale,e.model).extent;rM(e.scale,e.model);var n=e.model,o=e.scale,s=n.getMin(),l=n.getMax(),u=o.getInterval();if(null!=s&&null!=l)o.setExtent(+s,+l),o.setInterval((l-s)/r);else if(null!=s){do{c=s+u*r,o.setExtent(+s,c),o.setInterval(u),u=a(u)}while(c<i[1]&&isFinite(c)&&isFinite(i[1]))}else if(null!=l){do{h=l-u*r,o.setExtent(h,+l),o.setInterval(u),u=a(u)}while(h>i[0]&&isFinite(h)&&isFinite(i[0]))}else{o.getTicks().length-1>r&&(u=a(u));var c=Math.ceil(i[1]/u)*u,h=Su.round(c-u*r);o.setExtent(h,c),o.setInterval(u)}}))},aM.dimensions=[],aM.create=function(e,t){var i=[];return e.eachComponent("radar",(function(n){var r=new aM(n,e,t);i.push(r),n.coordinateSystem=r})),e.eachSeriesByType("radar",(function(e){"radar"===e.get("coordinateSystem")&&(e.coordinateSystem=i[e.get("radarIndex")||0])})),i},oh.register("radar",aM);var oM=jb.valueAxis;function sM(e,t){return we.defaults({show:t},e)}ty.extendComponentModel({type:"radar",optionUpdated:function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),r=this.get("axisTick"),a=this.get("axisType"),o=this.get("axisLabel"),s=this.get("name"),l=this.get("name.show"),u=this.get("name.formatter"),c=this.get("nameGap"),h=this.get("triggerEvent"),d=we.map(this.get("indicator")||[],(function(d){null!=d.max&&d.max>0&&!d.min?d.min=0:null!=d.min&&d.min<0&&!d.max&&(d.max=0);var p=s;if(null!=d.color&&(p=we.defaults({color:d.color},s)),d=we.merge(we.clone(d),{boundaryGap:e,splitNumber:t,scale:i,axisLine:n,axisTick:r,axisType:a,axisLabel:o,name:d.text,nameLocation:"end",nameGap:c,nameTextStyle:p,triggerEvent:h},!1),l||(d.name=""),"string"==typeof u){var f=d.name;d.name=u.replace("{value}",null!=f?f:"")}else"function"==typeof u&&(d.name=u(d.name,d));var g=we.extend(new vu(d,null,this.ecModel),Um);return g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this.getIndicatorModels=function(){return d}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:we.merge({lineStyle:{color:"#bbb"}},oM.axisLine),axisLabel:sM(oM.axisLabel,!1),axisTick:sM(oM.axisTick,!1),axisType:"interval",splitLine:sM(oM.splitLine,!0),splitArea:sM(oM.splitArea,!0),indicator:[]}});var lM=["axisLine","axisTickLabel","axisName"],uM=(ty.extendComponentView({type:"radar",render:function(e,t,i){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},_buildAxes:function(e){var t=e.coordinateSystem,i=t.getIndicatorAxes(),n=we.map(i,(function(e){return new Nw(e.model,{position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));we.each(n,(function(e){we.each(lM,e.add,e),this.group.add(e.getGroup())}),this)},_buildSplitLineAndArea:function(e){var t=e.coordinateSystem,i=t.getIndicatorAxes();if(i.length){var n=e.get("shape"),r=e.getModel("splitLine"),a=e.getModel("splitArea"),o=r.getModel("lineStyle"),s=a.getModel("areaStyle"),l=r.get("show"),u=a.get("show"),c=o.get("color"),h=s.get("color");c=we.isArray(c)?c:[c],h=we.isArray(h)?h:[h];var d=[],p=[];if("circle"===n)for(var f=i[0].getTicksCoords(),g=t.cx,m=t.cy,v=0;v<f.length;v++){if(l)d[I(d,c,v)].push(new ru.Circle({shape:{cx:g,cy:m,r:f[v].coord}}));if(u&&v<f.length-1)p[I(p,h,v)].push(new ru.Ring({shape:{cx:g,cy:m,r0:f[v].coord,r:f[v+1].coord}}))}else{var y,x=we.map(i,(function(e,i){var n=e.getTicksCoords();return y=null==y?n.length-1:Math.min(n.length-1,y),we.map(n,(function(e){return t.coordToPoint(e.coord,i)}))})),_=[];for(v=0;v<=y;v++){for(var b=[],w=0;w<i.length;w++)b.push(x[w][v]);if(b[0]&&b.push(b[0].slice()),l)d[I(d,c,v)].push(new ru.Polyline({shape:{points:b}}));if(u&&_)p[I(p,h,v-1)].push(new ru.Polygon({shape:{points:b.concat(_)}}));_=b.slice().reverse()}}var S=o.getLineStyle(),M=s.getAreaStyle();we.each(p,(function(e,t){this.group.add(ru.mergePath(e,{style:we.defaults({stroke:"none",fill:h[t%h.length]},M),silent:!0}))}),this),we.each(d,(function(e,t){this.group.add(ru.mergePath(e,{style:we.defaults({fill:"none",stroke:c[t%c.length]},S),silent:!0}))}),this)}function I(e,t,i){var n=i%t.length;return e[n]=e[n]||[],n}}}),Pu.encodeHTML),cM=zd.extend({type:"series.radar",dependencies:["radar"],init:function(e){cM.superApply(this,"init",arguments),this.legendVisualProvider=new CS(we.bind(this.getData,this),we.bind(this.getRawData,this))},getInitialData:function(e,t){return ry(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(e){var t=this.getData(),i=this.coordinateSystem.getIndicatorAxes(),n=this.getData().getName(e);return uM(""===n?this.name:n)+"<br/>"+we.map(i,(function(i,n){var r=t.get(t.mapDimension(i.dim),e);return uM(i.name+" : "+r)})).join("<br />")},getTooltipPosition:function(e){if(null!=e)for(var t=this.getData(),i=this.coordinateSystem,n=t.getValues(we.map(i.dimensions,(function(e){return t.mapDimension(e)})),e,!0),r=0,a=n.length;r<a;r++)if(!isNaN(n[r])){var o=i.getIndicatorAxes();return i.coordToPoint(o[r].dataToCoord(n[r]),r)}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});ty.extendChartView({type:"radar",render:function(e,t,i){var n=e.coordinateSystem,r=this.group,a=e.getData(),o=this._data;function s(e,t){var i=e.getItemVisual(t,"symbol")||"circle",n=e.getItemVisual(t,"color");if("none"!==i){var r=function(e){return we.isArray(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),a=iv.createSymbol(i,-1,-1,2,2,n);return a.attr({style:{strokeNoScale:!0},z2:100,scale:[r[0]/2,r[1]/2]}),a}}function l(t,i,n,r,a,o){n.removeAll();for(var l=0;l<i.length-1;l++){var u=s(r,a);u&&(u.__dimIdx=l,t[l]?(u.attr("position",t[l]),ru[o?"initProps":"updateProps"](u,{position:i[l]},e,a)):u.attr("position",i[l]),n.add(u))}}function u(e){return we.map(e,(function(e){return[n.cx,n.cy]}))}a.diff(o).add((function(t){var i=a.getItemLayout(t);if(i){var n=new ru.Polygon,r=new ru.Polyline,o={shape:{points:i}};n.shape.points=u(i),r.shape.points=u(i),ru.initProps(n,o,e,t),ru.initProps(r,o,e,t);var s=new ru.Group,c=new ru.Group;s.add(r),s.add(n),s.add(c),l(r.shape.points,i,c,a,t,!0),a.setItemGraphicEl(t,s)}})).update((function(t,i){var n=o.getItemGraphicEl(i),r=n.childAt(0),s=n.childAt(1),u=n.childAt(2),c={shape:{points:a.getItemLayout(t)}};c.shape.points&&(l(r.shape.points,c.shape.points,u,a,t,!1),ru.updateProps(r,c,e),ru.updateProps(s,c,e),a.setItemGraphicEl(t,n))})).remove((function(e){r.remove(o.getItemGraphicEl(e))})).execute(),a.eachItemGraphicEl((function(e,t){var i=a.getItemModel(t),n=e.childAt(0),o=e.childAt(1),s=e.childAt(2),l=a.getItemVisual(t,"color");r.add(e),n.useStyle(we.defaults(i.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:l})),n.hoverStyle=i.getModel("emphasis.lineStyle").getLineStyle();var u=i.getModel("areaStyle"),c=i.getModel("emphasis.areaStyle"),h=u.isEmpty()&&u.parentModel.isEmpty(),d=c.isEmpty()&&c.parentModel.isEmpty();d=d&&h,o.ignore=h,o.useStyle(we.defaults(u.getAreaStyle(),{fill:l,opacity:.7})),o.hoverStyle=c.getAreaStyle();var p=i.getModel("itemStyle").getItemStyle(["color"]),f=i.getModel("emphasis.itemStyle").getItemStyle(),g=i.getModel("label"),m=i.getModel("emphasis.label");s.eachChild((function(e){e.setStyle(p),e.hoverStyle=we.clone(f);var i=a.get(a.dimensions[e.__dimIdx],t);(null==i||isNaN(i))&&(i=""),ru.setLabelStyle(e.style,e.hoverStyle,g,m,{labelFetcher:a.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:i,autoColor:l,isRectText:!0})})),e.highDownOnUpdate=function(e,t){o.attr("ignore","emphasis"===t?d:h)},ru.setHoverStyle(e)})),this._data=a},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});function hM(e){return!isNaN(e[0])&&!isNaN(e[1])}function dM(e){return[e.cx,e.cy]}var pM=function(e){e.eachSeriesByType("radar",(function(e){var t=e.getData(),i=[],n=e.coordinateSystem;if(n){var r=n.getIndicatorAxes();we.each(r,(function(e,a){t.each(t.mapDimension(r[a].dim),(function(e,t){i[t]=i[t]||[];var r=n.dataToPoint(e,a);i[t][a]=hM(r)?r:dM(n)}))})),t.each((function(e){var r=we.find(i[e],(function(e){return hM(e)}))||dM(n);i[e].push(r.slice()),t.setItemLayout(e,i[e])}))}}))};var fM=function(e){var t=e.polar;if(t){we.isArray(t)||(t=[t]);var i=[];we.each(t,(function(t,n){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],we.isArray(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):i.push(t)})),e.polar=i}we.each(e.series,(function(e){e&&"radar"===e.type&&e.polarIndex&&(e.radarIndex=e.polarIndex)}))};ty.registerVisual(BS("radar")),ty.registerVisual(Cb("radar","circle")),ty.registerLayout(pM),ty.registerProcessor(XS("radar")),ty.registerPreprocessor(fM);var gM=we.each,mM="\0__link_datas",vM="\0__link_mainData";function yM(e,t){if((n=this)[vM]===n){var i=we.extend({},this[mM]);i[this.dataType]=t,wM(t,i,e)}else SM(t,this.dataType,this[vM],e);var n;return t}function xM(e,t){return e.struct&&e.struct.update(this),t}function _M(e,t){return gM(t[mM],(function(i,n){i!==t&&SM(i.cloneShallow(),n,t,e)})),t}function bM(e){var t=this[vM];return null==e||null==t?t:t[mM][e]}function wM(e,t,i){e[mM]={},gM(t,(function(t,n){SM(t,n,e,i)}))}function SM(e,t,i,n){i[mM][t]=e,e[vM]=i,e.dataType=t,n.struct&&(e[n.structAttr]=n.struct,n.struct[n.datasAttr[t]]=e),e.getLinkedData=bM}var MM=function(e){var t=e.mainData,i=e.datas;i||(i={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,wM(t,i,e),gM(i,(function(i){gM(t.TRANSFERABLE_METHODS,(function(t){i.wrapMethod(t,we.curry(yM,e))}))})),t.wrapMethod("cloneShallow",we.curry(_M,e)),gM(t.CHANGABLE_METHODS,(function(i){t.wrapMethod(i,we.curry(xM,e))})),we.assert(i[t.dataType]===t)},IM=function(e,t){this.name=e||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=t};function TM(e,t){this.root,this.data,this._nodes=[],this.hostModel=e,this.levelModels=we.map(t||[],(function(t){return new vu(t,e,e.ecModel)}))}IM.prototype={constructor:IM,isRemoved:function(){return this.dataIndex<0},eachNode:function(e,t,i){"function"==typeof e&&(i=t,t=e,e=null),e=e||{},we.isString(e)&&(e={order:e});var n,r=e.order||"preorder",a=this[e.attr||"children"];"preorder"===r&&(n=t.call(i,this));for(var o=0;!n&&o<a.length;o++)a[o].eachNode(e,t,i);"postorder"===r&&t.call(i,this)},updateDepthAndHeight:function(e){var t=0;this.depth=e;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(e+1),n.height>t&&(t=n.height)}this.height=t+1},getNodeById:function(e){if(this.getId()===e)return this;for(var t=0,i=this.children,n=i.length;t<n;t++){var r=i[t].getNodeById(e);if(r)return r}},contains:function(e){if(e===this)return!0;for(var t=0,i=this.children,n=i.length;t<n;t++){var r=i[t].contains(e);if(r)return r}},getAncestors:function(e){for(var t=[],i=e?this:this.parentNode;i;)t.push(i),i=i.parentNode;return t.reverse(),t},getValue:function(e){var t=this.hostTree.data;return t.get(t.getDimension(e||"value"),this.dataIndex)},setLayout:function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(e){if(!(this.dataIndex<0)){var t=this.hostTree.data.getItemModel(this.dataIndex),i=this.getLevelModel();return i?t.getModel(e,i.getModel(e)):t.getModel(e)}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},setVisual:function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},getVisual:function(e,t){return this.hostTree.data.getItemVisual(this.dataIndex,e,t)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},isDescendantOf:function(e){return e!==this&&e.isAncestorOf(this)}},TM.prototype={constructor:TM,type:"tree",eachNode:function(e,t,i){this.root.eachNode(e,t,i)},getNodeByDataIndex:function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},getNodeByName:function(e){return this.root.getNodeByName(e)},update:function(){for(var e=this.data,t=this._nodes,i=0,n=t.length;i<n;i++)t[i].dataIndex=-1;for(i=0,n=e.count();i<n;i++)t[e.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},TM.createTree=function(e,t,i,n){var r=new TM(t,i&&i.levels),a=[],o=1;!function e(t,i){var n=t.value;o=Math.max(o,we.isArray(n)?n.length:1),a.push(t);var s=new IM(t.name,r);i?function(e,t){var i=t.children;if(e.parentNode===t)return;i.push(e),e.parentNode=t}(s,i):r.root=s,r._nodes.push(s);var l=t.children;if(l)for(var u=0;u<l.length;u++)e(l[u],s)}(e),r.root.updateDepthAndHeight(0);var s=_g(a,{coordDimensions:["value"],dimensionsCount:o}),l=new og(s,t);return l.initData(a),n&&n(l),MM({mainData:l,struct:r,structAttr:"tree"}),r.update(),r};var AM=TM,CM=Pu.encodeHTML;zd.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(e){var t={name:e.name,children:e.data},i=e.leaves||{},n=new vu(i,this,this.ecModel),r=AM.createTree(t,this,{},(function(e){e.wrapMethod("getItemModel",(function(e,t){var i=r.getNodeByDataIndex(t);return i.children.length&&i.isExpand||(e.parentModel=n),e}))}));var a=0;r.eachNode("preorder",(function(e){e.depth>a&&(a=e.depth)}));var o=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:a;return r.root.eachNode("preorder",(function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=o})),r.data},getOrient:function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},formatTooltip:function(e){for(var t=this.getData().tree,i=t.root.children[0],n=t.getNodeByDataIndex(e),r=n.getValue(),a=n.name;n&&n!==i;)a=n.parentNode.name+"."+a,n=n.parentNode;return CM(a+(isNaN(r)||null==r?"":" : "+r))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});function DM(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function LM(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function PM(e,t,i){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:i}function kM(e,t,i){var n=i/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=n,t.hierNode.shift+=i,t.hierNode.modifier+=i,t.hierNode.prelim+=i,e.hierNode.change+=n}function OM(e,t){return e.parentNode===t.parentNode?1:2}var RM={init:function(e){e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t,i,n=[e];t=n.pop();)if(i=t.children,t.isExpand&&i.length)for(var r=i.length-1;r>=0;r--){var a=i[r];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:r,thread:null},n.push(a)}},firstWalk:function(e,t){var i=e.isExpand?e.children:[],n=e.parentNode.children,r=e.hierNode.i?n[e.hierNode.i-1]:null;if(i.length){!function(e){var t=e.children,i=t.length,n=0,r=0;for(;--i>=0;){var a=t[i];a.hierNode.prelim+=n,a.hierNode.modifier+=n,r+=a.hierNode.change,n+=a.hierNode.shift+r}}(e);var a=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;r?(e.hierNode.prelim=r.hierNode.prelim+t(e,r),e.hierNode.modifier=e.hierNode.prelim-a):e.hierNode.prelim=a}else r&&(e.hierNode.prelim=r.hierNode.prelim+t(e,r));e.parentNode.hierNode.defaultAncestor=function(e,t,i,n){if(t){for(var r=e,a=e,o=a.parentNode.children[0],s=t,l=r.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,h=s.hierNode.modifier;s=DM(s),a=LM(a),s&&a;){r=DM(r),o=LM(o),r.hierNode.ancestor=e;var d=s.hierNode.prelim+h-a.hierNode.prelim-u+n(s,a);d>0&&(kM(PM(s,e,i),e,d),u+=d,l+=d),h+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=r.hierNode.modifier,c+=o.hierNode.modifier}s&&!DM(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=h-l),a&&!LM(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,i=e)}return i}(e,r,e.parentNode.hierNode.defaultAncestor||n[0],t)},secondWalk:function(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier},separation:function(e){return arguments.length?e:OM},radialCoordinate:function(e,t){var i={};return e-=Math.PI/2,i.x=t*Math.cos(e),i.y=t*Math.sin(e),i},getViewRect:function(e,t){return Hu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}},NM=RM.radialCoordinate,EM=ex.onIrrelevantElement,zM=Su.parsePercent,BM=ru.extendShape({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(e,t){var i=t.childPoints,n=i.length,r=t.parentPoint,a=i[0],o=i[n-1];if(1===n)return e.moveTo(r[0],r[1]),void e.lineTo(a[0],a[1]);var s=t.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=zM(t.forkPosition,1),h=[];h[l]=r[l],h[u]=r[u]+(o[u]-r[u])*c,e.moveTo(r[0],r[1]),e.lineTo(h[0],h[1]),e.moveTo(a[0],a[1]),h[l]=a[l],e.lineTo(h[0],h[1]),h[l]=o[l],e.lineTo(h[0],h[1]),e.lineTo(o[0],o[1]);for(var d=1;d<n-1;d++){var p=i[d];e.moveTo(p[0],p[1]),h[l]=p[l],e.lineTo(h[0],h[1])}}});ty.extendChartView({type:"tree",init:function(e,t){this._oldTree,this._mainGroup=new ru.Group,this._controller=new Qy(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(e,t,i,n){var r=e.getData(),a=e.layoutInfo,o=this._mainGroup,s=e.get("layout");"radial"===s?o.attr("position",[a.x+a.width/2,a.y+a.height/2]):o.attr("position",[a.x,a.y]),this._updateViewCoordSys(e,a,s),this._updateController(e,t,i);var l=this._data,u={expandAndCollapse:e.get("expandAndCollapse"),layout:s,edgeShape:e.get("edgeShape"),edgeForkPosition:e.get("edgeForkPosition"),orient:e.getOrient(),curvature:e.get("lineStyle.curveness"),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};r.diff(l).add((function(t){VM(r,t)&&GM(r,t,null,o,e,u)})).update((function(t,i){var n=l.getItemGraphicEl(i);VM(r,t)?GM(r,t,n,o,e,u):n&&HM(l,i,n,o,e,u)})).remove((function(t){var i=l.getItemGraphicEl(t);i&&HM(l,t,i,o,e,u)})).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===u.expandAndCollapse&&r.eachItemGraphicEl((function(t,n){t.off("click").on("click",(function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:n})}))})),this._data=r},_updateViewCoordSys:function(e){var t=e.getData(),i=[];t.each((function(e){var n=t.getItemLayout(e);!n||isNaN(n.x)||isNaN(n.y)||i.push([+n.x,+n.y])}));var n=[],r=[];eo.fromPoints(i,n,r);var a=this._min,o=this._max;r[0]-n[0]==0&&(n[0]=a?a[0]:n[0]-1,r[0]=o?o[0]:r[0]+1),r[1]-n[1]==0&&(n[1]=a?a[1]:n[1]-1,r[1]=o?o[1]:r[1]+1);var s=e.coordinateSystem=new gx;s.zoomLimit=e.get("scaleLimit"),s.setBoundingRect(n[0],n[1],r[0]-n[0],r[1]-n[1]),s.setCenter(e.get("center")),s.setZoom(e.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=n,this._max=r},_updateController:function(e,t,i){var n=this._controller,r=this._controllerHost,a=this.group;n.setPointerChecker((function(t,n,r){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(n,r)&&!EM(t,i,e)})),n.enable(e.get("roam")),r.zoomLimit=e.get("scaleLimit"),r.zoom=e.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",(function(t){Jy.updateViewOnPan(r,t.dx,t.dy),i.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})}),this).on("zoom",(function(t){Jy.updateViewOnZoom(r,t.scale,t.originX,t.originY),i.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(e)}),this)},_updateNodeAndLinkScale:function(e){var t=e.getData(),i=this._getNodeGlobalScale(e),n=[i,i];t.eachItemGraphicEl((function(e,t){e.attr("scale",n)}))},_getNodeGlobalScale:function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var i=this._nodeScaleRatio,n=t.scale,r=n&&n[0]||1;return((t.getZoom()-1)*i+1)/r},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}});function VM(e,t){var i=e.getItemLayout(t);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==e.getItemVisual(t,"symbol")}function FM(e,t,i){return i.itemModel=t,i.itemStyle=t.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=t.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=t.getModel("lineStyle").getLineStyle(),i.labelModel=t.getModel("label"),i.hoverLabelModel=t.getModel("emphasis.label"),!1===e.isExpand&&0!==e.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function GM(e,t,i,n,r,a){var o=!i,s=e.tree.getNodeByDataIndex(t),l=s.getModel(),u=(a=FM(s,l,a),e.tree.root),c=s.parentNode===u?s:s.parentNode||s,h=e.getItemGraphicEl(c.dataIndex),d=c.getLayout(),p=h?{x:h.position[0],y:h.position[1],rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:d,f=s.getLayout();o?(i=new G_(e,t,a)).attr("position",[p.x,p.y]):i.updateData(e,t,a),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=f.rawX,i.__radialRawY=f.rawY,n.add(i),e.setItemGraphicEl(t,i),ru.updateProps(i,{position:[f.x,f.y]},r);var g=i.getSymbolPath();if("radial"===a.layout){var m,v,y=u.children[0],x=y.getLayout(),_=y.children.length;if(f.x===x.x&&!0===s.isExpand){var b={};b.x=(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,b.y=(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2,(m=Math.atan2(b.y-x.y,b.x-x.x))<0&&(m=2*Math.PI+m),(v=b.x<x.x)&&(m-=Math.PI)}else(m=Math.atan2(f.y-x.y,f.x-x.x))<0&&(m=2*Math.PI+m),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(v=f.x<x.x)&&(m-=Math.PI):(v=f.x>x.x)||(m-=Math.PI);var w=v?"left":"right",S=a.labelModel.get("rotate"),M=S*(Math.PI/180);g.setStyle({textPosition:a.labelModel.get("position")||w,textRotation:null==S?-m:M,textOrigin:"center",verticalAlign:"middle"})}!function(e,t,i,n,r,a,o,s,l){var u=l.edgeShape,c=n.__edge;if("curve"===u)t.parentNode&&t.parentNode!==i&&(c||(c=n.__edge=new ru.BezierCurve({shape:WM(l,r,r),style:we.defaults({opacity:0,strokeNoScale:!0},l.lineStyle)})),ru.updateProps(c,{shape:WM(l,a,o),style:{opacity:1}},e));else if("polyline"===u&&"orthogonal"===l.layout&&t!==i&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var h=t.children,d=[],p=0;p<h.length;p++){var f=h[p].getLayout();d.push([f.x,f.y])}c||(c=n.__edge=new BM({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:l.orient,forkPosition:l.edgeForkPosition},style:we.defaults({opacity:0,strokeNoScale:!0},l.lineStyle)})),ru.updateProps(c,{shape:{parentPoint:[o.x,o.y],childPoints:d},style:{opacity:1}},e)}s.add(c)}(r,s,u,i,p,d,f,n,a)}function HM(e,t,i,n,r,a){for(var o,s=e.tree.getNodeByDataIndex(t),l=e.tree.root,u=s.getModel(),c=(a=FM(s,u,a),s.parentNode===l?s:s.parentNode||s),h=a.edgeShape;null==(o=c.getLayout());)c=c.parentNode===l?c:c.parentNode||c;ru.updateProps(i,{position:[o.x+1,o.y+1]},r,(function(){n.remove(i),e.setItemGraphicEl(t,null)})),i.fadeOut(null,{keepLabel:!0});var d=e.getItemGraphicEl(c.dataIndex).__edge,p=i.__edge||(!1===c.isExpand||1===c.children.length?d:void 0);h=a.edgeShape;p&&("curve"===h?ru.updateProps(p,{shape:WM(a,o,o),style:{opacity:0}},r,(function(){n.remove(p)})):"polyline"===h&&"orthogonal"===a.layout&&ru.updateProps(p,{shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]]},style:{opacity:0}},r,(function(){n.remove(p)})))}function WM(e,t,i){var n,r,a,o,s,l,u,c,h=e.orient;if("radial"===e.layout){s=t.rawX,u=t.rawY,l=i.rawX,c=i.rawY;var d=NM(s,u),p=NM(s,u+(c-u)*e.curvature),f=NM(l,c+(u-c)*e.curvature),g=NM(l,c);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:p.x,cpy1:p.y,cpx2:f.x,cpy2:f.y}}return s=t.x,u=t.y,l=i.x,c=i.y,"LR"!==h&&"RL"!==h||(n=s+(l-s)*e.curvature,r=u,a=l+(s-l)*e.curvature,o=c),"TB"!==h&&"BT"!==h||(n=s,r=u+(c-u)*e.curvature,a=l,o=c+(u-c)*e.curvature),{x1:s,y1:u,x2:l,y2:c,cpx1:n,cpy1:r,cpx2:a,cpy2:o}}var jM=ux.updateCenterAndZoom;ty.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var i=e.dataIndex,n=t.getData().tree.getNodeByDataIndex(i);n.isExpand=!n.isExpand}))})),ty.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var i=t.coordinateSystem,n=jM(i,e);t.setCenter&&t.setCenter(n.center),t.setZoom&&t.setZoom(n.zoom)}))}));var UM={eachAfter:function(e,t,i){for(var n,r=[e],a=[];n=r.pop();)if(a.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s<o.length;s++)r.push(o[s])}for(;n=a.pop();)t(n,i)},eachBefore:function(e,t){for(var i,n=[e];i=n.pop();)if(t(i),i.isExpand){var r=i.children;if(r.length)for(var a=r.length-1;a>=0;a--)n.push(r[a])}}},ZM=UM.eachAfter,YM=UM.eachBefore,qM=RM.init,XM=RM.firstWalk,KM=RM.secondWalk,QM=RM.separation,JM=RM.radialCoordinate,$M=RM.getViewRect;var eI=function(e,t){e.eachSeriesByType("tree",(function(e){!function(e,t){var i=$M(e,t);e.layoutInfo=i;var n=e.get("layout"),r=0,a=0,o=null;"radial"===n?(r=2*Math.PI,a=Math.min(i.height,i.width)/2,o=QM((function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth}))):(r=i.width,a=i.height,o=QM());var s=e.getData().tree.root,l=s.children[0];if(l){qM(s),ZM(l,XM,o),s.hierNode.modifier=-l.hierNode.prelim,YM(l,KM);var u=l,c=l,h=l;YM(l,(function(e){var t=e.getLayout().x;t<u.getLayout().x&&(u=e),t>c.getLayout().x&&(c=e),e.depth>h.depth&&(h=e)}));var d=u===c?1:o(u,c)/2,p=d-u.getLayout().x,f=0,g=0,m=0,v=0;if("radial"===n)f=r/(c.getLayout().x+d+p),g=a/(h.depth-1||1),YM(l,(function(e){m=(e.getLayout().x+p)*f,v=(e.depth-1)*g;var t=JM(m,v);e.setLayout({x:t.x,y:t.y,rawX:m,rawY:v},!0)}));else{var y=e.getOrient();"RL"===y||"LR"===y?(g=a/(c.getLayout().x+d+p),f=r/(h.depth-1||1),YM(l,(function(e){v=(e.getLayout().x+p)*g,m="LR"===y?(e.depth-1)*f:r-(e.depth-1)*f,e.setLayout({x:m,y:v},!0)}))):"TB"!==y&&"BT"!==y||(f=r/(c.getLayout().x+d+p),g=a/(h.depth-1||1),YM(l,(function(e){m=(e.getLayout().x+p)*f,v="TB"===y?(e.depth-1)*g:a-(e.depth-1)*g,e.setLayout({x:m,y:v},!0)})))}}}(e,t)}))};function tI(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}ty.registerVisual(Cb("tree","circle")),ty.registerLayout(eI);var iI={retrieveTargetInfo:function(e,t,i){if(e&&we.indexOf(t,e.type)>=0){var n=i.getData().tree.root,r=e.targetNode;if("string"==typeof r&&(r=n.getNodeById(r)),r&&n.contains(r))return{node:r};var a=e.targetNodeId;if(null!=a&&(r=n.getNodeById(a)))return{node:r}}},getPathToRoot:tI,aboveViewRoot:function(e,t){var i=tI(e);return we.indexOf(i,t)>=0},wrapTreePathInfo:function(e,t){for(var i=[];e;){var n=e.dataIndex;i.push({name:e.name,dataIndex:n,value:t.getRawValue(n)}),e=e.parentNode}return i.reverse(),i}},nI=Pu.encodeHTML,rI=Pu.addCommas,aI=iI.wrapTreePathInfo;zd.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(e,t){var i={name:e.name,children:e.data};!function e(t){var i=0;we.each(t.children,(function(t){e(t);var n=t.value;we.isArray(n)&&(n=n[0]),i+=n}));var n=t.value;we.isArray(n)&&(n=n[0]);(null==n||isNaN(n))&&(n=i);n<0&&(n=0);we.isArray(t.value)?t.value[0]=n:t.value=n}(i);var n=e.levels||[];n=e.levels=function(e,t){var i,n=t.get("color");if(!n)return;if(e=e||[],we.each(e,(function(e){var t=new vu(e),n=t.get("color");(t.get("itemStyle.color")||n&&"none"!==n)&&(i=!0)})),!i){(e[0]||(e[0]={})).color=n.slice()}return e}(n,t);var r=we.map(n||[],(function(e){return new vu(e,this,t)}),this),a=AM.createTree(i,this,null,(function(e){e.wrapMethod("getItemModel",(function(e,t){var i=a.getNodeByDataIndex(t),n=r[i.depth];return n&&(e.parentModel=n),e}))}));return a.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(e){var t=this.getData(),i=this.getRawValue(e),n=we.isArray(i)?rI(i[0]):rI(i),r=t.getName(e);return nI(r+": "+n)},getDataParams:function(e){var t=zd.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=aI(i,this),t},setLayoutInfo:function(e){this.layoutInfo=this.layoutInfo||{},we.extend(this.layoutInfo,e)},mapIdToIndex:function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=we.createHashMap(),this._idIndexMapCount=0);var i=t.get(e);return null==i&&t.set(e,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});var oI=iI.wrapTreePathInfo;function sI(e){this.group=new ru.Group,e.add(this.group)}function lI(e,t,i,n,r,a){var o=[[r?e:e-5,t],[e+i,t],[e+i,t+n],[r?e:e-5,t+n]];return!a&&o.splice(2,0,[e+i+5,t+n/2]),!r&&o.push([e,t+n/2]),o}function uI(e,t,i){e.eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.componentIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&oI(i,t)}}sI.prototype={constructor:sI,render:function(e,t,i,n){var r=e.getModel("breadcrumb"),a=this.group;if(a.removeAll(),r.get("show")&&i){var o=r.getModel("itemStyle"),s=o.getModel("textStyle"),l={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(e,l,o,s,n),Hu.positionElement(a,l.pos,l.box)}},_prepare:function(e,t,i){for(var n=e;n;n=n.parentNode){var r=n.getModel().get("name"),a=i.getTextRect(r),o=Math.max(a.width+16,t.emptyItemWidth);t.totalWidth+=o+8,t.renderList.push({node:n,text:r,width:o})}},_renderContent:function(e,t,i,n,r){for(var a=0,o=t.emptyItemWidth,s=e.get("breadcrumb.height"),l=Hu.getAvailableSize(t.pos,t.box),u=t.totalWidth,c=t.renderList,h=c.length-1;h>=0;h--){var d=c[h],p=d.node,f=d.width,g=d.text;u>l.width&&(u-=f-o,f=o,g=null);var m=new ru.Polygon({shape:{points:lI(a,0,f,s,h===c.length-1,0===h)},style:we.defaults(i.getItemStyle(),{lineJoin:"bevel",text:g,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:we.curry(r,p)});this.group.add(m),uI(m,e,p),a+=f+8}},remove:function(){this.group.removeAll()}};var cI=sI;var hI={createWrap:function(){var e,t=[],i={};return{add:function(e,n,r,a,o){return we.isString(a)&&(o=a,a=0),!i[e.id]&&(i[e.id]=1,t.push({el:e,target:n,time:r,delay:a,easing:o}),!0)},done:function(t){return e=t,this},start:function(){for(var n=t.length,r=0,a=t.length;r<a;r++){var o=t[r];o.el.animateTo(o.target,o.time,o.delay,o.easing,s)}return this;function s(){--n||(t.length=0,i={},e&&e())}}}}},dI=Pu.windowOpen,pI=we.bind,fI=ru.Group,gI=ru.Rect,mI=we.each,vI=["label"],yI=["emphasis","label"],xI=["upperLabel"],_I=["emphasis","upperLabel"],bI=Ta([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),wI=function(e){var t=bI(e);return t.stroke=t.fill=t.lineWidth=null,t};ty.extendChartView({type:"treemap",init:function(e,t){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(e,t,i,n){var r=t.findComponents({mainType:"series",subType:"treemap",query:n});if(!(we.indexOf(r,e)<0)){this.seriesModel=e,this.api=i,this.ecModel=t;var a=iI.retrieveTargetInfo(n,["treemapZoomToNode","treemapRootToNode"],e),o=n&&n.type,s=e.layoutInfo,l=!this._oldTree,u=this._storage,c="treemapRootToNode"===o&&a&&u?{rootNodeGroup:u.nodeGroup[a.node.getRawIndex()],direction:n.direction}:null,h=this._giveContainerGroup(s),d=this._doRender(h,e,c);l||o&&"treemapZoomToNode"!==o&&"treemapRootToNode"!==o?d.renderFinally():this._doAnimation(h,d,e,c),this._resetController(i),this._renderBreadcrumb(e,i,a)}},_giveContainerGroup:function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new fI,this._initEvents(t),this.group.add(t)),t.attr("position",[e.x,e.y]),t},_doRender:function(e,t,i){var n=t.getData().tree,r=this._oldTree,a={nodeGroup:[],background:[],content:[]},o={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],u=we.curry(SI,t,o,s,i,a,l);!function e(t,i,n,r,a){r?(i=t,mI(t,(function(e,t){!e.isRemoved()&&s(t,t)}))):new Cf(i,t,o,o).add(s).update(s).remove(we.curry(s,null)).execute();function o(e){return e.getId()}function s(o,s){var l=null!=o?t[o]:null,c=null!=s?i[s]:null,h=u(l,c,n,a);h&&e(l&&l.viewChildren||[],c&&c.viewChildren||[],h,r,a+1)}}(n.root?[n.root]:[],r&&r.root?[r.root]:[],e,n===r||!r,0);var c=function(e){var t={nodeGroup:[],background:[],content:[]};return e&&mI(e,(function(e,i){var n=t[i];mI(e,(function(e){e&&(n.push(e),e.__tmWillDelete=1)}))})),t}(s);return this._oldTree=n,this._storage=o,{lastsForAnimation:a,willDeleteEls:c,renderFinally:function(){mI(c,(function(e){mI(e,(function(e){e.parent&&e.parent.remove(e)}))})),mI(l,(function(e){e.invisible=!0,e.dirty()}))}}},_doAnimation:function(e,t,i,n){if(i.get("animation")){var r=i.get("animationDurationUpdate"),a=i.get("animationEasing"),o=hI.createWrap();mI(t.willDeleteEls,(function(e,t){mI(e,(function(e,i){if(!e.invisible){var s,l=e.parent;if(n&&"drillDown"===n.direction)s=l===n.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,c=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,c=l.__tmNodeHeight/2),s="nodeGroup"===t?{position:[u,c],style:{opacity:0}}:{shape:{x:u,y:c,width:0,height:0},style:{opacity:0}}}s&&o.add(e,s,r,a)}}))})),mI(this._storage,(function(e,i){mI(e,(function(e,n){var s=t.lastsForAnimation[i][n],l={};s&&("nodeGroup"===i?s.old&&(l.position=e.position.slice(),e.attr("position",s.old)):(s.old&&(l.shape=we.extend({},e.shape),e.setShape(s.old)),s.fadein?(e.setStyle("opacity",0),l.style={opacity:1}):1!==e.style.opacity&&(l.style={opacity:1})),o.add(e,l,r,a))}))}),this),this._state="animating",o.done(pI((function(){this._state="ready",t.renderFinally()}),this)).start()}},_resetController:function(e){var t=this._controller;t||((t=this._controller=new Qy(e.getZr())).enable(this.seriesModel.get("roam")),t.on("pan",pI(this._onPan,this)),t.on("zoom",pI(this._onZoom,this)));var i=new Ni(0,0,e.getWidth(),e.getHeight());t.setPointerChecker((function(e,t,n){return i.contain(t,n)}))},_clearController:function(){var e=this._controller;e&&(e.dispose(),e=null)},_onPan:function(e){if("animating"!==this._state&&(Math.abs(e.dx)>3||Math.abs(e.dy)>3)){var t=this.seriesModel.getData().tree.root;if(!t)return;var i=t.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+e.dx,y:i.y+e.dy,width:i.width,height:i.height}})}},_onZoom:function(e){var t=e.originX,i=e.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var r=n.getLayout();if(!r)return;var a=new Ni(r.x,r.y,r.width,r.height),o=this.seriesModel.layoutInfo;t-=o.x,i-=o.y;var s=ft.create();ft.translate(s,s,[-t,-i]),ft.scale(s,s,[e.scale,e.scale]),ft.translate(s,s,[t,i]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(e){e.on("click",(function(e){if("ready"===this._state){var t=this.seriesModel.get("nodeClick",!0);if(t){var i=this.findTarget(e.offsetX,e.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===t)this._zoomToNode(i);else if("link"===t){var r=n.hostTree.data.getItemModel(n.dataIndex),a=r.get("link",!0),o=r.get("target",!0)||"blank";a&&dI(a,o)}}}}}),this)},_renderBreadcrumb:function(e,t,i){i||(i=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(i={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new cI(this.group))).render(e,t,i.node,pI((function(t){"animating"!==this._state&&(iI.aboveViewRoot(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))}),this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},_rootToNode:function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},findTarget:function(e,t){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(n){var r=this._storage.background[n.getRawIndex()];if(r){var a=r.transformCoordToLocal(e,t),o=r.shape;if(!(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height))return!1;i={node:n,offsetX:a[0],offsetY:a[1]}}}),this),i}});function SI(e,t,i,n,r,a,o,s,l,u){if(o){var c=o.getLayout(),h=e.getData();if(h.setItemGraphicEl(o.dataIndex,null),c&&c.isInView){var d=c.width,p=c.height,f=c.borderWidth,g=c.invisible,m=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,x=c.upperHeight,_=y&&y.length,b=o.getModel("itemStyle"),w=o.getModel("emphasis.itemStyle"),S=L("nodeGroup",fI);if(S){if(l.add(S),S.attr("position",[c.x||0,c.y||0]),S.__tmNodeWidth=d,S.__tmNodeHeight=p,c.isAboveViewRoot)return S;var M=o.getModel(),I=L("background",gI,u,1);if(I&&function(t,i,n){if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,i.setShape({x:0,y:0,width:d,height:p}),g)A(i);else{i.invisible=!1;var r=o.getVisual("borderColor",!0),a=w.get("borderColor"),s=wI(b);s.fill=r;var l=bI(w);if(l.fill=a,n){var u=d-2*f;C(s,l,r,u,x,{x:f,y:0,width:u,height:x})}else s.text=l.text=null;i.setStyle(s),ru.setElementHoverStyle(i,l)}t.add(i)}(S,I,_&&c.upperLabelHeight),_)ru.isHighDownDispatcher(S)&&ru.setAsHighDownDispatcher(S,!1),I&&(ru.setAsHighDownDispatcher(I,!0),h.setItemGraphicEl(o.dataIndex,I));else{var T=L("content",gI,u,2);T&&function(t,i){i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex;var n=Math.max(d-2*f,0),r=Math.max(p-2*f,0);if(i.culling=!0,i.setShape({x:f,y:f,width:n,height:r}),g)A(i);else{i.invisible=!1;var a=o.getVisual("color",!0),s=wI(b);s.fill=a;var l=bI(w);C(s,l,a,n,r),i.setStyle(s),ru.setElementHoverStyle(i,l)}t.add(i)}(S,T),I&&ru.isHighDownDispatcher(I)&&ru.setAsHighDownDispatcher(I,!1),ru.setAsHighDownDispatcher(S,!0),h.setItemGraphicEl(o.dataIndex,S)}return S}}}function A(e){!e.invisible&&a.push(e)}function C(t,i,n,r,a,s){var l=M.get("name"),u=M.getModel(s?xI:vI),h=M.getModel(s?_I:yI),d=u.getShallow("show");ru.setLabelStyle(t,i,u,h,{defaultText:d?l:null,autoColor:n,isRectText:!0,labelFetcher:e,labelDataIndex:o.dataIndex,labelProp:s?"upperLabel":"label"}),D(t,s,c),D(i,s,c),s&&(t.textRect=we.clone(s)),t.truncate=d&&u.get("ellipsis")?{outerWidth:r,outerHeight:a,minChar:2}:null}function D(t,i,n){var r=t.text;if(!i&&n.isLeafRoot&&null!=r){var a=e.get("drillDownIcon",!0);t.text=a?a+" "+r:r}}function L(e,a,s,l){var u=null!=v&&i[e][v],c=r[e];return u?(i[e][v]=null,function(e,t,i){(e[m]={}).old="nodeGroup"===i?t.position.slice():we.extend({},t.shape)}(c,u,e)):g||((u=new a({z:MI(s,l)})).__tmDepth=s,u.__tmStorageName=e,function(e,t,i){var a=e[m]={},s=o.parentNode;if(s&&(!n||"drillDown"===n.direction)){var l=0,u=0,c=r.background[s.getRawIndex()];!n&&c&&c.old&&(l=c.old.width,u=c.old.height),a.old="nodeGroup"===i?[0,u]:{x:l,y:u,width:0,height:0}}a.fadein="nodeGroup"!==i}(c,0,e)),t[e][m]=u}}function MI(e,t){var i=10*e+t;return(i-1)/i}for(var II=function(){},TI=["treemapZoomToNode","treemapRender","treemapMove"],AI=0;AI<TI.length;AI++)ty.registerAction({type:TI[AI],update:"updateView"},II);ty.registerAction({type:"treemapRootToNode",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"treemap",query:e},(function(t,i){var n=iI.retrieveTargetInfo(e,["treemapZoomToNode","treemapRootToNode"],t);if(n){var r=t.getViewRoot();r&&(e.direction=iI.aboveViewRoot(r,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node)}}))}));var CI=Su.linearMap,DI=we.each,LI=we.isObject,PI=function(e){var t=e.mappingMethod,i=e.type,n=this.option=we.clone(e);this.type=i,this.mappingMethod=t,this._normalizeData=HI[t];var r=kI[i];this.applyVisual=r.applyVisual,this.getColorMapper=r.getColorMapper,this._doMap=r._doMap[t],"piecewise"===t?(OI(n),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,we.each(t,(function(t,i){t.originIndex=i,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(n)):"category"===t?n.categories?function(e){var t=e.categories,i=e.visual,n=e.categoryMap={};if(DI(t,(function(e,t){n[e]=t})),!we.isArray(i)){var r=[];we.isObject(i)?DI(i,(function(e,t){var i=n[t];r[null!=i?i:-1]=e})):r[-1]=i,i=GI(e,r)}for(var a=t.length-1;a>=0;a--)null==i[a]&&(delete n[t[a]],t.pop())}(n):OI(n,!0):(we.assert("linear"!==t||n.dataExtent),OI(n))};PI.prototype={constructor:PI,mapValueToVisual:function(e){var t=this._normalizeData(e);return this._doMap(t,e)},getNormalizer:function(){return we.bind(this._normalizeData,this)}};var kI=PI.visualHandlers={color:{applyVisual:EI("color"),getColorMapper:function(){var e=this.option;return we.bind("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),zI.call(this,e)}:function(t,i,n){var r=!!n;return!i&&(t=this._normalizeData(t)),n=Kt.fastLerp(t,e.parsedVisual,n),r?n:Kt.stringify(n,"rgba")},this)},_doMap:{linear:function(e){return Kt.stringify(Kt.fastLerp(e,this.option.parsedVisual),"rgba")},category:zI,piecewise:function(e,t){var i=FI.call(this,t);return null==i&&(i=Kt.stringify(Kt.fastLerp(e,this.option.parsedVisual),"rgba")),i},fixed:BI}},colorHue:RI((function(e,t){return Kt.modifyHSL(e,t)})),colorSaturation:RI((function(e,t){return Kt.modifyHSL(e,null,t)})),colorLightness:RI((function(e,t){return Kt.modifyHSL(e,null,null,t)})),colorAlpha:RI((function(e,t){return Kt.modifyAlpha(e,t)})),opacity:{applyVisual:EI("opacity"),_doMap:VI([0,1])},liftZ:{applyVisual:EI("liftZ"),_doMap:{linear:BI,category:BI,piecewise:BI,fixed:BI}},symbol:{applyVisual:function(e,t,i){var n=this.mapValueToVisual(e);if(we.isString(n))i("symbol",n);else if(LI(n))for(var r in n)n.hasOwnProperty(r)&&i(r,n[r])},_doMap:{linear:NI,category:zI,piecewise:function(e,t){var i=FI.call(this,t);return null==i&&(i=NI.call(this,e)),i},fixed:BI}},symbolSize:{applyVisual:EI("symbolSize"),_doMap:VI([0,1])}};function OI(e,t){var i=e.visual,n=[];we.isObject(i)?DI(i,(function(e){n.push(e)})):null!=i&&n.push(i);t||1!==n.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(n[1]=n[0]),GI(e,n)}function RI(e){return{applyVisual:function(t,i,n){t=this.mapValueToVisual(t),n("color",e(i("color"),t))},_doMap:VI([0,1])}}function NI(e){var t=this.option.visual;return t[Math.round(CI(e,[0,1],[0,t.length-1],!0))]||{}}function EI(e){return function(t,i,n){n(e,this.mapValueToVisual(t))}}function zI(e){var t=this.option.visual;return t[this.option.loop&&-1!==e?e%t.length:e]}function BI(){return this.option.visual[0]}function VI(e){return{linear:function(t){return CI(t,e,this.option.visual,!0)},category:zI,piecewise:function(t,i){var n=FI.call(this,i);return null==n&&(n=CI(t,e,this.option.visual,!0)),n},fixed:BI}}function FI(e){var t=this.option,i=t.pieceList;if(t.hasSpecialVisual){var n=i[PI.findPieceIndex(e,i)];if(n&&n.visual)return n.visual[this.type]}}function GI(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=we.map(t,(function(e){return Kt.parse(e)}))),t}var HI={linear:function(e){return CI(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,i=PI.findPieceIndex(e,t,!0);if(null!=i)return CI(i,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?-1:t},fixed:we.noop};function WI(e,t,i){return e?t<=i:t<i}PI.listVisualTypes=function(){var e=[];return we.each(kI,(function(t,i){e.push(i)})),e},PI.addVisualHandler=function(e,t){kI[e]=t},PI.isValidType=function(e){return kI.hasOwnProperty(e)},PI.eachVisual=function(e,t,i){we.isObject(e)?we.each(e,t,i):t.call(i,e)},PI.mapVisual=function(e,t,i){var n,r=we.isArray(e)?[]:we.isObject(e)?{}:(n=!0,null);return PI.eachVisual(e,(function(e,a){var o=t.call(i,e,a);n?r=o:r[a]=o})),r},PI.retrieveVisuals=function(e){var t,i={};return e&&DI(kI,(function(n,r){e.hasOwnProperty(r)&&(i[r]=e[r],t=!0)})),t?i:null},PI.prepareVisualTypes=function(e){if(LI(e)){var t=[];DI(e,(function(e,i){t.push(i)})),e=t}else{if(!we.isArray(e))return[];e=e.slice()}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},PI.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},PI.findPieceIndex=function(e,t,i){for(var n,r=1/0,a=0,o=t.length;a<o;a++){var s=t[a].value;if(null!=s){if(s===e||"string"==typeof s&&s===e+"")return a;i&&h(s,a)}}for(a=0,o=t.length;a<o;a++){var l=t[a],u=l.interval,c=l.close;if(u){if(u[0]===-1/0){if(WI(c[1],e,u[1]))return a}else if(u[1]===1/0){if(WI(c[0],u[0],e))return a}else if(WI(c[0],u[0],e)&&WI(c[1],e,u[1]))return a;i&&h(u[0],a),i&&h(u[1],a)}}if(i)return e===1/0?t.length-1:e===-1/0?0:n;function h(t,i){var a=Math.abs(t-e);a<r&&(r=a,n=i)}};var jI=PI,UI=we.isArray;function ZI(e){var t=YI(e,"color");if(t){var i=YI(e,"colorAlpha"),n=YI(e,"colorSaturation");return n&&(t=Kt.modifyHSL(t,null,null,n)),i&&(t=Kt.modifyAlpha(t,i)),t}}function YI(e,t){var i=e[t];if(null!=i&&"none"!==i)return i}function qI(e,t){var i=e.get(t);return UI(i)&&i.length?{name:t,range:i}:null}var XI={seriesType:"treemap",reset:function(e,t,i,n){var r=e.getData().tree,a=r.root,o=e.getModel("itemStyle");a.isRemoved()||function e(t,i,n,r,a,o){var s=t.getModel(),l=t.getLayout();if(!l||l.invisible||!l.isInView)return;var u,c=t.getModel("itemStyle"),h=n[t.depth],d=function(e,t,i,n){var r=we.extend({},t);return we.each(["color","colorAlpha","colorSaturation"],(function(a){var o=e.get(a,!0);null==o&&i&&(o=i[a]),null==o&&(o=t[a]),null==o&&(o=n.get(a)),null!=o&&(r[a]=o)})),r}(c,i,h,r),p=c.get("borderColor"),f=c.get("borderColorSaturation");null!=f&&(u=ZI(d),p=function(e,t){return null!=t?Kt.modifyHSL(t,null,null,e):null}(f,u));t.setVisual("borderColor",p);var g=t.viewChildren;if(g&&g.length){var m=function(e,t,i,n,r,a){if(!a||!a.length)return;var o=qI(t,"color")||null!=r.color&&"none"!==r.color&&(qI(t,"colorAlpha")||qI(t,"colorSaturation"));if(!o)return;var s=t.get("visualMin"),l=t.get("visualMax"),u=i.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var c=t.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};"color"!==h.type||"index"!==c&&"id"!==c?h.mappingMethod="linear":(h.mappingMethod="category",h.loop=!0);var d=new jI(h);return d.__drColorMappingBy=c,d}(0,s,l,0,d,g);we.each(g,(function(t,i){if(t.depth>=a.length||t===a[t.depth]){var l=function(e,t,i,n,r,a){var o=we.extend({},t);if(r){var s=r.type,l="color"===s&&r.__drColorMappingBy,u="index"===l?n:"id"===l?a.mapIdToIndex(i.getId()):i.getValue(e.get("visualDimension"));o[s]=r.mapValueToVisual(u)}return o}(s,d,t,i,m,o);e(t,l,n,r,a,o)}}))}else u=ZI(d),t.setVisual("color",u)}(a,{},we.map(r.levelModels,(function(e){return e?e.get("itemStyle"):null})),o,e.getViewRoot().getAncestors(),e)}},KI=Su.parsePercent,QI=Su.MAX_SAFE_INTEGER,JI=Math.max,$I=Math.min,eT=we.retrieve,tT=we.each,iT=["itemStyle","borderWidth"],nT=["itemStyle","gapWidth"],rT=["upperLabel","show"],aT=["upperLabel","height"];function oT(e,t,i){for(var n,r=0,a=1/0,o=0,s=e.length;o<s;o++)(n=e[o].getLayout().area)&&(n<a&&(a=n),n>r&&(r=n));var l=e.area*e.area,u=t*t*i;return l?JI(u*r/l,l/(u*a)):1/0}function sT(e,t,i,n,r){var a=t===i.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=i[s[a]],c=t?e.area/t:0;(r||c>i[l[o]])&&(c=i[l[o]]);for(var h=0,d=e.length;h<d;h++){var p=e[h],f={},g=c?p.getLayout().area/c:0,m=f[l[o]]=JI(c-2*n,0),v=i[s[a]]+i[l[a]]-u,y=h===d-1||v<g?v:g,x=f[l[a]]=JI(y-2*n,0);f[s[o]]=i[s[o]]+$I(n,m/2),f[s[a]]=u+$I(n,x/2),u+=y,p.setLayout(f,!0)}i[s[o]]+=c,i[l[o]]-=c}function lT(e){return e.get(rT)?e.get(aT):0}var uT={seriesType:"treemap",reset:function(e,t,i,n){var r=i.getWidth(),a=i.getHeight(),o=e.option,s=Hu.getLayoutRect(e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),l=o.size||[],u=KI(eT(s.width,l[0]),r),c=KI(eT(s.height,l[1]),a),h=n&&n.type,d=iI.retrieveTargetInfo(n,["treemapZoomToNode","treemapRootToNode"],e),p="treemapRender"===h||"treemapMove"===h?n.rootRect:null,f=e.getViewRoot(),g=iI.getPathToRoot(f);if("treemapMove"!==h){var m="treemapZoomToNode"===h?function(e,t,i,n,r){var a,o=(t||{}).node,s=[n,r];if(!o||o===i)return s;var l=n*r,u=l*e.option.zoomToNodeRatio;for(;a=o.parentNode;){for(var c=0,h=a.children,d=0,p=h.length;d<p;d++)c+=h[d].getValue();var f=o.getValue();if(0===f)return s;u*=c/f;var g=a.getModel(),m=g.get(iT),v=Math.max(m,lT(g));(u+=4*m*m+(3*m+v)*Math.pow(u,.5))>QI&&(u=QI),o=a}u<l&&(u=l);var y=Math.pow(u/l,.5);return[n*y,r*y]}(e,d,f,u,c):p?[p.width,p.height]:[u,c],v=o.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:o.squareRatio,sort:v,leafDepth:o.leafDepth};f.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};f.setLayout(x),function e(t,i,n,r){var a,o;if(t.isRemoved())return;var s=t.getLayout();a=s.width,o=s.height;var l=(f=t.getModel()).get(iT),u=f.get(nT)/2,c=lT(f),h=Math.max(l,c),d=l-u,p=h-u,f=t.getModel();t.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:c},!0),a=JI(a-2*d,0),o=JI(o-d-p,0);var g=a*o,m=function(e,t,i,n,r,a){var o=e.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=a;if(r&&!l)return e.viewChildren=[];!function(e,t){t&&e.sort((function(e,i){var n="asc"===t?e.getValue()-i.getValue():i.getValue()-e.getValue();return 0===n?"asc"===t?e.dataIndex-i.dataIndex:i.dataIndex-e.dataIndex:n}))}(o=we.filter(o,(function(e){return!e.isRemoved()})),s);var u=function(e,t,i){for(var n=0,r=0,a=t.length;r<a;r++)n+=t[r].getValue();var o=e.get("visualDimension");if(t&&t.length)if("value"===o&&i)s=[t[t.length-1].getValue(),t[0].getValue()],"asc"===i&&s.reverse();else{var s=[1/0,-1/0];tT(t,(function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)}))}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(t,o,s);if(0===u.sum)return e.viewChildren=[];if(u.sum=function(e,t,i,n,r){if(!n)return i;for(var a=e.get("visibleMin"),o=r.length,s=o,l=o-1;l>=0;l--){var u=r["asc"===n?o-l-1:l].getValue();u/i*t<a&&(s=l,i-=u)}return"asc"===n?r.splice(0,o-s):r.splice(s,o-s),i}(t,i,u.sum,s,o),0===u.sum)return e.viewChildren=[];for(var c=0,h=o.length;c<h;c++){var d=o[c].getValue()/u.sum*i;o[c].setLayout({area:d})}l&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0);return e.viewChildren=o,e.setLayout({dataExtent:u.dataExtent},!0),o}(t,f,g,i,n,r);if(!m.length)return;var v={x:d,y:p,width:a,height:o},y=$I(a,o),x=1/0,_=[];_.area=0;for(var b=0,w=m.length;b<w;){var S=m[b];_.push(S),_.area+=S.getLayout().area;var M=oT(_,y,i.squareRatio);M<=x?(b++,x=M):(_.area-=_.pop().getLayout().area,sT(_,y,v,u,!1),y=$I(v.width,v.height),_.length=_.area=0,x=1/0)}_.length&&sT(_,y,v,u,!0);if(!n){var I=f.get("childrenVisibleMin");null!=I&&g<I&&(n=!0)}for(b=0,w=m.length;b<w;b++)e(m[b],i,n,r+1)}(f,y,!1,0);x=f.getLayout();tT(g,(function(e,t){var i=(g[t+1]||f).getValue();e.setLayout(we.extend({dataExtent:[i,i],borderWidth:0,upperHeight:0},x))}))}var _=e.getData().tree.root;_.setLayout(function(e,t,i){if(t)return{x:t.x,y:t.y};var n={x:0,y:0};if(!i)return n;var r=i.node,a=r.getLayout();if(!a)return n;var o=[a.width/2,a.height/2],s=r;for(;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}(s,p,d),!0),e.setLayoutInfo(s),function e(t,i,n,r,a){var o=t.getLayout(),s=n[a],l=s&&s===t;if(s&&!l||a===n.length&&t!==r)return;t.setLayout({isInView:!0,invisible:!l&&!i.intersect(o),isAboveViewRoot:l},!0);var u=new Ni(i.x-o.x,i.y-o.y,i.width,i.height);tT(t.viewChildren||[],(function(t){e(t,u,n,r,a+1)}))}(_,new Ni(-s.x,-s.y,r,a),g,f,0)}};ty.registerVisual(XI),ty.registerLayout(uT);var cT=Ia.enableClassCheck;function hT(e){return"_EC_"+e}var dT=function(e){this._directed=e||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},pT=dT.prototype;function fT(e,t){this.id=null==e?"":e,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==t?-1:t}function gT(e,t,i){this.node1=e,this.node2=t,this.dataIndex=null==i?-1:i}pT.type="graph",pT.isDirected=function(){return this._directed},pT.addNode=function(e,t){e=null==e?""+t:""+e;var i=this._nodesMap;if(!i[hT(e)]){var n=new fT(e,t);return n.hostGraph=this,this.nodes.push(n),i[hT(e)]=n,n}},pT.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},pT.getNodeById=function(e){return this._nodesMap[hT(e)]},pT.addEdge=function(e,t,i){var n=this._nodesMap,r=this._edgesMap;if("number"==typeof e&&(e=this.nodes[e]),"number"==typeof t&&(t=this.nodes[t]),fT.isInstance(e)||(e=n[hT(e)]),fT.isInstance(t)||(t=n[hT(t)]),e&&t){var a=e.id+"-"+t.id;if(!r[a]){var o=new gT(e,t,i);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),r[a]=o,o}}},pT.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},pT.getEdge=function(e,t){fT.isInstance(e)&&(e=e.id),fT.isInstance(t)&&(t=t.id);var i=this._edgesMap;return this._directed?i[e+"-"+t]:i[e+"-"+t]||i[t+"-"+e]},pT.eachNode=function(e,t){for(var i=this.nodes,n=i.length,r=0;r<n;r++)i[r].dataIndex>=0&&e.call(t,i[r],r)},pT.eachEdge=function(e,t){for(var i=this.edges,n=i.length,r=0;r<n;r++)i[r].dataIndex>=0&&i[r].node1.dataIndex>=0&&i[r].node2.dataIndex>=0&&e.call(t,i[r],r)},pT.breadthFirstTraverse=function(e,t,i,n){if(fT.isInstance(t)||(t=this._nodesMap[hT(t)]),t){for(var r="out"===i?"outEdges":"in"===i?"inEdges":"edges",a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!e.call(n,t,null))for(var o=[t];o.length;){var s=o.shift(),l=s[r];for(a=0;a<l.length;a++){var u=l[a],c=u.node1===s?u.node2:u.node1;if(!c.__visited){if(e.call(n,c,s))return;o.push(c),c.__visited=!0}}}}},pT.update=function(){for(var e=this.data,t=this.edgeData,i=this.nodes,n=this.edges,r=0,a=i.length;r<a;r++)i[r].dataIndex=-1;for(r=0,a=e.count();r<a;r++)i[e.getRawIndex(r)].dataIndex=r;t.filterSelf((function(e){var i=n[t.getRawIndex(e)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0}));for(r=0,a=n.length;r<a;r++)n[r].dataIndex=-1;for(r=0,a=t.count();r<a;r++)n[t.getRawIndex(r)].dataIndex=r},pT.clone=function(){for(var e=new dT(this._directed),t=this.nodes,i=this.edges,n=0;n<t.length;n++)e.addNode(t[n].id,t[n].dataIndex);for(n=0;n<i.length;n++){var r=i[n];e.addEdge(r.node1.id,r.node2.id,r.dataIndex)}return e},fT.prototype={constructor:fT,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)}},gT.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)};var mT=function(e,t){return{getValue:function(i){var n=this[e][t];return n.get(n.getDimension(i||"value"),this.dataIndex)},setVisual:function(i,n){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[e][t].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}};we.mixin(fT,mT("hostGraph","data")),we.mixin(gT,mT("hostGraph","edgeData")),dT.Node=fT,dT.Edge=gT,cT(fT),cT(gT);var vT=dT;var yT=function(e,t,i,n,r){for(var a=new vT(n),o=0;o<e.length;o++)a.addNode(we.retrieve(e[o].id,e[o].name,o),o);var s=[],l=[],u=0;for(o=0;o<t.length;o++){var c=t[o],h=c.source,d=c.target;a.addEdge(h,d,u)&&(l.push(c),s.push(we.retrieve(c.id,h+" > "+d)),u++)}var p,f=i.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=zg(e,i);else{var g=oh.get(f),m=g&&"view"!==g.type&&g.dimensions||[];we.indexOf(m,"value")<0&&m.concat(["value"]);var v=_g(e,{coordDimensions:m});(p=new og(v,i)).initData(e)}var y=new og(["value"],i);return y.initData(l,s),r&&r(p,y),MM({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a},xT=xa.defaultEmphasis,_T=Pu.encodeHTML,bT=ty.extendSeriesModel({type:"series.graph",init:function(e){bT.superApply(this,"init",arguments);var t=this;function i(){return t._categoriesData}this.legendVisualProvider=new CS(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeOption:function(e){bT.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(e){bT.superApply(this,"mergeDefaultAndTheme",arguments),xT(e,["edgeLabel"],["show"])},getInitialData:function(e,t){var i=e.edges||e.links||[],n=e.data||e.nodes||[],r=this;if(n&&i)return yT(n,i,this,!0,(function(e,i){e.wrapMethod("getItemModel",(function(e){var t=r._categoriesModels[e.getShallow("category")];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e}));var n=r.getModel("edgeLabel"),a=new vu({label:n.option},n.parentModel,t),o=r.getModel("emphasis.edgeLabel"),s=new vu({emphasis:{label:o.option}},o.parentModel,t);function l(e){return(e=this.parsePath(e))&&"label"===e[0]?a:e&&"emphasis"===e[0]&&"label"===e[1]?s:this.parentModel}i.wrapMethod("getItemModel",(function(e){return e.customizeGetParent(l),e}))})).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(e,t,i){if("edge"===i){var n=this.getData(),r=this.getDataParams(e,i),a=n.graph.getEdgeByIndex(e),o=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),l=[];return null!=o&&l.push(o),null!=s&&l.push(s),l=_T(l.join(" > ")),r.value&&(l+=" : "+_T(r.value)),l}return bT.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var e=we.map(this.option.categories||[],(function(e){return null!=e.value?e:we.extend({value:0},e)})),t=new og(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray((function(e){return t.getItemModel(e,!0)}))},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},isAnimationEnabled:function(){return bT.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}});var wT={getNodeGlobalScale:function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var i=e.option.nodeScaleRatio,n=t.scale,r=n&&n[0]||1;return((t.getZoom()-1)*i+1)/r},getSymbolSize:function(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}},ST=wT.getSymbolSize,MT=[],IT=[],TT=[],AT=Wa.quadraticAt,CT=Ce.distSquare,DT=Math.abs;function LT(e,t,i){for(var n,r=e[0],a=e[1],o=e[2],s=1/0,l=i*i,u=.1,c=.1;c<=.9;c+=.1){MT[0]=AT(r[0],a[0],o[0],c),MT[1]=AT(r[1],a[1],o[1],c),(p=DT(CT(MT,t)-l))<s&&(s=p,n=c)}for(var h=0;h<32;h++){var d=n+u;IT[0]=AT(r[0],a[0],o[0],n),IT[1]=AT(r[1],a[1],o[1],n),TT[0]=AT(r[0],a[0],o[0],d),TT[1]=AT(r[1],a[1],o[1],d);var p=CT(IT,t)-l;if(DT(p)<.01)break;var f=CT(TT,t)-l;u/=2,p<0?f>=0?n+=u:n-=u:f>=0?n-=u:n+=u}return n}var PT=function(e,t){var i=[],n=Wa.quadraticSubdivide,r=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge((function(e,s){var l=e.getLayout(),u=e.getVisual("fromSymbol"),c=e.getVisual("toSymbol");l.__original||(l.__original=[Ce.clone(l[0]),Ce.clone(l[1])],l[2]&&l.__original.push(Ce.clone(l[2])));var h=l.__original;if(null!=l[2]){if(Ce.copy(r[0],h[0]),Ce.copy(r[1],h[2]),Ce.copy(r[2],h[1]),u&&"none"!==u){var d=ST(e.node1),p=LT(r,h[0],d*t);n(r[0][0],r[1][0],r[2][0],p,i),r[0][0]=i[3],r[1][0]=i[4],n(r[0][1],r[1][1],r[2][1],p,i),r[0][1]=i[3],r[1][1]=i[4]}if(c&&"none"!==c){d=ST(e.node2),p=LT(r,h[1],d*t);n(r[0][0],r[1][0],r[2][0],p,i),r[1][0]=i[1],r[2][0]=i[2],n(r[0][1],r[1][1],r[2][1],p,i),r[1][1]=i[1],r[2][1]=i[2]}Ce.copy(l[0],r[0]),Ce.copy(l[1],r[2]),Ce.copy(l[2],r[1])}else{if(Ce.copy(a[0],h[0]),Ce.copy(a[1],h[1]),Ce.sub(o,a[1],a[0]),Ce.normalize(o,o),u&&"none"!==u){d=ST(e.node1);Ce.scaleAndAdd(a[0],a[0],o,d*t)}if(c&&"none"!==c){d=ST(e.node2);Ce.scaleAndAdd(a[1],a[1],o,-d*t)}Ce.copy(l[0],a[0]),Ce.copy(l[1],a[1])}}))},kT=ex.onIrrelevantElement,OT=wT.getNodeGlobalScale,RT="__focusNodeAdjacency",NT=["itemStyle","opacity"],ET=["lineStyle","opacity"];function zT(e,t){var i=e.getVisual("opacity");return null!=i?i:e.getModel().get(t)}function BT(e,t,i){var n=e.getGraphicEl(),r=zT(e,t);null!=i&&(null==r&&(r=1),r*=i),n.downplay&&n.downplay(),n.traverse((function(e){if(!e.isGroup){var t=e.lineLabelOriginalOpacity;null!=t&&null==i||(t=r),e.setStyle("opacity",t)}}))}function VT(e,t){var i=zT(e,t),n=e.getGraphicEl();n.traverse((function(e){!e.isGroup&&e.setStyle("opacity",i)})),n.highlight&&n.highlight()}ty.extendChartView({type:"graph",init:function(e,t){var i=new q_,n=new e_,r=this.group;this._controller=new Qy(t.getZr()),this._controllerHost={target:r},r.add(i.group),r.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(e,t,i){var n=this,r=e.coordinateSystem;this._model=e;var a=this._symbolDraw,o=this._lineDraw,s=this.group;if("view"===r.type){var l={position:r.position,scale:r.scale};this._firstRender?s.attr(l):ru.updateProps(s,l,e)}PT(e.getGraph(),OT(e));var u=e.getData();a.updateData(u);var c=e.getEdgeData();o.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,t,i),clearTimeout(this._layoutTimeout);var h=e.forceLayout,d=e.get("force.layoutAnimation");h&&this._startForceLayoutIteration(h,d),u.eachItemGraphicEl((function(t,r){var a=u.getItemModel(r);t.off("drag").off("dragend");var o=a.get("draggable");o&&t.on("drag",(function(){h&&(h.warmUp(),!this._layouting&&this._startForceLayoutIteration(h,d),h.setFixed(r),u.setItemLayout(r,t.position))}),this).on("dragend",(function(){h&&h.setUnfixed(r)}),this),t.setDraggable(o&&h),t[RT]&&t.off("mouseover",t[RT]),t.__unfocusNodeAdjacency&&t.off("mouseout",t.__unfocusNodeAdjacency),a.get("focusNodeAdjacency")&&(t.on("mouseover",t[RT]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex})}),t.on("mouseout",t.__unfocusNodeAdjacency=function(){n._dispatchUnfocus(i)}))}),this),u.graph.eachEdge((function(t){var r=t.getGraphicEl();r[RT]&&r.off("mouseover",r[RT]),r.__unfocusNodeAdjacency&&r.off("mouseout",r.__unfocusNodeAdjacency),t.getModel().get("focusNodeAdjacency")&&(r.on("mouseover",r[RT]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex})}),r.on("mouseout",r.__unfocusNodeAdjacency=function(){n._dispatchUnfocus(i)}))}));var p="circular"===e.get("layout")&&e.get("circular.rotateLabel"),f=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl((function(e,t){var i=u.getItemModel(t).get("label.rotate")||0,n=e.getSymbolPath();if(p){var r=u.getItemLayout(t),a=Math.atan2(r[1]-g,r[0]-f);a<0&&(a=2*Math.PI+a);var o=r[0]<f;o&&(a-=Math.PI);var s=o?"left":"right";ru.modifyLabelStyle(n,{textRotation:-a,textPosition:s,textOrigin:"center"},{textPosition:s})}else ru.modifyLabelStyle(n,{textRotation:i*=Math.PI/180})})),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(e,t){var i=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){i._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:i._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,i,n){var r=e.getData().graph,a=n.dataIndex,o=n.edgeDataIndex,s=r.getNodeByIndex(a),l=r.getEdgeByIndex(o);(s||l)&&(r.eachNode((function(e){BT(e,NT,.1)})),r.eachEdge((function(e){BT(e,ET,.1)})),s&&(VT(s,NT),we.each(s.edges,(function(e){e.dataIndex<0||(VT(e,ET),VT(e.node1,NT),VT(e.node2,NT))}))),l&&(VT(l,ET),VT(l.node1,NT),VT(l.node2,NT)))},unfocusNodeAdjacency:function(e,t,i,n){var r=e.getData().graph;r.eachNode((function(e){BT(e,NT)})),r.eachEdge((function(e){BT(e,ET)}))},_startForceLayoutIteration:function(e,t){var i=this;!function n(){e.step((function(e){i.updateLayout(i._model),(i._layouting=!e)&&(t?i._layoutTimeout=setTimeout(n,16):n())}))}()},_updateController:function(e,t,i){var n=this._controller,r=this._controllerHost,a=this.group;n.setPointerChecker((function(t,n,r){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(n,r)&&!kT(t,i,e)})),"view"===e.coordinateSystem.type?(n.enable(e.get("roam")),r.zoomLimit=e.get("scaleLimit"),r.zoom=e.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",(function(t){Jy.updateViewOnPan(r,t.dx,t.dy),i.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})})).on("zoom",(function(t){Jy.updateViewOnZoom(r,t.scale,t.originX,t.originY),i.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(),PT(e.getGraph(),OT(e)),this._lineDraw.updateLayout()}),this)):n.disable()},_updateNodeAndLinkScale:function(){var e=this._model,t=e.getData(),i=OT(e),n=[i,i];t.eachItemGraphicEl((function(e,t){e.attr("scale",n)}))},updateLayout:function(e){PT(e.getGraph(),OT(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}});ty.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},(function(){})),ty.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},(function(){}));var FT=ux.updateCenterAndZoom;ty.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",query:e},(function(t){var i=t.coordinateSystem,n=FT(i,e);t.setCenter&&t.setCenter(n.center),t.setZoom&&t.setZoom(n.zoom)}))}));var GT=function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.eachSeriesByType("graph",(function(e){var i=e.getCategoriesData(),n=e.getGraph().data,r=i.mapArray(i.getName);n.filterSelf((function(e){var i=n.getItemModel(e).getShallow("category");if(null!=i){"number"==typeof i&&(i=r[i]);for(var a=0;a<t.length;a++)if(!t[a].isSelected(i))return!1}return!0}))}),this)};var HT=function(e){var t={};e.eachSeriesByType("graph",(function(e){var i=e.getCategoriesData(),n=e.getData(),r={};i.each((function(n){var a=i.getName(n);r["ec-"+a]=n;var o=i.getItemModel(n),s=o.get("itemStyle.color")||e.getColorFromPalette(a,t);i.setItemVisual(n,"color",s);for(var l=["opacity","symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++){var c=o.getShallow(l[u],!0);null!=c&&i.setItemVisual(n,l[u],c)}})),i.count()&&n.each((function(e){var t=n.getItemModel(e).getShallow("category");if(null!=t){"string"==typeof t&&(t=r["ec-"+t]);for(var a=["color","opacity","symbol","symbolSize","symbolKeepAspect"],o=0;o<a.length;o++)null==n.getItemVisual(e,a[o],!0)&&n.setItemVisual(e,a[o],i.getItemVisual(t,a[o]))}}))}))};function WT(e){return e instanceof Array||(e=[e,e]),e}var jT=function(e){e.eachSeriesByType("graph",(function(e){var t=e.getGraph(),i=e.getEdgeData(),n=WT(e.get("edgeSymbol")),r=WT(e.get("edgeSymbolSize")),a="lineStyle.color".split("."),o="lineStyle.opacity".split(".");i.setVisual("fromSymbol",n&&n[0]),i.setVisual("toSymbol",n&&n[1]),i.setVisual("fromSymbolSize",r&&r[0]),i.setVisual("toSymbolSize",r&&r[1]),i.setVisual("color",e.get(a)),i.setVisual("opacity",e.get(o)),i.each((function(e){var n=i.getItemModel(e),r=t.getEdgeByIndex(e),s=WT(n.getShallow("symbol",!0)),l=WT(n.getShallow("symbolSize",!0)),u=n.get(a),c=n.get(o);switch(u){case"source":u=r.node1.getVisual("color");break;case"target":u=r.node2.getVisual("color")}s[0]&&r.setVisual("fromSymbol",s[0]),s[1]&&r.setVisual("toSymbol",s[1]),l[0]&&r.setVisual("fromSymbolSize",l[0]),l[1]&&r.setVisual("toSymbolSize",l[1]),r.setVisual("color",u),r.setVisual("opacity",c)}))}))};function UT(e){e.eachEdge((function(e){var t=e.getModel().get("lineStyle.curveness")||0,i=Ce.clone(e.node1.getLayout()),n=Ce.clone(e.node2.getLayout()),r=[i,n];+t&&r.push([(i[0]+n[0])/2-(i[1]-n[1])*t,(i[1]+n[1])/2-(n[0]-i[0])*t]),e.setLayout(r)}))}var ZT={simpleLayout:function(e){var t=e.coordinateSystem;if(!t||"view"===t.type){var i=e.getGraph();i.eachNode((function(e){var t=e.getModel();e.setLayout([+t.get("x"),+t.get("y")])})),UT(i)}},simpleLayoutEdge:UT},YT=we.each,qT=ZT.simpleLayout,XT=ZT.simpleLayoutEdge;var KT=function(e,t){e.eachSeriesByType("graph",(function(e){var t=e.get("layout"),i=e.coordinateSystem;if(i&&"view"!==i.type){var n=e.getData(),r=[];YT(i.dimensions,(function(e){r=r.concat(n.mapDimension(e,!0))}));for(var a=0;a<n.count();a++){for(var o=[],s=!1,l=0;l<r.length;l++){var u=n.get(r[l],a);isNaN(u)||(s=!0),o.push(u)}s?n.setItemLayout(a,i.dataToPoint(o)):n.setItemLayout(a,[NaN,NaN])}XT(n.graph)}else t&&"none"!==t||qT(e)}))},QT=wT.getSymbolSize,JT=wT.getNodeGlobalScale,$T=Math.PI,eA=[];var tA={value:function(e,t,i,n,r,a,o,s){var l=0,u=n.getSum("value"),c=2*Math.PI/(u||s);i.eachNode((function(e){var t=e.getValue("value"),i=c*(u?t:1)/2;l+=i,e.setLayout([r*Math.cos(l)+a,r*Math.sin(l)+o]),l+=i}))},symbolSize:function(e,t,i,n,r,a,o,s){var l=0;eA.length=s;var u=JT(e);i.eachNode((function(e){var t=QT(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=u;var i=Math.asin(t/2/r);isNaN(i)&&(i=$T/2),eA[e.dataIndex]=i,l+=2*i}));var c=(2*$T-l)/s/2,h=0;i.eachNode((function(e){var t=c+eA[e.dataIndex];h+=t,e.setLayout([r*Math.cos(h)+a,r*Math.sin(h)+o]),h+=t}))}},iA={circularLayout:function(e,t){var i=e.coordinateSystem;if(!i||"view"===i.type){var n=i.getBoundingRect(),r=e.getData(),a=r.graph,o=n.width/2+n.x,s=n.height/2+n.y,l=Math.min(n.width,n.height)/2,u=r.count();r.setLayout({cx:o,cy:s}),u&&(tA[t](e,i,a,r,l,o,s,u),a.eachEdge((function(e){var t,i=e.getModel().get("lineStyle.curveness")||0,n=Ce.clone(e.node1.getLayout()),r=Ce.clone(e.node2.getLayout()),a=(n[0]+r[0])/2,l=(n[1]+r[1])/2;+i&&(t=[o*(i*=3)+a*(1-i),s*i+l*(1-i)]),e.setLayout([n,r,t])})))}}},nA=iA.circularLayout;var rA=function(e){e.eachSeriesByType("graph",(function(e){"circular"===e.get("layout")&&nA(e,"symbolSize")}))},aA=Ce.scaleAndAdd;var oA={forceLayout:function(e,t,i){for(var n=i.rect,r=n.width,a=n.height,o=[n.x+r/2,n.y+a/2],s=null==i.gravity?.1:i.gravity,l=0;l<e.length;l++){var u=e[l];u.p||(u.p=Ce.create(r*(Math.random()-.5)+o[0],a*(Math.random()-.5)+o[1])),u.pp=Ce.clone(u.p),u.edges=null}var c=null==i.friction?.6:i.friction,h=c;return{warmUp:function(){h=.8*c},setFixed:function(t){e[t].fixed=!0},setUnfixed:function(t){e[t].fixed=!1},step:function(i){for(var n=[],r=e.length,a=0;a<t.length;a++){var l=t[a];if(!l.ignoreForceLayout){var u=l.n1,c=l.n2;Ce.sub(n,c.p,u.p);var d=Ce.len(n)-l.d,p=c.w/(u.w+c.w);isNaN(p)&&(p=0),Ce.normalize(n,n),!u.fixed&&aA(u.p,u.p,n,p*d*h),!c.fixed&&aA(c.p,c.p,n,-(1-p)*d*h)}}for(a=0;a<r;a++){(v=e[a]).fixed||(Ce.sub(n,o,v.p),aA(v.p,v.p,n,s*h))}for(a=0;a<r;a++){u=e[a];for(var f=a+1;f<r;f++){c=e[f];Ce.sub(n,c.p,u.p),0===(d=Ce.len(n))&&(Ce.set(n,Math.random()-.5,Math.random()-.5),d=1);var g=(u.rep+c.rep)/d/d;!u.fixed&&aA(u.pp,u.pp,n,g),!c.fixed&&aA(c.pp,c.pp,n,-g)}}var m=[];for(a=0;a<r;a++){var v;(v=e[a]).fixed||(Ce.sub(m,v.p,v.pp),aA(v.p,v.p,m,h),Ce.copy(v.pp,v.p))}h*=.992,i&&i(e,t,h<.01)}}}}.forceLayout,sA=ZT.simpleLayout,lA=iA.circularLayout,uA=Su.linearMap;var cA=function(e){e.eachSeriesByType("graph",(function(e){if(!(h=e.coordinateSystem)||"view"===h.type)if("force"===e.get("layout")){var t=e.preservedPoints||{},i=e.getGraph(),n=i.data,r=i.edgeData,a=e.getModel("force"),o=a.get("initLayout");e.preservedPoints?n.each((function(e){var i=n.getId(e);n.setItemLayout(e,t[i]||[NaN,NaN])})):o&&"none"!==o?"circular"===o&&lA(e,"value"):sA(e);var s=n.getDataExtent("value"),l=r.getDataExtent("value"),u=a.get("repulsion"),c=a.get("edgeLength");we.isArray(u)||(u=[u,u]),we.isArray(c)||(c=[c,c]),c=[c[1],c[0]];var h,d=n.mapArray("value",(function(e,t){var i=n.getItemLayout(t),r=uA(e,s,u);return isNaN(r)&&(r=(u[0]+u[1])/2),{w:r,rep:r,fixed:n.getItemModel(t).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}})),p=r.mapArray("value",(function(e,t){var n=i.getEdgeByIndex(t),r=uA(e,l,c);isNaN(r)&&(r=(c[0]+c[1])/2);var a=n.getModel();return{n1:d[n.node1.dataIndex],n2:d[n.node2.dataIndex],d:r,curveness:a.get("lineStyle.curveness")||0,ignoreForceLayout:a.get("ignoreForceLayout")}})),f=(h=e.coordinateSystem).getBoundingRect(),g=oA(d,p,{rect:f,gravity:a.get("gravity"),friction:a.get("friction")}),m=g.step;g.step=function(e){for(var r=0,a=d.length;r<a;r++)d[r].fixed&&Ce.copy(d[r].p,i.getNodeByIndex(r).getLayout());m((function(r,a,o){for(var s=0,l=r.length;s<l;s++)r[s].fixed||i.getNodeByIndex(s).setLayout(r[s].p),t[n.getId(s)]=r[s].p;for(s=0,l=a.length;s<l;s++){var u=a[s],c=i.getEdgeByIndex(s),h=u.n1.p,d=u.n2.p,p=c.getLayout();(p=p?p.slice():[])[0]=p[0]||[],p[1]=p[1]||[],Ce.copy(p[0],h),Ce.copy(p[1],d),+u.curveness&&(p[2]=[(h[0]+d[0])/2-(h[1]-d[1])*u.curveness,(h[1]+d[1])/2-(d[0]-h[0])*u.curveness]),c.setLayout(p)}e&&e(o)}))},e.forceLayout=g,e.preservedPoints=t,g.step()}else e.forceLayout=null}))},hA=Hu.getLayoutRect;var dA=function(e,t){var i=[];return e.eachSeriesByType("graph",(function(e){var n=e.get("coordinateSystem");if(!n||"view"===n){var r=e.getData(),a=r.mapArray((function(e){var t=r.getItemModel(e);return[+t.get("x"),+t.get("y")]})),o=[],s=[];eo.fromPoints(a,o,s),s[0]-o[0]==0&&(s[0]+=1,o[0]-=1),s[1]-o[1]==0&&(s[1]+=1,o[1]-=1);var l=(s[0]-o[0])/(s[1]-o[1]),u=function(e,t,i){var n=e.getBoxLayoutParams();return n.aspect=i,hA(n,{width:t.getWidth(),height:t.getHeight()})}(e,t,l);isNaN(l)&&(o=[u.x,u.y],s=[u.x+u.width,u.y+u.height]);var c=s[0]-o[0],h=s[1]-o[1],d=u.width,p=u.height,f=e.coordinateSystem=new gx;f.zoomLimit=e.get("scaleLimit"),f.setBoundingRect(o[0],o[1],c,h),f.setViewRect(u.x,u.y,d,p),f.setCenter(e.get("center")),f.setZoom(e.get("zoom")),i.push(f)}})),i};ty.registerProcessor(GT),ty.registerVisual(Cb("graph","circle",null)),ty.registerVisual(HT),ty.registerVisual(jT),ty.registerLayout(KT),ty.registerLayout(ty.PRIORITY.VISUAL.POST_CHART_LAYOUT,rA),ty.registerLayout(cA),ty.registerCoordinateSystem("graphView",{create:dA});zd.extend({type:"series.gauge",getInitialData:function(e,t){return ry(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});var pA=Go.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(e,t){var i=Math.cos,n=Math.sin,r=t.r,a=t.width,o=t.angle,s=t.x-i(o)*a*(a>=r/3?1:2),l=t.y-n(o)*a*(a>=r/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+i(o)*a,t.y+n(o)*a),e.lineTo(t.x+i(t.angle)*r,t.y+n(t.angle)*r),e.lineTo(t.x-i(o)*a,t.y-n(o)*a),e.lineTo(s,l)}}),fA=Su.parsePercent,gA=Su.round,mA=Su.linearMap;function vA(e,t){return t&&("string"==typeof t?e=t.replace("{value}",null!=e?e:""):"function"==typeof t&&(e=t(e))),e}var yA=2*Math.PI,xA=(ep.extend({type:"gauge",render:function(e,t,i){this.group.removeAll();var n=e.get("axisLine.lineStyle.color"),r=function(e,t){var i=e.get("center"),n=t.getWidth(),r=t.getHeight(),a=Math.min(n,r);return{cx:fA(i[0],t.getWidth()),cy:fA(i[1],t.getHeight()),r:fA(e.get("radius"),a/2)}}(e,i);this._renderMain(e,t,i,n,r)},dispose:function(){},_renderMain:function(e,t,i,n,r){for(var a=this.group,o=e.getModel("axisLine"),s=o.getModel("lineStyle"),l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,c=((g=-e.get("endAngle")/180*Math.PI)-u)%yA,h=u,d=s.get("width"),p=o.get("show"),f=0;p&&f<n.length;f++){var g=u+c*Math.min(Math.max(n[f][0],0),1),m=new ru.Sector({shape:{startAngle:h,endAngle:g,cx:r.cx,cy:r.cy,clockwise:l,r0:r.r-d,r:r.r},silent:!0});m.setStyle({fill:n[f][1]}),m.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),a.add(m),h=g}var v=function(e){if(e<=0)return n[0][1];for(var t=0;t<n.length;t++)if(n[t][0]>=e&&(0===t?0:n[t-1][0])<e)return n[t][1];return n[t-1][1]};if(!l){var y=u;u=g,g=y}this._renderTicks(e,t,i,v,r,u,g,l),this._renderPointer(e,t,i,v,r,u,g,l),this._renderTitle(e,t,i,v,r),this._renderDetail(e,t,i,v,r)},_renderTicks:function(e,t,i,n,r,a,o,s){for(var l=this.group,u=r.cx,c=r.cy,h=r.r,d=+e.get("min"),p=+e.get("max"),f=e.getModel("splitLine"),g=e.getModel("axisTick"),m=e.getModel("axisLabel"),v=e.get("splitNumber"),y=g.get("splitNumber"),x=fA(f.get("length"),h),_=fA(g.get("length"),h),b=a,w=(o-a)/v,S=w/y,M=f.getModel("lineStyle").getLineStyle(),I=g.getModel("lineStyle").getLineStyle(),T=0;T<=v;T++){var A=Math.cos(b),C=Math.sin(b);if(f.get("show")){var D=new ru.Line({shape:{x1:A*h+u,y1:C*h+c,x2:A*(h-x)+u,y2:C*(h-x)+c},style:M,silent:!0});"auto"===M.stroke&&D.setStyle({stroke:n(T/v)}),l.add(D)}if(m.get("show")){var L=vA(gA(T/v*(p-d)+d),m.get("formatter")),P=m.get("distance"),k=n(T/v);l.add(new ru.Text({style:ru.setTextStyle({},m,{text:L,x:A*(h-x-P)+u,y:C*(h-x-P)+c,textVerticalAlign:C<-.4?"top":C>.4?"bottom":"middle",textAlign:A<-.4?"left":A>.4?"right":"center"},{autoColor:k}),silent:!0}))}if(g.get("show")&&T!==v){for(var O=0;O<=y;O++){A=Math.cos(b),C=Math.sin(b);var R=new ru.Line({shape:{x1:A*h+u,y1:C*h+c,x2:A*(h-_)+u,y2:C*(h-_)+c},silent:!0,style:I});"auto"===I.stroke&&R.setStyle({stroke:n((T+O/y)/v)}),l.add(R),b+=S}b-=S}else b+=w}},_renderPointer:function(e,t,i,n,r,a,o,s){var l=this.group,u=this._data;if(e.get("pointer.show")){var c=[+e.get("min"),+e.get("max")],h=[a,o],d=e.getData(),p=d.mapDimension("value");d.diff(u).add((function(t){var i=new pA({shape:{angle:a}});ru.initProps(i,{shape:{angle:mA(d.get(p,t),c,h,!0)}},e),l.add(i),d.setItemGraphicEl(t,i)})).update((function(t,i){var n=u.getItemGraphicEl(i);ru.updateProps(n,{shape:{angle:mA(d.get(p,t),c,h,!0)}},e),l.add(n),d.setItemGraphicEl(t,n)})).remove((function(e){var t=u.getItemGraphicEl(e);l.remove(t)})).execute(),d.eachItemGraphicEl((function(e,t){var i=d.getItemModel(t),a=i.getModel("pointer");e.setShape({x:r.cx,y:r.cy,width:fA(a.get("width"),r.r),r:fA(a.get("length"),r.r)}),e.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===e.style.fill&&e.setStyle("fill",n(mA(d.get(p,t),c,[0,1],!0))),ru.setHoverStyle(e,i.getModel("emphasis.itemStyle").getItemStyle())})),this._data=d}else u&&u.eachItemGraphicEl((function(e){l.remove(e)}))},_renderTitle:function(e,t,i,n,r){var a=e.getData(),o=a.mapDimension("value"),s=e.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=r.cx+fA(l[0],r.r),c=r.cy+fA(l[1],r.r),h=+e.get("min"),d=+e.get("max"),p=e.getData().get(o,0),f=n(mA(p,[h,d],[0,1],!0));this.group.add(new ru.Text({silent:!0,style:ru.setTextStyle({},s,{x:u,y:c,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}},_renderDetail:function(e,t,i,n,r){var a=e.getModel("detail"),o=+e.get("min"),s=+e.get("max");if(a.get("show")){var l=a.get("offsetCenter"),u=r.cx+fA(l[0],r.r),c=r.cy+fA(l[1],r.r),h=fA(a.get("width"),r.r),d=fA(a.get("height"),r.r),p=e.getData(),f=p.get(p.mapDimension("value"),0),g=n(mA(f,[o,s],[0,1],!0));this.group.add(new ru.Text({silent:!0,style:ru.setTextStyle({},a,{x:u,y:c,text:vA(f,a.get("formatter")),textWidth:isNaN(h)?null:h,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),xa.defaultEmphasis),_A=Ec.makeSeriesEncodeForNameBased,bA=ty.extendSeriesModel({type:"series.funnel",init:function(e){bA.superApply(this,"init",arguments),this.legendVisualProvider=new CS(we.bind(this.getData,this),we.bind(this.getRawData,this)),this._defaultLabelLine(e)},getInitialData:function(e,t){return ry(this,{coordDimensions:["value"],encodeDefaulter:we.curry(_A,this)})},_defaultLabelLine:function(e){xA(e,"labelLine",["show"]);var t=e.labelLine,i=e.emphasis.labelLine;t.show=t.show&&e.label.show,i.show=i.show&&e.emphasis.label.show},getDataParams:function(e){var t=this.getData(),i=bA.superCall(this,"getDataParams",e),n=t.mapDimension("value"),r=t.getSum(n);return i.percent=r?+(t.get(n,e)/r*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}});function wA(e,t){ru.Group.call(this);var i=new ru.Polygon,n=new ru.Polyline,r=new ru.Text;this.add(i),this.add(n),this.add(r),this.highDownOnUpdate=function(e,t){"emphasis"===t?(n.ignore=n.hoverIgnore,r.ignore=r.hoverIgnore):(n.ignore=n.normalIgnore,r.ignore=r.normalIgnore)},this.updateData(e,t,!0)}var SA=wA.prototype,MA=["itemStyle","opacity"];SA.updateData=function(e,t,i){var n=this.childAt(0),r=e.hostModel,a=e.getItemModel(t),o=e.getItemLayout(t),s=e.getItemModel(t).get(MA);s=null==s?1:s,n.useStyle({}),i?(n.setShape({points:o.points}),n.setStyle({opacity:0}),ru.initProps(n,{style:{opacity:s}},r,t)):ru.updateProps(n,{style:{opacity:s},shape:{points:o.points}},r,t);var l=a.getModel("itemStyle"),u=e.getItemVisual(t,"color");n.setStyle(we.defaults({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),n.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(e,t),ru.setHoverStyle(this)},SA._updateLabel=function(e,t){var i=this.childAt(1),n=this.childAt(2),r=e.hostModel,a=e.getItemModel(t),o=e.getItemLayout(t).label,s=e.getItemVisual(t,"color");ru.updateProps(i,{shape:{points:o.linePoints||o.linePoints}},r,t),ru.updateProps(n,{style:{x:o.x,y:o.y}},r,t),n.attr({rotation:o.rotation,origin:[o.x,o.y],z2:10});var l=a.getModel("label"),u=a.getModel("emphasis.label"),c=a.getModel("labelLine"),h=a.getModel("emphasis.labelLine");s=e.getItemVisual(t,"color");ru.setLabelStyle(n.style,n.hoverStyle={},l,u,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:e.getName(t),autoColor:s,useInsideStyle:!!o.inside},{textAlign:o.textAlign,textVerticalAlign:o.verticalAlign}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!c.get("show"),i.hoverIgnore=!h.get("show"),i.setStyle({stroke:s}),i.setStyle(c.getModel("lineStyle").getLineStyle()),i.hoverStyle=h.getModel("lineStyle").getLineStyle()},we.inherits(wA,ru.Group);ep.extend({type:"funnel",render:function(e,t,i){var n=e.getData(),r=this._data,a=this.group;n.diff(r).add((function(e){var t=new wA(n,e);n.setItemGraphicEl(e,t),a.add(t)})).update((function(e,t){var i=r.getItemGraphicEl(t);i.updateData(n,e),a.add(i),n.setItemGraphicEl(e,i)})).remove((function(e){var t=r.getItemGraphicEl(e);a.remove(t)})).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var IA=Su.parsePercent,TA=Su.linearMap;var AA=function(e,t,i){e.eachSeriesByType("funnel",(function(e){var i=e.getData(),n=i.mapDimension("value"),r=e.get("sort"),a=function(e,t){return Hu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t),o=function(e,t){for(var i=e.mapDimension("value"),n=e.mapArray(i,(function(e){return e})),r=[],a="ascending"===t,o=0,s=e.count();o<s;o++)r[o]=o;return"function"==typeof t?r.sort(t):"none"!==t&&r.sort((function(e,t){return a?n[e]-n[t]:n[t]-n[e]})),r}(i,r),s=[IA(e.get("minSize"),a.width),IA(e.get("maxSize"),a.width)],l=i.getDataExtent(n),u=e.get("min"),c=e.get("max");null==u&&(u=Math.min(l[0],0)),null==c&&(c=l[1]);var h=e.get("funnelAlign"),d=e.get("gap"),p=(a.height-d*(i.count()-1))/i.count(),f=a.y,g=function(e,t){var r,o=i.get(n,e)||0,l=TA(o,[u,c],s,!0);switch(h){case"left":r=a.x;break;case"center":r=a.x+(a.width-l)/2;break;case"right":r=a.x+a.width-l}return[[r,t],[r+l,t]]};"ascending"===r&&(p=-p,d=-d,f+=a.height,o=o.reverse());for(var m=0;m<o.length;m++){var v=o[m],y=o[m+1],x=i.getItemModel(v).get("itemStyle.height");null==x?x=p:(x=IA(x,a.height),"ascending"===r&&(x=-x));var _=g(v,f),b=g(y,f+x);f+=x+d,i.setItemLayout(v,{points:_.concat(b.slice().reverse())})}!function(e){e.each((function(t){var i,n,r,a,o=e.getItemModel(t),s=o.getModel("label").get("position"),l=o.getModel("labelLine"),u=e.getItemLayout(t),c=u.points,h="inner"===s||"inside"===s||"center"===s||"insideLeft"===s||"insideRight"===s;if(h)"insideLeft"===s?(n=(c[0][0]+c[3][0])/2+5,r=(c[0][1]+c[3][1])/2,i="left"):"insideRight"===s?(n=(c[1][0]+c[2][0])/2-5,r=(c[1][1]+c[2][1])/2,i="right"):(n=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,r=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,i="center"),a=[[n,r],[n,r]];else{var d,p,f,g=l.get("length");"left"===s?(d=(c[3][0]+c[0][0])/2,p=(c[3][1]+c[0][1])/2,n=(f=d-g)-5,i="right"):"right"===s?(d=(c[1][0]+c[2][0])/2,p=(c[1][1]+c[2][1])/2,n=(f=d+g)+5,i="left"):"rightTop"===s?(d=c[1][0],p=c[1][1],n=(f=d+g)+5,i="top"):"rightBottom"===s?(d=c[2][0],p=c[2][1],n=(f=d+g)+5,i="bottom"):"leftTop"===s?(d=c[0][0],p=c[1][1],n=(f=d-g)-5,i="right"):"leftBottom"===s?(d=c[3][0],p=c[2][1],n=(f=d-g)-5,i="right"):(d=(c[1][0]+c[2][0])/2,p=(c[1][1]+c[2][1])/2,n=(f=d+g)+5,i="left");a=[[d,p],[f,p]],r=p}u.label={linePoints:a,x:n,y:r,verticalAlign:"middle",textAlign:i,inside:h}}))}(i)}))};ty.registerVisual(BS("funnel")),ty.registerLayout(AA),ty.registerProcessor(XS("funnel"));var CA=function(e){!function(e){if(e.parallel)return;var t=!1;we.each(e.series,(function(e){e&&"parallel"===e.type&&(t=!0)})),t&&(e.parallel=[{}])}(e),function(e){var t=xa.normalizeToArray(e.parallelAxis);we.each(t,(function(t){if(we.isObject(t)){var i=t.parallelIndex||0,n=xa.normalizeToArray(e.parallel)[i];n&&n.parallelAxisDefault&&we.merge(t,n.parallelAxisDefault,!1)}}))}(e)},DA=function(e,t,i,n,r){zv.call(this,e,t,i),this.type=n||"value",this.axisIndex=r};DA.prototype={constructor:DA,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},we.inherits(DA,zv);var LA=DA;function PA(e,t){var i=e[t]-e[1-t];return{span:Math.abs(i),sign:i>0?-1:i<0?1:t?-1:1}}function kA(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var OA=function(e,t,i,n,r,a){e=e||0;var o=i[1]-i[0];if(null!=r&&(r=kA(r,[0,o])),null!=a&&(a=Math.max(a,null!=r?r:0)),"all"===n){var s=Math.abs(t[1]-t[0]);s=kA(s,[0,o]),r=a=kA(s,[r,a]),n=0}t[0]=kA(t[0],i),t[1]=kA(t[1],i);var l=PA(t,n);t[n]+=e;var u=r||0,c=i.slice();l.sign<0?c[0]+=u:c[1]-=u,t[n]=kA(t[n],c);var h=PA(t,n);return null!=r&&(h.sign!==l.sign||h.span<r)&&(t[1-n]=t[n]+l.sign*r),h=PA(t,n),null!=a&&h.span>a&&(t[1-n]=t[n]+h.sign*a),t},RA=we.each,NA=Math.min,EA=Math.max,zA=Math.floor,BA=Math.ceil,VA=Su.round,FA=Math.PI;function GA(e,t,i){this._axesMap=we.createHashMap(),this._axesLayout={},this.dimensions=e.dimensions,this._rect,this._model=e,this._init(e,t,i)}function HA(e,t){return NA(EA(e,t[0]),t[1])}function WA(e,t){var i=t.layoutLength/(t.axisCount-1);return{position:i*e,axisNameAvailableWidth:i,axisLabelShow:!0}}function jA(e,t){var i,n,r=t.layoutLength,a=t.axisExpandWidth,o=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,u=s,c=!1;return e<l[0]?(i=e*s,n=s):e<=l[1]?(i=t.axisExpandWindow0Pos+e*a-t.axisExpandWindow[0],u=a,c=!0):(i=r-(o-1-e)*s,n=s),{position:i,axisNameAvailableWidth:u,axisLabelShow:c,nameTruncateMaxWidth:n}}GA.prototype={type:"parallel",constructor:GA,_init:function(e,t,i){var n=e.dimensions,r=e.parallelAxisIndex;RA(n,(function(e,i){var n=r[i],a=t.getComponent("parallelAxis",n),o=this._axesMap.set(e,new LA(e,jm.createScaleByModel(a),[0,0],a.get("type"),n)),s="category"===o.type;o.onBand=s&&a.get("boundaryGap"),o.inverse=a.get("inverse"),a.axis=o,o.model=a,o.coordinateSystem=a.coordinateSystem=this}),this)},update:function(e,t){this._updateAxesFromSeries(this._model,e)},containPoint:function(e){var t=this._makeLayoutInfo(),i=t.axisBase,n=t.layoutBase,r=t.pixelDimIndex,a=e[1-r],o=e[r];return a>=i&&a<=i+t.axisLength&&o>=n&&o<=n+t.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,t){t.eachSeries((function(i){if(e.contains(i,t)){var n=i.getData();RA(this.dimensions,(function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(n,n.mapDimension(e)),jm.niceScaleExtent(t.scale,t.model)}),this)}}),this)},resize:function(e,t){this._rect=Hu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var e,t=this._model,i=this._rect,n=["x","y"],r=["width","height"],a=t.get("layout"),o="horizontal"===a?0:1,s=i[r[o]],l=[0,s],u=this.dimensions.length,c=HA(t.get("axisExpandWidth"),l),h=HA(t.get("axisExpandCount")||0,[0,u]),d=t.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,p=t.get("axisExpandWindow");p?(e=HA(p[1]-p[0],l),p[1]=p[0]+e):(e=HA(c*(h-1),l),(p=[c*(t.get("axisExpandCenter")||zA(u/2))-e/2])[1]=p[0]+e);var f=(s-e)/(u-h);f<3&&(f=0);var g=[zA(VA(p[0]/c,1))+1,BA(VA(p[1]/c,1))-1],m=f/c*p[0];return{layout:a,pixelDimIndex:o,layoutBase:i[n[o]],layoutLength:s,axisBase:i[n[1-o]],axisLength:i[r[1-o]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var e=this._rect,t=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),r=n.layout;t.each((function(e){var t=[0,n.axisLength],i=e.inverse?1:0;e.setExtent(t[i],t[1-i])})),RA(i,(function(t,i){var a=(n.axisExpandable?jA:WA)(i,n),o={horizontal:{x:a.position,y:n.axisLength},vertical:{x:0,y:a.position}},s={horizontal:FA/2,vertical:0},l=[o[r].x+e.x,o[r].y+e.y],u=s[r],c=ft.create();ft.rotate(c,c,u),ft.translate(c,c,l),this._axesLayout[t]={position:l,rotation:u,transform:c,axisNameAvailableWidth:a.axisNameAvailableWidth,axisLabelShow:a.axisLabelShow,nameTruncateMaxWidth:a.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},getAxis:function(e){return this._axesMap.get(e)},dataToPoint:function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},eachActiveState:function(e,t,i,n){null==i&&(i=0),null==n&&(n=e.count());var r=this._axesMap,a=this.dimensions,o=[],s=[];we.each(a,(function(t){o.push(e.mapDimension(t)),s.push(r.get(t).model)}));for(var l=this.hasAxisBrushed(),u=i;u<n;u++){var c;if(l){c="active";for(var h=e.getValues(o,u),d=0,p=a.length;d<p;d++){if("inactive"===s[d].getActiveState(h[d])){c="inactive";break}}}else c="normal";t(c,u)}},hasAxisBrushed:function(){for(var e=this.dimensions,t=this._axesMap,i=!1,n=0,r=e.length;n<r;n++)"normal"!==t.get(e[n]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(e,t){var i=this._axesLayout[t];return ru.applyTransform([e,0],i.transform)},getAxisLayout:function(e){return we.clone(this._axesLayout[e])},getSlidedAxisExpandWindow:function(e){var t=this._makeLayoutInfo(),i=t.pixelDimIndex,n=t.axisExpandWindow.slice(),r=n[1]-n[0],a=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:n};var o,s=e[i]-t.layoutBase-t.axisExpandWindow0Pos,l="slide",u=t.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),h=null!=c[0];if(u)h&&u&&s<r*c[0]?(l="jump",o=s-r*c[2]):h&&u&&s>r*(1-c[0])?(l="jump",o=s-r*(1-c[2])):(o=s-r*c[1])>=0&&(o=s-r*(1-c[1]))<=0&&(o=0),(o*=t.axisExpandWidth/u)?OA(o,n,a,"all"):l="none";else{r=n[1]-n[0];(n=[EA(0,a[1]*s/r-r/2)])[1]=NA(a[1],n[0]+r),n[0]=n[1]-r}return{axisExpandWindow:n,behavior:l}}};var UA=GA;oh.register("parallel",{create:function(e,t){var i=[];return e.eachComponent("parallel",(function(n,r){var a=new UA(n,e,t);a.name="parallel_"+r,a.resize(n,t),n.coordinateSystem=a,a.model=n,i.push(a)})),e.eachSeries((function(t){if("parallel"===t.get("coordinateSystem")){var i=e.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=i.coordinateSystem}})),i}});var ZA=qu.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Ta([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(e){var t=this.activeIntervals=we.clone(e);if(t)for(var i=t.length-1;i>=0;i--)Su.asc(t[i])},getActiveState:function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(e))return"inactive";if(1===t.length){var i=t[0];if(i[0]<=e&&e<=i[1])return"active"}else for(var n=0,r=t.length;n<r;n++)if(t[n][0]<=e&&e<=t[n][1])return"active";return"inactive"}});we.merge(ZA.prototype,Um),qb("parallel",ZA,(function(e,t){return t.type||(t.data?"category":"value")}),{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10});qu.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){qu.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(e){var t=this.option;e&&we.merge(t,e,!0),this._initDimensions()},contains:function(e,t){var i=e.get("parallelIndex");return null!=i&&t.getComponent("parallel",i)===this},setAxisExpand:function(e){we.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])}),this)},_initDimensions:function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[],i=we.filter(this.dependentModels.parallelAxis,(function(e){return(e.get("parallelIndex")||0)===this.componentIndex}),this);we.each(i,(function(i){e.push("dim"+i.get("dim")),t.push(i.componentIndex)}))}});ty.registerAction({type:"axisAreaSelect",event:"axisAreaSelected"},(function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},(function(t){t.axis.model.setActiveIntervals(e.intervals)}))})),ty.registerAction("parallelAxisExpand",(function(e,t){t.eachComponent({mainType:"parallel",query:e},(function(t){t.setAxisExpand(e)}))}));var YA=we.curry,qA=we.each,XA=we.map,KA=Math.min,QA=Math.max,JA=Math.pow,$A={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},eC={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},tC={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},iC=0;function nC(e){Ne.call(this),this._zr=e,this.group=new ru.Group,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+iC++,this._handlers={},qA(DC,(function(e,t){this._handlers[t]=we.bind(e,this)}),this)}function rC(e,t){var i=PC[t.brushType].createCover(e,t);return i.__brushOption=t,sC(i,t),e.group.add(i),i}function aC(e,t){var i=uC(t);return i.endCreating&&(i.endCreating(e,t),sC(t,t.__brushOption)),t}function oC(e,t){var i=t.__brushOption;uC(t).updateCoverShape(e,t,i.range,i)}function sC(e,t){var i=t.z;null==i&&(i=1e4),e.traverse((function(e){e.z=i,e.z2=i}))}function lC(e,t){uC(t).updateCommon(e,t),oC(e,t)}function uC(e){return PC[e.__brushOption.brushType]}function cC(e,t,i){var n,r=e._panels;if(!r)return!0;var a=e._transform;return qA(r,(function(e){e.isTargetByCursor(t,i,a)&&(n=e)})),n}function hC(e,t){var i=e._panels;if(!i)return!0;var n=t.__brushOption.panelId;return null==n||i[n]}function dC(e){var t=e._covers,i=t.length;return qA(t,(function(t){e.group.remove(t)}),e),t.length=0,!!i}function pC(e,t){var i=XA(e._covers,(function(e){var t=e.__brushOption,i=we.clone(t.range);return{brushType:t.brushType,panelId:t.panelId,range:i}}));e.trigger("brush",i,{isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function fC(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function gC(e,t,i,n){var r=new ru.Group;return r.add(new ru.Rect({name:"main",style:xC(i),silent:!0,draggable:!0,cursor:"move",drift:YA(e,t,r,"nswe"),ondragend:YA(pC,t,{isEnd:!0})})),qA(n,(function(i){r.add(new ru.Rect({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:YA(e,t,r,i),ondragend:YA(pC,t,{isEnd:!0})}))})),r}function mC(e,t,i,n){var r=n.brushStyle.lineWidth||0,a=QA(r,6),o=i[0][0],s=i[1][0],l=o-r/2,u=s-r/2,c=i[0][1],h=i[1][1],d=c-a+r/2,p=h-a+r/2,f=c-o,g=h-s,m=f+r,v=g+r;yC(e,t,"main",o,s,f,g),n.transformable&&(yC(e,t,"w",l,u,a,v),yC(e,t,"e",d,u,a,v),yC(e,t,"n",l,u,m,a),yC(e,t,"s",l,p,m,a),yC(e,t,"nw",l,u,a,a),yC(e,t,"ne",d,u,a,a),yC(e,t,"sw",l,p,a,a),yC(e,t,"se",d,p,a,a))}function vC(e,t){var i=t.__brushOption,n=i.transformable,r=t.childAt(0);r.useStyle(xC(i)),r.attr({silent:!n,cursor:n?"move":"default"}),qA(["w","e","n","s","se","sw","ne","nw"],(function(i){var r=t.childOfName(i),a=function e(t,i){if(i.length>1)return i=i.split(""),("e"===(n=[e(t,i[0]),e(t,i[1])])[0]||"w"===n[0])&&n.reverse(),n.join("");var n;return{left:"w",right:"e",top:"n",bottom:"s"}[n=ru.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[i],function(e){return ru.getTransform(e.group)}(t))]}(e,i);r&&r.attr({silent:!n,invisible:!n,cursor:n?eC[a]+"-resize":null})}))}function yC(e,t,i,n,r,a,o){var s=t.childOfName(i);s&&s.setShape(function(e){var t=KA(e[0][0],e[1][0]),i=KA(e[0][1],e[1][1]),n=QA(e[0][0],e[1][0]),r=QA(e[0][1],e[1][1]);return{x:t,y:i,width:n-t,height:r-i}}(MC(e,t,[[n,r],[n+a,r+o]])))}function xC(e){return we.defaults({strokeNoScale:!0},e.brushStyle)}function _C(e,t,i,n){var r=[KA(e,i),KA(t,n)],a=[QA(e,i),QA(t,n)];return[[r[0],a[0]],[r[1],a[1]]]}function bC(e,t,i,n,r,a,o,s){var l=n.__brushOption,u=e(l.range),c=SC(i,a,o);qA(r.split(""),(function(e){var t=$A[e];u[t[0]][t[1]]+=c[t[0]]})),l.range=t(_C(u[0][0],u[1][0],u[0][1],u[1][1])),lC(i,n),pC(i,{isEnd:!1})}function wC(e,t,i,n,r){var a=t.__brushOption.range,o=SC(e,i,n);qA(a,(function(e){e[0]+=o[0],e[1]+=o[1]})),lC(e,t),pC(e,{isEnd:!1})}function SC(e,t,i){var n=e.group,r=n.transformCoordToLocal(t,i),a=n.transformCoordToLocal(0,0);return[r[0]-a[0],r[1]-a[1]]}function MC(e,t,i){var n=hC(e,t);return n&&!0!==n?n.clipPath(i,e._transform):we.clone(i)}function IC(e){var t=e.event;t.preventDefault&&t.preventDefault()}function TC(e,t,i){return e.childOfName("main").contain(t,i)}function AC(e,t,i,n){var r,a=e._creatingCover,o=e._creatingPanel,s=e._brushOption;if(e._track.push(i.slice()),function(e){var t=e._track;if(!t.length)return!1;var i=t[t.length-1],n=t[0],r=i[0]-n[0],a=i[1]-n[1];return JA(r*r+a*a,.5)>6}(e)||a){if(o&&!a){"single"===s.brushMode&&dC(e);var l=we.clone(s);l.brushType=CC(l.brushType,o),l.panelId=!0===o?null:o.panelId,a=e._creatingCover=rC(e,l),e._covers.push(a)}if(a){var u=PC[CC(e._brushType,o)];a.__brushOption.range=u.getCreatingRange(MC(e,a,e._track)),n&&(aC(e,a),u.updateCommon(e,a)),oC(e,a),r={isEnd:n}}}else n&&"single"===s.brushMode&&s.removeOnClick&&cC(e,t,i)&&dC(e)&&(r={isEnd:n,removeOnClick:!0});return r}function CC(e,t){return"auto"===e?t.defaultBrushType:e}nC.prototype={constructor:nC,enableBrush:function(e){var t,i;return this._brushType&&(i=(t=this)._zr,Gy.release(i,"globalPan",t._uid),function(e,t){qA(t,(function(t,i){e.off(i,t)}))}(i,t._handlers),t._brushType=t._brushOption=null),e.brushType&&function(e,t){var i=e._zr;e._enableGlobalPan||Gy.take(i,"globalPan",e._uid);(function(e,t){qA(t,(function(t,i){e.on(i,t)}))})(i,e._handlers),e._brushType=t.brushType,e._brushOption=we.merge(we.clone(tC),t,!0)}(this,e),this},setPanels:function(e){if(e&&e.length){var t=this._panels={};we.each(e,(function(e){t[e.panelId]=we.clone(e)}))}else this._panels=null;return this},mount:function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({position:e.position||[0,0],rotation:e.rotation||0,scale:e.scale||[1,1]}),this._transform=t.getLocalTransform(),this},eachCover:function(e,t){qA(this._covers,e,t)},updateCovers:function(e){e=we.map(e,(function(e){return we.merge(we.clone(tC),e,!0)}));var t=this._covers,i=this._covers=[],n=this,r=this._creatingCover;return new Cf(t,e,(function(e,t){return a(e.__brushOption,t)}),a).add(o).update(o).remove((function(e){t[e]!==r&&n.group.remove(t[e])})).execute(),this;function a(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function o(a,o){var s=e[a];if(null!=o&&t[o]===r)i[a]=t[o];else{var l=i[a]=null!=o?(t[o].__brushOption=s,t[o]):aC(n,rC(n,s));lC(n,l)}}},unmount:function(){return this.enableBrush(!1),dC(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},we.mixin(nC,Ne);var DC={mousedown:function(e){if(this._dragging)LC(this,e);else if(!e.target||!e.target.draggable){IC(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=cC(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,i=e.offsetY,n=this.group.transformCoordToLocal(t,i);if(function(e,t,i){if(e._brushType&&!function(e,t,i){var n=e._zr;return t<0||t>n.getWidth()||i<0||i>n.getHeight()}(e,t)){var n=e._zr,r=e._covers,a=cC(e,t,i);if(!e._dragging)for(var o=0;o<r.length;o++){var s=r[o].__brushOption;if(a&&(!0===a||s.panelId===a.panelId)&&PC[s.brushType].contain(r[o],i[0],i[1]))return}a&&n.setCursorStyle("crosshair")}}(this,e,n),this._dragging){IC(e);var r=AC(this,e,n,!1);r&&pC(this,r)}},mouseup:function(e){LC(this,e)}};function LC(e,t){if(e._dragging){IC(t);var i=t.offsetX,n=t.offsetY,r=e.group.transformCoordToLocal(i,n),a=AC(e,t,r,!0);e._dragging=!1,e._track=[],e._creatingCover=null,a&&pC(e,a)}}var PC={lineX:kC(0),lineY:kC(1),rect:{createCover:function(e,t){return gC(YA(bC,(function(e){return e}),(function(e){return e})),e,t,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(e){var t=fC(e);return _C(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,i,n){mC(e,t,i,n)},updateCommon:vC,contain:TC},polygon:{createCover:function(e,t){var i=new ru.Group;return i.add(new ru.Polyline({name:"main",style:xC(t),silent:!0})),i},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new ru.Polygon({name:"main",draggable:!0,drift:YA(wC,e,t),ondragend:YA(pC,e,{isEnd:!0})}))},updateCoverShape:function(e,t,i,n){t.childAt(0).setShape({points:MC(e,t,i)})},updateCommon:vC,contain:TC}};function kC(e){return{createCover:function(t,i){return gC(YA(bC,(function(t){var i=[t,[0,100]];return e&&i.reverse(),i}),(function(t){return t[e]})),t,i,[["w","e"],["n","s"]][e])},getCreatingRange:function(t){var i=fC(t);return[KA(i[0][e],i[1][e]),QA(i[0][e],i[1][e])]},updateCoverShape:function(t,i,n,r){var a,o=hC(t,i);if(!0!==o&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e,t._transform);else{var s=t._zr;a=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[n,a];e&&l.reverse(),mC(t,i,l,r)},updateCommon:vC,contain:TC}}var OC=nC,RC=ex.onIrrelevantElement;function NC(e){return Ni.create(e)}var EC={makeRectPanelClipPath:function(e){return e=NC(e),function(t,i){return ru.clipPointsByRect(t,e)}},makeLinearBrushOtherExtent:function(e,t){return e=NC(e),function(i){var n=null!=t?t:i,r=n?e.width:e.height,a=n?e.x:e.y;return[a,a+(r||0)]}},makeRectIsTargetByCursor:function(e,t,i){return e=NC(e),function(n,r,a){return e.contain(r[0],r[1])&&!RC(n,t,i)}}},zC=["axisLine","axisTickLabel","axisName"],BC=ty.extendComponentView({type:"parallelAxis",init:function(e,t){BC.superApply(this,"init",arguments),(this._brushController=new OC(t.getZr())).on("brush",we.bind(this._onBrush,this))},render:function(e,t,i,n){if(!function(e,t,i){return i&&"axisAreaSelect"===i.type&&t.findComponents({mainType:"parallelAxis",query:i})[0]===e}(e,t,n)){this.axisModel=e,this.api=i,this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new ru.Group,this.group.add(this._axisGroup),e.get("show")){var a=function(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}(e,t),o=a.coordinateSystem,s=e.getAreaSelectStyle(),l=s.width,u=e.axis.dim,c=o.getAxisLayout(u),h=we.extend({strokeContainThreshold:l},c),d=new Nw(e,h);we.each(zC,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(h,s,e,a,l,i);var p=n&&!1===n.animation?null:e;ru.groupTransition(r,this._axisGroup,p)}}},_refreshBrushController:function(e,t,i,n,r,a){var o=i.axis.getExtent(),s=o[1]-o[0],l=Math.min(30,.1*Math.abs(s)),u=ru.BoundingRect.create({x:o[0],y:-r/2,width:s,height:r});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,position:e.position}).setPanels([{panelId:"pl",clipPath:EC.makeRectPanelClipPath(u),isTargetByCursor:EC.makeRectIsTargetByCursor(u,a,n),getLinearBrushOtherExtent:EC.makeLinearBrushOtherExtent(u,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(function(e){var t=e.axis;return we.map(e.activeIntervals,(function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}}))}(i))},_onBrush:function(e,t){var i=this.axisModel,n=i.axis,r=we.map(e,(function(e){return[n.coordToData(e.range[0],!0),n.coordToData(e.range[1],!0)]}));(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:r})},dispose:function(){this._brushController.dispose()}});ty.extendComponentView({type:"parallel",render:function(e,t,i){this._model=e,this._api=i,this._handlers||(this._handlers={},we.each(VC,(function(e,t){i.getZr().on(t,this._handlers[t]=we.bind(e,this))}),this)),rp.createOrUpdate(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},dispose:function(e,t){we.each(this._handlers,(function(e,i){t.getZr().off(i,e)})),this._handlers=null},_throttledDispatchExpand:function(e){this._dispatchExpand(e)},_dispatchExpand:function(e){e&&this._api.dispatchAction(we.extend({type:"parallelAxisExpand"},e))}});var VC={mousedown:function(e){FC(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(FC(this,"click")&&t){var i=[e.offsetX,e.offsetY];if(Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2)>5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&FC(this,"mousemove")){var t=this._model,i=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};function FC(e,t){var i=e._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===t}ty.registerPreprocessor(CA);var GC=we.each,HC=we.createHashMap;zd.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(e,t){var i=this.getSource();return function(e,t){if(e.encodeDefine)return;var i=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(!i)return;var n=e.encodeDefine=HC();GC(i.dimensions,(function(e){var t=+e.replace("dim","");n.set(e,t)}))}(i,this),zg(i,this)},getRawIndicesByActiveState:function(e){var t=this.coordinateSystem,i=this.getData(),n=[];return t.eachActiveState(i,(function(t,r){e===t&&n.push(i.getRawIndex(r))})),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});ep.extend({type:"parallel",init:function(){this._dataGroup=new ru.Group,this.group.add(this._dataGroup),this._data,this._initialized},render:function(e,t,i,n){var r=this._dataGroup,a=e.getData(),o=this._data,s=e.coordinateSystem,l=s.dimensions,u=UC(e);if(a.diff(o).add((function(e){ZC(jC(a,r,e,l,s),a,e,u)})).update((function(t,i){var r=o.getItemGraphicEl(i),c=WC(a,t,l,s);a.setItemGraphicEl(t,r);var h=n&&!1===n.animation?null:e;ru.updateProps(r,{shape:{points:c}},h,t),ZC(r,a,t,u)})).remove((function(e){var t=o.getItemGraphicEl(e);r.remove(t)})).execute(),!this._initialized){this._initialized=!0;var c=function(e,t,i){var n=e.model,r=e.getRect(),a=new ru.Rect({shape:{x:r.x,y:r.y,width:r.width,height:r.height}}),o="horizontal"===n.get("layout")?"width":"height";return a.setShape(o,0),ru.initProps(a,{shape:{width:r.width,height:r.height}},t,i),a}(s,e,(function(){setTimeout((function(){r.removeClipPath()}))}));r.setClipPath(c)}this._data=a},incrementalPrepareRender:function(e,t,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(e,t,i){for(var n=t.getData(),r=t.coordinateSystem,a=r.dimensions,o=UC(t),s=e.start;s<e.end;s++){var l=jC(n,this._dataGroup,s,a,r);l.incremental=!0,ZC(l,n,s,o)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});function WC(e,t,i,n){for(var r,a=[],o=0;o<i.length;o++){var s=i[o],l=e.get(e.mapDimension(s),t);r=l,("category"===n.getAxis(s).type?null==r:null==r||isNaN(r))||a.push(n.dataToPoint(l,s))}return a}function jC(e,t,i,n,r){var a=WC(e,i,n,r),o=new ru.Polyline({shape:{points:a},silent:!0,z2:10});return t.add(o),e.setItemGraphicEl(i,o),o}function UC(e){var t=e.get("smooth",!0);return!0===t&&(t=.3),{lineStyle:e.getModel("lineStyle").getLineStyle(),smooth:null!=t?t:.3}}function ZC(e,t,i,n){var r=n.lineStyle;t.hasItemOption&&(r=t.getItemModel(i).getModel("lineStyle").getLineStyle());e.useStyle(r);var a=e.style;a.fill=null,a.stroke=t.getItemVisual(i,"color"),a.opacity=t.getItemVisual(i,"opacity"),n.smooth&&(e.shape.smooth=n.smooth)}var YC=["lineStyle","normal","opacity"],qC={seriesType:"parallel",reset:function(e,t,i){var n=e.getModel("itemStyle"),r=e.getModel("lineStyle"),a=t.get("color"),o=r.get("color")||n.get("color")||a[e.seriesIndex%a.length],s=e.get("inactiveOpacity"),l=e.get("activeOpacity"),u=e.getModel("lineStyle").getLineStyle(),c=e.coordinateSystem,h=e.getData(),d={normal:u.opacity,active:l,inactive:s};return h.setVisual("color",o),{progress:function(e,t){c.eachActiveState(t,(function(e,i){var n=d[e];if("normal"===e&&t.hasItemOption){var r=t.getItemModel(i).get(YC,!0);null!=r&&(n=r)}t.setItemVisual(i,"opacity",n)}),e.start,e.end)}}}};ty.registerVisual(qC);var XC=Pu.encodeHTML,KC=zd.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(e,t){for(var i=e.edges||e.links,n=e.data||e.nodes,r=e.levels,a=this.levelModels={},o=0;o<r.length;o++)null!=r[o].depth&&r[o].depth>=0&&(a[r[o].depth]=new vu(r[o],this,t));if(n&&i)return yT(n,i,this,!0,(function(e,t){e.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var i=this.parentModel,n=i.getData().getItemLayout(t).depth;return i.levelModels[n]||this.parentModel})),e})),t.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var i=this.parentModel,n=i.getGraph().getEdgeByIndex(t).node1.getLayout().depth;return i.levelModels[n]||this.parentModel})),e}))})).data},setNodePosition:function(e,t){var i=this.option.data[e];i.localX=t[0],i.localY=t[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(e,t,i){if("edge"===i){var n=this.getDataParams(e,i),r=n.data,a=r.source+" -- "+r.target;return n.value&&(a+=" : "+n.value),XC(a)}if("node"===i){var o=this.getGraph().getNodeByIndex(e).getLayout().value,s=this.getDataParams(e,i).data.name;if(o)a=s+" : "+o;return XC(a)}return KC.superCall(this,"formatTooltip",e,t)},optionUpdated:function(){var e=this.option;!0===e.focusNodeAdjacency&&(e.focusNodeAdjacency="allEdges")},getDataParams:function(e,t){var i=KC.superCall(this,"getDataParams",e,t);if(null==i.value&&"node"===t){var n=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=n}return i},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),QC=["itemStyle","opacity"],JC=["emphasis","itemStyle","opacity"],$C=["lineStyle","opacity"],eD=["emphasis","lineStyle","opacity"];function tD(e,t){return e.getVisual("opacity")||e.getModel().get(t)}function iD(e,t,i){var n=e.getGraphicEl(),r=tD(e,t);null!=i&&(null==r&&(r=1),r*=i),n.downplay&&n.downplay(),n.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",r)}))}function nD(e,t){var i=tD(e,t),n=e.getGraphicEl();n.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",i)})),n.highlight&&n.highlight()}var rD=ru.extendShape({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(e,t){var i=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+i,t.y2),e.bezierCurveTo(t.cpx2+i,t.cpy2,t.cpx1+i,t.cpy1,t.x1+i,t.y1)):(e.lineTo(t.x2,t.y2+i),e.bezierCurveTo(t.cpx2,t.cpy2+i,t.cpx1,t.cpy1+i,t.x1,t.y1+i)),e.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});ty.extendChartView({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(e,t,i){var n=this,r=e.getGraph(),a=this.group,o=e.layoutInfo,s=o.width,l=o.height,u=e.getData(),c=e.getData("edge"),h=e.get("orient");this._model=e,a.removeAll(),a.attr("position",[o.x,o.y]),r.eachEdge((function(t){var i=new rD;i.dataIndex=t.dataIndex,i.seriesIndex=e.seriesIndex,i.dataType="edge";var n,r,o,u,d,p,f,g,m=t.getModel("lineStyle"),v=m.get("curveness"),y=t.node1.getLayout(),x=t.node1.getModel(),_=x.get("localX"),b=x.get("localY"),w=t.node2.getLayout(),S=t.node2.getModel(),M=S.get("localX"),I=S.get("localY"),T=t.getLayout();switch(i.shape.extent=Math.max(1,T.dy),i.shape.orient=h,"vertical"===h?(n=(null!=_?_*s:y.x)+T.sy,r=(null!=b?b*l:y.y)+y.dy,o=(null!=M?M*s:w.x)+T.ty,d=n,p=r*(1-v)+(u=null!=I?I*l:w.y)*v,f=o,g=r*v+u*(1-v)):(n=(null!=_?_*s:y.x)+y.dx,r=(null!=b?b*l:y.y)+T.sy,d=n*(1-v)+(o=null!=M?M*s:w.x)*v,p=r,f=n*v+o*(1-v),g=u=(null!=I?I*l:w.y)+T.ty),i.setShape({x1:n,y1:r,x2:o,y2:u,cpx1:d,cpy1:p,cpx2:f,cpy2:g}),i.setStyle(m.getItemStyle()),i.style.fill){case"source":i.style.fill=t.node1.getVisual("color");break;case"target":i.style.fill=t.node2.getVisual("color")}ru.setHoverStyle(i,t.getModel("emphasis.lineStyle").getItemStyle()),a.add(i),c.setItemGraphicEl(t.dataIndex,i)})),r.eachNode((function(t){var i=t.getLayout(),n=t.getModel(),r=n.get("localX"),o=n.get("localY"),c=n.getModel("label"),h=n.getModel("emphasis.label"),d=new ru.Rect({shape:{x:null!=r?r*s:i.x,y:null!=o?o*l:i.y,width:i.dx,height:i.dy},style:n.getModel("itemStyle").getItemStyle()}),p=t.getModel("emphasis.itemStyle").getItemStyle();ru.setLabelStyle(d.style,p,c,h,{labelFetcher:e,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),d.setStyle("fill",t.getVisual("color")),ru.setHoverStyle(d,p),a.add(d),u.setItemGraphicEl(t.dataIndex,d),d.dataType="node"})),u.eachItemGraphicEl((function(t,r){var a=u.getItemModel(r);a.get("draggable")&&(t.drift=function(t,a){n._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=a,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:u.getRawIndex(r),localX:this.shape.x/s,localY:this.shape.y/l})},t.ondragend=function(){n._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move"),t.highlight=function(){this.trigger("emphasis")},t.downplay=function(){this.trigger("normal")},t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),a.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))})),c.eachItemGraphicEl((function(t,r){var a=c.getItemModel(r);t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),a.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))})),!this._data&&e.get("animation")&&a.setClipPath(function(e,t,i){var n=new ru.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return ru.initProps(n,{shape:{width:e.width+20}},t,i),n}(a.getBoundingRect(),e,(function(){a.removeClipPath()}))),this._data=e.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(e){var t=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){t._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,i,n){var r=e.getData(),a=r.graph,o=n.dataIndex,s=r.getItemModel(o),l=n.edgeDataIndex;if(null!=o||null!=l){var u=a.getNodeByIndex(o),c=a.getEdgeByIndex(l);if(a.eachNode((function(e){iD(e,QC,.1)})),a.eachEdge((function(e){iD(e,$C,.1)})),u){nD(u,JC);var h=s.get("focusNodeAdjacency");"outEdges"===h?we.each(u.outEdges,(function(e){e.dataIndex<0||(nD(e,eD),nD(e.node2,JC))})):"inEdges"===h?we.each(u.inEdges,(function(e){e.dataIndex<0||(nD(e,eD),nD(e.node1,JC))})):"allEdges"===h&&we.each(u.edges,(function(e){e.dataIndex<0||(nD(e,eD),e.node1!==u&&nD(e.node1,JC),e.node2!==u&&nD(e.node2,JC))}))}c&&(nD(c,eD),nD(c.node1,JC),nD(c.node2,JC))}},unfocusNodeAdjacency:function(e,t,i,n){var r=e.getGraph();r.eachNode((function(e){iD(e,QC)})),r.eachEdge((function(e){iD(e,$C)}))}});ty.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},(function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])}))}));var aD=xa.groupData;function oD(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function sD(e,t,i,n,r){var a="vertical"===r?"x":"y";we.each(e,(function(e){var o,s,l;e.sort((function(e,t){return e.getLayout()[a]-t.getLayout()[a]}));for(var u=0,c=e.length,h="vertical"===r?"dx":"dy",d=0;d<c;d++)(l=u-(s=e[d]).getLayout()[a])>0&&(o=s.getLayout()[a]+l,"vertical"===r?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),u=s.getLayout()[a]+s.getLayout()[h]+t;if((l=u-t-("vertical"===r?n:i))>0)for(o=s.getLayout()[a]-l,"vertical"===r?s.setLayout({x:o},!0):s.setLayout({y:o},!0),u=o,d=c-2;d>=0;--d)(l=(s=e[d]).getLayout()[a]+s.getLayout()[h]+t-u)>0&&(o=s.getLayout()[a]-l,"vertical"===r?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),u=s.getLayout()[a]}))}function lD(e,t,i){we.each(e.slice().reverse(),(function(e){we.each(e,(function(e){if(e.outEdges.length){var n=gD(e.outEdges,uD,i)/gD(e.outEdges,fD,i);if(isNaN(n)){var r=e.outEdges.length;n=r?gD(e.outEdges,cD,i)/r:0}if("vertical"===i){var a=e.getLayout().x+(n-pD(e,i))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(n-pD(e,i))*t;e.setLayout({y:o},!0)}}}))}))}function uD(e,t){return pD(e.node2,t)*e.getValue()}function cD(e,t){return pD(e.node2,t)}function hD(e,t){return pD(e.node1,t)*e.getValue()}function dD(e,t){return pD(e.node1,t)}function pD(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function fD(e){return e.getValue()}function gD(e,t,i){for(var n=0,r=e.length,a=-1;++a<r;){var o=+t.call(e,e[a],i);isNaN(o)||(n+=o)}return n}function mD(e,t,i){we.each(e,(function(e){we.each(e,(function(e){if(e.inEdges.length){var n=gD(e.inEdges,hD,i)/gD(e.inEdges,fD,i);if(isNaN(n)){var r=e.inEdges.length;n=r?gD(e.inEdges,dD,i)/r:0}if("vertical"===i){var a=e.getLayout().x+(n-pD(e,i))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(n-pD(e,i))*t;e.setLayout({y:o},!0)}}}))}))}var vD=function(e,t,i){e.eachSeriesByType("sankey",(function(e){var i=e.get("nodeWidth"),n=e.get("nodeGap"),r=function(e,t){return Hu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=r;var a=r.width,o=r.height,s=e.getGraph(),l=s.nodes,u=s.edges;!function(e){we.each(e,(function(e){var t=gD(e.outEdges,fD),i=gD(e.inEdges,fD),n=e.getValue()||0,r=Math.max(t,i,n);e.setLayout({value:r},!0)}))}(l),function(e,t,i,n,r,a,o,s,l){(function(e,t,i,n,r,a,o){for(var s=[],l=[],u=[],c=[],h=0,d=0;d<t.length;d++)s[d]=1;for(d=0;d<e.length;d++)l[d]=e[d].inEdges.length,0===l[d]&&u.push(e[d]);var p=-1;for(;u.length;){for(var f=0;f<u.length;f++){var g=u[f],m=g.hostGraph.data.getRawDataItem(g.dataIndex),v=null!=m.depth&&m.depth>=0;v&&m.depth>p&&(p=m.depth),g.setLayout({depth:v?m.depth:h},!0),"vertical"===a?g.setLayout({dy:i},!0):g.setLayout({dx:i},!0);for(var y=0;y<g.outEdges.length;y++){var x=g.outEdges[y],_=t.indexOf(x);s[_]=0;var b=x.node2,w=e.indexOf(b);0==--l[w]&&c.indexOf(b)<0&&c.push(b)}}++h,u=c,c=[]}for(d=0;d<s.length;d++)if(1===s[d])throw new Error("Sankey is a DAG, the original data has cycle!");var S=p>h-1?p:h-1;o&&"left"!==o&&function(e,t,i,n){if("right"===t){for(var r=[],a=e,o=0;a.length;){for(var s=0;s<a.length;s++){var l=a[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];r.indexOf(c.node1)<0&&r.push(c.node1)}}a=r,r=[],++o}we.each(e,(function(e){oD(e)||e.setLayout({depth:Math.max(0,n-e.getLayout().skNodeHeight)},!0)}))}else"justify"===t&&function(e,t){we.each(e,(function(e){oD(e)||e.outEdges.length||e.setLayout({depth:t},!0)}))}(e,n)}(e,o,0,S);!function(e,t,i){we.each(e,(function(e){var n=e.getLayout().depth*t;"vertical"===i?e.setLayout({y:n},!0):e.setLayout({x:n},!0)}))}(e,"vertical"===a?(r-i)/S:(n-i)/S,a)})(e,t,i,r,a,s,l),function(e,t,i,n,r,a,o){var s=function(e,t){var i=[],n="vertical"===t?"y":"x",r=aD(e,(function(e){return e.getLayout()[n]}));return r.keys.sort((function(e,t){return e-t})),we.each(r.keys,(function(e){i.push(r.buckets.get(e))})),i}(e,o);(function(e,t,i,n,r,a){var o=1/0;we.each(e,(function(e){var t=e.length,s=0;we.each(e,(function(e){s+=e.getLayout().value}));var l="vertical"===a?(n-(t-1)*r)/s:(i-(t-1)*r)/s;l<o&&(o=l)})),we.each(e,(function(e){we.each(e,(function(e,t){var i=e.getLayout().value*o;"vertical"===a?(e.setLayout({x:t},!0),e.setLayout({dx:i},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:i},!0))}))})),we.each(t,(function(e){var t=+e.getValue()*o;e.setLayout({dy:t},!0)}))})(s,t,i,n,r,o),sD(s,r,i,n,o);for(var l=1;a>0;a--)lD(s,l*=.99,o),sD(s,r,i,n,o),mD(s,l,o),sD(s,r,i,n,o)}(e,t,a,r,n,o,s),function(e,t){var i="vertical"===t?"x":"y";we.each(e,(function(e){e.outEdges.sort((function(e,t){return e.node2.getLayout()[i]-t.node2.getLayout()[i]})),e.inEdges.sort((function(e,t){return e.node1.getLayout()[i]-t.node1.getLayout()[i]}))})),we.each(e,(function(e){var t=0,i=0;we.each(e.outEdges,(function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy})),we.each(e.inEdges,(function(e){e.setLayout({ty:i},!0),i+=e.getLayout().dy}))}))}(e,s)}(l,u,i,n,a,o,0!==we.filter(l,(function(e){return 0===e.getLayout().value})).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))}))};var yD=function(e,t){e.eachSeriesByType("sankey",(function(e){var t=e.getGraph().nodes;if(t.length){var i=1/0,n=-1/0;we.each(t,(function(e){var t=e.getLayout().value;t<i&&(i=t),t>n&&(n=t)})),we.each(t,(function(t){var r=new jI({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:e.get("color")}).mapValueToVisual(t.getLayout().value),a=t.getModel().get("itemStyle.color");null!=a?t.setVisual("color",a):t.setVisual("color",r)}))}}))};ty.registerLayout(vD),ty.registerVisual(yD);var xD=Of.getDimensionTypeByAxis,_D=Ec.makeSeriesEncodeForAxisCoordSys,bD={seriesModelMixin:{_baseAxisDim:null,getInitialData:function(e,t){var i,n,r=t.getComponent("xAxis",this.get("xAxisIndex")),a=t.getComponent("yAxis",this.get("yAxisIndex")),o=r.get("type"),s=a.get("type");"category"===o?(e.layout="horizontal",i=r.getOrdinalMeta(),n=!0):"category"===s?(e.layout="vertical",i=a.getOrdinalMeta(),n=!0):e.layout=e.layout||"horizontal";var l=["x","y"],u="horizontal"===e.layout?0:1,c=this._baseAxisDim=l[u],h=l[1-u],d=[r,a],p=d[u].get("type"),f=d[1-u].get("type"),g=e.data;if(g&&n){var m=[];we.each(g,(function(e,t){var i;e.value&&we.isArray(e.value)?(i=e.value.slice(),e.value.unshift(t)):we.isArray(e)?(i=e.slice(),e.unshift(t)):i=e,m.push(i)})),e.data=m}var v=this.defaultValueDimensions,y=[{name:c,type:xD(p),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:xD(f),dimsDef:v.slice()}];return ry(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:we.curry(_D,y,this)})},getBaseAxis:function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis}}},wD=bD.seriesModelMixin,SD=zd.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});we.mixin(SD,wD,!0);var MD=["itemStyle"],ID=["emphasis","itemStyle"],TD=(ep.extend({type:"boxplot",render:function(e,t,i){var n=e.getData(),r=this.group,a=this._data;this._data||r.removeAll();var o="horizontal"===e.get("layout")?1:0;n.diff(a).add((function(e){if(n.hasValue(e)){var t=AD(n.getItemLayout(e),n,e,o,!0);n.setItemGraphicEl(e,t),r.add(t)}})).update((function(e,t){var i=a.getItemGraphicEl(t);if(n.hasValue(e)){var s=n.getItemLayout(e);i?CD(s,i,n,e):i=AD(s,n,e,o),r.add(i),n.setItemGraphicEl(e,i)}else r.remove(i)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&r.remove(t)})).execute(),this._data=n},remove:function(e){var t=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl((function(e){e&&t.remove(e)}))},dispose:we.noop}),Go.extend({type:"boxplotBoxPath",shape:{},buildPath:function(e,t){var i=t.points,n=0;for(e.moveTo(i[n][0],i[n][1]),n++;n<4;n++)e.lineTo(i[n][0],i[n][1]);for(e.closePath();n<i.length;n++)e.moveTo(i[n][0],i[n][1]),n++,e.lineTo(i[n][0],i[n][1])}}));function AD(e,t,i,n,r){var a=e.ends,o=new TD({shape:{points:r?DD(a,n,e):a}});return CD(e,o,t,i,r),o}function CD(e,t,i,n,r){var a=i.hostModel;(0,ru[r?"initProps":"updateProps"])(t,{shape:{points:e.ends}},a,n);var o=i.getItemModel(n),s=o.getModel(MD),l=i.getItemVisual(n,"color"),u=s.getItemStyle(["borderColor"]);u.stroke=l,u.strokeNoScale=!0,t.useStyle(u),t.z2=100;var c=o.getModel(ID).getItemStyle();ru.setHoverStyle(t,c)}function DD(e,t,i){return we.map(e,(function(e){return(e=e.slice())[t]=i.initBaseline,e}))}var LD=["itemStyle","borderColor"];var PD=function(e,t){var i=e.get("color");e.eachRawSeriesByType("boxplot",(function(t){var n=i[t.seriesIndex%i.length],r=t.getData();r.setVisual({legendSymbol:"roundRect",color:t.get(LD)||n}),e.isSeriesFiltered(t)||r.each((function(e){var t=r.getItemModel(e);r.setItemVisual(e,{color:t.get(LD,!0)})}))}))},kD=Su.parsePercent,OD=we.each;var RD=function(e){var t=function(e){var t=[],i=[];return e.eachSeriesByType("boxplot",(function(e){var n=e.getBaseAxis(),r=we.indexOf(i,n);r<0&&(r=i.length,i[r]=n,t[r]={axis:n,seriesModels:[]}),t[r].seriesModels.push(e)})),t}(e);OD(t,(function(e){var t=e.seriesModels;t.length&&(!function(e){var t,i,n=e.axis,r=e.seriesModels,a=r.length,o=e.boxWidthList=[],s=e.boxOffsetList=[],l=[];if("category"===n.type)i=n.getBandWidth();else{var u=0;OD(r,(function(e){u=Math.max(u,e.getData().count())})),t=n.getExtent(),Math.abs(t[1]-t[0])}OD(r,(function(e){var t=e.get("boxWidth");we.isArray(t)||(t=[t,t]),l.push([kD(t[0],i)||0,kD(t[1],i)||0])}));var c=.8*i-2,h=c/a*.3,d=(c-h*(a-1))/a,p=d/2-c/2;OD(r,(function(e,t){s.push(p),p+=h+d,o.push(Math.min(Math.max(d,l[t][0]),l[t][1]))}))}(e),OD(t,(function(t,i){!function(e,t,i){var n=e.coordinateSystem,r=e.getData(),a=i/2,o="horizontal"===e.get("layout")?0:1,s=1-o,l=["x","y"],u=r.mapDimension(l[o]),c=r.mapDimension(l[s],!0);if(null==u||c.length<5)return;for(var h=0;h<r.count();h++){var d=r.get(u,h),p=x(d,c[2],h),f=x(d,c[0],h),g=x(d,c[1],h),m=x(d,c[3],h),v=x(d,c[4],h),y=[];_(y,g,0),_(y,m,1),y.push(f,g,v,m),b(y,f),b(y,v),b(y,p),r.setItemLayout(h,{initBaseline:p[s],ends:y})}function x(e,i,a){var l,u=r.get(i,a),c=[];return c[o]=e,c[s]=u,isNaN(e)||isNaN(u)?l=[NaN,NaN]:(l=n.dataToPoint(c))[o]+=t,l}function _(e,t,i){var n=t.slice(),r=t.slice();n[o]+=a,r[o]-=a,i?e.push(n,r):e.push(r,n)}function b(e,t){var i=t.slice(),n=t.slice();i[o]-=a,n[o]+=a,e.push(i,n)}}(t,e.boxOffsetList[i],e.boxWidthList[i])})))}))};ty.registerVisual(PD),ty.registerLayout(RD);var ND=bD.seriesModelMixin,ED=zd.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(e,t,i){var n=t.getItemLayout(e);return n&&i.rect(n.brushRect)}});we.mixin(ED,ND,!0);var zD=x_.createClipPath,BD=["itemStyle"],VD=["emphasis","itemStyle"],FD=["color","color0","borderColor","borderColor0"],GD=(ep.extend({type:"candlestick",render:function(e,t,i){this.group.removeClipPath(),this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},incrementalPrepareRender:function(e,t,i){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,i,n){this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},_updateDrawMode:function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(e){var t=e.getData(),i=this._data,n=this.group,r=t.getLayout("isSimpleBox"),a=e.get("clip",!0),o=e.coordinateSystem,s=o.getArea&&o.getArea();this._data||n.removeAll(),t.diff(i).add((function(i){if(t.hasValue(i)){var o,l=t.getItemLayout(i);if(a&&WD(s,l))return;o=HD(l,i,!0),ru.initProps(o,{shape:{points:l.ends}},e,i),jD(o,t,i,r),n.add(o),t.setItemGraphicEl(i,o)}})).update((function(o,l){var u=i.getItemGraphicEl(l);if(t.hasValue(o)){var c=t.getItemLayout(o);a&&WD(s,c)?n.remove(u):(u?ru.updateProps(u,{shape:{points:c.ends}},e,o):u=HD(c),jD(u,t,o,r),n.add(u),t.setItemGraphicEl(o,u))}else n.remove(u)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&n.remove(t)})).execute(),this._data=t},_renderLarge:function(e){this._clear(),YD(e,this.group);var t=e.get("clip",!0)?zD(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},_incrementalRenderNormal:function(e,t){for(var i,n=t.getData(),r=n.getLayout("isSimpleBox");null!=(i=e.next());){var a;jD(a=HD(n.getItemLayout(i)),n,i,r),a.incremental=!0,this.group.add(a)}},_incrementalRenderLarge:function(e,t){YD(t,this.group,!0)},remove:function(e){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:we.noop}),Go.extend({type:"normalCandlestickBox",shape:{},buildPath:function(e,t){var i=t.points;this.__simpleBox?(e.moveTo(i[4][0],i[4][1]),e.lineTo(i[6][0],i[6][1])):(e.moveTo(i[0][0],i[0][1]),e.lineTo(i[1][0],i[1][1]),e.lineTo(i[2][0],i[2][1]),e.lineTo(i[3][0],i[3][1]),e.closePath(),e.moveTo(i[4][0],i[4][1]),e.lineTo(i[5][0],i[5][1]),e.moveTo(i[6][0],i[6][1]),e.lineTo(i[7][0],i[7][1]))}}));function HD(e,t,i){var n=e.ends;return new GD({shape:{points:i?UD(n,e):n},z2:100})}function WD(e,t){for(var i=!0,n=0;n<t.ends.length;n++)if(e.contain(t.ends[n][0],t.ends[n][1])){i=!1;break}return i}function jD(e,t,i,n){var r=t.getItemModel(i),a=r.getModel(BD),o=t.getItemVisual(i,"color"),s=t.getItemVisual(i,"borderColor")||o,l=a.getItemStyle(FD);e.useStyle(l),e.style.strokeNoScale=!0,e.style.fill=o,e.style.stroke=s,e.__simpleBox=n;var u=r.getModel(VD).getItemStyle();ru.setHoverStyle(e,u)}function UD(e,t){return we.map(e,(function(e){return(e=e.slice())[1]=t.initBaseline,e}))}var ZD=Go.extend({type:"largeCandlestickBox",shape:{},buildPath:function(e,t){for(var i=t.points,n=0;n<i.length;)if(this.__sign===i[n++]){var r=i[n++];e.moveTo(r,i[n++]),e.lineTo(r,i[n++])}else n+=3}});function YD(e,t,i){var n=e.getData(),r=n.getLayout("largePoints"),a=new ZD({shape:{points:r},__sign:1});t.add(a);var o=new ZD({shape:{points:r},__sign:-1});t.add(o),qD(1,a,e,n),qD(-1,o,e,n),i&&(a.incremental=!0,o.incremental=!0)}function qD(e,t,i,n){var r=e>0?"P":"N",a=n.getVisual("borderColor"+r)||n.getVisual("color"+r),o=i.getModel(BD).getItemStyle(FD);t.useStyle(o),t.style.fill=null,t.style.stroke=a}var XD=function(e){e&&we.isArray(e.series)&&we.each(e.series,(function(e){we.isObject(e)&&"k"===e.type&&(e.type="candlestick")}))},KD=["itemStyle","borderColor"],QD=["itemStyle","borderColor0"],JD=["itemStyle","color"],$D=["itemStyle","color0"],eL={seriesType:"candlestick",plan:Hd(),performRawSeries:!0,reset:function(e,t){if(e.getData().setVisual({legendSymbol:"roundRect",colorP:i(1,e),colorN:i(-1,e),borderColorP:n(1,e),borderColorN:n(-1,e)}),!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){var r;for(;null!=(r=e.next());){var a=t.getItemModel(r),o=t.getItemLayout(r).sign;t.setItemVisual(r,{color:i(o,a),borderColor:n(o,a)})}}};function i(e,t){return t.get(e>0?JD:$D)}function n(e,t){return t.get(e>0?KD:QD)}}},tL=ru.subPixelOptimize,iL=Su.parsePercent,nL=we.retrieve2,rL="undefined"!=typeof Float32Array?Float32Array:Array;function aL(e,t,i,n,r){return i>n?-1:i<n?1:t>0?e.get(r,t-1)<=n?1:-1:1}var oL={seriesType:"candlestick",plan:Hd(),reset:function(e){var t=e.coordinateSystem,i=e.getData(),n=function(e,t){var i,n=e.getBaseAxis(),r="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/t.count()),a=iL(nL(e.get("barMaxWidth"),r),r),o=iL(nL(e.get("barMinWidth"),1),r),s=e.get("barWidth");return null!=s?iL(s,r):Math.max(Math.min(r/2,a),o)}(e,i),r=["x","y"],a=i.mapDimension(r[0]),o=i.mapDimension(r[1],!0),s=o[0],l=o[1],u=o[2],c=o[3];if(i.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),!(null==a||o.length<4))return{progress:e.pipelineContext.large?function(e,i){var n,r,o=new rL(4*e.count),h=0,d=[],p=[];for(;null!=(r=e.next());){var f=i.get(a,r),g=i.get(s,r),m=i.get(l,r),v=i.get(u,r),y=i.get(c,r);isNaN(f)||isNaN(v)||isNaN(y)?(o[h++]=NaN,h+=3):(o[h++]=aL(i,r,g,m,l),d[0]=f,d[1]=v,n=t.dataToPoint(d,null,p),o[h++]=n?n[0]:NaN,o[h++]=n?n[1]:NaN,d[1]=y,n=t.dataToPoint(d,null,p),o[h++]=n?n[1]:NaN)}i.setLayout("largePoints",o)}:function(e,i){var r;for(;null!=(r=e.next());){var o=i.get(a,r),h=i.get(s,r),d=i.get(l,r),p=i.get(u,r),f=i.get(c,r),g=Math.min(h,d),m=Math.max(h,d),v=w(g,o),y=w(m,o),x=w(p,o),_=w(f,o),b=[];S(b,y,0),S(b,v,1),b.push(I(_),I(y),I(x),I(v)),i.setItemLayout(r,{sign:aL(i,r,h,d,l),initBaseline:h>d?y[1]:v[1],ends:b,brushRect:M(p,f,o)})}function w(e,i){var n=[];return n[0]=i,n[1]=e,isNaN(i)||isNaN(e)?[NaN,NaN]:t.dataToPoint(n)}function S(e,t,i){var r=t.slice(),a=t.slice();r[0]=tL(r[0]+n/2,1,!1),a[0]=tL(a[0]-n/2,1,!0),i?e.push(r,a):e.push(a,r)}function M(e,t,i){var r=w(e,i),a=w(t,i);return r[0]-=n/2,a[0]-=n/2,{x:r[0],y:r[1],width:n,height:a[1]-r[1]}}function I(e){return e[0]=tL(e[0],1),e}}}}};ty.registerPreprocessor(XD),ty.registerVisual(eL),ty.registerLayout(oL);zd.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(e,t){return zg(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var sL=iv.createSymbol,lL=ru.Group,uL=Su.parsePercent;function cL(e,t){var i=t.rippleEffectColor||t.color;e.eachChild((function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?i:null,fill:"fill"===t.brushType?i:null}})}))}function hL(e,t){lL.call(this);var i=new G_(e,t),n=new lL;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(e,t)}var dL=hL.prototype;dL.stopEffectAnimation=function(){this.childAt(1).removeAll()},dL.startEffectAnimation=function(e){for(var t=e.symbolType,i=e.color,n=this.childAt(1),r=0;r<3;r++){var a=sL(t,-1,-1,2,2,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var o=-r/3*e.period+e.effectOffset;a.animate("",!0).when(e.period,{scale:[e.rippleScale/2,e.rippleScale/2]}).delay(o).start(),a.animateStyle(!0).when(e.period,{opacity:0}).delay(o).start(),n.add(a)}cL(n,e)},dL.updateEffectAnimation=function(e){for(var t=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],r=0;r<n.length;r++){var a=n[r];if(t[a]!==e[a])return this.stopEffectAnimation(),void this.startEffectAnimation(e)}cL(i,e)},dL.highlight=function(){this.trigger("emphasis")},dL.downplay=function(){this.trigger("normal")},dL.updateData=function(e,t){var i=e.hostModel;this.childAt(0).updateData(e,t);var n=this.childAt(1),r=e.getItemModel(t),a=e.getItemVisual(t,"symbol"),o=function(e){return we.isArray(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),s=e.getItemVisual(t,"color");n.attr("scale",o),n.traverse((function(e){e.attr({fill:s})}));var l=r.getShallow("symbolOffset");if(l){var u=n.position;u[0]=uL(l[0],o[0]),u[1]=uL(l[1],o[1])}var c=e.getItemVisual(t,"symbolRotate");n.rotation=(c||0)*Math.PI/180||0;var h={};if(h.showEffectOn=i.get("showEffectOn"),h.rippleScale=r.get("rippleEffect.scale"),h.brushType=r.get("rippleEffect.brushType"),h.period=1e3*r.get("rippleEffect.period"),h.effectOffset=t/e.count(),h.z=r.getShallow("z")||0,h.zlevel=r.getShallow("zlevel")||0,h.symbolType=a,h.color=s,h.rippleEffectColor=r.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===h.showEffectOn)this._effectCfg?this.updateEffectAnimation(h):this.startEffectAnimation(h),this._effectCfg=h;else{this._effectCfg=null,this.stopEffectAnimation();var d=this.childAt(0),p=function(){d.highlight(),"render"!==h.showEffectOn&&this.startEffectAnimation(h)},f=function(){d.downplay(),"render"!==h.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",p,this).on("mouseout",f,this).on("emphasis",p,this).on("normal",f,this)}this._effectCfg=h},dL.fadeOut=function(e){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),e&&e()},we.inherits(hL,lL);var pL=hL;ty.extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new q_(pL)},render:function(e,t,i){var n=e.getData(),r=this._symbolDraw;r.updateData(n),this.group.add(r.group)},updateTransform:function(e,t,i){var n=e.getData();this.group.dirty();var r=Pb().reset(e);r.progress&&r.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateGroupTransform:function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=ft.clone(t.getRoamTransform()),this.group.decomposeTransform())},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(t)},dispose:function(){}});ty.registerVisual(Cb("effectScatter","circle")),ty.registerLayout(Pb("effectScatter"));zd.extend({type:"series.heatmap",getInitialData:function(e,t){return zg(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var e=oh.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});function fL(){var e=we.createCanvas();this.canvas=e,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}fL.prototype={update:function(e,t,i,n,r,a){var o=this._getBrush(),s=this._getGradient(e,r,"inRange"),l=this._getGradient(e,r,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),d=e.length;c.width=t,c.height=i;for(var p=0;p<d;++p){var f=e[p],g=f[0],m=f[1],v=n(f[2]);h.globalAlpha=v,h.drawImage(o,g-u,m-u)}if(!c.width||!c.height)return c;for(var y=h.getImageData(0,0,c.width,c.height),x=y.data,_=0,b=x.length,w=this.minOpacity,S=this.maxOpacity-w;_<b;){v=x[_+3]/256;var M=4*Math.floor(255*v);if(v>0){var I=a(v)?s:l;v>0&&(v=v*S+w),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*v*256}else _+=4}return h.putImageData(y,0,0),c},_getBrush:function(){var e=this._brushCanvas||(this._brushCanvas=we.createCanvas()),t=this.pointSize+this.blurSize,i=2*t;e.width=i,e.height=i;var n=e.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),e},_getGradient:function(e,t,i){for(var n=this._gradientPixels,r=n[i]||(n[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],o=0,s=0;s<256;s++)t[i](s/255,!0,a),r[o++]=a[0],r[o++]=a[1],r[o++]=a[2],r[o++]=a[3];return r}};var gL=fL;ty.extendChartView({type:"heatmap",render:function(e,t,i){var n;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(i){i===e&&(n=t)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var r=e.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(e,i,0,e.getData().count()):function(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}(r)&&this._renderOnGeo(r,e,n,i)},incrementalPrepareRender:function(e,t,i){this.group.removeAll()},incrementalRender:function(e,t,i,n){t.coordinateSystem&&this._renderOnCartesianAndCalendar(t,n,e.start,e.end,!0)},_renderOnCartesianAndCalendar:function(e,t,i,n,r){var a,o,s=e.coordinateSystem;if("cartesian2d"===s.type){var l=s.getAxis("x"),u=s.getAxis("y");a=l.getBandWidth(),o=u.getBandWidth()}for(var c=this.group,h=e.getData(),d=e.getModel("itemStyle").getItemStyle(["color"]),p=e.getModel("emphasis.itemStyle").getItemStyle(),f=e.getModel("label"),g=e.getModel("emphasis.label"),m=s.type,v="cartesian2d"===m?[h.mapDimension("x"),h.mapDimension("y"),h.mapDimension("value")]:[h.mapDimension("time"),h.mapDimension("value")],y=i;y<n;y++){var x;if("cartesian2d"===m){if(isNaN(h.get(v[2],y)))continue;var _=s.dataToPoint([h.get(v[0],y),h.get(v[1],y)]);x=new ru.Rect({shape:{x:Math.floor(Math.round(_[0])-a/2),y:Math.floor(Math.round(_[1])-o/2),width:Math.ceil(a),height:Math.ceil(o)},style:{fill:h.getItemVisual(y,"color"),opacity:h.getItemVisual(y,"opacity")}})}else{if(isNaN(h.get(v[1],y)))continue;x=new ru.Rect({z2:1,shape:s.dataToRect([h.get(v[0],y)]).contentShape,style:{fill:h.getItemVisual(y,"color"),opacity:h.getItemVisual(y,"opacity")}})}var b=h.getItemModel(y);h.hasItemOption&&(d=b.getModel("itemStyle").getItemStyle(["color"]),p=b.getModel("emphasis.itemStyle").getItemStyle(),f=b.getModel("label"),g=b.getModel("emphasis.label"));var w=e.getRawValue(y),S="-";w&&null!=w[2]&&(S=w[2]),ru.setLabelStyle(d,p,f,g,{labelFetcher:e,labelDataIndex:y,defaultText:S,isRectText:!0}),x.setStyle(d),ru.setHoverStyle(x,h.hasItemOption?p:we.extend({},p)),x.incremental=r,r&&(x.useHoverLayer=!0),c.add(x),h.setItemGraphicEl(y,x)}},_renderOnGeo:function(e,t,i,n){var r=i.targetVisuals.inRange,a=i.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new gL;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=e.getViewRect().clone(),u=e.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),h=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),p=Math.min(l.height+l.y,n.getHeight()),f=d-c,g=p-h,m=[o.mapDimension("lng"),o.mapDimension("lat"),o.mapDimension("value")],v=o.mapArray(m,(function(t,i,n){var r=e.dataToPoint([t,i]);return r[0]-=c,r[1]-=h,r.push(n),r})),y=i.getExtent(),x="visualMap.continuous"===i.type?function(e,t){var i=e[1]-e[0];return t=[(t[0]-e[0])/i,(t[1]-e[0])/i],function(e){return e>=t[0]&&e<=t[1]}}(y,i.option.range):function(e,t,i){var n=e[1]-e[0],r=(t=we.map(t,(function(t){return{interval:[(t.interval[0]-e[0])/n,(t.interval[1]-e[0])/n]}}))).length,a=0;return function(e){for(var n=a;n<r;n++){if((o=t[n].interval)[0]<=e&&e<=o[1]){a=n;break}}if(n===r)for(n=a-1;n>=0;n--){var o;if((o=t[n].interval)[0]<=e&&e<=o[1]){a=n;break}}return n>=0&&n<r&&i[n]}}(y,i.getPieceList(),i.option.selected);s.update(v,f,g,r.color.getNormalizer(),{inRange:r.color.getColorMapper(),outOfRange:a.color.getColorMapper()},x);var _=new ru.Image({style:{width:f,height:g,x:c,y:h,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var mL=tS.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(e){return e.stack=null,mL.superApply(this,"getInitialData",arguments)}}),vL=iv.createSymbol,yL=Su.parsePercent,xL=Su.isNumeric,_L=rS.setLabel,bL=["itemStyle","borderWidth"],wL=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],SL=new ru.Circle;ty.extendChartView({type:"pictorialBar",render:function(e,t,i){var n=this.group,r=e.getData(),a=this._data,o=e.coordinateSystem,s=!!o.getBaseAxis().isHorizontal(),l=o.grid.getRect(),u={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:e,coordSys:o,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:wL[+s],categoryDim:wL[1-s]};return r.diff(a).add((function(e){if(r.hasValue(e)){var t=PL(r,e),i=ML(r,e,t,u),a=NL(r,u,i);r.setItemGraphicEl(e,a),n.add(a),FL(a,u,i)}})).update((function(e,t){var i=a.getItemGraphicEl(t);if(r.hasValue(e)){var o=PL(r,e),s=ML(r,e,o,u),l=zL(r,s);i&&l!==i.__pictorialShapeStr&&(n.remove(i),r.setItemGraphicEl(e,null),i=null),i?function(e,t,i){var n=i.animationModel,r=i.dataIndex,a=e.__pictorialBundle;ru.updateProps(a,{position:i.bundlePosition.slice()},n,r),i.symbolRepeat?AL(e,t,i,!0):CL(e,t,i,!0);DL(e,i,!0),LL(e,t,i,!0)}(i,u,s):i=NL(r,u,s,!0),r.setItemGraphicEl(e,i),i.__pictorialSymbolMeta=s,n.add(i),FL(i,u,s)}else n.remove(i)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&EL(a,e,t.__pictorialSymbolMeta.animationModel,t)})).execute(),this._data=r,this.group},dispose:we.noop,remove:function(e,t){var i=this.group,n=this._data;e.get("animation")?n&&n.eachItemGraphicEl((function(t){EL(n,t.dataIndex,e,t)})):i.removeAll()}});function ML(e,t,i,n){var r=e.getItemLayout(t),a=i.get("symbolRepeat"),o=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=(i.get("symbolRotate")||0)*Math.PI/180||0,u=i.get("symbolPatternSize")||2,c=i.isAnimationEnabled(),h={dataIndex:t,layout:r,itemModel:i,symbolType:e.getItemVisual(t,"symbol")||"circle",color:e.getItemVisual(t,"color"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:c?i:null,hoverAnimation:c&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};!function(e,t,i,n,r){var a,o=n.valueDim,s=e.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),c=1-+(i[o.wh]<=0);if(we.isArray(s)){var h=[IL(l,s[0])-u,IL(l,s[1])-u];h[1]<h[0]&&h.reverse(),a=h[c]}else a=null!=s?IL(l,s)-u:t?n.coordSysExtent[o.index][c]-u:i[o.wh];r.boundingLength=a,t&&(r.repeatCutLength=i[o.wh]);r.pxSign=a>0?1:a<0?-1:0}(i,a,r,n,h),function(e,t,i,n,r,a,o,s,l,u){var c=l.valueDim,h=l.categoryDim,d=Math.abs(i[h.wh]),p=e.getItemVisual(t,"symbolSize");we.isArray(p)?p=p.slice():(null==p&&(p="100%"),p=[p,p]);p[h.index]=yL(p[h.index],d),p[c.index]=yL(p[c.index],n?d:Math.abs(a)),u.symbolSize=p,(u.symbolScale=[p[0]/s,p[1]/s])[c.index]*=(l.isHorizontal?-1:1)*o}(e,t,r,a,0,h.boundingLength,h.pxSign,u,n,h),function(e,t,i,n,r){var a=e.get(bL)||0;a&&(SL.attr({scale:t.slice(),rotation:i}),SL.updateTransform(),a/=SL.getLineScale(),a*=t[n.valueDim.index]);r.valueLineWidth=a}(i,h.symbolScale,l,n,h);var d=h.symbolSize,p=i.get("symbolOffset");return we.isArray(p)&&(p=[yL(p[0],d[0]),yL(p[1],d[1])]),function(e,t,i,n,r,a,o,s,l,u,c,h){var d=c.categoryDim,p=c.valueDim,f=h.pxSign,g=Math.max(t[p.index]+s,0),m=g;if(n){var v=Math.abs(l),y=we.retrieve(e.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1)),y=yL(y,t[p.index]);var _=Math.max(g+2*y,0),b=x?0:2*y,w=xL(n),S=w?n:GL((v+b)/_);_=g+2*(y=(v-S*g)/2/(x?S:S-1)),b=x?0:2*y,w||"fixed"===n||(S=u?GL((Math.abs(u)+b)/_):0),m=S*_-b,h.repeatTimes=S,h.symbolMargin=y}var M=f*(m/2),I=h.pathPosition=[];I[d.index]=i[d.wh]/2,I[p.index]="start"===o?M:"end"===o?l-M:l/2,a&&(I[0]+=a[0],I[1]+=a[1]);var T=h.bundlePosition=[];T[d.index]=i[d.xy],T[p.index]=i[p.xy];var A=h.barRectShape=we.extend({},i);A[p.wh]=f*Math.max(Math.abs(i[p.wh]),Math.abs(I[p.index]+M)),A[d.wh]=i[d.wh];var C=h.clipShape={};C[d.xy]=-i[d.xy],C[d.wh]=c.ecSize[d.wh],C[p.xy]=0,C[p.wh]=i[p.wh]}(i,d,r,a,0,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function IL(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function TL(e){var t=e.symbolPatternSize,i=vL(e.symbolType,-t/2,-t/2,t,t,e.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function AL(e,t,i,n){var r=e.__pictorialBundle,a=i.symbolSize,o=i.valueLineWidth,s=i.pathPosition,l=t.valueDim,u=i.repeatTimes||0,c=0,h=a[t.valueDim.index]+o+2*i.symbolMargin;for(BL(e,(function(e){e.__pictorialAnimationIndex=c,e.__pictorialRepeatTimes=u,c<u?VL(e,null,f(c),i,n):VL(e,null,{scale:[0,0]},i,n,(function(){r.remove(e)})),RL(e,i),c++}));c<u;c++){var d=TL(i);d.__pictorialAnimationIndex=c,d.__pictorialRepeatTimes=u,r.add(d);var p=f(c);VL(d,{position:p.position,scale:[0,0]},{scale:p.scale,rotation:p.rotation},i,n),d.on("mouseover",g).on("mouseout",m),RL(d,i)}function f(e){var t=s.slice(),n=i.pxSign,r=e;return("start"===i.symbolRepeatDirection?n>0:n<0)&&(r=u-1-e),t[l.index]=h*(r-u/2+.5)+s[l.index],{position:t,scale:i.symbolScale.slice(),rotation:i.rotation}}function g(){BL(e,(function(e){e.trigger("emphasis")}))}function m(){BL(e,(function(e){e.trigger("normal")}))}}function CL(e,t,i,n){var r=e.__pictorialBundle,a=e.__pictorialMainPath;a?VL(a,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(a=e.__pictorialMainPath=TL(i),r.add(a),VL(a,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),a.on("mouseover",(function(){this.trigger("emphasis")})).on("mouseout",(function(){this.trigger("normal")}))),RL(a,i)}function DL(e,t,i){var n=we.extend({},t.barRectShape),r=e.__pictorialBarRect;r?VL(r,null,{shape:n},t,i):(r=e.__pictorialBarRect=new ru.Rect({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),e.add(r))}function LL(e,t,i,n){if(i.symbolClip){var r=e.__pictorialClipPath,a=we.extend({},i.clipShape),o=t.valueDim,s=i.animationModel,l=i.dataIndex;if(r)ru.updateProps(r,{shape:a},s,l);else{a[o.wh]=0,r=new ru.Rect({shape:a}),e.__pictorialBundle.setClipPath(r),e.__pictorialClipPath=r;var u={};u[o.wh]=i.clipShape[o.wh],ru[n?"updateProps":"initProps"](r,{shape:u},s,l)}}}function PL(e,t){var i=e.getItemModel(t);return i.getAnimationDelayParams=kL,i.isAnimationEnabled=OL,i}function kL(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function OL(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function RL(e,t){e.off("emphasis").off("normal");var i=t.symbolScale.slice();t.hoverAnimation&&e.on("emphasis",(function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:i.slice()},400,"elasticOut")}))}function NL(e,t,i,n){var r=new ru.Group,a=new ru.Group;return r.add(a),r.__pictorialBundle=a,a.attr("position",i.bundlePosition.slice()),i.symbolRepeat?AL(r,t,i):CL(r,0,i),DL(r,i,n),LL(r,t,i,n),r.__pictorialShapeStr=zL(e,i),r.__pictorialSymbolMeta=i,r}function EL(e,t,i,n){var r=n.__pictorialBarRect;r&&(r.style.text=null);var a=[];BL(n,(function(e){a.push(e)})),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),we.each(a,(function(e){ru.updateProps(e,{scale:[0,0]},i,t,(function(){n.parent&&n.parent.remove(n)}))})),e.setItemGraphicEl(t,null)}function zL(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function BL(e,t,i){we.each(e.__pictorialBundle.children(),(function(n){n!==e.__pictorialBarRect&&t.call(i,n)}))}function VL(e,t,i,n,r,a){t&&e.attr(t),n.symbolClip&&!r?i&&e.attr(i):i&&ru[r?"updateProps":"initProps"](e,i,n.animationModel,n.dataIndex,a)}function FL(e,t,i){var n=i.color,r=i.dataIndex,a=i.itemModel,o=a.getModel("itemStyle").getItemStyle(["color"]),s=a.getModel("emphasis.itemStyle").getItemStyle(),l=a.getShallow("cursor");BL(e,(function(e){e.setColor(n),e.setStyle(we.defaults({fill:n,opacity:i.opacity},o)),ru.setHoverStyle(e,s),l&&(e.cursor=l),e.z2=i.z2}));var u={},c=t.valueDim.posDesc[+(i.boundingLength>0)],h=e.__pictorialBarRect;_L(h.style,u,a,n,t.seriesModel,r,c),ru.setHoverStyle(h,u)}function GL(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var HL=ym.layout;ty.registerLayout(we.curry(HL,"pictorialBar")),ty.registerVisual(Cb("pictorialBar","roundRect"));var WL=function(e,t,i,n,r){zv.call(this,e,t,i),this.type=n||"value",this.position=r||"bottom",this.orient=null};WL.prototype={constructor:WL,model:null,isHorizontal:function(){var e=this.position;return"top"===e||"bottom"===e},pointToData:function(e,t){return this.coordinateSystem.pointToData(e,t)[0]},toGlobalCoord:null,toLocalCoord:null},we.inherits(WL,zv);var jL=WL,UL=Hu.getLayoutRect,ZL=we.each;function YL(e,t,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(e,t,i),this.model=e}YL.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:YL,_init:function(e,t,i){var n=this.dimension,r=new jL(n,jm.createScaleByModel(e),[0,0],e.get("type"),e.get("position")),a="category"===r.type;r.onBand=a&&e.get("boundaryGap"),r.inverse=e.get("inverse"),r.orient=e.get("orient"),e.axis=r,r.model=e,r.coordinateSystem=this,this._axis=r},update:function(e,t){e.eachSeries((function(e){if(e.coordinateSystem===this){var t=e.getData();ZL(t.mapDimension(this.dimension,!0),(function(e){this._axis.scale.unionExtentFromData(t,e)}),this),jm.niceScaleExtent(this._axis.scale,this._axis.model)}}),this)},resize:function(e,t){this._rect=UL({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var e=this._rect,t=this._axis,i=t.isHorizontal(),n=i?[0,e.width]:[0,e.height],r=t.reverse?1:0;t.setExtent(n[r],n[1-r]),this._updateAxisTransform(t,i?e.x:e.y)},_updateAxisTransform:function(e,t){var i=e.getExtent(),n=i[0]+i[1],r=e.isHorizontal();e.toGlobalCoord=r?function(e){return e+t}:function(e){return n-e+t},e.toLocalCoord=r?function(e){return e-t}:function(e){return n-e+t}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(e){var t=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:i.contain(i.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},pointToData:function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},dataToPoint:function(e){var t=this.getAxis(),i=this.getRect(),n=[],r="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),n[r]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-r]=0===r?i.y+i.height/2:i.x+i.width/2,n}};var qL=YL;oh.register("single",{create:function(e,t){var i=[];return e.eachComponent("singleAxis",(function(n,r){var a=new qL(n,e,t);a.name="single_"+r,a.resize(n,t),n.coordinateSystem=a,i.push(a)})),e.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var i=e.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0];t.coordinateSystem=i&&i.coordinateSystem}})),i},dimensions:qL.prototype.dimensions});var XL={layout:function(e,t){t=t||{};var i=e.coordinateSystem,n=e.axis,r={},a=n.position,o=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};r.position=["vertical"===o?u.vertical[a]:l[0],"horizontal"===o?u.horizontal[a]:l[3]],r.rotation=Math.PI/2*{horizontal:0,vertical:1}[o],r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,right:1,left:-1}[a],e.get("axisTick.inside")&&(r.tickDirection=-r.tickDirection),we.retrieve(t.labelInside,e.get("axisLabel.inside"))&&(r.labelDirection=-r.labelDirection);var c=t.rotate;return null==c&&(c=e.get("axisLabel.rotate")),r.labelRotation="top"===a?-c:c,r.z2=1,r}},KL=Xw.rectCoordAxisBuildSplitArea,QL=Xw.rectCoordAxisHandleRemove,JL=["axisLine","axisTickLabel","axisName"],$L=["splitArea","splitLine"],eP=Yw.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(e,t,i,n){var r=this.group;r.removeAll();var a=this._axisGroup;this._axisGroup=new ru.Group;var o=XL.layout(e),s=new Nw(e,o);we.each(JL,s.add,s),r.add(this._axisGroup),r.add(s.getGroup()),we.each($L,(function(t){e.get(t+".show")&&this["_"+t](e)}),this),ru.groupTransition(a,this._axisGroup,e),eP.superCall(this,"render",e,t,i,n)},remove:function(){QL(this)},_splitLine:function(e){var t=e.axis;if(!t.scale.isBlank()){var i=e.getModel("splitLine"),n=i.getModel("lineStyle"),r=n.get("width"),a=n.get("color");a=a instanceof Array?a:[a];for(var o=e.coordinateSystem.getRect(),s=t.isHorizontal(),l=[],u=0,c=t.getTicksCoords({tickModel:i}),h=[],d=[],p=0;p<c.length;++p){var f=t.toGlobalCoord(c[p].coord);s?(h[0]=f,h[1]=o.y,d[0]=f,d[1]=o.y+o.height):(h[0]=o.x,h[1]=f,d[0]=o.x+o.width,d[1]=f);var g=u++%a.length;l[g]=l[g]||[],l[g].push(new ru.Line({subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:d[0],y2:d[1]},style:{lineWidth:r},silent:!0}))}for(p=0;p<l.length;++p)this.group.add(ru.mergePath(l[p],{style:{stroke:a[p%a.length],lineDash:n.getLineDash(r),lineWidth:r},silent:!0}))}},_splitArea:function(e){KL(this,this._axisGroup,e,e)}}),tP=qu.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});we.merge(tP.prototype,Um),qb("single",tP,(function(e,t){return t.type||(t.data?"category":"value")}),{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});var iP=function(e,t){var i,n=[],r=e.seriesIndex;if(null==r||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=xa.queryDataIndex(a,e);if(null==o||o<0||we.isArray(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(a.getValues(we.map(l.dimensions,(function(e){return a.mapDimension(e)})),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}},nP=xa.makeInner,rP=we.each,aP=we.curry,oP=nP();function sP(e,t,i,n,r){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t))if(e.involveSeries){var o=function(e,t){var i=t.axis,n=i.dim,r=e,a=[],o=Number.MAX_VALUE,s=-1;return rP(t.seriesModels,(function(t,l){var u,c,h=t.getData().mapDimension(n,!0);if(t.getAxisTooltipData){var d=t.getAxisTooltipData(h,e,i);c=d.dataIndices,u=d.nestestValue}else{if(!(c=t.getData().indicesOfNearest(h[0],e,"category"===i.type?.5:null)).length)return;u=t.getData().get(h[0],c[0])}if(null!=u&&isFinite(u)){var p=e-u,f=Math.abs(p);f<=o&&((f<o||p>=0&&s<0)&&(o=f,s=p,r=u,a.length=0),rP(c,(function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:a,snapToValue:r}}(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&null==r.seriesIndex&&we.extend(r,s[0]),!n&&e.snap&&a.containData(l)&&null!=l&&(t=l),i.showPointer(e,t,s,r),i.showTooltip(e,o,l)}else i.showPointer(e,t)}function lP(e,t,i,n){e[t.key]={value:i,payloadBatch:n}}function uP(e,t,i,n){var r=i.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&r.length){var l=t.coordSys.model,u=Hw.makeKey(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function cP(e){var t=e.axis.model,i={},n=i.axisDim=e.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=t.componentIndex,i.axisName=i[n+"AxisName"]=t.name,i.axisId=i[n+"AxisId"]=t.id,i}function hP(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}var dP=function(e,t,i){var n=e.currTrigger,r=[e.x,e.y],a=e,o=e.dispatchAction||we.bind(i.dispatchAction,i),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){hP(r)&&(r=iP({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=hP(r),u=a.axesInfo,c=s.axesInfo,h="leave"===n||hP(r),d={},p={},f={list:[],map:{}},g={showPointer:aP(lP,p),showTooltip:aP(uP,f)};rP(s.coordSysMap,(function(e,t){var i=l||e.containPoint(r);rP(s.coordSysAxesInfo[t],(function(e,t){var n=e.axis,a=function(e,t){for(var i=0;i<(e||[]).length;i++){var n=e[i];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}(u,e);if(!h&&i&&(!u||a)){var o=a&&a.value;null!=o||l||(o=n.pointToData(r)),null!=o&&sP(e,o,g,!1,d)}}))}));var m={};return rP(c,(function(e,t){var i=e.linkGroup;i&&!p[t]&&rP(i.axesInfo,(function(t,n){var r=p[n];if(t!==e&&r){var a=r.value;i.mapper&&(a=e.axis.scale.parse(i.mapper(a,cP(t),cP(e)))),m[e.key]=a}}))})),rP(m,(function(e,t){sP(c[t],e,g,!0,d)})),function(e,t,i){var n=i.axesInfo=[];rP(t,(function(t,i){var r=t.axisPointerModel.option,a=e[i];a?(!t.useHandle&&(r.status="show"),r.value=a.value,r.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(r.status="hide"),"show"===r.status&&n.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:r.value})}))}(p,c,d),function(e,t,i,n){if(hP(t)||!e.list.length)return void n({type:"hideTip"});var r=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:e.list})}(f,r,e,o),function(e,t,i){var n=i.getZr(),r=oP(n).axisPointerLastHighlights||{},a=oP(n).axisPointerLastHighlights={};rP(e,(function(e,t){var i=e.axisPointerModel.option;"show"===i.status&&rP(i.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var o=[],s=[];we.each(r,(function(e,t){!a[t]&&s.push(e)})),we.each(a,(function(e,t){!r[t]&&o.push(e)})),s.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),o.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:o})}(c,0,i),d}},pP=(ty.extendComponentModel({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}}),(0,xa.makeInner)()),fP=we.each;function gP(e,t,i){e.handler("leave",null,i)}function mP(e,t,i,n){t.handler(e,i,n)}var vP={register:function(e,t,i){if(!J.node){var n=t.getZr();pP(n).records||(pP(n).records={}),function(e,t){if(pP(e).initialized)return;function i(i,n){e.on(i,(function(i){var r=function(e){var t={showTip:[],hideTip:[]},i=function(n){var r=t[n.type];r?r.push(n):(n.dispatchAction=i,e.dispatchAction(n))};return{dispatchAction:i,pendings:t}}(t);fP(pP(e).records,(function(e){e&&n(e,i,r.dispatchAction)})),function(e,t){var i,n=e.showTip.length,r=e.hideTip.length;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]);i&&(i.dispatchAction=null,t.dispatchAction(i))}(r.pendings,t)}))}pP(e).initialized=!0,i("click",we.curry(mP,"click")),i("mousemove",we.curry(mP,"mousemove")),i("globalout",gP)}(n,t),(pP(n).records[e]||(pP(n).records[e]={})).handler=i}},unregister:function(e,t){if(!J.node){var i=t.getZr();(pP(i).records||{})[e]&&(pP(i).records[e]=null)}}},yP=ty.extendComponentView({type:"axisPointer",render:function(e,t,i){var n=t.getComponent("tooltip"),r=e.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";vP.register("axisPointer",i,(function(e,t,i){"none"!==r&&("leave"===e||r.indexOf(e)>=0)&&i({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},remove:function(e,t){vP.unregister(t.getZr(),"axisPointer"),yP.superApply(this._model,"remove",arguments)},dispose:function(e,t){vP.unregister("axisPointer",t),yP.superApply(this._model,"dispose",arguments)}}),xP=(0,xa.makeInner)(),_P=we.clone,bP=we.bind;function wP(){}function SP(e,t,i,n){(function e(t,i){if(we.isObject(t)&&we.isObject(i)){var n=!0;return we.each(i,(function(i,r){n=n&&e(t[r],i)})),!!n}return t===i})(xP(i).lastProp,n)||(xP(i).lastProp=n,t?ru.updateProps(i,n,e):(i.stopAnimation(),i.attr(n)))}function MP(e,t){e[t.get("label.show")?"show":"hide"]()}function IP(e){return{position:e.position.slice(),rotation:e.rotation||0}}function TP(e,t,i){var n=t.get("z"),r=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=n&&(e.z=n),null!=r&&(e.zlevel=r),e.silent=i)}))}wP.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(e,t,i,n){var r=t.get("value"),a=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=i,n||this._lastValue!==r||this._lastStatus!==a){this._lastValue=r,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||"hide"===a)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,r,e,t,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(o){var h=we.curry(SP,t,c);this.updatePointerEl(o,l,h,t),this.updateLabelEl(o,l,h,t)}else o=this._group=new ru.Group,this.createPointerEl(o,l,e,t),this.createLabelEl(o,l,e,t),i.getZr().add(o);TP(o,t,!0),this._renderHandle(r)}},remove:function(e){this.clear(e)},dispose:function(e){this.clear(e)},determineAnimation:function(e,t){var i=t.get("animation"),n=e.axis,r="category"===n.type,a=t.get("snap");if(!a&&!r)return!1;if("auto"===i||null==i){var o=this.animationThreshold;if(r&&n.getBandWidth()>o)return!0;if(a){var s=Hw.getAxisInfo(e).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return!0===i},makeElOption:function(e,t,i,n,r){},createPointerEl:function(e,t,i,n){var r=t.pointer;if(r){var a=xP(e).pointerEl=new ru[r.type](_P(t.pointer));e.add(a)}},createLabelEl:function(e,t,i,n){if(t.label){var r=xP(e).labelEl=new ru.Rect(_P(t.label));e.add(r),MP(r,n)}},updatePointerEl:function(e,t,i){var n=xP(e).pointerEl;n&&t.pointer&&(n.setStyle(t.pointer.style),i(n,{shape:t.pointer.shape}))},updateLabelEl:function(e,t,i,n){var r=xP(e).labelEl;r&&(r.setStyle(t.label.style),i(r,{shape:t.label.shape,position:t.label.position}),MP(r,n))},_renderHandle:function(e){if(!this._dragging&&this.updateHandleTransform){var t,i=this._axisPointerModel,n=this._api.getZr(),r=this._handle,a=i.getModel("handle"),o=i.get("status");if(!a.get("show")||!o||"hide"===o)return r&&n.remove(r),void(this._handle=null);this._handle||(t=!0,r=this._handle=ru.createIcon(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Je.stop(e.event)},onmousedown:bP(this._onHandleDragMove,this,0,0),drift:bP(this._onHandleDragMove,this),ondragend:bP(this._onHandleDragEnd,this)}),n.add(r)),TP(r,i,!1);r.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");we.isArray(s)||(s=[s,s]),r.attr("scale",[s[0]/2,s[1]/2]),rp.createOrUpdate(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},_moveHandleToValue:function(e,t){SP(this._axisPointerModel,!t&&this._moveAnimation,this._handle,IP(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(e,t){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(IP(i),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(IP(n)),xP(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},_onHandleDragEnd:function(e){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),i=this._group,n=this._handle;t&&i&&(this._lastGraphicKey=null,i&&t.remove(i),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(e,t,i){return{x:e[i=i||0],y:e[1-i],width:t[i],height:t[1-i]}}},wP.prototype.constructor=wP,Ia.enableClassExtend(wP);var AP=wP;function CP(e,t,i,n,r){var a=DP(i.get("value"),t.axis,t.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),o=i.getModel("label"),s=Pu.normalizeCssArray(o.get("padding")||0),l=o.getFont(),u=Fn.getBoundingRect(a,l),c=r.position,h=u.width+s[1]+s[3],d=u.height+s[0]+s[2],p=r.align;"right"===p&&(c[0]-=h),"center"===p&&(c[0]-=h/2);var f=r.verticalAlign;"bottom"===f&&(c[1]-=d),"middle"===f&&(c[1]-=d/2),function(e,t,i,n){var r=n.getWidth(),a=n.getHeight();e[0]=Math.min(e[0]+t,r)-t,e[1]=Math.min(e[1]+i,a)-i,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,h,d,n);var g=o.get("backgroundColor");g&&"auto"!==g||(g=t.get("axisLine.lineStyle.color")),e.label={shape:{x:0,y:0,width:h,height:d,r:o.get("borderRadius")},position:c.slice(),style:{text:a,textFont:l,textFill:o.getTextColor(),textPosition:"inside",textPadding:s,fill:g,stroke:o.get("borderColor")||"transparent",lineWidth:o.get("borderWidth")||0,shadowBlur:o.get("shadowBlur"),shadowColor:o.get("shadowColor"),shadowOffsetX:o.get("shadowOffsetX"),shadowOffsetY:o.get("shadowOffsetY")},z2:10}}function DP(e,t,i,n,r){e=t.scale.parse(e);var a=t.scale.getLabel(e,{precision:r.precision}),o=r.formatter;if(o){var s={value:jm.getAxisRawValue(t,e),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};we.each(n,(function(e){var t=i.getSeriesByIndex(e.seriesIndex),n=e.dataIndexInside,r=t&&t.getDataParams(n);r&&s.seriesData.push(r)})),we.isString(o)?a=o.replace("{value}",a):we.isFunction(o)&&(a=o(s))}return a}function LP(e,t,i){var n=ft.create();return ft.rotate(n,n,i.rotation),ft.translate(n,n,i.position),ru.applyTransform([e.dataToCoord(t),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}var PP={buildElStyle:function(e){var t,i=e.get("type"),n=e.getModel(i+"Style");return"line"===i?(t=n.getLineStyle()).fill=null:"shadow"===i&&((t=n.getAreaStyle()).stroke=null),t},buildLabelElOption:CP,getValueLabel:DP,getTransformedPosition:LP,buildCartesianSingleLabelElOption:function(e,t,i,n,r,a){var o=Nw.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=r.get("label.margin"),CP(t,n,r,a,{position:LP(n.axis,e,i),align:o.textAlign,verticalAlign:o.textVerticalAlign})},makeLineShape:function(e,t,i){return{x1:e[i=i||0],y1:e[1-i],x2:t[i],y2:t[1-i]}},makeRectShape:function(e,t,i){return{x:e[i=i||0],y:e[1-i],width:t[i],height:t[1-i]}},makeSectorShape:function(e,t,i,n,r,a){return{cx:e,cy:t,r0:i,r:n,startAngle:r,endAngle:a,clockwise:!0}}},kP=AP.extend({makeElOption:function(e,t,i,n,r){var a=i.axis,o=a.grid,s=n.get("type"),l=OP(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&"none"!==s){var c=PP.buildElStyle(n),h=RP[s](a,u,l);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=qw.layout(o.model,i);PP.buildCartesianSingleLabelElOption(t,e,d,i,n,r)},getHandleTransform:function(e,t,i){var n=qw.layout(t.axis.grid.model,t,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:PP.getTransformedPosition(t.axis,e,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,i,n){var r=i.axis,a=r.grid,o=r.getGlobalExtent(!0),s=OP(a,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=e.position;u[l]+=t[l],u[l]=Math.min(o[1],u[l]),u[l]=Math.max(o[0],u[l]);var c=(s[1]+s[0])/2,h=[c,c];h[l]=u[l];return{position:u,rotation:e.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function OP(e,t){var i={};return i[t.dim+"AxisIndex"]=t.index,e.getCartesian(i)}var RP={line:function(e,t,i){return{type:"Line",subPixelOptimize:!0,shape:PP.makeLineShape([t,i[0]],[t,i[1]],NP(e))}},shadow:function(e,t,i){var n=Math.max(1,e.getBandWidth()),r=i[1]-i[0];return{type:"Rect",shape:PP.makeRectShape([t-n/2,i[0]],[n,r],NP(e))}}};function NP(e){return"x"===e.dim?0:1}Yw.registerAxisPointerClass("CartesianAxisPointer",kP),ty.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!we.isArray(t)&&(e.axisPointer.link=[t])}})),ty.registerProcessor(ty.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=Hw.collect(e,t)})),ty.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},dP);var EP=["x","y"],zP=["width","height"],BP=AP.extend({makeElOption:function(e,t,i,n,r){var a=i.axis,o=a.coordinateSystem,s=GP(o,1-FP(a)),l=o.dataToPoint(t)[0],u=n.get("type");if(u&&"none"!==u){var c=PP.buildElStyle(n),h=VP[u](a,l,s);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=XL.layout(i);PP.buildCartesianSingleLabelElOption(t,e,d,i,n,r)},getHandleTransform:function(e,t,i){var n=XL.layout(t,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:PP.getTransformedPosition(t.axis,e,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,i,n){var r=i.axis,a=r.coordinateSystem,o=FP(r),s=GP(a,o),l=e.position;l[o]+=t[o],l[o]=Math.min(s[1],l[o]),l[o]=Math.max(s[0],l[o]);var u=GP(a,1-o),c=(u[1]+u[0])/2,h=[c,c];return h[o]=l[o],{position:l,rotation:e.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}}}),VP={line:function(e,t,i){return{type:"Line",subPixelOptimize:!0,shape:PP.makeLineShape([t,i[0]],[t,i[1]],FP(e))}},shadow:function(e,t,i){var n=e.getBandWidth(),r=i[1]-i[0];return{type:"Rect",shape:PP.makeRectShape([t-n/2,i[0]],[n,r],FP(e))}}};function FP(e){return e.isHorizontal()?0:1}function GP(e,t){var i=e.getRect();return[i[EP[t]],i[EP[t]]+i[zP[t]]]}Yw.registerAxisPointerClass("SingleAxisPointer",BP),ty.extendComponentView({type:"single"});var HP=Of.getDimensionTypeByAxis,WP=xa.groupData,jP=Pu.encodeHTML,UP=zd.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(e){UP.superApply(this,"init",arguments),this.legendVisualProvider=new CS(we.bind(this.getData,this),we.bind(this.getRawData,this))},fixData:function(e){var t=e.length,i=WP(e,(function(e){return e[2]})),n=[];i.buckets.each((function(e,t){n.push({name:t,dataList:e})}));for(var r=n.length,a=-1,o=-1,s=0;s<r;++s){var l=n[s].dataList.length;l>a&&(a=l,o=s)}for(var u=0;u<r;++u)if(u!==o)for(var c=n[u].name,h=0;h<a;++h){for(var d=n[o].dataList[h][0],p=n[u].dataList.length,f=-1,g=0;g<p;++g){if(n[u].dataList[g][0]===d){f=g;break}}-1===f&&(e[t]=[],e[t][0]=d,e[t][1]=0,e[t][2]=c,t++)}return e},getInitialData:function(e,t){for(var i=t.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),n=we.filter(e.data,(function(e){return void 0!==e[2]})),r=this.fixData(n||[]),a=[],o=this.nameMap=we.createHashMap(),s=0,l=0;l<r.length;++l)a.push(r[l][2]),o.get(r[l][2])||(o.set(r[l][2],s),s++);var u=_g(r,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:HP(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),c=new og(u,this);return c.initData(r),c},getLayerSeries:function(){for(var e=this.getData(),t=e.count(),i=[],n=0;n<t;++n)i[n]=n;var r=e.mapDimension("single"),a=WP(i,(function(t){return e.get("name",t)})),o=[];return a.buckets.each((function(t,i){t.sort((function(t,i){return e.get(r,t)-e.get(r,i)})),o.push({name:i,indices:t})})),o},getAxisTooltipData:function(e,t,i){we.isArray(e)||(e=e?[e]:[]);for(var n,r=this.getData(),a=this.getLayerSeries(),o=[],s=a.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,c=-1,h=a[l].indices.length,d=0;d<h;++d){var p=r.get(e[0],a[l].indices[d]),f=Math.abs(p-t);f<=u&&(n=p,u=f,c=a[l].indices[d])}o.push(c)}return{dataIndices:o,nestestValue:n}},formatTooltip:function(e){var t=this.getData(),i=t.getName(e),n=t.get(t.mapDimension("value"),e);return(isNaN(n)||null==n)&&(n="-"),jP(i+" : "+n)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}}),ZP=pb.Polygon,YP=we.bind,qP=we.extend;ty.extendChartView({type:"themeRiver",init:function(){this._layers=[]},render:function(e,t,i){var n=e.getData(),r=this.group,a=e.getLayerSeries(),o=n.getLayout("layoutInfo"),s=o.rect,l=o.boundaryGap;function u(e){return e.name}r.attr("position",[0,s.y+l[0]]);var c=new Cf(this._layersSeries||[],a,u,u),h={};function d(t,i,o){var s=this._layers;if("remove"!==t){for(var l,u,c,d=[],p=[],f=a[i].indices,g=0;g<f.length;g++){var m=n.getItemLayout(f[g]),v=m.x,y=m.y0,x=m.y;d.push([v,y]),p.push([v,y+x]),l=n.getItemVisual(f[g],"color")}var _=n.getItemLayout(f[0]),b=n.getItemModel(f[g-1]),w=b.getModel("label"),S=w.get("margin");if("add"===t){var M=h[i]=new ru.Group;u=new ZP({shape:{points:d,stackedOnPoints:p,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),c=new ru.Text({style:{x:_.x-S,y:_.y0+_.y/2}}),M.add(u),M.add(c),r.add(M),u.setClipPath(function(e,t,i){var n=new ru.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return ru.initProps(n,{shape:{width:e.width+20,height:e.height+20}},t,i),n}(u.getBoundingRect(),e,(function(){u.removeClipPath()})))}else{M=s[o];u=M.childAt(0),c=M.childAt(1),r.add(M),h[i]=M,ru.updateProps(u,{shape:{points:d,stackedOnPoints:p}},e),ru.updateProps(c,{style:{x:_.x-S,y:_.y0+_.y/2}},e)}var I=b.getModel("emphasis.itemStyle"),T=b.getModel("itemStyle");ru.setTextStyle(c.style,w,{text:w.get("show")?e.getFormattedLabel(f[g-1],"normal")||n.getName(f[g-1]):null,textVerticalAlign:"middle"}),u.setStyle(qP({fill:l},T.getItemStyle(["color"]))),ru.setHoverStyle(u,I.getItemStyle())}else r.remove(s[i])}c.add(YP(d,this,"add")).update(YP(d,this,"update")).remove(YP(d,this,"remove")).execute(),this._layersSeries=a,this._layers=h},dispose:function(){}});function XP(e,t,i){if(e.count())for(var n,r=t.coordinateSystem,a=t.getLayerSeries(),o=e.mapDimension("single"),s=e.mapDimension("value"),l=we.map(a,(function(t){return we.map(t.indices,(function(t){var i=r.dataToPoint(e.get(o,t));return i[1]=e.get(s,t),i}))})),u=function(e){for(var t=e.length,i=e[0].length,n=[],r=[],a=0,o={},s=0;s<i;++s){for(var l=0,u=0;l<t;++l)u+=e[l][s][1];u>a&&(a=u),n.push(u)}for(var c=0;c<i;++c)r[c]=(a-n[c])/2;a=0;for(var h=0;h<i;++h){var d=n[h]+r[h];d>a&&(a=d)}return o.y0=r,o.max=a,o}(l),c=u.y0,h=i/u.max,d=a.length,p=a[0].indices.length,f=0;f<p;++f){n=c[f]*h,e.setItemLayout(a[0].indices[f],{layerIndex:0,x:l[0][f][0],y0:n,y:l[0][f][1]*h});for(var g=1;g<d;++g)n+=l[g-1][f][1]*h,e.setItemLayout(a[g].indices[f],{layerIndex:g,x:l[g][f][0],y0:n,y:l[g][f][1]*h})}}var KP=function(e,t){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),i=e.coordinateSystem,n={},r=i.getRect();n.rect=r;var a=e.get("boundaryGap"),o=i.getAxis();(n.boundaryGap=a,"horizontal"===o.orient)?(a[0]=Su.parsePercent(a[0],r.height),a[1]=Su.parsePercent(a[1],r.height),XP(t,e,r.height-a[0]-a[1])):(a[0]=Su.parsePercent(a[0],r.width),a[1]=Su.parsePercent(a[1],r.width),XP(t,e,r.width-a[0]-a[1]));t.setLayout("layoutInfo",n)}))},QP=we.createHashMap;var JP=function(e){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),i=e.getRawData(),n=e.get("color"),r=QP();t.each((function(e){r.set(t.getRawIndex(e),e)})),i.each((function(a){var o=i.getName(a),s=n[(e.nameMap.get(o)-1)%n.length];i.setItemVisual(a,"color",s);var l=r.get(a);null!=l&&t.setItemVisual(l,"color",s)}))}))};ty.registerLayout(KP),ty.registerVisual(JP),ty.registerProcessor(XS("themeRiver"));var $P=iI.wrapTreePathInfo;zd.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(e,t){var i={name:e.name,children:e.data};!function e(t){var i=0;we.each(t.children,(function(t){e(t);var n=t.value;we.isArray(n)&&(n=n[0]),i+=n}));var n=t.value;we.isArray(n)&&(n=n[0]);(null==n||isNaN(n))&&(n=i);n<0&&(n=0);we.isArray(t.value)?t.value[0]=n:t.value=n}(i);var n=e.levels||[],r={};return r.levels=n,AM.createTree(i,this,r).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(e){var t=zd.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=$P(i,this),t},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});var ek="none",tk="ancestor",ik="self";function nk(e,t,i){ru.Group.call(this);var n=new ru.Sector({z2:2});n.seriesIndex=t.seriesIndex;var r=new ru.Text({z2:4,silent:e.getModel("label").get("silent")});function a(){r.ignore=r.hoverIgnore}function o(){r.ignore=r.normalIgnore}this.add(n),this.add(r),this.updateData(!0,e,"normal",t,i),this.on("emphasis",a).on("normal",o).on("mouseover",a).on("mouseout",o)}var rk=nk.prototype;rk.updateData=function(e,t,i,n,r){this.node=t,t.piece=this,n=n||this._seriesModel,r=r||this._ecModel;var a=this.childAt(0);a.dataIndex=t.dataIndex;var o=t.getModel(),s=t.getLayout(),l=we.extend({},s);l.label=null;var u=function(e,t,i){var n=e.getVisual("color"),r=e.getVisual("visualMeta");r&&0!==r.length||(n=null);var a=e.getModel("itemStyle").get("color");if(a)return a;if(n)return n;if(0===e.depth)return i.option.color[0];var o=i.option.color.length;a=i.option.color[function(e){var t=e;for(;t.depth>1;)t=t.parentNode;var i=e.getAncestors()[0];return we.indexOf(i.children,t)}(e)%o];return a}(t,0,r);!function(e,t,i){t.getData().setItemVisual(e.dataIndex,"color",i)}(t,n,u);var c,h=o.getModel("itemStyle").getItemStyle();if("normal"===i)c=h;else{var d=o.getModel(i+".itemStyle").getItemStyle();c=we.merge(d,h)}c=we.defaults({lineJoin:"bevel",fill:c.fill||u},c),e?(a.setShape(l),a.shape.r=s.r0,ru.updateProps(a,{shape:{r:s.r}},n,t.dataIndex),a.useStyle(c)):"object"==typeof c.fill&&c.fill.type||"object"==typeof a.style.fill&&a.style.fill.type?(ru.updateProps(a,{shape:l},n),a.useStyle(c)):ru.updateProps(a,{shape:l,style:c},n),this._updateLabel(n,u,i);var p=o.getShallow("cursor");if(p&&a.attr("cursor",p),e){var f=n.getShallow("highlightPolicy");this._initEvents(a,t,n,f)}this._seriesModel=n||this._seriesModel,this._ecModel=r||this._ecModel,ru.setHoverStyle(this)},rk.onEmphasis=function(e){var t=this;this.node.hostTree.root.eachNode((function(i){var n,r,a;i.piece&&(t.node===i?i.piece.updateData(!1,i,"emphasis"):(n=i,r=t.node,(a=e)!==ek&&(a===ik?n===r:a===tk?n===r||n.isAncestorOf(r):n===r||n.isDescendantOf(r))?i.piece.childAt(0).trigger("highlight"):e!==ek&&i.piece.childAt(0).trigger("downplay")))}))},rk.onNormal=function(){this.node.hostTree.root.eachNode((function(e){e.piece&&e.piece.updateData(!1,e,"normal")}))},rk.onHighlight=function(){this.updateData(!1,this.node,"highlight")},rk.onDownplay=function(){this.updateData(!1,this.node,"downplay")},rk._updateLabel=function(e,t,i){var n=this.node.getModel(),r=n.getModel("label"),a="normal"===i||"emphasis"===i?r:n.getModel(i+".label"),o=n.getModel("emphasis.label"),s=we.retrieve(e.getFormattedLabel(this.node.dataIndex,i,null,null,"label"),this.node.name);!1===S("show")&&(s="");var l=this.node.getLayout(),u=a.get("minAngle");null==u&&(u=r.get("minAngle")),u=u/180*Math.PI;var c=l.endAngle-l.startAngle;null!=u&&Math.abs(c)<u&&(s="");var h=this.childAt(1);ru.setLabelStyle(h.style,h.hoverStyle||{},r,o,{defaultText:a.getShallow("show")?s:null,autoColor:t,useInsideStyle:!0});var d,p=(l.startAngle+l.endAngle)/2,f=Math.cos(p),g=Math.sin(p),m=S("position"),v=S("distance")||0,y=S("align");"outside"===m?(d=l.r+v,y=p>Math.PI/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,p>Math.PI/2&&(y="right")):"right"===y&&(d=l.r-v,p>Math.PI/2&&(y="left")):(d=(l.r+l.r0)/2,y="center"),h.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var x=d*f+l.cx,_=d*g+l.cy;h.attr("position",[x,_]);var b=S("rotate"),w=0;function S(e){var t=a.get(e);return null==t?r.get(e):t}"radial"===b?(w=-p)<-Math.PI/2&&(w+=Math.PI):"tangential"===b?(w=Math.PI/2-p)>Math.PI/2?w-=Math.PI:w<-Math.PI/2&&(w+=Math.PI):"number"==typeof b&&(w=b*Math.PI/180),h.attr("rotation",w)},rk._initEvents=function(e,t,i,n){e.off("mouseover").off("mouseout").off("emphasis").off("normal");var r=this,a=function(){r.onEmphasis(n)},o=function(){r.onNormal()};i.isAnimationEnabled()&&e.on("mouseover",a).on("mouseout",o).on("emphasis",a).on("normal",o).on("downplay",(function(){r.onDownplay()})).on("highlight",(function(){r.onHighlight()}))},we.inherits(nk,ru.Group);var ak=nk,ok=Pu.windowOpen;ep.extend({type:"sunburst",init:function(){},render:function(e,t,i,n){var r=this;this.seriesModel=e,this.api=i,this.ecModel=t;var a=e.getData(),o=a.tree.root,s=e.getViewRoot(),l=this.group,u=e.get("renderLabelForZeroData"),c=[];s.eachNode((function(e){c.push(e)}));var h=this._oldChildren||[];if(function(i,n){if(0===i.length&&0===n.length)return;function r(e){return e.getId()}function s(r,s){!function(i,n){u||!i||i.getValue()||(i=null);if(i!==o&&n!==o)if(n&&n.piece)i?(n.piece.updateData(!1,i,"normal",e,t),a.setItemGraphicEl(i.dataIndex,n.piece)):function(e){if(!e)return;e.piece&&(l.remove(e.piece),e.piece=null)}(n);else if(i){var r=new ak(i,e,t);l.add(r),a.setItemGraphicEl(i.dataIndex,r)}}(null==r?null:i[r],null==s?null:n[s])}new Cf(n,i,r,r).add(s).update(s).remove(we.curry(s,null)).execute()}(c,h),function(i,n){if(n.depth>0){r.virtualPiece?r.virtualPiece.updateData(!1,i,"normal",e,t):(r.virtualPiece=new ak(i,e,t),l.add(r.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var a=function(e){r._rootToNode(n.parentNode)};n.piece._onclickEvent=a,r.virtualPiece.on("click",a)}else r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}(o,s),n&&n.highlight&&n.highlight.piece){var d=e.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(d)}else if(n&&n.unhighlight){var p=this.virtualPiece;!p&&o.children.length&&(p=o.children[0].piece),p&&p.onNormal()}this._initEvents(),this._oldChildren=c},dispose:function(){},_initEvents:function(){var e=this,t=function(t){var i=!1;e.seriesModel.getViewRoot().eachNode((function(n){if(!i&&n.piece&&n.piece.childAt(0)===t.target){var r=n.getModel().get("nodeClick");if("rootToNode"===r)e._rootToNode(n);else if("link"===r){var a=n.getModel(),o=a.get("link");if(o){var s=a.get("target",!0)||"_blank";ok(o,s)}}i=!0}}))};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},containPoint:function(e,t){var i=t.getData().getItemLayout(0);if(i){var n=e[0]-i.cx,r=e[1]-i.cy,a=Math.sqrt(n*n+r*r);return a<=i.r&&a>=i.r0}}});ty.registerAction({type:"sunburstRootToNode",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,i){var n=iI.retrieveTargetInfo(e,["sunburstRootToNode"],t);if(n){var r=t.getViewRoot();r&&(e.direction=iI.aboveViewRoot(r,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node)}}))}));ty.registerAction({type:"sunburstHighlight",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,i){var n=iI.retrieveTargetInfo(e,["sunburstHighlight"],t);n&&(e.highlight=n.node)}))}));ty.registerAction({type:"sunburstUnhighlight",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,i){e.unhighlight=!0}))}));var sk=Su.parsePercent,lk=Math.PI/180;var uk=function(e,t,i,n){t.eachSeriesByType(e,(function(e){var t=e.get("center"),n=e.get("radius");we.isArray(n)||(n=[0,n]),we.isArray(t)||(t=[t,t]);var r=i.getWidth(),a=i.getHeight(),o=Math.min(r,a),s=sk(t[0],r),l=sk(t[1],a),u=sk(n[0],o/2),c=sk(n[1],o/2),h=-e.get("startAngle")*lk,d=e.get("minAngle")*lk,p=e.getData().tree.root,f=e.getViewRoot(),g=f.depth,m=e.get("sort");null!=m&&function e(t,i){var n=t.children||[];t.children=function(e,t){if("function"==typeof t)return e.sort(t);var i="asc"===t;return e.sort((function(e,t){var n=(e.getValue()-t.getValue())*(i?1:-1);return 0===n?(e.dataIndex-t.dataIndex)*(i?-1:1):n}))}(n,i),n.length&&we.each(t.children,(function(t){e(t,i)}))}(f,m);var v=0;we.each(f.children,(function(e){!isNaN(e.getValue())&&v++}));var y=f.getValue(),x=Math.PI/(y||v)*2,_=f.depth>0,b=f.height-(_?-1:1),w=(c-u)/(b||1),S=e.get("clockwise"),M=e.get("stillShowZeroSum"),I=S?1:-1,T=function(e,t){if(e){var i=t;if(e!==p){var n=e.getValue(),r=0===y&&M?x:n*x;r<d&&(r=d),i=t+I*r;var a=e.depth-g-(_?-1:1),c=u+w*a,h=u+w*(a+1),f=e.getModel();null!=f.get("r0")&&(c=sk(f.get("r0"),o/2)),null!=f.get("r")&&(h=sk(f.get("r"),o/2)),e.setLayout({angle:r,startAngle:t,endAngle:i,clockwise:S,cx:s,cy:l,r0:c,r:h})}if(e.children&&e.children.length){var m=0;we.each(e.children,(function(e){m+=T(e,t+m)}))}return i-t}};if(_){var A=u,C=u+w,D=2*Math.PI;p.setLayout({angle:D,startAngle:h,endAngle:h+D,clockwise:S,cx:s,cy:l,r0:A,r:C})}T(f,h)}))};function ck(e,t){return t=t||[0,0],we.map(["x","y"],(function(i,n){var r=this.getAxis(i),a=t[n],o=e[n]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(a-o)-r.dataToCoord(a+o))}),this)}ty.registerVisual(we.curry(BS,"sunburst")),ty.registerLayout(we.curry(uk,"sunburst")),ty.registerProcessor(we.curry(XS,"sunburst"));var hk=function(e){var t=e.grid.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:we.bind(ck,e)}}};function dk(e,t){return t=t||[0,0],we.map([0,1],(function(i){var n=t[i],r=e[i]/2,a=[],o=[];return a[i]=n-r,o[i]=n+r,a[1-i]=o[1-i]=t[1-i],Math.abs(this.dataToPoint(a)[i]-this.dataToPoint(o)[i])}),this)}var pk=function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:we.bind(dk,e)}}};function fk(e,t){var i=this.getAxis(),n=t instanceof Array?t[0]:t,r=(e instanceof Array?e[0]:e)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-r)-i.dataToCoord(n+r))}var gk=function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:we.bind(fk,e)}}};function mk(e,t){return we.map(["Radius","Angle"],(function(i,n){var r=this["get"+i+"Axis"](),a=t[n],o=e[n]/2,s="dataTo"+i,l="category"===r.type?r.getBandWidth():Math.abs(r[s](a-o)-r[s](a+o));return"Angle"===i&&(l=l*Math.PI/180),l}),this)}var vk=function(e){var t=e.getRadiusAxis(),i=e.getAngleAxis(),n=t.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:n[1],r0:n[0]},api:{coord:we.bind((function(n){var r=t.dataToRadius(n[0]),a=i.dataToAngle(n[1]),o=e.coordToPoint([r,a]);return o.push(r,a*Math.PI/180),o})),size:we.bind(mk,e)}}};var yk=function(e){var t=e.getRect(),i=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(t,i){return e.dataToPoint(t,i)}}}},xk=A_.getDefaultLabel,_k=ym.getLayoutOnAxis,bk=x_.createClipPath,wk=ru.CACHED_LABEL_STYLE_PROPERTIES,Sk=["itemStyle"],Mk=["emphasis","itemStyle"],Ik=["label"],Tk=["emphasis","label"],Ak={cartesian2d:hk,geo:pk,singleAxis:gk,polar:vk,calendar:yk};function Ck(e,t,i,n,r){null==i[e]||r||(t[e]=i[e],i[e]=n[e])}function Dk(e,t,i,n){var r=e.get("renderItem"),a=e.coordinateSystem,o={};a&&(o=a.prepareCustoms?a.prepareCustoms():Ak[a.type](a));var s,l,u,c,h,d=we.defaults({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:function(e,i){return null==i&&(i=s),t.get(t.getDimension(e||0),i)},style:function(i,n){null==n&&(n=s),g(n);var r=l.getModel(Sk).getItemStyle();null!=h&&(r.fill=h);var a=t.getItemVisual(n,"opacity");null!=a&&(r.opacity=a);var o=i?Nk(i,u):u;return ru.setTextStyle(r,o,null,{autoColor:h,isRectText:!0}),r.text=o.getShallow("show")?we.retrieve2(e.getFormattedLabel(n,"normal"),xk(t,n)):null,i&&Ek(r,i),r},styleEmphasis:function(i,n){null==n&&(n=s),g(n);var r=l.getModel(Mk).getItemStyle(),a=i?Nk(i,c):c;return ru.setTextStyle(r,a,null,{isRectText:!0},!0),r.text=a.getShallow("show")?we.retrieve3(e.getFormattedLabel(n,"emphasis"),e.getFormattedLabel(n,"normal"),xk(t,n)):null,i&&Ek(r,i),r},visual:function(e,i){return null==i&&(i=s),t.getItemVisual(i,e)},barLayout:function(e){if(a.getBaseAxis){var t=a.getBaseAxis();return _k(we.defaults({axis:t},e),n)}},currentSeriesIndices:function(){return i.getCurrentSeriesIndices()},font:function(e){return ru.getFont(e,i)}},o.api||{}),p={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:o.coordSys,dataInsideLength:t.count(),encode:Lk(e.getData())},f=!0;return function(e,i){return s=e,f=!0,r&&r(we.defaults({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:i?i.type:null},p),d)};function g(e){null==e&&(e=s),f&&(l=t.getItemModel(e),u=l.getModel(Ik),c=l.getModel(Tk),h=t.getItemVisual(e,"color"),f=!1)}}function Lk(e){var t={};return we.each(e.dimensions,(function(i,n){var r=e.getDimensionInfo(i);if(!r.isExtraCoord){var a=r.coordDim;(t[a]=t[a]||[])[r.coordDimIndex]=n}})),t}function Pk(e,t,i,n,r,a){return(e=kk(e,t,i,n,r,a,!0))&&a.setItemGraphicEl(t,e),e}function kk(e,t,i,n,r,a,o){var s,l=!i,u=(i=i||{}).type,c=i.shape,h=i.style;if(e&&(l||null!=u&&u!==e.__customGraphicType||"path"===u&&((s=c)&&(s.hasOwnProperty("pathData")||s.hasOwnProperty("d")))&&Bk(c)!==e.__customPathData||"image"===u&&Vk(h,"image")&&h.image!==e.__customImagePath||"text"===u&&Vk(c,"text")&&h.text!==e.__customText)&&(r.remove(e),e=null),!l){var d=!e;return!e&&(e=function(e){var t,i=e.type;if("path"===i){var n=e.shape,r=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=Bk(n);(t=ru.makePath(a,null,r,n.layout||"center")).__customPathData=a}else if("image"===i)(t=new ru.Image({})).__customImagePath=e.style.image;else if("text"===i)(t=new ru.Text({})).__customText=e.style.text;else if("group"===i)t=new ru.Group;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');t=new(ru.getShapeClass(i))}return t.__customGraphicType=i,t.name=e.name,t}(i)),function(e,t,i,n,r,a,o){var s={},l=i.style||{};if(i.shape&&(s.shape=we.clone(i.shape)),i.position&&(s.position=i.position.slice()),i.scale&&(s.scale=i.scale.slice()),i.origin&&(s.origin=i.origin.slice()),i.rotation&&(s.rotation=i.rotation),"image"===e.type&&i.style){var u=s.style={};we.each(["x","y","width","height"],(function(t){Ck(t,u,l,e.style,a)}))}if("text"===e.type&&i.style){u=s.style={};we.each(["x","y"],(function(t){Ck(t,u,l,e.style,a)})),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}if("group"!==e.type&&(e.useStyle(l),a)){e.style.opacity=0;var c=l.opacity;null==c&&(c=1),ru.initProps(e,{style:{opacity:c}},n,t)}a?e.attr(s):ru.updateProps(e,s,n,t),i.hasOwnProperty("z2")&&e.attr("z2",i.z2||0),i.hasOwnProperty("silent")&&e.attr("silent",i.silent),i.hasOwnProperty("invisible")&&e.attr("invisible",i.invisible),i.hasOwnProperty("ignore")&&e.attr("ignore",i.ignore),i.hasOwnProperty("info")&&e.attr("info",i.info);var h=i.styleEmphasis;ru.setElementHoverStyle(e,h),o&&ru.setAsHighDownDispatcher(e,!1!==h)}(e,t,i,n,0,d,o),"group"===u&&function(e,t,i,n,r){var a=i.children,o=a?a.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=!1===s;if(!o&&!l&&!u)return;if(l)return c={oldChildren:e.children()||[],newChildren:a||[],dataIndex:t,animatableModel:n,group:e,data:r},void new Cf(c.oldChildren,c.newChildren,Ok,Ok,c).add(Rk).update(Rk).remove(zk).execute();var c;u&&e.removeAll();for(var h=0;h<o;h++)a[h]&&kk(e.childAt(h),t,a[h],n,e,r)}(e,t,i,n,a),r.add(e),e}}function Ok(e,t){var i=e&&e.name;return null!=i?i:"e\0\0"+t}function Rk(e,t){var i=this.context,n=null!=e?i.newChildren[e]:null;kk(null!=t?i.oldChildren[t]:null,i.dataIndex,n,i.animatableModel,i.group,i.data)}function Nk(e,t){var i=new vu({},t);return we.each(wk,(function(t,n){e.hasOwnProperty(t)&&(i.option[n]=e[t])})),i}function Ek(e,t){for(var i in t)!t.hasOwnProperty(i)&&wk.hasOwnProperty(i)||(e[i]=t[i])}function zk(e){var t=this.context,i=t.oldChildren[e];i&&t.group.remove(i)}function Bk(e){return e&&(e.pathData||e.d)}function Vk(e,t){return e&&e.hasOwnProperty(t)}zd.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(e,t){return zg(this.getSource(),this)},getDataParams:function(e,t,i){var n=zd.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),ep.extend({type:"custom",_data:null,render:function(e,t,i,n){var r=this._data,a=e.getData(),o=this.group,s=Dk(e,a,t,i);a.diff(r).add((function(t){Pk(null,t,s(t,n),e,o,a)})).update((function(t,i){Pk(r.getItemGraphicEl(i),t,s(t,n),e,o,a)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&o.remove(t)})).execute();var l=e.get("clip",!0)?bk(e.coordinateSystem,!1,e):null;l?o.setClipPath(l):o.removeClipPath(),this._data=a},incrementalPrepareRender:function(e,t,i){this.group.removeAll(),this._data=null},incrementalRender:function(e,t,i,n,r){var a=t.getData(),o=Dk(t,a,i,n);function s(e){e.isGroup||(e.incremental=!0,e.useHoverLayer=!0)}for(var l=e.start;l<e.end;l++){Pk(null,l,o(l,r),t,this.group,a).traverse(s)}},dispose:we.noop,filterForExposedEvent:function(e,t,i,n){var r=t.element;if(null==r||i.name===r)return!0;for(;(i=i.parent)&&i!==this.group;)if(i.name===r)return!0;return!1}});var Fk=Su.parsePercent,Gk=Lg.isDimensionStacked;function Hk(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function Wk(e,t){return t.dim+e.model.componentIndex}var jk=function(e,t,i){var n={},r=function(e,t){var i={};we.each(e,(function(e,t){var n=e.getData(),r=e.coordinateSystem,a=r.getBaseAxis(),o=Wk(r,a),s=a.getExtent(),l="category"===a.type?a.getBandWidth():Math.abs(s[1]-s[0])/n.count(),u=i[o]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=u.stacks;i[o]=u;var h=Hk(e);c[h]||u.autoWidthCount++,c[h]=c[h]||{width:0,maxWidth:0};var d=Fk(e.get("barWidth"),l),p=Fk(e.get("barMaxWidth"),l),f=e.get("barGap"),g=e.get("barCategoryGap");d&&!c[h].width&&(d=Math.min(u.remainedWidth,d),c[h].width=d,u.remainedWidth-=d),p&&(c[h].maxWidth=p),null!=f&&(u.gap=f),null!=g&&(u.categoryGap=g)}));var n={};return we.each(i,(function(e,t){n[t]={};var i=e.stacks,r=e.bandWidth,a=Fk(e.categoryGap,r),o=Fk(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-a)/(l+(l-1)*o);u=Math.max(u,0),we.each(i,(function(e,t){var i=e.maxWidth;i&&i<u&&(i=Math.min(i,s),e.width&&(i=Math.min(i,e.width)),s-=i,e.width=i,l--)})),u=(s-a)/(l+(l-1)*o),u=Math.max(u,0);var c,h=0;we.each(i,(function(e,t){e.width||(e.width=u),c=e,h+=e.width*(1+o)})),c&&(h-=c.width*o);var d=-h/2;we.each(i,(function(e,i){n[t][i]=n[t][i]||{offset:d,width:e.width},d+=e.width*(1+o)}))})),n}(we.filter(t.getSeriesByType(e),(function(e){return!t.isSeriesFiltered(e)&&e.coordinateSystem&&"polar"===e.coordinateSystem.type})));t.eachSeriesByType(e,(function(e){if("polar"===e.coordinateSystem.type){var t=e.getData(),i=e.coordinateSystem,a=i.getBaseAxis(),o=Wk(i,a),s=Hk(e),l=r[o][s],u=l.offset,c=l.width,h=i.getOtherAxis(a),d=e.coordinateSystem.cx,p=e.coordinateSystem.cy,f=e.get("barMinHeight")||0,g=e.get("barMinAngle")||0;n[s]=n[s]||[];for(var m=t.mapDimension(h.dim),v=t.mapDimension(a.dim),y=Gk(t,m),x="radius"!==a.dim||!e.get("roundCap",!0),_=h.getExtent()[0],b=0,w=t.count();b<w;b++){var S,M,I,T,A=t.get(m,b),C=t.get(v,b),D=A>=0?"p":"n",L=_;if(y&&(n[s][C]||(n[s][C]={p:_,n:_}),L=n[s][C][D]),"radius"===h.dim){var P=h.dataToRadius(A)-_,k=a.dataToAngle(C);Math.abs(P)<f&&(P=(P<0?-1:1)*f),S=L,M=L+P,T=(I=k-u)-c,y&&(n[s][C][D]=M)}else{var O=h.dataToAngle(A,x)-_,R=a.dataToRadius(C);Math.abs(O)<g&&(O=(O<0?-1:1)*g),M=(S=R+u)+c,I=L,T=L+O,y&&(n[s][C][D]=T)}t.setItemLayout(b,{cx:d,cy:p,r0:S,r:M,startAngle:-I*Math.PI/180,endAngle:-T*Math.PI/180})}}}),this)};function Uk(e,t){zv.call(this,"radius",e,t),this.type="category"}Uk.prototype={constructor:Uk,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToRadius:zv.prototype.dataToCoord,radiusToData:zv.prototype.coordToData},we.inherits(Uk,zv);var Zk=Uk,Yk=(0,xa.makeInner)();function qk(e,t){t=t||[0,360],zv.call(this,"angle",e,t),this.type="category"}qk.prototype={constructor:qk,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToAngle:zv.prototype.dataToCoord,angleToData:zv.prototype.coordToData,calculateCategoryInterval:function(){var e=this.getLabelModel(),t=this.scale,i=t.getExtent(),n=t.count();if(i[1]-i[0]<1)return 0;var r=i[0],a=this.dataToCoord(r+1)-this.dataToCoord(r),o=Math.abs(a),s=Fn.getBoundingRect(r,e.getFont(),"center","top"),l=Math.max(s.height,7)/o;isNaN(l)&&(l=1/0);var u=Math.max(0,Math.floor(l)),c=Yk(this.model),h=c.lastAutoInterval,d=c.lastTickCount;return null!=h&&null!=d&&Math.abs(h-u)<=1&&Math.abs(d-n)<=1&&h>u?u=h:(c.lastTickCount=n,c.lastAutoInterval=u),u}},we.inherits(qk,zv);var Xk=qk,Kk=function(e){this.name=e||"",this.cx=0,this.cy=0,this._radiusAxis=new Zk,this._angleAxis=new Xk,this._radiusAxis.polar=this._angleAxis.polar=this};Kk.prototype={type:"polar",axisPointerEnabled:!0,constructor:Kk,dimensions:["radius","angle"],model:null,containPoint:function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},containData:function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},getAxis:function(e){return this["_"+e+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(e){var t=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===e&&t.push(i),n.scale.type===e&&t.push(n),t},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},dataToPoint:function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},pointToData:function(e,t){var i=this.pointToCoord(e);return[this._radiusAxis.radiusToData(i[0],t),this._angleAxis.angleToData(i[1],t)]},pointToCoord:function(e){var t=e[0]-this.cx,i=e[1]-this.cy,n=this.getAngleAxis(),r=n.getExtent(),a=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);n.inverse?a=o-360:o=a+360;var s=Math.sqrt(t*t+i*i);t/=s,i/=s;for(var l=Math.atan2(-i,t)/Math.PI*180,u=l<a?1:-1;l<a||l>o;)l+=360*u;return[s,l]},coordToPoint:function(e){var t=e[0],i=e[1]/180*Math.PI;return[Math.cos(i)*t+this.cx,-Math.sin(i)*t+this.cy]},getArea:function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var i=e.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:e.inverse,contain:function(e,t){var i=e-this.cx,n=t-this.cy,r=i*i+n*n,a=this.r,o=this.r0;return r<=a*a&&r>=o*o}}}};var Qk=Kk,Jk=qu.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});we.merge(Jk.prototype,Um);var $k={splitNumber:5};function eO(e,t){return t.type||(t.data?"category":"value")}qb("angle",Jk,eO,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),qb("radius",Jk,eO,$k);ty.extendComponentModel({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(e){var t;return this.ecModel.eachComponent(e,(function(e){e.getCoordSysModel()===this&&(t=e)}),this),t},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var tO=Su.parsePercent,iO=jm.createScaleByModel,nO=jm.niceScaleExtent,rO=Lg.getStackedDimension;function aO(e,t){var i=this,n=i.getAngleAxis(),r=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),e.eachSeries((function(e){if(e.coordinateSystem===i){var t=e.getData();we.each(t.mapDimension("radius",!0),(function(e){r.scale.unionExtentFromData(t,rO(t,e))})),we.each(t.mapDimension("angle",!0),(function(e){n.scale.unionExtentFromData(t,rO(t,e))}))}})),nO(n.scale,n.model),nO(r.scale,r.model),"category"===n.type&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function oO(e,t){if(e.type=t.get("type"),e.scale=iO(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),"angleAxis"===t.mainType){e.inverse^=t.get("clockwise");var i=t.get("startAngle");e.setExtent(i,i+(e.inverse?-360:360))}t.axis=e,e.model=t}var sO={dimensions:Qk.prototype.dimensions,create:function(e,t){var i=[];return e.eachComponent("polar",(function(e,n){var r=new Qk(n);r.update=aO;var a=r.getRadiusAxis(),o=r.getAngleAxis(),s=e.findAxisModel("radiusAxis"),l=e.findAxisModel("angleAxis");oO(a,s),oO(o,l),function(e,t,i){var n=t.get("center"),r=i.getWidth(),a=i.getHeight();e.cx=tO(n[0],r),e.cy=tO(n[1],a);var o=e.getRadiusAxis(),s=Math.min(r,a)/2,l=t.get("radius");null==l?l=[0,"100%"]:we.isArray(l)||(l=[0,l]),l=[tO(l[0],s),tO(l[1],s)],o.inverse?o.setExtent(l[1],l[0]):o.setExtent(l[0],l[1])}(r,e,t),i.push(r),e.coordinateSystem=r,r.model=e})),e.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var i=e.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=i.coordinateSystem}})),i}};oh.register("polar",sO);var lO=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function uO(e,t,i){t[1]>t[0]&&(t=t.slice().reverse());var n=e.coordToPoint([t[0],i]),r=e.coordToPoint([t[1],i]);return{x1:n[0],y1:n[1],x2:r[0],y2:r[1]}}function cO(e){return e.getRadiusAxis().inverse?0:1}function hO(e){var t=e[0],i=e[e.length-1];t&&i&&Math.abs(Math.abs(t.coord-i.coord)-360)<1e-4&&e.pop()}Yw.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,r=n.getRadiusAxis().getExtent(),a=i.getTicksCoords(),o=i.getMinorTicksCoords(),s=we.map(i.getViewLabels(),(function(e){return(e=we.clone(e)).coord=i.dataToCoord(e.tickValue),e}));hO(s),hO(a),we.each(lO,(function(t){!e.get(t+".show")||i.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,n,a,o,r,s)}),this)}},_axisLine:function(e,t,i,n,r){var a,o=e.getModel("axisLine.lineStyle"),s=cO(t),l=s?0:1;(a=0===r[l]?new ru.Circle({shape:{cx:t.cx,cy:t.cy,r:r[s]},style:o.getLineStyle(),z2:1,silent:!0}):new ru.Ring({shape:{cx:t.cx,cy:t.cy,r:r[s],r0:r[l]},style:o.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(a)},_axisTick:function(e,t,i,n,r){var a=e.getModel("axisTick"),o=(a.get("inside")?-1:1)*a.get("length"),s=r[cO(t)],l=we.map(i,(function(e){return new ru.Line({shape:uO(t,[s,s+o],e.coord)})}));this.group.add(ru.mergePath(l,{style:we.defaults(a.getModel("lineStyle").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})}))},_minorTick:function(e,t,i,n,r){if(n.length){for(var a=e.getModel("axisTick"),o=e.getModel("minorTick"),s=(a.get("inside")?-1:1)*o.get("length"),l=r[cO(t)],u=[],c=0;c<n.length;c++)for(var h=0;h<n[c].length;h++)u.push(new ru.Line({shape:uO(t,[l,l+s],n[c][h].coord)}));this.group.add(ru.mergePath(u,{style:we.defaults(o.getModel("lineStyle").getLineStyle(),we.defaults(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(e,t,i,n,r,a){var o=e.getCategories(!0),s=e.getModel("axisLabel"),l=s.get("margin"),u=e.get("triggerEvent");we.each(a,(function(i,n){var a=s,c=i.tickValue,h=r[cO(t)],d=t.coordToPoint([h+l,i.coord]),p=t.cx,f=t.cy,g=Math.abs(d[0]-p)/h<.3?"center":d[0]>p?"left":"right",m=Math.abs(d[1]-f)/h<.3?"middle":d[1]>f?"top":"bottom";o&&o[c]&&o[c].textStyle&&(a=new vu(o[c].textStyle,s,s.ecModel));var v=new ru.Text({silent:Nw.isLabelSilent(e)});this.group.add(v),ru.setTextStyle(v.style,a,{x:d[0],y:d[1],textFill:a.getTextColor()||e.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:g,textVerticalAlign:m}),u&&(v.eventData=Nw.makeAxisEventDataBase(e),v.eventData.targetType="axisLabel",v.eventData.value=i.rawLabel)}),this)},_splitLine:function(e,t,i,n,r){var a=e.getModel("splitLine").getModel("lineStyle"),o=a.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=0;u<i.length;u++){var c=s++%o.length;l[c]=l[c]||[],l[c].push(new ru.Line({shape:uO(t,r,i[u].coord)}))}for(u=0;u<l.length;u++)this.group.add(ru.mergePath(l[u],{style:we.defaults({stroke:o[u%o.length]},a.getLineStyle()),silent:!0,z:e.get("z")}))},_minorSplitLine:function(e,t,i,n,r){if(n.length){for(var a=e.getModel("minorSplitLine").getModel("lineStyle"),o=[],s=0;s<n.length;s++)for(var l=0;l<n[s].length;l++)o.push(new ru.Line({shape:uO(t,r,n[s][l].coord)}));this.group.add(ru.mergePath(o,{style:a.getLineStyle(),silent:!0,z:e.get("z")}))}},_splitArea:function(e,t,i,n,r){if(i.length){var a=e.getModel("splitArea").getModel("areaStyle"),o=a.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=Math.PI/180,c=-i[0].coord*u,h=Math.min(r[0],r[1]),d=Math.max(r[0],r[1]),p=e.get("clockwise"),f=1;f<i.length;f++){var g=s++%o.length;l[g]=l[g]||[],l[g].push(new ru.Sector({shape:{cx:t.cx,cy:t.cy,r0:h,r:d,startAngle:c,endAngle:-i[f].coord*u,clockwise:p},silent:!0})),c=-i[f].coord*u}for(f=0;f<l.length;f++)this.group.add(ru.mergePath(l[f],{style:we.defaults({fill:o[f%o.length]},a.getAreaStyle()),silent:!0}))}}});var dO=["axisLine","axisTickLabel","axisName"],pO=["splitLine","splitArea","minorSplitLine"];Yw.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,r=n.getAngleAxis(),a=i.getTicksCoords(),o=i.getMinorTicksCoords(),s=r.getExtent()[0],l=i.getExtent(),u=function(e,t,i){return{position:[e.cx,e.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}(n,e,s),c=new Nw(e,u);we.each(dO,c.add,c),this.group.add(c.getGroup()),we.each(pO,(function(t){e.get(t+".show")&&!i.scale.isBlank()&&this["_"+t](e,n,s,l,a,o)}),this)}},_splitLine:function(e,t,i,n,r){var a=e.getModel("splitLine").getModel("lineStyle"),o=a.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=0;u<r.length;u++){var c=s++%o.length;l[c]=l[c]||[],l[c].push(new ru.Circle({shape:{cx:t.cx,cy:t.cy,r:r[u].coord}}))}for(u=0;u<l.length;u++)this.group.add(ru.mergePath(l[u],{style:we.defaults({stroke:o[u%o.length],fill:null},a.getLineStyle()),silent:!0}))},_minorSplitLine:function(e,t,i,n,r,a){if(a.length){for(var o=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<a.length;l++)for(var u=0;u<a[l].length;u++)s.push(new ru.Circle({shape:{cx:t.cx,cy:t.cy,r:a[l][u].coord}}));this.group.add(ru.mergePath(s,{style:we.defaults({fill:null},o.getLineStyle()),silent:!0}))}},_splitArea:function(e,t,i,n,r){if(r.length){var a=e.getModel("splitArea").getModel("areaStyle"),o=a.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=r[0].coord,c=1;c<r.length;c++){var h=s++%o.length;l[h]=l[h]||[],l[h].push(new ru.Sector({shape:{cx:t.cx,cy:t.cy,r0:u,r:r[c].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=r[c].coord}for(c=0;c<l.length;c++)this.group.add(ru.mergePath(l[c],{style:we.defaults({fill:o[c%o.length]},a.getAreaStyle()),silent:!0}))}}});var fO=AP.extend({makeElOption:function(e,t,i,n,r){var a=i.axis;"angle"===a.dim&&(this.animationThreshold=Math.PI/18);var o,s=a.polar,l=s.getOtherAxis(a).getExtent();o=a["dataTo"+Pu.capitalFirst(a.dim)](t);var u=n.get("type");if(u&&"none"!==u){var c=PP.buildElStyle(n),h=gO[u](a,s,o,l,c);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=function(e,t,i,n,r){var a=t.axis,o=a.dataToCoord(e),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,h=n.getRadiusAxis().getExtent();if("radius"===a.dim){var d=ft.create();ft.rotate(d,d,s),ft.translate(d,d,[n.cx,n.cy]),l=ru.applyTransform([o,-r],d);var p=t.getModel("axisLabel").get("rotate")||0,f=Nw.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,c=f.textVerticalAlign}else{var g=h[1];l=n.coordToPoint([g+r,o]);var m=n.cx,v=n.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",c=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(t,i,0,s,n.get("label.margin"));PP.buildLabelElOption(e,i,n,r,d)}});var gO={line:function(e,t,i,n,r){return"angle"===e.dim?{type:"Line",shape:PP.makeLineShape(t.coordToPoint([n[0],i]),t.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:i}}},shadow:function(e,t,i,n,r){var a=Math.max(1,e.getBandWidth()),o=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:PP.makeSectorShape(t.cx,t.cy,n[0],n[1],(-i-a/2)*o,(a/2-i)*o)}:{type:"Sector",shape:PP.makeSectorShape(t.cx,t.cy,i-a/2,i+a/2,0,2*Math.PI)}}};Yw.registerAxisPointerClass("PolarAxisPointer",fO),ty.registerLayout(we.curry(jk,"bar")),ty.extendComponentView({type:"polar"});function mO(e,t,i){this._model=e}function vO(e,t,i,n){var r=i.calendarModel,a=i.seriesModel,o=r?r.coordinateSystem:a?a.coordinateSystem:null;return o===this?o[e](n):null}mO.prototype={constructor:mO,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(e){var t=(e=Su.parseDate(e)).getFullYear(),i=e.getMonth()+1;i=i<10?"0"+i:i;var n=e.getDate();n=n<10?"0"+n:n;var r=e.getDay();return{y:t,m:i,d:n,day:r=Math.abs((r+7-this.getFirstDayOfWeek())%7),time:e.getTime(),formatedDate:t+"-"+i+"-"+n,date:e}},getNextNDay:function(e,t){return 0===(t=t||0)||(e=new Date(this.getDateInfo(e).time)).setDate(e.getDate()+t),this.getDateInfo(e)},update:function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,n=["width","height"],r=this._model.get("cellSize").slice(),a=this._model.getBoxLayoutParams(),o="horizontal"===this._orient?[i,7]:[7,i];we.each([0,1],(function(e){u(r,e)&&(a[n[e]]=r[e]*o[e])}));var s={width:t.getWidth(),height:t.getHeight()},l=this._rect=Hu.getLayoutRect(a,s);function u(e,t){return null!=e[t]&&"auto"!==e[t]}we.each([0,1],(function(e){u(r,e)||(r[e]=l[n[e]]/o[e])})),this._sw=r[0],this._sh=r[1]},dataToPoint:function(e,t){we.isArray(e)&&(e=e[0]),null==t&&(t=!0);var i=this.getDateInfo(e),n=this._rangeInfo,r=i.formatedDate;if(t&&!(i.time>=n.start.time&&i.time<n.end.time+864e5))return[NaN,NaN];var a=i.day,o=this._getRangeInfo([n.start.time,r]).nthWeek;return"vertical"===this._orient?[this._rect.x+a*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]:[this._rect.x+o*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]},pointToData:function(e){var t=this.pointToDate(e);return t&&t.time},dataToRect:function(e,t){var i=this.dataToPoint(e,t);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,i=Math.floor((e[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,t-1,n):this._getDateByWeeksAndDay(t,i-1,n)},convertToPixel:we.curry(vO,"dataToPoint"),convertFromPixel:we.curry(vO,"pointToData"),_initRangeOption:function(){var e=this._model.get("range"),t=e;if(we.isArray(t)&&1===t.length&&(t=t[0]),/^\d{4}$/.test(t)&&(e=[t+"-01-01",t+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(t)){var i=this.getDateInfo(t),n=i.date;n.setMonth(n.getMonth()+1);var r=this.getNextNDay(n,-1);e=[i.formatedDate,r.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(t)&&(e=[t,t]);var a=this._getRangeInfo(e);return a.start.time>a.end.time&&e.reverse(),e},_getRangeInfo:function(e){var t;(e=[this.getDateInfo(e[0]),this.getDateInfo(e[1])])[0].time>e[1].time&&(t=!0,e.reverse());var i=Math.floor(e[1].time/864e5)-Math.floor(e[0].time/864e5)+1,n=new Date(e[0].time),r=n.getDate(),a=e[1].date.getDate();n.setDate(r+i-1);var o=n.getDate();if(o!==a)for(var s=n.getTime()-e[1].time>0?1:-1;(o=n.getDate())!==a&&(n.getTime()-e[1].time)*s>0;)i-=s,n.setDate(o-s);var l=Math.floor((i+e[0].day+6)/7),u=t?1-l:l-1;return t&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:i,weeks:l,nthWeek:u,fweek:e[0].day,lweek:e[1].day}},_getDateByWeeksAndDay:function(e,t,i){var n=this._getRangeInfo(i);if(e>n.weeks||0===e&&t<n.fweek||e===n.weeks&&t>n.lweek)return!1;var r=7*(e-1)-n.fweek+t,a=new Date(n.start.time);return a.setDate(n.start.d+r),this.getDateInfo(a)}},mO.dimensions=mO.prototype.dimensions,mO.getDimensionsInfo=mO.prototype.getDimensionsInfo,mO.create=function(e,t){var i=[];return e.eachComponent("calendar",(function(n){var r=new mO(n,e,t);i.push(r),n.coordinateSystem=r})),e.eachSeries((function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=i[e.get("calendarIndex")||0])})),i},oh.register("calendar",mO);var yO=Hu.getLayoutParams,xO=Hu.sizeCalculable,_O=Hu.mergeLayoutParam,bO=qu.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(e,t,i,n){var r=yO(e);bO.superApply(this,"init",arguments),wO(e,r)},mergeOption:function(e,t){bO.superApply(this,"mergeOption",arguments),wO(this.option,e)}});function wO(e,t){var i=e.cellSize;we.isArray(i)?1===i.length&&(i[1]=i[0]):i=e.cellSize=[i,i];var n=we.map([0,1],(function(e){return xO(t,e)&&(i[e]="auto"),null!=i[e]&&"auto"!==i[e]}));_O(e,t,{type:"box",ignoreSize:n})}var SO={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},MO={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]},IO=(ty.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(e,t,i){var n=this.group;n.removeAll();var r=e.coordinateSystem,a=r.getRangeInfo(),o=r.getOrient();this._renderDayRect(e,a,n),this._renderLines(e,a,o,n),this._renderYearText(e,a,o,n),this._renderMonthText(e,o,n),this._renderWeekText(e,a,o,n)},_renderDayRect:function(e,t,i){for(var n=e.coordinateSystem,r=e.getModel("itemStyle").getItemStyle(),a=n.getCellWidth(),o=n.getCellHeight(),s=t.start.time;s<=t.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new ru.Rect({shape:{x:l[0],y:l[1],width:a,height:o},cursor:"default",style:r});i.add(u)}},_renderLines:function(e,t,i,n){var r=this,a=e.coordinateSystem,o=e.getModel("splitLine.lineStyle").getLineStyle(),s=e.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,c=0;u.time<=t.end.time;c++){d(u.formatedDate),0===c&&(u=a.getDateInfo(t.start.y+"-"+t.start.m));var h=u.date;h.setMonth(h.getMonth()+1),u=a.getDateInfo(h)}function d(t){r._firstDayOfMonth.push(a.getDateInfo(t)),r._firstDayPoints.push(a.dataToRect([t],!1).tl);var l=r._getLinePointsOfOneWeek(e,t,i);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,o,n)}d(a.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,i),o,n),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,i),o,n)},_getEdgesPoints:function(e,t,i){var n=[e[0].slice(),e[e.length-1].slice()],r="horizontal"===i?0:1;return n[0][r]=n[0][r]-t/2,n[1][r]=n[1][r]+t/2,n},_drawSplitline:function(e,t,i){var n=new ru.Polyline({z2:20,shape:{points:e},style:t});i.add(n)},_getLinePointsOfOneWeek:function(e,t,i){var n=e.coordinateSystem;t=n.getDateInfo(t);for(var r=[],a=0;a<7;a++){var o=n.getNextNDay(t.time,a),s=n.dataToRect([o.time],!1);r[2*o.day]=s.tl,r[2*o.day+1]=s["horizontal"===i?"bl":"tr"]}return r},_formatterLabel:function(e,t){return"string"==typeof e&&e?Pu.formatTplSimple(e,t):"function"==typeof e?e(t):t.nameMap},_yearTextPositionControl:function(e,t,i,n,r){t=t.slice();var a=["center","bottom"];"bottom"===n?(t[1]+=r,a=["center","top"]):"left"===n?t[0]-=r:"right"===n?(t[0]+=r,a=["center","top"]):t[1]-=r;var o=0;return"left"!==n&&"right"!==n||(o=Math.PI/2),{rotation:o,position:t,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(e,t,i,n){var r=e.getModel("yearLabel");if(r.get("show")){var a=r.get("margin"),o=r.get("position");o||(o="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===i?0:1,h={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},d=t.start.y;+t.end.y>+t.start.y&&(d=d+"-"+t.end.y);var p=r.get("formatter"),f={start:t.start.y,end:t.end.y,nameMap:d},g=this._formatterLabel(p,f),m=new ru.Text({z2:30});ru.setTextStyle(m.style,r,{text:g}),m.attr(this._yearTextPositionControl(m,h[o],i,o,a)),n.add(m)}},_monthTextPositionControl:function(e,t,i,n,r){var a="left",o="top",s=e[0],l=e[1];return"horizontal"===i?(l+=r,t&&(a="center"),"start"===n&&(o="bottom")):(s+=r,t&&(o="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:o}},_renderMonthText:function(e,t,i){var n=e.getModel("monthLabel");if(n.get("show")){var r=n.get("nameMap"),a=n.get("margin"),o=n.get("position"),s=n.get("align"),l=[this._tlpoints,this._blpoints];we.isString(r)&&(r=SO[r.toUpperCase()]||[]);var u="start"===o?0:1,c="horizontal"===t?0:1;a="start"===o?-a:a;for(var h="center"===s,d=0;d<l[u].length-1;d++){var p=l[u][d].slice(),f=this._firstDayOfMonth[d];if(h){var g=this._firstDayPoints[d];p[c]=(g[c]+l[0][d+1][c])/2}var m=n.get("formatter"),v=r[+f.m-1],y={yyyy:f.y,yy:(f.y+"").slice(2),MM:f.m,M:+f.m,nameMap:v},x=this._formatterLabel(m,y),_=new ru.Text({z2:30});we.extend(ru.setTextStyle(_.style,n,{text:x}),this._monthTextPositionControl(p,h,t,o,a)),i.add(_)}}},_weekTextPositionControl:function(e,t,i,n,r){var a="center",o="middle",s=e[0],l=e[1],u="start"===i;return"horizontal"===t?(s=s+n+(u?1:-1)*r[0]/2,a=u?"right":"left"):(l=l+n+(u?1:-1)*r[1]/2,o=u?"bottom":"top"),{x:s,y:l,textAlign:a,textVerticalAlign:o}},_renderWeekText:function(e,t,i,n){var r=e.getModel("dayLabel");if(r.get("show")){var a=e.coordinateSystem,o=r.get("position"),s=r.get("nameMap"),l=r.get("margin"),u=a.getFirstDayOfWeek();we.isString(s)&&(s=MO[s.toUpperCase()]||[]);var c=a.getNextNDay(t.end.time,7-t.lweek).time,h=[a.getCellWidth(),a.getCellHeight()];l=Su.parsePercent(l,h["horizontal"===i?0:1]),"start"===o&&(c=a.getNextNDay(t.start.time,-(7+t.fweek)).time,l=-l);for(var d=0;d<7;d++){var p,f=a.getNextNDay(c,d),g=a.dataToRect([f.time],!1).center;p=Math.abs((d+u)%7);var m=new ru.Text({z2:30});we.extend(ru.setTextStyle(m.style,r,{text:s[p]}),this._weekTextPositionControl(g,i,o,l,h)),n.add(m)}}}}),Su.parsePercent),TO={path:null,compoundPath:null,group:ru.Group,image:ru.Image,text:ru.Text};ty.registerPreprocessor((function(e){var t=e.graphic;we.isArray(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])}));var AO=ty.extendComponentModel({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(e){var t=this.option.elements;this.option.elements=null,AO.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(e,t){var i=this.option,n=(t?i:e).elements,r=i.elements=t?[]:i.elements,a=[];this._flatten(n,a);var o=xa.mappingToExists(r,a);xa.makeIdAndName(o);var s=this._elOptionsToUpdate=[];we.each(o,(function(e,t){var i=e.option;i&&(s.push(i),function(e,t){var i=e.exist;if(t.id=e.keyInfo.id,!t.type&&i&&(t.type=i.type),null==t.parentId){var n=t.parentOption;n?t.parentId=n.id:i&&(t.parentId=i.parentId)}t.parentOption=null}(e,i),function(e,t,i){var n=we.extend({},i),r=e[t],a=i.$action||"merge";"merge"===a?r?(we.merge(r,n,!0),Hu.mergeLayoutParam(r,n,{ignoreSize:!0}),Hu.copyLayoutParams(i,r)):e[t]=n:"replace"===a?e[t]=n:"remove"===a&&r&&(e[t]=null)}(r,t,i),function(e,t){if(!e)return;e.hv=t.hv=[LO(t,["left","right"]),LO(t,["top","bottom"])],"group"===e.type&&(null==e.width&&(e.width=t.width=0),null==e.height&&(e.height=t.height=0))}(r[t],i))}),this);for(var l=r.length-1;l>=0;l--)null==r[l]?r.splice(l,1):delete r[l].$action},_flatten:function(e,t,i){we.each(e,(function(e){if(e){i&&(e.parentOption=i),t.push(e);var n=e.children;"group"===e.type&&n&&this._flatten(n,t,e),delete e.children}}),this)},useElOptionsToUpdate:function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e}});function CO(e,t,i,n){var r=i.type,a=new(TO.hasOwnProperty(r)?TO[r]:ru.getShapeClass(r))(i);t.add(a),n.set(e,a),a.__ecGraphicId=e}function DO(e,t){var i=e&&e.parent;i&&("group"===e.type&&e.traverse((function(e){DO(e,t)})),t.removeKey(e.__ecGraphicId),i.remove(e))}function LO(e,t){var i;return we.each(t,(function(t){null!=e[t]&&"auto"!==e[t]&&(i=!0)})),i}ty.extendComponentView({type:"graphic",init:function(e,t){this._elMap=we.createHashMap(),this._lastGraphicModel},render:function(e,t,i){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,i)},_updateElements:function(e){var t=e.useElOptionsToUpdate();if(t){var i=this._elMap,n=this.group;we.each(t,(function(t){var r=t.$action,a=t.id,o=i.get(a),s=t.parentId,l=null!=s?i.get(s):n,u=t.style;"text"===t.type&&u&&(t.hv&&t.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var c=function(e){return e=we.extend({},e),we.each(["id","parentId","$action","hv","bounding"].concat(Hu.LOCATION_PARAMS),(function(t){delete e[t]})),e}(t);r&&"merge"!==r?"replace"===r?(DO(o,i),CO(a,l,c,i)):"remove"===r&&DO(o,i):o?o.attr(c):CO(a,l,c,i);var h=i.get(a);h&&(h.__ecGraphicWidthOption=t.width,h.__ecGraphicHeightOption=t.height,function(e,t,i){var n=e.eventData;e.silent||e.ignore||n||(n=e.eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name});n&&(n.info=e.info)}(h,e))}))}},_relocate:function(e,t){for(var i=e.option.elements,n=this.group,r=this._elMap,a=t.getWidth(),o=t.getHeight(),s=0;s<i.length;s++){var l=i[s];if((c=r.get(l.id))&&c.isGroup){var u=(h=c.parent)===n;c.__ecGraphicWidth=IO(c.__ecGraphicWidthOption,u?a:h.__ecGraphicWidth)||0,c.__ecGraphicHeight=IO(c.__ecGraphicHeightOption,u?o:h.__ecGraphicHeight)||0}}for(s=i.length-1;s>=0;s--){var c;l=i[s];if(c=r.get(l.id)){var h,d=(h=c.parent)===n?{width:a,height:o}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight};Hu.positionElement(c,l,d,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var e=this._elMap;e.each((function(t){DO(t,e)})),this._elMap=we.createHashMap()},dispose:function(){this._clear()}});var PO={};var kO={register:function(e,t){PO[e]=t},get:function(e){return PO[e]}},OO=ty.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){OO.superApply(this,"optionUpdated",arguments),we.each(this.option.feature,(function(e,t){var i=kO.get(t);i&&we.merge(e,i.defaultOption)}))},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}}),RO=Hu.getLayoutRect,NO=Hu.box,EO=Hu.positionElement;var zO={layout:function(e,t,i){var n=t.getBoxLayoutParams(),r=t.get("padding"),a={width:i.getWidth(),height:i.getHeight()},o=RO(n,a,r);NO(t.get("orient"),e,t.get("itemGap"),o.width,o.height),EO(e,n,a,r)},makeBackground:function(e,t){var i=Pu.normalizeCssArray(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),e=new ru.Rect({shape:{x:e.x-i[3],y:e.y-i[0],width:e.width+i[1]+i[3],height:e.height+i[0]+i[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1})}};ty.extendComponentView({type:"toolbox",render:function(e,t,i,n){var r=this.group;if(r.removeAll(),e.get("show")){var a=+e.get("itemSize"),o=e.get("feature")||{},s=this._features||(this._features={}),l=[];we.each(o,(function(e,t){l.push(t)})),new Cf(this._featureNames||[],l).add(u).update(u).remove(we.curry(u,null)).execute(),this._featureNames=l,zO.layout(r,e,i),r.add(zO.makeBackground(r.getBoundingRect(),e)),r.eachChild((function(e){var t=e.__title,n=e.hoverStyle;if(n&&t){var o=Fn.getBoundingRect(t,Fn.makeFont(n)),s=e.position[0]+r.position[0],l=!1;e.position[1]+r.position[1]+a+o.height>i.getHeight()&&(n.textPosition="top",l=!0);var u=l?-5-o.height:a+8;s+o.width/2>i.getWidth()?(n.textPosition=["100%",u],n.textAlign="right"):s-o.width/2<0&&(n.textPosition=[0,u],n.textAlign="left")}}))}function u(u,c){var h,d=l[u],p=l[c],f=o[d],g=new vu(f,e,e.ecModel);if(n&&null!=n.newTitle&&n.featureName===d&&(f.title=n.newTitle),d&&!p){if(function(e){return 0===e.indexOf("my")}(d))h={model:g,onclick:g.option.onclick,featureName:d};else{var m=kO.get(d);if(!m)return;h=new m(g,t,i)}s[d]=h}else{if(!(h=s[p]))return;h.model=g,h.ecModel=t,h.api=i}d||!p?g.get("show")&&!h.unusable?(!function(n,o,s){var l=n.getModel("iconStyle"),u=n.getModel("emphasis.iconStyle"),c=o.getIcons?o.getIcons():n.get("icon"),h=n.get("title")||{};if("string"==typeof c){var d=c,p=h;h={},(c={})[s]=d,h[s]=p}var f=n.iconPaths={};we.each(c,(function(s,c){var d=ru.createIcon(s,{},{x:-a/2,y:-a/2,width:a,height:a});d.setStyle(l.getItemStyle()),d.hoverStyle=u.getItemStyle(),d.setStyle({text:h[c],textAlign:u.get("textAlign"),textBorderRadius:u.get("textBorderRadius"),textPadding:u.get("textPadding"),textFill:null});var p=e.getModel("tooltip");p&&p.get("show")&&d.attr("tooltip",we.extend({content:h[c],formatter:p.get("formatter",!0)||function(){return h[c]},formatterParams:{componentType:"toolbox",name:c,title:h[c],$vars:["name","title"]},position:p.get("position",!0)||"bottom"},p.option)),ru.setHoverStyle(d),e.get("showTitle")&&(d.__title=h[c],d.on("mouseover",(function(){var t=u.getItemStyle(),i="vertical"===e.get("orient")?null==e.get("right")?"right":"left":null==e.get("bottom")?"bottom":"top";d.setStyle({textFill:u.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:u.get("textBackgroundColor"),textPosition:u.get("textPosition")||i})})).on("mouseout",(function(){d.setStyle({textFill:null,textBackgroundColor:null})}))),d.trigger(n.get("iconStatus."+c)||"normal"),r.add(d),d.on("click",we.bind(o.onclick,o,t,i,c)),f[c]=d}))}(g,h,d),g.setIconStatus=function(e,t){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[e]=t,n[e]&&n[e].trigger(t)},h.render&&h.render(g,t,i,n)):h.remove&&h.remove(t,i):h.dispose&&h.dispose(t,i)}},updateView:function(e,t,i,n){we.each(this._features,(function(e){e.updateView&&e.updateView(e.model,t,i,n)}))},remove:function(e,t){we.each(this._features,(function(i){i.remove&&i.remove(e,t)})),this.group.removeAll()},dispose:function(e,t){we.each(this._features,(function(i){i.dispose&&i.dispose(e,t)}))}});var BO=sp.toolbox.saveAsImage;function VO(e){this.model=e}VO.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:BO.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:BO.lang.slice()},VO.prototype.unusable=!J.canvasSupported,VO.prototype.onclick=function(e,t){var i=this.model,n=i.get("name")||e.get("title.0.text")||"echarts",r="svg"===t.getZr().painter.getType()?"svg":i.get("type",!0)||"png",a=t.getConnectedDataURL({type:r,backgroundColor:i.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||J.browser.ie||J.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var o=atob(a.split(",")[1]),s=o.length,l=new Uint8Array(s);s--;)l[s]=o.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,n+"."+r)}else{var c=i.get("lang"),h='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>';window.open().document.write(h)}else{var d=document.createElement("a");d.download=n+"."+r,d.target="_blank",d.href=a;var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(p)}},kO.register("saveAsImage",VO);var FO=sp.toolbox.magicType;function GO(e){this.model=e}GO.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:we.clone(FO.title),option:{},seriesIndex:{}};var HO=GO.prototype;HO.getIcons=function(){var e=this.model,t=e.get("icon"),i={};return we.each(e.get("type"),(function(e){t[e]&&(i[e]=t[e])})),i};var WO={line:function(e,t,i,n){if("bar"===e)return we.merge({id:t,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(e,t,i,n){if("line"===e)return we.merge({id:t,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(e,t,i,n){var r="__ec_magicType_stack__"===i.get("stack");if("line"===e||"bar"===e)return n.setIconStatus("stack",r?"normal":"emphasis"),we.merge({id:t,stack:r?"":"__ec_magicType_stack__"},n.get("option.stack")||{},!0)}},jO=[["line","bar"],["stack"]];HO.onclick=function(e,t,i){var n=this.model,r=n.get("seriesIndex."+i);if(WO[i]){var a,o={series:[]};if(we.each(jO,(function(e){we.indexOf(e,i)>=0&&we.each(e,(function(e){n.setIconStatus(e,"normal")}))})),n.setIconStatus(i,"emphasis"),e.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},(function(t){var r=t.subType,a=t.id,s=WO[i](r,a,t,n);s&&(we.defaults(s,t.option),o.series.push(s));var l=t.coordinateSystem;if(l&&"cartesian2d"===l.type&&("line"===i||"bar"===i)){var u=l.getAxesByScale("ordinal")[0];if(u){var c=u.dim+"Axis",h=e.queryComponents({mainType:c,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;o[c]=o[c]||[];for(var d=0;d<=h;d++)o[c][h]=o[c][h]||{};o[c][h].boundaryGap="bar"===i}}})),"stack"===i)a=o.series&&o.series[0]&&"__ec_magicType_stack__"===o.series[0].stack?we.merge({stack:FO.title.tiled},FO.title):we.clone(FO.title);t.dispatchAction({type:"changeMagicType",currentType:i,newOption:o,newTitle:a,featureName:"magicType"})}},ty.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)})),kO.register("magicType",GO);var UO=sp.toolbox.dataView,ZO=new Array(60).join("-");function YO(e){return we.map(e,(function(e){var t=e.getRawData(),i=[e.name],n=[];return t.each(t.dimensions,(function(){for(var e=arguments.length,r=arguments[e-1],a=t.getName(r),o=0;o<e-1;o++)n[o]=arguments[o];i.push((a?a+"\t":"")+n.join("\t"))})),i.join("\n")})).join("\n\n"+ZO+"\n\n")}function qO(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var XO=new RegExp("[\t]+","g");function KO(e,t){var i=e.split(new RegExp("\n*"+ZO+"\n*","g")),n={series:[]};return we.each(i,(function(e,i){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf("\t")>=0)return!0}(e)){var r=function(e){for(var t=e.split(/\n+/g),i=qO(t.shift()).split(XO),n=[],r=we.map(i,(function(e){return{name:e,data:[]}})),a=0;a<t.length;a++){var o=qO(t[a]).split(XO);n.push(o.shift());for(var s=0;s<o.length;s++)r[s]&&(r[s].data[a]=o[s])}return{series:r,categories:n}}(e),a=t[i],o=a.axisDim+"Axis";a&&(n[o]=n[o]||[],n[o][a.axisIndex]={data:r.categories},n.series=n.series.concat(r.series))}else{r=function(e){for(var t=e.split(/\n+/g),i=qO(t.shift()),n=[],r=0;r<t.length;r++){var a,o=qO(t[r]).split(XO),s="",l=!1;isNaN(o[0])?(l=!0,s=o[0],o=o.slice(1),n[r]={name:s,value:[]},a=n[r].value):a=n[r]=[];for(var u=0;u<o.length;u++)a.push(+o[u]);1===a.length&&(l?n[r].value=a[0]:n[r]=a[0])}return{name:i,data:n}}(e);n.series.push(r)}})),n}function QO(e){this._dom=null,this.model=e}function JO(e,t){return we.map(e,(function(e,i){var n=t&&t[i];return we.isObject(n)&&!we.isArray(n)?(we.isObject(e)&&!we.isArray(e)&&(e=e.value),we.defaults({value:e},n)):e}))}QO.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:we.clone(UO.title),lang:we.clone(UO.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},QO.prototype.onclick=function(e,t){var i=t.getDom(),n=this.model;this._dom&&i.removeChild(this._dom);var r=document.createElement("div");r.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",r.style.backgroundColor=n.get("backgroundColor")||"#fff";var a=document.createElement("h4"),o=n.get("lang")||[];a.innerHTML=o[0]||n.get("title"),a.style.cssText="margin: 10px 20px;",a.style.color=n.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=n.get("optionToContent"),c=n.get("contentToOption"),h=function(e){var t,i,n=function(e){var t={},i=[],n=[];return e.eachRawSeries((function(e){var r=e.coordinateSystem;if(!r||"cartesian2d"!==r.type&&"polar"!==r.type)i.push(e);else{var a=r.getBaseAxis();if("category"===a.type){var o=a.dim+"_"+a.index;t[o]||(t[o]={categoryAxis:a,valueAxis:r.getOtherAxis(a),series:[]},n.push({axisDim:a.dim,axisIndex:a.index})),t[o].series.push(e)}else i.push(e)}})),{seriesGroupByCategoryAxis:t,other:i,meta:n}}(e);return{value:we.filter([(t=n.seriesGroupByCategoryAxis,i=[],we.each(t,(function(e,t){var n=e.categoryAxis,r=e.valueAxis.dim,a=[" "].concat(we.map(e.series,(function(e){return e.name}))),o=[n.model.getCategories()];we.each(e.series,(function(e){o.push(e.getRawData().mapArray(r,(function(e){return e})))}));for(var s=[a.join("\t")],l=0;l<o[0].length;l++){for(var u=[],c=0;c<o.length;c++)u.push(o[c][l]);s.push(u.join("\t"))}i.push(s.join("\n"))})),i.join("\n\n"+ZO+"\n\n")),YO(n.other)],(function(e){return e.replace(/[\n\t\s]/g,"")})).join("\n\n"+ZO+"\n\n"),meta:n.meta}}(e);if("function"==typeof u){var d=u(t.getOption());"string"==typeof d?s.innerHTML=d:we.isDom(d)&&s.appendChild(d)}else s.appendChild(l),l.readOnly=n.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=n.get("textColor"),l.style.borderColor=n.get("textareaBorderColor"),l.style.backgroundColor=n.get("textareaColor"),l.value=h.value;var p=h.meta,f=document.createElement("div");f.style.cssText="position:absolute;bottom:0;left:0;right:0;";var g="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),v=document.createElement("div");g+=";background-color:"+n.get("buttonColor"),g+=";color:"+n.get("buttonTextColor");var y=this;function x(){i.removeChild(r),y._dom=null}Je.addEventListener(m,"click",x),Je.addEventListener(v,"click",(function(){var e;try{e="function"==typeof c?c(s,t.getOption()):KO(l.value,p)}catch(e){throw x(),new Error("Data view format error "+e)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),x()})),m.innerHTML=o[1],v.innerHTML=o[2],v.style.cssText=g,m.style.cssText=g,!n.get("readOnly")&&f.appendChild(v),f.appendChild(m),r.appendChild(a),r.appendChild(s),r.appendChild(f),s.style.height=i.clientHeight-80+"px",i.appendChild(r),this._dom=r},QO.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},QO.prototype.dispose=function(e,t){this.remove(e,t)},kO.register("dataView",QO),ty.registerAction({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(e,t){var i=[];we.each(e.newOption.series,(function(e){var n=t.getSeriesByName(e.name)[0];if(n){var r=n.get("data");i.push({name:e.name,data:JO(e.data,r)})}else i.push(we.extend({type:"scatter"},e))})),t.mergeOption(we.defaults({series:i},e.newOption))}));var $O=we.each,eR=we.indexOf,tR=we.curry,iR=["dataToPoint","pointToData"],nR=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function rR(e,t,i){var n=this._targetInfoList=[],r={},a=sR(t,e);$O(lR,(function(e,t){(!i||!i.include||eR(i.include,t)>=0)&&e(a,n,r)}))}var aR=rR.prototype;function oR(e){return e[0]>e[1]&&e.reverse(),e}function sR(e,t){return xa.parseFinder(e,t,{includeMainTypes:nR})}aR.setOutputRanges=function(e,t){this.matchOutputRanges(e,t,(function(e,t,i){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var n=hR[e.brushType](0,i,t);e.__rangeOffset={offset:pR[e.brushType](n.values,e.range,[1,1]),xyMinMax:n.xyMinMax}}}))},aR.matchOutputRanges=function(e,t,i){$O(e,(function(e){var n=this.findTargetInfo(e,t);n&&!0!==n&&we.each(n.coordSyses,(function(n){var r=hR[e.brushType](1,n,e.range);i(e,r.values,n,t)}))}),this)},aR.setInputRanges=function(e,t){$O(e,(function(e){var i,n,r,a,o,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=hR[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?pR[e.brushType](l.values,u.offset,(i=l.xyMinMax,n=u.xyMinMax,r=gR(i),a=gR(n),o=[r[0]/a[0],r[1]/a[1]],isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o)):l.values}}),this)},aR.makePanelOpts=function(e,t){return we.map(this._targetInfoList,(function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:t&&t(i),clipPath:EC.makeRectPanelClipPath(n),isTargetByCursor:EC.makeRectIsTargetByCursor(n,e,i.coordSysModel),getLinearBrushOtherExtent:EC.makeLinearBrushOtherExtent(n)}}))},aR.controlSeries=function(e,t,i){var n=this.findTargetInfo(e,i);return!0===n||n&&eR(n.coordSyses,t.coordinateSystem)>=0},aR.findTargetInfo=function(e,t){for(var i=this._targetInfoList,n=sR(t,e),r=0;r<i.length;r++){var a=i[r],o=e.panelId;if(o){if(a.panelId===o)return a}else for(r=0;r<uR.length;r++)if(uR[r](n,a))return a}return!0};var lR={grid:function(e,t){var i=e.xAxisModels,n=e.yAxisModels,r=e.gridModels,a=we.createHashMap(),o={},s={};(i||n||r)&&($O(i,(function(e){var t=e.axis.grid.model;a.set(t.id,t),o[t.id]=!0})),$O(n,(function(e){var t=e.axis.grid.model;a.set(t.id,t),s[t.id]=!0})),$O(r,(function(e){a.set(e.id,e),o[e.id]=!0,s[e.id]=!0})),a.each((function(e){var r=e.coordinateSystem,a=[];$O(r.getCartesians(),(function(e,t){(eR(i,e.getAxis("x").model)>=0||eR(n,e.getAxis("y").model)>=0)&&a.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:a[0],coordSyses:a,getPanelRect:cR.grid,xAxisDeclared:o[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){$O(e.geoModels,(function(e){var i=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:i,coordSyses:[i],getPanelRect:cR.geo})}))}},uR=[function(e,t){var i=e.xAxisModel,n=e.yAxisModel,r=e.gridModel;return!r&&i&&(r=i.axis.grid.model),!r&&n&&(r=n.axis.grid.model),r&&r===t.gridModel},function(e,t){var i=e.geoModel;return i&&i===t.geoModel}],cR={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(ru.getTransform(e)),t}},hR={lineX:tR(dR,0),lineY:tR(dR,1),rect:function(e,t,i){var n=t[iR[e]]([i[0][0],i[1][0]]),r=t[iR[e]]([i[0][1],i[1][1]]),a=[oR([n[0],r[0]]),oR([n[1],r[1]])];return{values:a,xyMinMax:a}},polygon:function(e,t,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:we.map(i,(function(i){var r=t[iR[e]](i);return n[0][0]=Math.min(n[0][0],r[0]),n[1][0]=Math.min(n[1][0],r[1]),n[0][1]=Math.max(n[0][1],r[0]),n[1][1]=Math.max(n[1][1],r[1]),r})),xyMinMax:n}}};function dR(e,t,i,n){var r=i.getAxis(["x","y"][e]),a=oR(we.map([0,1],(function(e){return t?r.coordToData(r.toLocalCoord(n[e])):r.toGlobalCoord(r.dataToCoord(n[e]))}))),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}var pR={lineX:tR(fR,0),lineY:tR(fR,1),rect:function(e,t,i){return[[e[0][0]-i[0]*t[0][0],e[0][1]-i[0]*t[0][1]],[e[1][0]-i[1]*t[1][0],e[1][1]-i[1]*t[1][1]]]},polygon:function(e,t,i){return we.map(e,(function(e,n){return[e[0]-i[0]*t[n][0],e[1]-i[1]*t[n][1]]}))}};function fR(e,t,i,n){return[t[0]-n[e]*i[0],t[1]-n[e]*i[1]]}function gR(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var mR=rR,vR=we.each,yR="\0_ec_hist_store";function xR(e){var t=e[yR];return t||(t=e[yR]=[{}]),t}var _R={push:function(e,t){var i=xR(e);vR(t,(function(t,n){for(var r=i.length-1;r>=0;r--){if(i[r][n])break}if(r<0){var a=e.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(a){var o=a.getPercentRange();i[0][n]={dataZoomId:n,start:o[0],end:o[1]}}}})),i.push(t)},pop:function(e){var t=xR(e),i=t[t.length-1];t.length>1&&t.pop();var n={};return vR(i,(function(e,i){for(var r=t.length-1;r>=0;r--){if(e=t[r][i]){n[i]=e;break}}})),n},clear:function(e){e[yR]=null},count:function(e){return xR(e).length}};qu.registerSubTypeDefaulter("dataZoom",(function(){return"slider"}));var bR=["cartesian2d","polar","singleAxis"];function wR(e,t){e=e.slice();var i=we.map(e,Pu.capitalFirst);t=(t||[]).slice();var n=we.map(t,Pu.capitalFirst);return function(r,a){we.each(e,(function(e,o){for(var s={name:e,capital:i[o]},l=0;l<t.length;l++)s[t[l]]=e+n[l];r.call(a,s)}))}}var SR=wR(["x","y","z","radius","angle","single"],["axisIndex","axis","index","id"]);var MR={isCoordSupported:function(e){return we.indexOf(bR,e)>=0},createNameEach:wR,eachAxisDim:SR,createLinkedNodesFinder:function(e,t,i){return function(r){var a,o={nodes:[],records:{}};if(t((function(e){o.records[e.name]={}})),!r)return o;n(r,o);do{a=!1,e(s)}while(a);function s(e){!function(e,t){return we.indexOf(t.nodes,e)>=0}(e,o)&&function(e,n){var r=!1;return t((function(t){we.each(i(e,t)||[],(function(e){n.records[t.name][e]&&(r=!0)}))})),r}(e,o)&&(n(e,o),a=!0)}return o};function n(e,n){n.nodes.push(e),t((function(t){we.each(i(e,t)||[],(function(e){n.records[t.name][e]=!0}))}))}}},IR=we.each,TR=Su.asc,AR=function(e,t,i,n){this._dimName=e,this._axisIndex=t,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};function CR(e,t){var i=e.getAxisModel(),n=e._percentWindow,r=e._valueWindow;if(n){var a=Su.getPixelPrecision(r,[0,500]);a=Math.min(a,20);var o=t||0===n[0]&&100===n[1];i.setRange(o?null:+r[0].toFixed(a),o?null:+r[1].toFixed(a))}}AR.prototype={constructor:AR,hostedBy:function(e){return this._dataZoomModel===e},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var e=[],t=this.ecModel;return t.eachSeries((function(i){if(MR.isCoordSupported(i.get("coordinateSystem"))){var n=this._dimName,r=t.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(r&&r.componentIndex)&&e.push(i)}}),this),e},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var e,t,i,n=this._dimName,r=this.ecModel,a=this.getAxisModel();return"x"===n||"y"===n?(t="gridIndex",e="x"===n?"y":"x"):(t="polarIndex",e="angle"===n?"radius":"angle"),r.eachComponent(e+"Axis",(function(e){(e.get(t)||0)===(a.get(t)||0)&&(i=e)})),i},getMinMaxSpan:function(){return we.clone(this._minMaxSpan)},calculateDataWindow:function(e){var t,i=this._dataExtent,n=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),a=[0,100],o=[],s=[];IR(["start","end"],(function(l,u){var c=e[l],h=e[l+"Value"];"percent"===r[u]?(null==c&&(c=a[u]),h=n.parse(Su.linearMap(c,a,i))):(t=!0,h=null==h?i[u]:n.parse(h),c=Su.linearMap(h,i,a)),s[u]=h,o[u]=c})),TR(s),TR(o);var l=this._minMaxSpan;function u(e,t,i,r,a){var o=a?"Span":"ValueSpan";OA(0,e,i,"all",l["min"+o],l["max"+o]);for(var s=0;s<2;s++)t[s]=Su.linearMap(e[s],i,r,!0),a&&(t[s]=n.parse(t[s]))}return t?u(s,o,i,a,!1):u(o,s,a,i,!0),{valueWindow:s,percentWindow:o}},reset:function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,i){var n=[1/0,-1/0];IR(i,(function(e){var i=e.getData();i&&IR(i.mapDimension(t,!0),(function(e){var t=i.getApproximateExtent(e);t[0]<n[0]&&(n[0]=t[0]),t[1]>n[1]&&(n[1]=t[1])}))})),n[1]<n[0]&&(n=[NaN,NaN]);return function(e,t){var i=e.getAxisModel(),n=i.getMin(!0),r="category"===i.get("type"),a=r&&i.getCategories().length;null!=n&&"dataMin"!==n&&"function"!=typeof n?t[0]=n:r&&(t[0]=a>0?0:NaN);var o=i.getMax(!0);null!=o&&"dataMax"!==o&&"function"!=typeof o?t[1]=o:r&&(t[1]=a>0?a-1:NaN);i.get("scale",!0)||(t[0]>0&&(t[0]=0),t[1]<0&&(t[1]=0))}(e,n),n}(this,this._dimName,t),function(e){var t=e._minMaxSpan={},i=e._dataZoomModel,n=e._dataExtent;IR(["min","max"],(function(r){var a=i.get(r+"Span"),o=i.get(r+"ValueSpan");null!=o&&(o=e.getAxisModel().axis.scale.parse(o)),null!=o?a=Su.linearMap(n[0]+o,n,[0,100],!0):null!=a&&(o=Su.linearMap(a,[0,100],n,!0)-n[0]),t[r+"Span"]=a,t[r+"ValueSpan"]=o}))}(this);var i=this.calculateDataWindow(e.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,CR(this)}},restore:function(e){e===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,CR(this,!0))},filterData:function(e,t){if(e===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),r=e.get("filterMode"),a=this._valueWindow;"none"!==r&&IR(n,(function(e){var t=e.getData(),n=t.mapDimension(i,!0);n.length&&("weakFilter"===r?t.filterSelf((function(e){for(var i,r,o,s=0;s<n.length;s++){var l=t.get(n[s],e),u=!isNaN(l),c=l<a[0],h=l>a[1];if(u&&!c&&!h)return!0;u&&(o=!0),c&&(i=!0),h&&(r=!0)}return o&&i&&r})):IR(n,(function(i){if("empty"===r)e.setData(t=t.map(i,(function(e){return function(e){return e>=a[0]&&e<=a[1]}(e)?e:NaN})));else{var n={};n[i]=a,t.selectRange(n)}})),IR(n,(function(e){t.setApproximateExtent(a,e)})))}))}}};var DR=AR,LR=we.each,PR=MR.eachAxisDim;function kR(e){var t={};return LR(["start","end","startValue","endValue","throttle"],(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}function OR(e,t){var i=e._rangePropMode,n=e.get("rangeMode");LR([["start","startValue"],["end","endValue"]],(function(e,r){var a=null!=t[e[0]],o=null!=t[e[1]];a&&!o?i[r]="percent":!a&&o?i[r]="value":n?i[r]=n[r]:a&&(i[r]="percent")}))}var RR=ty.extendComponentModel({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(e,t,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=kR(e);this.settledOption=n,this.mergeDefaultAndTheme(e,i),this.doInit(n)},mergeOption:function(e){var t=kR(e);we.merge(this.option,e,!0),we.merge(this.settledOption,t,!0),this.doInit(t)},doInit:function(e){var t=this.option;J.canvasSupported||(t.realtime=!1),this._setDefaultThrottle(e),OR(this,e);var i=this.settledOption;LR([["start","startValue"],["end","endValue"]],(function(e,n){"value"===this._rangePropMode[n]&&(t[e[0]]=i[e[0]]=null)}),this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var e=this._axisProxies;this.eachTargetAxis((function(t,i,n,r){var a=this.dependentModels[t.axis][i],o=a.__dzAxisProxy||(a.__dzAxisProxy=new DR(t.name,i,this,r));e[t.name+"_"+i]=o}),this)},_resetTarget:function(){var e=this.option,t=this._judgeAutoMode();PR((function(t){var i=t.axisIndex;e[i]=xa.normalizeToArray(e[i])}),this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,t=!1;PR((function(i){null!=e[i.axisIndex]&&(t=!0)}),this);var i=e.orient;return null==i&&t?"orient":t?void 0:(null==i&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var e=!0,t=this.get("orient",!0),i=this.option,n=this.dependentModels;if(e){var r="vertical"===t?"y":"x";n[r+"Axis"].length?(i[r+"AxisIndex"]=[0],e=!1):LR(n.singleAxis,(function(n){e&&n.get("orient",!0)===t&&(i.singleAxisIndex=[n.componentIndex],e=!1)}))}e&&PR((function(t){if(e){var n=[],r=this.dependentModels[t.axis];if(r.length&&!n.length)for(var a=0,o=r.length;a<o;a++)"category"===r[a].get("type")&&n.push(a);i[t.axisIndex]=n,n.length&&(e=!1)}}),this),e&&this.ecModel.eachSeries((function(e){this._isSeriesHasAllAxesTypeOf(e,"value")&&PR((function(t){var n=i[t.axisIndex],r=e.get(t.axisIndex),a=e.get(t.axisId);r=e.ecModel.queryComponents({mainType:t.axis,index:r,id:a})[0].componentIndex,we.indexOf(n,r)<0&&n.push(r)}))}),this)},_autoSetOrient:function(){var e;this.eachTargetAxis((function(t){!e&&(e=t.name)}),this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(e,t){var i=!0;return PR((function(n){var r=e.get(n.axisIndex),a=this.dependentModels[n.axis][r];a&&a.get("type")===t||(i=!1)}),this),i},_setDefaultThrottle:function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var e;return PR((function(t){if(null==e){var i=this.get(t.axisIndex);i.length&&(e=this.dependentModels[t.axis][i[0]])}}),this),e},eachTargetAxis:function(e,t){var i=this.ecModel;PR((function(n){LR(this.get(n.axisIndex),(function(r){e.call(t,n,r,this,i)}),this)}),this)},getAxisProxy:function(e,t){return this._axisProxies[e+"_"+t]},getAxisModel:function(e,t){var i=this.getAxisProxy(e,t);return i&&i.getAxisModel()},setRawRange:function(e){var t=this.option,i=this.settledOption;LR([["start","startValue"],["end","endValue"]],(function(n){null==e[n[0]]&&null==e[n[1]]||(t[n[0]]=i[n[0]]=e[n[0]],t[n[1]]=i[n[1]]=e[n[1]])}),this),OR(this,e)},setCalculatedRange:function(e){var t=this.option;LR(["start","startValue","end","endValue"],(function(i){t[i]=e[i]}))},getPercentRange:function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},getValueRange:function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(e){if(e)return e.__dzAxisProxy;var t=this._axisProxies;for(var i in t)if(t.hasOwnProperty(i)&&t[i].hostedBy(this))return t[i];for(var i in t)if(t.hasOwnProperty(i)&&!t[i].hostedBy(this))return t[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),NR=Fd.extend({type:"dataZoom",render:function(e,t,i,n){this.dataZoomModel=e,this.ecModel=t,this.api=i},getTargetCoordInfo:function(){var e=this.dataZoomModel,t=this.ecModel,i={};return e.eachTargetAxis((function(e,n){var r=t.getComponent(e.axis,n);if(r){var a=r.getCoordSysModel();a&&function(e,t,i,n){for(var r,a=0;a<i.length;a++)if(i[a].model===e){r=i[a];break}r||i.push(r={model:e,axisModels:[],coordIndex:n});r.axisModels.push(t)}(a,r,i[a.mainType]||(i[a.mainType]=[]),a.componentIndex)}}),this),i}}),ER=(RR.extend({type:"dataZoom.select"}),NR.extend({type:"dataZoom.select"}),we.createHashMap),zR=we.each;ty.registerProcessor({getTargetSeries:function(e){var t=ER();return e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(e,i,n){var r=n.getAxisProxy(e.name,i);zR(r.getTargetSeriesModels(),(function(e){t.set(e.uid,e)}))}))})),t},modifyOutputEnd:!0,overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(e,i,n){n.getAxisProxy(e.name,i).reset(n,t)})),e.eachTargetAxis((function(e,i,n){n.getAxisProxy(e.name,i).filterData(n,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy(),i=t.getDataPercentWindow(),n=t.getDataValueWindow();e.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})}))}}),ty.registerAction("dataZoom",(function(e,t){var i=MR.createLinkedNodesFinder(we.bind(t.eachComponent,t,"dataZoom"),MR.eachAxisDim,(function(e,t){return e.get(t.axisIndex)})),n=[];t.eachComponent({mainType:"dataZoom",query:e},(function(e,t){n.push.apply(n,i(e).nodes)})),we.each(n,(function(t,i){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}));var BR=sp.toolbox.dataZoom,VR=we.each;function FR(e,t,i){(this._brushController=new OC(i.getZr())).on("brush",we.bind(this._onBrush,this)).mount(),this._isZoomActive}FR.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:we.clone(BR.title)};var GR=FR.prototype;GR.render=function(e,t,i,n){this.model=e,this.ecModel=t,this.api=i,function(e,t,i,n,r){var a=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(a="dataZoomSelect"===n.key&&n.dataZoomSelectActive);i._isZoomActive=a,e.setIconStatus("zoom",a?"emphasis":"normal");var o=new mR(WR(e.option),t,{include:["grid"]});i._brushController.setPanels(o.makePanelOpts(r,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}))).enableBrush(!!a&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(e,t,this,n,i),function(e,t){e.setIconStatus("back",_R.count(t)>1?"emphasis":"normal")}(e,t)},GR.onclick=function(e,t,i){HR[i].call(this)},GR.remove=function(e,t){this._brushController.unmount()},GR.dispose=function(e,t){this._brushController.dispose()};var HR={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(_R.pop(this.ecModel))}};function WR(e){var t={};return we.each(["xAxisIndex","yAxisIndex"],(function(i){t[i]=e[i],null==t[i]&&(t[i]="all"),(!1===t[i]||"none"===t[i])&&(t[i]=[])})),t}GR._onBrush=function(e,t){if(t.isEnd&&e.length){var i={},n=this.ecModel;this._brushController.updateCovers([]),new mR(WR(this.model.option),n,{include:["grid"]}).matchOutputRanges(e,n,(function(e,t,i){if("cartesian2d"===i.type){var n=e.brushType;"rect"===n?(r("x",i,t[0]),r("y",i,t[1])):r({lineX:"x",lineY:"y"}[n],i,t)}})),_R.push(n,i),this._dispatchZoomAction(i)}function r(e,t,r){var a=t.getAxis(e),o=a.model,s=function(e,t,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},(function(i){i.getAxisModel(e,t.componentIndex)&&(n=i)})),n}(e,o,n),l=s.findRepresentativeAxisProxy(o).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=OA(0,r.slice(),a.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(i[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},GR._dispatchZoomAction=function(e){var t=[];VR(e,(function(e,i){t.push(we.clone(e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},kO.register("dataZoom",FR),ty.registerPreprocessor((function(e){if(e){var t=e.dataZoom||(e.dataZoom=[]);we.isArray(t)||(e.dataZoom=t=[t]);var i=e.toolbox;if(i&&(we.isArray(i)&&(i=i[0]),i&&i.feature)){var n=i.feature.dataZoom;r("xAxis",n),r("yAxis",n)}}function r(i,n){if(n){var r=i+"Index",a=n[r];null==a||"all"===a||we.isArray(a)||(a=!1===a||"none"===a?[]:[a]),function(t,i){var n=e[t];we.isArray(n)||(n=n?[n]:[]);VR(n,i)}(i,(function(e,o){if(null==a||"all"===a||-1!==we.indexOf(a,o)){var s={type:"select",$fromToolbox:!0,filterMode:n.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+i+o};s[r]=o,t.push(s)}}))}}}));var jR=sp.toolbox.restore;function UR(e){this.model=e}UR.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:jR.title},UR.prototype.onclick=function(e,t,i){_R.clear(e),t.dispatchAction({type:"restore",from:this.uid})},kO.register("restore",UR),ty.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(e,t){t.resetOption("recreate")}));ty.extendComponentModel({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var ZR=we.each,YR=Pu.toCamelCase,qR=["","-webkit-","-moz-","-o-"];function XR(e){var t,i,n=[],r=e.get("transitionDuration"),a=e.get("backgroundColor"),o=e.getModel("textStyle"),s=e.get("padding");return r&&n.push((i="left "+(t=r)+"s cubic-bezier(0.23, 1, 0.32, 1),top "+t+"s cubic-bezier(0.23, 1, 0.32, 1)",we.map(qR,(function(e){return e+"transition:"+i})).join(";"))),a&&(J.canvasSupported?n.push("background-Color:"+a):(n.push("background-Color:#"+Kt.toHex(a)),n.push("filter:alpha(opacity=70)"))),ZR(["width","color","radius"],(function(t){var i="border-"+t,r=YR(i),a=e.get(r);null!=a&&n.push(i+":"+a+("color"===t?"":"px"))})),n.push(function(e){var t=[],i=e.get("fontSize"),n=e.getTextColor();return n&&t.push("color:"+n),t.push("font:"+e.getFont()),i&&t.push("line-height:"+Math.round(3*i/2)+"px"),ZR(["decoration","align"],(function(i){var n=e.get(i);n&&t.push("text-"+i+":"+n)})),t.join(";")}(o)),null!=s&&n.push("padding:"+Pu.normalizeCssArray(s).join("px ")+"px"),n.join(";")+";"}function KR(e,t,i,n,r){var a=t&&t.painter;if(i){var o=a&&a.getViewportRoot();o&&He.transformLocalCoord(e,o,document.body,n,r)}else{e[0]=n,e[1]=r;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}}function QR(e,t,i){if(J.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var r=this._zr=t.getZr(),a=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0],KR(this._styleCoord,r,a,t.getWidth()/2,t.getHeight()/2),a?document.body.appendChild(n):e.appendChild(n),this._container=e,this._show=!1,this._hideTimeout;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!o._enterable){var t=r.handler,i=r.painter.getViewportRoot();Je.normalizeEvent(i,e,!0),t.dispatch("mousemove",e)}},n.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}QR.prototype={constructor:QR,_enterable:!0,update:function(){var e=this._container,t=e.currentStyle||document.defaultView.getComputedStyle(e),i=e.style;"absolute"!==i.position&&"absolute"!==t.position&&(i.position="relative")},show:function(e){clearTimeout(this._hideTimeout);var t=this.el,i=this._styleCoord;t.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+XR(e)+";left:"+i[0]+"px;top:"+i[1]+"px;"+(e.get("extraCssText")||""),t.style.display=t.innerHTML?"block":"none",t.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(e){this.el.innerHTML=null==e?"":e},setEnterable:function(e){this._enterable=e},getSize:function(){var e=this.el;return[e.clientWidth,e.clientHeight]},moveTo:function(e,t){var i=this._styleCoord;KR(i,this._zr,this._appendToBody,e,t);var n=this.el.style;n.left=i[0]+"px",n.top=i[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(e){!this._show||this._inContent&&this._enterable||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(we.bind(this.hide,this),e)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var e=this.el.clientWidth,t=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(e+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),t+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:e,height:t}}};var JR=QR;function $R(e){this._zr=e.getZr(),this._show=!1,this._hideTimeout}$R.prototype={constructor:$R,_enterable:!0,update:function(){},show:function(e){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(e,t,i){this.el&&this._zr.remove(this.el);for(var n={},r=e,a=r.indexOf("{marker");a>=0;){var o=r.indexOf("|}"),s=r.substr(a+"{marker".length,o-a-"{marker".length);s.indexOf("sub")>-1?n["marker"+s]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:t[s],textOffset:[3,0]}:n["marker"+s]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:t[s]},a=(r=r.substr(o+1)).indexOf("{marker")}this.el=new ls({style:{rich:n,text:e,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var l=this;this.el.on("mouseover",(function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0})),this.el.on("mouseout",(function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1}))},setEnterable:function(e){this._enterable=e},getSize:function(){var e=this.el.getBoundingRect();return[e.width,e.height]},moveTo:function(e,t){this.el&&this.el.attr("position",[e,t])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(e){!this._show||this._inContent&&this._enterable||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(we.bind(this.hide,this),e)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var e=this.getSize();return{width:e[0],height:e[1]}}};var eN=$R,tN=xa.getTooltipRenderMode,iN=we.bind,nN=we.each,rN=Su.parsePercent,aN=new ru.Rect({shape:{x:-1,y:-1,width:2,height:2}});ty.extendComponentView({type:"tooltip",init:function(e,t){if(!J.node){var i,n=e.getComponent("tooltip"),r=n.get("renderMode");this._renderMode=tN(r),"html"===this._renderMode?(i=new JR(t.getDom(),t,{appendToBody:n.get("appendToBody",!0)}),this._newLine="<br/>"):(i=new eN(t),this._newLine="\n"),this._tooltipContent=i}},render:function(e,t,i){if(!J.node){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=e.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var e=this._tooltipModel.get("triggerOn");vP.register("itemTooltip",this._api,iN((function(t,i,n){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(i,n):"leave"===t&&this._hide(n))}),this))},_keepShow:function(){var e=this._tooltipModel,t=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==e.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!i.isDisposed()&&n.manuallyShowTip(e,t,i,{x:n._lastX,y:n._lastY})}))}},manuallyShowTip:function(e,t,i,n){if(n.from!==this.uid&&!J.node){var r=sN(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var o=aN;o.position=[n.x,n.y],o.update(),o.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:o},r)}else if(a)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},r);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(e,t,i,n))return;var s=iP(n,t),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el},r)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},r))}},manuallyHideTip:function(e,t,i,n){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(sN(n,i))},_manuallyAxisShowTip:function(e,t,i,n){var r=n.seriesIndex,a=n.dataIndex,o=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=t.getSeriesByIndex(r);if(s)if("axis"===(e=oN([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,e])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:n.position}),!0}},_tryShow:function(e,t){var i=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var n=e.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,e):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(e,i,t)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(e,i,t)):(this._lastDataByCoordSys=null,this._hide(t))}},_showOrMove:function(e,t){var i=e.get("showDelay");t=we.bind(t,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(t,i):t()},_showAxisTooltip:function(e,t){var i=this._ecModel,n=this._tooltipModel,r=[t.offsetX,t.offsetY],a=[],o=[],s=oN([t.tooltipOption,n]),l=this._renderMode,u=this._newLine,c={};nN(e,(function(e){nN(e.dataByAxis,(function(e){var t=i.getComponent(e.axisDim+"Axis",e.axisIndex),n=e.value,r=[];if(t&&null!=n){var s=PP.getValueLabel(n,t.axis,i,e.seriesDataIndices,e.valueLabelOpt);we.each(e.seriesDataIndices,(function(a){var u=i.getSeriesByIndex(a.seriesIndex),h=a.dataIndexInside,d=u&&u.getDataParams(h);if(d.axisDim=e.axisDim,d.axisIndex=e.axisIndex,d.axisType=e.axisType,d.axisId=e.axisId,d.axisValue=jm.getAxisRawValue(t.axis,n),d.axisValueLabel=s,d){o.push(d);var p,f=u.formatTooltip(h,!0,null,l);if(we.isObject(f)){p=f.html;var g=f.markers;we.merge(c,g)}else p=f;r.push(p)}}));var h=s;"html"!==l?a.push(r.join(u)):a.push((h?Pu.encodeHTML(h)+u:"")+r.join(u))}}))}),this),a.reverse(),a=a.join(this._newLine+this._newLine);var h=t.position;this._showOrMove(s,(function(){this._updateContentNotChangedOnAxis(e)?this._updatePosition(s,h,r[0],r[1],this._tooltipContent,o):this._showTooltipContent(s,a,o,Math.random(),r[0],r[1],h,void 0,c)}))},_showSeriesItemTooltip:function(e,t,i){var n=this._ecModel,r=t.seriesIndex,a=n.getSeriesByIndex(r),o=t.dataModel||a,s=t.dataIndex,l=t.dataType,u=o.getData(l),c=oN([u.getItemModel(s),o,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),h=c.get("trigger");if(null==h||"item"===h){var d,p,f=o.getDataParams(s,l),g=o.formatTooltip(s,!1,l,this._renderMode);we.isObject(g)?(d=g.html,p=g.markers):(d=g,p=null);var m="item_"+o.name+"_"+s;this._showOrMove(c,(function(){this._showTooltipContent(c,d,f,m,e.offsetX,e.offsetY,e.position,e.target,p)})),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(e,t,i){var n=t.tooltip;if("string"==typeof n){n={content:n,formatter:n}}var r=new vu(n,this._tooltipModel,this._ecModel),a=r.get("content"),o=Math.random();this._showOrMove(r,(function(){this._showTooltipContent(r,a,r.get("formatterParams")||{},o,e.offsetX,e.offsetY,e.position,t)})),i({type:"showTip",from:this.uid})},_showTooltipContent:function(e,t,i,n,r,a,o,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent,c=e.get("formatter");o=o||e.get("position");var h=t;if(c&&"string"==typeof c)h=Pu.formatTpl(c,i,!0);else if("function"==typeof c){var d=iN((function(t,n){t===this._ticket&&(u.setContent(n,l,e),this._updatePosition(e,o,r,a,u,i,s))}),this);this._ticket=n,h=c(i,n,d)}u.setContent(h,l,e),u.show(e),this._updatePosition(e,o,r,a,u,i,s)}},_updatePosition:function(e,t,i,n,r,a,o){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=r.getSize(),c=e.get("align"),h=e.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof t&&(t=t([i,n],a,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),we.isArray(t))i=rN(t[0],s),n=rN(t[1],l);else if(we.isObject(t)){t.width=u[0],t.height=u[1];var p=Hu.getLayoutRect(t,{width:s,height:l});i=p.x,n=p.y,c=null,h=null}else if("string"==typeof t&&o){var f=function(e,t,i){var n=i[0],r=i[1],a=0,o=0,s=t.width,l=t.height;switch(e){case"inside":a=t.x+s/2-n/2,o=t.y+l/2-r/2;break;case"top":a=t.x+s/2-n/2,o=t.y-r-5;break;case"bottom":a=t.x+s/2-n/2,o=t.y+l+5;break;case"left":a=t.x-n-5,o=t.y+l/2-r/2;break;case"right":a=t.x+s+5,o=t.y+l/2-r/2}return[a,o]}(t,d,u);i=f[0],n=f[1]}else{f=function(e,t,i,n,r,a,o){var s=i.getOuterSize(),l=s.width,u=s.height;null!=a&&(e+l+a>n?e-=l+a:e+=a);null!=o&&(t+u+o>r?t-=u+o:t+=o);return[e,t]}(i,n,r,s,l,c?null:20,h?null:20);i=f[0],n=f[1]}if(c&&(i-=lN(c)?u[0]/2:"right"===c?u[0]:0),h&&(n-=lN(h)?u[1]/2:"bottom"===h?u[1]:0),e.get("confine")){f=function(e,t,i,n,r){var a=i.getOuterSize(),o=a.width,s=a.height;return e=Math.min(e+o,n)-o,t=Math.min(t+s,r)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(i,n,r,s,l);i=f[0],n=f[1]}r.moveTo(i,n)},_updateContentNotChangedOnAxis:function(e){var t=this._lastDataByCoordSys,i=!!t&&t.length===e.length;return i&&nN(t,(function(t,n){var r=t.dataByAxis||{},a=(e[n]||{}).dataByAxis||[];(i&=r.length===a.length)&&nN(r,(function(e,t){var n=a[t]||{},r=e.seriesDataIndices||[],o=n.seriesDataIndices||[];(i&=e.value===n.value&&e.axisType===n.axisType&&e.axisId===n.axisId&&r.length===o.length)&&nN(r,(function(e,t){var n=o[t];i&=e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}))}))})),this._lastDataByCoordSys=e,!!i},_hide:function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},dispose:function(e,t){J.node||(this._tooltipContent.dispose(),vP.unregister("itemTooltip",t))}});function oN(e){for(var t=e.pop();e.length;){var i=e.pop();i&&(vu.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),t=new vu(i,t,t.ecModel))}return t}function sN(e,t){return e.dispatchAction||we.bind(t.dispatchAction,t)}function lN(e){return"center"===e||"middle"===e}ty.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),ty.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var uN=["rect","polygon","keep","clear"];var cN=function(e,t){var i=e&&e.brush;if(we.isArray(i)||(i=i?[i]:[]),i.length){var n=[];we.each(i,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(n=n.concat(t))}));var r=e&&e.toolbox;we.isArray(r)&&(r=r[0]),r||(r={feature:{}},e.toolbox=[r]);var a=r.feature||(r.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),function(e){var t={};we.each(e,(function(e){t[e]=1})),e.length=0,we.each(t,(function(t,i){e.push(i)}))}(s),t&&!s.length&&s.push.apply(s,uN)}},hN=we.each;function dN(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}var pN={createVisualMappings:function(e,t,i){var n={};return hN(t,(function(t){var r,a=n[t]=((r=function(){}).prototype.__hidden=r.prototype,new r);hN(e[t],(function(e,n){if(jI.isValidType(n)){var r={type:n,visual:e};i&&i(r,t),a[n]=new jI(r),"opacity"===n&&((r=we.clone(r)).type="colorAlpha",a.__hidden.__alphaForOpacity=new jI(r))}}))})),n},replaceVisualOption:function(e,t,i){var n;we.each(i,(function(e){t.hasOwnProperty(e)&&dN(t[e])&&(n=!0)})),n&&we.each(i,(function(i){t.hasOwnProperty(i)&&dN(t[i])?e[i]=we.clone(t[i]):delete e[i]}))},applyVisual:function(e,t,i,n,r,a){var o,s={};function l(e){return i.getItemVisual(o,e)}function u(e,t){i.setItemVisual(o,e,t)}function c(e,c){o=null==a?e:c;var h=i.getRawDataItem(o);if(!h||!1!==h.visualMap)for(var d=n.call(r,e),p=t[d],f=s[d],g=0,m=f.length;g<m;g++){var v=f[g];p[v]&&p[v].applyVisual(e,l,u)}}we.each(e,(function(e){var i=jI.prepareVisualTypes(t[e]);s[e]=i})),null==a?i.each(c):i.each([a],c)},incrementalApplyVisual:function(e,t,i,n){var r={};return we.each(e,(function(e){var i=jI.prepareVisualTypes(t[e]);r[e]=i})),{progress:function(e,a){function o(e){return a.getItemVisual(l,e)}function s(e,t){a.setItemVisual(l,e,t)}var l;for(null!=n&&(n=a.getDimension(n));null!=(l=e.next());){var u=a.getRawDataItem(l);if(!u||!1!==u.visualMap)for(var c=null!=n?a.get(n,l,!0):l,h=i(c),d=t[h],p=r[h],f=0,g=p.length;f<g;f++){var m=p[f];d[m]&&d[m].applyVisual(c,o,s)}}}}}},fN=ru.linePolygonIntersect;function gN(e){var t=["x","y"],i=["width","height"];return{point:function(t,i,n){if(t){var r=n.range;return mN(t[e],r)}},rect:function(n,r,a){if(n){var o=a.range,s=[n[t[e]],n[t[e]]+n[i[e]]];return s[1]<s[0]&&s.reverse(),mN(s[0],o)||mN(s[1],o)||mN(o[0],s)||mN(o[1],s)}}}}function mN(e,t){return t[0]<=e&&e<=t[1]}var vN={lineX:gN(0),lineY:gN(1),rect:{point:function(e,t,i){return e&&i.boundingRect.contain(e[0],e[1])},rect:function(e,t,i){return e&&i.boundingRect.intersect(e)}},polygon:{point:function(e,t,i){return e&&i.boundingRect.contain(e[0],e[1])&&uv.contain(i.range,e[0],e[1])},rect:function(e,t,i){var n=i.range;if(!e||n.length<=1)return!1;var r=e.x,a=e.y,o=e.width,s=e.height,l=n[0];return!!(uv.contain(n,r,a)||uv.contain(n,r+o,a)||uv.contain(n,r,a+s)||uv.contain(n,r+o,a+s)||Ni.create(e).contain(l[0],l[1])||fN(r,a,r+o,a,n)||fN(r,a,r,a+s,n)||fN(r+o,a,r+o,a+s,n)||fN(r,a+s,r+o,a+s,n))||void 0}}},yN=["inBrush","outOfBrush"],xN=ty.PRIORITY.VISUAL.BRUSH;function _N(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new mR(t.option,e)).setInputRanges(t.areas,e)}))}function bN(e,t){if(!e.isDisposed()){var i=e.getZr();i.__ecInBrushSelectEvent=!0,e.dispatchAction({type:"brushSelect",batch:t}),i.__ecInBrushSelectEvent=!1}}function wN(e,t,i,n){for(var r=0,a=t.length;r<a;r++){var o=t[r];if(e[o.brushType](n,i,o.selectors,o))return!0}}function SN(e){var t=e.brushSelector;if(we.isString(t)){var i=[];return we.each(vN,(function(e,n){i[n]=function(i,n,r,a){var o=n.getItemLayout(i);return e[t](o,r,a)}})),i}if(we.isFunction(t)){var n={};return we.each(vN,(function(e,i){n[i]=t})),n}return t}ty.registerLayout(xN,(function(e,t,i){e.eachComponent({mainType:"brush"},(function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})})),_N(e)})),ty.registerVisual(xN,(function(e,t,i){var n,r,a=[];e.eachComponent({mainType:"brush"},(function(t,i){var o={brushId:t.id,brushIndex:i,brushName:t.name,areas:we.clone(t.areas),selected:[]};a.push(o);var s=t.option,l=s.brushLink,u=[],c=[],h=[],d=0;i||(n=s.throttleType,r=s.throttleDelay);var p=we.map(t.areas,(function(e){return function(e){var t=e.selectors={};return we.each(vN[e.brushType],(function(i,n){t[n]=function(n){return i(n,t,e)}})),e}(we.defaults({boundingRect:MN[e.brushType](e)},e))})),f=pN.createVisualMappings(t.option,yN,(function(e){e.mappingMethod="fixed"}));function g(e){return"all"===l||u[e]}function m(e){return!!e.length}we.isArray(l)&&we.each(l,(function(e){u[e]=1})),e.eachSeries((function(i,n){var r=h[n]=[];"parallel"===i.subType?function(e,t){var i=e.coordinateSystem;d|=i.hasAxisBrushed(),g(t)&&i.eachActiveState(e.getData(),(function(e,t){"active"===e&&(c[t]=1)}))}(i,n):function(i,n,r){var a=SN(i);if(!a||function(e,t){var i=e.option.seriesIndex;return null!=i&&"all"!==i&&(we.isArray(i)?we.indexOf(i,t)<0:t!==i)}(t,n))return;if(we.each(p,(function(n){a[n.brushType]&&t.brushTargetManager.controlSeries(n,i,e)&&r.push(n),d|=m(r)})),g(n)&&m(r)){var o=i.getData();o.each((function(e){wN(a,r,o,e)&&(c[e]=1)}))}}(i,n,r)})),e.eachSeries((function(e,t){var i={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};o.selected.push(i);var n=SN(e),r=h[t],a=e.getData(),s=g(t)?function(e){return c[e]?(i.dataIndex.push(a.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(e){return wN(n,r,a,e)?(i.dataIndex.push(a.getRawIndex(e)),"inBrush"):"outOfBrush"};(g(t)?d:m(r))&&pN.applyVisual(yN,f,a,s)}))})),function(e,t,i,n,r){if(!r)return;var a=e.getZr();if(a.__ecInBrushSelectEvent)return;a.__ecBrushSelect||(a.__ecBrushSelect=bN);rp.createOrUpdate(a,"__ecBrushSelect",i,t)(e,n)}(t,n,r,a,i)}));var MN={lineX:we.noop,lineY:we.noop,rect:function(e){return IN(e.range)},polygon:function(e){for(var t,i=e.range,n=0,r=i.length;n<r;n++){t=t||[[1/0,-1/0],[1/0,-1/0]];var a=i[n];a[0]<t[0][0]&&(t[0][0]=a[0]),a[0]>t[0][1]&&(t[0][1]=a[0]),a[1]<t[1][0]&&(t[1][0]=a[1]),a[1]>t[1][1]&&(t[1][1]=a[1])}return t&&IN(t)}};function IN(e){return new Ni(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var TN={layoutCovers:_N},AN=["#ddd"];ty.extendComponentModel({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(e,t){var i=this.option;!t&&pN.replaceVisualOption(i,e,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:AN},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(e){e&&(this.areas=we.map(e,(function(e){return CN(this.option,e)}),this))},setBrushOption:function(e){this.brushOption=CN(this.option,e),this.brushType=this.brushOption.brushType}});function CN(e,t){return we.merge({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new vu(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}var DN=TN.layoutCovers;ty.extendComponentView({type:"brush",init:function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new OC(t.getZr())).on("brush",we.bind(this._onBrush,this)).mount()},render:function(e){return this.model=e,LN.apply(this,arguments)},updateTransform:function(e,t){return DN(t),LN.apply(this,arguments)},updateView:LN,dispose:function(){this._brushController.dispose()},_onBrush:function(e,t){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(e,this.ecModel),(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:we.clone(e),$from:i}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:we.clone(e),$from:i})}});function LN(e,t,i,n){(!n||n.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(i)).enableBrush(e.brushOption).updateCovers(e.areas.slice())}ty.registerAction({type:"brush",event:"brush"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),ty.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},(function(){})),ty.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},(function(){}));var PN=sp.toolbox.brush;function kN(e,t,i){this.model=e,this.ecModel=t,this.api=i,this._brushType,this._brushMode}kN.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:we.clone(PN.title)};var ON=kN.prototype;ON.render=ON.updateView=function(e,t,i){var n,r,a;t.eachComponent({mainType:"brush"},(function(e){n=e.brushType,r=e.brushOption.brushMode||"single",a|=e.areas.length})),this._brushType=n,this._brushMode=r,we.each(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===r:"clear"===t?a:t===n)?"emphasis":"normal")}))},ON.getIcons=function(){var e=this.model,t=e.get("icon",!0),i={};return we.each(e.get("type",!0),(function(e){t[e]&&(i[e]=t[e])})),i},ON.onclick=function(e,t,i){var n=this._brushType,r=this._brushMode;"clear"===i?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===r?"single":"multiple":r}})},kO.register("brush",kN),ty.registerPreprocessor(cN);var RN=Hu.getLayoutRect,NN=Pu.windowOpen;function EN(e){var t=e.itemStyle||(e.itemStyle={}),i=t.emphasis||(t.emphasis={}),n=e.label||e.label||{},r=n.normal||(n.normal={}),a={normal:1,emphasis:1};we.each(n,(function(e,t){a[t]||zN(r,t)||(r[t]=e)})),i.label&&!zN(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function zN(e,t){return e.hasOwnProperty(t)}ty.extendComponentModel({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),ty.extendComponentView({type:"title",render:function(e,t,i){if(this.group.removeAll(),e.get("show")){var n=this.group,r=e.getModel("textStyle"),a=e.getModel("subtextStyle"),o=e.get("textAlign"),s=we.retrieve2(e.get("textBaseline"),e.get("textVerticalAlign")),l=new ru.Text({style:ru.setTextStyle({},r,{text:e.get("text"),textFill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),h=new ru.Text({style:ru.setTextStyle({},a,{text:c,textFill:a.getTextColor(),y:u.height+e.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!d&&!f,h.silent=!p&&!f,d&&l.on("click",(function(){NN(d,"_"+e.get("target"))})),p&&h.on("click",(function(){NN(d,"_"+e.get("subtarget"))})),l.eventData=h.eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,n.add(l),c&&n.add(h);var g=n.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=RN(m,{width:i.getWidth(),height:i.getHeight()},e.get("padding"));o||("middle"===(o=e.get("left")||e.get("right"))&&(o="center"),"right"===o?v.x+=v.width:"center"===o&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:o,textVerticalAlign:s};l.setStyle(y),h.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=e.getItemStyle(["color","opacity"]);_.fill=e.get("backgroundColor");var b=new ru.Rect({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(b)}}});var BN=function(e){var t=e&&e.timeline;we.isArray(t)||(t=t?[t]:[]),we.each(t,(function(e){e&&function(e){var t=e.type,i={number:"value",time:"time"};i[t]&&(e.axisType=i[t],delete e.type);if(EN(e),zN(e,"controlPosition")){var n=e.controlStyle||(e.controlStyle={});zN(n,"position")||(n.position=e.controlPosition),"none"!==n.position||zN(n,"show")||(n.show=!1,delete n.position),delete e.controlPosition}we.each(e.data||[],(function(e){we.isObject(e)&&!we.isArray(e)&&(!zN(e,"value")&&zN(e,"name")&&(e.value=e.name),EN(e))}))}(e)}))};qu.registerSubTypeDefaulter("timeline",(function(){return"slider"})),ty.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(e,t){var i=t.getComponent("timeline");return i&&null!=e.currentIndex&&(i.setCurrentIndex(e.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),t.resetOption("timeline"),we.defaults({currentIndex:i.option.currentIndex},e)})),ty.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(e,t){var i=t.getComponent("timeline");i&&null!=e.playState&&i.setPlayState(e.playState)}));var VN=qu.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(e,t,i){this._data,this._names,this.mergeDefaultAndTheme(e,i),this._initData()},mergeOption:function(e){VN.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(e){this.option.autoPlay=!!e},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var e=this.option,t=e.data||[],i=e.axisType,n=this._names=[];if("category"===i){var r=[];we.each(t,(function(e,t){var i,a=xa.getDataItemValue(e);we.isObject(e)?(i=we.clone(e)).value=t:i=t,r.push(i),we.isString(a)||null!=a&&!isNaN(a)||(a=""),n.push(a+"")})),t=r}var a={category:"ordinal",time:"time"}[i]||"number";(this._data=new og([{name:"value",type:a}],this)).initData(t,n)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),FN=VN.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});we.mixin(FN,hd);var GN=Fd.extend({type:"timeline"}),HN=function(e,t,i,n){zv.call(this,e,t,i),this.type=n||"value",this.model=null};HN.prototype={constructor:HN,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},we.inherits(HN,zv);var WN=HN,jN=iv.createSymbol,UN=Pu.encodeHTML,ZN=we.bind,YN=we.each,qN=Math.PI;GN.extend({type:"timeline.slider",init:function(e,t){this.api=t,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,i,n){if(this.model=e,this.api=i,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var r=this._layout(e,i),a=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(r,e);e.formatTooltip=function(e){return UN(s.scale.getLabel(e))},YN(["AxisLine","AxisTick","Control","CurrentPointer"],(function(t){this["_render"+t](r,a,s,e)}),this),this._renderAxisLabel(r,o,s,e),this._position(r,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(e,t){var i=e.get("label.position"),n=e.get("orient"),r=function(e,t){return Hu.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}(e,t);null==i||"auto"===i?i="horizontal"===n?r.y+r.height/2<t.getHeight()/2?"-":"+":r.x+r.width/2<t.getWidth()/2?"+":"-":isNaN(i)&&(i={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]);var a,o,s,l,u={horizontal:"center",vertical:i>=0||"+"===i?"left":"right"},c={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:qN/2},d="vertical"===n?r.height:r.width,p=e.getModel("controlStyle"),f=p.get("show",!0),g=f?p.get("itemSize"):0,m=f?p.get("itemGap"):0,v=g+m,y=e.get("label.rotate")||0;y=y*qN/180;var x=p.get("position",!0),_=f&&p.get("showPlayBtn",!0),b=f&&p.get("showPrevBtn",!0),w=f&&p.get("showNextBtn",!0),S=0,M=d;return"left"===x||"bottom"===x?(_&&(a=[0,0],S+=v),b&&(o=[S,0],S+=v),w&&(s=[M-g,0],M-=v)):(_&&(a=[M-g,0],M-=v),b&&(o=[0,0],S+=v),w&&(s=[M-g,0],M-=v)),l=[S,M],e.get("inverse")&&l.reverse(),{viewRect:r,mainLength:d,orient:n,rotation:h[n],labelRotation:y,labelPosOpt:i,labelAlign:e.get("label.align")||u[n],labelBaseline:e.get("label.verticalAlign")||e.get("label.baseline")||c[n],playPosition:a,prevBtnPosition:o,nextBtnPosition:s,axisExtent:l,controlSize:g,controlGap:m}},_position:function(e,t){var i=this._mainGroup,n=this._labelGroup,r=e.viewRect;if("vertical"===e.orient){var a=ft.create(),o=r.x,s=r.y+r.height;ft.translate(a,a,[-o,-s]),ft.rotate(a,a,-qN/2),ft.translate(a,a,[o,s]),(r=r.clone()).applyTransform(a)}var l=m(r),u=m(i.getBoundingRect()),c=m(n.getBoundingRect()),h=i.position,d=n.position;d[0]=h[0]=l[0][0];var p,f=e.labelPosOpt;isNaN(f)?(v(h,u,l,1,p="+"===f?0:1),v(d,c,l,1,1-p)):(v(h,u,l,1,p=f>=0?0:1),d[1]=h[1]+f);function g(e){var t=e.position;e.origin=[l[0][0]-t[0],l[1][0]-t[1]]}function m(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function v(e,t,i,n,r){e[n]+=i[n][r]-t[n][r]}i.attr("position",h),n.attr("position",d),i.rotation=n.rotation=e.rotation,g(i),g(n)},_createAxis:function(e,t){var i=t.getData(),n=t.get("axisType"),r=jm.createScaleByModel(t,n);r.getTicks=function(){return i.mapArray(["value"],(function(e){return e}))};var a=i.getDataExtent("value");r.setExtent(a[0],a[1]),r.niceTicks();var o=new WN("value",r,e.axisExtent,n);return o.model=t,o},_createGroup:function(e){var t=this["_"+e]=new ru.Group;return this.group.add(t),t},_renderAxisLine:function(e,t,i,n){var r=i.getExtent();n.get("lineStyle.show")&&t.add(new ru.Line({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:we.extend({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(e,t,i,n){var r=n.getData(),a=i.scale.getTicks();YN(a,(function(e){var a=i.dataToCoord(e),o=r.getItemModel(e),s=o.getModel("itemStyle"),l=o.getModel("emphasis.itemStyle"),u={position:[a,0],onclick:ZN(this._changeTimeline,this,e)},c=XN(o,s,t,u);ru.setHoverStyle(c,l.getItemStyle()),o.get("tooltip")?(c.dataIndex=e,c.dataModel=n):c.dataIndex=c.dataModel=null}),this)},_renderAxisLabel:function(e,t,i,n){if(i.getLabelModel().get("show")){var r=n.getData(),a=i.getViewLabels();YN(a,(function(n){var a=n.tickValue,o=r.getItemModel(a),s=o.getModel("label"),l=o.getModel("emphasis.label"),u=i.dataToCoord(n.tickValue),c=new ru.Text({position:[u,0],rotation:e.labelRotation-e.rotation,onclick:ZN(this._changeTimeline,this,a),silent:!1});ru.setTextStyle(c.style,s,{text:n.formattedLabel,textAlign:e.labelAlign,textVerticalAlign:e.labelBaseline}),t.add(c),ru.setHoverStyle(c,ru.setTextStyle({},l))}),this)}},_renderControl:function(e,t,i,n){var r=e.controlSize,a=e.rotation,o=n.getModel("controlStyle").getItemStyle(),s=n.getModel("emphasis.controlStyle").getItemStyle(),l=[0,-r/2,r,r],u=n.getPlayState(),c=n.get("inverse",!0);function h(e,i,u,c){if(e){var h=function(e,t,i,n){return ru.makePath(e.get(t).replace(/^path:\/\//,""),we.clone(n||{}),new Ni(i[0],i[1],i[2],i[3]),"center")}(n,i,l,{position:e,origin:[r/2,0],rotation:c?-a:0,rectHover:!0,style:o,onclick:u});t.add(h),ru.setHoverStyle(h,s)}}h(e.nextBtnPosition,"controlStyle.nextIcon",ZN(this._changeTimeline,this,c?"-":"+")),h(e.prevBtnPosition,"controlStyle.prevIcon",ZN(this._changeTimeline,this,c?"+":"-")),h(e.playPosition,"controlStyle."+(u?"stopIcon":"playIcon"),ZN(this._handlePlayClick,this,!u),!0)},_renderCurrentPointer:function(e,t,i,n){var r=n.getData(),a=n.getCurrentIndex(),o=r.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=ZN(s._handlePointerDrag,s),e.ondragend=ZN(s._handlePointerDragend,s),KN(e,a,i,n,!0)},onUpdate:function(e){KN(e,a,i,n)}};this._currentPointer=XN(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},_handlePointerDrag:function(e,t,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},_pointerChangeTimeline:function(e,t){var i=this._toAxisCoord(e)[0],n=this._axis,r=Su.asc(n.getExtent().slice());i>r[1]&&(i=r[1]),i<r[0]&&(i=r[0]),this._currentPointer.position[0]=i,this._currentPointer.dirty();var a=this._findNearestTick(i),o=this.model;(t||a!==o.getCurrentIndex()&&o.get("realtime"))&&this._changeTimeline(a)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(ZN((function(){var e=this.model;this._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))}),this),this.model.get("playInterval")))},_toAxisCoord:function(e){var t=this._mainGroup.getLocalTransform();return ru.applyTransform(e,t,!0)},_findNearestTick:function(e){var t,i=this.model.getData(),n=1/0,r=this._axis;return i.each(["value"],(function(i,a){var o=r.dataToCoord(i),s=Math.abs(o-e);s<n&&(n=s,t=a)})),t},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(e){var t=this.model.getCurrentIndex();"+"===e?e=t+1:"-"===e&&(e=t-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})}});function XN(e,t,i,n,r,a){var o=t.get("color");if(r)r.setColor(o),i.add(r),a&&a.onUpdate(r);else{var s=e.get("symbol");(r=jN(s,-1,-1,2,2,o)).setStyle("strokeNoScale",!0),i.add(r),a&&a.onCreate(r)}var l=t.getItemStyle(["color","symbol","symbolSize"]);r.setStyle(l),n=we.merge({rectHover:!0,z2:100},n,!0);var u=e.get("symbolSize");(u=u instanceof Array?u.slice():[+u,+u])[0]/=2,u[1]/=2,n.scale=u;var c=e.get("symbolOffset");if(c){var h=n.position=n.position||[0,0];h[0]+=Su.parsePercent(c[0],u[0]),h[1]+=Su.parsePercent(c[1],u[1])}var d=e.get("symbolRotate");return n.rotation=(d||0)*Math.PI/180||0,r.attr(n),r.updateTransform(),r}function KN(e,t,i,n,r){if(!e.dragging){var a=n.getModel("checkpointStyle"),o=i.dataToCoord(n.getData().get(["value"],t));r||!a.get("animation",!0)?e.attr({position:[o,0]}):(e.stopAnimation(!0),e.animateTo({position:[o,0]},a.get("animationDuration",!0),a.get("animationEasing",!0)))}}ty.registerPreprocessor(BN);var QN=Pu.addCommas,JN=Pu.encodeHTML;function $N(e){xa.defaultEmphasis(e,"label",["show"])}var eE=ty.extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(e,t,i){this.mergeDefaultAndTheme(e,i),this._mergeOption(e,i,!1,!0)},isAnimationEnabled:function(){if(J.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},mergeOption:function(e,t){this._mergeOption(e,t,!1,!1)},_mergeOption:function(e,t,i,n){var r=this.constructor,a=this.mainType+"Model";i||t.eachSeries((function(e){var i=e.get(this.mainType,!0),o=e[a];i&&i.data?(o?o._mergeOption(i,t,!0):(n&&$N(i),we.each(i.data,(function(e){e instanceof Array?($N(e[0]),$N(e[1])):$N(e)})),o=new r(i,this,t),we.extend(o,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),o.__hostSeries=e),e[a]=o):e[a]=null}),this)},formatTooltip:function(e){var t=this.getData(),i=this.getRawValue(e),n=we.isArray(i)?we.map(i,QN).join(", "):QN(i),r=t.getName(e),a=JN(this.name);return(null!=i||r)&&(a+="<br />"),r&&(a+=JN(r),null!=i&&(a+=" : ")),null!=i&&(a+=JN(n)),a},getData:function(){return this._data},setData:function(e){this._data=e}});we.mixin(eE,hd);var tE=eE,iE=(tE.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}}),Lg.isDimensionStacked),nE=we.indexOf;function rE(e,t,i,n,r,a){var o=[],s=iE(t,n)?t.getCalculationInfo("stackResultDimension"):n,l=lE(t,s,e),u=t.indicesOfNearest(s,l)[0];o[r]=t.get(i,u),o[a]=t.get(s,u);var c=t.get(n,u),h=Su.getPrecision(t.get(n,u));return(h=Math.min(h,20))>=0&&(o[a]=+o[a].toFixed(h)),[o,c]}var aE=we.curry,oE={min:aE(rE,"min"),max:aE(rE,"max"),average:aE(rE,"average")};function sE(e,t,i,n){var r={};return null!=e.valueIndex||null!=e.valueDim?(r.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,r.valueAxis=i.getAxis(function(e,t){var i=e.getData(),n=i.dimensions;t=i.getDimension(t);for(var r=0;r<n.length;r++){var a=i.getDimensionInfo(n[r]);if(a.name===t)return a.coordDim}}(n,r.valueDataDim)),r.baseAxis=i.getOtherAxis(r.valueAxis),r.baseDataDim=t.mapDimension(r.baseAxis.dim)):(r.baseAxis=n.getBaseAxis(),r.valueAxis=i.getOtherAxis(r.baseAxis),r.baseDataDim=t.mapDimension(r.baseAxis.dim),r.valueDataDim=t.mapDimension(r.valueAxis.dim)),r}function lE(e,t,i){if("average"===i){var n=0,r=0;return e.each(t,(function(e,t){isNaN(e)||(n+=e,r++)})),n/r}return"median"===i?e.getMedian(t):e.getDataExtent(t,!0)["max"===i?1:0]}var uE={dataTransform:function(e,t){var i=e.getData(),n=e.coordinateSystem;if(t&&!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!we.isArray(t.coord)&&n){var r=n.dimensions,a=sE(t,i,n,e);if((t=we.clone(t)).type&&oE[t.type]&&a.baseAxis&&a.valueAxis){var o=nE(r,a.baseAxis.dim),s=nE(r,a.valueAxis.dim),l=oE[t.type](i,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else{for(var u=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis],c=0;c<2;c++)oE[u[c]]&&(u[c]=lE(i,i.mapDimension(r[c]),u[c]));t.coord=u}}return t},getAxisInfo:sE,dataFilter:function(e,t){return!(e&&e.containData&&t.coord&&!function(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}(t))||e.containData(t.coord)},dimValueGetter:function(e,t,i,n){return n<2?e.coord&&e.coord[n]:e.value},numCalculate:lE},cE=ty.extendComponentView({type:"marker",init:function(){this.markerGroupMap=we.createHashMap()},render:function(e,t,i){var n=this.markerGroupMap;n.each((function(e){e.__keep=!1}));var r=this.type+"Model";t.eachSeries((function(e){var n=e[r];n&&this.renderSeries(e,n,t,i)}),this),n.each((function(e){!e.__keep&&this.group.remove(e.group)}),this)},renderSeries:function(){}});function hE(e,t,i){var n=t.coordinateSystem;e.each((function(r){var a,o=e.getItemModel(r),s=Su.parsePercent(o.get("x"),i.getWidth()),l=Su.parsePercent(o.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)a=t.getMarkerPosition(e.getValues(e.dimensions,r));else if(n){var u=e.get(n.dimensions[0],r),c=e.get(n.dimensions[1],r);a=n.dataToPoint([u,c])}}else a=[s,l];isNaN(s)||(a[0]=s),isNaN(l)||(a[1]=l),e.setItemLayout(r,a)}))}cE.extend({type:"markPoint",updateTransform:function(e,t,i){t.eachSeries((function(e){var t=e.markPointModel;t&&(hE(t.getData(),e,i),this.markerGroupMap.get(e.id).updateLayout(t))}),this)},renderSeries:function(e,t,i,n){var r=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new q_),u=function(e,t,i){var n;n=e?we.map(e&&e.dimensions,(function(e){var i=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return we.defaults({name:e},i)})):[{name:"value",type:"float"}];var r=new og(n,i),a=we.map(i.get("data"),we.curry(uE.dataTransform,t));e&&(a=we.filter(a,we.curry(uE.dataFilter,e)));return r.initData(a,null,e?uE.dimValueGetter:function(e){return e.value}),r}(r,e,t);t.setData(u),hE(t.getData(),e,n),u.each((function(e){var i=u.getItemModel(e),n=i.getShallow("symbol"),r=i.getShallow("symbolSize"),a=we.isFunction(n),s=we.isFunction(r);if(a||s){var l=t.getRawValue(e),c=t.getDataParams(e);a&&(n=n(l,c)),s&&(r=r(l,c))}u.setItemVisual(e,{symbol:n,symbolSize:r,color:i.get("itemStyle.color")||o.getVisual("color")})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(e){e.traverse((function(e){e.dataModel=t}))})),l.__keep=!0,l.group.silent=t.get("silent")||e.get("silent")}});ty.registerPreprocessor((function(e){e.markPoint=e.markPoint||{}}));tE.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var dE=Lg.getStackedDimension,pE=function(e,t,i,n){var r=e.getData(),a=n.type;if(!we.isArray(n)&&("min"===a||"max"===a||"average"===a||"median"===a||null!=n.xAxis||null!=n.yAxis)){var o,s;if(null!=n.yAxis||null!=n.xAxis)o=t.getAxis(null!=n.yAxis?"y":"x"),s=we.retrieve(n.yAxis,n.xAxis);else{var l=uE.getAxisInfo(n,r,t,e);o=l.valueAxis;var u=dE(r,l.valueDataDim);s=uE.numCalculate(r,u,a)}var c="x"===o.dim?0:1,h=1-c,d=we.clone(n),p={};d.type=null,d.coord=[],p.coord=[],d.coord[h]=-1/0,p.coord[h]=1/0;var f=i.get("precision");f>=0&&"number"==typeof s&&(s=+s.toFixed(Math.min(f,20))),d.coord[c]=p.coord[c]=s,n=[d,p,{type:a,valueIndex:n.valueIndex,value:s}]}return(n=[uE.dataTransform(e,n[0]),uE.dataTransform(e,n[1]),we.extend({},n[2])])[2].type=n[2].type||"",we.merge(n[2],n[0]),we.merge(n[2],n[1]),n};function fE(e){return!isNaN(e)&&!isFinite(e)}function gE(e,t,i,n){var r=1-e,a=n.dimensions[e];return fE(t[r])&&fE(i[r])&&t[e]===i[e]&&n.getAxis(a).containData(t[e])}function mE(e,t){if("cartesian2d"===e.type){var i=t[0].coord,n=t[1].coord;if(i&&n&&(gE(1,i,n,e)||gE(0,i,n,e)))return!0}return uE.dataFilter(e,t[0])&&uE.dataFilter(e,t[1])}function vE(e,t,i,n,r){var a,o=n.coordinateSystem,s=e.getItemModel(t),l=Su.parsePercent(s.get("x"),r.getWidth()),u=Su.parsePercent(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=o.dimensions,h=e.get(c[0],t),d=e.get(c[1],t);a=o.dataToPoint([h,d])}if("cartesian2d"===o.type){var p=o.getAxis("x"),f=o.getAxis("y");c=o.dimensions;fE(e.get(c[0],t))?a[0]=p.toGlobalCoord(p.getExtent()[i?0:1]):fE(e.get(c[1],t))&&(a[1]=f.toGlobalCoord(f.getExtent()[i?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];e.setItemLayout(t,a)}cE.extend({type:"markLine",updateTransform:function(e,t,i){t.eachSeries((function(e){var t=e.markLineModel;if(t){var n=t.getData(),r=t.__from,a=t.__to;r.each((function(t){vE(r,t,!0,e,i),vE(a,t,!1,e,i)})),n.each((function(e){n.setItemLayout(e,[r.getItemLayout(e),a.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},renderSeries:function(e,t,i,n){var r=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,new e_);this.group.add(l.group);var u=function(e,t,i){var n;n=e?we.map(e&&e.dimensions,(function(e){var i=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return we.defaults({name:e},i)})):[{name:"value",type:"float"}];var r=new og(n,i),a=new og(n,i),o=new og([],i),s=we.map(i.get("data"),we.curry(pE,t,e,i));e&&(s=we.filter(s,we.curry(mE,e)));var l=e?uE.dimValueGetter:function(e){return e.value};return r.initData(we.map(s,(function(e){return e[0]})),null,l),a.initData(we.map(s,(function(e){return e[1]})),null,l),o.initData(we.map(s,(function(e){return e[2]}))),o.hasItemOption=!0,{from:r,to:a,line:o}}(r,e,t),c=u.from,h=u.to,d=u.line;t.__from=c,t.__to=h,t.setData(d);var p=t.get("symbol"),f=t.get("symbolSize");function g(t,i,r){var a=t.getItemModel(i);vE(t,i,r,e,n),t.setItemVisual(i,{symbolSize:a.get("symbolSize")||f[r?0:1],symbol:a.get("symbol",!0)||p[r?0:1],color:a.get("itemStyle.color")||o.getVisual("color")})}we.isArray(p)||(p=[p,p]),"number"==typeof f&&(f=[f,f]),u.from.each((function(e){g(c,e,!0),g(h,e,!1)})),d.each((function(e){var t=d.getItemModel(e).get("lineStyle.color");d.setItemVisual(e,{color:t||c.getItemVisual(e,"color")}),d.setItemLayout(e,[c.getItemLayout(e),h.getItemLayout(e)]),d.setItemVisual(e,{fromSymbolSize:c.getItemVisual(e,"symbolSize"),fromSymbol:c.getItemVisual(e,"symbol"),toSymbolSize:h.getItemVisual(e,"symbolSize"),toSymbol:h.getItemVisual(e,"symbol")})})),l.updateData(d),u.line.eachItemGraphicEl((function(e,i){e.traverse((function(e){e.dataModel=t}))})),l.__keep=!0,l.group.silent=t.get("silent")||e.get("silent")}});ty.registerPreprocessor((function(e){e.markLine=e.markLine||{}}));tE.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var yE=function(e,t,i,n){var r=uE.dataTransform(e,n[0]),a=uE.dataTransform(e,n[1]),o=we.retrieve,s=r.coord,l=a.coord;s[0]=o(s[0],-1/0),s[1]=o(s[1],-1/0),l[0]=o(l[0],1/0),l[1]=o(l[1],1/0);var u=we.mergeAll([{},r,a]);return u.coord=[r.coord,a.coord],u.x0=r.x,u.y0=r.y,u.x1=a.x,u.y1=a.y,u};function xE(e){return!isNaN(e)&&!isFinite(e)}function _E(e,t,i,n){var r=1-e;return xE(t[r])&&xE(i[r])}function bE(e,t){var i=t.coord[0],n=t.coord[1];return!("cartesian2d"!==e.type||!i||!n||!_E(1,i,n)&&!_E(0,i,n))||(uE.dataFilter(e,{coord:i,x:t.x0,y:t.y0})||uE.dataFilter(e,{coord:n,x:t.x1,y:t.y1}))}function wE(e,t,i,n,r){var a,o=n.coordinateSystem,s=e.getItemModel(t),l=Su.parsePercent(s.get(i[0]),r.getWidth()),u=Su.parsePercent(s.get(i[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(e.getValues(i,t));else{var c=[p=e.get(i[0],t),f=e.get(i[1],t)];o.clampData&&o.clampData(c,c),a=o.dataToPoint(c,!0)}if("cartesian2d"===o.type){var h=o.getAxis("x"),d=o.getAxis("y"),p=e.get(i[0],t),f=e.get(i[1],t);xE(p)?a[0]=h.toGlobalCoord(h.getExtent()["x0"===i[0]?0:1]):xE(f)&&(a[1]=d.toGlobalCoord(d.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];return a}var SE=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];cE.extend({type:"markArea",updateTransform:function(e,t,i){t.eachSeries((function(e){var t=e.markAreaModel;if(t){var n=t.getData();n.each((function(t){var r=we.map(SE,(function(r){return wE(n,t,r,e,i)}));n.setItemLayout(t,r),n.getItemGraphicEl(t).setShape("points",r)}))}}),this)},renderSeries:function(e,t,i,n){var r=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(a)||s.set(a,{group:new ru.Group});this.group.add(l.group),l.__keep=!0;var u=function(e,t,i){var n,r;e?(n=we.map(e&&e.dimensions,(function(e){var i=t.getData(),n=i.getDimensionInfo(i.mapDimension(e))||{};return we.defaults({name:e},n)})),r=new og(we.map(["x0","y0","x1","y1"],(function(e,t){return{name:e,type:n[t%2].type}})),i)):r=new og(n=[{name:"value",type:"float"}],i);var a=we.map(i.get("data"),we.curry(yE,t,e,i));e&&(a=we.filter(a,we.curry(bE,e)));var o=e?function(e,t,i,n){return e.coord[Math.floor(n/2)][n%2]}:function(e){return e.value};return r.initData(a,null,o),r.hasItemOption=!0,r}(r,e,t);t.setData(u),u.each((function(t){u.setItemLayout(t,we.map(SE,(function(i){return wE(u,t,i,e,n)}))),u.setItemVisual(t,{color:o.getVisual("color")})})),u.diff(l.__data).add((function(e){var t=new ru.Polygon({shape:{points:u.getItemLayout(e)}});u.setItemGraphicEl(e,t),l.group.add(t)})).update((function(e,i){var n=l.__data.getItemGraphicEl(i);ru.updateProps(n,{shape:{points:u.getItemLayout(e)}},t,e),l.group.add(n),u.setItemGraphicEl(e,n)})).remove((function(e){var t=l.__data.getItemGraphicEl(e);l.group.remove(t)})).execute(),u.eachItemGraphicEl((function(e,i){var n=u.getItemModel(i),r=n.getModel("label"),a=n.getModel("emphasis.label"),o=u.getItemVisual(i,"color");e.useStyle(we.defaults(n.getModel("itemStyle").getItemStyle(),{fill:Kt.modifyAlpha(o,.4),stroke:o})),e.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),ru.setLabelStyle(e.style,e.hoverStyle,r,a,{labelFetcher:t,labelDataIndex:i,defaultText:u.getName(i)||"",isRectText:!0,autoColor:o}),ru.setHoverStyle(e,{}),e.dataModel=t})),l.__data=u,l.group.silent=t.get("silent")||e.get("silent")}}),ty.registerPreprocessor((function(e){e.markArea=e.markArea||{}}));var ME=xa.isNameSpecified,IE=sp.legend.selector,TE={all:{type:"all",title:we.clone(IE.all)},inverse:{type:"inverse",title:we.clone(IE.inverse)}},AE=ty.extendComponentModel({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(e,t,i){this.mergeDefaultAndTheme(e,i),e.selected=e.selected||{},this._updateSelector(e)},mergeOption:function(e){AE.superCall(this,"mergeOption",e),this._updateSelector(e)},_updateSelector:function(e){var t=e.selector;!0===t&&(t=e.selector=["all","inverse"]),we.isArray(t)&&we.each(t,(function(e,i){we.isString(e)&&(e={type:e}),t[i]=we.merge(e,TE[e.type])}))},optionUpdated:function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,i=0;i<e.length;i++){var n=e[i].get("name");if(this.isSelected(n)){this.select(n),t=!0;break}}!t&&this.select(e[0].get("name"))}},_updateData:function(e){var t=[],i=[];e.eachRawSeries((function(n){var r,a=n.name;if(i.push(a),n.legendVisualProvider){var o=n.legendVisualProvider.getAllNames();e.isSeriesFiltered(n)||(i=i.concat(o)),o.length?t=t.concat(o):r=!0}else r=!0;r&&ME(n)&&t.push(n.name)})),this._availableNames=i;var n=this.get("data")||t,r=we.map(n,(function(e){return"string"!=typeof e&&"number"!=typeof e||(e={name:e}),new vu(e,this,this.ecModel)}),this);this._data=r},getData:function(){return this._data},select:function(e){var t=this.option.selected;if("single"===this.get("selectedMode")){var i=this._data;we.each(i,(function(e){t[e.get("name")]=!1}))}t[e]=!0},unSelect:function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},toggleSelected:function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},allSelect:function(){var e=this._data,t=this.option.selected;we.each(e,(function(e){t[e.get("name",!0)]=!0}))},inverseSelect:function(){var e=this._data,t=this.option.selected;we.each(e,(function(e){var i=e.get("name",!0);t.hasOwnProperty(i)||(t[i]=!0),t[i]=!t[i]}))},isSelected:function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&we.indexOf(this._availableNames,e)>=0},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}}),CE=AE;function DE(e,t,i){var n,r={},a="toggleSelected"===e;return i.eachComponent("legend",(function(i){a&&null!=n?i[n?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?i[e]():(i[e](t.name),n=i.isSelected(t.name));var o=i.getData();we.each(o,(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var n=i.isSelected(t);r.hasOwnProperty(t)?r[t]=r[t]&&n:r[t]=n}}))})),"allSelect"===e||"inverseSelect"===e?{selected:r}:{name:t.name,selected:r}}ty.registerAction("legendToggleSelect","legendselectchanged",we.curry(DE,"toggleSelected")),ty.registerAction("legendAllSelect","legendselectall",we.curry(DE,"allSelect")),ty.registerAction("legendInverseSelect","legendinverseselect",we.curry(DE,"inverseSelect")),ty.registerAction("legendSelect","legendselected",we.curry(DE,"select")),ty.registerAction("legendUnSelect","legendunselected",we.curry(DE,"unSelect"));var LE=iv.createSymbol,PE=zO.makeBackground,kE=we.curry,OE=we.each,RE=ru.Group;function NE(e,t,i,n,r,a){var o;return"line"!==t&&t.indexOf("empty")<0?(o=i.getItemStyle(),e.style.stroke=n,a||(o.stroke=r)):o=i.getItemStyle(["borderWidth","borderColor"]),e.setStyle(o)}function EE(e,t,i,n){BE(e,t,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),zE(e,t,i,n)}function zE(e,t,i,n){var r=i.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:n})}function BE(e,t,i,n){var r=i.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:n})}var VE=ty.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new RE),this._backgroundEl,this.group.add(this._selectorGroup=new RE),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(e,t,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var r=e.get("align"),a=e.get("orient");r&&"auto"!==r||(r="right"===e.get("left")&&"vertical"===a?"right":"left");var o=e.get("selector",!0),s=e.get("selectorPosition",!0);!o||s&&"auto"!==s||(s="horizontal"===a?"end":"start"),this.renderInner(r,e,t,i,o,a,s);var l=e.getBoxLayoutParams(),u={width:i.getWidth(),height:i.getHeight()},c=e.get("padding"),h=Hu.getLayoutRect(l,u,c),d=this.layoutInner(e,r,h,n,o,s),p=Hu.getLayoutRect(we.defaults({width:d.width,height:d.height},l),u,c);this.group.attr("position",[p.x-d.x,p.y-d.y]),this.group.add(this._backgroundEl=PE(d,e))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(e,t,i,n,r,a,o){var s=this.getContentGroup(),l=we.createHashMap(),u=t.get("selectedMode"),c=[];i.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),OE(t.getData(),(function(r,a){var o=r.get("name");if(this.newlineDisabled||""!==o&&"\n"!==o){var h=i.getSeriesByName(o)[0];if(!l.get(o))if(h){var d=h.getData(),p=d.getVisual("color"),f=d.getVisual("borderColor");"function"==typeof p&&(p=p(h.getDataParams(0))),"function"==typeof f&&(f=f(h.getDataParams(0)));var g=d.getVisual("legendSymbol")||"roundRect",m=d.getVisual("symbol");this._createItem(o,a,r,t,g,m,e,p,f,u).on("click",kE(EE,o,null,n,c)).on("mouseover",kE(zE,h.name,null,n,c)).on("mouseout",kE(BE,h.name,null,n,c)),l.set(o,!0)}else i.eachRawSeries((function(i){if(!l.get(o)&&i.legendVisualProvider){var s=i.legendVisualProvider;if(!s.containName(o))return;var h=s.indexOfName(o),d=s.getItemVisual(h,"color"),p=s.getItemVisual(h,"borderColor");this._createItem(o,a,r,t,"roundRect",null,e,d,p,u).on("click",kE(EE,null,o,n,c)).on("mouseover",kE(zE,null,o,n,c)).on("mouseout",kE(BE,null,o,n,c)),l.set(o,!0)}}),this)}else s.add(new RE({newline:!0}))}),this),r&&this._createSelector(r,t,n,a,o)},_createSelector:function(e,t,i,n,r){var a=this.getSelectorGroup();OE(e,(function(e){!function(e){var n=e.type,r=new ru.Text({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===n?"legendAllSelect":"legendInverseSelect"})}});a.add(r);var o=t.getModel("selectorLabel"),s=t.getModel("emphasis.selectorLabel");ru.setLabelStyle(r.style,r.hoverStyle={},o,s,{defaultText:e.title,isRectText:!1}),ru.setHoverStyle(r)}(e)}))},_createItem:function(e,t,i,n,r,a,o,s,l,u){var c=n.get("itemWidth"),h=n.get("itemHeight"),d=n.get("inactiveColor"),p=n.get("inactiveBorderColor"),f=n.get("symbolKeepAspect"),g=n.getModel("itemStyle"),m=n.isSelected(e),v=new RE,y=i.getModel("textStyle"),x=i.get("icon"),_=i.getModel("tooltip"),b=_.parentModel,w=LE(r=x||r,0,0,c,h,m?s:d,null==f||f);if(v.add(NE(w,r,g,l,p,m)),!x&&a&&(a!==r||"none"===a)){var S=.8*h;"none"===a&&(a="circle");var M=LE(a,(c-S)/2,(h-S)/2,S,S,m?s:d,null==f||f);v.add(NE(M,a,g,l,p,m))}var I="left"===o?c+5:-5,T=o,A=n.get("formatter"),C=e;"string"==typeof A&&A?C=A.replace("{name}",null!=e?e:""):"function"==typeof A&&(C=A(e)),v.add(new ru.Text({style:ru.setTextStyle({},y,{text:C,x:I,y:h/2,textFill:m?y.getTextColor():d,textAlign:T,textVerticalAlign:"middle"})}));var D=new ru.Rect({shape:v.getBoundingRect(),invisible:!0,tooltip:_.get("show")?we.extend({content:e,formatter:b.get("formatter",!0)||function(){return e},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:e,$vars:["name"]}},_.option):null});return v.add(D),v.eachChild((function(e){e.silent=!0})),D.silent=!u,this.getContentGroup().add(v),ru.setHoverStyle(v),v.__legendDataIndex=t,v},layoutInner:function(e,t,i,n,r,a){var o=this.getContentGroup(),s=this.getSelectorGroup();Hu.box(e.get("orient"),o,e.get("itemGap"),i.width,i.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(r){Hu.box("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),h=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",m=0===p?"y":"x";"end"===a?h[p]+=l[f]+d:u[p]+=c[f]+d,h[1-p]+=l[g]/2-c[g]/2,s.attr("position",h),o.attr("position",u);var v={x:0,y:0};return v[f]=l[f]+d+c[f],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+h[1-p]),v}return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});var FE=function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var i=0;i<t.length;i++)if(!t[i].isSelected(e.name))return!1;return!0}))};ty.registerProcessor(ty.PRIORITY.PROCESSOR.SERIES_FILTER,FE),qu.registerSubTypeDefaulter("legend",(function(){return"plain"}));var GE=Hu.mergeLayoutParam,HE=Hu.getLayoutParams,WE=CE.extend({type:"legend.scroll",setScrollDataIndex:function(e){this.option.scrollDataIndex=e},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(e,t,i,n){var r=HE(e);WE.superCall(this,"init",e,t,i,n),jE(this,e,r)},mergeOption:function(e,t){WE.superCall(this,"mergeOption",e,t),jE(this,this.option,e)}});function jE(e,t,i){var n=[1,1];n[e.getOrient().index]=0,GE(t,i,{type:"box",ignoreSize:n})}var UE=ru.Group,ZE=["width","height"],YE=["x","y"],qE=VE.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){qE.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new UE),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new UE),this._showController},resetInner:function(){qE.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(e,t,i,n,r,a,o){var s=this;qE.superCall(this,"renderInner",e,t,i,n,r,a,o);var l=this._controllerGroup,u=t.get("pageIconSize",!0);we.isArray(u)||(u=[u,u]),h("pagePrev",0);var c=t.getModel("pageTextStyle");function h(e,i){var r=e+"DataIndex",a=ru.createIcon(t.get("pageIcons",!0)[t.getOrient().name][i],{onclick:we.bind(s._pageGo,s,r,t,n)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});a.name=e,l.add(a)}l.add(new ru.Text({name:"pageText",style:{textFill:c.getTextColor(),font:c.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),h("pageNext",1)},layoutInner:function(e,t,i,n,r,a){var o=this.getSelectorGroup(),s=e.getOrient().index,l=ZE[s],u=YE[s],c=ZE[1-s],h=YE[1-s];r&&Hu.box("horizontal",o,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=o.getBoundingRect(),f=[-p.x,-p.y],g=we.clone(i);r&&(g[l]=i[l]-p[l]-d);var m=this._layoutContentAndController(e,n,g,s,l,c,h);if(r){if("end"===a)f[s]+=m[l]+d;else{var v=p[l]+d;f[s]-=v,m[u]-=v}m[l]+=p[l]+d,f[1-s]+=m[h]+m[c]/2-p[c]/2,m[c]=Math.max(m[c],p[c]),m[h]=Math.min(m[h],p[h]+f[1-s]),o.attr("position",f)}return m},_layoutContentAndController:function(e,t,i,n,r,a,o){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;Hu.box(e.get("orient"),s,e.get("itemGap"),n?i.width:null,n?null:i.height),Hu.box("horizontal",u,e.get("pageButtonItemGap",!0));var c=s.getBoundingRect(),h=u.getBoundingRect(),d=this._showController=c[r]>i[r],p=[-c.x,-c.y];t||(p[n]=s.position[n]);var f=[0,0],g=[-h.x,-h.y],m=we.retrieve2(e.get("pageButtonGap",!0),e.get("itemGap",!0));d&&("end"===e.get("pageButtonPosition",!0)?g[n]+=i[r]-h[r]:f[n]+=h[r]+m);g[1-n]+=c[a]/2-h[a]/2,s.attr("position",p),l.attr("position",f),u.attr("position",g);var v={x:0,y:0};if(v[r]=d?i[r]:c[r],v[a]=Math.max(c[a],h[a]),v[o]=Math.min(0,h[o]+g[1-n]),l.__rectSize=i[r],d){var y={x:0,y:0};y[r]=Math.max(i[r]-h[r]-m,0),y[a]=v[a],l.setClipPath(new ru.Rect({shape:y})),l.__rectSize=y[r]}else u.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(e);return null!=x.pageIndex&&ru.updateProps(s,{position:x.contentPosition},!!d&&e),this._updatePageInfoView(e,x),v},_pageGo:function(e,t,i){var n=this._getPageInfo(t)[e];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:t.id})},_updatePageInfoView:function(e,t){var i=this._controllerGroup;we.each(["pagePrev","pageNext"],(function(n){var r=null!=t[n+"DataIndex"],a=i.childOfName(n);a&&(a.setStyle("fill",r?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),a.cursor=r?"pointer":"default")}));var n=i.childOfName("pageText"),r=e.get("pageFormatter"),a=t.pageIndex,o=null!=a?a+1:0,s=t.pageCount;n&&r&&n.setStyle("text",we.isString(r)?r.replace("{current}",o).replace("{total}",s):r({current:o,total:s}))},_getPageInfo:function(e){var t=e.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,r=e.getOrient().index,a=ZE[r],o=YE[r],s=this._findTargetItemIndex(t),l=i.children(),u=l[s],c=l.length,h=c?1:0,d={contentPosition:i.position.slice(),pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var p=y(u);d.contentPosition[r]=-p.s;for(var f=s+1,g=p,m=p,v=null;f<=c;++f)(!(v=y(l[f]))&&m.e>g.s+n||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(f=s-1,g=p,m=p,v=null;f>=-1;--f)(v=y(l[f]))&&x(m,v.s)||!(g.i<m.i)||(m=g,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=v;return d;function y(e){if(e){var t=e.getBoundingRect(),i=t[o]+e.position[r];return{s:i,e:i+t[a],i:e.__legendDataIndex}}}function x(e,t){return e.e>=t&&e.s<=t+n}},_findTargetItemIndex:function(e){return this._showController?(this.getContentGroup().eachChild((function(n,r){var a=n.__legendDataIndex;null==i&&null!=a&&(i=r),a===e&&(t=r)})),null!=t?t:i):0;var t,i}});ty.registerAction("legendScroll","legendscroll",(function(e,t){var i=e.scrollDataIndex;null!=i&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(i)}))}));RR.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var XE=ru.Rect,KE=Su.linearMap,QE=Su.asc,JE=we.bind,$E=we.each,ez=["line","bar","candlestick","scatter"],tz=NR.extend({type:"dataZoom.slider",init:function(e,t){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=t},render:function(e,t,i,n){tz.superApply(this,"render",arguments),rp.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=e.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){tz.superApply(this,"remove",arguments),rp.clear(this,"_dispatchZoomAction")},dispose:function(){tz.superApply(this,"dispose",arguments),rp.clear(this,"_dispatchZoomAction")},_buildView:function(){var e=this.group;e.removeAll(),this._resetLocation(),this._resetInterval();var t=this._displayables.barGroup=new ru.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},_resetLocation:function(){var e=this.dataZoomModel,t=this.api,i=this._findCoordRect(),n={width:t.getWidth(),height:t.getHeight()},r="horizontal"===this._orient?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Hu.getLayoutParams(e.option);we.each(["right","top","width","height"],(function(e){"ph"===a[e]&&(a[e]=r[e])}));var o=Hu.getLayoutRect(a,n,e.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var e=this.group,t=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),r=n&&n.get("inverse"),a=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr("horizontal"!==i||r?"horizontal"===i&&r?{scale:o?[-1,1]:[-1,-1]}:"vertical"!==i||r?{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[1,1]:[1,-1]});var s=e.getBoundingRect([a]);e.attr("position",[t.x-s.x,t.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var e=this.dataZoomModel,t=this._size,i=this._displayables.barGroup;i.add(new XE({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40})),i.add(new XE({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:we.bind(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(e){var t=this._size,i=e.series,n=i.getRawData(),r=i.getShadowDim?i.getShadowDim():e.otherDim;if(null!=r){var a=n.getDataExtent(r),o=.3*(a[1]-a[0]);a=[a[0]-o,a[1]+o];var s,l=[0,t[1]],u=[0,t[0]],c=[[t[0],0],[0,0]],h=[],d=u[1]/(n.count()-1),p=0,f=Math.round(n.count()/t[0]);n.each([r],(function(e,t){if(f>0&&t%f)p+=d;else{var i=null==e||isNaN(e)||""===e,n=i?0:KE(e,a,l,!0);i&&!s&&t?(c.push([c[c.length-1][0],0]),h.push([h[h.length-1][0],0])):!i&&s&&(c.push([p,0]),h.push([p,0])),c.push([p,n]),h.push([p,n]),p+=d,s=i}}));var g=this.dataZoomModel;this._displayables.barGroup.add(new ru.Polygon({shape:{points:c},style:we.defaults({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new ru.Polyline({shape:{points:h},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var i,n=this.ecModel;return e.eachTargetAxis((function(r,a){var o=e.getAxisProxy(r.name,a).getTargetSeriesModels();we.each(o,(function(e){if(!(i||!0!==t&&we.indexOf(ez,e.get("type"))<0)){var o,s=n.getComponent(r.axis,a).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r.name],u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(o=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),i={thisAxis:s,series:e,thisDim:r.name,otherDim:l,otherAxisInverse:o}}}),this)}),this),i}},_renderHandle:function(){var e=this._displayables,t=e.handles=[],i=e.handleLabels=[],n=this._displayables.barGroup,r=this._size,a=this.dataZoomModel;n.add(e.filler=new XE({draggable:!0,cursor:iz(this._orient),drift:JE(this._onDragMove,this,"all"),ondragstart:JE(this._showDataInfo,this,!0),ondragend:JE(this._onDragEnd,this),onmouseover:JE(this._showDataInfo,this,!0),onmouseout:JE(this._showDataInfo,this,!1),style:{fill:a.get("fillerColor"),textPosition:"inside"}})),n.add(new XE({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:r[0],height:r[1]},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),$E([0,1],(function(e){var r=ru.createIcon(a.get("handleIcon"),{cursor:iz(this._orient),draggable:!0,drift:JE(this._onDragMove,this,e),ondragend:JE(this._onDragEnd,this),onmouseover:JE(this._showDataInfo,this,!0),onmouseout:JE(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),o=r.getBoundingRect();this._handleHeight=Su.parsePercent(a.get("handleSize"),this._size[1]),this._handleWidth=o.width/o.height*this._handleHeight,r.setStyle(a.getModel("handleStyle").getItemStyle());var s=a.get("handleColor");null!=s&&(r.style.fill=s),n.add(t[e]=r);var l=a.textStyleModel;this.group.add(i[e]=new ru.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))}),this)},_resetInterval:function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[KE(e[0],[0,100],t,!0),KE(e[1],[0,100],t,!0)]},_updateInterval:function(e,t){var i=this.dataZoomModel,n=this._handleEnds,r=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];OA(t,n,r,i.get("zoomLock")?"all":e,null!=a.minSpan?KE(a.minSpan,o,r,!0):null,null!=a.maxSpan?KE(a.maxSpan,o,r,!0):null);var s=this._range,l=this._range=QE([KE(n[0],r,o,!0),KE(n[1],r,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(e){var t=this._displayables,i=this._handleEnds,n=QE(i.slice()),r=this._size;$E([0,1],(function(e){var n=t.handles[e],a=this._handleHeight;n.attr({scale:[a/2,a/2],position:[i[e],r[1]/2-a/2]})}),this),t.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:r[1]}),this._updateDataInfo(e)},_updateDataInfo:function(e){var t=this.dataZoomModel,i=this._displayables,n=i.handleLabels,r=this._orient,a=["",""];if(t.get("showDetail")){var o=t.findRepresentativeAxisProxy();if(o){var s=o.getAxisModel().axis,l=this._range,u=e?o.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:o.getDataValueWindow();a=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=QE(this._handleEnds.slice());function h(e){var t=ru.getTransform(i.handles[e].parent,this.group),o=ru.transformDirection(0===e?"right":"left",t),s=this._handleWidth/2+5,l=ru.applyTransform([c[e]+(0===e?-s:s),this._size[1]/2],t);n[e].setStyle({x:l[0],y:l[1],textVerticalAlign:"horizontal"===r?"middle":o,textAlign:"horizontal"===r?o:"center",text:a[e]})}h.call(this,0),h.call(this,1)},_formatLabel:function(e,t){var i=this.dataZoomModel,n=i.get("labelFormatter"),r=i.get("labelPrecision");null!=r&&"auto"!==r||(r=t.getPixelPrecision());var a=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel(Math.round(e)):e.toFixed(Math.min(r,20));return we.isFunction(n)?n(e,a):we.isString(n)?n.replace("{value}",a):a},_showDataInfo:function(e){e=this._dragging||e;var t=this._displayables.handleLabels;t[0].attr("invisible",!e),t[1].attr("invisible",!e)},_onDragMove:function(e,t,i,n){this._dragging=!0,Je.stop(n.event);var r=this._displayables.barGroup.getLocalTransform(),a=ru.applyTransform([t,i],r,!0),o=this._updateInterval(e,a[0]),s=this.dataZoomModel.get("realtime");this._updateView(!s),o&&s&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(e){var t=this._size,i=this._displayables.barGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(i[0]<0||i[0]>t[0]||i[1]<0||i[1]>t[1])){var n=this._handleEnds,r=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-r);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:e[0],end:e[1]})},_findCoordRect:function(){var e;if($E(this.getTargetCoordInfo(),(function(t){if(!e&&t.length){var i=t[0].model.coordinateSystem;e=i.getRect&&i.getRect()}})),!e){var t=this.api.getWidth(),i=this.api.getHeight();e={x:.2*t,y:.2*i,width:.6*t,height:.6*i}}return e}});function iz(e){return"vertical"===e?"ns-resize":"ew-resize"}RR.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var nz="\0_ec_dataZoom_roams";function rz(e){var t=e.getZr();return t[nz]||(t[nz]={})}function az(e){we.each(e,(function(t,i){t.count||(t.controller.dispose(),delete e[i])}))}function oz(e,t){e.dispatchAction({type:"dataZoom",batch:t})}var sz={register:function(e,t){var i=rz(e),n=t.dataZoomId,r=t.coordId;we.each(i,(function(e,i){var a=e.dataZoomInfos;a[n]&&we.indexOf(t.allCoordIds,r)<0&&(delete a[n],e.count--)})),az(i);var a=i[r];a||((a=i[r]={coordId:r,dataZoomInfos:{},count:0}).controller=function(e,t){var i=new Qy(e.getZr());return we.each(["pan","zoom","scrollMove"],(function(e){i.on(e,(function(i){var n=[];we.each(t.dataZoomInfos,(function(r){if(i.isAvailableBehavior(r.dataZoomModel.option)){var a=(r.getRange||{})[e],o=a&&a(t.controller,i);!r.dataZoomModel.get("disabled",!0)&&o&&n.push({dataZoomId:r.dataZoomId,start:o[0],end:o[1]})}})),n.length&&t.dispatchAction(n)}))})),i}(e,a),a.dispatchAction=we.curry(oz,e)),!a.dataZoomInfos[n]&&a.count++,a.dataZoomInfos[n]=t;var o,s,l,u,c=(o=a.dataZoomInfos,l={type_true:2,type_move:1,type_false:0,type_undefined:-1},u=!0,we.each(o,(function(e){var t=e.dataZoomModel,i=!t.get("disabled",!0)&&(!t.get("zoomLock",!0)||"move");l["type_"+i]>l["type_"+s]&&(s=i),u&=t.get("preventDefaultMouseMove",!0)})),{controlType:s,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!u}});a.controller.enable(c.controlType,c.opt),a.controller.setPointerChecker(t.containsPoint),rp.createOrUpdate(a,"dispatchAction",t.dataZoomModel.get("throttle",!0),"fixRate")},unregister:function(e,t){var i=rz(e);we.each(i,(function(e){e.controller.dispose();var i=e.dataZoomInfos;i[t]&&(delete i[t],e.count--)})),az(i)},generateCoordId:function(e){return e.type+"\0_"+e.id}},lz=we.bind,uz=NR.extend({type:"dataZoom.inside",init:function(e,t){this._range},render:function(e,t,i,n){uz.superApply(this,"render",arguments),this._range=e.getPercentRange(),we.each(this.getTargetCoordInfo(),(function(t,n){var r=we.map(t,(function(e){return sz.generateCoordId(e.model)}));we.each(t,(function(t){var a=t.model,o={};we.each(["pan","zoom","scrollMove"],(function(e){o[e]=lz(cz[e],this,t,n)}),this),sz.register(i,{coordId:sz.generateCoordId(a),allCoordIds:r,containsPoint:function(e,t,i){return a.coordinateSystem.containPoint([t,i])},dataZoomId:e.id,dataZoomModel:e,getRange:o})}),this)}),this)},dispose:function(){sz.unregister(this.api,this.dataZoomModel.id),uz.superApply(this,"dispose",arguments),this._range=null}}),cz={zoom:function(e,t,i,n){var r=this._range,a=r.slice(),o=e.axisModels[0];if(o){var s=dz[t](null,[n.originX,n.originY],o,i,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return OA(0,a,[0,100],0,c.minSpan,c.maxSpan),this._range=a,r[0]!==a[0]||r[1]!==a[1]?a:void 0}},pan:hz((function(e,t,i,n,r,a){var o=dz[n]([a.oldX,a.oldY],[a.newX,a.newY],t,r,i);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength})),scrollMove:hz((function(e,t,i,n,r,a){return dz[n]([0,0],[a.scrollDelta,a.scrollDelta],t,r,i).signal*(e[1]-e[0])*a.scrollDelta}))};function hz(e){return function(t,i,n,r){var a=this._range,o=a.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,i,n,r);return OA(l,o,[0,100],"all"),this._range=o,a[0]!==o[0]||a[1]!==o[1]?o:void 0}}}var dz={grid:function(e,t,i,n,r){var a=i.axis,o={},s=r.model.coordinateSystem.getRect();return e=e||[0,0],"x"===a.dim?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(e,t,i,n,r){var a=i.axis,o={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===i.mainType?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(e,t,i,n,r){var a=i.axis,o=r.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===a.orient?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}},pz=we.each;function fz(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var gz=function(e){var t=e&&e.visualMap;we.isArray(t)||(t=t?[t]:[]),pz(t,(function(e){if(e){fz(e,"splitList")&&!fz(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&we.isArray(t)&&pz(t,(function(e){we.isObject(e)&&(fz(e,"start")&&!fz(e,"min")&&(e.min=e.start),fz(e,"end")&&!fz(e,"max")&&(e.max=e.end))}))}}))};qu.registerSubTypeDefaulter("visualMap",(function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}));var mz=ty.PRIORITY.VISUAL.COMPONENT;function vz(e,t,i,n){for(var r=t.targetVisuals[n],a=jI.prepareVisualTypes(r),o={color:e.getData().getVisual("color")},s=0,l=a.length;s<l;s++){var u=a[s],c=r["opacity"===u?"__alphaForOpacity":u];c&&c.applyVisual(i,h,d)}return o.color;function h(e){return o[e]}function d(e,t){o[e]=t}}ty.registerVisual(mz,{createOnAllSeries:!0,reset:function(e,t){var i=[];return t.eachComponent("visualMap",(function(t){var n=e.pipelineContext;!t.isTargetSeries(e)||n&&n.large||i.push(pN.incrementalApplyVisual(t.stateList,t.targetVisuals,we.bind(t.getValueState,t),t.getDataDimension(e.getData())))})),i}}),ty.registerVisual(mz,{createOnAllSeries:!0,reset:function(e,t){var i=e.getData(),n=[];t.eachComponent("visualMap",(function(t){if(t.isTargetSeries(e)){var r=t.getVisualMeta(we.bind(vz,null,e,t))||{stops:[],outerColors:[]},a=t.getDataDimension(i),o=i.getDimensionInfo(a);null!=o&&(r.dimension=o.index,n.push(r))}})),e.getData().setVisual("visualMeta",n)}});var yz={get:function(e,t,i){var n=we.clone((xz[e]||{})[t]);return i&&we.isArray(n)?n[n.length-1]:n}},xz={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},_z=yz,bz=jI.mapVisual,wz=jI.eachVisual,Sz=we.isArray,Mz=we.each,Iz=Su.asc,Tz=Su.linearMap,Az=we.noop,Cz=ty.extendComponentModel({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(e,t,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(e,i)},optionUpdated:function(e,t){var i=this.option;J.canvasSupported||(i.realtime=!1),!t&&pN.replaceVisualOption(i,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(e){var t=this.stateList;e=we.bind(e,this),this.controllerVisuals=pN.createVisualMappings(this.option.controller,t,e),this.targetVisuals=pN.createVisualMappings(this.option.target,t,e)},getTargetSeriesIndices:function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries((function(e,i){t.push(i)})):t=xa.normalizeToArray(e),t},eachTargetSeries:function(e,t){we.each(this.getTargetSeriesIndices(),(function(i){e.call(t,this.ecModel.getSeriesByIndex(i))}),this)},isTargetSeries:function(e){var t=!1;return this.eachTargetSeries((function(i){i===e&&(t=!0)})),t},formatValueText:function(e,t,i){var n,r,a=this.option,o=a.precision,s=this.dataBound,l=a.formatter;return i=i||["<",">"],we.isArray(e)&&(e=e.slice(),n=!0),r=t?e:n?[u(e[0]),u(e[1])]:u(e),we.isString(l)?l.replace("{value}",n?r[0]:r).replace("{value2}",n?r[1]:r):we.isFunction(l)?n?l(e[0],e[1]):l(e):n?e[0]===s[0]?i[0]+" "+r[1]:e[1]===s[1]?i[1]+" "+r[0]:r[0]+" - "+r[1]:r;function u(e){return e===s[0]?"min":e===s[1]?"max":(+e).toFixed(Math.min(o,20))}},resetExtent:function(){var e=this.option,t=Iz([e.min,e.max]);this._dataExtent=t},getDataDimension:function(e){var t=this.option.dimension,i=e.dimensions;if(null!=t||i.length){if(null!=t)return e.getDimension(t);for(var n=e.dimensions,r=n.length-1;r>=0;r--){var a=n[r];if(!e.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var e=this.ecModel,t=this.option,i={inRange:t.inRange,outOfRange:t.outOfRange},n=t.target||(t.target={}),r=t.controller||(t.controller={});we.merge(n,i),we.merge(r,i);var a=this.isCategory();function o(i){Sz(t.color)&&!i.inRange&&(i.inRange={color:t.color.slice().reverse()}),i.inRange=i.inRange||{color:e.get("gradientColor")},Mz(this.stateList,(function(e){var t=i[e];if(we.isString(t)){var n=_z.get(t,"active",a);n?(i[e]={},i[e][t]=n):delete i[e]}}),this)}o.call(this,n),o.call(this,r),function(e,t,i){var n=e[t],r=e[i];n&&!r&&(r=e[i]={},Mz(n,(function(e,t){if(jI.isValidType(t)){var i=_z.get(t,"inactive",a);null!=i&&(r[t]=i,"color"!==t||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,n,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,i=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,n=this.get("inactiveColor");Mz(this.stateList,(function(r){var o=this.itemSize,s=e[r];s||(s=e[r]={color:a?n:[n]}),null==s.symbol&&(s.symbol=t&&we.clone(t)||(a?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&we.clone(i)||(a?o[0]:[o[0],o[0]])),s.symbol=bz(s.symbol,(function(e){return"none"===e||"square"===e?"roundRect":e}));var l=s.symbolSize;if(null!=l){var u=-1/0;wz(l,(function(e){e>u&&(u=e)})),s.symbolSize=bz(l,(function(e){return Tz(e,[0,u],[0,o[0]],!0)}))}}),this)}.call(this,r)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:Az,getValueState:Az,getVisualMeta:Az}),Dz=[20,140],Lz=Cz.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(e,t){Lz.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){Lz.superApply(this,"resetItemSize",arguments);var e=this.itemSize;"horizontal"===this._orient&&e.reverse(),(null==e[0]||isNaN(e[0]))&&(e[0]=Dz[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=Dz[1])},_resetRange:function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):we.isArray(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},completeVisualOption:function(){Cz.prototype.completeVisualOption.apply(this,arguments),we.each(this.stateList,(function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=0)}),this)},setSelected:function(e){this.option.range=e.slice(),this._resetRange()},getSelected:function(){var e=this.getExtent(),t=Su.asc((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},getValueState:function(e){var t=this.option.range,i=this.getExtent();return(t[0]<=i[0]||t[0]<=e)&&(t[1]>=i[1]||e<=t[1])?"inRange":"outOfRange"},findTargetDataIndices:function(e){var t=[];return this.eachTargetSeries((function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),(function(t,i){e[0]<=t&&t<=e[1]&&n.push(i)}),this),t.push({seriesId:i.id,dataIndex:n})}),this),t},getVisualMeta:function(e){var t=Pz(this,"outOfRange",this.getExtent()),i=Pz(this,"inRange",this.option.range.slice()),n=[];function r(t,i){n.push({value:t,color:e(t,i)})}for(var a=0,o=0,s=i.length,l=t.length;o<l&&(!i.length||t[o]<=i[0]);o++)t[o]<i[a]&&r(t[o],"outOfRange");for(var u=1;a<s;a++,u=0)u&&n.length&&r(i[a],"outOfRange"),r(i[a],"inRange");for(u=1;o<l;o++)(!i.length||i[i.length-1]<t[o])&&(u&&(n.length&&r(n[n.length-1].value,"outOfRange"),u=0),r(t[o],"outOfRange"));var c=n.length;return{stops:n,outerColors:[c?n[0].color:"transparent",c?n[c-1].color:"transparent"]}}});function Pz(e,t,i){if(i[0]===i[1])return i.slice();for(var n=(i[1]-i[0])/200,r=i[0],a=[],o=0;o<=200&&r<i[1];o++)a.push(r),r+=n;return a.push(i[1]),a}var kz=ty.extendComponentView({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(e,t){this.ecModel=e,this.api=t,this.visualMapModel},render:function(e,t,i,n){this.visualMapModel=e,!1!==e.get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(e){var t=this.visualMapModel,i=Pu.normalizeCssArray(t.get("padding")||0),n=e.getBoundingRect();e.add(new ru.Rect({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},getControllerVisual:function(e,t,i){var n=(i=i||{}).forceState,r=this.visualMapModel,a={};if("symbol"===t&&(a.symbol=r.get("itemSymbol")),"color"===t){var o=r.get("contentColor");a.color=o}function s(e){return a[e]}function l(e,t){a[e]=t}var u=r.controllerVisuals[n||r.getValueState(e)],c=jI.prepareVisualTypes(u);return we.each(c,(function(n){var r=u[n];i.convertOpacityToAlpha&&"opacity"===n&&(n="colorAlpha",r=u.__alphaForOpacity),jI.dependsOn(n,t)&&r&&r.applyVisual(e,s,l)})),a[t]},positionGroup:function(e){var t=this.visualMapModel,i=this.api;Hu.positionElement(e,t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:we.noop}),Oz=Hu.getLayoutRect;var Rz={getItemAlign:function(e,t,i){var n=e.option,r=n.align;if(null!=r&&"auto"!==r)return r;for(var a={width:t.getWidth(),height:t.getHeight()},o="horizontal"===n.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[o],u=[0,null,10],c={},h=0;h<3;h++)c[s[1-o][h]]=u[h],c[l[h]]=2===h?i[0]:n[l[h]];var d=[["x","width",3],["y","height",0]][o],p=Oz(c,a,n.padding);return l[(p.margin[d[2]]||0)+p[d[0]]+.5*p[d[1]]<.5*a[d[1]]?0:1]},makeHighDownBatch:function(e,t){return we.each(e||[],(function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")})),e}},Nz=Su.linearMap,Ez=we.each,zz=Math.min,Bz=Math.max,Vz=kz.extend({type:"visualMap.continuous",init:function(){Vz.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(e,t,i,n){n&&"selectDataRange"===n.type&&n.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var i=e.get("text");this._renderEndsText(t,i,0),this._renderEndsText(t,i,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},_renderEndsText:function(e,t,i){if(t){var n=t[1-i];n=null!=n?n+"":"";var r=this.visualMapModel,a=r.get("textGap"),o=r.itemSize,s=this._shapes.barGroup,l=this._applyTransform([o[0]/2,0===i?-a:o[1]+a],s),u=this._applyTransform(0===i?"bottom":"top",s),c=this._orient,h=this.visualMapModel.textStyleModel;this.group.add(new ru.Text({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===c?"middle":u,textAlign:"horizontal"===c?u:"center",text:n,textFont:h.getFont(),textFill:h.getTextColor()}}))}},_renderBar:function(e){var t=this.visualMapModel,i=this._shapes,n=t.itemSize,r=this._orient,a=this._useHandle,o=Rz.getItemAlign(t,this.api,n),s=i.barGroup=this._createBarGroup(o);s.add(i.outOfRange=Fz()),s.add(i.inRange=Fz(null,a?Hz(this._orient):null,we.bind(this._dragHandle,this,"all",!1),we.bind(this._dragHandle,this,"all",!0)));var l=t.textStyleModel.getTextRect("国"),u=Bz(l.width,l.height);a&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(s,0,n,u,r,o),this._createHandle(s,1,n,u,r,o)),this._createIndicator(s,n,u,r),e.add(s)},_createHandle:function(e,t,i,n,r){var a=we.bind(this._dragHandle,this,t,!1),o=we.bind(this._dragHandle,this,t,!0),s=Fz(function(e,t){return 0===e?[[0,0],[t,0],[t,-t]]:[[0,0],[t,0],[t,t]]}(t,n),Hz(this._orient),a,o);s.position[0]=i[0],e.add(s);var l=this.visualMapModel.textStyleModel,u=new ru.Text({draggable:!0,drift:a,onmousemove:function(e){Je.stop(e.event)},ondragend:o,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var c=["horizontal"===r?n/2:1.5*n,"horizontal"===r?0===t?-1.5*n:1.5*n:0===t?-n/2:n/2],h=this._shapes;h.handleThumbs[t]=s,h.handleLabelPoints[t]=c,h.handleLabels[t]=u},_createIndicator:function(e,t,i,n){var r=Fz([[0,0]],"move");r.position[0]=t[0],r.attr({invisible:!0,silent:!0}),e.add(r);var a=this.visualMapModel.textStyleModel,o=new ru.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(o);var s=["horizontal"===n?i/2:9,0],l=this._shapes;l.indicator=r,l.indicatorLabel=o,l.indicatorLabelPoint=s},_dragHandle:function(e,t,i,n){if(this._useHandle){if(this._dragging=!t,!t){var r=this._applyTransform([i,n],this._shapes.barGroup,!0);this._updateInterval(e,r[1]),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():Gz(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},_resetInterval:function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),i=e.getExtent(),n=[0,e.itemSize[1]];this._handleEnds=[Nz(t[0],i,n,!0),Nz(t[1],i,n,!0)]},_updateInterval:function(e,t){t=t||0;var i=this.visualMapModel,n=this._handleEnds,r=[0,i.itemSize[1]];OA(t,n,r,e,0);var a=i.getExtent();this._dataInterval=[Nz(n[0],r,a,!0),Nz(n[1],r,a,!0)]},_updateView:function(e){var t=this.visualMapModel,i=t.getExtent(),n=this._shapes,r=[0,t.itemSize[1]],a=e?r:this._handleEnds,o=this._createBarVisual(this._dataInterval,i,a,"inRange"),s=this._createBarVisual(i,i,r,"outOfRange");n.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),n.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(a,o)},_createBarVisual:function(e,t,i,n){var r={forceState:n,convertOpacityToAlpha:!0},a=this._makeColorGradient(e,r),o=[this.getControllerVisual(e[0],"symbolSize",r),this.getControllerVisual(e[1],"symbolSize",r)],s=this._createBarPoints(i,o);return{barColor:new Qs(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},_makeColorGradient:function(e,t){var i=[],n=(e[1]-e[0])/100;i.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var r=1;r<100;r++){var a=e[0]+n*r;if(a>e[1])break;i.push({color:this.getControllerVisual(a,"color",t),offset:r/100})}return i.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),i},_createBarPoints:function(e,t){var i=this.visualMapModel.itemSize;return[[i[0]-t[0],e[0]],[i[0],e[0]],[i[0],e[1]],[i[0]-t[1],e[1]]]},_createBarGroup:function(e){var t=this._orient,i=this.visualMapModel.get("inverse");return new ru.Group("horizontal"!==t||i?"horizontal"===t&&i?{scale:"bottom"===e?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==t||i?{scale:"left"===e?[1,1]:[-1,1]}:{scale:"left"===e?[1,-1]:[-1,-1]}:{scale:"bottom"===e?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(e,t){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,r=i.handleThumbs,a=i.handleLabels;Ez([0,1],(function(o){var s=r[o];s.setStyle("fill",t.handlesColor[o]),s.position[1]=e[o];var l=ru.applyTransform(i.handleLabelPoints[o],ru.getTransform(s,this.group));a[o].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===o?"bottom":"top":"left",i.barGroup)})}),this)}},_showIndicator:function(e,t,i,n){var r=this.visualMapModel,a=r.getExtent(),o=r.itemSize,s=[0,o[1]],l=Nz(e,a,s,!0),u=this._shapes,c=u.indicator;if(c){c.position[1]=l,c.attr("invisible",!1),c.setShape("points",function(e,t,i,n){return e?[[0,-zz(t,Bz(i,0))],[6,0],[0,zz(t,Bz(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,o[1]));var h=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0});c.setStyle("fill",h);var d=ru.applyTransform(u.indicatorLabelPoint,ru.getTransform(c,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var f=this._applyTransform("left",u.barGroup),g=this._orient;p.setStyle({text:(i||"")+r.formatValueText(t),textVerticalAlign:"horizontal"===g?f:"middle",textAlign:"horizontal"===g?"center":f,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var e=this;this._shapes.barGroup.on("mousemove",(function(t){if(e._hovering=!0,!e._dragging){var i=e.visualMapModel.itemSize,n=e._applyTransform([t.offsetX,t.offsetY],e._shapes.barGroup,!0,!0);n[1]=zz(Bz(0,n[1]),i[1]),e._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}})).on("mouseout",(function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()}))},_enableHoverLinkFromSeries:function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(e,t){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var r=[0,n[1]],a=i.getExtent();e=zz(Bz(r[0],e),r[1]);var o=function(e,t,i){var n=6,r=e.get("hoverLinkDataSize");r&&(n=Nz(r,t,i,!0)/2);return n}(i,a,r),s=[e-o,e+o],l=Nz(e,r,a,!0),u=[Nz(s[0],r,a,!0),Nz(s[1],r,a,!0)];s[0]<r[0]&&(u[0]=-1/0),s[1]>r[1]&&(u[1]=1/0),t&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",o):u[1]===1/0?this._showIndicator(l,u[0],"> ",o):this._showIndicator(l,l,"≈ ",o));var c=this._hoverLinkDataIndices,h=[];(t||Gz(i))&&(h=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=xa.compressBatches(c,h);this._dispatchHighDown("downplay",Rz.makeHighDownBatch(d[0],i)),this._dispatchHighDown("highlight",Rz.makeHighDownBatch(d[1],i))}},_hoverLinkFromSeriesMouseOver:function(e){var t=e.target,i=this.visualMapModel;if(t&&null!=t.dataIndex){var n=this.ecModel.getSeriesByIndex(t.seriesIndex);if(i.isTargetSeries(n)){var r=n.getData(t.dataType),a=r.get(i.getDataDimension(r),t.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",Rz.makeHighDownBatch(e,this.visualMapModel)),e.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},_applyTransform:function(e,t,i,n){var r=ru.getTransform(t,n?null:this.group);return ru[we.isArray(e)?"applyTransform":"transformDirection"](e,r,i)},_dispatchHighDown:function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function Fz(e,t,i,n){return new ru.Polygon({shape:{points:e},draggable:!!i,cursor:t,drift:i,onmousemove:function(e){Je.stop(e.event)},ondragend:n})}function Gz(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function Hz(e){return"vertical"===e?"ns-resize":"ew-resize"}ty.registerAction({type:"selectDataRange",event:"dataRangeSelected",update:"update"},(function(e,t){t.eachComponent({mainType:"visualMap",query:e},(function(t){t.setSelected(e.selected)}))})),ty.registerPreprocessor(gz);var Wz=Su.reformIntervals,jz=Cz.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(e,t){jz.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();Uz[this._mode].call(this),this._resetSelected(e,t);var n=this.option.categories;this.resetVisual((function(e,t){"categories"===i?(e.mappingMethod="category",e.categories=we.clone(n)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=we.map(this._pieceList,(function(e){e=we.clone(e);return"inRange"!==t&&(e.visual=null),e})))}))},completeVisualOption:function(){var e=this.option,t={},i=jI.listVisualTypes(),n=this.isCategory();function r(e,t,i){return e&&e[t]&&(we.isObject(e[t])?e[t].hasOwnProperty(i):e[t]===i)}we.each(e.pieces,(function(e){we.each(i,(function(i){e.hasOwnProperty(i)&&(t[i]=1)}))})),we.each(t,(function(t,i){var a=0;we.each(this.stateList,(function(t){a|=r(e,t,i)||r(e.target,t,i)}),this),!a&&we.each(this.stateList,(function(t){(e[t]||(e[t]={}))[i]=_z.get(i,"inRange"===t?"active":"inactive",n)}))}),this),Cz.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(e,t){var i=this.option,n=this._pieceList,r=(t?i:e).selected||{};if(i.selected=r,we.each(n,(function(e,t){var i=this.getSelectedMapKey(e);r.hasOwnProperty(i)||(r[i]=!0)}),this),"single"===i.selectedMode){var a=!1;we.each(n,(function(e,t){var i=this.getSelectedMapKey(e);r[i]&&(a?r[i]=!1:a=!0)}),this)}},getSelectedMapKey:function(e){return"categories"===this._mode?e.value+"":e.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(e){this.option.selected=we.clone(e)},getValueState:function(e){var t=jI.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},findTargetDataIndices:function(e){var t=[];return this.eachTargetSeries((function(i){var n=[],r=i.getData();r.each(this.getDataDimension(r),(function(t,i){jI.findPieceIndex(t,this._pieceList)===e&&n.push(i)}),this),t.push({seriesId:i.id,dataIndex:n})}),this),t},getRepresentValue:function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var i=e.interval||[];t=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return t},getVisualMeta:function(e){if(!this.isCategory()){var t=[],i=[],n=this,r=this._pieceList.slice();if(r.length){var a=r[0].interval[0];a!==-1/0&&r.unshift({interval:[-1/0,a]}),(a=r[r.length-1].interval[1])!==1/0&&r.push({interval:[a,1/0]})}else r.push({interval:[-1/0,1/0]});var o=-1/0;return we.each(r,(function(e){var t=e.interval;t&&(t[0]>o&&s([o,t[0]],"outOfRange"),s(t.slice()),o=t[1])}),this),{stops:t,outerColors:i}}function s(r,a){var o=n.getRepresentValue({interval:r});a||(a=n.getValueState(o));var s=e(o,a);r[0]===-1/0?i[0]=s:r[1]===1/0?i[1]=s:t.push({value:r[0],color:s},{value:r[1],color:s})}}}),Uz={splitNumber:function(){var e=this.option,t=this._pieceList,i=Math.min(e.precision,20),n=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var a=(n[1]-n[0])/r;+a.toFixed(i)!==a&&i<5;)i++;e.precision=i,a=+a.toFixed(i),e.minOpen&&t.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<r;s+=a,o++){var l=o===r-1?n[1]:s+a;t.push({interval:[s,l],close:[1,1]})}e.maxOpen&&t.push({interval:[n[1],1/0],close:[0,0]}),Wz(t),we.each(t,(function(e,t){e.index=t,e.text=this.formatValueText(e.interval)}),this)},categories:function(){var e=this.option;we.each(e.categories,(function(e){this._pieceList.push({text:this.formatValueText(e,!0),value:e})}),this),Zz(e,this._pieceList)},pieces:function(){var e=this.option,t=this._pieceList;we.each(e.pieces,(function(e,i){we.isObject(e)||(e={value:e});var n={text:"",index:i};if(null!=e.label&&(n.text=e.label),e.hasOwnProperty("value")){var r=n.value=e.value;n.interval=[r,r],n.close=[1,1]}else{for(var a=n.interval=[],o=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],c=0;c<2;c++){for(var h=[["gte","gt","min"],["lte","lt","max"]][c],d=0;d<3&&null==a[c];d++)a[c]=e[h[d]],o[c]=s[d],u[c]=2===d;null==a[c]&&(a[c]=l[c])}u[0]&&a[1]===1/0&&(o[0]=0),u[1]&&a[0]===-1/0&&(o[1]=0),a[0]===a[1]&&o[0]&&o[1]&&(n.value=a[0])}n.visual=jI.retrieveVisuals(e),t.push(n)}),this),Zz(e,t),Wz(t),we.each(t,(function(e){var t=e.close,i=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,i)}),this)}};function Zz(e,t){var i=e.inverse;("vertical"===e.orient?!i:i)&&t.reverse()}var Yz=iv.createSymbol;kz.extend({type:"visualMap.piecewise",doRender:function(){var e=this.group;e.removeAll();var t=this.visualMapModel,i=t.get("textGap"),n=t.textStyleModel,r=n.getFont(),a=n.getTextColor(),o=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,c=we.retrieve(t.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],s,c,o),we.each(l.viewPieceList,(function(n){var l=n.piece,u=new ru.Group;u.onclick=we.bind(this._onItemClick,this,l),this._enableHoverLink(u,n.indexInModelPieceList);var h=t.getRepresentValue(l);if(this._createItemSymbol(u,h,[0,0,s[0],s[1]]),c){var d=this.visualMapModel.getValueState(h);u.add(new ru.Text({style:{x:"right"===o?-i:s[0]+i,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:o,textFont:r,textFill:a,opacity:"outOfRange"===d?.5:1}}))}e.add(u)}),this),u&&this._renderEndsText(e,u[1],s,c,o),Hu.box(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(e,t){function i(e){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:e,batch:Rz.makeHighDownBatch(i.findTargetDataIndices(t),i)})}e.on("mouseover",we.bind(i,this,"highlight")).on("mouseout",we.bind(i,this,"downplay"))},_getItemAlign:function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return Rz.getItemAlign(e,this.api,e.itemSize);var i=t.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(e,t,i,n,r){if(t){var a=new ru.Group,o=this.visualMapModel.textStyleModel;a.add(new ru.Text({style:{x:n?"right"===r?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?r:"center",text:t,textFont:o.getFont(),textFill:o.getTextColor()}})),e.add(a)}},_getViewData:function(){var e=this.visualMapModel,t=we.map(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),i=e.get("text"),n=e.get("orient"),r=e.get("inverse");return("horizontal"===n?r:!r)?t.reverse():i&&(i=i.slice().reverse()),{viewPieceList:t,endsText:i}},_createItemSymbol:function(e,t,i){e.add(Yz(this.getControllerVisual(t,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(t,"color")))},_onItemClick:function(e){var t=this.visualMapModel,i=t.option,n=we.clone(i.selected),r=t.getSelectedMapKey(e);"single"===i.selectedMode?(n[r]=!0,we.each(n,(function(e,t){n[t]=t===r}))):n[r]=!n[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});ty.registerPreprocessor(gz);var qz,Xz="urn:schemas-microsoft-com:vml",Kz="undefined"==typeof window?null:window,Qz=!1,Jz=Kz&&Kz.document;if(Jz&&!J.canvasSupported)try{!Jz.namespaces.zrvml&&Jz.namespaces.add("zrvml",Xz),qz=function(e){return Jz.createElement("<zrvml:"+e+' class="zrvml">')}}catch(e){qz=function(e){return Jz.createElement("<"+e+' xmlns="'+Xz+'" class="zrvml">')}}var $z={doc:Jz,createNode:function(e){return qz(e)},initVML:function(){if(!Qz&&Jz){Qz=!0;var e=Jz.styleSheets;e.length<31?Jz.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):e[0].addRule(".zrvml","behavior:url(#default#VML)")}}},eB=Ce.applyTransform,tB=mo.CMD,iB=Math.round,nB=Math.sqrt,rB=Math.abs,aB=Math.cos,oB=Math.sin,sB=Math.max;if(!J.canvasSupported){var lB=21600,uB=lB/2,cB=function(e){e.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",e.coordsize=lB+","+lB,e.coordorigin="0,0"},hB=function(e,t,i){return"rgb("+[e,t,i].join(",")+")"},dB=function(e,t){t&&e&&t.parentNode!==e&&e.appendChild(t)},pB=function(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)},fB=function(e,t,i){return 1e5*(parseFloat(e)||0)+1e3*(parseFloat(t)||0)+i},gB=mr.parsePercent,mB=function(e,t,i){var n=Kt.parse(t);i=+i,isNaN(i)&&(i=1),n&&(e.color=hB(n[0],n[1],n[2]),e.opacity=i*n[3])},vB=function(e){var t=Kt.parse(e);return[hB(t[0],t[1],t[2]),t[3]]},yB=function(e,t,i,n){var r="fill"===t,a=e.getElementsByTagName(t)[0];null!=i[t]&&"none"!==i[t]&&(r||!r&&i.lineWidth)?(e[r?"filled":"stroked"]="true",i[t]instanceof Xs&&pB(e,a),a||(a=$z.createNode(t)),r?function(e,t,i){var n=t.fill;if(null!=n)if(n instanceof Xs){var r,a=0,o=[0,0],s=0,l=1,u=i.getBoundingRect(),c=u.width,h=u.height;if("linear"===n.type){r="gradient";var d=i.transform,p=[n.x*c,n.y*h],f=[n.x2*c,n.y2*h];d&&(eB(p,p,d),eB(f,f,d));var g=f[0]-p[0],m=f[1]-p[1];(a=180*Math.atan2(g,m)/Math.PI)<0&&(a+=360),a<1e-6&&(a=0)}else{r="gradientradial";p=[n.x*c,n.y*h],d=i.transform;var v=i.scale,y=c,x=h;o=[(p[0]-u.x)/y,(p[1]-u.y)/x],d&&eB(p,p,d),y/=v[0]*lB,x/=v[1]*lB;var _=sB(y,x);s=0/_,l=2*n.r/_-s}var b=n.colorStops.slice();b.sort((function(e,t){return e.offset-t.offset}));for(var w=b.length,S=[],M=[],I=0;I<w;I++){var T=b[I],A=vB(T.color);M.push(T.offset*l+s+" "+A[0]),0!==I&&I!==w-1||S.push(A)}if(w>=2){var C=S[0][0],D=S[1][0],L=S[0][1]*t.opacity,P=S[1][1]*t.opacity;e.type=r,e.method="none",e.focus="100%",e.angle=a,e.color=C,e.color2=D,e.colors=M.join(","),e.opacity=P,e.opacity2=L}"radial"===r&&(e.focusposition=o.join(","))}else mB(e,n,t.opacity)}(a,i,n):function(e,t){t.lineDash&&(e.dashstyle=t.lineDash.join(" ")),null==t.stroke||t.stroke instanceof Xs||mB(e,t.stroke,t.opacity)}(a,i),dB(e,a)):(e[r?"filled":"stroked"]="false",pB(e,a))},xB=[[],[],[]];Go.prototype.brushVML=function(e){var t=this.style,i=this._vmlEl;i||(i=$z.createNode("shape"),cB(i),this._vmlEl=i),yB(i,"fill",t,this),yB(i,"stroke",t,this);var n=this.transform,r=null!=n,a=i.getElementsByTagName("stroke")[0];if(a){var o=t.lineWidth;if(r&&!t.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];o*=nB(rB(s))}a.weight=o+"px"}var l=this.path||(this.path=new mo);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=function(e,t){var i,n,r,a,o,s,l=tB.M,u=tB.C,c=tB.L,h=tB.A,d=tB.Q,p=[],f=e.data,g=e.len();for(a=0;a<g;){switch(n="",i=0,r=f[a++]){case l:n=" m ",i=1,o=f[a++],s=f[a++],xB[0][0]=o,xB[0][1]=s;break;case c:n=" l ",i=1,o=f[a++],s=f[a++],xB[0][0]=o,xB[0][1]=s;break;case d:case u:n=" c ",i=3;var m,v,y=f[a++],x=f[a++],_=f[a++],b=f[a++];r===d?(m=_,v=b,_=(_+2*y)/3,b=(b+2*x)/3,y=(o+2*y)/3,x=(s+2*x)/3):(m=f[a++],v=f[a++]),xB[0][0]=y,xB[0][1]=x,xB[1][0]=_,xB[1][1]=b,xB[2][0]=m,xB[2][1]=v,o=m,s=v;break;case h:var w=0,S=0,M=1,I=1,T=0;t&&(w=t[4],S=t[5],M=nB(t[0]*t[0]+t[1]*t[1]),I=nB(t[2]*t[2]+t[3]*t[3]),T=Math.atan2(-t[1]/I,t[0]/M));var A=f[a++],C=f[a++],D=f[a++],L=f[a++],P=f[a++]+T,k=f[a++]+P+T;a++;var O=f[a++],R=A+aB(P)*D,N=C+oB(P)*L,E=(y=A+aB(k)*D,x=C+oB(k)*L,O?" wa ":" at ");Math.abs(R-y)<1e-4&&(Math.abs(k-P)>.01?O&&(R+=.0125):Math.abs(N-C)<1e-4?O&&R<A||!O&&R>A?x-=.0125:x+=.0125:O&&N<C||!O&&N>C?y+=.0125:y-=.0125),p.push(E,iB(((A-D)*M+w)*lB-uB),",",iB(((C-L)*I+S)*lB-uB),",",iB(((A+D)*M+w)*lB-uB),",",iB(((C+L)*I+S)*lB-uB),",",iB((R*M+w)*lB-uB),",",iB((N*I+S)*lB-uB),",",iB((y*M+w)*lB-uB),",",iB((x*I+S)*lB-uB)),o=y,s=x;break;case tB.R:var z=xB[0],B=xB[1];z[0]=f[a++],z[1]=f[a++],B[0]=z[0]+f[a++],B[1]=z[1]+f[a++],t&&(eB(z,z,t),eB(B,B,t)),z[0]=iB(z[0]*lB-uB),B[0]=iB(B[0]*lB-uB),z[1]=iB(z[1]*lB-uB),B[1]=iB(B[1]*lB-uB),p.push(" m ",z[0],",",z[1]," l ",B[0],",",z[1]," l ",B[0],",",B[1]," l ",z[0],",",B[1]);break;case tB.Z:p.push(" x ")}if(i>0){p.push(n);for(var V=0;V<i;V++){var F=xB[V];t&&eB(F,F,t),p.push(iB(F[0]*lB-uB),",",iB(F[1]*lB-uB),V<i-1?",":"")}}}return p.join("")}(l,this.transform),i.style.zIndex=fB(this.zlevel,this.z,this.z2),dB(e,i),null!=t.text?this.drawRectText(e,this.getBoundingRect()):this.removeRectText(e)},Go.prototype.onRemove=function(e){pB(e,this._vmlEl),this.removeRectText(e)},Go.prototype.onAdd=function(e){dB(e,this._vmlEl),this.appendRectText(e)};Mr.prototype.brushVML=function(e){var t,i,n,r=this.style,a=r.image;if("object"==typeof(n=a)&&n.tagName&&"IMG"===n.tagName.toUpperCase()){var o=a.src;if(o===this._imageSrc)t=this._imageWidth,i=this._imageHeight;else{var s=a.runtimeStyle,l=s.width,u=s.height;s.width="auto",s.height="auto",t=a.width,i=a.height,s.width=l,s.height=u,this._imageSrc=o,this._imageWidth=t,this._imageHeight=i}a=o}else a===this._imageSrc&&(t=this._imageWidth,i=this._imageHeight);if(a){var c=r.x||0,h=r.y||0,d=r.width,p=r.height,f=r.sWidth,g=r.sHeight,m=r.sx||0,v=r.sy||0,y=f&&g,x=this._vmlEl;x||(x=$z.doc.createElement("div"),cB(x),this._vmlEl=x);var _,b=x.style,w=!1,S=1,M=1;if(this.transform&&(_=this.transform,S=nB(_[0]*_[0]+_[1]*_[1]),M=nB(_[2]*_[2]+_[3]*_[3]),w=_[1]||_[2]),w){var I=[c,h],T=[c+d,h],A=[c,h+p],C=[c+d,h+p];eB(I,I,_),eB(T,T,_),eB(A,A,_),eB(C,C,_);var D=sB(I[0],T[0],A[0],C[0]),L=sB(I[1],T[1],A[1],C[1]),P=[];P.push("M11=",_[0]/S,",","M12=",_[2]/M,",","M21=",_[1]/S,",","M22=",_[3]/M,",","Dx=",iB(c*S+_[4]),",","Dy=",iB(h*M+_[5])),b.padding="0 "+iB(D)+"px "+iB(L)+"px 0",b.filter="progid:DXImageTransform.Microsoft.Matrix("+P.join("")+", SizingMethod=clip)"}else _&&(c=c*S+_[4],h=h*M+_[5]),b.filter="",b.left=iB(c)+"px",b.top=iB(h)+"px";var k=this._imageEl,O=this._cropEl;k||(k=$z.doc.createElement("div"),this._imageEl=k);var R=k.style;if(y){if(t&&i)R.width=iB(S*t*d/f)+"px",R.height=iB(M*i*p/g)+"px";else{var N=new Image,E=this;N.onload=function(){N.onload=null,t=N.width,i=N.height,R.width=iB(S*t*d/f)+"px",R.height=iB(M*i*p/g)+"px",E._imageWidth=t,E._imageHeight=i,E._imageSrc=a},N.src=a}O||((O=$z.doc.createElement("div")).style.overflow="hidden",this._cropEl=O);var z=O.style;z.width=iB((d+m*d/f)*S),z.height=iB((p+v*p/g)*M),z.filter="progid:DXImageTransform.Microsoft.Matrix(Dx="+-m*d/f*S+",Dy="+-v*p/g*M+")",O.parentNode||x.appendChild(O),k.parentNode!==O&&O.appendChild(k)}else R.width=iB(S*d)+"px",R.height=iB(M*p)+"px",x.appendChild(k),O&&O.parentNode&&(x.removeChild(O),this._cropEl=null);var B="",V=r.opacity;V<1&&(B+=".Alpha(opacity="+iB(100*V)+") "),B+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+a+", SizingMethod=scale)",R.filter=B,x.style.zIndex=fB(this.zlevel,this.z,this.z2),dB(e,x),null!=r.text&&this.drawRectText(e,this.getBoundingRect())}},Mr.prototype.onRemove=function(e){pB(e,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(e)},Mr.prototype.onAdd=function(e){dB(e,this._vmlEl),this.appendRectText(e)};var _B,bB={},wB=0,SB=document.createElement("div");Fn.$override("measureText",(function(e,t){var i=$z.doc;_B||((_B=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",$z.doc.body.appendChild(_B));try{_B.style.font=t}catch(e){}return _B.innerHTML="",_B.appendChild(i.createTextNode(e)),{width:_B.offsetWidth}}));for(var MB=new Ni,IB=function(e,t,i,n){var r=this.style;this.__dirty&&mr.normalizeTextStyle(r,!0);var a=r.text;if(null!=a&&(a+=""),a){if(r.rich){var o=Fn.parseRichText(a,r);a=[];for(var s=0;s<o.lines.length;s++){for(var l=o.lines[s].tokens,u=[],c=0;c<l.length;c++)u.push(l[c].text);a.push(u.join(""))}a=a.join("\n")}var h,d,p=r.textAlign,f=r.textVerticalAlign,g=function(e){var t=bB[e];if(!t){wB>100&&(wB=0,bB={});var i,n=SB.style;try{n.font=e,i=n.fontFamily.split(",")[0]}catch(e){}t={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},bB[e]=t,wB++}return t}(r.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';i=i||Fn.getBoundingRect(a,m,p,f,r.textPadding,r.textLineHeight);var v=this.transform;if(v&&!n&&(MB.copy(t),MB.applyTransform(v),t=MB),n)h=t.x,d=t.y;else{var y=r.textPosition;if(y instanceof Array)h=t.x+gB(y[0],t.width),d=t.y+gB(y[1],t.height),p=p||"left";else{var x=this.calculateTextPosition?this.calculateTextPosition({},r,t):Fn.calculateTextPosition({},r,t);h=x.x,d=x.y,p=p||x.textAlign,f=f||x.textVerticalAlign}}h=Fn.adjustTextX(h,i.width,p),d=Fn.adjustTextY(d,i.height,f),d+=i.height/2;var _,b,w,S=$z.createNode,M=this._textVmlEl;M?b=(_=(w=M.firstChild).nextSibling).nextSibling:(M=S("line"),_=S("path"),b=S("textpath"),w=S("skew"),b.style["v-text-align"]="left",cB(M),_.textpathok=!0,b.on=!0,M.from="0 0",M.to="1000 0.05",dB(M,w),dB(M,_),dB(M,b),this._textVmlEl=M);var I=[h,d],T=M.style;v&&n?(eB(I,I,v),w.on=!0,w.matrix=v[0].toFixed(3)+","+v[2].toFixed(3)+","+v[1].toFixed(3)+","+v[3].toFixed(3)+",0,0",w.offset=(iB(I[0])||0)+","+(iB(I[1])||0),w.origin="0 0",T.left="0px",T.top="0px"):(w.on=!1,T.left=iB(h)+"px",T.top=iB(d)+"px"),b.string=String(a).replace(/&/g,"&amp;").replace(/"/g,"&quot;");try{b.style.font=m}catch(e){}yB(M,"fill",{fill:r.textFill,opacity:r.opacity},this),yB(M,"stroke",{stroke:r.textStroke,opacity:r.opacity,lineDash:r.lineDash||null},this),M.style.zIndex=fB(this.zlevel,this.z,this.z2),dB(e,M)}},TB=function(e){pB(e,this._textVmlEl),this._textVmlEl=null},AB=function(e){dB(e,this._textVmlEl)},CB=[_r,wr,Mr,Go,ls],DB=0;DB<CB.length;DB++){var LB=CB[DB].prototype;LB.drawRectText=IB,LB.removeRectText=TB,LB.appendRectText=AB}ls.prototype.brushVML=function(e){var t=this.style;null!=t.text?this.drawRectText(e,{x:t.x||0,y:t.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(e)},ls.prototype.onRemove=function(e){this.removeRectText(e)},ls.prototype.onAdd=function(e){this.appendRectText(e)}}var PB=we.each;function kB(e){return parseInt(e,10)}function OB(e,t){$z.initVML(),this.root=e,this.storage=t;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",e.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var r=t.delFromStorage,a=t.addToStorage;t.delFromStorage=function(e){r.call(t,e),e&&e.onRemove&&e.onRemove(n)},t.addToStorage=function(e){e.onAdd&&e.onAdd(n),a.call(t,e)},this._firstPaint=!0}OB.prototype={constructor:OB,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0,!0);this._paintList(e)},_paintList:function(e){for(var t=this._vmlRoot,i=0;i<e.length;i++){var n=e[i];n.invisible||n.ignore?(n.__alreadyNotVisible||n.onRemove(t),n.__alreadyNotVisible=!0):(n.__alreadyNotVisible&&n.onAdd(t),n.__alreadyNotVisible=!1,n.__dirty&&(n.beforeBrush&&n.beforeBrush(),(n.brushVML||n.brush).call(n,t),n.afterBrush&&n.afterBrush())),n.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(t),this._firstPaint=!1)},resize:function(e,t){e=null==e?this._getWidth():e,t=null==t?this._getHeight():t;if(this._width!==e||this._height!==t){this._width=e,this._height=t;var i=this._vmlViewport.style;i.width=e+"px",i.height=t+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var e=this.root,t=e.currentStyle;return(e.clientWidth||kB(t.width))-kB(t.paddingLeft)-kB(t.paddingRight)|0},_getHeight:function(){var e=this.root,t=e.currentStyle;return(e.clientHeight||kB(t.height))-kB(t.paddingTop)-kB(t.paddingBottom)|0}},PB(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(e){OB.prototype[e]=function(){}}));var RB=OB;(0,ha.registerPainter)("vml",RB);var NB={createElement:function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}},EB=NB.createElement,zB=mo.CMD,BB=Array.prototype.join,VB=Math.round,FB=Math.sin,GB=Math.cos,HB=Math.PI,WB=2*Math.PI,jB=180/HB;function UB(e){return VB(1e4*e)/1e4}function ZB(e){return e<1e-4&&e>-1e-4}function YB(e,t){t&&qB(e,"transform","matrix("+BB.call(t,",")+")")}function qB(e,t,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&e.setAttribute(t,i)}function XB(e,t,i,n){if(function(e,t){var i=t?e.textFill:e.fill;return null!=i&&"none"!==i}(t,i)){var r=i?t.textFill:t.fill;qB(e,"fill",r="transparent"===r?"none":r),qB(e,"fill-opacity",null!=t.fillOpacity?t.fillOpacity*t.opacity:t.opacity)}else qB(e,"fill","none");if(function(e,t){var i=t?e.textStroke:e.stroke;return null!=i&&"none"!==i}(t,i)){var a=i?t.textStroke:t.stroke;qB(e,"stroke",a="transparent"===a?"none":a),qB(e,"stroke-width",(i?t.textStrokeWidth:t.lineWidth)/(!i&&t.strokeNoScale?n.getLineScale():1)),qB(e,"paint-order",i?"stroke":"fill"),qB(e,"stroke-opacity",null!=t.strokeOpacity?t.strokeOpacity:t.opacity),t.lineDash?(qB(e,"stroke-dasharray",t.lineDash.join(",")),qB(e,"stroke-dashoffset",VB(t.lineDashOffset||0))):qB(e,"stroke-dasharray",""),t.lineCap&&qB(e,"stroke-linecap",t.lineCap),t.lineJoin&&qB(e,"stroke-linejoin",t.lineJoin),t.miterLimit&&qB(e,"stroke-miterlimit",t.miterLimit)}else qB(e,"stroke","none")}var KB={};KB.brush=function(e){var t=e.style,i=e.__svgEl;i||(i=EB("path"),e.__svgEl=i),e.path||e.createPathProxy();var n=e.path;if(e.__dirtyPath){n.beginPath(),n.subPixelOptimize=!1,e.buildPath(n,e.shape),e.__dirtyPath=!1;var r=function(e){for(var t=[],i=e.data,n=e.len(),r=0;r<n;){var a="",o=0;switch(i[r++]){case zB.M:a="M",o=2;break;case zB.L:a="L",o=2;break;case zB.Q:a="Q",o=4;break;case zB.C:a="C",o=6;break;case zB.A:var s=i[r++],l=i[r++],u=i[r++],c=i[r++],h=i[r++],d=i[r++],p=i[r++],f=i[r++],g=Math.abs(d),m=ZB(g-WB)||(f?d>=WB:-d>=WB),v=d>0?d%WB:d%WB+WB,y=!1;y=!!m||!ZB(g)&&v>=HB==!!f;var x=UB(s+u*GB(h)),_=UB(l+c*FB(h));m&&(d=f?WB-1e-4:1e-4-WB,y=!0,9===r&&t.push("M",x,_));var b=UB(s+u*GB(h+d)),w=UB(l+c*FB(h+d));t.push("A",UB(u),UB(c),VB(p*jB),+y,+f,b,w);break;case zB.Z:a="Z";break;case zB.R:b=UB(i[r++]),w=UB(i[r++]);var S=UB(i[r++]),M=UB(i[r++]);t.push("M",b,w,"L",b+S,w,"L",b+S,w+M,"L",b,w+M,"L",b,w)}a&&t.push(a);for(var I=0;I<o;I++)t.push(UB(i[r++]))}return t.join(" ")}(n);r.indexOf("NaN")<0&&qB(i,"d",r)}XB(i,t,!1,e),YB(i,e.transform),null!=t.text?nV(e,e.getBoundingRect()):aV(e)};var QB={brush:function(e){var t=e.style,i=t.image;i instanceof HTMLImageElement&&(i=i.src);if(i){var n=t.x||0,r=t.y||0,a=t.width,o=t.height,s=e.__svgEl;s||(s=EB("image"),e.__svgEl=s),i!==e.__imageSrc&&(!function(e,t,i){e.setAttributeNS("http://www.w3.org/1999/xlink",t,i)}(s,"href",i),e.__imageSrc=i),qB(s,"width",a),qB(s,"height",o),qB(s,"x",n),qB(s,"y",r),YB(s,e.transform),null!=t.text?nV(e,e.getBoundingRect()):aV(e)}}},JB={},$B=new Ni,eV={},tV=[],iV={left:"start",right:"end",center:"middle",middle:"middle"},nV=function(e,t){var i=e.style,n=e.transform,r=e instanceof ls||i.transformText;e.__dirty&&mr.normalizeTextStyle(i,!0);var a=i.text;if(null!=a&&(a+=""),mr.needDrawText(a,i)){null==a&&(a=""),!r&&n&&($B.copy(t),$B.applyTransform(n),t=$B);var o=e.__textSvgEl;o||(o=EB("text"),e.__textSvgEl=o);var s=o.style,l=i.font||Fn.DEFAULT_FONT,u=o.__computedFont;l!==o.__styleFont&&(s.font=o.__styleFont=l,u=o.__computedFont=s.font);var c=i.textPadding,h=i.textLineHeight,d=e.__textCotentBlock;d&&!e.__dirtyText||(d=e.__textCotentBlock=Fn.parsePlainText(a,u,c,h,i.truncate));var p=d.outerHeight,f=d.lineHeight;mr.getBoxPosition(eV,e,i,t);var g=eV.baseX,m=eV.baseY,v=eV.textAlign||"left",y=eV.textVerticalAlign;!function(e,t,i,n,r,a,o){ft.identity(tV),t&&i&&ft.copy(tV,i);var s=n.textRotation;if(r&&s){var l=n.textOrigin;"center"===l?(a=r.width/2+r.x,o=r.height/2+r.y):l&&(a=l[0]+r.x,o=l[1]+r.y),tV[4]-=a,tV[5]-=o,ft.rotate(tV,tV,s),tV[4]+=a,tV[5]+=o}YB(e,tV)}(o,r,n,i,t,g,m);var x=g,_=Fn.adjustTextY(m,p,y);c&&(x=function(e,t,i){return"right"===t?e-i[1]:"center"===t?e+i[3]/2-i[1]/2:e+i[3]}(g,v,c),_+=c[0]),_+=f/2,XB(o,i,!0,e);var b=d.canCacheByTextString,w=e.__tspanList||(e.__tspanList=[]),S=w.length;if(b&&e.__canCacheByTextString&&e.__text===a){if(e.__dirtyText&&S)for(var M=0;M<S;++M)rV(w[M],v,x,_+M*f)}else{e.__text=a,e.__canCacheByTextString=b;var I=d.lines,T=I.length;for(M=0;M<T;M++){var A=w[M],C=I[M];A?A.__zrText!==C&&(A.innerHTML="",A.appendChild(document.createTextNode(C))):(A=w[M]=EB("tspan"),o.appendChild(A),A.appendChild(document.createTextNode(C))),rV(A,v,x,_+M*f)}if(S>T){for(;M<S;M++)o.removeChild(w[M]);w.length=T}}}};function rV(e,t,i,n){qB(e,"dominant-baseline","middle"),qB(e,"text-anchor",iV[t]),qB(e,"x",i),qB(e,"y",n)}function aV(e){e&&e.__textSvgEl&&(e.__textSvgEl.parentNode&&e.__textSvgEl.parentNode.removeChild(e.__textSvgEl),e.__textSvgEl=null,e.__tspanList=[],e.__text=null)}JB.drawRectText=nV,JB.brush=function(e){null!=e.style.text?nV(e,!1):aV(e)};var oV={path:KB,image:QB,text:JB};function sV(){}function lV(e,t,i,n){for(var r=0,a=t.length,o=0,s=0;r<a;r++){var l=t[r];if(l.removed){for(u=[],c=s;c<s+l.count;c++)u.push(c);l.indices=u,s+=l.count}else{for(var u=[],c=o;c<o+l.count;c++)u.push(c);l.indices=u,o+=l.count,l.added||(s+=l.count)}}return t}function uV(e){return{newPos:e.newPos,components:e.components.slice(0)}}sV.prototype={diff:function(e,t,i){i||(i=function(e,t){return e===t}),this.equals=i;var n=this;e=e.slice();var r=(t=t.slice()).length,a=e.length,o=1,s=r+a,l=[{newPos:-1,components:[]}],u=this.extractCommon(l[0],t,e,0);if(l[0].newPos+1>=r&&u+1>=a){for(var c=[],h=0;h<t.length;h++)c.push(h);return[{indices:c,count:t.length}]}function d(){for(var i=-1*o;i<=o;i+=2){var s,u=l[i-1],c=l[i+1],h=(c?c.newPos:0)-i;u&&(l[i-1]=void 0);var d=u&&u.newPos+1<r,p=c&&0<=h&&h<a;if(d||p){if(!d||p&&u.newPos<c.newPos?(s=uV(c),n.pushComponent(s.components,void 0,!0)):((s=u).newPos++,n.pushComponent(s.components,!0,void 0)),h=n.extractCommon(s,t,e,i),s.newPos+1>=r&&h+1>=a)return lV(n,s.components);l[i]=s}else l[i]=void 0}o++}for(;o<=s;){var p=d();if(p)return p}},pushComponent:function(e,t,i){var n=e[e.length-1];n&&n.added===t&&n.removed===i?e[e.length-1]={count:n.count+1,added:t,removed:i}:e.push({count:1,added:t,removed:i})},extractCommon:function(e,t,i,n){for(var r=t.length,a=i.length,o=e.newPos,s=o-n,l=0;o+1<r&&s+1<a&&this.equals(t[o+1],i[s+1]);)o++,s++,l++;return l&&e.components.push({count:l}),e.newPos=o,s},tokenize:function(e){return e.slice()},join:function(e){return e.slice()}};var cV=new sV;var hV=function(e,t,i){return cV.diff(e,t,i)},dV=NB.createElement,pV=oV.path,fV=oV.image,gV=oV.text;function mV(e,t,i,n,r){this._zrId=e,this._svgRoot=t,this._tagNames="string"==typeof i?[i]:i,this._markLabel=n,this._domName=r||"_dom",this.nextId=0}mV.prototype.createElement=dV,mV.prototype.getDefs=function(e){var t=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?e?((i=t.insertBefore(this.createElement("defs"),t.firstChild)).contains||(i.contains=function(e){var t=i.children;if(!t)return!1;for(var n=t.length-1;n>=0;--n)if(t[n]===e)return!0;return!1}),i):null:i[0]},mV.prototype.update=function(e,t){if(e){var i=this.getDefs(!1);if(e[this._domName]&&i.contains(e[this._domName]))"function"==typeof t&&t(e);else{var n=this.add(e);n&&(e[this._domName]=n)}}},mV.prototype.addDom=function(e){this.getDefs(!0).appendChild(e)},mV.prototype.removeDom=function(e){var t=this.getDefs(!1);t&&e[this._domName]&&(t.removeChild(e[this._domName]),e[this._domName]=null)},mV.prototype.getDoms=function(){var e=this.getDefs(!1);if(!e)return[];var t=[];return we.each(this._tagNames,(function(i){var n=e.getElementsByTagName(i);t=t.concat([].slice.call(n))})),t},mV.prototype.markAllUnused=function(){var e=this.getDoms(),t=this;we.each(e,(function(e){e[t._markLabel]="0"}))},mV.prototype.markUsed=function(e){e&&(e[this._markLabel]="1")},mV.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),i=this;we.each(t,(function(t){"1"!==t[i._markLabel]&&e.removeChild(t)}))}},mV.prototype.getSvgProxy=function(e){return e instanceof Go?pV:e instanceof Mr?fV:e instanceof ls?gV:pV},mV.prototype.getTextSvgElement=function(e){return e.__textSvgEl},mV.prototype.getSvgElement=function(e){return e.__svgEl};var vV=mV;function yV(e,t){vV.call(this,e,t,["linearGradient","radialGradient"],"__gradient_in_use__")}we.inherits(yV,vV),yV.prototype.addWithoutUpdate=function(e,t){if(t&&t.style){var i=this;we.each(["fill","stroke"],(function(n){if(t.style[n]&&("linear"===t.style[n].type||"radial"===t.style[n].type)){var r,a=t.style[n],o=i.getDefs(!0);a._dom?(r=a._dom,o.contains(a._dom)||i.addDom(r)):r=i.add(a),i.markUsed(t);var s=r.getAttribute("id");e.setAttribute(n,"url(#"+s+")")}}))}},yV.prototype.add=function(e){var t;if("linear"===e.type)t=this.createElement("linearGradient");else{if("radial"!==e.type)return null;t=this.createElement("radialGradient")}return e.id=e.id||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-gradient-"+e.id),this.updateDom(e,t),this.addDom(t),t},yV.prototype.update=function(e){var t=this;vV.prototype.update.call(this,e,(function(){var i=e.type,n=e._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?t.updateDom(e,e._dom):(t.removeDom(e),t.add(e))}))},yV.prototype.updateDom=function(e,t){if("linear"===e.type)t.setAttribute("x1",e.x),t.setAttribute("y1",e.y),t.setAttribute("x2",e.x2),t.setAttribute("y2",e.y2);else{if("radial"!==e.type)return;t.setAttribute("cx",e.x),t.setAttribute("cy",e.y),t.setAttribute("r",e.r)}e.global?t.setAttribute("gradientUnits","userSpaceOnUse"):t.setAttribute("gradientUnits","objectBoundingBox"),t.innerHTML="";for(var i=e.colorStops,n=0,r=i.length;n<r;++n){var a=this.createElement("stop");a.setAttribute("offset",100*i[n].offset+"%");var o=i[n].color;if(o.indexOf(!1)){var s=Kt.parse(o)[3],l=Kt.toHex(o);a.setAttribute("stop-color","#"+l),a.setAttribute("stop-opacity",s)}else a.setAttribute("stop-color",i[n].color);t.appendChild(a)}e._dom=t},yV.prototype.markUsed=function(e){if(e.style){var t=e.style.fill;t&&t._dom&&vV.prototype.markUsed.call(this,t._dom),(t=e.style.stroke)&&t._dom&&vV.prototype.markUsed.call(this,t._dom)}};var xV=yV;function _V(e,t){vV.call(this,e,t,"clipPath","__clippath_in_use__")}we.inherits(_V,vV),_V.prototype.update=function(e){var t=this.getSvgElement(e);t&&this.updateDom(t,e.__clipPaths,!1);var i=this.getTextSvgElement(e);i&&this.updateDom(i,e.__clipPaths,!0),this.markUsed(e)},_V.prototype.updateDom=function(e,t,i){if(t&&t.length>0){var n,r,a=this.getDefs(!0),o=t[0],s=i?"_textDom":"_dom";o[s]?(r=o[s].getAttribute("id"),n=o[s],a.contains(n)||a.appendChild(n)):(r="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",r),a.appendChild(n),o[s]=n);var l=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!i){var u=Array.prototype.slice.call(o.transform);ft.mul(o.transform,o.parent.invTransform,o.transform),l.brush(o),o.transform=u}else l.brush(o);var c=this.getSvgElement(o);n.innerHTML="",n.appendChild(c.cloneNode()),e.setAttribute("clip-path","url(#"+r+")"),t.length>1&&this.updateDom(n,t.slice(1),i)}else e&&e.setAttribute("clip-path","none")},_V.prototype.markUsed=function(e){var t=this;e.__clipPaths&&we.each(e.__clipPaths,(function(e){e._dom&&vV.prototype.markUsed.call(t,e._dom),e._textDom&&vV.prototype.markUsed.call(t,e._textDom)}))};var bV=_V;function wV(e,t){vV.call(this,e,t,["filter"],"__filter_in_use__","_shadowDom")}function SV(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY||e.textShadowBlur||e.textShadowOffsetX||e.textShadowOffsetY)}we.inherits(wV,vV),wV.prototype.addWithoutUpdate=function(e,t){if(t&&SV(t.style)){var i;if(t._shadowDom)i=t._shadowDom,this.getDefs(!0).contains(t._shadowDom)||this.addDom(i);else i=this.add(t);this.markUsed(t);var n=i.getAttribute("id");e.style.filter="url(#"+n+")"}},wV.prototype.add=function(e){var t=this.createElement("filter");return e._shadowDomId=e._shadowDomId||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-shadow-"+e._shadowDomId),this.updateDom(e,t),this.addDom(t),t},wV.prototype.update=function(e,t){if(SV(t.style)){var i=this;vV.prototype.update.call(this,t,(function(){i.updateDom(t,t._shadowDom)}))}else this.remove(e,t)},wV.prototype.remove=function(e,t){null!=t._shadowDomId&&(this.removeDom(e),e.style.filter="")},wV.prototype.updateDom=function(e,t){var i=t.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,r,a,o,s=e.style,l=e.scale&&e.scale[0]||1,u=e.scale&&e.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,r=s.shadowOffsetY||0,a=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(t,s);n=s.textShadowOffsetX||0,r=s.textShadowOffsetY||0,a=s.textShadowBlur,o=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",r/u),i.setAttribute("flood-color",o);var c=a/2/l+" "+a/2/u;i.setAttribute("stdDeviation",c),t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width",Math.ceil(a/2*200)+"%"),t.setAttribute("height",Math.ceil(a/2*200)+"%"),t.appendChild(i),e._shadowDom=t},wV.prototype.markUsed=function(e){e._shadowDom&&vV.prototype.markUsed.call(this,e._shadowDom)};var MV=wV,IV=NB.createElement,TV=oV.path,AV=oV.image,CV=oV.text;function DV(e){return parseInt(e,10)}function LV(e,t){return t&&e&&t.parentNode!==e}function PV(e,t,i){if(LV(e,t)&&i){var n=i.nextSibling;n?e.insertBefore(t,n):e.appendChild(t)}}function kV(e,t){if(LV(e,t)){var i=e.firstChild;i?e.insertBefore(t,i):e.appendChild(t)}}function OV(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)}function RV(e){return e.__textSvgEl}function NV(e){return e.__svgEl}var EV=function(e,t,i,n){this.root=e,this.storage=t,this._opts=i=we.extend({},i||{});var r=IV("svg");r.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.setAttribute("version","1.1"),r.setAttribute("baseProfile","full"),r.style.cssText="user-select:none;position:absolute;left:0;top:0;";var a=IV("g");r.appendChild(a);var o=IV("g");r.appendChild(o),this.gradientManager=new xV(n,o),this.clipPathManager=new bV(n,o),this.shadowManager=new MV(n,o);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=r,this._svgRoot=o,this._backgroundRoot=a,this._viewport=s,e.appendChild(s),s.appendChild(r),this.resize(i.width,i.height),this._visibleList=[]};EV.prototype={constructor:EV,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0);this._paintList(e)},setBackgroundColor:function(e){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var t=IV("rect");t.setAttribute("width",this.getWidth()),t.setAttribute("height",this.getHeight()),t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("id",0),t.style.fill=e,this._backgroundRoot.appendChild(t),this._backgroundNode=t},_paintList:function(e){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var t,i,n=this._svgRoot,r=this._visibleList,a=e.length,o=[];for(t=0;t<a;t++){var s=e[t],l=(i=s)instanceof Go?TV:i instanceof Mr?AV:i instanceof ls?CV:TV,u=NV(s)||RV(s);s.invisible||(s.__dirty&&(l&&l.brush(s),this.clipPathManager.update(s),s.style&&(this.gradientManager.update(s.style.fill),this.gradientManager.update(s.style.stroke),this.shadowManager.update(u,s)),s.__dirty=!1),o.push(s))}var c,h=hV(r,o);for(t=0;t<h.length;t++){if((f=h[t]).removed)for(var d=0;d<f.count;d++){u=NV(s=r[f.indices[d]]);var p=RV(s);OV(n,u),OV(n,p)}}for(t=0;t<h.length;t++){var f;if((f=h[t]).added)for(d=0;d<f.count;d++){u=NV(s=o[f.indices[d]]),p=RV(s);c?PV(n,u,c):kV(n,u),u?PV(n,p,u):c?PV(n,p,c):kV(n,p),PV(n,p,u),c=p||u||c,this.gradientManager.addWithoutUpdate(u||p,s),this.shadowManager.addWithoutUpdate(u||p,s),this.clipPathManager.markUsed(s)}else if(!f.removed)for(d=0;d<f.count;d++){u=NV(s=o[f.indices[d]]),p=RV(s),u=NV(s),p=RV(s);this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(u||p,s),this.shadowManager.markUsed(s),this.shadowManager.addWithoutUpdate(u||p,s),this.clipPathManager.markUsed(s),p&&PV(n,p,u),c=u||p||c}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=o},_getDefs:function(e){var t,i=this._svgDom;return 0===(t=i.getElementsByTagName("defs")).length?e?((t=i.insertBefore(IV("defs"),i.firstChild)).contains||(t.contains=function(e){var i=t.children;if(!i)return!1;for(var n=i.length-1;n>=0;--n)if(i[n]===e)return!0;return!1}),t):null:t[0]},resize:function(e,t){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=e&&(n.width=e),null!=t&&(n.height=t),e=this._getSize(0),t=this._getSize(1),i.style.display="",this._width!==e||this._height!==t){this._width=e,this._height=t;var r=i.style;r.width=e+"px",r.height=t+"px";var a=this._svgDom;a.setAttribute("width",e),a.setAttribute("height",t)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",e),this._backgroundNode.setAttribute("height",t))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,i=["width","height"][e],n=["clientWidth","clientHeight"][e],r=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=t[i]&&"auto"!==t[i])return parseFloat(t[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[n]||DV(s[i])||DV(o.style[i]))-(DV(s[r])||0)-(DV(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/></g,">\n\r<"))}},we.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],(function(e){EV.prototype[e]=function(){}}));var zV=EV;(0,ha.registerPainter)("svg",zV);var BV,VV=X((function(e,t){!function(){for(var e in ty){if(null==ty||!ty.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=ty[e]}}(),function(){for(var e in ey){if(null==ey||!ey.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=ey[e]}}()}));(BV=VV)&&BV.__esModule&&Object.prototype.hasOwnProperty.call(BV,"default")&&BV.default;X((function(e,t){var i,n;i=q,n=function(e,t){var i=function(e){"undefined"!=typeof console&&console&&console.error&&console.error(e)};t?t.registerMap?t.registerMap("china",{type:"FeatureCollection",features:[{type:"Feature",id:"710000",properties:{id:"710000",cp:[121.509062,24.044332],name:"台湾",childNum:6},geometry:{type:"MultiPolygon",coordinates:[["@@°Ü¯Û"],["@@ƛĴÕƊÉɼģºðʀ\\ƎsÆNŌÔĚänÜƤɊĂǀĆĴĤǊŨxĚĮǂƺòƌâÔ®ĮXŦţƸZûÐƕƑGđ¨ĭMó·ęcëƝɉlÝƯֹÅŃ^Ó·śŃǋƏďíåɛGɉ¿@ăƑ¥ĘWǬÏĶŁâ"],["@@\\p|WoYG¿¥Ij@¢"],["@@¡@V^RqBbAnTXeRz¤L«³I"],["@@ÆEEkWqë @"],["@@fced"],["@@¯ɜÄèaì¯ØǓIġĽ"],["@@çûĖëĄhòř "]],encodeOffsets:[[[122886,24033]],[[123335,22980]],[[122375,24193]],[[122518,24117]],[[124427,22618]],[[124862,26043]],[[126259,26318]],[[127671,26683]]]}},{type:"Feature",id:"130000",properties:{id:"130000",cp:[114.502461,38.045474],name:"河北",childNum:3},geometry:{type:"MultiPolygon",coordinates:[["@@o~Z]ªrºc_ħ²G¼s`jÎŸnüsÂłNX_M`Ç½ÓnUKĜēs¤­©yrý§uģcJe"],["@@U`Ts¿mÂ"],["@@oºƋÄdeVDJj£J|ÅdzÂFt~KŨ¸IÆv|¢r}èonb}`RÎÄn°ÒdÞ²^®lnÐèĄlðÓ×]ªÆ}LiĂ±Ö`^°Ç¶p®đDcŋ`ZÔ¶êqvFÆN®ĆTH®¦O¾IbÐã´BĐɢŴÆíȦpĐÞXR·nndO¤OÀĈƒ­QgµFo|gȒęSWb©osx|hYhgŃfmÖĩnºTÌSp¢dYĤ¶UĈjlǐpäìë|³kÛfw²Xjz~ÂqbTÑěŨ@|oMzv¢ZrÃVw¬ŧĖ¸f°ÐTªqs{S¯r æÝlNd®²Ğ ǆiGĘJ¼lr}~K¨ŸƐÌWöÆzR¤lêmĞLÎ@¡|q]SvKÑcwpÏÏĿćènĪWlĄkT}J¤~ÈTdpddʾĬBVtEÀ¢ôPĎƗè@~kü\\rÊĔÖæW_§¼F´©òDòjYÈrbĞāøŀG{ƀ|¦ðrb|ÀH`pʞkvGpuARhÞÆǶgĘTǼƹS£¨¡ù³ŘÍ]¿ÂyôEP xX¶¹ÜO¡gÚ¡IwÃé¦ÅBÏ|Ç°N«úmH¯âDùyŜŲIÄuĐ¨D¸dɂFOhđ©OiÃ`ww^ÌkÑH«ƇǤŗĺtFu{Z}Ö@U´ʚLg®¯Oı°Ãw ^VbÉsmAê]]w§RRl£ȭµu¯b{ÍDěïÿȧuT£ġěŗƃĝQ¨fVƋƅn­a@³@ďyÃ½IĹÊKŭfċŰóxV@tƯJ]eR¾fe|rHA|h~Ėƍl§ÏlTíb ØoÅbbx³^zÃĶ¶Sj®AyÂhðk`«PËµEFÛ¬Y¨Ļrõqi¼Wi°§Ð±´°^[À|ĠO@ÆxO\\ta\\tĕtû{ġȧXýĪÓjùÎRb^ÎfK[ÝděYfíÙTyuUSyŌŏů@Oi½éŅ­aVcř§ax¹XŻácWU£ôãºQ¨÷Ñws¥qEHÙ|šYQoŕÇyáĂ£MÃ°oťÊP¡mWO¡v{ôvîēÜISpÌhp¨ jdeŔQÖjX³àĈ[n`Yp@UcM`RKhEbpŞlNut®EtqnsÁgAiúoHqCXhfgu~ÏWP½¢G^}¯ÅīGCÑ^ãziMáļMTÃƘrMc|O_¯Ŏ´|morDkO\\mĆJfl@cĢ¬¢aĦtRıÒ¾ùƀ^juųœK­UFyƝīÛ÷ąV×qƥV¿aȉd³BqPBmaËđŻģmÅ®V¹d^KKonYg¯XhqaLdu¥Ípǅ¡KąÅkĝęěhq}HyÃ]¹ǧ£Í÷¿qáµ§g¤o^á¾ZE¤i`ĳ{nOl»WÝĔįhgF[¿¡ßkOüš_ūiǱàUtėGyl}ÓM}jpEC~¡FtoQiHkk{Ãmï"]],encodeOffsets:[[[119712,40641]],[[121616,39981]],[[116462,37237]]]}},{type:"Feature",id:"140000",properties:{id:"140000",cp:[111.849248,36.857014],name:"山西",childNum:1},geometry:{type:"Polygon",coordinates:["@@ÞĩÒSra}ÁyWix±Üe´lèßÓǏokćiµVZģ¡coTSË¹ĪmnÕńehZg{gtwªpXaĚThȑp{¶Eh®RćƑP¿£Pmc¸mQÝWďȥoÅîɡųAďä³aÏJ½¥PG­ąSM­EÅruµéYÓŌ_dĒCo­Èµ]¯_²ÕjāK~©ÅØ^ÔkïçămÏk]­±cÝ¯ÑÃmQÍ~_apm~ç¡qu{JÅŧ·Ls}EyÁÆcI{¤IiCfUcƌÃp§]ě«vD@¡SÀµMÅwuYY¡DbÑc¡h×]nkoQdaMç~eDÛtT©±@¥ù@É¡ZcW|WqOJmĩl«ħşvOÓ«IqăV¥D[mI~Ó¢cehiÍ]Ɠ~ĥqX·eƷn±}v[ěďŕ]_œ`¹§ÕōIo©b­s^}Ét±ū«³p£ÿ·Wµ|¡¥ăFÏs×¥ŅxÊdÒ{ºvĴÎêÌɊ²¶ü¨|ÞƸµȲLLúÉƎ¤ϊęĔV`_bªS^|dzY|dz¥pZbÆ£¶ÒK}tĦÔņƠPYznÍvX¶Ěn ĠÔzý¦ª÷ÑĸÙUȌ¸dòÜJð´ìúNM¬XZ´¤ŊǸ_tldI{¦ƀðĠȤ¥NehXnYGR° ƬDj¬¸|CĞKqºfƐiĺ©ª~ĆOQª ¤@ìǦɌ²æBÊTŸʂōĖĴŞȀÆÿȄlŤĒötÎ½î¼ĨXh|ªM¤Ðz"],encodeOffsets:[[116874,41716]]}},{type:"Feature",id:"150000",properties:{id:"150000",cp:[111.670801,41.818311],name:"内蒙古",childNum:2},geometry:{type:"MultiPolygon",coordinates:[["@@¯PqFB|S³C|kñHdiÄ¥sŉÅPóÑÑE^ÅPpy_YtShQ·aHwsOnŉÃs©iqjUSiº]ïW«gW¡ARë¥_sgÁnUI«m]jvV¼euhwqAaW_µj»çjioQR¹ēÃßt@r³[ÛlćË^ÍÉáGOUÛOB±XkÅ¹£k|e]olkVÍ¼ÕqtaÏõjgÁ£§U^RLËnX°ÇBz^~wfvypV ¯ƫĉ˭ȫƗŷɿÿĿƑ˃ĝÿÃǃßËőó©ǐȍŒĖM×ÍEyxþp]ÉvïèvƀnÂĴÖ@V~Ĉv¦wĖtējyÄDXÄxGQuv_i¦aBçw˛wD©{tāmQ{EJ§KPśƘƿ¥@sCTÉ}ɃwƇy±gÑ}T[÷kÐç¦«SÒ¥¸ëBX½HáÅµÀğtSÝÂa[ƣ°¯¦Pï¡]£ġÒk®G²èQ°óMq}EóƐÇ\\@áügQÍu¥FTÕ¿Jû]|mvāÎYua^WoÀa·­ząÒot×¶CLƗi¯¤mƎHǊ¤îìɾŊìTdåwsRÖgĒųúÍġäÕ}Q¶¿A[¡{d×uQAMxVvMOmăl«ct[wº_ÇÊjbÂ£ĦS_éQZ_lwgOiýe`YYLq§IÁǳ£ÙË[ÕªuƏ³ÍTs·bÁĽäė[b[ŗfãcn¥îC¿÷µ[ŏÀQ­ōĉm¿Á^£mJVmL[{Ï_£F¥Ö{ŹA}×Wu©ÅaųĳƳhB{·TQqÙIķËZđ©Yc|M¡LeVUóK_QWk_ĥ¿ãZ»X\\ĴuUèlG®ěłTĠğDŃOrÍdÆÍz]±ŭ©Å]ÅÐ}UË¥©TċïxgckfWgi\\ÏĒ¥HkµEë{»ÏetcG±ahUiñiWsɁ·cCÕk]wȑ|ća}wVaĚá G°ùnM¬¯{ÈÐÆA¥ÄêJxÙ¢hP¢ÛºµwWOóFÁz^ÀŗÎú´§¢T¤ǻƺSėǵhÝÅQgvBHouʝl_o¿Ga{ïq{¥|ſĿHĂ÷aĝÇqZñiñC³ª»E`¨åXēÕqÉû[l}ç@čƘóO¿¡FUsAʽīccocÇS}£IS~ălkĩXçmĈŀÐoÐdxÒuL^T{r@¢ÍĝKén£kQyÅõËXŷƏL§~}kq»IHėǅjĝ»ÑÞoå°qTt|r©ÏS¯·eŨĕx«È[eM¿yupN~¹ÏyN£{©għWí»Í¾səšǅ_ÃĀɗ±ąĳĉʍŌŷSÉA±åǥɋ@ë£R©ąP©}ĹªƏj¹erLDĝ·{i«ƫC£µsKCGS|úþXgp{ÁX¿ć{ƱȏñZáĔyoÁhA}ŅĆfdŉ_¹Y°ėǩÑ¡H¯¶oMQqð¡Ë|Ñ`ƭŁX½·óÛxğįÅcQs«tȋǅFù^it«Č¯[hAi©á¥ÇĚ×l|¹y¯YȵƓñǙµïċĻ|Düȭ¶¡oŽäÕG\\ÄT¿Òõr¯LguÏYęRƩɷŌO\\İÐ¢æ^Ŋ ĲȶȆbÜGĝ¬¿ĚVĎgª^íu½jÿĕęjık@Ľ]ėl¥ËĭûÁėéV©±ćn©­ȇÍq¯½YÃÔŉÉNÑÅÝy¹NqáʅDǡËñ­ƁYÅy̱os§ȋµʽǘǏƬɱàưN¢ƔÊuľýľώȪƺɂļxZĈ}ÌŉŪĺœĭFЛĽ̅ȣͽÒŵìƩÇϋÿȮǡŏçƑůĕ~Ç¼ȳÐUfdIxÿ\\G zâɏÙOº·pqy£@qþ@Ǟ˽IBäƣzsÂZÁàĻdñ°ŕzéØűzșCìDȐĴĺf®Àľưø@ɜÖÞKĊŇƄ§͑těï͡VAġÑÑ»d³öǍÝXĉĕÖ{þĉu¸ËʅğU̎éhɹƆ̗̮ȘǊ֥ड़ࡰţાíϲäʮW¬®ҌeרūȠkɬɻ̼ãüfƠSצɩςåȈHϚÎKǳͲOðÏȆƘ¼CϚǚ࢚˼ФÔ¤ƌĞ̪Qʤ´¼mȠJˀƲÀɠmǐnǔĎȆÞǠN~ʢĜ¶ƌĆĘźʆȬ˪ĚĒ¸ĞGȖƴƀj`ĢçĶāàŃºēĢĖćYÀŎüôQÐÂŎŞǆŞêƖoˆDĤÕºÑǘÛˤ³̀gńƘĔÀ^ªƂ`ªt¾äƚêĦĀ¼ÐĔǎ¨Ȕ»͠^ˮÊȦƤøxRrŜH¤¸ÂxDÄ|ø˂˜ƮÐ¬ɚwɲFjĔ²Äw°ǆdÀÉ_ĸdîàŎjÊêTĞªŌŜWÈ|tqĢUB~´°ÎFCU¼pĀēƄN¦¾O¶łKĊOjĚj´ĜYp{¦SĚÍ\\T×ªV÷Ší¨ÅDK°ßtŇĔK¨ǵÂcḷ̌ĚǣȄĽFlġUĵŇȣFʉɁMğįʏƶɷØŭOǽ«ƽū¹Ʊő̝Ȩ§ȞʘĖiɜɶʦ}¨֪ࠜ̀ƇǬ¹ǨE˦ĥªÔêFxúQEr´Wrh¤Ɛ \\talĈDJÜ|[Pll̚¸ƎGú´P¬W¦^¦H]prRn|or¾wLVnÇIujkmon£cX^Bh`¥V¦U¤¸}xRj[^xN[~ªxQ[`ªHÆÂExx^wN¶Ê|¨ìMrdYpoRzNyÀDs~bcfÌ`L¾n|¾T°c¨È¢ar¤`[|òDŞĔöxElÖdHÀI`Ď\\Àì~ÆR¼tf¦^¢ķ¶eÐÚMptgjɡČÅyġLûŇV®ÄÈƀĎ°P|ªVVªj¬ĚÒêp¬E|ŬÂc|ÀtƐK f{ĘFĒƌXƲąo½Ę\\¥o}Ûu£ç­kX{uĩ«āíÓUŅßŢqŤ¥lyň[oi{¦LńðFȪȖĒL¿Ìf£K£ʺoqNwğc`uetOj×°KJ±qÆġmĚŗos¬qehqsuH{¸kH¡ÊRǪÇƌbȆ¢´äÜ¢NìÉʖ¦â©Ġu¦öČ^â£ĂhĖMÈÄw\\fŦ°W ¢¾luŸDw\\̀ʉÌÛMĀ[bÓEn}¶Vcês"]],encodeOffsets:[[[129102,52189]]]}},{type:"Feature",id:"210000",properties:{id:"210000",cp:[123.429096,41.796767],name:"辽宁",childNum:16},geometry:{type:"MultiPolygon",coordinates:[["@@L@@sa"],["@@MnNm"],["@@dc"],["@@eÀC@b"],["@@fXwkbrÄ`qg"],["@@^jtWQ"],["@@~ Y]c"],["@@G`ĔN^_¿ZÃM"],["@@iX¶BY"],["@@YZ"],["@@L_{Epf"],["@@^WqCT\\"],["@@\\[§t|¤_"],["@@m`n_"],["@@Ïxǌ{q_×^Giip"],["@@@é^BntaÊU]x ¯ÄPĲ­°hʙK³VÕ@Y~|EvĹsÇ¦­L^pÃ²ŸÒG Ël]xxÄ_fT¤Ď¤cPC¨¸TVjbgH²sdÎdHt`B²¬GJję¶[ÐhjeXdlwhðSČ¦ªVÊÏÆZÆŶ®²^ÎyÅÎcPqńĚDMħĜŁH­kçvV[ĳ¼WYÀäĦ`XlR`ôLUVfK¢{NZdĒªYĸÌÚJRr¸SA|ƴgŴĴÆbvªØX~źB|¦ÕE¤Ð`\\|KUnnI]¤ÀÂĊnŎR®Ő¿¶\\ÀøíDm¦ÎbŨabaĘ\\ľãÂ¸atÎSƐ´©v\\ÖÚÌǴ¤Â¨JKrZ_ZfjþhPkx`YRIjJcVf~sCN¤ EhæmsHy¨SðÑÌ\\\\ĐRZk°IS§fqŒßýáĞÙÉÖ[^¯ǤŲê´\\¦¬ĆPM¯£»uïpùzExanµyoluqe¦W^£ÊL}ñrkqWňûPUP¡ôJoo·U}£[·¨@XĸDXm­ÛÝºGUCÁª½{íĂ^cjk¶Ã[q¤LÉö³cux«zZf²BWÇ®Yß½ve±ÃCý£W{Ú^q^sÑ·¨ÍOt¹·C¥GDrí@wÕKţÃ«V·i}xËÍ÷i©ĝɝǡ]{c±OW³Ya±_ç©HĕoƫŇqr³Lys[ñ³¯OSďOMisZ±ÅFC¥Pq{Ã[Pg}\\¿ghćOk^ģÁFıĉĥM­oEqqZûěŉ³F¦oĵhÕP{¯~TÍlªNßYÐ{Ps{ÃVUeĎwk±ŉVÓ½ŽJãÇÇ»Jm°dhcÀffdF~ĀeĖd`sx² ®EżĀdQÂd^~ăÔH¦\\LKpĄVez¤NP ǹÓRÆąJSh­a[¦´ÂghwmBÐ¨źhI|VV|p] Â¼èNä¶ÜBÖ¼L`¼bØæKVpoúNZÞÒKxpw|ÊEMnzEQIZZNBčÚFÜçmĩWĪñtÞĵÇñZ«uD±|Əlĳ¥ãn·±PmÍada CLǑkùó¡³Ï«QaċÏOÃ¥ÕđQȥċƭy³ÃA"]],encodeOffsets:[[[123686,41445]],[[126019,40435]],[[124393,40128]],[[126117,39963]],[[125322,40140]],[[126686,40700]],[[126041,40374]],[[125584,40168]],[[125453,40165]],[[125362,40214]],[[125280,40291]],[[125774,39997]],[[125976,40496]],[[125822,39993]],[[125509,40217]],[[122731,40949]]]}},{type:"Feature",id:"220000",properties:{id:"220000",cp:[125.3245,43.886841],name:"吉林",childNum:1},geometry:{type:"Polygon",coordinates:["@@pä³PClFbbÍzwBGĭZÅi»lY­ċ²SgkÇ£^Sqd¯R©é£¯S\\cZ¹iűƏCuƍÓXoR}M^o£R}oªU­FuuXHlEÅÏ©¤ÛmTþ¤D²ÄufàÀ­XXÈ±AeyYw¬dvõ´KÊ£\\rµÄlidā]|î©¾DÂVH¹Þ®ÜWnCķ W§@\\¸~¤Vp¸póIO¢VOŇürXql~òÉK]¤¥Xrfkvzpm¶bwyFoúvð¼¤ N°ąO¥«³[éǡű_°Õ\\ÚÊĝþâőàerR¨­JYlďQ[ ÏYëÐ§TGztnß¡gFkMāGÁ¤ia ÉÈ¹`\\xs¬dĆkNnuNUuP@vRY¾\\¢GªóĄ~RãÖÎĢùđŴÕhQxtcæëSɽŉíëǉ£ƍG£nj°KƘµDsØÑpyĆ¸®¿bXp]vbÍZuĂ{n^IüÀSÖ¦EvRÎûh@â[ƏÈô~FNr¯ôçR±­HÑlĢ^¤¢OðævxsŒ]ÞÁTĠs¶¿âÆGW¾ìA¦·TÑ¬è¥ÏÐJ¨¼ÒÖ¼ƦɄxÊ~StD@Ă¼Ŵ¡jlºWvÐzƦZÐ²CH AxiukdGgetqmcÛ£Ozy¥cE}|¾cZk¿uŐã[oxGikfeäT@SUwpiÚFM©£è^Ú`@v¶eňf heP¶täOlÃUgÞzŸU`l}ÔÆUvØ_Ō¬Öi^ĉi§²ÃB~¡ĈÚEgc|DC_Ȧm²rBx¼MÔ¦ŮdĨÃâYxƘDVÇĺĿg¿cwÅ\\¹¥Yĭl¤OvLjM_a W`zļMž·\\swqÝSAqŚĳ¯°kRē°wx^ĐkǂÒ\\]nrĂ}²ĊŲÒøãh·M{yMzysěnĒġV·°G³¼XÀ¤¹i´o¤ŃÈ`ÌǲÄUĞd\\iÖmÈBĤÜɲDEh LG¾ƀÄ¾{WaYÍÈĢĘÔRîĐj}ÇccjoUb½{h§Ǿ{KƖµÎ÷GĀÖŠåưÎs­lyiē«`å§H¥Ae^§GK}iã\\c]v©ģZmÃ|[M}ģTɟĵÂÂ`ÀçmFK¥ÚíÁbX³ÌQÒHof{]ept·GŋĜYünĎųVY^ydõkÅZW«WUa~U·SbwGçǑiW^qFuNĝ·EwUtW·Ýďæ©PuqEzwAVXRãQ`­©GMehccďÏd©ÑW_ÏYƅ»é\\ɹ~ǙG³mØ©BšuT§Ĥ½¢Ã_Ã½L¡ýqT^rme\\PpZZbyuybQefµ]UhĿDCmûvaÙNSkCwncćfv~YÇG"],encodeOffsets:[[130196,42528]]}},{type:"Feature",id:"230000",properties:{id:"230000",cp:[128.642464,46.756967],name:"黑龙江",childNum:2},geometry:{type:"MultiPolygon",coordinates:[["@@UµNÿ¥īèçHÍøƕ¶Lǽ|g¨|a¾pVidd~ÈiíďÓQġėÇZÎXb½|ſÃH½KFgɱCģÛÇAnjÕc[VĝǱÃËÇ_ £ń³pj£º¿»WH´¯U¸đĢmtĜyzzNN|g¸÷äűÑ±ĉā~mq^[ǁÑďlw]¯xQĔ¯l°řĴrBÞTxr[tŽ¸ĻN_yX`biNKuP£kZĮ¦[ºxÆÀdhĹŀUÈƗCwáZħÄŭcÓ¥»NAw±qȥnD`{ChdÙFć}¢A±Äj¨]ĊÕjŋ«×`VuÓÅ~_kŷVÝyhVkÄãPsOµfgeŇµf@u_Ù ÙcªNªÙEojVxT@ãSefjlwH\\pŏäÀvlY½d{F~¦dyz¤PÜndsrhfHcvlwjF£G±DÏƥYyÏu¹XikĿ¦ÏqƗǀOŜ¨LI|FRĂn sª|C˜zxAè¥bfudTrFWÁ¹Am|ĔĕsķÆF´N}ćUÕ@Áĳſmuçuð^ÊýowFzØÎĕNőǏȎôªÌŒǄàĀÄ˄ĞŀƒʀĀƘŸˮȬƬĊ°Uzouxe]}AyÈW¯ÌmKQ]Īºif¸ÄX|sZt|½ÚUÎ lk^p{f¤lºlÆW A²PVÜPHÊâ]ÎĈÌÜk´\\@qàsĔÄQºpRij¼èi`¶bXrBgxfv»uUi^v~J¬mVp´£´VWrnP½ì¢BX¬hðX¹^TjVriªjtŊÄmtPGx¸bgRsT`ZozÆO]ÒFôÒOÆŊvÅpcGêsx´DR{AEOr°x|íb³Wm~DVjºéNNËÜ˛ɶ­GxŷCSt}]ûōSmtuÇÃĕNāg»íT«u}ç½BĵÞʣ¥ëÊ¡MÛ³ãȅ¡ƋaǩÈÉQG¢·lG|tvgrrf«ptęŘnÅĢrI²¯LiØsPf_vĠdxM prʹL¤¤eËÀđKïÙVY§]Ióáĥ]ķK¥j|pŇ\\kzţ¦šnņäÔVĂîĪ¬|vW®l¤èØrxm¶ă~lÄƯĄ̈́öȄEÔ¤ØQĄĄ»ƢjȦOǺ¨ìSŖÆƬyQv`cwZSÌ®ü±Ǆ]ŀç¬B¬©ńzƺŷɄeeOĨSfm ĊƀP̎ēz©ĊÄÕÊmgÇsJ¥ƔŊśæÎÑqv¿íUOµªÂnĦÁ_½ä@êí£P}Ġ[@gġ}gɊ×ûÏWXá¢užƻÌsNÍ½ƎÁ§čŐAēeL³àydl¦ĘVçŁpśǆĽĺſÊQíÜçÛġÔsĕ¬Ǹ¯YßċġHµ ¡eå`ļrĉŘóƢFìĎWøxÊkƈdƬv|I|·©NqńRŀ¤éeŊŀàŀU²ŕƀBQ£Ď}L¹Îk@©ĈuǰųǨÚ§ƈnTËÇéƟÊcfčŤ^XmHĊĕË«W·ċëx³ǔķÐċJāwİ_ĸȀ^ôWr­°oú¬ĦŨK~ȰCĐ´Ƕ£fNÎèâw¢XnŮeÂÆĶ¾¾xäLĴĘlļO¤ÒĨA¢Êɚ¨®ØCÔ ŬGƠƦYĜĘÜƬDJg_ͥœ@čŅĻA¶¯@wÎqC½Ĉ»NăëKďÍQÙƫ[«ÃígßÔÇOÝáWñuZ¯ĥŕā¡ÑķJu¤E å¯°WKÉ±_d_}}vyõu¬ï¹ÓU±½@gÏ¿rÃ½DgCdµ°MFYxw¿CG£Rƛ½Õ{]L§{qqą¿BÇƻğëܭǊË|c²}Fµ}ÙRsÓpg±QNqǫŋRwŕnéÑÉK«SeYRŋ@{¤SJ}D Ûǖ֍]gr¡µŷjqWÛham³~S«Þ]"]],encodeOffsets:[[[134456,44547]]]}},{type:"Feature",id:"320000",properties:{id:"320000",cp:[119.767413,33.041544],name:"江苏",childNum:1},geometry:{type:"Polygon",coordinates:["@@cþÅPi`ZRu¥É\\]~°Y`µÓ^phÁbnÀşúòaĬºTÖŒbe¦¦{¸ZâćNp©Hr|^mjhSEb\\afv`sz^lkljÄtg¤D­¾X¿À|ĐiZȀåB·î}GL¢õcßjayBFµÏC^ĭcÙt¿sğH]j{s©HM¢QnDÀ©DaÜÞ·jgàiDbPufjDk`dPOîhw¡ĥ¥GP²ĐobºrYî¶aHŢ´ ]´rılw³r_{£DB_Ûdåuk|Ũ¯F Cºyr{XFye³Þċ¿ÂkĭB¿MvÛpm`rÚã@Ę¹hågËÖƿxnlč¶Åì½Ot¾dJlVJĂǀŞqvnO^JZż·Q}êÍÅmµÒ]ƍ¦Dq}¬R^èĂ´ŀĻĊIÔtĲyQŐĠMNtR®òLhĚs©»}OÓGZz¶A\\jĨFäOĤHYJvÞHNiÜaĎÉnFQlNM¤B´ĄNöɂtpŬdfåqm¿QûùŞÚb¤uŃJŴu»¹ĄlȖħŴw̌ŵ²ǹǠ͛hĭłƕrçü±Yxcitğ®jű¢KOķCoy`å®VTa­_Ā]ŐÝɞï²ʯÊ^]afYǸÃĆēĪȣJđ͍ôƋÄÄÍīçÛɈǥ£­ÛmY`ó£Z«§°Ó³QafusNıǅ_k}¢m[ÝóDµ¡RLčiXyÅNïă¡¸iĔÏNÌŕoēdōîåŤûHcs}~Ûwbù¹£¦ÓCtOPrE^ÒogĉIµÛÅʹK¤½phMü`oæŀ"],encodeOffsets:[[121740,32276]]}},{type:"Feature",id:"330000",properties:{id:"330000",cp:[120.153576,29.287459],name:"浙江",childNum:45},geometry:{type:"MultiPolygon",coordinates:[["@@E^dQ]K"],["@@jX^j"],["@@sfbU"],["@@qP\\xz[ck"],["@@R¢FX}°[s_"],["@@Cb\\}"],["@@e|v\\la{u"],["@@v~u}"],["@@QxÂF¯}"],["@@¹nvÞs¯o"],["@@rSkUEj"],["@@bi­ZP"],["@@p[}INf"],["@@À¿"],["@@¹dnb"],["@@rSBnR"],["@@g~h}"],["@@FlEk"],["@@OdPc"],["@@v[u\\"],["@@FjâL~wyoo~sµL\\"],["@@¬e¹aN"],["@@\\nÔ¡q]L³ë\\ÿ®QÖ"],["@@ÊA­©[¬"],["@@Kxv­"],["@@@hlIk]"],["@@pW{o||j"],["@@Md|_mC"],["@@¢X£ÏylD¼XtH"],["@@hlÜ[LykAvyfw^E¤"],["@@fp¤MusR"],["@@®_ma~LÁ¬Z"],["@@iMxZ"],["@@ZcYd"],["@@Z~dOSo|A¿qZv"],["@@@`EN¡v"],["@@|TY{"],["@@@n@m"],["@@XWkCT\\"],["@@ºwZRkĕWO¢"],["@@X®±GrÆª\\ÔáXq{"],["@@ůTG°ĄLHm°UC"],["@@¤aÜx~}dtüGæţŎíĔcŖpMËÐjē¢·ðĄÆMzjWKĎ¢Q¶À_ê_Bıi«pZgf¤Nrq]§ĂN®«H±yƳí¾×ŸīàLłčŴǝĂíÀBŖÕªÁŖHŗŉåqûõi¨hÜ·ñt»¹ýv_[«¸mYL¯QªmĉÅdMgÇjcº«ę¬­K­´B«Âącoċ\\xKd¡gěŧ«®á[~ıxu·ÅKsËÉc¢Ù\\ĭƛëbf¹­ģSĜkáƉÔ­ĈZB{aMµfzŉfåÂŧįƋǝÊĕġć£g³ne­ą»@­¦S®\\ßðChiqªĭiAuA­µ_W¥ƣO\\lċĢttC¨£t`PZäuXßBsĻyekOđġĵHuXBµ]×­­\\°®¬F¢¾pµ¼kŘó¬Wät¸|@L¨¸µrºù³Ù~§WIZW®±Ð¨ÒÉx`²pĜrOògtÁZ}þÙ]¡FKwsPlU[}¦Rvn`hq¬\\nQ´ĘRWb_ rtČFIÖkĦPJ¶ÖÀÖJĈĄTĚòC ²@PúØz©Pî¢£CÈÚĒ±hŖl¬â~nm¨f©iļ«mntuÖZÜÄjL®EÌFª²iÊxØ¨IÈhhst"],["@@o\\VzRZ}y"],["@@@°¡mÛGĕ¨§Ianá[ýƤjfæØLäGr"]],encodeOffsets:[[[125592,31553]],[[125785,31436]],[[125729,31431]],[[125513,31380]],[[125223,30438]],[[125115,30114]],[[124815,29155]],[[124419,28746]],[[124095,28635]],[[124005,28609]],[[125e3,30713]],[[125111,30698]],[[125078,30682]],[[125150,30684]],[[124014,28103]],[[125008,31331]],[[125411,31468]],[[125329,31479]],[[125626,30916]],[[125417,30956]],[[125254,30976]],[[125199,30997]],[[125095,31058]],[[125083,30915]],[[124885,31015]],[[125218,30798]],[[124867,30838]],[[124755,30788]],[[124802,30809]],[[125267,30657]],[[125218,30578]],[[125200,30562]],[[124968,30474]],[[125167,30396]],[[124955,29879]],[[124714,29781]],[[124762,29462]],[[124325,28754]],[[123990,28459]],[[125366,31477]],[[125115,30363]],[[125369,31139]],[[122495,31878]],[[125329,30690]],[[125192,30787]]]}},{type:"Feature",id:"340000",properties:{id:"340000",cp:[117.283042,31.26119],name:"安徽",childNum:3},geometry:{type:"MultiPolygon",coordinates:[["@@^iuLX^"],["@@e©Ehl"],["@@°ZÆëĎµmkǀwÌÕæhºgBĝâqÙĊzÖgņtÀÁĂÆáhEz|WzqD¹°Eŧl{ævÜcA`¤C`|´qxĲkq^³³GšµbíZ¹qpa±ď OH¦Ħx¢gPícOl_iCveaOjChß¸iÝbÛªCC¿mRV§¢A|t^iĠGÀtÚsd]ĮÐDE¶zAb àiödK¡~H¸íæAǿYj{ď¿À½W®£ChÃsikkly]_teu[bFaTign{]GqªoĈMYá|·¥f¥őaSÕėNµñĞ«Im_m¿Âa]uĜp Z_§{Cäg¤°r[_YjÆOdý[I[á·¥Q_nùgL¾mvˊBÜÆ¶ĊJhpc¹O]iŠ]¥ jtsggJÇ§w×jÉ©±EFË­KiÛÃÕYvsm¬njĻª§emná}k«ŕgđ²ÙDÇ¤í¡ªOy×Où±@DñSęćăÕIÕ¿IµĥOjNÕËT¡¿tNæŇàåyķrĕq§ÄĩsWÆßF¶X®¿mwRIÞfßoG³¾©uyHį{Ɓħ¯AFnuPÍÔzVdàôº^Ðæd´oG¤{S¬ćxã}ŧ×Kǥĩ«ÕOEÐ·ÖdÖsƘÑ¨[Û^Xr¢¼§xvÄÆµ`K§ tÒ´Cvlo¸fzŨð¾NY´ı~ÉĔēßúLÃÃ_ÈÏ|]ÂÏFlg`ben¾¢pUh~ƴĖ¶_r sĄ~cƈ]|r c~`¼{À{ȒiJjz`îÀT¥Û³]u}fïQl{skloNdjäËzDvčoQďHI¦rbtHĔ~BmlRV_ħTLnñH±DL¼Lªl§Ťa¸ĚlK²\\RòvDcÎJbt[¤D@®hh~kt°ǾzÖ@¾ªdbYhüóZ ň¶vHrľ\\ÊJuxAT|dmÀO[ÃÔG·ĚąĐlŪÚpSJ¨ĸLvÞcPæķŨ®mÐálwKhïgA¢ųÆ©Þ¤OÈm°K´"]],encodeOffsets:[[[121722,32278]],[[119475,30423]],[[119168,35472]]]}},{type:"Feature",id:"350000",properties:{id:"350000",cp:[118.306239,26.075302],name:"福建",childNum:18},geometry:{type:"MultiPolygon",coordinates:[["@@zht´]"],["@@aj^~ĆG©O"],["@@ed¨C}}i"],["@@@vPGsQ"],["@@sBzddW]Q"],["@@S¨Q{"],["@@NVucW"],["@@qptBAq"],["@@¸[mu"],["@@Q\\pD]_"],["@@jSwUadpF"],["@@eXª~"],["@@AjvFso"],["@@fT_Çí\\v|ba¦jZÆy°"],["@@IjJi"],["@@wJIx«¼AoNe{M­"],["@@K±¡ÓČäeZ"],["@@k¡¹Eh~c®wBkUplÀ¡I~Māe£bN¨gZý¡a±Öcp©PhI¢QqÇGj|¥U g[Ky¬ŏv@OptÉEF\\@ åA¬V{XģĐBycpě¼³Ăp·¤¥ohqqÚ¡ŅLs^Ã¡§qlÀhH¨MCe»åÇGD¥zPO£čÙkJA¼ßėuĕeûÒiÁŧSW¥Qûŗ½ùěcÝ§SùĩąSWó«íęACµeRåǃRCÒÇZÍ¢ź±^dlstjD¸ZpuÔâÃH¾oLUêÃÔjjēò´ĄWƛ^Ñ¥Ħ@ÇòmOw¡õyJyD}¢ďÑÈġfZda©º²z£NjD°Ötj¶¬ZSÎ~¾c°¶ÐmxO¸¢Pl´SL|¥AȪĖMņĲg®áIJČĒü` QF¬h|ĂJ@zµ |ê³È ¸UÖŬŬÀEttĸr]ðM¤ĶĲHtÏ AĬkvsq^aÎbvdfÊòSD´Z^xPsĂrvƞŀjJd×ŘÉ ®AÎ¦ĤdxĆqAZRÀMźnĊ»İÐZ YXæJyĊ²·¶q§·K@·{sXãô«lŗ¶»o½E¡­«¢±¨Y®Ø¶^AvWĶGĒĢPlzfļtàAvWYãO_¤sD§ssČġ[kƤPX¦`¶®BBvĪjv©jx[L¥àï[F¼ÍË»ğV`«Ip}ccÅĥZEãoP´B@D¸m±z«Ƴ¿å³BRØ¶Wlâþäą`]Z£Tc ĹGµ¶Hm@_©k¾xĨôȉðX«½đCIbćqK³ÁÄš¬OAwã»aLŉËĥW[ÂGIÂNxĳ¤D¢îĎÎB§°_JGs¥E@¤ućPåcuMuw¢BI¿]zG¹guĮck\\_"]],encodeOffsets:[[[123250,27563]],[[122541,27268]],[[123020,27189]],[[122916,27125]],[[122887,26845]],[[122808,26762]],[[122568,25912]],[[122778,26197]],[[122515,26757]],[[122816,26587]],[[123388,27005]],[[122450,26243]],[[122578,25962]],[[121255,25103]],[[120987,24903]],[[122339,25802]],[[121042,25093]],[[122439,26024]]]}},{type:"Feature",id:"360000",properties:{id:"360000",cp:[115.592151,27.676493],name:"江西",childNum:1},geometry:{type:"Polygon",coordinates:["@@ĢĨƐgļ¼ÂMD~ņªe^\\^§ý©j×cZØ¨zdÒa¶lÒJìõ`oz÷@¤uŞ¸´ôęöY¼HČƶajlÞƩ¥éZ[|h}^U  ¥pĄžƦO lt¸Æ Q\\aÆ|CnÂOjt­ĚĤdÈF`¶@Ðë ¦ōÒ¨SêvHĢûXD®QgÄWiØPÞìºr¤ǆNĠ¢lĄtZoCƞÔºCxrpĠV®Ê{f_Y`_eq®Aot`@oDXfkp¨|s¬\\DÄSfè©Hn¬^DhÆyøJhØxĢĀLÊƠPżċĄwȠĚ¦G®ǒĤäTŠÆ~Ħw«|TF¡nc³Ïå¹]ĉđxe{ÎÓvOEm°BƂĨİ|Gvz½ª´HàpeJÝQxnÀW­EµàXÅĪt¨ÃĖrÄwÀFÎ|ňÓMå¼ibµ¯»åDT±m[r«_gmQu~¥V\\OkxtL E¢Ú^~ýêPóqoě±_Êw§ÑªåƗā¼mĉŹ¿NQYBąrwģcÍ¥B­ŗÊcØiIƝĿuqtāwO]³YCñTeÉcaubÍ]trluīBÐGsĵıN£ï^ķqss¿FūūVÕ·´Ç{éĈýÿOER_đûIċâJh­ŅıNȩĕB¦K{Tk³¡OP·wnµÏd¯}½TÍ«YiµÕsC¯iM¤­¦¯P|ÿUHvhe¥oFTuõ\\OSsMòđƇiaºćXĊĵà·çhƃ÷Ç{ígu^đgm[×zkKN¶Õ»lčÓ{XSÆv©_ÈëJbVkĔVÀ¤P¾ºÈMÖxlò~ªÚàGĂ¢B±ÌKyáV¼Ã~­`gsÙfIƋlę¹e|~udjuTlXµf`¿Jd[\\L²"],encodeOffsets:[[116689,26234]]}},{type:"Feature",id:"370000",properties:{id:"370000",cp:[118.000923,36.275807],name:"山东",childNum:13},geometry:{type:"MultiPolygon",coordinates:[["@@Xjd]{K"],["@@itbFHy"],["@@HlGk"],["@@TGy"],["@@K¬U"],["@@WdXc"],["@@PtOs"],["@@LnXhc"],["@@ppVu]Or"],["@@cdzAUa"],["@@udRhnCI"],["@@oIpR"],["@@Ľč{fzƤîKÎMĮ]ZF½Y]â£ph¶¨râøÀÎǨ¤^ºÄGz~grĚĜlĞÆLĆǆ¢Îo¦cvKbgr°WhmZp L]LºcUÆ­nżĤÌĒbAnrOA´ȊcÀbƦUØrĆUÜøĬƞEzVL®öØBkŖÝĐĖ¹ŧ̄±ÀbÎÉnb²ĦhņBĖįĦåXćì@L¯´ywƕCéÃµė ƿ¸lµ¾Z|ZWyFY¨Mf~C¿`à_RÇzwƌfQnny´INoƬèôº|sTJULîVjǎ¾ĒØDz²XPn±ŴPè¸ŔLƔÜƺ_TüÃĤBBċÈöA´faM¨{«M`¶d¡ôÖ°mȰBÔjj´PM|c^d¤u¤Û´ä«ƢfPk¶Môl]Lb}su^ke{lCMrDÇ­]NÑFsmoõľHyGă{{çrnÓEƕZGª¹Fj¢ïWuøCǷë¡ąuhÛ¡^KxC`C\\bÅxì²ĝÝ¿_NīCȽĿåB¥¢·IŖÕy\\¹kxÃ£Č×GDyÃ¤ÁçFQ¡KtŵƋ]CgÏAùSedcÚźuYfyMmhUWpSyGwMPqŀÁ¼zK¶G­Y§Ë@´śÇµƕBm@IogZ¯uTMx}CVKï{éƵP_K«pÛÙqċtkkù]gTğwoɁsMõ³ăAN£MRkmEÊčÛbMjÝGuIZGPģãħE[iµBEuDPÔ~ª¼ęt]ûG§¡QMsğNPŏįzs£Ug{đJĿļā³]ç«Qr~¥CƎÑ^n¶ÆéÎR~Ż¸YI] PumŝrƿIā[xeÇ³L¯v¯s¬ÁY~}ťuŁgƋpÝĄ_ņī¶ÏSR´ÁP~¿Cyċßdwk´SsX|t`Ä ÈðAªìÎT°¦Dda^lĎDĶÚY°`ĪŴǒàŠv\\ebZHŖR¬ŢƱùęOÑM­³FÛWp["]],encodeOffsets:[[[123806,39303]],[[123821,39266]],[[123742,39256]],[[123702,39203]],[[123649,39066]],[[123847,38933]],[[123580,38839]],[[123894,37288]],[[123043,36624]],[[123344,38676]],[[123522,38857]],[[123628,38858]],[[118260,36742]]]}},{type:"Feature",id:"410000",properties:{id:"410000",cp:[113.665412,33.757975],name:"河南",childNum:1},geometry:{type:"Polygon",coordinates:["@@ýLùµP³swIÓxcŢĞð´E®ÚPtĴXØxÂ¶@«ŕŕQGYfa[şußǩđš_X³ĳÕčC]kbc¥CS¯ëÍB©÷³­Si_}mYTt³xlàcČzÀD}ÂOQ³ÐTĨ¯ƗòËŖ[hłŦv~}ÂZ«¤lPÇ£ªÝŴÅR§ØnhctâknÏ­ľŹUÓÝdKuķI§oTũÙďkęĆH¸Ó\\Ä¿PcnS{wBIvÉĽ[GqµuŇôYgûZca©@½Õǽys¯}lgg@­C\\£asIdÍuCQñ[L±ęk·ţb¨©kK»KC²òGKmĨS`UQnk}AGēsqaJ¥ĐGRĎpCuÌy ã iMcplk|tRkðev~^´¦ÜSí¿_iyjI|ȑ|¿_»d}q^{Ƈdă}tqµ`Ƴĕg}V¡om½faÇo³TTj¥tĠRyK{ùÓjuµ{t}uËRivGçJFjµÍyqÎàQÂFewixGw½Yŷpµú³XU½ġyłåkÚwZX·l¢Á¢KzOÎÎjc¼htoDHr|­J½}JZ_¯iPq{tę½ĕ¦Zpĵø«kQĹ¤]MÛfaQpě±ǽ¾]u­Fu÷nčÄ¯ADp}AjmcEÇaª³o³ÆÍSƇĈÙDIzËčľ^KLiÞñ[aA²zzÌ÷D|[íÄ³gfÕÞd®|`Ć~oĠƑô³ŊD×°¯CsøÀ«ìUMhTº¨¸ǡîSÔDruÂÇZÖEvPZW~ØÐtĄE¢¦Ðy¸bô´oŬ¬²Ês~]®tªapŎJ¨Öº_Ŕ`Ŗ^Đ\\Ĝu~m²Ƹ¸fWĦrƔ}Î^gjdfÔ¡J}\\n C¦þWxªJRÔŠu¬ĨĨmFdM{\\d\\YÊ¢ú@@¦ª²SÜsC}fNècbpRmlØ^gd¢aÒ¢CZZxvÆ¶N¿¢T@uC¬^ĊðÄn|lGlRjsp¢ED}Fio~ÔN~zkĘHVsǲßjŬŢ`Pûàl¢\\ÀEhİgÞē X¼Pk|m"],encodeOffsets:[[118256,37017]]}},{type:"Feature",id:"420000",properties:{id:"420000",cp:[113.298572,30.684355],name:"湖北",childNum:3},geometry:{type:"MultiPolygon",coordinates:[["@@AB"],["@@lskt"],["@@¾«}{ra®pîÃ\\{øCËyyB±b\\òÝjKL ]ĎĽÌJyÚCƈćÎT´Å´pb©ÈdFin~BCo°BĎÃømv®E^vǾ½Ĝ²RobÜeN^ĺ£R¬lĶ÷YoĖ¥Ě¾|sOr°jY`~I¾®I{GqpCgyl{£ÍÍyPLÂ¡¡¸kWxYlÙæŁĢz¾V´W¶ùŸo¾ZHxjwfxGNÁ³Xéæl¶EièIH ujÌQ~v|sv¶Ôi|ú¢FhQsğ¦SiŠBgÐE^ÁÐ{čnOÂÈUÎóĔÊēĲ}Z³½Mŧïeyp·uk³DsÑ¨L¶_ÅuÃ¨w»¡WqÜ]\\Ò§tƗcÕ¸ÕFÏǝĉăxŻČƟOKÉġÿ×wg÷IÅzCg]m«ªGeçÃTC«[t§{loWeC@ps_Bp­rf_``Z|ei¡oċMqow¹DƝÓDYpûsYkıǃ}s¥ç³[§cY§HK«Qy]¢wwö¸ïx¼ņ¾Xv®ÇÀµRĠÐHM±cÏdƒǍũȅȷ±DSyúĝ£ŤĀàtÖÿï[îb\\}pĭÉI±Ñy¿³x¯No|¹HÏÛmjúË~TuęjCöAwě¬Rđl¯ Ñb­ŇTĿ_[IčĄʿnM¦ğ\\É[T·k¹©oĕ@A¾wya¥Y\\¥Âaz¯ãÁ¡k¥ne£ÛwE©Êō¶˓uoj_U¡cF¹­[WvP©whuÕyBF`RqJUw\\i¡{jEPïÿ½fćQÑÀQ{°fLÔ~wXgītêÝ¾ĺHd³fJd]HJ²EoU¥HhwQsƐ»Xmg±çve]DmÍPoCc¾_hhøYrŊU¶eD°Č_N~øĹĚ·`z]Äþp¼äÌQv\\rCé¾TnkžŐÚÜa¼ÝƆĢ¶ÛodĔňÐ¢JqPb ¾|J¾fXƐîĨ_Z¯À}úƲN_ĒÄ^ĈaŐyp»CÇÄKñL³ġM²wrIÒŭxjb[n«øæà ^²­h¯ÚŐªÞ¸Y²ĒVø}Ā^İ´LÚm¥ÀJÞ{JVųÞŃx×sxxƈē ģMřÚðòIfĊŒ\\Ʈ±ŒdÊ§ĘDvČ_Àæ~Dċ´A®µ¨ØLV¦êHÒ¤"]],encodeOffsets:[[[113712,34e3]],[[115612,30507]],[[113649,34054]]]}},{type:"Feature",id:"430000",properties:{id:"430000",cp:[111.782279,28.09409],name:"湖南",childNum:3},geometry:{type:"MultiPolygon",coordinates:[["@@nFTs"],["@@ßÅÆá½ÔXrCOËRïÿĩ­TooQyÓ[ŅBE¬ÎÓXaį§Ã¸G °ITxpúxÚĳ¥ÏĢ¾edÄ©ĸGàGhM¤Â_U}Ċ}¢pczfþg¤ÇòAVM"],["@@©KA·³CQ±Á«³BUƑ¹AtćOwD]JiØSm¯b£ylXHËÑ±H«C^õľAÅ§¤É¥ïyuǙuA¢^{ÌC´­¦ŷJ£^[ª¿ĕ~ƇN skóā¹¿ï]ă~÷O§­@Vm¡Qđ¦¢Ĥ{ºjÔª¥nf´~Õo×ÛąMąıuZmZcÒ ĲĪ²SÊǄŶ¨ƚCÖŎªQØ¼rŭ­«}NÏürÊ¬mjr@ĘrTW ­SsdHzƓ^ÇÂyUi¯DÅYlŹu{hT}mĉ¹¥ěDÿë©ıÓ[Oº£¥ótł¹MÕƪ`PDiÛU¾ÅâìUñBÈ£ýhedy¡oċ`pfmjP~kZaZsÐd°wj§@Ĵ®w~^kÀÅKvNmX\\¨aŃqvíó¿F¤¡@ũÑVw}S@j}¾«pĂrªg àÀ²NJ¶¶DôK|^ª°LX¾ŴäPĪ±£EXd^¶ĲÞÜ~u¸ǔMRhsRe`ÄofIÔ\\Ø  ićymnú¨cj ¢»GČìƊÿÐ¨XeĈĀ¾Oð Fi ¢|[jVxrIQ_EzAN¦zLU`cªxOTu RLÄ¢dVi`p˔vŎµªÉF~Ød¢ºgİàw¸Áb[¦Zb¦z½xBĖ@ªpºlS¸Ö\\Ĕ[N¥ˀmĎăJ\\ŀ`ňSÚĖÁĐiOĜ«BxDõĚivSÌ}iùÜnÐºG{p°M´wÀÒzJ²ò¨ oTçüöoÛÿñőĞ¤ùTz²CȆȸǎŪƑÐc°dPÎğË¶[È½u¯½WM¡­ÉB·rínZÒ `¨GA¾\\pēXhÃRC­üWGġuTé§ŎÑ©ò³I±³}_EÃħg®ęisÁPDmÅ{b[RÅs·kPŽƥóRoOV~]{g\\êYƪ¦kÝbiċƵGZ»Ěõó·³vŝ£ø@pyö_ëIkÑµbcÑ§y×dYØªiþ¨[]f]Ņ©C}ÁN»hĻħƏĩ"]],encodeOffsets:[[[115640,30489]],[[112543,27312]],[[116690,26230]]]}},{type:"Feature",id:"440000",properties:{id:"440000",cp:[113.280637,23.125178],name:"广东",childNum:24},geometry:{type:"MultiPolygon",coordinates:[["@@QdAua"],["@@lxDLo"],["@@sbhNLo"],["@@Ă ā"],["@@WltO[["],["@@Kr]S"],["@@eI]y"],["@@I|Mym"],["@@Û³LS¼Y"],["@@nvºBëui©`¾"],["@@zdÛJw®"],["@@°¯"],["@@a yAª¸ËJIxØ@ĀHAmÃV¡ofuo"],["@@sŗÃÔėAƁZÄ ~°ČPäh"],["@@¶ÝÌvmĞh­ıQ"],["@@HdSjĒ¢D}waru«ZqadYM"],["@@el\\LqqU"],["@@~rMo\\"],["@@f^C"],["@@øPªoj÷ÍÝħXČx°Q¨ıXNv"],["@@gÇƳo[~tly"],["@@EÆC¿"],["@@OP"],["@@wđógĝ[³¡VÙæÅöMÌ³¹pÁaËýý©D©ÜJŹƕģGą¤{ÙūÇO²«BƱéAÒĥ¡«BhlmtÃPµyU¯ucd·w_bŝcīímGO|KPȏŹãŝIŕŭŕ@Óoo¿ē±ß}ŭĲWÈCőâUâǙIğŉ©IĳE×Á³AówXJþ±ÌÜÓĨ£L]ĈÙƺZǾĆĖMĸĤfÎĵlŨnÈĐtFFĤêk¶^k°f¶g}®Faf`vXŲxl¦ÔÁ²¬Ð¦pqÊÌ²iXØRDÎ}Ä@ZĠsx®AR~®ETtĄZƈfŠŠHâÒÐAµ\\S¸^wĖkRzalŜ|E¨ÈNĀňZTpBh£\\ĎƀuXĖtKL¶G|»ĺEļĞ~ÜĢÛĊrOÙîvd]n¬VÊĜ°RÖpMƂªFbwEÀ©\\¤]ŸI®¥D³|Ë]CöAŤ¦æ´¥¸Lv¼¢ĽBaôF~®²GÌÒEYzk¤°ahlVÕI^CxĈPsBƒºV¸@¾ªR²ĨN]´_eavSivc}p}Đ¼ƌkJÚe th_¸ ºx±ò_xNË²@ă¡ßH©Ùñ}wkNÕ¹ÇO½¿£ĕ]ly_WìIÇª`uTÅxYĒÖ¼kÖµMjJÚwn\\hĒv]îh|ÈƄøèg¸Ķß ĉĈWb¹ƀdéĘNTtP[öSvrCZaGubo´ŖÒÇĐ~¡zCIözx¢PnÈñ @ĥÒ¦]ƞV}³ăĔñiiÄÓVépKG½ÄÓávYoC·sitiaÀyŧÎ¡ÈYDÑům}ý|m[węõĉZÅxUO}÷N¹³ĉo_qtăqwµŁYÙǝŕ¹tïÛUÃ¯mRCºĭ|µÕÊK½Rē ó]GªęAx»HO£|ām¡diď×YïYWªŉOeÚtĐ«zđ¹TāúEá²\\ķÍ}jYàÙÆſ¿Çdğ·ùTßÇţʄ¡XgWÀǇğ·¿ÃOj YÇ÷Qěi"]],encodeOffsets:[[[117381,22988]],[[116552,22934]],[[116790,22617]],[[116973,22545]],[[116444,22536]],[[116931,22515]],[[116496,22490]],[[116453,22449]],[[113301,21439]],[[118726,21604]],[[118709,21486]],[[113210,20816]],[[115482,22082]],[[113171,21585]],[[113199,21590]],[[115232,22102]],[[115739,22373]],[[115134,22184]],[[113056,21175]],[[119573,21271]],[[119957,24020]],[[115859,22356]],[[116561,22649]],[[116285,22746]]]}},{type:"Feature",id:"450000",properties:{id:"450000",cp:[108.320004,22.82402],name:"广西",childNum:2},geometry:{type:"MultiPolygon",coordinates:[["@@H TQ§A"],["@@ĨÊªLƊDÎĹĐCǦė¸zÚGn£¾rªŀÜt¬@ÖÚSx~øOŒŶÐÂæȠ\\ÈÜObĖw^oÞLf¬°bI lTØBÌF£Ć¹gñĤaYt¿¤VSñK¸¤nM¼JE±½¸ñoÜCƆæĪ^ĚQÖ¦^f´QüÜÊz¯lzUĺš@ìp¶n]sxtx¶@~ÒĂJb©gk{°~c°`Ô¬rV\\la¼¤ôá`¯¹LCÆbxEræOv[H­[~|aB£ÖsºdAĐzNÂðsÞÆĤªbab`ho¡³F«èVlo¤ÔRzpp®SĪº¨ÖºNĳd`a¦¤F³ºDÎńĀìCĜº¦Ċ~nS|gźvZkCÆj°zVÈÁƔ]LÊFZgčP­kini«qÇczÍY®¬Ů»qR×ō©DÕ§ƙǃŵTÉĩ±ıdÑnYYĲvNĆĆØÜ Öp}e³¦m©iÓ|¹ħņ|ª¦QF¢Â¬ʖovg¿em^ucà÷gÕuíÙćĝ}FĻ¼Ĺ{µHKsLSđƃrč¤[AgoSŇYMÿ§Ç{FśbkylQxĕ]T·¶[BÑÏGáşşƇeăYSs­FQ}­BwtYğÃ@~CÍQ ×WjË±rÉ¥oÏ ±«ÓÂ¥kwWűmcih³K~µh¯e]lµélEģEďsmÇŧē`ãògK_ÛsUʝćğ¶höO¤Ǜn³c`¡y¦CezYwa[ďĵűMę§]XÎ_íÛ]éÛUćİÕBƣ±dy¹T^dûÅÑŦ·PĻþÙ`K¦¢ÍeĥR¿³£[~äu¼dltW¸oRM¢ď\\z}Æzdvň{ÎXF¶°Â_ÒÂÏL©ÖTmu¼ãlīkiqéfA·Êµ\\őDc¥ÝFyÔćcűH_hLÜêĺĐ¨c}rn`½Ì@¸¶ªVLhŒ\\Ţĺk~Ġið°|gtTĭĸ^xvKVGréAébUuMJVÃO¡qĂXËSģãlýà_juYÛÒBG^éÖ¶§EGÅzěƯ¤EkN[kdåucé¬dnYpAyČ{`]þ¯TbÜÈk¡ĠvàhÂƄ¢Jî¶²"]],encodeOffsets:[[[111707,21520]],[[107619,25527]]]}},{type:"Feature",id:"460000",properties:{id:"460000",cp:[109.83119,19.031971],name:"海南",childNum:1},geometry:{type:"Polygon",coordinates:["@@¦Ŝil¢XƦƞòïè§ŞCêɕrŧůÇąĻõ·ĉ³œ̅kÇm@ċȧŧĥĽʉ­ƅſȓÒË¦ŝE}ºƑ[ÍĜȋ gÎfǐÏĤ¨êƺ\\Ɔ¸ĠĎvʄȀÐ¾jNðĀÒRZǆzÐŘÎ°H¨Ƣb²_Ġ "],encodeOffsets:[[112750,20508]]}},{type:"Feature",id:"510000",properties:{id:"510000",cp:[104.065735,30.659462],name:"四川",childNum:2},geometry:{type:"MultiPolygon",coordinates:[["@@LqKr"],["@@[ĻéV£_ţġñpG réÏ·~ąSfy×Í·ºſƽiÍıƣıĻmHH}siaX@iÇ°ÁÃ×t«­T¤JJJyJÈ`Ohß¦¡uËhIyCjmÿwZGTiSsOB²fNmsPa{M{õE^Hj}gYpaeu¯oáwHjÁ½M¡pMuåmni{fk\\oÎqCwEZ¼KĝAy{m÷LwO×SimRI¯rKõBS«sFe]fµ¢óY_ÆPRcue°Cbo×bd£ŌIHgtrnyPt¦foaXďxlBowz_{ÊéWiêEGhÜ¸ºuFĈIxf®Y½ĀǙ]¤EyF²ċw¸¿@g¢§RGv»áW`ÃĵJwi]t¥wO­½a[×]`Ãi­üL¦LabbTÀåc}ÍhÆh®BHî|îºÉk­¤Sy£ia©taį·Ɖ`ō¥UhOĝLk}©Fos´JmµlŁuønÑJWÎªYÀïAetTŅÓGË«bo{ıwodƟ½OġÜÂµxàNÖ¾P²§HKv¾]|BÆåoZ`¡Ø`ÀmºĠ~ÌÐ§nÇ¿¤]wğ@srğu~Io[é±¹ ¿ſđÓ@qg¹zƱřaí°KtÇ¤V»Ã[ĩǭƑ^ÇÓ@áťsZÏÅĭƋěpwDóÖáŻneQËq·GCœýS]x·ýq³OÕ¶Qzßti{řáÍÇWŝŭñzÇWpç¿JXĩè½cFÂLiVjx}\\NŇĖ¥GeJA¼ÄHfÈu~¸Æ«dE³ÉMA|bÒćhG¬CMõƤąAvüVéŀ_VÌ³ĐwQj´·ZeÈÁ¨X´Æ¡Qu·»ÕZ³ġqDoy`L¬gdp°şp¦ėìÅĮZ°Iähzĵf²å ĚÑKpIN|Ñz]ń·FU×é»R³MÉ»GM«kiér}Ã`¹ăÞmÈnÁîRǀ³ĜoİzŔwǶVÚ£À]ɜ»ĆlƂ²ĠþTº·àUȞÏʦ¶I«dĽĢdĬ¿»Ĕ×h\\c¬ä²GêëĤł¥ÀǿżÃÆMº}BÕĢyFVvwxBèĻĒ©ĈtCĢɽŠȣ¦āæ·HĽîôNÔ~^¤Ɗu^s¼{TA¼ø°¢İªDè¾Ň¶ÝJ®Z´ğ~Sn|ªWÚ©òzPOȸbð¢|øĞŒQìÛÐ@ĞǎRS¤Á§di´ezÝúØã]HqkIþËQÇ¦ÃsÇ¤[E¬ÉŪÍxXƒ·ÖƁİlƞ¹ª¹|XÊwnÆƄmÀêErĒtD®ċæcQE®³^ĭ¥©l}äQtoŖÜqÆkµªÔĻĴ¡@Ċ°B²Èw^^RsºTĀ£ŚæQPJvÄz^Đ¹Æ¯fLà´GC²dt­ĀRt¼¤ĦOðğfÔðDŨŁĞƘïPÈ®âbMüÀXZ ¸£@Å»»QÉ­]dsÖ×_Í_ÌêŮPrĔĐÕGĂeZÜîĘqBhtO ¤tE[h|YÔZśÎs´xº±Uñt|OĩĠºNbgþJy^dÂY Į]Řz¦gC³R`Āz¢Aj¸CL¤RÆ»@­Ŏk\\Ç´£YW}z@Z}Ã¶oû¶]´^NÒ}èNªPÍy¹`S°´ATeVamdUĐwʄvĮÕ\\uÆŗ¨Yp¹àZÂmWh{á}WØǍÉüwga§áCNęÎ[ĀÕĪgÖÉªXøx¬½Ů¦¦[NÎLÜUÖ´òrÙŠxR^JkĳnDX{U~ET{ļº¦PZcjF²Ė@pg¨B{u¨ŦyhoÚD®¯¢ WòàFÎ¤¨GDäz¦kŮPġqË¥À]eâÚ´ªKxīPÖ|æ[xÃ¤JÞĥsNÖ½I¬nĨY´®ÐƐmDŝuäđđEbee_v¡}ìęǊē}qÉåT¯µRs¡M@}ůaa­¯wvƉåZw\\Z{åû^"]],encodeOffsets:[[[108815,30935]],[[110617,31811]]]}},{type:"Feature",id:"520000",properties:{id:"520000",cp:[106.713478,26.578343],name:"贵州",childNum:3},geometry:{type:"MultiPolygon",coordinates:[["@@G\\lY£in"],["@@q|mc¯tÏVSÎ"],["@@hÑ£IsNgßHHªķÃh_¹¡ĝÄ§ń¦uÙùgS¯JH|sÝÅtÁïyMDč»eÕtA¤{b\\}G®u\\åPFqwÅaDK°ºâ_£ùbµmÁÛĹM[q|hlaªāI}Ñµ@swtwm^oµDéĽŠyVky°ÉûÛR³e¥]RÕěħ[ƅåÛDpJiVÂF²I»mN·£LbÒYbWsÀbpkiTZĄă¶Hq`ĥ_J¯ae«KpÝx]aĕÛPÇȟ[ÁåŵÏő÷Pw}TÙ@Õs«ĿÛq©½m¤ÙH·yǥĘĉBµĨÕnđ]K©œáGçş§ÕßgǗĦTèƤƺ{¶ÉHÎd¾ŚÊ·OÐjXWrãLyzÉAL¾ę¢bĶėy_qMĔąro¼hĊw¶øV¤w²Ĉ]ÊKx|`ź¦ÂÈdrcÈbe¸`I¼čTF´¼Óýȃr¹ÍJ©k_șl³´_pĐ`oÒh¶pa^ÓĔ}D»^Xy`d[KvJPhèhCrĂĚÂ^Êƌ wZL­Ġ£ÁbrzOIlMMĪŐžËr×ÎeŦtw|¢mKjSǘňĂStÎŦEtqFT¾Eì¬¬ôxÌO¢ K³ŀºäYPVgŎ¦ŊmŞ¼VZwVlz¤£Tl®ctĽÚó{G­AÇge~Îd¿æaSba¥KKûj®_Ä^\\Ø¾bP®¦x^sxjĶI_Ä Xâ¼Hu¨Qh¡À@Ëô}±GNìĎlT¸`V~R°tbÕĊ`¸úÛtÏFDu[MfqGH·¥yAztMFe|R_GkChZeÚ°tov`xbDnÐ{E}ZèxNEÞREn[Pv@{~rĆAB§EO¿|UZ~ìUf¨J²ĂÝÆsªB`s¶fvö¦Õ~dÔq¨¸º»uù[[§´sb¤¢zþF¢ÆÀhÂW\\ıËIÝo±ĭŠ£þÊs}¡R]ěDg´VG¢j±®èºÃmpU[Áëº°rÜbNu¸}º¼`niºÔXĄ¤¼ÔdaµÁ_ÃftQQgR·Ǔv}Ý×ĵ]µWc¤F²OĩųãW½¯K©]{LóµCIµ±Mß¿h©āq¬o½~@i~TUxŪÒ¢@£ÀEîôruńb[§nWuMÆLl¿]x}ĳ­½"]],encodeOffsets:[[[112158,27383]],[[112105,27474]],[[112095,27476]]]}},{type:"Feature",id:"530000",properties:{id:"530000",cp:[101.512251,24.740609],name:"云南",childNum:1},geometry:{type:"Polygon",coordinates:["@@[ùx½}ÑRHYīĺûsÍniEoã½Ya²ė{c¬ĝgĂsAØÅwďõzFjw}«Dx¿}Uũlê@HÅ­F¨ÇoJ´Ónũuą¡Ã¢pÒÅØ TF²xa²ËXcÊlHîAßËŁkŻƑŷÉ©hW­æßUËs¡¦}teèÆ¶StÇÇ}Fd£jĈZĆÆ¤Tč\\D}O÷£U§~ŃGåŃDĝ¸Tsd¶¶Bª¤u¢ŌĎo~t¾ÍŶÒtD¦ÚiôözØX²ghįh½Û±¯ÿm·zR¦Ɵ`ªŊÃh¢rOÔ´£Ym¼èêf¯ŪĽncÚbw\\zlvWªâ ¦gmĿBĹ£¢ƹřbĥkǫßeeZkÙIKueT»sVesbaĕ  ¶®dNĄÄpªy¼³BE®lGŭCǶwêżĔÂepÍÀQƞpC¼ŲÈ­AÎô¶RäQ^Øu¬°_Èôc´¹ò¨PÎ¢hlĎ¦´ĦÆ´sâÇŲPnÊD^¯°Upv}®BPÌªjǬxSöwlfòªvqĸ|`H­viļndĜ­Ćhňem·FyÞqóSį¯³X_ĞçêtryvL¤§z¦c¦¥jnŞklD¤øz½ĜàĂŧMÅ|áƆàÊcðÂFÜáŢ¥\\\\ºİøÒÐJĴîD¦zK²ǏÎEh~CD­hMn^ÌöÄ©ČZÀaüfɭyœpį´ěFűk]Ôě¢qlÅĆÙa¶~ÄqêljN¬¼HÊNQ´ê¼VØ¸E^ŃÒyM{JLoÒęæe±Ķygã¯JYÆĭĘëo¥Šo¯hcK«z_prC´ĢÖY¼ v¸¢RÅW³Â§fÇ¸Yi³xR´ďUË`êĿUûuĆBƣöNDH«ĈgÑaB{ÊNF´¬c·Åv}eÇÃGB»If¦HňĕM~[iwjUÁKE¾dĪçWIèÀoÈXòyŞŮÈXâÎŚj|àsRyµÖPr´þ ¸^wþTDŔHr¸RÌmfżÕâCôoxĜƌÆĮÐYtâŦÔ@]ÈǮƒ\\Ī¼Ä£UsÈ¯LbîƲŚºyhr@ĒÔƀÀ²º\\êpJ}ĠvqtĠ@^xÀ£È¨mËÏğ}n¹_¿¢×Y_æpÅA^{½Lu¨GO±Õ½ßM¶wÁĢÛPƢ¼pcĲx|apÌ¬HÐŊSfsðBZ¿©XÏÒKk÷Eû¿SrEFsÕūkóVǥŉiTL¡n{uxţÏhôŝ¬ğōNNJkyPaqÂğ¤K®YxÉƋÁ]āęDqçgOgILu\\_gz]W¼~CÔē]bµogpÑ_oď`´³Țkl`IªºÎȄqÔþ»E³ĎSJ»_f·adÇqÇc¥Á_Źw{L^É±ćxU£µ÷xgĉp»ĆqNē`rĘzaĵĚ¡K½ÊBzyäKXqiWPÏÉ¸½řÍcÊG|µƕƣGË÷k°_^ý|_zċBZocmø¯hhcæ\\lMFlư£ĜÆyHF¨µêÕ]HAàÓ^it `þßäkĤÎT~Wlÿ¨ÔPzUCNVv [jâôDôď[}z¿msSh¯{jïğl}šĹ[őgK©U·µË@¾m_~q¡f¹ÅË^»f³ø}Q¡ÖË³gÍ±^Ç\\ëÃA_¿bWÏ[¶ƛé£F{īZgm@|kHǭƁć¦UĔť×ë}ǝeďºȡȘÏíBÉ£āĘPªĳ¶ŉÿy©nď£G¹¡I±LÉĺÑdĉÜW¥}gÁ{aqÃ¥aıęÏZï`"],encodeOffsets:[[104636,22969]]}},{type:"Feature",id:"540000",properties:{id:"540000",cp:[89.132212,30.860361],name:"西藏",childNum:1},geometry:{type:"Polygon",coordinates:["@@ÂhľxŖxÒVºÅâAĪÝȆµę¯Ňa±r_w~uSÕňqOj]ɄQ£ZUDûoY»©M[L¼qãË{VÍçWVi]ë©Ä÷àyƛhÚU°adcQ~Mx¥cc¡ÙaSyFÖk­uRýq¿ÔµQĽ³aG{¿FµëªéĜÿª@¬·K·àariĕĀ«V»ŶĴūgèLǴŇƶaftèBŚ£^âǐÝ®M¦ÁǞÿ¬LhJ¾óƾÆºcxwf]Y´¦|QLn°adĊ\\¨oǀÍŎ´ĩĀd`tÊQŞŕ|¨C^©Ĉ¦¦ÎJĊ{ëĎjª²rÐl`¼Ą[t|¦Stè¾PÜK¸dƄı]s¤î_v¹ÎVòŦj£Əsc¬_Ğ´|Ł¦Av¦w`ăaÝaa­¢e¤ı²©ªSªÈMĄwÉØŔì@T¤Ę\\õª@þo´­xA sÂtŎKzó´ÇĊµ¢r^nĊ­Æ¬×üG¢³ {âĊ]G~bÀgVjzlhǶfOfdªB]pjTOtĊn¤}®¦Č¥d¢¼»ddY¼t¢eȤJ¤}Ǿ¡°§¤AÐlc@ĝsªćļđAçwxUuzEÖġ~AN¹ÄÅȀŻ¦¿ģŁéì±Hãd«g[Ø¼ēÀcīľġ¬cJµÐʥVȝ¸ßS¹ý±ğkƁ¼ą^ɛ¤Ûÿb[}¬ōõÃ]ËNm®g@Bg}ÍF±ǐyL¥íCIĳÏ÷Ñį[¹¦[âšEÛïÁÉdƅß{âNÆāŨß¾ě÷yC£k­´ÓH@Â¹TZ¥¢į·ÌAÐ§®Zcv½Z­¹|ÅWZqgW|ieZÅYVÓqdqbc²R@c¥Rã»GeeƃīQ}J[ÒK¬Ə|oėjġĠÑN¡ð¯EBčnwôɍėª²CλŹġǝʅįĭạ̃ūȹ]ΓͧgšsgȽóϧµǛęgſ¶ҍć`ĘąŌJÞä¤rÅň¥ÖÁUětęuůÞiĊÄÀ\\Æs¦ÓRb|Â^řÌkÄŷ¶½÷f±iMÝ@ĥ°G¬ÃM¥n£Øąğ¯ß§aëbéüÑOčk£{\\eµª×MÉfm«Ƒ{Å×Gŏǩãy³©WÑăû··Qòı}¯ãIéÕÂZ¨īès¶ZÈsæĔTŘvgÌsN@îá¾ó@ÙwU±ÉTå»£TđWxq¹Zobs[×¯cĩvėŧ³BM|¹kªħ¥TzNYnÝßpęrñĠĉRS~½ěVVµõ«M££µBĉ¥áºae~³AuĐh`Ü³ç@BÛïĿa©|z²Ý¼D£àč²ŸIûI āóK¥}rÝ_Á´éMaň¨~ªSĈ½½KÙóĿeƃÆB·¬ën×W|Uº}LJrƳlŒµ`bÔ`QÐÓ@s¬ñIÍ@ûws¡åQÑßÁ`ŋĴ{ĪTÚÅTSÄ³Yo|Ç[Ç¾µMW¢ĭiÕØ¿@MhpÕ]jéò¿OƇĆƇpêĉâlØwěsǩĵ¸cbU¹ř¨WavquSMzeo_^gsÏ·¥Ó@~¯¿RiīB\\qTGªÇĜçPoÿfñòą¦óQīÈáPābß{ZŗĸIæÅhnszÁCËìñÏ·ąĚÝUm®ó­L·ăUÈíoù´Êj°ŁŤ_uµ^°ìÇ@tĶĒ¡ÆM³Ģ«İĨÅ®ğRāðggheÆ¢zÊ©Ô\\°ÝĎz~ź¤PnMĪÖB£kné§żćĆKĒ°¼L¶èâz¨u¦¥LDĘz¬ýÎmĘd¾ßFzhg²Fy¦ĝ¤ċņbÎ@yĄæm°NĮZRÖíJ²öLĸÒ¨Y®ƌÐVàtt_ÚÂyĠz]ŢhzĎ{ÂĢXc|ÐqfO¢¤ögÌHNPKŖUú´xx[xvĐCûĀìÖT¬¸^}Ìsòd´_KgžLĴÀBon|H@Êx¦BpŰŌ¿fµƌA¾zǈRx¶FkĄźRzŀ~¶[´HnªVƞuĒ­È¨ƎcƽÌm¸ÁÈM¦x͊ëÀxǆBú^´W£dkɾĬpw˂ØɦļĬIŚÊnŔa¸~J°îlɌxĤÊÈðhÌ®gT´øàCÀ^ªerrƘd¢İP|Ė ŸWªĦ^¶´ÂLaT±üWƜǀRÂŶUńĖ[QhlLüAÜ\\qRĄ©"],encodeOffsets:[[90849,37210]]}},{type:"Feature",id:"610000",properties:{id:"610000",cp:[108.948024,34.263161],name:"陕西",childNum:1},geometry:{type:"Polygon",coordinates:["@@p¢ȮµûGĦ}Ħðǚ¶òƄjɂz°{ºØkÈęâ¦jªBg\\ċ°s¬]jú EȌǆ¬stRÆdĠİwÜ¸ôW¾ƮłÒ_{Ìû¼jº¹¢GǪÒ¯ĘZ`ºŊecņą~BÂgzpâēòYǠȰÌTÎ¨ÂW|fcă§uF@N¢XLRMº[ğȣſï|¥Jkc`sŉǷY¹W@µ÷Kãï³ÛIcñ·VȋÚÒķø©þ¥yÓğęmWµÎumZyOŅƟĥÓ~sÑL¤µaÅY¦ocyZ{y c]{Ta©`U_Ěē£ωÊƍKùK¶ȱÝƷ§{û»ÅÁȹÍéuĳ|¹cÑdìUYOuFÕÈYvÁCqÓTǢí§·S¹NgV¬ë÷Át°DØ¯C´ŉƒópģ}ċcEËFéGU¥×K§­¶³BČ}C¿åċ`wġB·¤őcƭ²ő[Å^axwQOÿEËßŚĤNĔwƇÄńwĪ­o[_KÓª³ÙnKÇěÿ]ďă_d©·©Ýŏ°Ù®g]±ßå¬÷m\\iaǑkěX{¢|ZKlçhLtŇîŵœè[É@ƉĄEtƇÏ³­ħZ«mJ×¾MtÝĦ£IwÄå\\Õ{OwĬ©LÙ³ÙgBƕŀrÌĢŭO¥lãyC§HÍ£ßEñX¡­°ÙCgpťzb`wIvA|§hoĕ@E±iYd¥OĻ¹S|}F@¾oAO²{tfÜ¢FǂÒW²°BĤh^Wx{@¬­F¸¡ķn£P|ªĴ@^ĠĈæbÔc¶lYi^MicĎ°Â[ävï¶gv@ÀĬ·lJ¸sn|¼u~a]ÆÈtŌºJpþ£KKf~¦UbyäIĺãnÔ¿^­ŵMThĠÜ¤ko¼Ŏìąǜh`[tRd²Ĳ_XPrɲlXiL§à¹H°Ȧqº®QCbAŌJ¸ĕÚ³ĺ§ `d¨YjiZvRĺ±öVKkjGȊÄePĞZmļKÀ[`ösìhïÎoĬdtKÞ{¬èÒÒBÔpĲÇĬJŊ¦±J«Y§@·pHµàåVKepWftsAÅqC·¬ko«pHÆuK@oHĆÛķhxenS³àǍrqƶRbzy¸ËÐl¼EºpĤ¼x¼½~Ğà@ÚüdK^mÌSj"],encodeOffsets:[[110234,38774]]}},{type:"Feature",id:"620000",properties:{id:"620000",cp:[103.823557,36.058039],name:"甘肃",childNum:2},geometry:{type:"MultiPolygon",coordinates:[["@@VuUv"],["@@ũEĠtt~nkh`Q¦ÅÄÜdwAb×ĠąJ¤DüègĺqBqj°lI¡ĨÒ¤úSHbjÎB°aZ¢KJO[|A£Dx}NĂ¬HUnrk kp¼Y kMJn[aGáÚÏ[½rc}aQxOgsPMnUsncZsKúvAtÞġ£®ĀYKdnFw¢JE°Latf`¼h¬we|Æbj}GA·~W`¢MC¤tL©Ĳ°qdfObÞĬ¹ttu`^ZúE`[@Æsîz®¡CƳƜG²R¢RmfwĸgÜą G@pzJM½mhVy¸uÈÔO±¨{LfæU¶ßGĂq\\ª¬²I¥IŉÈīoıÓÑAçÑ|«LÝcspīðÍgtë_õ\\ĉñLYnĝgRǡÁiHLlõUĹ²uQjYi§Z_c¨´ĹĖÙ·ŋIaBD­R¹ȥr¯GºßK¨jWkɱOqWĳ\\a­Q\\sg_ĆǛōëp»£lğÛgSŶN®À]ÓämĹãJaz¥V}Le¤Lýo¹IsŋÅÇ^bz³tmEÁ´a¹cčecÇNĊãÁ\\č¯dNj]jZµkÓdaćå]ğĳ@ ©O{¤ĸm¢E·®«|@Xwg]Aģ±¯XǁÑǳªcwQÚŝñsÕ³ÛV_ý¥\\ů¥©¾÷w©WÕÊĩhÿÖÁRo¸V¬âDb¨hûxÊ×ǌ~Zâg|XÁnßYoº§ZÅŘv[ĭÖʃuďxcVbnUSfB¯³_TzºÎO©çMÑ~M³]µ^püµÄY~y@X~¤Z³[Èōl@®Å¼£QK·Di¡ByÿQ_´D¥hŗy^ĭÁZ]cIzýah¹MĪğPs{ò²Vw¹t³ŜË[Ñ}X\\gsF£sPAgěp×ëfYHāďÖqēŭOÏëdLü\\it^c®RÊº¶¢H°mrY£B¹čIoľu¶uI]vģSQ{UŻÅ}QÂ|Ì°ƅ¤ĩŪU ęĄÌZÒ\\v²PĔ»ƢNHĂyAmƂwVm`]ÈbH`Ì¢²ILvĜH®¤Dlt_¢JJÄämèÔDëþgºƫaʎÌrêYi~ Îİ¤NpÀA¾Ĕ¼bð÷®üszMzÖĖQdȨýv§Tè|ªHÃ¾a¸|Ð ƒwKĢx¦ivr^ÿ ¸l öæfƟĴ·PJv}n\\h¹¶v·À|\\ƁĚN´ĜçèÁz]ġ¤²¨QÒŨTIlªťØ}¼˗ƦvÄùØEÂ«FïËIqōTvāÜŏíÛßÛVj³âwGăÂíNOPìyV³ŉĖýZso§HÑiYw[ß\\X¦¥c]ÔƩÜ·«jÐqvÁ¦m^ċ±R¦΋ƈťĚgÀ»IïĨʗƮ°ƝĻþÍAƉſ±tÍEÕÞāNUÍ¡\\ſčåÒʻĘm ƭÌŹöʥëQ¤µ­ÇcƕªoIýIÉ_mkl³ăƓ¦j¡YzŇi}Msßõīʋ }ÁVm_[n}eı­Uĥ¼ªI{Î§DÓƻėojqYhĹT©oūĶ£]ďxĩǑMĝq`B´ƃ˺Чç~²ņj@¥@đ´ί}ĥtPńÇ¾V¬ufÓÉCtÓ̻¹£G³]ƖƾŎĪŪĘ̖¨ʈĢƂlɘ۪üºňUðǜȢƢż̌ȦǼĤŊɲĖÂ­Kq´ï¦ºĒǲņɾªǀÞĈĂD½ĄĎÌŗĞrôñnN¼â¾ʄľԆ|Ǆ֦ज़ȗǉ̘̭ɺƅêgV̍ʆĠ·ÌĊv|ýĖÕWĊǎÞ´õ¼cÒÒBĢ͢UĜð͒s¨ňƃLĉÕÝ@ɛƯ÷¿Ľ­ĹeȏĳëCȚDŲyê×Ŗyò¯ļcÂßYtÁƤyAã˾J@ǝrý@¤rz¸oP¹ɐÚyáHĀ[JwcVeȴÏ»ÈĖ}ƒŰŐèȭǢόĀƪÈŶë;Ñ̆ȤМľĮEŔĹŊũ~ËUă{ĻƹɁύȩþĽvĽƓÉ@ēĽɲßǐƫʾǗĒpäWÐxnsÀ^ƆwW©¦cÅ¡Ji§vúF¶¨c~c¼īeXǚ\\đ¾JwÀďksãAfÕ¦L}waoZD½Ml«]eÒÅaÉ²áo½FõÛ]ĻÒ¡wYR£¢rvÓ®y®LFLzĈôe]gx}|KK}xklL]c¦£fRtív¦PĤoH{tK"]],encodeOffsets:[[[108619,36299]],[[108589,36341]]]}},{type:"Feature",id:"630000",properties:{id:"630000",cp:[96.778916,35.623178],name:"青海",childNum:2},geometry:{type:"MultiPolygon",coordinates:[["@@InJm"],["@@CÆ½OŃĦsΰ~Ē³¦@@Ņi±è}ШƄ˹A³r_ĞǒNĪĐw¤^ŬĵªpĺSZgrpiƼĘÔ¨C|ÍJ©Ħ»®VĲ~f\\m `UnÂ~ʌĬàöNt~ňjy¢ZiƔ¥Ąk´nl`JÊJþ©pdƖ®È£¶ìRʦźõƮËnʼėæÑƀĎ[¢VÎĂMÖÝÎF²sƊƀÎBļýƞ¯ʘƭðħ¼Jh¿ŦęΌƇ¥²Q]Č¥nuÂÏri¸¬ƪÛ^Ó¦d¥[Wàx\\ZjÒ¨GtpþYŊĕ´zUOëPîMĄÁxH´áiÜUàîÜŐĂÛSuŎrJðÌ¬EFÁú×uÃÎkrĒ{V}İ«O_ÌËĬ©ÓŧSRÑ±§Ģ£^ÂyèçěM³Ƃę{[¸¿uºµ[gt£¸OƤĿéYõ·kĀq]juw¥DĩƍõÇPéÄ½G©ã¤GuȧþRcÕĕNyyût­øï»a½ē¿BMoį£Íj}éZËqbʍƬh¹ìÿÓAçãnIÃ¡I`ks£CG­ěUy×Cy@¶ʡÊBnāzGơMē¼±O÷õJËĚăVĪũƆ£¯{ËL½ÌzżVR|ĠTbuvJvµhĻĖHAëáa­OÇðñęNwœľ·LmI±íĠĩPÉ×®ÿscB³±JKßĊ«`ađ»·QAmOVţéÿ¤¹SQt]]Çx±¯A@ĉĳ¢Óļ©l¶ÅÛrŕspãRk~¦ª]Į­´FRåd­ČsCqđéFn¿ÅƃmÉx{W©ºƝºįkÕƂƑ¸wWūÐ©ÈF£\\tÈ¥ÄRÈýÌJ lGr^×äùyÞ³fjc¨£ÂZ|ǓMĝÏ@ëÜőRĝ÷¡{aïȷPu°ËXÙ{©TmĠ}Y³­ÞIňµç½©C¡į÷¯B»|St»]vųs»}MÓ ÿʪƟǭA¡fs»PY¼c¡»¦cċ­¥£~msĉPSi^o©AecPeǵkgyUi¿h}aHĉ^|á´¡HØûÅ«ĉ®]m¡qĉ¶³ÈyôōLÁstB®wn±ă¥HSòė£Së@×œÊăxÇN©©T±ª£Ĳ¡fb®Þbb_Ą¥xu¥B{łĝ³«`dƐt¤ťiñÍUuºí`£^tƃĲc·ÛLO½sç¥Ts{ă\\_»kÏ±q©čiìĉ|ÍI¥ć¥]ª§D{ŝŖÉR_sÿc³ĪōƿÎ§p[ĉc¯bKmR¥{³Ze^wx¹dƽÅ½ôIg §Mĕ ƹĴ¿ǣÜÍ]Ý]snåA{eƭ`ǻŊĿ\\ĳŬűYÂÿ¬jĖqßb¸L«¸©@ěĀ©ê¶ìÀEH|´bRľÓ¶rÀQþvl®ÕETzÜdb hw¤{LRdcb¯ÙVgƜßzÃôì®^jUèXÎ|UäÌ»rK\\ªN¼pZCüVY¤ɃRi^rPŇTÖ}|br°qňbĚ°ªiƶGQ¾²x¦PmlŜ[Ĥ¡ΞsĦÔÏâ\\ªÚŒU\\f¢N²§x|¤§xĔsZPòʛ²SÐqF`ªVÞŜĶƨVZÌL`¢dŐIqr\\oäõFÎ·¤»Ŷ×h¹]ClÙ\\¦ďÌį¬řtTӺƙgQÇÓHţĒ´ÃbEÄlbʔC|CŮkƮ[ʼ¬ň´KŮÈΰÌĪ¶ƶlðļATUvdTGº̼ÔsÊDÔveOg"]],encodeOffsets:[[[105308,37219]],[[95370,40081]]]}},{type:"Feature",id:"640000",properties:{id:"640000",cp:[106.278179,37.26637],name:"宁夏",childNum:2},geometry:{type:"MultiPolygon",coordinates:[["@@KëÀęĞ«Oęȿȕı]ŉ¡åįÕÔ«ǴõƪĚQÐZhv K°öqÀÑS[ÃÖHƖčËnL]ûcÙß@ĝ¾}w»»oģF¹»kÌÏ·{zP§B­¢íyÅt@@á]Yv_ssģ¼ißĻL¾ġsKD£¡N_X¸}B~HaiÅf{«x»ge_bsKF¯¡IxmELcÿZ¤­ĢÝsuBLùtYdmVtNmtOPhRw~bd¾qÐ\\âÙH\\bImlNZ»loqlVmGā§~QCw¤{A\\PKNY¯bFkC¥sks_Ã\\ă«¢ħkJi¯rrAhĹûç£CUĕĊ_ÔBixÅÙĄnªÑaM~ħpOu¥sîeQ¥¤^dkKwlL~{L~hw^ófćKyE­K­zuÔ¡qQ¤xZÑ¢^ļöÜ¾Ep±âbÊÑÆ^fk¬NC¾YpxbK~¥eÖäBlt¿Đx½I[ĒǙWf»Ĭ}d§dµùEuj¨IÆ¢¥dXªƅx¿]mtÏwßRĶX¢͎vÆzƂZò®ǢÌʆCrâºMÞzÆMÒÊÓŊZÄ¾r°Î®Ȉmª²ĈUªĚîøºĮ¦ÌĘk^FłĬhĚiĀĖ¾iİbjÕ"],["@@mfwěwMrŢªv@G"]],encodeOffsets:[[[109366,40242]],[[108600,36303]]]}},{type:"Feature",id:"650000",properties:{id:"650000",cp:[85.617733,40.792818],name:"新疆",childNum:1},geometry:{type:"Polygon",coordinates:["@@QØĔ²X¨~ǘBºjʐßØvKƔX¨vĊOÃ·¢i@~cĝe_«E}QxgɪëÏÃ@sÅyXoŖ{ô«ŸuXêÎf`C¹ÂÿÐGĮÕĞXŪōŸMźÈƺQèĽôe|¿ƸJR¤ĘEjcUóº¯Ĩ_ŘÁMª÷Ð¥OéÈ¿ÖğǤǷÂFÒzÉx[]­Ĥĝœ¦EP}ûƥé¿İƷTėƫœŕƅƱB»Đ±ēO¦E}`cȺrĦáŖuÒª«ĲπdƺÏØZƴwʄ¤ĖGĐǂZĶèH¶}ÚZצʥĪï|ÇĦMŔ»İĝǈì¥Βba­¯¥ǕǚkĆŵĦɑĺƯxūД̵nơʃĽá½M»òmqóŘĝčË¾ăCćāƿÝɽ©ǱŅ¹đ¥³ðLrÁ®ɱĕģŉǻ̋ȥơŻǛȡVï¹Ň۩ûkɗġƁ§ʇė̕ĩũƽō^ƕUv£ƁQïƵkŏ½ΉÃŭÇ³LŇʻ«ƭ\\lŭD{ʓDkaFÃÄa³ŤđÔGRÈƚhSӹŚsİ«ĐË[¥ÚDkº^Øg¼ŵ¸£EÍöůŉT¡c_ËKYƧUśĵÝU_©rETÏʜ±OñtYwē¨{£¨uM³x½şL©Ùá[ÓÐĥ Νtģ¢\\śnkOw¥±T»ƷFɯàĩÞáB¹ÆÑUwŕĽw[mG½Èå~Æ÷QyěCFmĭZīŵVÁƿQƛûXS²b½KÏ½ĉS©ŷXĕ{ĕK·¥Ɨcqq©f¿]ßDõU³h­gËÇïģÉɋwk¯í}I·œbmÉřīJɥĻˁ×xoɹīlc¤³Xù]ǅA¿w͉ì¥wÇN·ÂËnƾƍdÇ§đ®ƝvUm©³G\\}µĿQyŹlăµEwǇQ½yƋBe¶ŋÀůo¥AÉw@{Gpm¿AĳŽKLh³`ñcËtW±»ÕSëüÿďDu\\wwwù³VLŕOMËGh£õP¡erÏd{ġWÁč|yšg^ğyÁzÙs`s|ÉåªÇ}m¢Ń¨`x¥ù^}Ì¥H«YªƅAÐ¹n~ź¯f¤áÀzgÇDIÔ´AňĀÒ¶ûEYospõD[{ù°]uJqU|Soċxţ[õÔĥkŋÞŭZËºóYËüċrw ÞkrťË¿XGÉbřaDü·Ē÷AÃª[ÄäIÂ®BÕĐÞ_¢āĠpÛÄȉĖġDKwbmÄNôfƫVÉviǳHQµâFù­Âœ³¦{YGd¢ĚÜO {Ö¦ÞÍÀP^bƾl[vt×ĈÍEË¨¡Đ~´î¸ùÎhuè`¸HÕŔVºwĠââWò@{ÙNÝ´ə²ȕn{¿¥{l÷eé^eďXj©î\\ªÑòÜìc\\üqÕ[Č¡xoÂċªbØ­ø|¶ȴZdÆÂońéG\\¼C°ÌÆn´nxÊOĨŪƴĸ¢¸òTxÊǪMīĞÖŲÃɎOvʦƢ~FRěò¿ġ~åŊúN¸qĘ[Ĕ¶ÂćnÒPĒÜvúĀÊbÖ{Äî¸~Ŕünp¤ÂH¾ĄYÒ©ÊfºmÔĘcDoĬMŬS¤s²ʘÚžȂVŦ èW°ªB|ĲXŔþÈJĦÆæFĚêYĂªĂ]øªŖNÞüAfɨJ¯ÎrDDĤ`mz\\§~D¬{vJÂ«lµĂb¤pŌŰNĄ¨ĊXW|ų ¿¾ɄĦƐMTòP÷fØĶK¢ȝ˔Sô¹òEð­`Ɩ½ǒÂň×äı§ĤƝ§C~¡hlåǺŦŞkâ~}FøàĲaĞfƠ¥Ŕd®U¸źXv¢aƆúŪtŠųƠjdƺƺÅìnrh\\ĺ¯äɝĦ]èpĄ¦´LƞĬ´ƤǬ˼Ēɸ¤rºǼ²¨zÌPðŀbþ¹ļD¢¹\\ĜÑŚ¶ZƄ³àjĨoâȴLÊȮĐ­ĚăÀêZǚŐ¤qȂ\\L¢ŌİfÆs|zºeªÙæ§΢{Ā´ƐÚ¬¨Ĵà²łhʺKÞºÖTiƢ¾ªì°`öøu®Ê¾ãØ"],encodeOffsets:[[88824,50096]]}},{type:"Feature",id:"110000",properties:{id:"110000",cp:[116.405285,39.904989],name:"北京",childNum:1},geometry:{type:"Polygon",coordinates:["@@ĽOÁûtŷmiÍt_H»Ĩ±d`¹­{bwYr³S]§§o¹qGtm_SŧoaFLgQN_dV@Zom_ć\\ßcÂ±x¯oœRcfe£o§ËgToÛJíĔóu|wP¤XnO¢ÉŦ¯rNÄā¤zâŖÈRpŢZÚ{GrFt¦Òx§ø¹RóäV¤XdżâºWbwŚ¨Ud®bêņ¾jnŎGŃŶnzÚSeîĜZczî¾i]ÍQaúÍÔiþĩȨWĢü|Ėu[qb[swP@ÅğP¿{\\¥A¨ÏÑ¨j¯X\\¯MKpA³[Hīu}}"],encodeOffsets:[[120023,41045]]}},{type:"Feature",id:"120000",properties:{id:"120000",cp:[117.190182,39.125596],name:"天津",childNum:1},geometry:{type:"Polygon",coordinates:["@@ŬgX§Ü«E¶FÌ¬O_ïlÁgz±AXeµÄĵ{¶]gitgIj·¥îakS¨ÐƎk}ĕ{gBqGf{¿aU^fIư³õ{YıëNĿk©ïËZŏR§òoY×Ógcĥs¡bġ«@dekąI[nlPqCnp{ō³°`{PNdƗqSÄĻNNâyj]äÒD ĬH°Æ]~¡HO¾X}ÐxgpgWrDGpù^LrzWxZ^¨´T\\|~@IzbĤjeĊªz£®ĔvěLmV¾Ô_ÈNW~zbĬvG²ZmDM~~"],encodeOffsets:[[120237,41215]]}},{type:"Feature",id:"310000",properties:{id:"310000",cp:[121.472644,31.231706],name:"上海",childNum:6},geometry:{type:"MultiPolygon",coordinates:[["@@ɧư¬EpƸÁxc"],["@@©ª"],["@@MA"],["@@QpİE§ÉC¾"],["@@bŝÕÕEȣÚƥêImɇǦèÜĠÚÃƌÃ͎ó"],["@@ǜûȬɋŭ×^sYɍDŋŽąñCG²«ªč@h_p¯A{oloY¬j@Ĳ`gQÚhr|ǀ^MĲvtbe´R¯Ô¬¨Yô¤r]ìƬį"]],encodeOffsets:[[[124702,32062]],[[124547,32200]],[[124808,31991]],[[124726,32110]],[[124903,32376]],[[124438,32149]]]}},{type:"Feature",id:"500000",properties:{id:"500000",cp:[107.304962,29.533155],name:"重庆",childNum:2},geometry:{type:"MultiPolygon",coordinates:[["@@vjG~nGŘŬĶȂƀƾ¹¸ØÎezĆT¸}êÐqHðqĖä¥^CÆIj²p\\_ æüY|[YxƊæu°xb®Űb@~¢NQt°¶Sæ Ê~rǉĔëĚ¢~uf`faĔJåĊnÖ]jƎćÊ@£¾a®£Ű{ŶĕFègLk{Y|¡ĜWƔtƬJÑxq±ĢN´òKLÈÃ¼D|s`ŋć]Ã`đMûƱ½~Y°ħ`ƏíW½eI½{aOIrÏ¡ĕŇapµÜƅġ^ÖÛbÙŽŏml½SêqDu[RãË»ÿw`»y¸_ĺę}÷`M¯ċfCVµqŉ÷Zgg`d½pDOÎCn^uf²ènh¼WtƏxRGg¦pVFI±G^Ic´ecGĹÞ½sëĬhxW}KÓe­XsbkF¦LØgTkïƵNï¶}Gyw\\oñ¡nmĈzj@Óc£»Wă¹Ój_m»¹·~MvÛaq»­ê\\ÂoVnÓØÍ²«bq¿efE Ĝ^Q~ Évýş¤²ĮpEİ}zcĺL½¿gÅ¡ýE¡ya£³t\\¨\\vú»¼§·Ñr_oÒý¥u_n»_At©ÞÅ±ā§IVeëY}{VPÀFA¨ąB}q@|Ou\\FmQFÝMwå}]|FmÏCawu_p¯sfÙgYDHl`{QEfNysB¦zG¸rHeN\\CvEsÐùÜ_·ÖĉsaQ¯}_UxÃđqNH¬Äd^ÝŰR¬ã°wećJE·vÝ·HgéFXjÉê`|ypxkAwWĐpb¥eOsmzwqChóUQl¥F^lafanòsrEvfQdÁUVfÎvÜ^eftET¬ôA\\¢sJnQTjPØxøK|nBzĞ»LYFDxÓvr[ehľvN¢o¾NiÂxGpâ¬zbfZo~hGi]öF||NbtOMn eA±tPTLjpYQ|SHYĀxinzDJÌg¢và¥Pg_ÇzIIII£®S¬ØsÎ¼£N"],["@@ifjN@s"]],encodeOffsets:[[[109628,30765]],[[111725,31320]]]}},{type:"Feature",id:"810000",properties:{id:"810000",cp:[114.173355,22.320048],name:"香港",childNum:5},geometry:{type:"MultiPolygon",coordinates:[["@@AlBk"],["@@mn"],["@@EpFo"],["@@ea¢pl¸Eõ¹hj[]ÔCÎ@lj¡uBX´AI¹[yDU]W`çwZkmcMpÅv}IoJlcafŃK°ä¬XJmÐ đhI®æÔtSHnEÒrÈc"],["@@rMUwAS®e"]],encodeOffsets:[[[117111,23002]],[[117072,22876]],[[117045,22887]],[[116975,23082]],[[116882,22747]]]}},{type:"Feature",id:"820000",properties:{id:"820000",cp:[113.54909,22.198951],name:"澳门",childNum:1},geometry:{type:"Polygon",coordinates:["@@kÊd°å§s"],encodeOffsets:[[116279,22639]]}}],UTF8Encoding:!0}):i("ECharts Map is not loaded"):i("ECharts is not Loaded")},"string"!=typeof t.nodeName?n(0,VV):n(0,i.echarts)}));var FV=X((function(e,t){var i;i=function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}return i.m=e,i.c=t,i.p="",i(0)}([function(e,t,i){e.exports=i(1)},function(e,t,i){var n=i(2),r=i(3),a=i(4),o=i(22);function s(e){var t=new a(e),i=r(a.prototype.request,t);return n.extend(i,a.prototype,t),n.extend(i,t),i}var l=s(i(10));l.Axios=a,l.create=function(e){return s(o(l.defaults,e))},l.Cancel=i(23),l.CancelToken=i(24),l.isCancel=i(9),l.all=function(e){return Promise.all(e)},l.spread=i(25),e.exports=l,e.exports.default=l},function(e,t,i){var n=i(3),r=Object.prototype.toString;function a(e){return"[object Array]"===r.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===r.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var i=0,n=e.length;i<n;i++)t.call(null,e[i],i,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===r.call(e)},isBuffer:function(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:o,isDate:function(e){return"[object Date]"===r.call(e)},isFile:function(e){return"[object File]"===r.call(e)},isBlob:function(e){return"[object Blob]"===r.call(e)},isFunction:l,isStream:function(e){return s(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function e(){var t={};function i(i,n){"object"==typeof t[n]&&"object"==typeof i?t[n]=e(t[n],i):t[n]=i}for(var n=0,r=arguments.length;n<r;n++)u(arguments[n],i);return t},deepMerge:function e(){var t={};function i(i,n){"object"==typeof t[n]&&"object"==typeof i?t[n]=e(t[n],i):t[n]="object"==typeof i?e({},i):i}for(var n=0,r=arguments.length;n<r;n++)u(arguments[n],i);return t},extend:function(e,t,i){return u(t,(function(t,r){e[r]=i&&"function"==typeof t?n(t,i):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t){e.exports=function(e,t){return function(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];return e.apply(t,i)}}},function(e,t,i){var n=i(2),r=i(5),a=i(6),o=i(7),s=i(22);function l(e){this.defaults=e,this.interceptors={request:new a,response:new a}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[o,void 0],i=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)i=i.then(t.shift(),t.shift());return i},l.prototype.getUri=function(e){return e=s(this.defaults,e),r(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,i){return this.request(n.merge(i||{},{method:e,url:t}))}})),n.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,i,r){return this.request(n.merge(r||{},{method:e,url:t,data:i}))}})),e.exports=l},function(e,t,i){var n=i(2);function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,i){if(!t)return e;var a;if(i)a=i(t);else if(n.isURLSearchParams(t))a=t.toString();else{var o=[];n.forEach(t,(function(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),o.push(r(t)+"="+r(e))})))})),a=o.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},function(e,t,i){var n=i(2);function r(){this.handlers=[]}r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){n.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=r},function(e,t,i){var n=i(2),r=i(8),a=i(9),o=i(10);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=r(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return s(e),t.data=r(t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=r(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,i){var n=i(2);e.exports=function(e,t,i){return n.forEach(i,(function(i){e=i(e,t)})),e}},function(e,t){e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,i){var n=i(2),r=i(11),a={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,l={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(s=i(12)),s),transformRequest:[function(e,t){return r(t,"Accept"),r(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(o(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),n.forEach(["post","put","patch"],(function(e){l.headers[e]=n.merge(a)})),e.exports=l},function(e,t,i){var n=i(2);e.exports=function(e,t){n.forEach(e,(function(i,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=i,delete e[n])}))}},function(e,t,i){var n=i(2),r=i(13),a=i(5),o=i(16),s=i(19),l=i(20),u=i(14);e.exports=function(e){return new Promise((function(t,c){var h=e.data,d=e.headers;n.isFormData(h)&&delete d["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var f=e.auth.username||"",g=e.auth.password||"";d.Authorization="Basic "+btoa(f+":"+g)}var m=o(e.baseURL,e.url);if(p.open(e.method.toUpperCase(),a(m,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var i="getAllResponseHeaders"in p?s(p.getAllResponseHeaders()):null,n={data:e.responseType&&"text"!==e.responseType?p.response:p.responseText,status:p.status,statusText:p.statusText,headers:i,config:e,request:p};r(t,c,n),p=null}},p.onabort=function(){p&&(c(u("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){c(u("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),c(u(t,e,"ECONNABORTED",p)),p=null},n.isStandardBrowserEnv()){var v=i(21),y=(e.withCredentials||l(m))&&e.xsrfCookieName?v.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in p&&n.forEach(d,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete d[t]:p.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){p&&(p.abort(),c(e),p=null)})),void 0===h&&(h=null),p.send(h)}))}},function(e,t,i){var n=i(14);e.exports=function(e,t,i){var r=i.config.validateStatus;!r||r(i.status)?e(i):t(n("Request failed with status code "+i.status,i.config,null,i.request,i))}},function(e,t,i){var n=i(15);e.exports=function(e,t,i,r,a){var o=new Error(e);return n(o,t,i,r,a)}},function(e,t){e.exports=function(e,t,i,n,r){return e.config=t,i&&(e.code=i),e.request=n,e.response=r,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,i){var n=i(17),r=i(18);e.exports=function(e,t){return e&&!n(t)?r(e,t):t}},function(e,t){e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,i){var n=i(2),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,i,a,o={};return e?(n.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=n.trim(e.substr(0,a)).toLowerCase(),i=n.trim(e.substr(a+1)),t){if(o[t]&&r.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([i]):o[t]?o[t]+", "+i:i}})),o):o}},function(e,t,i){var n=i(2);e.exports=n.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");function r(e){var n=e;return t&&(i.setAttribute("href",n),n=i.href),i.setAttribute("href",n),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}return e=r(window.location.href),function(t){var i=n.isString(t)?r(t):t;return i.protocol===e.protocol&&i.host===e.host}}():function(){return!0}},function(e,t,i){var n=i(2);e.exports=n.isStandardBrowserEnv()?{write:function(e,t,i,r,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),n.isNumber(i)&&s.push("expires="+new Date(i).toGMTString()),n.isString(r)&&s.push("path="+r),n.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,i){var n=i(2);e.exports=function(e,t){t=t||{};var i={},r=["url","method","params","data"],a=["headers","auth","proxy"],o=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];n.forEach(r,(function(e){void 0!==t[e]&&(i[e]=t[e])})),n.forEach(a,(function(r){n.isObject(t[r])?i[r]=n.deepMerge(e[r],t[r]):void 0!==t[r]?i[r]=t[r]:n.isObject(e[r])?i[r]=n.deepMerge(e[r]):void 0!==e[r]&&(i[r]=e[r])})),n.forEach(o,(function(n){void 0!==t[n]?i[n]=t[n]:void 0!==e[n]&&(i[n]=e[n])}));var s=r.concat(a).concat(o),l=Object.keys(t).filter((function(e){return-1===s.indexOf(e)}));return n.forEach(l,(function(n){void 0!==t[n]?i[n]=t[n]:void 0!==e[n]&&(i[n]=e[n])})),i}},function(e,t){function i(e){this.message=e}i.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},i.prototype.__CANCEL__=!0,e.exports=i},function(e,t,i){var n=i(23);function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var i=this;e((function(e){i.reason||(i.reason=new n(e),t(i.reason))}))}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r((function(t){e=t})),cancel:e}},e.exports=r},function(e,t){e.exports=function(e){return function(t){return e.apply(null,t)}}}])},e.exports=i()}));return function(e){function t(t){var r=e.call(this,t)||this;return r.chartRef=n.createRef(),r.padding="10vh 4vh 4vh",r.total="加载中...",r.gradIndex=0,r.renderChart=function(){return o(r,void 0,void 0,(function(){var e,t,i,n,r,a,o,l,u;return s(this,(function(s){switch(s.label){case 0:if(e=this.props.gpui.params,t=e.base_url,i=e.client_id,n=e.client_secret,r=e.center,!(t&&i&&n&&r))return[2];this.timer&&clearTimeout(this.timer),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,this.getData({base_url:t,client_id:i,client_secret:n})];case 2:return a=s.sent(),o=a.data,l=a.total,this.total=l,this.chart.setOption(this.generateChartOption({data:o,center:r}),{notMerge:!0}),[3,4];case 3:return u=s.sent(),console.error("@components:wall-misc/customer-map-china: 组件渲染时发生错误",u),[3,4];case 4:return this.props.gpui.params.interval>0&&(this.timer=setTimeout(this.renderChart,this.props.gpui.params.interval)),[2]}}))}))},r.getData=function(e){var t=e.base_url,i=e.client_id,n=e.client_secret;return o(r,void 0,void 0,(function(){var e,r,a;return s(this,(function(o){switch(o.label){case 0:return e=new Date,r=new Date(e.getFullYear(),e.getMonth(),e.getDate()),a=r.getTime()/1e3,[4,FV.post(t,{id:1,jsonrpc:"2.0",method:"gpui/location/ip_area",params:[{dtstart:a-2592e3,dtend:a}]},{headers:{"Content-Type":"application/json",CLIENTID:i,CLIENTSECRET:n}})];case 1:return[2,o.sent().data.result]}}))}))},r.generateChartOption=function(e){var t=e.data,i=e.center,n=["#5097B1","#999EBA","#73C8DD","#F2C29B","#F2C29B","#BC73AB","#CBCE5D","#87B4EE","#9480D2","#536891","#87747A"],a=Math.max.apply(Math,t.map((function(e){return e.count}))),o=r.props.gpui.params.maxSymbol;0!==o&&o<a&&(a=o);var s=t.map((function(e,t){return{fromName:e.area,coords:[[e.lon,e.lat],i],value:e.count,lineStyle:{normal:{color:n[t%n.length]}}}}));return{tooltip:{show:!0,formatter:function(e){var t=e.data;return t.fromName+"<br/>访问量: "+t.value}},geo:{map:"china",label:{emphasis:{show:!1}},emphasis:{itemStyle:{areaColor:"#142568",borderColor:"#4E61AD"}},zoom:r.props.gpui.params.zoom||1,roam:!0,itemStyle:{normal:{areaColor:"#142568",borderColor:"#4E61AD",borderWidth:2}}},series:l(Array.from({length:a}).map((function(e,t){return{type:"lines",zlevel:1,effect:{show:!0,period:10,delay:600*t,trailLength:.7,color:"#fff",symbolSize:3},lineStyle:{normal:{width:0,curveness:.2}},data:s.filter((function(e){return e.value>t}))}})),Array.from({length:a}).map((function(e,t){return{type:"lines",zlevel:2,effect:{show:!0,period:10,delay:600*t,trailLength:0,symbol:"arrow",symbolSize:10},lineStyle:{normal:{width:2,opacity:.4,curveness:.2}},data:s.filter((function(e){return e.value>t}))}})))}},setInterval((function(){r.gradIndex=(r.gradIndex+1)%40}),50),i.reaction((function(){return t.gpui.params.padding}),(function(e){r.padding=e||"10vh 4vh 4vh"}),{fireImmediately:!0}),r}return function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}(t,e),t.prototype.componentDidMount=function(){var e=this;this.chart=this.chart||ty.init(this.chartRef.current),window.addEventListener("resize",(function(){e.chart.resize()})),i.reaction((function(){return{baseUrl:e.props.gpui.params.base_url,clientId:e.props.gpui.params.client_id,clientSecret:e.props.gpui.params.client_secret,center:e.props.gpui.params.center,interval:e.props.gpui.params.interval}}),(function(){e.renderChart()}),{fireImmediately:!0})},t.prototype.render=function(){return n.createElement("div",{className:"g__index",style:{padding:this.padding}},n.createElement("div",{className:u.main},n.createElement("div",{ref:this.chartRef,className:u.chart}),n.createElement("div",{className:u.total},n.createElement("span",null,"累计访问量: "),n.createElement("span",{className:u.data},this.total),n.createElement("div",{className:u.test}),n.createElement("div",{className:u.icon},n.createElement("svg",{viewBox:"0 0 1025 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%"},n.createElement("defs",null,Array.from({length:21}).map((function(e,t){return n.createElement("linearGradient",{id:"grad"+t,x1:"50%",y1:"100%",x2:"50%",y2:"0%"},n.createElement("stop",{offset:"0%",style:{stopColor:"#00CFFF",stopOpacity:1}}),n.createElement("stop",{offset:5*t+"%",style:{stopColor:"#0BD8A2",stopOpacity:1}}),n.createElement("stop",{offset:5*t+1+"%",style:{stopColor:"#0BD8A2",stopOpacity:0}}))}))),n.createElement("path",{className:u.animation,fill:"url(#grad"+Math.min(this.gradIndex,20)+")",d:"M766.815466 382.441174 510.881473 63.818482 254.914732 382.441174 441.061012 382.441174 441.061012 958.561546 580.674303 958.561546 580.674303 382.441174Z"}))))))},a([i.observable],t.prototype,"padding",void 0),a([i.observable],t.prototype,"total",void 0),a([i.observable],t.prototype,"gradIndex",void 0),t=a([Y],t)}(n.Component)}));
