define(["gpui-style-inject","react","mobx"],(function(e,t,n){"use strict";e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var i="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 n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(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,n,i){var r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o}function o(e,t,n,i){return new(n||(n=Promise))((function(r,a){function o(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))}function s(e,t){var n,i,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(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=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++,i=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],i=0}finally{n=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,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,r++)i[r]=a[o];return i}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="index-module_main__3aDii",c="index-module_chart__7fmhD";if(e(".index-module_main__3aDii {\n  position: relative;\n  width: 100%;\n  height: 100%; }\n  .index-module_main__3aDii .index-module_chart__7fmhD {\n    width: 100%;\n    height: 100%; }\n"),!t.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!n.spy)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function d(){var e=t.useState(0)[1];return t.useCallback((function(){e((function(e){return e+1}))}),[])}function f(e){return n.getDependencyTree(e)}var p,g=1e4,m=new Set;function v(){void 0===p&&(p=setTimeout(y,1e4))}function y(){p=void 0;var e=Date.now();m.forEach((function(t){var n=t.current;n&&e>=n.cleanAt&&(n.reaction.dispose(),t.current=null,m.delete(t))})),m.size>0&&v()}var _={};function x(e){return"observer"+e}function b(e,t,r){void 0===t&&(t="observed"),void 0===r&&(r=_);var a,o=(r.useForceUpdate||d)(),s=i.useRef(null);if(!s.current){var l=new n.Reaction(x(t),(function(){u.mounted?o():(l.dispose(),s.current=null)})),u=function(e){return{cleanAt:Date.now()+g,reaction:e}}(l);s.current=u,a=s,m.add(a),v()}var c,h,p=s.current.reaction;if(i.useDebugValue(p,f),i.useEffect((function(){var e;return e=s,m.delete(e),s.current?s.current.mounted=!0:(s.current={reaction:new n.Reaction(x(t),(function(){o()})),cleanAt:1/0},o()),function(){s.current.reaction.dispose(),s.current=null}}),[]),p.track((function(){try{c=e()}catch(e){h=e}})),h)throw h;return c}function w(e,n){var i,r=h({forwardRef:!1},n),a=e.displayName||e.name,o=function(t,n){return b((function(){return e(t,n)}),a)};return o.displayName=a,i=r.forwardRef?t.memo(t.forwardRef(o)):t.memo(o),function(e,t){Object.keys(e).forEach((function(n){T[n]||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}(e,i),i.displayName=a,i}var T={$$typeof:!0,render:!0,compare:!0,type:!0};function S(e){var t=e.children,n=e.render,i=t||n;return"function"!=typeof i?null:b(i)}function O(e,t,n,i,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`"+n):o||s?null:new Error("Invalid prop `"+r+"` of type `"+typeof e[t]+"` supplied to `"+n+"`, expected `function`.")}S.propTypes={children:O,render:O},S.displayName="Observer";var M=0;var D={};function A(e){return D[e]||(D[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var t="__$mobx-react "+e+" ("+M+")";return M++,t}(e)),D[e]}function k(e,t){if(C(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var r=0;r<n.length;r++)if(!Object.hasOwnProperty.call(t,n[r])||!C(e[n[r]],t[n[r]]))return!1;return!0}function C(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function I(e,t,n){Object.hasOwnProperty.call(e,t)?e[t]=n:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})}var E=A("patchMixins"),N=A("patchedDefinition");function R(e,t){for(var n=this,i=arguments.length,r=new Array(i>2?i-2:0),a=2;a<i;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(n,r)}))}}function L(e,t){return function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];R.call.apply(R,[this,e,t].concat(i))}}function P(e,t,n){var i=function(e,t){var n=e[E]=e[E]||{},i=n[t]=n[t]||{};return i.locks=i.locks||0,i.methods=i.methods||[],i}(e,t);i.methods.indexOf(n)<0&&i.methods.push(n);var r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r[N]){var a=e[t],o=function e(t,n,i,r,a){var o,s=L(a,r);return(o={})[N]=!0,o.get=function(){return s},o.set=function(a){if(this===t)s=L(a,r);else{var o=e(this,n,i,r,a);Object.defineProperty(this,n,o)}},o.configurable=!0,o.enumerable=i,o}(e,t,r?r.enumerable:void 0,i,a);Object.defineProperty(e,t,o)}}var z=n.$mobx||"$mobx",Y=A("isUnmounted"),H=A("skipRender"),F=A("isForcingUpdate");function B(e){var n=e.prototype;if(n.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==t.PureComponent)if(n.shouldComponentUpdate){if(n.shouldComponentUpdate!==U)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else n.shouldComponentUpdate=U;W(n,"props"),W(n,"state");var i=n.render;return n.render=function(){return j.call(this,i)},P(n,"componentWillUnmount",(function(){this.render[z]&&this.render[z].dispose(),this[Y]=!0})),e}function j(e){var i=this;I(this,H,!1),I(this,F,!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 n.Reaction(a+".render()",(function(){if(!s&&(s=!0,!0!==i[Y])){var e=!0;try{I(i,F,!0),i[H]||t.Component.prototype.forceUpdate.call(i),e=!1}finally{I(i,F,!1),e&&l.dispose()}}}));function u(){s=!1;var e=void 0,t=void 0;if(l.track((function(){try{t=n._allowStateChanges(!1,o)}catch(t){e=t}})),e)throw e;return t}return l.reactComponent=this,u[z]=l,this.render=u,u.call(this)}function U(e,t){return this.state!==t||!k(this.props,e)}function W(e,t){var i=A("reactProp_"+t+"_valueHolder"),r=A("reactProp_"+t+"_atomHolder");function a(){return this[r]||I(this,r,n.createAtom("reactive "+t)),this[r]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=!1;return n._allowStateReadsStart&&n._allowStateReadsEnd&&(e=n._allowStateReadsStart(!0)),a.call(this).reportObserved(),n._allowStateReadsStart&&n._allowStateReadsEnd&&n._allowStateReadsEnd(e),this[i]},set:function(e){this[F]||k(this[i],e)?I(this,i,e):(I(this,i,e),I(this,H,!0),a.call(this).reportChanged(),I(this,H,!1))}})}var G="function"==typeof Symbol&&Symbol.for,V=G?Symbol.for("react.forward_ref"):"function"==typeof t.forwardRef&&t.forwardRef((function(e){return null})).$$typeof,q=G?Symbol.for("react.memo"):"function"==typeof t.memo&&t.memo((function(e){return null})).$$typeof;function Z(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'"),q&&e.$$typeof===q)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(V&&e.$$typeof===V){var n=e.render;if("function"!=typeof n)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 n.apply(void 0,e)}))}))}return"function"!=typeof e||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(t.Component,e)?B(e):w(e)}if(!t.Component)throw new Error("mobx-react requires React to be available");if(!n.observable)throw new Error("mobx-react requires mobx to be available");"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function X(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return K(null==t&&n.path)}},n.exports),n.exports}function K(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var Q=2311;var $=function(){return Q++};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={},n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),r=e.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(e);n&&(t.firefox=!0,t.version=n[1]);i&&(t.ie=!0,t.version=i[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),ee={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},te={"[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},ne=Object.prototype.toString,ie=Array.prototype,re=ie.forEach,ae=ie.filter,oe=ie.slice,se=ie.map,le=ie.reduce,ue={};function ce(e){if(null==e||"object"!=typeof e)return e;var t=e,n=ne.call(e);if("[object Array]"===n){if(!be(e)){t=[];for(var i=0,r=e.length;i<r;i++)t[i]=ce(e[i])}}else if(te[n]){if(!be(e)){var a=e.constructor;if(e.constructor.from)t=a.from(e);else{t=new a(e.length);for(i=0,r=e.length;i<r;i++)t[i]=ce(e[i])}}}else if(!ee[n]&&!be(e)&&!xe(e))for(var o in t={},e)e.hasOwnProperty(o)&&(t[o]=ce(e[o]));return t}function he(e,t,n){if(!ye(t)||!ye(e))return n?ce(t):e;for(var i in t)if(t.hasOwnProperty(i)){var r=e[i],a=t[i];!ye(a)||!ye(r)||ve(a)||ve(r)||xe(a)||xe(r)||_e(a)||_e(r)||be(a)||be(r)?!n&&i in e||(e[i]=ce(t[i])):he(r,a,n)}return e}function de(e,t,n){for(var i in t)t.hasOwnProperty(i)&&(n?null!=t[i]:null==e[i])&&(e[i]=t[i]);return e}var fe,pe=function(){return ue.createCanvas()};function ge(e,t,n){if(e&&t)if(e.forEach&&e.forEach===re)e.forEach(t,n);else if(e.length===+e.length)for(var i=0,r=e.length;i<r;i++)t.call(n,e[i],i,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}function me(e,t){var n=oe.call(arguments,2);return function(){return e.apply(t,n.concat(oe.call(arguments)))}}function ve(e){return"[object Array]"===ne.call(e)}function ye(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function _e(e){return!!ee[ne.call(e)]}function xe(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}ue.createCanvas=function(){return document.createElement("canvas")};function be(e){return e.__ec_primitive__}function we(e){var t=ve(e);this.data={};var n=this;function i(e,i){t?n.set(e,i):n.set(i,e)}e instanceof we?e.each(i):e&&ge(e,i)}we.prototype={constructor:we,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 n in void 0!==t&&(e=me(e,t)),this.data)this.data.hasOwnProperty(n)&&e(this.data[n],n)},removeKey:function(e){delete this.data[e]}};var Te={$override:function(e,t){"createCanvas"===e&&(fe=null),ue[e]=t},clone:ce,merge:he,mergeAll:function(e,t){for(var n=e[0],i=1,r=e.length;i<r;i++)n=he(n,e[i],t);return n},extend:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},defaults:de,createCanvas:pe,getContext:function(){return fe||(fe=pe().getContext("2d")),fe},indexOf:function(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n}return-1},inherits:function(e,t){var n=e.prototype;function i(){}for(var r in i.prototype=t.prototype,e.prototype=new i,n)n.hasOwnProperty(r)&&(e.prototype[r]=n[r]);e.prototype.constructor=e,e.superClass=t},mixin:function(e,t,n){de(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,n)},isArrayLike:function(e){if(e)return"string"!=typeof e&&"number"==typeof e.length},each:ge,map:function(e,t,n){if(e&&t){if(e.map&&e.map===se)return e.map(t,n);for(var i=[],r=0,a=e.length;r<a;r++)i.push(t.call(n,e[r],r,e));return i}},reduce:function(e,t,n,i){if(e&&t){if(e.reduce&&e.reduce===le)return e.reduce(t,n,i);for(var r=0,a=e.length;r<a;r++)n=t.call(i,n,e[r],r,e);return n}},filter:function(e,t,n){if(e&&t){if(e.filter&&e.filter===ae)return e.filter(t,n);for(var i=[],r=0,a=e.length;r<a;r++)t.call(n,e[r],r,e)&&i.push(e[r]);return i}},find:function(e,t,n){if(e&&t)for(var i=0,r=e.length;i<r;i++)if(t.call(n,e[i],i,e))return e[i]},bind:me,curry:function(e){var t=oe.call(arguments,1);return function(){return e.apply(this,t.concat(oe.call(arguments)))}},isArray:ve,isFunction:function(e){return"function"==typeof e},isString:function(e){return"[object String]"===ne.call(e)},isObject:ye,isBuiltInObject:_e,isTypedArray:function(e){return!!te[ne.call(e)]},isDom:xe,eqNaN:function(e){return e!=e},retrieve:function(e){for(var t=0,n=arguments.length;t<n;t++)if(null!=arguments[t])return arguments[t]},retrieve2:function(e,t){return null!=e?e:t},retrieve3:function(e,t,n){return null!=e?e:null!=t?t:n},slice:function(){return Function.call.apply(oe,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:be,createHashMap:function(e){return new we(e)},concatArray:function(e,t){for(var n=new e.constructor(e.length+t.length),i=0;i<e.length;i++)n[i]=e[i];var r=e.length;for(i=0;i<t.length;i++)n[i+r]=t[i];return n},noop:function(){}},Se="undefined"==typeof Float32Array?Array:Float32Array;function Oe(e){return Math.sqrt(Me(e))}function Me(e){return e[0]*e[0]+e[1]*e[1]}function De(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 ke={create:function(e,t){var n=new Se(2);return null==e&&(e=0),null==t&&(t=0),n[0]=e,n[1]=t,n},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,n){return e[0]=t,e[1]=n,e},add:function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e},scaleAndAdd:function(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e},sub:function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e},len:Oe,length:Oe,lenSquare:Me,lengthSquare:Me,mul:function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e},div:function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},scale:function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e},normalize:function(e,t){var n=Oe(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e},distance:De,dist:De,distanceSquare:Ae,distSquare:Ae,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},lerp:function(e,t,n,i){return e[0]=t[0]+i*(n[0]-t[0]),e[1]=t[1]+i*(n[1]-t[1]),e},applyTransform:function(e,t,n){var i=t[0],r=t[1];return e[0]=n[0]*i+n[2]*r+n[4],e[1]=n[1]*i+n[3]*r+n[5],e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e},max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}};function Ce(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function Ie(e,t){return{target:e,topTarget:t&&t.topTarget}}Ce.prototype={constructor:Ce,_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(Ie(t,e),"dragstart",e.event))},_drag:function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,i=e.offsetY,r=n-this._x,a=i-this._y;this._x=n,this._y=i,t.drift(r,a,e),this.dispatchToElement(Ie(t,e),"drag",e.event);var o=this.findHover(n,i,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.dispatchToElement(Ie(s,e),"dragleave",e.event),o&&o!==s&&this.dispatchToElement(Ie(o,e),"dragenter",e.event))}},_dragEnd:function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.dispatchToElement(Ie(t,e),"dragend",e.event),this._dropTarget&&this.dispatchToElement(Ie(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null}};var Ee=Ce,Ne=Array.prototype.slice,Re=function(e){this._$handlers={},this._$eventProcessor=e};function Le(e,t,n,i,r,a){var o=e._$handlers;if("function"==typeof n&&(r=i,i=n,n=null),!i||!t)return e;n=function(e,t){var n=e._$eventProcessor;return null!=t&&n&&n.normalizeQuery&&(t=n.normalizeQuery(t)),t}(e,n),o[t]||(o[t]=[]);for(var s=0;s<o[t].length;s++)if(o[t][s].h===i)return e;var l={h:i,one:a,query:n,ctx:r||e,callAtLast:i.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}Re.prototype={constructor:Re,one:function(e,t,n,i){return Le(this,e,t,n,i,!0)},on:function(e,t,n,i){return Le(this,e,t,n,i,!1)},isSilent:function(e){var t=this._$handlers;return!t[e]||!t[e].length},off:function(e,t){var n=this._$handlers;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var i=[],r=0,a=n[e].length;r<a;r++)n[e][r].h!==t&&i.push(n[e][r]);n[e]=i}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},trigger:function(e){var t=this._$handlers[e],n=this._$eventProcessor;if(t){var i=arguments,r=i.length;r>3&&(i=Ne.call(i,1));for(var a=t.length,o=0;o<a;){var s=t[o];if(n&&n.filter&&null!=s.query&&!n.filter(e,s.query))o++;else{switch(r){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,i[1]);break;case 3:s.h.call(s.ctx,i[1],i[2]);break;default:s.h.apply(s.ctx,i)}s.one?(t.splice(o,1),a--):o++}}}return n&&n.afterTrigger&&n.afterTrigger(e),this},triggerWithContext:function(e){var t=this._$handlers[e],n=this._$eventProcessor;if(t){var i=arguments,r=i.length;r>4&&(i=Ne.call(i,1,i.length-1));for(var a=i[i.length-1],o=t.length,s=0;s<o;){var l=t[s];if(n&&n.filter&&null!=l.query&&!n.filter(e,l.query))s++;else{switch(r){case 1:l.h.call(a);break;case 2:l.h.call(a,i[1]);break;case 3:l.h.call(a,i[1],i[2]);break;default:l.h.apply(a,i)}l.one?(t.splice(s,1),o--):s++}}}return n&&n.afterTrigger&&n.afterTrigger(e),this}};var Pe=Re,ze=Math.log(2);function Ye(e,t,n,i,r,a){var o=i+"-"+r,s=e.length;if(a.hasOwnProperty(o))return a[o];if(1===t){var l=Math.round(Math.log((1<<s)-1&~r)/ze);return e[n][l]}for(var u=i|1<<n,c=n+1;i&1<<c;)c++;for(var h=0,d=0,f=0;d<s;d++){var p=1<<d;p&r||(h+=(f%2?-1:1)*e[n][d]*Ye(e,t-1,c,u,r|p,a),f++)}return a[o]=h,h}var He={buildTransformer:function(e,t){var n=[[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]]],i={},r=Ye(n,8,0,0,0,i);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)*Ye(n,7,0===o?1:0,1<<o,1<<s,i)/r*t[o];return function(e,t,n){var i=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/i,e[1]=(t*a[3]+n*a[4]+a[5])/i}}}}.buildTransformer,Fe=[];function Be(e,t,n,i,r){if(t.getBoundingClientRect&&J.domSupported&&!je(t)){var a=t.___zrEVENTSAVED||(t.___zrEVENTSAVED={}),o=function(e,t,n){for(var i=n?"invTrans":"trans",r=t[i],a=t.srcCoords,o=!0,s=[],l=[],u=0;u<4;u++){var c=e[u].getBoundingClientRect(),h=2*u,d=c.left,f=c.top;s.push(d,f),o=o&&a&&d===a[h]&&f===a[h+1],l.push(e[u].offsetLeft,e[u].offsetTop)}return o&&r?r:(t.srcCoords=s,t[i]=n?He(l,s):He(s,l))}(function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var i=["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",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),e.appendChild(o),n.push(o)}return n}(t,a),a,r);if(o)return o(e,n,i),!0}return!1}function je(e){return"CANVAS"===e.nodeName.toUpperCase()}var Ue={transformLocalCoord:function(e,t,n,i,r){return Be(Fe,t,i,r,!0)&&Be(e,n,Fe[0],Fe[1])},transformCoordWithViewport:Be,isCanvasEl:je},We=Pe,Ge=Ue.isCanvasEl,Ve=Ue.transformCoordWithViewport,qe="undefined"!=typeof window&&!!window.addEventListener,Ze=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Xe=[];function Ke(e,t,n,i){return n=n||{},i||!J.canvasSupported?Qe(e,t,n):J.browser.firefox&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):Qe(e,t,n),n}function Qe(e,t,n){if(J.domSupported&&e.getBoundingClientRect){var i=t.clientX,r=t.clientY;if(Ge(e)){var a=e.getBoundingClientRect();return n.zrX=i-a.left,void(n.zrY=r-a.top)}if(Ve(Xe,e,i,r))return n.zrX=Xe[0],void(n.zrY=Xe[1])}n.zrX=n.zrY=0}function $e(e){return e||window.event}var Je={Dispatcher:We,clientToLocal:Ke,getNativeEvent:$e,normalizeEvent:function(e,t,n){if(null!=(t=$e(t)).zrX)return t;var i=t.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?t.targetTouches[0]:t.changedTouches[0];r&&Ke(e,r,t,n)}else Ke(e,t,t,n),t.zrDelta=t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3;var a=t.button;return null==t.which&&void 0!==a&&Ze.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t},addEventListener:function(e,t,n,i){qe?e.addEventListener(t,n,i):e.attachEvent("on"+t,n)},removeEventListener:function(e,t,n,i){qe?e.removeEventListener(t,n,i):e.detachEvent("on"+t,n)},stop:qe?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}},et=function(){this._track=[]};function tt(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}et.prototype={constructor:et,recognize:function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},clear:function(){return this._track.length=0,this},_doTrack:function(e,t,n){var i=e.touches;if(i){for(var r={points:[],touches:[],target:t,event:e},a=0,o=i.length;a<o;a++){var s=i[a],l=Je.clientToLocal(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(e){for(var t in nt)if(nt.hasOwnProperty(t)){var n=nt[t](this._track,e);if(n)return n}}};var nt={pinch:function(e,t){var n=e.length;if(n){var i,r=(e[n-1]||{}).points,a=(e[n-2]||{}).points||r;if(a&&a.length>1&&r&&r.length>1){var o=tt(r)/tt(a);!isFinite(o)&&(o=1),t.pinchScale=o;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}},it=et;function rt(){Je.stop(this.event)}function at(){}at.prototype.dispose=function(){};var ot=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],st=function(e,t,n,i){Pe.call(this),this.storage=e,this.painter=t,this.painterRoot=i,n=n||new at,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,Ee.call(this),this.setHandlerProxy(n)};function lt(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var i,r=e;r;){if(r.clipPath&&!r.clipPath.contain(t,n))return!1;r.silent&&(i=!0),r=r.parent}return!i||"silent"}return!1}function ut(e,t,n){var i=e.painter;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}st.prototype={constructor:st,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(Te.each(ot,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},mousemove:function(e){var t=e.zrX,n=e.zrY,i=ut(this,t,n),r=this._hovered,a=r.target;a&&!a.__zr&&(a=(r=this.findHover(r.x,r.y)).target);var o=this._hovered=i?{x:t,y:n}:this.findHover(t,n),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,n=e.zrIsToLocalDOM;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&!n&&this.trigger("globalout",{type:"globalout",event:e})},resize:function(e){this._hovered={}},dispatch:function(e,t){var n=this[e];n&&n.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,n){var i=(e=e||{}).target;if(!i||!i.silent){for(var r="on"+t,a=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:rt}}(t,e,n);i&&(i[r]&&(a.cancelBubble=i[r].call(i,a)),i.trigger(t,a),i=i.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,n){for(var i=this.storage.getDisplayList(),r={x:e,y:t},a=i.length-1;a>=0;a--){var o;if(i[a]!==n&&!i[a].ignore&&(o=lt(i[a],e,t))&&(!r.topTarget&&(r.topTarget=i[a]),"silent"!==o)){r.target=i[a];break}}return r},processGesture:function(e,t){this._gestureMgr||(this._gestureMgr=new it);var n=this._gestureMgr;"start"===t&&n.clear();var i=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),i){var r=i.type;e.gestureEvent=r,this.dispatchToElement({target:i.target},r,i.event)}}},Te.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){st.prototype[e]=function(t){var n,i,r=t.zrX,a=t.zrY,o=ut(this,r,a);if("mouseup"===e&&o||(i=(n=this.findHover(r,a)).target),"mousedown"===e)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===e)this._upEl=i;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||ke.dist(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}})),Te.mixin(st,Pe),Te.mixin(st,Ee);var ct=st,ht="undefined"==typeof Float32Array?Array:Float32Array;function dt(){var e=new ht(6);return ft(e),e}function ft(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 gt={create:dt,identity:ft,copy:pt,mul:function(e,t,n){var i=t[0]*n[0]+t[2]*n[1],r=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=i,e[1]=r,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e},translate:function(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e},rotate:function(e,t,n){var i=t[0],r=t[2],a=t[4],o=t[1],s=t[3],l=t[5],u=Math.sin(n),c=Math.cos(n);return e[0]=i*c+o*u,e[1]=-i*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,n){var i=n[0],r=n[1];return e[0]=t[0]*i,e[1]=t[1]*r,e[2]=t[2]*i,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*r,e},invert:function(e,t){var n=t[0],i=t[2],r=t[4],a=t[1],o=t[3],s=t[5],l=n*o-a*i;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-i*l,e[3]=n*l,e[4]=(i*s-o*r)*l,e[5]=(a*r-n*s)*l,e):null},clone:function(e){var t=dt();return pt(t,e),t}},mt=gt.identity;function vt(e){return e>5e-5||e<-5e-5}var yt=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},_t=yt.prototype;_t.transform=null,_t.needLocalTransform=function(){return vt(this.rotation)||vt(this.position[0])||vt(this.position[1])||vt(this.scale[0]-1)||vt(this.scale[1]-1)};var xt=[];_t.updateTransform=function(){var e=this.parent,t=e&&e.transform,n=this.needLocalTransform(),i=this.transform;if(n||t){i=i||gt.create(),n?this.getLocalTransform(i):mt(i),t&&(n?gt.mul(i,e.transform,i):gt.copy(i,e.transform)),this.transform=i;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;i[0]*=s,i[1]*=s,i[2]*=l,i[3]*=l}this.invTransform=this.invTransform||gt.create(),gt.invert(this.invTransform,i)}else i&&mt(i)},_t.getLocalTransform=function(e){return yt.getLocalTransform(this,e)},_t.setTransform=function(e){var t=this.transform,n=e.dpr||1;t?e.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):e.setTransform(n,0,0,n,0,0)},_t.restoreTransform=function(e){var t=e.dpr||1;e.setTransform(t,0,0,t,0,0)};var bt=[],wt=gt.create();_t.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=this.position,r=this.scale;vt(t-1)&&(t=Math.sqrt(t)),vt(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(t=-t),e[3]<0&&(n=-n),i[0]=e[4],i[1]=e[5],r[0]=t,r[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/t)}},_t.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(gt.mul(bt,e.invTransform,t),t=bt);var n=this.origin;n&&(n[0]||n[1])&&(wt[4]=n[0],wt[5]=n[1],gt.mul(bt,t,wt),bt[4]-=n[0],bt[5]-=n[1],t=bt),this.setLocalTransform(t)}},_t.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)},_t.transformCoordToLocal=function(e,t){var n=[e,t],i=this.invTransform;return i&&ke.applyTransform(n,n,i),n},_t.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&ke.applyTransform(n,n,i),n},yt.getLocalTransform=function(e,t){mt(t=t||[]);var n=e.origin,i=e.scale||[1,1],r=e.rotation||0,a=e.position||[0,0];return n&&(t[4]-=n[0],t[5]-=n[1]),gt.scale(t,t,i),r&&gt.rotate(t,t,r),n&&(t[4]+=n[0],t[5]+=n[1]),t[4]+=a[0],t[5]+=a[1],t};var Tt=yt,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,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1,i=.4;return 0===e?0:1===e?1:(!n||n<1?(n=1,t=.1):t=i*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/i)*.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}},Ot=St;function Mt(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}Mt.prototype={constructor:Mt,step:function(e,t){if(this._initialized||(this._startTime=e+this._delay,this._initialized=!0),this._paused)this._pausedTime+=t;else{var n=(e-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,r="string"==typeof i?Ot[i]:i,a="function"==typeof r?r(n):n;return this.fire("frame",a),1===n?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 Dt=Mt,At=function(){this.head=null,this.tail=null,this._len=0},kt=At.prototype;kt.insert=function(e){var t=new Ct(e);return this.insertEntry(t),t},kt.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++},kt.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},kt.len=function(){return this._len},kt.clear=function(){this.head=this.tail=null,this._len=0};var Ct=function(e){this.value=e,this.next,this.prev},It=function(e){this._list=new At,this._map={},this._maxSize=e||10,this._lastRemovedEntry=null},Et=It.prototype;Et.put=function(e,t){var n=this._list,i=this._map,r=null;if(null==i[e]){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Ct(t),o.key=e,n.insertEntry(o),i[e]=o}return r},Et.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},Et.clear=function(){this._list.clear(),this._map={}};var Nt=It,Rt={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 Lt(e){return(e=Math.round(e))<0?0:e>255?255:e}function Pt(e){return e<0?0:e>1?1:e}function zt(e){return e.length&&"%"===e.charAt(e.length-1)?Lt(parseFloat(e)/100*255):Lt(parseInt(e,10))}function Yt(e){return e.length&&"%"===e.charAt(e.length-1)?Pt(parseFloat(e)/100):Pt(parseFloat(e))}function Ht(e,t,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function Ft(e,t,n){return e+(t-e)*n}function Bt(e,t,n,i,r){return e[0]=t,e[1]=n,e[2]=i,e[3]=r,e}function jt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ut=new Nt(20),Wt=null;function Gt(e,t){Wt&&jt(Wt,t),Wt=Ut.put(e,Wt||t.slice())}function Vt(e,t){if(e){t=t||[];var n=Ut.get(e);if(n)return jt(t,n);var i,r=(e+="").replace(/ /g,"").toLowerCase();if(r in Rt)return jt(t,Rt[r]),Gt(e,t),t;if("#"===r.charAt(0))return 4===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=4095?(Bt(t,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),Gt(e,t),t):void Bt(t,0,0,0,1):7===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=16777215?(Bt(t,(16711680&i)>>16,(65280&i)>>8,255&i,1),Gt(e,t),t):void Bt(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 Bt(t,0,0,0,1);u=Yt(l.pop());case"rgb":return 3!==l.length?void Bt(t,0,0,0,1):(Bt(t,zt(l[0]),zt(l[1]),zt(l[2]),u),Gt(e,t),t);case"hsla":return 4!==l.length?void Bt(t,0,0,0,1):(l[3]=Yt(l[3]),qt(l,t),Gt(e,t),t);case"hsl":return 3!==l.length?void Bt(t,0,0,0,1):(qt(l,t),Gt(e,t),t);default:return}}Bt(t,0,0,0,1)}}function qt(e,t){var n=(parseFloat(e[0])%360+360)%360/360,i=Yt(e[1]),r=Yt(e[2]),a=r<=.5?r*(i+1):r+i-r*i,o=2*r-a;return Bt(t=t||[],Lt(255*Ht(o,a,n+1/3)),Lt(255*Ht(o,a,n)),Lt(255*Ht(o,a,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function Zt(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var i=e*(t.length-1),r=Math.floor(i),a=Math.ceil(i),o=t[r],s=t[a],l=i-r;return n[0]=Lt(Ft(o[0],s[0],l)),n[1]=Lt(Ft(o[1],s[1],l)),n[2]=Lt(Ft(o[2],s[2],l)),n[3]=Pt(Ft(o[3],s[3],l)),n}}function Xt(e,t,n){if(t&&t.length&&e>=0&&e<=1){var i=e*(t.length-1),r=Math.floor(i),a=Math.ceil(i),o=Vt(t[r]),s=Vt(t[a]),l=i-r,u=Kt([Lt(Ft(o[0],s[0],l)),Lt(Ft(o[1],s[1],l)),Lt(Ft(o[2],s[2],l)),Pt(Ft(o[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:a,value:i}:u}}function Kt(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}var Qt={parse:Vt,lift:function(e,t){var n=Vt(e);if(n){for(var i=0;i<3;i++)n[i]=t<0?n[i]*(1-t)|0:(255-n[i])*t+n[i]|0,n[i]>255?n[i]=255:e[i]<0&&(n[i]=0);return Kt(n,4===n.length?"rgba":"rgb")}},toHex:function(e){var t=Vt(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},fastLerp:Zt,fastMapToColor:Zt,lerp:Xt,mapToColor:Xt,modifyHSL:function(e,t,n,i){if(e=Vt(e))return e=function(e){if(e){var t,n,i=e[0]/255,r=e[1]/255,a=e[2]/255,o=Math.min(i,r,a),s=Math.max(i,r,a),l=s-o,u=(s+o)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+o):l/(2-s-o);var c=((s-i)/6+l/2)/l,h=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;i===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 f=[360*t,n,u];return null!=e[3]&&f.push(e[3]),f}}(e),null!=t&&(e[0]=function(e){return(e=Math.round(e))<0?0:e>360?360:e}(t)),null!=n&&(e[1]=Yt(n)),null!=i&&(e[2]=Yt(i)),Kt(qt(e),"rgba")},modifyAlpha:function(e,t){if((e=Vt(e))&&null!=t)return e[3]=Pt(t),Kt(e,"rgba")},stringify:Kt},$t=Te.isArrayLike,Jt=Array.prototype.slice;function en(e,t){return e[t]}function tn(e,t,n){e[t]=n}function nn(e,t,n){return(t-e)*n+e}function rn(e,t,n){return n>.5?t:e}function an(e,t,n,i,r){var a=e.length;if(1===r)for(var o=0;o<a;o++)i[o]=nn(e[o],t[o],n);else{var s=a&&e[0].length;for(o=0;o<a;o++)for(var l=0;l<s;l++)i[o][l]=nn(e[o][l],t[o][l],n)}}function on(e,t,n){var i=e.length,r=t.length;if(i!==r)if(i>r)e.length=r;else for(var a=i;a<r;a++)e.push(1===n?t[a]:Jt.call(t[a]));var o=e[0]&&e[0].length;for(a=0;a<e.length;a++)if(1===n)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 sn(e,t,n){if(e===t)return!0;var i=e.length;if(i!==t.length)return!1;if(1===n){for(var r=0;r<i;r++)if(e[r]!==t[r])return!1}else{var a=e[0].length;for(r=0;r<i;r++)for(var o=0;o<a;o++)if(e[r][o]!==t[r][o])return!1}return!0}function ln(e,t,n,i,r,a,o,s,l){var u=e.length;if(1===l)for(var c=0;c<u;c++)s[c]=un(e[c],t[c],n[c],i[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]=un(e[c][d],t[c][d],n[c][d],i[c][d],r,a,o)}}function un(e,t,n,i,r,a,o){var s=.5*(n-e),l=.5*(i-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*a+s*r+t}function cn(e){if($t(e)){var t=e.length;if($t(e[0])){for(var n=[],i=0;i<t;i++)n.push(Jt.call(e[i]));return n}return Jt.call(e)}return e}function hn(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}function dn(e,t,n,i,r,a){var o=e._getter,s=e._setter,l="spline"===t,u=i.length;if(u){var c,h=i[0].value,d=$t(h),f=!1,p=!1,g=d?function(e){var t=e[e.length-1].value;return $t(t&&t[0])?2:1}(i):0;i.sort((function(e,t){return e.time-t.time})),c=i[u-1].time;for(var m=[],v=[],y=i[0].value,_=!0,x=0;x<u;x++){m.push(i[x].time/c);var b=i[x].value;if(d&&sn(b,y,g)||!d&&b===y||(_=!1),y=b,"string"==typeof b){var w=Qt.parse(b);w?(b=w,f=!0):p=!0}v.push(b)}if(a||!_){var T=v[u-1];for(x=0;x<u-1;x++)d?on(v[x],T,g):!isNaN(v[x])||isNaN(T)||p||f||(v[x]=T);d&&on(o(e._target,r),T,g);var S,O,M,D,A,k=0,C=0;if(f)var I=[0,0,0,0];var E=new Dt({target:e._target,life:c,loop:e._loop,delay:e._delay,onframe:function(e,t){var n;if(t<0)n=0;else if(t<C){for(n=Math.min(k+1,u-1);n>=0&&!(m[n]<=t);n--);n=Math.min(n,u-2)}else{for(n=k;n<u&&!(m[n]>t);n++);n=Math.min(n-1,u-2)}k=n,C=t;var i=m[n+1]-m[n];if(0!==i)if(S=(t-m[n])/i,l)if(M=v[n],O=v[0===n?n:n-1],D=v[n>u-2?u-1:n+1],A=v[n>u-3?u-1:n+2],d)ln(O,M,D,A,S,S*S,S*S*S,o(e,r),g);else{if(f)a=ln(O,M,D,A,S,S*S,S*S*S,I,1),a=hn(I);else{if(p)return rn(M,D,S);a=un(O,M,D,A,S,S*S,S*S*S)}s(e,r,a)}else if(d)an(v[n],v[n+1],S,o(e,r),g);else{var a;if(f)an(v[n],v[n+1],S,I,1),a=hn(I);else{if(p)return rn(v[n],v[n+1],S);a=nn(v[n],v[n+1],S)}s(e,r,a)}},ondestroy:n});return t&&"spline"!==t&&(E.easing=t),E}}}var fn=function(e,t,n,i){this._tracks={},this._target=e,this._loop=t||!1,this._getter=n||en,this._setter=i||tn,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};fn.prototype={when:function(e,t){var n=this._tracks;for(var i in t)if(t.hasOwnProperty(i)){if(!n[i]){n[i]=[];var r=this._getter(this._target,i);if(null==r)continue;0!==e&&n[i].push({time:0,value:cn(r)})}n[i].push({time:e,value:t[i]})}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,n=0;n<t;n++)e[n].call(this)},start:function(e,t){var n,i=this,r=0,a=function(){--r||i._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=dn(this,e,a,this._tracks[o],o,t);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(e,t){l(e,t);for(var n=0;n<i._onframeList.length;n++)i._onframeList[n](e,t)}}return r||this._doneCallback(),this},stop:function(e){for(var t=this._clipList,n=this.animation,i=0;i<t.length;i++){var r=t[i];e&&r.onframe(this._target,1),n&&n.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 pn=fn,gn=1;"undefined"!=typeof window&&(gn=Math.max(window.devicePixelRatio||1,1));var mn={debugMode:0,devicePixelRatio:gn},vn=function(){},yn=Te.isString,_n=Te.isFunction,xn=Te.isObject,bn=Te.isArrayLike,wn=Te.indexOf,Tn=function(){this.animators=[]};function Sn(e,t,n,i,r,a,o,s){yn(i)?(a=r,r=i,i=0):_n(r)?(a=r,r="linear",i=0):_n(i)?(a=i,i=0):_n(n)?(a=n,n=500):n||(n=500),e.stopAnimation(),function e(t,n,i,r,a,o,s){var l={},u=0;for(var c in r)r.hasOwnProperty(c)&&(null!=i[c]?xn(r[c])&&!bn(r[c])?e(t,n?n+"."+c:c,i[c],r[c],a,o,s):(s?(l[c]=i[c],On(t,n,c,r[c])):l[c]=r[c],u++):null==r[c]||s||On(t,n,c,r[c]));u>0&&t.animate(n,!1).when(null==a?500:a,l).delay(o||0)}(e,"",e,t,n,i,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 On(e,t,n,i){if(t){var r={};r[t]={},r[t][n]=i,e.attr(r)}else e.attr(n,i)}Tn.prototype={constructor:Tn,animate:function(e,t){var n,i=!1,r=this,a=this.__zr;if(e){var o=e.split("."),s=r;i="shape"===o[0];for(var l=0,u=o.length;l<u;l++)s&&(s=s[o[l]]);s&&(n=s)}else n=r;if(n){var c=r.animators,h=new pn(n,t);return h.during((function(e){r.dirty(i)})).done((function(){c.splice(wn(c,h),1)})),c.push(h),a&&a.animation.addAnimator(h),h}vn('Property "'+e+'" is not existed in element '+r.id)},stopAnimation:function(e){for(var t=this.animators,n=t.length,i=0;i<n;i++)t[i].stop(e);return t.length=0,this},animateTo:function(e,t,n,i,r,a){Sn(this,e,t,n,i,r,a)},animateFrom:function(e,t,n,i,r,a){Sn(this,e,t,n,i,r,a,!0)}};var Mn=Tn,Dn=function(e){Tt.call(this,e),Pe.call(this,e),Mn.call(this,e),this.id=e.id||$()};Dn.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 n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[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 n=this[e];n||(n=this[e]=[]),n[0]=t[0],n[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(Te.isObject(e))for(var n in e)e.hasOwnProperty(n)&&this.attrKV(n,e[n]);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 n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this.clipPath&&this.clipPath.addSelfToZr(e)},removeSelfFromZr:function(e){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this.clipPath&&this.clipPath.removeSelfFromZr(e)}},Te.mixin(Dn,Mn),Te.mixin(Dn,Tt),Te.mixin(Dn,Pe);var An,kn,Cn,In,En=Dn,Nn=ke.applyTransform,Rn=Math.min,Ln=Math.max;function Pn(e,t,n,i){n<0&&(e+=n,n=-n),i<0&&(t+=i,i=-i),this.x=e,this.y=t,this.width=n,this.height=i}Pn.prototype={constructor:Pn,union:function(e){var t=Rn(e.x,this.x),n=Rn(e.y,this.y);this.width=Ln(e.x+e.width,this.x+this.width)-t,this.height=Ln(e.y+e.height,this.y+this.height)-n,this.x=t,this.y=n},applyTransform:(An=[],kn=[],Cn=[],In=[],function(e){if(e){An[0]=Cn[0]=this.x,An[1]=In[1]=this.y,kn[0]=In[0]=this.x+this.width,kn[1]=Cn[1]=this.y+this.height,Nn(An,An,e),Nn(kn,kn,e),Nn(Cn,Cn,e),Nn(In,In,e),this.x=Rn(An[0],kn[0],Cn[0],In[0]),this.y=Rn(An[1],kn[1],Cn[1],In[1]);var t=Ln(An[0],kn[0],Cn[0],In[0]),n=Ln(An[1],kn[1],Cn[1],In[1]);this.width=t-this.x,this.height=n-this.y}}),calculateTransform:function(e){var t=this,n=e.width/t.width,i=e.height/t.height,r=gt.create();return gt.translate(r,r,[-t.x,-t.y]),gt.scale(r,r,[n,i]),gt.translate(r,r,[e.x,e.y]),r},intersect:function(e){if(!e)return!1;e instanceof Pn||(e=Pn.create(e));var t=this,n=t.x,i=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!(i<o||s<n||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 Pn(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}}},Pn.create=function(e){return new Pn(e.x,e.y,e.width,e.height)};var zn=Pn,Yn=function(e){for(var t in e=e||{},En.call(this,e),e)e.hasOwnProperty(t)&&(this[t]=e[t]);this._children=[],this.__storage=null,this.__dirty=!0};Yn.prototype={constructor:Yn,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,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},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 n=this._children,i=n.indexOf(t);i>=0&&(n.splice(i,0,e),this._doAdd(e))}return this},_doAdd:function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__storage,n=this.__zr;t&&t!==e.__storage&&(t.addToStorage(e),e instanceof Yn&&e.addChildrenToStorage(t)),n&&n.refresh()},remove:function(e){var t=this.__zr,n=this.__storage,i=this._children,r=Te.indexOf(i,e);return r<0||(i.splice(r,1),e.parent=null,n&&(n.delFromStorage(e),e instanceof Yn&&e.delChildrenFromStorage(n)),t&&t.refresh()),this},removeAll:function(){var e,t,n=this._children,i=this.__storage;for(t=0;t<n.length;t++)e=n[t],i&&(i.delFromStorage(e),e instanceof Yn&&e.delChildrenFromStorage(i)),e.parent=null;return n.length=0,this},eachChild:function(e,t){for(var n=this._children,i=0;i<n.length;i++){var r=n[i];e.call(t,r,i)}return this},traverse:function(e,t){for(var n=0;n<this._children.length;n++){var i=this._children[n];e.call(t,i),"group"===i.type&&i.traverse(e,t)}return this},addChildrenToStorage:function(e){for(var t=0;t<this._children.length;t++){var n=this._children[t];e.addToStorage(n),n instanceof Yn&&n.addChildrenToStorage(e)}},delChildrenFromStorage:function(e){for(var t=0;t<this._children.length;t++){var n=this._children[t];e.delFromStorage(n),n instanceof Yn&&n.delChildrenFromStorage(e)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(e){for(var t=null,n=new zn(0,0,0,0),i=e||this._children,r=[],a=0;a<i.length;a++){var o=i[a];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(r);l?(n.copy(s),n.applyTransform(l),(t=t||n.clone()).union(n)):(t=t||s.clone()).union(s)}}return t||n}},Te.inherits(Yn,En);var Hn=Yn;function Fn(e,t,n,i){var r=t+1;if(r===n)return 1;if(i(e[r++],e[t])<0){for(;r<n&&i(e[r],e[r-1])<0;)r++;!function(e,t,n){n--;for(;t<n;){var i=e[t];e[t++]=e[n],e[n--]=i}}(e,t,r)}else for(;r<n&&i(e[r],e[r-1])>=0;)r++;return r-t}function Bn(e,t,n,i,r){for(i===t&&i++;i<n;i++){for(var a,o=e[i],s=t,l=i;s<l;)r(o,e[a=s+l>>>1])<0?l=a:s=a+1;var u=i-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 jn(e,t,n,i,r,a){var o=0,s=0,l=1;if(a(e,t[n+r])>0){for(s=i-r;l<s&&a(e,t[n+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[n+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[n+c])>0?o=c+1:l=c}return l}function Un(e,t,n,i,r,a){var o=0,s=0,l=1;if(a(e,t[n+r])<0){for(s=r+1;l<s&&a(e,t[n+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=i-r;l<s&&a(e,t[n+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[n+c])<0?l=c:o=c+1}return l}function Wn(e,t){var n,i,r=7,a=0;e.length;var o=[];function s(s){var l=n[s],u=i[s],c=n[s+1],h=i[s+1];i[s]=u+h,s===a-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),a--;var d=Un(e[c],e,l,u,0,t);l+=d,0!==(u-=d)&&0!==(h=jn(e[l+u-1],e,c,h,h-1,t))&&(u<=h?function(n,i,a,s){var l=0;for(l=0;l<i;l++)o[l]=e[n+l];var u=0,c=a,h=n;if(e[h++]=e[c++],0==--s){for(l=0;l<i;l++)e[h+l]=o[u+l];return}if(1===i){for(l=0;l<s;l++)e[h+l]=e[c+l];return void(e[h+s]=o[u])}var d,f,p,g=r;for(;;){d=0,f=0,p=!1;do{if(t(e[c],o[u])<0){if(e[h++]=e[c++],f++,d=0,0==--s){p=!0;break}}else if(e[h++]=o[u++],d++,f=0,1==--i){p=!0;break}}while((d|f)<g);if(p)break;do{if(0!==(d=Un(e[c],o,u,i,0,t))){for(l=0;l<d;l++)e[h+l]=o[u+l];if(h+=d,u+=d,(i-=d)<=1){p=!0;break}}if(e[h++]=e[c++],0==--s){p=!0;break}if(0!==(f=jn(o[u],e,c,s,0,t))){for(l=0;l<f;l++)e[h+l]=e[c+l];if(h+=f,c+=f,0===(s-=f)){p=!0;break}}if(e[h++]=o[u++],1==--i){p=!0;break}g--}while(d>=7||f>=7);if(p)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l<s;l++)e[h+l]=e[c+l];e[h+s]=o[u]}else{if(0===i)throw new Error;for(l=0;l<i;l++)e[h+l]=o[u+l]}}(l,u,c,h):function(n,i,a,s){var l=0;for(l=0;l<s;l++)o[l]=e[a+l];var u=n+i-1,c=s-1,h=a+s-1,d=0,f=0;if(e[h--]=e[u--],0==--i){for(d=h-(s-1),l=0;l<s;l++)e[d+l]=o[l];return}if(1===s){for(f=(h-=i)+1,d=(u-=i)+1,l=i-1;l>=0;l--)e[f+l]=e[d+l];return void(e[h]=o[c])}var p=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==--i){v=!0;break}}else if(e[h--]=o[c--],m++,g=0,1==--s){v=!0;break}}while((g|m)<p);if(v)break;do{if(0!==(g=i-Un(o[c],e,n,i,i-1,t))){for(i-=g,f=(h-=g)+1,d=(u-=g)+1,l=g-1;l>=0;l--)e[f+l]=e[d+l];if(0===i){v=!0;break}}if(e[h--]=o[c--],1==--s){v=!0;break}if(0!==(m=s-jn(e[u],o,0,s,s-1,t))){for(s-=m,f=(h-=m)+1,d=(c-=m)+1,l=0;l<m;l++)e[f+l]=o[d+l];if(s<=1){v=!0;break}}if(e[h--]=e[u--],0==--i){v=!0;break}p--}while(g>=7||m>=7);if(v)break;p<0&&(p=0),p+=2}(r=p)<1&&(r=1);if(1===s){for(f=(h-=i)+1,d=(u-=i)+1,l=i-1;l>=0;l--)e[f+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))}n=[],i=[],this.mergeRuns=function(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;s(e)}},this.forceMergeRuns=function(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,s(e)}},this.pushRun=function(e,t){n[a]=e,i[a]=t,a+=1}}var Gn=function(e,t,n,i){n||(n=0),i||(i=e.length);var r=i-n;if(!(r<2)){var a=0;if(r<32)Bn(e,n,i,n+(a=Fn(e,n,i,t)),t);else{var o=new Wn(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(r);do{if((a=Fn(e,n,i,t))<s){var l=r;l>s&&(l=s),Bn(e,n,n+l,n+a,t),a=l}o.pushRun(n,a),o.mergeRuns(),r-=a,n+=a}while(0!==r);o.forceMergeRuns()}}};function Vn(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var qn=function(){this._roots=[],this._displayList=[],this._displayListLen=0};qn.prototype={constructor:qn,traverse:function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].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,n=this._displayList,i=0,r=t.length;i<r;i++)this._updateAndAddDisplayable(t[i],null,e);n.length=this._displayListLen,J.canvasSupported&&Gn(n,Vn)},_updateAndAddDisplayable:function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.__dirty&&e.update(),e.afterUpdate();var i=e.clipPath;if(i){t=t?t.slice():[];for(var r=i,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,n)}e.__dirty=!1}else e.__clipPaths=t,this._displayList[this._displayListLen++]=e}},addRoot:function(e){e.__storage!==this&&(e instanceof Hn&&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 n=this._roots[t];n instanceof Hn&&n.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(e instanceof Array){t=0;for(var i=e.length;t<i;t++)this.delRoot(e[t])}else{var r=Te.indexOf(this._roots,e);r>=0&&(this.delFromStorage(e),this._roots.splice(r,1),e instanceof Hn&&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:Vn};var Zn=qn,Xn={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};var Kn=function(e,t,n){return Xn.hasOwnProperty(t)?n*e.dpr:n},Qn={ContextCachedBy:{NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},WILL_BE_RESTORED:9},$n=Qn.ContextCachedBy,Jn=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],ei=function(e){this.extendFrom(e,!1)};function ti(e,t,n){var i=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||(i=i*n.width+n.x,r=r*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),i=isNaN(i)?0:i,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o,e.createLinearGradient(i,a,r,o)}function ni(e,t,n){var i=n.width,r=n.height,a=Math.min(i,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*i+n.x,s=s*r+n.y,l*=a),e.createRadialGradient(o,s,0,o,s,l)}for(var ii=ei.prototype={constructor:ei,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,n){var i=n&&n.style,r=!i||e.__attrCachedBy!==$n.STYLE_BIND;e.__attrCachedBy=$n.STYLE_BIND;for(var a=0;a<Jn.length;a++){var o=Jn[a],s=o[0];(r||this[s]!==i[s])&&(e[s]=Kn(e,s,this[s]||o[1]))}if((r||this.fill!==i.fill)&&(e.fillStyle=this.fill),(r||this.stroke!==i.stroke)&&(e.strokeStyle=this.stroke),(r||this.opacity!==i.opacity)&&(e.globalAlpha=null==this.opacity?1:this.opacity),(r||this.blend!==i.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 n in e)!e.hasOwnProperty(n)||!0!==t&&(!1===t?this.hasOwnProperty(n):null==e[n])||(this[n]=e[n])},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,n){for(var i=("radial"===t.type?ni:ti)(e,t,n),r=t.colorStops,a=0;a<r.length;a++)i.addColorStop(r[a].offset,r[a].color);return i}},ri=0;ri<Jn.length;ri++){var ai=Jn[ri];ai[0]in ii||(ii[ai[0]]=ai[1])}ei.getGradient=ii.getGradient;var oi=ei,si=function(e,t){this.image=e,this.repeat=t,this.type="pattern"};si.prototype.getCanvasPattern=function(e){return e.createPattern(this.image,this.repeat||"repeat")};var li=si,ui=mn.devicePixelRatio;function ci(){return!1}function hi(e,t,n){var i=Te.createCanvas(),r=t.getWidth(),a=t.getHeight(),o=i.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=r+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",e)),i.width=r*n,i.height=a*n,i}var di=function(e,t,n){var i;n=n||ui,"string"==typeof e?i=hi(e,t,n):Te.isObject(e)&&(e=(i=e).id),this.id=e,this.dom=i;var r=i.style;r&&(i.onselectstart=ci,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=n};di.prototype={constructor:di,__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=hi("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},resize:function(e,t){var n=this.dpr,i=this.dom,r=i.style,a=this.domBack;r&&(r.width=e+"px",r.height=t+"px"),i.width=e*n,i.height=t*n,a&&(a.width=e*n,a.height=t*n,1!==n&&this.ctxBack.scale(n,n))},clear:function(e,t){var n,i=this.dom,r=this.ctx,a=i.width,o=i.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(i,0,0,a/u,o/u)),r.clearRect(0,0,a,o),t&&"transparent"!==t)&&(t.colorStops?(n=t.__canvasGradient||oi.getGradient(r,t,{x:0,y:0,width:a,height:o}),t.__canvasGradient=n):t.image&&(n=li.prototype.getCanvasPattern.call(t,r)),r.save(),r.fillStyle=n||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 fi=di,pi="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){setTimeout(e,16)},gi=new Nt(50);function mi(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function vi(e){return e&&e.width&&e.height}var yi={findExistImage:function(e){if("string"==typeof e){var t=gi.get(e);return t&&t.image}return e},createOrUpdateImage:function(e,t,n,i,r){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var a=gi.get(e),o={hostEl:n,cb:i,cbPayload:r};return a?!vi(t=a.image)&&a.pending.push(o):((t=new Image).onload=t.onerror=mi,gi.put(e,t.__cachedImgObj={image:t,pending:[o]}),t.src=t.__zrImageSrc=e),t}return e}return t},isImageReady:vi},_i=Te.getContext,xi=Te.extend,bi=Te.retrieve2,wi=Te.retrieve3,Ti=Te.trim,Si={},Oi=0,Mi=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Di={};function Ai(e,t){var n=e+":"+(t=t||"12px sans-serif");if(Si[n])return Si[n];for(var i=(e+"").split("\n"),r=0,a=0,o=i.length;a<o;a++)r=Math.max(zi(i[a],t).width,r);return Oi>5e3&&(Oi=0,Si={}),Oi++,Si[n]=r,r}function ki(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function Ci(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function Ii(e,t,n){var i=t.textPosition,r=t.textDistance,a=n.x,o=n.y;r=r||0;var s=n.height,l=n.width,u=s/2,c="left",h="top";switch(i){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 Ei(e,t,n,i,r){if(!t)return"";var a=(e+"").split("\n");r=Ni(t,n,i,r);for(var o=0,s=a.length;o<s;o++)a[o]=Ri(a[o],r);return a.join("\n")}function Ni(e,t,n,i){(i=xi({},i)).font=t;n=bi(n,"...");i.maxIterations=bi(i.maxIterations,2);var r=i.minChar=bi(i.minChar,0);i.cnCharWidth=Ai("国",t);var a=i.ascCharWidth=Ai("a",t);i.placeholder=bi(i.placeholder,"");for(var o=e=Math.max(0,e-1),s=0;s<r&&o>=a;s++)o-=a;var l=Ai(n,t);return l>o&&(n="",l=0),o=e-l,i.ellipsis=n,i.ellipsisWidth=l,i.contentWidth=o,i.containerWidth=e,i}function Ri(e,t){var n=t.containerWidth,i=t.font,r=t.contentWidth;if(!n)return"";var a=Ai(e,i);if(a<=n)return e;for(var o=0;;o++){if(a<=r||o>=t.maxIterations){e+=t.ellipsis;break}var s=0===o?Li(e,r,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*r/a):0;a=Ai(e=e.substr(0,s),i)}return""===e&&(e=t.placeholder),e}function Li(e,t,n,i){for(var r=0,a=0,o=e.length;a<o&&r<t;a++){var s=e.charCodeAt(a);r+=0<=s&&s<=127?n:i}return a}function Pi(e){return Ai("国",e)}function zi(e,t){return Di.measureText(e,t)}function Yi(e,t,n,i,r){null!=e&&(e+="");var a=bi(i,Pi(t)),o=e?e.split("\n"):[],s=o.length*a,l=s,u=!0;if(n&&(l+=n[0]+n[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=Ni(h-(n?n[1]+n[3]:0),t,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),f=0,p=o.length;f<p;f++)o[f]=Ri(o[f],d)}return{lines:o,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function Hi(e,t){var n={lines:[],width:0,height:0};if(null!=e&&(e+=""),!e)return n;for(var i,r=Mi.lastIndex=0;null!=(i=Mi.exec(e));){var a=i.index;a>r&&Fi(n,e.substring(r,a)),Fi(n,i[2],i[1]),r=Mi.lastIndex}r<e.length&&Fi(n,e.substring(r,e.length));var o=n.lines,s=0,l=0,u=[],c=t.textPadding,h=t.truncate,d=h&&h.outerWidth,f=h&&h.outerHeight;c&&(null!=d&&(d-=c[1]+c[3]),null!=f&&(f-=c[0]+c[2]));for(var p=0;p<o.length;p++){for(var g=o[p],m=0,v=0,y=0;y<g.tokens.length;y++){var _=(k=g.tokens[y]).styleName&&t.rich[k.styleName]||{},x=k.textPadding=_.textPadding,b=k.font=_.font||t.font,w=k.textHeight=bi(_.textHeight,Pi(b));if(x&&(w+=x[0]+x[2]),k.height=w,k.lineHeight=wi(_.textLineHeight,t.textLineHeight,w),k.textAlign=_&&_.textAlign||t.textAlign,k.textVerticalAlign=_&&_.textVerticalAlign||"middle",null!=f&&s+k.lineHeight>f)return{lines:[],width:0,height:0};k.textWidth=Ai(k.text,b);var T=_.textWidth,S=null==T||"auto"===T;if("string"==typeof T&&"%"===T.charAt(T.length-1))k.percentWidth=T,u.push(k),T=0;else{if(S){T=k.textWidth;var O=_.textBackgroundColor,M=O&&O.image;M&&(M=yi.findExistImage(M),yi.isImageReady(M)&&(T=Math.max(T,M.width*w/M.height)))}var D=x?x[1]+x[3]:0;T+=D;var A=null!=d?d-v:null;null!=A&&A<T&&(!S||A<D?(k.text="",k.textWidth=T=0):(k.text=Ei(k.text,A-D,b,h.ellipsis,{minChar:h.minChar}),k.textWidth=Ai(k.text,b),T=k.textWidth+D))}v+=k.width=T,_&&(m=Math.max(m,k.lineHeight))}g.width=v,g.lineHeight=m,s+=m,l=Math.max(l,v)}n.outerWidth=n.width=bi(t.textWidth,l),n.outerHeight=n.height=bi(t.textHeight,s),c&&(n.outerWidth+=c[1]+c[3],n.outerHeight+=c[0]+c[2]);for(p=0;p<u.length;p++){var k,C=(k=u[p]).percentWidth;k.width=parseInt(C,10)/100*l}return n}function Fi(e,t,n){for(var i=""===t,r=t.split("\n"),a=e.lines,o=0;o<r.length;o++){var s=r[o],l={styleName:n,text:s,isLineHolder:!s&&!i};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||i)&&u.push(l)}}}Di.measureText=function(e,t){var n=_i();return n.font=t||"12px sans-serif",n.measureText(e)};var Bi={DEFAULT_FONT:"12px sans-serif",$override:function(e,t){Di[e]=t},getWidth:Ai,getBoundingRect:function(e,t,n,i,r,a,o,s){return o?function(e,t,n,i,r,a,o,s){var l=Hi(e,{rich:o,truncate:s,font:t,textAlign:n,textPadding:r,textLineHeight:a}),u=l.outerWidth,c=l.outerHeight,h=ki(0,u,n),d=Ci(0,c,i);return new zn(h,d,u,c)}(e,t,n,i,r,a,o,s):function(e,t,n,i,r,a,o){var s=Yi(e,t,r,a,o),l=Ai(e,t);r&&(l+=r[1]+r[3]);var u=s.outerHeight,c=ki(0,l,n),h=Ci(0,u,i),d=new zn(c,h,l,u);return d.lineHeight=s.lineHeight,d}(e,t,n,i,r,a,s)},adjustTextX:ki,adjustTextY:Ci,calculateTextPosition:Ii,adjustTextPositionOnRect:function(e,t,n){return Ii({},{textPosition:e,textDistance:n},t)},truncateText:Ei,getLineHeight:Pi,measureText:zi,parsePlainText:Yi,parseRichText:Hi,makeFont:function(e){var t=(e.fontSize||e.fontFamily)&&[e.fontStyle,e.fontWeight,(e.fontSize||12)+"px",e.fontFamily||"sans-serif"].join(" ");return t&&Ti(t)||e.textFont||e.font}};var ji={buildPath:function(e,t){var n,i,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?n=i=r=a=h:h instanceof Array?1===h.length?n=i=r=a=h[0]:2===h.length?(n=r=h[0],i=a=h[1]):3===h.length?(n=h[0],i=a=h[1],r=h[2]):(n=h[0],i=h[1],r=h[2],a=h[3]):n=i=r=a=0,n+i>u&&(n*=u/(o=n+i),i*=u/o),r+a>u&&(r*=u/(o=r+a),a*=u/o),i+r>c&&(i*=c/(o=i+r),r*=c/o),n+a>c&&(n*=c/(o=n+a),a*=c/o),e.moveTo(s+n,l),e.lineTo(s+u-i,l),0!==i&&e.arc(s+u-i,l+i,i,-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+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}},Ui=Te.retrieve2,Wi=Te.retrieve3,Gi=Te.each,Vi=Te.normalizeCssArray,qi=Te.isString,Zi=Te.isObject,Xi=Qn.ContextCachedBy,Ki=Qn.WILL_BE_RESTORED,Qi=Bi.DEFAULT_FONT,$i={left:1,right:1,center:1},Ji={top:1,bottom:1,middle:1},er=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],tr={},nr={};function ir(e){if(e){e.font=Bi.makeFont(e);var t=e.textAlign;"middle"===t&&(t="center"),e.textAlign=null==t||$i[t]?t:"left";var n=e.textVerticalAlign||e.textBaseline;"center"===n&&(n="middle"),e.textVerticalAlign=null==n||Ji[n]?n:"top",e.textPadding&&(e.textPadding=Vi(e.textPadding))}}function rr(e,t,n,i,r,a){var o,s=lr(i),l=!1,u=t.__attrCachedBy===Xi.PLAIN_TEXT;a!==Ki?(a&&(o=a.style,l=!s&&u&&o),t.__attrCachedBy=s?Xi.NONE:Xi.PLAIN_TEXT):u&&(t.__attrCachedBy=Xi.NONE);var c=i.font||Qi;l&&c===(o.font||Qi)||(t.font=c);var h=e.__computedFont;e.__styleFont!==c&&(e.__styleFont=c,h=e.__computedFont=t.font);var d=i.textPadding,f=i.textLineHeight,p=e.__textCotentBlock;p&&!e.__dirtyText||(p=e.__textCotentBlock=Bi.parsePlainText(n,h,d,f,i.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=hr(nr,e,i,r),_=y.baseX,x=y.baseY,b=y.textAlign||"left",w=y.textVerticalAlign;or(t,i,r,_,x);var T=Bi.adjustTextY(x,g,w),S=_,O=T;if(s||d){var M=Bi.getWidth(n,h);d&&(M+=d[1]+d[3]);var D=Bi.adjustTextX(_,M,b);s&&ur(e,t,i,D,T,M,g),d&&(S=mr(_,b,d),O+=d[0])}t.textAlign=b,t.textBaseline="middle",t.globalAlpha=i.opacity||1;for(var A=0;A<er.length;A++){var k=er[A],C=k[0],I=k[1],E=i[C];l&&E===o[C]||(t[I]=Kn(t,I,E||k[2]))}O+=v/2;var N=i.textStrokeWidth,R=l?o.textStrokeWidth:null,L=!l||N!==R,P=!l||L||i.textStroke!==o.textStroke,z=fr(i.textStroke,N),Y=pr(i.textFill);if(z&&(L&&(t.lineWidth=N),P&&(t.strokeStyle=z)),Y&&(l&&i.textFill===o.textFill||(t.fillStyle=Y)),1===m.length)z&&t.strokeText(m[0],S,O),Y&&t.fillText(m[0],S,O);else for(A=0;A<m.length;A++)z&&t.strokeText(m[A],S,O),Y&&t.fillText(m[A],S,O),O+=v}function ar(e,t,n,i,r,a){a!==Ki&&(t.__attrCachedBy=Xi.NONE);var o=e.__textCotentBlock;o&&!e.__dirtyText||(o=e.__textCotentBlock=Bi.parseRichText(n,i)),function(e,t,n,i,r){var a=n.width,o=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=hr(nr,e,i,r),c=u.baseX,h=u.baseY,d=u.textAlign,f=u.textVerticalAlign;or(t,i,r,c,h);var p=Bi.adjustTextX(c,o,d),g=Bi.adjustTextY(h,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;lr(i)&&ur(e,t,i,p,g,o,s);for(var _=0;_<n.lines.length;_++){for(var x,b=n.lines[_],w=b.tokens,T=w.length,S=b.lineHeight,O=b.width,M=0,D=m,A=y,k=T-1;M<T&&(!(x=w[M]).textAlign||"left"===x.textAlign);)sr(e,t,x,i,S,v,D,"left"),O-=x.width,D+=x.width,M++;for(;k>=0&&"right"===(x=w[k]).textAlign;)sr(e,t,x,i,S,v,A,"right"),O-=x.width,A-=x.width,k--;for(D+=(a-(D-m)-(y-A)-O)/2;M<=k;)x=w[M],sr(e,t,x,i,S,v,D+x.width/2,"center"),D+=x.width,M++;v+=S}}(e,t,o,i,r)}function or(e,t,n,i,r){if(n&&t.textRotation){var a=t.textOrigin;"center"===a?(i=n.width/2+n.x,r=n.height/2+n.y):a&&(i=a[0]+n.x,r=a[1]+n.y),e.translate(i,r),e.rotate(-t.textRotation),e.translate(-i,-r)}}function sr(e,t,n,i,r,a,o,s){var l=i.rich[n.styleName]||{};l.text=n.text;var u=n.textVerticalAlign,c=a+r/2;"top"===u?c=a+n.height/2:"bottom"===u&&(c=a+r-n.height/2),!n.isLineHolder&&lr(l)&&ur(e,t,l,"right"===s?o-n.width:"center"===s?o-n.width/2:o,c-n.height/2,n.width,n.height);var h=n.textPadding;h&&(o=mr(o,s,h),c-=n.height/2-h[2]-n.textHeight/2),dr(t,"shadowBlur",Wi(l.textShadowBlur,i.textShadowBlur,0)),dr(t,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),dr(t,"shadowOffsetX",Wi(l.textShadowOffsetX,i.textShadowOffsetX,0)),dr(t,"shadowOffsetY",Wi(l.textShadowOffsetY,i.textShadowOffsetY,0)),dr(t,"textAlign",s),dr(t,"textBaseline","middle"),dr(t,"font",n.font||Qi);var d=fr(l.textStroke||i.textStroke,p),f=pr(l.textFill||i.textFill),p=Ui(l.textStrokeWidth,i.textStrokeWidth);d&&(dr(t,"lineWidth",p),dr(t,"strokeStyle",d),t.strokeText(n.text,o,c)),f&&(dr(t,"fillStyle",f),t.fillText(n.text,o,c))}function lr(e){return!!(e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor)}function ur(e,t,n,i,r,a,o){var s=n.textBackgroundColor,l=n.textBorderWidth,u=n.textBorderColor,c=qi(s);if(dr(t,"shadowBlur",n.textBoxShadowBlur||0),dr(t,"shadowColor",n.textBoxShadowColor||"transparent"),dr(t,"shadowOffsetX",n.textBoxShadowOffsetX||0),dr(t,"shadowOffsetY",n.textBoxShadowOffsetY||0),c||l&&u){t.beginPath();var h=n.textBorderRadius;h?ji.buildPath(t,{x:i,y:r,width:a,height:o,r:h}):t.rect(i,r,a,o),t.closePath()}if(c)if(dr(t,"fillStyle",s),null!=n.fillOpacity){var d=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,t.fill(),t.globalAlpha=d}else t.fill();else if(Zi(s)){var f=s.image;(f=yi.createOrUpdateImage(f,null,e,cr,s))&&yi.isImageReady(f)&&t.drawImage(f,i,r,a,o)}if(l&&u)if(dr(t,"lineWidth",l),dr(t,"strokeStyle",u),null!=n.strokeOpacity){d=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,t.stroke(),t.globalAlpha=d}else t.stroke()}function cr(e,t){t.image=e}function hr(e,t,n,i){var r=n.x||0,a=n.y||0,o=n.textAlign,s=n.textVerticalAlign;if(i){var l=n.textPosition;if(l instanceof Array)r=i.x+gr(l[0],i.width),a=i.y+gr(l[1],i.height);else{var u=t&&t.calculateTextPosition?t.calculateTextPosition(tr,n,i):Bi.calculateTextPosition(tr,n,i);r=u.x,a=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var c=n.textOffset;c&&(r+=c[0],a+=c[1])}return(e=e||{}).baseX=r,e.baseY=a,e.textAlign=o,e.textVerticalAlign=s,e}function dr(e,t,n){return e[t]=Kn(e,t,n),e[t]}function fr(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 gr(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function mr(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}var vr={normalizeTextStyle:function(e){return ir(e),Gi(e.rich,ir),e},renderText:function(e,t,n,i,r,a){i.rich?ar(e,t,n,i,r,a):rr(e,t,n,i,r,a)},getBoxPosition:hr,getStroke:fr,getFill:pr,parsePercent:gr,needDrawText:function(e,t){return null!=e&&(e||t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor||t.textPadding)}},yr=Qn.WILL_BE_RESTORED,_r=new zn,xr=function(){};xr.prototype={constructor:xr,drawRectText:function(e,t){var n=this.style;t=n.textRect||t,this.__dirty&&vr.normalizeTextStyle(n,!0);var i=n.text;if(null!=i&&(i+=""),vr.needDrawText(i,n)){e.save();var r=this.transform;n.transformText?this.setTransform(e):r&&(_r.copy(t),_r.applyTransform(r),t=_r),vr.renderText(this,e,i,n,t,yr),e.restore()}}};var br=xr;function wr(e){for(var t in e=e||{},En.call(this,e),e)e.hasOwnProperty(t)&&"style"!==t&&(this[t]=e[t]);this.style=new oi(e.style,this),this._rect=null,this.__clipPaths=null}wr.prototype={constructor:wr,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 n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[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?En.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 oi(e,this),this.dirty(!1),this},calculateTextPosition:null},Te.inherits(wr,En),Te.mixin(wr,br);var Tr=wr;function Sr(e){Tr.call(this,e)}Sr.prototype={constructor:Sr,type:"image",brush:function(e,t){var n=this.style,i=n.image;n.bind(e,this,t);var r=this._image=yi.createOrUpdateImage(i,this._image,this,this.onload);if(r&&yi.isImageReady(r)){var a=n.x||0,o=n.y||0,s=n.width,l=n.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),n.sWidth&&n.sHeight){var c=n.sx||0,h=n.sy||0;e.drawImage(r,c,h,n.sWidth,n.sHeight,a,o,s,l)}else if(n.sx&&n.sy){var d=s-(c=n.sx),f=l-(h=n.sy);e.drawImage(r,c,h,d,f,a,o,s,l)}else e.drawImage(r,a,o,s,l);null!=n.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))}},getBoundingRect:function(){var e=this.style;return this._rect||(this._rect=new zn(e.x||0,e.y||0,e.width||0,e.height||0)),this._rect}},Te.inherits(Sr,Tr);var Or=Sr,Mr=mn.devicePixelRatio;function Dr(e){return parseInt(e,10)}var Ar=new zn(0,0,0,0),kr=new zn(0,0,0,0);var Cr=function(e,t,n){this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=Te.extend({},n||{}),this.dpr=n.devicePixelRatio||Mr,this._singleCanvas=i,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,i){var s=e.width,l=e.height;null!=n.width&&(s=n.width),null!=n.height&&(l=n.height),this.dpr=n.devicePixelRatio||1,e.width=s*this.dpr,e.height=l*this.dpr,this._width=s,this._height=l;var u=new fi(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 n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]};Cr.prototype={constructor:Cr,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),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,e,this._redrawId);for(var i=0;i<n.length;i++){var r=n[i],a=this._layers[r];if(!a.__builtin__&&a.refresh){var o=0===i?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(e,t){if(!e.__hoverMir){var n=new e.constructor({style:e.style,shape:e.shape,z:e.z,z2:e.z2,silent:e.silent});return n.__from=e,e.__hoverMir=n,t&&n.setStyle(t),this._hoverElements.push(n),n}},removeHover:function(e){var t=e.__hoverMir,n=this._hoverElements,i=Te.indexOf(n,t);i>=0&&n.splice(i,1),e.__hoverMir=null},clearHover:function(e){for(var t=this._hoverElements,n=0;n<t.length;n++){var i=t[n].__from;i&&(i.__hoverMir=null)}t.length=0},refreshHover:function(){var e=this._hoverElements,t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){Gn(e,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(1e5));var i={};n.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,n,!0,i))):(e.splice(r,1),o.__hoverMir=null,t--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(e,t,n){if(this._redrawId===n){t=t||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),!i){var r=this;pi((function(){r._paintList(e,t,n)}))}}},_compositeManually:function(){var e=this.getLayer(314159).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer((function(i){i.virtual&&e.drawImage(i.dom,0,0,t,n)}))},_doPaintList:function(e,t){for(var n=[],i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];(s=this._layers[r]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||t)&&n.push(s)}for(var a=!0,o=0;o<n.length;o++){var s,l=(s=n[o]).ctx,u={};l.save();var c=t?s.__startIndex:s.__drawIndex,h=!t&&s.incremental&&Date.now,d=h&&Date.now(),f=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,f);else if(c===s.__startIndex){var p=e[c];p.incremental&&p.notClear&&!t||s.clear(!1,f)}-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&&Te.each(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),a},_doPaintEl:function(e,t,n,i){var r=t.ctx,a=e.transform;if((t.__dirty||n)&&!e.invisible&&0!==e.style.opacity&&(!a||a[0]||a[3])&&(!e.culling||!function(e,t,n){return Ar.copy(e.getBoundingRect()),e.transform&&Ar.applyTransform(e.transform),kr.width=t,kr.height=n,!Ar.intersect(kr)}(e,this._width,this._height))){var o=e.__clipPaths,s=i.prevElClipPaths;s&&!function(e,t){if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(o,s)||(s&&(r.restore(),i.prevElClipPaths=null,i.prevEl=null),o&&(r.save(),function(e,t){for(var n=0;n<e.length;n++){var i=e[n];i.setTransform(t),t.beginPath(),i.buildPath(t,i.shape),t.clip(),i.restoreTransform(t)}}(o,r),i.prevElClipPaths=o)),e.beforeBrush&&e.beforeBrush(r),e.brush(r,i.prevEl||null),i.prevEl=e,e.afterBrush&&e.afterBrush(r)}},getLayer:function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=314159);var n=this._layers[e];return n||((n=new fi("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Te.merge(n,this._layerConfig[e],!0):this._layerConfig[e-.01]&&Te.merge(n,this._layerConfig[e-.01],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},insertLayer:function(e,t){var n=this._layers,i=this._zlevelList,r=i.length,a=null,o=-1,s=this._domRoot;if(!n[e]&&function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(r>0&&e>i[0]){for(o=0;o<r-1&&!(i[o]<e&&i[o+1]>e);o++);a=n[i[o]]}if(i.splice(o+1,0,e),n[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 n,i,r=this._zlevelList;for(i=0;i<r.length;i++)n=r[i],e.call(t,this._layers[n],n)},eachBuiltinLayer:function(e,t){var n,i,r,a=this._zlevelList;for(r=0;r<a.length;r++)i=a[r],(n=this._layers[i]).__builtin__&&e.call(t,n,i)},eachOtherLayer:function(e,t){var n,i,r,a=this._zlevelList;for(r=0;r<a.length;r++)i=a[r],(n=this._layers[i]).__builtin__||e.call(t,n,i)},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 n=1;n<e.length;n++){if((o=e[n]).zlevel!==e[n-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var i,r=null,a=0;for(n=0;n<e.length;n++){var o,s,l=(o=e[n]).zlevel;i!==l&&(i=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__||vn("ZLevel "+l+" has been used by unkown layer "+s.id),s!==r&&(s.__used=!0,s.__startIndex!==n&&(s.__dirty=!0),s.__startIndex=n,s.incremental?s.__drawIndex=-1:s.__drawIndex=n,t(n),r=s),o.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=n))}t(n),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 n=this._layerConfig;n[e]?Te.merge(n[e],t,!0):n[e]=t;for(var i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];if(r===e||r===e+.01){var a=this._layers[r];Te.merge(a,n[e],!0)}}}},delLayer:function(e){var t=this._layers,n=this._zlevelList,i=t[e];i&&(i.dom.parentNode.removeChild(i.dom),delete t[e],n.splice(Te.indexOf(n,e),1))},resize:function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts;if(null!=e&&(i.width=e),null!=t&&(i.height=t),e=this._getSize(0),t=this._getSize(1),n.style.display="",this._width!==e||t!==this._height){for(var r in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(e,t);Te.each(this._progressiveLayers,(function(n){n.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 fi("image",this,e.pixelRatio||this.dpr);if(t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor),e.pixelRatio<=this.dpr){this.refresh();var n=t.dom.width,i=t.dom.height,r=t.ctx;this.eachLayer((function(e){e.__builtin__?r.drawImage(e.dom,0,0,n,i):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,n=["width","height"][e],i=["clientWidth","clientHeight"][e],r=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=t[n]&&"auto"!==t[n])return parseFloat(t[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[i]||Dr(s[n])||Dr(o.style[n]))-(Dr(s[r])||0)-(Dr(s[a])||0)|0},pathToImage:function(e,t){t=t||this.dpr;var n=document.createElement("canvas"),i=n.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),f=Math.max(u/2,l+o),p=r.width+c+h,g=r.height+d+f;n.width=p*t,n.height=g*t,i.scale(t,t),i.clearRect(0,0,p,g),i.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(i);var v=new Or({style:{x:0,y:0,image:n}});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 Ir=Cr,Er=Je.Dispatcher,Nr=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,Er.call(this)};Nr.prototype={constructor:Nr,addClip:function(e){this._clips.push(e)},addAnimator:function(e){e.animation=this;for(var t=e.getClips(),n=0;n<t.length;n++)this.addClip(t[n])},removeClip:function(e){var t=Te.indexOf(this._clips,e);t>=0&&this._clips.splice(t,1)},removeAnimator:function(e){for(var t=e.getClips(),n=0;n<t.length;n++)this.removeClip(t[n]);e.animation=null},_update:function(){for(var e=(new Date).getTime()-this._pausedTime,t=e-this._time,n=this._clips,i=n.length,r=[],a=[],o=0;o<i;o++){var s=n[o],l=s.step(e,t);l&&(r.push(l),a.push(s))}for(o=0;o<i;)n[o]._needsRemove?(n[o]=n[i-1],n.pop(),i--):o++;i=r.length;for(o=0;o<i;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,pi((function t(){e._running&&(pi(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 n=new pn(e,(t=t||{}).loop,t.getter,t.setter);return this.addAnimator(n),n}},Te.mixin(Nr,Er);var Rr,Lr,Pr=Nr,zr=Je.addEventListener,Yr=Je.removeEventListener,Hr=Je.normalizeEvent,Fr=Je.getNativeEvent,Br=J.domSupported,jr=(Lr={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Rr=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:Te.map(Rr,(function(e){var t=e.replace("mouse","pointer");return Lr.hasOwnProperty(t)?t:e}))}),Ur=["mousemove","mouseup"],Wr=["pointermove","pointerup"];function Gr(e){return"mousewheel"===e&&J.browser.firefox?"DOMMouseScroll":e}function Vr(e){var t=e.pointerType;return"pen"===t||"touch"===t}function qr(e){e&&(e.zrByTouch=!0)}function Zr(e,t){for(var n=t,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return i}function Xr(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 Kr=Xr.prototype;Kr.stopPropagation=Kr.stopImmediatePropagation=Kr.preventDefault=Te.noop;var Qr={mousedown:function(e){e=Hr(this.dom,e),this._mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Hr(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=Hr(this.dom,e),ia(this,!1),this.trigger("mouseup",e)},mouseout:function(e){e=Hr(this.dom,e),this._pointerCapturing&&(e.zrEventControl="no_globalout");var t=e.toElement||e.relatedTarget;e.zrIsToLocalDOM=Zr(this,t),this.trigger("mouseout",e)},touchstart:function(e){qr(e=Hr(this.dom,e)),this._lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Qr.mousemove.call(this,e),Qr.mousedown.call(this,e)},touchmove:function(e){qr(e=Hr(this.dom,e)),this.handler.processGesture(e,"change"),Qr.mousemove.call(this,e)},touchend:function(e){qr(e=Hr(this.dom,e)),this.handler.processGesture(e,"end"),Qr.mouseup.call(this,e),+new Date-this._lastTouchMoment<300&&Qr.click.call(this,e)},pointerdown:function(e){Qr.mousedown.call(this,e)},pointermove:function(e){Vr(e)||Qr.mousemove.call(this,e)},pointerup:function(e){Qr.mouseup.call(this,e)},pointerout:function(e){Vr(e)||Qr.mouseout.call(this,e)}};Te.each(["click","mousewheel","dblclick","contextmenu"],(function(e){Qr[e]=function(t){t=Hr(this.dom,t),this.trigger(e,t)}}));var $r={pointermove:function(e){Vr(e)||$r.mousemove.call(this,e)},pointerup:function(e){$r.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 n=t.domHandlers;J.pointerEventsSupported?Te.each(jr.pointer,(function(i){ta(t,i,(function(t){n[i].call(e,t)}))})):(J.touchEventsSupported&&Te.each(jr.touch,(function(i){ta(t,i,(function(r){n[i].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)}))})),Te.each(jr.mouse,(function(i){ta(t,i,(function(r){r=Fr(r),t.touching||n[i].call(e,r)}))})))}function ea(e,t){function n(n){ta(t,n,(function(i){i=Fr(i),Zr(e,i.target)||(i=function(e,t){return Hr(e.dom,new Xr(e,t),!0)}(e,i),t.domHandlers[n].call(e,i))}),{capture:!0})}J.pointerEventsSupported?Te.each(Wr,n):J.touchEventsSupported||Te.each(Ur,n)}function ta(e,t,n,i){e.mounted[t]=n,e.listenerOpts[t]=i,zr(e.domTarget,Gr(t),n,i)}function na(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Yr(e.domTarget,Gr(n),t[n],e.listenerOpts[n]);e.mounted={}}function ia(e,t){if(e._mayPointerCapture=null,Br&&e._pointerCapturing^t){e._pointerCapturing=t;var n=e._globalHandlerScope;t?ea(e,n):na(n)}}function ra(e,t){this.domTarget=e,this.domHandlers=t,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function aa(e,t){Pe.call(this),this.dom=e,this.painterRoot=t,this._localHandlerScope=new ra(e,Qr),Br&&(this._globalHandlerScope=new ra(document,$r)),this._pointerCapturing=!1,this._mayPointerCapture=null,Jr(this,this._localHandlerScope)}var oa=aa.prototype;oa.dispose=function(){na(this._localHandlerScope),Br&&na(this._globalHandlerScope)},oa.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},Te.mixin(aa,Pe);var sa=aa,la=!J.canvasSupported,ua={canvas:Ir},ca={};var ha=function(e,t,n){n=n||{},this.dom=t,this.id=e;var i=this,r=new Zn,a=n.renderer;if(la){if(!ua.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&ua[a]||(a="canvas");var o=new ua[a](t,r,n,e);this.storage=r,this.painter=o;var s=J.node||J.worker?null:new sa(o.getViewportRoot(),o.root);this.handler=new ct(r,o,s,o.root),this.animation=new Pr({stage:{update:Te.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(i)},r.addToStorage=function(e){u.call(r,e),e.addSelfToZr(i)}};ha.prototype={constructor:ha,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 n=this.painter.addHover(e,t);return this.refreshHover(),n}},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,n){this.handler.on(e,t,n)},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 ca[e]}};var da={version:"4.3.1",init:function(e,t){var n=new ha($(),e,t);return ca[n.id]=n,n},dispose:function(e){if(e)e.dispose();else{for(var t in ca)ca.hasOwnProperty(t)&&ca[t].dispose();ca={}}return this},getInstance:function(e){return ca[e]},registerPainter:function(e,t){ua[e]=t}},fa=Te.each,pa=Te.isObject,ga=Te.isArray;function ma(e){return e instanceof Array?e:null==e?[]:[e]}function va(e){return pa(e)&&e.id&&0===(e.id+"").indexOf("\0_ec_\0")}var ya=0;function _a(e,t){return e&&e.hasOwnProperty(t)}var xa={normalizeToArray:ma,defaultEmphasis:function(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var i=0,r=n.length;i<r;i++){var a=n[i];!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)||ga(e)||e instanceof Date?e:e.value},isDataItemOption:function(e){return pa(e)&&!(e instanceof Array)},mappingToExists:function(e,t){t=(t||[]).slice();var n=Te.map(e||[],(function(e,t){return{exist:e}}));return fa(t,(function(e,i){if(pa(e)){for(var r=0;r<n.length;r++)if(!n[r].option&&null!=e.id&&n[r].exist.id===e.id+"")return n[r].option=e,void(t[i]=null);for(r=0;r<n.length;r++){var a=n[r].exist;if(!(n[r].option||null!=a.id&&null!=e.id||null==e.name||va(e)||va(a)||a.name!==e.name+""))return n[r].option=e,void(t[i]=null)}}})),fa(t,(function(e,t){if(pa(e)){for(var i=0;i<n.length;i++){var r=n[i].exist;if(!n[i].option&&!va(r)&&null==e.id){n[i].option=e;break}}i>=n.length&&n.push({option:e})}})),n},makeIdAndName:function(e){var t=Te.createHashMap();fa(e,(function(e,n){var i=e.exist;i&&t.set(i.id,e)})),fa(e,(function(e,n){var i=e.option;Te.assert(!i||null==i.id||!t.get(i.id)||t.get(i.id)===e,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&t.set(i.id,e),!e.keyInfo&&(e.keyInfo={})})),fa(e,(function(e,n){var i=e.exist,r=e.option,a=e.keyInfo;if(pa(r)){if(a.name=null!=r.name?r.name+"":i?i.name:"series\0"+n,i)a.id=i.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:va,compressBatches:function(e,t){var n={},i={};return r(e||[],n),r(t||[],i,n),[a(n),a(i)];function r(e,t,n){for(var i=0,r=e.length;i<r;i++)for(var a=e[i].seriesId,o=ma(e[i].dataIndex),s=n&&n[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 n=[];for(var i in e)if(e.hasOwnProperty(i)&&null!=e[i])if(t)n.push(+i);else{var r=a(e[i],!0);r.length&&n.push({seriesId:i,dataIndex:r})}return n}},queryDataIndex:function(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?Te.isArray(t.dataIndex)?Te.map(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?Te.isArray(t.name)?Te.map(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0},makeInner:function(){var e="__\0ec_inner_"+ya+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}},parseFinder:function(e,t,n){if(Te.isString(t)){var i={};i[t+"Index"]=0,t=i}var r=n&&n.defaultMainType;!r||_a(t,r+"Index")||_a(t,r+"Id")||_a(t,r+"Name")||(t[r+"Index"]=0);var a={};return fa(t,(function(i,r){i=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==i||"index"===l&&"none"===i||n&&n.includeMainTypes&&Te.indexOf(n.includeMainTypes,s)<0)){var u={mainType:s};"index"===l&&"all"===i||(u[l]=i);var c=e.queryComponents(u);a[s+"Models"]=c,a[s+"Model"]=c[0]}}else a[r]=i})),a},setAttribute:function(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n},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 n=Te.createHashMap(),i=[];return Te.each(e,(function(e){var r=t(e);(n.get(r)||(i.push(r),n.set(r,[]))).push(e)})),{keys:i,buckets:n}}},ba="___EC__COMPONENT__CONTAINER___";function wa(e){var t={main:"",sub:""};return e&&(e=e.split("."),t.main=e[0]||"",t.sub=e[1]||""),t}var Ta=0;function Sa(e,t){var n=Te.slice(arguments,2);return this.superClass.prototype[t].apply(e,n)}function Oa(e,t,n){return this.superClass.prototype[t].apply(e,n)}var Ma={parseClassType:wa,enableClassExtend:function(e,t){e.$constructor=e,e.extend=function(e){var t=this,n=function(){e.$constructor?e.$constructor.apply(this,arguments):t.apply(this,arguments)};return Te.extend(n.prototype,e),n.extend=this.extend,n.superCall=Sa,n.superApply=Oa,Te.inherits(n,this),n.superClass=t,n}},enableClassCheck:function(e){var t=["__\0is_clz",Ta++,Math.random().toFixed(3)].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}},enableClassManagement:function(e,t){t=t||{};var n={};if(e.registerClass=function(e,t){if(t)if(function(e){Te.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}(t),(t=wa(t)).sub){if(t.sub!==ba){(function(e){var t=n[e.main];t&&t[ba]||((t=n[e.main]={})[ba]=!0);return t}(t))[t.sub]=e}}else n[t.main]=e;return e},e.getClass=function(e,t,i){var r=n[e];if(r&&r[ba]&&(r=t?r[t]:null),i&&!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=wa(e);var t=[],i=n[e.main];return i&&i[ba]?Te.each(i,(function(e,n){n!==ba&&t.push(e)})):t.push(i),t},e.hasClass=function(e){return e=wa(e),!!n[e.main]},e.getAllClassMainTypes=function(){var e=[];return Te.each(n,(function(t,n){e.push(n)})),e},e.hasSubTypes=function(e){e=wa(e);var t=n[e.main];return t&&t[ba]},e.parseClassType=wa,t.registerWhenExtend){var i=e.extend;i&&(e.extend=function(t){var n=i.call(this,t);return e.registerClass(n,t.type)})}return e},setReadOnly:function(e,t){}};var Da=function(e){for(var t=0;t<e.length;t++)e[t][1]||(e[t][1]=e[t][0]);return function(t,n,i){for(var r={},a=0;a<e.length;a++){var o=e[a][1];if(!(n&&Te.indexOf(n,o)>=0||i&&Te.indexOf(i,o)<0)){var s=t.getShallow(o);null!=s&&(r[e[a][0]]=s)}}return r}},Aa=Da([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),ka={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"),n=Math.max(e,2),i=4*e;return"solid"!==t&&null!=t&&("dashed"===t?[i,i]:[n,n])}},Ca=Da([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Ia={getAreaStyle:function(e,t){return Ca(this,e,t)}},Ea=ke.create,Na=ke.distSquare,Ra=Math.pow,La=Math.sqrt,Pa=La(3),za=Ea(),Ya=Ea(),Ha=Ea();function Fa(e){return e>-1e-8&&e<1e-8}function Ba(e){return e>1e-8||e<-1e-8}function ja(e,t,n,i,r){var a=1-r;return a*a*(a*e+3*r*t)+r*r*(r*i+3*a*n)}function Ua(e,t,n,i){var r=1-i;return r*(r*e+2*i*t)+i*i*n}var Wa={cubicAt:ja,cubicDerivativeAt:function(e,t,n,i,r){var a=1-r;return 3*(((t-e)*a+2*(n-t)*r)*a+(i-n)*r*r)},cubicRootAt:function(e,t,n,i,r,a){var o=i+3*(t-n)-e,s=3*(n-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,f=0;if(Fa(c)&&Fa(h)){if(Fa(s))a[0]=0;else(S=-l/s)>=0&&S<=1&&(a[f++]=S)}else{var p=h*h-4*c*d;if(Fa(p)){var g=h/c,m=-g/2;(S=-s/o+g)>=0&&S<=1&&(a[f++]=S),m>=0&&m<=1&&(a[f++]=m)}else if(p>0){var v=La(p),y=c*s+1.5*o*(-h+v),_=c*s+1.5*o*(-h-v);(S=(-s-((y=y<0?-Ra(-y,1/3):Ra(y,1/3))+(_=_<0?-Ra(-_,1/3):Ra(_,1/3))))/(3*o))>=0&&S<=1&&(a[f++]=S)}else{var x=(2*c*s-3*o*h)/(2*La(c*c*c)),b=Math.acos(x)/3,w=La(c),T=Math.cos(b),S=(-s-2*w*T)/(3*o),O=(m=(-s+w*(T+Pa*Math.sin(b)))/(3*o),(-s+w*(T-Pa*Math.sin(b)))/(3*o));S>=0&&S<=1&&(a[f++]=S),m>=0&&m<=1&&(a[f++]=m),O>=0&&O<=1&&(a[f++]=O)}}return f},cubicExtrema:function(e,t,n,i,r){var a=6*n-12*t+6*e,o=9*t+3*i-3*e-9*n,s=3*t-3*e,l=0;if(Fa(o)){if(Ba(a))(c=-s/a)>=0&&c<=1&&(r[l++]=c)}else{var u=a*a-4*o*s;if(Fa(u))r[0]=-a/(2*o);else if(u>0){var c,h=La(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,n,i,r,a){var o=(t-e)*r+e,s=(n-t)*r+t,l=(i-n)*r+n,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]=i},cubicProjectPoint:function(e,t,n,i,r,a,o,s,l,u,c){var h,d,f,p,g,m=.005,v=1/0;za[0]=l,za[1]=u;for(var y=0;y<1;y+=.05)Ya[0]=ja(e,n,r,o,y),Ya[1]=ja(t,i,a,s,y),(p=Na(za,Ya))<v&&(h=y,v=p);v=1/0;for(var _=0;_<32&&!(m<1e-4);_++)d=h-m,f=h+m,Ya[0]=ja(e,n,r,o,d),Ya[1]=ja(t,i,a,s,d),p=Na(Ya,za),d>=0&&p<v?(h=d,v=p):(Ha[0]=ja(e,n,r,o,f),Ha[1]=ja(t,i,a,s,f),g=Na(Ha,za),f<=1&&g<v?(h=f,v=g):m*=.5);return c&&(c[0]=ja(e,n,r,o,h),c[1]=ja(t,i,a,s,h)),La(v)},quadraticAt:Ua,quadraticDerivativeAt:function(e,t,n,i){return 2*((1-i)*(t-e)+i*(n-t))},quadraticRootAt:function(e,t,n,i,r){var a=e-2*t+n,o=2*(t-e),s=e-i,l=0;if(Fa(a)){if(Ba(o))(c=-s/o)>=0&&c<=1&&(r[l++]=c)}else{var u=o*o-4*a*s;if(Fa(u))(c=-o/(2*a))>=0&&c<=1&&(r[l++]=c);else if(u>0){var c,h=La(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,n){var i=e+n-2*t;return 0===i?.5:(e-t)/i},quadraticSubdivide:function(e,t,n,i,r){var a=(t-e)*i+e,o=(n-t)*i+t,s=(o-a)*i+a;r[0]=e,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=n},quadraticProjectPoint:function(e,t,n,i,r,a,o,s,l){var u,c=.005,h=1/0;za[0]=o,za[1]=s;for(var d=0;d<1;d+=.05){Ya[0]=Ua(e,n,r,d),Ya[1]=Ua(t,i,a,d),(m=Na(za,Ya))<h&&(u=d,h=m)}h=1/0;for(var f=0;f<32&&!(c<1e-4);f++){var p=u-c,g=u+c;Ya[0]=Ua(e,n,r,p),Ya[1]=Ua(t,i,a,p);var m=Na(Ya,za);if(p>=0&&m<h)u=p,h=m;else{Ha[0]=Ua(e,n,r,g),Ha[1]=Ua(t,i,a,g);var v=Na(Ha,za);g<=1&&v<h?(u=g,h=v):c*=.5}}return l&&(l[0]=Ua(e,n,r,u),l[1]=Ua(t,i,a,u)),La(h)}},Ga=Math.min,Va=Math.max,qa=Math.sin,Za=Math.cos,Xa=2*Math.PI,Ka=ke.create(),Qa=ke.create(),$a=ke.create();var Ja=[],eo=[];var to={fromPoints:function(e,t,n){if(0!==e.length){var i,r=e[0],a=r[0],o=r[0],s=r[1],l=r[1];for(i=1;i<e.length;i++)r=e[i],a=Ga(a,r[0]),o=Va(o,r[0]),s=Ga(s,r[1]),l=Va(l,r[1]);t[0]=a,t[1]=s,n[0]=o,n[1]=l}},fromLine:function(e,t,n,i,r,a){r[0]=Ga(e,n),r[1]=Ga(t,i),a[0]=Va(e,n),a[1]=Va(t,i)},fromCubic:function(e,t,n,i,r,a,o,s,l,u){var c,h=Wa.cubicExtrema,d=Wa.cubicAt,f=h(e,n,r,o,Ja);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,c=0;c<f;c++){var p=d(e,n,r,o,Ja[c]);l[0]=Ga(p,l[0]),u[0]=Va(p,u[0])}for(f=h(t,i,a,s,eo),c=0;c<f;c++){var g=d(t,i,a,s,eo[c]);l[1]=Ga(g,l[1]),u[1]=Va(g,u[1])}l[0]=Ga(e,l[0]),u[0]=Va(e,u[0]),l[0]=Ga(o,l[0]),u[0]=Va(o,u[0]),l[1]=Ga(t,l[1]),u[1]=Va(t,u[1]),l[1]=Ga(s,l[1]),u[1]=Va(s,u[1])},fromQuadratic:function(e,t,n,i,r,a,o,s){var l=Wa.quadraticExtremum,u=Wa.quadraticAt,c=Va(Ga(l(e,n,r),1),0),h=Va(Ga(l(t,i,a),1),0),d=u(e,n,r,c),f=u(t,i,a,h);o[0]=Ga(e,r,d),o[1]=Ga(t,a,f),s[0]=Va(e,r,d),s[1]=Va(t,a,f)},fromArc:function(e,t,n,i,r,a,o,s,l){var u=ke.min,c=ke.max,h=Math.abs(r-a);if(h%Xa<1e-4&&h>1e-4)return s[0]=e-n,s[1]=t-i,l[0]=e+n,void(l[1]=t+i);if(Ka[0]=Za(r)*n+e,Ka[1]=qa(r)*i+t,Qa[0]=Za(a)*n+e,Qa[1]=qa(a)*i+t,u(s,Ka,Qa),c(l,Ka,Qa),(r%=Xa)<0&&(r+=Xa),(a%=Xa)<0&&(a+=Xa),r>a&&!o?a+=Xa:r<a&&o&&(r+=Xa),o){var d=a;a=r,r=d}for(var f=0;f<a;f+=Math.PI/2)f>r&&($a[0]=Za(f)*n+e,$a[1]=qa(f)*i+t,u(s,$a,s),c(l,$a,l))}},no=mn.devicePixelRatio,io={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ro=[],ao=[],oo=[],so=[],lo=Math.min,uo=Math.max,co=Math.cos,ho=Math.sin,fo=Math.sqrt,po=Math.abs,go="undefined"!=typeof Float32Array,mo=function(e){this._saveData=!e,this._saveData&&(this.data=[]),this._ctx=null};mo.prototype={constructor:mo,_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,n){n=n||0,this._ux=po(n/no/e)||0,this._uy=po(n/no/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 n=po(e-this._xi)>this._ux||po(t-this._yi)>this._uy||this._len<5;return this.addData(io.L,e,t),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(e,t):this._ctx.lineTo(e,t)),n&&(this._xi=e,this._yi=t),this},bezierCurveTo:function(e,t,n,i,r,a){return this.addData(io.C,e,t,n,i,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(e,t,n,i,r,a):this._ctx.bezierCurveTo(e,t,n,i,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(e,t,n,i){return this.addData(io.Q,e,t,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(e,t,n,i):this._ctx.quadraticCurveTo(e,t,n,i)),this._xi=n,this._yi=i,this},arc:function(e,t,n,i,r,a){return this.addData(io.A,e,t,n,n,i,r-i,0,a?0:1),this._ctx&&this._ctx.arc(e,t,n,i,r,a),this._xi=co(r)*n+e,this._yi=ho(r)*n+t,this},arcTo:function(e,t,n,i,r){return this._ctx&&this._ctx.arcTo(e,t,n,i,r),this},rect:function(e,t,n,i){return this._ctx&&this._ctx.rect(e,t,n,i),this.addData(io.R,e,t,n,i),this},closePath:function(){this.addData(io.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&(this._needsDash()&&this._dashedLineTo(t,n),e.closePath()),this._xi=t,this._yi=n,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,n=0;n<e.length;n++)t+=e[n];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||!go||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},appendPath:function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,i=this._len,r=0;r<t;r++)n+=e[r].len();go&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(r=0;r<t;r++)for(var a=e[r].data,o=0;o<a.length;o++)this.data[i++]=a[o];this._len=i},addData:function(e){if(this._saveData){var t=this.data;this._len+arguments.length>t.length&&(this._expandData(),t=this.data);for(var n=0;n<arguments.length;n++)t[this._len++]=arguments[n];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 n,i,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=fo(c*c+h*h),f=l,p=u,g=o.length;for(a<0&&(a=r+a),f-=(a%=r)*(c/=d),p-=a*(h/=d);c>0&&f<=e||c<0&&f>=e||0===c&&(h>0&&p<=t||h<0&&p>=t);)f+=c*(n=o[i=this._dashIdx]),p+=h*n,this._dashIdx=(i+1)%g,c>0&&f<l||c<0&&f>l||h>0&&p<u||h<0&&p>u||s[i%2?"moveTo":"lineTo"](c>=0?lo(f,e):uo(f,e),h>=0?lo(p,t):uo(p,t));c=f-e,h=p-t,this._dashOffset=-fo(c*c+h*h)},_dashedBezierTo:function(e,t,n,i,r,a){var o,s,l,u,c,h=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=Wa.cubicAt,y=0,_=this._dashIdx,x=f.length,b=0;for(d<0&&(d=h+d),d%=h,o=0;o<1;o+=.1)s=v(g,e,n,r,o+.1)-v(g,e,n,r,o),l=v(m,t,i,a,o+.1)-v(m,t,i,a,o),y+=fo(s*s+l*l);for(;_<x&&!((b+=f[_])>d);_++);for(o=(b-d)/y;o<=1;)u=v(g,e,n,r,o),c=v(m,t,i,a,o),_%2?p.moveTo(u,c):p.lineTo(u,c),o+=f[_]/y,_=(_+1)%x;_%2!=0&&p.lineTo(r,a),s=r-u,l=a-c,this._dashOffset=-fo(s*s+l*l)},_dashedQuadraticTo:function(e,t,n,i){var r=n,a=i;n=(n+2*e)/3,i=(i+2*t)/3,e=(this._xi+2*e)/3,t=(this._yi+2*t)/3,this._dashedBezierTo(e,t,n,i,r,a)},toStatic:function(){var e=this.data;e instanceof Array&&(e.length=this._len,go&&(this.data=new Float32Array(e)))},getBoundingRect:function(){ro[0]=ro[1]=oo[0]=oo[1]=Number.MAX_VALUE,ao[0]=ao[1]=so[0]=so[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,i=0,r=0,a=0;a<e.length;){var o=e[a++];switch(1===a&&(i=t=e[a],r=n=e[a+1]),o){case io.M:t=i=e[a++],n=r=e[a++],oo[0]=i,oo[1]=r,so[0]=i,so[1]=r;break;case io.L:to.fromLine(t,n,e[a],e[a+1],oo,so),t=e[a++],n=e[a++];break;case io.C:to.fromCubic(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],oo,so),t=e[a++],n=e[a++];break;case io.Q:to.fromQuadratic(t,n,e[a++],e[a++],e[a],e[a+1],oo,so),t=e[a++],n=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 f=1-e[a++];1===a&&(i=co(h)*u+s,r=ho(h)*c+l),to.fromArc(s,l,u,c,h,d,f,oo,so),t=co(d)*u+s,n=ho(d)*c+l;break;case io.R:i=t=e[a++],r=n=e[a++];var p=e[a++],g=e[a++];to.fromLine(i,r,i+p,r+g,oo,so);break;case io.Z:t=i,n=r}ke.min(ro,ro,oo),ke.max(ao,ao,so)}return 0===a&&(ro[0]=ro[1]=ao[0]=ao[1]=0),new zn(ro[0],ro[1],ao[0]-ro[0],ao[1]-ro[1])},rebuildPath:function(e){for(var t,n,i,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=i=s[h],n=r=s[h+1]),d){case io.M:t=i=s[h++],n=r=s[h++],e.moveTo(i,r);break;case io.L:a=s[h++],o=s[h++],(po(a-i)>l||po(o-r)>u||h===c-1)&&(e.lineTo(a,o),i=a,r=o);break;case io.C:e.bezierCurveTo(s[h++],s[h++],s[h++],s[h++],s[h++],s[h++]),i=s[h-2],r=s[h-1];break;case io.Q:e.quadraticCurveTo(s[h++],s[h++],s[h++],s[h++]),i=s[h-2],r=s[h-1];break;case io.A:var f=s[h++],p=s[h++],g=s[h++],m=s[h++],v=s[h++],y=s[h++],_=s[h++],x=s[h++],b=g>m?g:m,w=g>m?1:g/m,T=g>m?m/g:1,S=v+y;Math.abs(g-m)>.001?(e.translate(f,p),e.rotate(_),e.scale(w,T),e.arc(0,0,b,v,S,1-x),e.scale(1/w,1/T),e.rotate(-_),e.translate(-f,-p)):e.arc(f,p,b,v,S,1-x),1===h&&(t=co(v)*g+f,n=ho(v)*m+p),i=co(S)*g+f,r=ho(S)*m+p;break;case io.R:t=i=s[h],n=r=s[h+1],e.rect(s[h++],s[h++],s[h++],s[h++]);break;case io.Z:e.closePath(),i=t,r=n}}}},mo.CMD=io;var vo=mo;var yo={containStroke:function(e,t,n,i,r,a,o){if(0===r)return!1;var s=r,l=0;if(o>t+s&&o>i+s||o<t-s&&o<i-s||a>e+s&&a>n+s||a<e-s&&a<n-s)return!1;if(e===n)return Math.abs(a-e)<=s/2;var u=(l=(t-i)/(e-n))*a-o+(e*i-n*t)/(e-n);return u*u/(l*l+1)<=s/2*s/2}};var _o={containStroke:function(e,t,n,i,r,a,o,s,l,u,c){if(0===l)return!1;var h=l;return!(c>t+h&&c>i+h&&c>a+h&&c>s+h||c<t-h&&c<i-h&&c<a-h&&c<s-h||u>e+h&&u>n+h&&u>r+h&&u>o+h||u<e-h&&u<n-h&&u<r-h&&u<o-h)&&Wa.cubicProjectPoint(e,t,n,i,r,a,o,s,u,c,null)<=h/2}},xo=Wa.quadraticProjectPoint;var bo={containStroke:function(e,t,n,i,r,a,o,s,l){if(0===o)return!1;var u=o;return!(l>t+u&&l>i+u&&l>a+u||l<t-u&&l<i-u&&l<a-u||s>e+u&&s>n+u&&s>r+u||s<e-u&&s<n-u&&s<r-u)&&xo(e,t,n,i,r,a,s,l,null)<=u/2}},wo=2*Math.PI;var To={normalizeRadian:function(e){return(e%=wo)<0&&(e+=wo),e}},So=To.normalizeRadian,Oo=2*Math.PI;var Mo={containStroke:function(e,t,n,i,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>n||c+u<n)return!1;if(Math.abs(i-r)%Oo<1e-4)return!0;if(a){var h=i;i=So(r),r=So(h)}else i=So(i),r=So(r);i>r&&(r+=Oo);var d=Math.atan2(l,s);return d<0&&(d+=Oo),d>=i&&d<=r||d+Oo>=i&&d+Oo<=r}};var Do=function(e,t,n,i,r,a){if(a>t&&a>i||a<t&&a<i)return 0;if(i===t)return 0;var o=i<t?1:-1,s=(a-t)/(i-t);1!==s&&0!==s||(o=i<t?.5:-.5);var l=s*(n-e)+e;return l===r?1/0:l>r?o:0},Ao=To.normalizeRadian,ko=vo.CMD,Co=2*Math.PI;var Io=[-1,-1,-1],Eo=[-1,-1];function No(e,t,n,i,r,a,o,s,l,u){if(u>t&&u>i&&u>a&&u>s||u<t&&u<i&&u<a&&u<s)return 0;var c,h=Wa.cubicRootAt(t,i,a,s,u,Io);if(0===h)return 0;for(var d,f,p=0,g=-1,m=0;m<h;m++){var v=Io[m],y=0===v||1===v?.5:1;Wa.cubicAt(e,n,r,o,v)<l||(g<0&&(g=Wa.cubicExtrema(t,i,a,s,Eo),Eo[1]<Eo[0]&&g>1&&(c=void 0,c=Eo[0],Eo[0]=Eo[1],Eo[1]=c),d=Wa.cubicAt(t,i,a,s,Eo[0]),g>1&&(f=Wa.cubicAt(t,i,a,s,Eo[1]))),2===g?v<Eo[0]?p+=d<t?y:-y:v<Eo[1]?p+=f<d?y:-y:p+=s<f?y:-y:v<Eo[0]?p+=d<t?y:-y:p+=s<d?y:-y)}return p}function Ro(e,t,n,i,r,a,o,s){if(s>t&&s>i&&s>a||s<t&&s<i&&s<a)return 0;var l=Wa.quadraticRootAt(t,i,a,s,Io);if(0===l)return 0;var u=Wa.quadraticExtremum(t,i,a);if(u>=0&&u<=1){for(var c=0,h=Wa.quadraticAt(t,i,a,u),d=0;d<l;d++){var f=0===Io[d]||1===Io[d]?.5:1;Wa.quadraticAt(e,n,r,Io[d])<o||(Io[d]<u?c+=h<t?f:-f:c+=a<h?f:-f)}return c}f=0===Io[0]||1===Io[0]?.5:1;return Wa.quadraticAt(e,n,r,Io[0])<o?0:a<t?f:-f}function Lo(e,t,n,i,r,a,o,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);Io[0]=-l,Io[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u%Co<1e-4){i=0,r=Co;var c=a?1:-1;return o>=Io[0]+e&&o<=Io[1]+e?c:0}if(a){l=i;i=Ao(r),r=Ao(l)}else i=Ao(i),r=Ao(r);i>r&&(r+=Co);for(var h=0,d=0;d<2;d++){var f=Io[d];if(f+e>o){var p=Math.atan2(s,f);c=a?1:-1;p<0&&(p=Co+p),(p>=i&&p<=r||p+Co>=i&&p+Co<=r)&&(p>Math.PI/2&&p<1.5*Math.PI&&(c=-c),h+=c)}}return h}function Po(e,t,n,i,r){for(var a,o,s=0,l=0,u=0,c=0,h=0,d=0;d<e.length;){var f=e[d++];switch(f===ko.M&&d>1&&(n||(s+=Do(l,u,c,h,i,r))),1===d&&(c=l=e[d],h=u=e[d+1]),f){case ko.M:l=c=e[d++],u=h=e[d++];break;case ko.L:if(n){if(yo.containStroke(l,u,e[d],e[d+1],t,i,r))return!0}else s+=Do(l,u,e[d],e[d+1],i,r)||0;l=e[d++],u=e[d++];break;case ko.C:if(n){if(_o.containStroke(l,u,e[d++],e[d++],e[d++],e[d++],e[d],e[d+1],t,i,r))return!0}else s+=No(l,u,e[d++],e[d++],e[d++],e[d++],e[d],e[d+1],i,r)||0;l=e[d++],u=e[d++];break;case ko.Q:if(n){if(bo.containStroke(l,u,e[d++],e[d++],e[d],e[d+1],t,i,r))return!0}else s+=Ro(l,u,e[d++],e[d++],e[d],e[d+1],i,r)||0;l=e[d++],u=e[d++];break;case ko.A:var p=e[d++],g=e[d++],m=e[d++],v=e[d++],y=e[d++],_=e[d++];d+=1;var x=1-e[d++],b=Math.cos(y)*m+p,w=Math.sin(y)*v+g;d>1?s+=Do(l,u,b,w,i,r):(c=b,h=w);var T=(i-p)*v/m+p;if(n){if(Mo.containStroke(p,g,v,y,y+_,x,t,T,r))return!0}else s+=Lo(p,g,v,y,y+_,x,T,r);l=Math.cos(y+_)*m+p,u=Math.sin(y+_)*v+g;break;case ko.R:c=l=e[d++],h=u=e[d++];b=c+e[d++],w=h+e[d++];if(n){if(yo.containStroke(c,h,b,h,t,i,r)||yo.containStroke(b,h,b,w,t,i,r)||yo.containStroke(b,w,c,w,t,i,r)||yo.containStroke(c,w,c,h,t,i,r))return!0}else s+=Do(b,h,b,w,i,r),s+=Do(c,w,c,h,i,r);break;case ko.Z:if(n){if(yo.containStroke(l,u,c,h,t,i,r))return!0}else s+=Do(l,u,c,h,i,r);l=c,u=h}}return n||(a=u,o=h,Math.abs(a-o)<1e-4)||(s+=Do(l,u,c,h,i,r)||0),0!==s}var zo={contain:function(e,t,n){return Po(e,0,!1,t,n)},containStroke:function(e,t,n,i){return Po(e,t,!0,n,i)}},Yo=li.prototype.getCanvasPattern,Ho=Math.abs,Fo=new vo(!0);function Bo(e){Tr.call(this,e),this.path=null}Bo.prototype={constructor:Bo,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(e,t){var n,i=this.style,r=this.path||Fo,a=i.hasStroke(),o=i.hasFill(),s=i.fill,l=i.stroke,u=o&&!!s.colorStops,c=a&&!!l.colorStops,h=o&&!!s.image,d=a&&!!l.image;(i.bind(e,this,t),this.setTransform(e),this.__dirty)&&(u&&(n=n||this.getBoundingRect(),this._fillGradient=i.getGradient(e,s,n)),c&&(n=n||this.getBoundingRect(),this._strokeGradient=i.getGradient(e,l,n)));u?e.fillStyle=this._fillGradient:h&&(e.fillStyle=Yo.call(s,e)),c?e.strokeStyle=this._strokeGradient:d&&(e.strokeStyle=Yo.call(l,e));var f=i.lineDash,p=i.lineDashOffset,g=!!e.setLineDash,m=this.getGlobalScale();if(r.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&a?(r.beginPath(e),f&&!g&&(r.setLineDash(f),r.setLineDashOffset(p)),this.buildPath(r,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(e.beginPath(),this.path.rebuildPath(e)),o)if(null!=i.fillOpacity){var v=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,r.fill(e),e.globalAlpha=v}else r.fill(e);if(f&&g&&(e.setLineDash(f),e.lineDashOffset=p),a)if(null!=i.strokeOpacity){v=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,r.stroke(e),e.globalAlpha=v}else r.stroke(e);f&&g&&e.setLineDash([]),null!=i.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))},buildPath:function(e,t,n){},createPathProxy:function(){this.path=new vo},getBoundingRect:function(){var e=this._rect,t=this.style,n=!e;if(n){var i=this.path;i||(i=this.path=new vo),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),e=i.getBoundingRect()}if(this._rect=e,t.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=e.clone());if(this.__dirty||n){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 n=this.transformCoordToLocal(e,t),i=this.getBoundingRect(),r=this.style;if(e=n[0],t=n[1],i.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)),zo.containStroke(a,o/s,e,t)))return!0}if(r.hasFill())return zo.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):Tr.prototype.attrKV.call(this,e,t)},setShape:function(e,t){var n=this.shape;if(n){if(Te.isObject(e))for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);else n[e]=t;this.dirty(!0)}return this},getLineScale:function(){var e=this.transform;return e&&Ho(e[0]-1)>1e-10&&Ho(e[3]-1)>1e-10?Math.sqrt(Ho(e[0]*e[3]-e[2]*e[1])):1}},Bo.extend=function(e){var t=function(t){Bo.call(this,t),e.style&&this.style.extendFrom(e.style,!1);var n=e.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var r in n)!i.hasOwnProperty(r)&&n.hasOwnProperty(r)&&(i[r]=n[r])}e.init&&e.init.call(this,t)};for(var n in Te.inherits(t,Bo),e)"style"!==n&&"shape"!==n&&(t.prototype[n]=e[n]);return t},Te.inherits(Bo,Tr);var jo=Bo,Uo=ke.applyTransform,Wo=vo.CMD,Go=[[],[],[]],Vo=Math.sqrt,qo=Math.atan2;var Zo=function(e,t){var n,i,r,a,o,s=e.data,l=Wo.M,u=Wo.C,c=Wo.L,h=Wo.R,d=Wo.A,f=Wo.Q;for(r=0,a=0;r<s.length;){switch(n=s[r++],a=r,i=0,n){case l:case c:i=1;break;case u:i=3;break;case f:i=2;break;case d:var p=t[4],g=t[5],m=Vo(t[0]*t[0]+t[1]*t[1]),v=Vo(t[2]*t[2]+t[3]*t[3]),y=qo(-t[1]/v,t[0]/m);s[r]*=m,s[r++]+=p,s[r]*=v,s[r++]+=g,s[r++]*=m,s[r++]*=v,s[r++]+=y,s[r++]+=y,a=r+=2;break;case h:_[0]=s[r++],_[1]=s[r++],Uo(_,_,t),s[a++]=_[0],s[a++]=_[1],_[0]+=s[r++],_[1]+=s[r++],Uo(_,_,t),s[a++]=_[0],s[a++]=_[1]}for(o=0;o<i;o++){var _;(_=Go[o])[0]=s[r++],_[1]=s[r++],Uo(_,_,t),s[a++]=_[0],s[a++]=_[1]}}},Xo=Math.sqrt,Ko=Math.sin,Qo=Math.cos,$o=Math.PI,Jo=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},es=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(Jo(e)*Jo(t))},ts=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(es(e,t))};function ns(e,t,n,i,r,a,o,s,l,u,c){var h=l*($o/180),d=Qo(h)*(e-n)/2+Ko(h)*(t-i)/2,f=-1*Ko(h)*(e-n)/2+Qo(h)*(t-i)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=Xo(p),s*=Xo(p));var g=(r===a?-1:1)*Xo((o*o*(s*s)-o*o*(f*f)-s*s*(d*d))/(o*o*(f*f)+s*s*(d*d)))||0,m=g*o*f/s,v=g*-s*d/o,y=(e+n)/2+Qo(h)*m-Ko(h)*v,_=(t+i)/2+Ko(h)*m+Qo(h)*v,x=ts([1,0],[(d-m)/o,(f-v)/s]),b=[(d-m)/o,(f-v)/s],w=[(-1*d-m)/o,(-1*f-v)/s],T=ts(b,w);es(b,w)<=-1&&(T=$o),es(b,w)>=1&&(T=0),0===a&&T>0&&(T-=2*$o),1===a&&T<0&&(T+=2*$o),c.addData(u,y,_,o,s,x,T,h,a)}var is=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,rs=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function as(e,t){var n=function(e){if(!e)return new vo;for(var t,n=0,i=0,r=n,a=i,o=new vo,s=vo.CMD,l=e.match(is),u=0;u<l.length;u++){for(var c,h=l[u],d=h.charAt(0),f=h.match(rs)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var m=0;m<p;){var v,y,_,x,b,w,T,S=n,O=i;switch(d){case"l":n+=f[m++],i+=f[m++],c=s.L,o.addData(c,n,i);break;case"L":n=f[m++],i=f[m++],c=s.L,o.addData(c,n,i);break;case"m":n+=f[m++],i+=f[m++],c=s.M,o.addData(c,n,i),r=n,a=i,d="l";break;case"M":n=f[m++],i=f[m++],c=s.M,o.addData(c,n,i),r=n,a=i,d="L";break;case"h":n+=f[m++],c=s.L,o.addData(c,n,i);break;case"H":n=f[m++],c=s.L,o.addData(c,n,i);break;case"v":i+=f[m++],c=s.L,o.addData(c,n,i);break;case"V":i=f[m++],c=s.L,o.addData(c,n,i);break;case"C":c=s.C,o.addData(c,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),n=f[m-2],i=f[m-1];break;case"c":c=s.C,o.addData(c,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i),n+=f[m-2],i+=f[m-1];break;case"S":v=n,y=i;var M=o.len(),D=o.data;t===s.C&&(v+=n-D[M-4],y+=i-D[M-3]),c=s.C,S=f[m++],O=f[m++],n=f[m++],i=f[m++],o.addData(c,v,y,S,O,n,i);break;case"s":v=n,y=i;M=o.len(),D=o.data;t===s.C&&(v+=n-D[M-4],y+=i-D[M-3]),c=s.C,S=n+f[m++],O=i+f[m++],n+=f[m++],i+=f[m++],o.addData(c,v,y,S,O,n,i);break;case"Q":S=f[m++],O=f[m++],n=f[m++],i=f[m++],c=s.Q,o.addData(c,S,O,n,i);break;case"q":S=f[m++]+n,O=f[m++]+i,n+=f[m++],i+=f[m++],c=s.Q,o.addData(c,S,O,n,i);break;case"T":v=n,y=i;M=o.len(),D=o.data;t===s.Q&&(v+=n-D[M-4],y+=i-D[M-3]),n=f[m++],i=f[m++],c=s.Q,o.addData(c,v,y,n,i);break;case"t":v=n,y=i;M=o.len(),D=o.data;t===s.Q&&(v+=n-D[M-4],y+=i-D[M-3]),n+=f[m++],i+=f[m++],c=s.Q,o.addData(c,v,y,n,i);break;case"A":_=f[m++],x=f[m++],b=f[m++],w=f[m++],T=f[m++],ns(S=n,O=i,n=f[m++],i=f[m++],w,T,_,x,b,c=s.A,o);break;case"a":_=f[m++],x=f[m++],b=f[m++],w=f[m++],T=f[m++],ns(S=n,O=i,n+=f[m++],i+=f[m++],w,T,_,x,b,c=s.A,o)}}"z"!==d&&"Z"!==d||(c=s.Z,o.addData(c),n=r,i=a),t=c}return o.toStatic(),o}(e);return(t=t||{}).buildPath=function(e){if(e.setData){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t)}else{var t=e;n.rebuildPath(t)}},t.applyTransform=function(e){Zo(n,e),this.dirty(!0)},t}var os={createFromString:function(e,t){return new jo(as(e,t))},extendFromString:function(e,t){return jo.extend(as(e,t))},mergePath:function(e,t){for(var n=[],i=e.length,r=0;r<i;r++){var a=e[r];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),n.push(a.path)}var o=new jo(t);return o.createPathProxy(),o.buildPath=function(e){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t)},o}},ss=Qn.ContextCachedBy,ls=function(e){Tr.call(this,e)};ls.prototype={constructor:ls,type:"text",brush:function(e,t){var n=this.style;this.__dirty&&vr.normalizeTextStyle(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;null!=i&&(i+=""),vr.needDrawText(i,n)?(this.setTransform(e),vr.renderText(this,e,i,n,null,t),this.restoreTransform(e)):e.__attrCachedBy=ss.NONE},getBoundingRect:function(){var e=this.style;if(this.__dirty&&vr.normalizeTextStyle(e,!0),!this._rect){var t=e.text;null!=t?t+="":t="";var n=Bi.getBoundingRect(e.text+"",e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich);if(n.x+=e.x||0,n.y+=e.y||0,vr.getStroke(e.textStroke,e.textStrokeWidth)){var i=e.textStrokeWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect}},Te.inherits(ls,Tr);var us=ls,cs=jo.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(e,t,n){n&&e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI,!0)}}),hs=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];var ds=function(e){return J.browser.ie&&J.browser.version>=11?function(){var t,n=this.__clipPaths,i=this.style;if(n)for(var r=0;r<n.length;r++){var a=n[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<hs.length;l++)hs[l][2]=i[hs[l][0]],i[hs[l][0]]=hs[l][1];t=!0;break}}if(e.apply(this,arguments),t)for(l=0;l<hs.length;l++)i[hs[l][0]]=hs[l][2]}:e},fs=jo.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:ds(jo.prototype.brush),buildPath:function(e,t){var n=t.cx,i=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+n,c*r+i),e.lineTo(u*a+n,c*a+i),e.arc(n,i,a,o,s,!l),e.lineTo(Math.cos(s)*r+n,Math.sin(s)*r+i),0!==r&&e.arc(n,i,r,s,o,l),e.closePath()}}),ps=jo.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(e,t){var n=t.cx,i=t.cy,r=2*Math.PI;e.moveTo(n+t.r,i),e.arc(n,i,t.r,0,r,!1),e.moveTo(n+t.r0,i),e.arc(n,i,t.r0,0,r,!0)}}),gs=ke.distance;function ms(e,t,n,i,r,a,o){var s=.5*(n-e),l=.5*(i-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*a+s*r+t}var vs=function(e,t){for(var n=e.length,i=[],r=0,a=1;a<n;a++)r+=gs(e[a-1],e[a]);var o=r/2;for(o=o<n?n:o,a=0;a<o;a++){var s,l,u,c=a/(o-1)*(t?n:n-1),h=Math.floor(c),d=c-h,f=e[h%n];t?(s=e[(h-1+n)%n],l=e[(h+1)%n],u=e[(h+2)%n]):(s=e[0===h?h:h-1],l=e[h>n-2?n-1:h+1],u=e[h>n-3?n-1:h+2]);var p=d*d,g=d*p;i.push([ms(s[0],f[0],l[0],u[0],d,p,g),ms(s[1],f[1],l[1],u[1],d,p,g)])}return i},ys=ke.min,_s=ke.max,xs=ke.scale,bs=ke.distance,ws=ke.add,Ts=ke.clone,Ss=ke.sub;var Os=function(e,t,n,i){var r,a,o,s,l=[],u=[],c=[],h=[];if(i){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=e.length;d<f;d++)ys(o,o,e[d]),_s(s,s,e[d]);ys(o,o,i[0]),_s(s,s,i[1])}for(d=0,f=e.length;d<f;d++){var p=e[d];if(n)r=e[d?d-1:f-1],a=e[(d+1)%f];else{if(0===d||d===f-1){l.push(Ts(e[d]));continue}r=e[d-1],a=e[d+1]}Ss(u,a,r),xs(u,u,t);var g=bs(p,r),m=bs(p,a),v=g+m;0!==v&&(g/=v,m/=v),xs(c,u,-g),xs(h,u,m);var y=ws([],p,c),_=ws([],p,h);i&&(_s(y,y,o),ys(y,y,s),_s(_,_,o),ys(_,_,s)),l.push(y),l.push(_)}return n&&l.push(l.shift()),l};var Ms={buildPath:function(e,t,n){var i=t.points,r=t.smooth;if(i&&i.length>=2){if(r&&"spline"!==r){var a=Os(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var l=a[2*s],u=a[2*s+1],c=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{"spline"===r&&(i=vs(i,n)),e.moveTo(i[0][0],i[0][1]);s=1;for(var h=i.length;s<h;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}},Ds=jo.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(e,t){Ms.buildPath(e,t,!0)}}),As=jo.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(e,t){Ms.buildPath(e,t,!1)}}),ks=Math.round;function Cs(e,t,n){if(!t)return e;var i=ks(2*e);return(i+ks(t))%2==0?i/2:(i+(n?1:-1))/2}var Is={subPixelOptimizeLine:function(e,t,n){if(t){var i=t.x1,r=t.x2,a=t.y1,o=t.y2;e.x1=i,e.x2=r,e.y1=a,e.y2=o;var s=n&&n.lineWidth;s&&(ks(2*i)===ks(2*r)&&(e.x1=e.x2=Cs(i,s,!0)),ks(2*a)===ks(2*o)&&(e.y1=e.y2=Cs(a,s,!0)))}},subPixelOptimizeRect:function(e,t,n){if(t){var i=t.x,r=t.y,a=t.width,o=t.height;e.x=i,e.y=r,e.width=a,e.height=o;var s=n&&n.lineWidth;s&&(e.x=Cs(i,s,!0),e.y=Cs(r,s,!0),e.width=Math.max(Cs(i+a,s,!1)-e.x,0===a?0:1),e.height=Math.max(Cs(r+o,s,!1)-e.y,0===o?0:1))}},subPixelOptimize:Cs},Es=Is.subPixelOptimizeRect,Ns={},Rs=jo.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(e,t){var n,i,r,a;this.subPixelOptimize?(Es(Ns,t,this.style),n=Ns.x,i=Ns.y,r=Ns.width,a=Ns.height,Ns.r=t.r,t=Ns):(n=t.x,i=t.y,r=t.width,a=t.height),t.r?ji.buildPath(e,t):e.rect(n,i,r,a),e.closePath()}}),Ls=Is.subPixelOptimizeLine,Ps={},zs=jo.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n,i,r,a;this.subPixelOptimize?(Ls(Ps,t,this.style),n=Ps.x1,i=Ps.y1,r=Ps.x2,a=Ps.y2):(n=t.x1,i=t.y1,r=t.x2,a=t.y2);var o=t.percent;0!==o&&(e.moveTo(n,i),o<1&&(r=n*(1-o)+r*o,a=i*(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]}}),Ys=Wa.quadraticSubdivide,Hs=Wa.cubicSubdivide,Fs=Wa.quadraticAt,Bs=Wa.cubicAt,js=Wa.quadraticDerivativeAt,Us=Wa.cubicDerivativeAt,Ws=[];function Gs(e,t,n){var i=e.cpx2,r=e.cpy2;return null===i||null===r?[(n?Us:Bs)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Us:Bs)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?js:Fs)(e.x1,e.cpx1,e.x2,t),(n?js:Fs)(e.y1,e.cpy1,e.y2,t)]}var Vs=jo.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 n=t.x1,i=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(n,i),null==l||null==u?(c<1&&(Ys(n,o,r,c,Ws),o=Ws[1],r=Ws[2],Ys(i,s,a,c,Ws),s=Ws[1],a=Ws[2]),e.quadraticCurveTo(o,s,r,a)):(c<1&&(Hs(n,o,l,r,c,Ws),o=Ws[1],l=Ws[2],r=Ws[3],Hs(i,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 Gs(this.shape,e,!1)},tangentAt:function(e){var t=Gs(this.shape,e,!0);return ke.normalize(t,t)}}),qs=jo.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 n=t.cx,i=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+n,u*r+i),e.arc(n,i,r,a,o,!s)}}),Zs=jo.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var e=this.__dirtyPath,t=this.shape.paths,n=0;n<t.length;n++)e=e||t[n].__dirtyPath;this.__dirtyPath=e,this.__dirty=this.__dirty||e},beforeBrush:function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},buildPath:function(e,t){for(var n=t.paths||[],i=0;i<n.length;i++)n[i].buildPath(e,n[i].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(),jo.prototype.getBoundingRect.call(this)}}),Xs=function(e){this.colorStops=e||[]};Xs.prototype={constructor:Xs,addColorStop:function(e,t){this.colorStops.push({offset:e,color:t})}};var Ks=Xs,Qs=function(e,t,n,i,r,a){this.x=null==e?0:e,this.y=null==t?0:t,this.x2=null==n?1:n,this.y2=null==i?0:i,this.type="linear",this.global=a||!1,Ks.call(this,r)};Qs.prototype={constructor:Qs},Te.inherits(Qs,Ks);var $s=Qs,Js=function(e,t,n,i,r){this.x=null==e?.5:e,this.y=null==t?.5:t,this.r=null==n?.5:n,this.type="radial",this.global=r||!1,Ks.call(this,i)};Js.prototype={constructor:Js},Te.inherits(Js,Ks);var el=Js,tl=Te.inherits;function nl(e){Tr.call(this,e),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}nl.prototype.incremental=!0,nl.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},nl.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.dirty()},nl.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},nl.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])},nl.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}},nl.prototype.brush=function(e,t){for(var n=this._cursor;n<this._displayables.length;n++){(i=this._displayables[n]).beforeBrush&&i.beforeBrush(e),i.brush(e,n===this._cursor?null:this._displayables[n-1]),i.afterBrush&&i.afterBrush(e)}this._cursor=n;for(n=0;n<this._temporaryDisplayables.length;n++){var i;(i=this._temporaryDisplayables[n]).beforeBrush&&i.beforeBrush(e),i.brush(e,0===n?null:this._temporaryDisplayables[n-1]),i.afterBrush&&i.afterBrush(e)}this._temporaryDisplayables=[],this.notClear=!0};var il=[];nl.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new zn(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(il)),e.union(i)}this._rect=e}return this._rect},nl.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++){if(this._displayables[i].contain(e,t))return!0}return!1},tl(nl,Tr);var rl=Or,al=Hn,ol=us,sl=cs,ll=fs,ul=ps,cl=Ds,hl=As,dl=Rs,fl=zs,pl=Vs,gl=qs,ml=Zs,vl=$s,yl=el,_l=zn,xl=nl,bl=Math.max,wl=Math.min,Tl={},Sl=1,Ol={},Ml={};function Dl(e,t){Ml[e]=t}function Al(e,t,n,i){var r=os.createFromString(e,t);return n&&("center"===i&&(n=kl(n,r.getBoundingRect())),Il(r,n)),r}function kl(e,t){var n,i=t.width/t.height,r=e.height*i;return n=r<=e.width?e.height:(r=e.width)/i,{x:e.x+e.width/2-r/2,y:e.y+e.height/2-n/2,width:r,height:n}}var Cl=os.mergePath;function Il(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}var El=Is.subPixelOptimize;function Nl(e){return null!=e&&"none"!==e}var Rl=Te.createHashMap(),Ll=0;function Pl(e){var t=e.__hoverStl;if(t&&!e.__highlighted){var n=e.__zr,i=e.useHoverLayer&&n&&"canvas"===n.painter.type;if(e.__highlighted=i?"layer":"plain",!(e.isGroup||!n&&e.useHoverLayer)){var r=e,a=e.style;i&&(a=(r=n.addHover(e)).style),$l(a),i||function(e){if(e.__hoverStlDirty){e.__hoverStlDirty=!1;var t=e.__hoverStl;if(t){var n=e.__cachedNormalStl={};e.__cachedNormalZ2=e.z2;var i=e.style;for(var r in t)null!=t[r]&&(n[r]=i[r]);n.fill=i.fill,n.stroke=i.stroke}else e.__cachedNormalStl=e.__cachedNormalZ2=null}}(r),a.extendFrom(t),zl(a,t,"fill"),zl(a,t,"stroke"),Ql(a),i||(e.dirty(!1),e.z2+=1)}}}function zl(e,t,n){!Nl(t[n])&&Nl(e[n])&&(e[n]=function(e){if("string"!=typeof e)return e;var t=Rl.get(e);return t||(t=Qt.lift(e,-.1),Ll<1e4&&(Rl.set(e,t),Ll++)),t}(e[n]))}function Yl(e){var t=e.__highlighted;if(t&&(e.__highlighted=!1,!e.isGroup))if("layer"===t)e.__zr&&e.__zr.removeHover(e);else{var n=e.style,i=e.__cachedNormalStl;i&&($l(n),e.setStyle(i),Ql(n));var r=e.__cachedNormalZ2;null!=r&&e.z2-r==1&&(e.z2=r)}}function Hl(e,t,n){var i,r="normal",a="normal";e.__highlighted&&(r="emphasis",i=!0),t(e,n),e.__highlighted&&(a="emphasis",i=!0),e.isGroup&&e.traverse((function(e){!e.isGroup&&t(e,n)})),i&&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,Yl(e),Pl(e))}function Bl(e){!Gl(this,e)&&!this.__highByOuter&&Hl(this,Pl)}function jl(e){!Gl(this,e)&&!this.__highByOuter&&Hl(this,Yl)}function Ul(e){this.__highByOuter|=1<<(e||0),Hl(this,Pl)}function Wl(e){!(this.__highByOuter&=~(1<<(e||0)))&&Hl(this,Yl)}function Gl(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Vl(e,t){var n=!1===t;if(e.__highDownSilentOnTouch=e.highDownSilentOnTouch,e.__highDownOnUpdate=e.highDownOnUpdate,!n||e.__highDownDispatcher){var i=n?"off":"on";e[i]("mouseover",Bl)[i]("mouseout",jl),e[i]("emphasis",Ul)[i]("normal",Wl),e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!n}}function ql(e,t,n,i,r){return Zl(e,t,i,r),n&&Te.extend(e,n),e}function Zl(e,t,n,i){if((n=n||Tl).isRectText){var r;n.getTextPosition?r=n.getTextPosition(t,i):"outside"===(r=t.getShallow("position")||(i?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=Te.retrieve2(t.getShallow("distance"),i?null:5)}var o,s=t.ecModel,l=s&&s.option.textStyle,u=function(e){var t;for(;e&&e!==e.ecModel;){var n=(e.option||Tl).rich;if(n)for(var i in t=t||{},n)n.hasOwnProperty(i)&&(t[i]=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,n,i)}return e.rich=o,Xl(e,t,l,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),e}function Xl(e,t,n,i,r,a){n=!r&&n||Tl,e.textFill=Kl(t.getShallow("color"),i)||n.color,e.textStroke=Kl(t.getShallow("textBorderColor"),i)||n.textBorderColor,e.textStrokeWidth=Te.retrieve2(t.getShallow("textBorderWidth"),n.textBorderWidth),r||(a&&(e.insideRollbackOpt=i,Ql(e)),null==e.textFill&&(e.textFill=i.autoColor)),e.fontStyle=t.getShallow("fontStyle")||n.fontStyle,e.fontWeight=t.getShallow("fontWeight")||n.fontWeight,e.fontSize=t.getShallow("fontSize")||n.fontSize,e.fontFamily=t.getShallow("fontFamily")||n.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&&i.disableBox||(e.textBackgroundColor=Kl(t.getShallow("backgroundColor"),i),e.textPadding=t.getShallow("padding"),e.textBorderColor=Kl(t.getShallow("borderColor"),i),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")||n.textShadowColor,e.textShadowBlur=t.getShallow("textShadowBlur")||n.textShadowBlur,e.textShadowOffsetX=t.getShallow("textShadowOffsetX")||n.textShadowOffsetX,e.textShadowOffsetY=t.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function Kl(e,t){return"auto"!==e?e:t&&t.autoColor?t.autoColor:null}function Ql(e){var t,n=e.textPosition,i=e.insideRollbackOpt;if(i&&null==e.textFill){var r=i.autoColor,a=i.isRectText,o=i.useInsideStyle,s=!1!==o&&(!0===o||a&&n&&"string"==typeof n&&n.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 $l(e){var t=e.insideRollback;t&&(e.textFill=t.textFill,e.textStroke=t.textStroke,e.textStrokeWidth=t.textStrokeWidth,e.insideRollback=null)}function Jl(e,t,n,i,r,a){if("function"==typeof r&&(a=r,r=null),i&&i.isAnimationEnabled()){var o=e?"Update":"",s=i.getShallow("animationDuration"+o),l=i.getShallow("animationEasing"+o),u=i.getShallow("animationDelay"+o);"function"==typeof u&&(u=u(r,i.getAnimationDelayParams?i.getAnimationDelayParams(t,r):null)),"function"==typeof s&&(s=s(r)),s>0?t.animateTo(n,s,u||0,l,a,!!a):(t.stopAnimation(),t.attr(n),a&&a())}else t.stopAnimation(),t.attr(n),a&&a()}function eu(e,t,n,i,r){Jl(!0,e,t,n,i,r)}function tu(e,t,n){return t&&!Te.isArrayLike(t)&&(t=Tt.getLocalTransform(t)),n&&(t=gt.invert([],t)),ke.applyTransform([],e,t)}function nu(e,t,n,i,r,a,o,s){var l,u=n-e,c=i-t,h=o-r,d=s-a,f=iu(h,d,u,c);if((l=f)<=1e-6&&l>=-1e-6)return!1;var p=e-r,g=t-a,m=iu(p,g,u,c)/f;if(m<0||m>1)return!1;var v=iu(p,g,h,d)/f;return!(v<0||v>1)}function iu(e,t,n,i){return e*i-n*t}Dl("circle",cs),Dl("sector",fs),Dl("ring",ps),Dl("polygon",Ds),Dl("polyline",As),Dl("rect",Rs),Dl("line",zs),Dl("bezierCurve",Vs),Dl("arc",qs);var ru={Image:rl,Group:al,Text:ol,Circle:sl,Sector:ll,Ring:ul,Polygon:cl,Polyline:hl,Rect:dl,Line:fl,BezierCurve:pl,Arc:gl,CompoundPath:ml,LinearGradient:vl,RadialGradient:yl,BoundingRect:_l,IncrementalDisplayable:xl,Z2_EMPHASIS_LIFT:1,CACHED_LABEL_STYLE_PROPERTIES:{color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},extendShape:function(e){return jo.extend(e)},extendPath:function(e,t){return os.extendFromString(e,t)},registerShape:Dl,getShapeClass:function(e){if(Ml.hasOwnProperty(e))return Ml[e]},makePath:Al,makeImage:function(e,t,n){var i=new Or({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var r={width:e.width,height:e.height};i.setStyle(kl(t,r))}}});return i},mergePath:Cl,resizePath:Il,subPixelOptimizeLine:function(e){return Is.subPixelOptimizeLine(e.shape,e.shape,e.style),e},subPixelOptimizeRect:function(e){return Is.subPixelOptimizeRect(e.shape,e.shape,e.style),e},subPixelOptimize:El,setElementHoverStyle:Fl,setHoverStyle:function(e,t){Vl(e,!0),Hl(e,Fl,t)},setAsHighDownDispatcher:Vl,isHighDownDispatcher:function(e){return!(!e||!e.__highDownDispatcher)},getHighlightDigit:function(e){var t=Ol[e];return null==t&&Sl<=32&&(t=Ol[e]=Sl++),t},setLabelStyle:function(e,t,n,i,r,a,o){var s,l=(r=r||Tl).labelFetcher,u=r.labelDataIndex,c=r.labelDimIndex,h=r.labelProp,d=n.getShallow("show"),f=i.getShallow("show");(d||f)&&(l&&(s=l.getFormattedLabel(u,"normal",null,c,h)),null==s&&(s=Te.isFunction(r.defaultText)?r.defaultText(u,r):r.defaultText));var p=d?s:null,g=f?Te.retrieve2(l?l.getFormattedLabel(u,"emphasis",null,c,h):null,s):null;null==p&&null==g||(ql(e,n,a,r),ql(t,i,o,r,!0)),e.text=p,t.text=g},modifyLabelStyle:function(e,t,n){var i=e.style;t&&($l(i),e.setStyle(t),Ql(i)),i=e.__hoverStl,n&&i&&($l(i),Te.extend(i,n),Ql(i))},setTextStyle:ql,setText:function(e,t,n){var i,r={isRectText:!0};!1===n?i=!0:r.autoColor=n,Zl(e,t,r,i)},getFont:function(e,t){var n=t&&t.getModel("textStyle");return Te.trim([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))},updateProps:eu,initProps:function(e,t,n,i,r){Jl(!1,e,t,n,i,r)},getTransform:function(e,t){for(var n=gt.identity([]);e&&e!==t;)gt.mul(n,e.getLocalTransform(),n),e=e.parent;return n},applyTransform:tu,transformDirection:function(e,t,n){var i=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?-i:"right"===e?i:0,"top"===e?-r:"bottom"===e?r:0];return a=tu(a,t,n),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},groupTransition:function(e,t,n,i){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 i=o(e);e.attr(o(t)),eu(e,i,n,e.dataIndex)}}}))}function o(e){var t={position:ke.clone(e.position),rotation:e.rotation};return e.shape&&(t.shape=Te.extend({},e.shape)),t}},clipPointsByRect:function(e,t){return Te.map(e,(function(e){var n=e[0];n=bl(n,t.x),n=wl(n,t.x+t.width);var i=e[1];return i=bl(i,t.y),[n,i=wl(i,t.y+t.height)]}))},clipRectByRect:function(e,t){var n=bl(e.x,t.x),i=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(i>=n&&a>=r)return{x:n,y:r,width:i-n,height:a-r}},createIcon:function(e,t,n){var i=(t=Te.extend({rectHover:!0},t)).style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),Te.defaults(i,n),new Or(t)):Al(e.replace("path://",""),t,n,"center")},linePolygonIntersect:function(e,t,n,i,r){for(var a=0,o=r[r.length-1];a<r.length;a++){var s=r[a];if(nu(e,t,n,i,s[0],s[1],o[0],o[1]))return!0;o=s}},lineLineIntersect:nu},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 Bi.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=Da([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),lu={getItemStyle:function(e,t){var n=su(this,e,t),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var e=this.get("borderType");return"solid"===e||null==e?null:"dashed"===e?[5,5]:[1,1]}},uu=xa.makeInner,cu=Ma.enableClassExtend,hu=Ma.enableClassCheck,du=Te.mixin,fu=uu();function pu(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}function gu(e,t,n){for(var i=0;i<t.length&&(!t[i]||null!=(e=e&&"object"==typeof e?e[t[i]]:null));i++);return null==e&&n&&(e=n.get(t)),e}function mu(e,t){var n=fu(e).getParent;return n?n.call(e,t):e.parentModel}pu.prototype={constructor:pu,init:null,mergeOption:function(e){Te.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 n=this.option,i=null==n?n:n[e],r=!t&&mu(this,e);return null==i&&r&&(i=r.getShallow(e)),i},getModel:function(e,t){var n;return new pu(null==e?this.option:gu(this.option,e=this.parsePath(e)),t=t||(n=mu(this,e))&&n.getModel(e),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(Te.clone(this.option))},setReadOnly:function(e){},parsePath:function(e){return"string"==typeof e&&(e=e.split(".")),e},customizeGetParent:function(e){fu(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(pu),hu(pu),du(pu,ka),du(pu,Ia),du(pu,ou),du(pu,lu);var vu=pu,yu=Ma.parseClassType,_u=0;var xu={getUID:function(e){return[e||"",_u++,Math.random().toFixed(5)].join("_")},enableSubTypeDefaulter:function(e){var t={};return e.registerSubTypeDefaulter=function(e,n){e=yu(e),t[e.main]=n},e.determineSubType=function(n,i){var r=i.type;if(!r){var a=yu(n).main;e.hasSubTypes(n)&&t[a]&&(r=t[a](i))}return r},e},enableTopologicalTravel:function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,i,r,a){if(e.length){var o=function(e){var i={},r=[];return Te.each(e,(function(a){var o=n(i,a),s=function(e,t){var n=[];return Te.each(e,(function(e){Te.indexOf(t,e)>=0&&n.push(e)})),n}(o.originalDeps=t(a),e);o.entryCount=s.length,0===o.entryCount&&r.push(a),Te.each(s,(function(e){Te.indexOf(o.predecessor,e)<0&&o.predecessor.push(e);var t=n(i,e);Te.indexOf(t.successor,e)<0&&t.successor.push(a)}))})),{graph:i,noEntryList:r}}(i),s=o.graph,l=o.noEntryList,u={};for(Te.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]),Te.each(h.successor,d?p:f)}Te.each(u,(function(){throw new Error("Circle dependency may exists")}))}function f(e){s[e].entryCount--,0===s[e].entryCount&&l.push(e)}function p(e){u[e]=!0,f(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 Tu={linearMap:function(e,t,n,i){var r=t[1]-t[0],a=n[1]-n[0];if(0===r)return 0===a?n[0]:(n[0]+n[1])/2;if(i)if(r>0){if(e<=t[0])return n[0];if(e>=t[1])return n[1]}else{if(e>=t[0])return n[0];if(e<=t[1])return n[1]}else{if(e===t[0])return n[0];if(e===t[1])return n[1]}return(e-t[0])/r*a+n[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?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n},round:function(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?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,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n},getPrecisionSafe:function(e){var t=e.toString(),n=t.indexOf("e");if(n>0){var i=+t.slice(n+1);return i<0?-i:0}var r=t.indexOf(".");return r<0?0:t.length-1-r},getPixelPrecision:function(e,t){var n=Math.log,i=Math.LN10,r=Math.floor(n(e[1]-e[0])/i),a=Math.round(n(Math.abs(t[1]-t[0]))/i),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20},getPercentWithPrecision:function(e,t,n){if(!e[t])return 0;var i=Te.reduce(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===i)return 0;for(var r=Math.pow(10,n),a=Te.map(e,(function(e){return(isNaN(e)?0:e)/i*r*100})),o=100*r,s=Te.map(a,(function(e){return Math.floor(e)})),l=Te.reduce(s,(function(e,t){return e+t}),0),u=Te.map(a,(function(e,t){return e-s[t]}));l<o;){for(var c=Number.NEGATIVE_INFINITY,h=null,d=0,f=u.length;d<f;++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 n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(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 n=wu(e),i=Math.pow(10,n),r=e/i;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)*i,n>=-20?+e.toFixed(n<0?-n:0):e},quantile:function(e,t){var n=(e.length-1)*t+1,i=Math.floor(n),r=+e[i-1],a=n-i;return a?r+a*(e[i]-r):r},reformIntervals:function(e){e.sort((function(e,t){return function e(t,n,i){return t.interval[i]<n.interval[i]||t.interval[i]===n.interval[i]&&(t.close[i]-n.close[i]==(i?-1:1)||!i&&e(t,n,1))}(e,t,0)?-1:1}));for(var t=-1/0,n=1,i=0;i<e.length;){for(var r=e[i].interval,a=e[i].close,o=0;o<2;o++)r[o]<=t&&(r[o]=t,a[o]=o?1:1-n),t=r[o],n=a[o];r[0]===r[1]&&a[0]*a[1]!=1?e.splice(i,1):i++}return e},isNumeric:function(e){return e-parseFloat(e)>=0}};var Su=Te.normalizeCssArray,Ou=/([&<>"'])/g,Mu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Du(e){return null==e?"":(e+"").replace(Ou,(function(e,t){return Mu[t]}))}var Au=["a","b","c","d","e","f","g"],ku=function(e,t){return"{"+e+(null==t?"":t)+"}"};function Cu(e,t){return"0000".substr(0,t-(e+="").length)+e}var Iu={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:Su,encodeHTML:Du,formatTpl:function(e,t,n){Te.isArray(t)||(t=[t]);var i=t.length;if(!i)return"";for(var r=t[0].$vars||[],a=0;a<r.length;a++){var o=Au[a];e=e.replace(ku(o),ku(o,0))}for(var s=0;s<i;s++)for(var l=0;l<r.length;l++){var u=t[s][r[l]];e=e.replace(ku(Au[l],s),n?Du(u):u)}return e},formatTplSimple:function(e,t,n){return Te.each(t,(function(t,i){e=e.replace("{"+i+"}",n?Du(t):t)})),e},getTooltipMarker:function(e,t){var n=(e=Te.isString(e)?{color:e,extraCssText:t}:e||{}).color,i=e.type,r=(t=e.extraCssText,e.renderMode||"html"),a=e.markerId||"X";return n?"html"===r?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Du(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Du(n)+";"+(t||"")+'"></span>':{renderMode:r,content:"{marker"+a+"|}  ",style:{color:n}}:""},formatTime:function(e,t,n){"week"!==e&&"month"!==e&&"quarter"!==e&&"half-year"!==e&&"year"!==e||(e="MM-dd\nyyyy");var i=Tu.parseDate(t),r=n?"UTC":"",a=i["get"+r+"FullYear"](),o=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),u=i["get"+r+"Minutes"](),c=i["get"+r+"Seconds"](),h=i["get"+r+"Milliseconds"]();return e=e.replace("MM",Cu(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",Cu(s,2)).replace("d",s).replace("hh",Cu(l,2)).replace("h",l).replace("mm",Cu(u,2)).replace("m",u).replace("ss",Cu(c,2)).replace("s",c).replace("SSS",Cu(h,3))},capitalFirst:function(e){return e?e.charAt(0).toUpperCase()+e.substr(1):e},truncateText:Bi.truncateText,getTextBoundingRect:function(e){return Bi.getBoundingRect(e.text,e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich,e.truncate)},getTextRect:function(e,t,n,i,r,a,o,s){return Bi.getBoundingRect(e,t,n,i,r,s,a,o)},windowOpen:function(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location=e}else window.open(e,t)}},Eu=Tu.parsePercent,Nu=Te.each,Ru=["left","right","top","bottom","width","height"],Lu=[["width","left","right"],["height","top","bottom"]];function Pu(e,t,n,i,r){var a=0,o=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;t.eachChild((function(l,u){var c,h,d=l.position,f=l.getBoundingRect(),p=t.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===e){var m=f.width+(g?-g.x+f.x:0);(c=a+m)>i||l.newline?(a=0,c=m,o+=s+n,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(h=o+v)>r||l.newline?(a+=s+n,o=0,h=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===e?a=c+n:o=h+n)}))}var zu=Pu,Yu=Te.curry(Pu,"vertical"),Hu=Te.curry(Pu,"horizontal");function Fu(e,t,n){n=Iu.normalizeCssArray(n||0);var i=t.width,r=t.height,a=Eu(e.left,i),o=Eu(e.top,r),s=Eu(e.right,i),l=Eu(e.bottom,r),u=Eu(e.width,i),c=Eu(e.height,r),h=n[2]+n[0],d=n[1]+n[3],f=e.aspect;switch(isNaN(u)&&(u=i-s-d-a),isNaN(c)&&(c=r-l-h-o),null!=f&&(isNaN(u)&&isNaN(c)&&(f>i/r?u=.8*i:c=.8*r),isNaN(u)&&(u=f*c),isNaN(c)&&(c=u/f)),isNaN(a)&&(a=i-s-u-d),isNaN(o)&&(o=r-l-c-h),e.left||e.right){case"center":a=i/2-u/2-n[3];break;case"right":a=i-u-d}switch(e.top||e.bottom){case"middle":case"center":o=r/2-c/2-n[0];break;case"bottom":o=r-c-h}a=a||0,o=o||0,isNaN(u)&&(u=i-d-a-(s||0)),isNaN(c)&&(c=r-h-o-(l||0));var p=new zn(a+n[3],o+n[0],u,c);return p.margin=n,p}function Bu(e,t){return t&&e&&Nu(Ru,(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}var ju={LOCATION_PARAMS:Ru,HV_NAMES:Lu,box:zu,vbox:Yu,hbox:Hu,getAvailableSize:function(e,t,n){var i=t.width,r=t.height,a=Eu(e.x,i),o=Eu(e.y,r),s=Eu(e.x2,i),l=Eu(e.y2,r);return(isNaN(a)||isNaN(parseFloat(e.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(e.x2)))&&(s=i),(isNaN(o)||isNaN(parseFloat(e.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(e.y2)))&&(l=r),n=Iu.normalizeCssArray(n||0),{width:Math.max(s-a-n[1]-n[3],0),height:Math.max(l-o-n[0]-n[2],0)}},getLayoutRect:Fu,positionElement:function(e,t,n,i,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 zn(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(Te.defaults({width:l.width,height:l.height},t),n,i);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[Lu[t][0]]||null!=e[Lu[t][1]]&&null!=e[Lu[t][2]]},mergeLayoutParam:function(e,t,n){!Te.isObject(n)&&(n={});var i=n.ignoreSize;!Te.isArray(i)&&(i=[i,i]);var r=o(Lu[0],0),a=o(Lu[1],1);function o(n,r){var a={},o=0,u={},c=0;if(Nu(n,(function(t){u[t]=e[t]})),Nu(n,(function(e){s(t,e)&&(a[e]=u[e]=t[e]),l(a,e)&&o++,l(u,e)&&c++})),i[r])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&o){if(o>=2)return a;for(var h=0;h<n.length;h++){var d=n[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,n){Nu(e,(function(e){t[e]=n[e]}))}u(Lu[0],e,r),u(Lu[1],e,a)},getLayoutParams:function(e){return Bu({},e)},copyLayoutParams:Bu},Uu={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")}}},Wu=Ma.enableClassManagement,Gu=Ma.parseClassType,Vu=(0,xa.makeInner)(),qu=vu.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(e,t,n,i){vu.call(this,e,t,n,i),this.uid=xu.getUID("ec_cpt_model")},init:function(e,t,n,i){this.mergeDefaultAndTheme(e,n)},mergeDefaultAndTheme:function(e,t){var n=this.layoutMode,i=n?ju.getLayoutParams(e):{},r=t.getTheme();Te.merge(e,r.get(this.mainType)),Te.merge(e,this.getDefaultOption()),n&&ju.mergeLayoutParam(e,i,n)},mergeOption:function(e,t){Te.merge(this.option,e,!0);var n=this.layoutMode;n&&ju.mergeLayoutParam(this.option,e,n)},optionUpdated:function(e,t){},getDefaultOption:function(){var e=Vu(this);if(!e.defaultOption){for(var t=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&t.push(i),n=n.superClass}for(var r={},a=t.length-1;a>=0;a--)r=Te.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)})}});Wu(qu,{registerWhenExtend:!0}),xu.enableSubTypeDefaulter(qu),xu.enableTopologicalTravel(qu,(function(e){var t=[];Te.each(qu.getClassesByMainType(e),(function(e){t=t.concat(e.prototype.dependencies||[])})),t=Te.map(t,(function(e){return Gu(e).main})),"dataset"!==e&&Te.indexOf(t,"dataset")<=0&&t.unshift("dataset");return t})),Te.mixin(qu,Uu);var Zu=qu,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,$u=xa.normalizeToArray,Ju=Qu();var ec={clearColorPalette:function(){Ju(this).colorIdx=0,Ju(this).colorNameMap={}},getColorFromPalette:function(e,t,n){var i=Ju(t=t||this),r=i.colorIdx||0,a=i.colorNameMap=i.colorNameMap||{};if(a.hasOwnProperty(e))return a[e];var o=$u(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?function(e,t){for(var n=e.length,i=0;i<n;i++)if(e[i].length>t)return e[i];return e[n-1]}(s,n):o;if((l=l||o)&&l.length){var u=l[r];return e&&(a[e]=u),i.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"},nc=Te.createHashMap,ic=Te.isTypedArray,rc=Ma.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&&nc(e.encodeDefine),this.startIndex=e.startIndex||0,this.dimensionsDetectCount=e.dimensionsDetectCount}cc.seriesDataToSource=function(e){return new cc({data:e,sourceFormat:ic(e)?lc:ac,fromDataset:!1})},rc(cc);var hc=cc,dc=xa.makeInner,fc=xa.getDataItemValue,pc=Te.createHashMap,gc=Te.each,mc=Te.map,vc=Te.isArray,yc=Te.isString,_c=Te.isObject,xc=Te.isTypedArray,bc=Te.isArrayLike,wc=Te.extend,Tc=tc.SOURCE_FORMAT_ORIGINAL,Sc=tc.SOURCE_FORMAT_ARRAY_ROWS,Oc=tc.SOURCE_FORMAT_OBJECT_ROWS,Mc=tc.SOURCE_FORMAT_KEYED_COLUMNS,Dc=tc.SOURCE_FORMAT_UNKNOWN,Ac=tc.SOURCE_FORMAT_TYPED_ARRAY,kc=tc.SERIES_LAYOUT_BY_ROW,Cc={Must:1,Might:2,Not:3},Ic=dc();function Ec(e){if(e){var t=pc();return mc(e,(function(e,n){if(null==(e=wc({},_c(e)?e:{name:e})).name)return e;e.name+="",null==e.displayName&&(e.displayName=e.name);var i=t.get(e.name);return i?e.name+="-"+i.count++:t.set(e.name,{count:1}),e}))}}function Nc(e,t,n,i){if(null==i&&(i=1/0),t===kc)for(var r=0;r<n.length&&r<i;r++)e(n[r]?n[r][0]:null,r);else{var a=n[0]||[];for(r=0;r<a.length&&r<i;r++)e(a[r],r)}}function Rc(e){var t=e.option;if(!t.data)return e.ecModel.getComponent("dataset",t.datasetIndex||0)}function Lc(e,t,n,i,r,a){var o,s,l;if(xc(e))return Cc.Not;if(i){var u=i[a];_c(u)?(s=u.name,l=u.type):yc(u)&&(s=u)}if(null!=l)return"ordinal"===l?Cc.Must:Cc.Not;if(t===Sc)if(n===kc){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===Oc){if(!s)return Cc.Not;for(h=0;h<e.length&&h<5;h++){if((f=e[h])&&null!=(o=g(f[s])))return o}}else if(t===Mc){if(!s)return Cc.Not;if(!(c=e[s])||xc(c))return Cc.Not;for(h=0;h<c.length&&h<5;h++)if(null!=(o=g(c[h])))return o}else if(t===Tc)for(h=0;h<e.length&&h<5;h++){var f=e[h],p=fc(f);if(!vc(p))return Cc.Not;if(null!=(o=g(p[a])))return o}function g(e){var t=yc(e);return null!=e&&isFinite(e)&&""!==e?t?Cc.Might:Cc.Not:t&&"-"!==e?Cc.Must:void 0}return Cc.Not}var Pc={BE_ORDINAL:Cc,detectSourceFormat:function(e){var t=e.option.source,n=Dc;if(xc(t))n=Ac;else if(vc(t)){0===t.length&&(n=Sc);for(var i=0,r=t.length;i<r;i++){var a=t[i];if(null!=a){if(vc(a)){n=Sc;break}if(_c(a)){n=Oc;break}}}}else if(_c(t)){for(var o in t)if(t.hasOwnProperty(o)&&bc(t[o])){n=Mc;break}}else if(null!=t)throw new Error("Invalid data");Ic(e).sourceFormat=n},getSource:function(e){return Ic(e).source},resetSourceDefaulter:function(e){Ic(e).datasetMap=pc()},prepareSource:function(e){var t=e.option,n=t.data,i=xc(n)?Ac:Tc,r=!1,a=t.seriesLayoutBy,o=t.sourceHeader,s=t.dimensions,l=Rc(e);if(l){var u=l.option;n=u.source,i=Ic(l).sourceFormat,r=!0,a=a||u.seriesLayoutBy,null==o&&(o=u.sourceHeader),s=s||u.dimensions}var c=function(e,t,n,i,r){if(!e)return{dimensionsDefine:Ec(r)};var a,o;if(t===Sc)"auto"===i||null==i?Nc((function(e){null!=e&&"-"!==e&&(yc(e)?null==o&&(o=1):o=0)}),n,e,10):o=i?1:0,r||1!==o||(r=[],Nc((function(e,t){r[t]=null!=e?e:""}),n,e)),a=r?r.length:n===kc?e.length:e[0]?e[0].length:null;else if(t===Oc)r||(r=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t){var i=[];return gc(t,(function(e,t){i.push(t)})),i}}(e));else if(t===Mc)r||(r=[],gc(e,(function(e,t){r.push(t)})));else if(t===Tc){var s=fc(e[0]);a=vc(s)&&s.length||1}return{startIndex:o,dimensionsDefine:Ec(r),dimensionsDetectCount:a}}(n,i,a,o,s);Ic(e).source=new hc({data:n,fromDataset:r,seriesLayoutBy:a,sourceFormat:i,dimensionsDefine:c.dimensionsDefine,startIndex:c.startIndex,dimensionsDetectCount:c.dimensionsDetectCount,encodeDefine:t.encode})},makeSeriesEncodeForAxisCoordSys:function(e,t,n){var i={},r=Rc(t);if(!r||!e)return i;var a,o,s=[],l=[],u=t.ecModel,c=Ic(u).datasetMap,h=r.uid+"_"+n.seriesLayoutBy;e=e.slice(),gc(e,(function(t,n){!_c(t)&&(e[n]={name:t}),"ordinal"===t.type&&null==a&&(a=n,o=p(e[n])),i[t.name]=[]}));var d=c.get(h)||c.set(h,{categoryWayDim:o,valueWayDim:0});function f(e,t,n){for(var i=0;i<n;i++)e.push(t+i)}function p(e){var t=e.dimsDef;return t?t.length:1}return gc(e,(function(e,t){var n=e.name,r=p(e);if(null==a){var o=d.valueWayDim;f(i[n],o,r),f(l,o,r),d.valueWayDim+=r}else if(a===t)f(i[n],0,r),f(s,0,r);else{o=d.categoryWayDim;f(i[n],o,r),f(l,o,r),d.categoryWayDim+=r}})),s.length&&(i.itemName=s),l.length&&(i.seriesName=l),i},makeSeriesEncodeForNameBased:function(e,t,n){var i={};if(!Rc(e))return i;var r,a=t.sourceFormat,o=t.dimensionsDefine;a!==Oc&&a!==Mc||gc(o,(function(e,t){"name"===(_c(e)?e.name:e)&&(r=t)}));var s=function(){for(var e={},i={},s=[],l=0,u=Math.min(5,n);l<u;l++){var c=Lc(t.data,a,t.seriesLayoutBy,o,t.startIndex,l);s.push(c);var h=c===Cc.Not;if(h&&null==e.v&&l!==r&&(e.v=l),(null==e.n||e.n===e.v||!h&&s[e.n]===Cc.Not)&&(e.n=l),d(e)&&s[e.n]!==Cc.Not)return e;h||(c===Cc.Might&&null==i.v&&l!==r&&(i.v=l),null!=i.n&&i.n!==i.v||(i.n=l))}function d(e){return null!=e.v&&null!=e.n}return d(e)?e:d(i)?i:null}();if(s){i.value=s.v;var l=null!=r?r:s.n;i.itemName=[l],i.seriesName=[l]}return i},guessOrdinal:function(e,t){return Lc(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}},zc=Te.each,Yc=Te.filter,Hc=Te.map,Fc=Te.isArray,Bc=Te.indexOf,jc=Te.isObject,Uc=Te.isString,Wc=Te.createHashMap,Gc=Te.assert,Vc=Te.clone,qc=Te.merge,Zc=Te.extend,Xc=Te.mixin,Kc=Pc.resetSourceDefaulter,Qc=vu.extend({init:function(e,t,n,i){n=n||{},this.option=null,this._theme=new vu(n),this._optionManager=i},setOption:function(e,t){Gc(!("\0_ec_inner"in e),"please use chart.getOption()"),this._optionManager.setOption(e,t),this.resetOption(null)},resetOption:function(e){var t=!1,n=this._optionManager;if(!e||"recreate"===e){var i=n.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this.mergeOption(i)):$c.call(this,i),t=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var r=n.getTimelineOption(this);r&&(this.mergeOption(r),t=!0)}if(!e||"recreate"===e||"media"===e){var a=n.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,n=this._componentsMap,i=[];Kc(this),zc(e,(function(e,n){null!=e&&(Zu.hasClass(n)?n&&i.push(n):t[n]=null==t[n]?Vc(e):qc(t[n],e,!0))})),Zu.topologicalTravel(i,Zu.getAllClassMainTypes(),(function(i,r){var a=xa.normalizeToArray(e[i]),o=xa.mappingToExists(n.get(i),a);xa.makeIdAndName(o),zc(o,(function(e,t){var n=e.option;jc(n)&&(e.keyInfo.mainType=i,e.keyInfo.subType=function(e,t,n){return t.type?t.type:n?n.subType:Zu.determineSubType(e,t)}(i,n,e.exist))}));var s=function(e,t){Fc(t)||(t=t?[t]:[]);var n={};return zc(t,(function(t){n[t]=(e.get(t)||[]).slice()})),n}(n,r);t[i]=[],n.set(i,[]),zc(o,(function(e,r){var a=e.exist,o=e.option;if(Gc(jc(o)||a,"Empty component definition"),o){var l=Zu.getClass(i,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=Zc({dependentModels:s,componentIndex:r},e.keyInfo);a=new l(o,this,this,u),Zc(a,u),a.init(o,this,this,u),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);n.get(i)[r]=a,t[i][r]=a.option}),this),"series"===i&&Jc(this,n.get("series"))}),this),this._seriesIndicesMap=Wc(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var e=Vc(this.option);return zc(e,(function(t,n){if(Zu.hasClass(n)){for(var i=(t=xa.normalizeToArray(t)).length-1;i>=0;i--)xa.isIdInner(t[i])&&t.splice(i,1);e[n]=t}})),delete e["\0_ec_inner"],e},getTheme:function(){return this._theme},getComponent:function(e,t){var n=this._componentsMap.get(e);if(n)return n[t||0]},queryComponents:function(e){var t=e.mainType;if(!t)return[];var n,i=e.index,r=e.id,a=e.name,o=this._componentsMap.get(t);if(!o||!o.length)return[];if(null!=i)Fc(i)||(i=[i]),n=Yc(Hc(i,(function(e){return o[e]})),(function(e){return!!e}));else if(null!=r){var s=Fc(r);n=Yc(o,(function(e){return s&&Bc(r,e.id)>=0||!s&&e.id===r}))}else if(null!=a){var l=Fc(a);n=Yc(o,(function(e){return l&&Bc(a,e.name)>=0||!l&&e.name===a}))}else n=o.slice();return eh(n,e)},findComponents:function(e){var t,n,i,r,a,o=e.query,s=e.mainType,l=(n=s+"Index",i=s+"Id",r=s+"Name",!(t=o)||null==t[n]&&null==t[i]&&null==t[r]?null:{mainType:s,index:t[n],id:t[i],name:t[r]}),u=l?this.queryComponents(l):this._componentsMap.get(s);return a=eh(u,e),e.filter?Yc(a,e.filter):a},eachComponent:function(e,t,n){var i=this._componentsMap;if("function"==typeof e)n=t,t=e,i.each((function(e,i){zc(e,(function(e,r){t.call(n,i,e,r)}))}));else if(Uc(e))zc(i.get(e),t,n);else if(jc(e)){var r=this.findComponents(e);zc(r,t,n)}},getSeriesByName:function(e){var t=this._componentsMap.get("series");return Yc(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 Yc(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(n){var i=this._componentsMap.get("series")[n];e.call(t,i,n)}),this)},eachRawSeries:function(e,t){zc(this._componentsMap.get("series"),e,t)},eachSeriesByType:function(e,t,n){zc(this._seriesIndices,(function(i){var r=this._componentsMap.get("series")[i];r.subType===e&&t.call(n,r,i)}),this)},eachRawSeriesByType:function(e,t,n){return zc(this.getSeriesByType(e),t,n)},isSeriesFiltered:function(e){return null==this._seriesIndicesMap.get(e.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(e,t){Jc(this,Yc(this._componentsMap.get("series"),e,t))},restoreData:function(e){var t=this._componentsMap;Jc(this,t.get("series"));var n=[];t.each((function(e,t){n.push(t)})),Zu.topologicalTravel(n,Zu.getAllClassMainTypes(),(function(n,i){zc(t.get(n),(function(t){("series"!==n||!function(e,t){if(t){var n=t.seiresIndex,i=t.seriesId,r=t.seriesName;return null!=n&&e.componentIndex!==n||null!=i&&e.id!==i||null!=r&&e.name!==r}}(t,e))&&t.restoreData()}))}))}});function $c(e){e=e,this.option={},this.option["\0_ec_inner"]=1,this._componentsMap=Wc({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(e,t){var n=e.color&&!e.colorLayer;zc(t,(function(t,i){"colorLayer"===i&&n||Zu.hasClass(i)||("object"==typeof t?e[i]=e[i]?qc(e[i],t,!1):Vc(t):null==e[i]&&(e[i]=t))}))}(e,this._theme.option),qc(e,Ku,!1),this.mergeOption(e)}function Jc(e,t){e._seriesIndicesMap=Wc(e._seriesIndices=Hc(t,(function(e){return e.componentIndex}))||[])}function eh(e,t){return t.hasOwnProperty("subType")?Yc(e,(function(e){return e.subType===t.subType})):e}Xc(Qc,ec);var th=Qc,nh=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var ih=function(e){Te.each(nh,(function(t){this[t]=Te.bind(e[t],e)}),this)},rh={};function ah(){this._coordinateSystems=[]}ah.prototype={constructor:ah,create:function(e,t){var n=[];Te.each(rh,(function(i,r){var a=i.create(e,t);n=n.concat(a||[])})),this._coordinateSystems=n},update:function(e,t){Te.each(this._coordinateSystems,(function(n){n.update&&n.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=Te.each,lh=Te.clone,uh=Te.map,ch=Te.merge,hh=/^(min|max)?(.+)$/;function dh(e){this._api=e,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function fh(e,t,n){var i,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):i||(i=e))}))}return r||(r=e),r.timeline||(r.timeline=s),sh([r].concat(a).concat(Te.map(o,(function(e){return e.option}))),(function(e){sh(t,(function(t){t(e,n)}))})),{baseOption:r,timelineOptions:a,mediaDefault:i,mediaList:o}}function ph(e,t,n){var i={width:t,height:n,aspectratio:t/n},r=!0;return Te.each(e,(function(e,t){var n=t.match(hh);if(n&&n[1]&&n[2]){var a=n[1],o=n[2].toLowerCase();(function(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t})(i[o],e,a)||(r=!1)}})),r}dh.prototype={constructor:dh,setOption:function(e,t){e&&Te.each(xa.normalizeToArray(e.series),(function(e){e&&e.data&&Te.isTypedArray(e.data)&&Te.setAsPrimitive(e.data)})),e=lh(e);var n,i,r=this._optionBackup,a=fh.call(this,e,t,!r);this._newBaseOption=a.baseOption,r?(n=r.baseOption,i=a.baseOption,sh(i=i||{},(function(e,t){if(null!=e){var i=n[t];if(Zu.hasClass(t)){e=xa.normalizeToArray(e),i=xa.normalizeToArray(i);var r=xa.mappingToExists(i,e);n[t]=uh(r,(function(e){return e.option&&e.exist?ch(e.exist,e.option,!0):e.exist||e.option}))}else n[t]=ch(i,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,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(t=lh(n[i.getCurrentIndex()],!0))}return t},getMediaOption:function(e){var t,n,i=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++)ph(a[u].query,i,r)&&s.push(u);return!s.length&&o&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=uh(s,(function(e){return lh(-1===e?o.option:a[e].option)}))),this._currentMediaIndices=s,l}};var gh=dh,mh=Te.each,vh=Te.isObject,yh=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function _h(e){var t=e&&e.itemStyle;if(t)for(var n=0,i=yh.length;n<i;n++){var r=yh[n],a=t.normal,o=t.emphasis;a&&a[r]&&(e[r]=e[r]||{},e[r].normal?Te.merge(e[r].normal,a[r]):e[r].normal=a[r],a[r]=null),o&&o[r]&&(e[r]=e[r]||{},e[r].emphasis?Te.merge(e[r].emphasis,o[r]):e[r].emphasis=o[r],o[r]=null)}}function xh(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var i=e[t].normal,r=e[t].emphasis;i&&(n?(e[t].normal=e[t].emphasis=null,Te.defaults(e[t],i)):e[t]=i),r&&(e.emphasis=e.emphasis||{},e.emphasis[t]=r)}}function bh(e){xh(e,"itemStyle"),xh(e,"lineStyle"),xh(e,"areaStyle"),xh(e,"label"),xh(e,"labelLine"),xh(e,"upperLabel"),xh(e,"edgeLabel")}function wh(e,t){var n=vh(e)&&e[t],i=vh(n)&&n.textStyle;if(i)for(var r=0,a=xa.TEXT_STYLE_OPTIONS.length;r<a;r++){t=xa.TEXT_STYLE_OPTIONS[r];i.hasOwnProperty(t)&&(n[t]=i[t])}}function Th(e){e&&(bh(e),wh(e,"label"),e.emphasis&&wh(e.emphasis,"label"))}function Sh(e){return Te.isArray(e)?e:e?[e]:[]}function Oh(e){return(Te.isArray(e)?e[0]:e)||{}}var Mh=function(e,t){mh(Sh(e.series),(function(e){vh(e)&&function(e){if(vh(e)){_h(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")),(n=e.markPoint)&&(_h(n),Th(n)),(i=e.markLine)&&(_h(i),Th(i));var t=e.markArea;t&&Th(t);var n,i,r=e.data;if("graph"===e.type){r=r||e.nodes;var a=e.links||e.edges;if(a&&!Te.isTypedArray(a))for(var o=0;o<a.length;o++)Th(a[o]);Te.each(e.categories,(function(e){bh(e)}))}if(r&&!Te.isTypedArray(r))for(o=0;o<r.length;o++)Th(r[o]);if((n=e.markPoint)&&n.data){var s=n.data;for(o=0;o<s.length;o++)Th(s[o])}if((i=e.markLine)&&i.data){var l=i.data;for(o=0;o<l.length;o++)Te.isArray(l[o])?(Th(l[o][0]),Th(l[o][1])):Th(l[o])}"gauge"===e.type?(wh(e,"axisLabel"),wh(e,"title"),wh(e,"detail")):"treemap"===e.type?(xh(e.breadcrumb,"itemStyle"),Te.each(e.levels,(function(e){bh(e)}))):"tree"===e.type&&bh(e.leaves)}}(e)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),mh(n,(function(t){mh(Sh(e[t]),(function(e){e&&(wh(e,"axisLabel"),wh(e.axisPointer,"label"))}))})),mh(Sh(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;wh(t,"axisLabel"),wh(t&&t.axisPointer,"label")})),mh(Sh(e.calendar),(function(e){xh(e,"itemStyle"),wh(e,"dayLabel"),wh(e,"monthLabel"),wh(e,"yearLabel")})),mh(Sh(e.radar),(function(e){wh(e,"name")})),mh(Sh(e.geo),(function(e){vh(e)&&(Th(e),mh(Sh(e.regions),(function(e){Th(e)})))})),mh(Sh(e.timeline),(function(e){Th(e),xh(e,"label"),xh(e,"itemStyle"),xh(e,"controlStyle",!0);var t=e.data;Te.isArray(t)&&Te.each(t,(function(e){Te.isObject(e)&&(xh(e,"label"),xh(e,"itemStyle"))}))})),mh(Sh(e.toolbox),(function(e){xh(e,"iconStyle"),mh(e.feature,(function(e){xh(e,"iconStyle")}))})),wh(Oh(e.axisPointer),"label"),wh(Oh(e.tooltip).axisPointer,"label")},Dh=Te.each,Ah=Te.isArray,kh=Te.isObject,Ch=xa.normalizeToArray;function Ih(e){Dh(Eh,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var Eh=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Nh=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];var Rh=function(e,t){Mh(e,t),e.series=Ch(e.series),Dh(e.series,(function(e){if(kh(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 n=function(e,t){t=t.split(",");for(var n=e,i=0;i<t.length&&null!=(n=n&&n[t[i]]);i++);return n}(e,"pointer.color");null!=n&&function(e,t,n,i){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];(i||null==a[t[o]])&&(a[t[o]]=n)}(e,"itemStyle.color",n)}Ih(e)}})),e.dataRange&&(e.visualMap=e.dataRange),Dh(Nh,(function(t){var n=e[t];n&&(Ah(n)||(n=[n]),Dh(n,(function(e){Ih(e)})))}))},Lh=Te.createHashMap,Ph=Te.each;function zh(e){Ph(e,(function(t,n){var i=[],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 f=NaN,p=n-1;p>=0;p--){var g=e[p];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,f=m;break}}}return i[0]=d,i[1]=f,i}));o.hostModel.setData(l),t.data=l}))}var Yh=function(e){var t=Lh();e.eachSeries((function(e){var n=e.get("stack");if(n){var i=t.get(n)||t.set(n,[]),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;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(a)}})),t.each(zh)},Hh=Te.extend,Fh=Te.each,Bh=Te.isObject,jh=xa.getDataItemValue,Uh=xa.isDataItemOption,Wh=Tu.parseDate,Gh=tc.SOURCE_FORMAT_TYPED_ARRAY,Vh=tc.SOURCE_FORMAT_ARRAY_ROWS,qh=tc.SOURCE_FORMAT_ORIGINAL,Zh=tc.SOURCE_FORMAT_OBJECT_ROWS;function Xh(e,t){hc.isInstance(e)||(e=hc.seriesDataToSource(e)),this._source=e;var n=this._data=e.data,i=e.sourceFormat;i===Gh&&(this._offset=0,this._dimSize=t,this._data=n);var r=Qh[i===Vh?i+"_"+e.seriesLayoutBy:i];Hh(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=[],n=this._data,i=0;i<n.length;i++){var r=n[i];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:$h,getItem:Jh,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=[],n=this._source.dimensionsDefine,i=0;i<n.length;i++){var r=this._data[n[i].name];t.push(r?r[e]:null)}return t},appendData:function(e){var t=this._data;Fh(e,(function(e,n){for(var i=t[n]||(t[n]=[]),r=0;r<(e||[]).length;r++)i.push(e[r])}))}},original:{count:$h,getItem:Jh,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 n=this._dimSize*e,i=0;i<this._dimSize;i++)t[i]=this._data[n+i];return t},appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}}};function $h(){return this._data.length}function Jh(e){return this._data[e]}function ed(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}var td={arrayRows:nd,objectRows:function(e,t,n,i){return null!=n?e[i]:e},keyedColumns:nd,original:function(e,t,n,i){var r=jh(e);return null!=n&&r instanceof Array?r[n]:r},typedArray:nd};function nd(e,t,n,i){return null!=n?e[n]:e}function id(e,t,n,i){return rd(e[i],this._dimensionInfos[t])}function rd(e,t){var n=t&&t.type;if("ordinal"===n){var i=t&&t.ordinalMeta;return i?i.parseAndCollect(e):e}return"time"===n&&"number"!=typeof e&&null!=e&&"-"!==e&&(e=+Wh(e)),null==e||""===e?NaN:+e}var ad={DefaultDataProvider:Xh,defaultDimValueGetters:{arrayRows:id,objectRows:function(e,t,n,i){return rd(e[t],this._dimensionInfos[t])},keyedColumns:id,original:function(e,t,n,i){var r=e&&(null==e.value?e:e.value);return!this._rawData.pure&&Uh(e)&&(this.hasItemOption=!0),rd(r instanceof Array?r[i]:r,this._dimensionInfos[t])},typedArray:function(e,t,n,i){return e[i]}},retrieveRawValue:function(e,t,n){if(e){var i=e.getRawDataItem(t);if(null!=i){var r,a,o=e.getProvider().getSource().sourceFormat,s=e.getDimensionInfo(n);return s&&(r=s.name,a=s.index),td[o](i,t,a,r)}}},retrieveRawAttr:function(e,t,n){if(e){var i=e.getProvider().getSource().sourceFormat;if(i===qh||i===Zh){var r=e.getRawDataItem(t);return i!==qh||Bh(r)||(r=null),r?r[n]:void 0}}}},od=ad.retrieveRawValue,sd=Iu.getTooltipMarker,ld=Iu.formatTpl,ud=xa.getTooltipRenderMode,cd=/\{@(.+?)\}/g,hd={getDataParams:function(e,t){var n=this.getData(t),i=this.getRawValue(e,t),r=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,"color"),l=n.getItemVisual(e,"borderColor"),u=this.ecModel.getComponent("tooltip"),c=u&&u.get("renderMode"),h=ud(c),d=this.mainType,f="series"===d,p=n.userOutput;return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:a,dataIndex:r,data:o,dataType:t,value:i,color:s,borderColor:l,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,marker:sd({color:s,renderMode:h}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(e,t,n,i,r){t=t||"normal";var a=this.getData(n),o=a.getItemModel(e),s=this.getDataParams(e,n);null!=i&&s.value instanceof Array&&(s.value=s.value[i]);var l=o.get("normal"===t?[r||"label","formatter"]:[t,r||"label","formatter"]);return"function"==typeof l?(s.status=t,s.dimensionIndex=i,l(s)):"string"==typeof l?ld(l,s).replace(cd,(function(t,n){var i=n.length;return"["===n.charAt(0)&&"]"===n.charAt(i-1)&&(n=+n.slice(1,i-1)),od(a,e,n)})):void 0},getRawValue:function(e,t){return od(this.getData(t),e)},formatTooltip:function(){}},dd=Te.isArray;function fd(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 pd=fd.prototype;pd.perform=function(e){var t,n=this._upstream,i=e&&e.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(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 n,i;e._dueIndex=e._outputDueEnd=e._dueEnd=0,e._settedOutputEnd=null,!t&&e._reset&&((n=e._reset(e.context))&&n.progress&&(i=n.forceFirstProgress,n=n.progress),dd(n)&&!n.length&&(n=null));e._progress=n,e._modBy=e._modDataCount=null;var r=e._downstream;return r&&r.dirty(),i}(this,i)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!i&&(a||d<f)){var p=this._progress;if(dd(p))for(var g=0;g<p.length;g++)md(this,p[g],d,f,l,u);else md(this,p,d,f,l,u)}this._dueIndex=f;var m=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var gd=function(){var e,t,n,i,r,a={reset:function(l,u,c,h){t=l,e=u,n=c,i=h,r=Math.ceil(i/n),a.next=n>1&&i>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var a=t%r*n+Math.ceil(t/r),o=t>=e?null:a<i?a:t;return t++,o}}();function md(e,t,n,i,r,a){gd.reset(n,i,r,a),e._callingProgress=t,e._callingProgress({start:n,end:i,count:i-n,next:gd.next},e.context)}pd.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},pd.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},pd.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},pd.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},pd.getUpstream=function(){return this._upstream},pd.getDownstream=function(){return this._downstream},pd.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e};var vd={createTask:function(e){return new fd(e)}},yd=Iu.formatTime,_d=Iu.encodeHTML,xd=Iu.addCommas,bd=Iu.getTooltipMarker,wd=ju.getLayoutParams,Td=ju.mergeLayoutParam,Sd=vd.createTask,Od=Pc.prepareSource,Md=Pc.getSource,Dd=ad.retrieveRawValue,Ad=xa.makeInner(),kd=Zu.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(e,t,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Sd({count:Id,reset:Ed}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),Od(this);var r=this.getInitialData(e,n);Rd(r,this),this.dataTask.context.data=r,Ad(this).dataBeforeProcessed=r,Cd(this)},mergeDefaultAndTheme:function(e,t){var n=this.layoutMode,i=n?wd(e):{},r=this.subType;Zu.hasClass(r)&&(r+="Series"),Te.merge(e,t.getTheme().get(this.subType)),Te.merge(e,this.getDefaultOption()),xa.defaultEmphasis(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Td(e,i,n)},mergeOption:function(e,t){e=Te.merge(this.option,e,!0),this.fillDataTextStyle(e.data);var n=this.layoutMode;n&&Td(this.option,e,n),Od(this);var i=this.getInitialData(e,t);Rd(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Ad(this).dataBeforeProcessed=i,Cd(this)},fillDataTextStyle:function(e){if(e&&!Te.isTypedArray(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&xa.defaultEmphasis(e[n],"label",t)},getInitialData:function(){},appendData:function(e){this.getRawData().appendData(e.data)},getData:function(e){var t=Pd(this);if(t){var n=t.context.data;return null==e?n:n.getLinkedData(e)}return Ad(this).data},setData:function(e){var t=Pd(this);if(t){var n=t.context;n.data!==e&&t.modifyOutputEnd&&t.setOutputEnd(e.count()),n.outputData=e,t!==this.dataTask&&(n.data=e)}Ad(this).data=e},getSource:function(){return Md(this)},getRawData:function(){return Ad(this).dataBeforeProcessed},getBaseAxis:function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},formatTooltip:function(e,t,n,i){var r=this,a="html"===(i=i||"html")?"<br/>":"\n",o="richText"===i,s={},l=0;function u(e){return{renderMode:i,content:_d(xd(e)),style:s}}var c=this.getData(),h=c.mapDimension("defaultedTooltip",!0),d=h.length,f=this.getRawValue(e),p=Te.isArray(f),g=c.getItemVisual(e,"color");Te.isObject(g)&&g.colorStops&&(g=(g.colorStops[0]||{}).color),g=g||"transparent";var m=(d>1||p&&!d?function(n){var a=Te.reduce(n,(function(e,t,n){var i=c.getDimensionInfo(n);return e|(i&&!1!==i.tooltip&&null!=i.displayName)}),0),u=[];function d(e,n){var h=c.getDimensionInfo(n);if(h&&!1!==h.otherDims.tooltip){var d=h.type,f="sub"+r.seriesIndex+"at"+l,p=bd({color:g,type:"subItem",renderMode:i,markerId:f}),m="string"==typeof p?p:p.content,v=(a?m+_d(h.displayName||"-")+": ":"")+_d("ordinal"===d?e+"":"time"===d?t?"":yd("yyyy/MM/dd hh:mm:ss",e):xd(e));v&&u.push(v),o&&(s[f]=g,++l)}}h.length?Te.each(h,(function(t){d(Dd(c,e,t),t)})):Te.each(n,d);var f=a?o?"\n":"<br/>":"",p=f+u.join(f||", ");return{renderMode:i,content:p,style:s}}(f):u(d?Dd(c,e,h[0]):p?f[0]:f)).content,v=r.seriesIndex+"at"+l,y=bd({color:g,type:"item",renderMode:i,markerId:v});s[v]=g,++l;var _=c.getName(e),x=this.name;xa.isNameSpecified(this)||(x=""),x=x?_d(x)+(t?": ":a):"";var b="string"==typeof y?y:y.content;return{html:t?b+x+m:x+b+(_?_d(_)+": "+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,n){var i=this.ecModel,r=ec.getColorFromPalette.call(this,e,t,n);return r||(r=i.getColorFromPalette(e,t,n)),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 Cd(e){var t=e.name;xa.isNameSpecified(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimension("seriesName",!0),i=[];return Te.each(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&i.push(n.displayName)})),i.join(" ")}(e)||t)}function Id(e){return e.model.getRawData().count()}function Ed(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Nd}function Nd(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Rd(e,t){Te.each(e.CHANGABLE_METHODS,(function(n){e.wrapMethod(n,Te.curry(Ld,t))}))}function Ld(e){var t=Pd(e);t&&t.setOutputEnd(this.count())}function Pd(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(e.uid))}return i}}Te.mixin(kd,hd),Te.mixin(kd,ec);var zd=kd,Yd=function(){this.group=new Hn,this.uid=xu.getUID("viewComponent")},Hd=Yd.prototype={constructor:Yd,init:function(e,t){},render:function(e,t,n,i){},dispose:function(){},filterForExposedEvent:null};Hd.updateView=Hd.updateLayout=Hd.updateVisual=function(e,t,n,i){},Ma.enableClassExtend(Yd),Ma.enableClassManagement(Yd,{registerWhenExtend:!0});var Fd=Yd,Bd=xa.makeInner;var jd=function(){var e=Bd();return function(t){var n=e(t),i=t.pipelineContext,r=n.large,a=n.progressiveRender,o=n.large=i&&i.large,s=n.progressiveRender=i&&i.progressiveRender;return!!(r^o||a^s)&&"reset"}},Ud=Te.each,Wd=vd.createTask,Gd=xa.makeInner(),Vd=jd();function qd(){this.group=new Hn,this.uid=xu.getUID("viewChart"),this.renderTask=Wd({plan:Qd,reset:$d}),this.renderTask.context={view:this}}qd.prototype={type:"chart",init:function(e,t){},render:function(e,t,n,i){},highlight:function(e,t,n,i){Kd(e.getData(),i,"emphasis")},downplay:function(e,t,n,i){Kd(e.getData(),i,"normal")},remove:function(e,t){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var Zd=qd.prototype;function Xd(e,t,n){if(e&&(e.trigger(t,n),e.isGroup&&!ru.isHighDownDispatcher(e)))for(var i=0,r=e.childCount();i<r;i++)Xd(e.childAt(i),t,n)}function Kd(e,t,n){var i=xa.queryDataIndex(e,t),r=t&&null!=t.highlightKey?ru.getHighlightDigit(t.highlightKey):null;null!=i?Ud(xa.normalizeToArray(i),(function(t){Xd(e.getItemGraphicEl(t),n,r)})):e.eachItemGraphicEl((function(e){Xd(e,n,r)}))}function Qd(e){return Vd(e.model)}function $d(e){var t=e.model,n=e.ecModel,i=e.api,r=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=r&&Gd(r).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](t,n,i,r),Jd[l]}Zd.updateView=Zd.updateLayout=Zd.updateVisual=function(e,t,n,i){this.render(e,t,n,i)},Ma.enableClassExtend(qd,["dispose"]),Ma.enableClassManagement(qd,{registerWhenExtend:!0}),qd.markUpdateMethod=function(e,t){Gd(e).updateMethod=t};var Jd={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)}}},ef=qd,tf="\0__throttleOriginMethod",nf="\0__throttleRate";function rf(e,t,n){var i,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(){i=(new Date).getTime(),a=this,o=arguments;var e=s||t,d=s||n;s=null,r=i-(d?l:u)-e,clearTimeout(c),d?c=setTimeout(h,e):r>=0?h():c=setTimeout(h,-r),l=i};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(e){s=e},d}var af={throttle:rf,createOrUpdate:function(e,t,n,i){var r=e[t];if(r){var a=r[tf]||r,o=r["\0__throttleType"];if(r[nf]!==n||o!==i){if(null==n||!i)return e[t]=a;(r=e[t]=rf(a,n,"debounce"===i))[tf]=a,r["\0__throttleType"]=i,r[nf]=n}return r}},clear:function(e,t){var n=e[t];n&&n[tf]&&(e[t]=n[tf])}},of=Te.isFunction,sf={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=(e.visualColorAccessPath||"itemStyle.color").split("."),r=e.get(i),a=!of(r)||r instanceof Ks?null:r;r&&!a||(r=e.getColorFromPalette(e.name,null,t.getSeriesCount())),n.setVisual("color",r);var o=(e.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=e.get(o);if(n.setVisual("borderColor",s),!t.isSeriesFiltered(e)){a&&n.each((function(t){n.setItemVisual(t,"color",a(e.getDataParams(t)))}));return{dataEach:n.hasItemOption?function(e,t){var n=e.getItemModel(t),r=n.get(i,!0),a=n.get(o,!0);null!=r&&e.setItemVisual(t,"color",r),null!=a&&e.setItemVisual(t,"borderColor",a)}:null}}}},lf={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:""}}}},uf=ad.retrieveRawValue;var cf=function(e,t){var n=t.getModel("aria");if(n.get("show"))if(n.get("description"))e.setAttribute("aria-label",n.get("description"));else{var i=0;t.eachSeries((function(e,t){++i}),this);var r,a=n.get("data.maxCount")||10,o=n.get("series.maxCount")||10,s=Math.min(i,o);if(!(i<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(i>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:i}),t.eachSeries((function(e,t){if(t<s){var n,r=e.get("name"),o="series."+(i>1?"multiple":"single")+".";n=c(n=h(r?o+"withName":o+"withoutName"),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(m=e.subType,lf.series.typeNames[m]||"自定义图")});var l=e.getData();window.data=l,l.count()>a?n+=c(h("data.partialData"),{displayCnt:a}):n+=h("data.allData");for(var d=[],f=0;f<l.count();f++)if(f<a){var p=l.getName(f),g=uf(l,f);d.push(c(h(p?"data.withName":"data.withoutName"),{name:p,value:g}))}n+=d.join(h("data.separator.middle"))+h("data.separator.end"),u.push(n)}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 n=e;return Te.each(t,(function(e,t){n=n.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)})),n}function h(e){var t=n.get(e);if(null==t){for(var i=e.split("."),r=lf.aria,a=0;a<i.length;++a)r=r[i[a]];return r}return t}},hf=Math.PI;var df=function(e,t){t=t||{},Te.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 n=new ru.Group,i=new ru.Rect({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(i);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(n.add(a),t.showSpinner){var o=new ru.Arc({shape:{startAngle:-hf/2,endAngle:-hf/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*hf/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*hf/2}).delay(300).start("circularInOut"),n.add(o)}return n.resize=function(){var n=Bi.getWidth(t.text,r),s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner?0:n/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}),i.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n},ff=Te.each,pf=Te.map,gf=Te.isFunction,mf=Te.createHashMap,vf=Te.noop,yf=vd.createTask,_f=xu.getUID,xf=xa.normalizeToArray;function bf(e,t,n,i){this.ecInstance=e,this.api=t,this.unfinished;n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice();this._allHandlers=n.concat(i),this._stageTaskMap=mf()}var wf=bf.prototype;function Tf(e,t,n,i,r){var a;function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}r=r||{},ff(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(),Sf(c,i);var f=e.getPerformArgs(c,r.block);d.each((function(e){e.perform(f)})),a|=c.perform(f)}else u&&u.each((function(s,l){o(r,s)&&s.dirty();var u=e.getPerformArgs(s,r.block);u.skip=!t.performRawSeries&&n.isSeriesFiltered(s.context.model),Sf(s,i),a|=s.perform(u)}))}})),e.unfinished|=a}wf.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},wf.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,r=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=i&&i.modDataCount;return{step:r,modBy:null!=a?Math.ceil(a/r):null,modDataCount:a}}},wf.getPipeline=function(e){return this._pipelineMap.get(e)},wf.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),i=e.getData().count(),r=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,a=e.get("large")&&i>=e.get("largeThreshold"),o="mod"===e.get("progressiveChunkMode")?i:null;e.pipelineContext=n.context={progressiveRender:r,modDataCount:o,large:a}},wf.restorePipelines=function(e){var t=this,n=t._pipelineMap=mf();e.eachSeries((function(e){var i=e.getProgressive(),r=e.uid;n.set(r,{id:r,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:i&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),Rf(t,e,e.dataTask)}))},wf.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.ecInstance.getModel(),n=this.api;ff(this._allHandlers,(function(i){var r=e.get(i.uid)||e.set(i.uid,[]);i.reset&&function(e,t,n,i,r){var a=n.seriesTaskMap||(n.seriesTaskMap=mf()),o=t.seriesType,s=t.getTargetSeries;t.createOnAllSeries?i.eachRawSeries(l):o?i.eachRawSeriesByType(o,l):s&&s(i,r).each(l);function l(n){var o=n.uid,s=a.get(o)||a.set(o,yf({plan:kf,reset:Cf,count:Nf}));s.context={model:n,ecModel:i,api:r,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:e},Rf(e,n,s)}var u=e._pipelineMap;a.each((function(e,t){u.get(t)||(e.dispose(),a.removeKey(t))}))}(this,i,r,t,n),i.overallReset&&function(e,t,n,i,r){var a=n.overallTask=n.overallTask||yf({reset:Of});a.context={ecModel:i,api:r,overallReset:t.overallReset,scheduler:e};var o=a.agentStubMap=a.agentStubMap||mf(),s=t.seriesType,l=t.getTargetSeries,u=!0,c=t.modifyOutputEnd;s?i.eachRawSeriesByType(s,h):l?l(i,r).each(h):(u=!1,ff(i.getSeries(),h));function h(t){var n=t.uid,i=o.get(n);i||(i=o.set(n,yf({reset:Mf,onDirty:Af})),a.dirty()),i.context={model:t,overallProgress:u,modifyOutputEnd:c},i.agent=a,i.__block=u,Rf(e,t,i)}var d=e._pipelineMap;o.each((function(e,t){d.get(t)||(e.dispose(),a.dirty(),o.removeKey(t))}))}(this,i,r,t,n)}),this)},wf.prepareView=function(e,t,n,i){var r=e.renderTask,a=r.context;a.model=t,a.ecModel=n,a.api=i,r.__block=!e.incrementalPrepareRender,Rf(this,t,r)},wf.performDataProcessorTasks=function(e,t){Tf(this,this._dataProcessorHandlers,e,t,{block:!0})},wf.performVisualTasks=function(e,t,n){Tf(this,this._visualHandlers,e,t,n)},wf.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t|=e.dataTask.perform()})),this.unfinished|=t},wf.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 Sf=wf.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)};function Of(e){e.overallReset(e.ecModel,e.api,e.payload)}function Mf(e,t){return e.overallProgress&&Df}function Df(){this.agent.dirty(),this.getDownstream().dirty()}function Af(){this.agent&&this.agent.dirty()}function kf(e){return e.plan&&e.plan(e.model,e.ecModel,e.api,e.payload)}function Cf(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=xf(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?pf(t,(function(e,t){return Ef(t)})):If}var If=Ef(0);function Ef(e){return function(t,n){var i=n.data,r=n.resetDefines[e];if(r&&r.dataEach)for(var a=t.start;a<t.end;a++)r.dataEach(i,a);else r&&r.progress&&r.progress(t,i)}}function Nf(e){return e.data.count()}function Rf(e,t,n){var i=t.uid,r=e._pipelineMap.get(i);!r.head&&(r.head=n),r.tail&&r.tail.pipe(n),r.tail=n,n.__idxInPipeline=r.count++,n.__pipeline=r}function Lf(e){Pf=null;try{e(zf,Yf)}catch(e){}return Pf}bf.wrapStageHandler=function(e,t){return gf(e)&&(e={overallReset:e,seriesType:Lf(e)}),e.uid=_f("stageHandler"),t&&(e.visualType=t),e};var Pf,zf={},Yf={};function Hf(e,t){for(var n in t.prototype)e[n]=vf}Hf(zf,th),Hf(Yf,ih),zf.eachSeriesByType=zf.eachRawSeriesByType=function(e){Pf=e},zf.eachComponent=function(e){"series"===e.mainType&&e.subType&&(Pf=e.subType)};var Ff=bf,Bf=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],jf={color:Bf,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Bf]},Uf=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],Wf={color:Uf,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:Uf[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:Uf},gauge:{title:{textStyle:{color:"#eee"}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};Wf.categoryAxis.splitLine.show=!1;var Gf=Wf,Vf=Pc.detectSourceFormat,qf=tc.SERIES_LAYOUT_BY_COLUMN;Zu.extend({type:"dataset",defaultOption:{seriesLayoutBy:qf,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){Vf(this)}}),Fd.extend({type:"dataset"});var Zf=jo.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(e,t){var n=.5522848,i=t.cx,r=t.cy,a=t.rx,o=t.ry,s=a*n,l=o*n;e.moveTo(i-a,r),e.bezierCurveTo(i-a,r-l,i-s,r-o,i,r-o),e.bezierCurveTo(i+s,r-o,i+a,r-l,i+a,r),e.bezierCurveTo(i+a,r+l,i+s,r+o,i,r+o),e.bezierCurveTo(i-s,r+o,i-a,r+l,i-a,r),e.closePath()}}),Xf=os.createFromString,Kf=Te.isString,Qf=Te.extend,$f=Te.defaults,Jf=Te.trim,ep=Te.each,tp=/[\s,]+/;function np(e){Kf(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 ip(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}ip.prototype.parse=function(e,t){t=t||{};var n=np(e);if(!n)throw new Error("Illegal svg");var i=new Hn;this._root=i;var r=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||t.width),o=parseFloat(n.getAttribute("height")||t.height);isNaN(a)&&(a=null),isNaN(o)&&(o=null),up(n,i,null,!0);for(var s,l,u=n.firstChild;u;)this._parseNode(u,i),u=u.nextSibling;if(r){var c=Jf(r).split(tp);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=pp(s,a,o),!t.ignoreViewBox)){var h=i;(i=new Hn).add(h),h.scale=l.scale.slice(),h.position=l.position.slice()}return t.ignoreRootClip||null==a||null==o||i.setClipPath(new Rs({shape:{x:0,y:0,width:a,height:o}})),{root:i,width:a,height:o,viewBoxRect:s,viewBoxTransform:l}},ip.prototype._parseNode=function(e,t){var n,i,r=e.nodeName.toLowerCase();if("defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine){if(i=ap[r]){var a=i.call(this,e),o=e.getAttribute("id");o&&(this._defs[o]=a)}}else(i=rp[r])&&(n=i.call(this,e,t),t.add(n));for(var s=e.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},ip.prototype._parseText=function(e,t){if(1===e.nodeType){var n=e.getAttribute("dx")||0,i=e.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var r=new us({style:{text:e.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});op(t,r),up(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 rp={g:function(e,t){var n=new Hn;return op(t,n),up(e,n,this._defs),n},rect:function(e,t){var n=new Rs;return op(t,n),up(e,n,this._defs),n.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)}),n},circle:function(e,t){var n=new cs;return op(t,n),up(e,n,this._defs),n.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),r:parseFloat(e.getAttribute("r")||0)}),n},line:function(e,t){var n=new zs;return op(t,n),up(e,n,this._defs),n.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)}),n},ellipse:function(e,t){var n=new Zf;return op(t,n),up(e,n,this._defs),n.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)}),n},polygon:function(e,t){var n=e.getAttribute("points");n&&(n=sp(n));var i=new Ds({shape:{points:n||[]}});return op(t,i),up(e,i,this._defs),i},polyline:function(e,t){var n=new jo;op(t,n),up(e,n,this._defs);var i=e.getAttribute("points");return i&&(i=sp(i)),new As({shape:{points:i||[]}})},image:function(e,t){var n=new Or;return op(t,n),up(e,n,this._defs),n.setStyle({image:e.getAttribute("xlink:href"),x:e.getAttribute("x"),y:e.getAttribute("y"),width:e.getAttribute("width"),height:e.getAttribute("height")}),n},text:function(e,t){var n=e.getAttribute("x")||0,i=e.getAttribute("y")||0,r=e.getAttribute("dx")||0,a=e.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(a);var o=new Hn;return op(t,o),up(e,o,this._defs),o},tspan:function(e,t){var n=e.getAttribute("x"),i=e.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=e.getAttribute("dx")||0,a=e.getAttribute("dy")||0,o=new Hn;return op(t,o),up(e,o,this._defs),this._textX+=r,this._textY+=a,o},path:function(e,t){var n=e.getAttribute("d")||"",i=Xf(n);return op(t,i),up(e,i,this._defs),i}},ap={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||0,10),n=parseInt(e.getAttribute("y1")||0,10),i=parseInt(e.getAttribute("x2")||10,10),r=parseInt(e.getAttribute("y2")||0,10),a=new $s(t,n,i,r);return function(e,t){var n=e.firstChild;for(;n;){if(1===n.nodeType){var i=n.getAttribute("offset");i=i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var r=n.getAttribute("stop-color")||"#000000";t.addColorStop(i,r)}n=n.nextSibling}}(e,a),a},radialgradient:function(e){}};function op(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),$f(t.__inheritedStyle,e.__inheritedStyle))}function sp(e){for(var t=Jf(e).split(tp),n=[],i=0;i<t.length;i+=2){var r=parseFloat(t[i]),a=parseFloat(t[i+1]);n.push([r,a])}return n}var lp={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 up(e,t,n,i){var r=t.__inheritedStyle||{},a="text"===t.type;if(1===e.nodeType&&(function(e,t){var n=e.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=null,r=[];n.replace(dp,(function(e,t,n){r.push(t,n)}));for(var a=r.length-1;a>0;a-=2){var o=r[a],s=r[a-1];switch(i=i||gt.create(),s){case"translate":o=Jf(o).split(tp),gt.translate(i,i,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=Jf(o).split(tp),gt.scale(i,i,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=Jf(o).split(tp),gt.rotate(i,i,parseFloat(o[0]));break;case"skew":o=Jf(o).split(tp),console.warn("Skew transform is not supported yet");break;case"matrix":o=Jf(o).split(tp);i[0]=parseFloat(o[0]),i[1]=parseFloat(o[1]),i[2]=parseFloat(o[2]),i[3]=parseFloat(o[3]),i[4]=parseFloat(o[4]),i[5]=parseFloat(o[5])}}t.setLocalTransform(i)}}(e,t),Qf(r,function(e){var t=e.getAttribute("style"),n={};if(!t)return n;var i,r={};fp.lastIndex=0;for(;null!=(i=fp.exec(t));)r[i[1]]=i[2];for(var a in lp)lp.hasOwnProperty(a)&&null!=r[a]&&(n[lp[a]]=r[a]);return n}(e)),!i))for(var o in lp)if(lp.hasOwnProperty(o)){var s=e.getAttribute(o);null!=s&&(r[lp[o]]=s)}var l=a?"textFill":"fill",u=a?"textStroke":"stroke";t.style=t.style||new oi;var c=t.style;null!=r.fill&&c.set(l,hp(r.fill,n)),null!=r.stroke&&c.set(u,hp(r.stroke,n)),ep(["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"),ep(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(e){null!=r[e]&&c.set(e,r[e])})),r.lineDash&&(t.style.lineDash=Jf(r.lineDash).split(tp)),c[u]&&"none"!==c[u]&&(t[u]=!0),t.__inheritedStyle=r}var cp=/url\(\s*#(.*?)\)/;function hp(e,t){var n=t&&e&&e.match(cp);return n?t[Jf(n[1])]:e}var dp=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var fp=/([^\s:;]+)\s*:\s*([^:;]+)/g;function pp(e,t,n){var i=t/e.width,r=n/e.height,a=Math.min(i,r);return{scale:[a,a],position:[-(e.x+e.width/2)*a+t/2,-(e.y+e.height/2)*a+n/2]}}var gp={parseXML:np,makeViewBoxTransform:pp,parseSVG:function(e,t){return(new ip).parse(e,t)}},mp=Te.createHashMap,vp=Te.isString,yp=Te.isArray,_p=Te.each,xp=gp.parseXML,bp=mp(),wp={registerMap:function(e,t,n){var i;return yp(t)?i=t:t.svg?i=[{type:"svg",source:t.svg,specialAreas:t.specialAreas}]:(t.geoJson&&!t.features&&(n=t.specialAreas,t=t.geoJson),i=[{type:"geoJSON",source:t,specialAreas:n}]),_p(i,(function(e){var t=e.type;"geoJson"===t&&(t=e.type="geoJSON"),(0,Tp[t])(e)})),bp.set(e,i)},retrieveMap:function(e){return bp.get(e)}},Tp={geoJSON:function(e){var t=e.source;e.geoJSON=vp(t)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(t):new Function("return ("+t+");")():t},svg:function(e){e.svgXML=xp(e.source)}},Sp=wp;function Op(e){return e}function Mp(e,t,n,i,r){this._old=e,this._new=t,this._oldKeyGetter=n||Op,this._newKeyGetter=i||Op,this.context=r}function Dp(e,t,n,i,r){for(var a=0;a<e.length;a++){var o="_ec_"+r[i](e[a],a),s=t[o];null==s?(n.push(o),t[o]=a):(s.length||(t[o]=s=[s]),s.push(a))}}Mp.prototype={constructor:Mp,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,n={},i=[],r=[];for(Dp(e,{},i,"_oldKeyGetter",this),Dp(t,n,r,"_newKeyGetter",this),a=0;a<e.length;a++){if(null!=(s=n[o=i[a]]))(u=s.length)?(1===u&&(n[o]=null),s=s.shift()):n[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(n.hasOwnProperty(o)){var s;if(null==(s=n[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 Ap=Mp,kp=Te.each,Cp=Te.createHashMap,Ip=Cp(["tooltip","label","itemName","itemId","seriesName"]);function Ep(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var Np={OTHER_DIMENSIONS:Ip,summarizeDimensions:function(e){var t={},n=t.encode={},i=Cp(),r=[],a=[],o=t.userOutput={dimensionNames:e.dimensions.slice(),encode:{}};kp(e.dimensions,(function(t){var s,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var c=l.coordDimIndex;Ep(n,u)[c]=t,l.isExtraCoord||(i.set(u,1),"ordinal"!==(s=l.type)&&"time"!==s&&(r[0]=t),Ep(o.encode,u)[c]=l.index),l.defaultTooltip&&a.push(t)}Ip.each((function(e,t){var i=Ep(n,t),r=l.otherDims[t];null!=r&&!1!==r&&(i[r]=l.name)}))}));var s=[],l={};i.each((function(e,t){var i=n[t];l[t]=i[0],s=s.concat(i)})),t.dataDimsOnCoord=s,t.encodeFirstDimNotExtra=l;var u=n.label;u&&u.length&&(r=u.slice());var c=n.tooltip;return c&&c.length?a=c.slice():a.length||(a=r.slice()),n.defaultedLabel=r,n.defaultedTooltip=a,t},getDimensionTypeByAxis:function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}};var Rp=function(e){null!=e&&Te.extend(this,e),this.otherDims={}},Lp=ad.defaultDimValueGetters,Pp=ad.DefaultDataProvider,zp=Np.summarizeDimensions,Yp=Te.isObject,Hp={float:"undefined"==typeof Float64Array?Array:Float64Array,int:"undefined"==typeof Int32Array?Array:Int32Array,ordinal:Array,number:Array,time:Array},Fp="undefined"==typeof Uint32Array?Array:Uint32Array,Bp="undefined"==typeof Int32Array?Array:Int32Array,jp="undefined"==typeof Uint16Array?Array:Uint16Array;function Up(e){return e._rawCount>65535?Fp:jp}var Wp=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],Gp=["_extent","_approximateExtent","_rawExtent"];function Vp(e,t){Te.each(Wp.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,Te.each(Gp,(function(n){e[n]=Te.clone(t[n])})),e._calculationInfo=Te.extend(t._calculationInfo)}var qp=function(e,t){e=e||["x","y"];for(var n={},i=[],r={},a=0;a<e.length;a++){var o=e[a];Te.isString(o)?o=new Rp({name:o}):o instanceof Rp||(o=new Rp(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},i.push(s),n[s]=o,o.index=a,o.createInvertedIndices&&(r[s]=[])}this.dimensions=i,this._dimensionInfos=n,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=zp(this),this._invertedIndicesMap=r,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},Zp=qp.prototype;function Xp(e,t,n,i,r){var a=Hp[t.type],o=i-1,s=t.name,l=e[s][o];if(l&&l.length<n){for(var u=new a(Math.min(r-o*n,n)),c=0;c<l.length;c++)u[c]=l[c];e[s][o]=u}for(var h=i*n;h<r;h+=n)e[s].push(new a(Math.min(r-h,n)))}function Kp(e){var t=e._invertedIndicesMap;Te.each(t,(function(n,i){var r=e._dimensionInfos[i].ordinalMeta;if(r){n=t[i]=new Bp(r.categories.length);for(var a=0;a<n.length;a++)n[a]=-1;for(a=0;a<e._count;a++)n[e.get(i,a)]=a}}))}function Qp(e,t,n){var i;if(null!=t){var r=e._chunkSize,a=Math.floor(n/r),o=n%r,s=e.dimensions[t],l=e._storage[s][a];if(l){i=l[o];var u=e._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(i=u.categories[i])}}return i}function $p(e){return e}function Jp(e){return e<this._count&&e>=0?this._indices[e]:-1}function eg(e,t){var n=e._idList[t];return null==n&&(n=Qp(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n}function tg(e){return Te.isArray(e)||(e=[e]),e}function ng(e,t){var n=e.dimensions,i=new qp(Te.map(n,e.getDimensionInfo,e),e.hostModel);Vp(i,e);for(var r=i._storage={},a=e._storage,o=0;o<n.length;o++){var s=n[o];a[s]&&(Te.indexOf(t,s)>=0?(r[s]=ig(a[s]),i._rawExtent[s]=rg(),i._extent[s]=null):r[s]=a[s])}return i}function ig(e){for(var t,n,i=new Array(e.length),r=0;r<e.length;r++)i[r]=(t=e[r],n=void 0,(n=t.constructor)===Array?t.slice():new n(t));return i}function rg(){return[1/0,-1/0]}Zp.type="list",Zp.hasItemOption=!0,Zp.getDimension=function(e){return"number"!=typeof e&&(isNaN(e)||this._dimensionInfos.hasOwnProperty(e))||(e=this.dimensions[e]),e},Zp.getDimensionInfo=function(e){return this._dimensionInfos[this.getDimension(e)]},Zp.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},Zp.mapDimension=function(e,t){var n=this._dimensionsSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return!0===t?(i||[]).slice():i&&i[t]},Zp.initData=function(e,t,n){(hc.isInstance(e)||Te.isArrayLike(e))&&(e=new Pp(e,this.dimensions.length)),this._rawData=e,this._storage={},this._indices=null,this._nameList=t||[],this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=Lp[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Lp.arrayRows,this._rawExtent={},this._initDataFromProvider(0,e.count()),e.pure&&(this.hasItemOption=!1)},Zp.getProvider=function(){return this._rawData},Zp.appendData=function(e){var t=this._rawData,n=this.count();t.appendData(e);var i=t.count();t.persistent||(i+=n),this._initDataFromProvider(n,i)},Zp.appendValues=function(e,t){for(var n=this._chunkSize,i=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()),i[v]||(i[v]=[]),Xp(i,this._dimensionInfos[v],n,u,l),this._chunkCount=i[v].length}for(var h=new Array(a),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/n),g=d%n,m=0;m<a;m++){var v=r[m],y=this._dimValueGetterArrayRows(e[f]||h,v,f,m);i[v][p][g]=y;var _=o[v];y<_[0]&&(_[0]=y),y>_[1]&&(_[1]=y)}t&&(this._nameList[d]=t[f])}this._rawCount=this._count=l,this._extent={},Kp(this)},Zp._initDataFromProvider=function(e,t){if(!(e>=t)){for(var n,i=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={},f=this._chunkCount,p=0;p<s;p++){h[b=o[p]]||(h[b]=rg());var g=l[b];0===g.otherDims.itemName&&(n=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),a[b]||(a[b]=[]),Xp(a,g,i,f,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/i),_=v%i,x=0;x<s;x++){var b,w=a[b=o[x]][y],T=this._dimValueGetter(m,b,v,x);w[_]=T;var S=h[b];T<S[0]&&(S[0]=T),T>S[1]&&(S[1]=T)}if(!r.pure){var O=u[v];if(m&&null==O)if(null!=m.name)u[v]=O=m.name;else if(null!=n){var M=o[n],D=a[M][y];if(D){O=D[_];var A=l[M].ordinalMeta;A&&A.categories.length&&(O=A.categories[O])}}var k=null==m?null:m.id;null==k&&null!=O&&(d[O]=d[O]||0,k=O,d[O]>0&&(k+="__ec__"+d[O]),d[O]++),null!=k&&(c[v]=k)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent={},Kp(this)}},Zp.count=function(){return this._count},Zp.getIndices=function(){var e=this._indices;if(e){var t=e.constructor,n=this._count;if(t===Array){r=new t(n);for(var i=0;i<n;i++)r[i]=e[i]}else r=new t(e.buffer,0,n)}else{var r=new(t=Up(this))(this.count());for(i=0;i<r.length;i++)r[i]=i}return r},Zp.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._storage;if(!n[e])return NaN;t=this.getRawIndex(t);var i=Math.floor(t/this._chunkSize),r=t%this._chunkSize;return n[e][i][r]},Zp.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._storage[e];if(!n)return NaN;var i=Math.floor(t/this._chunkSize),r=t%this._chunkSize;return n[i][r]},Zp._getFast=function(e,t){var n=Math.floor(t/this._chunkSize),i=t%this._chunkSize;return this._storage[e][n][i]},Zp.getValues=function(e,t){var n=[];Te.isArray(e)||(t=e,e=this.dimensions);for(var i=0,r=e.length;i<r;i++)n.push(this.get(e[i],t));return n},Zp.hasValue=function(e){for(var t=this._dimensionsSummary.dataDimsOnCoord,n=0,i=t.length;n<i;n++)if(isNaN(this.get(t[n],e)))return!1;return!0},Zp.getDataExtent=function(e){e=this.getDimension(e);var t=this._storage[e],n=rg();if(!t)return n;var i,r=this.count();if(!this._indices)return this._rawExtent[e].slice();if(i=this._extent[e])return i.slice();for(var a=(i=n)[0],o=i[1],s=0;s<r;s++){var l=this._getFast(e,this.getRawIndex(s));l<a&&(a=l),l>o&&(o=l)}return i=[a,o],this._extent[e]=i,i},Zp.getApproximateExtent=function(e){return e=this.getDimension(e),this._approximateExtent[e]||this.getDataExtent(e)},Zp.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},Zp.getCalculationInfo=function(e){return this._calculationInfo[e]},Zp.setCalculationInfo=function(e,t){Yp(e)?Te.extend(this._calculationInfo,e):this._calculationInfo[e]=t},Zp.getSum=function(e){var t=0;if(this._storage[e])for(var n=0,i=this.count();n<i;n++){var r=this.get(e,n);isNaN(r)||(t+=r)}return t},Zp.getMedian=function(e){var t=[];this.each(e,(function(e,n){isNaN(e)||t.push(e)}));var n=[].concat(t).sort((function(e,t){return e-t})),i=this.count();return 0===i?0:i%2==1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},Zp.rawIndexOf=function(e,t){var n=(e&&this._invertedIndicesMap[e])[t];return null==n||isNaN(n)?-1:n},Zp.indexOfName=function(e){for(var t=0,n=this.count();t<n;t++)if(this.getName(t)===e)return t;return-1},Zp.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var i=0,r=this._count-1;i<=r;){var a=(i+r)/2|0;if(t[a]<e)i=a+1;else{if(!(t[a]>e))return a;r=a-1}}return-1},Zp.indicesOfNearest=function(e,t,n){var i=[];if(!this._storage[e])return i;null==n&&(n=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<=n&&((c<r||c===r&&u>=0&&a<0)&&(r=c,a=u,o=0),u===a&&(i[o++]=s))}return i.length=o,i},Zp.getRawIndex=$p,Zp.getRawDataItem=function(e){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(e));for(var t=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];t.push(this.get(i,e))}return t},Zp.getName=function(e){var t=this.getRawIndex(e);return this._nameList[t]||Qp(this,this._nameDimIdx,t)||""},Zp.getId=function(e){return eg(this,this.getRawIndex(e))},Zp.each=function(e,t,n,i){if(this._count){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this;for(var r=(e=Te.map(tg(e),this.getDimension,this)).length,a=0;a<this.count();a++)switch(r){case 0:t.call(n,a);break;case 1:t.call(n,this.get(e[0],a),a);break;case 2:t.call(n,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(n,s)}}},Zp.filterSelf=function(e,t,n,i){if(this._count){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this,e=Te.map(tg(e),this.getDimension,this);for(var r=this.count(),a=new(Up(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(n,c);else if(1===s){var f=this._getFast(u,d);h=t.call(n,f,c)}else{for(var p=0;p<s;p++)o[p]=this._getFast(u,d);o[p]=c,h=t.apply(n,o)}h&&(a[l++]=d)}return l<r&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?Jp:$p,this}},Zp.selectRange=function(e){if(this._count){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);var i=t.length;if(i){var r=this.count(),a=new(Up(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===i){for(var d=this._storage[t[0]],f=0;f<this._chunkCount;f++)for(var p=d[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){((b=p[m])>=l&&b<=u||isNaN(b))&&(a[o++]=h),h++}c=!0}else if(2===i){d=this._storage[s];var v=this._storage[t[1]],y=e[t[1]][0],_=e[t[1]][1];for(f=0;f<this._chunkCount;f++){p=d[f];var x=v[f];for(g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){var b=p[m],w=x[m];(b>=l&&b<=u||isNaN(b))&&(w>=y&&w<=_||isNaN(w))&&(a[o++]=h),h++}}c=!0}}if(!c)if(1===i)for(m=0;m<r;m++){var T=this.getRawIndex(m);((b=this._getFast(s,T))>=l&&b<=u||isNaN(b))&&(a[o++]=T)}else for(m=0;m<r;m++){var S=!0;for(T=this.getRawIndex(m),f=0;f<i;f++){var O=t[f];((b=this._getFast(n,T))<e[O][0]||b>e[O][1])&&(S=!1)}S&&(a[o++]=this.getRawIndex(m))}return o<r&&(this._indices=a),this._count=o,this._extent={},this.getRawIndex=this._indices?Jp:$p,this}}},Zp.mapArray=function(e,t,n,i){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this;var r=[];return this.each(e,(function(){r.push(t&&t.apply(this,arguments))}),n),r},Zp.map=function(e,t,n,i){n=n||i||this;var r=ng(this,e=Te.map(tg(e),this.getDimension,this));r._indices=this._indices,r.getRawIndex=r._indices?Jp:$p;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 f=0;f<l;f++)c[f]=this.get(e[f],d);c[l]=d;var p=t&&t.apply(n,c);if(null!=p){"object"!=typeof p&&(o[0]=p,p=o);for(var g=this.getRawIndex(d),m=Math.floor(g/s),v=g%s,y=0;y<p.length;y++){var _=e[y],x=p[y],b=h[_],w=a[_];w&&(w[m][v]=x),x<b[0]&&(b[0]=x),x>b[1]&&(b[1]=x)}}}return r},Zp.downSample=function(e,t,n,i){for(var r=ng(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(Up(this))(u),f=0,p=0;p<u;p+=s){s>u-p&&(s=u-p,o.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/c),y=m%c;o[g]=l[v][y]}var _=n(o),x=this.getRawIndex(Math.min(p+i(o,_)||0,u-1)),b=x%c;l[Math.floor(x/c)][b]=_,_<h[0]&&(h[0]=_),_>h[1]&&(h[1]=_),d[f++]=x}return r._count=f,r._indices=d,r.getRawIndex=Jp,r},Zp.getItemModel=function(e){var t=this.hostModel;return new vu(this.getRawDataItem(e),t,t&&t.ecModel)},Zp.diff=function(e){var t=this;return new Ap(e?e.getIndices():[],this.getIndices(),(function(t){return eg(e,t)}),(function(e){return eg(t,e)}))},Zp.getVisual=function(e){var t=this._visual;return t&&t[e]},Zp.setVisual=function(e,t){if(Yp(e))for(var n in e)e.hasOwnProperty(n)&&this.setVisual(n,e[n]);else this._visual=this._visual||{},this._visual[e]=t},Zp.setLayout=function(e,t){if(Yp(e))for(var n in e)e.hasOwnProperty(n)&&this.setLayout(n,e[n]);else this._layout[e]=t},Zp.getLayout=function(e){return this._layout[e]},Zp.getItemLayout=function(e){return this._itemLayouts[e]},Zp.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?Te.extend(this._itemLayouts[e]||{},t):t},Zp.clearItemLayouts=function(){this._itemLayouts.length=0},Zp.getItemVisual=function(e,t,n){var i=this._itemVisuals[e],r=i&&i[t];return null!=r||n?r:this.getVisual(t)},Zp.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{},r=this.hasItemVisual;if(this._itemVisuals[e]=i,Yp(t))for(var a in t)t.hasOwnProperty(a)&&(i[a]=t[a],r[a]=!0);else i[t]=n,r[t]=!0},Zp.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var ag=function(e){e.seriesIndex=this.seriesIndex,e.dataIndex=this.dataIndex,e.dataType=this.dataType};Zp.setItemGraphicEl=function(e,t){var n=this.hostModel;t&&(t.dataIndex=e,t.dataType=this.dataType,t.seriesIndex=n&&n.seriesIndex,"group"===t.type&&t.traverse(ag,t)),this._graphicEls[e]=t},Zp.getItemGraphicEl=function(e){return this._graphicEls[e]},Zp.eachItemGraphicEl=function(e,t){Te.each(this._graphicEls,(function(n,i){n&&e&&e.call(t,n,i)}))},Zp.cloneShallow=function(e){if(!e){var t=Te.map(this.dimensions,this.getDimensionInfo,this);e=new qp(t,this.hostModel)}if(e._storage=this._storage,Vp(e,this),this._indices){var n=this._indices.constructor;e._indices=new n(this._indices)}else e._indices=null;return e.getRawIndex=e._indices?Jp:$p,e},Zp.wrapMethod=function(e,t){var n=this[e];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Te.slice(arguments)))})},Zp.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],Zp.CHANGABLE_METHODS=["filterSelf","selectRange"];var og=qp,sg=Te.createHashMap,lg=Te.each,ug=Te.isString,cg=Te.defaults,hg=Te.extend,dg=Te.isObject,fg=Te.clone,pg=xa.normalizeToArray,gg=Pc.guessOrdinal,mg=Pc.BE_ORDINAL,vg=Np.OTHER_DIMENSIONS;function yg(e,t,n){if(n||null!=t.get(e)){for(var i=0;null!=t.get(e+i);)i++;e+=i}return t.set(e,!0),e}var _g=function(e,t,n){hc.isInstance(t)||(t=hc.seriesDataToSource(t)),n=n||{},e=(e||[]).slice();for(var i=(n.dimsDef||[]).slice(),r=sg(),a=sg(),o=[],s=function(e,t,n,i){var r=Math.max(e.dimensionsDetectCount||1,t.length,n.length,i||0);return lg(t,(function(e){var t=e.dimsDef;t&&(r=Math.max(r,t.length))})),r}(t,e,i,n.dimCount),l=0;l<s;l++){var u=i[l]=hg({},dg(i[l])?i[l]:{name:i[l]}),c=u.name,h=o[l]=new Rp;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=n.encodeDef;!d&&n.encodeDefaulter&&(d=n.encodeDefaulter(t,s)),(d=sg(d)).each((function(e,t){if(1===(e=pg(e).slice()).length&&!ug(e[0])&&e[0]<0)d.set(t,!1);else{var n=d.set(t,[]);lg(e,(function(e,i){ug(e)&&(e=r.get(e)),null!=e&&e<s&&(n[i]=e,p(o[e],t,i))}))}}));var f=0;function p(e,t,n){null!=vg.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,a.set(t,!0))}lg(e,(function(e,t){var n,i,r;if(ug(e))n=e,e={};else{n=e.name;var a=e.ordinalMeta;e.ordinalMeta=null,(e=fg(e)).ordinalMeta=a,i=e.dimsDef,r=e.otherDims,e.name=e.coordDim=e.coordDimIndex=e.dimsDef=e.otherDims=null}if(!1!==(s=d.get(n))){var s;if(!(s=pg(s)).length)for(var l=0;l<(i&&i.length||1);l++){for(;f<o.length&&null!=o[f].coordDim;)f++;f<o.length&&s.push(f++)}lg(s,(function(t,a){var s=o[t];if(p(cg(s,e),n,a),null==s.name&&i){var l=i[a];!dg(l)&&(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}r&&cg(s.otherDims,r)}))}}));var g=n.generateCoord,m=n.generateCoordCount,v=null!=m;m=g?m||1:0;for(var y=g||"value",_=0;_<s;_++){null==(h=o[_]=o[_]||new Rp).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,_,h.name)!==mg.Must&&(!h.isExtraCoord||null==h.otherDims.itemName&&null==h.otherDims.seriesName)||(h.type="ordinal")}return o};var xg=function(e,t){return _g((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=Te.createHashMap,wg=Te.each;function Tg(e){this.coordSysName=e,this.coordSysDims=[],this.axisMap=bg(),this.categoryAxisMap=bg(),this.firstCategoryDimIndex=null}var Sg={cartesian2d:function(e,t,n,i){var r=e.getReferringComponents("xAxis")[0],a=e.getReferringComponents("yAxis")[0];t.coordSysDims=["x","y"],n.set("x",r),n.set("y",a),Og(r)&&(i.set("x",r),t.firstCategoryDimIndex=0),Og(a)&&(i.set("y",a),t.firstCategoryDimIndex,t.firstCategoryDimIndex=1)},singleAxis:function(e,t,n,i){var r=e.getReferringComponents("singleAxis")[0];t.coordSysDims=["single"],n.set("single",r),Og(r)&&(i.set("single",r),t.firstCategoryDimIndex=0)},polar:function(e,t,n,i){var r=e.getReferringComponents("polar")[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",o),Og(a)&&(i.set("radius",a),t.firstCategoryDimIndex=0),Og(o)&&(i.set("angle",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,i){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,i){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];n.set(l,s),Og(s)&&null==t.firstCategoryDimIndex&&(i.set(l,s),t.firstCategoryDimIndex=a)}))}};function Og(e){return"category"===e.get("type")}var Mg={getCoordSysInfoBySeries:function(e){var t=e.get("coordinateSystem"),n=new Tg(t),i=Sg[t];if(i)return i(e,n,n.axisMap,n.categoryAxisMap),n}},Dg=Te.each,Ag=Te.isString;function kg(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}var Cg={enableDataStack:function(e,t,n){var i,r,a,o,s=(n=n||{}).byIndex,l=n.stackedCoordDimension,u=!(!e||!e.get("stack"));if(Dg(t,(function(e,n){Ag(e)&&(t[n]=e={name:e}),u&&!e.isExtraCoord&&(s||i||!e.ordinalMeta||(i=e),r||"ordinal"===e.type||"time"===e.type||l&&l!==e.coordDim||(r=e))})),!r||s||i||(s=!0),r){a="__\0ecstackresult",o="__\0ecstackedover",i&&(i.createInvertedIndices=!0);var c=r.coordDim,h=r.type,d=0;Dg(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:i&&i.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:a}},isDimensionStacked:kg,getStackedDimension:function(e,t){return kg(e,t)?e.getCalculationInfo("stackResultDimension"):t}},Ig=tc.SOURCE_FORMAT_ORIGINAL,Eg=Np.getDimensionTypeByAxis,Ng=xa.getDataItemValue,Rg=Mg.getCoordSysInfoBySeries,Lg=Cg.enableDataStack,Pg=Pc.makeSeriesEncodeForAxisCoordSys;var zg=function(e,t,n){n=n||{},hc.isInstance(e)||(e=hc.seriesDataToSource(e));var i,r=t.get("coordinateSystem"),a=oh.get(r),o=Rg(t);o&&(i=Te.map(o.coordSysDims,(function(e){var t={name:e},n=o.axisMap.get(e);if(n){var i=n.get("type");t.type=Eg(i)}return t}))),i||(i=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=xg(e,{coordDimensions:i,generateCoord:n.generateCoord,encodeDefaulter:n.useEncodeDefaulter?Te.curry(Pg,i,t):null});o&&Te.each(u,(function(e,t){var n=e.coordDim,i=o.categoryAxisMap.get(n);i&&(null==s&&(s=t),e.ordinalMeta=i.getOrdinalMeta()),null!=e.otherDims.itemName&&(l=!0)})),l||null==s||(u[s].otherDims.itemName=0);var c=Lg(t,u),h=new og(u,t);h.setCalculationInfo(c);var d=null!=s&&function(e){if(e.sourceFormat===Ig){var t=function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[]);return null!=t&&!Te.isArray(Ng(t))}}(e)?function(e,t,n,i){return i===s?n:this.defaultDimValueGetter(e,t,n,i)}:null;return h.hasItemOption=!1,h.initData(e,null,d),h};function Yg(e){this._setting=e||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}Yg.prototype.parse=function(e){return e},Yg.prototype.getSetting=function(e){return this._setting[e]},Yg.prototype.contain=function(e){var t=this._extent;return e>=t[0]&&e<=t[1]},Yg.prototype.normalize=function(e){var t=this._extent;return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},Yg.prototype.scale=function(e){var t=this._extent;return e*(t[1]-t[0])+t[0]},Yg.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},Yg.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},Yg.prototype.getExtent=function(){return this._extent.slice()},Yg.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},Yg.prototype.isBlank=function(){return this._isBlank},Yg.prototype.setBlank=function(e){this._isBlank=e},Yg.prototype.getLabel=null,Ma.enableClassExtend(Yg),Ma.enableClassManagement(Yg,{registerWhenExtend:!0});var Hg=Yg,Fg=Te.createHashMap,Bg=Te.isObject,jg=Te.map;function Ug(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this._map}Ug.createByAxisModel=function(e){var t=e.option,n=t.data,i=n&&jg(n,Vg);return new Ug({categories:i,needCollect:!i,deduplication:!1!==t.dedplication})};var Wg=Ug.prototype;function Gg(e){return e._map||(e._map=Fg(e.categories))}function Vg(e){return Bg(e)&&null!=e.value?e.value:e+""}Wg.getOrdinal=function(e){return Gg(this).get(e)},Wg.parseAndCollect=function(e){var t,n=this._needCollect;if("string"!=typeof e&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var i=Gg(this);return null==(t=i.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,i.set(e,t)):t=NaN),t};var qg=Ug,Zg=Hg.prototype,Xg=Hg.extend({type:"ordinal",init:function(e,t){e&&!Te.isArray(e)||(e=new qg({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),Zg.contain.call(this,e)&&null!=this._ordinalMeta.categories[e]},normalize:function(e){return Zg.normalize.call(this,this.parse(e))},scale:function(e){return Math.round(Zg.scale.call(this,e))},getTicks:function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push(n),n++;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:Te.noop,niceExtent:Te.noop});Xg.create=function(){return new Xg};var Kg=Xg,Qg=Tu.round;function $g(e){return Tu.getPrecisionSafe(e)+2}function Jg(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function em(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),Jg(e,0,t),Jg(e,1,t),e[0]>e[1]&&(e[0]=e[1])}var tm={intervalScaleNiceTicks:function(e,t,n,i){var r={},a=e[1]-e[0],o=r.interval=Tu.nice(a/t,!0);null!=n&&o<n&&(o=r.interval=n),null!=i&&o>i&&(o=r.interval=i);var s=r.intervalPrecision=$g(o);return em(r.niceTickExtent=[Qg(Math.ceil(e[0]/o)*o,s),Qg(Math.floor(e[1]/o)*o,s)],e),r},getIntervalPrecision:$g,fixExtent:em},nm=Tu.round,im=Hg.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[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]),im.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,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,a=[];if(!t)return a;n[0]<i[0]&&(e?a.push(nm(i[0]-t,r)):a.push(n[0]));for(var o=i[0];o<=i[1]&&(a.push(o),(o=nm(o+t,r))!==a[a.length-1]);)if(a.length>1e4)return[];var s=a.length?a[a.length-1]:i[1];return n[1]>s&&(e?a.push(nm(s+t,r)):a.push(n[1])),a},getMinorTicks:function(e){for(var t=this.getTicks(!0),n=[],i=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=Tu.round(o+(s+1)*u);c>i[0]&&c<i[1]&&l.push(c),s++}n.push(l)}return n},getLabel:function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=Tu.getPrecisionSafe(e)||0:"auto"===n&&(n=this._intervalPrecision),e=nm(e,n,!0),Iu.addCommas(e)},niceTicks:function(e,t,n){e=e||5;var i=this._extent,r=i[1]-i[0];if(isFinite(r)){r<0&&(r=-r,i.reverse());var a=tm.intervalScaleNiceTicks(i,e,t,n);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 n=t[0];e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var i=t[1]-t[0];isFinite(i)||(t[0]=0,t[1]=1),this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var r=this._interval;e.fixMin||(t[0]=nm(Math.floor(t[0]/r)*r)),e.fixMax||(t[1]=nm(Math.ceil(t[1]/r)*r))}});im.create=function(){return new im};var rm=im,am=Tu.parsePercent,om=Cg.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 n=[];return t.eachSeriesByType(e,(function(e){gm(e)&&!mm(e)&&n.push(e)})),n}function hm(e){var t=function(e){var t={};Te.each(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=e.getData(),r=n.dim+"_"+n.index,a=i.mapDimension(n.dim),o=0,s=i.count();o<s;++o){var l=i.get(a,o);t[r]?t[r].push(l):t[r]=[l]}}));var n=[];for(var i in t)if(t.hasOwnProperty(i)){var r=t[i];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))}n[i]=a}}return n}(e),n=[];return Te.each(e,(function(e){var i,r=e.coordinateSystem.getBaseAxis(),a=r.getExtent();if("category"===r.type)i=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]);i=s?l/c*s:l}else{var h=e.getData();i=Math.abs(a[1]-a[0])/h.count()}var d=am(e.get("barWidth"),i),f=am(e.get("barMaxWidth"),i),p=am(e.get("barMinWidth")||1,i),g=e.get("barGap"),m=e.get("barCategoryGap");n.push({bandWidth:i,barWidth:d,barMaxWidth:f,barMinWidth:p,barGap:g,barCategoryGap:m,axisKey:um(r),stackId:lm(e)})})),dm(n)}function dm(e){var t={};Te.each(e,(function(e,n){var i=e.axisKey,r=e.bandWidth,a=t[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=a.stacks;t[i]=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 n={};return Te.each(t,(function(e,t){n[t]={};var i=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),Te.each(i,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){i=e.width;t&&(i=Math.min(i,t)),n&&(i=Math.max(i,n)),e.width=i,s-=i+o*i,l--}else{var i=u;t&&t<i&&(i=Math.min(t,s)),n&&n>i&&(i=n),i!==u&&(e.width=i,s-=i+o*i,l--)}})),u=(s-a)/(l+(l-1)*o),u=Math.max(u,0);var c,h=0;Te.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;Te.each(i,(function(e,i){n[t][i]=n[t][i]||{bandWidth:r,offset:d,width:e.width},d+=e.width*(1+o)}))})),n}function fm(e,t,n){if(e&&t){var i=e[um(t)];return null!=i&&null!=n&&(i=i[lm(n)]),i}}var pm={seriesType:"bar",plan:jd(),reset:function(e){if(gm(e)&&mm(e)){var t=e.getData(),n=e.coordinateSystem,i=n.grid.getRect(),r=n.getBaseAxis(),a=n.getOtherAxis(r),o=t.mapDimension(a.dim),s=t.mapDimension(r.dim),l=a.isHorizontal(),u=l?0:1,c=fm(hm([e]),r,e).width;return c>.5||(c=.5),{progress:function(e,t){var h,d=e.count,f=new sm(2*d),p=new sm(2*d),g=new sm(d),m=[],v=[],y=0,_=0;for(;null!=(h=e.next());)v[u]=t.get(o,h),v[1-u]=t.get(s,h),m=n.dataToPoint(v,null,m),p[y]=l?i.x+i.width:m[0],f[y++]=m[0],p[y]=l?m[1]:i.y+i.height,f[y++]=m[1],g[_++]=h;t.setLayout({largePoints:f,largeDataIndices:g,largeBackgroundPoints:p,barWidth:c,valueAxisStart:vm(r,a),backgroundStart:l?i.x:i.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,n){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}var ym={getLayoutOnAxis:function(e){var t=[],n=e.axis;if("category"===n.type){for(var i=n.getBandWidth(),r=0;r<e.count;r++)t.push(Te.defaults({bandWidth:i,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:fm,layout:function(e,t){var n=cm(e,t),i=hm(n),r={};Te.each(n,(function(e){var t=e.getData(),n=e.coordinateSystem,a=n.getBaseAxis(),o=lm(e),s=i[um(a)][o],l=s.offset,u=s.width,c=n.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),f=t.mapDimension(a.dim),p=om(t,d),g=c.isHorizontal(),m=vm(a,c),v=0,y=t.count();v<y;v++){var _,x,b,w,T,S=t.get(d,v),O=t.get(f,v),M=S>=0?"p":"n",D=m;if(p&&(r[o][O]||(r[o][O]={p:m,n:m}),D=r[o][O][M]),g)_=D,x=(T=n.dataToPoint([S,O]))[1]+l,b=T[0]-m,w=u,Math.abs(b)<h&&(b=(b<0?-1:1)*h),isNaN(b)||p&&(r[o][O][M]+=b);else _=(T=n.dataToPoint([O,S]))[0]+l,x=D,b=u,w=T[1]-m,Math.abs(w)<h&&(w=(w<=0?-1:1)*h),isNaN(w)||p&&(r[o][O][M]+=w);t.setItemLayout(v,{x:_,y:x,width:b,height:w})}}),this)},largeLayout:pm},_m=rm.prototype,xm=Math.ceil,bm=Math.floor,wm=864e5,Tm=rm.extend({type:"time",getLabel:function(e){var t=this._stepLvl,n=new Date(e);return Iu.formatTime(t[0],n,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 n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-wm}this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval;e.fixMin||(t[0]=Tu.round(bm(t[0]/i)*i)),e.fixMax||(t[1]=Tu.round(xm(t[1]/i)*i))},niceTicks:function(e,t,n){e=e||10;var i=this._extent,r=i[1]-i[0],a=r/e;null!=t&&a<t&&(a=t),null!=n&&a>n&&(a=n);var o=Sm.length,s=function(e,t,n,i){for(;n<i;){var r=n+i>>>1;e[r][1]<t?n=r+1:i=r}return n}(Sm,a,0,o),l=Sm[Math.min(s,o-1)],u=l[1];if("year"===l[0]){var c=r/u;u*=Tu.nice(c/e,!0)}var h=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,d=[Math.round(xm((i[0]-h)/u)*u+h),Math.round(bm((i[1]-h)/u)*u+h)];tm.fixExtent(d,i),this._stepLvl=l,this._interval=u,this._niceExtent=d},parse:function(e){return+Tu.parseDate(e)}});Te.each(["contain","normalize"],(function(e){Tm.prototype[e]=function(t){return _m[e].call(this,this.parse(t))}}));var Sm=[["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]];Tm.create=function(e){return new Tm({useUTC:e.ecModel.get("useUTC")})};var Om=Hg.prototype,Mm=rm.prototype,Dm=Tu.getPrecisionSafe,Am=Tu.round,km=Math.floor,Cm=Math.ceil,Im=Math.pow,Em=Math.log,Nm=Hg.extend({type:"log",base:10,$constructor:function(){Hg.apply(this,arguments),this._originalScale=new rm},getTicks:function(e){var t=this._originalScale,n=this._extent,i=t.getExtent();return Te.map(Mm.getTicks.call(this,e),(function(e){var r=Tu.round(Im(this.base,e));return r=e===n[0]&&t.__fixMin?Rm(r,i[0]):r,r=e===n[1]&&t.__fixMax?Rm(r,i[1]):r}),this)},getMinorTicks:Mm.getMinorTicks,getLabel:Mm.getLabel,scale:function(e){return e=Om.scale.call(this,e),Im(this.base,e)},setExtent:function(e,t){var n=this.base;e=Em(e)/Em(n),t=Em(t)/Em(n),Mm.setExtent.call(this,e,t)},getExtent:function(){var e=this.base,t=Om.getExtent.call(this);t[0]=Im(e,t[0]),t[1]=Im(e,t[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(t[0]=Rm(t[0],i[0])),n.__fixMax&&(t[1]=Rm(t[1],i[1])),t},unionExtent:function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=Em(e[0])/Em(t),e[1]=Em(e[1])/Em(t),Om.unionExtent.call(this,e)},unionExtentFromData:function(e,t){this.unionExtent(e.getApproximateExtent(t))},niceTicks:function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n===1/0||n<=0)){var i=Tu.quantity(n);for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[Tu.round(Cm(t[0]/i)*i),Tu.round(km(t[1]/i)*i)];this._interval=i,this._niceExtent=r}},niceExtent:function(e){Mm.niceExtent.call(this,e);var t=this._originalScale;t.__fixMin=e.fixMin,t.__fixMax=e.fixMax}});function Rm(e,t){return Am(e,Dm(t))}Te.each(["contain","normalize"],(function(e){Nm.prototype[e]=function(t){return t=Em(t)/Em(this.base),Om[e].call(this,t)}})),Nm.create=function(){return new Nm};var Lm=ym.prepareLayoutBarSeries,Pm=ym.makeColumnLayout,zm=ym.retrieveColumnLayout;function Ym(e,t){var n,i,r,a=e.type,o=t.getMin(),s=t.getMax(),l=e.getExtent();"ordinal"===a?n=t.getCategories().length:(i=t.get("boundaryGap"),Te.isArray(i)||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=Tu.parsePercent(i[0],1),i[1]=Tu.parsePercent(i[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?n?0:NaN:l[0]-i[0]*r),null==s&&(s="ordinal"===a?n?n-1:NaN:l[1]+i[1]*r),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN),e.setBlank(Te.eqNaN(o)||Te.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,f=Lm("bar",h);if(Te.each(f,(function(e){d|=e.getBaseAxis()===t.axis})),d){var p=Pm(f),g=function(e,t,n,i){var r=n.axis.getExtent(),a=r[1]-r[0],o=zm(i,n.axis);if(void 0===o)return{min:e,max:t};var s=1/0;Te.each(o,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;Te.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,p);o=g.min,s=g.max}}return{extent:[o,s],fixMin:u,fixMax:c}}function Hm(e){var t,n=e.getLabelModel().get("formatter"),i="category"===e.type?e.scale.getExtent()[0]:null;return"string"==typeof n?(t=n,n=function(n){return n=e.scale.getLabel(n),t.replace("{value}",null!=n?n:"")}):"function"==typeof n?function(t,r){return null!=i&&(r=t-i),n(Fm(e,t),r)}:function(t){return e.scale.getLabel(t)}}function Fm(e,t){return"category"===e.type?e.scale.getLabel(t):t}function Bm(e,t){var n=t*Math.PI/180,i=e.plain(),r=i.width,a=i.height,o=r*Math.cos(n)+a*Math.sin(n),s=r*Math.sin(n)+a*Math.cos(n);return new zn(i.x,i.y,o,s)}function jm(e){var t=e.get("interval");return null==t?"auto":t}var Um={getScaleExtent:Ym,niceScaleExtent:function(e,t){var n=Ym(e,t),i=n.extent,r=t.get("splitNumber");"log"===e.type&&(e.base=t.get("logBase"));var a=e.type;e.setExtent(i[0],i[1]),e.niceExtent({splitNumber:r,fixMin:n.fixMin,fixMax:n.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(Hg.getClass(t)||rm).create(e)}},ifAxisCrossZero:function(e){var t=e.scale.getExtent(),n=t[0],i=t[1];return!(n>0&&i>0||n<0&&i<0)},makeLabelFormatter:Hm,getAxisRawValue:Fm,estimateLabelUnionRect:function(e){var t=e.model,n=e.scale;if(t.get("axisLabel.show")&&!n.isBlank()){var i,r,a="category"===e.type,o=n.getExtent();r=a?n.count():(i=n.getTicks()).length;var s,l=e.getLabelModel(),u=Hm(e),c=1;r>40&&(c=Math.ceil(r/40));for(var h=0;h<r;h+=c){var d=u(i?i[h]:o[0]+h),f=Bm(l.getTextRect(d),l.get("rotate")||0);s?s.union(f):s=f}return s}},getOptionCategoryInterval:jm,shouldShowAllLabels:function(e){return"category"===e.type&&0===jm(e.getLabelModel())}},Wm={getMin:function(e){var t=this.option,n=e||null==t.rangeStart?t.min:t.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!Te.eqNaN(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(e){var t=this.option,n=e||null==t.rangeEnd?t.max:t.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!Te.eqNaN(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var e=this.option;return null==e.rangeStart&&null==e.rangeEnd&&!e.scale},getCoordSysModel:Te.noop,setRange:function(e,t){this.option.rangeStart=e,this.option.rangeEnd=t},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Gm=Bi.calculateTextPosition,Vm=ru.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,r=t.width/2,a=t.height/2;e.moveTo(n,i-a),e.lineTo(n+r,i+a),e.lineTo(n-r,i+a),e.closePath()}}),qm=ru.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,r=t.width/2,a=t.height/2;e.moveTo(n,i-a),e.lineTo(n+r,i),e.lineTo(n,i+a),e.lineTo(n-r,i),e.closePath()}}),Zm=ru.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,i=t.y,r=t.width/5*3,a=Math.max(r,t.height),o=r/2,s=o*o/(a-o),l=i-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,h=Math.sin(u),d=Math.cos(u),f=.6*o,p=.7*o;e.moveTo(n-c,l+s),e.arc(n,l,o,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-h*f,l+s+d*f,n,i-p,n,i),e.bezierCurveTo(n,i-p,n-c+h*f,l+s+d*f,n-c,l+s),e.closePath()}}),Xm=ru.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,i=t.width,r=t.x,a=t.y,o=i/3*2;e.moveTo(r,a),e.lineTo(r+o,a+n),e.lineTo(r,a+n/4*3),e.lineTo(r-o,a+n),e.lineTo(r,a),e.closePath()}}),Km={line:ru.Line,rect:ru.Rect,roundRect:ru.Rect,square:ru.Rect,circle:ru.Circle,diamond:qm,pin:Zm,arrow:Xm,triangle:Vm},Qm={line:function(e,t,n,i,r){r.x1=e,r.y1=t+i/2,r.x2=e+n,r.y2=t+i/2},rect:function(e,t,n,i,r){r.x=e,r.y=t,r.width=n,r.height=i},roundRect:function(e,t,n,i,r){r.x=e,r.y=t,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(e,t,n,i,r){var a=Math.min(n,i);r.x=e,r.y=t,r.width=a,r.height=a},circle:function(e,t,n,i,r){r.cx=e+n/2,r.cy=t+i/2,r.r=Math.min(n,i)/2},diamond:function(e,t,n,i,r){r.cx=e+n/2,r.cy=t+i/2,r.width=n,r.height=i},pin:function(e,t,n,i,r){r.x=e+n/2,r.y=t+i/2,r.width=n,r.height=i},arrow:function(e,t,n,i,r){r.x=e+n/2,r.y=t+i/2,r.width=n,r.height=i},triangle:function(e,t,n,i,r){r.cx=e+n/2,r.cy=t+i/2,r.width=n,r.height=i}},$m={};Te.each(Km,(function(e,t){$m[t]=new e}));var Jm=ru.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var i=Gm(e,t,n),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===t.textPosition&&(i.y=n.y+.4*n.height),i},buildPath:function(e,t,n){var i=t.symbolType;if("none"!==i){var r=$m[i];r||(r=$m[i="rect"]),Qm[i](t.x,t.y,t.width,t.height,r.shape),r.buildPath(e,r.shape,n)}}});function ev(e,t){if("image"!==this.type){var n=this.style,i=this.shape;i&&"line"===i.symbolType?n.stroke=e:this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff"):(n.fill&&(n.fill=e),n.stroke&&(n.stroke=e)),this.dirty(!1)}}var tv={createSymbol:function(e,t,n,i,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 zn(t,n,i,r),o?"center":"cover"):0===e.indexOf("path://")?ru.makePath(e.slice(7),{},new zn(t,n,i,r),o?"center":"cover"):new Jm({shape:{symbolType:e,x:t,y:n,width:i,height:r}})).__isEmptyBrush=l,s.setColor=ev,s.setColor(a),s}};var nv={getLayoutRect:ju.getLayoutRect,completeDimensions:_g,createDimensions:xg,createSymbol:tv.createSymbol,createList:function(e){return zg(e.getSource(),e)},dataStack:{isDimensionStacked:Cg.isDimensionStacked,enableDataStack:Cg.enableDataStack,getStackedDimension:Cg.getStackedDimension},createScale:function(e,t){var n=t;vu.isInstance(t)||(n=new vu(t),Te.mixin(n,Wm));var i=Um.createScaleByModel(n);return i.setExtent(e[0],e[1]),Um.niceScaleExtent(i,n),i},mixinAxisModelCommonMethods:function(e){Te.mixin(e,Wm)}};function iv(e,t){return Math.abs(e-t)<1e-8}var rv={contain:function(e,t,n){var i=0,r=e[0];if(!r)return!1;for(var a=1;a<e.length;a++){var o=e[a];i+=Do(r[0],r[1],o[0],o[1],t,n),r=o}var s=e[0];return iv(r[0],s[0])&&iv(r[1],s[1])||(i+=Do(r[0],r[1],s[0],s[1],t,n)),0!==i}};function av(e,t,n){if(this.name=e,this.geometries=t,n)n=[n[0],n[1]];else{var i=this.getBoundingRect();n=[i.x+i.width/2,i.y+i.height/2]}this.center=n}av.prototype={constructor:av,properties:null,getBoundingRect:function(){var e=this._rect;if(e)return e;for(var t=Number.MAX_VALUE,n=[t,t],i=[-t,-t],r=[],a=[],o=this.geometries,s=0;s<o.length;s++)if("polygon"===o[s].type){var l=o[s].exterior;to.fromPoints(l,r,a),ke.min(n,n,r),ke.max(i,i,a)}return 0===s&&(n[0]=n[1]=i[0]=i[1]=0),this._rect=new zn(n[0],n[1],i[0]-n[0],i[1]-n[1])},contain:function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var i=0,r=n.length;i<r;i++)if("polygon"===n[i].type){var a=n[i].exterior,o=n[i].interiors;if(rv.contain(a,e[0],e[1])){for(var s=0;s<(o?o.length:0);s++)if(rv.contain(o[s]))continue e;return!0}}return!1},transformTo:function(e,t,n,i){var r=this.getBoundingRect(),a=r.width/r.height;n?i||(i=n/a):n=a*i;for(var o=new zn(e,t,n,i),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++)ke.applyTransform(c[d],c[d],s);for(var f=0;f<(h?h.length:0);f++)for(d=0;d<h[f].length;d++)ke.applyTransform(h[f][d],h[f][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 av(e,this.geometries,this.center);return t._rect=this._rect,t.transformTo=null,t}};var ov=av;function sv(e,t,n){for(var i=[],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,i.push([s/n,l/n])}return i}var lv=function(e,t){return function(e){if(!e.UTF8Encoding)return e;var t=e.UTF8Scale;null==t&&(t=1024);for(var n=e.features,i=0;i<n.length;i++)for(var r=n[i].geometry,a=r.coordinates,o=r.encodeOffsets,s=0;s<a.length;s++){var l=a[s];if("Polygon"===r.type)a[s]=sv(l,o[s],t);else if("MultiPolygon"===r.type)for(var u=0;u<l.length;u++){var c=l[u];l[u]=sv(c,o[s][u],t)}}e.UTF8Encoding=!1}(e),Te.map(Te.filter(e.features,(function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0})),(function(e){var n=e.properties,i=e.geometry,r=i.coordinates,a=[];"Polygon"===i.type&&a.push({type:"polygon",exterior:r[0],interiors:r.slice(1)}),"MultiPolygon"===i.type&&Te.each(r,(function(e){e[0]&&a.push({type:"polygon",exterior:e[0],interiors:e.slice(1)})}));var o=new ov(n[t||"name"],a,n.cp);return o.properties=n,o}))},uv=xa.makeInner,cv=Um.makeLabelFormatter,hv=Um.getOptionCategoryInterval,dv=Um.shouldShowAllLabels,fv=uv();function pv(e,t){var n,i,r=gv(e,"labels"),a=hv(t),o=mv(r,a);return o||(Te.isFunction(a)?n=_v(e,a):(i="auto"===a?function(e){var t=fv(e).autoInterval;return null!=t?t:fv(e).autoInterval=e.calculateCategoryInterval()}(e):a,n=yv(e,i)),vv(r,a,{labels:n,labelCategoryInterval:i}))}function gv(e,t){return fv(e)[t]||(fv(e)[t]=[])}function mv(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function vv(e,t,n){return e.push({key:t,value:n}),n}function yv(e,t,n){var i=cv(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=dv(e),d=o.get("showMinLabel")||h,f=o.get("showMaxLabel")||h;d&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);function g(e){s.push(n?e:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:e})}return f&&p-l!==a[1]&&g(a[1]),s}function _v(e,t,n){var i=e.scale,r=cv(e),a=[];return Te.each(i.getTicks(),(function(e){var o=i.getLabel(e);t(e,o)&&a.push(n?e:{formattedLabel:r(e),rawLabel:o,tickValue:e})})),a}var xv={createAxisLabels:function(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=pv(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=cv(e);return{labels:Te.map(t,(function(t,i){return{formattedLabel:n(t,i),rawLabel:e.scale.getLabel(t),tickValue:t}}))}}(e)},createAxisTicks:function(e,t){return"category"===e.type?function(e,t){var n,i,r=gv(e,"ticks"),a=hv(t),o=mv(r,a);if(o)return o;t.get("show")&&!e.scale.isBlank()||(n=[]);if(Te.isFunction(a))n=_v(e,a,!0);else if("auto"===a){var s=pv(e,e.getLabelModel());i=s.labelCategoryInterval,n=Te.map(s.labels,(function(e){return e.tickValue}))}else n=yv(e,i=a,!0);return vv(r,a,{ticks:n,tickCategoryInterval:i})}(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),n=cv(e),i=(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(i)),h=Math.abs(u*Math.sin(i)),d=0,f=0;l<=a[1];l+=s){var p,g,m=Bi.getBoundingRect(n(l),t.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var v=d/c,y=f/h;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(v,y))),x=fv(e.model),b=e.getExtent(),w=x.lastAutoInterval,T=x.lastTickCount;return null!=w&&null!=T&&Math.abs(w-_)<=1&&Math.abs(T-o)<=1&&w>_&&x.axisExtend0===b[0]&&x.axisExtend1===b[1]?_=w:(x.lastTickCount=o,x.lastAutoInterval=_,x.axisExtend0=b[0],x.axisExtend1=b[1]),_}},bv=Te.each,wv=Te.map,Tv=Tu.linearMap,Sv=Tu.getPixelPrecision,Ov=Tu.round,Mv=xv.createAxisTicks,Dv=xv.createAxisLabels,Av=xv.calculateCategoryInterval,kv=[0,1],Cv=function(e,t,n){this.dim=e,this.scale=t,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};function Iv(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}Cv.prototype={constructor:Cv,contain:function(e){var t=this._extent,n=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return e>=n&&e<=i},containData:function(e){return this.scale.contain(e)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(e){return Sv(e||this.scale.getExtent(),this._extent)},setExtent:function(e,t){var n=this._extent;n[0]=e,n[1]=t},dataToCoord:function(e,t){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&"ordinal"===i.type&&Iv(n=n.slice(),i.count()),Tv(e,kv,n,t)},coordToData:function(e,t){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&Iv(n=n.slice(),i.count());var r=Tv(e,n,kv,t);return this.scale.scale(r)},pointToData:function(e,t){},getTicksCoords:function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=Mv(this,t).ticks,i=wv(n,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this);return function(e,t,n,i){var r=t.length;if(!e.onBand||n||!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;bv(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])&&(i?t[0].coord=s[0]:t.shift());i&&d(s[0],t[0].coord)&&t.unshift({coord:s[0]});d(s[1],a.coord)&&(i?a.coord=s[1]:t.pop());i&&d(a.coord,s[1])&&t.push({coord:s[1]});function d(e,t){return e=Ov(e),t=Ov(t),h?e>t:e<t}}(this,i,t.get("alignWithLabel"),e.clamp),i},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 wv(t,(function(e){return wv(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},getViewLabels:function(){return Dv(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(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return Av(this)}};var Ev=Cv,Nv=da,Rv=gt,Lv=ke,Pv=Qt,zv=Tu,Yv=Iu,Hv=af.throttle,Fv=nv,Bv=lv,jv=og,Uv=vu,Wv=Ev,Gv=J,Vv=lv,qv={};Te.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(e){qv[e]=Te[e]}));var Zv={};Te.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){Zv[e]=ru[e]}));var Xv={zrender:Nv,matrix:Rv,vector:Lv,color:Pv,number:zv,format:Yv,throttle:Hv,helper:Fv,parseGeoJSON:Bv,List:jv,Model:Uv,Axis:Wv,env:Gv,parseGeoJson:Vv,util:qv,graphic:Zv},Kv=X((function(e,t){var n=af.throttle,i=Te.assert,r=Te.each,a=Te.isFunction,o=Te.isObject,s=Zu.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(n,i,r){t||!this._disposed?(n=n&&n.toLowerCase(),Pe.prototype[e].call(this,n,i,r)):this.id}}function d(){Pe.call(this)}function f(e,t,i){i=i||{},"string"==typeof t&&(t=z[t]),this.id,this.group,this._dom=e;var r=this._zr=da.init(e,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=n(Te.bind(r.flush,r),17),(t=Te.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,Te.extend(new ih(a),{getCoordinateSystems:Te.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}Gn(P,l),Gn(N,l),this._scheduler=new Ff(this,s,N,P),Pe.call(this,this._ecEventProcessor=new C),this._messageCenter=new d,this._initEvents(),this.resize=Te.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),Te.setAsPrimitive(this)}d.prototype.on=h("on",!0),d.prototype.off=h("off",!0),d.prototype.one=h("one",!0),Te.mixin(d,Pe);var p=f.prototype;function g(e,t,n){if(this._disposed)this.id;else{var i,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!=(i=s[e](r,t,n)))return i}}}p._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 n=1,i=this._model,r=this._api;e.unfinished=!1;do{var a=+new Date;e.performSeriesTasks(i),e.performDataProcessorTasks(i),_(this,i),e.performVisualTasks(i),M(this,this._model,r,"remain"),n-=+new Date-a}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},p.getDom=function(){return this._dom},p.getZr=function(){return this._zr},p.setOption=function(e,t,n){if(this._disposed)this.id;else{var i;if(o(t)&&(n=t.lazyUpdate,i=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),n?(this.__optionUpdated={silent:i},this[u]=!1):(v(this),m.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this[u]=!1,b.call(this,i),w.call(this,i))}},p.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},p.getModel=function(){return this._model},p.getOption=function(){return this._model&&this._model.getOption()},p.getWidth=function(){return this._zr.getWidth()},p.getHeight=function(){return this._zr.getHeight()},p.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},p.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)},p.getSvgDataURL=function(){if(J.svgSupported){var e=this._zr,t=e.storage.getDisplayList();return Te.each(t,(function(e){e.stopAnimation(!0)})),e.painter.toDataURL()}},p.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,i=[],a=this;r(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=a._componentsMap[e.__viewId];t.group.ignore||(i.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(i,(function(e){e.group.ignore=!1})),o}this.id},p.getConnectedDataURL=function(e){if(this._disposed)this.id;else if(J.canvasSupported){var t="svg"===e.type,n=this.group,i=Math.min,a=Math.max;if(F[n]){var o=1/0,s=1/0,l=-1/0,u=-1/0,c=[],h=e&&e.pixelRatio||1;Te.each(H,(function(r,h){if(r.group===n){var d=t?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(Te.clone(e)),f=r.getDom().getBoundingClientRect();o=i(f.left,o),s=i(f.top,s),l=a(f.right,l),u=a(f.bottom,u),c.push({dom:d,left:f.left,top:f.top})}}));var d=(l*=h)-(o*=h),f=(u*=h)-(s*=h),p=Te.createCanvas(),g=da.init(p,{renderer:t?"svg":"canvas"});if(g.resize({width:d,height:f}),t){var m="";return r(c,(function(e){var t=e.left-o,n=e.top-s;m+='<g transform="translate('+t+","+n+')">'+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:f},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(),p.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}},p.convertToPixel=Te.curry(g,"convertToPixel"),p.convertFromPixel=Te.curry(g,"convertFromPixel"),p.containPixel=function(e,t){if(!this._disposed){var n,i=this._model;return e=xa.parseFinder(i,e),Te.each(e,(function(e,i){i.indexOf("Models")>=0&&Te.each(e,(function(e){var r=e.coordinateSystem;if(r&&r.containPoint)n|=!!r.containPoint(t);else if("seriesModels"===i){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(n|=a.containPoint(t,e))}}),this)}),this),!!n}this.id},p.getVisual=function(e,t){var n=this._model,i=(e=xa.parseFinder(n,e,{defaultMainType:"series"})).seriesModel.getData(),r=e.hasOwnProperty("dataIndexInside")?e.dataIndexInside:e.hasOwnProperty("dataIndex")?i.indexOfRawIndex(e.dataIndex):null;return null!=r?i.getItemVisual(r,t):i.getVisual(t)},p.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},p.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,n=this._api,i=this._zr,r=this._coordSysMgr,a=this._scheduler;if(t){a.restoreData(t,e),a.performSeriesTasks(t),r.create(t,n),a.performDataProcessorTasks(t,e),_(this,t),r.update(t,n),S(t),a.performVisualTasks(t,e),O(this,t,n,e);var o=t.get("backgroundColor")||"transparent";if(J.canvasSupported)i.setBackgroundColor(o);else{var s=Qt.parse(o);o=Qt.stringify(s,"rgb"),0===s[3]&&(o="transparent")}D(t,n)}},updateTransform:function(e){var t=this._model,n=this,i=this._api;if(t){var r=[];t.eachComponent((function(a,o){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,t,i,e);l&&l.update&&r.push(s)}else r.push(s)}));var a=Te.createHashMap();t.eachSeries((function(r){var o=n._chartsMap[r.__viewId];if(o.updateTransform){var s=o.updateTransform(r,t,i,e);s&&s.update&&a.set(r.uid,1)}else a.set(r.uid,1)})),S(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0,dirtyMap:a}),M(n,t,i,e,a),D(t,this._api)}},updateView:function(e){var t=this._model;t&&(ef.markUpdateMethod(e,"updateView"),S(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0}),O(this,this._model,this._api,e),D(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,n=e._scheduler;n.restorePipelines(t),n.prepareStageTasks(),T(e,"component",t,n),T(e,"chart",t,n),n.plan()}function y(e,t,n,i,a){var o=e._model;if(i){var s={};s[i+"Id"]=n[i+"Id"],s[i+"Index"]=n[i+"Index"],s[i+"Name"]=n[i+"Name"];var l={mainType:i,query:s};a&&(l.subType=a);var u=n.excludeSeriesId;null!=u&&(u=Te.createHashMap(xa.normalizeToArray(u))),o&&o.eachComponent(l,(function(t){u&&null!=u.get(t.id)||c(e["series"===i?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else r(e._componentsViews.concat(e._chartsViews),c);function c(i){i&&i.__alive&&i[t]&&i[t](i.__model,o,e._api,n)}}function _(e,t){var n=e._chartsMap,i=e._scheduler;t.eachSeries((function(e){i.updateStreamModes(e,n[e.__viewId])}))}function x(e,t){var n=e.type,i=e.escapeConnect,a=I[n],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=Te.map(e.batch,(function(t){return(t=Te.defaults(Te.extend({},t),e)).batch=null,t})));var f,p=[],g="highlight"===n||"downplay"===n;r(h,(function(e){(f=(f=a.action(e,this._model,this._api))||Te.extend({},e)).type=o.event||f.type,p.push(f),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)),f=d?{type:o.event||n,escapeConnect:i,batch:p}:p[0],this[u]=!1,!t&&this._messageCenter.trigger(f.type,f)}function b(e){for(var t=this._pendingActions;t.length;){var n=t.shift();x.call(this,n,e)}}function w(e){!e&&this.trigger("updated")}function T(e,t,n,i){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):ef.getClass(h.sub))).init(n,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&&i.prepareView(c,e,n,u)}r?n.eachComponent((function(e,t){"series"!==e&&h(t)})):n.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(n,u),a.splice(c,1),delete o[d.__id],d.__id=d.group.__ecComponentInfo=null)}}function S(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function O(e,t,n,i){!function(e,t,n,i,a){r(a||e._componentsViews,(function(e){var r=e.__model;e.render(r,t,n,i),k(r,e)}))}(e,t,n,i),r(e._chartsViews,(function(e){e.__alive=!1})),M(e,t,n,i),r(e._chartsViews,(function(e){e.__alive||e.remove(t,n)}))}function M(e,t,n,i,r){var a,o=e._scheduler;t.eachSeries((function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var s=n.renderTask;o.updatePayload(s,i),r&&r.get(t.uid)&&s.dirty(),a|=s.perform(o.getPerformArgs(s)),n.group.silent=!!t.get("silent"),k(t,n),function(e,t){var n=e.get("blendMode")||null;t.group.traverse((function(e){e.isGroup||e.style.blend!==n&&e.setStyle("blend",n),e.eachPendingDisplayable&&e.eachPendingDisplayable((function(e){e.setStyle("blend",n)}))}))}(t,n)})),o.unfinished|=a,function(e,t){var n=e._zr.storage,i=0;n.traverse((function(e){i++})),i>t.get("hoverLayerThreshold")&&!J.node&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.group.traverse((function(e){e.useHoverLayer=!0}))}}))}(e,t),cf(e._zr.dom,t)}function D(e,t){r(L,(function(n){n(e,t)}))}p.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 n=t.resetOption("media"),i=e&&e.silent;this[u]=!0,n&&v(this),m.update.call(this),this[u]=!1,b.call(this,i),w.call(this,i)}}},p.showLoading=function(e,t){if(this._disposed)this.id;else if(o(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),Y[e]){var n=Y[e](this._api,t),i=this._zr;this._loadingFX=n,i.add(n)}},p.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},p.makeActionFromEvent=function(e){var t=Te.extend({},e);return t.type=E[e.type],t},p.dispatchAction=function(e,t){this._disposed?this.id:(o(t)||(t={silent:!!t}),I[e.type]&&this._model&&(this[u]?this._pendingActions.push(e):(x.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))))},p.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0}},p.on=h("on",!1),p.off=h("off",!1),p.one=h("one",!1);var A=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function k(e,t){var n=e.get("z"),i=e.get("zlevel");t.group.traverse((function(e){"group"!==e.type&&(null!=n&&(e.z=n),null!=i&&(e.zlevel=i))}))}function C(){this.eventInfo}p._initEvents=function(){r(A,(function(e){var t=function(t){var n,i=this.getModel(),r=t.target;if("globalout"===e)n={};else if(r&&null!=r.dataIndex){var a=r.dataModel||i.getSeriesByIndex(r.seriesIndex);n=a&&a.getDataParams(r.dataIndex,r.dataType,r)||{}}else r&&r.eventData&&(n=Te.extend({},r.eventData));if(n){var o=n.componentType,s=n.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",s=n.seriesIndex);var l=o&&null!=s&&i.getComponent(o,s),u=l&&this["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=t,n.type=e,this._ecEventProcessor.eventInfo={targetEl:r,packedEvent:n,model:l,view:u},this.trigger(e,n)}};t.zrEventfulCallAtLast=!0,this._zr.on(e,t,this)}),this),r(E,(function(e,t){this._messageCenter.on(t,(function(e){this.trigger(t,e)}),this)}),this)},p.isDisposed=function(){return this._disposed},p.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},p.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,xa.setAttribute(this.getDom(),U,"");var e=this._api,t=this._model;r(this._componentsViews,(function(n){n.dispose(t,e)})),r(this._chartsViews,(function(n){n.dispose(t,e)})),this._zr.dispose(),delete H[this.id]}},Te.mixin(f,Pe),C.prototype={constructor:C,normalizeQuery:function(e){var t={},n={},i={};if(Te.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};Te.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)&&(n[r]=e,s=!0),s||(i[r]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:i}},filter:function(e,t,n){var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,a=i.packedEvent,o=i.model,s=i.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,n,i){return null==e[n]||t[i||n]===e[n]}},afterTrigger:function(){this.eventInfo=null}};var I={},E={},N=[],R=[],L=[],P=[],z={},Y={},H={},F={},B=new Date-0,j=new Date-0,U="_echarts_instance_";function W(e){F[e]=!1}var G=W;function V(e){return H[xa.getAttribute(e,U)]}function q(e,t){z[e]=t}function Z(e){R.push(e)}function X(e,t){$(N,e,t,1e3)}function K(e,t,n){"function"==typeof t&&(n=t,t="");var r=o(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,i(c.test(r)&&c.test(t)),I[r]||(I[r]={action:n,actionInfo:e}),E[t]=r}function Q(e,t){$(P,e,t,3e3,"visual")}function $(e,t,n,i,r){(a(t)||o(t))&&(n=t,t=i);var s=Ff.wrapStageHandler(n,r);return s.__prio=t,s.__raw=n,e.push(s),s}function ee(e,t){Y[e]=t}Q(2e3,sf),Z(Rh),X(900,Yh),ee("default",df),K({type:"highlight",event:"highlight",update:"highlight"},Te.noop),K({type:"downplay",event:"downplay",update:"downplay"},Te.noop),q("light",jf),q("dark",Gf);t.version="4.8.0",t.dependencies={zrender:"4.3.1"},t.PRIORITY=l,t.init=function(e,t,n){var i=V(e);if(i)return i;var a=new f(e,t,n);return a.id="ec_"+B++,H[a.id]=a,xa.setAttribute(e,U,a.id),function(e){var t="__connectUpdateStatus";function n(e,n){for(var i=0;i<e.length;i++){e[i][t]=n}}r(E,(function(i,a){e._messageCenter.on(a,(function(i){if(F[e.group]&&0!==e[t]){if(i&&i.escapeConnect)return;var a=e.makeActionFromEvent(i),o=[];r(H,(function(t){t!==e&&t.group===e.group&&o.push(t)})),n(o,0),r(o,(function(e){1!==e[t]&&e.dispatchAction(a)})),n(o,2)}}))}))}(a),a},t.connect=function(e){if(Te.isArray(e)){var t=e;e=null,r(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+j++,r(t,(function(t){t.group=e}))}return F[e]=!0,e},t.disConnect=W,t.disconnect=G,t.dispose=function(e){"string"==typeof e?e=H[e]:e instanceof f||(e=V(e)),e instanceof f&&!e.isDisposed()&&e.dispose()},t.getInstanceByDom=V,t.getInstanceById=function(e){return H[e]},t.registerTheme=q,t.registerPreprocessor=Z,t.registerProcessor=X,t.registerPostUpdate=function(e){L.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){$(P,e,t,1e3,"layout")},t.registerVisual=Q,t.registerLoading=ee,t.extendComponentModel=function(e){return Zu.extend(e)},t.extendComponentView=function(e){return Fd.extend(e)},t.extendSeriesModel=function(e){return zd.extend(e)},t.extendChartView=function(e){return ef.extend(e)},t.setCanvasCreator=function(e){Te.$override("createCanvas",e)},t.registerMap=function(e,t,n){Sp.registerMap(e,t,n)},t.getMap=function(e){var t=Sp.retrieveMap(e);return t&&t[0]&&{geoJson:t[0].geoJSON,specialAreas:t[0].specialAreas}},t.dataTool={},function(){for(var e in Xv)Xv.hasOwnProperty(e)&&(t[e]=Xv[e])}()})),Qv=(Kv.version,Kv.dependencies,Kv.PRIORITY,Kv.init,Kv.connect,Kv.disConnect,Kv.disconnect,Kv.dispose,Kv.getInstanceByDom,Kv.getInstanceById,Kv.registerTheme,Kv.registerPreprocessor,Kv.registerProcessor,Kv.registerPostUpdate,Kv.registerAction,Kv.registerCoordinateSystem,Kv.getCoordinateSystemDimensions,Kv.registerLayout,Kv.registerVisual,Kv.registerLoading,Kv.extendComponentModel,Kv.extendComponentView,Kv.extendSeriesModel,Kv.extendChartView,Kv.setCanvasCreator,Kv.registerMap,Kv.getMap,Kv.dataTool,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}}),ad.retrieveRawValue);var $v={getDefaultLabel:function(e,t){var n=e.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return Qv(e,t,n[0]);if(i){for(var r=[],a=0;a<n.length;a++){var o=Qv(e,t,n[a]);r.push(o)}return r.join(" ")}}},Jv=tv.createSymbol,ey=Tu.parsePercent,ty=$v.getDefaultLabel;function ny(e,t,n){ru.Group.call(this),this.updateData(e,t,n)}var iy=ny.prototype,ry=ny.getSymbolSize=function(e,t){var n=e.getItemVisual(t,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};function ay(e){return[e[0]/2,e[1]/2]}function oy(e,t){this.parent.drift(e,t)}iy._createSymbol=function(e,t,n,i,r){this.removeAll();var a=t.getItemVisual(n,"color"),o=Jv(e,-1,-1,2,2,a,r);o.attr({z2:100,culling:!0,scale:ay(i)}),o.drift=oy,this._symbolType=e,this.add(o)},iy.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(e)},iy.getSymbolPath=function(){return this.childAt(0)},iy.getScale=function(){return this.childAt(0).scale},iy.highlight=function(){this.childAt(0).trigger("emphasis")},iy.downplay=function(){this.childAt(0).trigger("normal")},iy.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},iy.setDraggable=function(e){var t=this.childAt(0);t.draggable=e,t.cursor=e?"move":t.cursor},iy.updateData=function(e,t,n){this.silent=!1;var i=e.getItemVisual(t,"symbol")||"circle",r=e.hostModel,a=ry(e,t),o=i!==this._symbolType;if(o){var s=e.getItemVisual(t,"symbolKeepAspect");this._createSymbol(i,e,t,a,s)}else{(l=this.childAt(0)).silent=!1,ru.updateProps(l,{scale:ay(a)},r,t)}if(this._updateCommon(e,t,a,n),o){var l=this.childAt(0),u=n&&n.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 sy=["itemStyle"],ly=["emphasis","itemStyle"],uy=["label"],cy=["emphasis","label"];function hy(e,t){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===t){var n=this.__symbolOriginalScale,i=n[1]/n[0],r={scale:[Math.max(1.1*n[0],n[0]+3),Math.max(1.1*n[1],n[1]+3*i)]};this.animateTo(r,400,"elasticOut")}else"normal"===t&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}iy._updateCommon=function(e,t,n,i){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=i&&i.itemStyle,l=i&&i.hoverItemStyle,u=i&&i.symbolOffset,c=i&&i.labelModel,h=i&&i.hoverLabelModel,d=i&&i.hoverAnimation,f=i&&i.cursorStyle;if(!i||e.hasItemOption){var p=i&&i.itemModel?i.itemModel:e.getItemModel(t);s=p.getModel(sy).getItemStyle(["color"]),l=p.getModel(ly).getItemStyle(),u=p.getShallow("symbolOffset"),c=p.getModel(uy),h=p.getModel(cy),d=p.getShallow("hoverAnimation"),f=p.getShallow("cursor")}else l=Te.extend({},l);var g=r.style,m=e.getItemVisual(t,"symbolRotate");r.attr("rotation",(m||0)*Math.PI/180||0),u&&r.attr("position",[ey(u[0],n[0]),ey(u[1],n[1])]),f&&r.attr("cursor",f),r.setColor(o,i&&i.symbolInnerColor),r.setStyle(s);var v=e.getItemVisual(t,"opacity");null!=v&&(g.opacity=v);var y=e.getItemVisual(t,"liftZ"),_=r.__z2Origin;null!=y?null==_&&(r.__z2Origin=r.z2,r.z2+=y):null!=_&&(r.z2=_,r.__z2Origin=null);var x=i&&i.useNameLabel;ru.setLabelStyle(g,l,c,h,{labelFetcher:a,labelDataIndex:t,defaultText:function(t,n){return x?e.getName(t):ty(e,t)},isRectText:!0,autoColor:o}),r.__symbolOriginalScale=ay(n),r.hoverStyle=l,r.highDownOnUpdate=d&&a.isAnimationEnabled()?hy:null,ru.setHoverStyle(r)},iy.fadeOut=function(e,t){var n=this.childAt(0);this.silent=n.silent=!0,(!t||!t.keepLabel)&&(n.style.text=null),ru.updateProps(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,e)},Te.inherits(ny,ru.Group);var dy=ny,fy=Te.isObject;function py(e){this.group=new ru.Group,this._symbolCtor=e||dy}var gy=py.prototype;function my(e,t,n,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function vy(e){return null==e||fy(e)||(e={isIgnore:e}),e||{}}function yy(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")}}gy.updateData=function(e,t){t=vy(t);var n=this.group,i=e.hostModel,r=this._data,a=this._symbolCtor,o=yy(e);r||n.removeAll(),e.diff(r).add((function(i){var r=e.getItemLayout(i);if(my(e,r,i,t)){var s=new a(e,i,o);s.attr("position",r),e.setItemGraphicEl(i,s),n.add(s)}})).update((function(s,l){var u=r.getItemGraphicEl(l),c=e.getItemLayout(s);my(e,c,s,t)?(u?(u.updateData(e,s,o),ru.updateProps(u,{position:c},i)):(u=new a(e,s)).attr("position",c),n.add(u),e.setItemGraphicEl(s,u)):n.remove(u)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}))})).execute(),this._data=e},gy.isPersistent=function(){return!0},gy.updateLayout=function(){var e=this._data;e&&e.eachItemGraphicEl((function(t,n){var i=e.getItemLayout(n);t.attr("position",i)}))},gy.incrementalPrepareUpdate=function(e){this._seriesScope=yy(e),this._data=null,this.group.removeAll()},gy.incrementalUpdate=function(e,t,n){function i(e){e.isGroup||(e.incremental=e.useHoverLayer=!0)}n=vy(n);for(var r=e.start;r<e.end;r++){var a=t.getItemLayout(r);if(my(t,a,r,n)){var o=new this._symbolCtor(t,r,this._seriesScope);o.traverse(i),o.attr("position",a),this.group.add(o),t.setItemGraphicEl(r,o)}}},gy.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}))})):t.removeAll()};var _y=py,xy=Cg.isDimensionStacked,by=Te.map;var wy={prepareDataCoordInfo:function(e,t,n){var i,r=e.getBaseAxis(),a=e.getOtherAxis(r),o=function(e,t){var n=0,i=e.scale.getExtent();"start"===t?n=i[0]:"end"===t?n=i[1]:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]);return n}(a,n),s=r.dim,l=a.dim,u=t.mapDimension(l),c=t.mapDimension(s),h="x"===l||"radius"===l?1:0,d=by(e.dimensions,(function(e){return t.mapDimension(e)})),f=t.getCalculationInfo("stackResultDimension");return(i|=xy(t,d[0]))&&(d[0]=f),(i|=xy(t,d[1]))&&(d[1]=f),{dataDimsForPoint:d,valueStart:o,valueAxisDim:l,baseAxisDim:s,stacked:!!i,valueDim:u,baseDim:c,baseDataOffset:h,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}},getStackedOnPoint:function(e,t,n,i){var r=NaN;e.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,i),o[1-a]=r,t.dataToPoint(o)}},Ty=wy.prepareDataCoordInfo,Sy=wy.getStackedOnPoint;var Oy=function(e,t,n,i,r,a,o,s){for(var l=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),u=[],c=[],h=[],d=[],f=[],p=[],g=[],m=Ty(r,t,o),v=Ty(a,e,s),y=0;y<l.length;y++){var _=l[y],x=!0;switch(_.cmd){case"=":var b=e.getItemLayout(_.idx),w=t.getItemLayout(_.idx1);(isNaN(b[0])||isNaN(b[1]))&&(b=w.slice()),u.push(b),c.push(w),h.push(n[_.idx]),d.push(i[_.idx1]),g.push(t.getRawIndex(_.idx1));break;case"+":var T=_.idx;u.push(r.dataToPoint([t.get(m.dataDimsForPoint[0],T),t.get(m.dataDimsForPoint[1],T)])),c.push(t.getItemLayout(T).slice()),h.push(Sy(m,r,t,T)),d.push(i[T]),g.push(t.getRawIndex(T));break;case"-":T=_.idx;var S=e.getRawIndex(T);S!==T?(u.push(e.getItemLayout(T)),c.push(a.dataToPoint([e.get(v.dataDimsForPoint[0],T),e.get(v.dataDimsForPoint[1],T)])),h.push(n[T]),d.push(Sy(v,a,e,T)),g.push(S)):x=!1}x&&(f.push(_),p.push(p.length))}p.sort((function(e,t){return g[e]-g[t]}));var O=[],M=[],D=[],A=[],k=[];for(y=0;y<p.length;y++){T=p[y];O[y]=u[T],M[y]=c[T],D[y]=h[T],A[y]=d[T],k[y]=f[T]}return{current:O,next:M,stackedOnCurrent:D,stackedOnNext:A,status:k}},My=ke.min,Dy=ke.max,Ay=ke.scaleAndAdd,ky=ke.copy,Cy=[],Iy=[],Ey=[];function Ny(e){return isNaN(e[0])||isNaN(e[1])}function Ry(e,t,n,i,r,a,o,s,l,u,c){return"none"!==u&&u?Ly.apply(this,arguments):Py.apply(this,arguments)}function Ly(e,t,n,i,r,a,o,s,l,u,c){for(var h=0,d=n,f=0;f<i;f++){var p=t[d];if(d>=r||d<0)break;if(Ny(p)){if(c){d+=a;continue}break}if(d===n)e[a>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=t[h],m="y"===u?1:0,v=(p[m]-g[m])*l;ky(Iy,g),Iy[m]=g[m]+v,ky(Ey,p),Ey[m]=p[m]-v,e.bezierCurveTo(Iy[0],Iy[1],Ey[0],Ey[1],p[0],p[1])}else e.lineTo(p[0],p[1]);h=d,d+=a}return f}function Py(e,t,n,i,r,a,o,s,l,u,c){for(var h=0,d=n,f=0;f<i;f++){var p=t[d];if(d>=r||d<0)break;if(Ny(p)){if(c){d+=a;continue}break}if(d===n)e[a>0?"moveTo":"lineTo"](p[0],p[1]),ky(Iy,p);else if(l>0){var g=d+a,m=t[g];if(c)for(;m&&Ny(t[g]);)m=t[g+=a];var v=.5,y=t[h];if(!(m=t[g])||Ny(m))ky(Ey,p);else{var _,x;if(Ny(m)&&!c&&(m=p),ke.sub(Cy,m,y),"x"===u||"y"===u){var b="x"===u?0:1;_=Math.abs(p[b]-y[b]),x=Math.abs(p[b]-m[b])}else _=ke.dist(p,y),x=ke.dist(p,m);Ay(Ey,p,Cy,-l*(1-(v=x/(x+_))))}My(Iy,Iy,s),Dy(Iy,Iy,o),My(Ey,Ey,s),Dy(Ey,Ey,o),e.bezierCurveTo(Iy[0],Iy[1],Ey[0],Ey[1],p[0],p[1]),Ay(Iy,p,Cy,l*v)}else e.lineTo(p[0],p[1]);h=d,d+=a}return f}function zy(e,t){var n=[1/0,1/0],i=[-1/0,-1/0];if(t)for(var r=0;r<e.length;r++){var a=e[r];a[0]<n[0]&&(n[0]=a[0]),a[1]<n[1]&&(n[1]=a[1]),a[0]>i[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:t?n:i,max:t?i:n}}var Yy={Polyline:jo.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:ds(jo.prototype.brush),buildPath:function(e,t){var n=t.points,i=0,r=n.length,a=zy(n,t.smoothConstraint);if(t.connectNulls){for(;r>0&&Ny(n[r-1]);r--);for(;i<r&&Ny(n[i]);i++);}for(;i<r;)i+=Ry(e,n,i,r,r,1,a.min,a.max,t.smooth,t.smoothMonotone,t.connectNulls)+1}}),Polygon:jo.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:ds(jo.prototype.brush),buildPath:function(e,t){var n=t.points,i=t.stackedOnPoints,r=0,a=n.length,o=t.smoothMonotone,s=zy(n,t.smoothConstraint),l=zy(i,t.smoothConstraint);if(t.connectNulls){for(;a>0&&Ny(n[a-1]);a--);for(;r<a&&Ny(n[r]);r++);}for(;r<a;){var u=Ry(e,n,r,a,a,1,s.min,s.max,t.smooth,o,t.connectNulls);Ry(e,i,r+u-1,u,a,-1,l.min,l.max,t.stackedOnSmooth,o,t.connectNulls),r+=u+1,e.closePath()}}})},Hy=Tu.round;function Fy(e,t,n){var i=e.getArea(),r=e.getBaseAxis().isHorizontal(),a=i.x,o=i.y,s=i.width,l=i.height,u=n.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}},n)),c}function By(e,t,n){var i=e.getArea(),r=new ru.Sector({shape:{cx:Hy(e.cx,1),cy:Hy(e.cy,1),r0:Hy(i.r0,1),r:Hy(i.r,1),startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return t&&(r.shape.endAngle=i.startAngle,ru.initProps(r,{shape:{endAngle:i.endAngle}},n)),r}var jy={createGridClipPath:Fy,createPolarClipPath:By,createClipPath:function(e,t,n){return e?"polar"===e.type?By(e,t,n):"cartesian2d"===e.type?Fy(e,t,n):null:null}},Uy=to.fromPoints,Wy=Yy.Polyline,Gy=Yy.Polygon,Vy=wy.prepareDataCoordInfo,qy=wy.getStackedOnPoint,Zy=jy.createGridClipPath,Xy=jy.createPolarClipPath;function Ky(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++){var i=e[n],r=t[n];if(i[0]!==r[0]||i[1]!==r[1])return}return!0}}function Qy(e,t){var n=[],i=[],r=[],a=[];return Uy(e,n,i),Uy(t,r,a),Math.max(Math.abs(n[0]-r[0]),Math.abs(n[1]-r[1]),Math.abs(i[0]-a[0]),Math.abs(i[1]-a[1]))}function $y(e){return"number"==typeof e?e:e?.5:0}function Jy(e,t,n){for(var i=t.getBaseAxis(),r="x"===i.dim||"radius"===i.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(n){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 e_(e,t,n){var i=e.get("showAllSymbol"),r="auto"===i;if(!i||r){var a=n.getAxesByScale("ordinal")[0];if(a&&(!r||!function(e,t){var n=e.getExtent(),i=Math.abs(n[1]-n[0])/e.scale.count();isNaN(i)&&(i=0);for(var r=t.count(),a=Math.max(1,Math.round(r/5)),o=0;o<r;o+=a)if(1.5*dy.getSymbolSize(t,o)[e.isHorizontal()?1:0]>i)return!1;return!0}(a,t))){var o=t.mapDimension(a.dim),s={};return Te.each(a.getViewLabels(),(function(e){s[e.tickValue]=1})),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function t_(e,t,n){if("cartesian2d"===e.type){var i=e.getBaseAxis().isHorizontal(),r=Zy(e,t,n);if(!n.get("clip",!0)){var a=r.shape,o=Math.max(a.width,a.height);i?(a.y-=o,a.height+=2*o):(a.x-=o,a.width+=2*o)}return r}return Xy(e,t,n)}ef.extend({type:"line",init:function(){var e=new ru.Group,t=new _y;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},render:function(e,t,n){var i=e.coordinateSystem,r=this.group,a=e.getData(),o=e.getModel("lineStyle"),s=e.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),u="polar"===i.type,c=this._coordSys,h=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=e.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(e,t,n){if(!n.valueDim)return[];for(var i=[],r=0,a=t.count();r<a;r++)i.push(qy(n,e,t,r));return i}(i,a,Vy(i,a,v)),_=e.get("showSymbol"),x=_&&!u&&e_(e,a,i),b=this._data;b&&b.eachItemGraphicEl((function(e,t){e.__temp&&(r.remove(e),b.setItemGraphicEl(t,null))})),_||h.remove(),r.add(p);var w,T=!u&&e.get("step");i&&i.getArea&&e.get("clip",!0)&&(null!=(w=i.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===i.type&&T===this._step?(m&&!f?f=this._newPolygon(l,y,i,g):f&&!m&&(p.remove(f),f=this._polygon=null),p.setClipPath(t_(i,!1,e)),_&&h.updateData(a,{isIgnore:x,clipShape:w}),a.eachItemGraphicEl((function(e){e.stopAnimation(!0)})),Ky(this._stackedOnPoints,y)&&Ky(this._points,l)||(g?this._updateAnimation(a,y,i,n,T,v):(T&&(l=Jy(l,i,T),y=Jy(y,i,T)),d.setShape({points:l}),f&&f.setShape({points:l,stackedOnPoints:y})))):(_&&h.updateData(a,{isIgnore:x,clipShape:w}),T&&(l=Jy(l,i,T),y=Jy(y,i,T)),d=this._newPolyline(l,i,g),m&&(f=this._newPolygon(l,y,i,g)),p.setClipPath(t_(i,!0,e)));var S=function(e,t){var n=e.getVisual("visualMeta");if(n&&n.length&&e.count()&&"cartesian2d"===t.type){for(var i,r,a=n.length-1;a>=0;a--){var o=n[a].dimension,s=e.dimensions[o],l=e.getDimensionInfo(s);if("x"===(i=l&&l.coordDim)||"y"===i){r=n[a];break}}if(r){var u=t.getAxis(i),c=Te.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 f=c[0].coord-10,p=c[h-1].coord+10,g=p-f;if(g<.001)return"transparent";Te.each(c,(function(e){e.offset=(e.coord-f)/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[i]=f,m[i+"2"]=p,m}}}(a,i)||a.getVisual("color");d.useStyle(Te.defaults(o.getLineStyle(),{fill:"none",stroke:S,lineJoin:"bevel"}));var O=e.get("smooth");if(O=$y(e.get("smooth")),d.setShape({smooth:O,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")}),f){var M=a.getCalculationInfo("stackedOnSeries"),D=0;f.useStyle(Te.defaults(s.getAreaStyle(),{fill:S,opacity:.7,lineJoin:"bevel"})),M&&(D=$y(M.get("smooth"))),f.setShape({smooth:O,stackedOnSmooth:D,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")})}this._data=a,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=T,this._valueOrigin=v},dispose:function(){},highlight:function(e,t,n,i){var r=e.getData(),a=xa.queryDataIndex(r,i);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 dy(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 ef.prototype.highlight.call(this,e,t,n,i)},downplay:function(e,t,n,i){var r=e.getData(),a=xa.queryDataIndex(r,i);if(null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else ef.prototype.downplay.call(this,e,t,n,i)},_newPolyline:function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new Wy({shape:{points:e},silent:!0,z2:10}),this._lineGroup.add(t),this._polyline=t,t},_newPolygon:function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Gy({shape:{points:e,stackedOnPoints:t},silent:!0}),this._lineGroup.add(n),this._polygon=n,n},_updateAnimation:function(e,t,n,i,r,a){var o=this._polyline,s=this._polygon,l=e.hostModel,u=Oy(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),c=u.current,h=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;if(r&&(c=Jy(u.current,n,r),h=Jy(u.stackedOnCurrent,n,r),d=Jy(u.next,n,r),f=Jy(u.stackedOnNext,n,r)),Qy(c,d)>3e3||s&&Qy(h,f)>3e3)return o.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:f}));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:f}},l));for(var p=[],g=u.status,m=0;m<g.length;m++){if("="===g[m].cmd){var v=e.getItemGraphicEl(g[m].idx1);v&&p.push({el:v,ptIdx:m})}}o.animators&&o.animators.length&&o.animators[0].during((function(){for(var e=0;e<p.length;e++){p[e].el.attr("position",o.shape.__points[p[e].ptIdx])}}))},remove:function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(e,i){e.__temp&&(t.remove(e),n.setItemGraphicEl(i,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var n_=Te.isFunction;var i_=function(e,t,n){return{seriesType:e,performRawSeries:!0,reset:function(e,i,r){var a=e.getData(),o=e.get("symbol"),s=e.get("symbolSize"),l=e.get("symbolKeepAspect"),u=e.get("symbolRotate"),c=n_(o),h=n_(s),d=n_(u),f=c||h||d,p=!c&&o?o:t,g=h?null:s;if(a.setVisual({legendSymbol:n||p,symbol:p,symbolSize:g,symbolKeepAspect:l,symbolRotate:u}),!i.isSeriesFiltered(e))return{dataEach:a.hasItemOption||f?function(t,n){if(f){var i=e.getRawValue(n),r=e.getDataParams(n);c&&t.setItemVisual(n,"symbol",o(i,r)),h&&t.setItemVisual(n,"symbolSize",s(i,r)),d&&t.setItemVisual(n,"symbolRotate",u(i,r))}if(t.hasItemOption){var a=t.getItemModel(n),l=a.getShallow("symbol",!0),p=a.getShallow("symbolSize",!0),g=a.getShallow("symbolRotate",!0),m=a.getShallow("symbolKeepAspect",!0);null!=l&&t.setItemVisual(n,"symbol",l),null!=p&&t.setItemVisual(n,"symbolSize",p),null!=g&&t.setItemVisual(n,"symbolRotate",g),null!=m&&t.setItemVisual(n,"symbolKeepAspect",m)}}:null}}}},r_=Te.map,a_=Cg.isDimensionStacked;var o_=function(e){return{seriesType:e,plan:jd(),reset:function(e){var t=e.getData(),n=e.coordinateSystem,i=e.pipelineContext.large;if(n){var r=r_(n.dimensions,(function(e){return t.mapDimension(e)})).slice(0,2),a=r.length,o=t.getCalculationInfo("stackResultDimension");return a_(t,r[0])&&(r[0]=o),a_(t,r[1])&&(r[1]=o),a&&{progress:function(e,t){for(var o=e.end-e.start,s=i&&new Float32Array(o*a),l=e.start,u=0,c=[],h=[];l<e.end;l++){var d;if(1===a){var f=t.get(r[0],l);d=!isNaN(f)&&n.dataToPoint(f,null,h)}else{f=c[0]=t.get(r[0],l);var p=c[1]=t.get(r[1],l);d=!isNaN(f)&&!isNaN(p)&&n.dataToPoint(c,null,h)}i?(s[u++]=d?d[0]:NaN,s[u++]=d?d[1]:NaN):t.setItemLayout(l,d&&d.slice()||[NaN,NaN])}i&&t.setLayout("symbolPoints",s)}}}}}},s_={average:function(e){for(var t=0,n=0,i=0;i<e.length;i++)isNaN(e[i])||(t+=e[i],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},l_=function(e,t){return Math.round(e.length/2)};var u_=function(e){return{seriesType:e,modifyOutputEnd:!0,reset:function(e,t,n){var i=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(i.count()/c);if(h>1)"string"==typeof r?o=s_[r]:"function"==typeof r&&(o=r),o&&e.setData(i.downSample(i.mapDimension(l.dim),1/h,o,l_))}}}};function c_(e){return this._axes[e]}var h_=function(e){this._axes={},this._dimList=[],this.name=e||""};h_.prototype={constructor:h_,type:"cartesian",getAxis:function(e){return this._axes[e]},getAxes:function(){return Te.map(this._dimList,c_,this)},getAxesByScale:function(e){return e=e.toLowerCase(),Te.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 n=this._dimList,i=e instanceof Array?[]:{},r=0;r<n.length;r++){var a=n[r],o=this._axes[a];i[a]=o[t](e[a])}return i}};var d_=h_;function f_(e){d_.call(this,e)}f_.prototype={constructor:f_,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"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},containData:function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},dataToPoint:function(e,t,n){var i=this.getAxis("x"),r=this.getAxis("y");return(n=n||[])[0]=i.toGlobalCoord(i.dataToCoord(e[0])),n[1]=r.toGlobalCoord(r.dataToCoord(e[1])),n},clampData:function(e,t){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),a=i.getExtent(),o=n.parse(e[0]),s=i.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 n=this.getAxis("x"),i=this.getAxis("y");return(t=t||[])[0]=n.coordToData(n.toLocalCoord(e[0])),t[1]=i.coordToData(i.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(),n=Math.min(e[0],e[1]),i=Math.min(t[0],t[1]),r=Math.max(e[0],e[1])-n,a=Math.max(t[0],t[1])-i;return new zn(n,i,r,a)}},Te.inherits(f_,d_);var p_=f_,g_=function(e,t,n,i,r){Ev.call(this,e,t,n),this.type=i||"value",this.position=r||"bottom"};g_.prototype={constructor:g_,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},Te.inherits(g_,Ev);var m_=g_,v_={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)"]}}},y_={};y_.categoryAxis=Te.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},v_),y_.valueAxis=Te.merge({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},v_),y_.timeAxis=Te.defaults({scale:!0,min:"dataMin",max:"dataMax"},y_.valueAxis),y_.logAxis=Te.defaults({scale:!0,logBase:10},y_.valueAxis);var __=y_,x_=ju.getLayoutParams,b_=ju.mergeLayoutParam,w_=["value","category","time","log"];var T_=function(e,t,n,i){Te.each(w_,(function(r){t.extend({type:e+"Axis."+r,mergeDefaultAndTheme:function(t,i){var a=this.layoutMode,o=a?x_(t):{},s=i.getTheme();Te.merge(t,s.get(r+"Axis")),Te.merge(t,this.getDefaultOption()),t.type=n(e,t),a&&b_(t,o,a)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=qg.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:Te.mergeAll([{},__[r+"Axis"],i],!0)})})),Zu.registerSubTypeDefaulter(e+"Axis",Te.curry(n,e))},S_=Zu.extend({type:"cartesian2dAxis",axis:null,init:function(){S_.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){S_.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){S_.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function O_(e,t){return t.type||(t.data?"category":"value")}Te.merge(S_.prototype,Wm);var M_={offset:0};T_("x",S_,O_,M_),T_("y",S_,O_,M_);Zu.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 D_=Te.isObject,A_=Te.each,k_=Te.map,C_=Te.indexOf,I_=ju.getLayoutRect,E_=Um.createScaleByModel,N_=Um.ifAxisCrossZero,R_=Um.niceScaleExtent,L_=Um.estimateLabelUnionRect,P_=Cg.getStackedDimension;function z_(e,t,n){return e.getCoordSysModel()===t}function Y_(e,t,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(e,t,n),this.model=e}var H_=Y_.prototype;function F_(e,t,n,i){n.getAxesOnZeroOf=function(){return r?[r]:[]};var r,a=e[t],o=n.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)B_(a[l])&&(r=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&B_(a[u])&&!i[c(a[u])]){r=a[u];break}r&&(i[c(r)]=!0)}function c(e){return e.dim+"_"+e.index}}function B_(e){return e&&"category"!==e.type&&"time"!==e.type&&N_(e)}H_.type="grid",H_.axisPointerEnabled=!0,H_.getRect=function(){return this._rect},H_.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model),A_(n.x,(function(e){R_(e.scale,e.model)})),A_(n.y,(function(e){R_(e.scale,e.model)}));var i={};A_(n.x,(function(e){F_(n,"y",e,i)})),A_(n.y,(function(e){F_(n,"x",e,i)})),this.resize(this.model,t)},H_.resize=function(e,t,n){var i=I_(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});this._rect=i;var r=this._axesList;function a(){A_(r,(function(e){var t=e.isHorizontal(),n=t?[0,i.width]:[0,i.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),function(e,t){var n=e.getExtent(),i=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return i-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return i-e+t}}(e,t?i.x:i.y)}))}a(),!n&&e.get("containLabel")&&(A_(r,(function(e){if(!e.model.get("axisLabel.inside")){var t=L_(e);if(t){var n=e.isHorizontal()?"height":"width",r=e.model.get("axisLabel.margin");i[n]-=t[n]+r,"top"===e.position?i.y+=t.height+r:"left"===e.position&&(i.x+=t.width+r)}}})),a())},H_.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n){if(null==t)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[t]}},H_.getAxes=function(){return this._axesList.slice()},H_.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}D_(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,r=this._coordsList;i<r.length;i++)if(r[i].getAxis("x").index===e||r[i].getAxis("y").index===t)return r[i]},H_.getCartesians=function(){return this._coordsList.slice()},H_.convertToPixel=function(e,t,n){var i=this._findConvertTarget(e,t);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},H_.convertFromPixel=function(e,t,n){var i=this._findConvertTarget(e,t);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},H_._findConvertTarget=function(e,t){var n,i,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)n=r.coordinateSystem,C_(l,n)<0&&(n=null);else if(a&&o)n=this.getCartesian(a.componentIndex,o.componentIndex);else if(a)i=this.getAxis("x",a.componentIndex);else if(o)i=this.getAxis("y",o.componentIndex);else if(s){s.coordinateSystem===this&&(n=this._coordsList[0])}return{cartesian:n,axis:i}},H_.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},H_._initCartesian=function(e,t,n){var i={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(n,o){if(z_(n,e)){var s=n.get("position");"x"===t?"top"!==s&&"bottom"!==s&&(s=i.bottom?"top":"bottom"):"left"!==s&&"right"!==s&&(s=i.left?"right":"left"),i[s]=!0;var l=new m_(t,E_(n),[0,0],n.get("type"),s),u="category"===l.type;l.onBand=u&&n.get("boundaryGap"),l.inverse=n.get("inverse"),n.axis=l,l.model=n,l.grid=this,l.index=o,this._axesList.push(l),r[t][o]=l,a[t]++}}}this._axesMap=r,A_(r.x,(function(t,n){A_(r.y,(function(i,r){var a="x"+n+"y"+r,o=new p_(a);o.grid=this,o.model=e,this._coordsMap[a]=o,this._coordsList.push(o),o.addAxis(t),o.addAxis(i)}),this)}),this)},H_._updateScale=function(e,t){function n(e,t,n){A_(e.mapDimension(t.dim,!0),(function(n){t.scale.unionExtentFromData(e,P_(e,n))}))}A_(this._axesList,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeries((function(e){if(W_(e)){var i=U_(e),r=i[0],a=i[1];if(!z_(r,t)||!z_(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&&(n(s,l),n(s,u))}}),this)},H_.getTooltipAxes=function(e){var t=[],n=[];return A_(this.getCartesians(),(function(i){var r=null!=e&&"auto"!==e?i.getAxis(e):i.getBaseAxis(),a=i.getOtherAxis(r);C_(t,r)<0&&t.push(r),C_(n,a)<0&&n.push(a)})),{baseAxes:t,otherAxes:n}};var j_=["xAxis","yAxis"];function U_(e,t){return k_(j_,(function(t){return e.getReferringComponents(t)[0]}))}function W_(e){return"cartesian2d"===e.get("coordinateSystem")}Y_.create=function(e,t){var n=[];return e.eachComponent("grid",(function(i,r){var a=new Y_(i,e,t);a.name="grid_"+r,a.resize(i,t,!0),i.coordinateSystem=a,n.push(a)})),e.eachSeries((function(e){if(W_(e)){var t=U_(e),n=t[0],i=t[1],r=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=r.getCartesian(n.componentIndex,i.componentIndex)}})),n},Y_.dimensions=Y_.prototype.dimensions=p_.prototype.dimensions,oh.register("cartesian2d",Y_);var G_=Te.retrieve,V_=Te.defaults,q_=Te.extend,Z_=Te.each,X_=Tu.isRadianAroundZero,K_=Tu.remRadian,Q_=tv.createSymbol,$_=ke.applyTransform,J_=Um.shouldShowAllLabels,ex=Math.PI,tx=function(e,t){this.opt=t,this.axisModel=e,V_(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new ru.Group;var n=new ru.Group({position:t.position.slice(),rotation:t.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n};tx.prototype={constructor:tx,hasBuilder:function(e){return!!nx[e]},add:function(e){nx[e].call(this)},getGroup:function(){return this.group}};var nx={axisLine:function(){var e=this.opt,t=this.axisModel;if(t.get("axisLine.show")){var n=this.axisModel.axis.getExtent(),i=this._transform,r=[n[0],0],a=[n[1],0];i&&($_(r,r,i),$_(a,a,i));var o=q_({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];Z_([{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,n){if("none"!==s[n]&&null!=s[n]){var i=Q_(s[n],-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)];i.attr({rotation:t.rotate,position:l,silent:!0,z2:11}),this.group.add(i)}}),this)}}},axisTickLabel:function(){var e=this.axisModel,t=this.opt,n=function(e,t,n){var i=t.axis,r=t.getModel("axisTick");if(!r.get("show")||i.scale.isBlank())return;for(var a=r.getModel("lineStyle"),o=n.tickDirection*r.get("length"),s=ux(i.getTicksCoords(),e._transform,o,V_(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),i=function(e,t,n){var i=t.axis;if(!G_(n.axisLabelShow,t.get("axisLabel.show"))||i.scale.isBlank())return;var r=t.getModel("axisLabel"),a=r.get("margin"),o=i.getViewLabels(),s=(G_(n.labelRotate,r.get("rotate"))||0)*ex/180,l=rx(n.rotation,s,n.labelDirection),u=t.getCategories&&t.getCategories(!0),c=[],h=ax(t),d=t.get("triggerEvent");return Z_(o,(function(o,s){var f=o.tickValue,p=o.formattedLabel,g=o.rawLabel,m=r;u&&u[f]&&u[f].textStyle&&(m=new vu(u[f].textStyle,r,t.ecModel));var v=m.getTextColor()||t.get("axisLine.lineStyle.color"),y=[i.dataToCoord(f),n.labelOffset+n.labelDirection*a],_=new ru.Text({anid:"label_"+f,position:y,rotation:l.rotation,silent:h,z2:10});ru.setTextStyle(_.style,m,{text:p,textAlign:m.getShallow("align",!0)||l.textAlign,textVerticalAlign:m.getShallow("verticalAlign",!0)||m.getShallow("baseline",!0)||l.textVerticalAlign,textFill:"function"==typeof v?v("category"===i.type?g:"value"===i.type?f+"":f,s):v}),d&&(_.eventData=ix(t),_.eventData.targetType="axisLabel",_.eventData.value=g),e._dumbGroup.add(_),_.updateTransform(),c.push(_),e.group.add(_),_.decomposeTransform()})),c}(this,e,t);!function(e,t,n){if(J_(e.axis))return;var i=e.get("axisLabel.showMinLabel"),r=e.get("axisLabel.showMaxLabel");n=n||[];var a=(t=t||[])[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],h=n[n.length-1],d=n[n.length-2];!1===i?(ox(a),ox(u)):sx(a,o)&&(i?(ox(o),ox(c)):(ox(a),ox(u)));!1===r?(ox(s),ox(h)):sx(l,s)&&(r?(ox(l),ox(d)):(ox(s),ox(h)))}(e,i,n),function(e,t,n){var i=t.axis,r=t.getModel("minorTick");if(!r.get("show")||i.scale.isBlank())return;var a=i.getMinorTicksCoords();if(!a.length)return;for(var o=r.getModel("lineStyle"),s=n.tickDirection*r.get("length"),l=V_(o.getLineStyle(),V_(t.getModel("axisTick").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})),u=0;u<a.length;u++)for(var c=ux(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,n=G_(e.axisName,t.get("name"));if(n){var i,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,lx(a)?e.labelOffset+o*l:0],d=t.get("nameRotate");null!=d&&(d=d*ex/180),lx(a)?i=rx(e.rotation,null!=d?d:e.rotation,o):(i=function(e,t,n,i){var r,a,o=K_(n-e.rotation),s=i[0]>i[1],l="start"===t&&!s||"start"!==t&&s;X_(o-ex/2)?(a=l?"bottom":"top",r="center"):X_(o-1.5*ex)?(a=l?"top":"bottom",r="center"):(a="middle",r=o<1.5*ex&&o>ex/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(i.rotation)),!isFinite(r)&&(r=null)));var f=s.getFont(),p=t.get("nameTruncate",!0)||{},g=p.ellipsis,m=G_(e.nameTruncateMaxWidth,p.maxWidth,r),v=null!=g&&null!=m?Iu.truncateText(n,m,f,g,{minChar:2,placeholder:p.placeholder}):n,y=t.get("tooltip",!0),_=t.mainType,x={componentType:_,name:n,$vars:["name"]};x[_+"Index"]=t.componentIndex;var b=new ru.Text({anid:"name",__fullText:n,__truncatedText:v,position:h,rotation:i.rotation,silent:ax(t),z2:1,tooltip:y&&y.show?q_({content:n,formatter:function(){return n},formatterParams:x},y):null});ru.setTextStyle(b.style,s,{text:v,textFont:f,textFill:s.getTextColor()||t.get("axisLine.lineStyle.color"),textAlign:s.get("align")||i.textAlign,textVerticalAlign:s.get("verticalAlign")||i.textVerticalAlign}),t.get("triggerEvent")&&(b.eventData=ix(t),b.eventData.targetType="axisName",b.eventData.name=n),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},ix=tx.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},rx=tx.innerTextLayout=function(e,t,n){var i,r,a=K_(t-e);return X_(a)?(r=n>0?"top":"bottom",i="center"):X_(a-ex)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=a>0&&a<ex?n>0?"right":"left":n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:r}};var ax=tx.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)};function ox(e){e&&(e.ignore=!0)}function sx(e,t,n){var i=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(i&&r){var a=gt.identity([]);return gt.rotate(a,a,-e.rotation),i.applyTransform(gt.mul([],a,e.getLocalTransform())),r.applyTransform(gt.mul([],a,t.getLocalTransform())),i.intersect(r)}}function lx(e){return"middle"===e||"center"===e}function ux(e,t,n,i,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]=n,t&&($_(o,o,t),$_(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:i,z2:2,silent:!0});a.push(c)}return a}var cx=tx,hx=Te.each,dx=Te.curry;function fx(e,t){return"all"===e||Te.isArray(e)&&Te.indexOf(e,t)>=0||e===t}function px(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[mx(e)]}function gx(e){return!!e.get("handle.show")}function mx(e){return e.type+"||"+e.id}var vx={collect:function(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var i=t.getComponent("tooltip"),r=t.getComponent("axisPointer"),a=r.get("link",!0)||[],o=[];hx(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=mx(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",i);if(hx(n.getAxes(),dx(f,!1,null)),n.getTooltipAxes&&i&&u.get("show")){var c="axis"===u.get("trigger"),h="cross"===u.get("axisPointer.type"),d=n.getTooltipAxes(u.get("axisPointer.axis"));(c||h)&&hx(d.baseAxes,dx(f,!h||"cross",c)),h&&hx(d.otherAxes,dx(f,"cross",!1))}}function f(i,s,c){var h=c.model.getModel("axisPointer",r),d=h.get("show");if(d&&("auto"!==d||i||gx(h))){null==s&&(s=h.get("triggerTooltip"));var f=(h=i?function(e,t,n,i,r,a){var o=t.getModel("axisPointer"),s={};hx(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=Te.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&&Te.defaults(l,c.textStyle)}}return e.model.getModel("axisPointer",new vu(s,n,i))}(c,u,r,t,i,s):h).get("snap"),p=mx(c.model),g=s||f||"category"===c.type,m=e.axesInfo[p]={key:p,axis:c,coordSys:n,axisPointerModel:h,triggerTooltip:s,involveSeries:g,snap:f,useHandle:gx(h),seriesModels:[]};l[p]=m,e.seriesInvolved|=g;var v=function(e,t){for(var n=t.model,i=t.dim,r=0;r<e.length;r++){var a=e[r]||{};if(fx(a[i+"AxisId"],n.id)||fx(a[i+"AxisIndex"],n.componentIndex)||fx(a[i+"AxisName"],n.name))return r}}(a,c);if(null!=v){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[p]=m,y.mapper=a[v].mapper,m.linkGroup=y}}}}))}(n,e,t),n.seriesInvolved&&function(e,t){t.eachSeries((function(t){var n=t.coordinateSystem,i=t.get("tooltip.trigger",!0),r=t.get("tooltip.show",!0);n&&"none"!==i&&!1!==i&&"item"!==i&&!1!==r&&!1!==t.get("axisPointer.show",!0)&&hx(e.coordSysAxesInfo[mx(n.model)],(function(e){var i=e.axis;n.getAxis(i.dim)===i&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}),this)}(n,e),n},fixValue:function(e){var t=px(e);if(t){var n=t.axisPointerModel,i=t.axis.scale,r=n.option,a=n.get("status"),o=n.get("value");null!=o&&(o=i.parse(o));var s=gx(n);null==a&&(r.status=s?"show":"hide");var l=i.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:px,getAxisPointerModel:function(e){var t=px(e);return t&&t.axisPointerModel},makeKey:mx},yx=Kv.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(e,t,n,i){this.axisPointerClass&&vx.fixValue(e),yx.superApply(this,"render",arguments),_x(this,e,t,n,i,!0)},updateAxisPointer:function(e,t,n,i,r){_x(this,e,t,n,i,!1)},remove:function(e,t){var n=this._axisPointer;n&&n.remove(t),yx.superApply(this,"remove",arguments)},dispose:function(e,t){xx(this,t),yx.superApply(this,"dispose",arguments)}});function _x(e,t,n,i,r,a){var o=yx.getAxisPointerClass(e.axisPointerClass);if(o){var s=vx.getAxisPointerModel(t);s?(e._axisPointer||(e._axisPointer=new o)).render(t,s,i,a):xx(e,i)}}function xx(e,t,n){var i=e._axisPointer;i&&i.dispose(t,n),e._axisPointer=null}var bx=[];yx.registerAxisPointerClass=function(e,t){bx[e]=t},yx.getAxisPointerClass=function(e){return e&&bx[e]};var Tx=yx;var Sx={layout:function(e,t,n){n=n||{};var i=e.coordinateSystem,r=t.axis,a={},o=r.getAxesOnZeroOf()[0],s=r.position,l=o?"onZero":s,u=r.dim,c=i.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},f=t.get("offset")||0,p="x"===u?[h[2]-f,h[3]+f]:[h[0]-f,h[1]+f];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=["y"===u?p[d[l]]:h[0],"x"===u?p[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?p[d[s]]-p[d.onZero]:0,t.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),Te.retrieve(n.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 Ox={rectCoordAxisBuildSplitArea:function(e,t,n,i){var r=n.axis;if(!r.scale.isBlank()){var a=n.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=i.coordinateSystem.getRect(),u=r.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var c=s.length,h=e.__splitAreaColors,d=Te.createHashMap(),f=0;if(h)for(var p=0;p<u.length;p++){var g=h.get(u[p].tickValue);if(null!=g){f=(g+(c-1)*p)%c;break}}var m=r.toGlobalCoord(u[0].coord),v=o.getAreaStyle();s=Te.isArray(s)?s:[s];for(p=1;p<u.length;p++){var y,_,x,b,w=r.toGlobalCoord(u[p].coord);r.isHorizontal()?(y=m,_=l.y,x=w-y,b=l.height,m=y+x):(y=l.x,_=m,x=l.width,m=_+(b=w-_));var T=u[p-1].tickValue;null!=T&&d.set(T,f),t.add(new ru.Rect({anid:null!=T?"area_"+T:null,shape:{x:y,y:_,width:x,height:b},style:Te.defaults({fill:s[f]},v),silent:!0})),f=(f+1)%c}e.__splitAreaColors=d}}},rectCoordAxisHandleRemove:function(e){e.__splitAreaColors=null}},Mx=Ox.rectCoordAxisBuildSplitArea,Dx=Ox.rectCoordAxisHandleRemove,Ax=["axisLine","axisTickLabel","axisName"],kx=["splitArea","splitLine","minorSplitLine"],Cx=Tx.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,n,i){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=Sx.layout(a,e),s=new cx(e,o);Te.each(Ax,s.add,s),this._axisGroup.add(s.getGroup()),Te.each(kx,(function(t){e.get(t+".show")&&this["_"+t](e,a)}),this),ru.groupTransition(r,this._axisGroup,e),Cx.superCall(this,"render",e,t,n,i)}},remove:function(){Dx(this)},_splitLine:function(e,t){var n=e.axis;if(!n.scale.isBlank()){var i=e.getModel("splitLine"),r=i.getModel("lineStyle"),a=r.get("color");a=Te.isArray(a)?a:[a];for(var o=t.coordinateSystem.getRect(),s=n.isHorizontal(),l=0,u=n.getTicksCoords({tickModel:i}),c=[],h=[],d=r.getLineStyle(),f=0;f<u.length;f++){var p=n.toGlobalCoord(u[f].coord);s?(c[0]=p,c[1]=o.y,h[0]=p,h[1]=o.y+o.height):(c[0]=o.x,c[1]=p,h[0]=o.x+o.width,h[1]=p);var g=l++%a.length,m=u[f].tickValue;this._axisGroup.add(new ru.Line({anid:null!=m?"line_"+u[f].tickValue:null,subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]},style:Te.defaults({stroke:a[g]},d),silent:!0}))}}},_minorSplitLine:function(e,t){var n=e.axis,i=e.getModel("minorSplitLine").getModel("lineStyle"),r=t.coordinateSystem.getRect(),a=n.isHorizontal(),o=n.getMinorTicksCoords();if(o.length)for(var s=[],l=[],u=i.getLineStyle(),c=0;c<o.length;c++)for(var h=0;h<o[c].length;h++){var d=n.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){Mx(this,this._axisGroup,e,t)}});Cx.extend({type:"xAxis"}),Cx.extend({type:"yAxis"}),Kv.extendComponentView({type:"grid",render:function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new ru.Rect({shape:e.coordinateSystem.getRect(),style:Te.defaults({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))}}),Kv.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})),Kv.registerVisual(i_("line","circle","line")),Kv.registerLayout(o_("line")),Kv.registerProcessor(Kv.PRIORITY.PROCESSOR.STATISTIC,u_("line"));var Ix=function(e,t){var n,i=[],r=e.seriesIndex;if(null==r||!(n=t.getSeriesByIndex(r)))return{point:[]};var a=n.getData(),o=xa.queryDataIndex(a,e);if(null==o||o<0||Te.isArray(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(a.getValues(Te.map(l.dimensions,(function(e){return a.mapDimension(e)})),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),i=[u.x+u.width/2,u.y+u.height/2]}return{point:i,el:s}},Ex=xa.makeInner,Nx=Te.each,Rx=Te.curry,Lx=Ex();function Px(e,t,n,i,r){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t))if(e.involveSeries){var o=function(e,t){var n=t.axis,i=n.dim,r=e,a=[],o=Number.MAX_VALUE,s=-1;return Nx(t.seriesModels,(function(t,l){var u,c,h=t.getData().mapDimension(i,!0);if(t.getAxisTooltipData){var d=t.getAxisTooltipData(h,e,n);c=d.dataIndices,u=d.nestestValue}else{if(!(c=t.getData().indicesOfNearest(h[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(h[0],c[0])}if(null!=u&&isFinite(u)){var f=e-u,p=Math.abs(f);p<=o&&((p<o||f>=0&&s<0)&&(o=p,s=f,r=u,a.length=0),Nx(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&&Te.extend(r,s[0]),!i&&e.snap&&a.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s,r),n.showTooltip(e,o,l)}else n.showPointer(e,t)}function zx(e,t,n,i){e[t.key]={value:n,payloadBatch:i}}function Yx(e,t,n,i){var r=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&r.length){var l=t.coordSys.model,u=vx.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:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function Hx(e){var t=e.axis.model,n={},i=n.axisDim=e.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=t.componentIndex,n.axisName=n[i+"AxisName"]=t.name,n.axisId=n[i+"AxisId"]=t.id,n}function Fx(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}var Bx=function(e,t,n){var i=e.currTrigger,r=[e.x,e.y],a=e,o=e.dispatchAction||Te.bind(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Fx(r)&&(r=Ix({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=Fx(r),u=a.axesInfo,c=s.axesInfo,h="leave"===i||Fx(r),d={},f={},p={list:[],map:{}},g={showPointer:Rx(zx,f),showTooltip:Rx(Yx,p)};Nx(s.coordSysMap,(function(e,t){var n=l||e.containPoint(r);Nx(s.coordSysAxesInfo[t],(function(e,t){var i=e.axis,a=function(e,t){for(var n=0;n<(e||[]).length;n++){var i=e[n];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}(u,e);if(!h&&n&&(!u||a)){var o=a&&a.value;null!=o||l||(o=i.pointToData(r)),null!=o&&Px(e,o,g,!1,d)}}))}));var m={};return Nx(c,(function(e,t){var n=e.linkGroup;n&&!f[t]&&Nx(n.axesInfo,(function(t,i){var r=f[i];if(t!==e&&r){var a=r.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,Hx(t),Hx(e)))),m[e.key]=a}}))})),Nx(m,(function(e,t){Px(c[t],e,g,!0,d)})),function(e,t,n){var i=n.axesInfo=[];Nx(t,(function(t,n){var r=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(r.status="show"),r.value=a.value,r.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:r.value})}))}(f,c,d),function(e,t,n,i){if(Fx(t)||!e.list.length)return void i({type:"hideTip"});var r=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:e.list})}(p,r,e,o),function(e,t,n){var i=n.getZr(),r=Lx(i).axisPointerLastHighlights||{},a=Lx(i).axisPointerLastHighlights={};Nx(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&Nx(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;a[t]=e}))}));var o=[],s=[];Te.each(r,(function(e,t){!a[t]&&s.push(e)})),Te.each(a,(function(e,t){!r[t]&&o.push(e)})),s.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),o.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:o})}(c,0,n),d}},jx=(Kv.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)()),Ux=Te.each;function Wx(e,t,n){e.handler("leave",null,n)}function Gx(e,t,n,i){t.handler(e,n,i)}var Vx={register:function(e,t,n){if(!J.node){var i=t.getZr();jx(i).records||(jx(i).records={}),function(e,t){if(jx(e).initialized)return;function n(n,i){e.on(n,(function(n){var r=function(e){var t={showTip:[],hideTip:[]},n=function(i){var r=t[i.type];r?r.push(i):(i.dispatchAction=n,e.dispatchAction(i))};return{dispatchAction:n,pendings:t}}(t);Ux(jx(e).records,(function(e){e&&i(e,n,r.dispatchAction)})),function(e,t){var n,i=e.showTip.length,r=e.hideTip.length;i?n=e.showTip[i-1]:r&&(n=e.hideTip[r-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(r.pendings,t)}))}jx(e).initialized=!0,n("click",Te.curry(Gx,"click")),n("mousemove",Te.curry(Gx,"mousemove")),n("globalout",Wx)}(i,t),(jx(i).records[e]||(jx(i).records[e]={})).handler=n}},unregister:function(e,t){if(!J.node){var n=t.getZr();(jx(n).records||{})[e]&&(jx(n).records[e]=null)}}},qx=Kv.extendComponentView({type:"axisPointer",render:function(e,t,n){var i=t.getComponent("tooltip"),r=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Vx.register("axisPointer",n,(function(e,t,n){"none"!==r&&("leave"===e||r.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},remove:function(e,t){Vx.unregister(t.getZr(),"axisPointer"),qx.superApply(this._model,"remove",arguments)},dispose:function(e,t){Vx.unregister("axisPointer",t),qx.superApply(this._model,"dispose",arguments)}}),Zx=(0,xa.makeInner)(),Xx=Te.clone,Kx=Te.bind;function Qx(){}function $x(e,t,n,i){(function e(t,n){if(Te.isObject(t)&&Te.isObject(n)){var i=!0;return Te.each(n,(function(n,r){i=i&&e(t[r],n)})),!!i}return t===n})(Zx(n).lastProp,i)||(Zx(n).lastProp=i,t?ru.updateProps(n,i,e):(n.stopAnimation(),n.attr(i)))}function Jx(e,t){e[t.get("label.show")?"show":"hide"]()}function eb(e){return{position:e.position.slice(),rotation:e.rotation||0}}function tb(e,t,n){var i=t.get("z"),r=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=i&&(e.z=i),null!=r&&(e.zlevel=r),e.silent=n)}))}function nb(e,t,n,i,r){var a=ib(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),o=n.getModel("label"),s=Iu.normalizeCssArray(o.get("padding")||0),l=o.getFont(),u=Bi.getBoundingRect(a,l),c=r.position,h=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=r.align;"right"===f&&(c[0]-=h),"center"===f&&(c[0]-=h/2);var p=r.verticalAlign;"bottom"===p&&(c[1]-=d),"middle"===p&&(c[1]-=d/2),function(e,t,n,i){var r=i.getWidth(),a=i.getHeight();e[0]=Math.min(e[0]+t,r)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,h,d,i);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 ib(e,t,n,i,r){e=t.scale.parse(e);var a=t.scale.getLabel(e,{precision:r.precision}),o=r.formatter;if(o){var s={value:Um.getAxisRawValue(t,e),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};Te.each(i,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),i=e.dataIndexInside,r=t&&t.getDataParams(i);r&&s.seriesData.push(r)})),Te.isString(o)?a=o.replace("{value}",a):Te.isFunction(o)&&(a=o(s))}return a}function rb(e,t,n){var i=gt.create();return gt.rotate(i,i,n.rotation),gt.translate(i,i,n.position),ru.applyTransform([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}Qx.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(e,t,n,i){var r=t.get("value"),a=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,i||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,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(o){var h=Te.curry($x,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),n.getZr().add(o);tb(o,t,!0),this._renderHandle(r)}},remove:function(e){this.clear(e)},dispose:function(e){this.clear(e)},determineAnimation:function(e,t){var n=t.get("animation"),i=e.axis,r="category"===i.type,a=t.get("snap");if(!a&&!r)return!1;if("auto"===n||null==n){var o=this.animationThreshold;if(r&&i.getBandWidth()>o)return!0;if(a){var s=vx.getAxisInfo(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return!0===n},makeElOption:function(e,t,n,i,r){},createPointerEl:function(e,t,n,i){var r=t.pointer;if(r){var a=Zx(e).pointerEl=new ru[r.type](Xx(t.pointer));e.add(a)}},createLabelEl:function(e,t,n,i){if(t.label){var r=Zx(e).labelEl=new ru.Rect(Xx(t.label));e.add(r),Jx(r,i)}},updatePointerEl:function(e,t,n){var i=Zx(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},updateLabelEl:function(e,t,n,i){var r=Zx(e).labelEl;r&&(r.setStyle(t.label.style),n(r,{shape:t.label.shape,position:t.label.position}),Jx(r,i))},_renderHandle:function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,a=n.getModel("handle"),o=n.get("status");if(!a.get("show")||!o||"hide"===o)return r&&i.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:Kx(this._onHandleDragMove,this,0,0),drift:Kx(this._onHandleDragMove,this),ondragend:Kx(this._onHandleDragEnd,this)}),i.add(r)),tb(r,n,!1);r.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");Te.isArray(s)||(s=[s,s]),r.attr("scale",[s[0]/2,s[1]/2]),af.createOrUpdate(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},_moveHandleToValue:function(e,t){$x(this._axisPointerModel,!t&&this._moveAnimation,this._handle,eb(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(eb(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(eb(i)),Zx(n).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(),n=this._group,i=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}}},Qx.prototype.constructor=Qx,Ma.enableClassExtend(Qx);var ab={buildElStyle:function(e){var t,n=e.get("type"),i=e.getModel(n+"Style");return"line"===n?(t=i.getLineStyle()).fill=null:"shadow"===n&&((t=i.getAreaStyle()).stroke=null),t},buildLabelElOption:nb,getValueLabel:ib,getTransformedPosition:rb,buildCartesianSingleLabelElOption:function(e,t,n,i,r,a){var o=cx.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get("label.margin"),nb(t,i,r,a,{position:rb(i.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})},makeLineShape:function(e,t,n){return{x1:e[n=n||0],y1:e[1-n],x2:t[n],y2:t[1-n]}},makeRectShape:function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},makeSectorShape:function(e,t,n,i,r,a){return{cx:e,cy:t,r0:n,r:i,startAngle:r,endAngle:a,clockwise:!0}}},ob=Qx.extend({makeElOption:function(e,t,n,i,r){var a=n.axis,o=a.grid,s=i.get("type"),l=sb(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&"none"!==s){var c=ab.buildElStyle(i),h=lb[s](a,u,l);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=Sx.layout(o.model,n);ab.buildCartesianSingleLabelElOption(t,e,d,n,i,r)},getHandleTransform:function(e,t,n){var i=Sx.layout(t.axis.grid.model,t,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:ab.getTransformedPosition(t.axis,e,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,n,i){var r=n.axis,a=r.grid,o=r.getGlobalExtent(!0),s=sb(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 sb(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var lb={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:ab.makeLineShape([t,n[0]],[t,n[1]],ub(e))}},shadow:function(e,t,n){var i=Math.max(1,e.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:ab.makeRectShape([t-i/2,n[0]],[i,r],ub(e))}}};function ub(e){return"x"===e.dim?0:1}Tx.registerAxisPointerClass("CartesianAxisPointer",ob),Kv.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!Te.isArray(t)&&(e.axisPointer.link=[t])}})),Kv.registerProcessor(Kv.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=vx.collect(e,t)})),Kv.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Bx);Kv.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 cb=Te.each,hb=Iu.toCamelCase,db=["","-webkit-","-moz-","-o-"];function fb(e){var t,n,i=[],r=e.get("transitionDuration"),a=e.get("backgroundColor"),o=e.getModel("textStyle"),s=e.get("padding");return r&&i.push((n="left "+(t=r)+"s cubic-bezier(0.23, 1, 0.32, 1),top "+t+"s cubic-bezier(0.23, 1, 0.32, 1)",Te.map(db,(function(e){return e+"transition:"+n})).join(";"))),a&&(J.canvasSupported?i.push("background-Color:"+a):(i.push("background-Color:#"+Qt.toHex(a)),i.push("filter:alpha(opacity=70)"))),cb(["width","color","radius"],(function(t){var n="border-"+t,r=hb(n),a=e.get(r);null!=a&&i.push(n+":"+a+("color"===t?"":"px"))})),i.push(function(e){var t=[],n=e.get("fontSize"),i=e.getTextColor();return i&&t.push("color:"+i),t.push("font:"+e.getFont()),n&&t.push("line-height:"+Math.round(3*n/2)+"px"),cb(["decoration","align"],(function(n){var i=e.get(n);i&&t.push("text-"+n+":"+i)})),t.join(";")}(o)),null!=s&&i.push("padding:"+Iu.normalizeCssArray(s).join("px ")+"px"),i.join(";")+";"}function pb(e,t,n,i,r){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Ue.transformLocalCoord(e,o,document.body,i,r)}else{e[0]=i,e[1]=r;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}}function gb(e,t,n){if(J.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=t.getZr(),a=this._appendToBody=n&&n.appendToBody;this._styleCoord=[0,0],pb(this._styleCoord,r,a,t.getWidth()/2,t.getHeight()/2),a?document.body.appendChild(i):e.appendChild(i),this._container=e,this._show=!1,this._hideTimeout;var o=this;i.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!o._enterable){var t=r.handler,n=r.painter.getViewportRoot();Je.normalizeEvent(n,e,!0),t.dispatch("mousemove",e)}},i.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}gb.prototype={constructor:gb,_enterable:!0,update:function(){var e=this._container,t=e.currentStyle||document.defaultView.getComputedStyle(e),n=e.style;"absolute"!==n.position&&"absolute"!==t.position&&(n.position="relative")},show:function(e){clearTimeout(this._hideTimeout);var t=this.el,n=this._styleCoord;t.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+fb(e)+";left:"+n[0]+"px;top:"+n[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 n=this._styleCoord;pb(n,this._zr,this._appendToBody,e,t);var i=this.el.style;i.left=n[0]+"px",i.top=n[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(Te.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 n=document.defaultView.getComputedStyle(this.el);n&&(e+=parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),t+=parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:e,height:t}}};var mb=gb;function vb(e){this._zr=e.getZr(),this._show=!1,this._hideTimeout}vb.prototype={constructor:vb,_enterable:!0,update:function(){},show:function(e){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(e,t,n){this.el&&this._zr.remove(this.el);for(var i={},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?i["marker"+s]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:t[s],textOffset:[3,0]}:i["marker"+s]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:t[s]},a=(r=r.substr(o+1)).indexOf("{marker")}this.el=new us({style:{rich:i,text:e,textLineHeight:20,textBackgroundColor:n.get("backgroundColor"),textBorderRadius:n.get("borderRadius"),textFill:n.get("textStyle.color"),textPadding:n.get("padding")},z:n.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(Te.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 yb=vb,_b=xa.getTooltipRenderMode,xb=Te.bind,bb=Te.each,wb=Tu.parsePercent,Tb=new ru.Rect({shape:{x:-1,y:-1,width:2,height:2}});Kv.extendComponentView({type:"tooltip",init:function(e,t){if(!J.node){var n,i=e.getComponent("tooltip"),r=i.get("renderMode");this._renderMode=_b(r),"html"===this._renderMode?(n=new mb(t.getDom(),t,{appendToBody:i.get("appendToBody",!0)}),this._newLine="<br/>"):(n=new yb(t),this._newLine="\n"),this._tooltipContent=n}},render:function(e,t,n){if(!J.node){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=e.get("alwaysShowContent");var i=this._tooltipContent;i.update(),i.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var e=this._tooltipModel.get("triggerOn");Vx.register("itemTooltip",this._api,xb((function(t,n,i){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(n,i):"leave"===t&&this._hide(i))}),this))},_keepShow:function(){var e=this._tooltipModel,t=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==e.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY})}))}},manuallyShowTip:function(e,t,n,i){if(i.from!==this.uid&&!J.node){var r=Ob(i,n);this._ticket="";var a=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var o=Tb;o.position=[i.x,i.y],o.update(),o.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:o},r)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,i))return;var s=Ix(i,t),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:i.position,target:s.el},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},manuallyHideTip:function(e,t,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(Ob(i,n))},_manuallyAxisShowTip:function(e,t,n,i){var r=i.seriesIndex,a=i.dataIndex,o=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=t.getSeriesByIndex(r);if(s)if("axis"===(e=Sb([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,e])).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:i.position}),!0}},_tryShow:function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var i=e.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,e):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(e,n,t)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(e,n,t)):(this._lastDataByCoordSys=null,this._hide(t))}},_showOrMove:function(e,t){var n=e.get("showDelay");t=Te.bind(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},_showAxisTooltip:function(e,t){var n=this._ecModel,i=this._tooltipModel,r=[t.offsetX,t.offsetY],a=[],o=[],s=Sb([t.tooltipOption,i]),l=this._renderMode,u=this._newLine,c={};bb(e,(function(e){bb(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value,r=[];if(t&&null!=i){var s=ab.getValueLabel(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt);Te.each(e.seriesDataIndices,(function(a){var u=n.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=Um.getAxisRawValue(t.axis,i),d.axisValueLabel=s,d){o.push(d);var f,p=u.formatTooltip(h,!0,null,l);if(Te.isObject(p)){f=p.html;var g=p.markers;Te.merge(c,g)}else f=p;r.push(f)}}));var h=s;"html"!==l?a.push(r.join(u)):a.push((h?Iu.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,n){var i=this._ecModel,r=t.seriesIndex,a=i.getSeriesByIndex(r),o=t.dataModel||a,s=t.dataIndex,l=t.dataType,u=o.getData(l),c=Sb([u.getItemModel(s),o,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),h=c.get("trigger");if(null==h||"item"===h){var d,f,p=o.getDataParams(s,l),g=o.formatTooltip(s,!1,l,this._renderMode);Te.isObject(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+o.name+"_"+s;this._showOrMove(c,(function(){this._showTooltipContent(c,d,p,m,e.offsetX,e.offsetY,e.position,e.target,f)})),n({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(e,t,n){var i=t.tooltip;if("string"==typeof i){i={content:i,formatter:i}}var r=new vu(i,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)})),n({type:"showTip",from:this.uid})},_showTooltipContent:function(e,t,n,i,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=Iu.formatTpl(c,n,!0);else if("function"==typeof c){var d=xb((function(t,i){t===this._ticket&&(u.setContent(i,l,e),this._updatePosition(e,o,r,a,u,n,s))}),this);this._ticket=i,h=c(n,i,d)}u.setContent(h,l,e),u.show(e),this._updatePosition(e,o,r,a,u,n,s)}},_updatePosition:function(e,t,n,i,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([n,i],a,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),Te.isArray(t))n=wb(t[0],s),i=wb(t[1],l);else if(Te.isObject(t)){t.width=u[0],t.height=u[1];var f=ju.getLayoutRect(t,{width:s,height:l});n=f.x,i=f.y,c=null,h=null}else if("string"==typeof t&&o){var p=function(e,t,n){var i=n[0],r=n[1],a=0,o=0,s=t.width,l=t.height;switch(e){case"inside":a=t.x+s/2-i/2,o=t.y+l/2-r/2;break;case"top":a=t.x+s/2-i/2,o=t.y-r-5;break;case"bottom":a=t.x+s/2-i/2,o=t.y+l+5;break;case"left":a=t.x-i-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);n=p[0],i=p[1]}else{p=function(e,t,n,i,r,a,o){var s=n.getOuterSize(),l=s.width,u=s.height;null!=a&&(e+l+a>i?e-=l+a:e+=a);null!=o&&(t+u+o>r?t-=u+o:t+=o);return[e,t]}(n,i,r,s,l,c?null:20,h?null:20);n=p[0],i=p[1]}if(c&&(n-=Mb(c)?u[0]/2:"right"===c?u[0]:0),h&&(i-=Mb(h)?u[1]/2:"bottom"===h?u[1]:0),e.get("confine")){p=function(e,t,n,i,r){var a=n.getOuterSize(),o=a.width,s=a.height;return e=Math.min(e+o,i)-o,t=Math.min(t+s,r)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,i,r,s,l);n=p[0],i=p[1]}r.moveTo(n,i)},_updateContentNotChangedOnAxis:function(e){var t=this._lastDataByCoordSys,n=!!t&&t.length===e.length;return n&&bb(t,(function(t,i){var r=t.dataByAxis||{},a=(e[i]||{}).dataByAxis||[];(n&=r.length===a.length)&&bb(r,(function(e,t){var i=a[t]||{},r=e.seriesDataIndices||[],o=i.seriesDataIndices||[];(n&=e.value===i.value&&e.axisType===i.axisType&&e.axisId===i.axisId&&r.length===o.length)&&bb(r,(function(e,t){var i=o[t];n&=e.seriesIndex===i.seriesIndex&&e.dataIndex===i.dataIndex}))}))})),this._lastDataByCoordSys=e,!!n},_hide:function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},dispose:function(e,t){J.node||(this._tooltipContent.dispose(),Vx.unregister("itemTooltip",t))}});function Sb(e){for(var t=e.pop();e.length;){var n=e.pop();n&&(vu.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),t=new vu(n,t,t.ecModel))}return t}function Ob(e,t){return e.dispatchAction||Te.bind(t.dispatchAction,t)}function Mb(e){return"center"===e||"middle"===e}Kv.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),Kv.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var Db=xa.isNameSpecified,Ab=lf.legend.selector,kb={all:{type:"all",title:Te.clone(Ab.all)},inverse:{type:"inverse",title:Te.clone(Ab.inverse)}},Cb=Kv.extendComponentModel({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},mergeOption:function(e){Cb.superCall(this,"mergeOption",e),this._updateSelector(e)},_updateSelector:function(e){var t=e.selector;!0===t&&(t=e.selector=["all","inverse"]),Te.isArray(t)&&Te.each(t,(function(e,n){Te.isString(e)&&(e={type:e}),t[n]=Te.merge(e,kb[e.type])}))},optionUpdated:function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var i=e[n].get("name");if(this.isSelected(i)){this.select(i),t=!0;break}}!t&&this.select(e[0].get("name"))}},_updateData:function(e){var t=[],n=[];e.eachRawSeries((function(i){var r,a=i.name;if(n.push(a),i.legendVisualProvider){var o=i.legendVisualProvider.getAllNames();e.isSeriesFiltered(i)||(n=n.concat(o)),o.length?t=t.concat(o):r=!0}else r=!0;r&&Db(i)&&t.push(i.name)})),this._availableNames=n;var i=this.get("data")||t,r=Te.map(i,(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 n=this._data;Te.each(n,(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;Te.each(e,(function(e){t[e.get("name",!0)]=!0}))},inverseSelect:function(){var e=this._data,t=this.option.selected;Te.each(e,(function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]}))},isSelected:function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&Te.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}}}),Ib=Cb;function Eb(e,t,n){var i,r={},a="toggleSelected"===e;return n.eachComponent("legend",(function(n){a&&null!=i?n[i?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),i=n.isSelected(t.name));var o=n.getData();Te.each(o,(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var i=n.isSelected(t);r.hasOwnProperty(t)?r[t]=r[t]&&i:r[t]=i}}))})),"allSelect"===e||"inverseSelect"===e?{selected:r}:{name:t.name,selected:r}}Kv.registerAction("legendToggleSelect","legendselectchanged",Te.curry(Eb,"toggleSelected")),Kv.registerAction("legendAllSelect","legendselectall",Te.curry(Eb,"allSelect")),Kv.registerAction("legendInverseSelect","legendinverseselect",Te.curry(Eb,"inverseSelect")),Kv.registerAction("legendSelect","legendselected",Te.curry(Eb,"select")),Kv.registerAction("legendUnSelect","legendunselected",Te.curry(Eb,"unSelect"));var Nb=ju.getLayoutRect,Rb=ju.box,Lb=ju.positionElement;var Pb=tv.createSymbol,zb={layout:function(e,t,n){var i=t.getBoxLayoutParams(),r=t.get("padding"),a={width:n.getWidth(),height:n.getHeight()},o=Nb(i,a,r);Rb(t.get("orient"),e,t.get("itemGap"),o.width,o.height),Lb(e,i,a,r)},makeBackground:function(e,t){var n=Iu.normalizeCssArray(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),e=new ru.Rect({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1})}}.makeBackground,Yb=Te.curry,Hb=Te.each,Fb=ru.Group;function Bb(e,t,n,i,r,a){var o;return"line"!==t&&t.indexOf("empty")<0?(o=n.getItemStyle(),e.style.stroke=i,a||(o.stroke=r)):o=n.getItemStyle(["borderWidth","borderColor"]),e.setStyle(o)}function jb(e,t,n,i){Wb(e,t,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),Ub(e,t,n,i)}function Ub(e,t,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:i})}function Wb(e,t,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:i})}var Gb=Kv.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new Fb),this._backgroundEl,this.group.add(this._selectorGroup=new Fb),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(e,t,n){var i=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,n,o,a,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),h=ju.getLayoutRect(l,u,c),d=this.layoutInner(e,r,h,i,o,s),f=ju.getLayoutRect(Te.defaults({width:d.width,height:d.height},l),u,c);this.group.attr("position",[f.x-d.x,f.y-d.y]),this.group.add(this._backgroundEl=zb(d,e))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(e,t,n,i,r,a,o){var s=this.getContentGroup(),l=Te.createHashMap(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),Hb(t.getData(),(function(r,a){var o=r.get("name");if(this.newlineDisabled||""!==o&&"\n"!==o){var h=n.getSeriesByName(o)[0];if(!l.get(o))if(h){var d=h.getData(),f=d.getVisual("color"),p=d.getVisual("borderColor");"function"==typeof f&&(f=f(h.getDataParams(0))),"function"==typeof p&&(p=p(h.getDataParams(0)));var g=d.getVisual("legendSymbol")||"roundRect",m=d.getVisual("symbol");this._createItem(o,a,r,t,g,m,e,f,p,u).on("click",Yb(jb,o,null,i,c)).on("mouseover",Yb(Ub,h.name,null,i,c)).on("mouseout",Yb(Wb,h.name,null,i,c)),l.set(o,!0)}else n.eachRawSeries((function(n){if(!l.get(o)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(o))return;var h=s.indexOfName(o),d=s.getItemVisual(h,"color"),f=s.getItemVisual(h,"borderColor");this._createItem(o,a,r,t,"roundRect",null,e,d,f,u).on("click",Yb(jb,null,o,i,c)).on("mouseover",Yb(Ub,null,o,i,c)).on("mouseout",Yb(Wb,null,o,i,c)),l.set(o,!0)}}),this)}else s.add(new Fb({newline:!0}))}),this),r&&this._createSelector(r,t,i,a,o)},_createSelector:function(e,t,n,i,r){var a=this.getSelectorGroup();Hb(e,(function(e){!function(e){var i=e.type,r=new ru.Text({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"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,n,i,r,a,o,s,l,u){var c=i.get("itemWidth"),h=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.get("inactiveBorderColor"),p=i.get("symbolKeepAspect"),g=i.getModel("itemStyle"),m=i.isSelected(e),v=new Fb,y=n.getModel("textStyle"),_=n.get("icon"),x=n.getModel("tooltip"),b=x.parentModel,w=Pb(r=_||r,0,0,c,h,m?s:d,null==p||p);if(v.add(Bb(w,r,g,l,f,m)),!_&&a&&(a!==r||"none"===a)){var T=.8*h;"none"===a&&(a="circle");var S=Pb(a,(c-T)/2,(h-T)/2,T,T,m?s:d,null==p||p);v.add(Bb(S,a,g,l,f,m))}var O="left"===o?c+5:-5,M=o,D=i.get("formatter"),A=e;"string"==typeof D&&D?A=D.replace("{name}",null!=e?e:""):"function"==typeof D&&(A=D(e)),v.add(new ru.Text({style:ru.setTextStyle({},y,{text:A,x:O,y:h/2,textFill:m?y.getTextColor():d,textAlign:M,textVerticalAlign:"middle"})}));var k=new ru.Rect({shape:v.getBoundingRect(),invisible:!0,tooltip:x.get("show")?Te.extend({content:e,formatter:b.get("formatter",!0)||function(){return e},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:e,$vars:["name"]}},x.option):null});return v.add(k),v.eachChild((function(e){e.silent=!0})),k.silent=!u,this.getContentGroup().add(v),ru.setHoverStyle(v),v.__legendDataIndex=t,v},layoutInner:function(e,t,n,i,r,a){var o=this.getContentGroup(),s=this.getSelectorGroup();ju.box(e.get("orient"),o,e.get("itemGap"),n.width,n.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(r){ju.box("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),h=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),f=e.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===a?h[f]+=l[p]+d:u[f]+=c[p]+d,h[1-f]+=l[g]/2-c[g]/2,s.attr("position",h),o.attr("position",u);var v={x:0,y:0};return v[p]=l[p]+d+c[p],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+h[1-f]),v}return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});var Vb=function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0}))};Kv.registerProcessor(Kv.PRIORITY.PROCESSOR.SERIES_FILTER,Vb),Zu.registerSubTypeDefaulter("legend",(function(){return"plain"}));var qb=ju.mergeLayoutParam,Zb=ju.getLayoutParams,Xb=Ib.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,n,i){var r=Zb(e);Xb.superCall(this,"init",e,t,n,i),Kb(this,e,r)},mergeOption:function(e,t){Xb.superCall(this,"mergeOption",e,t),Kb(this,this.option,e)}});function Kb(e,t,n){var i=[1,1];i[e.getOrient().index]=0,qb(t,n,{type:"box",ignoreSize:i})}var Qb=ru.Group,$b=["width","height"],Jb=["x","y"],ew=Gb.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){ew.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new Qb),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Qb),this._showController},resetInner:function(){ew.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(e,t,n,i,r,a,o){var s=this;ew.superCall(this,"renderInner",e,t,n,i,r,a,o);var l=this._controllerGroup,u=t.get("pageIconSize",!0);Te.isArray(u)||(u=[u,u]),h("pagePrev",0);var c=t.getModel("pageTextStyle");function h(e,n){var r=e+"DataIndex",a=ru.createIcon(t.get("pageIcons",!0)[t.getOrient().name][n],{onclick:Te.bind(s._pageGo,s,r,t,i)},{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,n,i,r,a){var o=this.getSelectorGroup(),s=e.getOrient().index,l=$b[s],u=Jb[s],c=$b[1-s],h=Jb[1-s];r&&ju.box("horizontal",o,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),f=o.getBoundingRect(),p=[-f.x,-f.y],g=Te.clone(n);r&&(g[l]=n[l]-f[l]-d);var m=this._layoutContentAndController(e,i,g,s,l,c,h);if(r){if("end"===a)p[s]+=m[l]+d;else{var v=f[l]+d;p[s]-=v,m[u]-=v}m[l]+=f[l]+d,p[1-s]+=m[h]+m[c]/2-f[c]/2,m[c]=Math.max(m[c],f[c]),m[h]=Math.min(m[h],f[h]+p[1-s]),o.attr("position",p)}return m},_layoutContentAndController:function(e,t,n,i,r,a,o){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;ju.box(e.get("orient"),s,e.get("itemGap"),i?n.width:null,i?null:n.height),ju.box("horizontal",u,e.get("pageButtonItemGap",!0));var c=s.getBoundingRect(),h=u.getBoundingRect(),d=this._showController=c[r]>n[r],f=[-c.x,-c.y];t||(f[i]=s.position[i]);var p=[0,0],g=[-h.x,-h.y],m=Te.retrieve2(e.get("pageButtonGap",!0),e.get("itemGap",!0));d&&("end"===e.get("pageButtonPosition",!0)?g[i]+=n[r]-h[r]:p[i]+=h[r]+m);g[1-i]+=c[a]/2-h[a]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[r]=d?n[r]:c[r],v[a]=Math.max(c[a],h[a]),v[o]=Math.min(0,h[o]+g[1-i]),l.__rectSize=n[r],d){var y={x:0,y:0};y[r]=Math.max(n[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 _=this._getPageInfo(e);return null!=_.pageIndex&&ru.updateProps(s,{position:_.contentPosition},!!d&&e),this._updatePageInfoView(e,_),v},_pageGo:function(e,t,n){var i=this._getPageInfo(t)[e];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:t.id})},_updatePageInfoView:function(e,t){var n=this._controllerGroup;Te.each(["pagePrev","pageNext"],(function(i){var r=null!=t[i+"DataIndex"],a=n.childOfName(i);a&&(a.setStyle("fill",r?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),a.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=e.get("pageFormatter"),a=t.pageIndex,o=null!=a?a+1:0,s=t.pageCount;i&&r&&i.setStyle("text",Te.isString(r)?r.replace("{current}",o).replace("{total}",s):r({current:o,total:s}))},_getPageInfo:function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=e.getOrient().index,a=$b[r],o=Jb[r],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,h=c?1:0,d={contentPosition:n.position.slice(),pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[r]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=c;++p)(!(v=y(l[p]))&&m.e>g.s+i||v&&!_(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;p>=-1;--p)(v=y(l[p]))&&_(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(),n=t[o]+e.position[r];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function _(e,t){return e.e>=t&&e.s<=t+i}},_findTargetItemIndex:function(e){return this._showController?(this.getContentGroup().eachChild((function(i,r){var a=i.__legendDataIndex;null==n&&null!=a&&(n=r),a===e&&(t=r)})),null!=t?t:n):0;var t,n}});Kv.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}));var tw,nw,iw,rw=X((function(e,t){var n;n=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){var i=n(2),r=n(3),a=n(4),o=n(22);function s(e){var t=new a(e),n=r(a.prototype.request,t);return i.extend(n,a.prototype,t),i.extend(n,t),n}var l=s(n(10));l.Axios=a,l.create=function(e){return s(o(l.defaults,e))},l.Cancel=n(23),l.CancelToken=n(24),l.isCancel=n(9),l.all=function(e){return Promise.all(e)},l.spread=n(25),e.exports=l,e.exports.default=l},function(e,t,n){var i=n(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 n=0,i=e.length;n<i;n++)t.call(null,e[n],n,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 n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]=n}for(var i=0,r=arguments.length;i<r;i++)u(arguments[i],n);return t},deepMerge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]="object"==typeof n?e({},n):n}for(var i=0,r=arguments.length;i<r;i++)u(arguments[i],n);return t},extend:function(e,t,n){return u(t,(function(t,r){e[r]=n&&"function"==typeof t?i(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t){e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.apply(t,n)}}},function(e,t,n){var i=n(2),r=n(5),a=n(6),o=n(7),s=n(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],n=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;)n=n.then(t.shift(),t.shift());return n},l.prototype.getUri=function(e){return e=s(this.defaults,e),r(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},i.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}})),i.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}})),e.exports=l},function(e,t,n){var i=n(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,n){if(!t)return e;var a;if(n)a=n(t);else if(i.isURLSearchParams(t))a=t.toString();else{var o=[];i.forEach(t,(function(e,t){null!=e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,(function(e){i.isDate(e)?e=e.toISOString():i.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,n){var i=n(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){i.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=r},function(e,t,n){var i=n(2),r=n(8),a=n(9),o=n(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=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.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,n){var i=n(2);e.exports=function(e,t,n){return i.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t){e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){var i=n(2),r=n(11),a={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!i.isUndefined(e)&&i.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=n(12)),s),transformRequest:[function(e,t){return r(t,"Accept"),r(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.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, */*"}}};i.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){l.headers[e]=i.merge(a)})),e.exports=l},function(e,t,n){var i=n(2);e.exports=function(e,t){i.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))}},function(e,t,n){var i=n(2),r=n(13),a=n(5),o=n(16),s=n(19),l=n(20),u=n(14);e.exports=function(e){return new Promise((function(t,c){var h=e.data,d=e.headers;i.isFormData(h)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",g=e.auth.password||"";d.Authorization="Basic "+btoa(p+":"+g)}var m=o(e.baseURL,e.url);if(f.open(e.method.toUpperCase(),a(m,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?s(f.getAllResponseHeaders()):null,i={data:e.responseType&&"text"!==e.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:e,request:f};r(t,c,i),f=null}},f.onabort=function(){f&&(c(u("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(u("Network Error",e,null,f)),f=null},f.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),c(u(t,e,"ECONNABORTED",f)),f=null},i.isStandardBrowserEnv()){var v=n(21),y=(e.withCredentials||l(m))&&e.xsrfCookieName?v.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in f&&i.forEach(d,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete d[t]:f.setRequestHeader(t,e)})),i.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),c(e),f=null)})),void 0===h&&(h=null),f.send(h)}))}},function(e,t,n){var i=n(14);e.exports=function(e,t,n){var r=n.config.validateStatus;!r||r(n.status)?e(n):t(i("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){var i=n(15);e.exports=function(e,t,n,r,a){var o=new Error(e);return i(o,t,n,r,a)}},function(e,t){e.exports=function(e,t,n,i,r){return e.config=t,n&&(e.code=n),e.request=i,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,n){var i=n(17),r=n(18);e.exports=function(e,t){return e&&!i(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,n){var i=n(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,n,a,o={};return e?(i.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=i.trim(e.substr(0,a)).toLowerCase(),n=i.trim(e.substr(a+1)),t){if(o[t]&&r.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},function(e,t,n){var i=n(2);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=i.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){var i=n(2);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,r,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),i.isString(r)&&s.push("path="+r),i.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,n){var i=n(2);e.exports=function(e,t){t=t||{};var n={},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"];i.forEach(r,(function(e){void 0!==t[e]&&(n[e]=t[e])})),i.forEach(a,(function(r){i.isObject(t[r])?n[r]=i.deepMerge(e[r],t[r]):void 0!==t[r]?n[r]=t[r]:i.isObject(e[r])?n[r]=i.deepMerge(e[r]):void 0!==e[r]&&(n[r]=e[r])})),i.forEach(o,(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])}));var s=r.concat(a).concat(o),l=Object.keys(t).filter((function(e){return-1===s.indexOf(e)}));return i.forEach(l,(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])})),n}},function(e,t){function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){var i=n(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 n=this;e((function(e){n.reason||(n.reason=new i(e),t(n.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=n()})),aw=X((function(e,t){e.exports=function(){var t,n;function i(){return t.apply(null,arguments)}function r(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function a(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(o(e,t))return!1;return!0}function l(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function h(e,t){var n,i=[];for(n=0;n<e.length;++n)i.push(t(e[n],n));return i}function d(e,t){for(var n in t)o(t,n)&&(e[n]=t[n]);return o(t,"toString")&&(e.toString=t.toString),o(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,i){return Ot(e,t,n,i,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function g(e){if(null==e._isValid){var t=p(e),i=n.call(t.parsedDateParts,(function(e){return null!=e})),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&i);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function m(e){var t=f(NaN);return null!=e?d(p(t),e):p(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),i=n.length>>>0;for(t=0;t<i;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var v=i.momentProperties=[],y=!1;function _(e,t){var n,i,r;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=p(t)),l(t._locale)||(e._locale=t._locale),v.length>0)for(n=0;n<v.length;n++)l(r=t[i=v[n]])||(e[i]=r);return e}function x(e){_(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,i.updateOffset(this),y=!1)}function b(e){return e instanceof x||null!=e&&null!=e._isAMomentObject}function w(e){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function T(e,t){var n=!0;return d((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,e),n){var r,a,s,l=[];for(a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(s in r+="\n["+a+"] ",arguments[0])o(arguments[0],s)&&(r+=s+": "+arguments[0][s]+", ");r=r.slice(0,-2)}else r=arguments[a];l.push(r)}w(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var S,O={};function M(e,t){null!=i.deprecationHandler&&i.deprecationHandler(e,t),O[e]||(w(t),O[e]=!0)}function D(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function A(e,t){var n,i=d({},e);for(n in t)o(t,n)&&(a(e[n])&&a(t[n])?(i[n]={},d(i[n],e[n]),d(i[n],t[n])):null!=t[n]?i[n]=t[n]:delete i[n]);for(n in e)o(e,n)&&!o(t,n)&&a(e[n])&&(i[n]=d({},i[n]));return i}function k(e){null!=e&&this.set(e)}function C(e,t,n){var i=""+Math.abs(e),r=t-i.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,S=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)o(e,t)&&n.push(t);return n};var I=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,E=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,N={},R={};function L(e,t,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),e&&(R[e]=r),t&&(R[t[0]]=function(){return C(r.apply(this,arguments),t[1],t[2])}),n&&(R[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function P(e,t){return e.isValid()?(t=z(t,e.localeData()),N[t]=N[t]||function(e){var t,n,i,r=e.match(I);for(t=0,n=r.length;t<n;t++)R[r[t]]?r[t]=R[r[t]]:r[t]=(i=r[t]).match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"");return function(t){var i,a="";for(i=0;i<n;i++)a+=D(r[i])?r[i].call(t,e):r[i];return a}}(t),N[t](e)):e.localeData().invalidDate()}function z(e,t){var n=5;function i(e){return t.longDateFormat(e)||e}for(E.lastIndex=0;n>=0&&E.test(e);)e=e.replace(E,i),E.lastIndex=0,n-=1;return e}var Y={};function H(e,t){var n=e.toLowerCase();Y[n]=Y[n+"s"]=Y[t]=e}function F(e){return"string"==typeof e?Y[e]||Y[e.toLowerCase()]:void 0}function B(e){var t,n,i={};for(n in e)o(e,n)&&(t=F(n))&&(i[t]=e[n]);return i}var j={};function U(e,t){j[e]=t}function W(e){return e%4==0&&e%100!=0||e%400==0}function G(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function V(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=G(t)),n}function q(e,t){return function(n){return null!=n?(X(this,e,n),i.updateOffset(this,t),this):Z(this,e)}}function Z(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function X(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&W(e.year())&&1===e.month()&&29===e.date()?(n=V(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),we(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var Q,$=/\d/,J=/\d\d/,ee=/\d{3}/,te=/\d{4}/,ne=/[+-]?\d{6}/,ie=/\d\d?/,re=/\d\d\d\d?/,ae=/\d\d\d\d\d\d?/,oe=/\d{1,3}/,se=/\d{1,4}/,le=/[+-]?\d{1,6}/,ue=/\d+/,ce=/[+-]?\d+/,he=/Z|[+-]\d\d:?\d\d/gi,de=/Z|[+-]\d\d(?::?\d\d)?/gi,fe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function pe(e,t,n){Q[e]=D(t)?t:function(e,i){return e&&n?n:t}}function ge(e,t){return o(Q,e)?Q[e](t._strict,t._locale):new RegExp(me(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,i,r){return t||n||i||r}))))}function me(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}Q={};var ve,ye={};function _e(e,t){var n,i=t;for("string"==typeof e&&(e=[e]),u(t)&&(i=function(e,n){n[t]=V(e)}),n=0;n<e.length;n++)ye[e[n]]=i}function xe(e,t){_e(e,(function(e,n,i,r){i._w=i._w||{},t(e,i._w,i,r)}))}function be(e,t,n){null!=t&&o(ye,e)&&ye[e](t,n._a,n,e)}function we(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,i=(t%(n=12)+n)%n;return e+=(t-i)/12,1===i?W(e)?29:28:31-i%7%2}ve=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},L("M",["MM",2],"Mo",(function(){return this.month()+1})),L("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),L("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),H("month","M"),U("month",8),pe("M",ie),pe("MM",ie,J),pe("MMM",(function(e,t){return t.monthsShortRegex(e)})),pe("MMMM",(function(e,t){return t.monthsRegex(e)})),_e(["M","MM"],(function(e,t){t[1]=V(e)-1})),_e(["MMM","MMMM"],(function(e,t,n,i){var r=n._locale.monthsParse(e,i,n._strict);null!=r?t[1]=r:p(n).invalidMonth=e}));var Te="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Se="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Oe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Me=fe,De=fe;function Ae(e,t,n){var i,r,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)a=f([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(r=ve.call(this._shortMonthsParse,o))?r:null:-1!==(r=ve.call(this._longMonthsParse,o))?r:null:"MMM"===t?-1!==(r=ve.call(this._shortMonthsParse,o))||-1!==(r=ve.call(this._longMonthsParse,o))?r:null:-1!==(r=ve.call(this._longMonthsParse,o))||-1!==(r=ve.call(this._shortMonthsParse,o))?r:null}function ke(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=V(t);else if(!u(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),we(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Ce(e){return null!=e?(ke(this,e),i.updateOffset(this,!0),this):Z(this,"Month")}function Ie(){function e(e,t){return t.length-e.length}var t,n,i=[],r=[],a=[];for(t=0;t<12;t++)n=f([2e3,t]),i.push(this.monthsShort(n,"")),r.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(i.sort(e),r.sort(e),a.sort(e),t=0;t<12;t++)i[t]=me(i[t]),r[t]=me(r[t]);for(t=0;t<24;t++)a[t]=me(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Ee(e){return W(e)?366:365}L("Y",0,0,(function(){var e=this.year();return e<=9999?C(e,4):"+"+e})),L(0,["YY",2],0,(function(){return this.year()%100})),L(0,["YYYY",4],0,"year"),L(0,["YYYYY",5],0,"year"),L(0,["YYYYYY",6,!0],0,"year"),H("year","y"),U("year",1),pe("Y",ce),pe("YY",ie,J),pe("YYYY",se,te),pe("YYYYY",le,ne),pe("YYYYYY",le,ne),_e(["YYYYY","YYYYYY"],0),_e("YYYY",(function(e,t){t[0]=2===e.length?i.parseTwoDigitYear(e):V(e)})),_e("YY",(function(e,t){t[0]=i.parseTwoDigitYear(e)})),_e("Y",(function(e,t){t[0]=parseInt(e,10)})),i.parseTwoDigitYear=function(e){return V(e)+(V(e)>68?1900:2e3)};var Ne=q("FullYear",!0);function Re(e,t,n,i,r,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,i,r,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,i,r,a,o),s}function Le(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Pe(e,t,n){var i=7+t-n;return-(7+Le(e,0,i).getUTCDay()-t)%7+i-1}function ze(e,t,n,i,r){var a,o,s=1+7*(t-1)+(7+n-i)%7+Pe(e,i,r);return s<=0?o=Ee(a=e-1)+s:s>Ee(e)?(a=e+1,o=s-Ee(e)):(a=e,o=s),{year:a,dayOfYear:o}}function Ye(e,t,n){var i,r,a=Pe(e.year(),t,n),o=Math.floor((e.dayOfYear()-a-1)/7)+1;return o<1?i=o+He(r=e.year()-1,t,n):o>He(e.year(),t,n)?(i=o-He(e.year(),t,n),r=e.year()+1):(r=e.year(),i=o),{week:i,year:r}}function He(e,t,n){var i=Pe(e,t,n),r=Pe(e+1,t,n);return(Ee(e)-i+r)/7}function Fe(e,t){return e.slice(t,7).concat(e.slice(0,t))}L("w",["ww",2],"wo","week"),L("W",["WW",2],"Wo","isoWeek"),H("week","w"),H("isoWeek","W"),U("week",5),U("isoWeek",5),pe("w",ie),pe("ww",ie,J),pe("W",ie),pe("WW",ie,J),xe(["w","ww","W","WW"],(function(e,t,n,i){t[i.substr(0,1)]=V(e)})),L("d",0,"do","day"),L("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),L("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),L("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),L("e",0,0,"weekday"),L("E",0,0,"isoWeekday"),H("day","d"),H("weekday","e"),H("isoWeekday","E"),U("day",11),U("weekday",11),U("isoWeekday",11),pe("d",ie),pe("e",ie),pe("E",ie),pe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),pe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),pe("dddd",(function(e,t){return t.weekdaysRegex(e)})),xe(["dd","ddd","dddd"],(function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);null!=r?t.d=r:p(n).invalidWeekday=e})),xe(["d","e","E"],(function(e,t,n,i){t[i]=V(e)}));var Be="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),je="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ue="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),We=fe,Ge=fe,Ve=fe;function qe(e,t,n){var i,r,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)a=f([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(r=ve.call(this._weekdaysParse,o))?r:null:"ddd"===t?-1!==(r=ve.call(this._shortWeekdaysParse,o))?r:null:-1!==(r=ve.call(this._minWeekdaysParse,o))?r:null:"dddd"===t?-1!==(r=ve.call(this._weekdaysParse,o))||-1!==(r=ve.call(this._shortWeekdaysParse,o))||-1!==(r=ve.call(this._minWeekdaysParse,o))?r:null:"ddd"===t?-1!==(r=ve.call(this._shortWeekdaysParse,o))||-1!==(r=ve.call(this._weekdaysParse,o))||-1!==(r=ve.call(this._minWeekdaysParse,o))?r:null:-1!==(r=ve.call(this._minWeekdaysParse,o))||-1!==(r=ve.call(this._weekdaysParse,o))||-1!==(r=ve.call(this._shortWeekdaysParse,o))?r:null}function Ze(){function e(e,t){return t.length-e.length}var t,n,i,r,a,o=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),i=me(this.weekdaysMin(n,"")),r=me(this.weekdaysShort(n,"")),a=me(this.weekdays(n,"")),o.push(i),s.push(r),l.push(a),u.push(i),u.push(r),u.push(a);o.sort(e),s.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){L(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Qe(e,t){return t._meridiemParse}L("H",["HH",2],0,"hour"),L("h",["hh",2],0,Xe),L("k",["kk",2],0,(function(){return this.hours()||24})),L("hmm",0,0,(function(){return""+Xe.apply(this)+C(this.minutes(),2)})),L("hmmss",0,0,(function(){return""+Xe.apply(this)+C(this.minutes(),2)+C(this.seconds(),2)})),L("Hmm",0,0,(function(){return""+this.hours()+C(this.minutes(),2)})),L("Hmmss",0,0,(function(){return""+this.hours()+C(this.minutes(),2)+C(this.seconds(),2)})),Ke("a",!0),Ke("A",!1),H("hour","h"),U("hour",13),pe("a",Qe),pe("A",Qe),pe("H",ie),pe("h",ie),pe("k",ie),pe("HH",ie,J),pe("hh",ie,J),pe("kk",ie,J),pe("hmm",re),pe("hmmss",ae),pe("Hmm",re),pe("Hmmss",ae),_e(["H","HH"],3),_e(["k","kk"],(function(e,t,n){var i=V(e);t[3]=24===i?0:i})),_e(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),_e(["h","hh"],(function(e,t,n){t[3]=V(e),p(n).bigHour=!0})),_e("hmm",(function(e,t,n){var i=e.length-2;t[3]=V(e.substr(0,i)),t[4]=V(e.substr(i)),p(n).bigHour=!0})),_e("hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[3]=V(e.substr(0,i)),t[4]=V(e.substr(i,2)),t[5]=V(e.substr(r)),p(n).bigHour=!0})),_e("Hmm",(function(e,t,n){var i=e.length-2;t[3]=V(e.substr(0,i)),t[4]=V(e.substr(i))})),_e("Hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[3]=V(e.substr(0,i)),t[4]=V(e.substr(i,2)),t[5]=V(e.substr(r))}));var $e,Je=q("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:Se,week:{dow:0,doy:6},weekdays:Be,weekdaysMin:Ue,weekdaysShort:je,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function it(e,t){var n,i=Math.min(e.length,t.length);for(n=0;n<i;n+=1)if(e[n]!==t[n])return n;return i}function rt(e){return e?e.toLowerCase().replace("_","-"):e}function at(t){var n=null;if(void 0===tt[t]&&e&&e.exports)try{n=$e._abbr,K(),ot(n)}catch(e){tt[t]=null}return tt[t]}function ot(e,t){var n;return e&&((n=l(t)?lt(e):st(e,t))?$e=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),$e._abbr}function st(e,t){if(null!==t){var n,i=et;if(t.abbr=e,null!=tt[e])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=tt[e]._config;else if(null!=t.parentLocale)if(null!=tt[t.parentLocale])i=tt[t.parentLocale]._config;else{if(null==(n=at(t.parentLocale)))return nt[t.parentLocale]||(nt[t.parentLocale]=[]),nt[t.parentLocale].push({name:e,config:t}),null;i=n._config}return tt[e]=new k(A(i,t)),nt[e]&&nt[e].forEach((function(e){st(e.name,e.config)})),ot(e),tt[e]}return delete tt[e],null}function lt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return $e;if(!r(e)){if(t=at(e))return t;e=[e]}return function(e){for(var t,n,i,r,a=0;a<e.length;){for(t=(r=rt(e[a]).split("-")).length,n=(n=rt(e[a+1]))?n.split("-"):null;t>0;){if(i=at(r.slice(0,t).join("-")))return i;if(n&&n.length>=t&&it(r,n)>=t-1)break;t--}a++}return $e}(e)}function ut(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>we(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,p(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),p(e)._overflowWeeks&&-1===t&&(t=7),p(e)._overflowWeekday&&-1===t&&(t=8),p(e).overflow=t),e}var ct=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ht=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/Z|[+-]\d\d(?::?\d\d)?/,ft=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],pt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],gt=/^\/?Date\((-?\d+)/i,mt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,vt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function yt(e){var t,n,i,r,a,o,s=e._i,l=ct.exec(s)||ht.exec(s);if(l){for(p(e).iso=!0,t=0,n=ft.length;t<n;t++)if(ft[t][1].exec(l[1])){r=ft[t][0],i=!1!==ft[t][2];break}if(null==r)return void(e._isValid=!1);if(l[3]){for(t=0,n=pt.length;t<n;t++)if(pt[t][1].exec(l[3])){a=(l[2]||" ")+pt[t][0];break}if(null==a)return void(e._isValid=!1)}if(!i&&null!=a)return void(e._isValid=!1);if(l[4]){if(!dt.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=r+(a||"")+(o||""),Tt(e)}else e._isValid=!1}function _t(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function xt(e){var t,n,i,r,a,o,s,l,u=mt.exec(e._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){if(n=u[4],i=u[3],r=u[2],a=u[5],o=u[6],s=u[7],l=[_t(n),Se.indexOf(i),parseInt(r,10),parseInt(a,10),parseInt(o,10)],s&&l.push(parseInt(s,10)),t=l,!function(e,t,n){return!e||je.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(p(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],t,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return vt[e];if(t)return 0;var i=parseInt(n,10),r=i%100;return(i-r)/100*60+r}(u[8],u[9],u[10]),e._d=Le.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),p(e).rfc2822=!0}else e._isValid=!1}function bt(e,t,n){return null!=e?e:null!=t?t:n}function wt(e){var t,n,r,a,o,s=[];if(!e._d){for(r=function(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[2]&&null==e._a[1]&&function(e){var t,n,i,r,a,o,s,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,o=4,n=bt(t.GG,e._a[0],Ye(Mt(),1,4).year),i=bt(t.W,1),((r=bt(t.E,1))<1||r>7)&&(l=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,u=Ye(Mt(),a,o),n=bt(t.gg,e._a[0],u.year),i=bt(t.w,u.week),null!=t.d?((r=t.d)<0||r>6)&&(l=!0):null!=t.e?(r=t.e+a,(t.e<0||t.e>6)&&(l=!0)):r=a),i<1||i>He(n,a,o)?p(e)._overflowWeeks=!0:null!=l?p(e)._overflowWeekday=!0:(s=ze(n,i,r,a,o),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(o=bt(e._a[0],r[0]),(e._dayOfYear>Ee(o)||0===e._dayOfYear)&&(p(e)._overflowDayOfYear=!0),n=Le(o,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Le:Re).apply(null,s),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(p(e).weekdayMismatch=!0)}}function Tt(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],p(e).empty=!0;var t,n,r,a,o,s,l=""+e._i,u=l.length,c=0;for(r=z(e._f,e._locale).match(I)||[],t=0;t<r.length;t++)a=r[t],(n=(l.match(ge(a,e))||[])[0])&&((o=l.substr(0,l.indexOf(n))).length>0&&p(e).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),c+=n.length),R[a]?(n?p(e).empty=!1:p(e).unusedTokens.push(a),be(a,n,e)):e._strict&&!n&&p(e).unusedTokens.push(a);p(e).charsLeftOver=u-c,l.length>0&&p(e).unusedInput.push(l),e._a[3]<=12&&!0===p(e).bigHour&&e._a[3]>0&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var i;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((i=e.isPM(n))&&t<12&&(t+=12),i||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(s=p(e).era)&&(e._a[0]=e._locale.erasConvertYear(s,e._a[0])),wt(e),ut(e)}else xt(e);else yt(e)}function St(e){var t=e._i,n=e._f;return e._locale=e._locale||lt(e._l),null===t||void 0===n&&""===t?m({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),b(t)?new x(ut(t)):(c(t)?e._d=t:r(n)?function(e){var t,n,i,r,a,o,s=!1;if(0===e._f.length)return p(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;r<e._f.length;r++)a=0,o=!1,t=_({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[r],Tt(t),g(t)&&(o=!0),a+=p(t).charsLeftOver,a+=10*p(t).unusedTokens.length,p(t).score=a,s?a<i&&(i=a,n=t):(null==i||a<i||o)&&(i=a,n=t,o&&(s=!0));d(e,n||t)}(e):n?Tt(e):function(e){var t=e._i;l(t)?e._d=new Date(i.now()):c(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=gt.exec(e._i);null===t?(yt(e),!1===e._isValid&&(delete e._isValid,xt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:i.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):r(t)?(e._a=h(t.slice(0),(function(e){return parseInt(e,10)})),wt(e)):a(t)?function(e){if(!e._d){var t=B(e._i),n=void 0===t.day?t.date:t.day;e._a=h([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),wt(e)}}(e):u(t)?e._d=new Date(t):i.createFromInputFallback(e)}(e),g(e)||(e._d=null),e))}function Ot(e,t,n,i,o){var l={};return!0!==t&&!1!==t||(i=t,t=void 0),!0!==n&&!1!==n||(i=n,n=void 0),(a(e)&&s(e)||r(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=o,l._l=n,l._i=e,l._f=t,l._strict=i,function(e){var t=new x(ut(St(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}(l)}function Mt(e,t,n,i){return Ot(e,t,n,i,!1)}i.createFromInputFallback=T("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var Dt=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Mt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:m()})),At=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Mt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:m()}));function kt(e,t){var n,i;if(1===t.length&&r(t[0])&&(t=t[0]),!t.length)return Mt();for(n=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](n)||(n=t[i]);return n}var Ct=["year","quarter","month","week","day","hour","minute","second","millisecond"];function It(e){var t=B(e),n=t.year||0,i=t.quarter||0,r=t.month||0,a=t.week||t.isoWeek||0,s=t.day||0,l=t.hour||0,u=t.minute||0,c=t.second||0,h=t.millisecond||0;this._isValid=function(e){var t,n,i=!1;for(t in e)if(o(e,t)&&(-1===ve.call(Ct,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<Ct.length;++n)if(e[Ct[n]]){if(i)return!1;parseFloat(e[Ct[n]])!==V(e[Ct[n]])&&(i=!0)}return!0}(t),this._milliseconds=+h+1e3*c+6e4*u+1e3*l*60*60,this._days=+s+7*a,this._months=+r+3*i+12*n,this._data={},this._locale=lt(),this._bubble()}function Et(e){return e instanceof It}function Nt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Rt(e,t){L(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+C(~~(e/60),2)+t+C(~~e%60,2)}))}Rt("Z",":"),Rt("ZZ",""),pe("Z",de),pe("ZZ",de),_e(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=Pt(de,e)}));var Lt=/([\+\-]|\d\d)/gi;function Pt(e,t){var n,i,r=(t||"").match(e);return null===r?null:0===(i=60*(n=((r[r.length-1]||[])+"").match(Lt)||["-",0,0])[1]+V(n[2]))?0:"+"===n[0]?i:-i}function zt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(b(e)||c(e)?e.valueOf():Mt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):Mt(e).local()}function Yt(e){return-Math.round(e._d.getTimezoneOffset())}function Ht(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Ft=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Bt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function jt(e,t){var n,i,r,a=e,s=null;return Et(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(s=Ft.exec(e))?(n="-"===s[1]?-1:1,a={y:0,d:V(s[2])*n,h:V(s[3])*n,m:V(s[4])*n,s:V(s[5])*n,ms:V(Nt(1e3*s[6]))*n}):(s=Bt.exec(e))?(n="-"===s[1]?-1:1,a={y:Ut(s[2],n),M:Ut(s[3],n),w:Ut(s[4],n),d:Ut(s[5],n),h:Ut(s[6],n),m:Ut(s[7],n),s:Ut(s[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(r=function(e,t){var n;return e.isValid()&&t.isValid()?(t=zt(t,e),e.isBefore(t)?n=Wt(e,t):((n=Wt(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(Mt(a.from),Mt(a.to)),(a={}).ms=r.milliseconds,a.M=r.months),i=new It(a),Et(e)&&o(e,"_locale")&&(i._locale=e._locale),Et(e)&&o(e,"_isValid")&&(i._isValid=e._isValid),i}function Ut(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Wt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Gt(e,t){return function(n,i){var r;return null===i||isNaN(+i)||(M(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=n,n=i,i=r),Vt(this,jt(n,i),e),this}}function Vt(e,t,n,r){var a=t._milliseconds,o=Nt(t._days),s=Nt(t._months);e.isValid()&&(r=null==r||r,s&&ke(e,Z(e,"Month")+s*n),o&&X(e,"Date",Z(e,"Date")+o*n),a&&e._d.setTime(e._d.valueOf()+a*n),r&&i.updateOffset(e,o||s))}jt.fn=It.prototype,jt.invalid=function(){return jt(NaN)};var qt=Gt(1,"add"),Zt=Gt(-1,"subtract");function Xt(e){return"string"==typeof e||e instanceof String}function Kt(e){return b(e)||c(e)||Xt(e)||u(e)||function(e){var t=r(e),n=!1;return t&&(n=0===e.filter((function(t){return!u(t)&&Xt(e)})).length),t&&n}(e)||function(e){var t,n,i=a(e)&&!s(e),r=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"];for(t=0;t<l.length;t+=1)n=l[t],r=r||o(e,n);return i&&r}(e)||null==e}function Qt(e){var t,n=a(e)&&!s(e),i=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<r.length;t+=1)i=i||o(e,r[t]);return n&&i}function $t(e,t){if(e.date()<t.date())return-$t(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),i=e.clone().add(n,"months");return-(n+(t-i<0?(t-i)/(i-e.clone().add(n-1,"months")):(t-i)/(e.clone().add(n+1,"months")-i)))||0}function Jt(e){var t;return void 0===e?this._locale._abbr:(null!=(t=lt(e))&&(this._locale=t),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var en=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function tn(){return this._locale}function nn(e,t){return(e%t+t)%t}function rn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function an(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function on(e,t){return t.erasAbbrRegex(e)}function sn(){var e,t,n=[],i=[],r=[],a=[],o=this.eras();for(e=0,t=o.length;e<t;++e)i.push(me(o[e].name)),n.push(me(o[e].abbr)),r.push(me(o[e].narrow)),a.push(me(o[e].name)),a.push(me(o[e].abbr)),a.push(me(o[e].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function ln(e,t){L(0,[e,e.length],0,t)}function un(e,t,n,i,r){var a;return null==e?Ye(this,i,r).year:(t>(a=He(e,i,r))&&(t=a),cn.call(this,e,t,n,i,r))}function cn(e,t,n,i,r){var a=ze(e,t,n,i,r),o=Le(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}L("N",0,0,"eraAbbr"),L("NN",0,0,"eraAbbr"),L("NNN",0,0,"eraAbbr"),L("NNNN",0,0,"eraName"),L("NNNNN",0,0,"eraNarrow"),L("y",["y",1],"yo","eraYear"),L("y",["yy",2],0,"eraYear"),L("y",["yyy",3],0,"eraYear"),L("y",["yyyy",4],0,"eraYear"),pe("N",on),pe("NN",on),pe("NNN",on),pe("NNNN",(function(e,t){return t.erasNameRegex(e)})),pe("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),_e(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,i){var r=n._locale.erasParse(e,i,n._strict);r?p(n).era=r:p(n).invalidEra=e})),pe("y",ue),pe("yy",ue),pe("yyy",ue),pe("yyyy",ue),pe("yo",(function(e,t){return t._eraYearOrdinalRegex||ue})),_e(["y","yy","yyy","yyyy"],0),_e(["yo"],(function(e,t,n,i){var r;n._locale._eraYearOrdinalRegex&&(r=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,r):t[0]=parseInt(e,10)})),L(0,["gg",2],0,(function(){return this.weekYear()%100})),L(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),ln("gggg","weekYear"),ln("ggggg","weekYear"),ln("GGGG","isoWeekYear"),ln("GGGGG","isoWeekYear"),H("weekYear","gg"),H("isoWeekYear","GG"),U("weekYear",1),U("isoWeekYear",1),pe("G",ce),pe("g",ce),pe("GG",ie,J),pe("gg",ie,J),pe("GGGG",se,te),pe("gggg",se,te),pe("GGGGG",le,ne),pe("ggggg",le,ne),xe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,i){t[i.substr(0,2)]=V(e)})),xe(["gg","GG"],(function(e,t,n,r){t[r]=i.parseTwoDigitYear(e)})),L("Q",0,"Qo","quarter"),H("quarter","Q"),U("quarter",7),pe("Q",$),_e("Q",(function(e,t){t[1]=3*(V(e)-1)})),L("D",["DD",2],"Do","date"),H("date","D"),U("date",9),pe("D",ie),pe("DD",ie,J),pe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),_e(["D","DD"],2),_e("Do",(function(e,t){t[2]=V(e.match(ie)[0])}));var hn=q("Date",!0);L("DDD",["DDDD",3],"DDDo","dayOfYear"),H("dayOfYear","DDD"),U("dayOfYear",4),pe("DDD",oe),pe("DDDD",ee),_e(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=V(e)})),L("m",["mm",2],0,"minute"),H("minute","m"),U("minute",14),pe("m",ie),pe("mm",ie,J),_e(["m","mm"],4);var dn=q("Minutes",!1);L("s",["ss",2],0,"second"),H("second","s"),U("second",15),pe("s",ie),pe("ss",ie,J),_e(["s","ss"],5);var fn,pn,gn=q("Seconds",!1);for(L("S",0,0,(function(){return~~(this.millisecond()/100)})),L(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),L(0,["SSS",3],0,"millisecond"),L(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),L(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),L(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),L(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),L(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),L(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),H("millisecond","ms"),U("millisecond",16),pe("S",oe,$),pe("SS",oe,J),pe("SSS",oe,ee),fn="SSSS";fn.length<=9;fn+="S")pe(fn,ue);function mn(e,t){t[6]=V(1e3*("0."+e))}for(fn="S";fn.length<=9;fn+="S")_e(fn,mn);pn=q("Milliseconds",!1),L("z",0,0,"zoneAbbr"),L("zz",0,0,"zoneName");var vn=x.prototype;function yn(e){return e}vn.add=qt,vn.calendar=function(e,t){1===arguments.length&&(arguments[0]?Kt(arguments[0])?(e=arguments[0],t=void 0):Qt(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Mt(),r=zt(n,this).startOf("day"),a=i.calendarFormat(this,r)||"sameElse",o=t&&(D(t[a])?t[a].call(this,n):t[a]);return this.format(o||this.localeData().calendar(a,this,Mt(n)))},vn.clone=function(){return new x(this)},vn.diff=function(e,t,n){var i,r,a;if(!this.isValid())return NaN;if(!(i=zt(e,this)).isValid())return NaN;switch(r=6e4*(i.utcOffset()-this.utcOffset()),t=F(t)){case"year":a=$t(this,i)/12;break;case"month":a=$t(this,i);break;case"quarter":a=$t(this,i)/3;break;case"second":a=(this-i)/1e3;break;case"minute":a=(this-i)/6e4;break;case"hour":a=(this-i)/36e5;break;case"day":a=(this-i-r)/864e5;break;case"week":a=(this-i-r)/6048e5;break;default:a=this-i}return n?a:G(a)},vn.endOf=function(e){var t,n;if(void 0===(e=F(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?an:rn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-nn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-nn(t,1e3)-1}return this._d.setTime(t),i.updateOffset(this,!0),this},vn.format=function(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=P(this,e);return this.localeData().postformat(t)},vn.from=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Mt(e).isValid())?jt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},vn.fromNow=function(e){return this.from(Mt(),e)},vn.to=function(e,t){return this.isValid()&&(b(e)&&e.isValid()||Mt(e).isValid())?jt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},vn.toNow=function(e){return this.to(Mt(),e)},vn.get=function(e){return D(this[e=F(e)])?this[e]():this},vn.invalidAt=function(){return p(this).overflow},vn.isAfter=function(e,t){var n=b(e)?e:Mt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=F(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},vn.isBefore=function(e,t){var n=b(e)?e:Mt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=F(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},vn.isBetween=function(e,t,n,i){var r=b(e)?e:Mt(e),a=b(t)?t:Mt(t);return!!(this.isValid()&&r.isValid()&&a.isValid())&&(("("===(i=i||"()")[0]?this.isAfter(r,n):!this.isBefore(r,n))&&(")"===i[1]?this.isBefore(a,n):!this.isAfter(a,n)))},vn.isSame=function(e,t){var n,i=b(e)?e:Mt(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=F(t)||"millisecond")?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},vn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},vn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},vn.isValid=function(){return g(this)},vn.lang=en,vn.locale=Jt,vn.localeData=tn,vn.max=At,vn.min=Dt,vn.parsingFlags=function(){return d({},p(this))},vn.set=function(e,t){if("object"==typeof e){var n,i=function(e){var t,n=[];for(t in e)o(e,t)&&n.push({unit:t,priority:j[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=B(e));for(n=0;n<i.length;n++)this[i[n].unit](e[i[n].unit])}else if(D(this[e=F(e)]))return this[e](t);return this},vn.startOf=function(e){var t,n;if(void 0===(e=F(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?an:rn,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":t=this._d.valueOf(),t-=nn(t,6e4);break;case"second":t=this._d.valueOf(),t-=nn(t,1e3)}return this._d.setTime(t),i.updateOffset(this,!0),this},vn.subtract=Zt,vn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},vn.toObject=function(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},vn.toDate=function(){return new Date(this.valueOf())},vn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?P(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",P(n,"Z")):P(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},vn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,i="moment",r="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=r+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(vn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),vn.toJSON=function(){return this.isValid()?this.toISOString():null},vn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},vn.unix=function(){return Math.floor(this.valueOf()/1e3)},vn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},vn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},vn.eraName=function(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].name;if(i[e].until<=n&&n<=i[e].since)return i[e].name}return""},vn.eraNarrow=function(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].narrow;if(i[e].until<=n&&n<=i[e].since)return i[e].narrow}return""},vn.eraAbbr=function(){var e,t,n,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),i[e].since<=n&&n<=i[e].until)return i[e].abbr;if(i[e].until<=n&&n<=i[e].since)return i[e].abbr}return""},vn.eraYear=function(){var e,t,n,r,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,r=this.clone().startOf("day").valueOf(),a[e].since<=r&&r<=a[e].until||a[e].until<=r&&r<=a[e].since)return(this.year()-i(a[e].since).year())*n+a[e].offset;return this.year()},vn.year=Ne,vn.isLeapYear=function(){return W(this.year())},vn.weekYear=function(e){return un.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},vn.isoWeekYear=function(e){return un.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},vn.quarter=vn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},vn.month=Ce,vn.daysInMonth=function(){return we(this.year(),this.month())},vn.week=vn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},vn.isoWeek=vn.isoWeeks=function(e){var t=Ye(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},vn.weeksInYear=function(){var e=this.localeData()._week;return He(this.year(),e.dow,e.doy)},vn.weeksInWeekYear=function(){var e=this.localeData()._week;return He(this.weekYear(),e.dow,e.doy)},vn.isoWeeksInYear=function(){return He(this.year(),1,4)},vn.isoWeeksInISOWeekYear=function(){return He(this.isoWeekYear(),1,4)},vn.date=hn,vn.day=vn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},vn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},vn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},vn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},vn.hour=vn.hours=Je,vn.minute=vn.minutes=dn,vn.second=vn.seconds=gn,vn.millisecond=vn.milliseconds=pn,vn.utcOffset=function(e,t,n){var r,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Pt(de,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=Yt(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==e&&(!t||this._changeInProgress?Vt(this,jt(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:Yt(this)},vn.utc=function(e){return this.utcOffset(0,e)},vn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Yt(this),"m")),this},vn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Pt(he,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},vn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Mt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},vn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},vn.isLocal=function(){return!!this.isValid()&&!this._isUTC},vn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},vn.isUtc=Ht,vn.isUTC=Ht,vn.zoneAbbr=function(){return this._isUTC?"UTC":""},vn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},vn.dates=T("dates accessor is deprecated. Use date instead.",hn),vn.months=T("months accessor is deprecated. Use month instead",Ce),vn.years=T("years accessor is deprecated. Use year instead",Ne),vn.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),vn.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=St(t))._a?(e=t._isUTC?f(t._a):Mt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var i,r=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),o=0;for(i=0;i<r;i++)(n&&e[i]!==t[i]||!n&&V(e[i])!==V(t[i]))&&o++;return o+a}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var _n=k.prototype;function xn(e,t,n,i){var r=lt(),a=f().set(i,t);return r[n](a,e)}function bn(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return xn(e,t,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=xn(e,i,n,"month");return r}function wn(e,t,n,i){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var r,a=lt(),o=e?a._week.dow:0,s=[];if(null!=n)return xn(t,(n+o)%7,i,"day");for(r=0;r<7;r++)s[r]=xn(t,(r+o)%7,i,"day");return s}_n.calendar=function(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return D(i)?i.call(t,n):i},_n.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(I).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},_n.invalidDate=function(){return this._invalidDate},_n.ordinal=function(e){return this._ordinal.replace("%d",e)},_n.preparse=yn,_n.postformat=yn,_n.relativeTime=function(e,t,n,i){var r=this._relativeTime[n];return D(r)?r(e,t,n,i):r.replace(/%d/i,e)},_n.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return D(n)?n(t):n.replace(/%s/i,t)},_n.set=function(e){var t,n;for(n in e)o(e,n)&&(D(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},_n.eras=function(e,t){var n,r,a,o=this._eras||lt("en")._eras;for(n=0,r=o.length;n<r;++n){switch(typeof o[n].since){case"string":a=i(o[n].since).startOf("day"),o[n].since=a.valueOf()}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":a=i(o[n].until).startOf("day").valueOf(),o[n].until=a.valueOf()}}return o},_n.erasParse=function(e,t,n){var i,r,a,o,s,l=this.eras();for(e=e.toUpperCase(),i=0,r=l.length;i<r;++i)if(a=l[i].name.toUpperCase(),o=l[i].abbr.toUpperCase(),s=l[i].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(o===e)return l[i];break;case"NNNN":if(a===e)return l[i];break;case"NNNNN":if(s===e)return l[i]}else if([a,o,s].indexOf(e)>=0)return l[i]},_n.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?i(e.since).year():i(e.since).year()+(t-e.offset)*n},_n.erasAbbrRegex=function(e){return o(this,"_erasAbbrRegex")||sn.call(this),e?this._erasAbbrRegex:this._erasRegex},_n.erasNameRegex=function(e){return o(this,"_erasNameRegex")||sn.call(this),e?this._erasNameRegex:this._erasRegex},_n.erasNarrowRegex=function(e){return o(this,"_erasNarrowRegex")||sn.call(this),e?this._erasNarrowRegex:this._erasRegex},_n.months=function(e,t){return e?r(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Oe).test(t)?"format":"standalone"][e.month()]:r(this._months)?this._months:this._months.standalone},_n.monthsShort=function(e,t){return e?r(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Oe.test(t)?"format":"standalone"][e.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},_n.monthsParse=function(e,t,n){var i,r,a;if(this._monthsParseExact)return Ae.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=f([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(a="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}},_n.monthsRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||Ie.call(this),e?this._monthsStrictRegex:this._monthsRegex):(o(this,"_monthsRegex")||(this._monthsRegex=De),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},_n.monthsShortRegex=function(e){return this._monthsParseExact?(o(this,"_monthsRegex")||Ie.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(o(this,"_monthsShortRegex")||(this._monthsShortRegex=Me),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},_n.week=function(e){return Ye(e,this._week.dow,this._week.doy).week},_n.firstDayOfYear=function(){return this._week.doy},_n.firstDayOfWeek=function(){return this._week.dow},_n.weekdays=function(e,t){var n=r(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Fe(n,this._week.dow):e?n[e.day()]:n},_n.weekdaysMin=function(e){return!0===e?Fe(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},_n.weekdaysShort=function(e){return!0===e?Fe(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},_n.weekdaysParse=function(e,t,n){var i,r,a;if(this._weekdaysParseExact)return qe.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=f([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(a="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}},_n.weekdaysRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ze.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(o(this,"_weekdaysRegex")||(this._weekdaysRegex=We),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},_n.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ze.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(o(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ge),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},_n.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(o(this,"_weekdaysRegex")||Ze.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(o(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ve),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},_n.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},_n.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ot("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===V(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),i.lang=T("moment.lang is deprecated. Use moment.locale instead.",ot),i.langData=T("moment.langData is deprecated. Use moment.localeData instead.",lt);var Tn=Math.abs;function Sn(e,t,n,i){var r=jt(t,n);return e._milliseconds+=i*r._milliseconds,e._days+=i*r._days,e._months+=i*r._months,e._bubble()}function On(e){return e<0?Math.floor(e):Math.ceil(e)}function Mn(e){return 4800*e/146097}function Dn(e){return 146097*e/4800}function An(e){return function(){return this.as(e)}}var kn=An("ms"),Cn=An("s"),In=An("m"),En=An("h"),Nn=An("d"),Rn=An("w"),Ln=An("M"),Pn=An("Q"),zn=An("y");function Yn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Hn=Yn("milliseconds"),Fn=Yn("seconds"),Bn=Yn("minutes"),jn=Yn("hours"),Un=Yn("days"),Wn=Yn("months"),Gn=Yn("years"),Vn=Math.round,qn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Zn(e,t,n,i,r){return r.relativeTime(t||1,!!n,e,i)}function Xn(e,t,n,i){var r=jt(e).abs(),a=Vn(r.as("s")),o=Vn(r.as("m")),s=Vn(r.as("h")),l=Vn(r.as("d")),u=Vn(r.as("M")),c=Vn(r.as("w")),h=Vn(r.as("y")),d=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||o<=1&&["m"]||o<n.m&&["mm",o]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(d=d||c<=1&&["w"]||c<n.w&&["ww",c]),(d=d||u<=1&&["M"]||u<n.M&&["MM",u]||h<=1&&["y"]||["yy",h])[2]=t,d[3]=+e>0,d[4]=i,Zn.apply(null,d)}var Kn=Math.abs;function Qn(e){return(e>0)-(e<0)||+e}function $n(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,i,r,a,o,s,l=Kn(this._milliseconds)/1e3,u=Kn(this._days),c=Kn(this._months),h=this.asSeconds();return h?(e=G(l/60),t=G(e/60),l%=60,e%=60,n=G(c/12),c%=12,i=l?l.toFixed(3).replace(/\.?0+$/,""):"",r=h<0?"-":"",a=Qn(this._months)!==Qn(h)?"-":"",o=Qn(this._days)!==Qn(h)?"-":"",s=Qn(this._milliseconds)!==Qn(h)?"-":"",r+"P"+(n?a+n+"Y":"")+(c?a+c+"M":"")+(u?o+u+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+i+"S":"")):"P0D"}var Jn=It.prototype;return Jn.isValid=function(){return this._isValid},Jn.abs=function(){var e=this._data;return this._milliseconds=Tn(this._milliseconds),this._days=Tn(this._days),this._months=Tn(this._months),e.milliseconds=Tn(e.milliseconds),e.seconds=Tn(e.seconds),e.minutes=Tn(e.minutes),e.hours=Tn(e.hours),e.months=Tn(e.months),e.years=Tn(e.years),this},Jn.add=function(e,t){return Sn(this,e,t,1)},Jn.subtract=function(e,t){return Sn(this,e,t,-1)},Jn.as=function(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=F(e))||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,n=this._months+Mn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Dn(this._months)),e){case"week":return t/7+i/6048e5;case"day":return t+i/864e5;case"hour":return 24*t+i/36e5;case"minute":return 1440*t+i/6e4;case"second":return 86400*t+i/1e3;case"millisecond":return Math.floor(864e5*t)+i;default:throw new Error("Unknown unit "+e)}},Jn.asMilliseconds=kn,Jn.asSeconds=Cn,Jn.asMinutes=In,Jn.asHours=En,Jn.asDays=Nn,Jn.asWeeks=Rn,Jn.asMonths=Ln,Jn.asQuarters=Pn,Jn.asYears=zn,Jn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*V(this._months/12):NaN},Jn._bubble=function(){var e,t,n,i,r,a=this._milliseconds,o=this._days,s=this._months,l=this._data;return a>=0&&o>=0&&s>=0||a<=0&&o<=0&&s<=0||(a+=864e5*On(Dn(s)+o),o=0,s=0),l.milliseconds=a%1e3,e=G(a/1e3),l.seconds=e%60,t=G(e/60),l.minutes=t%60,n=G(t/60),l.hours=n%24,o+=G(n/24),r=G(Mn(o)),s+=r,o-=On(Dn(r)),i=G(s/12),s%=12,l.days=o,l.months=s,l.years=i,this},Jn.clone=function(){return jt(this)},Jn.get=function(e){return e=F(e),this.isValid()?this[e+"s"]():NaN},Jn.milliseconds=Hn,Jn.seconds=Fn,Jn.minutes=Bn,Jn.hours=jn,Jn.days=Un,Jn.weeks=function(){return G(this.days()/7)},Jn.months=Wn,Jn.years=Gn,Jn.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,i,r=!1,a=qn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(r=e),"object"==typeof t&&(a=Object.assign({},qn,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),n=this.localeData(),i=Xn(this,!r,a,n),r&&(i=n.pastFuture(+this,i)),n.postformat(i)},Jn.toISOString=$n,Jn.toString=$n,Jn.toJSON=$n,Jn.locale=Jt,Jn.localeData=tn,Jn.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",$n),Jn.lang=en,L("X",0,0,"unix"),L("x",0,0,"valueOf"),pe("x",ce),pe("X",/[+-]?\d+(\.\d{1,3})?/),_e("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),_e("x",(function(e,t,n){n._d=new Date(V(e))})),
//! moment.js
i.version="2.29.1",t=Mt,i.fn=vn,i.min=function(){var e=[].slice.call(arguments,0);return kt("isBefore",e)},i.max=function(){var e=[].slice.call(arguments,0);return kt("isAfter",e)},i.now=function(){return Date.now?Date.now():+new Date},i.utc=f,i.unix=function(e){return Mt(1e3*e)},i.months=function(e,t){return bn(e,t,"months")},i.isDate=c,i.locale=ot,i.invalid=m,i.duration=jt,i.isMoment=b,i.weekdays=function(e,t,n){return wn(e,t,n,"weekdays")},i.parseZone=function(){return Mt.apply(null,arguments).parseZone()},i.localeData=lt,i.isDuration=Et,i.monthsShort=function(e,t){return bn(e,t,"monthsShort")},i.weekdaysMin=function(e,t,n){return wn(e,t,n,"weekdaysMin")},i.defineLocale=st,i.updateLocale=function(e,t){if(null!=t){var n,i,r=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(A(tt[e]._config,t)):(null!=(i=at(e))&&(r=i._config),t=A(r,t),null==i&&(t.abbr=e),(n=new k(t)).parentLocale=tt[e],tt[e]=n),ot(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===ot()&&ot(e)):null!=tt[e]&&delete tt[e]);return tt[e]},i.locales=function(){return S(tt)},i.weekdaysShort=function(e,t,n){return wn(e,t,n,"weekdaysShort")},i.normalizeUnits=F,i.relativeTimeRounding=function(e){return void 0===e?Vn:"function"==typeof e&&(Vn=e,!0)},i.relativeTimeThreshold=function(e,t){return void 0!==qn[e]&&(void 0===t?qn[e]:(qn[e]=t,"s"===e&&(qn.ss=t-1),!0))},i.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=vn,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}));!function(e){e.DIMENSION="dimension",e.MAP="map",e.INDICATOR="indicator",e.DETAIL="detail"}(nw||(nw={})),function(e){e.TABLE="table",e.PIE="pie",e.HISTOGRAM_LINE="histogram-line",e.HISTOGRAM_BAR="histogram-bar",e.BAR="bar",e.HISTOGRAM_MIX="histogram-mix",e.GAUGE="gauge",e.INDICATOR_CARD="indicator_card",e.MAP="map",e.DETAIL="detail"}(iw||(iw={}));var ow,sw,lw;Object.freeze(((tw={})[iw.TABLE]=Object.freeze({key:iw.TABLE,name:"表格",iconfont:"icon-table02",iconColor:"#2b9f7f",dataConfigMode:nw.DIMENSION}),tw[iw.PIE]=Object.freeze({key:iw.PIE,name:"饼图",iconfont:"icon-pie_chart",iconColor:"#11c5d4",dataConfigMode:nw.DIMENSION}),tw[iw.HISTOGRAM_LINE]=Object.freeze({key:iw.HISTOGRAM_LINE,name:"线图",iconfont:"icon-line_chart",iconColor:"#0091ff",dataConfigMode:nw.DIMENSION}),tw[iw.HISTOGRAM_BAR]=Object.freeze({key:iw.HISTOGRAM_BAR,name:"柱状图",iconfont:"icon-bar_chart",iconColor:"#ff822f",dataConfigMode:nw.DIMENSION}),tw[iw.INDICATOR_CARD]=Object.freeze({key:iw.INDICATOR_CARD,name:"指标卡",iconfont:"icon-indicator-card",iconColor:"#efce30",dataConfigMode:nw.INDICATOR}),tw[iw.BAR]=Object.freeze({key:iw.BAR,name:"条形图",iconfont:"icon-list",iconColor:"#ff5c31",dataConfigMode:nw.DIMENSION}),tw[iw.HISTOGRAM_MIX]=Object.freeze({key:iw.HISTOGRAM_MIX,name:"柱线混合图",iconfont:"icon-chart",iconColor:"#2b9f7f",dataConfigMode:nw.DIMENSION}),tw[iw.GAUGE]=Object.freeze({key:iw.GAUGE,name:"仪表盘",iconfont:"icon-dash-board",iconColor:"#5071f0",dataConfigMode:nw.DIMENSION}),tw[iw.MAP]=Object.freeze({key:iw.MAP,name:"地图",iconfont:"icon-thermal-map",iconColor:"#2b9f7f",dataConfigMode:nw.MAP}),tw[iw.DETAIL]=Object.freeze({key:iw.DETAIL,name:"明细表",iconfont:"icon-detail-list",iconColor:"#2b9f7f",dataConfigMode:nw.DETAIL}),tw));!function(e){e.CONTAIN="contain",e.NOT_CONTAIN="not-contain",e.STARTWITH="startwidth",e.NOT_STARTWITH="not_startwith",e.ENDWITH="endwith",e.NOT_ENDWITH="not_endwith",e.EQUAL="equal",e.NOT_EQUAL="not_equal",e.NULL_STR="null_str",e.NOT_NULL_STR="not_null_str",e.NULL="null",e.NOT_NULL="not_null"}(lw||(lw={}));var uw;Object.freeze(((ow={})[lw.CONTAIN]=Object.freeze({key:lw.CONTAIN,name:"包含"}),ow[lw.NOT_CONTAIN]=Object.freeze({key:lw.NOT_CONTAIN,name:"不包含"}),ow[lw.STARTWITH]=Object.freeze({key:lw.STARTWITH,name:"开头是"}),ow[lw.NOT_STARTWITH]=Object.freeze({key:lw.NOT_STARTWITH,name:"开头不是"}),ow[lw.ENDWITH]=Object.freeze({key:lw.ENDWITH,name:"结尾是"}),ow[lw.NOT_ENDWITH]=Object.freeze({key:lw.NOT_ENDWITH,name:"结尾不是"}),ow[lw.EQUAL]=Object.freeze({key:lw.EQUAL,name:"等于"}),ow[lw.NOT_EQUAL]=Object.freeze({key:lw.NOT_EQUAL,name:"不等于"}),ow[lw.NULL_STR]=Object.freeze({key:lw.NULL_STR,name:"内容为空"}),ow[lw.NOT_NULL_STR]=Object.freeze({key:lw.NOT_NULL_STR,name:"内容非空"}),ow[lw.NULL]=Object.freeze({key:lw.NULL,name:"为NULL"}),ow[lw.NOT_NULL]=Object.freeze({key:lw.NOT_NULL,name:"不为NULL"}),ow));!function(e){e.EQUAL="equal",e.NOT_EQUAL="not_equal",e.GREAT_THAN="great_than",e.GREAT_EQUAL="great_equal",e.LESS_THAN="less_than",e.LESS_EQUAL="less_equal",e.NULL="null",e.NOT_NULL="not_null"}(uw||(uw={}));var cw,hw,dw;Object.freeze(((sw={})[uw.EQUAL]=Object.freeze({key:uw.EQUAL,name:"等于"}),sw[uw.NOT_EQUAL]=Object.freeze({key:uw.NOT_EQUAL,name:"不等于"}),sw[uw.GREAT_THAN]=Object.freeze({key:uw.GREAT_THAN,name:"大于"}),sw[uw.GREAT_EQUAL]=Object.freeze({key:uw.GREAT_EQUAL,name:"大于等于"}),sw[uw.LESS_THAN]=Object.freeze({key:uw.LESS_THAN,name:"小于"}),sw[uw.LESS_EQUAL]=Object.freeze({key:uw.LESS_EQUAL,name:"小于等于"}),sw[uw.NULL]=Object.freeze({key:uw.NULL,name:"为NULL"}),sw[uw.NOT_NULL]=Object.freeze({key:uw.NOT_NULL,name:"不为NULL"}),sw));!function(e){e.YEAR="year",e.MONTH="month",e.DAY="day",e.TIME="time"}(dw||(dw={}));var fw,pw=Object.freeze(((cw={})[dw.YEAR]=Object.freeze({key:dw.YEAR,name:"年",sqltype:"time-only_year",sqldformat:"only_year"}),cw[dw.MONTH]=Object.freeze({key:dw.MONTH,name:"月",sqltype:"time-only_month",sqldformat:"only_month"}),cw[dw.DAY]=Object.freeze({key:dw.DAY,name:"日",sqltype:"time-only_day",sqldformat:"only_day"}),cw[dw.TIME]=Object.freeze({key:dw.TIME,name:"时间",sqltype:"time-time",sqldformat:"only_time"}),cw));!function(e){e.STRING="string",e.TIME="time",e.INT="int",e.FLOAT="float",e.DOUBLE="double"}(fw||(fw={}));var gw,mw,vw,yw;Object.freeze(((hw={})[fw.STRING]=Object.freeze({key:fw.STRING,name:"文本",iconfont:"icon-word"}),hw[fw.TIME]=Object.freeze({key:fw.TIME,name:"时间",iconfont:"icon-calendar"}),hw[fw.INT]=Object.freeze({key:fw.INT,name:"数值",iconfont:"icon-number"}),hw[fw.FLOAT]=Object.freeze({key:fw.FLOAT,name:"小数",iconfont:"icon-decimal"}),hw[fw.DOUBLE]=Object.freeze({key:fw.DOUBLE,name:"小数",iconfont:"icon-decimal"}),hw));!function(e){e.NONE="none",e.FIRST_TAG="first_tag"}(yw||(yw={}));var _w,xw=Object.freeze(((gw={})[yw.NONE]=Object.freeze({key:yw.NONE,name:"无",getDefault:function(){return{type:yw.NONE}}}),gw[yw.FIRST_TAG]=Object.freeze({key:yw.FIRST_TAG,name:"选中第一项",getDefault:function(){return{type:yw.FIRST_TAG}}}),gw));!function(e){e.ALL="all",e.BEFORE="before",e.CUSTOM="custom"}(_w||(_w={}));var bw,ww=Object.freeze(((mw={})[_w.ALL]=Object.freeze({key:_w.ALL,name:"全选",getDefault:function(){return{type:_w.ALL}}}),mw[_w.BEFORE]=Object.freeze({key:_w.BEFORE,name:"选中前N项",getDefault:function(){return{type:_w.BEFORE,index:1}}}),mw[_w.CUSTOM]=Object.freeze({key:_w.CUSTOM,name:"自定义",getDefault:function(){return{type:_w.CUSTOM,val:[]}}}),mw));!function(e){e.INPUT="input",e.SELECT="select",e.CONDITION="condition",e.TAG="tag",e.TREE="tree"}(bw||(bw={}));var Tw,Sw,Ow=Object.freeze(((vw={})[bw.INPUT]=Object.freeze({key:bw.INPUT,name:"输入框",getDefault:function(){return{default:null}}}),vw[bw.SELECT]=Object.freeze({key:bw.SELECT,name:"下拉框",searchMode:[lw.CONTAIN,lw.STARTWITH,lw.EQUAL],getDefault:function(e){var t=(void 0===e?{}:e).isMultiple,n=void 0!==t&&t;return{isMultiple:n,searchMode:lw.CONTAIN,default:n?[]:null}}}),vw[bw.CONDITION]=Object.freeze({key:bw.CONDITION,name:"条件",getDefault:function(e){var t=void 0===e?{}:e,n=t.searchMode,i=void 0===n?lw.CONTAIN:n,r=t.value;return{default:{searchMode:i,val:void 0===r?null:r}}}}),vw[bw.TAG]=Object.freeze({key:bw.TAG,name:"标签",showTagCount:[10,30,50],getDefault:function(e){var t=(void 0===e?{}:e).isMultiple,n=void 0!==t&&t,i={isMultiple:n,showTagCount:30};return n?Object.assign({},i,{selectedTagCount:null,default:ww[_w.ALL].getDefault()}):Object.assign({},i,{default:xw[yw.NONE].getDefault()})}}),vw[bw.TREE]=Object.freeze({key:bw.TREE,name:"树",getDefault:function(){return{isMultiple:!1,treeCheckStrictly:!1,defaultExpandLevel:1,default:[]}}}),vw));!function(e){e.CONDITION="condition",e.RANGE="num_range"}(Sw||(Sw={}));var Mw,Dw,Aw,kw;Object.freeze(((Tw={})[Sw.CONDITION]=Object.freeze({key:Sw.CONDITION,name:"条件",getDefault:function(e){var t=void 0===e?{}:e,n=t.searchMode,i=void 0===n?uw.EQUAL:n,r=t.value;return{default:{searchMode:i,val:void 0===r?null:r}}}}),Tw[Sw.RANGE]=Object.freeze({key:Sw.RANGE,name:"范围",getDefault:function(){return{default:[null,null]}}}),Tw));!function(e){e.NONE="none",e.CURRENT="current",e.CUSTOM="custom"}(kw||(kw={}));var Cw,Iw=Object.freeze(((Mw={})[kw.NONE]=Object.freeze({key:kw.NONE,name:"无",getDefault:function(){return{type:kw.NONE}}}),Mw[kw.CURRENT]=Object.freeze({key:kw.CURRENT,name:"当前时间",getDefault:function(){return{type:kw.CURRENT}}}),Mw[kw.CUSTOM]=Object.freeze({key:kw.CUSTOM,name:"自定义",getDefault:function(){return{type:kw.CUSTOM,val:null}}}),Mw));!function(e){e.NONE="none",e.TODAY="today",e.YESTERDAY="yesterday",e.THIS_WEEK="this_week",e.LAST_WEEK="last_week",e.THIS_MONTH="this_month",e.LAST_MONTH="last_month",e.THIS_QUARTER="this_quarter",e.LAST_QUARTER="last_quarter",e.THIS_YEAR="this_year",e.LAST_YEAR="last_year",e.NEARLY_A_WEEK="nearly_a_week",e.NEARLY_A_MONTH="nearly_a_month",e.NEARLY_A_YEAR="nearly_a_year",e.CUSTOM="custom"}(Cw||(Cw={}));var Ew,Nw=Object.freeze(((Dw={})[Cw.NONE]=Object.freeze({key:Cw.NONE,name:"无",getDefault:function(){return{type:Cw.NONE}}}),Dw[Cw.TODAY]=Object.freeze({key:Cw.TODAY,name:"当天",getDefault:function(){return{type:Cw.TODAY}}}),Dw[Cw.YESTERDAY]=Object.freeze({key:Cw.YESTERDAY,name:"昨天",getDefault:function(){return{type:Cw.YESTERDAY}}}),Dw[Cw.THIS_WEEK]=Object.freeze({key:Cw.THIS_WEEK,name:"本周",getDefault:function(){return{type:Cw.THIS_WEEK}}}),Dw[Cw.LAST_WEEK]=Object.freeze({key:Cw.LAST_WEEK,name:"上周",getDefault:function(){return{type:Cw.LAST_WEEK}}}),Dw[Cw.THIS_MONTH]=Object.freeze({key:Cw.THIS_MONTH,name:"本月",getDefault:function(){return{type:Cw.THIS_MONTH}}}),Dw[Cw.LAST_MONTH]=Object.freeze({key:Cw.LAST_MONTH,name:"上月",getDefault:function(){return{type:Cw.LAST_MONTH}}}),Dw[Cw.THIS_QUARTER]=Object.freeze({key:Cw.THIS_QUARTER,name:"本季度",getDefault:function(){return{type:Cw.THIS_QUARTER}}}),Dw[Cw.LAST_QUARTER]=Object.freeze({key:Cw.LAST_QUARTER,name:"上季度",getDefault:function(){return{type:Cw.LAST_QUARTER}}}),Dw[Cw.THIS_YEAR]=Object.freeze({key:Cw.THIS_YEAR,name:"今年",getDefault:function(){return{type:Cw.THIS_YEAR}}}),Dw[Cw.LAST_YEAR]=Object.freeze({key:Cw.LAST_YEAR,name:"去年",getDefault:function(){return{type:Cw.LAST_YEAR}}}),Dw[Cw.NEARLY_A_WEEK]=Object.freeze({key:Cw.NEARLY_A_WEEK,name:"最近一周",getDefault:function(){return{type:Cw.NEARLY_A_WEEK}}}),Dw[Cw.NEARLY_A_MONTH]=Object.freeze({key:Cw.NEARLY_A_MONTH,name:"最近一月",getDefault:function(){return{type:Cw.NEARLY_A_MONTH}}}),Dw[Cw.NEARLY_A_YEAR]=Object.freeze({key:Cw.NEARLY_A_YEAR,name:"最近一年",getDefault:function(){return{type:Cw.NEARLY_A_YEAR}}}),Dw[Cw.CUSTOM]=Object.freeze({key:Cw.CUSTOM,name:"自定义",getDefault:function(){return{type:Cw.CUSTOM,val:[null,null]}}}),Dw));!function(e){e.DATE="date",e.DATE_RANGE="date_range",e.DATETIME="datetime",e.DATETIME_RANGE="datetime_range",e.TIME="time",e.TIME_RANGE="time_range",e.YEAR="year",e.MONTH="month",e.DAY="day"}(Ew||(Ew={}));var Rw,Lw;Object.freeze(((Aw={})[Ew.DATE]=Object.freeze({key:Ew.DATE,name:"日期选择",getDefault:function(){return{default:Iw[kw.NONE].getDefault()}}}),Aw[Ew.DATE_RANGE]=Object.freeze({key:Ew.DATE_RANGE,name:"日期范围",getDefault:function(){return{default:Nw[Cw.NONE].getDefault()}}}),Aw[Ew.DATETIME]=Object.freeze({key:Ew.DATETIME,name:"日期时间选择",getDefault:function(){return{default:Iw[kw.NONE].getDefault()}}}),Aw[Ew.DATETIME_RANGE]=Object.freeze({key:Ew.DATETIME_RANGE,name:"日期时间范围",getDefault:function(){return{default:Nw[Cw.NONE].getDefault()}}}),Aw[Ew.TIME]=Object.freeze({key:Ew.TIME,name:"时间选择",getDefault:function(){return{default:Iw[kw.NONE].getDefault()}}}),Aw[Ew.TIME_RANGE]=Object.freeze({key:Ew.TIME_RANGE,name:"时间范围",getDefault:function(){return{default:Nw[Cw.NONE].getDefault()}}}),Aw[Ew.YEAR]=Object.freeze({key:Ew.YEAR,name:"年",getDefault:function(){return{default:Iw[kw.NONE].getDefault()}}}),Aw[Ew.MONTH]=Object.freeze({key:Ew.MONTH,name:"月",getDefault:function(){return{default:Iw[kw.NONE].getDefault()}}}),Aw[Ew.DAY]=Object.freeze({key:Ew.DAY,name:"日",getDefault:function(){return{default:Iw[kw.NONE].getDefault()}}}),Aw));!function(e){e.NONE="none",e.COMPAREWITH_YEAR="comparewith_year",e.COMPAREWITH="comparewith",e.COMPAREWITH_YEAR_NUM="comparewith_year_num",e.COMPAREWITH_NUM="comparewith_num"}(Lw||(Lw={}));var Pw,zw,Yw,Hw;Object.freeze(((Rw={})[Lw.NONE]=Object.freeze({key:Lw.NONE,name:"不对比",label:"不对比"}),Rw[Lw.COMPAREWITH_YEAR]=Object.freeze({key:Lw.COMPAREWITH_YEAR,name:"同比增长率",label:"同比增长率"}),Rw[Lw.COMPAREWITH]=Object.freeze({key:Lw.COMPAREWITH,name:"环比增长率",label:"环比增长率"}),Rw[Lw.COMPAREWITH_YEAR_NUM]=Object.freeze({key:Lw.COMPAREWITH_YEAR_NUM,name:"同比增长值",label:"同比增长值"}),Rw[Lw.COMPAREWITH_NUM]=Object.freeze({key:Lw.COMPAREWITH_NUM,name:"环比增长值",label:"环比增长值"}),Rw));!function(e){e.NONE="none",e.DATA="data",e.TIME="time",e.PERCENT="percent"}(Hw||(Hw={}));var Fw;Object.freeze(((Pw={})[Hw.NONE]=Object.freeze({key:Hw.NONE,label:"默认"}),Pw[Hw.DATA]=Object.freeze({key:Hw.DATA,label:"数值"}),Pw[Hw.TIME]=Object.freeze({key:Hw.TIME,label:"时间"}),Pw[Hw.PERCENT]=Object.freeze({key:Hw.PERCENT,label:"百分比"}),Pw));!function(e){e.NONE="none",e.CN_K="k-cn",e.CN_10K="10k-cn",e.CN_100K="100k-cn",e.CN_M="m-cn",e.CN_10M="10m-cn",e.CN_100M="100m-cn",e.EN_K="k-en",e.EN_M="m-en",e.EN_B="b-en"}(Fw||(Fw={}));var Bw;Object.freeze(((zw={})[Fw.NONE]=Object.freeze({key:Fw.NONE,label:"无",value:1}),zw[Fw.CN_K]=Object.freeze({key:Fw.CN_K,label:"千",value:Math.pow(10,3)}),zw[Fw.CN_10K]=Object.freeze({key:Fw.CN_10K,label:"万",value:Math.pow(10,4)}),zw[Fw.CN_100K]=Object.freeze({key:Fw.CN_100K,label:"十万",value:Math.pow(10,5)}),zw[Fw.CN_M]=Object.freeze({key:Fw.CN_M,label:"百万",value:Math.pow(10,6)}),zw[Fw.CN_10M]=Object.freeze({key:Fw.CN_10M,label:"千万",value:Math.pow(10,7)}),zw[Fw.CN_100M]=Object.freeze({key:Fw.CN_100M,label:"亿",value:Math.pow(10,8)}),zw[Fw.EN_K]=Object.freeze({key:Fw.EN_K,label:"K",value:Math.pow(10,3)}),zw[Fw.EN_M]=Object.freeze({key:Fw.EN_M,label:"M",value:Math.pow(10,6)}),zw[Fw.EN_B]=Object.freeze({key:Fw.EN_B,label:"B",value:Math.pow(10,9)}),zw));!function(e){e.YEAR="year",e.MONTH="month",e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second",e.MILLISECOND="millisecond"}(Bw||(Bw={}));var jw,Uw,Ww,Gw;Object.freeze(((Yw={})[Bw.YEAR]=Object.freeze({key:Bw.YEAR,label:"年",value:31536e6}),Yw[Bw.MONTH]=Object.freeze({key:Bw.MONTH,label:"月",value:2592e6}),Yw[Bw.DAY]=Object.freeze({key:Bw.DAY,label:"日",value:864e5}),Yw[Bw.HOUR]=Object.freeze({key:Bw.HOUR,label:"小时",value:36e5}),Yw[Bw.MINUTE]=Object.freeze({key:Bw.MINUTE,label:"分钟",value:6e4}),Yw[Bw.SECOND]=Object.freeze({key:Bw.SECOND,label:"秒",value:1e3}),Yw[Bw.MILLISECOND]=Object.freeze({key:Bw.MILLISECOND,label:"毫秒",value:1}),Yw));!function(e){e.ZERO="0",e.ONE="1",e.TWO="2",e.THREE="3",e.FOUR="4",e.FIVE="5",e.SIX="6"}(jw||(jw={})),function(e){e.DEFAULT="default",e.NONE="none",e.CN_YYYYMMDD="%Y年%m月%d日",e.MIDDLE_DASH_YYYYMMDD="%Y-%m-%d",e.SLASH_YYYYMMDD="%y/%m/%d",e.CN_YYYYMM="%Y年%m月",e.MIDDLE_DASH_YYYYMM="%Y-%m",e.SLASH_YYYYMM="%y/%m",e.CN_YYYY="%Y年",e.YYYY="%Y",e.CN_MM="%m月",e.MM="%m",e.CN_DD="%d日",e.DD="%d"}(Gw||(Gw={}));var Vw;Object.freeze(((Uw={})[Gw.DEFAULT]=Object.freeze({key:Gw.DEFAULT,label:"默认"}),Uw[Gw.NONE]=Object.freeze({key:Gw.NONE,label:"隐藏"}),Uw[Gw.CN_YYYYMMDD]=Object.freeze({key:Gw.CN_YYYYMMDD,label:"2019年03月01日(yyyy年mm月dd日)"}),Uw[Gw.MIDDLE_DASH_YYYYMMDD]=Object.freeze({key:Gw.MIDDLE_DASH_YYYYMMDD,label:"2019-03-01(yyyy-mm-dd)"}),Uw[Gw.SLASH_YYYYMMDD]=Object.freeze({key:Gw.SLASH_YYYYMMDD,label:"19/03/01(yy/mm/dd)"}),Uw[Gw.CN_YYYYMM]=Object.freeze({key:Gw.CN_YYYYMM,label:"2019年03月(yyyy年mm月)"}),Uw[Gw.MIDDLE_DASH_YYYYMM]=Object.freeze({key:Gw.MIDDLE_DASH_YYYYMM,label:"2019-03(yyyy-mm)"}),Uw[Gw.SLASH_YYYYMM]=Object.freeze({key:Gw.SLASH_YYYYMM,label:"2019/03(yyyy/mm)"}),Uw[Gw.CN_YYYY]=Object.freeze({key:Gw.CN_YYYY,label:"2019年(yyyy年)"}),Uw[Gw.YYYY]=Object.freeze({key:Gw.YYYY,label:"2019(yyyy)"}),Uw[Gw.CN_MM]=Object.freeze({key:Gw.CN_MM,label:"03月(mm月)"}),Uw[Gw.MM]=Object.freeze({key:Gw.MM,label:"03(mm)"}),Uw[Gw.CN_DD]=Object.freeze({key:Gw.CN_DD,label:"01日(dd日)"}),Uw[Gw.DD]=Object.freeze({key:Gw.DD,label:"01(dd)"}),Uw));!function(e){e.DEFAULT="default",e.NONE="none",e.HMS="%H:%i:%s",e.HM="%H:%i",e.CN_HMS="%H时%i分%s秒",e.CN_HM="%H时%i",e.CN_H="%H时",e.RISP="%r:%i:%s %p",e.RIP="%r:%i %p"}(Vw||(Vw={}));var qw,Zw,Xw;Object.freeze(((Ww={})[Vw.DEFAULT]=Object.freeze({key:Vw.DEFAULT,label:"默认"}),Ww[Gw.NONE]=Object.freeze({key:Gw.NONE,label:"隐藏"}),Ww[Vw.HMS]=Object.freeze({key:Vw.HMS,label:"12:00:00"}),Ww[Vw.HM]=Object.freeze({key:Vw.HM,label:"12:00"}),Ww[Vw.CN_HMS]=Object.freeze({key:Vw.CN_HMS,label:"12时00分00秒"}),Ww[Vw.CN_HM]=Object.freeze({key:Vw.CN_HM,label:"12时00"}),Ww[Vw.CN_H]=Object.freeze({key:Vw.CN_H,label:"12时"}),Ww[Vw.RISP]=Object.freeze({key:Vw.RISP,label:"12:00:00 AM"}),Ww[Vw.RIP]=Object.freeze({key:Vw.RIP,label:"12:00 AM"}),Ww));!function(e){e.NONE="none",e.DRILL="drill",e.DETAIL="detail"}(Xw||(Xw={}));var Kw;Object.freeze(((qw={})[Xw.NONE]=Object.freeze({key:Xw.NONE,label:"无点击事件"}),qw[Xw.DRILL]=Object.freeze({key:Xw.DRILL,label:"下钻"}),qw[Xw.DETAIL]=Object.freeze({key:Xw.DETAIL,label:"显示详细表"}),qw));!function(e){e.DIALOG="dialog"}(Kw||(Kw={}));var Qw,$w;Object.freeze(((Zw={})[Kw.DIALOG]=Object.freeze({key:Kw.DIALOG,label:"通过弹窗显示",getDefaultConfig:function(){return{mode:Kw.DIALOG,condition:{targetSetId:void 0,filter:[]}}},getDefaultFilerItem:function(){return{sourceFieldId:null,sourceFieldScope:null,targetFieldId:null,targetFieldScope:null}}}),Zw));!function(e){e.NONE="none",e.SUM="sum",e.COUNT="count",e.DISTINCT="count_distinct",e.AVG="avg",e.MAX="max",e.MIN="min"}($w||($w={}));var Jw,eT;Object.freeze(((Qw={})[$w.NONE]=Object.freeze({key:$w.NONE,name:"不计算",label:"不计算"}),Qw[$w.SUM]=Object.freeze({key:$w.SUM,name:"求和",label:"求和"}),Qw[$w.COUNT]=Object.freeze({key:$w.COUNT,name:"计次",label:"计次"}),Qw[$w.DISTINCT]=Object.freeze({key:$w.DISTINCT,name:"计数",label:"计数"}),Qw[$w.AVG]=Object.freeze({key:$w.AVG,name:"平均",label:"平均"}),Qw[$w.MAX]=Object.freeze({key:$w.MAX,name:"最大值",label:"最大值"}),Qw[$w.MIN]=Object.freeze({key:$w.MIN,name:"最小值",label:"最小值"}),Qw));!function(e){e.NONE="none",e.SHOW_NULL="null",e.SHOW_ZERO="zero",e.SHOW_STRIKETHROUGH="strikethrough"}(eT||(eT={}));var tT,nT;Object.freeze(((Jw={})[eT.NONE]=Object.freeze({key:eT.NONE,label:"默认"}),Jw[eT.SHOW_NULL]=Object.freeze({key:eT.SHOW_NULL,label:"显示为 null"}),Jw[eT.SHOW_ZERO]=Object.freeze({key:eT.SHOW_ZERO,label:"显示为 0"}),Jw[eT.SHOW_STRIKETHROUGH]=Object.freeze({key:eT.SHOW_STRIKETHROUGH,label:"显示为-"}),Jw));!function(e){e.NONE="none",e.ASC="asc",e.DESC="desc"}(nT||(nT={}));var iT;Object.freeze(((tT={})[nT.NONE]=Object.freeze({key:nT.NONE,name:"默认",label:"默认"}),tT[nT.ASC]=Object.freeze({key:nT.ASC,name:"↑",label:"升序 ↑"}),tT[nT.DESC]=Object.freeze({key:nT.DESC,name:"↓",label:"降序 ↓"}),tT));function rT(e){var t=e.dformat,n=e.tformat,i=[];return t&&t!==Gw.DEFAULT?t!==Gw.NONE&&i.push(t):i.push(Gw.MIDDLE_DASH_YYYYMMDD),n&&n!==Vw.DEFAULT?n!==Gw.NONE&&i.push(n):i.push(Vw.HMS),i.join(" ")}!function(e){e.NAME="rename",e.EXPR="expr",e.ORDER_BY="orderBy",e.FILTER="filter",e.EVENT="event",e.COMPARE="compare",e.DATA_FORMAT="data-format",e.DATE_FORMAT="date-format",e.TIME_FORMAT="time-format",e.NULL_VAL="nullVal",e.EARLY_WARNING="earlyWarning",e.DELETE="delete"}(iT||(iT={}));var aT=function(e){var t=e.value;return 0===t.length||t.findIndex((function(e){return e||0===e}))<0},oT=function(e){var t=e.value,n=e.dateFormat;switch(t.type){case kw.NONE:return null;case kw.CURRENT:return aw().format(n);case kw.CUSTOM:return t.val}},sT=function(e){var t=e.value,n=e.dateFormat;switch(t.type){case Cw.NONE:return[null,null];case Cw.TODAY:var i=aw().startOf("d"),r=aw().endOf("d");return[i.format(n),r.format(n)];case Cw.YESTERDAY:var a=aw().add(-1,"days").startOf("d"),o=aw().add(-1,"days").endOf("d");return[a.format(n),o.format(n)];case Cw.THIS_WEEK:var s=aw().startOf("isoWeeks").startOf("d"),l=aw().endOf("isoWeeks").endOf("d");return[s.format(n),l.format(n)];case Cw.LAST_WEEK:var u=aw().add(-7,"day").startOf("isoWeeks").startOf("d"),c=aw().add(-7,"day").endOf("isoWeeks").endOf("d");return[u.format(n),c.format(n)];case Cw.THIS_MONTH:var h=aw().startOf("month").startOf("d"),d=aw().endOf("month").endOf("d");return[h.format(n),d.format(n)];case Cw.LAST_MONTH:var f=aw().add(-1,"month").startOf("month").startOf("d"),p=aw().add(-1,"month").endOf("month").endOf("d");return[f.format(n),p.format(n)];case Cw.THIS_QUARTER:var g=aw().startOf("quarter").startOf("d"),m=aw().endOf("quarter").endOf("d");return[g.format(n),m.format(n)];case Cw.LAST_QUARTER:var v=aw().add(-1,"quarter").startOf("quarter").startOf("d"),y=aw().add(-1,"quarter").endOf("quarter").endOf("d");return[v.format(n),y.format(n)];case Cw.THIS_YEAR:var _=aw().startOf("year").startOf("d"),x=aw().endOf("year").endOf("d");return[_.format(n),x.format(n)];case Cw.LAST_YEAR:var b=aw().add(-1,"year").startOf("year").startOf("d"),w=aw().add(-1,"year").endOf("year").endOf("d");return[b.format(n),w.format(n)];case Cw.NEARLY_A_WEEK:var T=aw().add(1,"day").add(-1,"week"),S=aw();return[T.format(n),S.format(n)];case Cw.NEARLY_A_MONTH:var O=aw().add(1,"day").add(-1,"month"),M=aw();return[O.format(n),M.format(n)];case Cw.NEARLY_A_YEAR:var D=aw().add(1,"day").add(-1,"year"),A=aw();return[D.format(n),A.format(n)];case Cw.CUSTOM:return t.val||[null,null]}},lT={},uT=function(e){var t=e.shareId,n=e.field,i=e.getTableColumnValueFunc;return o(void 0,void 0,void 0,(function(){var e,r,a,o,l,u,c,h,d,f,p,g,m,v,y,_,x,b,w,T,S;return s(this,(function(s){switch(s.label){case 0:if("string"==typeof n.filter)return[2,{op:"=",value:[n.filter],options:[]}];switch(e=null,r=Reflect.has(n.filter.params,"value"),n.type){case fw.STRING:return[3,1];case fw.TIME:return[3,23];case fw.INT:case fw.FLOAT:case fw.DOUBLE:return[3,24]}return[3,25];case 1:switch(n.filter.type){case bw.INPUT:return[3,2];case bw.SELECT:return[3,3];case bw.CONDITION:return[3,4];case bw.TAG:return[3,5];case bw.TREE:return[3,21]}return[3,22];case 2:return a=r?[n.filter.params.value]:[n.filter.params.default],e={op:"**",value:a,options:[]},[3,22];case 3:return o=r?n.filter.params.value:n.filter.params.default,n.filter.params.isMultiple||(o=[o]),e={op:"=",value:[],options:o},[3,22];case 4:switch(w=void 0,T=void 0,S=void 0,r?(w=n.filter.params.value.val,S=n.filter.params.value.searchMode):(w=n.filter.params.default.val,S=n.filter.params.default.searchMode),S){case lw.CONTAIN:T="**";break;case lw.NOT_CONTAIN:T="!**";break;case lw.STARTWITH:T="*=";break;case lw.NOT_STARTWITH:T="!*=";break;case lw.ENDWITH:T="=*";break;case lw.NOT_ENDWITH:T="!=*";break;case lw.EQUAL:T="=";break;case lw.NOT_EQUAL:T="<>";break;case lw.NULL_STR:T="empty";break;case lw.NOT_NULL_STR:T="ne";break;case lw.NULL:T="null";break;case lw.NOT_NULL:T="nn"}return e={op:T,value:[w],options:[]},[3,22];case 5:return l=void 0,u="=",r?(n.filter.params.isMultiple?(u=n.filter.params.value.exclude?"!=":"=",l=n.filter.params.value.val):l=[n.filter.params.value],[3,20]):[3,6];case 6:if(!n.filter.params.isMultiple)return[3,14];switch(n.filter.params.default.type){case _w.ALL:return[3,7];case _w.BEFORE:return[3,8];case _w.CUSTOM:return[3,12]}return[3,13];case 7:return l=[],[3,13];case 8:return c=[],lT[n.key]?(c=lT[n.key],[3,11]):[3,9];case 9:return[4,i({share_id:t,field:n.key,pp:Math.max.apply(Math,Ow[bw.TAG].showTagCount),pg:1})];case 10:c=s.sent(),s.label=11;case 11:return l=c.slice(0,n.filter.params.default.index),[3,13];case 12:return l=n.filter.params.default.val,[3,13];case 13:return[3,20];case 14:switch(n.filter.params.default.type){case yw.NONE:return[3,15];case yw.FIRST_TAG:return[3,16]}return[3,20];case 15:return l=[],[3,20];case 16:return c=[],lT[n.key]?(c=lT[n.key],[3,19]):[3,17];case 17:return[4,i({field:n.key,pp:Math.max.apply(Math,Ow[bw.TAG].showTagCount),pg:1})];case 18:c=s.sent(),s.label=19;case 19:return l=c.length>0?[c[0]]:[],[3,20];case 20:return e={op:u,value:[],options:l},[3,22];case 21:return n.filter.params.isMultiple?(h=r?n.filter.params.value:n.filter.params.default,o=h.map((function(e){return e.split(">",1)[0]}))):(d=n.filter.params.value||n.filter.params.default,o=[d.split(">",1)[0]]),e={op:"=",value:[],options:o},n.filter.params.treeCheckStrictly&&(e.level="mutil"),[3,22];case 22:return[3,25];case 23:switch(n.filter.type){case Ew.DATE:f=void 0,f=r?n.filter.params.value:oT({value:n.filter.params.default,dateFormat:"YYYY-MM-DD"}),e={op:"between",value:f?[f+" 00:00:00",f+" 23:59:59"]:[],options:[]};break;case Ew.DATE_RANGE:p=void 0,p=r?n.filter.params.value:sT({value:n.filter.params.default,dateFormat:"YYYY-MM-DD"}),e={op:"between",value:[p[0]&&p[0]+" 00:00:00",p[1]&&p[1]+" 23:59:59"],options:[]};break;case Ew.DATETIME:g=void 0,g=r?n.filter.params.value:oT({value:n.filter.params.default,dateFormat:"YYYY-MM-DD HH:mm:ss"}),e={op:"=",value:[g],options:[]};break;case Ew.DATETIME_RANGE:m=void 0,m=r?n.filter.params.value:sT({value:n.filter.params.default,dateFormat:"YYYY-MM-DD HH:mm:ss"}),e={op:"between",value:m,options:[]};break;case Ew.TIME:v=void 0,v=r?n.filter.params.value:oT({value:n.filter.params.default,dateFormat:"HH:mm:ss"}),e={op:"=",dformat:"only_time",value:[v],options:[]};break;case Ew.TIME_RANGE:y=void 0,y=r?n.filter.params.value:sT({value:n.filter.params.default,dateFormat:"HH:mm:ss"}),e={op:"between",dformat:"only_time",value:y,options:[]};break;case Ew.YEAR:_=void 0,_=r?n.filter.params.value:oT({value:n.filter.params.default,dateFormat:"YYYY"}),e={op:"@only_year",value:[],options:[_]};break;case Ew.MONTH:x=void 0,x=r?n.filter.params.value:oT({value:n.filter.params.default,dateFormat:"MM"}),e={op:"@only_month",value:[],options:[x]};break;case Ew.DAY:b=void 0,b=r?n.filter.params.value:oT({value:n.filter.params.default,dateFormat:"DD"}),e={op:"@only_day",value:[],options:[b]}}return[3,25];case 24:switch(n.filter.type){case Sw.CONDITION:switch(w=void 0,T=void 0,S=void 0,r?(w=n.filter.params.value.val,S=n.filter.params.value.searchMode):(w=n.filter.params.default.val,S=n.filter.params.default.searchMode),S){case uw.EQUAL:T="=";break;case uw.NOT_EQUAL:T="!=";break;case uw.GREAT_EQUAL:T=">=";break;case uw.GREAT_THAN:T=">";break;case uw.LESS_EQUAL:T="<=";break;case uw.LESS_THAN:T="<";break;case uw.NULL:T="null";break;case uw.NOT_NULL:T="nn"}e={op:T,value:[w],options:[]};break;case Sw.RANGE:e={op:"between",value:r?n.filter.params.value:n.filter.params.default,options:[]}}return[3,25];case 25:return[2,e]}}))}))};function cT(e){var t=e.shareId,n=e.criteria,i=e.getTableColumnValueFunc;return o(this,void 0,void 0,(function(){var e,r=this;return s(this,(function(a){switch(a.label){case 0:return e=Array.from({length:n.length}),[4,Promise.all(n.map((function(n,a){return o(r,void 0,void 0,(function(){var r,o;return s(this,(function(s){switch(s.label){case 0:return r={key:n.key,type:n.type,expr:n.expr},[4,uT({shareId:t,field:n,getTableColumnValueFunc:i})];case 1:return(o=s.sent())&&!function(e){var t=e.filter;return!["empty","null","nn","ne"].includes(t.op)&&(aT({value:t.value})&&aT({value:t.options}))}({filter:o})?(r.filter=[o],o.level&&(r.level=o.level)):r.filter=[],e[a]=r,[2]}}))}))})))];case 1:return a.sent(),[2,e]}}))}))}function hT(e){return e.value.map((function(e){var t={alias:e.alias,key:e.key,type:e.type,expr:e.expr,orderBy:e.orderBy,compare:e.compare};if(e.type===fw.TIME)if(e.subtype){var n=pw[e.subtype];t.type=n.sqltype,t.dformat=n.sqldformat}else{var i=rT({dformat:e.dformat,tformat:e.tformat});i&&(t.dformat=i)}return t}))}function dT(e){var t=e.customFields,n=[];return Object.values(t.calc).forEach((function(e){n=n.concat(e)})),n}function fT(e){var t=e.shareId,n=e.setConfig,i=e.getTableColumnValueFunc;return o(this,void 0,void 0,(function(){var e,r,a;return s(this,(function(o){switch(o.label){case 0:return[4,cT({shareId:t,criteria:n.data.criteria,getTableColumnValueFunc:i})];case 1:return e=o.sent(),r=hT({value:n.data.value}),a=dT({customFields:n.customFields}),[2,{criteria:e,group:[],value:r,drillDown:[],rule:a}]}}))}))}var pT,gT,mT,vT,yT;function _T(e){var t=e.shareId,n=e.setConfig,i=e.getTableColumnValueFunc;return o(this,void 0,void 0,(function(){var e,r,a,o,l,u;return s(this,(function(s){switch(s.label){case 0:return[4,cT({shareId:t,criteria:n.data.criteria,getTableColumnValueFunc:i})];case 1:return e=s.sent(),r=function(e){var t=e.drillDown,n=e.group,i={group:[],drillDown:[]};return i.group=n.map((function(e){var t={alias:e.alias,key:e.key,type:e.type,expr:e.expr,orderBy:e.orderBy,filter:[]};if(e.type===fw.TIME)if(e.subtype){var n=pw[e.subtype];t.type=n.sqltype,t.dformat=n.sqldformat}else{var i=rT({dformat:e.dformat,tformat:e.tformat});i&&(t.dformat=i)}return t})),Object.entries(t).forEach((function(e){var t=e[0],r=e[1];if(r.current){var a=n.find((function(e){return e.id===t}));i.group.splice(a,1,{alias:r.current.alias,key:r.current.key,type:r.current.type,filter:[]});var o=[],s=[];r.path.forEach((function(e){o.push({alias:e.alias,key:e.key,type:e.type,filter:[]}),s.push(e.value)})),o.push({alias:r.current.alias,key:r.current.key,type:r.current.type,filter:[]}),i.drillDown.push({items:o,itemValues:s,currentItem:r.path.length+1,isDrill:!0})}})),i}({drillDown:n.data.drillDown,group:n.data.group}),a=r.group,o=r.drillDown,l=hT({value:n.data.value}),u=dT({customFields:n.customFields}),[2,{criteria:e,group:a,value:l,drillDown:o,rule:u}]}}))}))}!function(e){e.ALL="all",e.TODAY="today",e.YESTERDAY="yesterday",e.THIS_WEEK_TO_NOW="this_week_to_now",e.LAST_WEEK="last_week",e.THIS_MONTH_TO_NOW="this_month_to_now",e.LAST_MONTH="last_month",e.THIS_QUARTER_TO_NOW="this_quarter_to_now",e.LAST_QUARTER="last_quarter",e.THIS_YEAR_TO_NOW="this_year_to_now",e.LAST_YEAR="last_year"}(yT||(yT={}));var xT;Object.freeze(((pT={})[yT.ALL]=Object.freeze({key:yT.ALL,name:"全部"}),pT[yT.TODAY]=Object.freeze({key:yT.TODAY,name:"当天"}),pT[yT.YESTERDAY]=Object.freeze({key:yT.YESTERDAY,name:"昨天"}),pT[yT.THIS_WEEK_TO_NOW]=Object.freeze({key:yT.THIS_WEEK_TO_NOW,name:"本周至今"}),pT[yT.LAST_WEEK]=Object.freeze({key:yT.LAST_WEEK,name:"上周"}),pT[yT.THIS_MONTH_TO_NOW]=Object.freeze({key:yT.THIS_MONTH_TO_NOW,name:"本月至今"}),pT[yT.LAST_MONTH]=Object.freeze({key:yT.LAST_MONTH,name:"上月"}),pT[yT.THIS_QUARTER_TO_NOW]=Object.freeze({key:yT.THIS_QUARTER_TO_NOW,name:"本季度至今"}),pT[yT.LAST_QUARTER]=Object.freeze({key:yT.LAST_QUARTER,name:"上季度"}),pT[yT.THIS_YEAR_TO_NOW]=Object.freeze({key:yT.THIS_YEAR_TO_NOW,name:"本年至今"}),pT[yT.LAST_YEAR]=Object.freeze({key:yT.LAST_YEAR,name:"去年"}),pT));!function(e){e.SOME_DAY="some_day",e.SOME_WEEK="some_week",e.SOME_MONTH="some_month",e.SOME_YEAR="some_year"}(xT||(xT={}));var bT;Object.freeze(((gT={})[xT.SOME_DAY]=Object.freeze({key:xT.SOME_DAY,name:"前N天"}),gT[xT.SOME_WEEK]=Object.freeze({key:xT.SOME_WEEK,name:"前N周"}),gT[xT.SOME_MONTH]=Object.freeze({key:xT.SOME_MONTH,name:"前N月"}),gT[xT.SOME_YEAR]=Object.freeze({key:xT.SOME_YEAR,name:"前N年"}),gT));!function(e){e.SHORTCUTS="shortcuts",e.CUSTOM_TIME="custom_time",e.DYNAMIC_TIME="dynamic_time"}(bT||(bT={}));var wT;Object.freeze(((mT={})[bT.SHORTCUTS]=Object.freeze({key:bT.SHORTCUTS,name:"快捷选择",getDefault:function(){return{value:yT.ALL}}}),mT[bT.CUSTOM_TIME]=Object.freeze({key:bT.CUSTOM_TIME,name:"自定义时间",getDefault:function(){return{startDate:null,startTime:{enable:!1,value:"00:00:00"},endDate:null,endTime:{enable:!1,value:"23:59:59"}}}}),mT[bT.DYNAMIC_TIME]=Object.freeze({key:bT.DYNAMIC_TIME,name:"动态时间",getDefault:function(){return{type:xT.SOME_DAY,value:null}}}),mT));!function(e){e.YEAR="year",e.QUARTER="quarter",e.MONTH="month",e.WEEK="week"}(wT||(wT={}));Object.freeze(((vT={})[wT.YEAR]=Object.freeze({key:wT.YEAR,name:"年"}),vT[wT.QUARTER]=Object.freeze({key:wT.QUARTER,name:"季"}),vT[wT.MONTH]=Object.freeze({key:wT.MONTH,name:"月"}),vT[wT.WEEK]=Object.freeze({key:wT.WEEK,name:"周"}),vT));function TT(e){var t=e.timeRangeConfig,n=[null,null];switch(t.type){case bT.SHORTCUTS:var i=t.params,r=aw();switch(i.value){case yT.ALL:n=[null,null];break;case yT.TODAY:var a=r.format("YYYY-MM-DD");n=[a+" 00:00:00",a+" 23:59:59"];break;case yT.YESTERDAY:var o=r.add(-1,"days").format("YYYY-MM-DD");n=[o+" 00:00:00",o+" 23:59:59"];break;case yT.THIS_WEEK_TO_NOW:n=[aw().startOf("week").format("YYYY-MM-DD 00:00:00"),r.format("YYYY-MM-DD 23:59:59")];break;case yT.LAST_WEEK:n=[aw().add(-1,"week").startOf("week").format("YYYY-MM-DD 00:00:00"),r.format("YYYY-MM-DD 23:59:59")];break;case yT.THIS_MONTH_TO_NOW:n=[aw().startOf("month").format("YYYY-MM-DD 00:00:00"),r.format("YYYY-MM-DD 23:59:59")];break;case yT.LAST_MONTH:var s=aw().add(-1,"month").startOf("month").startOf("d"),l=aw().add(-1,"month").endOf("month").endOf("d");n=[s.format("YYYY-MM-DD 00:00:00"),l.format("YYYY-MM-DD 23:59:59")];break;case yT.THIS_QUARTER_TO_NOW:n=[r.startOf("quarter").format("YYYY-MM-DD 00:00:00"),r.format("YYYY-MM-DD 23:59:59")];break;case yT.LAST_QUARTER:var u=aw().add(-1,"quarter").startOf("quarter"),c=aw().add(-1,"quarter").endOf("quarter");n=[u.format("YYYY-MM-DD 00:00:00"),c.format("YYYY-MM-DD 23:59:59")];break;case yT.THIS_YEAR_TO_NOW:n=[aw().startOf("year").format("YYYY-MM-DD 00:00:00"),r.format("YYYY-MM-DD 23:59:59")];break;case yT.LAST_YEAR:var h=aw().add(-1,"year").startOf("year"),d=aw().add(-1,"year").endOf("year");n=[h.format("YYYY-MM-DD 00:00:00"),d.format("YYYY-MM-DD 23:59:59")]}break;case bT.CUSTOM_TIME:var f=t.params;n=[f.startDate+" "+f.startTime.value,f.endDate+" "+f.endTime.value];break;case bT.DYNAMIC_TIME:var p=t.params,g=aw(),m=aw();switch(p.type){case xT.SOME_DAY:m.add(0-p.value,"days");break;case xT.SOME_WEEK:m.add(0-p.value,"week");break;case xT.SOME_MONTH:m.add(0-p.value,"month");break;case xT.SOME_YEAR:m.add(0-p.value,"year")}n=[m.format("YYYY-MM-DD 00:00:00"),g.format("YYYY-MM-DD 23:59:59")]}return n}var ST,OT,MT=function(e){var t=e.groupField,n=e.timeRange;return{id:t.id,alias:t.alias,key:t.key,compareIndex:1,type:t.type,filter:[{op:"between",value:n||TT({timeRangeConfig:t.timeRange}),options:[]}]}};function DT(e){var t=e.shareId,n=e.setConfig,i=e.timeRange,r=e.getTableColumnValueFunc;return o(this,void 0,void 0,(function(){var e,a,o,u,c;return s(this,(function(s){switch(s.label){case 0:return[4,cT({shareId:t,criteria:n.data.criteria,getTableColumnValueFunc:r})];case 1:return e=s.sent(),a=n.data.group[0],[4,MT({groupField:a,timeRange:i})];case 2:return o=s.sent(),u=function(e){var t=e.timeRange,n=e.groupField,i=e.value,r=[];return i.forEach((function(e){var i={id:e.id,alias:e.alias,key:e.key,type:e.type,expr:e.expr};if(r.push(i),n.compare.yoy_ratio.enable){var a=Object.assign({},i,{alias:i.alias+"%%同比率"});switch(n.compare.yoy_ratio.dimension){case wT.WEEK:a.compare={type:"ratio",value:[aw(t[0]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss"),aw(t[1]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss")]};break;case wT.MONTH:a.compare={type:"ratio",value:[aw(t[0]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss"),aw(t[1]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss")]};break;case wT.QUARTER:a.compare={type:"ratio",value:[aw(t[0]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss"),aw(t[1]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss")]};break;case wT.YEAR:a.compare={type:"ratio",value:[aw(t[0]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss"),aw(t[1]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss")]}}r.push(a)}if(n.compare.yoy_value.enable){var o=Object.assign({},i,{alias:i.alias+"%%同比值"});switch(n.compare.yoy_value.dimension){case wT.WEEK:o.compare={type:"num",value:[aw(t[0]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss"),aw(t[1]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss")]};break;case wT.MONTH:o.compare={type:"num",value:[aw(t[0]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss"),aw(t[1]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss")]};break;case wT.QUARTER:o.compare={type:"num",value:[aw(t[0]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss"),aw(t[1]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss")]};break;case wT.YEAR:o.compare={type:"num",value:[aw(t[0]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss"),aw(t[1]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss")]}}r.push(o)}if(n.compare.mom_ratio.enable){var s=Object.assign({},i,{alias:i.alias+"%%环比率"}),l=aw(t[0]),u=aw(t[1]),c=l.diff(u)-1e3;s.compare={type:"ratio",value:[l.add(c,"ms").format("YYYY-MM-DD HH:mm:ss"),u.add(c,"ms").format("YYYY-MM-DD HH:mm:ss")]},r.push(s)}if(n.compare.mom_value.enable){var h=Object.assign({},i,{alias:i.alias+"%%环比值"});l=aw(t[0]),u=aw(t[1]),c=l.diff(u)-1e3;h.compare={type:"num",value:[l.add(c,"ms").format("YYYY-MM-DD HH:mm:ss"),u.add(c,"ms").format("YYYY-MM-DD HH:mm:ss")]},r.push(h)}})),r}({timeRange:o.filter[0].value,groupField:a,value:n.data.value}),c=dT({customFields:n.customFields}),[2,{criteria:l([o],e),group:[],value:u,drillDown:[],rule:c}]}}))}))}function AT(e){var t=e.shareId,n=void 0===t?null:t,i=e.setConfig,r=e.getTableColumnValueFunc;return o(this,void 0,void 0,(function(){var e,t;return s(this,(function(a){switch(a.label){case 0:switch(e={},t=i.data,i.render){case iw.TABLE:case iw.PIE:case iw.HISTOGRAM_LINE:case iw.HISTOGRAM_BAR:case iw.BAR:case iw.HISTOGRAM_MIX:return[3,1];case iw.GAUGE:return[3,3];case iw.INDICATOR_CARD:return[3,4];case iw.MAP:return[3,6];case iw.DETAIL:return[3,7]}return[3,9];case 1:return[4,_T({shareId:n,setConfig:i,getTableColumnValueFunc:r})];case 2:return e=a.sent(),[3,10];case 3:return[3,10];case 4:return[4,DT({shareId:n,setConfig:i,getTableColumnValueFunc:r})];case 5:return e=a.sent(),[3,10];case 6:return[3,10];case 7:return[4,fT({shareId:n,setConfig:i,getTableColumnValueFunc:r})];case 8:return e=a.sent(),[3,10];case 9:throw new Error("未知的图标渲染类型: "+t.render);case 10:return[2,e]}}))}))}!function(e){e.NORMAL="normal",e.CENTRAL_CONTROL="center-control",e.DOOR_PLATE="door-plate"}(OT||(OT={}));var kT,CT,IT,ET,NT,RT;Object.freeze(((ST={})[OT.NORMAL]=Object.freeze({key:OT.NORMAL,name:"普通模式"}),ST[OT.CENTRAL_CONTROL]=Object.freeze({key:OT.CENTRAL_CONTROL,name:"中控大屏"}),ST[OT.DOOR_PLATE]=Object.freeze({key:OT.DOOR_PLATE,name:"电子门牌"}),ST));!function(e){e.SIZE8="8",e.SIZE10="10",e.SIZE12="12",e.SIZE13="13",e.SIZE14="14",e.SIZE16="16",e.SIZE18="18",e.SIZE20="20",e.SIZE24="24",e.SIZE26="26",e.SIZE28="28",e.SIZE30="30",e.SIZE32="32",e.SIZE34="34",e.SIZE36="36",e.SIZE38="38",e.SIZE40="40",e.SIZE48="48",e.SIZE64="64",e.SIZE72="72",e.SIZE128="128"}(NT||(NT={})),function(e){e.SIZE400="400",e.SIZE600="600"}(RT||(RT={}));var LT;Object.freeze(((kT={})[RT.SIZE400]=Object.freeze({key:RT.SIZE400,name:"正常"}),kT[RT.SIZE600]=Object.freeze({key:RT.SIZE600,name:"加粗"}),kT));!function(e){e.NORMAL="normal",e.ITALIC="italic"}(LT||(LT={}));var PT;Object.freeze(((CT={})[LT.NORMAL]=Object.freeze({key:LT.NORMAL,name:"正常"}),CT[LT.ITALIC]=Object.freeze({key:LT.ITALIC,name:"斜体"}),CT));!function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(PT||(PT={}));var zT;Object.freeze(((IT={})[PT.LEFT]=Object.freeze({key:PT.LEFT,iconfont:"icon-text_left",name:"左对齐"}),IT[PT.CENTER]=Object.freeze({key:PT.CENTER,iconfont:"icon-text_center",name:"居中对齐"}),IT[PT.RIGHT]=Object.freeze({key:PT.RIGHT,iconfont:"icon-text_right",name:"右对齐"}),IT));!function(e){e.TOP="top",e.MIDDLE="middle",e.BOTTOM="bottom"}(zT||(zT={}));Object.freeze(((ET={})[zT.TOP]=Object.freeze({key:zT.TOP,iconfont:"icon-top",name:"头部对齐"}),ET[zT.MIDDLE]=Object.freeze({key:zT.MIDDLE,iconfont:"icon-center",name:"居中对齐"}),ET[zT.BOTTOM]=Object.freeze({key:zT.BOTTOM,iconfont:"icon-bottom",name:"底部对齐"}),ET));var YT,HT,FT=Object.freeze(["#4499fa","#59d4d9","#4cd964","#ff9500","#ff3b30","#c894f6","#8c6fde","#767aee","#52c41a","#ff2d55","#ffcc00","#5ac8fa","#f478b8","#fae34c","#59d9a4"]);!function(e){e.PURE="pure",e.LINEAR="linear",e.RADIAL="radial"}(HT||(HT={}));var BT,jT,UT=Object.freeze(((YT={})[HT.PURE]=Object.freeze({key:HT.PURE,name:"纯色",getDefault:function(e){return void 0===e&&(e="#2b9f7f"),{type:HT.PURE,color:e}}}),YT[HT.LINEAR]=Object.freeze({key:HT.LINEAR,name:"线性渐变",getDefault:function(e){return void 0===e&&(e="#2b9f7f"),{type:HT.LINEAR,startColor:e,endColor:e}}}),YT[HT.RADIAL]=Object.freeze({key:HT.RADIAL,name:"径向渐变",getDefault:function(e){return void 0===e&&(e="#2b9f7f"),{type:HT.RADIAL,startColor:e,endColor:e,radius:5}}}),YT));!function(e){e.CONTINUOUS="continuous",e.PIECEWISE="piecewise"}(jT||(jT={}));var WT,GT,VT,qT=Object.freeze(((BT={})[jT.CONTINUOUS]=Object.freeze({key:jT.CONTINUOUS,name:"连续渐变",getDefault:function(e){return void 0===e&&(e="#2b9f7f"),{type:jT.CONTINUOUS,startColor:e,endColor:e}}}),BT[jT.PIECEWISE]=Object.freeze({key:jT.PIECEWISE,name:"区间渐变",getDefault:function(e){return void 0===e&&(e="#2b9f7f"),{type:jT.PIECEWISE,startColor:e,endColor:e,splitNumber:5}}}),BT));!function(e){e.TOP="top",e.BOTTOM="bottom",e.LEFT="left",e.RIGHT="right",e.INSIDE_LEFT="insideLeft",e.INSIDE_RIGHT="insideRight",e.INSIDE_TOP="insideTop",e.INSIDE_CENTER="inside",e.INSIDE_BOTTOM="insideBottom"}(VT||(VT={}));var ZT;Object.freeze(((WT={})[VT.TOP]=Object.freeze({key:VT.TOP,name:"上方"}),WT[VT.BOTTOM]=Object.freeze({key:VT.BOTTOM,name:"下方"}),WT[VT.LEFT]=Object.freeze({key:VT.LEFT,name:"左边"}),WT[VT.RIGHT]=Object.freeze({key:VT.RIGHT,name:"右边"}),WT[VT.INSIDE_CENTER]=Object.freeze({key:VT.INSIDE_CENTER,name:"内部居中"}),WT[VT.INSIDE_LEFT]=Object.freeze({key:VT.INSIDE_LEFT,name:"内部左边"}),WT[VT.INSIDE_RIGHT]=Object.freeze({key:VT.INSIDE_RIGHT,name:"内部右边"}),WT[VT.INSIDE_TOP]=Object.freeze({key:VT.INSIDE_TOP,name:"内部上方"}),WT[VT.INSIDE_BOTTOM]=Object.freeze({key:VT.INSIDE_BOTTOM,name:"内部下方"}),WT));!function(e){e.GROUP="group",e.SERIES="series",e.VALUE="value",e.PERCENT="percent"}(ZT||(ZT={}));var XT,KT,QT,$T;Object.freeze(((GT={})[ZT.GROUP]=Object.freeze({key:ZT.GROUP,name:"维度项"}),GT[ZT.SERIES]=Object.freeze({key:ZT.SERIES,name:"数值标题"}),GT[ZT.VALUE]=Object.freeze({key:ZT.VALUE,name:"值"}),GT[ZT.PERCENT]=Object.freeze({key:ZT.PERCENT,name:"百分比"}),GT));!function(e){e.PERCENT="percent",e.INDEX="index"}($T||($T={}));var JT;Object.freeze(((XT={})[$T.PERCENT]=Object.freeze({key:$T.PERCENT,name:"%"}),XT[$T.INDEX]=Object.freeze({key:$T.INDEX,name:"项"}),XT));!function(e){e.BT="bt",e.E="e",e.NE="ne",e.GT="gt",e.GE="ge",e.LT="lt",e.LE="le",e.BEFORE="before",e.AFTER="after",e.INDEX="index"}(JT||(JT={}));var eS;Object.freeze(((KT={})[JT.BT]=Object.freeze({key:JT.BT,name:"介于",getDefault:function(){return{op:JT.BT,value:[null,null]}}}),KT[JT.E]=Object.freeze({key:JT.E,name:"等于",getDefault:function(){return{op:JT.E,value:null}}}),KT[JT.NE]=Object.freeze({key:JT.NE,name:"不等于",getDefault:function(){return{op:JT.NE,value:null}}}),KT[JT.GT]=Object.freeze({key:JT.GT,name:"大于",getDefault:function(){return{op:JT.GT,value:null}}}),KT[JT.GE]=Object.freeze({key:JT.GE,name:"大于等于",getDefault:function(){return{op:JT.GE,value:null}}}),KT[JT.LT]=Object.freeze({key:JT.LT,name:"小于",getDefault:function(){return{op:JT.LT,value:null}}}),KT[JT.LE]=Object.freeze({key:JT.LE,name:"小于等于",getDefault:function(){return{op:JT.LE,value:null}}}),KT[JT.BEFORE]=Object.freeze({key:JT.BEFORE,name:"前",getDefault:function(){return{op:JT.BEFORE,value:null,unit:$T.INDEX}}}),KT[JT.AFTER]=Object.freeze({key:JT.AFTER,name:"后",getDefault:function(){return{op:JT.AFTER,value:null,unit:$T.INDEX}}}),KT[JT.INDEX]=Object.freeze({key:JT.INDEX,name:"第",getDefault:function(){return{op:JT.INDEX,value:null}}}),KT));!function(e){e.SHOW="show",e.HIDDEN="hidden",e.DEFAULT="default"}(eS||(eS={}));var tS,nS,iS;Object.freeze(((QT={})[eS.SHOW]=Object.freeze({key:eS.SHOW,name:"显示"}),QT[eS.HIDDEN]=Object.freeze({key:eS.HIDDEN,name:"隐藏"}),QT[eS.DEFAULT]=Object.freeze({key:eS.DEFAULT,name:"默认"}),QT));!function(e){e.BAR="bar",e.LINE="line"}(iS||(iS={}));var rS;Object.freeze(((tS={})[iS.BAR]=Object.freeze({key:iS.BAR,name:"柱"}),tS[iS.LINE]=Object.freeze({key:iS.LINE,name:"线"}),tS));!function(e){e.ITEM_STYLE="itemStyle",e.VISUAL_MAP="visualMap"}(rS||(rS={}));var aS,oS,sS=Object.freeze(((nS={})[rS.ITEM_STYLE]=Object.freeze({key:rS.ITEM_STYLE,name:"颜色填充",getDefaultConfig:function(){return{type:rS.ITEM_STYLE,params:UT[HT.PURE].getDefault()}}}),nS[rS.VISUAL_MAP]=Object.freeze({key:rS.VISUAL_MAP,name:"视觉映射",getDefaultConfig:function(){return{type:rS.VISUAL_MAP,params:qT[jT.CONTINUOUS].getDefault()}}}),nS));function lS(e){var t=e.seriesType,n=e.axisPosition,i=e.dataLabelPosition;return{type:t,axisPosition:n,width:null,radius:0,colorFill:sS[rS.ITEM_STYLE].getDefaultConfig(),label:{show:!1,params:{position:i,fontSize:NT.SIZE12,color:{enable:!1,value:"#2b9f7f"},fontWeight:RT.SIZE400,showTooltip:Object.values(ZT)}},conditionalFormatting:[]}}!function(e){e.NONE="0",e.Rotate30="30",e.Rotate45="45",e.Rotate60="60",e.Rotate90="90"}(oS||(oS={}));var uS,cS;Object.freeze(((aS={})[oS.NONE]=Object.freeze({key:oS.NONE,name:"默认"}),aS[oS.Rotate30]=Object.freeze({key:oS.Rotate30,name:"30"}),aS[oS.Rotate45]=Object.freeze({key:oS.Rotate45,name:"45"}),aS[oS.Rotate60]=Object.freeze({key:oS.Rotate60,name:"60"}),aS[oS.Rotate90]=Object.freeze({key:oS.Rotate90,name:"90"}),aS));!function(e){e.SOLID="solid",e.DASHED="dashed",e.DOTTED="dotted"}(cS||(cS={}));var hS,dS,fS;Object.freeze(((uS={})[cS.SOLID]=Object.freeze({key:cS.SOLID,name:"————"}),uS[cS.DASHED]=Object.freeze({key:cS.DASHED,name:"----"}),uS[cS.DOTTED]=Object.freeze({key:cS.DOTTED,name:"...."}),uS));!function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"}(fS||(fS={}));var pS;Object.freeze(((hS={})[fS.LEFT]=Object.freeze({key:fS.LEFT,name:"左"}),hS[fS.RIGHT]=Object.freeze({key:fS.RIGHT,name:"右"}),hS[fS.TOP]=Object.freeze({key:fS.TOP,name:"上"}),hS[fS.BOTTOM]=Object.freeze({key:fS.BOTTOM,name:"下"}),hS));!function(e){e.START="start",e.CENTER="center",e.END="end"}(pS||(pS={}));var gS,mS;Object.freeze(((dS={})[pS.START]=Object.freeze({key:pS.START,name:"起始"}),dS[pS.CENTER]=Object.freeze({key:pS.CENTER,name:"中间"}),dS[pS.END]=Object.freeze({key:pS.END,name:"结尾"}),dS));function vS(e){return{name:"",position:e.position,unit:"",min:null,max:null,nameLocation:pS.START,nameGap:15,nameRotate:0,inverse:!1,nameTextStyle:{fontSize:NT.SIZE12,color:"#333333",fontWeight:RT.SIZE400,fontStyle:LT.NORMAL,padding:[0,0,0,0]},axisLabel:{show:!1,params:{fontSize:NT.SIZE14,color:"#333333",fontWeight:RT.SIZE400,fontStyle:LT.NORMAL,rotate:oS.NONE}},axisLine:{show:!1,params:{width:1,color:"#333333",type:cS.SOLID}},axisTick:{show:!1,params:{length:5,width:1,color:"#333333",type:cS.SOLID}},splitLine:{show:!1,params:{width:1,color:"#333333",type:cS.SOLID}}}}!function(e){e.NONE="none",e.LEFT="left",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom"}(mS||(mS={}));Object.freeze(((gS={})[mS.NONE]=Object.freeze({key:mS.NONE,name:"无",iconfont:"icon-align_center"}),gS[mS.TOP]=Object.freeze({key:mS.TOP,name:"上",iconfont:"icon-align_top"}),gS[mS.BOTTOM]=Object.freeze({key:mS.BOTTOM,name:"下",iconfont:"icon-align_bottom"}),gS[mS.LEFT]=Object.freeze({key:mS.LEFT,name:"左",iconfont:"icon-align_left"}),gS[mS.RIGHT]=Object.freeze({key:mS.RIGHT,name:"右",iconfont:"icon-align_right"}),gS));function yS(){return{position:mS.NONE}}function _S(e){var t=e.styleConfig,n=e.setConfig,i=e.dataLabelPosition,r=e.getSeriesTypeFunc,a=e.getAxisPositionFunc;t.enable&&(function(e){var t=e.stack,n=e.setConfig;if(t.enable){var i=n.data.value.map((function(e){return e.id}));t.params.forEach((function(e){e.fields=e.fields.filter((function(e){return i.includes(e)}))})),t.params=t.params.filter((function(e){return e.fields.length>0}))}}({stack:t.params.stack,setConfig:n}),function(e){var t=e.seriesCustomConfig,n=e.setConfig,i=e.dataLabelPosition,r=e.getSeriesTypeFunc,a=e.getAxisPositionFunc;Object.keys(t).forEach((function(e){n.data.value.find((function(t){return t.id===e}))||delete t[e]})),n.data.value.forEach((function(e,n){t[e.id]||(t[e.id]=lS({seriesType:r({index:n}),axisPosition:a({index:n}),dataLabelPosition:i}))}))}({seriesCustomConfig:t.params.seriesCustom,setConfig:n,dataLabelPosition:i,getSeriesTypeFunc:r,getAxisPositionFunc:a}))}var xS,bS,wS=Object.freeze({__proto__:null,reactStyleConfig:function(e){_S({styleConfig:e.styleConfig,setConfig:e.setConfig,dataLabelPosition:VT.RIGHT,getSeriesTypeFunc:function(){return iS.BAR},getAxisPositionFunc:function(){return fS.TOP}})},getDefaultConfigParams:function(e){var t,n=e.setConfig;return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:yS(),dataZoom:{show:!1,width:20,right:10,filterColor:"#2b9f7f",borderColor:"#2b9f7f"},stack:{enable:!1,params:[]},axisY:vS({position:fS.LEFT}),topAxis:vS({position:fS.TOP}),bottomAxis:vS({position:fS.BOTTOM}),seriesCustom:(t={},n.data.value.forEach((function(e){t[e.id]=lS({dataLabelPosition:VT.RIGHT,seriesType:iS.BAR,axisPosition:fS.TOP})})),t)}}}),TS=((xS={})[OT.NORMAL]=wS,xS);!function(e){e.SIZE10="10",e.SIZE20="20",e.SIZE30="30",e.SIZE50="50"}(bS||(bS={}));function SS(e){var t=e.styleConfig,n=e.setConfig;t.enable&&(function(e){var t=e.cell,n=e.setConfig,i=n.data.group.length+n.data.value.length;t.fixed.left>i&&(t.fixed.left=i),t.fixed.right>i&&(t.fixed.right=null)}({cell:t.params.cell,setConfig:n}),function(e){var t=e.summary,n=e.setConfig;if(t.show){var i={};n.data.value.forEach((function(e){i[e.id]=t.expr[e.id]||$w.NONE})),t.expr=i}}({summary:t.params.summary,setConfig:n}),function(e){var t=e.stack,n=e.setConfig;if(t.enable){var i=n.data.value.map((function(e){return e.id}));t.params.forEach((function(e){e.fields=e.fields.filter((function(e){return i.includes(e)}))})),t.params=t.params.filter((function(e){return e.fields.length>0}))}}({stack:t.params.stack,setConfig:n}))}function OS(e){var t=e.hasMerged,n={fixed:{left:null,right:null}};return void 0!==t&&t&&(n.merge=!1),n}function MS(){return{pageSize:bS.SIZE20,showPageSize:!1,showTotal:!1,showTotalPage:!1}}function DS(){return{bgColor:"#fafafa",fontSize:NT.SIZE12,fontWeight:RT.SIZE400,color:"#606266",textAlign:PT.LEFT}}function AS(){return{fontSize:NT.SIZE12,fontWeight:RT.SIZE400,color:"#606266",textAlign:PT.LEFT,verticalAlign:zT.MIDDLE,oddColor:"#ffffff",evenColor:"#fafbfc"}}var kS=Object.freeze({__proto__:null,getDefaultConfigParams:function(){return{dataRange:{start:null,end:null},cell:OS({}),stack:{enable:!1,params:[]},summary:{show:!1,name:"",expr:{}},pagination:MS(),showIndex:!0,header:DS(),body:AS(),border:{hasVerticalBorder:!1,hasHorizontalBorder:!0,borderColor:"#ebeef5"}}},reactStyleConfig:SS}),CS=function(){var e={};return e[OT.NORMAL]=kS,e}();var IS=Object.freeze({__proto__:null,reactStyleConfig:function(e){_S({styleConfig:e.styleConfig,setConfig:e.setConfig,dataLabelPosition:VT.TOP,getSeriesTypeFunc:function(){return iS.BAR},getAxisPositionFunc:function(){return fS.LEFT}})},getDefaultConfigParams:function(e){var t,n=e.setConfig;return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:yS(),dataZoom:{show:!1,width:20,right:10,filterColor:"#2b9f7f",borderColor:"#2b9f7f"},stack:{enable:!1,params:[]},axisX:vS({position:fS.BOTTOM}),leftAxis:vS({position:fS.LEFT}),rightAxis:vS({position:fS.RIGHT}),seriesCustom:(t={},n.data.value.forEach((function(e){t[e.id]=lS({dataLabelPosition:VT.TOP,seriesType:iS.BAR,axisPosition:fS.LEFT})})),t)}}}),ES=function(){var e={};return e[OT.NORMAL]=IS,e}();var NS=Object.freeze({__proto__:null,reactStyleConfig:function(e){_S({styleConfig:e.styleConfig,setConfig:e.setConfig,dataLabelPosition:VT.TOP,getSeriesTypeFunc:function(){return iS.BAR},getAxisPositionFunc:function(){return fS.LEFT}})},getDefaultConfigParams:function(e){var t,n=e.setConfig;return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:yS(),dataZoom:{show:!1,width:20,right:10,filterColor:"#2b9f7f",borderColor:"#2b9f7f"},stack:{enable:!1,params:[]},axisX:vS({position:fS.BOTTOM}),leftAxis:vS({position:fS.LEFT}),rightAxis:vS({position:fS.RIGHT}),seriesCustom:(t={},n.data.value.forEach((function(e){t[e.id]=lS({dataLabelPosition:VT.TOP,seriesType:iS.LINE,axisPosition:fS.LEFT})})),t)}}}),RS=function(){var e={};return e[OT.NORMAL]=NS,e}();var LS,PS=Object.freeze({__proto__:null,reactStyleConfig:function(e){_S({styleConfig:e.styleConfig,setConfig:e.setConfig,dataLabelPosition:VT.TOP,getSeriesTypeFunc:function(){return iS.BAR},getAxisPositionFunc:function(){return fS.LEFT}})},getDefaultConfigParams:function(e){var t,n=e.setConfig;return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:yS(),dataZoom:{show:!1,width:20,right:10,filterColor:"#2b9f7f",borderColor:"#2b9f7f"},stack:{enable:!1,params:[]},axisX:vS({position:fS.BOTTOM}),leftAxis:vS({position:fS.LEFT}),rightAxis:vS({position:fS.RIGHT}),seriesCustom:(t={},n.data.value.forEach((function(e,n){t[e.id]=lS({dataLabelPosition:VT.TOP,seriesType:n%2==0?iS.BAR:iS.LINE,axisPosition:fS.LEFT})})),t)}}}),zS=function(){var e={};return e[OT.NORMAL]=PS,e}();!function(e){e.ZERO="0",e.ONE="1",e.TWO="2",e.THREE="3",e.FOUR="4",e.FIVE="5",e.SIX="6"}(LS||(LS={}));var YS,HS,FS,BS,jS=Object.freeze({__proto__:null,reactStyleConfig:function(e){e.styleConfig,e.setConfig},get PrecisionType(){return LS},getDefaultConfigParams:function(){return{background:"#ffffff",title:{fontSize:NT.SIZE12,color:"#333333"},value:{fontSize:NT.SIZE12,color:"#333333"},compareValue:{positive:{precision:LS.TWO,fontSize:NT.SIZE12,color:"#333333"},negative:{precision:LS.TWO,fontSize:NT.SIZE12,color:"#333333"}}}}}),US=function(){var e={};return e[OT.NORMAL]=jS,e}();!function(e){e.PERCENT="%",e.PX="px"}(BS||(BS={}));var WS,GS=Object.freeze(((YS={})[BS.PERCENT]=Object.freeze({key:BS.PERCENT,name:"%"}),YS[BS.PX]=Object.freeze({key:BS.PX,name:"px"}),YS));!function(e){e.AREA="area",e.RADIUS="radius"}(WS||(WS={}));var VS,qS=Object.freeze(((HS={})[WS.AREA]=Object.freeze({key:WS.AREA,name:"面积模式"}),HS[WS.RADIUS]=Object.freeze({key:WS.RADIUS,name:"半径模式"}),HS));!function(e){e.INSIDE="inside",e.OUTSIDE="outside"}(VS||(VS={}));var ZS=Object.freeze(((FS={})[VS.INSIDE]=Object.freeze({key:VS.INSIDE,name:"圈内"}),FS[VS.OUTSIDE]=Object.freeze({key:VS.OUTSIDE,name:"圈外"}),FS));var XS=Object.freeze({__proto__:null,reactStyleConfig:function(e){var t=e.shareId,n=e.styleConfig,i=e.setConfig,r=e.getTableColumnValueFunc,a=e.getDataFunc;return o(this,void 0,void 0,(function(){var e,o,l,u,c,h;return s(this,(function(s){switch(s.label){case 0:return n.enable?(e=[],r&&a?[4,AT({shareId:t,setConfig:i,getTableColumnValueFunc:r})]:[3,3]):[3,4];case 1:return o=s.sent(),l={config:o,data_start:null!==n.params.dataRange.start?n.params.dataRange.start-1:0},null!==n.params.dataRange.end&&(l.data_count=n.params.dataRange.end-l.data_start),[4,a(l)];case 2:(u=s.sent()[0].data).length<100&&(e=u),s.label=3;case 3:c={},h=i.data.group[0],e.forEach((function(e,t){var i=e.group[h.alias];c[i]=n.params.customGroupValues[i]||UT[HT.PURE].getDefault(FT[t%FT.length])})),n.params.customGroupValues=c,s.label=4;case 4:return[2]}}))}))},get ChartCenterUnitType(){return BS},ChartCenterUnitTypeMesage:GS,get RoseType(){return WS},RoseTypeMesage:qS,get LabelPosition(){return VS},LabelPositionMesage:ZS,getDefaultConfigParams:function(e){var t=e.shareId,n=e.setConfig,i=e.getTableColumnValueFunc,r=e.getDataFunc;return o(this,void 0,void 0,(function(){var e,a,o,l,u,c;return s(this,(function(s){switch(s.label){case 0:return e=[],i&&r?[4,AT({shareId:t,setConfig:n,getTableColumnValueFunc:i})]:[3,3];case 1:return a=s.sent(),o={config:a},n.style[iw.PIE][OT.NORMAL].enable&&(l=n.style[iw.PIE][OT.NORMAL].params,u=l.dataRange.start||1,o.data_start=u,null!==l.dataRange.end&&(o.data_count=l.dataRange.end-o.data_start)),[4,r(o)];case 2:c=s.sent()[0].data,e=c,s.label=3;case 3:return[2,{dataRange:{start:null,end:null},legend:yS(),chart:{center:{x:{value:50,unit:BS.PERCENT},y:{value:50,unit:BS.PERCENT}},radius:{inner:0,outer:80},startAngle:90,clockwise:!0,minShowLabelAngle:null},customGroupValues:(h={},d=n.data.group[0],e.forEach((function(e,t){var n=e.group[d.alias];h[n]=UT[HT.PURE].getDefault(FT[t%FT.length])})),h),roseType:{enable:!1,type:WS.AREA},label:{show:!1,params:{position:VS.INSIDE,fontSize:NT.SIZE12,fontWeight:RT.SIZE400,color:{enable:!1,value:"#ffffff"},showTooltip:Object.values(ZT)}},labelLine:{show:!1,params:{color:{enable:!1,value:"#ffffff"},length:4,length2:8}}}]}var h,d}))}))}}),KS=function(){var e={};return e[OT.NORMAL]=XS,e}();var QS=Object.freeze({__proto__:null,getDefaultConfigParams:function(){return{dataRange:{start:null,end:null},cell:OS({hasMerged:!0}),stack:{enable:!1,params:[]},summary:{show:!1,name:"",expr:{}},pagination:MS(),showIndex:!0,header:DS(),body:AS(),border:{hasVerticalBorder:!1,hasHorizontalBorder:!0,borderColor:"#ebeef5"}}},reactStyleConfig:SS}),$S=function(){var e={};return e[OT.NORMAL]=QS,e}(),JS=function(){var e={};return e[iw.BAR]=TS,e[iw.DETAIL]=CS,e[iw.HISTOGRAM_BAR]=ES,e[iw.HISTOGRAM_LINE]=RS,e[iw.HISTOGRAM_MIX]=zS,e[iw.INDICATOR_CARD]=US,e[iw.PIE]=KS,e[iw.TABLE]=$S,e}();function eO(e){var t=e.api,n=e.chartType,i=e.themeMode,r=e.setConfig;return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return JS[n]&&JS[n][i]?[4,JS[n][i].getDefaultConfigParams({setConfig:r,api:t})]:[3,2];case 1:return[2,e.sent()];case 2:throw new Error("style.ts(getDefaultConfigParams): 请检查图表类型和主题风格: "+n+", "+i)}}))}))}return function(e){function i(i){var r=e.call(this,i)||this;return r.chartRef=t.createRef(),r.padding="7vh 2vh 2vh",r.renderChart=function(){return o(r,void 0,void 0,(function(){var e,t,n,i,r,a,o,l,u,c,h;return s(this,(function(s){switch(s.label){case 0:if(e=this.props.gpui.params,t=e.base_url,n=e.set_id,i=e.deviceToken,!t||!n||!i)return[2];this.timer&&(clearTimeout(this.timer),this.timer=null),s.label=1;case 1:return s.trys.push([1,8,,9]),[4,rw.get(t+"/set/"+n,{headers:{"X-Gini-Token":i}})];case 2:return r=s.sent().data,a=JSON.parse(r.config),o=this.props.gpui.params["@theme"],l=void 0,a.style.table[o].enable?(l=a.style[a.render][o].params,[3,5]):[3,3];case 3:return[4,eO({chartType:a.render,themeMode:o,setConfig:a,api:null})];case 4:l=s.sent(),s.label=5;case 5:return[4,AT({shareId:r.shareId,setConfig:a,getTableColumnValueFunc:function(){}})];case 6:return u=s.sent(),[4,rw.post(t+"/sql",{config:u,set_id:n,data_start:l.dataRange.start,data_count:l.dataRange.end},{headers:{"X-Gini-Token":i}})];case 7:return c=s.sent().data,this.chart.setOption(this.generateChartOption(c[0].data),{notMerge:!0}),[3,9];case 8:return h=s.sent(),console.error("@components:wall-iharbour/analysis-of-startup-use: 组件渲染时发生错误",h),[3,9];case 9:return this.props.gpui.params.interval>0&&(this.timer=setTimeout(this.renderChart,this.props.gpui.params.interval)),[2]}}))}))},r.generateChartOption=function(e){var t={};e.forEach((function(e){var n=e.group["仪器名称"],i=e.group["时间"];t[n]=t[n]||{},t[n][i]=Math.round(100*e.data["使用时长"]/3600)/100}));for(var n=[],i=aw(),r=0;r<12;r++)n.push(i.format("yyyy-MM")),i.add(-1,"month");n=n.reverse();return{color:["#00A1FF","#0BE89C","#F1BE58","#EE8367","#B658F1","#66E8B5","#7A75E0","#51D0E2"],tooltip:{show:!0,formatter:function(e){return e.seriesName+"<br/>"+e.name+": "+e.data}},legend:{type:"scroll",data:Object.keys(t),bottom:0,icon:"roundRect",textStyle:{color:"#CDE0FC"},pageIconColor:"#CDE0FC",pageTextStyle:{color:"#CDE0FC"}},xAxis:[{type:"category",data:n,axisLine:{show:!0,lineStyle:{color:"#2B3873"}},axisTick:{show:!1},axisLabel:{show:!0,color:"#CDE0FC"}}],yAxis:[{type:"value",axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!0,lineStyle:{color:"#2B3873",type:"dotted"}},axisLabel:{show:!0,color:"#CDE0FC"}}],series:Object.entries(t).map((function(e,t){var i=e[0],r=e[1];return{name:i,type:"line",smooth:!0,data:n.map((function(e){return r[e]}))}}))}},n.reaction((function(){return i.gpui.params.padding}),(function(e){r.padding=e||"7vh 2vh 2vh"}),{fireImmediately:!0}),r}return function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(i,e),i.prototype.componentDidMount=function(){var e=this;this.chart=this.chart||Kv.init(this.chartRef.current),window.addEventListener("resize",(function(){e.chart.resize()})),n.reaction((function(){return{baseURL:e.props.gpui.params.base_url,setId:e.props.gpui.params.set_id,deviceToken:e.props.gpui.params.deviceToken,interval:e.props.gpui.params.interval}}),(function(){e.renderChart()}),{fireImmediately:!0})},i.prototype.render=function(){return t.createElement("div",{className:"g__index",style:{padding:this.padding}},t.createElement("div",{className:u},t.createElement("div",{ref:this.chartRef,className:c})))},a([n.observable],i.prototype,"padding",void 0),i=a([Z],i)}(t.Component)}));
