define(["gpui-style-inject","react","mobx"],(function(e,t,n){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r=i(e),o=i(t),s=a(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 l(e,t,n,i){var a,r=arguments.length,o=r<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--)(a=e[s])&&(o=(r<3?a(o):r>3?a(t,n,o):a(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}function u(e,t,n,i){return new(n||(n=Promise))((function(a,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?a(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())}))}r.default("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 c="index-module_main__byUtB",h="index-module_chart__0Bj7I",d="index-module_summary__zonaF",f="index-module_title__OGEcA",p="index-module_total__dsBMA";if(r.default(".index-module_main__byUtB {\n  position: relative;\n  width: 100%;\n  height: 100%; }\n  .index-module_main__byUtB .index-module_chart__0Bj7I {\n    width: 100%;\n    height: 100%; }\n  .index-module_main__byUtB .index-module_summary__zonaF {\n    position: absolute;\n    top: 50%;\n    left: 50%;\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n    align-items: center;\n    transform: translate(-50%, -50%); }\n    .index-module_main__byUtB .index-module_summary__zonaF .index-module_title__OGEcA {\n      font-size: 4.8vh;\n      color: #cde0ff; }\n    .index-module_main__byUtB .index-module_summary__zonaF .index-module_total__dsBMA {\n      font-size: 6vh;\n      font-weight: 600;\n      background-image: linear-gradient(to bottom, #0096ff 0%, #00d8ff 100%);\n      -webkit-text-fill-color: transparent;\n      -webkit-background-clip: text; }\n      .index-module_main__byUtB .index-module_summary__zonaF .index-module_total__dsBMA > span {\n        padding-left: 1vh;\n        font-size: 3vh;\n        font-weight: 400; }\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 g(){return g=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},g.apply(this,arguments)}function m(){var e=t.useState(0)[1];return t.useCallback((function(){e((function(e){return e+1}))}),[])}function v(e){return n.getDependencyTree(e)}var y,_=1e4,x=new Set;function b(){void 0===y&&(y=setTimeout(w,1e4))}function w(){y=void 0;var e=Date.now();x.forEach((function(t){var n=t.current;n&&e>=n.cleanAt&&(n.reaction.dispose(),t.current=null,x.delete(t))})),x.size>0&&b()}var S={};function M(e){return"observer"+e}function T(e,t,i){void 0===t&&(t="observed"),void 0===i&&(i=S);var a,r=(i.useForceUpdate||m)(),s=o.default.useRef(null);if(!s.current){var l=new n.Reaction(M(t),(function(){u.mounted?r():(l.dispose(),s.current=null)})),u=function(e){return{cleanAt:Date.now()+_,reaction:e}}(l);s.current=u,a=s,x.add(a),b()}var c,h,d=s.current.reaction;if(o.default.useDebugValue(d,v),o.default.useEffect((function(){var e;return e=s,x.delete(e),s.current?s.current.mounted=!0:(s.current={reaction:new n.Reaction(M(t),(function(){r()})),cleanAt:1/0},r()),function(){s.current.reaction.dispose(),s.current=null}}),[]),d.track((function(){try{c=e()}catch(e){h=e}})),h)throw h;return c}function I(e,n){var i,a=g({forwardRef:!1},n),r=e.displayName||e.name,o=function(t,n){return T((function(){return e(t,n)}),r)};return o.displayName=r,i=a.forwardRef?t.memo(t.forwardRef(o)):t.memo(o),function(e,t){Object.keys(e).forEach((function(n){A[n]||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}(e,i),i.displayName=r,i}var A={$$typeof:!0,render:!0,compare:!0,type:!0};function D(e){var t=e.children,n=e.render,i=t||n;return"function"!=typeof i?null:T(i)}function C(e,t,n,i,a){var r="children"===t?"render":"children",o="function"==typeof e[t],s="function"==typeof e[r];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 `"+a+"` of type `"+typeof e[t]+"` supplied to `"+n+"`, expected `function`.")}D.propTypes={children:C,render:C},D.displayName="Observer";var O=0;var k={};function L(e){return k[e]||(k[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var t="__$mobx-react "+e+" ("+O+")";return O++,t}(e)),k[e]}function E(e,t){if(N(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 a=0;a<n.length;a++)if(!Object.hasOwnProperty.call(t,n[a])||!N(e[n[a]],t[n[a]]))return!1;return!0}function N(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function P(e,t,n){Object.hasOwnProperty.call(e,t)?e[t]=n:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})}var R=L("patchMixins"),z=L("patchedDefinition");function B(e,t){for(var n=this,i=arguments.length,a=new Array(i>2?i-2:0),r=2;r<i;r++)a[r-2]=arguments[r];t.locks++;try{var o;return null!=e&&(o=e.apply(this,a)),o}finally{t.locks--,0===t.locks&&t.methods.forEach((function(e){e.apply(n,a)}))}}function V(e,t){return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];B.call.apply(B,[this,e,t].concat(i))}}function H(e,t,n){var i=function(e,t){var n=e[R]=e[R]||{},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 a=Object.getOwnPropertyDescriptor(e,t);if(!a||!a[z]){var r=e[t],o=Y(e,t,a?a.enumerable:void 0,i,r);Object.defineProperty(e,t,o)}}function Y(e,t,n,i,a){var r,o=V(a,i);return(r={})[z]=!0,r.get=function(){return o},r.set=function(a){if(this===e)o=V(a,i);else{var r=Y(this,t,n,i,a);Object.defineProperty(this,t,r)}},r.configurable=!0,r.enumerable=n,r}var F=n.$mobx||"$mobx",G=L("isUnmounted"),W=L("skipRender"),j=L("isForcingUpdate");function U(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!==X)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else n.shouldComponentUpdate=X;q(n,"props"),q(n,"state");var i=n.render;return n.render=function(){return Z.call(this,i)},H(n,"componentWillUnmount",(function(){this.render[F]&&this.render[F].dispose(),this[G]=!0})),e}function Z(e){var i=this;P(this,W,!1),P(this,j,!1);var a,r=(a=this).displayName||a.name||a.constructor&&(a.constructor.displayName||a.constructor.name)||"<component>",o=e.bind(this),s=!1,l=new n.Reaction(r+".render()",(function(){if(!s&&(s=!0,!0!==i[G])){var e=!0;try{P(i,j,!0),i[W]||t.Component.prototype.forceUpdate.call(i),e=!1}finally{P(i,j,!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[F]=l,this.render=u,u.call(this)}function X(e,t){return this.state!==t||!E(this.props,e)}function q(e,t){var i=L("reactProp_"+t+"_valueHolder"),a=L("reactProp_"+t+"_atomHolder");function r(){return this[a]||P(this,a,n.createAtom("reactive "+t)),this[a]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=!1;return n._allowStateReadsStart&&n._allowStateReadsEnd&&(e=n._allowStateReadsStart(!0)),r.call(this).reportObserved(),n._allowStateReadsStart&&n._allowStateReadsEnd&&n._allowStateReadsEnd(e),this[i]},set:function(e){this[j]||E(this[i],e)?P(this,i,e):(P(this,i,e),P(this,W,!0),r.call(this).reportChanged(),P(this,W,!1))}})}var K="function"==typeof Symbol&&Symbol.for,$=K?Symbol.for("react.forward_ref"):"function"==typeof t.forwardRef&&t.forwardRef((function(e){return null})).$$typeof,Q=K?Symbol.for("react.memo"):"function"==typeof t.memo&&t.memo((function(e){return null})).$$typeof;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");var J="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ee(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function te(e){var t={exports:{}};return e(t,t.exports),t.exports}function ne(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets option of @rollup/plugin-commonjs appropriately for this require call to behave properly.')}"undefined"!=typeof window||void 0!==J&&J.__DEV__;var ie=2311;var ae=function(){return ie++};var re="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={},i=e.match(/Firefox\/([\d.]+)/),a=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),r=e.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(e);i&&(n.firefox=!0,n.version=i[1]);a&&(n.ie=!0,n.version=a[1]);r&&(n.edge=!0,n.version=r[1]);o&&(n.weChat=!0);return{browser:n,os:t,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!n.ie&&!n.edge,pointerEventsSupported:"onpointerdown"in window&&(n.edge||n.ie&&n.version>=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),oe={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},se={"[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},le=Object.prototype.toString,ue=Array.prototype,ce=ue.forEach,he=ue.filter,de=ue.slice,fe=ue.map,pe=ue.reduce,ge={};function me(e){if(null==e||"object"!=typeof e)return e;var t=e,n=le.call(e);if("[object Array]"===n){if(!De(e)){t=[];for(var i=0,a=e.length;i<a;i++)t[i]=me(e[i])}}else if(se[n]){if(!De(e)){var r=e.constructor;if(e.constructor.from)t=r.from(e);else{t=new r(e.length);for(i=0,a=e.length;i<a;i++)t[i]=me(e[i])}}}else if(!oe[n]&&!De(e)&&!Ie(e))for(var o in t={},e)e.hasOwnProperty(o)&&(t[o]=me(e[o]));return t}function ve(e,t,n){if(!Me(t)||!Me(e))return n?me(t):e;for(var i in t)if(t.hasOwnProperty(i)){var a=e[i],r=t[i];!Me(r)||!Me(a)||Se(r)||Se(a)||Ie(r)||Ie(a)||Te(r)||Te(a)||De(r)||De(a)?!n&&i in e||(e[i]=me(t[i])):ve(a,r,n)}return e}function ye(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 _e,xe=function(){return ge.createCanvas()};function be(e,t,n){if(e&&t)if(e.forEach&&e.forEach===ce)e.forEach(t,n);else if(e.length===+e.length)for(var i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e);else for(var r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function we(e,t){var n=de.call(arguments,2);return function(){return e.apply(t,n.concat(de.call(arguments)))}}function Se(e){return"[object Array]"===le.call(e)}function Me(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function Te(e){return!!oe[le.call(e)]}function Ie(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}ge.createCanvas=function(){return document.createElement("canvas")};var Ae="__ec_primitive__";function De(e){return e[Ae]}function Ce(e){var t=Se(e);this.data={};var n=this;function i(e,i){t?n.set(e,i):n.set(i,e)}e instanceof Ce?e.each(i):e&&be(e,i)}Ce.prototype={constructor:Ce,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=we(e,t)),this.data)this.data.hasOwnProperty(n)&&e(this.data[n],n)},removeKey:function(e){delete this.data[e]}};var Oe=function(e,t){for(var n=e[0],i=1,a=e.length;i<a;i++)n=ve(n,e[i],t);return n},ke=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},Le=function(e,t){var n=e.prototype;function i(){}for(var a in i.prototype=t.prototype,e.prototype=new i,n)n.hasOwnProperty(a)&&(e.prototype[a]=n[a]);e.prototype.constructor=e,e.superClass=t},Ee=function(e,t,n){if(e&&t){if(e.map&&e.map===fe)return e.map(t,n);for(var i=[],a=0,r=e.length;a<r;a++)i.push(t.call(n,e[a],a,e));return i}},Ne=function(e,t,n,i){if(e&&t){if(e.reduce&&e.reduce===pe)return e.reduce(t,n,i);for(var a=0,r=e.length;a<r;a++)n=t.call(i,n,e[a],a,e);return n}},Pe=function(e,t,n){if(e&&t){if(e.filter&&e.filter===he)return e.filter(t,n);for(var i=[],a=0,r=e.length;a<r;a++)t.call(n,e[a],a,e)&&i.push(e[a]);return i}},Re=function(e,t,n){if(e&&t)for(var i=0,a=e.length;i<a;i++)if(t.call(n,e[i],i,e))return e[i]},ze=function(e){var t=de.call(arguments,1);return function(){return e.apply(this,t.concat(de.call(arguments)))}},Be=function(e){for(var t=0,n=arguments.length;t<n;t++)if(null!=arguments[t])return arguments[t]},Ve=function(){return Function.call.apply(de,arguments)},He=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},Ye=function(e,t){for(var n=new e.constructor(e.length+t.length),i=0;i<e.length;i++)n[i]=e[i];var a=e.length;for(i=0;i<t.length;i++)n[i+a]=t[i];return n},Fe={$override:function(e,t){"createCanvas"===e&&(_e=null),ge[e]=t},clone:me,merge:ve,mergeAll:Oe,extend:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},defaults:ye,createCanvas:xe,getContext:function(){return _e||(_e=xe().getContext("2d")),_e},indexOf:ke,inherits:Le,mixin:function(e,t,n){ye(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:be,map:Ee,reduce:Ne,filter:Pe,find:Re,bind:we,curry:ze,isArray:Se,isFunction:function(e){return"function"==typeof e},isString:function(e){return"[object String]"===le.call(e)},isObject:Me,isBuiltInObject:Te,isTypedArray:function(e){return!!se[le.call(e)]},isDom:Ie,eqNaN:function(e){return e!=e},retrieve:Be,retrieve2:function(e,t){return null!=e?e:t},retrieve3:function(e,t,n){return null!=e?e:null!=t?t:n},slice:Ve,normalizeCssArray:He,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[Ae]=!0},isPrimitive:De,createHashMap:function(e){return new Ce(e)},concatArray:Ye,noop:function(){}},Ge="undefined"==typeof Float32Array?Array:Float32Array;function We(e){return Math.sqrt(je(e))}function je(e){return e[0]*e[0]+e[1]*e[1]}function Ue(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}function Ze(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var Xe=function(e,t){var n=new Ge(2);return null==e&&(e=0),null==t&&(t=0),n[0]=e,n[1]=t,n},qe=function(e,t){return e[0]=t[0],e[1]=t[1],e},Ke=function(e){var t=new Ge(2);return t[0]=e[0],t[1]=e[1],t},$e=function(e,t,n){return e[0]=t,e[1]=n,e},Qe=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e},Je=function(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e},et=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e},tt=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e},nt=function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e},it=function(e,t){return e[0]*t[0]+e[1]*t[1]},at=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e},rt=function(e,t){var n=We(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e},ot=function(e,t){return e[0]=-t[0],e[1]=-t[1],e},st=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},lt=function(e,t,n){var i=t[0],a=t[1];return e[0]=n[0]*i+n[2]*a+n[4],e[1]=n[1]*i+n[3]*a+n[5],e},ut=function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e},ct=function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e},ht={create:Xe,copy:qe,clone:Ke,set:$e,add:Qe,scaleAndAdd:Je,sub:et,len:We,length:We,lenSquare:je,lengthSquare:je,mul:tt,div:nt,dot:it,scale:at,normalize:rt,distance:Ue,dist:Ue,distanceSquare:Ze,distSquare:Ze,negate:ot,lerp:st,applyTransform:lt,min:ut,max:ct};function dt(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function ft(e,t){return{target:e,topTarget:t&&t.topTarget}}dt.prototype={constructor:dt,_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(ft(t,e),"dragstart",e.event))},_drag:function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,i=e.offsetY,a=n-this._x,r=i-this._y;this._x=n,this._y=i,t.drift(a,r,e),this.dispatchToElement(ft(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(ft(s,e),"dragleave",e.event),o&&o!==s&&this.dispatchToElement(ft(o,e),"dragenter",e.event))}},_dragEnd:function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.dispatchToElement(ft(t,e),"dragend",e.event),this._dropTarget&&this.dispatchToElement(ft(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null}};var pt=dt,gt=Array.prototype.slice,mt=function(e){this._$handlers={},this._$eventProcessor=e};function vt(e,t,n,i,a,r){var o=e._$handlers;if("function"==typeof n&&(a=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:r,query:n,ctx:a||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}mt.prototype={constructor:mt,one:function(e,t,n,i){return vt(this,e,t,n,i,!0)},on:function(e,t,n,i){return vt(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=[],a=0,r=n[e].length;a<r;a++)n[e][a].h!==t&&i.push(n[e][a]);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,a=i.length;a>3&&(i=gt.call(i,1));for(var r=t.length,o=0;o<r;){var s=t[o];if(n&&n.filter&&null!=s.query&&!n.filter(e,s.query))o++;else{switch(a){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),r--):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,a=i.length;a>4&&(i=gt.call(i,1,i.length-1));for(var r=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(a){case 1:l.h.call(r);break;case 2:l.h.call(r,i[1]);break;case 3:l.h.call(r,i[1],i[2]);break;default:l.h.apply(r,i)}l.one?(t.splice(s,1),o--):s++}}}return n&&n.afterTrigger&&n.afterTrigger(e),this}};var yt=mt,_t=Math.log(2);function xt(e,t,n,i,a,r){var o=i+"-"+a,s=e.length;if(r.hasOwnProperty(o))return r[o];if(1===t){var l=Math.round(Math.log((1<<s)-1&~a)/_t);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&a||(h+=(f%2?-1:1)*e[n][d]*xt(e,t-1,c,u,a|p,r),f++)}return r[o]=h,h}var bt=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={},a=xt(n,8,0,0,0,i);if(0!==a){for(var r=[],o=0;o<8;o++)for(var s=0;s<8;s++)null==r[s]&&(r[s]=0),r[s]+=((o+s)%2?-1:1)*xt(n,7,0===o?1:0,1<<o,1<<s,i)/a*t[o];return function(e,t,n){var i=t*r[6]+n*r[7]+1;e[0]=(t*r[0]+n*r[1]+r[2])/i,e[1]=(t*r[3]+n*r[4]+r[5])/i}}},wt={buildTransformer:bt}.buildTransformer,St="___zrEVENTSAVED",Mt=[];function Tt(e,t,n,i,a){if(t.getBoundingClientRect&&re.domSupported&&!It(t)){var r=t[St]||(t[St]={}),o=function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var i=["left","right"],a=["top","bottom"],r=0;r<4;r++){var o=document.createElement("div"),s=r%2,l=(r>>1)%2;o.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",a[l]+":0",i[1-s]+":auto",a[1-l]+":auto",""].join("!important;"),e.appendChild(o),n.push(o)}return n}(t,r),s=function(e,t,n){for(var i=n?"invTrans":"trans",a=t[i],r=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&&r&&d===r[h]&&f===r[h+1],l.push(e[u].offsetLeft,e[u].offsetTop)}return o&&a?a:(t.srcCoords=s,t[i]=n?wt(l,s):wt(s,l))}(o,r,a);if(s)return s(e,n,i),!0}return!1}function It(e){return"CANVAS"===e.nodeName.toUpperCase()}var At=function(e,t,n,i,a){return Tt(Mt,t,i,a,!0)&&Tt(e,n,Mt[0],Mt[1])},Dt={transformLocalCoord:At,transformCoordWithViewport:Tt,isCanvasEl:It},Ct=yt,Ot=Dt.isCanvasEl,kt=Dt.transformCoordWithViewport,Lt="undefined"!=typeof window&&!!window.addEventListener,Et=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Nt=[];function Pt(e,t,n,i){return n=n||{},i||!re.canvasSupported?Rt(e,t,n):re.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):Rt(e,t,n),n}function Rt(e,t,n){if(re.domSupported&&e.getBoundingClientRect){var i=t.clientX,a=t.clientY;if(Ot(e)){var r=e.getBoundingClientRect();return n.zrX=i-r.left,void(n.zrY=a-r.top)}if(kt(Nt,e,i,a))return n.zrX=Nt[0],void(n.zrY=Nt[1])}n.zrX=n.zrY=0}function zt(e){return e||window.event}var Bt={Dispatcher:Ct,clientToLocal:Pt,getNativeEvent:zt,normalizeEvent:function(e,t,n){if(null!=(t=zt(t)).zrX)return t;var i=t.type;if(i&&i.indexOf("touch")>=0){var a="touchend"!==i?t.targetTouches[0]:t.changedTouches[0];a&&Pt(e,a,t,n)}else Pt(e,t,t,n),t.zrDelta=t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3;var r=t.button;return null==t.which&&void 0!==r&&Et.test(t.type)&&(t.which=1&r?1:2&r?3:4&r?2:0),t},addEventListener:function(e,t,n,i){Lt?e.addEventListener(t,n,i):e.attachEvent("on"+t,n)},removeEventListener:function(e,t,n,i){Lt?e.removeEventListener(t,n,i):e.detachEvent("on"+t,n)},stop:Lt?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}},Vt=function(){this._track=[]};function Ht(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}Vt.prototype={constructor:Vt,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 a={points:[],touches:[],target:t,event:e},r=0,o=i.length;r<o;r++){var s=i[r],l=Bt.clientToLocal(n,s,{});a.points.push([l.zrX,l.zrY]),a.touches.push(s)}this._track.push(a)}},_recognize:function(e){for(var t in Yt)if(Yt.hasOwnProperty(t)){var n=Yt[t](this._track,e);if(n)return n}}};var Yt={pinch:function(e,t){var n=e.length;if(n){var i,a=(e[n-1]||{}).points,r=(e[n-2]||{}).points||a;if(r&&r.length>1&&a&&a.length>1){var o=Ht(a)/Ht(r);!isFinite(o)&&(o=1),t.pinchScale=o;var s=[((i=a)[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}}}}},Ft=Vt,Gt="silent";function Wt(){Bt.stop(this.event)}function jt(){}jt.prototype.dispose=function(){};var Ut=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Zt=function(e,t,n,i){yt.call(this),this.storage=e,this.painter=t,this.painterRoot=i,n=n||new jt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,pt.call(this),this.setHandlerProxy(n)};function Xt(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var i,a=e;a;){if(a.clipPath&&!a.clipPath.contain(t,n))return!1;a.silent&&(i=!0),a=a.parent}return!i||Gt}return!1}function qt(e,t,n){var i=e.painter;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}Zt.prototype={constructor:Zt,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(Fe.each(Ut,(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=qt(this,t,n),a=this._hovered,r=a.target;r&&!r.__zr&&(r=(a=this.findHover(a.x,a.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"),r&&s!==r&&this.dispatchToElement(a,"mouseout",e),this.dispatchToElement(o,"mousemove",e),s&&s!==r&&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 a="on"+t,r=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:Wt}}(t,e,n);i&&(i[a]&&(r.cancelBubble=i[a].call(i,r)),i.trigger(t,r),i=i.parent,!r.cancelBubble););r.cancelBubble||(this.trigger(t,r),this.painter&&this.painter.eachOtherLayer((function(e){"function"==typeof e[a]&&e[a].call(e,r),e.trigger&&e.trigger(t,r)})))}},findHover:function(e,t,n){for(var i=this.storage.getDisplayList(),a={x:e,y:t},r=i.length-1;r>=0;r--){var o;if(i[r]!==n&&!i[r].ignore&&(o=Xt(i[r],e,t))&&(!a.topTarget&&(a.topTarget=i[r]),o!==Gt)){a.target=i[r];break}}return a},processGesture:function(e,t){this._gestureMgr||(this._gestureMgr=new Ft);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 a=i.type;e.gestureEvent=a,this.dispatchToElement({target:i.target},a,i.event)}}},Fe.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){Zt.prototype[e]=function(t){var n,i,a=t.zrX,r=t.zrY,o=qt(this,a,r);if("mouseup"===e&&o||(i=(n=this.findHover(a,r)).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||ht.dist(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}})),Fe.mixin(Zt,yt),Fe.mixin(Zt,pt);var Kt=Zt,$t="undefined"==typeof Float32Array?Array:Float32Array;function Qt(){var e=new $t(6);return Jt(e),e}function Jt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function en(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 tn=function(e,t,n){var i=t[0]*n[0]+t[2]*n[1],a=t[1]*n[0]+t[3]*n[1],r=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]=a,e[2]=r,e[3]=o,e[4]=s,e[5]=l,e},nn=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},an=function(e,t,n){var i=t[0],a=t[2],r=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]=a*c+s*u,e[3]=-a*u+c*s,e[4]=c*r+u*l,e[5]=c*l-u*r,e},rn=function(e,t,n){var i=n[0],a=n[1];return e[0]=t[0]*i,e[1]=t[1]*a,e[2]=t[2]*i,e[3]=t[3]*a,e[4]=t[4]*i,e[5]=t[5]*a,e},on=function(e,t){var n=t[0],i=t[2],a=t[4],r=t[1],o=t[3],s=t[5],l=n*o-r*i;return l?(l=1/l,e[0]=o*l,e[1]=-r*l,e[2]=-i*l,e[3]=n*l,e[4]=(i*s-o*a)*l,e[5]=(r*a-n*s)*l,e):null},sn={create:Qt,identity:Jt,copy:en,mul:tn,translate:nn,rotate:an,scale:rn,invert:on,clone:function(e){var t=Qt();return en(t,e),t}},ln=sn.identity,un=5e-5;function cn(e){return e>un||e<-5e-5}var hn=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},dn=hn.prototype;dn.transform=null,dn.needLocalTransform=function(){return cn(this.rotation)||cn(this.position[0])||cn(this.position[1])||cn(this.scale[0]-1)||cn(this.scale[1]-1)};var fn=[];dn.updateTransform=function(){var e=this.parent,t=e&&e.transform,n=this.needLocalTransform(),i=this.transform;if(n||t){i=i||sn.create(),n?this.getLocalTransform(i):ln(i),t&&(n?sn.mul(i,e.transform,i):sn.copy(i,e.transform)),this.transform=i;var a=this.globalScaleRatio;if(null!=a&&1!==a){this.getGlobalScale(fn);var r=fn[0]<0?-1:1,o=fn[1]<0?-1:1,s=((fn[0]-r)*a+r)/fn[0]||0,l=((fn[1]-o)*a+o)/fn[1]||0;i[0]*=s,i[1]*=s,i[2]*=l,i[3]*=l}this.invTransform=this.invTransform||sn.create(),sn.invert(this.invTransform,i)}else i&&ln(i)},dn.getLocalTransform=function(e){return hn.getLocalTransform(this,e)},dn.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)},dn.restoreTransform=function(e){var t=e.dpr||1;e.setTransform(t,0,0,t,0,0)};var pn=[],gn=sn.create();dn.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,a=this.scale;cn(t-1)&&(t=Math.sqrt(t)),cn(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(t=-t),e[3]<0&&(n=-n),i[0]=e[4],i[1]=e[5],a[0]=t,a[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/t)}},dn.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(sn.mul(pn,e.invTransform,t),t=pn);var n=this.origin;n&&(n[0]||n[1])&&(gn[4]=n[0],gn[5]=n[1],sn.mul(pn,t,gn),pn[4]-=n[0],pn[5]-=n[1],t=pn),this.setLocalTransform(t)}},dn.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)},dn.transformCoordToLocal=function(e,t){var n=[e,t],i=this.invTransform;return i&&ht.applyTransform(n,n,i),n},dn.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&ht.applyTransform(n,n,i),n},hn.getLocalTransform=function(e,t){ln(t=t||[]);var n=e.origin,i=e.scale||[1,1],a=e.rotation||0,r=e.position||[0,0];return n&&(t[4]-=n[0],t[5]-=n[1]),sn.scale(t,t,i),a&&sn.rotate(t,t,a),n&&(t[4]+=n[0],t[5]+=n[1]),t[4]+=r[0],t[5]+=r[1],t};var mn=hn,vn={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-vn.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*vn.bounceIn(2*e):.5*vn.bounceOut(2*e-1)+.5}},yn=vn;function _n(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}_n.prototype={constructor:_n,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,a="string"==typeof i?yn[i]:i,r="function"==typeof a?a(n):n;return this.fire("frame",r),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 xn=_n,bn=function(){this.head=null,this.tail=null,this._len=0},wn=bn.prototype;wn.insert=function(e){var t=new Sn(e);return this.insertEntry(t),t},wn.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++},wn.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--},wn.len=function(){return this._len},wn.clear=function(){this.head=this.tail=null,this._len=0};var Sn=function(e){this.value=e,this.next,this.prev},Mn=function(e){this._list=new bn,this._map={},this._maxSize=e||10,this._lastRemovedEntry=null},Tn=Mn.prototype;Tn.put=function(e,t){var n=this._list,i=this._map,a=null;if(null==i[e]){var r=n.len(),o=this._lastRemovedEntry;if(r>=this._maxSize&&r>0){var s=n.head;n.remove(s),delete i[s.key],a=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Sn(t),o.key=e,n.insertEntry(o),i[e]=o}return a},Tn.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},Tn.clear=function(){this._list.clear(),this._map={}};var In=Mn,An={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 Dn(e){return(e=Math.round(e))<0?0:e>255?255:e}function Cn(e){return e<0?0:e>1?1:e}function On(e){return e.length&&"%"===e.charAt(e.length-1)?Dn(parseFloat(e)/100*255):Dn(parseInt(e,10))}function kn(e){return e.length&&"%"===e.charAt(e.length-1)?Cn(parseFloat(e)/100):Cn(parseFloat(e))}function Ln(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 En(e,t,n){return e+(t-e)*n}function Nn(e,t,n,i,a){return e[0]=t,e[1]=n,e[2]=i,e[3]=a,e}function Pn(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Rn=new In(20),zn=null;function Bn(e,t){zn&&Pn(zn,t),zn=Rn.put(e,zn||t.slice())}function Vn(e,t){if(e){t=t||[];var n=Rn.get(e);if(n)return Pn(t,n);var i,a=(e+="").replace(/ /g,"").toLowerCase();if(a in An)return Pn(t,An[a]),Bn(e,t),t;if("#"===a.charAt(0))return 4===a.length?(i=parseInt(a.substr(1),16))>=0&&i<=4095?(Nn(t,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),Bn(e,t),t):void Nn(t,0,0,0,1):7===a.length?(i=parseInt(a.substr(1),16))>=0&&i<=16777215?(Nn(t,(16711680&i)>>16,(65280&i)>>8,255&i,1),Bn(e,t),t):void Nn(t,0,0,0,1):void 0;var r=a.indexOf("("),o=a.indexOf(")");if(-1!==r&&o+1===a.length){var s=a.substr(0,r),l=a.substr(r+1,o-(r+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Nn(t,0,0,0,1);u=kn(l.pop());case"rgb":return 3!==l.length?void Nn(t,0,0,0,1):(Nn(t,On(l[0]),On(l[1]),On(l[2]),u),Bn(e,t),t);case"hsla":return 4!==l.length?void Nn(t,0,0,0,1):(l[3]=kn(l[3]),Hn(l,t),Bn(e,t),t);case"hsl":return 3!==l.length?void Nn(t,0,0,0,1):(Hn(l,t),Bn(e,t),t);default:return}}Nn(t,0,0,0,1)}}function Hn(e,t){var n=(parseFloat(e[0])%360+360)%360/360,i=kn(e[1]),a=kn(e[2]),r=a<=.5?a*(i+1):a+i-a*i,o=2*a-r;return Nn(t=t||[],Dn(255*Ln(o,r,n+1/3)),Dn(255*Ln(o,r,n)),Dn(255*Ln(o,r,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function Yn(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var i=e*(t.length-1),a=Math.floor(i),r=Math.ceil(i),o=t[a],s=t[r],l=i-a;return n[0]=Dn(En(o[0],s[0],l)),n[1]=Dn(En(o[1],s[1],l)),n[2]=Dn(En(o[2],s[2],l)),n[3]=Cn(En(o[3],s[3],l)),n}}function Fn(e,t,n){if(t&&t.length&&e>=0&&e<=1){var i=e*(t.length-1),a=Math.floor(i),r=Math.ceil(i),o=Vn(t[a]),s=Vn(t[r]),l=i-a,u=Gn([Dn(En(o[0],s[0],l)),Dn(En(o[1],s[1],l)),Dn(En(o[2],s[2],l)),Cn(En(o[3],s[3],l))],"rgba");return n?{color:u,leftIndex:a,rightIndex:r,value:i}:u}}function Gn(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 Wn=function(e,t){var n=Vn(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 Gn(n,4===n.length?"rgba":"rgb")}},jn=function(e){var t=Vn(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},Un=function(e,t,n,i){if(e=Vn(e))return e=function(e){if(e){var t,n,i=e[0]/255,a=e[1]/255,r=e[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),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-a)/6+l/2)/l,d=((s-r)/6+l/2)/l;i===s?t=d-h:a===s?t=1/3+c-d:r===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]=kn(n)),null!=i&&(e[2]=kn(i)),Gn(Hn(e),"rgba")},Zn=function(e,t){if((e=Vn(e))&&null!=t)return e[3]=Cn(t),Gn(e,"rgba")},Xn={parse:Vn,lift:Wn,toHex:jn,fastLerp:Yn,fastMapToColor:Yn,lerp:Fn,mapToColor:Fn,modifyHSL:Un,modifyAlpha:Zn,stringify:Gn},qn=Fe.isArrayLike,Kn=Array.prototype.slice;function $n(e,t){return e[t]}function Qn(e,t,n){e[t]=n}function Jn(e,t,n){return(t-e)*n+e}function ei(e,t,n){return n>.5?t:e}function ti(e,t,n,i,a){var r=e.length;if(1===a)for(var o=0;o<r;o++)i[o]=Jn(e[o],t[o],n);else{var s=r&&e[0].length;for(o=0;o<r;o++)for(var l=0;l<s;l++)i[o][l]=Jn(e[o][l],t[o][l],n)}}function ni(e,t,n){var i=e.length,a=t.length;if(i!==a)if(i>a)e.length=a;else for(var r=i;r<a;r++)e.push(1===n?t[r]:Kn.call(t[r]));var o=e[0]&&e[0].length;for(r=0;r<e.length;r++)if(1===n)isNaN(e[r])&&(e[r]=t[r]);else for(var s=0;s<o;s++)isNaN(e[r][s])&&(e[r][s]=t[r][s])}function ii(e,t,n){if(e===t)return!0;var i=e.length;if(i!==t.length)return!1;if(1===n){for(var a=0;a<i;a++)if(e[a]!==t[a])return!1}else{var r=e[0].length;for(a=0;a<i;a++)for(var o=0;o<r;o++)if(e[a][o]!==t[a][o])return!1}return!0}function ai(e,t,n,i,a,r,o,s,l){var u=e.length;if(1===l)for(var c=0;c<u;c++)s[c]=ri(e[c],t[c],n[c],i[c],a,r,o);else{var h=e[0].length;for(c=0;c<u;c++)for(var d=0;d<h;d++)s[c][d]=ri(e[c][d],t[c][d],n[c][d],i[c][d],a,r,o)}}function ri(e,t,n,i,a,r,o){var s=.5*(n-e),l=.5*(i-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*r+s*a+t}function oi(e){if(qn(e)){var t=e.length;if(qn(e[0])){for(var n=[],i=0;i<t;i++)n.push(Kn.call(e[i]));return n}return Kn.call(e)}return e}function si(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}function li(e,t,n,i,a,r){var o=e._getter,s=e._setter,l="spline"===t,u=i.length;if(u){var c,h=i[0].value,d=qn(h),f=!1,p=!1,g=d?function(e){var t=e[e.length-1].value;return qn(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&&ii(b,y,g)||!d&&b===y||(_=!1),y=b,"string"==typeof b){var w=Xn.parse(b);w?(b=w,f=!0):p=!0}v.push(b)}if(r||!_){var S=v[u-1];for(x=0;x<u-1;x++)d?ni(v[x],S,g):!isNaN(v[x])||isNaN(S)||p||f||(v[x]=S);d&&ni(o(e._target,a),S,g);var M,T,I,A,D,C=0,O=0;if(f)var k=[0,0,0,0];var L=new xn({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<O){for(n=Math.min(C+1,u-1);n>=0&&!(m[n]<=t);n--);n=Math.min(n,u-2)}else{for(n=C;n<u&&!(m[n]>t);n++);n=Math.min(n-1,u-2)}C=n,O=t;var i=m[n+1]-m[n];if(0!==i)if(M=(t-m[n])/i,l)if(I=v[n],T=v[0===n?n:n-1],A=v[n>u-2?u-1:n+1],D=v[n>u-3?u-1:n+2],d)ai(T,I,A,D,M,M*M,M*M*M,o(e,a),g);else{if(f)r=ai(T,I,A,D,M,M*M,M*M*M,k,1),r=si(k);else{if(p)return ei(I,A,M);r=ri(T,I,A,D,M,M*M,M*M*M)}s(e,a,r)}else if(d)ti(v[n],v[n+1],M,o(e,a),g);else{var r;if(f)ti(v[n],v[n+1],M,k,1),r=si(k);else{if(p)return ei(v[n],v[n+1],M);r=Jn(v[n],v[n+1],M)}s(e,a,r)}},ondestroy:n});return t&&"spline"!==t&&(L.easing=t),L}}}var ui=function(e,t,n,i){this._tracks={},this._target=e,this._loop=t||!1,this._getter=n||$n,this._setter=i||Qn,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};ui.prototype={when:function(e,t){var n=this._tracks;for(var i in t)if(t.hasOwnProperty(i)){if(!n[i]){n[i]=[];var a=this._getter(this._target,i);if(null==a)continue;0!==e&&n[i].push({time:0,value:oi(a)})}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,a=0,r=function(){--a||i._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=li(this,e,r,this._tracks[o],o,t);s&&(this._clipList.push(s),a++,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 a||this._doneCallback(),this},stop:function(e){for(var t=this._clipList,n=this.animation,i=0;i<t.length;i++){var a=t[i];e&&a.onframe(this._target,1),n&&n.removeClip(a)}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 ci=ui,hi=1;"undefined"!=typeof window&&(hi=Math.max(window.devicePixelRatio||1,1));var di={debugMode:0,devicePixelRatio:hi},fi=function(){},pi=Fe.isString,gi=Fe.isFunction,mi=Fe.isObject,vi=Fe.isArrayLike,yi=Fe.indexOf,_i=function(){this.animators=[]};function xi(e,t,n,i,a,r,o,s){pi(i)?(r=a,a=i,i=0):gi(a)?(r=a,a="linear",i=0):gi(i)?(r=i,i=0):gi(n)?(r=n,n=500):n||(n=500),e.stopAnimation(),bi(e,"",e,t,n,i,s);var l=e.animators.slice(),u=l.length;function c(){--u||r&&r()}u||r&&r();for(var h=0;h<l.length;h++)l[h].done(c).start(a,o)}function bi(e,t,n,i,a,r,o){var s={},l=0;for(var u in i)i.hasOwnProperty(u)&&(null!=n[u]?mi(i[u])&&!vi(i[u])?bi(e,t?t+"."+u:u,n[u],i[u],a,r,o):(o?(s[u]=n[u],wi(e,t,u,i[u])):s[u]=i[u],l++):null==i[u]||o||wi(e,t,u,i[u]));l>0&&e.animate(t,!1).when(null==a?500:a,s).delay(r||0)}function wi(e,t,n,i){if(t){var a={};a[t]={},a[t][n]=i,e.attr(a)}else e.attr(n,i)}_i.prototype={constructor:_i,animate:function(e,t){var n,i=!1,a=this,r=this.__zr;if(e){var o=e.split("."),s=a;i="shape"===o[0];for(var l=0,u=o.length;l<u;l++)s&&(s=s[o[l]]);s&&(n=s)}else n=a;if(n){var c=a.animators,h=new ci(n,t);return h.during((function(e){a.dirty(i)})).done((function(){c.splice(yi(c,h),1)})),c.push(h),r&&r.animation.addAnimator(h),h}fi('Property "'+e+'" is not existed in element '+a.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,a,r){xi(this,e,t,n,i,a,r)},animateFrom:function(e,t,n,i,a,r){xi(this,e,t,n,i,a,r,!0)}};var Si=_i,Mi=function(e){mn.call(this,e),yt.call(this,e),Si.call(this,e),this.id=e.id||ae()};Mi.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(Fe.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)}},Fe.mixin(Mi,Si),Fe.mixin(Mi,mn),Fe.mixin(Mi,yt);var Ti,Ii,Ai,Di,Ci=Mi,Oi=ht.applyTransform,ki=Math.min,Li=Math.max;function Ei(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}Ei.prototype={constructor:Ei,union:function(e){var t=ki(e.x,this.x),n=ki(e.y,this.y);this.width=Li(e.x+e.width,this.x+this.width)-t,this.height=Li(e.y+e.height,this.y+this.height)-n,this.x=t,this.y=n},applyTransform:(Ti=[],Ii=[],Ai=[],Di=[],function(e){if(e){Ti[0]=Ai[0]=this.x,Ti[1]=Di[1]=this.y,Ii[0]=Di[0]=this.x+this.width,Ii[1]=Ai[1]=this.y+this.height,Oi(Ti,Ti,e),Oi(Ii,Ii,e),Oi(Ai,Ai,e),Oi(Di,Di,e),this.x=ki(Ti[0],Ii[0],Ai[0],Di[0]),this.y=ki(Ti[1],Ii[1],Ai[1],Di[1]);var t=Li(Ti[0],Ii[0],Ai[0],Di[0]),n=Li(Ti[1],Ii[1],Ai[1],Di[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,a=sn.create();return sn.translate(a,a,[-t.x,-t.y]),sn.scale(a,a,[n,i]),sn.translate(a,a,[e.x,e.y]),a},intersect:function(e){if(!e)return!1;e instanceof Ei||(e=Ei.create(e));var t=this,n=t.x,i=t.x+t.width,a=t.y,r=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||r<l||u<a)},contain:function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},clone:function(){return new Ei(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}}},Ei.create=function(e){return new Ei(e.x,e.y,e.width,e.height)};var Ni=Ei,Pi=function(e){for(var t in e=e||{},Ci.call(this,e),e)e.hasOwnProperty(t)&&(this[t]=e[t]);this._children=[],this.__storage=null,this.__dirty=!0};Pi.prototype={constructor:Pi,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 Pi&&e.addChildrenToStorage(t)),n&&n.refresh()},remove:function(e){var t=this.__zr,n=this.__storage,i=this._children,a=Fe.indexOf(i,e);return a<0||(i.splice(a,1),e.parent=null,n&&(n.delFromStorage(e),e instanceof Pi&&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 Pi&&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 a=n[i];e.call(t,a,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 Pi&&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 Pi&&n.delChildrenFromStorage(e)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(e){for(var t=null,n=new Ni(0,0,0,0),i=e||this._children,a=[],r=0;r<i.length;r++){var o=i[r];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(a);l?(n.copy(s),n.applyTransform(l),(t=t||n.clone()).union(n)):(t=t||s.clone()).union(s)}}return t||n}},Fe.inherits(Pi,Ci);var Ri=Pi;function zi(e,t,n,i){var a=t+1;if(a===n)return 1;if(i(e[a++],e[t])<0){for(;a<n&&i(e[a],e[a-1])<0;)a++;!function(e,t,n){n--;for(;t<n;){var i=e[t];e[t++]=e[n],e[n--]=i}}(e,t,a)}else for(;a<n&&i(e[a],e[a-1])>=0;)a++;return a-t}function Bi(e,t,n,i,a){for(i===t&&i++;i<n;i++){for(var r,o=e[i],s=t,l=i;s<l;)a(o,e[r=s+l>>>1])<0?l=r:s=r+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 Vi(e,t,n,i,a,r){var o=0,s=0,l=1;if(r(e,t[n+a])>0){for(s=i-a;l<s&&r(e,t[n+a+l])>0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;l<s&&r(e,t[n+a-l])<=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o<l;){var c=o+(l-o>>>1);r(e,t[n+c])>0?o=c+1:l=c}return l}function Hi(e,t,n,i,a,r){var o=0,s=0,l=1;if(r(e,t[n+a])<0){for(s=a+1;l<s&&r(e,t[n+a-l])<0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=i-a;l<s&&r(e,t[n+a+l])>=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o<l;){var c=o+(l-o>>>1);r(e,t[n+c])<0?l=c:o=c+1}return l}function Yi(e,t){var n,i,a=7,r=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===r-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),r--;var d=Hi(e[c],e,l,u,0,t);l+=d,0!==(u-=d)&&0!==(h=Vi(e[l+u-1],e,c,h,h-1,t))&&(u<=h?function(n,i,r,s){var l=0;for(l=0;l<i;l++)o[l]=e[n+l];var u=0,c=r,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=a;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=Hi(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=Vi(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((a=g)<1&&(a=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,r,s){var l=0;for(l=0;l<s;l++)o[l]=e[r+l];var u=n+i-1,c=s-1,h=r+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=a;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-Hi(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-Vi(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}(a=p)<1&&(a=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(;r>1;){var e=r-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(;r>1;){var e=r-2;e>0&&i[e-1]<i[e+1]&&e--,s(e)}},this.pushRun=function(e,t){n[r]=e,i[r]=t,r+=1}}var Fi=function(e,t,n,i){n||(n=0),i||(i=e.length);var a=i-n;if(!(a<2)){var r=0;if(a<32)Bi(e,n,i,n+(r=zi(e,n,i,t)),t);else{var o=new Yi(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(a);do{if((r=zi(e,n,i,t))<s){var l=a;l>s&&(l=s),Bi(e,n,n+l,n+r,t),r=l}o.pushRun(n,r),o.mergeRuns(),a-=r,n+=r}while(0!==a);o.forceMergeRuns()}}};function Gi(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Wi=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Wi.prototype={constructor:Wi,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,a=t.length;i<a;i++)this._updateAndAddDisplayable(t[i],null,e);n.length=this._displayListLen,re.canvasSupported&&Fi(n,Gi)},_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 a=i,r=e;a;)a.parent=r,a.updateTransform(),t.push(a),r=a,a=a.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 Ri&&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 Ri&&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 a=Fe.indexOf(this._roots,e);a>=0&&(this.delFromStorage(e),this._roots.splice(a,1),e instanceof Ri&&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:Gi};var ji=Wi,Ui={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};var Zi=function(e,t,n){return Ui.hasOwnProperty(t)?n*e.dpr:n},Xi={ContextCachedBy:{NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},WILL_BE_RESTORED:9},qi=Xi.ContextCachedBy,Ki=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],$i=function(e){this.extendFrom(e,!1)};function Qi(e,t,n){var i=null==t.x?0:t.x,a=null==t.x2?1:t.x2,r=null==t.y?0:t.y,o=null==t.y2?0:t.y2;return t.global||(i=i*n.width+n.x,a=a*n.width+n.x,r=r*n.height+n.y,o=o*n.height+n.y),i=isNaN(i)?0:i,a=isNaN(a)?1:a,r=isNaN(r)?0:r,o=isNaN(o)?0:o,e.createLinearGradient(i,r,a,o)}function Ji(e,t,n){var i=n.width,a=n.height,r=Math.min(i,a),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*a+n.y,l*=r),e.createRadialGradient(o,s,0,o,s,l)}$i.prototype={constructor:$i,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=this,a=n&&n.style,r=!a||e.__attrCachedBy!==qi.STYLE_BIND;e.__attrCachedBy=qi.STYLE_BIND;for(var o=0;o<Ki.length;o++){var s=Ki[o],l=s[0];(r||i[l]!==a[l])&&(e[l]=Zi(e,l,i[l]||s[1]))}if((r||i.fill!==a.fill)&&(e.fillStyle=i.fill),(r||i.stroke!==a.stroke)&&(e.strokeStyle=i.stroke),(r||i.opacity!==a.opacity)&&(e.globalAlpha=null==i.opacity?1:i.opacity),(r||i.blend!==a.blend)&&(e.globalCompositeOperation=i.blend||"source-over"),this.hasStroke()){var u=i.lineWidth;e.lineWidth=u/(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?Ji:Qi)(e,t,n),a=t.colorStops,r=0;r<a.length;r++)i.addColorStop(a[r].offset,a[r].color);return i}};for(var ea=$i.prototype,ta=0;ta<Ki.length;ta++){var na=Ki[ta];na[0]in ea||(ea[na[0]]=na[1])}$i.getGradient=ea.getGradient;var ia=$i,aa=function(e,t){this.image=e,this.repeat=t,this.type="pattern"};aa.prototype.getCanvasPattern=function(e){return e.createPattern(this.image,this.repeat||"repeat")};var ra=aa,oa=di.devicePixelRatio;function sa(){return!1}function la(e,t,n){var i=Fe.createCanvas(),a=t.getWidth(),r=t.getHeight(),o=i.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=a+"px",o.height=r+"px",i.setAttribute("data-zr-dom-id",e)),i.width=a*n,i.height=r*n,i}var ua=function(e,t,n){var i;n=n||oa,"string"==typeof e?i=la(e,t,n):Fe.isObject(e)&&(e=(i=e).id),this.id=e,this.dom=i;var a=i.style;a&&(i.onselectstart=sa,a["-webkit-user-select"]="none",a["user-select"]="none",a["-webkit-touch-callout"]="none",a["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",a.padding=0,a.margin=0,a["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};ua.prototype={constructor:ua,__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=la("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,a=i.style,r=this.domBack;a&&(a.width=e+"px",a.height=t+"px"),i.width=e*n,i.height=t*n,r&&(r.width=e*n,r.height=t*n,1!==n&&this.ctxBack.scale(n,n))},clear:function(e,t){var n,i=this.dom,a=this.ctx,r=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,r/u,o/u)),a.clearRect(0,0,r,o),t&&"transparent"!==t)&&(t.colorStops?(n=t.__canvasGradient||ia.getGradient(a,t,{x:0,y:0,width:r,height:o}),t.__canvasGradient=n):t.image&&(n=ra.prototype.getCanvasPattern.call(t,a)),a.save(),a.fillStyle=n||t,a.fillRect(0,0,r,o),a.restore());if(s){var c=this.domBack;a.save(),a.globalAlpha=l,a.drawImage(c,0,0,r,o),a.restore()}}};var ca=ua,ha="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){setTimeout(e,16)},da=new In(50);function fa(){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 pa(e){return e&&e.width&&e.height}var ga=function(e,t,n,i,a){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var r=da.get(e),o={hostEl:n,cb:i,cbPayload:a};return r?!pa(t=r.image)&&r.pending.push(o):((t=new Image).onload=t.onerror=fa,da.put(e,t.__cachedImgObj={image:t,pending:[o]}),t.src=t.__zrImageSrc=e),t}return e}return t},ma={findExistImage:function(e){if("string"==typeof e){var t=da.get(e);return t&&t.image}return e},createOrUpdateImage:ga,isImageReady:pa},va=Fe.getContext,ya=Fe.extend,_a=Fe.retrieve2,xa=Fe.retrieve3,ba=Fe.trim,wa={},Sa=0,Ma=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Ta="12px sans-serif",Ia={};function Aa(e,t){var n=e+":"+(t=t||Ta);if(wa[n])return wa[n];for(var i=(e+"").split("\n"),a=0,r=0,o=i.length;r<o;r++)a=Math.max(Ra(i[r],t).width,a);return Sa>5e3&&(Sa=0,wa={}),Sa++,wa[n]=a,a}function Da(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function Ca(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function Oa(e,t,n){var i=t.textPosition,a=t.textDistance,r=n.x,o=n.y;a=a||0;var s=n.height,l=n.width,u=s/2,c="left",h="top";switch(i){case"left":r-=a,o+=u,c="right",h="middle";break;case"right":r+=a+l,o+=u,h="middle";break;case"top":r+=l/2,o-=a,c="center",h="bottom";break;case"bottom":r+=l/2,o+=s+a,c="center";break;case"inside":r+=l/2,o+=u,c="center",h="middle";break;case"insideLeft":r+=a,o+=u,h="middle";break;case"insideRight":r+=l-a,o+=u,c="right",h="middle";break;case"insideTop":r+=l/2,o+=a,c="center";break;case"insideBottom":r+=l/2,o+=s-a,c="center",h="bottom";break;case"insideTopLeft":r+=a,o+=a;break;case"insideTopRight":r+=l-a,o+=a,c="right";break;case"insideBottomLeft":r+=a,o+=s-a,h="bottom";break;case"insideBottomRight":r+=l-a,o+=s-a,c="right",h="bottom"}return(e=e||{}).x=r,e.y=o,e.textAlign=c,e.textVerticalAlign=h,e}function ka(e,t,n,i,a){if(!t)return"";var r=(e+"").split("\n");a=La(t,n,i,a);for(var o=0,s=r.length;o<s;o++)r[o]=Ea(r[o],a);return r.join("\n")}function La(e,t,n,i){(i=ya({},i)).font=t;n=_a(n,"...");i.maxIterations=_a(i.maxIterations,2);var a=i.minChar=_a(i.minChar,0);i.cnCharWidth=Aa("国",t);var r=i.ascCharWidth=Aa("a",t);i.placeholder=_a(i.placeholder,"");for(var o=e=Math.max(0,e-1),s=0;s<a&&o>=r;s++)o-=r;var l=Aa(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 Ea(e,t){var n=t.containerWidth,i=t.font,a=t.contentWidth;if(!n)return"";var r=Aa(e,i);if(r<=n)return e;for(var o=0;;o++){if(r<=a||o>=t.maxIterations){e+=t.ellipsis;break}var s=0===o?Na(e,a,t.ascCharWidth,t.cnCharWidth):r>0?Math.floor(e.length*a/r):0;r=Aa(e=e.substr(0,s),i)}return""===e&&(e=t.placeholder),e}function Na(e,t,n,i){for(var a=0,r=0,o=e.length;r<o&&a<t;r++){var s=e.charCodeAt(r);a+=0<=s&&s<=127?n:i}return r}function Pa(e){return Aa("国",e)}function Ra(e,t){return Ia.measureText(e,t)}function za(e,t,n,i,a){null!=e&&(e+="");var r=_a(i,Pa(t)),o=e?e.split("\n"):[],s=o.length*r,l=s,u=!0;if(n&&(l+=n[0]+n[2]),e&&a){u=!1;var c=a.outerHeight,h=a.outerWidth;if(null!=c&&l>c)e="",o=[];else if(null!=h)for(var d=La(h-(n?n[1]+n[3]:0),t,a.ellipsis,{minChar:a.minChar,placeholder:a.placeholder}),f=0,p=o.length;f<p;f++)o[f]=Ea(o[f],d)}return{lines:o,height:s,outerHeight:l,lineHeight:r,canCacheByTextString:u}}function Ba(e,t){var n={lines:[],width:0,height:0};if(null!=e&&(e+=""),!e)return n;for(var i,a=Ma.lastIndex=0;null!=(i=Ma.exec(e));){var r=i.index;r>a&&Va(n,e.substring(a,r)),Va(n,i[2],i[1]),a=Ma.lastIndex}a<e.length&&Va(n,e.substring(a,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 _=(C=g.tokens[y]).styleName&&t.rich[C.styleName]||{},x=C.textPadding=_.textPadding,b=C.font=_.font||t.font,w=C.textHeight=_a(_.textHeight,Pa(b));if(x&&(w+=x[0]+x[2]),C.height=w,C.lineHeight=xa(_.textLineHeight,t.textLineHeight,w),C.textAlign=_&&_.textAlign||t.textAlign,C.textVerticalAlign=_&&_.textVerticalAlign||"middle",null!=f&&s+C.lineHeight>f)return{lines:[],width:0,height:0};C.textWidth=Aa(C.text,b);var S=_.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))C.percentWidth=S,u.push(C),S=0;else{if(M){S=C.textWidth;var T=_.textBackgroundColor,I=T&&T.image;I&&(I=ma.findExistImage(I),ma.isImageReady(I)&&(S=Math.max(S,I.width*w/I.height)))}var A=x?x[1]+x[3]:0;S+=A;var D=null!=d?d-v:null;null!=D&&D<S&&(!M||D<A?(C.text="",C.textWidth=S=0):(C.text=ka(C.text,D-A,b,h.ellipsis,{minChar:h.minChar}),C.textWidth=Aa(C.text,b),S=C.textWidth+A))}v+=C.width=S,_&&(m=Math.max(m,C.lineHeight))}g.width=v,g.lineHeight=m,s+=m,l=Math.max(l,v)}n.outerWidth=n.width=_a(t.textWidth,l),n.outerHeight=n.height=_a(t.textHeight,s),c&&(n.outerWidth+=c[1]+c[3],n.outerHeight+=c[0]+c[2]);for(p=0;p<u.length;p++){var C,O=(C=u[p]).percentWidth;C.width=parseInt(O,10)/100*l}return n}function Va(e,t,n){for(var i=""===t,a=t.split("\n"),r=e.lines,o=0;o<a.length;o++){var s=a[o],l={styleName:n,text:s,isLineHolder:!s&&!i};if(o)r.push({tokens:[l]});else{var u=(r[r.length-1]||(r[0]={tokens:[]})).tokens,c=u.length;1===c&&u[0].isLineHolder?u[0]=l:(s||!c||i)&&u.push(l)}}}Ia.measureText=function(e,t){var n=va();return n.font=t||Ta,n.measureText(e)};var Ha=function(e,t,n,i,a,r,o,s){return o?function(e,t,n,i,a,r,o,s){var l=Ba(e,{rich:o,truncate:s,font:t,textAlign:n,textPadding:a,textLineHeight:r}),u=l.outerWidth,c=l.outerHeight,h=Da(0,u,n),d=Ca(0,c,i);return new Ni(h,d,u,c)}(e,t,n,i,a,r,o,s):function(e,t,n,i,a,r,o){var s=za(e,t,a,r,o),l=Aa(e,t);a&&(l+=a[1]+a[3]);var u=s.outerHeight,c=Da(0,l,n),h=Ca(0,u,i),d=new Ni(c,h,l,u);return d.lineHeight=s.lineHeight,d}(e,t,n,i,a,r,s)},Ya=function(e,t,n){return Oa({},{textPosition:e,textDistance:n},t)},Fa=function(e){var t=(e.fontSize||e.fontFamily)&&[e.fontStyle,e.fontWeight,(e.fontSize||12)+"px",e.fontFamily||"sans-serif"].join(" ");return t&&ba(t)||e.textFont||e.font},Ga={DEFAULT_FONT:Ta,$override:function(e,t){Ia[e]=t},getWidth:Aa,getBoundingRect:Ha,adjustTextX:Da,adjustTextY:Ca,calculateTextPosition:Oa,adjustTextPositionOnRect:Ya,truncateText:ka,getLineHeight:Pa,measureText:Ra,parsePlainText:za,parseRichText:Ba,makeFont:Fa};var Wa={buildPath:function(e,t){var n,i,a,r,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=a=r=h:h instanceof Array?1===h.length?n=i=a=r=h[0]:2===h.length?(n=a=h[0],i=r=h[1]):3===h.length?(n=h[0],i=r=h[1],a=h[2]):(n=h[0],i=h[1],a=h[2],r=h[3]):n=i=a=r=0,n+i>u&&(n*=u/(o=n+i),i*=u/o),a+r>u&&(a*=u/(o=a+r),r*=u/o),i+a>c&&(i*=c/(o=i+a),a*=c/o),n+r>c&&(n*=c/(o=n+r),r*=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-a),0!==a&&e.arc(s+u-a,l+c-a,a,0,Math.PI/2),e.lineTo(s+r,l+c),0!==r&&e.arc(s+r,l+c-r,r,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)}},ja=Fe.retrieve2,Ua=Fe.retrieve3,Za=Fe.each,Xa=Fe.normalizeCssArray,qa=Fe.isString,Ka=Fe.isObject,$a=Xi.ContextCachedBy,Qa=Xi.WILL_BE_RESTORED,Ja=Ga.DEFAULT_FONT,er={left:1,right:1,center:1},tr={top:1,bottom:1,middle:1},nr=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],ir={},ar={};function rr(e){if(e){e.font=Ga.makeFont(e);var t=e.textAlign;"middle"===t&&(t="center"),e.textAlign=null==t||er[t]?t:"left";var n=e.textVerticalAlign||e.textBaseline;"center"===n&&(n="middle"),e.textVerticalAlign=null==n||tr[n]?n:"top",e.textPadding&&(e.textPadding=Xa(e.textPadding))}}function or(e,t,n,i,a){if(n&&t.textRotation){var r=t.textOrigin;"center"===r?(i=n.width/2+n.x,a=n.height/2+n.y):r&&(i=r[0]+n.x,a=r[1]+n.y),e.translate(i,a),e.rotate(-t.textRotation),e.translate(-i,-a)}}function sr(e,t,n,i,a,r,o,s){var l=i.rich[n.styleName]||{};l.text=n.text;var u=n.textVerticalAlign,c=r+a/2;"top"===u?c=r+n.height/2:"bottom"===u&&(c=r+a-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",Ua(l.textShadowBlur,i.textShadowBlur,0)),dr(t,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),dr(t,"shadowOffsetX",Ua(l.textShadowOffsetX,i.textShadowOffsetX,0)),dr(t,"shadowOffsetY",Ua(l.textShadowOffsetY,i.textShadowOffsetY,0)),dr(t,"textAlign",s),dr(t,"textBaseline","middle"),dr(t,"font",n.font||Ja);var d=fr(l.textStroke||i.textStroke,p),f=pr(l.textFill||i.textFill),p=ja(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,a,r,o){var s=n.textBackgroundColor,l=n.textBorderWidth,u=n.textBorderColor,c=qa(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?Wa.buildPath(t,{x:i,y:a,width:r,height:o,r:h}):t.rect(i,a,r,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(Ka(s)){var f=s.image;(f=ma.createOrUpdateImage(f,null,e,cr,s))&&ma.isImageReady(f)&&t.drawImage(f,i,a,r,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 a=n.x||0,r=n.y||0,o=n.textAlign,s=n.textVerticalAlign;if(i){var l=n.textPosition;if(l instanceof Array)a=i.x+gr(l[0],i.width),r=i.y+gr(l[1],i.height);else{var u=t&&t.calculateTextPosition?t.calculateTextPosition(ir,n,i):Ga.calculateTextPosition(ir,n,i);a=u.x,r=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var c=n.textOffset;c&&(a+=c[0],r+=c[1])}return(e=e||{}).baseX=a,e.baseY=r,e.textAlign=o,e.textVerticalAlign=s,e}function dr(e,t,n){return e[t]=Zi(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=function(e){return rr(e),Za(e.rich,rr),e},yr=function(e,t,n,i,a,r){i.rich?function(e,t,n,i,a,r){r!==Qa&&(t.__attrCachedBy=$a.NONE);var o=e.__textCotentBlock;o&&!e.__dirtyText||(o=e.__textCotentBlock=Ga.parseRichText(n,i));!function(e,t,n,i,a){var r=n.width,o=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=hr(ar,e,i,a),c=u.baseX,h=u.baseY,d=u.textAlign,f=u.textVerticalAlign;or(t,i,a,c,h);var p=Ga.adjustTextX(c,o,d),g=Ga.adjustTextY(h,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+r;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,S=w.length,M=b.lineHeight,T=b.width,I=0,A=m,D=y,C=S-1;I<S&&(!(x=w[I]).textAlign||"left"===x.textAlign);)sr(e,t,x,i,M,v,A,"left"),T-=x.width,A+=x.width,I++;for(;C>=0&&"right"===(x=w[C]).textAlign;)sr(e,t,x,i,M,v,D,"right"),T-=x.width,D-=x.width,C--;for(A+=(r-(A-m)-(y-D)-T)/2;I<=C;)sr(e,t,x=w[I],i,M,v,A+x.width/2,"center"),A+=x.width,I++;v+=M}}(e,t,o,i,a)}(e,t,n,i,a,r):function(e,t,n,i,a,r){var o,s=lr(i),l=!1,u=t.__attrCachedBy===$a.PLAIN_TEXT;r!==Qa?(r&&(o=r.style,l=!s&&u&&o),t.__attrCachedBy=s?$a.NONE:$a.PLAIN_TEXT):u&&(t.__attrCachedBy=$a.NONE);var c=i.font||Ja;l&&c===(o.font||Ja)||(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=Ga.parsePlainText(n,h,d,f,i.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=hr(ar,e,i,a),_=y.baseX,x=y.baseY,b=y.textAlign||"left",w=y.textVerticalAlign;or(t,i,a,_,x);var S=Ga.adjustTextY(x,g,w),M=_,T=S;if(s||d){var I=Ga.getWidth(n,h);d&&(I+=d[1]+d[3]);var A=Ga.adjustTextX(_,I,b);s&&ur(e,t,i,A,S,I,g),d&&(M=mr(_,b,d),T+=d[0])}t.textAlign=b,t.textBaseline="middle",t.globalAlpha=i.opacity||1;for(var D=0;D<nr.length;D++){var C=nr[D],O=C[0],k=C[1],L=i[O];l&&L===o[O]||(t[k]=Zi(t,k,L||C[2]))}T+=v/2;var E=i.textStrokeWidth,N=l?o.textStrokeWidth:null,P=!l||E!==N,R=!l||P||i.textStroke!==o.textStroke,z=fr(i.textStroke,E),B=pr(i.textFill);z&&(P&&(t.lineWidth=E),R&&(t.strokeStyle=z));B&&(l&&i.textFill===o.textFill||(t.fillStyle=B));if(1===m.length)z&&t.strokeText(m[0],M,T),B&&t.fillText(m[0],M,T);else for(D=0;D<m.length;D++)z&&t.strokeText(m[D],M,T),B&&t.fillText(m[D],M,T),T+=v}(e,t,n,i,a,r)},_r=function(e,t){return null!=e&&(e||t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor||t.textPadding)},xr={normalizeTextStyle:vr,renderText:yr,getBoxPosition:hr,getStroke:fr,getFill:pr,parsePercent:gr,needDrawText:_r},br=Xi.WILL_BE_RESTORED,wr=new Ni,Sr=function(){};Sr.prototype={constructor:Sr,drawRectText:function(e,t){var n=this.style;t=n.textRect||t,this.__dirty&&xr.normalizeTextStyle(n,!0);var i=n.text;if(null!=i&&(i+=""),xr.needDrawText(i,n)){e.save();var a=this.transform;n.transformText?this.setTransform(e):a&&(wr.copy(t),wr.applyTransform(a),t=wr),xr.renderText(this,e,i,n,t,br),e.restore()}}};var Mr=Sr;function Tr(e){for(var t in e=e||{},Ci.call(this,e),e)e.hasOwnProperty(t)&&"style"!==t&&(this[t]=e[t]);this.style=new ia(e.style),this._rect=null,this.__clipPaths=null}Tr.prototype={constructor:Tr,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?Ci.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 ia(e),this.dirty(!1),this},calculateTextPosition:null},Fe.inherits(Tr,Ci),Fe.mixin(Tr,Mr);var Ir=Tr;function Ar(e){Ir.call(this,e)}Ar.prototype={constructor:Ar,type:"image",brush:function(e,t){var n=this.style,i=n.image;n.bind(e,this,t);var a=this._image=ma.createOrUpdateImage(i,this._image,this,this.onload);if(a&&ma.isImageReady(a)){var r=n.x||0,o=n.y||0,s=n.width,l=n.height,u=a.width/a.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=a.width,l=a.height),this.setTransform(e),n.sWidth&&n.sHeight){var c=n.sx||0,h=n.sy||0;e.drawImage(a,c,h,n.sWidth,n.sHeight,r,o,s,l)}else if(n.sx&&n.sy){var d=s-(c=n.sx),f=l-(h=n.sy);e.drawImage(a,c,h,d,f,r,o,s,l)}else e.drawImage(a,r,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 Ni(e.x||0,e.y||0,e.width||0,e.height||0)),this._rect}},Fe.inherits(Ar,Ir);var Dr=Ar,Cr=di.devicePixelRatio,Or=1e5,kr=314159,Lr=.01;function Er(e){return parseInt(e,10)}var Nr=new Ni(0,0,0,0),Pr=new Ni(0,0,0,0);var Rr=function(e,t,n){this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=Fe.extend({},n||{}),this.dpr=n.devicePixelRatio||Cr,this._singleCanvas=i,this.root=e;var a=e.style;a&&(a["-webkit-tap-highlight-color"]="transparent",a["-webkit-user-select"]=a["user-select"]=a["-webkit-touch-callout"]="none",e.innerHTML=""),this.storage=t;var r=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 ca(e,this,this.dpr);u.__builtin__=!0,u.initContext(),o[314159]=u,u.zlevel=kr,r.push(kr),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=[]};Rr.prototype={constructor:Rr,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 a=n[i],r=this._layers[a];if(!r.__builtin__&&r.refresh){var o=0===i?this._backgroundColor:null;r.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=Fe.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){Fi(e,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(Or));var i={};n.ctx.save();for(var a=0;a<t;){var r=e[a],o=r.__from;o&&o.__zr?(a++,o.invisible||(r.transform=o.transform,r.invTransform=o.invTransform,r.__clipPaths=o.__clipPaths,this._doPaintEl(r,n,!0,i))):(e.splice(a,1),o.__hoverMir=null,t--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(Or)},_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 a=this;ha((function(){a._paintList(e,t,n)}))}}},_compositeManually:function(){var e=this.getLayer(kr).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 a=this._zlevelList[i];(s=this._layers[a]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||t)&&n.push(s)}for(var r=!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&&(r=!1),u.prevElClipPaths&&l.restore(),l.restore()}return re.wxa&&Fe.each(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),r},_doPaintEl:function(e,t,n,i){var a=t.ctx,r=e.transform;if((t.__dirty||n)&&!e.invisible&&0!==e.style.opacity&&(!r||r[0]||r[3])&&(!e.culling||!function(e,t,n){return Nr.copy(e.getBoundingRect()),e.transform&&Nr.applyTransform(e.transform),Pr.width=t,Pr.height=n,!Nr.intersect(Pr)}(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&&(a.restore(),i.prevElClipPaths=null,i.prevEl=null),o&&(a.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,a),i.prevElClipPaths=o)),e.beforeBrush&&e.beforeBrush(a),e.brush(a,i.prevEl||null),i.prevEl=e,e.afterBrush&&e.afterBrush(a)}},getLayer:function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=kr);var n=this._layers[e];return n||((n=new ca("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Fe.merge(n,this._layerConfig[e],!0):this._layerConfig[e-Lr]&&Fe.merge(n,this._layerConfig[e-Lr],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},insertLayer:function(e,t){var n=this._layers,i=this._zlevelList,a=i.length,r=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(a>0&&e>i[0]){for(o=0;o<a-1&&!(i[o]<e&&i[o+1]>e);o++);r=n[i[o]]}if(i.splice(o+1,0,e),n[e]=t,!t.virtual)if(r){var l=r.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,a=this._zlevelList;for(i=0;i<a.length;i++)n=a[i],e.call(t,this._layers[n],n)},eachBuiltinLayer:function(e,t){var n,i,a,r=this._zlevelList;for(a=0;a<r.length;a++)i=r[a],(n=this._layers[i]).__builtin__&&e.call(t,n,i)},eachOtherLayer:function(e,t){var n,i,a,r=this._zlevelList;for(a=0;a<r.length;a++)i=r[a],(n=this._layers[i]).__builtin__||e.call(t,n,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(e){function t(e){a&&(a.__endIndex!==e&&(a.__dirty=!0),a.__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,a=null,r=0;for(n=0;n<e.length;n++){var o,s,l=(o=e[n]).zlevel;i!==l&&(i=l,r=0),o.incremental?((s=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,r=1):s=this.getLayer(l+(r>0?Lr:0),this._needsManuallyCompositing),s.__builtin__||fi("ZLevel "+l+" has been used by unkown layer "+s.id),s!==a&&(s.__used=!0,s.__startIndex!==n&&(s.__dirty=!0),s.__startIndex=n,s.incremental?s.__drawIndex=-1:s.__drawIndex=n,t(n),a=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]?Fe.merge(n[e],t,!0):n[e]=t;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===e||a===e+Lr){var r=this._layers[a];Fe.merge(r,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(Fe.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 a in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(e,t);Fe.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(kr).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 ca("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,a=t.ctx;this.eachLayer((function(e){e.__builtin__?a.drawImage(e.dom,0,0,n,i):e.renderToCanvas&&(t.ctx.save(),e.renderToCanvas(t.ctx),t.ctx.restore())}))}else for(var r={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[s];this._doPaintEl(l,t,!0,r)}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],a=["paddingLeft","paddingTop"][e],r=["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]||Er(s[n])||Er(o.style[n]))-(Er(s[a])||0)-(Er(s[r])||0)|0},pathToImage:function(e,t){t=t||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),a=e.getBoundingRect(),r=e.style,o=r.shadowBlur*t,s=r.shadowOffsetX*t,l=r.shadowOffsetY*t,u=r.hasStroke()?r.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=a.width+c+h,g=a.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-a.x,d-a.y],e.rotation=0,e.scale=[1,1],e.updateTransform(),e&&e.brush(i);var v=new Dr({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 zr=Rr,Br=Bt.Dispatcher,Vr=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,Br.call(this)};Vr.prototype={constructor:Vr,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=Fe.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,a=[],r=[],o=0;o<i;o++){var s=n[o],l=s.step(e,t);l&&(a.push(l),r.push(s))}for(o=0;o<i;)n[o]._needsRemove?(n[o]=n[i-1],n.pop(),i--):o++;i=a.length;for(o=0;o<i;o++)r[o].fire(a[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,ha((function t(){e._running&&(ha(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 ci(e,(t=t||{}).loop,t.getter,t.setter);return this.addAnimator(n),n}},Fe.mixin(Vr,Br);var Hr,Yr,Fr=Vr,Gr=Bt.addEventListener,Wr=Bt.removeEventListener,jr=Bt.normalizeEvent,Ur=Bt.getNativeEvent,Zr=re.domSupported,Xr=(Yr={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Hr=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:Fe.map(Hr,(function(e){var t=e.replace("mouse","pointer");return Yr.hasOwnProperty(t)?t:e}))}),qr=["mousemove","mouseup"],Kr=["pointermove","pointerup"];function $r(e){return"mousewheel"===e&&re.browser.firefox?"DOMMouseScroll":e}function Qr(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Jr(e){e&&(e.zrByTouch=!0)}function eo(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 to(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 no=to.prototype;no.stopPropagation=no.stopImmediatePropagation=no.preventDefault=Fe.noop;var io={mousedown:function(e){e=jr(this.dom,e),this._mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=jr(this.dom,e);var t=this._mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||uo(this,!0),this.trigger("mousemove",e)},mouseup:function(e){e=jr(this.dom,e),uo(this,!1),this.trigger("mouseup",e)},mouseout:function(e){e=jr(this.dom,e),this._pointerCapturing&&(e.zrEventControl="no_globalout");var t=e.toElement||e.relatedTarget;e.zrIsToLocalDOM=eo(this,t),this.trigger("mouseout",e)},touchstart:function(e){Jr(e=jr(this.dom,e)),this._lastTouchMoment=new Date,this.handler.processGesture(e,"start"),io.mousemove.call(this,e),io.mousedown.call(this,e)},touchmove:function(e){Jr(e=jr(this.dom,e)),this.handler.processGesture(e,"change"),io.mousemove.call(this,e)},touchend:function(e){Jr(e=jr(this.dom,e)),this.handler.processGesture(e,"end"),io.mouseup.call(this,e),+new Date-this._lastTouchMoment<300&&io.click.call(this,e)},pointerdown:function(e){io.mousedown.call(this,e)},pointermove:function(e){Qr(e)||io.mousemove.call(this,e)},pointerup:function(e){io.mouseup.call(this,e)},pointerout:function(e){Qr(e)||io.mouseout.call(this,e)}};Fe.each(["click","mousewheel","dblclick","contextmenu"],(function(e){io[e]=function(t){t=jr(this.dom,t),this.trigger(e,t)}}));var ao={pointermove:function(e){Qr(e)||ao.mousemove.call(this,e)},pointerup:function(e){ao.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this._pointerCapturing;uo(this,!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function ro(e,t){var n=t.domHandlers;re.pointerEventsSupported?Fe.each(Xr.pointer,(function(i){so(t,i,(function(t){n[i].call(e,t)}))})):(re.touchEventsSupported&&Fe.each(Xr.touch,(function(i){so(t,i,(function(a){n[i].call(e,a),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)}))})),Fe.each(Xr.mouse,(function(i){so(t,i,(function(a){a=Ur(a),t.touching||n[i].call(e,a)}))})))}function oo(e,t){function n(n){so(t,n,(function(i){i=Ur(i),eo(e,i.target)||(i=function(e,t){return jr(e.dom,new to(e,t),!0)}(e,i),t.domHandlers[n].call(e,i))}),{capture:!0})}re.pointerEventsSupported?Fe.each(Kr,n):re.touchEventsSupported||Fe.each(qr,n)}function so(e,t,n,i){e.mounted[t]=n,e.listenerOpts[t]=i,Gr(e.domTarget,$r(t),n,i)}function lo(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Wr(e.domTarget,$r(n),t[n],e.listenerOpts[n]);e.mounted={}}function uo(e,t){if(e._mayPointerCapture=null,Zr&&e._pointerCapturing^t){e._pointerCapturing=t;var n=e._globalHandlerScope;t?oo(e,n):lo(n)}}function co(e,t){this.domTarget=e,this.domHandlers=t,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function ho(e,t){yt.call(this),this.dom=e,this.painterRoot=t,this._localHandlerScope=new co(e,io),Zr&&(this._globalHandlerScope=new co(document,ao)),this._pointerCapturing=!1,this._mayPointerCapture=null,ro(this,this._localHandlerScope)}var fo=ho.prototype;fo.dispose=function(){lo(this._localHandlerScope),Zr&&lo(this._globalHandlerScope)},fo.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},Fe.mixin(ho,yt);var po=ho,go=!re.canvasSupported,mo={canvas:zr},vo={};var yo=function(e,t,n){n=n||{},this.dom=t,this.id=e;var i=this,a=new ji,r=n.renderer;if(go){if(!mo.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");r="vml"}else r&&mo[r]||(r="canvas");var o=new mo[r](t,a,n,e);this.storage=a,this.painter=o;var s=re.node||re.worker?null:new po(o.getViewportRoot(),o.root);this.handler=new Kt(a,o,s,o.root),this.animation=new Fr({stage:{update:Fe.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=a.delFromStorage,u=a.addToStorage;a.delFromStorage=function(e){l.call(a,e),e&&e.removeSelfFromZr(i)},a.addToStorage=function(e){u.call(a,e),e.addSelfToZr(i)}};yo.prototype={constructor:yo,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 vo[e]}};var _o=function(e,t){var n=new yo(ae(),e,t);return vo[n.id]=n,n},xo={version:"4.3.1",init:_o,dispose:function(e){if(e)e.dispose();else{for(var t in vo)vo.hasOwnProperty(t)&&vo[t].dispose();vo={}}return this},getInstance:function(e){return vo[e]},registerPainter:function(e,t){mo[e]=t}},bo=Fe.each,wo=Fe.isObject,So=Fe.isArray,Mo="series\0";function To(e){return e instanceof Array?e:null==e?[]:[e]}function Io(e){return wo(e)&&e.id&&0===(e.id+"").indexOf("\0_ec_\0")}var Ao=0;function Do(e,t){return e&&e.hasOwnProperty(t)}var Co=function(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var i=0,a=n.length;i<a;i++){var r=n[i];!e.emphasis[t].hasOwnProperty(r)&&e[t].hasOwnProperty(r)&&(e.emphasis[t][r]=e[t][r])}}},Oo=function(e,t){t=(t||[]).slice();var n=Fe.map(e||[],(function(e,t){return{exist:e}}));return bo(t,(function(e,i){if(wo(e)){for(var a=0;a<n.length;a++)if(!n[a].option&&null!=e.id&&n[a].exist.id===e.id+"")return n[a].option=e,void(t[i]=null);for(a=0;a<n.length;a++){var r=n[a].exist;if(!(n[a].option||null!=r.id&&null!=e.id||null==e.name||Io(e)||Io(r)||r.name!==e.name+""))return n[a].option=e,void(t[i]=null)}}})),bo(t,(function(e,t){if(wo(e)){for(var i=0;i<n.length;i++){var a=n[i].exist;if(!n[i].option&&!Io(a)&&null==e.id){n[i].option=e;break}}i>=n.length&&n.push({option:e})}})),n},ko=function(e,t){var n={},i={};return a(e||[],n),a(t||[],i,n),[r(n),r(i)];function a(e,t,n){for(var i=0,a=e.length;i<a;i++)for(var r=e[i].seriesId,o=To(e[i].dataIndex),s=n&&n[r],l=0,u=o.length;l<u;l++){var c=o[l];s&&s[c]?s[c]=null:(t[r]||(t[r]={}))[c]=1}}function r(e,t){var n=[];for(var i in e)if(e.hasOwnProperty(i)&&null!=e[i])if(t)n.push(+i);else{var a=r(e[i],!0);a.length&&n.push({seriesId:i,dataIndex:a})}return n}},Lo=function(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n},Eo=function(e,t){return e.getAttribute?e.getAttribute(t):e[t]},No=function(e,t){var n=Fe.createHashMap(),i=[];return Fe.each(e,(function(e){var a=t(e);(n.get(a)||(i.push(a),n.set(a,[]))).push(e)})),{keys:i,buckets:n}},Po={normalizeToArray:To,defaultEmphasis:Co,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!wo(e)||So(e)||e instanceof Date?e:e.value},isDataItemOption:function(e){return wo(e)&&!(e instanceof Array)},mappingToExists:Oo,makeIdAndName:function(e){var t=Fe.createHashMap();bo(e,(function(e,n){var i=e.exist;i&&t.set(i.id,e)})),bo(e,(function(e,n){var i=e.option;Fe.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={})})),bo(e,(function(e,n){var i=e.exist,a=e.option,r=e.keyInfo;if(wo(a)){if(r.name=null!=a.name?a.name+"":i?i.name:Mo+n,i)r.id=i.id;else if(null!=a.id)r.id=a.id+"";else{var o=0;do{r.id="\0"+r.name+"\0"+o++}while(t.get(r.id))}t.set(r.id,e)}}))},isNameSpecified:function(e){var t=e.name;return!(!t||!t.indexOf(Mo))},isIdInner:Io,compressBatches:ko,queryDataIndex:function(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?Fe.isArray(t.dataIndex)?Fe.map(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?Fe.isArray(t.name)?Fe.map(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0},makeInner:function(){var e="__\0ec_inner_"+Ao+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}},parseFinder:function(e,t,n){if(Fe.isString(t)){var i={};i[t+"Index"]=0,t=i}var a=n&&n.defaultMainType;!a||Do(t,a+"Index")||Do(t,a+"Id")||Do(t,a+"Name")||(t[a+"Index"]=0);var r={};return bo(t,(function(i,a){i=t[a];if("dataIndex"!==a&&"dataIndexInside"!==a){var o=a.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==i||"index"===l&&"none"===i||n&&n.includeMainTypes&&Fe.indexOf(n.includeMainTypes,s)<0)){var u={mainType:s};"index"===l&&"all"===i||(u[l]=i);var c=e.queryComponents(u);r[s+"Models"]=c,r[s+"Model"]=c[0]}}else r[a]=i})),r},setAttribute:Lo,getAttribute:Eo,getTooltipRenderMode:function(e){return"auto"===e?re.domSupported?"html":"richText":e||"html"},groupData:No},Ro="___EC__COMPONENT__CONTAINER___";function zo(e){var t={main:"",sub:""};return e&&(e=e.split("."),t.main=e[0]||"",t.sub=e[1]||""),t}var Bo=0;function Vo(e,t){var n=Fe.slice(arguments,2);return this.superClass.prototype[t].apply(e,n)}function Ho(e,t,n){return this.superClass.prototype[t].apply(e,n)}var Yo=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 Fe.extend(n.prototype,e),n.extend=this.extend,n.superCall=Vo,n.superApply=Ho,Fe.inherits(n,this),n.superClass=t,n}},Fo=function(e,t){t=t||{};var n={};if(e.registerClass=function(e,t){if(t)if(function(e){Fe.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}(t),(t=zo(t)).sub){if(t.sub!==Ro){var i=function(e){var t=n[e.main];t&&t[Ro]||((t=n[e.main]={})[Ro]=!0);return t}(t);i[t.sub]=e}}else n[t.main]=e;return e},e.getClass=function(e,t,i){var a=n[e];if(a&&a[Ro]&&(a=t?a[t]:null),i&&!a)throw new Error(t?"Component "+e+"."+(t||"")+" not exists. Load it first.":e+".type should be specified.");return a},e.getClassesByMainType=function(e){e=zo(e);var t=[],i=n[e.main];return i&&i[Ro]?Fe.each(i,(function(e,n){n!==Ro&&t.push(e)})):t.push(i),t},e.hasClass=function(e){return e=zo(e),!!n[e.main]},e.getAllClassMainTypes=function(){var e=[];return Fe.each(n,(function(t,n){e.push(n)})),e},e.hasSubTypes=function(e){e=zo(e);var t=n[e.main];return t&&t[Ro]},e.parseClassType=zo,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},Go={parseClassType:zo,enableClassExtend:Yo,enableClassCheck:function(e){var t=["__\0is_clz",Bo++,Math.random().toFixed(3)].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}},enableClassManagement:Fo,setReadOnly:function(e,t){}};var Wo=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 a={},r=0;r<e.length;r++){var o=e[r][1];if(!(n&&Fe.indexOf(n,o)>=0||i&&Fe.indexOf(i,o)<0)){var s=t.getShallow(o);null!=s&&(a[e[r][0]]=s)}}return a}},jo=Wo([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Uo={getLineStyle:function(e){var t=jo(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])}},Zo=Uo,Xo=Wo([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),qo={getAreaStyle:function(e,t){return Xo(this,e,t)}},Ko=ht.create,$o=ht.distSquare,Qo=Math.pow,Jo=Math.sqrt,es=1e-8,ts=1e-4,ns=Jo(3),is=1/3,as=Ko(),rs=Ko(),os=Ko();function ss(e){return e>-1e-8&&e<es}function ls(e){return e>es||e<-1e-8}function us(e,t,n,i,a){var r=1-a;return r*r*(r*e+3*a*t)+a*a*(a*i+3*r*n)}function cs(e,t,n,i){var a=1-i;return a*(a*e+2*i*t)+i*i*n}var hs=function(e,t,n,i,a,r){var o=i+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-a,c=s*s-3*o*l,h=s*l-9*o*u,d=l*l-3*s*u,f=0;if(ss(c)&&ss(h)){if(ss(s))r[0]=0;else(M=-l/s)>=0&&M<=1&&(r[f++]=M)}else{var p=h*h-4*c*d;if(ss(p)){var g=h/c,m=-g/2;(M=-s/o+g)>=0&&M<=1&&(r[f++]=M),m>=0&&m<=1&&(r[f++]=m)}else if(p>0){var v=Jo(p),y=c*s+1.5*o*(-h+v),_=c*s+1.5*o*(-h-v);(M=(-s-((y=y<0?-Qo(-y,is):Qo(y,is))+(_=_<0?-Qo(-_,is):Qo(_,is))))/(3*o))>=0&&M<=1&&(r[f++]=M)}else{var x=(2*c*s-3*o*h)/(2*Jo(c*c*c)),b=Math.acos(x)/3,w=Jo(c),S=Math.cos(b),M=(-s-2*w*S)/(3*o),T=(m=(-s+w*(S+ns*Math.sin(b)))/(3*o),(-s+w*(S-ns*Math.sin(b)))/(3*o));M>=0&&M<=1&&(r[f++]=M),m>=0&&m<=1&&(r[f++]=m),T>=0&&T<=1&&(r[f++]=T)}}return f},ds=function(e,t,n,i,a){var r=6*n-12*t+6*e,o=9*t+3*i-3*e-9*n,s=3*t-3*e,l=0;if(ss(o)){if(ls(r))(c=-s/r)>=0&&c<=1&&(a[l++]=c)}else{var u=r*r-4*o*s;if(ss(u))a[0]=-r/(2*o);else if(u>0){var c,h=Jo(u),d=(-r-h)/(2*o);(c=(-r+h)/(2*o))>=0&&c<=1&&(a[l++]=c),d>=0&&d<=1&&(a[l++]=d)}}return l},fs=function(e,t,n,i,a,r){var o=(t-e)*a+e,s=(n-t)*a+t,l=(i-n)*a+n,u=(s-o)*a+o,c=(l-s)*a+s,h=(c-u)*a+u;r[0]=e,r[1]=o,r[2]=u,r[3]=h,r[4]=h,r[5]=c,r[6]=l,r[7]=i},ps=function(e,t,n,i,a,r,o,s,l,u,c){var h,d,f,p,g,m=.005,v=1/0;as[0]=l,as[1]=u;for(var y=0;y<1;y+=.05)rs[0]=us(e,n,a,o,y),rs[1]=us(t,i,r,s,y),(p=$o(as,rs))<v&&(h=y,v=p);v=1/0;for(var _=0;_<32&&!(m<ts);_++)d=h-m,f=h+m,rs[0]=us(e,n,a,o,d),rs[1]=us(t,i,r,s,d),p=$o(rs,as),d>=0&&p<v?(h=d,v=p):(os[0]=us(e,n,a,o,f),os[1]=us(t,i,r,s,f),g=$o(os,as),f<=1&&g<v?(h=f,v=g):m*=.5);return c&&(c[0]=us(e,n,a,o,h),c[1]=us(t,i,r,s,h)),Jo(v)},gs=function(e,t,n,i,a){var r=e-2*t+n,o=2*(t-e),s=e-i,l=0;if(ss(r)){if(ls(o))(c=-s/o)>=0&&c<=1&&(a[l++]=c)}else{var u=o*o-4*r*s;if(ss(u))(c=-o/(2*r))>=0&&c<=1&&(a[l++]=c);else if(u>0){var c,h=Jo(u),d=(-o-h)/(2*r);(c=(-o+h)/(2*r))>=0&&c<=1&&(a[l++]=c),d>=0&&d<=1&&(a[l++]=d)}}return l},ms=function(e,t,n,i,a){var r=(t-e)*i+e,o=(n-t)*i+t,s=(o-r)*i+r;a[0]=e,a[1]=r,a[2]=s,a[3]=s,a[4]=o,a[5]=n},vs=function(e,t,n,i,a,r,o,s,l){var u,c=.005,h=1/0;as[0]=o,as[1]=s;for(var d=0;d<1;d+=.05){rs[0]=cs(e,n,a,d),rs[1]=cs(t,i,r,d),(m=$o(as,rs))<h&&(u=d,h=m)}h=1/0;for(var f=0;f<32&&!(c<ts);f++){var p=u-c,g=u+c;rs[0]=cs(e,n,a,p),rs[1]=cs(t,i,r,p);var m=$o(rs,as);if(p>=0&&m<h)u=p,h=m;else{os[0]=cs(e,n,a,g),os[1]=cs(t,i,r,g);var v=$o(os,as);g<=1&&v<h?(u=g,h=v):c*=.5}}return l&&(l[0]=cs(e,n,a,u),l[1]=cs(t,i,r,u)),Jo(h)},ys={cubicAt:us,cubicDerivativeAt:function(e,t,n,i,a){var r=1-a;return 3*(((t-e)*r+2*(n-t)*a)*r+(i-n)*a*a)},cubicRootAt:hs,cubicExtrema:ds,cubicSubdivide:fs,cubicProjectPoint:ps,quadraticAt:cs,quadraticDerivativeAt:function(e,t,n,i){return 2*((1-i)*(t-e)+i*(n-t))},quadraticRootAt:gs,quadraticExtremum:function(e,t,n){var i=e+n-2*t;return 0===i?.5:(e-t)/i},quadraticSubdivide:ms,quadraticProjectPoint:vs},_s=Math.min,xs=Math.max,bs=Math.sin,ws=Math.cos,Ss=2*Math.PI,Ms=ht.create(),Ts=ht.create(),Is=ht.create();var As=[],Ds=[];var Cs=function(e,t,n){if(0!==e.length){var i,a=e[0],r=a[0],o=a[0],s=a[1],l=a[1];for(i=1;i<e.length;i++)a=e[i],r=_s(r,a[0]),o=xs(o,a[0]),s=_s(s,a[1]),l=xs(l,a[1]);t[0]=r,t[1]=s,n[0]=o,n[1]=l}},Os=function(e,t,n,i,a,r){a[0]=_s(e,n),a[1]=_s(t,i),r[0]=xs(e,n),r[1]=xs(t,i)},ks=function(e,t,n,i,a,r,o,s,l,u){var c,h=ys.cubicExtrema,d=ys.cubicAt,f=h(e,n,a,o,As);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,a,o,As[c]);l[0]=_s(p,l[0]),u[0]=xs(p,u[0])}for(f=h(t,i,r,s,Ds),c=0;c<f;c++){var g=d(t,i,r,s,Ds[c]);l[1]=_s(g,l[1]),u[1]=xs(g,u[1])}l[0]=_s(e,l[0]),u[0]=xs(e,u[0]),l[0]=_s(o,l[0]),u[0]=xs(o,u[0]),l[1]=_s(t,l[1]),u[1]=xs(t,u[1]),l[1]=_s(s,l[1]),u[1]=xs(s,u[1])},Ls=function(e,t,n,i,a,r,o,s){var l=ys.quadraticExtremum,u=ys.quadraticAt,c=xs(_s(l(e,n,a),1),0),h=xs(_s(l(t,i,r),1),0),d=u(e,n,a,c),f=u(t,i,r,h);o[0]=_s(e,a,d),o[1]=_s(t,r,f),s[0]=xs(e,a,d),s[1]=xs(t,r,f)},Es=function(e,t,n,i,a,r,o,s,l){var u=ht.min,c=ht.max,h=Math.abs(a-r);if(h%Ss<1e-4&&h>1e-4)return s[0]=e-n,s[1]=t-i,l[0]=e+n,void(l[1]=t+i);if(Ms[0]=ws(a)*n+e,Ms[1]=bs(a)*i+t,Ts[0]=ws(r)*n+e,Ts[1]=bs(r)*i+t,u(s,Ms,Ts),c(l,Ms,Ts),(a%=Ss)<0&&(a+=Ss),(r%=Ss)<0&&(r+=Ss),a>r&&!o?r+=Ss:a<r&&o&&(a+=Ss),o){var d=r;r=a,a=d}for(var f=0;f<r;f+=Math.PI/2)f>a&&(Is[0]=ws(f)*n+e,Is[1]=bs(f)*i+t,u(s,Is,s),c(l,Is,l))},Ns={fromPoints:Cs,fromLine:Os,fromCubic:ks,fromQuadratic:Ls,fromArc:Es},Ps=di.devicePixelRatio,Rs={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},zs=[],Bs=[],Vs=[],Hs=[],Ys=Math.min,Fs=Math.max,Gs=Math.cos,Ws=Math.sin,js=Math.sqrt,Us=Math.abs,Zs="undefined"!=typeof Float32Array,Xs=function(e){this._saveData=!e,this._saveData&&(this.data=[]),this._ctx=null};Xs.prototype={constructor:Xs,_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=Us(n/Ps/e)||0,this._uy=Us(n/Ps/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(Rs.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=Us(e-this._xi)>this._ux||Us(t-this._yi)>this._uy||this._len<5;return this.addData(Rs.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,a,r){return this.addData(Rs.C,e,t,n,i,a,r),this._ctx&&(this._needsDash()?this._dashedBezierTo(e,t,n,i,a,r):this._ctx.bezierCurveTo(e,t,n,i,a,r)),this._xi=a,this._yi=r,this},quadraticCurveTo:function(e,t,n,i){return this.addData(Rs.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,a,r){return this.addData(Rs.A,e,t,n,n,i,a-i,0,r?0:1),this._ctx&&this._ctx.arc(e,t,n,i,a,r),this._xi=Gs(a)*n+e,this._yi=Ws(a)*n+t,this},arcTo:function(e,t,n,i,a){return this._ctx&&this._ctx.arcTo(e,t,n,i,a),this},rect:function(e,t,n,i){return this._ctx&&this._ctx.rect(e,t,n,i),this.addData(Rs.R,e,t,n,i),this},closePath:function(){this.addData(Rs.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||!Zs||(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,a=0;a<t;a++)n+=e[a].len();Zs&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(a=0;a<t;a++)for(var r=e[a].data,o=0;o<r.length;o++)this.data[i++]=r[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,a=this._dashSum,r=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,c=e-l,h=t-u,d=js(c*c+h*h),f=l,p=u,g=o.length;for(r<0&&(r=a+r),f-=(r%=a)*(c/=d),p-=r*(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?Ys(f,e):Fs(f,e),h>=0?Ys(p,t):Fs(p,t));c=f-e,h=p-t,this._dashOffset=-js(c*c+h*h)},_dashedBezierTo:function(e,t,n,i,a,r){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=ys.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,a,o+.1)-v(g,e,n,a,o),l=v(m,t,i,r,o+.1)-v(m,t,i,r,o),y+=js(s*s+l*l);for(;_<x&&!((b+=f[_])>d);_++);for(o=(b-d)/y;o<=1;)u=v(g,e,n,a,o),c=v(m,t,i,r,o),_%2?p.moveTo(u,c):p.lineTo(u,c),o+=f[_]/y,_=(_+1)%x;_%2!=0&&p.lineTo(a,r),s=a-u,l=r-c,this._dashOffset=-js(s*s+l*l)},_dashedQuadraticTo:function(e,t,n,i){var a=n,r=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,a,r)},toStatic:function(){var e=this.data;e instanceof Array&&(e.length=this._len,Zs&&(this.data=new Float32Array(e)))},getBoundingRect:function(){zs[0]=zs[1]=Vs[0]=Vs[1]=Number.MAX_VALUE,Bs[0]=Bs[1]=Hs[0]=Hs[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,i=0,a=0,r=0;r<e.length;){var o=e[r++];switch(1===r&&(i=t=e[r],a=n=e[r+1]),o){case Rs.M:t=i=e[r++],n=a=e[r++],Vs[0]=i,Vs[1]=a,Hs[0]=i,Hs[1]=a;break;case Rs.L:Ns.fromLine(t,n,e[r],e[r+1],Vs,Hs),t=e[r++],n=e[r++];break;case Rs.C:Ns.fromCubic(t,n,e[r++],e[r++],e[r++],e[r++],e[r],e[r+1],Vs,Hs),t=e[r++],n=e[r++];break;case Rs.Q:Ns.fromQuadratic(t,n,e[r++],e[r++],e[r],e[r+1],Vs,Hs),t=e[r++],n=e[r++];break;case Rs.A:var s=e[r++],l=e[r++],u=e[r++],c=e[r++],h=e[r++],d=e[r++]+h;r+=1;var f=1-e[r++];1===r&&(i=Gs(h)*u+s,a=Ws(h)*c+l),Ns.fromArc(s,l,u,c,h,d,f,Vs,Hs),t=Gs(d)*u+s,n=Ws(d)*c+l;break;case Rs.R:i=t=e[r++],a=n=e[r++];var p=e[r++],g=e[r++];Ns.fromLine(i,a,i+p,a+g,Vs,Hs);break;case Rs.Z:t=i,n=a}ht.min(zs,zs,Vs),ht.max(Bs,Bs,Hs)}return 0===r&&(zs[0]=zs[1]=Bs[0]=Bs[1]=0),new Ni(zs[0],zs[1],Bs[0]-zs[0],Bs[1]-zs[1])},rebuildPath:function(e){for(var t,n,i,a,r,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=a=s[h+1]),d){case Rs.M:t=i=s[h++],n=a=s[h++],e.moveTo(i,a);break;case Rs.L:r=s[h++],o=s[h++],(Us(r-i)>l||Us(o-a)>u||h===c-1)&&(e.lineTo(r,o),i=r,a=o);break;case Rs.C:e.bezierCurveTo(s[h++],s[h++],s[h++],s[h++],s[h++],s[h++]),i=s[h-2],a=s[h-1];break;case Rs.Q:e.quadraticCurveTo(s[h++],s[h++],s[h++],s[h++]),i=s[h-2],a=s[h-1];break;case Rs.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,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(e.translate(f,p),e.rotate(_),e.scale(w,S),e.arc(0,0,b,v,M,1-x),e.scale(1/w,1/S),e.rotate(-_),e.translate(-f,-p)):e.arc(f,p,b,v,M,1-x),1===h&&(t=Gs(v)*g+f,n=Ws(v)*m+p),i=Gs(M)*g+f,a=Ws(M)*m+p;break;case Rs.R:t=i=s[h],n=a=s[h+1],e.rect(s[h++],s[h++],s[h++],s[h++]);break;case Rs.Z:e.closePath(),i=t,a=n}}}},Xs.CMD=Rs;var qs=Xs;var Ks={containStroke:function(e,t,n,i,a,r,o){if(0===a)return!1;var s=a,l=0;if(o>t+s&&o>i+s||o<t-s&&o<i-s||r>e+s&&r>n+s||r<e-s&&r<n-s)return!1;if(e===n)return Math.abs(r-e)<=s/2;var u=(l=(t-i)/(e-n))*r-o+(e*i-n*t)/(e-n);return u*u/(l*l+1)<=s/2*s/2}};var $s={containStroke:function(e,t,n,i,a,r,o,s,l,u,c){if(0===l)return!1;var h=l;return!(c>t+h&&c>i+h&&c>r+h&&c>s+h||c<t-h&&c<i-h&&c<r-h&&c<s-h||u>e+h&&u>n+h&&u>a+h&&u>o+h||u<e-h&&u<n-h&&u<a-h&&u<o-h)&&ys.cubicProjectPoint(e,t,n,i,a,r,o,s,u,c,null)<=h/2}},Qs=ys.quadraticProjectPoint;var Js={containStroke:function(e,t,n,i,a,r,o,s,l){if(0===o)return!1;var u=o;return!(l>t+u&&l>i+u&&l>r+u||l<t-u&&l<i-u&&l<r-u||s>e+u&&s>n+u&&s>a+u||s<e-u&&s<n-u&&s<a-u)&&Qs(e,t,n,i,a,r,s,l,null)<=u/2}},el=2*Math.PI;var tl={normalizeRadian:function(e){return(e%=el)<0&&(e+=el),e}},nl=tl.normalizeRadian,il=2*Math.PI;var al={containStroke:function(e,t,n,i,a,r,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-a)%il<1e-4)return!0;if(r){var h=i;i=nl(a),a=nl(h)}else i=nl(i),a=nl(a);i>a&&(a+=il);var d=Math.atan2(l,s);return d<0&&(d+=il),d>=i&&d<=a||d+il>=i&&d+il<=a}};var rl=function(e,t,n,i,a,r){if(r>t&&r>i||r<t&&r<i)return 0;if(i===t)return 0;var o=i<t?1:-1,s=(r-t)/(i-t);1!==s&&0!==s||(o=i<t?.5:-.5);var l=s*(n-e)+e;return l===a?1/0:l>a?o:0},ol=tl.normalizeRadian,sl=qs.CMD,ll=2*Math.PI;var ul=[-1,-1,-1],cl=[-1,-1];function hl(e,t,n,i,a,r,o,s,l,u){if(u>t&&u>i&&u>r&&u>s||u<t&&u<i&&u<r&&u<s)return 0;var c,h=ys.cubicRootAt(t,i,r,s,u,ul);if(0===h)return 0;for(var d,f,p=0,g=-1,m=0;m<h;m++){var v=ul[m],y=0===v||1===v?.5:1;ys.cubicAt(e,n,a,o,v)<l||(g<0&&(g=ys.cubicExtrema(t,i,r,s,cl),cl[1]<cl[0]&&g>1&&(c=void 0,c=cl[0],cl[0]=cl[1],cl[1]=c),d=ys.cubicAt(t,i,r,s,cl[0]),g>1&&(f=ys.cubicAt(t,i,r,s,cl[1]))),2===g?v<cl[0]?p+=d<t?y:-y:v<cl[1]?p+=f<d?y:-y:p+=s<f?y:-y:v<cl[0]?p+=d<t?y:-y:p+=s<d?y:-y)}return p}function dl(e,t,n,i,a,r,o,s){if(s>t&&s>i&&s>r||s<t&&s<i&&s<r)return 0;var l=ys.quadraticRootAt(t,i,r,s,ul);if(0===l)return 0;var u=ys.quadraticExtremum(t,i,r);if(u>=0&&u<=1){for(var c=0,h=ys.quadraticAt(t,i,r,u),d=0;d<l;d++){var f=0===ul[d]||1===ul[d]?.5:1;ys.quadraticAt(e,n,a,ul[d])<o||(ul[d]<u?c+=h<t?f:-f:c+=r<h?f:-f)}return c}f=0===ul[0]||1===ul[0]?.5:1;return ys.quadraticAt(e,n,a,ul[0])<o?0:r<t?f:-f}function fl(e,t,n,i,a,r,o,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);ul[0]=-l,ul[1]=l;var u=Math.abs(i-a);if(u<1e-4)return 0;if(u%ll<1e-4){i=0,a=ll;var c=r?1:-1;return o>=ul[0]+e&&o<=ul[1]+e?c:0}if(r){l=i;i=ol(a),a=ol(l)}else i=ol(i),a=ol(a);i>a&&(a+=ll);for(var h=0,d=0;d<2;d++){var f=ul[d];if(f+e>o){var p=Math.atan2(s,f);c=r?1:-1;p<0&&(p=ll+p),(p>=i&&p<=a||p+ll>=i&&p+ll<=a)&&(p>Math.PI/2&&p<1.5*Math.PI&&(c=-c),h+=c)}}return h}function pl(e,t,n,i,a){for(var r,o,s=0,l=0,u=0,c=0,h=0,d=0;d<e.length;){var f=e[d++];switch(f===sl.M&&d>1&&(n||(s+=rl(l,u,c,h,i,a))),1===d&&(c=l=e[d],h=u=e[d+1]),f){case sl.M:l=c=e[d++],u=h=e[d++];break;case sl.L:if(n){if(Ks.containStroke(l,u,e[d],e[d+1],t,i,a))return!0}else s+=rl(l,u,e[d],e[d+1],i,a)||0;l=e[d++],u=e[d++];break;case sl.C:if(n){if($s.containStroke(l,u,e[d++],e[d++],e[d++],e[d++],e[d],e[d+1],t,i,a))return!0}else s+=hl(l,u,e[d++],e[d++],e[d++],e[d++],e[d],e[d+1],i,a)||0;l=e[d++],u=e[d++];break;case sl.Q:if(n){if(Js.containStroke(l,u,e[d++],e[d++],e[d],e[d+1],t,i,a))return!0}else s+=dl(l,u,e[d++],e[d++],e[d],e[d+1],i,a)||0;l=e[d++],u=e[d++];break;case sl.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+=rl(l,u,b,w,i,a):(c=b,h=w);var S=(i-p)*v/m+p;if(n){if(al.containStroke(p,g,v,y,y+_,x,t,S,a))return!0}else s+=fl(p,g,v,y,y+_,x,S,a);l=Math.cos(y+_)*m+p,u=Math.sin(y+_)*v+g;break;case sl.R:c=l=e[d++],h=u=e[d++];b=c+e[d++],w=h+e[d++];if(n){if(Ks.containStroke(c,h,b,h,t,i,a)||Ks.containStroke(b,h,b,w,t,i,a)||Ks.containStroke(b,w,c,w,t,i,a)||Ks.containStroke(c,w,c,h,t,i,a))return!0}else s+=rl(b,h,b,w,i,a),s+=rl(c,w,c,h,i,a);break;case sl.Z:if(n){if(Ks.containStroke(l,u,c,h,t,i,a))return!0}else s+=rl(l,u,c,h,i,a);l=c,u=h}}return n||(r=u,o=h,Math.abs(r-o)<1e-4)||(s+=rl(l,u,c,h,i,a)||0),0!==s}var gl={contain:function(e,t,n){return pl(e,0,!1,t,n)},containStroke:function(e,t,n,i){return pl(e,t,!0,n,i)}},ml=ra.prototype.getCanvasPattern,vl=Math.abs,yl=new qs(!0);function _l(e){Ir.call(this,e),this.path=null}_l.prototype={constructor:_l,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(e,t){var n,i=this.style,a=this.path||yl,r=i.hasStroke(),o=i.hasFill(),s=i.fill,l=i.stroke,u=o&&!!s.colorStops,c=r&&!!l.colorStops,h=o&&!!s.image,d=r&&!!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=ml.call(s,e)),c?e.strokeStyle=this._strokeGradient:d&&(e.strokeStyle=ml.call(l,e));var f=i.lineDash,p=i.lineDashOffset,g=!!e.setLineDash,m=this.getGlobalScale();if(a.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&r?(a.beginPath(e),f&&!g&&(a.setLineDash(f),a.setLineDashOffset(p)),this.buildPath(a,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,a.fill(e),e.globalAlpha=v}else a.fill(e);if(f&&g&&(e.setLineDash(f),e.lineDashOffset=p),r)if(null!=i.strokeOpacity){v=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,a.stroke(e),e.globalAlpha=v}else a.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 qs},getBoundingRect:function(){var e=this._rect,t=this.style,n=!e;if(n){var i=this.path;i||(i=this.path=new qs),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),e=i.getBoundingRect()}if(this._rect=e,t.hasStroke()){var a=this._rectWithStroke||(this._rectWithStroke=e.clone());if(this.__dirty||n){a.copy(e);var r=t.lineWidth,o=t.strokeNoScale?this.getLineScale():1;t.hasFill()||(r=Math.max(r,this.strokeContainThreshold||4)),o>1e-10&&(a.width+=r/o,a.height+=r/o,a.x-=r/o/2,a.y-=r/o/2)}return a}return e},contain:function(e,t){var n=this.transformCoordToLocal(e,t),i=this.getBoundingRect(),a=this.style;if(e=n[0],t=n[1],i.contain(e,t)){var r=this.path.data;if(a.hasStroke()){var o=a.lineWidth,s=a.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(a.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),gl.containStroke(r,o/s,e,t)))return!0}if(a.hasFill())return gl.contain(r,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):Ir.prototype.attrKV.call(this,e,t)},setShape:function(e,t){var n=this.shape;if(n){if(Fe.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&&vl(e[0]-1)>1e-10&&vl(e[3]-1)>1e-10?Math.sqrt(vl(e[0]*e[3]-e[2]*e[1])):1}},_l.extend=function(e){var t=function(t){_l.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 a in n)!i.hasOwnProperty(a)&&n.hasOwnProperty(a)&&(i[a]=n[a])}e.init&&e.init.call(this,t)};for(var n in Fe.inherits(t,_l),e)"style"!==n&&"shape"!==n&&(t.prototype[n]=e[n]);return t},Fe.inherits(_l,Ir);var xl=_l,bl=ht.applyTransform,wl=qs.CMD,Sl=[[],[],[]],Ml=Math.sqrt,Tl=Math.atan2;var Il=function(e,t){var n,i,a,r,o,s=e.data,l=wl.M,u=wl.C,c=wl.L,h=wl.R,d=wl.A,f=wl.Q;for(a=0,r=0;a<s.length;){switch(n=s[a++],r=a,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=Ml(t[0]*t[0]+t[1]*t[1]),v=Ml(t[2]*t[2]+t[3]*t[3]),y=Tl(-t[1]/v,t[0]/m);s[a]*=m,s[a++]+=p,s[a]*=v,s[a++]+=g,s[a++]*=m,s[a++]*=v,s[a++]+=y,s[a++]+=y,r=a+=2;break;case h:_[0]=s[a++],_[1]=s[a++],bl(_,_,t),s[r++]=_[0],s[r++]=_[1],_[0]+=s[a++],_[1]+=s[a++],bl(_,_,t),s[r++]=_[0],s[r++]=_[1]}for(o=0;o<i;o++){var _;(_=Sl[o])[0]=s[a++],_[1]=s[a++],bl(_,_,t),s[r++]=_[0],s[r++]=_[1]}}},Al=Math.sqrt,Dl=Math.sin,Cl=Math.cos,Ol=Math.PI,kl=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},Ll=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(kl(e)*kl(t))},El=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Ll(e,t))};function Nl(e,t,n,i,a,r,o,s,l,u,c){var h=l*(Ol/180),d=Cl(h)*(e-n)/2+Dl(h)*(t-i)/2,f=-1*Dl(h)*(e-n)/2+Cl(h)*(t-i)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=Al(p),s*=Al(p));var g=(a===r?-1:1)*Al((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+Cl(h)*m-Dl(h)*v,_=(t+i)/2+Dl(h)*m+Cl(h)*v,x=El([1,0],[(d-m)/o,(f-v)/s]),b=[(d-m)/o,(f-v)/s],w=[(-1*d-m)/o,(-1*f-v)/s],S=El(b,w);Ll(b,w)<=-1&&(S=Ol),Ll(b,w)>=1&&(S=0),0===r&&S>0&&(S-=2*Ol),1===r&&S<0&&(S+=2*Ol),c.addData(u,y,_,o,s,x,S,h,r)}var Pl=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Rl=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function zl(e,t){var n=function(e){if(!e)return new qs;for(var t,n=0,i=0,a=n,r=i,o=new qs,s=qs.CMD,l=e.match(Pl),u=0;u<l.length;u++){for(var c,h=l[u],d=h.charAt(0),f=h.match(Rl)||[],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,S,M=n,T=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),a=n,r=i,d="l";break;case"M":n=f[m++],i=f[m++],c=s.M,o.addData(c,n,i),a=n,r=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 I=o.len(),A=o.data;t===s.C&&(v+=n-A[I-4],y+=i-A[I-3]),c=s.C,M=f[m++],T=f[m++],n=f[m++],i=f[m++],o.addData(c,v,y,M,T,n,i);break;case"s":v=n,y=i,I=o.len(),A=o.data,t===s.C&&(v+=n-A[I-4],y+=i-A[I-3]),c=s.C,M=n+f[m++],T=i+f[m++],n+=f[m++],i+=f[m++],o.addData(c,v,y,M,T,n,i);break;case"Q":M=f[m++],T=f[m++],n=f[m++],i=f[m++],c=s.Q,o.addData(c,M,T,n,i);break;case"q":M=f[m++]+n,T=f[m++]+i,n+=f[m++],i+=f[m++],c=s.Q,o.addData(c,M,T,n,i);break;case"T":v=n,y=i,I=o.len(),A=o.data,t===s.Q&&(v+=n-A[I-4],y+=i-A[I-3]),n=f[m++],i=f[m++],c=s.Q,o.addData(c,v,y,n,i);break;case"t":v=n,y=i,I=o.len(),A=o.data,t===s.Q&&(v+=n-A[I-4],y+=i-A[I-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++],S=f[m++],Nl(M=n,T=i,n=f[m++],i=f[m++],w,S,_,x,b,c=s.A,o);break;case"a":_=f[m++],x=f[m++],b=f[m++],w=f[m++],S=f[m++],Nl(M=n,T=i,n+=f[m++],i+=f[m++],w,S,_,x,b,c=s.A,o)}}"z"!==d&&"Z"!==d||(c=s.Z,o.addData(c),n=a,i=r),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){Il(n,e),this.dirty(!0)},t}var Bl=function(e,t){for(var n=[],i=e.length,a=0;a<i;a++){var r=e[a];r.path||r.createPathProxy(),r.__dirtyPath&&r.buildPath(r.path,r.shape,!0),n.push(r.path)}var o=new xl(t);return o.createPathProxy(),o.buildPath=function(e){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t)},o},Vl={createFromString:function(e,t){return new xl(zl(e,t))},extendFromString:function(e,t){return xl.extend(zl(e,t))},mergePath:Bl},Hl=Xi.ContextCachedBy,Yl=function(e){Ir.call(this,e)};Yl.prototype={constructor:Yl,type:"text",brush:function(e,t){var n=this.style;this.__dirty&&xr.normalizeTextStyle(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;null!=i&&(i+=""),xr.needDrawText(i,n)?(this.setTransform(e),xr.renderText(this,e,i,n,null,t),this.restoreTransform(e)):e.__attrCachedBy=Hl.NONE},getBoundingRect:function(){var e=this.style;if(this.__dirty&&xr.normalizeTextStyle(e,!0),!this._rect){e.text;var t=Ga.getBoundingRect(e.text+"",e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich);if(t.x+=e.x||0,t.y+=e.y||0,xr.getStroke(e.textStroke,e.textStrokeWidth)){var n=e.textStrokeWidth;t.x-=n/2,t.y-=n/2,t.width+=n,t.height+=n}this._rect=t}return this._rect}},Fe.inherits(Yl,Ir);var Fl=Yl,Gl=xl.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)}}),Wl=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];var jl=function(e){return re.browser.ie&&re.browser.version>=11?function(){var t,n=this.__clipPaths,i=this.style;if(n)for(var a=0;a<n.length;a++){var r=n[a],o=r&&r.shape,s=r&&r.type;if(o&&("sector"===s&&o.startAngle===o.endAngle||"rect"===s&&(!o.width||!o.height))){for(var l=0;l<Wl.length;l++)Wl[l][2]=i[Wl[l][0]],i[Wl[l][0]]=Wl[l][1];t=!0;break}}if(e.apply(this,arguments),t)for(l=0;l<Wl.length;l++)i[Wl[l][0]]=Wl[l][2]}:e},Ul=xl.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:jl(xl.prototype.brush),buildPath:function(e,t){var n=t.cx,i=t.cy,a=Math.max(t.r0||0,0),r=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*a+n,c*a+i),e.lineTo(u*r+n,c*r+i),e.arc(n,i,r,o,s,!l),e.lineTo(Math.cos(s)*a+n,Math.sin(s)*a+i),0!==a&&e.arc(n,i,a,s,o,l),e.closePath()}}),Zl=xl.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=2*Math.PI;e.moveTo(n+t.r,i),e.arc(n,i,t.r,0,a,!1),e.moveTo(n+t.r0,i),e.arc(n,i,t.r0,0,a,!0)}}),Xl=Zl,ql=ht.distance;function Kl(e,t,n,i,a,r,o){var s=.5*(n-e),l=.5*(i-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*r+s*a+t}var $l=function(e,t){for(var n=e.length,i=[],a=0,r=1;r<n;r++)a+=ql(e[r-1],e[r]);var o=a/2;for(o=o<n?n:o,r=0;r<o;r++){var s,l,u,c=r/(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([Kl(s[0],f[0],l[0],u[0],d,p,g),Kl(s[1],f[1],l[1],u[1],d,p,g)])}return i},Ql=ht.min,Jl=ht.max,eu=ht.scale,tu=ht.distance,nu=ht.add,iu=ht.clone,au=ht.sub;var ru=function(e,t,n,i){var a,r,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++)Ql(o,o,e[d]),Jl(s,s,e[d]);Ql(o,o,i[0]),Jl(s,s,i[1])}for(d=0,f=e.length;d<f;d++){var p=e[d];if(n)a=e[d?d-1:f-1],r=e[(d+1)%f];else{if(0===d||d===f-1){l.push(iu(e[d]));continue}a=e[d-1],r=e[d+1]}au(u,r,a),eu(u,u,t);var g=tu(p,a),m=tu(p,r),v=g+m;0!==v&&(g/=v,m/=v),eu(c,u,-g),eu(h,u,m);var y=nu([],p,c),_=nu([],p,h);i&&(Jl(y,y,o),Ql(y,y,s),Jl(_,_,o),Ql(_,_,s)),l.push(y),l.push(_)}return n&&l.push(l.shift()),l};var ou=function(e,t,n){var i=t.points,a=t.smooth;if(i&&i.length>=2){if(a&&"spline"!==a){var r=ru(i,a,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=r[2*s],u=r[2*s+1],c=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{"spline"===a&&(i=$l(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()}},su={buildPath:ou},lu=xl.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(e,t){su.buildPath(e,t,!0)}}),uu=xl.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(e,t){su.buildPath(e,t,!1)}}),cu=Math.round;function hu(e,t,n){if(!t)return e;var i=cu(2*e);return(i+cu(t))%2==0?i/2:(i+(n?1:-1))/2}var du=function(e,t,n){if(t){var i=t.x1,a=t.x2,r=t.y1,o=t.y2;e.x1=i,e.x2=a,e.y1=r,e.y2=o;var s=n&&n.lineWidth;s&&(cu(2*i)===cu(2*a)&&(e.x1=e.x2=hu(i,s,!0)),cu(2*r)===cu(2*o)&&(e.y1=e.y2=hu(r,s,!0)))}},fu=function(e,t,n){if(t){var i=t.x,a=t.y,r=t.width,o=t.height;e.x=i,e.y=a,e.width=r,e.height=o;var s=n&&n.lineWidth;s&&(e.x=hu(i,s,!0),e.y=hu(a,s,!0),e.width=Math.max(hu(i+r,s,!1)-e.x,0===r?0:1),e.height=Math.max(hu(a+o,s,!1)-e.y,0===o?0:1))}},pu={subPixelOptimizeLine:du,subPixelOptimizeRect:fu,subPixelOptimize:hu},gu=pu.subPixelOptimizeRect,mu={},vu=xl.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(e,t){var n,i,a,r;this.subPixelOptimize?(gu(mu,t,this.style),n=mu.x,i=mu.y,a=mu.width,r=mu.height,mu.r=t.r,t=mu):(n=t.x,i=t.y,a=t.width,r=t.height),t.r?Wa.buildPath(e,t):e.rect(n,i,a,r),e.closePath()}}),yu=pu.subPixelOptimizeLine,_u={},xu=xl.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,a,r;this.subPixelOptimize?(yu(_u,t,this.style),n=_u.x1,i=_u.y1,a=_u.x2,r=_u.y2):(n=t.x1,i=t.y1,a=t.x2,r=t.y2);var o=t.percent;0!==o&&(e.moveTo(n,i),o<1&&(a=n*(1-o)+a*o,r=i*(1-o)+r*o),e.lineTo(a,r))},pointAt:function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]}}),bu=ys.quadraticSubdivide,wu=ys.cubicSubdivide,Su=ys.quadraticAt,Mu=ys.cubicAt,Tu=ys.quadraticDerivativeAt,Iu=ys.cubicDerivativeAt,Au=[];function Du(e,t,n){var i=e.cpx2,a=e.cpy2;return null===i||null===a?[(n?Iu:Mu)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Iu:Mu)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?Tu:Su)(e.x1,e.cpx1,e.x2,t),(n?Tu:Su)(e.y1,e.cpy1,e.y2,t)]}var Cu=xl.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,a=t.x2,r=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&&(bu(n,o,a,c,Au),o=Au[1],a=Au[2],bu(i,s,r,c,Au),s=Au[1],r=Au[2]),e.quadraticCurveTo(o,s,a,r)):(c<1&&(wu(n,o,l,a,c,Au),o=Au[1],l=Au[2],a=Au[3],wu(i,s,u,r,c,Au),s=Au[1],u=Au[2],r=Au[3]),e.bezierCurveTo(o,s,l,u,a,r)))},pointAt:function(e){return Du(this.shape,e,!1)},tangentAt:function(e){var t=Du(this.shape,e,!0);return ht.normalize(t,t)}}),Ou=xl.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,a=Math.max(t.r,0),r=t.startAngle,o=t.endAngle,s=t.clockwise,l=Math.cos(r),u=Math.sin(r);e.moveTo(l*a+n,u*a+i),e.arc(n,i,a,r,o,!s)}}),ku=xl.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(),xl.prototype.getBoundingRect.call(this)}}),Lu=ku,Eu=function(e){this.colorStops=e||[]};Eu.prototype={constructor:Eu,addColorStop:function(e,t){this.colorStops.push({offset:e,color:t})}};var Nu=Eu,Pu=function(e,t,n,i,a,r){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=r||!1,Nu.call(this,a)};Pu.prototype={constructor:Pu},Fe.inherits(Pu,Nu);var Ru=Pu,zu=function(e,t,n,i,a){this.x=null==e?.5:e,this.y=null==t?.5:t,this.r=null==n?.5:n,this.type="radial",this.global=a||!1,Nu.call(this,i)};zu.prototype={constructor:zu},Fe.inherits(zu,Nu);var Bu=zu,Vu=Fe.inherits;function Hu(e){Ir.call(this,e),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}Hu.prototype.incremental=!0,Hu.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Hu.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.dirty()},Hu.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},Hu.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])},Hu.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}},Hu.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 Yu=[];Hu.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Ni(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(Yu)),e.union(i)}this._rect=e}return this._rect},Hu.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},Vu(Hu,Ir);var Fu=Hu,Gu=Dr,Wu=Ri,ju=Fl,Uu=Gl,Zu=Ul,Xu=Xl,qu=lu,Ku=uu,$u=vu,Qu=xu,Ju=Cu,ec=Ou,tc=Lu,nc=Ru,ic=Bu,ac=Ni,rc=Fu,oc=Math.max,sc=Math.min,lc={},uc="emphasis",cc="normal",hc=1,dc={},fc={};function pc(e,t){fc[e]=t}function gc(e,t,n,i){var a=Vl.createFromString(e,t);return n&&("center"===i&&(n=mc(n,a.getBoundingRect())),yc(a,n)),a}function mc(e,t){var n,i=t.width/t.height,a=e.height*i;return n=a<=e.width?e.height:(a=e.width)/i,{x:e.x+e.width/2-a/2,y:e.y+e.height/2-n/2,width:a,height:n}}var vc=Vl.mergePath;function yc(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}var _c=pu.subPixelOptimize;function xc(e){return null!=e&&"none"!==e}var bc=Fe.createHashMap(),wc=0;function Sc(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 a=e,r=e.style;i&&(r=(a=n.addHover(e)).style),Vc(r),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 a in t)null!=t[a]&&(n[a]=i[a]);n.fill=i.fill,n.stroke=i.stroke}else e.__cachedNormalStl=e.__cachedNormalZ2=null}}(a),r.extendFrom(t),Mc(r,t,"fill"),Mc(r,t,"stroke"),Bc(r),i||(e.dirty(!1),e.z2+=1)}}}function Mc(e,t,n){!xc(t[n])&&xc(e[n])&&(e[n]=function(e){if("string"!=typeof e)return e;var t=bc.get(e);return t||(t=Xn.lift(e,-.1),wc<1e4&&(bc.set(e,t),wc++)),t}(e[n]))}function Tc(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&&(Vc(n),e.setStyle(i),Bc(n));var a=e.__cachedNormalZ2;null!=a&&e.z2-a==1&&(e.z2=a)}}function Ic(e,t,n){var i,a=cc,r=cc;e.__highlighted&&(a=uc,i=!0),t(e,n),e.__highlighted&&(r=uc,i=!0),e.isGroup&&e.traverse((function(e){!e.isGroup&&t(e,n)})),i&&e.__highDownOnUpdate&&e.__highDownOnUpdate(a,r)}function Ac(e,t){t=e.__hoverStl=!1!==t&&(e.hoverStyle||t||{}),e.__hoverStlDirty=!0,e.__highlighted&&(e.__cachedNormalStl=null,Tc(e),Sc(e))}function Dc(e){!Lc(this,e)&&!this.__highByOuter&&Ic(this,Sc)}function Cc(e){!Lc(this,e)&&!this.__highByOuter&&Ic(this,Tc)}function Oc(e){this.__highByOuter|=1<<(e||0),Ic(this,Sc)}function kc(e){!(this.__highByOuter&=~(1<<(e||0)))&&Ic(this,Tc)}function Lc(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Ec(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",Dc)[i]("mouseout",Cc),e[i]("emphasis",Oc)[i]("normal",kc),e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!n}}function Nc(e,t,n,i,a){return Pc(e,t,i,a),n&&Fe.extend(e,n),e}function Pc(e,t,n,i){if((n=n||lc).isRectText){var a;n.getTextPosition?a=n.getTextPosition(t,i):"outside"===(a=t.getShallow("position")||(i?null:"inside"))&&(a="top"),e.textPosition=a,e.textOffset=t.getShallow("offset");var r=t.getShallow("rotate");null!=r&&(r*=Math.PI/180),e.textRotation=r,e.textDistance=Fe.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||lc).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]);Rc(o[c]={},h,l,n,i)}return e.rich=o,Rc(e,t,l,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),e}function Rc(e,t,n,i,a,r){n=!a&&n||lc,e.textFill=zc(t.getShallow("color"),i)||n.color,e.textStroke=zc(t.getShallow("textBorderColor"),i)||n.textBorderColor,e.textStrokeWidth=Fe.retrieve2(t.getShallow("textBorderWidth"),n.textBorderWidth),a||(r&&(e.insideRollbackOpt=i,Bc(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"),r&&i.disableBox||(e.textBackgroundColor=zc(t.getShallow("backgroundColor"),i),e.textPadding=t.getShallow("padding"),e.textBorderColor=zc(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 zc(e,t){return"auto"!==e?e:t&&t.autoColor?t.autoColor:null}function Bc(e){var t,n=e.textPosition,i=e.insideRollbackOpt;if(i&&null==e.textFill){var a=i.autoColor,r=i.isRectText,o=i.useInsideStyle,s=!1!==o&&(!0===o||r&&n&&"string"==typeof n&&n.indexOf("inside")>=0),l=!s&&null!=a;(s||l)&&(t={textFill:e.textFill,textStroke:e.textStroke,textStrokeWidth:e.textStrokeWidth}),s&&(e.textFill="#fff",null==e.textStroke&&(e.textStroke=a,null==e.textStrokeWidth&&(e.textStrokeWidth=2))),l&&(e.textFill=a)}e.insideRollback=t}function Vc(e){var t=e.insideRollback;t&&(e.textFill=t.textFill,e.textStroke=t.textStroke,e.textStrokeWidth=t.textStrokeWidth,e.insideRollback=null)}function Hc(e,t,n,i,a,r){if("function"==typeof a&&(r=a,a=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(a,i.getAnimationDelayParams?i.getAnimationDelayParams(t,a):null)),"function"==typeof s&&(s=s(a)),s>0?t.animateTo(n,s,u||0,l,r,!!r):(t.stopAnimation(),t.attr(n),r&&r())}else t.stopAnimation(),t.attr(n),r&&r()}function Yc(e,t,n,i,a){Hc(!0,e,t,n,i,a)}function Fc(e,t,n){return t&&!Fe.isArrayLike(t)&&(t=mn.getLocalTransform(t)),n&&(t=sn.invert([],t)),ht.applyTransform([],e,t)}function Gc(e,t,n,i,a,r,o,s){var l,u=n-e,c=i-t,h=o-a,d=s-r,f=Wc(h,d,u,c);if((l=f)<=1e-6&&l>=-1e-6)return!1;var p=e-a,g=t-r,m=Wc(p,g,u,c)/f;if(m<0||m>1)return!1;var v=Wc(p,g,h,d)/f;return!(v<0||v>1)}function Wc(e,t,n,i){return e*i-n*t}pc("circle",Gl),pc("sector",Ul),pc("ring",Xl),pc("polygon",lu),pc("polyline",uu),pc("rect",vu),pc("line",xu),pc("bezierCurve",Cu),pc("arc",Ou);var jc=function(e,t,n){var i=new Dr({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var a={width:e.width,height:e.height};i.setStyle(mc(t,a))}}});return i},Uc=function(e){return pu.subPixelOptimizeLine(e.shape,e.shape,e.style),e},Zc=function(e){return pu.subPixelOptimizeRect(e.shape,e.shape,e.style),e},Xc=function(e,t,n){var i,a={isRectText:!0};!1===n?i=!0:a.autoColor=n,Pc(e,t,a,i)},qc=function(e,t,n){var i=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),a=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),r=["left"===e?-i:"right"===e?i:0,"top"===e?-a:"bottom"===e?a:0];return r=Fc(r,t,n),Math.abs(r[0])>Math.abs(r[1])?r[0]>0?"right":"left":r[1]>0?"bottom":"top"},Kc=function(e,t){return Fe.map(e,(function(e){var n=e[0];n=oc(n,t.x),n=sc(n,t.x+t.width);var i=e[1];return i=oc(i,t.y),[n,i=sc(i,t.y+t.height)]}))},$c=function(e,t,n){var i=(t=Fe.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),Fe.defaults(i,n),new Dr(t)):gc(e.replace("path://",""),t,n,"center")},Qc=function(e,t,n,i,a){for(var r=0,o=a[a.length-1];r<a.length;r++){var s=a[r];if(Gc(e,t,n,i,s[0],s[1],o[0],o[1]))return!0;o=s}},Jc={Image:Gu,Group:Wu,Text:ju,Circle:Uu,Sector:Zu,Ring:Xu,Polygon:qu,Polyline:Ku,Rect:$u,Line:Qu,BezierCurve:Ju,Arc:ec,CompoundPath:tc,LinearGradient:nc,RadialGradient:ic,BoundingRect:ac,IncrementalDisplayable:rc,Z2_EMPHASIS_LIFT:1,CACHED_LABEL_STYLE_PROPERTIES:{color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},extendShape:function(e){return xl.extend(e)},extendPath:function(e,t){return Vl.extendFromString(e,t)},registerShape:pc,getShapeClass:function(e){if(fc.hasOwnProperty(e))return fc[e]},makePath:gc,makeImage:jc,mergePath:vc,resizePath:yc,subPixelOptimizeLine:Uc,subPixelOptimizeRect:Zc,subPixelOptimize:_c,setElementHoverStyle:Ac,setHoverStyle:function(e,t){Ec(e,!0),Ic(e,Ac,t)},setAsHighDownDispatcher:Ec,isHighDownDispatcher:function(e){return!(!e||!e.__highDownDispatcher)},getHighlightDigit:function(e){var t=dc[e];return null==t&&hc<=32&&(t=dc[e]=hc++),t},setLabelStyle:function(e,t,n,i,a,r,o){var s,l=(a=a||lc).labelFetcher,u=a.labelDataIndex,c=a.labelDimIndex,h=a.labelProp,d=n.getShallow("show"),f=i.getShallow("show");(d||f)&&(l&&(s=l.getFormattedLabel(u,"normal",null,c,h)),null==s&&(s=Fe.isFunction(a.defaultText)?a.defaultText(u,a):a.defaultText));var p=d?s:null,g=f?Fe.retrieve2(l?l.getFormattedLabel(u,"emphasis",null,c,h):null,s):null;null==p&&null==g||(Nc(e,n,r,a),Nc(t,i,o,a,!0)),e.text=p,t.text=g},modifyLabelStyle:function(e,t,n){var i=e.style;t&&(Vc(i),e.setStyle(t),Bc(i)),i=e.__hoverStl,n&&i&&(Vc(i),Fe.extend(i,n),Bc(i))},setTextStyle:Nc,setText:Xc,getFont:function(e,t){var n=t&&t.getModel("textStyle");return Fe.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:Yc,initProps:function(e,t,n,i,a){Hc(!1,e,t,n,i,a)},getTransform:function(e,t){for(var n=sn.identity([]);e&&e!==t;)sn.mul(n,e.getLocalTransform(),n),e=e.parent;return n},applyTransform:Fc,transformDirection:qc,groupTransition:function(e,t,n,i){if(e&&t){var a,r=(a={},e.traverse((function(e){!e.isGroup&&e.anid&&(a[e.anid]=e)})),a);t.traverse((function(e){if(!e.isGroup&&e.anid){var t=r[e.anid];if(t){var i=o(e);e.attr(o(t)),Yc(e,i,n,e.dataIndex)}}}))}function o(e){var t={position:ht.clone(e.position),rotation:e.rotation};return e.shape&&(t.shape=Fe.extend({},e.shape)),t}},clipPointsByRect:Kc,clipRectByRect:function(e,t){var n=oc(e.x,t.x),i=sc(e.x+e.width,t.x+t.width),a=oc(e.y,t.y),r=sc(e.y+e.height,t.y+t.height);if(i>=n&&r>=a)return{x:n,y:a,width:i-n,height:r-a}},createIcon:$c,linePolygonIntersect:Qc,lineLineIntersect:Gc},eh=["textStyle","color"],th={getTextColor:function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(eh):null)},getFont:function(){return Jc.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(e){return Ga.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"))}},nh=th,ih=Wo([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),ah={getItemStyle:function(e,t){var n=ih(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]}},rh=ah,oh=Po.makeInner,sh=Go.enableClassExtend,lh=Go.enableClassCheck,uh=Fe.mixin,ch=oh();function hh(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}function dh(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 fh(e,t){var n=ch(e).getParent;return n?n.call(e,t):e.parentModel}hh.prototype={constructor:hh,init:null,mergeOption:function(e){Fe.merge(this.option,e,!0)},get:function(e,t){return null==e?this.option:dh(this.option,this.parsePath(e),!t&&fh(this,e))},getShallow:function(e,t){var n=this.option,i=null==n?n:n[e],a=!t&&fh(this,e);return null==i&&a&&(i=a.getShallow(e)),i},getModel:function(e,t){var n;return new hh(null==e?this.option:dh(this.option,e=this.parsePath(e)),t=t||(n=fh(this,e))&&n.getModel(e),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(Fe.clone(this.option))},setReadOnly:function(e){},parsePath:function(e){return"string"==typeof e&&(e=e.split(".")),e},customizeGetParent:function(e){ch(this).getParent=e},isAnimationEnabled:function(){if(!re.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},sh(hh),lh(hh),uh(hh,Zo),uh(hh,qo),uh(hh,nh),uh(hh,rh);var ph=hh,gh=Go.parseClassType,mh=0;var vh={getUID:function(e){return[e||"",mh++,Math.random().toFixed(5)].join("_")},enableSubTypeDefaulter:function(e){var t={};return e.registerSubTypeDefaulter=function(e,n){e=gh(e),t[e.main]=n},e.determineSubType=function(n,i){var a=i.type;if(!a){var r=gh(n).main;e.hasSubTypes(n)&&t[r]&&(a=t[r](i))}return a},e},enableTopologicalTravel:function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,i,a,r){if(e.length){var o=function(e){var i={},a=[];return Fe.each(e,(function(r){var o=n(i,r),s=function(e,t){var n=[];return Fe.each(e,(function(e){Fe.indexOf(t,e)>=0&&n.push(e)})),n}(o.originalDeps=t(r),e);o.entryCount=s.length,0===o.entryCount&&a.push(r),Fe.each(s,(function(e){Fe.indexOf(o.predecessor,e)<0&&o.predecessor.push(e);var t=n(i,e);Fe.indexOf(t.successor,e)<0&&t.successor.push(r)}))})),{graph:i,noEntryList:a}}(i),s=o.graph,l=o.noEntryList,u={};for(Fe.each(e,(function(e){u[e]=!0}));l.length;){var c=l.pop(),h=s[c],d=!!u[c];d&&(a.call(r,c,h.originalDeps.slice()),delete u[c]),Fe.each(h.successor,d?p:f)}Fe.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)}}}},yh=1e-4;var _h=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function xh(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 bh=function(e,t,n,i){var a=t[1]-t[0],r=n[1]-n[0];if(0===a)return 0===r?n[0]:(n[0]+n[1])/2;if(i)if(a>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])/a*r+n[0]},wh=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},Sh=function(e,t){var n=Math.log,i=Math.LN10,a=Math.floor(n(e[1]-e[0])/i),r=Math.round(n(Math.abs(t[1]-t[0]))/i),o=Math.min(Math.max(-a+r,0),20);return isFinite(o)?o:20},Mh=function(e,t,n){if(!e[t])return 0;var i=Fe.reduce(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===i)return 0;for(var a=Math.pow(10,n),r=Fe.map(e,(function(e){return(isNaN(e)?0:e)/i*a*100})),o=100*a,s=Fe.map(r,(function(e){return Math.floor(e)})),l=Fe.reduce(s,(function(e,t){return e+t}),0),u=Fe.map(r,(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]/a},Th=function(e,t){var n=xh(e),i=Math.pow(10,n),a=e/i;return e=(t?a<1.5?1:a<2.5?2:a<4?3:a<7?5:10:a<1?1:a<2?2:a<3?3:a<5?5:10)*i,n>=-20?+e.toFixed(n<0?-n:0):e},Ih=function(e,t){var n=(e.length-1)*t+1,i=Math.floor(n),a=+e[i-1],r=n-i;return r?a+r*(e[i]-a):a},Ah=function(e){e.sort((function(e,t){return s(e,t,0)?-1:1}));for(var t=-1/0,n=1,i=0;i<e.length;){for(var a=e[i].interval,r=e[i].close,o=0;o<2;o++)a[o]<=t&&(a[o]=t,r[o]=o?1:1-n),t=a[o],n=r[o];a[0]===a[1]&&r[0]*r[1]!=1?e.splice(i,1):i++}return e;function s(e,t,n){return e.interval[n]<t.interval[n]||e.interval[n]===t.interval[n]&&(e.close[n]-t.close[n]==(n?-1:1)||!n&&s(e,t,1))}},Dh=function(e){return e-parseFloat(e)>=0},Ch={linearMap:bh,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:wh,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 a=t.indexOf(".");return a<0?0:t.length-1-a},getPixelPrecision:Sh,getPercentWithPrecision:Mh,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<yh},parseDate:function(e){if(e instanceof Date)return e;if("string"==typeof e){var t=_h.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,xh(e))},quantityExponent:xh,nice:Th,quantile:Ih,reformIntervals:Ah,isNumeric:Dh};var Oh=Fe.normalizeCssArray,kh=/([&<>"'])/g,Lh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Eh(e){return null==e?"":(e+"").replace(kh,(function(e,t){return Lh[t]}))}var Nh=["a","b","c","d","e","f","g"],Ph=function(e,t){return"{"+e+(null==t?"":t)+"}"};function Rh(e,t){return"0000".substr(0,t-(e+="").length)+e}var zh=function(e,t,n){Fe.isArray(t)||(t=[t]);var i=t.length;if(!i)return"";for(var a=t[0].$vars||[],r=0;r<a.length;r++){var o=Nh[r];e=e.replace(Ph(o),Ph(o,0))}for(var s=0;s<i;s++)for(var l=0;l<a.length;l++){var u=t[s][a[l]];e=e.replace(Ph(Nh[l],s),n?Eh(u):u)}return e},Bh=function(e,t,n){return Fe.each(t,(function(t,i){e=e.replace("{"+i+"}",n?Eh(t):t)})),e},Vh=function(e,t){var n=(e=Fe.isString(e)?{color:e,extraCssText:t}:e||{}).color,i=e.type,a=(t=e.extraCssText,e.renderMode||"html"),r=e.markerId||"X";return n?"html"===a?"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:'+Eh(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Eh(n)+";"+(t||"")+'"></span>':{renderMode:a,content:"{marker"+r+"|}  ",style:{color:n}}:""},Hh=function(e,t,n){"week"!==e&&"month"!==e&&"quarter"!==e&&"half-year"!==e&&"year"!==e||(e="MM-dd\nyyyy");var i=Ch.parseDate(t),a=n?"UTC":"",r=i["get"+a+"FullYear"](),o=i["get"+a+"Month"]()+1,s=i["get"+a+"Date"](),l=i["get"+a+"Hours"](),u=i["get"+a+"Minutes"](),c=i["get"+a+"Seconds"](),h=i["get"+a+"Milliseconds"]();return e=e.replace("MM",Rh(o,2)).replace("M",o).replace("yyyy",r).replace("yy",r%100).replace("dd",Rh(s,2)).replace("d",s).replace("hh",Rh(l,2)).replace("h",l).replace("mm",Rh(u,2)).replace("m",u).replace("ss",Rh(c,2)).replace("s",c).replace("SSS",Rh(h,3))},Yh=function(e,t,n,i,a,r,o,s){return Ga.getBoundingRect(e,t,n,i,a,s,r,o)},Fh={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:Oh,encodeHTML:Eh,formatTpl:zh,formatTplSimple:Bh,getTooltipMarker:Vh,formatTime:Hh,capitalFirst:function(e){return e?e.charAt(0).toUpperCase()+e.substr(1):e},truncateText:Ga.truncateText,getTextBoundingRect:function(e){return Ga.getBoundingRect(e.text,e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich,e.truncate)},getTextRect:Yh,windowOpen:function(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location=e}else window.open(e,t)}},Gh=Ch.parsePercent,Wh=Fe.each,jh=["left","right","top","bottom","width","height"],Uh=[["width","left","right"],["height","top","bottom"]];function Zh(e,t,n,i,a){var r=0,o=0;null==i&&(i=1/0),null==a&&(a=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=r+m)>i||l.newline?(r=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)>a||l.newline?(r+=s+n,o=0,h=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=r,d[1]=o,"horizontal"===e?r=c+n:o=h+n)}))}var Xh=Zh,qh=Fe.curry(Zh,"vertical"),Kh=Fe.curry(Zh,"horizontal");function $h(e,t,n){n=Fh.normalizeCssArray(n||0);var i=t.width,a=t.height,r=Gh(e.left,i),o=Gh(e.top,a),s=Gh(e.right,i),l=Gh(e.bottom,a),u=Gh(e.width,i),c=Gh(e.height,a),h=n[2]+n[0],d=n[1]+n[3],f=e.aspect;switch(isNaN(u)&&(u=i-s-d-r),isNaN(c)&&(c=a-l-h-o),null!=f&&(isNaN(u)&&isNaN(c)&&(f>i/a?u=.8*i:c=.8*a),isNaN(u)&&(u=f*c),isNaN(c)&&(c=u/f)),isNaN(r)&&(r=i-s-u-d),isNaN(o)&&(o=a-l-c-h),e.left||e.right){case"center":r=i/2-u/2-n[3];break;case"right":r=i-u-d}switch(e.top||e.bottom){case"middle":case"center":o=a/2-c/2-n[0];break;case"bottom":o=a-c-h}r=r||0,o=o||0,isNaN(u)&&(u=i-d-r-(s||0)),isNaN(c)&&(c=a-h-o-(l||0));var p=new Ni(r+n[3],o+n[0],u,c);return p.margin=n,p}function Qh(e,t){return t&&e&&Wh(jh,(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}var Jh=function(e,t,n,i,a){var r=!a||!a.hv||a.hv[0],o=!a||!a.hv||a.hv[1],s=a&&a.boundingMode||"all";if(r||o){var l;if("raw"===s)l="group"===e.type?new Ni(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();(l=l.clone()).applyTransform(u)}t=$h(Fe.defaults({width:l.width,height:l.height},t),n,i);var c=e.position,h=r?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])}},ed=function(e,t,n){!Fe.isObject(n)&&(n={});var i=n.ignoreSize;!Fe.isArray(i)&&(i=[i,i]);var a=o(Uh[0],0),r=o(Uh[1],1);function o(n,a){var r={},o=0,u={},c=0;if(Wh(n,(function(t){u[t]=e[t]})),Wh(n,(function(e){s(t,e)&&(r[e]=u[e]=t[e]),l(r,e)&&o++,l(u,e)&&c++})),i[a])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 r;for(var h=0;h<n.length;h++){var d=n[h];if(!s(r,d)&&s(e,d)){r[d]=e[d];break}}return r}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){Wh(e,(function(e){t[e]=n[e]}))}u(Uh[0],e,a),u(Uh[1],e,r)},td={LOCATION_PARAMS:jh,HV_NAMES:Uh,box:Xh,vbox:qh,hbox:Kh,getAvailableSize:function(e,t,n){var i=t.width,a=t.height,r=Gh(e.x,i),o=Gh(e.y,a),s=Gh(e.x2,i),l=Gh(e.y2,a);return(isNaN(r)||isNaN(parseFloat(e.x)))&&(r=0),(isNaN(s)||isNaN(parseFloat(e.x2)))&&(s=i),(isNaN(o)||isNaN(parseFloat(e.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(e.y2)))&&(l=a),n=Fh.normalizeCssArray(n||0),{width:Math.max(s-r-n[1]-n[3],0),height:Math.max(l-o-n[0]-n[2],0)}},getLayoutRect:$h,positionElement:Jh,sizeCalculable:function(e,t){return null!=e[Uh[t][0]]||null!=e[Uh[t][1]]&&null!=e[Uh[t][2]]},mergeLayoutParam:ed,getLayoutParams:function(e){return Qh({},e)},copyLayoutParams:Qh},nd={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")}}},id=Go.enableClassManagement,ad=Go.parseClassType,rd=(0,Po.makeInner)(),od=ph.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(e,t,n,i){ph.call(this,e,t,n,i),this.uid=vh.getUID("ec_cpt_model")},init:function(e,t,n,i){this.mergeDefaultAndTheme(e,n)},mergeDefaultAndTheme:function(e,t){var n=this.layoutMode,i=n?td.getLayoutParams(e):{},a=t.getTheme();Fe.merge(e,a.get(this.mainType)),Fe.merge(e,this.getDefaultOption()),n&&td.mergeLayoutParam(e,i,n)},mergeOption:function(e,t){Fe.merge(this.option,e,!0);var n=this.layoutMode;n&&td.mergeLayoutParam(this.option,e,n)},optionUpdated:function(e,t){},getDefaultOption:function(){var e=rd(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 a={},r=t.length-1;r>=0;r--)a=Fe.merge(a,t[r],!0);e.defaultOption=a}return e.defaultOption},getReferringComponents:function(e){return this.ecModel.queryComponents({mainType:e,index:this.get(e+"Index",!0),id:this.get(e+"Id",!0)})}});id(od,{registerWhenExtend:!0}),vh.enableSubTypeDefaulter(od),vh.enableTopologicalTravel(od,(function(e){var t=[];Fe.each(od.getClassesByMainType(e),(function(e){t=t.concat(e.prototype.dependencies||[])})),t=Fe.map(t,(function(e){return ad(e).main})),"dataset"!==e&&Fe.indexOf(t,"dataset")<=0&&t.unshift("dataset");return t})),Fe.mixin(od,nd);var sd=od,ld="";"undefined"!=typeof navigator&&(ld=navigator.platform||"");var ud={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:ld.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},cd=Po.makeInner,hd=Po.normalizeToArray,dd=cd();var fd={clearColorPalette:function(){dd(this).colorIdx=0,dd(this).colorNameMap={}},getColorFromPalette:function(e,t,n){var i=dd(t=t||this),a=i.colorIdx||0,r=i.colorNameMap=i.colorNameMap||{};if(r.hasOwnProperty(e))return r[e];var o=hd(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[a];return e&&(r[e]=u),i.colorIdx=(a+1)%l.length,u}}},pd=fd,gd={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"},md=Fe.createHashMap,vd=Fe.isTypedArray,yd=Go.enableClassCheck,_d=gd.SOURCE_FORMAT_ORIGINAL,xd=gd.SERIES_LAYOUT_BY_COLUMN,bd=gd.SOURCE_FORMAT_UNKNOWN,wd=gd.SOURCE_FORMAT_TYPED_ARRAY,Sd=gd.SOURCE_FORMAT_KEYED_COLUMNS;function Md(e){this.fromDataset=e.fromDataset,this.data=e.data||(e.sourceFormat===Sd?{}:[]),this.sourceFormat=e.sourceFormat||bd,this.seriesLayoutBy=e.seriesLayoutBy||xd,this.dimensionsDefine=e.dimensionsDefine,this.encodeDefine=e.encodeDefine&&md(e.encodeDefine),this.startIndex=e.startIndex||0,this.dimensionsDetectCount=e.dimensionsDetectCount}Md.seriesDataToSource=function(e){return new Md({data:e,sourceFormat:vd(e)?wd:_d,fromDataset:!1})},yd(Md);var Td=Md,Id=Po.makeInner,Ad=Po.getDataItemValue,Dd=Fe.createHashMap,Cd=Fe.each,Od=Fe.map,kd=Fe.isArray,Ld=Fe.isString,Ed=Fe.isObject,Nd=Fe.isTypedArray,Pd=Fe.isArrayLike,Rd=Fe.extend,zd=gd.SOURCE_FORMAT_ORIGINAL,Bd=gd.SOURCE_FORMAT_ARRAY_ROWS,Vd=gd.SOURCE_FORMAT_OBJECT_ROWS,Hd=gd.SOURCE_FORMAT_KEYED_COLUMNS,Yd=gd.SOURCE_FORMAT_UNKNOWN,Fd=gd.SOURCE_FORMAT_TYPED_ARRAY,Gd=gd.SERIES_LAYOUT_BY_ROW,Wd={Must:1,Might:2,Not:3},jd=Id();function Ud(e){if(e){var t=Dd();return Od(e,(function(e,n){if(null==(e=Rd({},Ed(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 Zd(e,t,n,i){if(null==i&&(i=1/0),t===Gd)for(var a=0;a<n.length&&a<i;a++)e(n[a]?n[a][0]:null,a);else{var r=n[0]||[];for(a=0;a<r.length&&a<i;a++)e(r[a],a)}}function Xd(e){var t=e.option;if(!t.data)return e.ecModel.getComponent("dataset",t.datasetIndex||0)}function qd(e,t,n,i,a,r){var o,s,l;if(Nd(e))return Wd.Not;if(i){var u=i[r];Ed(u)?(s=u.name,l=u.type):Ld(u)&&(s=u)}if(null!=l)return"ordinal"===l?Wd.Must:Wd.Not;if(t===Bd)if(n===Gd){for(var c=e[r],h=0;h<(c||[]).length&&h<5;h++)if(null!=(o=g(c[a+h])))return o}else for(h=0;h<e.length&&h<5;h++){var d=e[a+h];if(d&&null!=(o=g(d[r])))return o}else if(t===Vd){if(!s)return Wd.Not;for(h=0;h<e.length&&h<5;h++){if((f=e[h])&&null!=(o=g(f[s])))return o}}else if(t===Hd){if(!s)return Wd.Not;if(!(c=e[s])||Nd(c))return Wd.Not;for(h=0;h<c.length&&h<5;h++)if(null!=(o=g(c[h])))return o}else if(t===zd)for(h=0;h<e.length&&h<5;h++){var f=e[h],p=Ad(f);if(!kd(p))return Wd.Not;if(null!=(o=g(p[r])))return o}function g(e){var t=Ld(e);return null!=e&&isFinite(e)&&""!==e?t?Wd.Might:Wd.Not:t&&"-"!==e?Wd.Must:void 0}return Wd.Not}var Kd=function(e){var t=e.option.source,n=Yd;if(Nd(t))n=Fd;else if(kd(t)){0===t.length&&(n=Bd);for(var i=0,a=t.length;i<a;i++){var r=t[i];if(null!=r){if(kd(r)){n=Bd;break}if(Ed(r)){n=Vd;break}}}}else if(Ed(t)){for(var o in t)if(t.hasOwnProperty(o)&&Pd(t[o])){n=Hd;break}}else if(null!=t)throw new Error("Invalid data");jd(e).sourceFormat=n},$d=function(e,t,n){var i={},a=Xd(t);if(!a||!e)return i;var r,o,s=[],l=[],u=t.ecModel,c=jd(u).datasetMap,h=a.uid+"_"+n.seriesLayoutBy;e=e.slice(),Cd(e,(function(t,n){!Ed(t)&&(e[n]={name:t}),"ordinal"===t.type&&null==r&&(r=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 Cd(e,(function(e,t){var n=e.name,a=p(e);if(null==r){var o=d.valueWayDim;f(i[n],o,a),f(l,o,a),d.valueWayDim+=a}else if(r===t)f(i[n],0,a),f(s,0,a);else{o=d.categoryWayDim;f(i[n],o,a),f(l,o,a),d.categoryWayDim+=a}})),s.length&&(i.itemName=s),l.length&&(i.seriesName=l),i},Qd=function(e,t,n){var i={};if(!Xd(e))return i;var a,r=t.sourceFormat,o=t.dimensionsDefine;r!==Vd&&r!==Hd||Cd(o,(function(e,t){"name"===(Ed(e)?e.name:e)&&(a=t)}));var s=function(){for(var e={},i={},s=[],l=0,u=Math.min(5,n);l<u;l++){var c=qd(t.data,r,t.seriesLayoutBy,o,t.startIndex,l);s.push(c);var h=c===Wd.Not;if(h&&null==e.v&&l!==a&&(e.v=l),(null==e.n||e.n===e.v||!h&&s[e.n]===Wd.Not)&&(e.n=l),d(e)&&s[e.n]!==Wd.Not)return e;h||(c===Wd.Might&&null==i.v&&l!==a&&(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!=a?a:s.n;i.itemName=[l],i.seriesName=[l]}return i},Jd={BE_ORDINAL:Wd,detectSourceFormat:Kd,getSource:function(e){return jd(e).source},resetSourceDefaulter:function(e){jd(e).datasetMap=Dd()},prepareSource:function(e){var t=e.option,n=t.data,i=Nd(n)?Fd:zd,a=!1,r=t.seriesLayoutBy,o=t.sourceHeader,s=t.dimensions,l=Xd(e);if(l){var u=l.option;n=u.source,i=jd(l).sourceFormat,a=!0,r=r||u.seriesLayoutBy,null==o&&(o=u.sourceHeader),s=s||u.dimensions}var c=function(e,t,n,i,a){if(!e)return{dimensionsDefine:Ud(a)};var r,o;if(t===Bd)"auto"===i||null==i?Zd((function(e){null!=e&&"-"!==e&&(Ld(e)?null==o&&(o=1):o=0)}),n,e,10):o=i?1:0,a||1!==o||(a=[],Zd((function(e,t){a[t]=null!=e?e:""}),n,e)),r=a?a.length:n===Gd?e.length:e[0]?e[0].length:null;else if(t===Vd)a||(a=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t){var i=[];return Cd(t,(function(e,t){i.push(t)})),i}}(e));else if(t===Hd)a||(a=[],Cd(e,(function(e,t){a.push(t)})));else if(t===zd){var s=Ad(e[0]);r=kd(s)&&s.length||1}return{startIndex:o,dimensionsDefine:Ud(a),dimensionsDetectCount:r}}(n,i,r,o,s);jd(e).source=new Td({data:n,fromDataset:a,seriesLayoutBy:r,sourceFormat:i,dimensionsDefine:c.dimensionsDefine,startIndex:c.startIndex,dimensionsDetectCount:c.dimensionsDetectCount,encodeDefine:t.encode})},makeSeriesEncodeForAxisCoordSys:$d,makeSeriesEncodeForNameBased:Qd,guessOrdinal:function(e,t){return qd(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}},ef=Fe.each,tf=Fe.filter,nf=Fe.map,af=Fe.isArray,rf=Fe.indexOf,of=Fe.isObject,sf=Fe.isString,lf=Fe.createHashMap,uf=Fe.assert,cf=Fe.clone,hf=Fe.merge,df=Fe.extend,ff=Fe.mixin,pf=Jd.resetSourceDefaulter,gf="\0_ec_inner",mf=ph.extend({init:function(e,t,n,i){n=n||{},this.option=null,this._theme=new ph(n),this._optionManager=i},setOption:function(e,t){uf(!(gf 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)):vf.call(this,i),t=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var a=n.getTimelineOption(this);a&&(this.mergeOption(a),t=!0)}if(!e||"recreate"===e||"media"===e){var r=n.getMediaOption(this,this._api);r.length&&ef(r,(function(e){this.mergeOption(e,t=!0)}),this)}return t},mergeOption:function(e){var t=this.option,n=this._componentsMap,i=[];pf(this),ef(e,(function(e,n){null!=e&&(sd.hasClass(n)?n&&i.push(n):t[n]=null==t[n]?cf(e):hf(t[n],e,!0))})),sd.topologicalTravel(i,sd.getAllClassMainTypes(),(function(i,a){var r=Po.normalizeToArray(e[i]),o=Po.mappingToExists(n.get(i),r);Po.makeIdAndName(o),ef(o,(function(e,t){var n=e.option;of(n)&&(e.keyInfo.mainType=i,e.keyInfo.subType=function(e,t,n){var i=t.type?t.type:n?n.subType:sd.determineSubType(e,t);return i}(i,n,e.exist))}));var s=function(e,t){af(t)||(t=t?[t]:[]);var n={};return ef(t,(function(t){n[t]=(e.get(t)||[]).slice()})),n}(n,a);t[i]=[],n.set(i,[]),ef(o,(function(e,a){var r=e.exist,o=e.option;if(uf(of(o)||r,"Empty component definition"),o){var l=sd.getClass(i,e.keyInfo.subType,!0);if(r&&r.constructor===l)r.name=e.keyInfo.name,r.mergeOption(o,this),r.optionUpdated(o,!1);else{var u=df({dependentModels:s,componentIndex:a},e.keyInfo);r=new l(o,this,this,u),df(r,u),r.init(o,this,this,u),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);n.get(i)[a]=r,t[i][a]=r.option}),this),"series"===i&&yf(this,n.get("series"))}),this),this._seriesIndicesMap=lf(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var e=cf(this.option);return ef(e,(function(t,n){if(sd.hasClass(n)){for(var i=(t=Po.normalizeToArray(t)).length-1;i>=0;i--)Po.isIdInner(t[i])&&t.splice(i,1);e[n]=t}})),delete e[gf],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,a=e.id,r=e.name,o=this._componentsMap.get(t);if(!o||!o.length)return[];if(null!=i)af(i)||(i=[i]),n=tf(nf(i,(function(e){return o[e]})),(function(e){return!!e}));else if(null!=a){var s=af(a);n=tf(o,(function(e){return s&&rf(a,e.id)>=0||!s&&e.id===a}))}else if(null!=r){var l=af(r);n=tf(o,(function(e){return l&&rf(r,e.name)>=0||!l&&e.name===r}))}else n=o.slice();return _f(n,e)},findComponents:function(e){var t,n,i,a,r,o=e.query,s=e.mainType,l=(n=s+"Index",i=s+"Id",a=s+"Name",!(t=o)||null==t[n]&&null==t[i]&&null==t[a]?null:{mainType:s,index:t[n],id:t[i],name:t[a]}),u=l?this.queryComponents(l):this._componentsMap.get(s);return r=_f(u,e),e.filter?tf(r,e.filter):r},eachComponent:function(e,t,n){var i=this._componentsMap;if("function"==typeof e)n=t,t=e,i.each((function(e,i){ef(e,(function(e,a){t.call(n,i,e,a)}))}));else if(sf(e))ef(i.get(e),t,n);else if(of(e)){var a=this.findComponents(e);ef(a,t,n)}},getSeriesByName:function(e){var t=this._componentsMap.get("series");return tf(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 tf(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){ef(this._seriesIndices,(function(n){var i=this._componentsMap.get("series")[n];e.call(t,i,n)}),this)},eachRawSeries:function(e,t){ef(this._componentsMap.get("series"),e,t)},eachSeriesByType:function(e,t,n){ef(this._seriesIndices,(function(i){var a=this._componentsMap.get("series")[i];a.subType===e&&t.call(n,a,i)}),this)},eachRawSeriesByType:function(e,t,n){return ef(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){yf(this,tf(this._componentsMap.get("series"),e,t))},restoreData:function(e){var t=this._componentsMap;yf(this,t.get("series"));var n=[];t.each((function(e,t){n.push(t)})),sd.topologicalTravel(n,sd.getAllClassMainTypes(),(function(n,i){ef(t.get(n),(function(t){("series"!==n||!function(e,t){if(t){var n=t.seiresIndex,i=t.seriesId,a=t.seriesName;return null!=n&&e.componentIndex!==n||null!=i&&e.id!==i||null!=a&&e.name!==a}}(t,e))&&t.restoreData()}))}))}});function vf(e){this.option={},this.option[gf]=1,this._componentsMap=lf({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(e,t){var n=e.color&&!e.colorLayer;ef(t,(function(t,i){"colorLayer"===i&&n||sd.hasClass(i)||("object"==typeof t?e[i]=e[i]?hf(e[i],t,!1):cf(t):null==e[i]&&(e[i]=t))}))}(e,this._theme.option),hf(e,ud,!1),this.mergeOption(e)}function yf(e,t){e._seriesIndicesMap=lf(e._seriesIndices=nf(t,(function(e){return e.componentIndex}))||[])}function _f(e,t){return t.hasOwnProperty("subType")?tf(e,(function(e){return e.subType===t.subType})):e}ff(mf,pd);var xf=mf,bf=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var wf=function(e){Fe.each(bf,(function(t){this[t]=Fe.bind(e[t],e)}),this)},Sf={};function Mf(){this._coordinateSystems=[]}Mf.prototype={constructor:Mf,create:function(e,t){var n=[];Fe.each(Sf,(function(i,a){var r=i.create(e,t);n=n.concat(r||[])})),this._coordinateSystems=n},update:function(e,t){Fe.each(this._coordinateSystems,(function(n){n.update&&n.update(e,t)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Mf.register=function(e,t){Sf[e]=t},Mf.get=function(e){return Sf[e]};var Tf=Mf,If=Fe.each,Af=Fe.clone,Df=Fe.map,Cf=Fe.merge,Of=/^(min|max)?(.+)$/;function kf(e){this._api=e,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Lf(e,t,n){var i,a,r=[],o=[],s=e.timeline;if(e.baseOption&&(a=e.baseOption),(s||e.options)&&(a=a||{},r=(e.options||[]).slice()),e.media){a=a||{};var l=e.media;If(l,(function(e){e&&e.option&&(e.query?o.push(e):i||(i=e))}))}return a||(a=e),a.timeline||(a.timeline=s),If([a].concat(r).concat(Fe.map(o,(function(e){return e.option}))),(function(e){If(t,(function(t){t(e,n)}))})),{baseOption:a,timelineOptions:r,mediaDefault:i,mediaList:o}}function Ef(e,t,n){var i={width:t,height:n,aspectratio:t/n},a=!0;return Fe.each(e,(function(e,t){var n=t.match(Of);if(n&&n[1]&&n[2]){var r=n[1],o=n[2].toLowerCase();(function(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t})(i[o],e,r)||(a=!1)}})),a}kf.prototype={constructor:kf,setOption:function(e,t){e&&Fe.each(Po.normalizeToArray(e.series),(function(e){e&&e.data&&Fe.isTypedArray(e.data)&&Fe.setAsPrimitive(e.data)})),e=Af(e);var n,i,a=this._optionBackup,r=Lf.call(this,e,t,!a);this._newBaseOption=r.baseOption,a?(n=a.baseOption,i=r.baseOption,If(i=i||{},(function(e,t){if(null!=e){var i=n[t];if(sd.hasClass(t)){e=Po.normalizeToArray(e),i=Po.normalizeToArray(i);var a=Po.mappingToExists(i,e);n[t]=Df(a,(function(e){return e.option&&e.exist?Cf(e.exist,e.option,!0):e.exist||e.option}))}else n[t]=Cf(i,e,!0)}})),r.timelineOptions.length&&(a.timelineOptions=r.timelineOptions),r.mediaList.length&&(a.mediaList=r.mediaList),r.mediaDefault&&(a.mediaDefault=r.mediaDefault)):this._optionBackup=r},mountOption:function(e){var t=this._optionBackup;return this._timelineOptions=Df(t.timelineOptions,Af),this._mediaList=Df(t.mediaList,Af),this._mediaDefault=Af(t.mediaDefault),this._currentMediaIndices=[],Af(e?t.baseOption:this._newBaseOption)},getTimelineOption:function(e){var t,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(t=Af(n[i.getCurrentIndex()],!0))}return t},getMediaOption:function(e){var t,n,i=this._api.getWidth(),a=this._api.getHeight(),r=this._mediaList,o=this._mediaDefault,s=[],l=[];if(!r.length&&!o)return l;for(var u=0,c=r.length;u<c;u++)Ef(r[u].query,i,a)&&s.push(u);return!s.length&&o&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=Df(s,(function(e){return Af(-1===e?o.option:r[e].option)}))),this._currentMediaIndices=s,l}};var Nf=kf,Pf=Fe.each,Rf=Fe.isObject,zf=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Bf(e){var t=e&&e.itemStyle;if(t)for(var n=0,i=zf.length;n<i;n++){var a=zf[n],r=t.normal,o=t.emphasis;r&&r[a]&&(e[a]=e[a]||{},e[a].normal?Fe.merge(e[a].normal,r[a]):e[a].normal=r[a],r[a]=null),o&&o[a]&&(e[a]=e[a]||{},e[a].emphasis?Fe.merge(e[a].emphasis,o[a]):e[a].emphasis=o[a],o[a]=null)}}function Vf(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var i=e[t].normal,a=e[t].emphasis;i&&(n?(e[t].normal=e[t].emphasis=null,Fe.defaults(e[t],i)):e[t]=i),a&&(e.emphasis=e.emphasis||{},e.emphasis[t]=a)}}function Hf(e){Vf(e,"itemStyle"),Vf(e,"lineStyle"),Vf(e,"areaStyle"),Vf(e,"label"),Vf(e,"labelLine"),Vf(e,"upperLabel"),Vf(e,"edgeLabel")}function Yf(e,t){var n=Rf(e)&&e[t],i=Rf(n)&&n.textStyle;if(i)for(var a=0,r=Po.TEXT_STYLE_OPTIONS.length;a<r;a++){t=Po.TEXT_STYLE_OPTIONS[a];i.hasOwnProperty(t)&&(n[t]=i[t])}}function Ff(e){e&&(Hf(e),Yf(e,"label"),e.emphasis&&Yf(e.emphasis,"label"))}function Gf(e){return Fe.isArray(e)?e:e?[e]:[]}function Wf(e){return(Fe.isArray(e)?e[0]:e)||{}}var jf=function(e,t){Pf(Gf(e.series),(function(e){Rf(e)&&function(e){if(Rf(e)){Bf(e),Hf(e),Yf(e,"label"),Yf(e,"upperLabel"),Yf(e,"edgeLabel"),e.emphasis&&(Yf(e.emphasis,"label"),Yf(e.emphasis,"upperLabel"),Yf(e.emphasis,"edgeLabel")),(n=e.markPoint)&&(Bf(n),Ff(n)),(i=e.markLine)&&(Bf(i),Ff(i));var t=e.markArea;t&&Ff(t);var n,i,a=e.data;if("graph"===e.type){a=a||e.nodes;var r=e.links||e.edges;if(r&&!Fe.isTypedArray(r))for(var o=0;o<r.length;o++)Ff(r[o]);Fe.each(e.categories,(function(e){Hf(e)}))}if(a&&!Fe.isTypedArray(a))for(o=0;o<a.length;o++)Ff(a[o]);if((n=e.markPoint)&&n.data){var s=n.data;for(o=0;o<s.length;o++)Ff(s[o])}if((i=e.markLine)&&i.data){var l=i.data;for(o=0;o<l.length;o++)Fe.isArray(l[o])?(Ff(l[o][0]),Ff(l[o][1])):Ff(l[o])}"gauge"===e.type?(Yf(e,"axisLabel"),Yf(e,"title"),Yf(e,"detail")):"treemap"===e.type?(Vf(e.breadcrumb,"itemStyle"),Fe.each(e.levels,(function(e){Hf(e)}))):"tree"===e.type&&Hf(e.leaves)}}(e)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Pf(n,(function(t){Pf(Gf(e[t]),(function(e){e&&(Yf(e,"axisLabel"),Yf(e.axisPointer,"label"))}))})),Pf(Gf(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;Yf(t,"axisLabel"),Yf(t&&t.axisPointer,"label")})),Pf(Gf(e.calendar),(function(e){Vf(e,"itemStyle"),Yf(e,"dayLabel"),Yf(e,"monthLabel"),Yf(e,"yearLabel")})),Pf(Gf(e.radar),(function(e){Yf(e,"name")})),Pf(Gf(e.geo),(function(e){Rf(e)&&(Ff(e),Pf(Gf(e.regions),(function(e){Ff(e)})))})),Pf(Gf(e.timeline),(function(e){Ff(e),Vf(e,"label"),Vf(e,"itemStyle"),Vf(e,"controlStyle",!0);var t=e.data;Fe.isArray(t)&&Fe.each(t,(function(e){Fe.isObject(e)&&(Vf(e,"label"),Vf(e,"itemStyle"))}))})),Pf(Gf(e.toolbox),(function(e){Vf(e,"iconStyle"),Pf(e.feature,(function(e){Vf(e,"iconStyle")}))})),Yf(Wf(e.axisPointer),"label"),Yf(Wf(e.tooltip).axisPointer,"label")},Uf=Fe.each,Zf=Fe.isArray,Xf=Fe.isObject,qf=Po.normalizeToArray;function Kf(e){Uf($f,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var $f=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Qf=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];var Jf=function(e,t){jf(e,t),e.series=qf(e.series),Uf(e.series,(function(e){if(Xf(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 a,r=e,o=0;o<t.length-1;o++)null==r[a=t[o]]&&(r[a]={}),r=r[a];(i||null==r[t[o]])&&(r[t[o]]=n)}(e,"itemStyle.color",n)}Kf(e)}})),e.dataRange&&(e.visualMap=e.dataRange),Uf(Qf,(function(t){var n=e[t];n&&(Zf(n)||(n=[n]),Uf(n,(function(e){Kf(e)})))}))},ep=Fe.createHashMap,tp=Fe.each;function np(e){tp(e,(function(t,n){var i=[],a=[NaN,NaN],r=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=o.map(r,(function(r,l,u){var c,h,d=o.get(t.stackedDimension,u);if(isNaN(d))return a;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 ip=function(e){var t=ep();e.eachSeries((function(e){var n=e.get("stack");if(n){var i=t.get(n)||t.set(n,[]),a=e.getData(),r={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:e};if(!r.stackedDimension||!r.isStackedByIndex&&!r.stackedByDimension)return;i.length&&a.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(r)}})),t.each(np)},ap=Fe.extend,rp=Fe.each,op=Fe.isObject,sp=Po.getDataItemValue,lp=Po.isDataItemOption,up=Ch.parseDate,cp=gd.SOURCE_FORMAT_TYPED_ARRAY,hp=gd.SOURCE_FORMAT_ARRAY_ROWS,dp=gd.SOURCE_FORMAT_ORIGINAL,fp=gd.SOURCE_FORMAT_OBJECT_ROWS;function pp(e,t){Td.isInstance(e)||(e=Td.seriesDataToSource(e)),this._source=e;var n=this._data=e.data,i=e.sourceFormat;i===cp&&(this._offset=0,this._dimSize=t,this._data=n);var a=mp[i===hp?i+"_"+e.seriesLayoutBy:i];ap(this,a)}var gp=pp.prototype;gp.pure=!1,gp.persistent=!0,gp.getSource=function(){return this._source};var mp={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:_p},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 a=n[i];t.push(a?a[e]:null)}return t},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:vp,getItem:yp,appendData:_p},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 a=this._data[n[i].name];t.push(a?a[e]:null)}return t},appendData:function(e){var t=this._data;rp(e,(function(e,n){for(var i=t[n]||(t[n]=[]),a=0;a<(e||[]).length;a++)i.push(e[a])}))}},original:{count:vp,getItem:yp,appendData:_p},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 vp(){return this._data.length}function yp(e){return this._data[e]}function _p(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}var xp={arrayRows:bp,objectRows:function(e,t,n,i){return null!=n?e[i]:e},keyedColumns:bp,original:function(e,t,n,i){var a=sp(e);return null!=n&&a instanceof Array?a[n]:a},typedArray:bp};function bp(e,t,n,i){return null!=n?e[n]:e}function wp(e,t,n,i){return Sp(e[i],this._dimensionInfos[t])}function Sp(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=+up(e)),null==e||""===e?NaN:+e}var Mp=function(e,t,n){if(e){var i=e.getProvider().getSource().sourceFormat;if(i===dp||i===fp){var a=e.getRawDataItem(t);return i!==dp||op(a)||(a=null),a?a[n]:void 0}}},Tp={DefaultDataProvider:pp,defaultDimValueGetters:{arrayRows:wp,objectRows:function(e,t,n,i){return Sp(e[t],this._dimensionInfos[t])},keyedColumns:wp,original:function(e,t,n,i){var a=e&&(null==e.value?e:e.value);return!this._rawData.pure&&lp(e)&&(this.hasItemOption=!0),Sp(a instanceof Array?a[i]:a,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 a,r,o=e.getProvider().getSource().sourceFormat,s=e.getDimensionInfo(n);return s&&(a=s.name,r=s.index),xp[o](i,t,r,a)}}},retrieveRawAttr:Mp},Ip=Tp.retrieveRawValue,Ap=Fh.getTooltipMarker,Dp=Fh.formatTpl,Cp=Po.getTooltipRenderMode,Op=/\{@(.+?)\}/g,kp={getDataParams:function(e,t){var n=this.getData(t),i=this.getRawValue(e,t),a=n.getRawIndex(e),r=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=Cp(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:r,dataIndex:a,data:o,dataType:t,value:i,color:s,borderColor:l,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,marker:Ap({color:s,renderMode:h}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(e,t,n,i,a){t=t||"normal";var r=this.getData(n),o=r.getItemModel(e),s=this.getDataParams(e,n);null!=i&&s.value instanceof Array&&(s.value=s.value[i]);var l=o.get("normal"===t?[a||"label","formatter"]:[t,a||"label","formatter"]);return"function"==typeof l?(s.status=t,s.dimensionIndex=i,l(s)):"string"==typeof l?Dp(l,s).replace(Op,(function(t,n){var i=n.length;return"["===n.charAt(0)&&"]"===n.charAt(i-1)&&(n=+n.slice(1,i-1)),Ip(r,e,n)})):void 0},getRawValue:function(e,t){return Ip(this.getData(t),e)},formatTooltip:function(){}},Lp=kp,Ep=Fe.isArray;function Np(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 Pp=Np.prototype;Pp.perform=function(e){var t,n=this._upstream,i=e&&e.skip;if(this._dirty&&n){var a=this.context;a.data=a.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(t=this._plan(this.context));var r,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,r=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),Ep(n)&&!n.length&&(n=null));e._progress=n,e._modBy=e._modDataCount=null;var a=e._downstream;return a&&a.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&&(r||d<f)){var p=this._progress;if(Ep(p))for(var g=0;g<p.length;g++)zp(this,p[g],d,f,l,u);else zp(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 Rp=function(){var e,t,n,i,a,r={reset:function(l,u,c,h){t=l,e=u,n=c,i=h,a=Math.ceil(i/n),r.next=n>1&&i>0?s:o}};return r;function o(){return t<e?t++:null}function s(){var r=t%a*n+Math.ceil(t/a),o=t>=e?null:r<i?r:t;return t++,o}}();function zp(e,t,n,i,a,r){Rp.reset(n,i,a,r),e._callingProgress=t,e._callingProgress({start:n,end:i,count:i-n,next:Rp.next},e.context)}Pp.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Pp.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Pp.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},Pp.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Pp.getUpstream=function(){return this._upstream},Pp.getDownstream=function(){return this._downstream},Pp.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e};var Bp={createTask:function(e){return new Np(e)}},Vp=Fh.formatTime,Hp=Fh.encodeHTML,Yp=Fh.addCommas,Fp=Fh.getTooltipMarker,Gp=td.getLayoutParams,Wp=td.mergeLayoutParam,jp=Bp.createTask,Up=Jd.prepareSource,Zp=Jd.getSource,Xp=Tp.retrieveRawValue,qp=Po.makeInner(),Kp=sd.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=jp({count:Qp,reset:Jp}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),Up(this);var a=this.getInitialData(e,n);tg(a,this),this.dataTask.context.data=a,qp(this).dataBeforeProcessed=a,$p(this)},mergeDefaultAndTheme:function(e,t){var n=this.layoutMode,i=n?Gp(e):{},a=this.subType;sd.hasClass(a)&&(a+="Series"),Fe.merge(e,t.getTheme().get(this.subType)),Fe.merge(e,this.getDefaultOption()),Po.defaultEmphasis(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Wp(e,i,n)},mergeOption:function(e,t){e=Fe.merge(this.option,e,!0),this.fillDataTextStyle(e.data);var n=this.layoutMode;n&&Wp(this.option,e,n),Up(this);var i=this.getInitialData(e,t);tg(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,qp(this).dataBeforeProcessed=i,$p(this)},fillDataTextStyle:function(e){if(e&&!Fe.isTypedArray(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&Po.defaultEmphasis(e[n],"label",t)},getInitialData:function(){},appendData:function(e){this.getRawData().appendData(e.data)},getData:function(e){var t=ig(this);if(t){var n=t.context.data;return null==e?n:n.getLinkedData(e)}return qp(this).data},setData:function(e){var t=ig(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)}qp(this).data=e},getSource:function(){return Zp(this)},getRawData:function(){return qp(this).dataBeforeProcessed},getBaseAxis:function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},formatTooltip:function(e,t,n,i){var a=this,r="html"===(i=i||"html")?"<br/>":"\n",o="richText"===i,s={},l=0;function u(e){return{renderMode:i,content:Hp(Yp(e)),style:s}}var c=this.getData(),h=c.mapDimension("defaultedTooltip",!0),d=h.length,f=this.getRawValue(e),p=Fe.isArray(f),g=c.getItemVisual(e,"color");Fe.isObject(g)&&g.colorStops&&(g=(g.colorStops[0]||{}).color),g=g||"transparent";var m=d>1||p&&!d?function(n){var r=Fe.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"+a.seriesIndex+"at"+l,p=Fp({color:g,type:"subItem",renderMode:i,markerId:f}),m="string"==typeof p?p:p.content,v=(r?m+Hp(h.displayName||"-")+": ":"")+Hp("ordinal"===d?e+"":"time"===d?t?"":Vp("yyyy/MM/dd hh:mm:ss",e):Yp(e));v&&u.push(v),o&&(s[f]=g,++l)}}h.length?Fe.each(h,(function(t){d(Xp(c,e,t),t)})):Fe.each(n,d);var f=r?o?"\n":"<br/>":"",p=f+u.join(f||", ");return{renderMode:i,content:p,style:s}}(f):u(d?Xp(c,e,h[0]):p?f[0]:f),v=m.content,y=a.seriesIndex+"at"+l,_=Fp({color:g,type:"item",renderMode:i,markerId:y});s[y]=g,++l;var x=c.getName(e),b=this.name;Po.isNameSpecified(this)||(b=""),b=b?Hp(b)+(t?": ":r):"";var w="string"==typeof _?_:_.content;return{html:t?w+b+v:b+w+(x?Hp(x)+": "+v:v),markers:s}},isAnimationEnabled:function(){if(re.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,a=pd.getColorFromPalette.call(this,e,t,n);return a||(a=i.getColorFromPalette(e,t,n)),a},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 $p(e){var t=e.name;Po.isNameSpecified(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimension("seriesName",!0),i=[];return Fe.each(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&i.push(n.displayName)})),i.join(" ")}(e)||t)}function Qp(e){return e.model.getRawData().count()}function Jp(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),eg}function eg(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function tg(e,t){Fe.each(e.CHANGABLE_METHODS,(function(n){e.wrapMethod(n,Fe.curry(ng,t))}))}function ng(e){var t=ig(e);t&&t.setOutputEnd(this.count())}function ig(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var i=n.currentTask;if(i){var a=i.agentStubMap;a&&(i=a.get(e.uid))}return i}}Fe.mixin(Kp,Lp),Fe.mixin(Kp,pd);var ag=Kp,rg=function(){this.group=new Ri,this.uid=vh.getUID("viewComponent")},og=rg.prototype={constructor:rg,init:function(e,t){},render:function(e,t,n,i){},dispose:function(){},filterForExposedEvent:null};og.updateView=og.updateLayout=og.updateVisual=function(e,t,n,i){},Go.enableClassExtend(rg),Go.enableClassManagement(rg,{registerWhenExtend:!0});var sg=rg,lg=Po.makeInner;var ug=function(){var e=lg();return function(t){var n=e(t),i=t.pipelineContext,a=n.large,r=n.progressiveRender,o=n.large=i&&i.large,s=n.progressiveRender=i&&i.progressiveRender;return!!(a^o||r^s)&&"reset"}},cg=Fe.each,hg=Bp.createTask,dg=Po.makeInner(),fg=ug();function pg(){this.group=new Ri,this.uid=vh.getUID("viewChart"),this.renderTask=hg({plan:yg,reset:_g}),this.renderTask.context={view:this}}pg.prototype={type:"chart",init:function(e,t){},render:function(e,t,n,i){},highlight:function(e,t,n,i){vg(e.getData(),i,"emphasis")},downplay:function(e,t,n,i){vg(e.getData(),i,"normal")},remove:function(e,t){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var gg=pg.prototype;function mg(e,t,n){if(e&&(e.trigger(t,n),e.isGroup&&!Jc.isHighDownDispatcher(e)))for(var i=0,a=e.childCount();i<a;i++)mg(e.childAt(i),t,n)}function vg(e,t,n){var i=Po.queryDataIndex(e,t),a=t&&null!=t.highlightKey?Jc.getHighlightDigit(t.highlightKey):null;null!=i?cg(Po.normalizeToArray(i),(function(t){mg(e.getItemGraphicEl(t),n,a)})):e.eachItemGraphicEl((function(e){mg(e,n,a)}))}function yg(e){return fg(e.model)}function _g(e){var t=e.model,n=e.ecModel,i=e.api,a=e.payload,r=t.pipelineContext.progressiveRender,o=e.view,s=a&&dg(a).updateMethod,l=r?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](t,n,i,a),xg[l]}gg.updateView=gg.updateLayout=gg.updateVisual=function(e,t,n,i){this.render(e,t,n,i)},Go.enableClassExtend(pg,["dispose"]),Go.enableClassManagement(pg,{registerWhenExtend:!0}),pg.markUpdateMethod=function(e,t){dg(e).updateMethod=t};var xg={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)}}},bg=pg,wg="\0__throttleOriginMethod",Sg="\0__throttleRate",Mg="\0__throttleType";function Tg(e,t,n){var i,a,r,o,s,l=0,u=0,c=null;function h(){u=(new Date).getTime(),c=null,e.apply(r,o||[])}t=t||0;var d=function(){i=(new Date).getTime(),r=this,o=arguments;var e=s||t,d=s||n;s=null,a=i-(d?l:u)-e,clearTimeout(c),d?c=setTimeout(h,e):a>=0?h():c=setTimeout(h,-a),l=i};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(e){s=e},d}var Ig={throttle:Tg,createOrUpdate:function(e,t,n,i){var a=e[t];if(a){var r=a[wg]||a,o=a[Mg];if(a[Sg]!==n||o!==i){if(null==n||!i)return e[t]=r;(a=e[t]=Tg(r,n,"debounce"===i))[wg]=r,a[Mg]=i,a[Sg]=n}return a}},clear:function(e,t){var n=e[t];n&&n[wg]&&(e[t]=n[wg])}},Ag=Fe.isFunction,Dg={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=(e.visualColorAccessPath||"itemStyle.color").split("."),a=e.get(i),r=!Ag(a)||a instanceof Nu?null:a;a&&!r||(a=e.getColorFromPalette(e.name,null,t.getSeriesCount())),n.setVisual("color",a);var o=(e.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=e.get(o);if(n.setVisual("borderColor",s),!t.isSeriesFiltered(e)){r&&n.each((function(t){n.setItemVisual(t,"color",r(e.getDataParams(t)))}));return{dataEach:n.hasItemOption?function(e,t){var n=e.getItemModel(t),a=n.get(i,!0),r=n.get(o,!0);null!=a&&e.setItemVisual(t,"color",a),null!=r&&e.setItemVisual(t,"borderColor",r)}:null}}}},Cg=Dg,Og={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:""}}}},kg=Tp.retrieveRawValue;var Lg=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 a,r=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}();a=l?c(h("general.withTitle"),{title:l}):h("general.withoutTitle");var u=[];a+=c(h(i>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:i}),t.eachSeries((function(e,t){if(t<s){var n,a=e.get("name"),o="series."+(i>1?"multiple":"single")+".";n=c(n=h(a?o+"withName":o+"withoutName"),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(m=e.subType,Og.series.typeNames[m]||"自定义图")});var l=e.getData();window.data=l,l.count()>r?n+=c(h("data.partialData"),{displayCnt:r}):n+=h("data.allData");for(var d=[],f=0;f<l.count();f++)if(f<r){var p=l.getName(f),g=kg(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})),a+=u.join(h("series.multiple.separator.middle"))+h("series.multiple.separator.end"),e.setAttribute("aria-label",a)}}function c(e,t){if("string"!=typeof e)return e;var n=e;return Fe.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("."),a=Og.aria,r=0;r<i.length;++r)a=a[i[r]];return a}return t}},Eg=Math.PI;var Ng=function(e,t){t=t||{},Fe.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 Jc.Group,i=new Jc.Rect({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(i);var a=t.fontSize+" sans-serif",r=new Jc.Rect({style:{fill:"none",text:t.text,font:a,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});if(n.add(r),t.showSpinner){var o=new Jc.Arc({shape:{startAngle:-Eg/2,endAngle:-Eg/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*Eg/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*Eg/2}).delay(300).start("circularInOut"),n.add(o)}return n.resize=function(){var n=Ga.getWidth(t.text,a),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}),r.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},Pg=Fe.each,Rg=Fe.map,zg=Fe.isFunction,Bg=Fe.createHashMap,Vg=Fe.noop,Hg=Bp.createTask,Yg=vh.getUID,Fg=Po.normalizeToArray;function Gg(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=Bg()}var Wg=Gg.prototype;function jg(e,t,n,i,a){var r;function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}a=a||{},Pg(t,(function(t,s){if(!a.visualType||a.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(a,e)&&(e.dirty(),h=!0)})),h&&c.dirty(),Ug(c,i);var f=e.getPerformArgs(c,a.block);d.each((function(e){e.perform(f)})),r|=c.perform(f)}else u&&u.each((function(s,l){o(a,s)&&s.dirty();var u=e.getPerformArgs(s,a.block);u.skip=!t.performRawSeries&&n.isSeriesFiltered(s.context.model),Ug(s,i),r|=s.perform(u)}))}})),e.unfinished|=r}Wg.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},Wg.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,r=i&&i.modDataCount;return{step:a,modBy:null!=r?Math.ceil(r/a):null,modDataCount:r}}},Wg.getPipeline=function(e){return this._pipelineMap.get(e)},Wg.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),i=e.getData().count(),a=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,r=e.get("large")&&i>=e.get("largeThreshold"),o="mod"===e.get("progressiveChunkMode")?i:null;e.pipelineContext=n.context={progressiveRender:a,modDataCount:o,large:r}},Wg.restorePipelines=function(e){var t=this,n=t._pipelineMap=Bg();e.eachSeries((function(e){var i=e.getProgressive(),a=e.uid;n.set(a,{id:a,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:i&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),nm(t,e,e.dataTask)}))},Wg.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.ecInstance.getModel(),n=this.api;Pg(this._allHandlers,(function(i){var a=e.get(i.uid)||e.set(i.uid,[]);i.reset&&function(e,t,n,i,a){var r=n.seriesTaskMap||(n.seriesTaskMap=Bg()),o=t.seriesType,s=t.getTargetSeries;t.createOnAllSeries?i.eachRawSeries(l):o?i.eachRawSeriesByType(o,l):s&&s(i,a).each(l);function l(n){var o=n.uid,s=r.get(o)||r.set(o,Hg({plan:$g,reset:Qg,count:tm}));s.context={model:n,ecModel:i,api:a,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:e},nm(e,n,s)}var u=e._pipelineMap;r.each((function(e,t){u.get(t)||(e.dispose(),r.removeKey(t))}))}(this,i,a,t,n),i.overallReset&&function(e,t,n,i,a){var r=n.overallTask=n.overallTask||Hg({reset:Zg});r.context={ecModel:i,api:a,overallReset:t.overallReset,scheduler:e};var o=r.agentStubMap=r.agentStubMap||Bg(),s=t.seriesType,l=t.getTargetSeries,u=!0,c=t.modifyOutputEnd;s?i.eachRawSeriesByType(s,h):l?l(i,a).each(h):(u=!1,Pg(i.getSeries(),h));function h(t){var n=t.uid,i=o.get(n);i||(i=o.set(n,Hg({reset:Xg,onDirty:Kg})),r.dirty()),i.context={model:t,overallProgress:u,modifyOutputEnd:c},i.agent=r,i.__block=u,nm(e,t,i)}var d=e._pipelineMap;o.each((function(e,t){d.get(t)||(e.dispose(),r.dirty(),o.removeKey(t))}))}(this,i,a,t,n)}),this)},Wg.prepareView=function(e,t,n,i){var a=e.renderTask,r=a.context;r.model=t,r.ecModel=n,r.api=i,a.__block=!e.incrementalPrepareRender,nm(this,t,a)},Wg.performDataProcessorTasks=function(e,t){jg(this,this._dataProcessorHandlers,e,t,{block:!0})},Wg.performVisualTasks=function(e,t,n){jg(this,this._visualHandlers,e,t,n)},Wg.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t|=e.dataTask.perform()})),this.unfinished|=t},Wg.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 Ug=Wg.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)};function Zg(e){e.overallReset(e.ecModel,e.api,e.payload)}function Xg(e,t){return e.overallProgress&&qg}function qg(){this.agent.dirty(),this.getDownstream().dirty()}function Kg(){this.agent&&this.agent.dirty()}function $g(e){return e.plan&&e.plan(e.model,e.ecModel,e.api,e.payload)}function Qg(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Fg(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?Rg(t,(function(e,t){return em(t)})):Jg}var Jg=em(0);function em(e){return function(t,n){var i=n.data,a=n.resetDefines[e];if(a&&a.dataEach)for(var r=t.start;r<t.end;r++)a.dataEach(i,r);else a&&a.progress&&a.progress(t,i)}}function tm(e){return e.data.count()}function nm(e,t,n){var i=t.uid,a=e._pipelineMap.get(i);!a.head&&(a.head=n),a.tail&&a.tail.pipe(n),a.tail=n,n.__idxInPipeline=a.count++,n.__pipeline=a}function im(e){am=null;try{e(rm,om)}catch(e){}return am}Gg.wrapStageHandler=function(e,t){return zg(e)&&(e={overallReset:e,seriesType:im(e)}),e.uid=Yg("stageHandler"),t&&(e.visualType=t),e};var am,rm={},om={};function sm(e,t){for(var n in t.prototype)e[n]=Vg}sm(rm,xf),sm(om,wf),rm.eachSeriesByType=rm.eachRawSeriesByType=function(e){am=e},rm.eachComponent=function(e){"series"===e.mainType&&e.subType&&(am=e.subType)};var lm=Gg,um=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],cm={color:um,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],um]},hm="#eee",dm=function(){return{axisLine:{lineStyle:{color:hm}},axisTick:{lineStyle:{color:hm}},axisLabel:{textStyle:{color:hm}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:hm}}}},fm=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],pm={color:fm,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:hm},crossStyle:{color:hm},label:{color:"#000"}}},legend:{textStyle:{color:hm}},textStyle:{color:hm},title:{textStyle:{color:hm}},toolbox:{iconStyle:{normal:{borderColor:hm}}},dataZoom:{textStyle:{color:hm}},visualMap:{textStyle:{color:hm}},timeline:{lineStyle:{color:hm},itemStyle:{normal:{color:fm[1]}},label:{normal:{textStyle:{color:hm}}},controlStyle:{normal:{color:hm,borderColor:hm}}},timeAxis:dm(),logAxis:dm(),valueAxis:dm(),categoryAxis:dm(),line:{symbol:"circle"},graph:{color:fm},gauge:{title:{textStyle:{color:hm}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};pm.categoryAxis.splitLine.show=!1;var gm=pm,mm=Jd.detectSourceFormat,vm=gd.SERIES_LAYOUT_BY_COLUMN;sd.extend({type:"dataset",defaultOption:{seriesLayoutBy:vm,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){mm(this)}}),sg.extend({type:"dataset"});var ym=xl.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(e,t){var n=.5522848,i=t.cx,a=t.cy,r=t.rx,o=t.ry,s=r*n,l=o*n;e.moveTo(i-r,a),e.bezierCurveTo(i-r,a-l,i-s,a-o,i,a-o),e.bezierCurveTo(i+s,a-o,i+r,a-l,i+r,a),e.bezierCurveTo(i+r,a+l,i+s,a+o,i,a+o),e.bezierCurveTo(i-s,a+o,i-r,a+l,i-r,a),e.closePath()}}),_m=ym,xm=Vl.createFromString,bm=Fe.isString,wm=Fe.extend,Sm=Fe.defaults,Mm=Fe.trim,Tm=Fe.each,Im=/[\s,]+/;function Am(e){bm(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 Dm(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}Dm.prototype.parse=function(e,t){t=t||{};var n=Am(e);if(!n)throw new Error("Illegal svg");var i=new Ri;this._root=i;var a=n.getAttribute("viewBox")||"",r=parseFloat(n.getAttribute("width")||t.width),o=parseFloat(n.getAttribute("height")||t.height);isNaN(r)&&(r=null),isNaN(o)&&(o=null),Nm(n,i,null,!0);for(var s,l,u=n.firstChild;u;)this._parseNode(u,i),u=u.nextSibling;if(a){var c=Mm(a).split(Im);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!=r&&null!=o&&(l=Vm(s,r,o),!t.ignoreViewBox)){var h=i;(i=new Ri).add(h),h.scale=l.scale.slice(),h.position=l.position.slice()}return t.ignoreRootClip||null==r||null==o||i.setClipPath(new vu({shape:{x:0,y:0,width:r,height:o}})),{root:i,width:r,height:o,viewBoxRect:s,viewBoxTransform:l}},Dm.prototype._parseNode=function(e,t){var n,i,a=e.nodeName.toLowerCase();if("defs"===a?this._isDefine=!0:"text"===a&&(this._isText=!0),this._isDefine){if(i=Om[a]){var r=i.call(this,e),o=e.getAttribute("id");o&&(this._defs[o]=r)}}else(i=Cm[a])&&(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"===a?this._isDefine=!1:"text"===a&&(this._isText=!1)},Dm.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 a=new Fl({style:{text:e.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});km(t,a),Nm(e,a,this._defs);var r=a.style.fontSize;r&&r<9&&(a.style.fontSize=9,a.scale=a.scale||[1,1],a.scale[0]*=r/9,a.scale[1]*=r/9);var o=a.getBoundingRect();return this._textX+=o.width,t.add(a),a};var Cm={g:function(e,t){var n=new Ri;return km(t,n),Nm(e,n,this._defs),n},rect:function(e,t){var n=new vu;return km(t,n),Nm(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 Gl;return km(t,n),Nm(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 xu;return km(t,n),Nm(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 _m;return km(t,n),Nm(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=Lm(n));var i=new lu({shape:{points:n||[]}});return km(t,i),Nm(e,i,this._defs),i},polyline:function(e,t){var n=new xl;km(t,n),Nm(e,n,this._defs);var i=e.getAttribute("points");return i&&(i=Lm(i)),new uu({shape:{points:i||[]}})},image:function(e,t){var n=new Dr;return km(t,n),Nm(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,a=e.getAttribute("dx")||0,r=e.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(r);var o=new Ri;return km(t,o),Nm(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 a=e.getAttribute("dx")||0,r=e.getAttribute("dy")||0,o=new Ri;return km(t,o),Nm(e,o,this._defs),this._textX+=a,this._textY+=r,o},path:function(e,t){var n=e.getAttribute("d")||"",i=xm(n);return km(t,i),Nm(e,i,this._defs),i}},Om={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),a=parseInt(e.getAttribute("y2")||0,10),r=new Ru(t,n,i,a);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 a=n.getAttribute("stop-color")||"#000000";t.addColorStop(i,a)}n=n.nextSibling}}(e,r),r},radialgradient:function(e){}};function km(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),Sm(t.__inheritedStyle,e.__inheritedStyle))}function Lm(e){for(var t=Mm(e).split(Im),n=[],i=0;i<t.length;i+=2){var a=parseFloat(t[i]),r=parseFloat(t[i+1]);n.push([a,r])}return n}var Em={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 Nm(e,t,n,i){var a=t.__inheritedStyle||{},r="text"===t.type;if(1===e.nodeType&&(function(e,t){var n=e.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=null,a=[];n.replace(zm,(function(e,t,n){a.push(t,n)}));for(var r=a.length-1;r>0;r-=2){var o=a[r],s=a[r-1];switch(i=i||sn.create(),s){case"translate":o=Mm(o).split(Im),sn.translate(i,i,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=Mm(o).split(Im),sn.scale(i,i,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=Mm(o).split(Im),sn.rotate(i,i,parseFloat(o[0]));break;case"skew":o=Mm(o).split(Im),console.warn("Skew transform is not supported yet");break;case"matrix":o=Mm(o).split(Im);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),wm(a,function(e){var t=e.getAttribute("style"),n={};if(!t)return n;var i,a={};Bm.lastIndex=0;for(;null!=(i=Bm.exec(t));)a[i[1]]=i[2];for(var r in Em)Em.hasOwnProperty(r)&&null!=a[r]&&(n[Em[r]]=a[r]);return n}(e)),!i))for(var o in Em)if(Em.hasOwnProperty(o)){var s=e.getAttribute(o);null!=s&&(a[Em[o]]=s)}var l=r?"textFill":"fill",u=r?"textStroke":"stroke";t.style=t.style||new ia;var c=t.style;null!=a.fill&&c.set(l,Rm(a.fill,n)),null!=a.stroke&&c.set(u,Rm(a.stroke,n)),Tm(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(e){var t="lineWidth"===e&&r?"textStrokeWidth":e;null!=a[e]&&c.set(t,parseFloat(a[e]))})),a.textBaseline&&"auto"!==a.textBaseline||(a.textBaseline="alphabetic"),"alphabetic"===a.textBaseline&&(a.textBaseline="bottom"),"start"===a.textAlign&&(a.textAlign="left"),"end"===a.textAlign&&(a.textAlign="right"),Tm(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(e){null!=a[e]&&c.set(e,a[e])})),a.lineDash&&(t.style.lineDash=Mm(a.lineDash).split(Im)),c[u]&&"none"!==c[u]&&(t[u]=!0),t.__inheritedStyle=a}var Pm=/url\(\s*#(.*?)\)/;function Rm(e,t){var n=t&&e&&e.match(Pm);return n?t[Mm(n[1])]:e}var zm=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var Bm=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Vm(e,t,n){var i=t/e.width,a=n/e.height,r=Math.min(i,a);return{scale:[r,r],position:[-(e.x+e.width/2)*r+t/2,-(e.y+e.height/2)*r+n/2]}}var Hm={parseXML:Am,makeViewBoxTransform:Vm,parseSVG:function(e,t){return(new Dm).parse(e,t)}},Ym=Fe.createHashMap,Fm=Fe.isString,Gm=Fe.isArray,Wm=Fe.each,jm=Hm.parseXML,Um=Ym(),Zm={registerMap:function(e,t,n){var i;return Gm(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}]),Wm(i,(function(e){var t=e.type;"geoJson"===t&&(t=e.type="geoJSON"),(0,Xm[t])(e)})),Um.set(e,i)},retrieveMap:function(e){return Um.get(e)}},Xm={geoJSON:function(e){var t=e.source;e.geoJSON=Fm(t)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(t):new Function("return ("+t+");")():t},svg:function(e){e.svgXML=jm(e.source)}},qm=Zm;function Km(e){return e}function $m(e,t,n,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||Km,this._newKeyGetter=i||Km,this.context=a}function Qm(e,t,n,i,a){for(var r=0;r<e.length;r++){var o="_ec_"+a[i](e[r],r),s=t[o];null==s?(n.push(o),t[o]=r):(s.length||(t[o]=s=[s]),s.push(r))}}$m.prototype={constructor:$m,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=[],a=[];for(Qm(e,{},i,"_oldKeyGetter",this),Qm(t,n,a,"_newKeyGetter",this),r=0;r<e.length;r++){if(null!=(s=n[o=i[r]]))(u=s.length)?(1===u&&(n[o]=null),s=s.shift()):n[o]=null,this._update&&this._update(s,r);else this._remove&&this._remove(r)}for(var r=0;r<a.length;r++){var o=a[r];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 Jm=$m,ev=Fe.each,tv=Fe.createHashMap,nv=tv(["tooltip","label","itemName","itemId","seriesName"]);function iv(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var av={OTHER_DIMENSIONS:nv,summarizeDimensions:function(e){var t={},n=t.encode={},i=tv(),a=[],r=[],o=t.userOutput={dimensionNames:e.dimensions.slice(),encode:{}};ev(e.dimensions,(function(t){var s,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var c=l.coordDimIndex;iv(n,u)[c]=t,l.isExtraCoord||(i.set(u,1),"ordinal"!==(s=l.type)&&"time"!==s&&(a[0]=t),iv(o.encode,u)[c]=l.index),l.defaultTooltip&&r.push(t)}nv.each((function(e,t){var i=iv(n,t),a=l.otherDims[t];null!=a&&!1!==a&&(i[a]=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&&(a=u.slice());var c=n.tooltip;return c&&c.length?r=c.slice():r.length||(r=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=r,t},getDimensionTypeByAxis:function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}};var rv=function(e){null!=e&&Fe.extend(this,e),this.otherDims={}},ov=Tp.defaultDimValueGetters,sv=Tp.DefaultDataProvider,lv=av.summarizeDimensions,uv=Fe.isObject,cv="undefined",hv={float:typeof Float64Array===cv?Array:Float64Array,int:typeof Int32Array===cv?Array:Int32Array,ordinal:Array,number:Array,time:Array},dv=typeof Uint32Array===cv?Array:Uint32Array,fv=typeof Int32Array===cv?Array:Int32Array,pv=typeof Uint16Array===cv?Array:Uint16Array;function gv(e){return e._rawCount>65535?dv:pv}var mv=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],vv=["_extent","_approximateExtent","_rawExtent"];function yv(e,t){Fe.each(mv.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,Fe.each(vv,(function(n){e[n]=Fe.clone(t[n])})),e._calculationInfo=Fe.extend(t._calculationInfo)}var _v=function(e,t){e=e||["x","y"];for(var n={},i=[],a={},r=0;r<e.length;r++){var o=e[r];Fe.isString(o)?o=new rv({name:o}):o instanceof rv||(o=new rv(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=r,o.createInvertedIndices&&(a[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=lv(this),this._invertedIndicesMap=a,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},xv=_v.prototype;function bv(e,t,n,i,a){var r=hv[t.type],o=i-1,s=t.name,l=e[s][o];if(l&&l.length<n){for(var u=new r(Math.min(a-o*n,n)),c=0;c<l.length;c++)u[c]=l[c];e[s][o]=u}for(var h=i*n;h<a;h+=n)e[s].push(new r(Math.min(a-h,n)))}function wv(e){var t=e._invertedIndicesMap;Fe.each(t,(function(n,i){var a=e._dimensionInfos[i].ordinalMeta;if(a){n=t[i]=new fv(a.categories.length);for(var r=0;r<n.length;r++)n[r]=-1;for(r=0;r<e._count;r++)n[e.get(i,r)]=r}}))}function Sv(e,t,n){var i;if(null!=t){var a=e._chunkSize,r=Math.floor(n/a),o=n%a,s=e.dimensions[t],l=e._storage[s][r];if(l){i=l[o];var u=e._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(i=u.categories[i])}}return i}function Mv(e){return e}function Tv(e){return e<this._count&&e>=0?this._indices[e]:-1}function Iv(e,t){var n=e._idList[t];return null==n&&(n=Sv(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n}function Av(e){return Fe.isArray(e)||(e=[e]),e}function Dv(e,t){var n=e.dimensions,i=new _v(Fe.map(n,e.getDimensionInfo,e),e.hostModel);yv(i,e);for(var a=i._storage={},r=e._storage,o=0;o<n.length;o++){var s=n[o];r[s]&&(Fe.indexOf(t,s)>=0?(a[s]=Cv(r[s]),i._rawExtent[s]=Ov(),i._extent[s]=null):a[s]=r[s])}return i}function Cv(e){for(var t,n,i=new Array(e.length),a=0;a<e.length;a++)i[a]=(t=e[a],n=void 0,(n=t.constructor)===Array?t.slice():new n(t));return i}function Ov(){return[1/0,-1/0]}xv.type="list",xv.hasItemOption=!0,xv.getDimension=function(e){return"number"!=typeof e&&(isNaN(e)||this._dimensionInfos.hasOwnProperty(e))||(e=this.dimensions[e]),e},xv.getDimensionInfo=function(e){return this._dimensionInfos[this.getDimension(e)]},xv.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},xv.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]},xv.initData=function(e,t,n){(Td.isInstance(e)||Fe.isArrayLike(e))&&(e=new sv(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=ov[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=ov.arrayRows,this._rawExtent={},this._initDataFromProvider(0,e.count()),e.pure&&(this.hasItemOption=!1)},xv.getProvider=function(){return this._rawData},xv.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)},xv.appendValues=function(e,t){for(var n=this._chunkSize,i=this._storage,a=this.dimensions,r=a.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t?t.length:0),u=this._chunkCount,c=0;c<r;c++){o[v=a[c]]||(o[v]=Ov()),i[v]||(i[v]=[]),bv(i,this._dimensionInfos[v],n,u,l),this._chunkCount=i[v].length}for(var h=new Array(r),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/n),g=d%n,m=0;m<r;m++){var v=a[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={},wv(this)},xv._initDataFromProvider=function(e,t){if(!(e>=t)){for(var n,i=this._chunkSize,a=this._rawData,r=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]=Ov());var g=l[b];0===g.otherDims.itemName&&(n=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),r[b]||(r[b]=[]),bv(r,g,i,f,t),this._chunkCount=r[b].length}for(var m=new Array(s),v=e;v<t;v++){m=a.getItem(v,m);for(var y=Math.floor(v/i),_=v%i,x=0;x<s;x++){var b,w=r[b=o[x]][y],S=this._dimValueGetter(m,b,v,x);w[_]=S;var M=h[b];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!a.pure){var T=u[v];if(m&&null==T)if(null!=m.name)u[v]=T=m.name;else if(null!=n){var I=o[n],A=r[I][y];if(A){T=A[_];var D=l[I].ordinalMeta;D&&D.categories.length&&(T=D.categories[T])}}var C=null==m?null:m.id;null==C&&null!=T&&(d[T]=d[T]||0,C=T,d[T]>0&&(C+="__ec__"+d[T]),d[T]++),null!=C&&(c[v]=C)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=t,this._extent={},wv(this)}},xv.count=function(){return this._count},xv.getIndices=function(){var e=this._indices;if(e){var t=e.constructor,n=this._count;if(t===Array){a=new t(n);for(var i=0;i<n;i++)a[i]=e[i]}else a=new t(e.buffer,0,n)}else{var a=new(t=gv(this))(this.count());for(i=0;i<a.length;i++)a[i]=i}return a},xv.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),a=t%this._chunkSize;return n[e][i][a]},xv.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),a=t%this._chunkSize;return n[i][a]},xv._getFast=function(e,t){var n=Math.floor(t/this._chunkSize),i=t%this._chunkSize;return this._storage[e][n][i]},xv.getValues=function(e,t){var n=[];Fe.isArray(e)||(t=e,e=this.dimensions);for(var i=0,a=e.length;i<a;i++)n.push(this.get(e[i],t));return n},xv.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},xv.getDataExtent=function(e){e=this.getDimension(e);var t=this._storage[e],n=Ov();if(!t)return n;var i,a=this.count();if(!this._indices)return this._rawExtent[e].slice();if(i=this._extent[e])return i.slice();for(var r=(i=n)[0],o=i[1],s=0;s<a;s++){var l=this._getFast(e,this.getRawIndex(s));l<r&&(r=l),l>o&&(o=l)}return i=[r,o],this._extent[e]=i,i},xv.getApproximateExtent=function(e){return e=this.getDimension(e),this._approximateExtent[e]||this.getDataExtent(e)},xv.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},xv.getCalculationInfo=function(e){return this._calculationInfo[e]},xv.setCalculationInfo=function(e,t){uv(e)?Fe.extend(this._calculationInfo,e):this._calculationInfo[e]=t},xv.getSum=function(e){var t=0;if(this._storage[e])for(var n=0,i=this.count();n<i;n++){var a=this.get(e,n);isNaN(a)||(t+=a)}return t},xv.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},xv.rawIndexOf=function(e,t){var n=(e&&this._invertedIndicesMap[e])[t];return null==n||isNaN(n)?-1:n},xv.indexOfName=function(e){for(var t=0,n=this.count();t<n;t++)if(this.getName(t)===e)return t;return-1},xv.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,a=this._count-1;i<=a;){var r=(i+a)/2|0;if(t[r]<e)i=r+1;else{if(!(t[r]>e))return r;a=r-1}}return-1},xv.indicesOfNearest=function(e,t,n){var i=[];if(!this._storage[e])return i;null==n&&(n=1/0);for(var a=1/0,r=-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<a||c===a&&u>=0&&r<0)&&(a=c,r=u,o=0),u===r&&(i[o++]=s))}return i.length=o,i},xv.getRawIndex=Mv,xv.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},xv.getName=function(e){var t=this.getRawIndex(e);return this._nameList[t]||Sv(this,this._nameDimIdx,t)||""},xv.getId=function(e){return Iv(this,this.getRawIndex(e))},xv.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 a=(e=Fe.map(Av(e),this.getDimension,this)).length,r=0;r<this.count();r++)switch(a){case 0:t.call(n,r);break;case 1:t.call(n,this.get(e[0],r),r);break;case 2:t.call(n,this.get(e[0],r),this.get(e[1],r),r);break;default:for(var o=0,s=[];o<a;o++)s[o]=this.get(e[o],r);s[o]=r,t.apply(n,s)}}},xv.filterSelf=function(e,t,n,i){if(this._count){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this,e=Fe.map(Av(e),this.getDimension,this);for(var a=this.count(),r=new(gv(this))(a),o=[],s=e.length,l=0,u=e[0],c=0;c<a;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&&(r[l++]=d)}return l<a&&(this._indices=r),this._count=l,this._extent={},this.getRawIndex=this._indices?Tv:Mv,this}},xv.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 a=this.count(),r=new(gv(this))(a),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))&&(r[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))&&(r[o++]=h),h++}}c=!0}}if(!c)if(1===i)for(m=0;m<a;m++){var S=this.getRawIndex(m);((b=this._getFast(s,S))>=l&&b<=u||isNaN(b))&&(r[o++]=S)}else for(m=0;m<a;m++){var M=!0;for(S=this.getRawIndex(m),f=0;f<i;f++){var T=t[f];((b=this._getFast(n,S))<e[T][0]||b>e[T][1])&&(M=!1)}M&&(r[o++]=this.getRawIndex(m))}return o<a&&(this._indices=r),this._count=o,this._extent={},this.getRawIndex=this._indices?Tv:Mv,this}}},xv.mapArray=function(e,t,n,i){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this;var a=[];return this.each(e,(function(){a.push(t&&t.apply(this,arguments))}),n),a},xv.map=function(e,t,n,i){n=n||i||this;var a=Dv(this,e=Fe.map(Av(e),this.getDimension,this));a._indices=this._indices,a.getRawIndex=a._indices?Tv:Mv;for(var r=a._storage,o=[],s=this._chunkSize,l=e.length,u=this.count(),c=[],h=a._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=r[_];w&&(w[m][v]=x),x<b[0]&&(b[0]=x),x>b[1]&&(b[1]=x)}}}return a},xv.downSample=function(e,t,n,i){for(var a=Dv(this,[e]),r=a._storage,o=[],s=Math.floor(1/t),l=r[e],u=this.count(),c=this._chunkSize,h=a._rawExtent[e],d=new(gv(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 a._count=f,a._indices=d,a.getRawIndex=Tv,a},xv.getItemModel=function(e){var t=this.hostModel;return new ph(this.getRawDataItem(e),t,t&&t.ecModel)},xv.diff=function(e){var t=this;return new Jm(e?e.getIndices():[],this.getIndices(),(function(t){return Iv(e,t)}),(function(e){return Iv(t,e)}))},xv.getVisual=function(e){var t=this._visual;return t&&t[e]},xv.setVisual=function(e,t){if(uv(e))for(var n in e)e.hasOwnProperty(n)&&this.setVisual(n,e[n]);else this._visual=this._visual||{},this._visual[e]=t},xv.setLayout=function(e,t){if(uv(e))for(var n in e)e.hasOwnProperty(n)&&this.setLayout(n,e[n]);else this._layout[e]=t},xv.getLayout=function(e){return this._layout[e]},xv.getItemLayout=function(e){return this._itemLayouts[e]},xv.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?Fe.extend(this._itemLayouts[e]||{},t):t},xv.clearItemLayouts=function(){this._itemLayouts.length=0},xv.getItemVisual=function(e,t,n){var i=this._itemVisuals[e],a=i&&i[t];return null!=a||n?a:this.getVisual(t)},xv.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{},a=this.hasItemVisual;if(this._itemVisuals[e]=i,uv(t))for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r],a[r]=!0);else i[t]=n,a[t]=!0},xv.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var kv=function(e){e.seriesIndex=this.seriesIndex,e.dataIndex=this.dataIndex,e.dataType=this.dataType};xv.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(kv,t)),this._graphicEls[e]=t},xv.getItemGraphicEl=function(e){return this._graphicEls[e]},xv.eachItemGraphicEl=function(e,t){Fe.each(this._graphicEls,(function(n,i){n&&e&&e.call(t,n,i)}))},xv.cloneShallow=function(e){if(!e){var t=Fe.map(this.dimensions,this.getDimensionInfo,this);e=new _v(t,this.hostModel)}if(e._storage=this._storage,yv(e,this),this._indices){var n=this._indices.constructor;e._indices=new n(this._indices)}else e._indices=null;return e.getRawIndex=e._indices?Tv:Mv,e},xv.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(Fe.slice(arguments)))})},xv.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],xv.CHANGABLE_METHODS=["filterSelf","selectRange"];var Lv=_v,Ev=Fe.createHashMap,Nv=Fe.each,Pv=Fe.isString,Rv=Fe.defaults,zv=Fe.extend,Bv=Fe.isObject,Vv=Fe.clone,Hv=Po.normalizeToArray,Yv=Jd.guessOrdinal,Fv=Jd.BE_ORDINAL,Gv=av.OTHER_DIMENSIONS;function Wv(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 jv=function(e,t,n){Td.isInstance(t)||(t=Td.seriesDataToSource(t)),n=n||{},e=(e||[]).slice();for(var i=(n.dimsDef||[]).slice(),a=Ev(),r=Ev(),o=[],s=function(e,t,n,i){var a=Math.max(e.dimensionsDetectCount||1,t.length,n.length,i||0);return Nv(t,(function(e){var t=e.dimsDef;t&&(a=Math.max(a,t.length))})),a}(t,e,i,n.dimCount),l=0;l<s;l++){var u=i[l]=zv({},Bv(i[l])?i[l]:{name:i[l]}),c=u.name,h=o[l]=new rv;null!=c&&null==a.get(c)&&(h.name=h.displayName=c,a.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=Ev(d)).each((function(e,t){if(1===(e=Hv(e).slice()).length&&!Pv(e[0])&&e[0]<0)d.set(t,!1);else{var n=d.set(t,[]);Nv(e,(function(e,i){Pv(e)&&(e=a.get(e)),null!=e&&e<s&&(n[i]=e,p(o[e],t,i))}))}}));var f=0;function p(e,t,n){null!=Gv.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,r.set(t,!0))}Nv(e,(function(e,t){var n,i,a;if(Pv(e))n=e,e={};else{n=e.name;var r=e.ordinalMeta;e.ordinalMeta=null,(e=Vv(e)).ordinalMeta=r,i=e.dimsDef,a=e.otherDims,e.name=e.coordDim=e.coordDimIndex=e.dimsDef=e.otherDims=null}if(!1!==(s=d.get(n))){var s;if(!(s=Hv(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++)}Nv(s,(function(t,r){var s=o[t];if(p(Rv(s,e),n,r),null==s.name&&i){var l=i[r];!Bv(l)&&(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}a&&Rv(s.otherDims,a)}))}}));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 rv).coordDim&&(h.coordDim=Wv(y,r,v),h.coordDimIndex=0,(!g||m<=0)&&(h.isExtraCoord=!0),m--),null==h.name&&(h.name=Wv(h.coordDim,a)),null!=h.type||Yv(t,_,h.name)!==Fv.Must&&(!h.isExtraCoord||null==h.otherDims.itemName&&null==h.otherDims.seriesName)||(h.type="ordinal")}return o},Uv=jv;var Zv=function(e,t){return Uv((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})},Xv=Fe.createHashMap,qv=Fe.each;function Kv(e){this.coordSysName=e,this.coordSysDims=[],this.axisMap=Xv(),this.categoryAxisMap=Xv(),this.firstCategoryDimIndex=null}var $v={cartesian2d:function(e,t,n,i){var a=e.getReferringComponents("xAxis")[0],r=e.getReferringComponents("yAxis")[0];t.coordSysDims=["x","y"],n.set("x",a),n.set("y",r),Qv(a)&&(i.set("x",a),t.firstCategoryDimIndex=0),Qv(r)&&(i.set("y",r),t.firstCategoryDimIndex,t.firstCategoryDimIndex=1)},singleAxis:function(e,t,n,i){var a=e.getReferringComponents("singleAxis")[0];t.coordSysDims=["single"],n.set("single",a),Qv(a)&&(i.set("single",a),t.firstCategoryDimIndex=0)},polar:function(e,t,n,i){var a=e.getReferringComponents("polar")[0],r=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",r),n.set("angle",o),Qv(r)&&(i.set("radius",r),t.firstCategoryDimIndex=0),Qv(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 a=e.ecModel,r=a.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=r.dimensions.slice();qv(r.parallelAxisIndex,(function(e,r){var s=a.getComponent("parallelAxis",e),l=o[r];n.set(l,s),Qv(s)&&null==t.firstCategoryDimIndex&&(i.set(l,s),t.firstCategoryDimIndex=r)}))}};function Qv(e){return"category"===e.get("type")}var Jv={getCoordSysInfoBySeries:function(e){var t=e.get("coordinateSystem"),n=new Kv(t),i=$v[t];if(i)return i(e,n,n.axisMap,n.categoryAxisMap),n}},ey=Fe.each,ty=Fe.isString;function ny(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}var iy={enableDataStack:function(e,t,n){var i,a,r,o,s=(n=n||{}).byIndex,l=n.stackedCoordDimension,u=!(!e||!e.get("stack"));if(ey(t,(function(e,n){ty(e)&&(t[n]=e={name:e}),u&&!e.isExtraCoord&&(s||i||!e.ordinalMeta||(i=e),a||"ordinal"===e.type||"time"===e.type||l&&l!==e.coordDim||(a=e))})),!a||s||i||(s=!0),a){r="__\0ecstackresult",o="__\0ecstackedover",i&&(i.createInvertedIndices=!0);var c=a.coordDim,h=a.type,d=0;ey(t,(function(e){e.coordDim===c&&d++})),t.push({name:r,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:a&&a.name,stackedByDimension:i&&i.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:r}},isDimensionStacked:ny,getStackedDimension:function(e,t){return ny(e,t)?e.getCalculationInfo("stackResultDimension"):t}},ay=gd.SOURCE_FORMAT_ORIGINAL,ry=av.getDimensionTypeByAxis,oy=Po.getDataItemValue,sy=Jv.getCoordSysInfoBySeries,ly=iy.enableDataStack,uy=Jd.makeSeriesEncodeForAxisCoordSys;var cy=function(e,t,n){n=n||{},Td.isInstance(e)||(e=Td.seriesDataToSource(e));var i,a=t.get("coordinateSystem"),r=Tf.get(a),o=sy(t);o&&(i=Fe.map(o.coordSysDims,(function(e){var t={name:e},n=o.axisMap.get(e);if(n){var i=n.get("type");t.type=ry(i)}return t}))),i||(i=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]);var s,l,u=Zv(e,{coordDimensions:i,generateCoord:n.generateCoord,encodeDefaulter:n.useEncodeDefaulter?Fe.curry(uy,i,t):null});o&&Fe.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=ly(t,u),h=new Lv(u,t);h.setCalculationInfo(c);var d=null!=s&&function(e){if(e.sourceFormat===ay){var t=function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[]);return null!=t&&!Fe.isArray(oy(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},hy=cy;function dy(e){this._setting=e||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}dy.prototype.parse=function(e){return e},dy.prototype.getSetting=function(e){return this._setting[e]},dy.prototype.contain=function(e){var t=this._extent;return e>=t[0]&&e<=t[1]},dy.prototype.normalize=function(e){var t=this._extent;return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},dy.prototype.scale=function(e){var t=this._extent;return e*(t[1]-t[0])+t[0]},dy.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},dy.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},dy.prototype.getExtent=function(){return this._extent.slice()},dy.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},dy.prototype.isBlank=function(){return this._isBlank},dy.prototype.setBlank=function(e){this._isBlank=e},dy.prototype.getLabel=null,Go.enableClassExtend(dy),Go.enableClassManagement(dy,{registerWhenExtend:!0});var fy=dy,py=Fe.createHashMap,gy=Fe.isObject,my=Fe.map;function vy(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this._map}vy.createByAxisModel=function(e){var t=e.option,n=t.data,i=n&&my(n,xy);return new vy({categories:i,needCollect:!i,deduplication:!1!==t.dedplication})};var yy=vy.prototype;function _y(e){return e._map||(e._map=py(e.categories))}function xy(e){return gy(e)&&null!=e.value?e.value:e+""}yy.getOrdinal=function(e){return _y(this).get(e)},yy.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=_y(this);return null==(t=i.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,i.set(e,t)):t=NaN),t};var by=vy,wy=fy.prototype,Sy=fy.extend({type:"ordinal",init:function(e,t){e&&!Fe.isArray(e)||(e=new by({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),wy.contain.call(this,e)&&null!=this._ordinalMeta.categories[e]},normalize:function(e){return wy.normalize.call(this,this.parse(e))},scale:function(e){return Math.round(wy.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:Fe.noop,niceExtent:Fe.noop});Sy.create=function(){return new Sy};var My=Sy,Ty=Ch.round;function Iy(e){return Ch.getPrecisionSafe(e)+2}function Ay(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function Dy(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),Ay(e,0,t),Ay(e,1,t),e[0]>e[1]&&(e[0]=e[1])}var Cy={intervalScaleNiceTicks:function(e,t,n,i){var a={},r=e[1]-e[0],o=a.interval=Ch.nice(r/t,!0);null!=n&&o<n&&(o=a.interval=n),null!=i&&o>i&&(o=a.interval=i);var s=a.intervalPrecision=Iy(o);return Dy(a.niceTickExtent=[Ty(Math.ceil(e[0]/o)*o,s),Ty(Math.floor(e[1]/o)*o,s)],e),a},getIntervalPrecision:Iy,fixExtent:Dy},Oy=Ch.round,ky=fy.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]),ky.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=Cy.getIntervalPrecision(e)},getTicks:function(e){var t=this._interval,n=this._extent,i=this._niceExtent,a=this._intervalPrecision,r=[];if(!t)return r;n[0]<i[0]&&(e?r.push(Oy(i[0]-t,a)):r.push(n[0]));for(var o=i[0];o<=i[1]&&(r.push(o),(o=Oy(o+t,a))!==r[r.length-1]);)if(r.length>1e4)return[];var s=r.length?r[r.length-1]:i[1];return n[1]>s&&(e?r.push(Oy(s+t,a)):r.push(n[1])),r},getMinorTicks:function(e){for(var t=this.getTicks(!0),n=[],i=this.getExtent(),a=1;a<t.length;a++){for(var r=t[a],o=t[a-1],s=0,l=[],u=(r-o)/e;s<e-1;){var c=Ch.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=Ch.getPrecisionSafe(e)||0:"auto"===n&&(n=this._intervalPrecision),e=Oy(e,n,!0),Fh.addCommas(e)},niceTicks:function(e,t,n){e=e||5;var i=this._extent,a=i[1]-i[0];if(isFinite(a)){a<0&&(a=-a,i.reverse());var r=Cy.intervalScaleNiceTicks(i,e,t,n);this._intervalPrecision=r.intervalPrecision,this._interval=r.interval,this._niceExtent=r.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 a=this._interval;e.fixMin||(t[0]=Oy(Math.floor(t[0]/a)*a)),e.fixMax||(t[1]=Oy(Math.ceil(t[1]/a)*a))}});ky.create=function(){return new ky};var Ly=ky,Ey=Ch.parsePercent,Ny=iy.isDimensionStacked,Py="__ec_stack_",Ry="undefined"!=typeof Float32Array?Float32Array:Array;function zy(e){return e.get("stack")||Py+e.seriesIndex}function By(e){return e.dim+e.index}function Vy(e,t){var n=[];return t.eachSeriesByType(e,(function(e){Wy(e)&&!jy(e)&&n.push(e)})),n}function Hy(e){var t=function(e){var t={};Fe.each(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=e.getData(),a=n.dim+"_"+n.index,r=i.mapDimension(n.dim),o=0,s=i.count();o<s;++o){var l=i.get(r,o);t[a]?t[a].push(l):t[a]=[l]}}));var n=[];for(var i in t)if(t.hasOwnProperty(i)){var a=t[i];if(a){a.sort((function(e,t){return e-t}));for(var r=null,o=1;o<a.length;++o){var s=a[o]-a[o-1];s>0&&(r=null===r?s:Math.min(r,s))}n[i]=r}}return n}(e),n=[];return Fe.each(e,(function(e){var i,a=e.coordinateSystem.getBaseAxis(),r=a.getExtent();if("category"===a.type)i=a.getBandWidth();else if("value"===a.type||"time"===a.type){var o=a.dim+"_"+a.index,s=t[o],l=Math.abs(r[1]-r[0]),u=a.scale.getExtent(),c=Math.abs(u[1]-u[0]);i=s?l/c*s:l}else{var h=e.getData();i=Math.abs(r[1]-r[0])/h.count()}var d=Ey(e.get("barWidth"),i),f=Ey(e.get("barMaxWidth"),i),p=Ey(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:By(a),stackId:zy(e)})})),Yy(n)}function Yy(e){var t={};Fe.each(e,(function(e,n){var i=e.axisKey,a=e.bandWidth,r=t[i]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=r.stacks;t[i]=r;var s=e.stackId;o[s]||r.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(r.remainedWidth,l),r.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&&(r.gap=h);var d=e.barCategoryGap;null!=d&&(r.categoryGap=d)}));var n={};return Fe.each(t,(function(e,t){n[t]={};var i=e.stacks,a=e.bandWidth,r=Ey(e.categoryGap,a),o=Ey(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-r)/(l+(l-1)*o);u=Math.max(u,0),Fe.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-r)/(l+(l-1)*o),u=Math.max(u,0);var c,h=0;Fe.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;Fe.each(i,(function(e,i){n[t][i]=n[t][i]||{bandWidth:a,offset:d,width:e.width},d+=e.width*(1+o)}))})),n}function Fy(e,t,n){if(e&&t){var i=e[By(t)];return null!=i&&null!=n&&(i=i[zy(n)]),i}}var Gy={seriesType:"bar",plan:ug(),reset:function(e){if(Wy(e)&&jy(e)){var t=e.getData(),n=e.coordinateSystem,i=n.grid.getRect(),a=n.getBaseAxis(),r=n.getOtherAxis(a),o=t.mapDimension(r.dim),s=t.mapDimension(a.dim),l=r.isHorizontal(),u=l?0:1,c=Fy(Hy([e]),a,e).width;return c>.5||(c=.5),{progress:function(e,t){var h,d=e.count,f=new Ry(2*d),p=new Ry(2*d),g=new Ry(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:Uy(a,r),backgroundStart:l?i.x:i.y,valueAxisHorizontal:l})}}}}};function Wy(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function jy(e){return e.pipelineContext&&e.pipelineContext.large}function Uy(e,t,n){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}var Zy=function(e){var t=[],n=e.axis,i="axis0";if("category"===n.type){for(var a=n.getBandWidth(),r=0;r<e.count;r++)t.push(Fe.defaults({bandWidth:a,axisKey:i,stackId:Py+r},e));var o=Yy(t),s=[];for(r=0;r<e.count;r++){var l=o[i][Py+r];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}},Xy=function(e,t){var n=Vy(e,t),i=Hy(n),a={};Fe.each(n,(function(e){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),o=zy(e),s=i[By(r)][o],l=s.offset,u=s.width,c=n.getOtherAxis(r),h=e.get("barMinHeight")||0;a[o]=a[o]||[],t.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=t.mapDimension(c.dim),f=t.mapDimension(r.dim),p=Ny(t,d),g=c.isHorizontal(),m=Uy(r,c),v=0,y=t.count();v<y;v++){var _,x,b,w,S,M=t.get(d,v),T=t.get(f,v),I=M>=0?"p":"n",A=m;if(p&&(a[o][T]||(a[o][T]={p:m,n:m}),A=a[o][T][I]),g)_=A,x=(S=n.dataToPoint([M,T]))[1]+l,b=S[0]-m,w=u,Math.abs(b)<h&&(b=(b<0?-1:1)*h),isNaN(b)||p&&(a[o][T][I]+=b);else _=(S=n.dataToPoint([T,M]))[0]+l,x=A,b=u,w=S[1]-m,Math.abs(w)<h&&(w=(w<=0?-1:1)*h),isNaN(w)||p&&(a[o][T][I]+=w);t.setItemLayout(v,{x:_,y:x,width:b,height:w})}}),this)},qy={getLayoutOnAxis:Zy,prepareLayoutBarSeries:Vy,makeColumnLayout:Hy,retrieveColumnLayout:Fy,layout:Xy,largeLayout:Gy},Ky=Ly.prototype,$y=Math.ceil,Qy=Math.floor,Jy=1e3,e_=6e4,t_=36e5,n_=864e5,i_=Ly.extend({type:"time",getLabel:function(e){var t=this._stepLvl,n=new Date(e);return Fh.formatTime(t[0],n,this.getSetting("useUTC"))},niceExtent:function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=n_,t[1]+=n_),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]-n_}this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval;e.fixMin||(t[0]=Ch.round(Qy(t[0]/i)*i)),e.fixMax||(t[1]=Ch.round($y(t[1]/i)*i))},niceTicks:function(e,t,n){e=e||10;var i=this._extent,a=i[1]-i[0],r=a/e;null!=t&&r<t&&(r=t),null!=n&&r>n&&(r=n);var o=a_.length,s=function(e,t,n,i){for(;n<i;){var a=n+i>>>1;e[a][1]<t?n=a+1:i=a}return n}(a_,r,0,o),l=a_[Math.min(s,o-1)],u=l[1];if("year"===l[0]){var c=a/u;u*=Ch.nice(c/e,!0)}var h=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,d=[Math.round($y((i[0]-h)/u)*u+h),Math.round(Qy((i[1]-h)/u)*u+h)];Cy.fixExtent(d,i),this._stepLvl=l,this._interval=u,this._niceExtent=d},parse:function(e){return+Ch.parseDate(e)}});Fe.each(["contain","normalize"],(function(e){i_.prototype[e]=function(t){return Ky[e].call(this,this.parse(t))}}));var a_=[["hh:mm:ss",Jy],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",e_],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",t_],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",n_],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",6048e6],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];i_.create=function(e){return new i_({useUTC:e.ecModel.get("useUTC")})};var r_=fy.prototype,o_=Ly.prototype,s_=Ch.getPrecisionSafe,l_=Ch.round,u_=Math.floor,c_=Math.ceil,h_=Math.pow,d_=Math.log,f_=fy.extend({type:"log",base:10,$constructor:function(){fy.apply(this,arguments),this._originalScale=new Ly},getTicks:function(e){var t=this._originalScale,n=this._extent,i=t.getExtent();return Fe.map(o_.getTicks.call(this,e),(function(e){var a=Ch.round(h_(this.base,e));return a=e===n[0]&&t.__fixMin?p_(a,i[0]):a,a=e===n[1]&&t.__fixMax?p_(a,i[1]):a}),this)},getMinorTicks:o_.getMinorTicks,getLabel:o_.getLabel,scale:function(e){return e=r_.scale.call(this,e),h_(this.base,e)},setExtent:function(e,t){var n=this.base;e=d_(e)/d_(n),t=d_(t)/d_(n),o_.setExtent.call(this,e,t)},getExtent:function(){var e=this.base,t=r_.getExtent.call(this);t[0]=h_(e,t[0]),t[1]=h_(e,t[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(t[0]=p_(t[0],i[0])),n.__fixMax&&(t[1]=p_(t[1],i[1])),t},unionExtent:function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=d_(e[0])/d_(t),e[1]=d_(e[1])/d_(t),r_.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=Ch.quantity(n);for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var a=[Ch.round(c_(t[0]/i)*i),Ch.round(u_(t[1]/i)*i)];this._interval=i,this._niceExtent=a}},niceExtent:function(e){o_.niceExtent.call(this,e);var t=this._originalScale;t.__fixMin=e.fixMin,t.__fixMax=e.fixMax}});function p_(e,t){return l_(e,s_(t))}Fe.each(["contain","normalize"],(function(e){f_.prototype[e]=function(t){return t=d_(t)/d_(this.base),r_[e].call(this,t)}})),f_.create=function(){return new f_};var g_=f_,m_=qy.prepareLayoutBarSeries,v_=qy.makeColumnLayout,y_=qy.retrieveColumnLayout;function __(e,t){var n,i,a,r=e.type,o=t.getMin(),s=t.getMax(),l=e.getExtent();"ordinal"===r?n=t.getCategories().length:(i=t.get("boundaryGap"),Fe.isArray(i)||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=Ch.parsePercent(i[0],1),i[1]=Ch.parsePercent(i[1],1),a=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"===r?n?0:NaN:l[0]-i[0]*a),null==s&&(s="ordinal"===r?n?n-1:NaN:l[1]+i[1]*a),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN),e.setBlank(Fe.eqNaN(o)||Fe.eqNaN(s)||"ordinal"===r&&!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"===r){var d,f=m_("bar",h);if(Fe.each(f,(function(e){d|=e.getBaseAxis()===t.axis})),d){var p=v_(f),g=function(e,t,n,i){var a=n.axis.getExtent(),r=a[1]-a[0],o=y_(i,n.axis);if(void 0===o)return{min:e,max:t};var s=1/0;Fe.each(o,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;Fe.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)/r)-c;return t+=h*(l/u),e-=h*(s/u),{min:e,max:t}}(o,s,t,p);o=g.min,s=g.max}}return{extent:[o,s],fixMin:u,fixMax:c}}function x_(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,a){return null!=i&&(a=t-i),n(b_(e,t),a)}:function(t){return e.scale.getLabel(t)}}function b_(e,t){return"category"===e.type?e.scale.getLabel(t):t}function w_(e,t){var n=t*Math.PI/180,i=e.plain(),a=i.width,r=i.height,o=a*Math.cos(n)+r*Math.sin(n),s=a*Math.sin(n)+r*Math.cos(n);return new Ni(i.x,i.y,o,s)}function S_(e){var t=e.get("interval");return null==t?"auto":t}var M_=function(e,t){var n=__(e,t),i=n.extent,a=t.get("splitNumber");"log"===e.type&&(e.base=t.get("logBase"));var r=e.type;e.setExtent(i[0],i[1]),e.niceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===r||"time"===r?t.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?t.get("maxInterval"):null});var o=t.get("interval");null!=o&&e.setInterval&&e.setInterval(o)},T_=function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new My(e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),[1/0,-1/0]);case"value":return new Ly;default:return(fy.getClass(t)||Ly).create(e)}},I_=function(e){var t=e.scale.getExtent(),n=t[0],i=t[1];return!(n>0&&i>0||n<0&&i<0)},A_=function(e){var t=e.model,n=e.scale;if(t.get("axisLabel.show")&&!n.isBlank()){var i,a,r="category"===e.type,o=n.getExtent();a=r?n.count():(i=n.getTicks()).length;var s,l=e.getLabelModel(),u=x_(e),c=1;a>40&&(c=Math.ceil(a/40));for(var h=0;h<a;h+=c){var d=u(i?i[h]:o[0]+h),f=w_(l.getTextRect(d),l.get("rotate")||0);s?s.union(f):s=f}return s}},D_={getScaleExtent:__,niceScaleExtent:M_,createScaleByModel:T_,ifAxisCrossZero:I_,makeLabelFormatter:x_,getAxisRawValue:b_,estimateLabelUnionRect:A_,getOptionCategoryInterval:S_,shouldShowAllLabels:function(e){return"category"===e.type&&0===S_(e.getLabelModel())}},C_={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&&!Fe.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&&!Fe.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:Fe.noop,setRange:function(e,t){this.option.rangeStart=e,this.option.rangeEnd=t},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},O_=C_,k_=Ga.calculateTextPosition,L_=Jc.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=t.width/2,r=t.height/2;e.moveTo(n,i-r),e.lineTo(n+a,i+r),e.lineTo(n-a,i+r),e.closePath()}}),E_=Jc.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=t.width/2,r=t.height/2;e.moveTo(n,i-r),e.lineTo(n+a,i),e.lineTo(n,i+r),e.lineTo(n-a,i),e.closePath()}}),N_=Jc.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,i=t.y,a=t.width/5*3,r=Math.max(a,t.height),o=a/2,s=o*o/(r-o),l=i-r+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()}}),P_=Jc.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,i=t.width,a=t.x,r=t.y,o=i/3*2;e.moveTo(a,r),e.lineTo(a+o,r+n),e.lineTo(a,r+n/4*3),e.lineTo(a-o,r+n),e.lineTo(a,r),e.closePath()}}),R_={line:Jc.Line,rect:Jc.Rect,roundRect:Jc.Rect,square:Jc.Rect,circle:Jc.Circle,diamond:E_,pin:N_,arrow:P_,triangle:L_},z_={line:function(e,t,n,i,a){a.x1=e,a.y1=t+i/2,a.x2=e+n,a.y2=t+i/2},rect:function(e,t,n,i,a){a.x=e,a.y=t,a.width=n,a.height=i},roundRect:function(e,t,n,i,a){a.x=e,a.y=t,a.width=n,a.height=i,a.r=Math.min(n,i)/4},square:function(e,t,n,i,a){var r=Math.min(n,i);a.x=e,a.y=t,a.width=r,a.height=r},circle:function(e,t,n,i,a){a.cx=e+n/2,a.cy=t+i/2,a.r=Math.min(n,i)/2},diamond:function(e,t,n,i,a){a.cx=e+n/2,a.cy=t+i/2,a.width=n,a.height=i},pin:function(e,t,n,i,a){a.x=e+n/2,a.y=t+i/2,a.width=n,a.height=i},arrow:function(e,t,n,i,a){a.x=e+n/2,a.y=t+i/2,a.width=n,a.height=i},triangle:function(e,t,n,i,a){a.cx=e+n/2,a.cy=t+i/2,a.width=n,a.height=i}},B_={};Fe.each(R_,(function(e,t){B_[t]=new e}));var V_=Jc.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var i=k_(e,t,n),a=this.shape;return a&&"pin"===a.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 a=B_[i];a||(a=B_[i="rect"]),z_[i](t.x,t.y,t.width,t.height,a.shape),a.buildPath(e,a.shape,n)}}});function H_(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 Y_=function(e,t,n,i,a,r,o){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?Jc.makeImage(e.slice(8),new Ni(t,n,i,a),o?"center":"cover"):0===e.indexOf("path://")?Jc.makePath(e.slice(7),{},new Ni(t,n,i,a),o?"center":"cover"):new V_({shape:{symbolType:e,x:t,y:n,width:i,height:a}})).__isEmptyBrush=l,s.setColor=H_,s.setColor(r),s},F_={createSymbol:Y_},G_=td.getLayoutRect,W_=iy.enableDataStack,j_=iy.isDimensionStacked,U_=iy.getStackedDimension;var Z_=function(e,t){var n=t;ph.isInstance(t)||(n=new ph(t),Fe.mixin(n,O_));var i=D_.createScaleByModel(n);return i.setExtent(e[0],e[1]),D_.niceScaleExtent(i,n),i},X_=function(e){Fe.mixin(e,O_)},q_={getLayoutRect:G_,completeDimensions:Uv,createDimensions:Zv,createSymbol:F_.createSymbol,createList:function(e){return hy(e.getSource(),e)},dataStack:{isDimensionStacked:j_,enableDataStack:W_,getStackedDimension:U_},createScale:Z_,mixinAxisModelCommonMethods:X_};function K_(e,t){return Math.abs(e-t)<1e-8}var $_=function(e,t,n){var i=0,a=e[0];if(!a)return!1;for(var r=1;r<e.length;r++){var o=e[r];i+=rl(a[0],a[1],o[0],o[1],t,n),a=o}var s=e[0];return K_(a[0],s[0])&&K_(a[1],s[1])||(i+=rl(a[0],a[1],s[0],s[1],t,n)),0!==i},Q_={contain:$_};function J_(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}J_.prototype={constructor:J_,properties:null,getBoundingRect:function(){var e=this._rect;if(e)return e;for(var t=Number.MAX_VALUE,n=[t,t],i=[-t,-t],a=[],r=[],o=this.geometries,s=0;s<o.length;s++)if("polygon"===o[s].type){var l=o[s].exterior;Ns.fromPoints(l,a,r),ht.min(n,n,a),ht.max(i,i,r)}return 0===s&&(n[0]=n[1]=i[0]=i[1]=0),this._rect=new Ni(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,a=n.length;i<a;i++)if("polygon"===n[i].type){var r=n[i].exterior,o=n[i].interiors;if(Q_.contain(r,e[0],e[1])){for(var s=0;s<(o?o.length:0);s++)if(Q_.contain(o[s]))continue e;return!0}}return!1},transformTo:function(e,t,n,i){var a=this.getBoundingRect(),r=a.width/a.height;n?i||(i=n/r):n=r*i;for(var o=new Ni(e,t,n,i),s=a.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++)ht.applyTransform(c[d],c[d],s);for(var f=0;f<(h?h.length:0);f++)for(d=0;d<h[f].length;d++)ht.applyTransform(h[f][d],h[f][d],s)}(a=this._rect).copy(o),this.center=[a.x+a.width/2,a.y+a.height/2]},cloneShallow:function(e){null==e&&(e=this.name);var t=new J_(e,this.geometries,this.center);return t._rect=this._rect,t.transformTo=null,t}};var ex=J_;function tx(e,t,n){for(var i=[],a=t[0],r=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),a=s+=a,r=l+=r,i.push([s/n,l/n])}return i}var nx=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 a=n[i].geometry,r=a.coordinates,o=a.encodeOffsets,s=0;s<r.length;s++){var l=r[s];if("Polygon"===a.type)r[s]=tx(l,o[s],t);else if("MultiPolygon"===a.type)for(var u=0;u<l.length;u++){var c=l[u];l[u]=tx(c,o[s][u],t)}}e.UTF8Encoding=!1}(e),Fe.map(Fe.filter(e.features,(function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0})),(function(e){var n=e.properties,i=e.geometry,a=i.coordinates,r=[];"Polygon"===i.type&&r.push({type:"polygon",exterior:a[0],interiors:a.slice(1)}),"MultiPolygon"===i.type&&Fe.each(a,(function(e){e[0]&&r.push({type:"polygon",exterior:e[0],interiors:e.slice(1)})}));var o=new ex(n[t||"name"],r,n.cp);return o.properties=n,o}))},ix=Po.makeInner,ax=D_.makeLabelFormatter,rx=D_.getOptionCategoryInterval,ox=D_.shouldShowAllLabels,sx=ix();function lx(e,t){var n,i,a=ux(e,"labels"),r=rx(t),o=cx(a,r);return o||(Fe.isFunction(r)?n=fx(e,r):(i="auto"===r?function(e){var t=sx(e).autoInterval;return null!=t?t:sx(e).autoInterval=e.calculateCategoryInterval()}(e):r,n=dx(e,i)),hx(a,r,{labels:n,labelCategoryInterval:i}))}function ux(e,t){return sx(e)[t]||(sx(e)[t]=[])}function cx(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function hx(e,t,n){return e.push({key:t,value:n}),n}function dx(e,t,n){var i=ax(e),a=e.scale,r=a.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=r[0],c=a.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=ox(e),d=o.get("showMinLabel")||h,f=o.get("showMaxLabel")||h;d&&u!==r[0]&&g(r[0]);for(var p=u;p<=r[1];p+=l)g(p);function g(e){s.push(n?e:{formattedLabel:i(e),rawLabel:a.getLabel(e),tickValue:e})}return f&&p-l!==r[1]&&g(r[1]),s}function fx(e,t,n){var i=e.scale,a=ax(e),r=[];return Fe.each(i.getTicks(),(function(e){var o=i.getLabel(e);t(e,o)&&r.push(n?e:{formattedLabel:a(e),rawLabel:o,tickValue:e})})),r}var px={createAxisLabels:function(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=lx(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=ax(e);return{labels:Fe.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,a=ux(e,"ticks"),r=rx(t),o=cx(a,r);if(o)return o;t.get("show")&&!e.scale.isBlank()||(n=[]);if(Fe.isFunction(r))n=fx(e,r,!0);else if("auto"===r){var s=lx(e,e.getLabelModel());i=s.labelCategoryInterval,n=Fe.map(s.labels,(function(e){return e.tickValue}))}else n=dx(e,i=r,!0);return hx(a,r,{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=ax(e),i=(t.axisRotate-t.labelRotate)/180*Math.PI,a=e.scale,r=a.getExtent(),o=a.count();if(r[1]-r[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=r[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<=r[1];l+=s){var p,g,m=Ga.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=sx(e.model),b=e.getExtent(),w=x.lastAutoInterval,S=x.lastTickCount;return null!=w&&null!=S&&Math.abs(w-_)<=1&&Math.abs(S-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]),_}},gx=Fe.each,mx=Fe.map,vx=Ch.linearMap,yx=Ch.getPixelPrecision,_x=Ch.round,xx=px.createAxisTicks,bx=px.createAxisLabels,Sx=px.calculateCategoryInterval,Mx=[0,1],Tx=function(e,t,n){this.dim=e,this.scale=t,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};function Ix(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}Tx.prototype={constructor:Tx,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 yx(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&&Ix(n=n.slice(),i.count()),vx(e,Mx,n,t)},coordToData:function(e,t){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&Ix(n=n.slice(),i.count());var a=vx(e,n,Mx,t);return this.scale.scale(a)},pointToData:function(e,t){},getTicksCoords:function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=xx(this,t).ticks,i=mx(n,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this);return function(e,t,n,i){var a=t.length;if(!e.onBand||n||!a)return;var r,o,s=e.getExtent();if(1===a)t[0].coord=s[0],r=t[1]={coord:s[0]};else{var l=t[a-1].tickValue-t[0].tickValue,u=(t[a-1].coord-t[0].coord)/l;gx(t,(function(e){e.coord-=u/2})),o=1+e.scale.getExtent()[1]-t[a-1].tickValue,r={coord:t[a-1].coord+u*o},t.push(r)}var c=s[0]>s[1];h(t[0].coord,s[0])&&(i?t[0].coord=s[0]:t.shift());i&&h(s[0],t[0].coord)&&t.unshift({coord:s[0]});h(s[1],r.coord)&&(i?r.coord=s[1]:t.pop());i&&h(r.coord,s[1])&&t.push({coord:s[1]});function h(e,t){return e=_x(e),t=_x(t),c?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 mx(t,(function(e){return mx(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},getViewLabels:function(){return bx(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 Sx(this)}};var Ax=Tx,Dx=xo,Cx=sn,Ox=ht,kx=Xn,Lx=Ch,Ex=Fh,Nx=Ig.throttle,Px=q_,Rx=nx,zx=Lv,Bx=ph,Vx=Ax,Hx=re,Yx=nx,Fx={};Fe.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(e){Fx[e]=Fe[e]}));var Gx={};Fe.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){Gx[e]=Jc[e]}));var Wx={zrender:Dx,matrix:Cx,vector:Ox,color:kx,number:Lx,format:Ex,throttle:Nx,helper:Px,parseGeoJSON:Rx,List:zx,Model:Bx,Axis:Vx,env:Hx,parseGeoJson:Yx,util:Fx,graphic:Gx},jx=te((function(e,t){var n=Ig.throttle,i=Fe.assert,a=Fe.each,r=Fe.isFunction,o=Fe.isObject,s=sd.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="__optionUpdated",h=/^[a-zA-Z0-9_]+$/;function d(e,t){return function(n,i,a){t||!this._disposed?(n=n&&n.toLowerCase(),yt.prototype[e].call(this,n,i,a)):this.id}}function f(){yt.call(this)}function p(e,t,i){i=i||{},"string"==typeof t&&(t=B[t]),this.id,this.group,this._dom=e;var a=this._zr=xo.init(e,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=n(Fe.bind(a.flush,a),17),(t=Fe.clone(t))&&Jf(t,!0),this._theme=t,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new Tf;var r,o,s=this._api=(o=(r=this)._coordSysMgr,Fe.extend(new wf(r),{getCoordinateSystems:Fe.bind(o.getCoordinateSystems,o),getComponentByElement:function(e){for(;e;){var t=e.__ecComponentInfo;if(null!=t)return r._model.getComponent(t.mainType,t.index);e=e.parent}}}));function l(e,t){return e.__prio-t.__prio}Fi(z,l),Fi(N,l),this._scheduler=new lm(this,s,N,z),yt.call(this,this._ecEventProcessor=new k),this._messageCenter=new f,this._initEvents(),this.resize=Fe.bind(this.resize,this),this._pendingActions=[],a.animation.on("frame",this._onframe,this),function(e,t){e.on("rendered",(function(){t.trigger("rendered"),!e.animation.isFinished()||t[c]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))}(a,this),Fe.setAsPrimitive(this)}f.prototype.on=d("on",!0),f.prototype.off=d("off",!0),f.prototype.one=d("one",!0),Fe.mixin(f,yt);var g=p.prototype;function m(e,t,n){if(this._disposed)this.id;else{var i,a=this._model,r=this._coordSysMgr.getCoordinateSystems();t=Po.parseFinder(a,t);for(var o=0;o<r.length;o++){var s=r[o];if(s[e]&&null!=(i=s[e](a,t,n)))return i}}}g._onframe=function(){if(!this._disposed){var e=this._scheduler;if(this[c]){var t=this[c].silent;this[u]=!0,y(this),v.update.call(this),this[u]=!1,this[c]=!1,w.call(this,t),S.call(this,t)}else if(e.unfinished){var n=1,i=this._model,a=this._api;e.unfinished=!1;do{var r=+new Date;e.performSeriesTasks(i),e.performDataProcessorTasks(i),x(this,i),e.performVisualTasks(i),A(this,this._model,a,"remain"),n-=+new Date-r}while(n>0&&e.unfinished);e.unfinished||this._zr.flush()}}},g.getDom=function(){return this._dom},g.getZr=function(){return this._zr},g.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 a=new Nf(this._api),r=this._theme,s=this._model=new xf;s.scheduler=this._scheduler,s.init(null,null,r,a)}this._model.setOption(e,P),n?(this[c]={silent:i},this[u]=!1):(y(this),v.update.call(this),this._zr.flush(),this[c]=!1,this[u]=!1,w.call(this,i),S.call(this,i))}},g.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},g.getModel=function(){return this._model},g.getOption=function(){return this._model&&this._model.getOption()},g.getWidth=function(){return this._zr.getWidth()},g.getHeight=function(){return this._zr.getHeight()},g.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},g.getRenderedCanvas=function(e){if(re.canvasSupported)return(e=e||{}).pixelRatio=e.pixelRatio||1,e.backgroundColor=e.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(e)},g.getSvgDataURL=function(){if(re.svgSupported){var e=this._zr,t=e.storage.getDisplayList();return Fe.each(t,(function(e){e.stopAnimation(!0)})),e.painter.toDataURL()}},g.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,i=[],r=this;a(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=r._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 a(i,(function(e){e.group.ignore=!1})),o}this.id},g.getConnectedDataURL=function(e){if(this._disposed)this.id;else if(re.canvasSupported){var t="svg"===e.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(Y[n]){var s=o,l=o,u=-1/0,c=-1/0,h=[],d=e&&e.pixelRatio||1;Fe.each(H,(function(a,o){if(a.group===n){var d=t?a.getZr().painter.getSvgDom().innerHTML:a.getRenderedCanvas(Fe.clone(e)),f=a.getDom().getBoundingClientRect();s=i(f.left,s),l=i(f.top,l),u=r(f.right,u),c=r(f.bottom,c),h.push({dom:d,left:f.left,top:f.top})}}));var f=(u*=d)-(s*=d),p=(c*=d)-(l*=d),g=Fe.createCanvas(),m=xo.init(g,{renderer:t?"svg":"canvas"});if(m.resize({width:f,height:p}),t){var v="";return a(h,(function(e){var t=e.left-s,n=e.top-l;v+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"})),m.painter.getSvgRoot().innerHTML=v,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}return e.connectedBackgroundColor&&m.add(new Jc.Rect({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),a(h,(function(e){var t=new Jc.Image({style:{x:e.left*d-s,y:e.top*d-l,image:e.dom}});m.add(t)})),m.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}},g.convertToPixel=Fe.curry(m,"convertToPixel"),g.convertFromPixel=Fe.curry(m,"convertFromPixel"),g.containPixel=function(e,t){if(!this._disposed){var n,i=this._model;return e=Po.parseFinder(i,e),Fe.each(e,(function(e,i){i.indexOf("Models")>=0&&Fe.each(e,(function(e){var a=e.coordinateSystem;if(a&&a.containPoint)n|=!!a.containPoint(t);else if("seriesModels"===i){var r=this._chartsMap[e.__viewId];r&&r.containPoint&&(n|=r.containPoint(t,e))}}),this)}),this),!!n}this.id},g.getVisual=function(e,t){var n=this._model,i=(e=Po.parseFinder(n,e,{defaultMainType:"series"})).seriesModel.getData(),a=e.hasOwnProperty("dataIndexInside")?e.dataIndexInside:e.hasOwnProperty("dataIndex")?i.indexOfRawIndex(e.dataIndex):null;return null!=a?i.getItemVisual(a,t):i.getVisual(t)},g.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},g.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]};var v={prepareAndUpdate:function(e){y(this),v.update.call(this,e)},update:function(e){var t=this._model,n=this._api,i=this._zr,a=this._coordSysMgr,r=this._scheduler;if(t){r.restoreData(t,e),r.performSeriesTasks(t),a.create(t,n),r.performDataProcessorTasks(t,e),x(this,t),a.update(t,n),T(t),r.performVisualTasks(t,e),I(this,t,n,e);var o=t.get("backgroundColor")||"transparent";if(re.canvasSupported)i.setBackgroundColor(o);else{var s=Xn.parse(o);o=Xn.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 a=[];t.eachComponent((function(r,o){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,t,i,e);l&&l.update&&a.push(s)}else a.push(s)}));var r=Fe.createHashMap();t.eachSeries((function(a){var o=n._chartsMap[a.__viewId];if(o.updateTransform){var s=o.updateTransform(a,t,i,e);s&&s.update&&r.set(a.uid,1)}else r.set(a.uid,1)})),T(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0,dirtyMap:r}),A(n,t,i,e,r),D(t,this._api)}},updateView:function(e){var t=this._model;t&&(bg.markUpdateMethod(e,"updateView"),T(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0}),I(this,this._model,this._api,e),D(t,this._api))},updateVisual:function(e){v.update.call(this,e)},updateLayout:function(e){v.update.call(this,e)}};function y(e){var t=e._model,n=e._scheduler;n.restorePipelines(t),n.prepareStageTasks(),M(e,"component",t,n),M(e,"chart",t,n),n.plan()}function _(e,t,n,i,r){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};r&&(l.subType=r);var u=n.excludeSeriesId;null!=u&&(u=Fe.createHashMap(Po.normalizeToArray(u))),o&&o.eachComponent(l,(function(t){u&&null!=u.get(t.id)||c(e["series"===i?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else a(e._componentsViews.concat(e._chartsViews),c);function c(i){i&&i.__alive&&i[t]&&i[t](i.__model,o,e._api,n)}}function x(e,t){var n=e._chartsMap,i=e._scheduler;t.eachSeries((function(e){i.updateStreamModes(e,n[e.__viewId])}))}function b(e,t){var n=e.type,i=e.escapeConnect,r=L[n],o=r.actionInfo,l=(o.update||"update").split(":"),h=l.pop();l=null!=l[0]&&s(l[0]),this[u]=!0;var d=[e],f=!1;e.batch&&(f=!0,d=Fe.map(e.batch,(function(t){return(t=Fe.defaults(Fe.extend({},t),e)).batch=null,t})));var p,g=[],m="highlight"===n||"downplay"===n;a(d,(function(e){(p=(p=r.action(e,this._model,this._api))||Fe.extend({},e)).type=o.event||p.type,g.push(p),m?_(this,h,e,"series"):l&&_(this,h,e,l.main,l.sub)}),this),"none"===h||m||l||(this[c]?(y(this),v.update.call(this,e),this[c]=!1):v[h].call(this,e)),p=f?{type:o.event||n,escapeConnect:i,batch:g}:g[0],this[u]=!1,!t&&this._messageCenter.trigger(p.type,p)}function w(e){for(var t=this._pendingActions;t.length;){var n=t.shift();b.call(this,n,e)}}function S(e){!e&&this.trigger("updated")}function M(e,t,n,i){for(var a="component"===t,r=a?e._componentsViews:e._chartsViews,o=a?e._componentsMap:e._chartsMap,l=e._zr,u=e._api,c=0;c<r.length;c++)r[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(a?sg.getClass(h.main,h.sub):bg.getClass(h.sub))).init(n,u),o[t]=c,r.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},!a&&i.prepareView(c,e,n,u)}a?n.eachComponent((function(e,t){"series"!==e&&h(t)})):n.eachSeries(h);for(c=0;c<r.length;){var d=r[c];d.__alive?c++:(!a&&d.renderTask.dispose(),l.remove(d.group),d.dispose(n,u),r.splice(c,1),delete o[d.__id],d.__id=d.group.__ecComponentInfo=null)}}function T(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function I(e,t,n,i){!function(e,t,n,i,r){a(r||e._componentsViews,(function(e){var a=e.__model;e.render(a,t,n,i),O(a,e)}))}(e,t,n,i),a(e._chartsViews,(function(e){e.__alive=!1})),A(e,t,n,i),a(e._chartsViews,(function(e){e.__alive||e.remove(t,n)}))}function A(e,t,n,i,a){var r,o=e._scheduler;t.eachSeries((function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var s=n.renderTask;o.updatePayload(s,i),a&&a.get(t.uid)&&s.dirty(),r|=s.perform(o.getPerformArgs(s)),n.group.silent=!!t.get("silent"),O(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|=r,function(e,t){var n=e._zr,i=n.storage,a=0;i.traverse((function(e){a++})),a>t.get("hoverLayerThreshold")&&!re.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),Lg(e._zr.dom,t)}function D(e,t){a(R,(function(n){n(e,t)}))}g.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&&y(this),v.update.call(this),this[u]=!1,w.call(this,i),S.call(this,i)}}},g.showLoading=function(e,t){if(this._disposed)this.id;else if(o(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),V[e]){var n=V[e](this._api,t),i=this._zr;this._loadingFX=n,i.add(n)}},g.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},g.makeActionFromEvent=function(e){var t=Fe.extend({},e);return t.type=E[e.type],t},g.dispatchAction=function(e,t){this._disposed?this.id:(o(t)||(t={silent:!!t}),L[e.type]&&this._model&&(this[u]?this._pendingActions.push(e):(b.call(this,e,t.silent),t.flush?this._zr.flush(!0):!1!==t.flush&&re.browser.weChat&&this._throttledZrFlush(),w.call(this,t.silent),S.call(this,t.silent))))},g.appendData=function(e){if(this._disposed)this.id;else{var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0}},g.on=d("on",!1),g.off=d("off",!1),g.one=d("one",!1);var C=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function O(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 k(){this.eventInfo}g._initEvents=function(){a(C,(function(e){var t=function(t){var n,i=this.getModel(),a=t.target;if("globalout"===e)n={};else if(a&&null!=a.dataIndex){var r=a.dataModel||i.getSeriesByIndex(a.seriesIndex);n=r&&r.getDataParams(a.dataIndex,a.dataType,a)||{}}else a&&a.eventData&&(n=Fe.extend({},a.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:a,packedEvent:n,model:l,view:u},this.trigger(e,n)}};t.zrEventfulCallAtLast=!0,this._zr.on(e,t,this)}),this),a(E,(function(e,t){this._messageCenter.on(t,(function(e){this.trigger(t,e)}),this)}),this)},g.isDisposed=function(){return this._disposed},g.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},g.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,Po.setAttribute(this.getDom(),W,"");var e=this._api,t=this._model;a(this._componentsViews,(function(n){n.dispose(t,e)})),a(this._chartsViews,(function(n){n.dispose(t,e)})),this._zr.dispose(),delete H[this.id]}},Fe.mixin(p,yt),k.prototype={constructor:k,normalizeQuery:function(e){var t={},n={},i={};if(Fe.isString(e)){var a=s(e);t.mainType=a.main||null,t.subType=a.sub||null}else{var r=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};Fe.each(e,(function(e,a){for(var s=!1,l=0;l<r.length;l++){var u=r[l],c=a.lastIndexOf(u);if(c>0&&c===a.length-u.length){var h=a.slice(0,c);"data"!==h&&(t.mainType=h,t[u.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(a)&&(n[a]=e,s=!0),s||(i[a]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:i}},filter:function(e,t,n){var i=this.eventInfo;if(!i)return!0;var a=i.targetEl,r=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,r,"name")&&c(u,r,"dataIndex")&&c(u,r,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,r));function c(e,t,n,i){return null==e[n]||t[i||n]===e[n]}},afterTrigger:function(){this.eventInfo=null}};var L={},E={},N=[],P=[],R=[],z=[],B={},V={},H={},Y={},F=new Date-0,G=new Date-0,W="_echarts_instance_";function j(e){Y[e]=!1}var U=j;function Z(e){return H[Po.getAttribute(e,W)]}function X(e,t){B[e]=t}function q(e){P.push(e)}function K(e,t){J(N,e,t,1e3)}function $(e,t,n){"function"==typeof t&&(n=t,t="");var a=o(e)?e.type:[e,e={event:t}][0];e.event=(e.event||a).toLowerCase(),t=e.event,i(h.test(a)&&h.test(t)),L[a]||(L[a]={action:n,actionInfo:e}),E[t]=a}function Q(e,t){J(z,e,t,3e3,"visual")}function J(e,t,n,i,a){(r(t)||o(t))&&(n=t,t=i);var s=lm.wrapStageHandler(n,a);return s.__prio=t,s.__raw=n,e.push(s),s}function ee(e,t){V[e]=t}Q(2e3,Cg),q(Jf),K(900,ip),ee("default",Ng),$({type:"highlight",event:"highlight",update:"highlight"},Fe.noop),$({type:"downplay",event:"downplay",update:"downplay"},Fe.noop),X("light",cm),X("dark",gm);t.version="4.8.0",t.dependencies={zrender:"4.3.1"},t.PRIORITY=l,t.init=function(e,t,n){var i=Z(e);if(i)return i;var r=new p(e,t,n);return r.id="ec_"+F++,H[r.id]=r,Po.setAttribute(e,W,r.id),function(e){var t="__connectUpdateStatus";function n(e,n){for(var i=0;i<e.length;i++)e[i][t]=n}a(E,(function(i,r){e._messageCenter.on(r,(function(i){if(Y[e.group]&&0!==e[t]){if(i&&i.escapeConnect)return;var r=e.makeActionFromEvent(i),o=[];a(H,(function(t){t!==e&&t.group===e.group&&o.push(t)})),n(o,0),a(o,(function(e){1!==e[t]&&e.dispatchAction(r)})),n(o,2)}}))}))}(r),r},t.connect=function(e){if(Fe.isArray(e)){var t=e;e=null,a(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+G++,a(t,(function(t){t.group=e}))}return Y[e]=!0,e},t.disConnect=j,t.disconnect=U,t.dispose=function(e){"string"==typeof e?e=H[e]:e instanceof p||(e=Z(e)),e instanceof p&&!e.isDisposed()&&e.dispose()},t.getInstanceByDom=Z,t.getInstanceById=function(e){return H[e]},t.registerTheme=X,t.registerPreprocessor=q,t.registerProcessor=K,t.registerPostUpdate=function(e){R.push(e)},t.registerAction=$,t.registerCoordinateSystem=function(e,t){Tf.register(e,t)},t.getCoordinateSystemDimensions=function(e){var t=Tf.get(e);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},t.registerLayout=function(e,t){J(z,e,t,1e3,"layout")},t.registerVisual=Q,t.registerLoading=ee,t.extendComponentModel=function(e){return sd.extend(e)},t.extendComponentView=function(e){return sg.extend(e)},t.extendSeriesModel=function(e){return ag.extend(e)},t.extendChartView=function(e){return bg.extend(e)},t.setCanvasCreator=function(e){Fe.$override("createCanvas",e)},t.registerMap=function(e,t,n){qm.registerMap(e,t,n)},t.getMap=function(e){var t=qm.retrieveMap(e);return t&&t[0]&&{geoJson:t[0].geoJSON,specialAreas:t[0].specialAreas}},t.dataTool={},function(){for(var e in Wx)Wx.hasOwnProperty(e)&&(t[e]=Wx[e])}()}));ag.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(e,t){return hy(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var Ux=Tp.retrieveRawValue;var Zx=function(e,t){var n=e.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return Ux(e,t,n[0]);if(i){for(var a=[],r=0;r<n.length;r++){var o=Ux(e,t,n[r]);a.push(o)}return a.join(" ")}},Xx={getDefaultLabel:Zx},qx=F_.createSymbol,Kx=Ch.parsePercent,$x=Xx.getDefaultLabel;function Qx(e,t,n){Jc.Group.call(this),this.updateData(e,t,n)}var Jx=Qx.prototype,eb=Qx.getSymbolSize=function(e,t){var n=e.getItemVisual(t,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};function tb(e){return[e[0]/2,e[1]/2]}function nb(e,t){this.parent.drift(e,t)}Jx._createSymbol=function(e,t,n,i,a){this.removeAll();var r=t.getItemVisual(n,"color"),o=qx(e,-1,-1,2,2,r,a);o.attr({z2:100,culling:!0,scale:tb(i)}),o.drift=nb,this._symbolType=e,this.add(o)},Jx.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(e)},Jx.getSymbolPath=function(){return this.childAt(0)},Jx.getScale=function(){return this.childAt(0).scale},Jx.highlight=function(){this.childAt(0).trigger("emphasis")},Jx.downplay=function(){this.childAt(0).trigger("normal")},Jx.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},Jx.setDraggable=function(e){var t=this.childAt(0);t.draggable=e,t.cursor=e?"move":t.cursor},Jx.updateData=function(e,t,n){this.silent=!1;var i=e.getItemVisual(t,"symbol")||"circle",a=e.hostModel,r=eb(e,t),o=i!==this._symbolType;if(o){var s=e.getItemVisual(t,"symbolKeepAspect");this._createSymbol(i,e,t,r,s)}else{(l=this.childAt(0)).silent=!1,Jc.updateProps(l,{scale:tb(r)},a,t)}if(this._updateCommon(e,t,r,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),Jc.initProps(l,c,a,t)}this._seriesModel=a};var ib=["itemStyle"],ab=["emphasis","itemStyle"],rb=["label"],ob=["emphasis","label"];function sb(e,t){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===t){var n=this.__symbolOriginalScale,i=n[1]/n[0],a={scale:[Math.max(1.1*n[0],n[0]+3),Math.max(1.1*n[1],n[1]+3*i)]};this.animateTo(a,400,"elasticOut")}else"normal"===t&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}Jx._updateCommon=function(e,t,n,i){var a=this.childAt(0),r=e.hostModel,o=e.getItemVisual(t,"color");"image"!==a.type?a.useStyle({strokeNoScale:!0}):a.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(ib).getItemStyle(["color"]),l=p.getModel(ab).getItemStyle(),u=p.getShallow("symbolOffset"),c=p.getModel(rb),h=p.getModel(ob),d=p.getShallow("hoverAnimation"),f=p.getShallow("cursor")}else l=Fe.extend({},l);var g=a.style,m=e.getItemVisual(t,"symbolRotate");a.attr("rotation",(m||0)*Math.PI/180||0),u&&a.attr("position",[Kx(u[0],n[0]),Kx(u[1],n[1])]),f&&a.attr("cursor",f),a.setColor(o,i&&i.symbolInnerColor),a.setStyle(s);var v=e.getItemVisual(t,"opacity");null!=v&&(g.opacity=v);var y=e.getItemVisual(t,"liftZ"),_=a.__z2Origin;null!=y?null==_&&(a.__z2Origin=a.z2,a.z2+=y):null!=_&&(a.z2=_,a.__z2Origin=null);var x=i&&i.useNameLabel;Jc.setLabelStyle(g,l,c,h,{labelFetcher:r,labelDataIndex:t,defaultText:function(t,n){return x?e.getName(t):$x(e,t)},isRectText:!0,autoColor:o}),a.__symbolOriginalScale=tb(n),a.hoverStyle=l,a.highDownOnUpdate=d&&r.isAnimationEnabled()?sb:null,Jc.setHoverStyle(a)},Jx.fadeOut=function(e,t){var n=this.childAt(0);this.silent=n.silent=!0,(!t||!t.keepLabel)&&(n.style.text=null),Jc.updateProps(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,e)},Fe.inherits(Qx,Jc.Group);var lb=Qx,ub=Fe.isObject;function cb(e){this.group=new Jc.Group,this._symbolCtor=e||lb}var hb=cb.prototype;function db(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 fb(e){return null==e||ub(e)||(e={isIgnore:e}),e||{}}function pb(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")}}hb.updateData=function(e,t){t=fb(t);var n=this.group,i=e.hostModel,a=this._data,r=this._symbolCtor,o=pb(e);a||n.removeAll(),e.diff(a).add((function(i){var a=e.getItemLayout(i);if(db(e,a,i,t)){var s=new r(e,i,o);s.attr("position",a),e.setItemGraphicEl(i,s),n.add(s)}})).update((function(s,l){var u=a.getItemGraphicEl(l),c=e.getItemLayout(s);db(e,c,s,t)?(u?(u.updateData(e,s,o),Jc.updateProps(u,{position:c},i)):(u=new r(e,s)).attr("position",c),n.add(u),e.setItemGraphicEl(s,u)):n.remove(u)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}))})).execute(),this._data=e},hb.isPersistent=function(){return!0},hb.updateLayout=function(){var e=this._data;e&&e.eachItemGraphicEl((function(t,n){var i=e.getItemLayout(n);t.attr("position",i)}))},hb.incrementalPrepareUpdate=function(e){this._seriesScope=pb(e),this._data=null,this.group.removeAll()},hb.incrementalUpdate=function(e,t,n){function i(e){e.isGroup||(e.incremental=e.useHoverLayer=!0)}n=fb(n);for(var a=e.start;a<e.end;a++){var r=t.getItemLayout(a);if(db(t,r,a,n)){var o=new this._symbolCtor(t,a,this._seriesScope);o.traverse(i),o.attr("position",r),this.group.add(o),t.setItemGraphicEl(a,o)}}},hb.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 gb=cb,mb=iy.isDimensionStacked,vb=Fe.map;var yb={prepareDataCoordInfo:function(e,t,n){var i,a=e.getBaseAxis(),r=e.getOtherAxis(a),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}(r,n),s=a.dim,l=r.dim,u=t.mapDimension(l),c=t.mapDimension(s),h="x"===l||"radius"===l?1:0,d=vb(e.dimensions,(function(e){return t.mapDimension(e)})),f=t.getCalculationInfo("stackResultDimension");return(i|=mb(t,d[0]))&&(d[0]=f),(i|=mb(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 a=NaN;e.stacked&&(a=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(a)&&(a=e.valueStart);var r=e.baseDataOffset,o=[];return o[r]=n.get(e.baseDim,i),o[1-r]=a,t.dataToPoint(o)}},_b=yb.prepareDataCoordInfo,xb=yb.getStackedOnPoint;var bb=function(e,t,n,i,a,r,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=_b(a,t,o),v=_b(r,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 S=_.idx;u.push(a.dataToPoint([t.get(m.dataDimsForPoint[0],S),t.get(m.dataDimsForPoint[1],S)])),c.push(t.getItemLayout(S).slice()),h.push(xb(m,a,t,S)),d.push(i[S]),g.push(t.getRawIndex(S));break;case"-":S=_.idx;var M=e.getRawIndex(S);M!==S?(u.push(e.getItemLayout(S)),c.push(r.dataToPoint([e.get(v.dataDimsForPoint[0],S),e.get(v.dataDimsForPoint[1],S)])),h.push(n[S]),d.push(xb(v,r,e,S)),g.push(M)):x=!1}x&&(f.push(_),p.push(p.length))}p.sort((function(e,t){return g[e]-g[t]}));var T=[],I=[],A=[],D=[],C=[];for(y=0;y<p.length;y++){S=p[y];T[y]=u[S],I[y]=c[S],A[y]=h[S],D[y]=d[S],C[y]=f[S]}return{current:T,next:I,stackedOnCurrent:A,stackedOnNext:D,status:C}},wb=ht.min,Sb=ht.max,Mb=ht.scaleAndAdd,Tb=ht.copy,Ib=[],Ab=[],Db=[];function Cb(e){return isNaN(e[0])||isNaN(e[1])}function Ob(e,t,n,i,a,r,o,s,l,u,c){return"none"!==u&&u?kb.apply(this,arguments):Lb.apply(this,arguments)}function kb(e,t,n,i,a,r,o,s,l,u,c){for(var h=0,d=n,f=0;f<i;f++){var p=t[d];if(d>=a||d<0)break;if(Cb(p)){if(c){d+=r;continue}break}if(d===n)e[r>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;Tb(Ab,g),Ab[m]=g[m]+v,Tb(Db,p),Db[m]=p[m]-v,e.bezierCurveTo(Ab[0],Ab[1],Db[0],Db[1],p[0],p[1])}else e.lineTo(p[0],p[1]);h=d,d+=r}return f}function Lb(e,t,n,i,a,r,o,s,l,u,c){for(var h=0,d=n,f=0;f<i;f++){var p=t[d];if(d>=a||d<0)break;if(Cb(p)){if(c){d+=r;continue}break}if(d===n)e[r>0?"moveTo":"lineTo"](p[0],p[1]),Tb(Ab,p);else if(l>0){var g=d+r,m=t[g];if(c)for(;m&&Cb(t[g]);)m=t[g+=r];var v=.5,y=t[h];if(!(m=t[g])||Cb(m))Tb(Db,p);else{var _,x;if(Cb(m)&&!c&&(m=p),ht.sub(Ib,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 _=ht.dist(p,y),x=ht.dist(p,m);Mb(Db,p,Ib,-l*(1-(v=x/(x+_))))}wb(Ab,Ab,s),Sb(Ab,Ab,o),wb(Db,Db,s),Sb(Db,Db,o),e.bezierCurveTo(Ab[0],Ab[1],Db[0],Db[1],p[0],p[1]),Mb(Ab,p,Ib,l*v)}else e.lineTo(p[0],p[1]);h=d,d+=r}return f}function Eb(e,t){var n=[1/0,1/0],i=[-1/0,-1/0];if(t)for(var a=0;a<e.length;a++){var r=e[a];r[0]<n[0]&&(n[0]=r[0]),r[1]<n[1]&&(n[1]=r[1]),r[0]>i[0]&&(i[0]=r[0]),r[1]>i[1]&&(i[1]=r[1])}return{min:t?n:i,max:t?i:n}}var Nb=xl.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:jl(xl.prototype.brush),buildPath:function(e,t){var n=t.points,i=0,a=n.length,r=Eb(n,t.smoothConstraint);if(t.connectNulls){for(;a>0&&Cb(n[a-1]);a--);for(;i<a&&Cb(n[i]);i++);}for(;i<a;)i+=Ob(e,n,i,a,a,1,r.min,r.max,t.smooth,t.smoothMonotone,t.connectNulls)+1}}),Pb=xl.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:jl(xl.prototype.brush),buildPath:function(e,t){var n=t.points,i=t.stackedOnPoints,a=0,r=n.length,o=t.smoothMonotone,s=Eb(n,t.smoothConstraint),l=Eb(i,t.smoothConstraint);if(t.connectNulls){for(;r>0&&Cb(n[r-1]);r--);for(;a<r&&Cb(n[a]);a++);}for(;a<r;){var u=Ob(e,n,a,r,r,1,s.min,s.max,t.smooth,o,t.connectNulls);Ob(e,i,a+u-1,u,r,-1,l.min,l.max,t.stackedOnSmooth,o,t.connectNulls),a+=u+1,e.closePath()}}}),Rb={Polyline:Nb,Polygon:Pb},zb=Ch.round;function Bb(e,t,n){var i=e.getArea(),a=e.getBaseAxis().isHorizontal(),r=i.x,o=i.y,s=i.width,l=i.height,u=n.get("lineStyle.width")||2;r-=u/2,o-=u/2,s+=u,l+=u,r=Math.floor(r),s=Math.round(s);var c=new Jc.Rect({shape:{x:r,y:o,width:s,height:l}});return t&&(c.shape[a?"width":"height"]=0,Jc.initProps(c,{shape:{width:s,height:l}},n)),c}function Vb(e,t,n){var i=e.getArea(),a=new Jc.Sector({shape:{cx:zb(e.cx,1),cy:zb(e.cy,1),r0:zb(i.r0,1),r:zb(i.r,1),startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return t&&(a.shape.endAngle=i.startAngle,Jc.initProps(a,{shape:{endAngle:i.endAngle}},n)),a}var Hb={createGridClipPath:Bb,createPolarClipPath:Vb,createClipPath:function(e,t,n){return e?"polar"===e.type?Vb(e,t,n):"cartesian2d"===e.type?Bb(e,t,n):null:null}},Yb=Ns.fromPoints,Fb=Rb.Polyline,Gb=Rb.Polygon,Wb=yb.prepareDataCoordInfo,jb=yb.getStackedOnPoint,Ub=Hb.createGridClipPath,Zb=Hb.createPolarClipPath;function Xb(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++){var i=e[n],a=t[n];if(i[0]!==a[0]||i[1]!==a[1])return}return!0}}function qb(e,t){var n=[],i=[],a=[],r=[];return Yb(e,n,i),Yb(t,a,r),Math.max(Math.abs(n[0]-a[0]),Math.abs(n[1]-a[1]),Math.abs(i[0]-r[0]),Math.abs(i[1]-r[1]))}function Kb(e){return"number"==typeof e?e:e?.5:0}function $b(e,t,n){for(var i=t.getBaseAxis(),a="x"===i.dim||"radius"===i.dim?0:1,r=[],o=0;o<e.length-1;o++){var s=e[o+1],l=e[o];r.push(l);var u=[];switch(n){case"end":u[a]=s[a],u[1-a]=l[1-a],r.push(u);break;case"middle":var c=(l[a]+s[a])/2,h=[];u[a]=h[a]=c,u[1-a]=l[1-a],h[1-a]=s[1-a],r.push(u),r.push(h);break;default:u[a]=l[a],u[1-a]=s[1-a],r.push(u)}}return e[o]&&r.push(e[o]),r}function Qb(e,t,n){var i=e.get("showAllSymbol"),a="auto"===i;if(!i||a){var r=n.getAxesByScale("ordinal")[0];if(r&&(!a||!function(e,t){var n=e.getExtent(),i=Math.abs(n[1]-n[0])/e.scale.count();isNaN(i)&&(i=0);for(var a=t.count(),r=Math.max(1,Math.round(a/5)),o=0;o<a;o+=r)if(1.5*lb.getSymbolSize(t,o)[e.isHorizontal()?1:0]>i)return!1;return!0}(r,t))){var o=t.mapDimension(r.dim),s={};return Fe.each(r.getViewLabels(),(function(e){s[e.tickValue]=1})),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function Jb(e,t,n){if("cartesian2d"===e.type){var i=e.getBaseAxis().isHorizontal(),a=Ub(e,t,n);if(!n.get("clip",!0)){var r=a.shape,o=Math.max(r.width,r.height);i?(r.y-=o,r.height+=2*o):(r.x-=o,r.width+=2*o)}return a}return Zb(e,t,n)}bg.extend({type:"line",init:function(){var e=new Jc.Group,t=new gb;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},render:function(e,t,n){var i=e.coordinateSystem,a=this.group,r=e.getData(),o=e.getModel("lineStyle"),s=e.getModel("areaStyle"),l=r.mapArray(r.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=[],a=0,r=t.count();a<r;a++)i.push(jb(n,e,t,a));return i}(i,r,Wb(i,r,v)),_=e.get("showSymbol"),x=_&&!u&&Qb(e,r,i),b=this._data;b&&b.eachItemGraphicEl((function(e,t){e.__temp&&(a.remove(e),b.setItemGraphicEl(t,null))})),_||h.remove(),a.add(p);var w,S=!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&&S===this._step?(m&&!f?f=this._newPolygon(l,y,i,g):f&&!m&&(p.remove(f),f=this._polygon=null),p.setClipPath(Jb(i,!1,e)),_&&h.updateData(r,{isIgnore:x,clipShape:w}),r.eachItemGraphicEl((function(e){e.stopAnimation(!0)})),Xb(this._stackedOnPoints,y)&&Xb(this._points,l)||(g?this._updateAnimation(r,y,i,n,S,v):(S&&(l=$b(l,i,S),y=$b(y,i,S)),d.setShape({points:l}),f&&f.setShape({points:l,stackedOnPoints:y})))):(_&&h.updateData(r,{isIgnore:x,clipShape:w}),S&&(l=$b(l,i,S),y=$b(y,i,S)),d=this._newPolyline(l,i,g),m&&(f=this._newPolygon(l,y,i,g)),p.setClipPath(Jb(i,!0,e)));var M=function(e,t){var n=e.getVisual("visualMeta");if(n&&n.length&&e.count()&&"cartesian2d"===t.type){for(var i,a,r=n.length-1;r>=0;r--){var o=n[r].dimension,s=e.dimensions[o],l=e.getDimensionInfo(s);if("x"===(i=l&&l.coordDim)||"y"===i){a=n[r];break}}if(a){var u=t.getAxis(i),c=Fe.map(a.stops,(function(e){return{coord:u.toGlobalCoord(u.dataToCoord(e.value)),color:e.color}})),h=c.length,d=a.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";Fe.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 Jc.LinearGradient(0,0,0,0,c,!0);return m[i]=f,m[i+"2"]=p,m}}}(r,i)||r.getVisual("color");d.useStyle(Fe.defaults(o.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var T=e.get("smooth");if(T=Kb(e.get("smooth")),d.setShape({smooth:T,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")}),f){var I=r.getCalculationInfo("stackedOnSeries"),A=0;f.useStyle(Fe.defaults(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),I&&(A=Kb(I.get("smooth"))),f.setShape({smooth:T,stackedOnSmooth:A,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")})}this._data=r,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(e,t,n,i){var a=e.getData(),r=Po.queryDataIndex(a,i);if(!(r instanceof Array)&&null!=r&&r>=0){var o=a.getItemGraphicEl(r);if(!o){var s=a.getItemLayout(r);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(o=new lb(a,r)).position=s,o.setZ(e.get("zlevel"),e.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,a.setItemGraphicEl(r,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else bg.prototype.highlight.call(this,e,t,n,i)},downplay:function(e,t,n,i){var a=e.getData(),r=Po.queryDataIndex(a,i);if(null!=r&&r>=0){var o=a.getItemGraphicEl(r);o&&(o.__temp?(a.setItemGraphicEl(r,null),this.group.remove(o)):o.downplay())}else bg.prototype.downplay.call(this,e,t,n,i)},_newPolyline:function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new Fb({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 Gb({shape:{points:e,stackedOnPoints:t},silent:!0}),this._lineGroup.add(n),this._polygon=n,n},_updateAnimation:function(e,t,n,i,a,r){var o=this._polyline,s=this._polygon,l=e.hostModel,u=bb(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,r),c=u.current,h=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;if(a&&(c=$b(u.current,n,a),h=$b(u.stackedOnCurrent,n,a),d=$b(u.next,n,a),f=$b(u.stackedOnNext,n,a)),qb(c,d)>3e3||s&&qb(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,Jc.updateProps(o,{shape:{points:d}},l),s&&(s.setShape({points:c,stackedOnPoints:h}),Jc.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 ew=Fe.isFunction;var tw=function(e,t,n){return{seriesType:e,performRawSeries:!0,reset:function(e,i,a){var r=e.getData(),o=e.get("symbol"),s=e.get("symbolSize"),l=e.get("symbolKeepAspect"),u=e.get("symbolRotate"),c=ew(o),h=ew(s),d=ew(u),f=c||h||d,p=!c&&o?o:t,g=h?null:s;if(r.setVisual({legendSymbol:n||p,symbol:p,symbolSize:g,symbolKeepAspect:l,symbolRotate:u}),!i.isSeriesFiltered(e))return{dataEach:r.hasItemOption||f?function(t,n){if(f){var i=e.getRawValue(n),a=e.getDataParams(n);c&&t.setItemVisual(n,"symbol",o(i,a)),h&&t.setItemVisual(n,"symbolSize",s(i,a)),d&&t.setItemVisual(n,"symbolRotate",u(i,a))}if(t.hasItemOption){var r=t.getItemModel(n),l=r.getShallow("symbol",!0),p=r.getShallow("symbolSize",!0),g=r.getShallow("symbolRotate",!0),m=r.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}}}},nw=Fe.map,iw=iy.isDimensionStacked;var aw=function(e){return{seriesType:e,plan:ug(),reset:function(e){var t=e.getData(),n=e.coordinateSystem,i=e.pipelineContext.large;if(n){var a=nw(n.dimensions,(function(e){return t.mapDimension(e)})).slice(0,2),r=a.length,o=t.getCalculationInfo("stackResultDimension");return iw(t,a[0])&&(a[0]=o),iw(t,a[1])&&(a[1]=o),r&&{progress:function(e,t){for(var o=e.end-e.start,s=i&&new Float32Array(o*r),l=e.start,u=0,c=[],h=[];l<e.end;l++){var d;if(1===r){var f=t.get(a[0],l);d=!isNaN(f)&&n.dataToPoint(f,null,h)}else{f=c[0]=t.get(a[0],l);var p=c[1]=t.get(a[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)}}}}}},rw={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]}},ow=function(e,t){return Math.round(e.length/2)};var sw=function(e){return{seriesType:e,modifyOutputEnd:!0,reset:function(e,t,n){var i=e.getData(),a=e.get("sampling"),r=e.coordinateSystem;if("cartesian2d"===r.type&&a){var o,s=r.getBaseAxis(),l=r.getOtherAxis(s),u=s.getExtent(),c=u[1]-u[0],h=Math.round(i.count()/c);if(h>1)"string"==typeof a?o=rw[a]:"function"==typeof a&&(o=a),o&&e.setData(i.downSample(i.mapDimension(l.dim),1/h,o,ow))}}}};function lw(e){return this._axes[e]}var uw=function(e){this._axes={},this._dimList=[],this.name=e||""};uw.prototype={constructor:uw,type:"cartesian",getAxis:function(e){return this._axes[e]},getAxes:function(){return Fe.map(this._dimList,lw,this)},getAxesByScale:function(e){return e=e.toLowerCase(),Fe.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?[]:{},a=0;a<n.length;a++){var r=n[a],o=this._axes[r];i[r]=o[t](e[r])}return i}};var cw=uw;function hw(e){cw.call(this,e)}hw.prototype={constructor:hw,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"),a=this.getAxis("y");return(n=n||[])[0]=i.toGlobalCoord(i.dataToCoord(e[0])),n[1]=a.toGlobalCoord(a.dataToCoord(e[1])),n},clampData:function(e,t){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,a=n.getExtent(),r=i.getExtent(),o=n.parse(e[0]),s=i.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(a[0],a[1]),o),Math.max(a[0],a[1])),t[1]=Math.min(Math.max(Math.min(r[0],r[1]),s),Math.max(r[0],r[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]),a=Math.max(e[0],e[1])-n,r=Math.max(t[0],t[1])-i;return new Ni(n,i,a,r)}},Fe.inherits(hw,cw);var dw=hw,fw=function(e,t,n,i,a){Ax.call(this,e,t,n),this.type=i||"value",this.position=a||"bottom"};fw.prototype={constructor:fw,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},Fe.inherits(fw,Ax);var pw=fw,gw={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)"]}}},mw={};mw.categoryAxis=Fe.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},gw),mw.valueAxis=Fe.merge({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},gw),mw.timeAxis=Fe.defaults({scale:!0,min:"dataMin",max:"dataMax"},mw.valueAxis),mw.logAxis=Fe.defaults({scale:!0,logBase:10},mw.valueAxis);var vw=mw,yw=td.getLayoutParams,_w=td.mergeLayoutParam,xw=["value","category","time","log"];var bw=function(e,t,n,i){Fe.each(xw,(function(a){t.extend({type:e+"Axis."+a,mergeDefaultAndTheme:function(t,i){var r=this.layoutMode,o=r?yw(t):{},s=i.getTheme();Fe.merge(t,s.get(a+"Axis")),Fe.merge(t,this.getDefaultOption()),t.type=n(e,t),r&&_w(t,o,r)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=by.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:Fe.mergeAll([{},vw[a+"Axis"],i],!0)})})),sd.registerSubTypeDefaulter(e+"Axis",Fe.curry(n,e))},ww=sd.extend({type:"cartesian2dAxis",axis:null,init:function(){ww.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){ww.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){ww.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Sw(e,t){return t.type||(t.data?"category":"value")}Fe.merge(ww.prototype,O_);var Mw={offset:0};bw("x",ww,Sw,Mw),bw("y",ww,Sw,Mw),sd.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 Tw=Fe.isObject,Iw=Fe.each,Aw=Fe.map,Dw=Fe.indexOf,Cw=td.getLayoutRect,Ow=D_.createScaleByModel,kw=D_.ifAxisCrossZero,Lw=D_.niceScaleExtent,Ew=D_.estimateLabelUnionRect,Nw=iy.getStackedDimension;function Pw(e,t,n){return e.getCoordSysModel()===t}function Rw(e,t,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(e,t,n),this.model=e}var zw=Rw.prototype;function Bw(e,t,n,i){n.getAxesOnZeroOf=function(){return a?[a]:[]};var a,r=e[t],o=n.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)Vw(r[l])&&(a=r[l]);else for(var u in r)if(r.hasOwnProperty(u)&&Vw(r[u])&&!i[c(r[u])]){a=r[u];break}a&&(i[c(a)]=!0)}function c(e){return e.dim+"_"+e.index}}function Vw(e){return e&&"category"!==e.type&&"time"!==e.type&&kw(e)}zw.type="grid",zw.axisPointerEnabled=!0,zw.getRect=function(){return this._rect},zw.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model),Iw(n.x,(function(e){Lw(e.scale,e.model)})),Iw(n.y,(function(e){Lw(e.scale,e.model)}));var i={};Iw(n.x,(function(e){Bw(n,"y",e,i)})),Iw(n.y,(function(e){Bw(n,"x",e,i)})),this.resize(this.model,t)},zw.resize=function(e,t,n){var i=Cw(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});this._rect=i;var a=this._axesList;function r(){Iw(a,(function(e){var t=e.isHorizontal(),n=t?[0,i.width]:[0,i.height],a=e.inverse?1:0;e.setExtent(n[a],n[1-a]),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)}))}r(),!n&&e.get("containLabel")&&(Iw(a,(function(e){if(!e.model.get("axisLabel.inside")){var t=Ew(e);if(t){var n=e.isHorizontal()?"height":"width",a=e.model.get("axisLabel.margin");i[n]-=t[n]+a,"top"===e.position?i.y+=t.height+a:"left"===e.position&&(i.x+=t.width+a)}}})),r())},zw.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]}},zw.getAxes=function(){return this._axesList.slice()},zw.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}Tw(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===e||a[i].getAxis("y").index===t)return a[i]},zw.getCartesians=function(){return this._coordsList.slice()},zw.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},zw.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},zw._findConvertTarget=function(e,t){var n,i,a=t.seriesModel,r=t.xAxisModel||a&&a.getReferringComponents("xAxis")[0],o=t.yAxisModel||a&&a.getReferringComponents("yAxis")[0],s=t.gridModel,l=this._coordsList;if(a)n=a.coordinateSystem,Dw(l,n)<0&&(n=null);else if(r&&o)n=this.getCartesian(r.componentIndex,o.componentIndex);else if(r)i=this.getAxis("x",r.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}},zw.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},zw._initCartesian=function(e,t,n){var i={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},r={x:0,y:0};if(t.eachComponent("xAxis",o("x"),this),t.eachComponent("yAxis",o("y"),this),!r.x||!r.y)return this._axesMap={},void(this._axesList=[]);function o(t){return function(n,o){if(Pw(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 pw(t,Ow(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),a[t][o]=l,r[t]++}}}this._axesMap=a,Iw(a.x,(function(t,n){Iw(a.y,(function(i,a){var r="x"+n+"y"+a,o=new dw(r);o.grid=this,o.model=e,this._coordsMap[r]=o,this._coordsList.push(o),o.addAxis(t),o.addAxis(i)}),this)}),this)},zw._updateScale=function(e,t){function n(e,t,n){Iw(e.mapDimension(t.dim,!0),(function(n){t.scale.unionExtentFromData(e,Nw(e,n))}))}Iw(this._axesList,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeries((function(e){if(Fw(e)){var i=Yw(e),a=i[0],r=i[1];if(!Pw(a,t)||!Pw(r,t))return;var o=this.getCartesian(a.componentIndex,r.componentIndex),s=e.getData(),l=o.getAxis("x"),u=o.getAxis("y");"list"===s.type&&(n(s,l),n(s,u))}}),this)},zw.getTooltipAxes=function(e){var t=[],n=[];return Iw(this.getCartesians(),(function(i){var a=null!=e&&"auto"!==e?i.getAxis(e):i.getBaseAxis(),r=i.getOtherAxis(a);Dw(t,a)<0&&t.push(a),Dw(n,r)<0&&n.push(r)})),{baseAxes:t,otherAxes:n}};var Hw=["xAxis","yAxis"];function Yw(e,t){return Aw(Hw,(function(t){return e.getReferringComponents(t)[0]}))}function Fw(e){return"cartesian2d"===e.get("coordinateSystem")}Rw.create=function(e,t){var n=[];return e.eachComponent("grid",(function(i,a){var r=new Rw(i,e,t);r.name="grid_"+a,r.resize(i,t,!0),i.coordinateSystem=r,n.push(r)})),e.eachSeries((function(e){if(Fw(e)){var t=Yw(e),n=t[0],i=t[1],a=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=a.getCartesian(n.componentIndex,i.componentIndex)}})),n},Rw.dimensions=Rw.prototype.dimensions=dw.prototype.dimensions,Tf.register("cartesian2d",Rw);var Gw=Fe.retrieve,Ww=Fe.defaults,jw=Fe.extend,Uw=Fe.each,Zw=Ch.isRadianAroundZero,Xw=Ch.remRadian,qw=F_.createSymbol,Kw=ht.applyTransform,$w=D_.shouldShowAllLabels,Qw=Math.PI,Jw=function(e,t){this.opt=t,this.axisModel=e,Ww(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new Jc.Group;var n=new Jc.Group({position:t.position.slice(),rotation:t.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n};Jw.prototype={constructor:Jw,hasBuilder:function(e){return!!eS[e]},add:function(e){eS[e].call(this)},getGroup:function(){return this.group}};var eS={axisLine:function(){var e=this.opt,t=this.axisModel;if(t.get("axisLine.show")){var n=this.axisModel.axis.getExtent(),i=this._transform,a=[n[0],0],r=[n[1],0];i&&(Kw(a,a,i),Kw(r,r,i));var o=jw({lineCap:"round"},t.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new Jc.Line({anid:"line",subPixelOptimize:!0,shape:{x1:a[0],y1:a[1],x2:r[0],y2:r[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];Uw([{rotate:e.rotation+Math.PI/2,offset:u[0],r:0},{rotate:e.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((a[0]-r[0])*(a[0]-r[0])+(a[1]-r[1])*(a[1]-r[1]))}],(function(t,n){if("none"!==s[n]&&null!=s[n]){var i=qw(s[n],-c/2,-h/2,c,h,o.stroke,!0),r=t.r+t.offset,l=[a[0]+r*Math.cos(e.rotation),a[1]-r*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,a=t.getModel("axisTick");if(!a.get("show")||i.scale.isBlank())return;for(var r=a.getModel("lineStyle"),o=n.tickDirection*a.get("length"),s=sS(i.getTicksCoords(),e._transform,o,Ww(r.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,a=Gw(n.axisLabelShow,t.get("axisLabel.show"));if(!a||i.scale.isBlank())return;var r=t.getModel("axisLabel"),o=r.get("margin"),s=i.getViewLabels(),l=(Gw(n.labelRotate,r.get("rotate"))||0)*Qw/180,u=nS(n.rotation,l,n.labelDirection),c=t.getCategories&&t.getCategories(!0),h=[],d=iS(t),f=t.get("triggerEvent");return Uw(s,(function(a,s){var l=a.tickValue,p=a.formattedLabel,g=a.rawLabel,m=r;c&&c[l]&&c[l].textStyle&&(m=new ph(c[l].textStyle,r,t.ecModel));var v=m.getTextColor()||t.get("axisLine.lineStyle.color"),y=[i.dataToCoord(l),n.labelOffset+n.labelDirection*o],_=new Jc.Text({anid:"label_"+l,position:y,rotation:u.rotation,silent:d,z2:10});Jc.setTextStyle(_.style,m,{text:p,textAlign:m.getShallow("align",!0)||u.textAlign,textVerticalAlign:m.getShallow("verticalAlign",!0)||m.getShallow("baseline",!0)||u.textVerticalAlign,textFill:"function"==typeof v?v("category"===i.type?g:"value"===i.type?l+"":l,s):v}),f&&(_.eventData=tS(t),_.eventData.targetType="axisLabel",_.eventData.value=g),e._dumbGroup.add(_),_.updateTransform(),h.push(_),e.group.add(_),_.decomposeTransform()})),h}(this,e,t);!function(e,t,n){if($w(e.axis))return;var i=e.get("axisLabel.showMinLabel"),a=e.get("axisLabel.showMaxLabel");t=t||[],n=n||[];var r=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?(aS(r),aS(u)):rS(r,o)&&(i?(aS(o),aS(c)):(aS(r),aS(u)));!1===a?(aS(s),aS(h)):rS(l,s)&&(a?(aS(l),aS(d)):(aS(s),aS(h)))}(e,i,n),function(e,t,n){var i=t.axis,a=t.getModel("minorTick");if(!a.get("show")||i.scale.isBlank())return;var r=i.getMinorTicksCoords();if(!r.length)return;for(var o=a.getModel("lineStyle"),s=n.tickDirection*a.get("length"),l=Ww(o.getLineStyle(),Ww(t.getModel("axisTick").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})),u=0;u<r.length;u++)for(var c=sS(r[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=Gw(e.axisName,t.get("name"));if(n){var i,a,r=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"===r?u[0]-c*l:"end"===r?u[1]+c*l:(u[0]+u[1])/2,oS(r)?e.labelOffset+o*l:0],d=t.get("nameRotate");null!=d&&(d=d*Qw/180),oS(r)?i=nS(e.rotation,null!=d?d:e.rotation,o):(i=function(e,t,n,i){var a,r,o=Xw(n-e.rotation),s=i[0]>i[1],l="start"===t&&!s||"start"!==t&&s;Zw(o-Qw/2)?(r=l?"bottom":"top",a="center"):Zw(o-1.5*Qw)?(r=l?"top":"bottom",a="center"):(r="middle",a=o<1.5*Qw&&o>Qw/2?l?"left":"right":l?"right":"left");return{rotation:o,textAlign:a,textVerticalAlign:r}}(e,r,d||0,u),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(i.rotation)),!isFinite(a)&&(a=null)));var f=s.getFont(),p=t.get("nameTruncate",!0)||{},g=p.ellipsis,m=Gw(e.nameTruncateMaxWidth,p.maxWidth,a),v=null!=g&&null!=m?Fh.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 Jc.Text({anid:"name",__fullText:n,__truncatedText:v,position:h,rotation:i.rotation,silent:iS(t),z2:1,tooltip:y&&y.show?jw({content:n,formatter:function(){return n},formatterParams:x},y):null});Jc.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=tS(t),b.eventData.targetType="axisName",b.eventData.name=n),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},tS=Jw.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},nS=Jw.innerTextLayout=function(e,t,n){var i,a,r=Xw(t-e);return Zw(r)?(a=n>0?"top":"bottom",i="center"):Zw(r-Qw)?(a=n>0?"bottom":"top",i="center"):(a="middle",i=r>0&&r<Qw?n>0?"right":"left":n>0?"left":"right"),{rotation:r,textAlign:i,textVerticalAlign:a}};var iS=Jw.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)};function aS(e){e&&(e.ignore=!0)}function rS(e,t,n){var i=e&&e.getBoundingRect().clone(),a=t&&t.getBoundingRect().clone();if(i&&a){var r=sn.identity([]);return sn.rotate(r,r,-e.rotation),i.applyTransform(sn.mul([],r,e.getLocalTransform())),a.applyTransform(sn.mul([],r,t.getLocalTransform())),i.intersect(a)}}function oS(e){return"middle"===e||"center"===e}function sS(e,t,n,i,a){for(var r=[],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&&(Kw(o,o,t),Kw(s,s,t));var c=new Jc.Line({anid:a+"_"+e[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:i,z2:2,silent:!0});r.push(c)}return r}var lS=Jw,uS=Fe.each,cS=Fe.curry;function hS(e,t){return"all"===e||Fe.isArray(e)&&Fe.indexOf(e,t)>=0||e===t}function dS(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[pS(e)]}function fS(e){return!!e.get("handle.show")}function pS(e){return e.type+"||"+e.id}var gS=function(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var i=t.getComponent("tooltip"),a=t.getComponent("axisPointer"),r=a.get("link",!0)||[],o=[];uS(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=pS(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",i);if(uS(n.getAxes(),cS(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)&&uS(d.baseAxes,cS(f,!h||"cross",c)),h&&uS(d.otherAxes,cS(f,"cross",!1))}}function f(i,s,c){var h=c.model.getModel("axisPointer",a),d=h.get("show");if(d&&("auto"!==d||i||fS(h))){null==s&&(s=h.get("triggerTooltip")),h=i?function(e,t,n,i,a,r){var o=t.getModel("axisPointer"),s={};uS(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=Fe.clone(o.get(e))})),s.snap="category"!==e.type&&!!r,"cross"===o.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===a){var u=o.get("label.show");if(l.show=null==u||u,!r){var c=s.lineStyle=o.get("crossStyle");c&&Fe.defaults(l,c.textStyle)}}return e.model.getModel("axisPointer",new ph(s,n,i))}(c,u,a,t,i,s):h;var f=h.get("snap"),p=pS(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:fS(h),seriesModels:[]};l[p]=m,e.seriesInvolved|=g;var v=function(e,t){for(var n=t.model,i=t.dim,a=0;a<e.length;a++){var r=e[a]||{};if(hS(r[i+"AxisId"],n.id)||hS(r[i+"AxisIndex"],n.componentIndex)||hS(r[i+"AxisName"],n.name))return a}}(r,c);if(null!=v){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[p]=m,y.mapper=r[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),a=t.get("tooltip.show",!0);n&&"none"!==i&&!1!==i&&"item"!==i&&!1!==a&&!1!==t.get("axisPointer.show",!0)&&uS(e.coordSysAxesInfo[pS(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},mS=function(e){var t=dS(e);if(t){var n=t.axisPointerModel,i=t.axis.scale,a=n.option,r=n.get("status"),o=n.get("value");null!=o&&(o=i.parse(o));var s=fS(n);null==r&&(a.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]),a.value=o,s&&(a.status=t.axis.scale.isBlank()?"hide":"show")}},vS={collect:gS,fixValue:mS,getAxisInfo:dS,getAxisPointerModel:function(e){var t=dS(e);return t&&t.axisPointerModel},makeKey:pS},yS=jx.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(e,t,n,i){this.axisPointerClass&&vS.fixValue(e),yS.superApply(this,"render",arguments),_S(this,e,t,n,i,!0)},updateAxisPointer:function(e,t,n,i,a){_S(this,e,t,n,i,!1)},remove:function(e,t){var n=this._axisPointer;n&&n.remove(t),yS.superApply(this,"remove",arguments)},dispose:function(e,t){xS(this,t),yS.superApply(this,"dispose",arguments)}});function _S(e,t,n,i,a,r){var o=yS.getAxisPointerClass(e.axisPointerClass);if(o){var s=vS.getAxisPointerModel(t);s?(e._axisPointer||(e._axisPointer=new o)).render(t,s,i,r):xS(e,i)}}function xS(e,t,n){var i=e._axisPointer;i&&i.dispose(t,n),e._axisPointer=null}var bS=[];yS.registerAxisPointerClass=function(e,t){bS[e]=t},yS.getAxisPointerClass=function(e){return e&&bS[e]};var wS=yS;var SS=function(e,t,n){n=n||{};var i=e.coordinateSystem,a=t.axis,r={},o=a.getAxesOnZeroOf()[0],s=a.position,l=o?"onZero":s,u=a.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])}r.position=["y"===u?p[d[l]]:h[0],"x"===u?p[d[l]]:h[3]],r.rotation=Math.PI/2*("x"===u?0:1),r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],r.labelOffset=o?p[d[s]]-p[d.onZero]:0,t.get("axisTick.inside")&&(r.tickDirection=-r.tickDirection),Fe.retrieve(n.labelInside,t.get("axisLabel.inside"))&&(r.labelDirection=-r.labelDirection);var m=t.get("axisLabel.rotate");return r.labelRotate="top"===l?-m:m,r.z2=1,r},MS={layout:SS};var TS=function(e,t,n,i){var a=n.axis;if(!a.scale.isBlank()){var r=n.getModel("splitArea"),o=r.getModel("areaStyle"),s=o.get("color"),l=i.coordinateSystem.getRect(),u=a.getTicksCoords({tickModel:r,clamp:!0});if(u.length){var c=s.length,h=e.__splitAreaColors,d=Fe.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=a.toGlobalCoord(u[0].coord),v=o.getAreaStyle();s=Fe.isArray(s)?s:[s];for(p=1;p<u.length;p++){var y,_,x,b,w=a.toGlobalCoord(u[p].coord);a.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 S=u[p-1].tickValue;null!=S&&d.set(S,f),t.add(new Jc.Rect({anid:null!=S?"area_"+S:null,shape:{x:y,y:_,width:x,height:b},style:Fe.defaults({fill:s[f]},v),silent:!0})),f=(f+1)%c}e.__splitAreaColors=d}}},IS={rectCoordAxisBuildSplitArea:TS,rectCoordAxisHandleRemove:function(e){e.__splitAreaColors=null}},AS=IS.rectCoordAxisBuildSplitArea,DS=IS.rectCoordAxisHandleRemove,CS=["axisLine","axisTickLabel","axisName"],OS=["splitArea","splitLine","minorSplitLine"],kS=wS.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,n,i){this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new Jc.Group,this.group.add(this._axisGroup),e.get("show")){var r=e.getCoordSysModel(),o=MS.layout(r,e),s=new lS(e,o);Fe.each(CS,s.add,s),this._axisGroup.add(s.getGroup()),Fe.each(OS,(function(t){e.get(t+".show")&&this["_"+t](e,r)}),this),Jc.groupTransition(a,this._axisGroup,e),kS.superCall(this,"render",e,t,n,i)}},remove:function(){DS(this)},_splitLine:function(e,t){var n=e.axis;if(!n.scale.isBlank()){var i=e.getModel("splitLine"),a=i.getModel("lineStyle"),r=a.get("color");r=Fe.isArray(r)?r:[r];for(var o=t.coordinateSystem.getRect(),s=n.isHorizontal(),l=0,u=n.getTicksCoords({tickModel:i}),c=[],h=[],d=a.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++%r.length,m=u[f].tickValue;this._axisGroup.add(new Jc.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:Fe.defaults({stroke:r[g]},d),silent:!0}))}}},_minorSplitLine:function(e,t){var n=e.axis,i=e.getModel("minorSplitLine").getModel("lineStyle"),a=t.coordinateSystem.getRect(),r=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);r?(s[0]=d,s[1]=a.y,l[0]=d,l[1]=a.y+a.height):(s[0]=a.x,s[1]=d,l[0]=a.x+a.width,l[1]=d),this._axisGroup.add(new Jc.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){AS(this,this._axisGroup,e,t)}});kS.extend({type:"xAxis"}),kS.extend({type:"yAxis"}),jx.extendComponentView({type:"grid",render:function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new Jc.Rect({shape:e.coordinateSystem.getRect(),style:Fe.defaults({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))}}),jx.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})),jx.registerVisual(tw("line","circle","line")),jx.registerLayout(aw("line")),jx.registerProcessor(jx.PRIORITY.PROCESSOR.STATISTIC,sw("line"));var LS=ag.extend({type:"series.__base_bar__",getInitialData:function(e,t){return hy(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(e){var t=this.coordinateSystem;if(t){var n=t.dataToPoint(t.clampData(e)),i=this.getData(),a=i.getLayout("offset"),r=i.getLayout("size");return n[t.getBaseAxis().isHorizontal()?0:1]+=a+r/2,n}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});LS.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return t>e&&(e=t),e},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});var ES=Xx.getDefaultLabel;function NS(e,t){"outside"===e.textPosition&&(e.textPosition=t)}var PS=function(e,t,n,i,a,r,o){var s=n.getModel("label"),l=n.getModel("emphasis.label");Jc.setLabelStyle(e,t,s,l,{labelFetcher:a,labelDataIndex:r,defaultText:ES(a.getData(),r),isRectText:!0,autoColor:i}),NS(e),NS(t)},RS={setLabel:PS},zS=Wo([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),BS={getBarItemStyle:function(e){var t=zS(this,e);if(this.getBorderLineDash){var n=this.getBorderLineDash();n&&(t.lineDash=n)}return t}},VS=BS,HS=(0,Jc.extendShape)({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=Math.max(t.r0||0,0),r=Math.max(t.r,0),o=.5*(r-a),s=a+o,l=t.startAngle,u=t.endAngle,c=t.clockwise,h=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u);(c?u-l<2*Math.PI:l-u<2*Math.PI)&&(e.moveTo(h*a+n,d*a+i),e.arc(h*s+n,d*s+i,o,-Math.PI+l,l,!c)),e.arc(n,i,r,l,u,!c),e.moveTo(f*r+n,p*r+i),e.arc(f*s+n,p*s+i,o,u-2*Math.PI,u-Math.PI,!c),0!==a&&(e.arc(n,i,a,u,l,c),e.moveTo(h*a+n,p*a+i)),e.closePath()}}),YS=RS.setLabel,FS=Ig.throttle,GS=Hb.createClipPath,WS=["itemStyle","barBorderWidth"],jS=[0,0];Fe.extend(ph.prototype,VS),jx.extendChartView({type:"bar",render:function(e,t,n){this._updateDrawMode(e);var i=e.get("coordinateSystem");return"cartesian2d"!==i&&"polar"!==i||(this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n)),this.group},incrementalPrepareRender:function(e,t,n){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,n,i){this._incrementalRenderLarge(e,t)},_updateDrawMode:function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(e,t,n){var i,a=this.group,r=e.getData(),o=this._data,s=e.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?i=l.isHorizontal():"polar"===s.type&&(i="angle"===l.dim);var u=e.isAnimationEnabled()?e:null,c=e.get("clip",!0),h=function(e,t){var n=e.getArea&&e.getArea();if("cartesian2d"===e.type){var i=e.getBaseAxis();if("category"!==i.type||!i.onBand){var a=t.getLayout("bandWidth");i.isHorizontal()?(n.x-=a,n.width+=2*a):(n.y-=a,n.height+=2*a)}}return n}(s,r);a.removeClipPath();var d=e.get("roundCap",!0),f=e.get("showBackground",!0),p=e.getModel("backgroundStyle"),g=p.get("barBorderRadius")||0,m=[],v=this._backgroundEls||[];r.diff(o).add((function(t){var n=r.getItemModel(t),o=QS[s.type](r,t,n);if(f){var l=QS[s.type](r,t),v=function(e,t,n){var i="polar"===e.type?Jc.Sector:Jc.Rect;return new i({shape:aM(t,n,e),silent:!0,z2:0})}(s,i,l);v.useStyle(p.getBarItemStyle()),"cartesian2d"===s.type&&v.setShape("r",g),m[t]=v}if(r.hasValue(t)){if(c)if(XS[s.type](h,o))return void a.remove(y);var y=qS[s.type](t,o,i,u,!1,d);r.setItemGraphicEl(t,y),a.add(y),eM(y,r,t,n,o,e,i,"polar"===s.type)}})).update((function(t,n){var l=r.getItemModel(t),y=QS[s.type](r,t,l);if(f){var _=v[n];_.useStyle(p.getBarItemStyle()),"cartesian2d"===s.type&&_.setShape("r",g),m[t]=_;var x=QS[s.type](r,t),b=aM(i,x,s);Jc.updateProps(_,{shape:b},u,t)}var w=o.getItemGraphicEl(n);if(r.hasValue(t)){if(c)if(XS[s.type](h,y))return void a.remove(w);w?Jc.updateProps(w,{shape:y},u,t):w=qS[s.type](t,y,i,u,!0,d),r.setItemGraphicEl(t,w),a.add(w),eM(w,r,t,l,y,e,i,"polar"===s.type)}else a.remove(w)})).remove((function(e){var t=o.getItemGraphicEl(e);"cartesian2d"===s.type?t&&KS(e,u,t):t&&$S(e,u,t)})).execute();var y=this._backgroundGroup||(this._backgroundGroup=new Ri);y.removeAll();for(var _=0;_<m.length;++_)y.add(m[_]);a.add(y),this._backgroundEls=m,this._data=r},_renderLarge:function(e,t,n){this._clear(),nM(e,this.group);var i=e.get("clip",!0)?GS(e.coordinateSystem,!1,e):null;i?this.group.setClipPath(i):this.group.removeClipPath()},_incrementalRenderLarge:function(e,t){this._removeBackground(),nM(t,this.group,!0)},dispose:Fe.noop,remove:function(e){this._clear(e)},_clear:function(e){var t=this.group,n=this._data;e&&e.get("animation")&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){"sector"===t.type?$S(t.dataIndex,e,t):KS(t.dataIndex,e,t)}))):t.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var US=Math.max,ZS=Math.min,XS={cartesian2d:function(e,t){var n=t.width<0?-1:1,i=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var a=US(t.x,e.x),r=ZS(t.x+t.width,e.x+e.width),o=US(t.y,e.y),s=ZS(t.y+t.height,e.y+e.height);t.x=a,t.y=o,t.width=r-a,t.height=s-o;var l=t.width<0||t.height<0;return n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),l},polar:function(e){return!1}},qS={cartesian2d:function(e,t,n,i,a){var r=new Jc.Rect({shape:Fe.extend({},t),z2:1});if(r.name="item",i){var o=n?"height":"width",s={};r.shape[o]=0,s[o]=t[o],Jc[a?"updateProps":"initProps"](r,{shape:s},i,e)}return r},polar:function(e,t,n,i,a,r){var o=t.startAngle<t.endAngle,s=new(!n&&r?HS:Jc.Sector)({shape:Fe.defaults({clockwise:o},t),z2:1});if(s.name="item",i){var l=n?"r":"endAngle",u={};s.shape[l]=n?0:t.startAngle,u[l]=t[l],Jc[a?"updateProps":"initProps"](s,{shape:u},i,e)}return s}};function KS(e,t,n){n.style.text=null,Jc.updateProps(n,{shape:{width:0}},t,e,(function(){n.parent&&n.parent.remove(n)}))}function $S(e,t,n){n.style.text=null,Jc.updateProps(n,{shape:{r:n.shape.r0}},t,e,(function(){n.parent&&n.parent.remove(n)}))}var QS={cartesian2d:function(e,t,n){var i=e.getItemLayout(t),a=n?function(e,t){var n=e.get(WS)||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}(n,i):0,r=i.width>0?1:-1,o=i.height>0?1:-1;return{x:i.x+r*a/2,y:i.y+o*a/2,width:i.width-r*a,height:i.height-o*a}},polar:function(e,t,n){var i=e.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function JS(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}function eM(e,t,n,i,a,r,o,s){var l=t.getItemVisual(n,"color"),u=t.getItemVisual(n,"opacity"),c=t.getVisual("borderColor"),h=i.getModel("itemStyle"),d=i.getModel("emphasis.itemStyle").getBarItemStyle();s||e.setShape("r",h.get("barBorderRadius")||0),e.useStyle(Fe.defaults({stroke:JS(a)?"none":c,fill:JS(a)?"none":l,opacity:u},h.getBarItemStyle()));var f=i.getShallow("cursor");f&&e.attr("cursor",f);var p=o?a.height>0?"bottom":"top":a.width>0?"left":"right";s||YS(e.style,d,i,l,r,n,p),JS(a)&&(d.fill=d.stroke="none"),Jc.setHoverStyle(e,d)}var tM=xl.extend({type:"largeBar",shape:{points:[]},buildPath:function(e,t){for(var n=t.points,i=this.__startPoint,a=this.__baseDimIdx,r=0;r<n.length;r+=2)i[a]=n[r+a],e.moveTo(i[0],i[1]),e.lineTo(n[r],n[r+1])}});function nM(e,t,n){var i=e.getData(),a=[],r=i.getLayout("valueAxisHorizontal")?1:0;a[1-r]=i.getLayout("valueAxisStart");var o=i.getLayout("largeDataIndices"),s=i.getLayout("barWidth"),l=e.getModel("backgroundStyle");if(e.get("showBackground",!0)){var u=i.getLayout("largeBackgroundPoints"),c=[];c[1-r]=i.getLayout("backgroundStart");var h=new tM({shape:{points:u},incremental:!!n,__startPoint:c,__baseDimIdx:r,__largeDataIndices:o,__barWidth:s,silent:!0,z2:0});!function(e,t,n){var i=t.get("borderColor")||t.get("color"),a=t.getItemStyle(["color","borderColor"]);e.useStyle(a),e.style.fill=null,e.style.stroke=i,e.style.lineWidth=n.getLayout("barWidth")}(h,l,i),t.add(h)}var d=new tM({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:a,__baseDimIdx:r,__largeDataIndices:o,__barWidth:s});t.add(d),function(e,t,n){var i=n.getVisual("borderColor")||n.getVisual("color"),a=t.getModel("itemStyle").getItemStyle(["color","borderColor"]);e.useStyle(a),e.style.fill=null,e.style.stroke=i,e.style.lineWidth=n.getLayout("barWidth")}(d,e,i),d.seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",iM),d.on("mousemove",iM))}var iM=FS((function(e){var t=function(e,t,n){var i=e.__baseDimIdx,a=1-i,r=e.shape.points,o=e.__largeDataIndices,s=Math.abs(e.__barWidth/2),l=e.__startPoint[a];jS[0]=t,jS[1]=n;for(var u=jS[i],c=jS[1-i],h=u-s,d=u+s,f=0,p=r.length/2;f<p;f++){var g=2*f,m=r[g+i],v=r[g+a];if(m>=h&&m<=d&&(l<=v?c>=l&&c<=v:c>=v&&c<=l))return o[f]}return-1}(this,e.offsetX,e.offsetY);this.dataIndex=t>=0?t:null}),30,!1);function aM(e,t,n){var i,a="polar"===n.type;return i=a?n.getArea():n.grid.getRect(),a?{cx:i.cx,cy:i.cy,r0:e?i.r0:t.r0,r:e?i.r:t.r,startAngle:e?t.startAngle:0,endAngle:e?t.endAngle:2*Math.PI}:{x:e?t.x:i.x,y:e?i.y:t.y,width:e?t.width:i.width,height:e?i.height:t.height}}var rM=qy.layout,oM=qy.largeLayout;jx.registerLayout(jx.PRIORITY.VISUAL.LAYOUT,Fe.curry(rM,"bar")),jx.registerLayout(jx.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,oM),jx.registerVisual({seriesType:"bar",reset:function(e){e.getData().setVisual("legendSymbol","roundRect")}});var sM=Fe.extend,lM=Fe.isArray;var uM=function(e,t,n){t=lM(t)&&{coordDimensions:t}||sM({},t);var i=e.getSource(),a=Zv(i,t),r=new Lv(a,e);return r.initData(i,n),r},cM={updateSelectedMap:function(e){this._targetList=Fe.isArray(e)?e.slice():[],this._selectTargetMap=Fe.reduce(e||[],(function(e,t){return e.set(t.name,t),e}),Fe.createHashMap())},select:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);"single"===this.get("selectedMode")&&this._selectTargetMap.each((function(e){e.selected=!1})),n&&(n.selected=!0)},unSelect:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);n&&(n.selected=!1)},toggleSelected:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);if(null!=n)return this[n.selected?"unSelect":"select"](e,t),n.selected},isSelected:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);return n&&n.selected}};var hM=function(e,t){this.getAllNames=function(){var e=t();return e.mapArray(e.getName)},this.containName=function(e){return t().indexOfName(e)>=0},this.indexOfName=function(t){return e().indexOfName(t)},this.getItemVisual=function(t,n){return e().getItemVisual(t,n)}},dM=Ch.getPercentWithPrecision,fM=Tp.retrieveRawAttr,pM=Jd.makeSeriesEncodeForNameBased,gM=jx.extendSeriesModel({type:"series.pie",init:function(e){gM.superApply(this,"init",arguments),this.legendVisualProvider=new hM(Fe.bind(this.getData,this),Fe.bind(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(e)},mergeOption:function(e){gM.superCall(this,"mergeOption",e),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(e,t){return uM(this,{coordDimensions:["value"],encodeDefaulter:Fe.curry(pM,this)})},_createSelectableList:function(){for(var e=this.getRawData(),t=e.mapDimension("value"),n=[],i=0,a=e.count();i<a;i++)n.push({name:e.getName(i),value:e.get(t,i),selected:fM(e,i,"selected")});return n},getDataParams:function(e){var t=this.getData(),n=gM.superCall(this,"getDataParams",e),i=[];return t.each(t.mapDimension("value"),(function(e){i.push(e)})),n.percent=dM(i,e,t.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(e){Po.defaultEmphasis(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});function mM(e,t,n,i){var a=t.getData(),r=this.dataIndex,o=a.getName(r),s=t.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:e,name:o,seriesId:t.id}),a.each((function(e){vM(a.getItemGraphicEl(e),a.getItemLayout(e),t.isSelected(a.getName(e)),s,n)}))}function vM(e,t,n,i,a){var r=(t.startAngle+t.endAngle)/2,o=n?i:0,s=[Math.cos(r)*o,Math.sin(r)*o];a?e.animate().when(200,{position:s}).start("bounceOut"):e.attr("position",s)}function yM(e,t){Jc.Group.call(this);var n=new Jc.Sector({z2:2}),i=new Jc.Polyline,a=new Jc.Text;this.add(n),this.add(i),this.add(a),this.updateData(e,t,!0)}Fe.mixin(gM,cM);var _M=yM.prototype;_M.updateData=function(e,t,n){var i=this.childAt(0),a=this.childAt(1),r=this.childAt(2),o=e.hostModel,s=e.getItemModel(t),l=e.getItemLayout(t),u=Fe.extend({},l);u.label=null;var c=o.getShallow("animationTypeUpdate");n?(i.setShape(u),"scale"===o.getShallow("animationType")?(i.shape.r=l.r0,Jc.initProps(i,{shape:{r:l.r}},o,t)):(i.shape.endAngle=l.startAngle,Jc.updateProps(i,{shape:{endAngle:l.endAngle}},o,t))):"expansion"===c?i.setShape(u):Jc.updateProps(i,{shape:u},o,t);var h=e.getItemVisual(t,"color");i.useStyle(Fe.defaults({lineJoin:"bevel",fill:h},s.getModel("itemStyle").getItemStyle())),i.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var d=s.getShallow("cursor");d&&i.attr("cursor",d),vM(this,e.getItemLayout(t),o.isSelected(e.getName(t)),o.get("selectedOffset"),o.get("animation"));var f=!n&&"transition"===c;this._updateLabel(e,t,f),this.highDownOnUpdate=o.get("silent")?null:function(e,t){var n=o.isAnimationEnabled()&&s.get("hoverAnimation");"emphasis"===t?(a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore,n&&(i.stopAnimation(!0),i.animateTo({shape:{r:l.r+o.get("hoverOffset")}},300,"elasticOut"))):(a.ignore=a.normalIgnore,r.ignore=r.normalIgnore,n&&(i.stopAnimation(!0),i.animateTo({shape:{r:l.r}},300,"elasticOut")))},Jc.setHoverStyle(this)},_M._updateLabel=function(e,t,n){var i=this.childAt(1),a=this.childAt(2),r=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,l=e.getItemVisual(t,"color");if(!s||isNaN(s.x)||isNaN(s.y))a.ignore=a.normalIgnore=a.hoverIgnore=i.ignore=i.normalIgnore=i.hoverIgnore=!0;else{var u={points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]},c={x:s.x,y:s.y};n?(Jc.updateProps(i,{shape:u},r,t),Jc.updateProps(a,{style:c},r,t)):(i.attr({shape:u}),a.attr({style:c})),a.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var h=o.getModel("label"),d=o.getModel("emphasis.label"),f=o.getModel("labelLine"),p=o.getModel("emphasis.labelLine");l=e.getItemVisual(t,"color");Jc.setLabelStyle(a.style,a.hoverStyle={},h,d,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:s.text,autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:e.getItemVisual(t,"opacity")}),a.ignore=a.normalIgnore=!h.get("show"),a.hoverIgnore=!d.get("show"),i.ignore=i.normalIgnore=!f.get("show"),i.hoverIgnore=!p.get("show"),i.setStyle({stroke:l,opacity:e.getItemVisual(t,"opacity")}),i.setStyle(f.getModel("lineStyle").getLineStyle()),i.hoverStyle=p.getModel("lineStyle").getLineStyle();var g=f.get("smooth");g&&!0===g&&(g=.4),i.setShape({smooth:g})}},Fe.inherits(yM,Jc.Group),bg.extend({type:"pie",init:function(){var e=new Jc.Group;this._sectorGroup=e},render:function(e,t,n,i){if(!i||i.from!==this.uid){var a=e.getData(),r=this._data,o=this.group,s=t.get("animation"),l=!r,u=e.get("animationType"),c=e.get("animationTypeUpdate"),h=Fe.curry(mM,this.uid,e,s,n),d=e.get("selectedMode");if(a.diff(r).add((function(e){var t=new yM(a,e);l&&"scale"!==u&&t.eachChild((function(e){e.stopAnimation(!0)})),d&&t.on("click",h),a.setItemGraphicEl(e,t),o.add(t)})).update((function(e,t){var n=r.getItemGraphicEl(t);l||"transition"===c||n.eachChild((function(e){e.stopAnimation(!0)})),n.updateData(a,e),n.off("click"),d&&n.on("click",h),o.add(n),a.setItemGraphicEl(e,n)})).remove((function(e){var t=r.getItemGraphicEl(e);o.remove(t)})).execute(),s&&a.count()>0&&(l?"scale"!==u:"transition"!==c)){for(var f=a.getItemLayout(0),p=1;isNaN(f.startAngle)&&p<a.count();++p)f=a.getItemLayout(p);var g=Math.max(n.getWidth(),n.getHeight())/2,m=Fe.bind(o.removeClipPath,o);o.setClipPath(this._createClipPath(f.cx,f.cy,g,f.startAngle,f.clockwise,m,e,l))}else o.removeClipPath();this._data=a}},dispose:function(){},_createClipPath:function(e,t,n,i,a,r,o,s){var l=new Jc.Sector({shape:{cx:e,cy:t,r0:0,r:n,startAngle:i,endAngle:i,clockwise:a}});return(s?Jc.initProps:Jc.updateProps)(l,{shape:{endAngle:i+(a?1:-1)*Math.PI*2}},o,r),l},containPoint:function(e,t){var n=t.getData().getItemLayout(0);if(n){var i=e[0]-n.cx,a=e[1]-n.cy,r=Math.sqrt(i*i+a*a);return r<=n.r&&r>=n.r0}}});var xM=function(e,t){Fe.each(t,(function(t){t.update="updateView",jx.registerAction(t,(function(n,i){var a={};return i.eachComponent({mainType:"series",subType:e,query:n},(function(e){e[t.method]&&e[t.method](n.name,n.dataIndex);var i=e.getData();i.each((function(t){var n=i.getName(t);a[n]=e.isSelected(n)||!1}))})),{name:n.name,selected:a,seriesId:n.seriesId}}))}))},bM=Fe.createHashMap;var wM=function(e){return{getTargetSeries:function(t){var n={},i=bM();return t.eachSeriesByType(e,(function(e){e.__paletteScope=n,i.set(e.uid,e)})),i},reset:function(e,t){var n=e.getRawData(),i={},a=e.getData();a.each((function(e){var t=a.getRawIndex(e);i[t]=e})),n.each((function(t){var r,o=i[t],s=null!=o&&a.getItemVisual(o,"color",!0),l=null!=o&&a.getItemVisual(o,"borderColor",!0);if(s&&l||(r=n.getItemModel(t)),!s){var u=r.get("itemStyle.color")||e.getColorFromPalette(n.getName(t)||t+"",e.__paletteScope,n.count());null!=o&&a.setItemVisual(o,"color",u)}if(!l){var c=r.get("itemStyle.borderColor");null!=o&&a.setItemVisual(o,"borderColor",c)}}))}}},SM=Ch.parsePercent,MM=Math.PI/180;function TM(e,t,n,i,a,r,o,s,l,u){function c(t,n,i,a){for(var r=t;r<n&&!(e[r].y+i>l+o);r++)if(e[r].y+=i,r>t&&r+1<n&&e[r+1].y>e[r].y+e[r].height)return void h(r,i/2);h(n-1,i/2)}function h(t,n){for(var i=t;i>=0&&!(e[i].y-n<l)&&(e[i].y-=n,!(i>0&&e[i].y>e[i-1].y+e[i-1].height));i--);}function d(e,t,n,i,a,r){for(var o=t?Number.MAX_VALUE:0,s=0,l=e.length;s<l;s++)if("none"===e[s].labelAlignTo){var u=Math.abs(e[s].y-i),c=e[s].len,h=e[s].len2,d=u<a+c?Math.sqrt((a+c+h)*(a+c+h)-u*u):Math.abs(e[s].x-n);t&&d>=o&&(d=o-10),!t&&d<=o&&(d=o+10),e[s].x=n+d*r,o=d}}e.sort((function(e,t){return e.y-t.y}));for(var f,p=0,g=e.length,m=[],v=[],y=0;y<g;y++){if("outer"===e[y].position&&"labelLine"===e[y].labelAlignTo){var _=e[y].x-u;e[y].linePoints[1][0]+=_,e[y].x=u}(f=e[y].y-p)<0&&c(y,g,-f),p=e[y].y+e[y].height}o-p<0&&h(g-1,p-o);for(y=0;y<g;y++)e[y].y>=n?v.push(e[y]):m.push(e[y]);d(m,!1,t,n,i,a),d(v,!0,t,n,i,a)}function IM(e){return"center"===e.position}var AM=function(e,t,n,i,a,r){var o,s,l=e.getData(),u=[],c=!1,h=(e.get("minShowLabelAngle")||0)*MM;l.each((function(i){var r=l.getItemLayout(i),d=l.getItemModel(i),f=d.getModel("label"),p=f.get("position")||d.get("emphasis.label.position"),g=f.get("distanceToLabelLine"),m=f.get("alignTo"),v=SM(f.get("margin"),n),y=f.get("bleedMargin"),_=f.getFont(),x=d.getModel("labelLine"),b=x.get("length");b=SM(b,n);var w=x.get("length2");if(w=SM(w,n),!(r.angle<h)){var S,M,T,I,A=(r.startAngle+r.endAngle)/2,D=Math.cos(A),C=Math.sin(A);o=r.cx,s=r.cy;var O,k=e.getFormattedLabel(i,"normal")||l.getName(i),L=Ga.getBoundingRect(k,_,I,"top"),E="inside"===p||"inner"===p;if("center"===p)S=r.cx,M=r.cy,I="center";else{var N=(E?(r.r+r.r0)/2*D:r.r*D)+o,P=(E?(r.r+r.r0)/2*C:r.r*C)+s;if(S=N+3*D,M=P+3*C,!E){var R=N+D*(b+t-r.r),z=P+C*(b+t-r.r),B=R+(D<0?-1:1)*w;S="edge"===m?D<0?a+v:a+n-v:B+(D<0?-g:g),M=z,T=[[N,P],[R,z],[B,z]]}I=E?"center":"edge"===m?D>0?"right":"left":D>0?"left":"right"}var V=f.get("rotate");O="number"==typeof V?V*(Math.PI/180):V?D<0?-A+Math.PI:-A:0,c=!!O,r.label={x:S,y:M,position:p,height:L.height,len:b,len2:w,linePoints:T,textAlign:I,verticalAlign:"middle",rotation:O,inside:E,labelDistance:g,labelAlignTo:m,labelMargin:v,bleedMargin:y,textRect:L,text:k,font:_},E||u.push(r.label)}})),!c&&e.get("avoidLabelOverlap")&&function(e,t,n,i,a,r,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,d=0;d<e.length;d++)IM(e[d])||(e[d].x<t?(c=Math.min(c,e[d].x),l.push(e[d])):(h=Math.max(h,e[d].x),u.push(e[d])));for(TM(u,t,n,i,1,0,r,0,s,h),TM(l,t,n,i,-1,0,r,0,s,c),d=0;d<e.length;d++){var f=e[d];if(!IM(f)){var p=f.linePoints;if(p){var g,m="edge"===f.labelAlignTo,v=f.textRect.width;(g=m?f.x<t?p[2][0]-f.labelDistance-o-f.labelMargin:o+a-f.labelMargin-p[2][0]-f.labelDistance:f.x<t?f.x-o-f.bleedMargin:o+a-f.x-f.bleedMargin)<f.textRect.width&&(f.text=Ga.truncateText(f.text,g,f.font),"edge"===f.labelAlignTo&&(v=Ga.getWidth(f.text,f.font)));var y=p[1][0]-p[2][0];m?f.x<t?p[2][0]=o+f.labelMargin+v+f.labelDistance:p[2][0]=o+a-f.labelMargin-v-f.labelDistance:(f.x<t?p[2][0]=f.x+f.labelDistance:p[2][0]=f.x-f.labelDistance,p[1][0]=p[2][0]+y),p[1][1]=p[2][1]=f.y}}}}(u,o,s,t,n,i,a,r)},DM=Ch.parsePercent,CM=Ch.linearMap,OM=2*Math.PI,kM=Math.PI/180;var LM=function(e,t,n,i){t.eachSeriesByType(e,(function(e){var t=e.getData(),i=t.mapDimension("value"),a=function(e,t){return td.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,n),r=e.get("center"),o=e.get("radius");Fe.isArray(o)||(o=[0,o]),Fe.isArray(r)||(r=[r,r]);var s=DM(a.width,n.getWidth()),l=DM(a.height,n.getHeight()),u=Math.min(s,l),c=DM(r[0],s)+a.x,h=DM(r[1],l)+a.y,d=DM(o[0],u/2),f=DM(o[1],u/2),p=-e.get("startAngle")*kM,g=e.get("minAngle")*kM,m=0;t.each(i,(function(e){!isNaN(e)&&m++}));var v=t.getSum(i),y=Math.PI/(v||m)*2,_=e.get("clockwise"),x=e.get("roseType"),b=e.get("stillShowZeroSum"),w=t.getDataExtent(i);w[0]=0;var S=OM,M=0,T=p,I=_?1:-1;if(t.each(i,(function(e,n){var i;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:c,cy:h,r0:d,r:x?NaN:f,viewRect:a});else{(i="area"!==x?0===v&&b?y:e*y:OM/m)<g?(i=g,S-=g):M+=e;var r=T+I*i;t.setItemLayout(n,{angle:i,startAngle:T,endAngle:r,clockwise:_,cx:c,cy:h,r0:d,r:x?CM(e,w,[d,f]):f,viewRect:a}),T=r}})),S<OM&&m)if(S<=.001){var A=OM/m;t.each(i,(function(e,n){if(!isNaN(e)){var i=t.getItemLayout(n);i.angle=A,i.startAngle=p+I*n*A,i.endAngle=p+I*(n+1)*A}}))}else y=S/M,T=p,t.each(i,(function(e,n){if(!isNaN(e)){var i=t.getItemLayout(n),a=i.angle===g?g:e*y;i.startAngle=T,i.endAngle=T+I*a,T+=I*a}}));AM(e,f,a.width,a.height,a.x,a.y)}))};var EM=function(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(n&&n.length){var i=e.getData();i.filterSelf((function(e){for(var t=i.getName(e),a=0;a<n.length;a++)if(!n[a].isSelected(t))return!1;return!0}))}}}};xM("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),jx.registerVisual(wM("pie")),jx.registerLayout(Fe.curry(LM,"pie")),jx.registerProcessor(EM("pie")),ag.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(e,t){return hy(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},getProgressiveThreshold:function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});var NM=F_.createSymbol,PM=Jc.extendShape({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(e,t){var n=t.points,i=t.size,a=this.symbolProxy,r=a.shape;if(!((e.getContext?e.getContext():e)&&i[0]<4))for(var o=0;o<n.length;){var s=n[o++],l=n[o++];isNaN(s)||isNaN(l)||(this.softClipShape&&!this.softClipShape.contain(s,l)||(r.x=s-i[0]/2,r.y=l-i[1]/2,r.width=i[0],r.height=i[1],a.buildPath(e,r,!0)))}},afterBrush:function(e){var t=this.shape,n=t.points,i=t.size;if(i[0]<4){this.setTransform(e);for(var a=0;a<n.length;){var r=n[a++],o=n[a++];isNaN(r)||isNaN(o)||(this.softClipShape&&!this.softClipShape.contain(r,o)||e.fillRect(r-i[0]/2,o-i[1]/2,i[0],i[1]))}this.restoreTransform(e)}},findDataIndex:function(e,t){for(var n=this.shape,i=n.points,a=n.size,r=Math.max(a[0],4),o=Math.max(a[1],4),s=i.length/2-1;s>=0;s--){var l=2*s,u=i[l]-r/2,c=i[l+1]-o/2;if(e>=u&&t>=c&&e<=u+r&&t<=c+o)return s}return-1}});function RM(){this.group=new Jc.Group}var zM=RM.prototype;zM.isPersistent=function(){return!this._incremental},zM.updateData=function(e,t){this.group.removeAll();var n=new PM({rectHover:!0,cursor:"default"});n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!1,t),this.group.add(n),this._incremental=null},zM.updateLayout=function(e){if(!this._incremental){var t=e.getLayout("symbolPoints");this.group.eachChild((function(e){if(null!=e.startIndex){var n=2*(e.endIndex-e.startIndex),i=4*e.startIndex*2;t=new Float32Array(t.buffer,i,n)}e.setShape("points",t)}))}},zM.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>2e6?(this._incremental||(this._incremental=new Fu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},zM.incrementalUpdate=function(e,t,n){var i;this._incremental?(i=new PM,this._incremental.addDisplayable(i,!0)):((i=new PM({rectHover:!0,cursor:"default",startIndex:e.start,endIndex:e.end})).incremental=!0,this.group.add(i)),i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!!this._incremental,n)},zM._setCommon=function(e,t,n,i){var a=t.hostModel;i=i||{};var r=t.getVisual("symbolSize");e.setShape("size",r instanceof Array?r:[r,r]),e.softClipShape=i.clipShape||null,e.symbolProxy=NM(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<4;e.useStyle(a.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("color");s&&e.setColor(s),n||(e.seriesIndex=a.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var n=e.findDataIndex(t.offsetX,t.offsetY);n>=0&&(e.dataIndex=n+(e.startIndex||0))})))},zM.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},zM._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var BM=RM;function VM(e,t,n){Ax.call(this,e,t,n),this.type="value",this.angle=0,this.name="",this.model}jx.extendChartView({type:"scatter",render:function(e,t,n){var i=e.getData();this._updateSymbolDraw(i,e).updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},incrementalPrepareRender:function(e,t,n){var i=e.getData();this._updateSymbolDraw(i,e).incrementalPrepareUpdate(i),this._finished=!1},incrementalRender:function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,n){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var a=aw().reset(e);a.progress&&a.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_getClipShape:function(e){var t=e.coordinateSystem,n=t&&t.getArea&&t.getArea();return e.get("clip",!0)?n:null},_updateSymbolDraw:function(e,t){var n=this._symbolDraw,i=t.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new BM:new gb,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),jx.registerVisual(tw("scatter","circle")),jx.registerLayout(aw("scatter")),Fe.inherits(VM,Ax);var HM=VM,YM=D_.getScaleExtent,FM=D_.niceScaleExtent;function GM(e,t,n){this._model=e,this.dimensions=[],this._indicatorAxes=Fe.map(e.getIndicatorModels(),(function(e,t){var n="indicator_"+t,i=new HM(n,"log"===e.get("axisType")?new g_:new Ly);return i.name=e.get("name"),i.model=e,e.axis=i,this.dimensions.push(n),i}),this),this.resize(e,n),this.cx,this.cy,this.r,this.r0,this.startAngle}GM.prototype.getIndicatorAxes=function(){return this._indicatorAxes},GM.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},GM.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t].angle;return[this.cx+e*Math.cos(n),this.cy-e*Math.sin(n)]},GM.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=Math.sqrt(t*t+n*n);t/=i,n/=i;for(var a,r=Math.atan2(-n,t),o=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],c=Math.abs(r-u.angle);c<o&&(a=u,s=l,o=c)}return[s,+(a&&a.coordToData(i))]},GM.prototype.resize=function(e,t){var n=e.get("center"),i=t.getWidth(),a=t.getHeight(),r=Math.min(i,a)/2;this.cx=Ch.parsePercent(n[0],i),this.cy=Ch.parsePercent(n[1],a),this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");"string"!=typeof o&&"number"!=typeof o||(o=[0,o]),this.r0=Ch.parsePercent(o[0],r),this.r=Ch.parsePercent(o[1],r),Fe.each(this._indicatorAxes,(function(e,t){e.setExtent(this.r0,this.r);var n=this.startAngle+t*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),e.angle=n}),this)},GM.prototype.update=function(e,t){var n=this._indicatorAxes,i=this._model;Fe.each(n,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeriesByType("radar",(function(t,a){if("radar"===t.get("coordinateSystem")&&e.getComponent("radar",t.get("radarIndex"))===i){var r=t.getData();Fe.each(n,(function(e){e.scale.unionExtentFromData(r,r.mapDimension(e.dim))}))}}),this);var a=i.get("splitNumber");function r(e){var t=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),n=e/t;return 2===n?n=5:n*=2,n*t}Fe.each(n,(function(e,t){var n=YM(e.scale,e.model).extent;FM(e.scale,e.model);var i=e.model,o=e.scale,s=i.getMin(),l=i.getMax(),u=o.getInterval();if(null!=s&&null!=l)o.setExtent(+s,+l),o.setInterval((l-s)/a);else if(null!=s){do{c=s+u*a,o.setExtent(+s,c),o.setInterval(u),u=r(u)}while(c<n[1]&&isFinite(c)&&isFinite(n[1]))}else if(null!=l){do{h=l-u*a,o.setExtent(h,+l),o.setInterval(u),u=r(u)}while(h>n[0]&&isFinite(h)&&isFinite(n[0]))}else{o.getTicks().length-1>a&&(u=r(u));var c=Math.ceil(n[1]/u)*u,h=Ch.round(c-u*a);o.setExtent(h,c),o.setInterval(u)}}))},GM.dimensions=[],GM.create=function(e,t){var n=[];return e.eachComponent("radar",(function(i){var a=new GM(i,e,t);n.push(a),i.coordinateSystem=a})),e.eachSeriesByType("radar",(function(e){"radar"===e.get("coordinateSystem")&&(e.coordinateSystem=n[e.get("radarIndex")||0])})),n},Tf.register("radar",GM);var WM=vw.valueAxis;function jM(e,t){return Fe.defaults({show:t},e)}jx.extendComponentModel({type:"radar",optionUpdated:function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),n=this.get("scale"),i=this.get("axisLine"),a=this.get("axisTick"),r=this.get("axisType"),o=this.get("axisLabel"),s=this.get("name"),l=this.get("name.show"),u=this.get("name.formatter"),c=this.get("nameGap"),h=this.get("triggerEvent"),d=Fe.map(this.get("indicator")||[],(function(d){null!=d.max&&d.max>0&&!d.min?d.min=0:null!=d.min&&d.min<0&&!d.max&&(d.max=0);var f=s;if(null!=d.color&&(f=Fe.defaults({color:d.color},s)),d=Fe.merge(Fe.clone(d),{boundaryGap:e,splitNumber:t,scale:n,axisLine:i,axisTick:a,axisType:r,axisLabel:o,name:d.text,nameLocation:"end",nameGap:c,nameTextStyle:f,triggerEvent:h},!1),l||(d.name=""),"string"==typeof u){var p=d.name;d.name=u.replace("{value}",null!=p?p:"")}else"function"==typeof u&&(d.name=u(d.name,d));var g=Fe.extend(new ph(d,null,this.ecModel),O_);return g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this.getIndicatorModels=function(){return d}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:Fe.merge({lineStyle:{color:"#bbb"}},WM.axisLine),axisLabel:jM(WM.axisLabel,!1),axisTick:jM(WM.axisTick,!1),axisType:"interval",splitLine:jM(WM.splitLine,!0),splitArea:jM(WM.splitArea,!0),indicator:[]}});var UM=["axisLine","axisTickLabel","axisName"];jx.extendComponentView({type:"radar",render:function(e,t,n){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},_buildAxes:function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes(),i=Fe.map(n,(function(e){return new lS(e.model,{position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));Fe.each(i,(function(e){Fe.each(UM,e.add,e),this.group.add(e.getGroup())}),this)},_buildSplitLineAndArea:function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(n.length){var i=e.get("shape"),a=e.getModel("splitLine"),r=e.getModel("splitArea"),o=a.getModel("lineStyle"),s=r.getModel("areaStyle"),l=a.get("show"),u=r.get("show"),c=o.get("color"),h=s.get("color");c=Fe.isArray(c)?c:[c],h=Fe.isArray(h)?h:[h];var d=[],f=[];if("circle"===i)for(var p=n[0].getTicksCoords(),g=t.cx,m=t.cy,v=0;v<p.length;v++){if(l)d[T(d,c,v)].push(new Jc.Circle({shape:{cx:g,cy:m,r:p[v].coord}}));if(u&&v<p.length-1)f[T(f,h,v)].push(new Jc.Ring({shape:{cx:g,cy:m,r0:p[v].coord,r:p[v+1].coord}}))}else{var y,_=Fe.map(n,(function(e,n){var i=e.getTicksCoords();return y=null==y?i.length-1:Math.min(i.length-1,y),Fe.map(i,(function(e){return t.coordToPoint(e.coord,n)}))})),x=[];for(v=0;v<=y;v++){for(var b=[],w=0;w<n.length;w++)b.push(_[w][v]);if(b[0]&&b.push(b[0].slice()),l)d[T(d,c,v)].push(new Jc.Polyline({shape:{points:b}}));if(u&&x)f[T(f,h,v-1)].push(new Jc.Polygon({shape:{points:b.concat(x)}}));x=b.slice().reverse()}}var S=o.getLineStyle(),M=s.getAreaStyle();Fe.each(f,(function(e,t){this.group.add(Jc.mergePath(e,{style:Fe.defaults({stroke:"none",fill:h[t%h.length]},M),silent:!0}))}),this),Fe.each(d,(function(e,t){this.group.add(Jc.mergePath(e,{style:Fe.defaults({fill:"none",stroke:c[t%c.length]},S),silent:!0}))}),this)}function T(e,t,n){var i=n%t.length;return e[i]=e[i]||[],i}}});var ZM=Fh.encodeHTML,XM=ag.extend({type:"series.radar",dependencies:["radar"],init:function(e){XM.superApply(this,"init",arguments),this.legendVisualProvider=new hM(Fe.bind(this.getData,this),Fe.bind(this.getRawData,this))},getInitialData:function(e,t){return uM(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(e){var t=this.getData(),n=this.coordinateSystem.getIndicatorAxes(),i=this.getData().getName(e);return ZM(""===i?this.name:i)+"<br/>"+Fe.map(n,(function(n,i){var a=t.get(t.mapDimension(n.dim),e);return ZM(n.name+" : "+a)})).join("<br />")},getTooltipPosition:function(e){if(null!=e)for(var t=this.getData(),n=this.coordinateSystem,i=t.getValues(Fe.map(n.dimensions,(function(e){return t.mapDimension(e)})),e,!0),a=0,r=i.length;a<r;a++)if(!isNaN(i[a])){var o=n.getIndicatorAxes();return n.coordToPoint(o[a].dataToCoord(i[a]),a)}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});function qM(e){return!isNaN(e[0])&&!isNaN(e[1])}function KM(e){return[e.cx,e.cy]}jx.extendChartView({type:"radar",render:function(e,t,n){var i=e.coordinateSystem,a=this.group,r=e.getData(),o=this._data;function s(e,t){var n=e.getItemVisual(t,"symbol")||"circle",i=e.getItemVisual(t,"color");if("none"!==n){var a=function(e){return Fe.isArray(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),r=F_.createSymbol(n,-1,-1,2,2,i);return r.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),r}}function l(t,n,i,a,r,o){i.removeAll();for(var l=0;l<n.length-1;l++){var u=s(a,r);u&&(u.__dimIdx=l,t[l]?(u.attr("position",t[l]),Jc[o?"initProps":"updateProps"](u,{position:n[l]},e,r)):u.attr("position",n[l]),i.add(u))}}function u(e){return Fe.map(e,(function(e){return[i.cx,i.cy]}))}r.diff(o).add((function(t){var n=r.getItemLayout(t);if(n){var i=new Jc.Polygon,a=new Jc.Polyline,o={shape:{points:n}};i.shape.points=u(n),a.shape.points=u(n),Jc.initProps(i,o,e,t),Jc.initProps(a,o,e,t);var s=new Jc.Group,c=new Jc.Group;s.add(a),s.add(i),s.add(c),l(a.shape.points,n,c,r,t,!0),r.setItemGraphicEl(t,s)}})).update((function(t,n){var i=o.getItemGraphicEl(n),a=i.childAt(0),s=i.childAt(1),u=i.childAt(2),c={shape:{points:r.getItemLayout(t)}};c.shape.points&&(l(a.shape.points,c.shape.points,u,r,t,!1),Jc.updateProps(a,c,e),Jc.updateProps(s,c,e),r.setItemGraphicEl(t,i))})).remove((function(e){a.remove(o.getItemGraphicEl(e))})).execute(),r.eachItemGraphicEl((function(e,t){var n=r.getItemModel(t),i=e.childAt(0),o=e.childAt(1),s=e.childAt(2),l=r.getItemVisual(t,"color");a.add(e),i.useStyle(Fe.defaults(n.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:l})),i.hoverStyle=n.getModel("emphasis.lineStyle").getLineStyle();var u=n.getModel("areaStyle"),c=n.getModel("emphasis.areaStyle"),h=u.isEmpty()&&u.parentModel.isEmpty(),d=c.isEmpty()&&c.parentModel.isEmpty();d=d&&h,o.ignore=h,o.useStyle(Fe.defaults(u.getAreaStyle(),{fill:l,opacity:.7})),o.hoverStyle=c.getAreaStyle();var f=n.getModel("itemStyle").getItemStyle(["color"]),p=n.getModel("emphasis.itemStyle").getItemStyle(),g=n.getModel("label"),m=n.getModel("emphasis.label");s.eachChild((function(e){e.setStyle(f),e.hoverStyle=Fe.clone(p);var n=r.get(r.dimensions[e.__dimIdx],t);(null==n||isNaN(n))&&(n=""),Jc.setLabelStyle(e.style,e.hoverStyle,g,m,{labelFetcher:r.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:n,autoColor:l,isRectText:!0})})),e.highDownOnUpdate=function(e,t){o.attr("ignore","emphasis"===t?d:h)},Jc.setHoverStyle(e)})),this._data=r},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var $M=function(e){e.eachSeriesByType("radar",(function(e){var t=e.getData(),n=[],i=e.coordinateSystem;if(i){var a=i.getIndicatorAxes();Fe.each(a,(function(e,r){t.each(t.mapDimension(a[r].dim),(function(e,t){n[t]=n[t]||[];var a=i.dataToPoint(e,r);n[t][r]=qM(a)?a:KM(i)}))})),t.each((function(e){var a=Fe.find(n[e],(function(e){return qM(e)}))||KM(i);n[e].push(a.slice()),t.setItemLayout(e,n[e])}))}}))};var QM=function(e){var t=e.polar;if(t){Fe.isArray(t)||(t=[t]);var n=[];Fe.each(t,(function(t,i){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],Fe.isArray(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):n.push(t)})),e.polar=n}Fe.each(e.series,(function(e){e&&"radar"===e.type&&e.polarIndex&&(e.radarIndex=e.polarIndex)}))};jx.registerVisual(wM("radar")),jx.registerVisual(tw("radar","circle")),jx.registerLayout($M),jx.registerProcessor(EM("radar")),jx.registerPreprocessor(QM);for(var JM=[126,25],eT=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],tT=0;tT<eT.length;tT++)for(var nT=0;nT<eT[tT].length;nT++)eT[tT][nT][0]/=10.5,eT[tT][nT][1]/=-14,eT[tT][nT][0]+=JM[0],eT[tT][nT][1]+=JM[1];var iT=function(e,t){"china"===e&&t.push(new ex("南海诸岛",Fe.map(eT,(function(e){return{type:"polygon",exterior:e}})),JM))},aT={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};var rT=function(e,t){if("china"===e){var n=aT[t.name];if(n){var i=t.center;i[0]+=n[0]/10.5,i[1]+=-n[1]/14}}},oT={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};var sT=function(e,t){if("world"===e){var n=oT[t.name];if(n){var i=t.center;i[0]=n[0],i[1]=n[1]}}},lT=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var uT=function(e,t){"china"===e&&"台湾"===t.name&&t.geometries.push({type:"polygon",exterior:lT[0]})},cT=Fe.each,hT=(0,Po.makeInner)();function dT(e){for(var t,n=0;n<e.length;n++){var i=e[n].getBoundingRect();(t=t||i.clone()).union(i)}return t}var fT={load:function(e,t,n){var i=hT(t).parsed;if(i)return i;var a,r=t.specialAreas||{},o=t.geoJSON;try{a=o?nx(o,n):[]}catch(e){throw new Error("Invalid geoJson format\n"+e.message)}return iT(e,a),cT(a,(function(t){var n=t.name;rT(e,t),sT(e,t),uT(e,t);var i=r[n];i&&t.transformTo(i.left,i.top,i.width,i.height)})),hT(t).parsed={regions:a,boundingRect:dT(a)}}},pT=Hm.parseSVG,gT=Hm.makeViewBoxTransform,mT=Fe.assert,vT=Fe.createHashMap,yT=(0,Po.makeInner)(),_T={load:function(e,t){var n=yT(t).originRoot;if(n)return{root:n,boundingRect:yT(t).boundingRect};var i=xT(t);return yT(t).originRoot=i.root,yT(t).boundingRect=i.boundingRect,i},makeGraphic:function(e,t,n){var i=yT(t),a=i.rootMap||(i.rootMap=vT()),r=a.get(n);if(r)return r;var o=i.originRoot,s=i.boundingRect;return i.originRootHostKey?r=xT(t,s).root:(i.originRootHostKey=n,r=o),a.set(n,r)},removeGraphic:function(e,t,n){var i=yT(t),a=i.rootMap;a&&a.removeKey(n),n===i.originRootHostKey&&(i.originRootHostKey=null)}};function xT(e,t){var n,i,a=e.svgXML;try{i=(n=a&&pT(a,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root,mT(null!=i)}catch(e){throw new Error("Invalid svg format\n"+e.message)}var r=n.width,o=n.height,s=n.viewBoxRect;if(t||(t=null==r||null==o?i.getBoundingRect():new Ni(0,0,0,0),null!=r&&(t.width=r),null!=o&&(t.height=o)),s){var l=gT(s,t.width,t.height),u=i;(i=new Ri).add(u),u.scale=l.scale,u.position=l.position}return i.setClipPath(new vu({shape:t.plain()})),{root:i,boundingRect:t}}var bT=_T,wT=Fe.each,ST=Fe.createHashMap,MT={geoJSON:fT,svg:bT};function TT(e){return function(t,n){var i=IT(t),a=[];return wT(i,(function(i){var r=MT[i.type][e];r&&a.push(r(t,i,n))})),a}}function IT(e){return qm.retrieveMap(e)||[]}var AT={load:function(e,t,n){var i,a=[],r=ST(),o=ST(),s=IT(e);return wT(s,(function(s){var l=MT[s.type].load(e,s,n);wT(l.regions,(function(e){var n=e.name;t&&t.hasOwnProperty(n)&&(e=e.cloneShallow(n=t[n])),a.push(e),r.set(n,e),o.set(n,e.center)}));var u=l.boundingRect;u&&(i?i.union(u):i=u.clone())})),{regions:a,regionsMap:r,nameCoordMap:o,boundingRect:i||new Ni(0,0,0,0)}},makeGraphic:TT("makeGraphic"),removeGraphic:TT("removeGraphic")},DT=Fh.encodeHTML,CT=Fh.addCommas,OT=Tp.retrieveRawAttr,kT=Jd.makeSeriesEncodeForNameBased,LT=ag.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(e){for(var t=uM(this,{coordDimensions:["value"],encodeDefaulter:Fe.curry(kT,this)}),n=t.mapDimension("value"),i=Fe.createHashMap(),a=[],r=[],o=0,s=t.count();o<s;o++){var l=t.getName(o);i.set(l,!0),a.push({name:l,value:t.get(n,o),selected:OT(t,o,"selected")})}var u=AT.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return Fe.each(u.regions,(function(e){var t=e.name;i.get(t)||(a.push({name:t}),r.push(t))})),this.updateSelectedMap(a),t.appendValues([],r),t},getHostGeoModel:function(){var e=this.option.geoIndex;return null!=e?this.dependentModels.geo[e]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(e){var t=this.getData();return t.get(t.mapDimension("value"),e)},getRegionModel:function(e){var t=this.getData();return t.getItemModel(t.indexOfName(e))},formatTooltip:function(e){for(var t=this.getData(),n=CT(this.getRawValue(e)),i=t.getName(e),a=this.seriesGroup,r=[],o=0;o<a.length;o++){var s=a[o].originalData.indexOfName(i),l=t.mapDimension("value");isNaN(a[o].originalData.get(l,s))||r.push(DT(a[o].name))}return r.join(", ")+"<br />"+DT(i+" : "+n)},getTooltipPosition:function(e){if(null!=e){var t=this.getData().getName(e),n=this.coordinateSystem,i=n.getRegion(t);return i&&n.dataToPoint(i.center)}},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}});Fe.mixin(LT,cM);var ET="\0_ec_interaction_mutex";function NT(e){return e[ET]||(e[ET]={})}jx.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){}));var PT={take:function(e,t,n){NT(e)[t]=n},release:function(e,t,n){var i=NT(e);i[t]===n&&(i[t]=null)},isTaken:function(e,t){return!!NT(e)[t]}};function RT(e){this.pointerChecker,this._zr=e,this._opt={};var t=Fe.bind,n=t(zT,this),i=t(BT,this),a=t(VT,this),r=t(HT,this),o=t(YT,this);yt.call(this),this.setPointerChecker=function(e){this.pointerChecker=e},this.enable=function(t,s){this.disable(),this._opt=Fe.defaults(Fe.clone(s)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",n),e.on("mousemove",i),e.on("mouseup",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",r),e.on("pinch",o))},this.disable=function(){e.off("mousedown",n),e.off("mousemove",i),e.off("mouseup",a),e.off("mousewheel",r),e.off("pinch",o)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function zT(e){if(!(Bt.isMiddleOrRightButtonOnMouseUpDown(e)||e.target&&e.target.draggable)){var t=e.offsetX,n=e.offsetY;this.pointerChecker&&this.pointerChecker(e,t,n)&&(this._x=t,this._y=n,this._dragging=!0)}}function BT(e){if(this._dragging&&WT("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!PT.isTaken(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,i=this._x,a=this._y,r=t-i,o=n-a;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&Bt.stop(e.event),GT(this,"pan","moveOnMouseMove",e,{dx:r,dy:o,oldX:i,oldY:a,newX:t,newY:n})}}function VT(e){Bt.isMiddleOrRightButtonOnMouseUpDown(e)||(this._dragging=!1)}function HT(e){var t=WT("zoomOnMouseWheel",e,this._opt),n=WT("moveOnMouseWheel",e,this._opt),i=e.wheelDelta,a=Math.abs(i),r=e.offsetX,o=e.offsetY;if(0!==i&&(t||n)){if(t){var s=a>3?1.4:a>1?1.2:1.1;FT(this,"zoom","zoomOnMouseWheel",e,{scale:i>0?s:1/s,originX:r,originY:o})}if(n){var l=Math.abs(i);FT(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:r,originY:o})}}}function YT(e){PT.isTaken(this._zr,"globalPan")||FT(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY})}function FT(e,t,n,i,a){e.pointerChecker&&e.pointerChecker(i,a.originX,a.originY)&&(Bt.stop(i.event),GT(e,t,n,i,a))}function GT(e,t,n,i,a){a.isAvailableBehavior=Fe.bind(WT,null,n,i),e.trigger(t,a)}function WT(e,t,n){var i=n[e];return!e||i&&(!Fe.isString(i)||t.event[i+"Key"])}Fe.mixin(RT,yt);var jT=RT;var UT=function(e,t,n,i){var a=e.target,r=e.zoomLimit,o=a.position,s=a.scale,l=e.zoom=e.zoom||1;if(l*=t,r){var u=r.min||0,c=r.max||1/0;l=Math.max(Math.min(c,l),u)}var h=l/e.zoom;e.zoom=l,o[0]-=(n-o[0])*(h-1),o[1]-=(i-o[1])*(h-1),s[0]*=h,s[1]*=h,a.dirty()},ZT={updateViewOnPan:function(e,t,n){var i=e.target,a=i.position;a[0]+=t,a[1]+=n,i.dirty()},updateViewOnZoom:UT},XT={axisPointer:1,tooltip:1,brush:1};var qT=function(e,t,n){var i=t.getComponentByElement(e.topTarget),a=i&&i.coordinateSystem;return i&&i!==n&&!XT[i.mainType]&&a&&a.model!==n},KT={onIrrelevantElement:qT},$T=KT.onIrrelevantElement,QT=vh.getUID;function JT(e){var t=e.getItemStyle(),n=e.get("areaColor");return null!=n&&(t.fill=n),t}function eI(e,t){t.eachChild((function(t){Fe.each(t.__regions,(function(n){t.trigger(e.isSelected(n.name)?"emphasis":"normal")}))}))}function tI(e,t){var n=new Jc.Group;this.uid=QT("ec_map_draw"),this._controller=new jT(e.getZr()),this._controllerHost={target:t?n:null},this.group=n,this._updateGroup=t,this._mouseDownFlag,this._mapName,this._initialized,n.add(this._regionsGroup=new Jc.Group),n.add(this._backgroundGroup=new Jc.Group)}tI.prototype={constructor:tI,draw:function(e,t,n,i,a){var r="geo"===e.mainType,o=e.getData&&e.getData();r&&t.eachComponent({mainType:"series",subType:"map"},(function(t){o||t.getHostGeoModel()!==e||(o=t.getData())}));var s=e.coordinateSystem;this._updateBackground(s);var l,u=this._regionsGroup,c=this.group,h=s.getTransformInfo(),d=!u.childAt(0)||a;if(d)c.transform=h.roamTransform,c.decomposeTransform(),c.dirty();else{var f=new mn;f.transform=h.roamTransform,f.decomposeTransform();var p={scale:f.scale,position:f.position};l=f.scale,Jc.updateProps(c,p,e)}var g=h.rawScale,m=h.rawPosition;u.removeAll();var v=["itemStyle"],y=["emphasis","itemStyle"],_=["label"],x=["emphasis","label"],b=Fe.createHashMap();Fe.each(s.regions,(function(t){var n=b.get(t.name)||b.set(t.name,new Jc.Group),i=new Jc.CompoundPath({segmentIgnoreThreshold:1,shape:{paths:[]}});n.add(i);var a,s=(N=e.getRegionModel(t.name)||e).getModel(v),h=N.getModel(y),f=JT(s),p=JT(h),w=N.getModel(_),S=N.getModel(x);if(o){a=o.indexOfName(t.name);var M=o.getItemVisual(a,"color",!0);M&&(f.fill=M)}var T=function(e){return[e[0]*g[0]+m[0],e[1]*g[1]+m[1]]};Fe.each(t.geometries,(function(e){if("polygon"===e.type){for(var t=[],n=0;n<e.exterior.length;++n)t.push(T(e.exterior[n]));i.shape.paths.push(new Jc.Polygon({segmentIgnoreThreshold:1,shape:{points:t}}));for(n=0;n<(e.interiors?e.interiors.length:0);++n){for(var a=e.interiors[n],r=(t=[],0);r<a.length;++r)t.push(T(a[r]));i.shape.paths.push(new Jc.Polygon({segmentIgnoreThreshold:1,shape:{points:t}}))}}})),i.setStyle(f),i.style.strokeNoScale=!0,i.culling=!0;var I=w.get("show"),A=S.get("show"),D=o&&isNaN(o.get(o.mapDimension("value"),a)),C=o&&o.getItemLayout(a);if(r||D&&(I||A)||C&&C.showLabel){var O,k=r?t.name:a;(!o||a>=0)&&(O=e);var L=new Jc.Text({position:T(t.center.slice()),scale:[1/c.scale[0],1/c.scale[1]],z2:10,silent:!0});if(Jc.setLabelStyle(L.style,L.hoverStyle={},w,S,{labelFetcher:O,labelDataIndex:k,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!d){var E=[1/l[0],1/l[1]];Jc.updateProps(L,{scale:E},e)}n.add(L)}if(o)o.setItemGraphicEl(a,n);else{var N=e.getRegionModel(t.name);i.eventData={componentType:"geo",componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:t.name,region:N&&N.option||{}}}(n.__regions||(n.__regions=[])).push(t),n.highDownSilentOnTouch=!!e.get("selectedMode"),Jc.setHoverStyle(n,p),u.add(n)})),this._updateController(e,t,n),function(e,t,n,i,a){n.off("click"),n.off("mousedown"),t.get("selectedMode")&&(n.on("mousedown",(function(){e._mouseDownFlag=!0})),n.on("click",(function(r){if(e._mouseDownFlag){e._mouseDownFlag=!1;for(var o=r.target;!o.__regions;)o=o.parent;if(o){var s={type:("geo"===t.mainType?"geo":"map")+"ToggleSelect",batch:Fe.map(o.__regions,(function(e){return{name:e.name,from:a.uid}}))};s[t.mainType+"Id"]=t.id,i.dispatchAction(s),eI(t,n)}}})))}(this,e,u,n,i),eI(e,u)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&AT.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(e){var t=e.map;this._mapName!==t&&Fe.each(AT.makeGraphic(t,this.uid),(function(e){this._backgroundGroup.add(e)}),this),this._mapName=t},_updateController:function(e,t,n){var i=e.coordinateSystem,a=this._controller,r=this._controllerHost;r.zoomLimit=e.get("scaleLimit"),r.zoom=i.getZoom(),a.enable(e.get("roam")||!1);var o=e.mainType;function s(){var t={type:"geoRoam",componentType:o};return t[o+"Id"]=e.id,t}a.off("pan").on("pan",(function(e){this._mouseDownFlag=!1,ZT.updateViewOnPan(r,e.dx,e.dy),n.dispatchAction(Fe.extend(s(),{dx:e.dx,dy:e.dy}))}),this),a.off("zoom").on("zoom",(function(e){if(this._mouseDownFlag=!1,ZT.updateViewOnZoom(r,e.scale,e.originX,e.originY),n.dispatchAction(Fe.extend(s(),{zoom:e.scale,originX:e.originX,originY:e.originY})),this._updateGroup){var t=this.group.scale;this._regionsGroup.traverse((function(e){"text"===e.type&&e.attr("scale",[1/t[0],1/t[1]])}))}}),this),a.setPointerChecker((function(t,a,r){return i.getViewRectAfterRoam().contain(a,r)&&!$T(t,n,e)}))}};var nI=tI,iI="__seriesMapHighDown",aI="__seriesMapCallKey";function rI(e){var t=this[iI];t&&t.recordVersion===this[aI]&&oI(t,e)}function oI(e,t){var n=e.circle,i=e.labelModel,a=e.hoverLabelModel,r=e.emphasisText,o=e.normalText;t?(n.style.extendFrom(Jc.setTextStyle({},a,{text:a.get("show")?r:null},{isRectText:!0,useInsideStyle:!1},!0)),n.__mapOriginalZ2=n.z2,n.z2+=Jc.Z2_EMPHASIS_LIFT):(Jc.setTextStyle(n.style,i,{text:i.get("show")?o:null,textPosition:i.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),n.dirty(!1),null!=n.__mapOriginalZ2&&(n.z2=n.__mapOriginalZ2,n.__mapOriginalZ2=null))}jx.extendChartView({type:"map",render:function(e,t,n,i){if(!i||"mapToggleSelect"!==i.type||i.from!==this.uid){var a=this.group;if(a.removeAll(),!e.getHostGeoModel()){if(i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===e.id)(r=this._mapDraw)&&a.add(r.group);else if(e.needsDrawMap){var r=this._mapDraw||new nI(n,!0);a.add(r.group),r.draw(e,t,n,this,i),this._mapDraw=r}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&t.getComponent("legend")&&this._renderSymbols(e,t,n)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(e,t,n){var i=e.originalData,a=this.group;i.each(i.mapDimension("value"),(function(t,n){if(!isNaN(t)){var r=i.getItemLayout(n);if(r&&r.point){var o=r.point,s=r.offset,l=new Jc.Circle({style:{fill:e.getData().getVisual("color")},shape:{cx:o[0]+9*s,cy:o[1],r:3},silent:!0,z2:8+(s?0:Jc.Z2_EMPHASIS_LIFT+1)});if(!s){var u=e.mainSeries.getData(),c=i.getName(n),h=u.indexOfName(c),d=i.getItemModel(n),f=d.getModel("label"),p=d.getModel("emphasis.label"),g=u.getItemGraphicEl(h),m=Fe.retrieve2(e.getFormattedLabel(h,"normal"),c),v=Fe.retrieve2(e.getFormattedLabel(h,"emphasis"),m),y=g[iI],_=Math.random();if(!y){y=g[iI]={};var x=Fe.curry(rI,!0),b=Fe.curry(rI,!1);g.on("mouseover",x).on("mouseout",b).on("emphasis",x).on("normal",b)}g[aI]=_,Fe.extend(y,{recordVersion:_,circle:l,labelModel:f,hoverLabelModel:p,emphasisText:v,normalText:m}),oI(y,!1)}a.add(l)}}}))}});var sI=function(e,t,n){var i=e.getZoom(),a=e.getCenter(),r=t.zoom,o=e.dataToPoint(a);if(null!=t.dx&&null!=t.dy){o[0]-=t.dx,o[1]-=t.dy;a=e.pointToData(o);e.setCenter(a)}if(null!=r){if(n){var s=n.min||0,l=n.max||1/0;r=Math.max(Math.min(i*r,l),s)/i}e.scale[0]*=r,e.scale[1]*=r;var u=e.position,c=(t.originX-u[0])*(r-1),h=(t.originY-u[1])*(r-1);u[0]-=c,u[1]-=h,e.updateTransform();a=e.pointToData(o);e.setCenter(a),e.setZoom(r*i)}return{center:e.getCenter(),zoom:e.getZoom()}},lI={updateCenterAndZoom:sI},uI=lI.updateCenterAndZoom;jx.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},(function(t){var i=t.coordinateSystem;if("geo"===i.type){var a=uI(i,e,t.get("scaleLimit"));t.setCenter&&t.setCenter(a.center),t.setZoom&&t.setZoom(a.zoom),"series"===n&&Fe.each(t.seriesGroup,(function(e){e.setCenter(a.center),e.setZoom(a.zoom)}))}}))}));var cI=ht.applyTransform;function hI(){mn.call(this)}function dI(e){this.name=e,this.zoomLimit,mn.call(this),this._roamTransformable=new hI,this._rawTransformable=new hI,this._center,this._zoom}function fI(e,t,n,i){var a=n.seriesModel,r=a?a.coordinateSystem:null;return r===this?r[e](i):null}Fe.mixin(hI,mn),dI.prototype={constructor:dI,type:"view",dimensions:["x","y"],setBoundingRect:function(e,t,n,i){return this._rect=new Ni(e,t,n,i),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(e,t,n,i){this.transformTo(e,t,n,i),this._viewRect=new Ni(e,t,n,i)},transformTo:function(e,t,n,i){var a=this.getBoundingRect(),r=this._rawTransformable;r.transform=a.calculateTransform(new Ni(e,t,n,i)),r.decomposeTransform(),this._updateTransform()},setCenter:function(e){e&&(this._center=e,this._updateCenterAndZoom())},setZoom:function(e){e=e||1;var t=this.zoomLimit;t&&(null!=t.max&&(e=Math.min(t.max,e)),null!=t.min&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},getDefaultCenter:function(){var e=this.getBoundingRect();return[e.x+e.width/2,e.y+e.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),a=this.getZoom();i=ht.applyTransform([],i,e),n=ht.applyTransform([],n,e),t.origin=i,t.position=[n[0]-i[0],n[1]-i[1]],t.scale=[a,a],this._updateTransform()},_updateTransform:function(){var e=this._roamTransformable,t=this._rawTransformable;t.parent=e,e.updateTransform(),t.updateTransform(),sn.copy(this.transform||(this.transform=[]),t.transform||sn.create()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],sn.invert(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var e=this._roamTransformable.transform,t=this._rawTransformable;return{roamTransform:e?Fe.slice(e):sn.create(),rawScale:Fe.slice(t.scale),rawPosition:Fe.slice(t.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},dataToPoint:function(e,t,n){var i=t?this._rawTransform:this.transform;return n=n||[],i?cI(n,e,i):ht.copy(n,e)},pointToData:function(e){var t=this.invTransform;return t?cI([],e,t):[e[0],e[1]]},convertToPixel:Fe.curry(fI,"dataToPoint"),convertFromPixel:Fe.curry(fI,"pointToData"),containPoint:function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])}},Fe.mixin(dI,mn);var pI=dI;function gI(e,t,n,i){pI.call(this,e),this.map=t;var a=AT.load(t,n);this._nameCoordMap=a.nameCoordMap,this._regionsMap=a.regionsMap,this._invertLongitute=null==i||i,this.regions=a.regions,this._rect=a.boundingRect}function mI(e,t,n,i){var a=n.geoModel,r=n.seriesModel,o=a?a.coordinateSystem:r?r.coordinateSystem||(r.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return o===this?o[e](i):null}gI.prototype={constructor:gI,type:"geo",dimensions:["lng","lat"],containCoord:function(e){for(var t=this.regions,n=0;n<t.length;n++)if(t[n].contain(e))return!0;return!1},transformTo:function(e,t,n,i){var a=this.getBoundingRect(),r=this._invertLongitute;a=a.clone(),r&&(a.y=-a.y-a.height);var o=this._rawTransformable;if(o.transform=a.calculateTransform(new Ni(e,t,n,i)),o.decomposeTransform(),r){var s=o.scale;s[1]=-s[1]}o.updateTransform(),this._updateTransform()},getRegion:function(e){return this._regionsMap.get(e)},getRegionByCoord:function(e){for(var t=this.regions,n=0;n<t.length;n++)if(t[n].contain(e))return t[n]},addGeoCoord:function(e,t){this._nameCoordMap.set(e,t)},getGeoCoord:function(e){return this._nameCoordMap.get(e)},getBoundingRect:function(){return this._rect},dataToPoint:function(e,t,n){if("string"==typeof e&&(e=this.getGeoCoord(e)),e)return pI.prototype.dataToPoint.call(this,e,t,n)},convertToPixel:Fe.curry(mI,"dataToPoint"),convertFromPixel:Fe.curry(mI,"pointToData")},Fe.mixin(gI,pI);var vI=gI;function yI(e,t){var n=e.get("boundingCoords");if(null!=n){var i=n[0],a=n[1];isNaN(i[0])||isNaN(i[1])||isNaN(a[0])||isNaN(a[1])||this.setBoundingRect(i[0],i[1],a[0]-i[0],a[1]-i[1])}var r,o=this.getBoundingRect(),s=e.get("layoutCenter"),l=e.get("layoutSize"),u=t.getWidth(),c=t.getHeight(),h=o.width/o.height*this.aspectScale,d=!1;if(s&&l&&(s=[Ch.parsePercent(s[0],u),Ch.parsePercent(s[1],c)],l=Ch.parsePercent(l,Math.min(u,c)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0)),d){var f={};h>1?(f.width=l,f.height=l/h):(f.height=l,f.width=l*h),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(r=e.getBoxLayoutParams()).aspect=h,f=td.getLayoutRect(r,{width:u,height:c});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(e.get("center")),this.setZoom(e.get("zoom"))}function _I(e,t){Fe.each(t.get("geoCoord"),(function(t,n){e.addGeoCoord(n,t)}))}var xI={dimensions:vI.prototype.dimensions,create:function(e,t){var n=[];e.eachComponent("geo",(function(e,i){var a=e.get("map"),r=e.get("aspectScale"),o=!0,s=qm.retrieveMap(a);s&&s[0]&&"svg"===s[0].type?(null==r&&(r=1),o=!1):null==r&&(r=.75);var l=new vI(a+i,a,e.get("nameMap"),o);l.aspectScale=r,l.zoomLimit=e.get("scaleLimit"),n.push(l),_I(l,e),e.coordinateSystem=l,l.model=e,l.resize=yI,l.resize(e,t)})),e.eachSeries((function(e){if("geo"===e.get("coordinateSystem")){var t=e.get("geoIndex")||0;e.coordinateSystem=n[t]}}));var i={};return e.eachSeriesByType("map",(function(e){if(!e.getHostGeoModel()){var t=e.getMapType();i[t]=i[t]||[],i[t].push(e)}})),Fe.each(i,(function(e,i){var a=Fe.map(e,(function(e){return e.get("nameMap")})),r=new vI(i,i,Fe.mergeAll(a));r.zoomLimit=Fe.retrieve.apply(null,Fe.map(e,(function(e){return e.get("scaleLimit")}))),n.push(r),r.resize=yI,r.aspectScale=e[0].get("aspectScale"),r.resize(e[0],t),Fe.each(e,(function(e){e.coordinateSystem=r,_I(r,e)}))})),n},getFilledRegions:function(e,t,n){for(var i=(e||[]).slice(),a=Fe.createHashMap(),r=0;r<i.length;r++)a.set(i[r].name,i[r]);var o=AT.load(t,n);return Fe.each(o.regions,(function(e){var t=e.name;!a.get(t)&&i.push({name:t})})),i}};jx.registerCoordinateSystem("geo",xI);var bI=xI;var wI=function(e){var t={};e.eachSeriesByType("map",(function(n){var i=n.getMapType();if(!n.getHostGeoModel()&&!t[i]){var a={};Fe.each(n.seriesGroup,(function(t){var n=t.coordinateSystem,i=t.originalData;t.get("showLegendSymbol")&&e.getComponent("legend")&&i.each(i.mapDimension("value"),(function(e,t){var r=i.getName(t),o=n.getRegion(r);if(o&&!isNaN(e)){var s=a[r]||0,l=n.dataToPoint(o.center);a[r]=s+1,i.setItemLayout(t,{point:l,offset:s})}}))}));var r=n.getData();r.each((function(e){var t=r.getName(e),n=r.getItemLayout(e)||{};n.showLabel=!a[t],r.setItemLayout(e,n)})),t[i]=!0}}))};var SI=function(e){e.eachSeriesByType("map",(function(e){var t=e.get("color"),n=e.getModel("itemStyle"),i=n.get("areaColor"),a=n.get("color")||t[e.seriesIndex%t.length];e.getData().setVisual({areaColor:i,color:a})}))};var MI=function(e){var t={};e.eachSeriesByType("map",(function(e){var n=e.getHostGeoModel(),i=n?"o"+n.id:"i"+e.getMapType();(t[i]=t[i]||[]).push(e)})),Fe.each(t,(function(e,t){for(var n,i,a,r=(n=Fe.map(e,(function(e){return e.getData()})),i=e[0].get("mapValueCalculation"),a={},Fe.each(n,(function(e){e.each(e.mapDimension("value"),(function(t,n){var i="ec-"+e.getName(n);a[i]=a[i]||[],isNaN(t)||a[i].push(t)}))})),n[0].map(n[0].mapDimension("value"),(function(e,t){for(var r="ec-"+n[0].getName(t),o=0,s=1/0,l=-1/0,u=a[r].length,c=0;c<u;c++)s=Math.min(s,a[r][c]),l=Math.max(l,a[r][c]),o+=a[r][c];return 0===u?NaN:"min"===i?s:"max"===i?l:"average"===i?o/u:o}))),o=0;o<e.length;o++)e[o].originalData=e[o].getData();for(o=0;o<e.length;o++)e[o].seriesGroup=e,e[o].needsDrawMap=0===o&&!e[o].getHostGeoModel(),e[o].setData(r.cloneShallow()),e[o].mainSeries=e[0]}))};var TI=function(e){Fe.each(e.series,(function(e){e&&"map"===e.type&&(e.map=e.map||e.mapType,Fe.defaults(e,e.mapLocation))}))};jx.registerLayout(wI),jx.registerVisual(SI),jx.registerProcessor(jx.PRIORITY.PROCESSOR.STATISTIC,MI),jx.registerPreprocessor(TI),xM("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var II=Fe.each,AI="\0__link_datas",DI="\0__link_mainData";function CI(e,t){if((i=this)[DI]===i){var n=Fe.extend({},this[AI]);n[this.dataType]=t,EI(t,n,e)}else NI(t,this.dataType,this[DI],e);var i;return t}function OI(e,t){return e.struct&&e.struct.update(this),t}function kI(e,t){return II(t[AI],(function(n,i){n!==t&&NI(n.cloneShallow(),i,t,e)})),t}function LI(e){var t=this[DI];return null==e||null==t?t:t[AI][e]}function EI(e,t,n){e[AI]={},II(t,(function(t,i){NI(t,i,e,n)}))}function NI(e,t,n,i){n[AI][t]=e,e[DI]=n,e.dataType=t,i.struct&&(e[i.structAttr]=i.struct,i.struct[i.datasAttr[t]]=e),e.getLinkedData=LI}var PI=function(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,EI(t,n,e),II(n,(function(n){II(t.TRANSFERABLE_METHODS,(function(t){n.wrapMethod(t,Fe.curry(CI,e))}))})),t.wrapMethod("cloneShallow",Fe.curry(kI,e)),II(t.CHANGABLE_METHODS,(function(n){t.wrapMethod(n,Fe.curry(OI,e))})),Fe.assert(n[t.dataType]===t)},RI=function(e,t){this.name=e||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=t};function zI(e,t){this.root,this.data,this._nodes=[],this.hostModel=e,this.levelModels=Fe.map(t||[],(function(t){return new ph(t,e,e.ecModel)}))}RI.prototype={constructor:RI,isRemoved:function(){return this.dataIndex<0},eachNode:function(e,t,n){"function"==typeof e&&(n=t,t=e,e=null),e=e||{},Fe.isString(e)&&(e={order:e});var i,a=e.order||"preorder",r=this[e.attr||"children"];"preorder"===a&&(i=t.call(n,this));for(var o=0;!i&&o<r.length;o++)r[o].eachNode(e,t,n);"postorder"===a&&t.call(n,this)},updateDepthAndHeight:function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(e+1),i.height>t&&(t=i.height)}this.height=t+1},getNodeById:function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,i=n.length;t<i;t++){var a=n[t].getNodeById(e);if(a)return a}},contains:function(e){if(e===this)return!0;for(var t=0,n=this.children,i=n.length;t<i;t++){var a=n[t].contains(e);if(a)return a}},getAncestors:function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},getValue:function(e){var t=this.hostTree.data;return t.get(t.getDimension(e||"value"),this.dataIndex)},setLayout:function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(e){if(!(this.dataIndex<0)){var t=this.hostTree.data.getItemModel(this.dataIndex),n=this.getLevelModel();return n?t.getModel(e,n.getModel(e)):t.getModel(e)}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},setVisual:function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},getVisual:function(e,t){return this.hostTree.data.getItemVisual(this.dataIndex,e,t)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},isDescendantOf:function(e){return e!==this&&e.isAncestorOf(this)}},zI.prototype={constructor:zI,type:"tree",eachNode:function(e,t,n){this.root.eachNode(e,t,n)},getNodeByDataIndex:function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},getNodeByName:function(e){return this.root.getNodeByName(e)},update:function(){for(var e=this.data,t=this._nodes,n=0,i=t.length;n<i;n++)t[n].dataIndex=-1;for(n=0,i=e.count();n<i;n++)t[e.getRawIndex(n)].dataIndex=n},clearLayouts:function(){this.data.clearItemLayouts()}},zI.createTree=function(e,t,n,i){var a=new zI(t,n&&n.levels),r=[],o=1;!function e(t,n){var i=t.value;o=Math.max(o,Fe.isArray(i)?i.length:1),r.push(t);var s=new RI(t.name,a);n?function(e,t){var n=t.children;if(e.parentNode===t)return;n.push(e),e.parentNode=t}(s,n):a.root=s,a._nodes.push(s);var l=t.children;if(l)for(var u=0;u<l.length;u++)e(l[u],s)}(e),a.root.updateDepthAndHeight(0);var s=Zv(r,{coordDimensions:["value"],dimensionsCount:o}),l=new Lv(s,t);return l.initData(r),i&&i(l),PI({mainData:l,struct:a,structAttr:"tree"}),a.update(),a};var BI=zI,VI=Fh.encodeHTML;function HI(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function YI(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function FI(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function GI(e,t,n){var i=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=i,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=i}function WI(e,t){return e.parentNode===t.parentNode?1:2}ag.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(e){var t={name:e.name,children:e.data},n=e.leaves||{},i=new ph(n,this,this.ecModel),a=BI.createTree(t,this,{},(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=a.getNodeByDataIndex(t);return n.children.length&&n.isExpand||(e.parentModel=i),e}))}));var r=0;a.eachNode("preorder",(function(e){e.depth>r&&(r=e.depth)}));var o=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:r;return a.root.eachNode("preorder",(function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=o})),a.data},getOrient:function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},formatTooltip:function(e){for(var t=this.getData().tree,n=t.root.children[0],i=t.getNodeByDataIndex(e),a=i.getValue(),r=i.name;i&&i!==n;)r=i.parentNode.name+"."+r,i=i.parentNode;return VI(r+(isNaN(a)||null==a?"":" : "+a))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var jI=function(e){e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t,n,i=[e];t=i.pop();)if(n=t.children,t.isExpand&&n.length)for(var a=n.length-1;a>=0;a--){var r=n[a];r.hierNode={defaultAncestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},i.push(r)}},UI=function(e,t){var n=e.isExpand?e.children:[],i=e.parentNode.children,a=e.hierNode.i?i[e.hierNode.i-1]:null;if(n.length){!function(e){var t=e.children,n=t.length,i=0,a=0;for(;--n>=0;){var r=t[n];r.hierNode.prelim+=i,r.hierNode.modifier+=i,a+=r.hierNode.change,i+=r.hierNode.shift+a}}(e);var r=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;a?(e.hierNode.prelim=a.hierNode.prelim+t(e,a),e.hierNode.modifier=e.hierNode.prelim-r):e.hierNode.prelim=r}else a&&(e.hierNode.prelim=a.hierNode.prelim+t(e,a));e.parentNode.hierNode.defaultAncestor=function(e,t,n,i){if(t){for(var a=e,r=e,o=r.parentNode.children[0],s=t,l=a.hierNode.modifier,u=r.hierNode.modifier,c=o.hierNode.modifier,h=s.hierNode.modifier;s=HI(s),r=YI(r),s&&r;){a=HI(a),o=YI(o),a.hierNode.ancestor=e;var d=s.hierNode.prelim+h-r.hierNode.prelim-u+i(s,r);d>0&&(GI(FI(s,e,n),e,d),u+=d,l+=d),h+=s.hierNode.modifier,u+=r.hierNode.modifier,l+=a.hierNode.modifier,c+=o.hierNode.modifier}s&&!HI(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=h-l),r&&!YI(o)&&(o.hierNode.thread=r,o.hierNode.modifier+=u-c,n=e)}return n}(e,a,e.parentNode.hierNode.defaultAncestor||i[0],t)},ZI=function(e){return arguments.length?e:WI},XI={init:jI,firstWalk:UI,secondWalk:function(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier},separation:ZI,radialCoordinate:function(e,t){var n={};return e-=Math.PI/2,n.x=t*Math.cos(e),n.y=t*Math.sin(e),n},getViewRect:function(e,t){return td.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}},qI=XI.radialCoordinate,KI=KT.onIrrelevantElement,$I=Ch.parsePercent,QI=Jc.extendShape({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n=t.childPoints,i=n.length,a=t.parentPoint,r=n[0],o=n[i-1];if(1===i)return e.moveTo(a[0],a[1]),void e.lineTo(r[0],r[1]);var s=t.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=$I(t.forkPosition,1),h=[];h[l]=a[l],h[u]=a[u]+(o[u]-a[u])*c,e.moveTo(a[0],a[1]),e.lineTo(h[0],h[1]),e.moveTo(r[0],r[1]),h[l]=r[l],e.lineTo(h[0],h[1]),h[l]=o[l],e.lineTo(h[0],h[1]),e.lineTo(o[0],o[1]);for(var d=1;d<i-1;d++){var f=n[d];e.moveTo(f[0],f[1]),h[l]=f[l],e.lineTo(h[0],h[1])}}});function JI(e,t){var n=e.getItemLayout(t);return n&&!isNaN(n.x)&&!isNaN(n.y)&&"none"!==e.getItemVisual(t,"symbol")}function eA(e,t,n){return n.itemModel=t,n.itemStyle=t.getModel("itemStyle").getItemStyle(),n.hoverItemStyle=t.getModel("emphasis.itemStyle").getItemStyle(),n.lineStyle=t.getModel("lineStyle").getLineStyle(),n.labelModel=t.getModel("label"),n.hoverLabelModel=t.getModel("emphasis.label"),!1===e.isExpand&&0!==e.children.length?n.symbolInnerColor=n.itemStyle.fill:n.symbolInnerColor="#fff",n}function tA(e,t,n,i,a,r){var o=!n,s=e.tree.getNodeByDataIndex(t),l=s.getModel(),u=(r=eA(s,l,r),e.tree.root),c=s.parentNode===u?s:s.parentNode||s,h=e.getItemGraphicEl(c.dataIndex),d=c.getLayout(),f=h?{x:h.position[0],y:h.position[1],rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:d,p=s.getLayout();o?(n=new lb(e,t,r)).attr("position",[f.x,f.y]):n.updateData(e,t,r),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=p.rawX,n.__radialRawY=p.rawY,i.add(n),e.setItemGraphicEl(t,n),Jc.updateProps(n,{position:[p.x,p.y]},a);var g=n.getSymbolPath();if("radial"===r.layout){var m,v,y=u.children[0],_=y.getLayout(),x=y.children.length;if(p.x===_.x&&!0===s.isExpand){var b={};b.x=(y.children[0].getLayout().x+y.children[x-1].getLayout().x)/2,b.y=(y.children[0].getLayout().y+y.children[x-1].getLayout().y)/2,(m=Math.atan2(b.y-_.y,b.x-_.x))<0&&(m=2*Math.PI+m),(v=b.x<_.x)&&(m-=Math.PI)}else(m=Math.atan2(p.y-_.y,p.x-_.x))<0&&(m=2*Math.PI+m),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(v=p.x<_.x)&&(m-=Math.PI):(v=p.x>_.x)||(m-=Math.PI);var w=v?"left":"right",S=r.labelModel.get("rotate"),M=S*(Math.PI/180);g.setStyle({textPosition:r.labelModel.get("position")||w,textRotation:null==S?-m:M,textOrigin:"center",verticalAlign:"middle"})}!function(e,t,n,i,a,r,o,s,l){var u=l.edgeShape,c=i.__edge;if("curve"===u)t.parentNode&&t.parentNode!==n&&(c||(c=i.__edge=new Jc.BezierCurve({shape:iA(l,a,a),style:Fe.defaults({opacity:0,strokeNoScale:!0},l.lineStyle)})),Jc.updateProps(c,{shape:iA(l,r,o),style:{opacity:1}},e));else if("polyline"===u&&"orthogonal"===l.layout&&t!==n&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var h=t.children,d=[],f=0;f<h.length;f++){var p=h[f].getLayout();d.push([p.x,p.y])}c||(c=i.__edge=new QI({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:l.orient,forkPosition:l.edgeForkPosition},style:Fe.defaults({opacity:0,strokeNoScale:!0},l.lineStyle)})),Jc.updateProps(c,{shape:{parentPoint:[o.x,o.y],childPoints:d},style:{opacity:1}},e)}s.add(c)}(a,s,u,n,f,d,p,i,r)}function nA(e,t,n,i,a,r){for(var o,s=e.tree.getNodeByDataIndex(t),l=e.tree.root,u=s.getModel(),c=(r=eA(s,u,r),s.parentNode===l?s:s.parentNode||s),h=r.edgeShape;null==(o=c.getLayout());)c=c.parentNode===l?c:c.parentNode||c;Jc.updateProps(n,{position:[o.x+1,o.y+1]},a,(function(){i.remove(n),e.setItemGraphicEl(t,null)})),n.fadeOut(null,{keepLabel:!0});var d=e.getItemGraphicEl(c.dataIndex).__edge,f=n.__edge||(!1===c.isExpand||1===c.children.length?d:void 0);h=r.edgeShape;f&&("curve"===h?Jc.updateProps(f,{shape:iA(r,o,o),style:{opacity:0}},a,(function(){i.remove(f)})):"polyline"===h&&"orthogonal"===r.layout&&Jc.updateProps(f,{shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]]},style:{opacity:0}},a,(function(){i.remove(f)})))}function iA(e,t,n){var i,a,r,o,s,l,u,c,h=e.orient;if("radial"===e.layout){s=t.rawX,u=t.rawY,l=n.rawX,c=n.rawY;var d=qI(s,u),f=qI(s,u+(c-u)*e.curvature),p=qI(l,c+(u-c)*e.curvature),g=qI(l,c);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}return s=t.x,u=t.y,l=n.x,c=n.y,"LR"!==h&&"RL"!==h||(i=s+(l-s)*e.curvature,a=u,r=l+(s-l)*e.curvature,o=c),"TB"!==h&&"BT"!==h||(i=s,a=u+(c-u)*e.curvature,r=l,o=c+(u-c)*e.curvature),{x1:s,y1:u,x2:l,y2:c,cpx1:i,cpy1:a,cpx2:r,cpy2:o}}jx.extendChartView({type:"tree",init:function(e,t){this._oldTree,this._mainGroup=new Jc.Group,this._controller=new jT(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(e,t,n,i){var a=e.getData(),r=e.layoutInfo,o=this._mainGroup,s=e.get("layout");"radial"===s?o.attr("position",[r.x+r.width/2,r.y+r.height/2]):o.attr("position",[r.x,r.y]),this._updateViewCoordSys(e,r,s),this._updateController(e,t,n);var l=this._data,u={expandAndCollapse:e.get("expandAndCollapse"),layout:s,edgeShape:e.get("edgeShape"),edgeForkPosition:e.get("edgeForkPosition"),orient:e.getOrient(),curvature:e.get("lineStyle.curveness"),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};a.diff(l).add((function(t){JI(a,t)&&tA(a,t,null,o,e,u)})).update((function(t,n){var i=l.getItemGraphicEl(n);JI(a,t)?tA(a,t,i,o,e,u):i&&nA(l,n,i,o,e,u)})).remove((function(t){var n=l.getItemGraphicEl(t);n&&nA(l,t,n,o,e,u)})).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===u.expandAndCollapse&&a.eachItemGraphicEl((function(t,i){t.off("click").on("click",(function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:i})}))})),this._data=a},_updateViewCoordSys:function(e){var t=e.getData(),n=[];t.each((function(e){var i=t.getItemLayout(e);!i||isNaN(i.x)||isNaN(i.y)||n.push([+i.x,+i.y])}));var i=[],a=[];Ns.fromPoints(n,i,a);var r=this._min,o=this._max;a[0]-i[0]==0&&(i[0]=r?r[0]:i[0]-1,a[0]=o?o[0]:a[0]+1),a[1]-i[1]==0&&(i[1]=r?r[1]:i[1]-1,a[1]=o?o[1]:a[1]+1);var s=e.coordinateSystem=new pI;s.zoomLimit=e.get("scaleLimit"),s.setBoundingRect(i[0],i[1],a[0]-i[0],a[1]-i[1]),s.setCenter(e.get("center")),s.setZoom(e.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=i,this._max=a},_updateController:function(e,t,n){var i=this._controller,a=this._controllerHost,r=this.group;i.setPointerChecker((function(t,i,a){var o=r.getBoundingRect();return o.applyTransform(r.transform),o.contain(i,a)&&!KI(t,n,e)})),i.enable(e.get("roam")),a.zoomLimit=e.get("scaleLimit"),a.zoom=e.coordinateSystem.getZoom(),i.off("pan").off("zoom").on("pan",(function(t){ZT.updateViewOnPan(a,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})}),this).on("zoom",(function(t){ZT.updateViewOnZoom(a,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(e)}),this)},_updateNodeAndLinkScale:function(e){var t=e.getData(),n=this._getNodeGlobalScale(e),i=[n,n];t.eachItemGraphicEl((function(e,t){e.attr("scale",i)}))},_getNodeGlobalScale:function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=this._nodeScaleRatio,i=t.scale,a=i&&i[0]||1;return((t.getZoom()-1)*n+1)/a},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}});var aA=lI.updateCenterAndZoom;jx.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var n=e.dataIndex,i=t.getData().tree.getNodeByDataIndex(n);i.isExpand=!i.isExpand}))})),jx.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var n=t.coordinateSystem,i=aA(n,e);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom)}))}));var rA=function(e,t,n){for(var i,a=[e],r=[];i=a.pop();)if(r.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s<o.length;s++)a.push(o[s])}for(;i=r.pop();)t(i,n)},oA=function(e,t){for(var n,i=[e];n=i.pop();)if(t(n),n.isExpand){var a=n.children;if(a.length)for(var r=a.length-1;r>=0;r--)i.push(a[r])}},sA={eachAfter:rA,eachBefore:oA},lA=sA.eachAfter,uA=sA.eachBefore,cA=XI.init,hA=XI.firstWalk,dA=XI.secondWalk,fA=XI.separation,pA=XI.radialCoordinate,gA=XI.getViewRect;var mA=function(e,t){e.eachSeriesByType("tree",(function(e){!function(e,t){var n=gA(e,t);e.layoutInfo=n;var i=e.get("layout"),a=0,r=0,o=null;"radial"===i?(a=2*Math.PI,r=Math.min(n.height,n.width)/2,o=fA((function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth}))):(a=n.width,r=n.height,o=fA());var s=e.getData().tree.root,l=s.children[0];if(l){cA(s),lA(l,hA,o),s.hierNode.modifier=-l.hierNode.prelim,uA(l,dA);var u=l,c=l,h=l;uA(l,(function(e){var t=e.getLayout().x;t<u.getLayout().x&&(u=e),t>c.getLayout().x&&(c=e),e.depth>h.depth&&(h=e)}));var d=u===c?1:o(u,c)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===i)p=a/(c.getLayout().x+d+f),g=r/(h.depth-1||1),uA(l,(function(e){m=(e.getLayout().x+f)*p,v=(e.depth-1)*g;var t=pA(m,v);e.setLayout({x:t.x,y:t.y,rawX:m,rawY:v},!0)}));else{var y=e.getOrient();"RL"===y||"LR"===y?(g=r/(c.getLayout().x+d+f),p=a/(h.depth-1||1),uA(l,(function(e){v=(e.getLayout().x+f)*g,m="LR"===y?(e.depth-1)*p:a-(e.depth-1)*p,e.setLayout({x:m,y:v},!0)}))):"TB"!==y&&"BT"!==y||(p=a/(c.getLayout().x+d+f),g=r/(h.depth-1||1),uA(l,(function(e){m=(e.getLayout().x+f)*p,v="TB"===y?(e.depth-1)*g:r-(e.depth-1)*g,e.setLayout({x:m,y:v},!0)})))}}}(e,t)}))};function vA(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}jx.registerVisual(tw("tree","circle")),jx.registerLayout(mA);var yA={retrieveTargetInfo:function(e,t,n){if(e&&Fe.indexOf(t,e.type)>=0){var i=n.getData().tree.root,a=e.targetNode;if("string"==typeof a&&(a=i.getNodeById(a)),a&&i.contains(a))return{node:a};var r=e.targetNodeId;if(null!=r&&(a=i.getNodeById(r)))return{node:a}}},getPathToRoot:vA,aboveViewRoot:function(e,t){var n=vA(e);return Fe.indexOf(n,t)>=0},wrapTreePathInfo:function(e,t){for(var n=[];e;){var i=e.dataIndex;n.push({name:e.name,dataIndex:i,value:t.getRawValue(i)}),e=e.parentNode}return n.reverse(),n}},_A=Fh.encodeHTML,xA=Fh.addCommas,bA=yA.wrapTreePathInfo;function wA(e){var t=0;Fe.each(e.children,(function(e){wA(e);var n=e.value;Fe.isArray(n)&&(n=n[0]),t+=n}));var n=e.value;Fe.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),Fe.isArray(e.value)?e.value[0]=n:e.value=n}ag.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(e,t){var n={name:e.name,children:e.data};wA(n);var i=e.levels||[];i=e.levels=function(e,t){var n,i=t.get("color");if(!i)return;if(e=e||[],Fe.each(e,(function(e){var t=new ph(e),i=t.get("color");(t.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)})),!n){(e[0]||(e[0]={})).color=i.slice()}return e}(i,t);var a=Fe.map(i||[],(function(e){return new ph(e,this,t)}),this),r=BI.createTree(n,this,null,(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=r.getNodeByDataIndex(t),i=a[n.depth];return i&&(e.parentModel=i),e}))}));return r.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(e){var t=this.getData(),n=this.getRawValue(e),i=Fe.isArray(n)?xA(n[0]):xA(n),a=t.getName(e);return _A(a+": "+i)},getDataParams:function(e){var t=ag.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=bA(n,this),t},setLayoutInfo:function(e){this.layoutInfo=this.layoutInfo||{},Fe.extend(this.layoutInfo,e)},mapIdToIndex:function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=Fe.createHashMap(),this._idIndexMapCount=0);var n=t.get(e);return null==n&&t.set(e,n=this._idIndexMapCount++),n},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});var SA=yA.wrapTreePathInfo;function MA(e){this.group=new Jc.Group,e.add(this.group)}function TA(e,t,n,i,a,r){var o=[[a?e:e-5,t],[e+n,t],[e+n,t+i],[a?e:e-5,t+i]];return!r&&o.splice(2,0,[e+n+5,t+i/2]),!a&&o.push([e,t+i/2]),o}function IA(e,t,n){e.eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.componentIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&SA(n,t)}}MA.prototype={constructor:MA,render:function(e,t,n,i){var a=e.getModel("breadcrumb"),r=this.group;if(r.removeAll(),a.get("show")&&n){var o=a.getModel("itemStyle"),s=o.getModel("textStyle"),l={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(e,l,o,s,i),td.positionElement(r,l.pos,l.box)}},_prepare:function(e,t,n){for(var i=e;i;i=i.parentNode){var a=i.getModel().get("name"),r=n.getTextRect(a),o=Math.max(r.width+16,t.emptyItemWidth);t.totalWidth+=o+8,t.renderList.push({node:i,text:a,width:o})}},_renderContent:function(e,t,n,i,a){for(var r=0,o=t.emptyItemWidth,s=e.get("breadcrumb.height"),l=td.getAvailableSize(t.pos,t.box),u=t.totalWidth,c=t.renderList,h=c.length-1;h>=0;h--){var d=c[h],f=d.node,p=d.width,g=d.text;u>l.width&&(u-=p-o,p=o,g=null);var m=new Jc.Polygon({shape:{points:TA(r,0,p,s,h===c.length-1,0===h)},style:Fe.defaults(n.getItemStyle(),{lineJoin:"bevel",text:g,textFill:i.getTextColor(),textFont:i.getFont()}),z:10,onclick:Fe.curry(a,f)});this.group.add(m),IA(m,e,f),r+=p+8}},remove:function(){this.group.removeAll()}};var AA=MA;var DA=function(){var e,t=[],n={};return{add:function(e,i,a,r,o){return Fe.isString(r)&&(o=r,r=0),!n[e.id]&&(n[e.id]=1,t.push({el:e,target:i,time:a,delay:r,easing:o}),!0)},done:function(t){return e=t,this},start:function(){for(var i=t.length,a=0,r=t.length;a<r;a++){var o=t[a];o.el.animateTo(o.target,o.time,o.delay,o.easing,s)}return this;function s(){--i||(t.length=0,n={},e&&e())}}}},CA={createWrap:DA},OA=Fh.windowOpen,kA=Fe.bind,LA=Jc.Group,EA=Jc.Rect,NA=Fe.each,PA=["label"],RA=["emphasis","label"],zA=["upperLabel"],BA=["emphasis","upperLabel"],VA=Wo([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),HA=function(e){var t=VA(e);return t.stroke=t.fill=t.lineWidth=null,t};function YA(e,t,n,i,a,r,o,s,l,u){if(o){var c=o.getLayout(),h=e.getData();if(h.setItemGraphicEl(o.dataIndex,null),c&&c.isInView){var d=c.width,f=c.height,p=c.borderWidth,g=c.invisible,m=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,_=c.upperHeight,x=y&&y.length,b=o.getModel("itemStyle"),w=o.getModel("emphasis.itemStyle"),S=O("nodeGroup",LA);if(S){if(l.add(S),S.attr("position",[c.x||0,c.y||0]),S.__tmNodeWidth=d,S.__tmNodeHeight=f,c.isAboveViewRoot)return S;var M=o.getModel(),T=O("background",EA,u,1);if(T&&function(t,n,i){if(n.dataIndex=o.dataIndex,n.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:d,height:f}),g)A(n);else{n.invisible=!1;var a=o.getVisual("borderColor",!0),r=w.get("borderColor"),s=HA(b);s.fill=a;var l=VA(w);if(l.fill=r,i){var u=d-2*p;D(s,l,a,u,_,{x:p,y:0,width:u,height:_})}else s.text=l.text=null;n.setStyle(s),Jc.setElementHoverStyle(n,l)}t.add(n)}(S,T,x&&c.upperLabelHeight),x)Jc.isHighDownDispatcher(S)&&Jc.setAsHighDownDispatcher(S,!1),T&&(Jc.setAsHighDownDispatcher(T,!0),h.setItemGraphicEl(o.dataIndex,T));else{var I=O("content",EA,u,2);I&&function(t,n){n.dataIndex=o.dataIndex,n.seriesIndex=e.seriesIndex;var i=Math.max(d-2*p,0),a=Math.max(f-2*p,0);if(n.culling=!0,n.setShape({x:p,y:p,width:i,height:a}),g)A(n);else{n.invisible=!1;var r=o.getVisual("color",!0),s=HA(b);s.fill=r;var l=VA(w);D(s,l,r,i,a),n.setStyle(s),Jc.setElementHoverStyle(n,l)}t.add(n)}(S,I),T&&Jc.isHighDownDispatcher(T)&&Jc.setAsHighDownDispatcher(T,!1),Jc.setAsHighDownDispatcher(S,!0),h.setItemGraphicEl(o.dataIndex,S)}return S}}}function A(e){!e.invisible&&r.push(e)}function D(t,n,i,a,r,s){var l=M.get("name"),u=M.getModel(s?zA:PA),h=M.getModel(s?BA:RA),d=u.getShallow("show");Jc.setLabelStyle(t,n,u,h,{defaultText:d?l:null,autoColor:i,isRectText:!0,labelFetcher:e,labelDataIndex:o.dataIndex,labelProp:s?"upperLabel":"label"}),C(t,s,c),C(n,s,c),s&&(t.textRect=Fe.clone(s)),t.truncate=d&&u.get("ellipsis")?{outerWidth:a,outerHeight:r,minChar:2}:null}function C(t,n,i){var a=t.text;if(!n&&i.isLeafRoot&&null!=a){var r=e.get("drillDownIcon",!0);t.text=r?r+" "+a:a}}function O(e,r,s,l){var u=null!=v&&n[e][v],c=a[e];return u?(n[e][v]=null,function(e,t,n){var i=e[m]={};i.old="nodeGroup"===n?t.position.slice():Fe.extend({},t.shape)}(c,u,e)):g||((u=new r({z:FA(s,l)})).__tmDepth=s,u.__tmStorageName=e,function(e,t,n){var r=e[m]={},s=o.parentNode;if(s&&(!i||"drillDown"===i.direction)){var l=0,u=0,c=a.background[s.getRawIndex()];!i&&c&&c.old&&(l=c.old.width,u=c.old.height),r.old="nodeGroup"===n?[0,u]:{x:l,y:u,width:0,height:0}}r.fadein="nodeGroup"!==n}(c,0,e)),t[e][m]=u}}function FA(e,t){var n=10*e+t;return(n-1)/n}jx.extendChartView({type:"treemap",init:function(e,t){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(e,t,n,i){var a=t.findComponents({mainType:"series",subType:"treemap",query:i});if(!(Fe.indexOf(a,e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var r=yA.retrieveTargetInfo(i,["treemapZoomToNode","treemapRootToNode"],e),o=i&&i.type,s=e.layoutInfo,l=!this._oldTree,u=this._storage,c="treemapRootToNode"===o&&r&&u?{rootNodeGroup:u.nodeGroup[r.node.getRawIndex()],direction:i.direction}:null,h=this._giveContainerGroup(s),d=this._doRender(h,e,c);l||o&&"treemapZoomToNode"!==o&&"treemapRootToNode"!==o?d.renderFinally():this._doAnimation(h,d,e,c),this._resetController(n),this._renderBreadcrumb(e,n,r)}},_giveContainerGroup:function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new LA,this._initEvents(t),this.group.add(t)),t.attr("position",[e.x,e.y]),t},_doRender:function(e,t,n){var i=t.getData().tree,a=this._oldTree,r={nodeGroup:[],background:[],content:[]},o={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],u=Fe.curry(YA,t,o,s,n,r,l);!function e(t,n,i,a,r){a?(n=t,NA(t,(function(e,t){!e.isRemoved()&&s(t,t)}))):new Jm(n,t,o,o).add(s).update(s).remove(Fe.curry(s,null)).execute();function o(e){return e.getId()}function s(o,s){var l=null!=o?t[o]:null,c=null!=s?n[s]:null,h=u(l,c,i,r);h&&e(l&&l.viewChildren||[],c&&c.viewChildren||[],h,a,r+1)}}(i.root?[i.root]:[],a&&a.root?[a.root]:[],e,i===a||!a,0);var c=function(e){var t={nodeGroup:[],background:[],content:[]};return e&&NA(e,(function(e,n){var i=t[n];NA(e,(function(e){e&&(i.push(e),e.__tmWillDelete=1)}))})),t}(s);return this._oldTree=i,this._storage=o,{lastsForAnimation:r,willDeleteEls:c,renderFinally:function(){NA(c,(function(e){NA(e,(function(e){e.parent&&e.parent.remove(e)}))})),NA(l,(function(e){e.invisible=!0,e.dirty()}))}}},_doAnimation:function(e,t,n,i){if(n.get("animation")){var a=n.get("animationDurationUpdate"),r=n.get("animationEasing"),o=CA.createWrap();NA(t.willDeleteEls,(function(e,t){NA(e,(function(e,n){if(!e.invisible){var s,l=e.parent;if(i&&"drillDown"===i.direction)s=l===i.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,c=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,c=l.__tmNodeHeight/2),s="nodeGroup"===t?{position:[u,c],style:{opacity:0}}:{shape:{x:u,y:c,width:0,height:0},style:{opacity:0}}}s&&o.add(e,s,a,r)}}))})),NA(this._storage,(function(e,n){NA(e,(function(e,i){var s=t.lastsForAnimation[n][i],l={};s&&("nodeGroup"===n?s.old&&(l.position=e.position.slice(),e.attr("position",s.old)):(s.old&&(l.shape=Fe.extend({},e.shape),e.setShape(s.old)),s.fadein?(e.setStyle("opacity",0),l.style={opacity:1}):1!==e.style.opacity&&(l.style={opacity:1})),o.add(e,l,a,r))}))}),this),this._state="animating",o.done(kA((function(){this._state="ready",t.renderFinally()}),this)).start()}},_resetController:function(e){var t=this._controller;t||((t=this._controller=new jT(e.getZr())).enable(this.seriesModel.get("roam")),t.on("pan",kA(this._onPan,this)),t.on("zoom",kA(this._onZoom,this)));var n=new Ni(0,0,e.getWidth(),e.getHeight());t.setPointerChecker((function(e,t,i){return n.contain(t,i)}))},_clearController:function(){var e=this._controller;e&&(e.dispose(),e=null)},_onPan:function(e){if("animating"!==this._state&&(Math.abs(e.dx)>3||Math.abs(e.dy)>3)){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},_onZoom:function(e){var t=e.originX,n=e.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var a=i.getLayout();if(!a)return;var r=new Ni(a.x,a.y,a.width,a.height),o=this.seriesModel.layoutInfo;t-=o.x,n-=o.y;var s=sn.create();sn.translate(s,s,[-t,-n]),sn.scale(s,s,[e.scale,e.scale]),sn.translate(s,s,[t,n]),r.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x,y:r.y,width:r.width,height:r.height}})}},_initEvents:function(e){e.on("click",(function(e){if("ready"===this._state){var t=this.seriesModel.get("nodeClick",!0);if(t){var n=this.findTarget(e.offsetX,e.offsetY);if(n){var i=n.node;if(i.getLayout().isLeafRoot)this._rootToNode(n);else if("zoomToNode"===t)this._zoomToNode(n);else if("link"===t){var a=i.hostTree.data.getItemModel(i.dataIndex),r=a.get("link",!0),o=a.get("target",!0)||"blank";r&&OA(r,o)}}}}}),this)},_renderBreadcrumb:function(e,t,n){n||(n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||(n={node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new AA(this.group))).render(e,t,n.node,kA((function(t){"animating"!==this._state&&(yA.aboveViewRoot(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))}),this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},_rootToNode:function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},findTarget:function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var a=this._storage.background[i.getRawIndex()];if(a){var r=a.transformCoordToLocal(e,t),o=a.shape;if(!(o.x<=r[0]&&r[0]<=o.x+o.width&&o.y<=r[1]&&r[1]<=o.y+o.height))return!1;n={node:i,offsetX:r[0],offsetY:r[1]}}}),this),n}});for(var GA=function(){},WA=["treemapZoomToNode","treemapRender","treemapMove"],jA=0;jA<WA.length;jA++)jx.registerAction({type:WA[jA],update:"updateView"},GA);jx.registerAction({type:"treemapRootToNode",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"treemap",query:e},(function(t,n){var i=yA.retrieveTargetInfo(e,["treemapZoomToNode","treemapRootToNode"],t);if(i){var a=t.getViewRoot();a&&(e.direction=yA.aboveViewRoot(a,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}}))}));var UA=Ch.linearMap,ZA=Fe.each,XA=Fe.isObject,qA=-1,KA=function(e){var t=e.mappingMethod,n=e.type,i=this.option=Fe.clone(e);this.type=n,this.mappingMethod=t,this._normalizeData=sD[t];var a=$A[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._doMap=a._doMap[t],"piecewise"===t?(QA(i),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,Fe.each(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(i)):"category"===t?i.categories?function(e){var t=e.categories,n=e.visual,i=e.categoryMap={};if(ZA(t,(function(e,t){i[e]=t})),!Fe.isArray(n)){var a=[];Fe.isObject(n)?ZA(n,(function(e,t){var n=i[t];a[null!=n?n:qA]=e})):a[-1]=n,n=oD(e,a)}for(var r=t.length-1;r>=0;r--)null==n[r]&&(delete i[t[r]],t.pop())}(i):QA(i,!0):(Fe.assert("linear"!==t||i.dataExtent),QA(i))};KA.prototype={constructor:KA,mapValueToVisual:function(e){var t=this._normalizeData(e);return this._doMap(t,e)},getNormalizer:function(){return Fe.bind(this._normalizeData,this)}};var $A=KA.visualHandlers={color:{applyVisual:tD("color"),getColorMapper:function(){var e=this.option;return Fe.bind("category"===e.mappingMethod?function(e,t){return!t&&(e=this._normalizeData(e)),nD.call(this,e)}:function(t,n,i){var a=!!i;return!n&&(t=this._normalizeData(t)),i=Xn.fastLerp(t,e.parsedVisual,i),a?i:Xn.stringify(i,"rgba")},this)},_doMap:{linear:function(e){return Xn.stringify(Xn.fastLerp(e,this.option.parsedVisual),"rgba")},category:nD,piecewise:function(e,t){var n=rD.call(this,t);return null==n&&(n=Xn.stringify(Xn.fastLerp(e,this.option.parsedVisual),"rgba")),n},fixed:iD}},colorHue:JA((function(e,t){return Xn.modifyHSL(e,t)})),colorSaturation:JA((function(e,t){return Xn.modifyHSL(e,null,t)})),colorLightness:JA((function(e,t){return Xn.modifyHSL(e,null,null,t)})),colorAlpha:JA((function(e,t){return Xn.modifyAlpha(e,t)})),opacity:{applyVisual:tD("opacity"),_doMap:aD([0,1])},liftZ:{applyVisual:tD("liftZ"),_doMap:{linear:iD,category:iD,piecewise:iD,fixed:iD}},symbol:{applyVisual:function(e,t,n){var i=this.mapValueToVisual(e);if(Fe.isString(i))n("symbol",i);else if(XA(i))for(var a in i)i.hasOwnProperty(a)&&n(a,i[a])},_doMap:{linear:eD,category:nD,piecewise:function(e,t){var n=rD.call(this,t);return null==n&&(n=eD.call(this,e)),n},fixed:iD}},symbolSize:{applyVisual:tD("symbolSize"),_doMap:aD([0,1])}};function QA(e,t){var n=e.visual,i=[];Fe.isObject(n)?ZA(n,(function(e){i.push(e)})):null!=n&&i.push(n);t||1!==i.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(i[1]=i[0]),oD(e,i)}function JA(e){return{applyVisual:function(t,n,i){t=this.mapValueToVisual(t),i("color",e(n("color"),t))},_doMap:aD([0,1])}}function eD(e){var t=this.option.visual;return t[Math.round(UA(e,[0,1],[0,t.length-1],!0))]||{}}function tD(e){return function(t,n,i){i(e,this.mapValueToVisual(t))}}function nD(e){var t=this.option.visual;return t[this.option.loop&&e!==qA?e%t.length:e]}function iD(){return this.option.visual[0]}function aD(e){return{linear:function(t){return UA(t,e,this.option.visual,!0)},category:nD,piecewise:function(t,n){var i=rD.call(this,n);return null==i&&(i=UA(t,e,this.option.visual,!0)),i},fixed:iD}}function rD(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var i=n[KA.findPieceIndex(e,n)];if(i&&i.visual)return i.visual[this.type]}}function oD(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=Fe.map(t,(function(e){return Xn.parse(e)}))),t}var sD={linear:function(e){return UA(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=KA.findPieceIndex(e,t,!0);if(null!=n)return UA(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?qA:t},fixed:Fe.noop};function lD(e,t,n){return e?t<=n:t<n}KA.listVisualTypes=function(){var e=[];return Fe.each($A,(function(t,n){e.push(n)})),e},KA.addVisualHandler=function(e,t){$A[e]=t},KA.isValidType=function(e){return $A.hasOwnProperty(e)},KA.eachVisual=function(e,t,n){Fe.isObject(e)?Fe.each(e,t,n):t.call(n,e)},KA.mapVisual=function(e,t,n){var i,a=Fe.isArray(e)?[]:Fe.isObject(e)?{}:(i=!0,null);return KA.eachVisual(e,(function(e,r){var o=t.call(n,e,r);i?a=o:a[r]=o})),a},KA.retrieveVisuals=function(e){var t,n={};return e&&ZA($A,(function(i,a){e.hasOwnProperty(a)&&(n[a]=e[a],t=!0)})),t?n:null},KA.prepareVisualTypes=function(e){if(XA(e)){var t=[];ZA(e,(function(e,n){t.push(n)})),e=t}else{if(!Fe.isArray(e))return[];e=e.slice()}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},KA.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},KA.findPieceIndex=function(e,t,n){for(var i,a=1/0,r=0,o=t.length;r<o;r++){var s=t[r].value;if(null!=s){if(s===e||"string"==typeof s&&s===e+"")return r;n&&h(s,r)}}for(r=0,o=t.length;r<o;r++){var l=t[r],u=l.interval,c=l.close;if(u){if(u[0]===-1/0){if(lD(c[1],e,u[1]))return r}else if(u[1]===1/0){if(lD(c[0],u[0],e))return r}else if(lD(c[0],u[0],e)&&lD(c[1],e,u[1]))return r;n&&h(u[0],r),n&&h(u[1],r)}}if(n)return e===1/0?t.length-1:e===-1/0?0:i;function h(t,n){var r=Math.abs(t-e);r<a&&(a=r,i=n)}};var uD=KA,cD=Fe.isArray,hD="itemStyle";function dD(e,t,n,i,a,r){var o=e.getModel(),s=e.getLayout();if(s&&!s.invisible&&s.isInView){var l,u=e.getModel(hD),c=function(e,t,n,i){var a=Fe.extend({},t);return Fe.each(["color","colorAlpha","colorSaturation"],(function(r){var o=e.get(r,!0);null==o&&n&&(o=n[r]),null==o&&(o=t[r]),null==o&&(o=i.get(r)),null!=o&&(a[r]=o)})),a}(u,t,n[e.depth],i),h=u.get("borderColor"),d=u.get("borderColorSaturation");null!=d&&(h=function(e,t){return null!=t?Xn.modifyHSL(t,null,null,e):null}(d,l=fD(c))),e.setVisual("borderColor",h);var f=e.viewChildren;if(f&&f.length){var p=function(e,t,n,i,a,r){if(!r||!r.length)return;var o=gD(t,"color")||null!=a.color&&"none"!==a.color&&(gD(t,"colorAlpha")||gD(t,"colorSaturation"));if(!o)return;var s=t.get("visualMin"),l=t.get("visualMax"),u=n.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var c=t.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};"color"!==h.type||"index"!==c&&"id"!==c?h.mappingMethod="linear":(h.mappingMethod="category",h.loop=!0);var d=new uD(h);return d.__drColorMappingBy=c,d}(0,o,s,0,c,f);Fe.each(f,(function(e,t){if(e.depth>=a.length||e===a[e.depth]){var s=function(e,t,n,i,a,r){var o=Fe.extend({},t);if(a){var s=a.type,l="color"===s&&a.__drColorMappingBy,u="index"===l?i:"id"===l?r.mapIdToIndex(n.getId()):n.getValue(e.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}(o,c,e,t,p,r);dD(e,s,n,i,a,r)}}))}else l=fD(c),e.setVisual("color",l)}}function fD(e){var t=pD(e,"color");if(t){var n=pD(e,"colorAlpha"),i=pD(e,"colorSaturation");return i&&(t=Xn.modifyHSL(t,null,null,i)),n&&(t=Xn.modifyAlpha(t,n)),t}}function pD(e,t){var n=e[t];if(null!=n&&"none"!==n)return n}function gD(e,t){var n=e.get(t);return cD(n)&&n.length?{name:t,range:n}:null}var mD={seriesType:"treemap",reset:function(e,t,n,i){var a=e.getData().tree,r=a.root,o=e.getModel(hD);r.isRemoved()||dD(r,{},Fe.map(a.levelModels,(function(e){return e?e.get(hD):null})),o,e.getViewRoot().getAncestors(),e)}},vD=Ch.parsePercent,yD=Ch.MAX_SAFE_INTEGER,_D=Math.max,xD=Math.min,bD=Fe.retrieve,wD=Fe.each,SD=["itemStyle","borderWidth"],MD=["itemStyle","gapWidth"],TD=["upperLabel","show"],ID=["upperLabel","height"],AD={seriesType:"treemap",reset:function(e,t,n,i){var a=n.getWidth(),r=n.getHeight(),o=e.option,s=td.getLayoutRect(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=o.size||[],u=vD(bD(s.width,l[0]),a),c=vD(bD(s.height,l[1]),r),h=i&&i.type,d=yA.retrieveTargetInfo(i,["treemapZoomToNode","treemapRootToNode"],e),f="treemapRender"===h||"treemapMove"===h?i.rootRect:null,p=e.getViewRoot(),g=yA.getPathToRoot(p);if("treemapMove"!==h){var m="treemapZoomToNode"===h?function(e,t,n,i,a){var r,o=(t||{}).node,s=[i,a];if(!o||o===n)return s;var l=i*a,u=l*e.option.zoomToNodeRatio;for(;r=o.parentNode;){for(var c=0,h=r.children,d=0,f=h.length;d<f;d++)c+=h[d].getValue();var p=o.getValue();if(0===p)return s;u*=c/p;var g=r.getModel(),m=g.get(SD);(u+=4*m*m+(3*m+Math.max(m,LD(g)))*Math.pow(u,.5))>yD&&(u=yD),o=r}u<l&&(u=l);var v=Math.pow(u/l,.5);return[i*v,a*v]}(e,d,p,u,c):f?[f.width,f.height]:[u,c],v=o.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:o.squareRatio,sort:v,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var _={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(_),DD(p,y,!1,0);_=p.getLayout();wD(g,(function(e,t){var n=(g[t+1]||p).getValue();e.setLayout(Fe.extend({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))}))}var x=e.getData().tree.root;x.setLayout(function(e,t,n){if(t)return{x:t.x,y:t.y};var i={x:0,y:0};if(!n)return i;var a=n.node,r=a.getLayout();if(!r)return i;var o=[r.width/2,r.height/2],s=a;for(;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}(s,f,d),!0),e.setLayoutInfo(s),kD(x,new Ni(-s.x,-s.y,a,r),g,p,0)}};function DD(e,t,n,i){var a,r;if(!e.isRemoved()){var o=e.getLayout();a=o.width,r=o.height;var s=(f=e.getModel()).get(SD),l=f.get(MD)/2,u=LD(f),c=Math.max(s,u),h=s-l,d=c-l,f=e.getModel();e.setLayout({borderWidth:s,upperHeight:c,upperLabelHeight:u},!0);var p=(a=_D(a-2*h,0))*(r=_D(r-h-d,0)),g=function(e,t,n,i,a,r){var o=e.children||[],s=i.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=i.leafDepth&&i.leafDepth<=r;if(a&&!l)return e.viewChildren=[];o=Fe.filter(o,(function(e){return!e.isRemoved()})),function(e,t){t&&e.sort((function(e,n){var i="asc"===t?e.getValue()-n.getValue():n.getValue()-e.getValue();return 0===i?"asc"===t?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:i}))}(o,s);var u=function(e,t,n){for(var i=0,a=0,r=t.length;a<r;a++)i+=t[a].getValue();var o=e.get("visualDimension");if(t&&t.length)if("value"===o&&n)s=[t[t.length-1].getValue(),t[0].getValue()],"asc"===n&&s.reverse();else{var s=[1/0,-1/0];wD(t,(function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)}))}else s=[NaN,NaN];return{sum:i,dataExtent:s}}(t,o,s);if(0===u.sum)return e.viewChildren=[];if(u.sum=function(e,t,n,i,a){if(!i)return n;for(var r=e.get("visibleMin"),o=a.length,s=o,l=o-1;l>=0;l--){var u=a["asc"===i?o-l-1:l].getValue();u/n*t<r&&(s=l,n-=u)}return"asc"===i?a.splice(0,o-s):a.splice(s,o-s),n}(t,n,u.sum,s,o),0===u.sum)return e.viewChildren=[];for(var c=0,h=o.length;c<h;c++){var d=o[c].getValue()/u.sum*n;o[c].setLayout({area:d})}l&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0);return e.viewChildren=o,e.setLayout({dataExtent:u.dataExtent},!0),o}(e,f,p,t,n,i);if(g.length){var m={x:h,y:d,width:a,height:r},v=xD(a,r),y=1/0,_=[];_.area=0;for(var x=0,b=g.length;x<b;){var w=g[x];_.push(w),_.area+=w.getLayout().area;var S=CD(_,v,t.squareRatio);S<=y?(x++,y=S):(_.area-=_.pop().getLayout().area,OD(_,v,m,l,!1),v=xD(m.width,m.height),_.length=_.area=0,y=1/0)}if(_.length&&OD(_,v,m,l,!0),!n){var M=f.get("childrenVisibleMin");null!=M&&p<M&&(n=!0)}for(x=0,b=g.length;x<b;x++)DD(g[x],t,n,i+1)}}}function CD(e,t,n){for(var i,a=0,r=1/0,o=0,s=e.length;o<s;o++)(i=e[o].getLayout().area)&&(i<r&&(r=i),i>a&&(a=i));var l=e.area*e.area,u=t*t*n;return l?_D(u*a/l,l/(u*r)):1/0}function OD(e,t,n,i,a){var r=t===n.width?0:1,o=1-r,s=["x","y"],l=["width","height"],u=n[s[r]],c=t?e.area/t:0;(a||c>n[l[o]])&&(c=n[l[o]]);for(var h=0,d=e.length;h<d;h++){var f=e[h],p={},g=c?f.getLayout().area/c:0,m=p[l[o]]=_D(c-2*i,0),v=n[s[r]]+n[l[r]]-u,y=h===d-1||v<g?v:g,_=p[l[r]]=_D(y-2*i,0);p[s[o]]=n[s[o]]+xD(i,m/2),p[s[r]]=u+xD(i,_/2),u+=y,f.setLayout(p,!0)}n[s[o]]+=c,n[l[o]]-=c}function kD(e,t,n,i,a){var r=e.getLayout(),o=n[a],s=o&&o===e;if(!(o&&!s||a===n.length&&e!==i)){e.setLayout({isInView:!0,invisible:!s&&!t.intersect(r),isAboveViewRoot:s},!0);var l=new Ni(t.x-r.x,t.y-r.y,t.width,t.height);wD(e.viewChildren||[],(function(e){kD(e,l,n,i,a+1)}))}}function LD(e){return e.get(TD)?e.get(ID):0}var ED=AD;jx.registerVisual(mD),jx.registerLayout(ED);var ND=Go.enableClassCheck;function PD(e){return"_EC_"+e}var RD=function(e){this._directed=e||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},zD=RD.prototype;function BD(e,t){this.id=null==e?"":e,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==t?-1:t}function VD(e,t,n){this.node1=e,this.node2=t,this.dataIndex=null==n?-1:n}zD.type="graph",zD.isDirected=function(){return this._directed},zD.addNode=function(e,t){e=null==e?""+t:""+e;var n=this._nodesMap;if(!n[PD(e)]){var i=new BD(e,t);return i.hostGraph=this,this.nodes.push(i),n[PD(e)]=i,i}},zD.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},zD.getNodeById=function(e){return this._nodesMap[PD(e)]},zD.addEdge=function(e,t,n){var i=this._nodesMap,a=this._edgesMap;if("number"==typeof e&&(e=this.nodes[e]),"number"==typeof t&&(t=this.nodes[t]),BD.isInstance(e)||(e=i[PD(e)]),BD.isInstance(t)||(t=i[PD(t)]),e&&t){var r=e.id+"-"+t.id;if(!a[r]){var o=new VD(e,t,n);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),a[r]=o,o}}},zD.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},zD.getEdge=function(e,t){BD.isInstance(e)&&(e=e.id),BD.isInstance(t)&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},zD.eachNode=function(e,t){for(var n=this.nodes,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&e.call(t,n[a],a)},zD.eachEdge=function(e,t){for(var n=this.edges,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(t,n[a],a)},zD.breadthFirstTraverse=function(e,t,n,i){if(BD.isInstance(t)||(t=this._nodesMap[PD(t)]),t){for(var a="out"===n?"outEdges":"in"===n?"inEdges":"edges",r=0;r<this.nodes.length;r++)this.nodes[r].__visited=!1;if(!e.call(i,t,null))for(var o=[t];o.length;){var s=o.shift(),l=s[a];for(r=0;r<l.length;r++){var u=l[r],c=u.node1===s?u.node2:u.node1;if(!c.__visited){if(e.call(i,c,s))return;o.push(c),c.__visited=!0}}}}},zD.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,i=this.edges,a=0,r=n.length;a<r;a++)n[a].dataIndex=-1;for(a=0,r=e.count();a<r;a++)n[e.getRawIndex(a)].dataIndex=a;t.filterSelf((function(e){var n=i[t.getRawIndex(e)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0}));for(a=0,r=i.length;a<r;a++)i[a].dataIndex=-1;for(a=0,r=t.count();a<r;a++)i[t.getRawIndex(a)].dataIndex=a},zD.clone=function(){for(var e=new RD(this._directed),t=this.nodes,n=this.edges,i=0;i<t.length;i++)e.addNode(t[i].id,t[i].dataIndex);for(i=0;i<n.length;i++){var a=n[i];e.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return e},BD.prototype={constructor:BD,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)}},VD.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)};var HD=function(e,t){return{getValue:function(n){var i=this[e][t];return i.get(i.getDimension(n||"value"),this.dataIndex)},setVisual:function(n,i){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,i)},getVisual:function(n,i){return this[e][t].getItemVisual(this.dataIndex,n,i)},setLayout:function(n,i){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}};Fe.mixin(BD,HD("hostGraph","data")),Fe.mixin(VD,HD("hostGraph","edgeData")),RD.Node=BD,RD.Edge=VD,ND(BD),ND(VD);var YD=RD;var FD=function(e,t,n,i,a){for(var r=new YD(i),o=0;o<e.length;o++)r.addNode(Fe.retrieve(e[o].id,e[o].name,o),o);var s=[],l=[],u=0;for(o=0;o<t.length;o++){var c=t[o],h=c.source,d=c.target;r.addEdge(h,d,u)&&(l.push(c),s.push(Fe.retrieve(c.id,h+" > "+d)),u++)}var f,p=n.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=hy(e,n);else{var g=Tf.get(p),m=g&&"view"!==g.type&&g.dimensions||[];Fe.indexOf(m,"value")<0&&m.concat(["value"]);var v=Zv(e,{coordDimensions:m});(f=new Lv(v,n)).initData(e)}var y=new Lv(["value"],n);return y.initData(l,s),a&&a(f,y),PI({mainData:f,struct:r,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r},GD=Po.defaultEmphasis,WD=Fh.encodeHTML,jD=jx.extendSeriesModel({type:"series.graph",init:function(e){jD.superApply(this,"init",arguments);var t=this;function n(){return t._categoriesData}this.legendVisualProvider=new hM(n,n),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeOption:function(e){jD.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(e){jD.superApply(this,"mergeDefaultAndTheme",arguments),GD(e,["edgeLabel"],["show"])},getInitialData:function(e,t){var n=e.edges||e.links||[],i=e.data||e.nodes||[],a=this;if(i&&n)return FD(i,n,this,!0,(function(e,n){e.wrapMethod("getItemModel",(function(e){var t=a._categoriesModels[e.getShallow("category")];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e}));var i=a.getModel("edgeLabel"),r=new ph({label:i.option},i.parentModel,t),o=a.getModel("emphasis.edgeLabel"),s=new ph({emphasis:{label:o.option}},o.parentModel,t);function l(e){return(e=this.parsePath(e))&&"label"===e[0]?r:e&&"emphasis"===e[0]&&"label"===e[1]?s:this.parentModel}n.wrapMethod("getItemModel",(function(e){return e.customizeGetParent(l),e}))})).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(e,t,n){if("edge"===n){var i=this.getData(),a=this.getDataParams(e,n),r=i.graph.getEdgeByIndex(e),o=i.getName(r.node1.dataIndex),s=i.getName(r.node2.dataIndex),l=[];return null!=o&&l.push(o),null!=s&&l.push(s),l=WD(l.join(" > ")),a.value&&(l+=" : "+WD(a.value)),l}return jD.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var e=Fe.map(this.option.categories||[],(function(e){return null!=e.value?e:Fe.extend({value:0},e)})),t=new Lv(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray((function(e){return t.getItemModel(e,!0)}))},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},isAnimationEnabled:function(){return jD.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),UD=Jc.Line.prototype,ZD=Jc.BezierCurve.prototype;function XD(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var qD=Jc.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(e,t){this[XD(t)?"_buildPathLine":"_buildPathCurve"](e,t)},_buildPathLine:UD.buildPath,_buildPathCurve:ZD.buildPath,pointAt:function(e){return this[XD(this.shape)?"_pointAtLine":"_pointAtCurve"](e)},_pointAtLine:UD.pointAt,_pointAtCurve:ZD.pointAt,tangentAt:function(e){var t=this.shape,n=XD(t)?[t.x2-t.x1,t.y2-t.y1]:this._tangentAtCurve(e);return ht.normalize(n,n)},_tangentAtCurve:ZD.tangentAt}),KD=Ch.round,$D=["fromSymbol","toSymbol"];function QD(e){return"_"+e+"Type"}function JD(e,t,n){var i=t.getItemVisual(n,"color"),a=t.getItemVisual(n,e),r=t.getItemVisual(n,e+"Size");if(a&&"none"!==a){Fe.isArray(r)||(r=[r,r]);var o=F_.createSymbol(a,-r[0]/2,-r[1]/2,r[0],r[1],i);return o.name=e,o}}function eC(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}function tC(e,t,n){Jc.Group.call(this),this._createLine(e,t,n)}var nC=tC.prototype;nC.beforeUpdate=function(){var e=this,t=e.childOfName("fromSymbol"),n=e.childOfName("toSymbol"),i=e.childOfName("label");if(t||n||!i.ignore){for(var a=1,r=this.parent;r;)r.scale&&(a/=r.scale[0]),r=r.parent;var o=e.childOfName("line");if(this.__dirty||o.__dirty){var s=o.shape.percent,l=o.pointAt(0),u=o.pointAt(s),c=ht.sub([],u,l);if(ht.normalize(c,c),t){t.attr("position",l);var h=o.tangentAt(0);t.attr("rotation",Math.PI/2-Math.atan2(h[1],h[0])),t.attr("scale",[a*s,a*s])}if(n){n.attr("position",u);h=o.tangentAt(1);n.attr("rotation",-Math.PI/2-Math.atan2(h[1],h[0])),n.attr("scale",[a*s,a*s])}if(!i.ignore){var d,f,p,g;i.attr("position",u);var m=i.__labelDistance,v=m[0]*a,y=m[1]*a,_=s/2,x=[(h=o.tangentAt(_))[1],-h[0]],b=o.pointAt(_);x[1]>0&&(x[0]=-x[0],x[1]=-x[1]);var w,S=h[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var M=-Math.atan2(h[1],h[0]);u[0]<l[0]&&(M=Math.PI+M),i.attr("rotation",M)}switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":w=-y,p="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":w=y,p="top";break;default:w=0,p="middle"}switch(i.__position){case"end":d=[c[0]*v+u[0],c[1]*y+u[1]],f=c[0]>.8?"left":c[0]<-.8?"right":"center",p=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":d=[-c[0]*v+l[0],-c[1]*y+l[1]],f=c[0]>.8?"right":c[0]<-.8?"left":"center",p=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":d=[v*S+l[0],l[1]+w],f=h[0]<0?"right":"left",g=[-v*S,-w];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":d=[b[0],b[1]+w],f="center",g=[0,-w];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":d=[-v*S+u[0],u[1]+w],f=h[0]>=0?"right":"left",g=[v*S,-w]}i.attr({style:{textVerticalAlign:i.__verticalAlign||p,textAlign:i.__textAlign||f},position:d,scale:[a,a],origin:g})}}}},nC._createLine=function(e,t,n){var i=e.hostModel,a=function(e){var t=new qD({name:"line",subPixelOptimize:!0});return eC(t.shape,e),t}(e.getItemLayout(t));a.shape.percent=0,Jc.initProps(a,{shape:{percent:1}},i,t),this.add(a);var r=new Jc.Text({name:"label",lineLabelOriginalOpacity:1});this.add(r),Fe.each($D,(function(n){var i=JD(n,e,t);this.add(i),this[QD(n)]=e.getItemVisual(t,n)}),this),this._updateCommonStl(e,t,n)},nC.updateData=function(e,t,n){var i=e.hostModel,a=this.childOfName("line"),r=e.getItemLayout(t),o={shape:{}};eC(o.shape,r),Jc.updateProps(a,o,i,t),Fe.each($D,(function(n){var i=e.getItemVisual(t,n),a=QD(n);if(this[a]!==i){this.remove(this.childOfName(n));var r=JD(n,e,t);this.add(r)}this[a]=i}),this),this._updateCommonStl(e,t,n)},nC._updateCommonStl=function(e,t,n){var i=e.hostModel,a=this.childOfName("line"),r=n&&n.lineStyle,o=n&&n.hoverLineStyle,s=n&&n.labelModel,l=n&&n.hoverLabelModel;if(!n||e.hasItemOption){var u=e.getItemModel(t);r=u.getModel("lineStyle").getLineStyle(),o=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var c=e.getItemVisual(t,"color"),h=Fe.retrieve3(e.getItemVisual(t,"opacity"),r.opacity,1);a.useStyle(Fe.defaults({strokeNoScale:!0,fill:"none",stroke:c,opacity:h},r)),a.hoverStyle=o,Fe.each($D,(function(e){var t=this.childOfName(e);t&&(t.setColor(c),t.setStyle({opacity:h}))}),this);var d,f,p=s.getShallow("show"),g=l.getShallow("show"),m=this.childOfName("label");if((p||g)&&(d=c||"#000",null==(f=i.getFormattedLabel(t,"normal",e.dataType)))){var v=i.getRawValue(t);f=null==v?e.getName(t):isFinite(v)?KD(v):v}var y=p?f:null,_=g?Fe.retrieve2(i.getFormattedLabel(t,"emphasis",e.dataType),f):null,x=m.style;if(null!=y||null!=_){Jc.setTextStyle(m.style,s,{text:y},{autoColor:d}),m.__textAlign=x.textAlign,m.__verticalAlign=x.textVerticalAlign,m.__position=s.get("position")||"middle";var b=s.get("distance");Fe.isArray(b)||(b=[b,b]),m.__labelDistance=b}m.hoverStyle=null!=_?{text:_,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},m.ignore=!p&&!g,Jc.setHoverStyle(this)},nC.highlight=function(){this.trigger("emphasis")},nC.downplay=function(){this.trigger("normal")},nC.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},nC.setLinePoints=function(e){var t=this.childOfName("line");eC(t.shape,e),t.dirty()},Fe.inherits(tC,Jc.Group);var iC=tC;function aC(e){this._ctor=e||iC,this.group=new Jc.Group}var rC=aC.prototype;function oC(e){var t=e.hostModel;return{lineStyle:t.getModel("lineStyle").getLineStyle(),hoverLineStyle:t.getModel("emphasis.lineStyle").getLineStyle(),labelModel:t.getModel("label"),hoverLabelModel:t.getModel("emphasis.label")}}function sC(e){return isNaN(e[0])||isNaN(e[1])}function lC(e){return!sC(e[0])&&!sC(e[1])}rC.isPersistent=function(){return!0},rC.updateData=function(e){var t=this,n=t.group,i=t._lineData;t._lineData=e,i||n.removeAll();var a=oC(e);e.diff(i).add((function(n){!function(e,t,n,i){var a=t.getItemLayout(n);if(!lC(a))return;var r=new e._ctor(t,n,i);t.setItemGraphicEl(n,r),e.group.add(r)}(t,e,n,a)})).update((function(n,r){!function(e,t,n,i,a,r){var o=t.getItemGraphicEl(i);if(!lC(n.getItemLayout(a)))return void e.group.remove(o);o?o.updateData(n,a,r):o=new e._ctor(n,a,r);n.setItemGraphicEl(a,o),e.group.add(o)}(t,i,e,r,n,a)})).remove((function(e){n.remove(i.getItemGraphicEl(e))})).execute()},rC.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,n){t.updateLayout(e,n)}),this)},rC.incrementalPrepareUpdate=function(e){this._seriesScope=oC(e),this._lineData=null,this.group.removeAll()},rC.incrementalUpdate=function(e,t){function n(e){e.isGroup||function(e){return e.animators&&e.animators.length>0}(e)||(e.incremental=e.useHoverLayer=!0)}for(var i=e.start;i<e.end;i++){if(lC(t.getItemLayout(i))){var a=new this._ctor(t,i,this._seriesScope);a.traverse(n),this.group.add(a),t.setItemGraphicEl(i,a)}}},rC.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},rC._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var uC=aC;var cC={getNodeGlobalScale:function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=e.option.nodeScaleRatio,i=t.scale,a=i&&i[0]||1;return((t.getZoom()-1)*n+1)/a},getSymbolSize:function(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}},hC=cC.getSymbolSize,dC=[],fC=[],pC=[],gC=ys.quadraticAt,mC=ht.distSquare,vC=Math.abs;function yC(e,t,n){for(var i,a=e[0],r=e[1],o=e[2],s=1/0,l=n*n,u=.1,c=.1;c<=.9;c+=.1){dC[0]=gC(a[0],r[0],o[0],c),dC[1]=gC(a[1],r[1],o[1],c),(f=vC(mC(dC,t)-l))<s&&(s=f,i=c)}for(var h=0;h<32;h++){var d=i+u;fC[0]=gC(a[0],r[0],o[0],i),fC[1]=gC(a[1],r[1],o[1],i),pC[0]=gC(a[0],r[0],o[0],d),pC[1]=gC(a[1],r[1],o[1],d);var f=mC(fC,t)-l;if(vC(f)<.01)break;var p=mC(pC,t)-l;u/=2,f<0?p>=0?i+=u:i-=u:p>=0?i-=u:i+=u}return i}var _C=function(e,t){var n=[],i=ys.quadraticSubdivide,a=[[],[],[]],r=[[],[]],o=[];t/=2,e.eachEdge((function(e,s){var l=e.getLayout(),u=e.getVisual("fromSymbol"),c=e.getVisual("toSymbol");l.__original||(l.__original=[ht.clone(l[0]),ht.clone(l[1])],l[2]&&l.__original.push(ht.clone(l[2])));var h=l.__original;if(null!=l[2]){if(ht.copy(a[0],h[0]),ht.copy(a[1],h[2]),ht.copy(a[2],h[1]),u&&"none"!==u){var d=hC(e.node1),f=yC(a,h[0],d*t);i(a[0][0],a[1][0],a[2][0],f,n),a[0][0]=n[3],a[1][0]=n[4],i(a[0][1],a[1][1],a[2][1],f,n),a[0][1]=n[3],a[1][1]=n[4]}if(c&&"none"!==c){d=hC(e.node2),f=yC(a,h[1],d*t);i(a[0][0],a[1][0],a[2][0],f,n),a[1][0]=n[1],a[2][0]=n[2],i(a[0][1],a[1][1],a[2][1],f,n),a[1][1]=n[1],a[2][1]=n[2]}ht.copy(l[0],a[0]),ht.copy(l[1],a[2]),ht.copy(l[2],a[1])}else{if(ht.copy(r[0],h[0]),ht.copy(r[1],h[1]),ht.sub(o,r[1],r[0]),ht.normalize(o,o),u&&"none"!==u){d=hC(e.node1);ht.scaleAndAdd(r[0],r[0],o,d*t)}if(c&&"none"!==c){d=hC(e.node2);ht.scaleAndAdd(r[1],r[1],o,-d*t)}ht.copy(l[0],r[0]),ht.copy(l[1],r[1])}}))},xC=KT.onIrrelevantElement,bC=cC.getNodeGlobalScale,wC="__focusNodeAdjacency",SC="__unfocusNodeAdjacency",MC=["itemStyle","opacity"],TC=["lineStyle","opacity"];function IC(e,t){var n=e.getVisual("opacity");return null!=n?n:e.getModel().get(t)}function AC(e,t,n){var i=e.getGraphicEl(),a=IC(e,t);null!=n&&(null==a&&(a=1),a*=n),i.downplay&&i.downplay(),i.traverse((function(e){if(!e.isGroup){var t=e.lineLabelOriginalOpacity;null!=t&&null==n||(t=a),e.setStyle("opacity",t)}}))}function DC(e,t){var n=IC(e,t),i=e.getGraphicEl();i.traverse((function(e){!e.isGroup&&e.setStyle("opacity",n)})),i.highlight&&i.highlight()}jx.extendChartView({type:"graph",init:function(e,t){var n=new gb,i=new uC,a=this.group;this._controller=new jT(t.getZr()),this._controllerHost={target:a},a.add(n.group),a.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},render:function(e,t,n){var i=this,a=e.coordinateSystem;this._model=e;var r=this._symbolDraw,o=this._lineDraw,s=this.group;if("view"===a.type){var l={position:a.position,scale:a.scale};this._firstRender?s.attr(l):Jc.updateProps(s,l,e)}_C(e.getGraph(),bC(e));var u=e.getData();r.updateData(u);var c=e.getEdgeData();o.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,t,n),clearTimeout(this._layoutTimeout);var h=e.forceLayout,d=e.get("force.layoutAnimation");h&&this._startForceLayoutIteration(h,d),u.eachItemGraphicEl((function(t,a){var r=u.getItemModel(a);t.off("drag").off("dragend");var o=r.get("draggable");o&&t.on("drag",(function(){h&&(h.warmUp(),!this._layouting&&this._startForceLayoutIteration(h,d),h.setFixed(a),u.setItemLayout(a,t.position))}),this).on("dragend",(function(){h&&h.setUnfixed(a)}),this),t.setDraggable(o&&h),t[wC]&&t.off("mouseover",t[wC]),t[SC]&&t.off("mouseout",t[SC]),r.get("focusNodeAdjacency")&&(t.on("mouseover",t[wC]=function(){i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex})}),t.on("mouseout",t[SC]=function(){i._dispatchUnfocus(n)}))}),this),u.graph.eachEdge((function(t){var a=t.getGraphicEl();a[wC]&&a.off("mouseover",a[wC]),a[SC]&&a.off("mouseout",a[SC]),t.getModel().get("focusNodeAdjacency")&&(a.on("mouseover",a[wC]=function(){i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex})}),a.on("mouseout",a[SC]=function(){i._dispatchUnfocus(n)}))}));var f="circular"===e.get("layout")&&e.get("circular.rotateLabel"),p=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl((function(e,t){var n=u.getItemModel(t).get("label.rotate")||0,i=e.getSymbolPath();if(f){var a=u.getItemLayout(t),r=Math.atan2(a[1]-g,a[0]-p);r<0&&(r=2*Math.PI+r);var o=a[0]<p;o&&(r-=Math.PI);var s=o?"left":"right";Jc.modifyLabelStyle(i,{textRotation:-r,textPosition:s,textOrigin:"center"},{textPosition:s})}else Jc.modifyLabelStyle(i,{textRotation:n*=Math.PI/180})})),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(e,t){var n=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){n._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:n._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,n,i){var a=e.getData().graph,r=i.dataIndex,o=i.edgeDataIndex,s=a.getNodeByIndex(r),l=a.getEdgeByIndex(o);(s||l)&&(a.eachNode((function(e){AC(e,MC,.1)})),a.eachEdge((function(e){AC(e,TC,.1)})),s&&(DC(s,MC),Fe.each(s.edges,(function(e){e.dataIndex<0||(DC(e,TC),DC(e.node1,MC),DC(e.node2,MC))}))),l&&(DC(l,TC),DC(l.node1,MC),DC(l.node2,MC)))},unfocusNodeAdjacency:function(e,t,n,i){var a=e.getData().graph;a.eachNode((function(e){AC(e,MC)})),a.eachEdge((function(e){AC(e,TC)}))},_startForceLayoutIteration:function(e,t){var n=this;!function i(){e.step((function(e){n.updateLayout(n._model),(n._layouting=!e)&&(t?n._layoutTimeout=setTimeout(i,16):i())}))}()},_updateController:function(e,t,n){var i=this._controller,a=this._controllerHost,r=this.group;i.setPointerChecker((function(t,i,a){var o=r.getBoundingRect();return o.applyTransform(r.transform),o.contain(i,a)&&!xC(t,n,e)})),"view"===e.coordinateSystem.type?(i.enable(e.get("roam")),a.zoomLimit=e.get("scaleLimit"),a.zoom=e.coordinateSystem.getZoom(),i.off("pan").off("zoom").on("pan",(function(t){ZT.updateViewOnPan(a,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})})).on("zoom",(function(t){ZT.updateViewOnZoom(a,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(),_C(e.getGraph(),bC(e)),this._lineDraw.updateLayout()}),this)):i.disable()},_updateNodeAndLinkScale:function(){var e=this._model,t=e.getData(),n=bC(e),i=[n,n];t.eachItemGraphicEl((function(e,t){e.attr("scale",i)}))},updateLayout:function(e){_C(e.getGraph(),bC(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),jx.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},(function(){})),jx.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},(function(){}));var CC=lI.updateCenterAndZoom;jx.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",query:e},(function(t){var n=t.coordinateSystem,i=CC(n,e);t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom)}))}));var OC=function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.eachSeriesByType("graph",(function(e){var n=e.getCategoriesData(),i=e.getGraph().data,a=n.mapArray(n.getName);i.filterSelf((function(e){var n=i.getItemModel(e).getShallow("category");if(null!=n){"number"==typeof n&&(n=a[n]);for(var r=0;r<t.length;r++)if(!t[r].isSelected(n))return!1}return!0}))}),this)};var kC=function(e){var t={};e.eachSeriesByType("graph",(function(e){var n=e.getCategoriesData(),i=e.getData(),a={};n.each((function(i){var r=n.getName(i);a["ec-"+r]=i;var o=n.getItemModel(i),s=o.get("itemStyle.color")||e.getColorFromPalette(r,t);n.setItemVisual(i,"color",s);for(var l=["opacity","symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++){var c=o.getShallow(l[u],!0);null!=c&&n.setItemVisual(i,l[u],c)}})),n.count()&&i.each((function(e){var t=i.getItemModel(e).getShallow("category");if(null!=t){"string"==typeof t&&(t=a["ec-"+t]);for(var r=["color","opacity","symbol","symbolSize","symbolKeepAspect"],o=0;o<r.length;o++)null==i.getItemVisual(e,r[o],!0)&&i.setItemVisual(e,r[o],n.getItemVisual(t,r[o]))}}))}))};function LC(e){return e instanceof Array||(e=[e,e]),e}var EC=function(e){e.eachSeriesByType("graph",(function(e){var t=e.getGraph(),n=e.getEdgeData(),i=LC(e.get("edgeSymbol")),a=LC(e.get("edgeSymbolSize")),r="lineStyle.color".split("."),o="lineStyle.opacity".split(".");n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",a&&a[0]),n.setVisual("toSymbolSize",a&&a[1]),n.setVisual("color",e.get(r)),n.setVisual("opacity",e.get(o)),n.each((function(e){var i=n.getItemModel(e),a=t.getEdgeByIndex(e),s=LC(i.getShallow("symbol",!0)),l=LC(i.getShallow("symbolSize",!0)),u=i.get(r),c=i.get(o);switch(u){case"source":u=a.node1.getVisual("color");break;case"target":u=a.node2.getVisual("color")}s[0]&&a.setVisual("fromSymbol",s[0]),s[1]&&a.setVisual("toSymbol",s[1]),l[0]&&a.setVisual("fromSymbolSize",l[0]),l[1]&&a.setVisual("toSymbolSize",l[1]),a.setVisual("color",u),a.setVisual("opacity",c)}))}))};function NC(e){e.eachEdge((function(e){var t=e.getModel().get("lineStyle.curveness")||0,n=ht.clone(e.node1.getLayout()),i=ht.clone(e.node2.getLayout()),a=[n,i];+t&&a.push([(n[0]+i[0])/2-(n[1]-i[1])*t,(n[1]+i[1])/2-(i[0]-n[0])*t]),e.setLayout(a)}))}var PC=function(e){var t=e.coordinateSystem;if(!t||"view"===t.type){var n=e.getGraph();n.eachNode((function(e){var t=e.getModel();e.setLayout([+t.get("x"),+t.get("y")])})),NC(n)}},RC={simpleLayout:PC,simpleLayoutEdge:NC},zC=Fe.each,BC=RC.simpleLayout,VC=RC.simpleLayoutEdge;var HC=function(e,t){e.eachSeriesByType("graph",(function(e){var t=e.get("layout"),n=e.coordinateSystem;if(n&&"view"!==n.type){var i=e.getData(),a=[];zC(n.dimensions,(function(e){a=a.concat(i.mapDimension(e,!0))}));for(var r=0;r<i.count();r++){for(var o=[],s=!1,l=0;l<a.length;l++){var u=i.get(a[l],r);isNaN(u)||(s=!0),o.push(u)}s?i.setItemLayout(r,n.dataToPoint(o)):i.setItemLayout(r,[NaN,NaN])}VC(i.graph)}else t&&"none"!==t||BC(e)}))},YC=cC.getSymbolSize,FC=cC.getNodeGlobalScale,GC=Math.PI,WC=[];var jC={value:function(e,t,n,i,a,r,o,s){var l=0,u=i.getSum("value"),c=2*Math.PI/(u||s);n.eachNode((function(e){var t=e.getValue("value"),n=c*(u?t:1)/2;l+=n,e.setLayout([a*Math.cos(l)+r,a*Math.sin(l)+o]),l+=n}))},symbolSize:function(e,t,n,i,a,r,o,s){var l=0;WC.length=s;var u=FC(e);n.eachNode((function(e){var t=YC(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=u;var n=Math.asin(t/2/a);isNaN(n)&&(n=GC/2),WC[e.dataIndex]=n,l+=2*n}));var c=(2*GC-l)/s/2,h=0;n.eachNode((function(e){var t=c+WC[e.dataIndex];h+=t,e.setLayout([a*Math.cos(h)+r,a*Math.sin(h)+o]),h+=t}))}},UC=function(e,t){var n=e.coordinateSystem;if(!n||"view"===n.type){var i=n.getBoundingRect(),a=e.getData(),r=a.graph,o=i.width/2+i.x,s=i.height/2+i.y,l=Math.min(i.width,i.height)/2,u=a.count();a.setLayout({cx:o,cy:s}),u&&(jC[t](e,n,r,a,l,o,s,u),r.eachEdge((function(e){var t,n=e.getModel().get("lineStyle.curveness")||0,i=ht.clone(e.node1.getLayout()),a=ht.clone(e.node2.getLayout()),r=(i[0]+a[0])/2,l=(i[1]+a[1])/2;+n&&(t=[o*(n*=3)+r*(1-n),s*n+l*(1-n)]),e.setLayout([i,a,t])})))}},ZC={circularLayout:UC},XC=ZC.circularLayout;var qC=function(e){e.eachSeriesByType("graph",(function(e){"circular"===e.get("layout")&&XC(e,"symbolSize")}))},KC=ht.scaleAndAdd;var $C=function(e,t,n){for(var i=n.rect,a=i.width,r=i.height,o=[i.x+a/2,i.y+r/2],s=null==n.gravity?.1:n.gravity,l=0;l<e.length;l++){var u=e[l];u.p||(u.p=ht.create(a*(Math.random()-.5)+o[0],r*(Math.random()-.5)+o[1])),u.pp=ht.clone(u.p),u.edges=null}var c=null==n.friction?.6:n.friction,h=c;return{warmUp:function(){h=.8*c},setFixed:function(t){e[t].fixed=!0},setUnfixed:function(t){e[t].fixed=!1},step:function(n){for(var i=[],a=e.length,r=0;r<t.length;r++){var l=t[r];if(!l.ignoreForceLayout){var u=l.n1,c=l.n2;ht.sub(i,c.p,u.p);var d=ht.len(i)-l.d,f=c.w/(u.w+c.w);isNaN(f)&&(f=0),ht.normalize(i,i),!u.fixed&&KC(u.p,u.p,i,f*d*h),!c.fixed&&KC(c.p,c.p,i,-(1-f)*d*h)}}for(r=0;r<a;r++){(v=e[r]).fixed||(ht.sub(i,o,v.p),KC(v.p,v.p,i,s*h))}for(r=0;r<a;r++){u=e[r];for(var p=r+1;p<a;p++){c=e[p];ht.sub(i,c.p,u.p),0===(d=ht.len(i))&&(ht.set(i,Math.random()-.5,Math.random()-.5),d=1);var g=(u.rep+c.rep)/d/d;!u.fixed&&KC(u.pp,u.pp,i,g),!c.fixed&&KC(c.pp,c.pp,i,-g)}}var m=[];for(r=0;r<a;r++){var v;(v=e[r]).fixed||(ht.sub(m,v.p,v.pp),KC(v.p,v.p,m,h),ht.copy(v.pp,v.p))}h*=.992,n&&n(e,t,h<.01)}}},QC={forceLayout:$C}.forceLayout,JC=RC.simpleLayout,eO=ZC.circularLayout,tO=Ch.linearMap;var nO=function(e){e.eachSeriesByType("graph",(function(e){if(!(h=e.coordinateSystem)||"view"===h.type)if("force"===e.get("layout")){var t=e.preservedPoints||{},n=e.getGraph(),i=n.data,a=n.edgeData,r=e.getModel("force"),o=r.get("initLayout");e.preservedPoints?i.each((function(e){var n=i.getId(e);i.setItemLayout(e,t[n]||[NaN,NaN])})):o&&"none"!==o?"circular"===o&&eO(e,"value"):JC(e);var s=i.getDataExtent("value"),l=a.getDataExtent("value"),u=r.get("repulsion"),c=r.get("edgeLength");Fe.isArray(u)||(u=[u,u]),Fe.isArray(c)||(c=[c,c]),c=[c[1],c[0]];var h,d=i.mapArray("value",(function(e,t){var n=i.getItemLayout(t),a=tO(e,s,u);return isNaN(a)&&(a=(u[0]+u[1])/2),{w:a,rep:a,fixed:i.getItemModel(t).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}})),f=a.mapArray("value",(function(e,t){var i=n.getEdgeByIndex(t),a=tO(e,l,c);isNaN(a)&&(a=(c[0]+c[1])/2);var r=i.getModel();return{n1:d[i.node1.dataIndex],n2:d[i.node2.dataIndex],d:a,curveness:r.get("lineStyle.curveness")||0,ignoreForceLayout:r.get("ignoreForceLayout")}})),p=(h=e.coordinateSystem).getBoundingRect(),g=QC(d,f,{rect:p,gravity:r.get("gravity"),friction:r.get("friction")}),m=g.step;g.step=function(e){for(var a=0,r=d.length;a<r;a++)d[a].fixed&&ht.copy(d[a].p,n.getNodeByIndex(a).getLayout());m((function(a,r,o){for(var s=0,l=a.length;s<l;s++)a[s].fixed||n.getNodeByIndex(s).setLayout(a[s].p),t[i.getId(s)]=a[s].p;for(s=0,l=r.length;s<l;s++){var u=r[s],c=n.getEdgeByIndex(s),h=u.n1.p,d=u.n2.p,f=c.getLayout();(f=f?f.slice():[])[0]=f[0]||[],f[1]=f[1]||[],ht.copy(f[0],h),ht.copy(f[1],d),+u.curveness&&(f[2]=[(h[0]+d[0])/2-(h[1]-d[1])*u.curveness,(h[1]+d[1])/2-(d[0]-h[0])*u.curveness]),c.setLayout(f)}e&&e(o)}))},e.forceLayout=g,e.preservedPoints=t,g.step()}else e.forceLayout=null}))},iO=td.getLayoutRect;var aO=function(e,t){var n=[];return e.eachSeriesByType("graph",(function(e){var i=e.get("coordinateSystem");if(!i||"view"===i){var a=e.getData(),r=a.mapArray((function(e){var t=a.getItemModel(e);return[+t.get("x"),+t.get("y")]})),o=[],s=[];Ns.fromPoints(r,o,s),s[0]-o[0]==0&&(s[0]+=1,o[0]-=1),s[1]-o[1]==0&&(s[1]+=1,o[1]-=1);var l=(s[0]-o[0])/(s[1]-o[1]),u=function(e,t,n){var i=e.getBoxLayoutParams();return i.aspect=n,iO(i,{width:t.getWidth(),height:t.getHeight()})}(e,t,l);isNaN(l)&&(o=[u.x,u.y],s=[u.x+u.width,u.y+u.height]);var c=s[0]-o[0],h=s[1]-o[1],d=u.width,f=u.height,p=e.coordinateSystem=new pI;p.zoomLimit=e.get("scaleLimit"),p.setBoundingRect(o[0],o[1],c,h),p.setViewRect(u.x,u.y,d,f),p.setCenter(e.get("center")),p.setZoom(e.get("zoom")),n.push(p)}})),n};jx.registerProcessor(OC),jx.registerVisual(tw("graph","circle",null)),jx.registerVisual(kC),jx.registerVisual(EC),jx.registerLayout(HC),jx.registerLayout(jx.PRIORITY.VISUAL.POST_CHART_LAYOUT,qC),jx.registerLayout(nO),jx.registerCoordinateSystem("graphView",{create:aO}),ag.extend({type:"series.gauge",getInitialData:function(e,t){return uM(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});var rO=xl.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(e,t){var n=Math.cos,i=Math.sin,a=t.r,r=t.width,o=t.angle,s=t.x-n(o)*r*(r>=a/3?1:2),l=t.y-i(o)*r*(r>=a/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(o)*r,t.y+i(o)*r),e.lineTo(t.x+n(t.angle)*a,t.y+i(t.angle)*a),e.lineTo(t.x-n(o)*r,t.y-i(o)*r),e.lineTo(s,l)}}),oO=rO,sO=Ch.parsePercent,lO=Ch.round,uO=Ch.linearMap;function cO(e,t){return t&&("string"==typeof t?e=t.replace("{value}",null!=e?e:""):"function"==typeof t&&(e=t(e))),e}var hO=2*Math.PI;bg.extend({type:"gauge",render:function(e,t,n){this.group.removeAll();var i=e.get("axisLine.lineStyle.color"),a=function(e,t){var n=e.get("center"),i=t.getWidth(),a=t.getHeight(),r=Math.min(i,a);return{cx:sO(n[0],t.getWidth()),cy:sO(n[1],t.getHeight()),r:sO(e.get("radius"),r/2)}}(e,n);this._renderMain(e,t,n,i,a)},dispose:function(){},_renderMain:function(e,t,n,i,a){for(var r=this.group,o=e.getModel("axisLine"),s=o.getModel("lineStyle"),l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,c=((g=-e.get("endAngle")/180*Math.PI)-u)%hO,h=u,d=s.get("width"),f=o.get("show"),p=0;f&&p<i.length;p++){var g=u+c*Math.min(Math.max(i[p][0],0),1),m=new Jc.Sector({shape:{startAngle:h,endAngle:g,cx:a.cx,cy:a.cy,clockwise:l,r0:a.r-d,r:a.r},silent:!0});m.setStyle({fill:i[p][1]}),m.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),r.add(m),h=g}var v=function(e){if(e<=0)return i[0][1];for(var t=0;t<i.length;t++)if(i[t][0]>=e&&(0===t?0:i[t-1][0])<e)return i[t][1];return i[t-1][1]};if(!l){var y=u;u=g,g=y}this._renderTicks(e,t,n,v,a,u,g,l),this._renderPointer(e,t,n,v,a,u,g,l),this._renderTitle(e,t,n,v,a),this._renderDetail(e,t,n,v,a)},_renderTicks:function(e,t,n,i,a,r,o,s){for(var l=this.group,u=a.cx,c=a.cy,h=a.r,d=+e.get("min"),f=+e.get("max"),p=e.getModel("splitLine"),g=e.getModel("axisTick"),m=e.getModel("axisLabel"),v=e.get("splitNumber"),y=g.get("splitNumber"),_=sO(p.get("length"),h),x=sO(g.get("length"),h),b=r,w=(o-r)/v,S=w/y,M=p.getModel("lineStyle").getLineStyle(),T=g.getModel("lineStyle").getLineStyle(),I=0;I<=v;I++){var A=Math.cos(b),D=Math.sin(b);if(p.get("show")){var C=new Jc.Line({shape:{x1:A*h+u,y1:D*h+c,x2:A*(h-_)+u,y2:D*(h-_)+c},style:M,silent:!0});"auto"===M.stroke&&C.setStyle({stroke:i(I/v)}),l.add(C)}if(m.get("show")){var O=cO(lO(I/v*(f-d)+d),m.get("formatter")),k=m.get("distance"),L=i(I/v);l.add(new Jc.Text({style:Jc.setTextStyle({},m,{text:O,x:A*(h-_-k)+u,y:D*(h-_-k)+c,textVerticalAlign:D<-.4?"top":D>.4?"bottom":"middle",textAlign:A<-.4?"left":A>.4?"right":"center"},{autoColor:L}),silent:!0}))}if(g.get("show")&&I!==v){for(var E=0;E<=y;E++){A=Math.cos(b),D=Math.sin(b);var N=new Jc.Line({shape:{x1:A*h+u,y1:D*h+c,x2:A*(h-x)+u,y2:D*(h-x)+c},silent:!0,style:T});"auto"===T.stroke&&N.setStyle({stroke:i((I+E/y)/v)}),l.add(N),b+=S}b-=S}else b+=w}},_renderPointer:function(e,t,n,i,a,r,o,s){var l=this.group,u=this._data;if(e.get("pointer.show")){var c=[+e.get("min"),+e.get("max")],h=[r,o],d=e.getData(),f=d.mapDimension("value");d.diff(u).add((function(t){var n=new oO({shape:{angle:r}});Jc.initProps(n,{shape:{angle:uO(d.get(f,t),c,h,!0)}},e),l.add(n),d.setItemGraphicEl(t,n)})).update((function(t,n){var i=u.getItemGraphicEl(n);Jc.updateProps(i,{shape:{angle:uO(d.get(f,t),c,h,!0)}},e),l.add(i),d.setItemGraphicEl(t,i)})).remove((function(e){var t=u.getItemGraphicEl(e);l.remove(t)})).execute(),d.eachItemGraphicEl((function(e,t){var n=d.getItemModel(t),r=n.getModel("pointer");e.setShape({x:a.cx,y:a.cy,width:sO(r.get("width"),a.r),r:sO(r.get("length"),a.r)}),e.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===e.style.fill&&e.setStyle("fill",i(uO(d.get(f,t),c,[0,1],!0))),Jc.setHoverStyle(e,n.getModel("emphasis.itemStyle").getItemStyle())})),this._data=d}else u&&u.eachItemGraphicEl((function(e){l.remove(e)}))},_renderTitle:function(e,t,n,i,a){var r=e.getData(),o=r.mapDimension("value"),s=e.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=a.cx+sO(l[0],a.r),c=a.cy+sO(l[1],a.r),h=+e.get("min"),d=+e.get("max"),f=e.getData().get(o,0),p=i(uO(f,[h,d],[0,1],!0));this.group.add(new Jc.Text({silent:!0,style:Jc.setTextStyle({},s,{x:u,y:c,text:r.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:p,forceRich:!0})}))}},_renderDetail:function(e,t,n,i,a){var r=e.getModel("detail"),o=+e.get("min"),s=+e.get("max");if(r.get("show")){var l=r.get("offsetCenter"),u=a.cx+sO(l[0],a.r),c=a.cy+sO(l[1],a.r),h=sO(r.get("width"),a.r),d=sO(r.get("height"),a.r),f=e.getData(),p=f.get(f.mapDimension("value"),0),g=i(uO(p,[o,s],[0,1],!0));this.group.add(new Jc.Text({silent:!0,style:Jc.setTextStyle({},r,{x:u,y:c,text:cO(p,r.get("formatter")),textWidth:isNaN(h)?null:h,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}});var dO=Po.defaultEmphasis,fO=Jd.makeSeriesEncodeForNameBased,pO=jx.extendSeriesModel({type:"series.funnel",init:function(e){pO.superApply(this,"init",arguments),this.legendVisualProvider=new hM(Fe.bind(this.getData,this),Fe.bind(this.getRawData,this)),this._defaultLabelLine(e)},getInitialData:function(e,t){return uM(this,{coordDimensions:["value"],encodeDefaulter:Fe.curry(fO,this)})},_defaultLabelLine:function(e){dO(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},getDataParams:function(e){var t=this.getData(),n=pO.superCall(this,"getDataParams",e),i=t.mapDimension("value"),a=t.getSum(i);return n.percent=a?+(t.get(i,e)/a*100).toFixed(2):0,n.$vars.push("percent"),n},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}});function gO(e,t){Jc.Group.call(this);var n=new Jc.Polygon,i=new Jc.Polyline,a=new Jc.Text;this.add(n),this.add(i),this.add(a),this.highDownOnUpdate=function(e,t){"emphasis"===t?(i.ignore=i.hoverIgnore,a.ignore=a.hoverIgnore):(i.ignore=i.normalIgnore,a.ignore=a.normalIgnore)},this.updateData(e,t,!0)}var mO=gO.prototype,vO=["itemStyle","opacity"];mO.updateData=function(e,t,n){var i=this.childAt(0),a=e.hostModel,r=e.getItemModel(t),o=e.getItemLayout(t),s=e.getItemModel(t).get(vO);s=null==s?1:s,i.useStyle({}),n?(i.setShape({points:o.points}),i.setStyle({opacity:0}),Jc.initProps(i,{style:{opacity:s}},a,t)):Jc.updateProps(i,{style:{opacity:s},shape:{points:o.points}},a,t);var l=r.getModel("itemStyle"),u=e.getItemVisual(t,"color");i.setStyle(Fe.defaults({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),i.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(e,t),Jc.setHoverStyle(this)},mO._updateLabel=function(e,t){var n=this.childAt(1),i=this.childAt(2),a=e.hostModel,r=e.getItemModel(t),o=e.getItemLayout(t).label,s=e.getItemVisual(t,"color");Jc.updateProps(n,{shape:{points:o.linePoints||o.linePoints}},a,t),Jc.updateProps(i,{style:{x:o.x,y:o.y}},a,t),i.attr({rotation:o.rotation,origin:[o.x,o.y],z2:10});var l=r.getModel("label"),u=r.getModel("emphasis.label"),c=r.getModel("labelLine"),h=r.getModel("emphasis.labelLine");s=e.getItemVisual(t,"color");Jc.setLabelStyle(i.style,i.hoverStyle={},l,u,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:e.getName(t),autoColor:s,useInsideStyle:!!o.inside},{textAlign:o.textAlign,textVerticalAlign:o.verticalAlign}),i.ignore=i.normalIgnore=!l.get("show"),i.hoverIgnore=!u.get("show"),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!h.get("show"),n.setStyle({stroke:s}),n.setStyle(c.getModel("lineStyle").getLineStyle()),n.hoverStyle=h.getModel("lineStyle").getLineStyle()},Fe.inherits(gO,Jc.Group),bg.extend({type:"funnel",render:function(e,t,n){var i=e.getData(),a=this._data,r=this.group;i.diff(a).add((function(e){var t=new gO(i,e);i.setItemGraphicEl(e,t),r.add(t)})).update((function(e,t){var n=a.getItemGraphicEl(t);n.updateData(i,e),r.add(n),i.setItemGraphicEl(e,n)})).remove((function(e){var t=a.getItemGraphicEl(e);r.remove(t)})).execute(),this._data=i},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var yO=Ch.parsePercent,_O=Ch.linearMap;var xO=function(e,t,n){e.eachSeriesByType("funnel",(function(e){var n=e.getData(),i=n.mapDimension("value"),a=e.get("sort"),r=function(e,t){return td.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t),o=function(e,t){for(var n=e.mapDimension("value"),i=e.mapArray(n,(function(e){return e})),a=[],r="ascending"===t,o=0,s=e.count();o<s;o++)a[o]=o;return"function"==typeof t?a.sort(t):"none"!==t&&a.sort((function(e,t){return r?i[e]-i[t]:i[t]-i[e]})),a}(n,a),s=[yO(e.get("minSize"),r.width),yO(e.get("maxSize"),r.width)],l=n.getDataExtent(i),u=e.get("min"),c=e.get("max");null==u&&(u=Math.min(l[0],0)),null==c&&(c=l[1]);var h=e.get("funnelAlign"),d=e.get("gap"),f=(r.height-d*(n.count()-1))/n.count(),p=r.y,g=function(e,t){var a,o=n.get(i,e)||0,l=_O(o,[u,c],s,!0);switch(h){case"left":a=r.x;break;case"center":a=r.x+(r.width-l)/2;break;case"right":a=r.x+r.width-l}return[[a,t],[a+l,t]]};"ascending"===a&&(f=-f,d=-d,p+=r.height,o=o.reverse());for(var m=0;m<o.length;m++){var v=o[m],y=o[m+1],_=n.getItemModel(v).get("itemStyle.height");null==_?_=f:(_=yO(_,r.height),"ascending"===a&&(_=-_));var x=g(v,p),b=g(y,p+_);p+=_+d,n.setItemLayout(v,{points:x.concat(b.slice().reverse())})}!function(e){e.each((function(t){var n,i,a,r,o=e.getItemModel(t),s=o.getModel("label").get("position"),l=o.getModel("labelLine"),u=e.getItemLayout(t),c=u.points,h="inner"===s||"inside"===s||"center"===s||"insideLeft"===s||"insideRight"===s;if(h)"insideLeft"===s?(i=(c[0][0]+c[3][0])/2+5,a=(c[0][1]+c[3][1])/2,n="left"):"insideRight"===s?(i=(c[1][0]+c[2][0])/2-5,a=(c[1][1]+c[2][1])/2,n="right"):(i=(c[0][0]+c[1][0]+c[2][0]+c[3][0])/4,a=(c[0][1]+c[1][1]+c[2][1]+c[3][1])/4,n="center"),r=[[i,a],[i,a]];else{var d,f,p,g=l.get("length");"left"===s?(d=(c[3][0]+c[0][0])/2,f=(c[3][1]+c[0][1])/2,i=(p=d-g)-5,n="right"):"right"===s?(d=(c[1][0]+c[2][0])/2,f=(c[1][1]+c[2][1])/2,i=(p=d+g)+5,n="left"):"rightTop"===s?(d=c[1][0],f=c[1][1],i=(p=d+g)+5,n="top"):"rightBottom"===s?(d=c[2][0],f=c[2][1],i=(p=d+g)+5,n="bottom"):"leftTop"===s?(d=c[0][0],f=c[1][1],i=(p=d-g)-5,n="right"):"leftBottom"===s?(d=c[3][0],f=c[2][1],i=(p=d-g)-5,n="right"):(d=(c[1][0]+c[2][0])/2,f=(c[1][1]+c[2][1])/2,i=(p=d+g)+5,n="left"),r=[[d,f],[p,f]],a=f}u.label={linePoints:r,x:i,y:a,verticalAlign:"middle",textAlign:n,inside:h}}))}(n)}))};jx.registerVisual(wM("funnel")),jx.registerLayout(xO),jx.registerProcessor(EM("funnel"));var bO=function(e){!function(e){if(e.parallel)return;var t=!1;Fe.each(e.series,(function(e){e&&"parallel"===e.type&&(t=!0)})),t&&(e.parallel=[{}])}(e),function(e){var t=Po.normalizeToArray(e.parallelAxis);Fe.each(t,(function(t){if(Fe.isObject(t)){var n=t.parallelIndex||0,i=Po.normalizeToArray(e.parallel)[n];i&&i.parallelAxisDefault&&Fe.merge(t,i.parallelAxisDefault,!1)}}))}(e)},wO=function(e,t,n,i,a){Ax.call(this,e,t,n),this.type=i||"value",this.axisIndex=a};wO.prototype={constructor:wO,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},Fe.inherits(wO,Ax);var SO=wO;function MO(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function TO(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}var IO=function(e,t,n,i,a,r){e=e||0;var o=n[1]-n[0];if(null!=a&&(a=TO(a,[0,o])),null!=r&&(r=Math.max(r,null!=a?a:0)),"all"===i){var s=Math.abs(t[1]-t[0]);s=TO(s,[0,o]),a=r=TO(s,[a,r]),i=0}t[0]=TO(t[0],n),t[1]=TO(t[1],n);var l=MO(t,i);t[i]+=e;var u=a||0,c=n.slice();l.sign<0?c[0]+=u:c[1]-=u,t[i]=TO(t[i],c);var h=MO(t,i);return null!=a&&(h.sign!==l.sign||h.span<a)&&(t[1-i]=t[i]+l.sign*a),h=MO(t,i),null!=r&&h.span>r&&(t[1-i]=t[i]+h.sign*r),t},AO=Fe.each,DO=Math.min,CO=Math.max,OO=Math.floor,kO=Math.ceil,LO=Ch.round,EO=Math.PI;function NO(e,t,n){this._axesMap=Fe.createHashMap(),this._axesLayout={},this.dimensions=e.dimensions,this._rect,this._model=e,this._init(e,t,n)}function PO(e,t){return DO(CO(e,t[0]),t[1])}function RO(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function zO(e,t){var n,i,a=t.layoutLength,r=t.axisExpandWidth,o=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,u=s,c=!1;return e<l[0]?(n=e*s,i=s):e<=l[1]?(n=t.axisExpandWindow0Pos+e*r-t.axisExpandWindow[0],u=r,c=!0):(n=a-(o-1-e)*s,i=s),{position:n,axisNameAvailableWidth:u,axisLabelShow:c,nameTruncateMaxWidth:i}}NO.prototype={type:"parallel",constructor:NO,_init:function(e,t,n){var i=e.dimensions,a=e.parallelAxisIndex;AO(i,(function(e,n){var i=a[n],r=t.getComponent("parallelAxis",i),o=this._axesMap.set(e,new SO(e,D_.createScaleByModel(r),[0,0],r.get("type"),i)),s="category"===o.type;o.onBand=s&&r.get("boundaryGap"),o.inverse=r.get("inverse"),r.axis=o,o.model=r,o.coordinateSystem=r.coordinateSystem=this}),this)},update:function(e,t){this._updateAxesFromSeries(this._model,e)},containPoint:function(e){var t=this._makeLayoutInfo(),n=t.axisBase,i=t.layoutBase,a=t.pixelDimIndex,r=e[1-a],o=e[a];return r>=n&&r<=n+t.axisLength&&o>=i&&o<=i+t.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,t){t.eachSeries((function(n){if(e.contains(n,t)){var i=n.getData();AO(this.dimensions,(function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(i,i.mapDimension(e)),D_.niceScaleExtent(t.scale,t.model)}),this)}}),this)},resize:function(e,t){this._rect=td.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var e,t=this._model,n=this._rect,i=["x","y"],a=["width","height"],r=t.get("layout"),o="horizontal"===r?0:1,s=n[a[o]],l=[0,s],u=this.dimensions.length,c=PO(t.get("axisExpandWidth"),l),h=PO(t.get("axisExpandCount")||0,[0,u]),d=t.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,f=t.get("axisExpandWindow");f?(e=PO(f[1]-f[0],l),f[1]=f[0]+e):(e=PO(c*(h-1),l),(f=[c*(t.get("axisExpandCenter")||OO(u/2))-e/2])[1]=f[0]+e);var p=(s-e)/(u-h);p<3&&(p=0);var g=[OO(LO(f[0]/c,1))+1,kO(LO(f[1]/c,1))-1],m=p/c*f[0];return{layout:r,pixelDimIndex:o,layoutBase:n[i[o]],layoutLength:s,axisBase:n[i[1-o]],axisLength:n[a[1-o]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:p,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var e=this._rect,t=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;t.each((function(e){var t=[0,i.axisLength],n=e.inverse?1:0;e.setExtent(t[n],t[1-n])})),AO(n,(function(t,n){var r=(i.axisExpandable?zO:RO)(n,i),o={horizontal:{x:r.position,y:i.axisLength},vertical:{x:0,y:r.position}},s={horizontal:EO/2,vertical:0},l=[o[a].x+e.x,o[a].y+e.y],u=s[a],c=sn.create();sn.rotate(c,c,u),sn.translate(c,c,l),this._axesLayout[t]={position:l,rotation:u,transform:c,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},getAxis:function(e){return this._axesMap.get(e)},dataToPoint:function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},eachActiveState:function(e,t,n,i){null==n&&(n=0),null==i&&(i=e.count());var a=this._axesMap,r=this.dimensions,o=[],s=[];Fe.each(r,(function(t){o.push(e.mapDimension(t)),s.push(a.get(t).model)}));for(var l=this.hasAxisBrushed(),u=n;u<i;u++){var c;if(l){c="active";for(var h=e.getValues(o,u),d=0,f=r.length;d<f;d++){if("inactive"===s[d].getActiveState(h[d])){c="inactive";break}}}else c="normal";t(c,u)}},hasAxisBrushed:function(){for(var e=this.dimensions,t=this._axesMap,n=!1,i=0,a=e.length;i<a;i++)"normal"!==t.get(e[i]).model.getActiveState()&&(n=!0);return n},axisCoordToPoint:function(e,t){var n=this._axesLayout[t];return Jc.applyTransform([e,0],n.transform)},getAxisLayout:function(e){return Fe.clone(this._axesLayout[e])},getSlidedAxisExpandWindow:function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,i=t.axisExpandWindow.slice(),a=i[1]-i[0],r=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:i};var o,s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l="slide",u=t.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),h=null!=c[0];if(u)h&&u&&s<a*c[0]?(l="jump",o=s-a*c[2]):h&&u&&s>a*(1-c[0])?(l="jump",o=s-a*(1-c[2])):(o=s-a*c[1])>=0&&(o=s-a*(1-c[1]))<=0&&(o=0),(o*=t.axisExpandWidth/u)?IO(o,i,r,"all"):l="none";else{a=i[1]-i[0];(i=[CO(0,r[1]*s/a-a/2)])[1]=DO(r[1],i[0]+a),i[0]=i[1]-a}return{axisExpandWindow:i,behavior:l}}};var BO=NO;Tf.register("parallel",{create:function(e,t){var n=[];return e.eachComponent("parallel",(function(i,a){var r=new BO(i,e,t);r.name="parallel_"+a,r.resize(i,t),i.coordinateSystem=r,r.model=i,n.push(r)})),e.eachSeries((function(t){if("parallel"===t.get("coordinateSystem")){var n=e.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=n.coordinateSystem}})),n}});var VO=sd.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Wo([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(e){var t=this.activeIntervals=Fe.clone(e);if(t)for(var n=t.length-1;n>=0;n--)Ch.asc(t[n])},getActiveState:function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(e))return"inactive";if(1===t.length){var n=t[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var i=0,a=t.length;i<a;i++)if(t[i][0]<=e&&e<=t[i][1])return"active";return"inactive"}});Fe.merge(VO.prototype,O_),bw("parallel",VO,(function(e,t){return t.type||(t.data?"category":"value")}),{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10}),sd.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){sd.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(e){var t=this.option;e&&Fe.merge(t,e,!0),this._initDimensions()},contains:function(e,t){var n=e.get("parallelIndex");return null!=n&&t.getComponent("parallel",n)===this},setAxisExpand:function(e){Fe.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])}),this)},_initDimensions:function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[],n=Fe.filter(this.dependentModels.parallelAxis,(function(e){return(e.get("parallelIndex")||0)===this.componentIndex}),this);Fe.each(n,(function(n){e.push("dim"+n.get("dim")),t.push(n.componentIndex)}))}});jx.registerAction({type:"axisAreaSelect",event:"axisAreaSelected"},(function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},(function(t){t.axis.model.setActiveIntervals(e.intervals)}))})),jx.registerAction("parallelAxisExpand",(function(e,t){t.eachComponent({mainType:"parallel",query:e},(function(t){t.setAxisExpand(e)}))}));var HO=Fe.curry,YO=Fe.each,FO=Fe.map,GO=Math.min,WO=Math.max,jO=Math.pow,UO="globalPan",ZO={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},XO={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},qO={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},KO=0;function $O(e){yt.call(this),this._zr=e,this.group=new Jc.Group,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+KO++,this._handlers={},YO(Mk,(function(e,t){this._handlers[t]=Fe.bind(e,this)}),this)}function QO(e,t){var n=Ik[t.brushType].createCover(e,t);return n.__brushOption=t,tk(n,t),e.group.add(n),n}function JO(e,t){var n=ik(t);return n.endCreating&&(n.endCreating(e,t),tk(t,t.__brushOption)),t}function ek(e,t){var n=t.__brushOption;ik(t).updateCoverShape(e,t,n.range,n)}function tk(e,t){var n=t.z;null==n&&(n=1e4),e.traverse((function(e){e.z=n,e.z2=n}))}function nk(e,t){ik(t).updateCommon(e,t),ek(e,t)}function ik(e){return Ik[e.__brushOption.brushType]}function ak(e,t,n){var i,a=e._panels;if(!a)return!0;var r=e._transform;return YO(a,(function(e){e.isTargetByCursor(t,n,r)&&(i=e)})),i}function rk(e,t){var n=e._panels;if(!n)return!0;var i=t.__brushOption.panelId;return null==i||n[i]}function ok(e){var t=e._covers,n=t.length;return YO(t,(function(t){e.group.remove(t)}),e),t.length=0,!!n}function sk(e,t){var n=FO(e._covers,(function(e){var t=e.__brushOption,n=Fe.clone(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}}));e.trigger("brush",n,{isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function lk(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function uk(e,t,n,i){var a=new Jc.Group;return a.add(new Jc.Rect({name:"main",style:fk(n),silent:!0,draggable:!0,cursor:"move",drift:HO(e,t,a,"nswe"),ondragend:HO(sk,t,{isEnd:!0})})),YO(i,(function(n){a.add(new Jc.Rect({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:HO(e,t,a,n),ondragend:HO(sk,t,{isEnd:!0})}))})),a}function ck(e,t,n,i){var a=i.brushStyle.lineWidth||0,r=WO(a,6),o=n[0][0],s=n[1][0],l=o-a/2,u=s-a/2,c=n[0][1],h=n[1][1],d=c-r+a/2,f=h-r+a/2,p=c-o,g=h-s,m=p+a,v=g+a;dk(e,t,"main",o,s,p,g),i.transformable&&(dk(e,t,"w",l,u,r,v),dk(e,t,"e",d,u,r,v),dk(e,t,"n",l,u,m,r),dk(e,t,"s",l,f,m,r),dk(e,t,"nw",l,u,r,r),dk(e,t,"ne",d,u,r,r),dk(e,t,"sw",l,f,r,r),dk(e,t,"se",d,f,r,r))}function hk(e,t){var n=t.__brushOption,i=n.transformable,a=t.childAt(0);a.useStyle(fk(n)),a.attr({silent:!i,cursor:i?"move":"default"}),YO(["w","e","n","s","se","sw","ne","nw"],(function(n){var a=t.childOfName(n),r=gk(e,n);a&&a.attr({silent:!i,invisible:!i,cursor:i?XO[r]+"-resize":null})}))}function dk(e,t,n,i,a,r,o){var s=t.childOfName(n);s&&s.setShape(function(e){var t=GO(e[0][0],e[1][0]),n=GO(e[0][1],e[1][1]),i=WO(e[0][0],e[1][0]),a=WO(e[0][1],e[1][1]);return{x:t,y:n,width:i-t,height:a-n}}(_k(e,t,[[i,a],[i+r,a+o]])))}function fk(e){return Fe.defaults({strokeNoScale:!0},e.brushStyle)}function pk(e,t,n,i){var a=[GO(e,n),GO(t,i)],r=[WO(e,n),WO(t,i)];return[[a[0],r[0]],[a[1],r[1]]]}function gk(e,t){if(t.length>1)return("e"===(n=[gk(e,(t=t.split(""))[0]),gk(e,t[1])])[0]||"w"===n[0])&&n.reverse(),n.join("");var n=Jc.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[t],function(e){return Jc.getTransform(e.group)}(e));return{left:"w",right:"e",top:"n",bottom:"s"}[n]}function mk(e,t,n,i,a,r,o,s){var l=i.__brushOption,u=e(l.range),c=yk(n,r,o);YO(a.split(""),(function(e){var t=ZO[e];u[t[0]][t[1]]+=c[t[0]]})),l.range=t(pk(u[0][0],u[1][0],u[0][1],u[1][1])),nk(n,i),sk(n,{isEnd:!1})}function vk(e,t,n,i,a){var r=t.__brushOption.range,o=yk(e,n,i);YO(r,(function(e){e[0]+=o[0],e[1]+=o[1]})),nk(e,t),sk(e,{isEnd:!1})}function yk(e,t,n){var i=e.group,a=i.transformCoordToLocal(t,n),r=i.transformCoordToLocal(0,0);return[a[0]-r[0],a[1]-r[1]]}function _k(e,t,n){var i=rk(e,t);return i&&!0!==i?i.clipPath(n,e._transform):Fe.clone(n)}function xk(e){var t=e.event;t.preventDefault&&t.preventDefault()}function bk(e,t,n){return e.childOfName("main").contain(t,n)}function wk(e,t,n,i){var a,r=e._creatingCover,o=e._creatingPanel,s=e._brushOption;if(e._track.push(n.slice()),function(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],i=t[0],a=n[0]-i[0],r=n[1]-i[1];return jO(a*a+r*r,.5)>6}(e)||r){if(o&&!r){"single"===s.brushMode&&ok(e);var l=Fe.clone(s);l.brushType=Sk(l.brushType,o),l.panelId=!0===o?null:o.panelId,r=e._creatingCover=QO(e,l),e._covers.push(r)}if(r){var u=Ik[Sk(e._brushType,o)];r.__brushOption.range=u.getCreatingRange(_k(e,r,e._track)),i&&(JO(e,r),u.updateCommon(e,r)),ek(e,r),a={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&ak(e,t,n)&&ok(e)&&(a={isEnd:i,removeOnClick:!0});return a}function Sk(e,t){return"auto"===e?t.defaultBrushType:e}$O.prototype={constructor:$O,enableBrush:function(e){var t,n;return this._brushType&&(n=(t=this)._zr,PT.release(n,UO,t._uid),function(e,t){YO(t,(function(t,n){e.off(n,t)}))}(n,t._handlers),t._brushType=t._brushOption=null),e.brushType&&function(e,t){var n=e._zr;e._enableGlobalPan||PT.take(n,UO,e._uid);(function(e,t){YO(t,(function(t,n){e.on(n,t)}))})(n,e._handlers),e._brushType=t.brushType,e._brushOption=Fe.merge(Fe.clone(qO),t,!0)}(this,e),this},setPanels:function(e){if(e&&e.length){var t=this._panels={};Fe.each(e,(function(e){t[e.panelId]=Fe.clone(e)}))}else this._panels=null;return this},mount:function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({position:e.position||[0,0],rotation:e.rotation||0,scale:e.scale||[1,1]}),this._transform=t.getLocalTransform(),this},eachCover:function(e,t){YO(this._covers,e,t)},updateCovers:function(e){e=Fe.map(e,(function(e){return Fe.merge(Fe.clone(qO),e,!0)}));var t=this._covers,n=this._covers=[],i=this,a=this._creatingCover;return new Jm(t,e,(function(e,t){return r(e.__brushOption,t)}),r).add(o).update(o).remove((function(e){t[e]!==a&&i.group.remove(t[e])})).execute(),this;function r(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function o(r,o){var s=e[r];if(null!=o&&t[o]===a)n[r]=t[o];else{var l=n[r]=null!=o?(t[o].__brushOption=s,t[o]):JO(i,QO(i,s));nk(i,l)}}},unmount:function(){return this.enableBrush(!1),ok(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},Fe.mixin($O,yt);var Mk={mousedown:function(e){if(this._dragging)Tk(this,e);else if(!e.target||!e.target.draggable){xk(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=ak(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,i=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var i=e._zr;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}(e,t)){var i=e._zr,a=e._covers,r=ak(e,t,n);if(!e._dragging)for(var o=0;o<a.length;o++){var s=a[o].__brushOption;if(r&&(!0===r||s.panelId===r.panelId)&&Ik[s.brushType].contain(a[o],n[0],n[1]))return}r&&i.setCursorStyle("crosshair")}}(this,e,i),this._dragging){xk(e);var a=wk(this,e,i,!1);a&&sk(this,a)}},mouseup:function(e){Tk(this,e)}};function Tk(e,t){if(e._dragging){xk(t);var n=t.offsetX,i=t.offsetY,a=e.group.transformCoordToLocal(n,i),r=wk(e,t,a,!0);e._dragging=!1,e._track=[],e._creatingCover=null,r&&sk(e,r)}}var Ik={lineX:Ak(0),lineY:Ak(1),rect:{createCover:function(e,t){return uk(HO(mk,(function(e){return e}),(function(e){return e})),e,t,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(e){var t=lk(e);return pk(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,i){ck(e,t,n,i)},updateCommon:hk,contain:bk},polygon:{createCover:function(e,t){var n=new Jc.Group;return n.add(new Jc.Polyline({name:"main",style:fk(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Jc.Polygon({name:"main",draggable:!0,drift:HO(vk,e,t),ondragend:HO(sk,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,i){t.childAt(0).setShape({points:_k(e,t,n)})},updateCommon:hk,contain:bk}};function Ak(e){return{createCover:function(t,n){return uk(HO(mk,(function(t){var n=[t,[0,100]];return e&&n.reverse(),n}),(function(t){return t[e]})),t,n,[["w","e"],["n","s"]][e])},getCreatingRange:function(t){var n=lk(t);return[GO(n[0][e],n[1][e]),WO(n[0][e],n[1][e])]},updateCoverShape:function(t,n,i,a){var r,o=rk(t,n);if(!0!==o&&o.getLinearBrushOtherExtent)r=o.getLinearBrushOtherExtent(e,t._transform);else{var s=t._zr;r=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[i,r];e&&l.reverse(),ck(t,n,l,a)},updateCommon:hk,contain:bk}}var Dk=$O,Ck=KT.onIrrelevantElement;function Ok(e){return Ni.create(e)}var kk=function(e,t){return e=Ok(e),function(n){var i=null!=t?t:n,a=i?e.width:e.height,r=i?e.x:e.y;return[r,r+(a||0)]}},Lk={makeRectPanelClipPath:function(e){return e=Ok(e),function(t,n){return Jc.clipPointsByRect(t,e)}},makeLinearBrushOtherExtent:kk,makeRectIsTargetByCursor:function(e,t,n){return e=Ok(e),function(i,a,r){return e.contain(a[0],a[1])&&!Ck(i,t,n)}}},Ek=["axisLine","axisTickLabel","axisName"],Nk=jx.extendComponentView({type:"parallelAxis",init:function(e,t){Nk.superApply(this,"init",arguments),(this._brushController=new Dk(t.getZr())).on("brush",Fe.bind(this._onBrush,this))},render:function(e,t,n,i){if(!function(e,t,n){return n&&"axisAreaSelect"===n.type&&t.findComponents({mainType:"parallelAxis",query:n})[0]===e}(e,t,i)){this.axisModel=e,this.api=n,this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new Jc.Group,this.group.add(this._axisGroup),e.get("show")){var r=function(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}(e,t),o=r.coordinateSystem,s=e.getAreaSelectStyle(),l=s.width,u=e.axis.dim,c=o.getAxisLayout(u),h=Fe.extend({strokeContainThreshold:l},c),d=new lS(e,h);Fe.each(Ek,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(h,s,e,r,l,n);var f=i&&!1===i.animation?null:e;Jc.groupTransition(a,this._axisGroup,f)}}},_refreshBrushController:function(e,t,n,i,a,r){var o=n.axis.getExtent(),s=o[1]-o[0],l=Math.min(30,.1*Math.abs(s)),u=Jc.BoundingRect.create({x:o[0],y:-a/2,width:s,height:a});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,position:e.position}).setPanels([{panelId:"pl",clipPath:Lk.makeRectPanelClipPath(u),isTargetByCursor:Lk.makeRectIsTargetByCursor(u,r,i),getLinearBrushOtherExtent:Lk.makeLinearBrushOtherExtent(u,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(function(e){var t=e.axis;return Fe.map(e.activeIntervals,(function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}}))}(n))},_onBrush:function(e,t){var n=this.axisModel,i=n.axis,a=Fe.map(e,(function(e){return[i.coordToData(e.range[0],!0),i.coordToData(e.range[1],!0)]}));(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:a})},dispose:function(){this._brushController.dispose()}});jx.extendComponentView({type:"parallel",render:function(e,t,n){this._model=e,this._api=n,this._handlers||(this._handlers={},Fe.each(Pk,(function(e,t){n.getZr().on(t,this._handlers[t]=Fe.bind(e,this))}),this)),Ig.createOrUpdate(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},dispose:function(e,t){Fe.each(this._handlers,(function(e,n){t.getZr().off(n,e)})),this._handlers=null},_throttledDispatchExpand:function(e){this._dispatchExpand(e)},_dispatchExpand:function(e){e&&this._api.dispatchAction(Fe.extend({type:"parallelAxisExpand"},e))}});var Pk={mousedown:function(e){Rk(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(Rk(this,"click")&&t){var n=[e.offsetX,e.offsetY];if(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2)>5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&Rk(this,"mousemove")){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i&&null})}}};function Rk(e,t){var n=e._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===t}jx.registerPreprocessor(bO);var zk=Fe.each,Bk=Fe.createHashMap;ag.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(e,t){var n=this.getSource();return function(e,t){if(e.encodeDefine)return;var n=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(!n)return;var i=e.encodeDefine=Bk();zk(n.dimensions,(function(e){var t=+e.replace("dim","");i.set(e,t)}))}(n,this),hy(n,this)},getRawIndicesByActiveState:function(e){var t=this.coordinateSystem,n=this.getData(),i=[];return t.eachActiveState(n,(function(t,a){e===t&&i.push(n.getRawIndex(a))})),i},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});function Vk(e,t,n,i){for(var a,r=[],o=0;o<n.length;o++){var s=n[o],l=e.get(e.mapDimension(s),t);a=l,("category"===i.getAxis(s).type?null==a:null==a||isNaN(a))||r.push(i.dataToPoint(l,s))}return r}function Hk(e,t,n,i,a){var r=Vk(e,n,i,a),o=new Jc.Polyline({shape:{points:r},silent:!0,z2:10});return t.add(o),e.setItemGraphicEl(n,o),o}function Yk(e){var t=e.get("smooth",!0);return!0===t&&(t=.3),{lineStyle:e.getModel("lineStyle").getLineStyle(),smooth:null!=t?t:.3}}function Fk(e,t,n,i){var a=i.lineStyle;t.hasItemOption&&(a=t.getItemModel(n).getModel("lineStyle").getLineStyle());e.useStyle(a);var r=e.style;r.fill=null,r.stroke=t.getItemVisual(n,"color"),r.opacity=t.getItemVisual(n,"opacity"),i.smooth&&(e.shape.smooth=i.smooth)}bg.extend({type:"parallel",init:function(){this._dataGroup=new Jc.Group,this.group.add(this._dataGroup),this._data,this._initialized},render:function(e,t,n,i){var a=this._dataGroup,r=e.getData(),o=this._data,s=e.coordinateSystem,l=s.dimensions,u=Yk(e);if(r.diff(o).add((function(e){var t=Hk(r,a,e,l,s);Fk(t,r,e,u)})).update((function(t,n){var a=o.getItemGraphicEl(n),c=Vk(r,t,l,s);r.setItemGraphicEl(t,a);var h=i&&!1===i.animation?null:e;Jc.updateProps(a,{shape:{points:c}},h,t),Fk(a,r,t,u)})).remove((function(e){var t=o.getItemGraphicEl(e);a.remove(t)})).execute(),!this._initialized){this._initialized=!0;var c=function(e,t,n){var i=e.model,a=e.getRect(),r=new Jc.Rect({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),o="horizontal"===i.get("layout")?"width":"height";return r.setShape(o,0),Jc.initProps(r,{shape:{width:a.width,height:a.height}},t,n),r}(s,e,(function(){setTimeout((function(){a.removeClipPath()}))}));a.setClipPath(c)}this._data=r},incrementalPrepareRender:function(e,t,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(e,t,n){for(var i=t.getData(),a=t.coordinateSystem,r=a.dimensions,o=Yk(t),s=e.start;s<e.end;s++){var l=Hk(i,this._dataGroup,s,r,a);l.incremental=!0,Fk(l,i,s,o)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});var Gk=["lineStyle","normal","opacity"],Wk={seriesType:"parallel",reset:function(e,t,n){var i=e.getModel("itemStyle"),a=e.getModel("lineStyle"),r=t.get("color"),o=a.get("color")||i.get("color")||r[e.seriesIndex%r.length],s=e.get("inactiveOpacity"),l=e.get("activeOpacity"),u=e.getModel("lineStyle").getLineStyle(),c=e.coordinateSystem,h=e.getData(),d={normal:u.opacity,active:l,inactive:s};return h.setVisual("color",o),{progress:function(e,t){c.eachActiveState(t,(function(e,n){var i=d[e];if("normal"===e&&t.hasItemOption){var a=t.getItemModel(n).get(Gk,!0);null!=a&&(i=a)}t.setItemVisual(n,"opacity",i)}),e.start,e.end)}}}},jk=Wk;jx.registerVisual(jk);var Uk=Fh.encodeHTML,Zk=ag.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(e,t){for(var n=e.edges||e.links,i=e.data||e.nodes,a=e.levels,r=this.levelModels={},o=0;o<a.length;o++)null!=a[o].depth&&a[o].depth>=0&&(r[a[o].depth]=new ph(a[o],this,t));if(i&&n){var s=FD(i,n,this,!0,(function(e,t){e.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var n=this.parentModel,i=n.getData().getItemLayout(t).depth;return n.levelModels[i]||this.parentModel})),e})),t.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var n=this.parentModel,i=n.getGraph().getEdgeByIndex(t).node1.getLayout().depth;return n.levelModels[i]||this.parentModel})),e}))}));return s.data}},setNodePosition:function(e,t){var n=this.option.data[e];n.localX=t[0],n.localY=t[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(e,t,n){if("edge"===n){var i=this.getDataParams(e,n),a=i.data,r=a.source+" -- "+a.target;return i.value&&(r+=" : "+i.value),Uk(r)}if("node"===n){var o=this.getGraph().getNodeByIndex(e).getLayout().value,s=this.getDataParams(e,n).data.name;if(o)r=s+" : "+o;return Uk(r)}return Zk.superCall(this,"formatTooltip",e,t)},optionUpdated:function(){var e=this.option;!0===e.focusNodeAdjacency&&(e.focusNodeAdjacency="allEdges")},getDataParams:function(e,t){var n=Zk.superCall(this,"getDataParams",e,t);if(null==n.value&&"node"===t){var i=this.getGraph().getNodeByIndex(e).getLayout().value;n.value=i}return n},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),Xk=["itemStyle","opacity"],qk=["emphasis","itemStyle","opacity"],Kk=["lineStyle","opacity"],$k=["emphasis","lineStyle","opacity"];function Qk(e,t){return e.getVisual("opacity")||e.getModel().get(t)}function Jk(e,t,n){var i=e.getGraphicEl(),a=Qk(e,t);null!=n&&(null==a&&(a=1),a*=n),i.downplay&&i.downplay(),i.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",a)}))}function eL(e,t){var n=Qk(e,t),i=e.getGraphicEl();i.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",n)})),i.highlight&&i.highlight()}var tL=Jc.extendShape({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});jx.extendChartView({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(e,t,n){var i=this,a=e.getGraph(),r=this.group,o=e.layoutInfo,s=o.width,l=o.height,u=e.getData(),c=e.getData("edge"),h=e.get("orient");this._model=e,r.removeAll(),r.attr("position",[o.x,o.y]),a.eachEdge((function(t){var n=new tL;n.dataIndex=t.dataIndex,n.seriesIndex=e.seriesIndex,n.dataType="edge";var i,a,o,u,d,f,p,g,m=t.getModel("lineStyle"),v=m.get("curveness"),y=t.node1.getLayout(),_=t.node1.getModel(),x=_.get("localX"),b=_.get("localY"),w=t.node2.getLayout(),S=t.node2.getModel(),M=S.get("localX"),T=S.get("localY"),I=t.getLayout();switch(n.shape.extent=Math.max(1,I.dy),n.shape.orient=h,"vertical"===h?(i=(null!=x?x*s:y.x)+I.sy,a=(null!=b?b*l:y.y)+y.dy,o=(null!=M?M*s:w.x)+I.ty,d=i,f=a*(1-v)+(u=null!=T?T*l:w.y)*v,p=o,g=a*v+u*(1-v)):(i=(null!=x?x*s:y.x)+y.dx,a=(null!=b?b*l:y.y)+I.sy,d=i*(1-v)+(o=null!=M?M*s:w.x)*v,f=a,p=i*v+o*(1-v),g=u=(null!=T?T*l:w.y)+I.ty),n.setShape({x1:i,y1:a,x2:o,y2:u,cpx1:d,cpy1:f,cpx2:p,cpy2:g}),n.setStyle(m.getItemStyle()),n.style.fill){case"source":n.style.fill=t.node1.getVisual("color");break;case"target":n.style.fill=t.node2.getVisual("color")}Jc.setHoverStyle(n,t.getModel("emphasis.lineStyle").getItemStyle()),r.add(n),c.setItemGraphicEl(t.dataIndex,n)})),a.eachNode((function(t){var n=t.getLayout(),i=t.getModel(),a=i.get("localX"),o=i.get("localY"),c=i.getModel("label"),h=i.getModel("emphasis.label"),d=new Jc.Rect({shape:{x:null!=a?a*s:n.x,y:null!=o?o*l:n.y,width:n.dx,height:n.dy},style:i.getModel("itemStyle").getItemStyle()}),f=t.getModel("emphasis.itemStyle").getItemStyle();Jc.setLabelStyle(d.style,f,c,h,{labelFetcher:e,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),d.setStyle("fill",t.getVisual("color")),Jc.setHoverStyle(d,f),r.add(d),u.setItemGraphicEl(t.dataIndex,d),d.dataType="node"})),u.eachItemGraphicEl((function(t,a){var r=u.getItemModel(a);r.get("draggable")&&(t.drift=function(t,r){i._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=r,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:u.getRawIndex(a),localX:this.shape.x/s,localY:this.shape.y/l})},t.ondragend=function(){i._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move"),t.highlight=function(){this.trigger("emphasis")},t.downplay=function(){this.trigger("normal")},t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),r.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){i._focusAdjacencyDisabled||(i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){i._focusAdjacencyDisabled||i._dispatchUnfocus(n)}))})),c.eachItemGraphicEl((function(t,a){var r=c.getItemModel(a);t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),r.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){i._focusAdjacencyDisabled||(i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){i._focusAdjacencyDisabled||i._dispatchUnfocus(n)}))})),!this._data&&e.get("animation")&&r.setClipPath(function(e,t,n){var i=new Jc.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Jc.initProps(i,{shape:{width:e.width+20}},t,n),i}(r.getBoundingRect(),e,(function(){r.removeClipPath()}))),this._data=e.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(e){var t=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){t._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,n,i){var a=e.getData(),r=a.graph,o=i.dataIndex,s=a.getItemModel(o),l=i.edgeDataIndex;if(null!=o||null!=l){var u=r.getNodeByIndex(o),c=r.getEdgeByIndex(l);if(r.eachNode((function(e){Jk(e,Xk,.1)})),r.eachEdge((function(e){Jk(e,Kk,.1)})),u){eL(u,qk);var h=s.get("focusNodeAdjacency");"outEdges"===h?Fe.each(u.outEdges,(function(e){e.dataIndex<0||(eL(e,$k),eL(e.node2,qk))})):"inEdges"===h?Fe.each(u.inEdges,(function(e){e.dataIndex<0||(eL(e,$k),eL(e.node1,qk))})):"allEdges"===h&&Fe.each(u.edges,(function(e){e.dataIndex<0||(eL(e,$k),e.node1!==u&&eL(e.node1,qk),e.node2!==u&&eL(e.node2,qk))}))}c&&(eL(c,$k),eL(c.node1,qk),eL(c.node2,qk))}},unfocusNodeAdjacency:function(e,t,n,i){var a=e.getGraph();a.eachNode((function(e){Jk(e,Xk)})),a.eachEdge((function(e){Jk(e,Kk)}))}}),jx.registerAction({type:"dragNode",event:"dragnode",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},(function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])}))}));var nL=Po.groupData;function iL(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&t.depth>=0}function aL(e,t,n,i,a){var r="vertical"===a?"x":"y";Fe.each(e,(function(e){var o,s,l;e.sort((function(e,t){return e.getLayout()[r]-t.getLayout()[r]}));for(var u=0,c=e.length,h="vertical"===a?"dx":"dy",d=0;d<c;d++)(l=u-(s=e[d]).getLayout()[r])>0&&(o=s.getLayout()[r]+l,"vertical"===a?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),u=s.getLayout()[r]+s.getLayout()[h]+t;if((l=u-t-("vertical"===a?i:n))>0)for(o=s.getLayout()[r]-l,"vertical"===a?s.setLayout({x:o},!0):s.setLayout({y:o},!0),u=o,d=c-2;d>=0;--d)(l=(s=e[d]).getLayout()[r]+s.getLayout()[h]+t-u)>0&&(o=s.getLayout()[r]-l,"vertical"===a?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),u=s.getLayout()[r]}))}function rL(e,t,n){Fe.each(e.slice().reverse(),(function(e){Fe.each(e,(function(e){if(e.outEdges.length){var i=dL(e.outEdges,oL,n)/dL(e.outEdges,hL,n);if(isNaN(i)){var a=e.outEdges.length;i=a?dL(e.outEdges,sL,n)/a:0}if("vertical"===n){var r=e.getLayout().x+(i-cL(e,n))*t;e.setLayout({x:r},!0)}else{var o=e.getLayout().y+(i-cL(e,n))*t;e.setLayout({y:o},!0)}}}))}))}function oL(e,t){return cL(e.node2,t)*e.getValue()}function sL(e,t){return cL(e.node2,t)}function lL(e,t){return cL(e.node1,t)*e.getValue()}function uL(e,t){return cL(e.node1,t)}function cL(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function hL(e){return e.getValue()}function dL(e,t,n){for(var i=0,a=e.length,r=-1;++r<a;){var o=+t.call(e,e[r],n);isNaN(o)||(i+=o)}return i}function fL(e,t,n){Fe.each(e,(function(e){Fe.each(e,(function(e){if(e.inEdges.length){var i=dL(e.inEdges,lL,n)/dL(e.inEdges,hL,n);if(isNaN(i)){var a=e.inEdges.length;i=a?dL(e.inEdges,uL,n)/a:0}if("vertical"===n){var r=e.getLayout().x+(i-cL(e,n))*t;e.setLayout({x:r},!0)}else{var o=e.getLayout().y+(i-cL(e,n))*t;e.setLayout({y:o},!0)}}}))}))}var pL=function(e,t,n){e.eachSeriesByType("sankey",(function(e){var n=e.get("nodeWidth"),i=e.get("nodeGap"),a=function(e,t){return td.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=a;var r=a.width,o=a.height,s=e.getGraph(),l=s.nodes,u=s.edges;!function(e){Fe.each(e,(function(e){var t=dL(e.outEdges,hL),n=dL(e.inEdges,hL),i=e.getValue()||0,a=Math.max(t,n,i);e.setLayout({value:a},!0)}))}(l),function(e,t,n,i,a,r,o,s,l){(function(e,t,n,i,a,r,o){for(var s=[],l=[],u=[],c=[],h=0,d=0,f=0;f<t.length;f++)s[f]=1;for(f=0;f<e.length;f++)l[f]=e[f].inEdges.length,0===l[f]&&u.push(e[f]);var p=-1;for(;u.length;){for(var g=0;g<u.length;g++){var m=u[g],v=m.hostGraph.data.getRawDataItem(m.dataIndex),y=null!=v.depth&&v.depth>=0;y&&v.depth>p&&(p=v.depth),m.setLayout({depth:y?v.depth:h},!0),"vertical"===r?m.setLayout({dy:n},!0):m.setLayout({dx:n},!0);for(var _=0;_<m.outEdges.length;_++){var x=m.outEdges[_];s[t.indexOf(x)]=0;var b=x.node2;0==--l[e.indexOf(b)]&&c.indexOf(b)<0&&c.push(b)}}++h,u=c,c=[]}for(f=0;f<s.length;f++)if(1===s[f])throw new Error("Sankey is a DAG, the original data has cycle!");var w=p>h-1?p:h-1;o&&"left"!==o&&function(e,t,n,i){if("right"===t){for(var a=[],r=e,o=0;r.length;){for(var s=0;s<r.length;s++){var l=r[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];a.indexOf(c.node1)<0&&a.push(c.node1)}}r=a,a=[],++o}Fe.each(e,(function(e){iL(e)||e.setLayout({depth:Math.max(0,i-e.getLayout().skNodeHeight)},!0)}))}else"justify"===t&&function(e,t){Fe.each(e,(function(e){iL(e)||e.outEdges.length||e.setLayout({depth:t},!0)}))}(e,i)}(e,o,0,w);d="vertical"===r?(a-n)/w:(i-n)/w;!function(e,t,n){Fe.each(e,(function(e){var i=e.getLayout().depth*t;"vertical"===n?e.setLayout({y:i},!0):e.setLayout({x:i},!0)}))}(e,d,r)})(e,t,n,a,r,s,l),function(e,t,n,i,a,r,o){var s=function(e,t){var n=[],i="vertical"===t?"y":"x",a=nL(e,(function(e){return e.getLayout()[i]}));return a.keys.sort((function(e,t){return e-t})),Fe.each(a.keys,(function(e){n.push(a.buckets.get(e))})),n}(e,o);(function(e,t,n,i,a,r){var o=1/0;Fe.each(e,(function(e){var t=e.length,s=0;Fe.each(e,(function(e){s+=e.getLayout().value}));var l="vertical"===r?(i-(t-1)*a)/s:(n-(t-1)*a)/s;l<o&&(o=l)})),Fe.each(e,(function(e){Fe.each(e,(function(e,t){var n=e.getLayout().value*o;"vertical"===r?(e.setLayout({x:t},!0),e.setLayout({dx:n},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:n},!0))}))})),Fe.each(t,(function(e){var t=+e.getValue()*o;e.setLayout({dy:t},!0)}))})(s,t,n,i,a,o),aL(s,a,n,i,o);for(var l=1;r>0;r--)rL(s,l*=.99,o),aL(s,a,n,i,o),fL(s,l,o),aL(s,a,n,i,o)}(e,t,r,a,i,o,s),function(e,t){var n="vertical"===t?"x":"y";Fe.each(e,(function(e){e.outEdges.sort((function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]})),e.inEdges.sort((function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]}))})),Fe.each(e,(function(e){var t=0,n=0;Fe.each(e.outEdges,(function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy})),Fe.each(e.inEdges,(function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy}))}))}(e,s)}(l,u,n,i,r,o,0!==Fe.filter(l,(function(e){return 0===e.getLayout().value})).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))}))};var gL=function(e,t){e.eachSeriesByType("sankey",(function(e){var t=e.getGraph().nodes;if(t.length){var n=1/0,i=-1/0;Fe.each(t,(function(e){var t=e.getLayout().value;t<n&&(n=t),t>i&&(i=t)})),Fe.each(t,(function(t){var a=new uD({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:e.get("color")}).mapValueToVisual(t.getLayout().value),r=t.getModel().get("itemStyle.color");null!=r?t.setVisual("color",r):t.setVisual("color",a)}))}}))};jx.registerLayout(pL),jx.registerVisual(gL);var mL=av.getDimensionTypeByAxis,vL=Jd.makeSeriesEncodeForAxisCoordSys,yL={seriesModelMixin:{_baseAxisDim:null,getInitialData:function(e,t){var n,i,a=t.getComponent("xAxis",this.get("xAxisIndex")),r=t.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=r.get("type");"category"===o?(e.layout="horizontal",n=a.getOrdinalMeta(),i=!0):"category"===s?(e.layout="vertical",n=r.getOrdinalMeta(),i=!0):e.layout=e.layout||"horizontal";var l=["x","y"],u="horizontal"===e.layout?0:1,c=this._baseAxisDim=l[u],h=l[1-u],d=[a,r],f=d[u].get("type"),p=d[1-u].get("type"),g=e.data;if(g&&i){var m=[];Fe.each(g,(function(e,t){var n;e.value&&Fe.isArray(e.value)?(n=e.value.slice(),e.value.unshift(t)):Fe.isArray(e)?(n=e.slice(),e.unshift(t)):n=e,m.push(n)})),e.data=m}var v=this.defaultValueDimensions,y=[{name:c,type:mL(f),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:mL(p),dimsDef:v.slice()}];return uM(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:Fe.curry(vL,y,this)})},getBaseAxis:function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis}}},_L=yL.seriesModelMixin,xL=ag.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});Fe.mixin(xL,_L,!0);var bL=["itemStyle"],wL=["emphasis","itemStyle"];bg.extend({type:"boxplot",render:function(e,t,n){var i=e.getData(),a=this.group,r=this._data;this._data||a.removeAll();var o="horizontal"===e.get("layout")?1:0;i.diff(r).add((function(e){if(i.hasValue(e)){var t=ML(i.getItemLayout(e),i,e,o,!0);i.setItemGraphicEl(e,t),a.add(t)}})).update((function(e,t){var n=r.getItemGraphicEl(t);if(i.hasValue(e)){var s=i.getItemLayout(e);n?TL(s,n,i,e):n=ML(s,i,e,o),a.add(n),i.setItemGraphicEl(e,n)}else a.remove(n)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&a.remove(t)})).execute(),this._data=i},remove:function(e){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(e){e&&t.remove(e)}))},dispose:Fe.noop});var SL=xl.extend({type:"boxplotBoxPath",shape:{},buildPath:function(e,t){var n=t.points,i=0;for(e.moveTo(n[i][0],n[i][1]),i++;i<4;i++)e.lineTo(n[i][0],n[i][1]);for(e.closePath();i<n.length;i++)e.moveTo(n[i][0],n[i][1]),i++,e.lineTo(n[i][0],n[i][1])}});function ML(e,t,n,i,a){var r=e.ends,o=new SL({shape:{points:a?IL(r,i,e):r}});return TL(e,o,t,n,a),o}function TL(e,t,n,i,a){var r=n.hostModel;(0,Jc[a?"initProps":"updateProps"])(t,{shape:{points:e.ends}},r,i);var o=n.getItemModel(i),s=o.getModel(bL),l=n.getItemVisual(i,"color"),u=s.getItemStyle(["borderColor"]);u.stroke=l,u.strokeNoScale=!0,t.useStyle(u),t.z2=100;var c=o.getModel(wL).getItemStyle();Jc.setHoverStyle(t,c)}function IL(e,t,n){return Fe.map(e,(function(e){return(e=e.slice())[t]=n.initBaseline,e}))}var AL=["itemStyle","borderColor"];var DL=function(e,t){var n=e.get("color");e.eachRawSeriesByType("boxplot",(function(t){var i=n[t.seriesIndex%n.length],a=t.getData();a.setVisual({legendSymbol:"roundRect",color:t.get(AL)||i}),e.isSeriesFiltered(t)||a.each((function(e){var t=a.getItemModel(e);a.setItemVisual(e,{color:t.get(AL,!0)})}))}))},CL=Ch.parsePercent,OL=Fe.each;var kL=function(e){var t=function(e){var t=[],n=[];return e.eachSeriesByType("boxplot",(function(e){var i=e.getBaseAxis(),a=Fe.indexOf(n,i);a<0&&(a=n.length,n[a]=i,t[a]={axis:i,seriesModels:[]}),t[a].seriesModels.push(e)})),t}(e);OL(t,(function(e){var t=e.seriesModels;t.length&&(!function(e){var t,n,i=e.axis,a=e.seriesModels,r=a.length,o=e.boxWidthList=[],s=e.boxOffsetList=[],l=[];if("category"===i.type)n=i.getBandWidth();else{var u=0;OL(a,(function(e){u=Math.max(u,e.getData().count())})),t=i.getExtent(),Math.abs(t[1]-t[0])}OL(a,(function(e){var t=e.get("boxWidth");Fe.isArray(t)||(t=[t,t]),l.push([CL(t[0],n)||0,CL(t[1],n)||0])}));var c=.8*n-2,h=c/r*.3,d=(c-h*(r-1))/r,f=d/2-c/2;OL(a,(function(e,t){s.push(f),f+=h+d,o.push(Math.min(Math.max(d,l[t][0]),l[t][1]))}))}(e),OL(t,(function(t,n){!function(e,t,n){var i=e.coordinateSystem,a=e.getData(),r=n/2,o="horizontal"===e.get("layout")?0:1,s=1-o,l=["x","y"],u=a.mapDimension(l[o]),c=a.mapDimension(l[s],!0);if(null==u||c.length<5)return;for(var h=0;h<a.count();h++){var d=a.get(u,h),f=_(d,c[2],h),p=_(d,c[0],h),g=_(d,c[1],h),m=_(d,c[3],h),v=_(d,c[4],h),y=[];x(y,g,0),x(y,m,1),y.push(p,g,v,m),b(y,p),b(y,v),b(y,f),a.setItemLayout(h,{initBaseline:f[s],ends:y})}function _(e,n,r){var l,u=a.get(n,r),c=[];return c[o]=e,c[s]=u,isNaN(e)||isNaN(u)?l=[NaN,NaN]:(l=i.dataToPoint(c))[o]+=t,l}function x(e,t,n){var i=t.slice(),a=t.slice();i[o]+=r,a[o]-=r,n?e.push(i,a):e.push(a,i)}function b(e,t){var n=t.slice(),i=t.slice();n[o]-=r,i[o]+=r,e.push(n,i)}}(t,e.boxOffsetList[n],e.boxWidthList[n])})))}))};jx.registerVisual(DL),jx.registerLayout(kL);var LL=yL.seriesModelMixin,EL=ag.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(e,t,n){var i=t.getItemLayout(e);return i&&n.rect(i.brushRect)}});Fe.mixin(EL,LL,!0);var NL=Hb.createClipPath,PL=["itemStyle"],RL=["emphasis","itemStyle"],zL=["color","color0","borderColor","borderColor0"];bg.extend({type:"candlestick",render:function(e,t,n){this.group.removeClipPath(),this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},incrementalPrepareRender:function(e,t,n){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,n,i){this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},_updateDrawMode:function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(e){var t=e.getData(),n=this._data,i=this.group,a=t.getLayout("isSimpleBox"),r=e.get("clip",!0),o=e.coordinateSystem,s=o.getArea&&o.getArea();this._data||i.removeAll(),t.diff(n).add((function(n){if(t.hasValue(n)){var o,l=t.getItemLayout(n);if(r&&HL(s,l))return;o=VL(l,n,!0),Jc.initProps(o,{shape:{points:l.ends}},e,n),YL(o,t,n,a),i.add(o),t.setItemGraphicEl(n,o)}})).update((function(o,l){var u=n.getItemGraphicEl(l);if(t.hasValue(o)){var c=t.getItemLayout(o);r&&HL(s,c)?i.remove(u):(u?Jc.updateProps(u,{shape:{points:c.ends}},e,o):u=VL(c),YL(u,t,o,a),i.add(u),t.setItemGraphicEl(o,u))}else i.remove(u)})).remove((function(e){var t=n.getItemGraphicEl(e);t&&i.remove(t)})).execute(),this._data=t},_renderLarge:function(e){this._clear(),WL(e,this.group);var t=e.get("clip",!0)?NL(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},_incrementalRenderNormal:function(e,t){for(var n,i=t.getData(),a=i.getLayout("isSimpleBox");null!=(n=e.next());){var r;YL(r=VL(i.getItemLayout(n)),i,n,a),r.incremental=!0,this.group.add(r)}},_incrementalRenderLarge:function(e,t){WL(t,this.group,!0)},remove:function(e){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:Fe.noop});var BL=xl.extend({type:"normalCandlestickBox",shape:{},buildPath:function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))}});function VL(e,t,n){var i=e.ends;return new BL({shape:{points:n?FL(i,e):i},z2:100})}function HL(e,t){for(var n=!0,i=0;i<t.ends.length;i++)if(e.contain(t.ends[i][0],t.ends[i][1])){n=!1;break}return n}function YL(e,t,n,i){var a=t.getItemModel(n),r=a.getModel(PL),o=t.getItemVisual(n,"color"),s=t.getItemVisual(n,"borderColor")||o,l=r.getItemStyle(zL);e.useStyle(l),e.style.strokeNoScale=!0,e.style.fill=o,e.style.stroke=s,e.__simpleBox=i;var u=a.getModel(RL).getItemStyle();Jc.setHoverStyle(e,u)}function FL(e,t){return Fe.map(e,(function(e){return(e=e.slice())[1]=t.initBaseline,e}))}var GL=xl.extend({type:"largeCandlestickBox",shape:{},buildPath:function(e,t){for(var n=t.points,i=0;i<n.length;)if(this.__sign===n[i++]){var a=n[i++];e.moveTo(a,n[i++]),e.lineTo(a,n[i++])}else i+=3}});function WL(e,t,n){var i=e.getData(),a=i.getLayout("largePoints"),r=new GL({shape:{points:a},__sign:1});t.add(r);var o=new GL({shape:{points:a},__sign:-1});t.add(o),jL(1,r,e,i),jL(-1,o,e,i),n&&(r.incremental=!0,o.incremental=!0)}function jL(e,t,n,i){var a=e>0?"P":"N",r=i.getVisual("borderColor"+a)||i.getVisual("color"+a),o=n.getModel(PL).getItemStyle(zL);t.useStyle(o),t.style.fill=null,t.style.stroke=r}var UL=function(e){e&&Fe.isArray(e.series)&&Fe.each(e.series,(function(e){Fe.isObject(e)&&"k"===e.type&&(e.type="candlestick")}))},ZL=["itemStyle","borderColor"],XL=["itemStyle","borderColor0"],qL=["itemStyle","color"],KL=["itemStyle","color0"],$L={seriesType:"candlestick",plan:ug(),performRawSeries:!0,reset:function(e,t){if(e.getData().setVisual({legendSymbol:"roundRect",colorP:n(1,e),colorN:n(-1,e),borderColorP:i(1,e),borderColorN:i(-1,e)}),!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){var a;for(;null!=(a=e.next());){var r=t.getItemModel(a),o=t.getItemLayout(a).sign;t.setItemVisual(a,{color:n(o,r),borderColor:i(o,r)})}}};function n(e,t){return t.get(e>0?qL:KL)}function i(e,t){return t.get(e>0?ZL:XL)}}},QL=$L,JL=Jc.subPixelOptimize,eE=Ch.parsePercent,tE=Fe.retrieve2,nE="undefined"!=typeof Float32Array?Float32Array:Array,iE={seriesType:"candlestick",plan:ug(),reset:function(e){var t=e.coordinateSystem,n=e.getData(),i=function(e,t){var n,i=e.getBaseAxis(),a="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/t.count()),r=eE(tE(e.get("barMaxWidth"),a),a),o=eE(tE(e.get("barMinWidth"),1),a),s=e.get("barWidth");return null!=s?eE(s,a):Math.max(Math.min(a/2,r),o)}(e,n),a=["x","y"],r=n.mapDimension(a[0]),o=n.mapDimension(a[1],!0),s=o[0],l=o[1],u=o[2],c=o[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(null==r||o.length<4))return{progress:e.pipelineContext.large?function(e,n){var i,a,o=new nE(4*e.count),h=0,d=[],f=[];for(;null!=(a=e.next());){var p=n.get(r,a),g=n.get(s,a),m=n.get(l,a),v=n.get(u,a),y=n.get(c,a);isNaN(p)||isNaN(v)||isNaN(y)?(o[h++]=NaN,h+=3):(o[h++]=aE(n,a,g,m,l),d[0]=p,d[1]=v,i=t.dataToPoint(d,null,f),o[h++]=i?i[0]:NaN,o[h++]=i?i[1]:NaN,d[1]=y,i=t.dataToPoint(d,null,f),o[h++]=i?i[1]:NaN)}n.setLayout("largePoints",o)}:function(e,n){var a;for(;null!=(a=e.next());){var o=n.get(r,a),h=n.get(s,a),d=n.get(l,a),f=n.get(u,a),p=n.get(c,a),g=Math.min(h,d),m=Math.max(h,d),v=w(g,o),y=w(m,o),_=w(f,o),x=w(p,o),b=[];S(b,y,0),S(b,v,1),b.push(T(x),T(y),T(_),T(v)),n.setItemLayout(a,{sign:aE(n,a,h,d,l),initBaseline:h>d?y[1]:v[1],ends:b,brushRect:M(f,p,o)})}function w(e,n){var i=[];return i[0]=n,i[1]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(i)}function S(e,t,n){var a=t.slice(),r=t.slice();a[0]=JL(a[0]+i/2,1,!1),r[0]=JL(r[0]-i/2,1,!0),n?e.push(a,r):e.push(r,a)}function M(e,t,n){var a=w(e,n),r=w(t,n);return a[0]-=i/2,r[0]-=i/2,{x:a[0],y:a[1],width:i,height:r[1]-a[1]}}function T(e){return e[0]=JL(e[0],1),e}}}}};function aE(e,t,n,i,a){return n>i?-1:n<i?1:t>0?e.get(a,t-1)<=i?1:-1:1}var rE=iE;jx.registerPreprocessor(UL),jx.registerVisual(QL),jx.registerLayout(rE),ag.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(e,t){return hy(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var oE=F_.createSymbol,sE=Jc.Group,lE=Ch.parsePercent;function uE(e,t){var n=t.rippleEffectColor||t.color;e.eachChild((function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?n:null,fill:"fill"===t.brushType?n:null}})}))}function cE(e,t){sE.call(this);var n=new lb(e,t),i=new sE;this.add(n),this.add(i),i.beforeUpdate=function(){this.attr(n.getScale())},this.updateData(e,t)}var hE=cE.prototype;hE.stopEffectAnimation=function(){this.childAt(1).removeAll()},hE.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,i=this.childAt(1),a=0;a<3;a++){var r=oE(t,-1,-1,2,2,n);r.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var o=-a/3*e.period+e.effectOffset;r.animate("",!0).when(e.period,{scale:[e.rippleScale/2,e.rippleScale/2]}).delay(o).start(),r.animateStyle(!0).when(e.period,{opacity:0}).delay(o).start(),i.add(r)}uE(i,e)},hE.updateEffectAnimation=function(e){for(var t=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale"],a=0;a<i.length;a++){var r=i[a];if(t[r]!==e[r])return this.stopEffectAnimation(),void this.startEffectAnimation(e)}uE(n,e)},hE.highlight=function(){this.trigger("emphasis")},hE.downplay=function(){this.trigger("normal")},hE.updateData=function(e,t){var n=e.hostModel;this.childAt(0).updateData(e,t);var i=this.childAt(1),a=e.getItemModel(t),r=e.getItemVisual(t,"symbol"),o=function(e){return Fe.isArray(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),s=e.getItemVisual(t,"color");i.attr("scale",o),i.traverse((function(e){e.attr({fill:s})}));var l=a.getShallow("symbolOffset");if(l){var u=i.position;u[0]=lE(l[0],o[0]),u[1]=lE(l[1],o[1])}var c=e.getItemVisual(t,"symbolRotate");i.rotation=(c||0)*Math.PI/180||0;var h={};if(h.showEffectOn=n.get("showEffectOn"),h.rippleScale=a.get("rippleEffect.scale"),h.brushType=a.get("rippleEffect.brushType"),h.period=1e3*a.get("rippleEffect.period"),h.effectOffset=t/e.count(),h.z=a.getShallow("z")||0,h.zlevel=a.getShallow("zlevel")||0,h.symbolType=r,h.color=s,h.rippleEffectColor=a.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===h.showEffectOn)this._effectCfg?this.updateEffectAnimation(h):this.startEffectAnimation(h),this._effectCfg=h;else{this._effectCfg=null,this.stopEffectAnimation();var d=this.childAt(0),f=function(){d.highlight(),"render"!==h.showEffectOn&&this.startEffectAnimation(h)},p=function(){d.downplay(),"render"!==h.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",f,this).on("mouseout",p,this).on("emphasis",f,this).on("normal",p,this)}this._effectCfg=h},hE.fadeOut=function(e){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),e&&e()},Fe.inherits(cE,sE);var dE=cE;jx.extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new gb(dE)},render:function(e,t,n){var i=e.getData(),a=this._symbolDraw;a.updateData(i),this.group.add(a.group)},updateTransform:function(e,t,n){var i=e.getData();this.group.dirty();var a=aw().reset(e);a.progress&&a.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_updateGroupTransform:function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=sn.clone(t.getRoamTransform()),this.group.decomposeTransform())},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(t)},dispose:function(){}}),jx.registerVisual(tw("effectScatter","circle")),jx.registerLayout(aw("effectScatter"));var fE=Fe.concatArray,pE=Fe.mergeAll,gE=Fe.map,mE=Fh.encodeHTML,vE="undefined"==typeof Uint32Array?Array:Uint32Array,yE="undefined"==typeof Float64Array?Array:Float64Array;function _E(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=gE(t,(function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),pE([t,e[0],e[1]])})))}var xE=ag.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(e){e.data=e.data||[],_E(e);var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count)),xE.superApply(this,"init",arguments)},mergeOption:function(e){if(e.data=e.data||[],_E(e),e.data){var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count))}xE.superApply(this,"mergeOption",arguments)},appendData:function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=fE(this._flatCoords,t.flatCoords),this._flatCoordsOffset=fE(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},_getCoordsFromItemModel:function(e){var t=this.getData().getItemModel(e);return t.option instanceof Array?t.option:t.getShallow("coords")},getLineCoordsCount:function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},getLineCoords:function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*e],i=this._flatCoordsOffset[2*e+1],a=0;a<i;a++)t[a]=t[a]||[],t[a][0]=this._flatCoords[n+2*a],t[a][1]=this._flatCoords[n+2*a+1];return i}var r=this._getCoordsFromItemModel(e);for(a=0;a<r.length;a++)t[a]=t[a]||[],t[a][0]=r[a][0],t[a][1]=r[a][1];return r.length},_processFlatCoordsArray:function(e){var t=0;if(this._flatCoords&&(t=this._flatCoords.length),"number"==typeof e[0]){for(var n=e.length,i=new vE(n),a=new yE(n),r=0,o=0,s=0,l=0;l<n;){s++;var u=e[l++];i[o++]=r+t,i[o++]=u;for(var c=0;c<u;c++){var h=e[l++],d=e[l++];a[r++]=h,a[r++]=d}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,o),flatCoords:a,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}},getInitialData:function(e,t){var n=new Lv(["value"],this);return n.hasItemOption=!1,n.initData(e.data,[],(function(e,t,i,a){if(e instanceof Array)return NaN;n.hasItemOption=!0;var r=e.value;return null!=r?r instanceof Array?r[a]:r:void 0})),n},formatTooltip:function(e){var t=this.getData().getItemModel(e),n=t.get("name");if(n)return n;var i=t.get("fromName"),a=t.get("toName"),r=[];return null!=i&&r.push(i),null!=a&&r.push(a),mE(r.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},getProgressiveThreshold:function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),bE=F_.createSymbol;function wE(e,t,n){Jc.Group.call(this),this.add(this.createLine(e,t,n)),this._updateEffectSymbol(e,t)}var SE=wE.prototype;SE.createLine=function(e,t,n){return new iC(e,t,n)},SE._updateEffectSymbol=function(e,t){var n=e.getItemModel(t).getModel("effect"),i=n.get("symbolSize"),a=n.get("symbol");Fe.isArray(i)||(i=[i,i]);var r=n.get("color")||e.getItemVisual(t,"color"),o=this.childAt(1);this._symbolType!==a&&(this.remove(o),(o=bE(a,-.5,-.5,1,1,r)).z2=100,o.culling=!0,this.add(o)),o&&(o.setStyle("shadowColor",r),o.setStyle(n.getItemStyle(["color"])),o.attr("scale",i),o.setColor(r),o.attr("scale",i),this._symbolType=a,this._symbolScale=i,this._updateEffectAnimation(e,n,t))},SE._updateEffectAnimation=function(e,t,n){var i=this.childAt(1);if(i){var a=this,r=e.getItemLayout(n),o=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantSpeed"),u=Fe.retrieve(t.get("delay"),(function(t){return t/e.count()*o/3})),c="function"==typeof u;if(i.ignore=!0,this.updateAnimationPoints(i,r),l>0&&(o=this.getLineLength(i)/l*1e3),o!==this._period||s!==this._loop){i.stopAnimation();var h=u;c&&(h=u(n)),i.__t>0&&(h=-o*i.__t),i.__t=0;var d=i.animate("",s).when(o,{__t:1}).delay(h).during((function(){a.updateSymbolPosition(i)}));s||d.done((function(){a.remove(i)})),d.start()}this._period=o,this._loop=s}},SE.getLineLength=function(e){return ht.dist(e.__p1,e.__cp1)+ht.dist(e.__cp1,e.__p2)},SE.updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},SE.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},SE.updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,i=e.__cp1,a=e.__t,r=e.position,o=[r[0],r[1]],s=ys.quadraticAt,l=ys.quadraticDerivativeAt;r[0]=s(t[0],i[0],n[0],a),r[1]=s(t[1],i[1],n[1],a);var u=l(t[0],i[0],n[0],a),c=l(t[1],i[1],n[1],a);if(e.rotation=-Math.atan2(c,u)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==e.__lastT&&e.__lastT<e.__t){var h=1.05*ht.dist(o,r);e.attr("scale",[e.scale[0],h]),1===a&&(r[0]=o[0]+(r[0]-o[0])/2,r[1]=o[1]+(r[1]-o[1])/2)}else if(1===e.__lastT){h=2*ht.dist(t,r);e.attr("scale",[e.scale[0],h])}else e.attr("scale",this._symbolScale);e.__lastT=e.__t,e.ignore=!1},SE.updateLayout=function(e,t){this.childAt(0).updateLayout(e,t);var n=e.getItemModel(t).getModel("effect");this._updateEffectAnimation(e,n,t)},Fe.inherits(wE,Jc.Group);var ME=wE;function TE(e,t,n){Jc.Group.call(this),this._createPolyline(e,t,n)}var IE=TE.prototype;IE._createPolyline=function(e,t,n){var i=e.getItemLayout(t),a=new Jc.Polyline({shape:{points:i}});this.add(a),this._updateCommonStl(e,t,n)},IE.updateData=function(e,t,n){var i=e.hostModel,a=this.childAt(0),r={shape:{points:e.getItemLayout(t)}};Jc.updateProps(a,r,i,t),this._updateCommonStl(e,t,n)},IE._updateCommonStl=function(e,t,n){var i=this.childAt(0),a=e.getItemModel(t),r=e.getItemVisual(t,"color"),o=n&&n.lineStyle,s=n&&n.hoverLineStyle;n&&!e.hasItemOption||(o=a.getModel("lineStyle").getLineStyle(),s=a.getModel("emphasis.lineStyle").getLineStyle()),i.useStyle(Fe.defaults({strokeNoScale:!0,fill:"none",stroke:r},o)),i.hoverStyle=s,Jc.setHoverStyle(this)},IE.updateLayout=function(e,t){this.childAt(0).setShape("points",e.getItemLayout(t))},Fe.inherits(TE,Jc.Group);var AE=TE;function DE(e,t,n){ME.call(this,e,t,n),this._lastFrame=0,this._lastFramePercent=0}var CE=DE.prototype;CE.createLine=function(e,t,n){return new AE(e,t,n)},CE.updateAnimationPoints=function(e,t){this._points=t;for(var n=[0],i=0,a=1;a<t.length;a++){var r=t[a-1],o=t[a];i+=ht.dist(r,o),n.push(i)}if(0!==i){for(a=0;a<n.length;a++)n[a]/=i;this._offsets=n,this._length=i}},CE.getLineLength=function(e){return this._length},CE.updateSymbolPosition=function(e){var t=e.__t,n=this._points,i=this._offsets,a=n.length;if(i){var r=this._lastFrame;if(t<this._lastFramePercent){for(o=Math.min(r+1,a-1);o>=0&&!(i[o]<=t);o--);o=Math.min(o,a-2)}else{for(var o=r;o<a&&!(i[o]>t);o++);o=Math.min(o-1,a-2)}ht.lerp(e.position,n[o],n[o+1],(t-i[o])/(i[o+1]-i[o]));var s=n[o+1][0]-n[o][0],l=n[o+1][1]-n[o][1];e.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},Fe.inherits(DE,ME);var OE=DE,kE=Jc.extendShape({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(e,t){var n=t.segs,i=t.curveness;if(t.polyline)for(var a=0;a<n.length;){var r=n[a++];if(r>0){e.moveTo(n[a++],n[a++]);for(var o=1;o<r;o++)e.lineTo(n[a++],n[a++])}}else for(a=0;a<n.length;){var s=n[a++],l=n[a++],u=n[a++],c=n[a++];if(e.moveTo(s,l),i>0){var h=(s+u)/2-(l-c)*i,d=(l+c)/2-(u-s)*i;e.quadraticCurveTo(h,d,u,c)}else e.lineTo(u,c)}},findDataIndex:function(e,t){var n=this.shape,i=n.segs,a=n.curveness;if(n.polyline)for(var r=0,o=0;o<i.length;){var s=i[o++];if(s>0)for(var l=i[o++],u=i[o++],c=1;c<s;c++){var h=i[o++],d=i[o++];if(Ks.containStroke(l,u,h,d))return r}r++}else for(r=0,o=0;o<i.length;){l=i[o++],u=i[o++],h=i[o++],d=i[o++];if(a>0){var f=(l+h)/2-(u-d)*a,p=(u+d)/2-(h-l)*a;if(Js.containStroke(l,u,f,p,h,d))return r}else if(Ks.containStroke(l,u,h,d))return r;r++}return-1}});function LE(){this.group=new Jc.Group}var EE=LE.prototype;EE.isPersistent=function(){return!this._incremental},EE.updateData=function(e){this.group.removeAll();var t=new kE({rectHover:!0,cursor:"default"});t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e),this.group.add(t),this._incremental=null},EE.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),e.count()>5e5?(this._incremental||(this._incremental=new Fu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},EE.incrementalUpdate=function(e,t){var n=new kE;n.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(n,t,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=e.start,this.group.add(n))},EE.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},EE._setCommon=function(e,t,n){var i=t.hostModel;e.setShape({polyline:i.get("polyline"),curveness:i.get("lineStyle.curveness")}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var a=t.getVisual("color");a&&e.setStyle("stroke",a),e.setStyle("fill"),n||(e.seriesIndex=i.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var n=e.findDataIndex(t.offsetX,t.offsetY);n>0&&(e.dataIndex=n+e.__startIndex)})))},EE._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var NE=LE,PE={seriesType:"lines",plan:ug(),reset:function(e){var t=e.coordinateSystem,n=e.get("polyline"),i=e.pipelineContext.large;return{progress:function(a,r){var o=[];if(i){var s,l=a.end-a.start;if(n){for(var u=0,c=a.start;c<a.end;c++)u+=e.getLineCoordsCount(c);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);var h=0,d=[];for(c=a.start;c<a.end;c++){var f=e.getLineCoords(c,o);n&&(s[h++]=f);for(var p=0;p<f;p++)d=t.dataToPoint(o[p],!1,d),s[h++]=d[0],s[h++]=d[1]}r.setLayout("linesPoints",s)}else for(c=a.start;c<a.end;c++){var g=r.getItemModel(c),m=(f=e.getLineCoords(c,o),[]);if(n)for(var v=0;v<f;v++)m.push(t.dataToPoint(o[v]));else{m[0]=t.dataToPoint(o[0]),m[1]=t.dataToPoint(o[1]);var y=g.get("lineStyle.curveness");+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}r.setItemLayout(c,m)}}}}},RE=PE,zE=Hb.createClipPath;function BE(e){return e instanceof Array||(e=[e,e]),e}jx.extendChartView({type:"lines",init:function(){},render:function(e,t,n){var i=e.getData(),a=this._updateLineDraw(i,e),r=e.get("zlevel"),o=e.get("effect.trailLength"),s=n.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(r).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&o&&(l||s.configLayer(r,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})),a.updateData(i);var u=e.get("clip",!0)&&zE(e.coordinateSystem,!1,e);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=r,this._finished=!0},incrementalPrepareRender:function(e,t,n){var i=e.getData();this._updateLineDraw(i,e).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},incrementalRender:function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,n){var i=e.getData(),a=e.pipelineContext;if(!this._finished||a.large||a.progressiveRender)return{update:!0};var r=RE.reset(e);r.progress&&r.progress({start:0,end:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},_updateLineDraw:function(e,t){var n=this._lineDraw,i=this._showEffect(t),a=!!t.get("polyline"),r=t.pipelineContext.large;return n&&i===this._hasEffet&&a===this._isPolyline&&r===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=r?new NE:new uC(a?i?OE:AE:i?ME:iC),this._hasEffet=i,this._isPolyline=a,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},_showEffect:function(e){return!!e.get("effect.show")},_clearLayer:function(e){var t=e.getZr();"svg"===t.painter.getType()||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},dispose:function(){}});var VE="lineStyle.opacity".split("."),HE={seriesType:"lines",reset:function(e,t,n){var i=BE(e.get("symbol")),a=BE(e.get("symbolSize")),r=e.getData();return r.setVisual("fromSymbol",i&&i[0]),r.setVisual("toSymbol",i&&i[1]),r.setVisual("fromSymbolSize",a&&a[0]),r.setVisual("toSymbolSize",a&&a[1]),r.setVisual("opacity",e.get(VE)),{dataEach:r.hasItemOption?function(e,t){var n=e.getItemModel(t),i=BE(n.getShallow("symbol",!0)),a=BE(n.getShallow("symbolSize",!0)),r=n.get(VE);i[0]&&e.setItemVisual(t,"fromSymbol",i[0]),i[1]&&e.setItemVisual(t,"toSymbol",i[1]),a[0]&&e.setItemVisual(t,"fromSymbolSize",a[0]),a[1]&&e.setItemVisual(t,"toSymbolSize",a[1]),e.setItemVisual(t,"opacity",r)}:null}}};jx.registerLayout(RE),jx.registerVisual(HE),ag.extend({type:"series.heatmap",getInitialData:function(e,t){return hy(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var e=Tf.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});function YE(){var e=Fe.createCanvas();this.canvas=e,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}YE.prototype={update:function(e,t,n,i,a,r){var o=this._getBrush(),s=this._getGradient(e,a,"inRange"),l=this._getGradient(e,a,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),d=e.length;c.width=t,c.height=n;for(var f=0;f<d;++f){var p=e[f],g=p[0],m=p[1],v=i(p[2]);h.globalAlpha=v,h.drawImage(o,g-u,m-u)}if(!c.width||!c.height)return c;for(var y=h.getImageData(0,0,c.width,c.height),_=y.data,x=0,b=_.length,w=this.minOpacity,S=this.maxOpacity-w;x<b;){v=_[x+3]/256;var M=4*Math.floor(255*v);if(v>0){var T=r(v)?s:l;v>0&&(v=v*S+w),_[x++]=T[M],_[x++]=T[M+1],_[x++]=T[M+2],_[x++]=T[M+3]*v*256}else x+=4}return h.putImageData(y,0,0),c},_getBrush:function(){var e=this._brushCanvas||(this._brushCanvas=Fe.createCanvas()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),e},_getGradient:function(e,t,n){for(var i=this._gradientPixels,a=i[n]||(i[n]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,s=0;s<256;s++)t[n](s/255,!0,r),a[o++]=r[0],a[o++]=r[1],a[o++]=r[2],a[o++]=r[3];return a}};var FE=YE;jx.extendChartView({type:"heatmap",render:function(e,t,n){var i;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(n){n===e&&(i=t)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var a=e.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):function(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}(a)&&this._renderOnGeo(a,e,i,n)},incrementalPrepareRender:function(e,t,n){this.group.removeAll()},incrementalRender:function(e,t,n,i){t.coordinateSystem&&this._renderOnCartesianAndCalendar(t,i,e.start,e.end,!0)},_renderOnCartesianAndCalendar:function(e,t,n,i,a){var r,o,s=e.coordinateSystem;if("cartesian2d"===s.type){var l=s.getAxis("x"),u=s.getAxis("y");r=l.getBandWidth(),o=u.getBandWidth()}for(var c=this.group,h=e.getData(),d="itemStyle",f="emphasis.itemStyle",p="label",g="emphasis.label",m=e.getModel(d).getItemStyle(["color"]),v=e.getModel(f).getItemStyle(),y=e.getModel(p),_=e.getModel(g),x=s.type,b="cartesian2d"===x?[h.mapDimension("x"),h.mapDimension("y"),h.mapDimension("value")]:[h.mapDimension("time"),h.mapDimension("value")],w=n;w<i;w++){var S;if("cartesian2d"===x){if(isNaN(h.get(b[2],w)))continue;var M=s.dataToPoint([h.get(b[0],w),h.get(b[1],w)]);S=new Jc.Rect({shape:{x:Math.floor(Math.round(M[0])-r/2),y:Math.floor(Math.round(M[1])-o/2),width:Math.ceil(r),height:Math.ceil(o)},style:{fill:h.getItemVisual(w,"color"),opacity:h.getItemVisual(w,"opacity")}})}else{if(isNaN(h.get(b[1],w)))continue;S=new Jc.Rect({z2:1,shape:s.dataToRect([h.get(b[0],w)]).contentShape,style:{fill:h.getItemVisual(w,"color"),opacity:h.getItemVisual(w,"opacity")}})}var T=h.getItemModel(w);h.hasItemOption&&(m=T.getModel(d).getItemStyle(["color"]),v=T.getModel(f).getItemStyle(),y=T.getModel(p),_=T.getModel(g));var I=e.getRawValue(w),A="-";I&&null!=I[2]&&(A=I[2]),Jc.setLabelStyle(m,v,y,_,{labelFetcher:e,labelDataIndex:w,defaultText:A,isRectText:!0}),S.setStyle(m),Jc.setHoverStyle(S,h.hasItemOption?v:Fe.extend({},v)),S.incremental=a,a&&(S.useHoverLayer=!0),c.add(S),h.setItemGraphicEl(w,S)}},_renderOnGeo:function(e,t,n,i){var a=n.targetVisuals.inRange,r=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new FE;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=e.getViewRect().clone(),u=e.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),h=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),f=Math.min(l.height+l.y,i.getHeight()),p=d-c,g=f-h,m=[o.mapDimension("lng"),o.mapDimension("lat"),o.mapDimension("value")],v=o.mapArray(m,(function(t,n,i){var a=e.dataToPoint([t,n]);return a[0]-=c,a[1]-=h,a.push(i),a})),y=n.getExtent(),_="visualMap.continuous"===n.type?function(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}(y,n.option.range):function(e,t,n){var i=e[1]-e[0],a=(t=Fe.map(t,(function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}}))).length,r=0;return function(e){for(var i=r;i<a;i++)if((o=t[i].interval)[0]<=e&&e<=o[1]){r=i;break}if(i===a)for(i=r-1;i>=0;i--){var o;if((o=t[i].interval)[0]<=e&&e<=o[1]){r=i;break}}return i>=0&&i<a&&n[i]}}(y,n.getPieceList(),n.option.selected);s.update(v,p,g,a.color.getNormalizer(),{inRange:a.color.getColorMapper(),outOfRange:r.color.getColorMapper()},_);var x=new Jc.Image({style:{width:p,height:g,x:c,y:h,image:s.canvas},silent:!0});this.group.add(x)},dispose:function(){}});var GE=LS.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(e){return e.stack=null,GE.superApply(this,"getInitialData",arguments)}}),WE=F_.createSymbol,jE=Ch.parsePercent,UE=Ch.isNumeric,ZE=RS.setLabel,XE=["itemStyle","borderWidth"],qE=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],KE=new Jc.Circle;function $E(e,t,n,i){var a=e.getItemLayout(t),r=n.get("symbolRepeat"),o=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=(n.get("symbolRotate")||0)*Math.PI/180||0,u=n.get("symbolPatternSize")||2,c=n.isAnimationEnabled(),h={dataIndex:t,layout:a,itemModel:n,symbolType:e.getItemVisual(t,"symbol")||"circle",color:e.getItemVisual(t,"color"),symbolClip:o,symbolRepeat:r,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:c?n:null,hoverAnimation:c&&n.get("hoverAnimation"),z2:n.getShallow("z",!0)||0};!function(e,t,n,i,a){var r,o=i.valueDim,s=e.get("symbolBoundingData"),l=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),c=1-+(n[o.wh]<=0);if(Fe.isArray(s)){var h=[QE(l,s[0])-u,QE(l,s[1])-u];h[1]<h[0]&&h.reverse(),r=h[c]}else r=null!=s?QE(l,s)-u:t?i.coordSysExtent[o.index][c]-u:n[o.wh];a.boundingLength=r,t&&(a.repeatCutLength=n[o.wh]);a.pxSign=r>0?1:r<0?-1:0}(n,r,a,i,h),function(e,t,n,i,a,r,o,s,l,u){var c=l.valueDim,h=l.categoryDim,d=Math.abs(n[h.wh]),f=e.getItemVisual(t,"symbolSize");Fe.isArray(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]);f[h.index]=jE(f[h.index],d),f[c.index]=jE(f[c.index],i?d:Math.abs(r)),u.symbolSize=f;var p=u.symbolScale=[f[0]/s,f[1]/s];p[c.index]*=(l.isHorizontal?-1:1)*o}(e,t,a,r,0,h.boundingLength,h.pxSign,u,i,h),function(e,t,n,i,a){var r=e.get(XE)||0;r&&(KE.attr({scale:t.slice(),rotation:n}),KE.updateTransform(),r/=KE.getLineScale(),r*=t[i.valueDim.index]);a.valueLineWidth=r}(n,h.symbolScale,l,i,h);var d=h.symbolSize,f=n.get("symbolOffset");return Fe.isArray(f)&&(f=[jE(f[0],d[0]),jE(f[1],d[1])]),function(e,t,n,i,a,r,o,s,l,u,c,h){var d=c.categoryDim,f=c.valueDim,p=h.pxSign,g=Math.max(t[f.index]+s,0),m=g;if(i){var v=Math.abs(l),y=Fe.retrieve(e.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1)),y=jE(y,t[f.index]);var x=Math.max(g+2*y,0),b=_?0:2*y,w=UE(i),S=w?i:pN((v+b)/x);x=g+2*(y=(v-S*g)/2/(_?S:S-1)),b=_?0:2*y,w||"fixed"===i||(S=u?pN((Math.abs(u)+b)/x):0),m=S*x-b,h.repeatTimes=S,h.symbolMargin=y}var M=p*(m/2),T=h.pathPosition=[];T[d.index]=n[d.wh]/2,T[f.index]="start"===o?M:"end"===o?l-M:l/2,r&&(T[0]+=r[0],T[1]+=r[1]);var I=h.bundlePosition=[];I[d.index]=n[d.xy],I[f.index]=n[f.xy];var A=h.barRectShape=Fe.extend({},n);A[f.wh]=p*Math.max(Math.abs(n[f.wh]),Math.abs(T[f.index]+M)),A[d.wh]=n[d.wh];var D=h.clipShape={};D[d.xy]=-n[d.xy],D[d.wh]=c.ecSize[d.wh],D[f.xy]=0,D[f.wh]=n[f.wh]}(n,d,a,r,0,f,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function QE(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function JE(e){var t=e.symbolPatternSize,n=WE(e.symbolType,-t/2,-t/2,t,t,e.color);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function eN(e,t,n,i){var a=e.__pictorialBundle,r=n.symbolSize,o=n.valueLineWidth,s=n.pathPosition,l=t.valueDim,u=n.repeatTimes||0,c=0,h=r[t.valueDim.index]+o+2*n.symbolMargin;for(hN(e,(function(e){e.__pictorialAnimationIndex=c,e.__pictorialRepeatTimes=u,c<u?dN(e,null,p(c),n,i):dN(e,null,{scale:[0,0]},n,i,(function(){a.remove(e)})),sN(e,n),c++}));c<u;c++){var d=JE(n);d.__pictorialAnimationIndex=c,d.__pictorialRepeatTimes=u,a.add(d);var f=p(c);dN(d,{position:f.position,scale:[0,0]},{scale:f.scale,rotation:f.rotation},n,i),d.on("mouseover",g).on("mouseout",m),sN(d,n)}function p(e){var t=s.slice(),i=n.pxSign,a=e;return("start"===n.symbolRepeatDirection?i>0:i<0)&&(a=u-1-e),t[l.index]=h*(a-u/2+.5)+s[l.index],{position:t,scale:n.symbolScale.slice(),rotation:n.rotation}}function g(){hN(e,(function(e){e.trigger("emphasis")}))}function m(){hN(e,(function(e){e.trigger("normal")}))}}function tN(e,t,n,i){var a=e.__pictorialBundle,r=e.__pictorialMainPath;r?dN(r,null,{position:n.pathPosition.slice(),scale:n.symbolScale.slice(),rotation:n.rotation},n,i):(r=e.__pictorialMainPath=JE(n),a.add(r),dN(r,{position:n.pathPosition.slice(),scale:[0,0],rotation:n.rotation},{scale:n.symbolScale.slice()},n,i),r.on("mouseover",(function(){this.trigger("emphasis")})).on("mouseout",(function(){this.trigger("normal")}))),sN(r,n)}function nN(e,t,n){var i=Fe.extend({},t.barRectShape),a=e.__pictorialBarRect;a?dN(a,null,{shape:i},t,n):(a=e.__pictorialBarRect=new Jc.Rect({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),e.add(a))}function iN(e,t,n,i){if(n.symbolClip){var a=e.__pictorialClipPath,r=Fe.extend({},n.clipShape),o=t.valueDim,s=n.animationModel,l=n.dataIndex;if(a)Jc.updateProps(a,{shape:r},s,l);else{r[o.wh]=0,a=new Jc.Rect({shape:r}),e.__pictorialBundle.setClipPath(a),e.__pictorialClipPath=a;var u={};u[o.wh]=n.clipShape[o.wh],Jc[i?"updateProps":"initProps"](a,{shape:u},s,l)}}}function aN(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=rN,n.isAnimationEnabled=oN,n}function rN(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function oN(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function sN(e,t){e.off("emphasis").off("normal");var n=t.symbolScale.slice();t.hoverAnimation&&e.on("emphasis",(function(){this.animateTo({scale:[1.1*n[0],1.1*n[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:n.slice()},400,"elasticOut")}))}function lN(e,t,n,i){var a=new Jc.Group,r=new Jc.Group;return a.add(r),a.__pictorialBundle=r,r.attr("position",n.bundlePosition.slice()),n.symbolRepeat?eN(a,t,n):tN(a,0,n),nN(a,n,i),iN(a,t,n,i),a.__pictorialShapeStr=cN(e,n),a.__pictorialSymbolMeta=n,a}function uN(e,t,n,i){var a=i.__pictorialBarRect;a&&(a.style.text=null);var r=[];hN(i,(function(e){r.push(e)})),i.__pictorialMainPath&&r.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),Fe.each(r,(function(e){Jc.updateProps(e,{scale:[0,0]},n,t,(function(){i.parent&&i.parent.remove(i)}))})),e.setItemGraphicEl(t,null)}function cN(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function hN(e,t,n){Fe.each(e.__pictorialBundle.children(),(function(i){i!==e.__pictorialBarRect&&t.call(n,i)}))}function dN(e,t,n,i,a,r){t&&e.attr(t),i.symbolClip&&!a?n&&e.attr(n):n&&Jc[a?"updateProps":"initProps"](e,n,i.animationModel,i.dataIndex,r)}function fN(e,t,n){var i=n.color,a=n.dataIndex,r=n.itemModel,o=r.getModel("itemStyle").getItemStyle(["color"]),s=r.getModel("emphasis.itemStyle").getItemStyle(),l=r.getShallow("cursor");hN(e,(function(e){e.setColor(i),e.setStyle(Fe.defaults({fill:i,opacity:n.opacity},o)),Jc.setHoverStyle(e,s),l&&(e.cursor=l),e.z2=n.z2}));var u={},c=t.valueDim.posDesc[+(n.boundingLength>0)],h=e.__pictorialBarRect;ZE(h.style,u,r,i,t.seriesModel,a,c),Jc.setHoverStyle(h,u)}function pN(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}jx.extendChartView({type:"pictorialBar",render:function(e,t,n){var i=this.group,a=e.getData(),r=this._data,o=e.coordinateSystem,s=!!o.getBaseAxis().isHorizontal(),l=o.grid.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:o,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:qE[+s],categoryDim:qE[1-s]};return a.diff(r).add((function(e){if(a.hasValue(e)){var t=aN(a,e),n=$E(a,e,t,u),r=lN(a,u,n);a.setItemGraphicEl(e,r),i.add(r),fN(r,u,n)}})).update((function(e,t){var n=r.getItemGraphicEl(t);if(a.hasValue(e)){var o=aN(a,e),s=$E(a,e,o,u),l=cN(a,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),a.setItemGraphicEl(e,null),n=null),n?function(e,t,n){var i=n.animationModel,a=n.dataIndex,r=e.__pictorialBundle;Jc.updateProps(r,{position:n.bundlePosition.slice()},i,a),n.symbolRepeat?eN(e,t,n,!0):tN(e,t,n,!0);nN(e,n,!0),iN(e,t,n,!0)}(n,u,s):n=lN(a,u,s,!0),a.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=s,i.add(n),fN(n,u,s)}else i.remove(n)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&uN(r,e,t.__pictorialSymbolMeta.animationModel,t)})).execute(),this._data=a,this.group},dispose:Fe.noop,remove:function(e,t){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl((function(t){uN(i,t.dataIndex,e,t)})):n.removeAll()}});var gN=qy.layout;jx.registerLayout(Fe.curry(gN,"pictorialBar")),jx.registerVisual(tw("pictorialBar","roundRect"));var mN=function(e,t,n,i,a){Ax.call(this,e,t,n),this.type=i||"value",this.position=a||"bottom",this.orient=null};mN.prototype={constructor:mN,model:null,isHorizontal:function(){var e=this.position;return"top"===e||"bottom"===e},pointToData:function(e,t){return this.coordinateSystem.pointToData(e,t)[0]},toGlobalCoord:null,toLocalCoord:null},Fe.inherits(mN,Ax);var vN=mN,yN=td.getLayoutRect,_N=Fe.each;function xN(e,t,n){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(e,t,n),this.model=e}xN.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:xN,_init:function(e,t,n){var i=this.dimension,a=new vN(i,D_.createScaleByModel(e),[0,0],e.get("type"),e.get("position")),r="category"===a.type;a.onBand=r&&e.get("boundaryGap"),a.inverse=e.get("inverse"),a.orient=e.get("orient"),e.axis=a,a.model=e,a.coordinateSystem=this,this._axis=a},update:function(e,t){e.eachSeries((function(e){if(e.coordinateSystem===this){var t=e.getData();_N(t.mapDimension(this.dimension,!0),(function(e){this._axis.scale.unionExtentFromData(t,e)}),this),D_.niceScaleExtent(this._axis.scale,this._axis.model)}}),this)},resize:function(e,t){this._rect=yN({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),i=n?[0,e.width]:[0,e.height],a=t.reverse?1:0;t.setExtent(i[a],i[1-a]),this._updateAxisTransform(t,n?e.x:e.y)},_updateAxisTransform:function(e,t){var n=e.getExtent(),i=n[0]+n[1],a=e.isHorizontal();e.toGlobalCoord=a?function(e){return e+t}:function(e){return i-e+t},e.toLocalCoord=a?function(e){return e-t}:function(e){return i-e+t}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(e){var t=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},pointToData:function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},dataToPoint:function(e){var t=this.getAxis(),n=this.getRect(),i=[],a="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),i[a]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-a]=0===a?n.y+n.height/2:n.x+n.width/2,i}};var bN=xN;Tf.register("single",{create:function(e,t){var n=[];return e.eachComponent("singleAxis",(function(i,a){var r=new bN(i,e,t);r.name="single_"+a,r.resize(i,t),i.coordinateSystem=r,n.push(r)})),e.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var n=e.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0];t.coordinateSystem=n&&n.coordinateSystem}})),n},dimensions:bN.prototype.dimensions});var wN=function(e,t){t=t||{};var n=e.coordinateSystem,i=e.axis,a={},r=i.position,o=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=["vertical"===o?u.vertical[r]:l[0],"horizontal"===o?u.horizontal[r]:l[3]],a.rotation=Math.PI/2*{horizontal:0,vertical:1}[o],a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),Fe.retrieve(t.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var c=t.rotate;return null==c&&(c=e.get("axisLabel.rotate")),a.labelRotation="top"===r?-c:c,a.z2=1,a},SN={layout:wN},MN=IS.rectCoordAxisBuildSplitArea,TN=IS.rectCoordAxisHandleRemove,IN=["axisLine","axisTickLabel","axisName"],AN=["splitArea","splitLine"],DN=wS.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(e,t,n,i){var a=this.group;a.removeAll();var r=this._axisGroup;this._axisGroup=new Jc.Group;var o=SN.layout(e),s=new lS(e,o);Fe.each(IN,s.add,s),a.add(this._axisGroup),a.add(s.getGroup()),Fe.each(AN,(function(t){e.get(t+".show")&&this["_"+t](e)}),this),Jc.groupTransition(r,this._axisGroup,e),DN.superCall(this,"render",e,t,n,i)},remove:function(){TN(this)},_splitLine:function(e){var t=e.axis;if(!t.scale.isBlank()){var n=e.getModel("splitLine"),i=n.getModel("lineStyle"),a=i.get("width"),r=i.get("color");r=r instanceof Array?r:[r];for(var o=e.coordinateSystem.getRect(),s=t.isHorizontal(),l=[],u=0,c=t.getTicksCoords({tickModel:n}),h=[],d=[],f=0;f<c.length;++f){var p=t.toGlobalCoord(c[f].coord);s?(h[0]=p,h[1]=o.y,d[0]=p,d[1]=o.y+o.height):(h[0]=o.x,h[1]=p,d[0]=o.x+o.width,d[1]=p);var g=u++%r.length;l[g]=l[g]||[],l[g].push(new Jc.Line({subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:d[0],y2:d[1]},style:{lineWidth:a},silent:!0}))}for(f=0;f<l.length;++f)this.group.add(Jc.mergePath(l[f],{style:{stroke:r[f%r.length],lineDash:i.getLineDash(a),lineWidth:a},silent:!0}))}},_splitArea:function(e){MN(this,this._axisGroup,e,e)}}),CN=sd.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});Fe.merge(CN.prototype,O_),bw("single",CN,(function(e,t){return t.type||(t.data?"category":"value")}),{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});var ON=function(e,t){var n,i=[],a=e.seriesIndex;if(null==a||!(n=t.getSeriesByIndex(a)))return{point:[]};var r=n.getData(),o=Po.queryDataIndex(r,e);if(null==o||o<0||Fe.isArray(o))return{point:[]};var s=r.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(r.getValues(Fe.map(l.dimensions,(function(e){return r.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}},kN=Po.makeInner,LN=Fe.each,EN=Fe.curry,NN=kN();function PN(e,t,n,i,a){var r=e.axis;if(!r.scale.isBlank()&&r.containData(t))if(e.involveSeries){var o=function(e,t){var n=t.axis,i=n.dim,a=e,r=[],o=Number.MAX_VALUE,s=-1;return LN(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,a=u,r.length=0),LN(c,(function(e){r.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:r,snapToValue:a}}(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&null==a.seriesIndex&&Fe.extend(a,s[0]),!i&&e.snap&&r.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s,a),n.showTooltip(e,o,l)}else n.showPointer(e,t)}function RN(e,t,n,i){e[t.key]={value:n,payloadBatch:i}}function zN(e,t,n,i){var a=n.payloadBatch,r=t.axis,o=r.model,s=t.axisPointerModel;if(t.triggerTooltip&&a.length){var l=t.coordSys.model,u=vS.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:r.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:a.slice()})}}function BN(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 VN(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}var HN=function(e,t,n){var i=e.currTrigger,a=[e.x,e.y],r=e,o=e.dispatchAction||Fe.bind(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){VN(a)&&(a=ON({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},t).point);var l=VN(a),u=r.axesInfo,c=s.axesInfo,h="leave"===i||VN(a),d={},f={},p={list:[],map:{}},g={showPointer:EN(RN,f),showTooltip:EN(zN,p)};LN(s.coordSysMap,(function(e,t){var n=l||e.containPoint(a);LN(s.coordSysAxesInfo[t],(function(e,t){var i=e.axis,r=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||r)){var o=r&&r.value;null!=o||l||(o=i.pointToData(a)),null!=o&&PN(e,o,g,!1,d)}}))}));var m={};return LN(c,(function(e,t){var n=e.linkGroup;n&&!f[t]&&LN(n.axesInfo,(function(t,i){var a=f[i];if(t!==e&&a){var r=a.value;n.mapper&&(r=e.axis.scale.parse(n.mapper(r,BN(t),BN(e)))),m[e.key]=r}}))})),LN(m,(function(e,t){PN(c[t],e,g,!0,d)})),function(e,t,n){var i=n.axesInfo=[];LN(t,(function(t,n){var a=t.axisPointerModel.option,r=e[n];r?(!t.useHandle&&(a.status="show"),a.value=r.value,a.seriesDataIndices=(r.payloadBatch||[]).slice()):!t.useHandle&&(a.status="hide"),"show"===a.status&&i.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:a.value})}))}(f,c,d),function(e,t,n,i){if(VN(t)||!e.list.length)return void i({type:"hideTip"});var a=((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:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:e.list})}(p,a,e,o),function(e,t,n){var i=n.getZr(),a="axisPointerLastHighlights",r=NN(i)[a]||{},o=NN(i)[a]={};LN(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&LN(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;o[t]=e}))}));var s=[],l=[];Fe.each(r,(function(e,t){!o[t]&&l.push(e)})),Fe.each(o,(function(e,t){!r[t]&&s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(c,0,n),d}};jx.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}}});var YN=(0,Po.makeInner)(),FN=Fe.each;function GN(e,t,n){e.handler("leave",null,n)}function WN(e,t,n,i){t.handler(e,n,i)}var jN=function(e,t,n){if(!re.node){var i=t.getZr();YN(i).records||(YN(i).records={}),function(e,t){if(YN(e).initialized)return;function n(n,i){e.on(n,(function(n){var a=function(e){var t={showTip:[],hideTip:[]},n=function(i){var a=t[i.type];a?a.push(i):(i.dispatchAction=n,e.dispatchAction(i))};return{dispatchAction:n,pendings:t}}(t);FN(YN(e).records,(function(e){e&&i(e,n,a.dispatchAction)})),function(e,t){var n,i=e.showTip.length,a=e.hideTip.length;i?n=e.showTip[i-1]:a&&(n=e.hideTip[a-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(a.pendings,t)}))}YN(e).initialized=!0,n("click",Fe.curry(WN,"click")),n("mousemove",Fe.curry(WN,"mousemove")),n("globalout",GN)}(i,t),(YN(i).records[e]||(YN(i).records[e]={})).handler=n}},UN={register:jN,unregister:function(e,t){if(!re.node){var n=t.getZr();(YN(n).records||{})[e]&&(YN(n).records[e]=null)}}},ZN=jx.extendComponentView({type:"axisPointer",render:function(e,t,n){var i=t.getComponent("tooltip"),a=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";UN.register("axisPointer",n,(function(e,t,n){"none"!==a&&("leave"===e||a.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},remove:function(e,t){UN.unregister(t.getZr(),"axisPointer"),ZN.superApply(this._model,"remove",arguments)},dispose:function(e,t){UN.unregister("axisPointer",t),ZN.superApply(this._model,"dispose",arguments)}}),XN=(0,Po.makeInner)(),qN=Fe.clone,KN=Fe.bind;function $N(){}function QN(e,t,n,i){JN(XN(n).lastProp,i)||(XN(n).lastProp=i,t?Jc.updateProps(n,i,e):(n.stopAnimation(),n.attr(i)))}function JN(e,t){if(Fe.isObject(e)&&Fe.isObject(t)){var n=!0;return Fe.each(t,(function(t,i){n=n&&JN(e[i],t)})),!!n}return e===t}function eP(e,t){e[t.get("label.show")?"show":"hide"]()}function tP(e){return{position:e.position.slice(),rotation:e.rotation||0}}function nP(e,t,n){var i=t.get("z"),a=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=i&&(e.z=i),null!=a&&(e.zlevel=a),e.silent=n)}))}$N.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(e,t,n,i){var a=t.get("value"),r=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,i||this._lastValue!==a||this._lastStatus!==r){this._lastValue=a,this._lastStatus=r;var o=this._group,s=this._handle;if(!r||"hide"===r)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,a,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=Fe.curry(QN,t,c);this.updatePointerEl(o,l,h,t),this.updateLabelEl(o,l,h,t)}else o=this._group=new Jc.Group,this.createPointerEl(o,l,e,t),this.createLabelEl(o,l,e,t),n.getZr().add(o);nP(o,t,!0),this._renderHandle(a)}},remove:function(e){this.clear(e)},dispose:function(e){this.clear(e)},determineAnimation:function(e,t){var n=t.get("animation"),i=e.axis,a="category"===i.type,r=t.get("snap");if(!r&&!a)return!1;if("auto"===n||null==n){var o=this.animationThreshold;if(a&&i.getBandWidth()>o)return!0;if(r){var s=vS.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,a){},createPointerEl:function(e,t,n,i){var a=t.pointer;if(a){var r=XN(e).pointerEl=new Jc[a.type](qN(t.pointer));e.add(r)}},createLabelEl:function(e,t,n,i){if(t.label){var a=XN(e).labelEl=new Jc.Rect(qN(t.label));e.add(a),eP(a,i)}},updatePointerEl:function(e,t,n){var i=XN(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},updateLabelEl:function(e,t,n,i){var a=XN(e).labelEl;a&&(a.setStyle(t.label.style),n(a,{shape:t.label.shape,position:t.label.position}),eP(a,i))},_renderHandle:function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,i=this._api.getZr(),a=this._handle,r=n.getModel("handle"),o=n.get("status");if(!r.get("show")||!o||"hide"===o)return a&&i.remove(a),void(this._handle=null);this._handle||(t=!0,a=this._handle=Jc.createIcon(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Bt.stop(e.event)},onmousedown:KN(this._onHandleDragMove,this,0,0),drift:KN(this._onHandleDragMove,this),ondragend:KN(this._onHandleDragEnd,this)}),i.add(a)),nP(a,n,!1);a.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=r.get("size");Fe.isArray(s)||(s=[s,s]),a.attr("scale",[s[0]/2,s[1]/2]),Ig.createOrUpdate(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},_moveHandleToValue:function(e,t){QN(this._axisPointerModel,!t&&this._moveAnimation,this._handle,tP(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(tP(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(tP(i)),XN(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]}}},$N.prototype.constructor=$N,Go.enableClassExtend($N);var iP=$N;function aP(e,t,n,i,a){var r=rP(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=Fh.normalizeCssArray(o.get("padding")||0),l=o.getFont(),u=Ga.getBoundingRect(r,l),c=a.position,h=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=a.align;"right"===f&&(c[0]-=h),"center"===f&&(c[0]-=h/2);var p=a.verticalAlign;"bottom"===p&&(c[1]-=d),"middle"===p&&(c[1]-=d/2),function(e,t,n,i){var a=i.getWidth(),r=i.getHeight();e[0]=Math.min(e[0]+t,a)-t,e[1]=Math.min(e[1]+n,r)-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:r,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 rP(e,t,n,i,a){e=t.scale.parse(e);var r=t.scale.getLabel(e,{precision:a.precision}),o=a.formatter;if(o){var s={value:D_.getAxisRawValue(t,e),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};Fe.each(i,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),i=e.dataIndexInside,a=t&&t.getDataParams(i);a&&s.seriesData.push(a)})),Fe.isString(o)?r=o.replace("{value}",r):Fe.isFunction(o)&&(r=o(s))}return r}function oP(e,t,n){var i=sn.create();return sn.rotate(i,i,n.rotation),sn.translate(i,i,n.position),Jc.applyTransform([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}var sP=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},lP={buildElStyle:sP,buildLabelElOption:aP,getValueLabel:rP,getTransformedPosition:oP,buildCartesianSingleLabelElOption:function(e,t,n,i,a,r){var o=lS.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=a.get("label.margin"),aP(t,i,a,r,{position:oP(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,a,r){return{cx:e,cy:t,r0:n,r:i,startAngle:a,endAngle:r,clockwise:!0}}},uP=iP.extend({makeElOption:function(e,t,n,i,a){var r=n.axis,o=r.grid,s=i.get("type"),l=cP(o,r).getOtherAxis(r).getGlobalExtent(),u=r.toGlobalCoord(r.dataToCoord(t,!0));if(s&&"none"!==s){var c=lP.buildElStyle(i),h=hP[s](r,u,l);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=MS.layout(o.model,n);lP.buildCartesianSingleLabelElOption(t,e,d,n,i,a)},getHandleTransform:function(e,t,n){var i=MS.layout(t.axis.grid.model,t,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:lP.getTransformedPosition(t.axis,e,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,n,i){var a=n.axis,r=a.grid,o=a.getGlobalExtent(!0),s=cP(r,a).getOtherAxis(a).getGlobalExtent(),l="x"===a.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 cP(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var hP={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:lP.makeLineShape([t,n[0]],[t,n[1]],dP(e))}},shadow:function(e,t,n){var i=Math.max(1,e.getBandWidth()),a=n[1]-n[0];return{type:"Rect",shape:lP.makeRectShape([t-i/2,n[0]],[i,a],dP(e))}}};function dP(e){return"x"===e.dim?0:1}wS.registerAxisPointerClass("CartesianAxisPointer",uP),jx.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!Fe.isArray(t)&&(e.axisPointer.link=[t])}})),jx.registerProcessor(jx.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=vS.collect(e,t)})),jx.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},HN);var fP=["x","y"],pP=["width","height"],gP=iP.extend({makeElOption:function(e,t,n,i,a){var r=n.axis,o=r.coordinateSystem,s=yP(o,1-vP(r)),l=o.dataToPoint(t)[0],u=i.get("type");if(u&&"none"!==u){var c=lP.buildElStyle(i),h=mP[u](r,l,s);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=SN.layout(n);lP.buildCartesianSingleLabelElOption(t,e,d,n,i,a)},getHandleTransform:function(e,t,n){var i=SN.layout(t,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:lP.getTransformedPosition(t.axis,e,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,n,i){var a=n.axis,r=a.coordinateSystem,o=vP(a),s=yP(r,o),l=e.position;l[o]+=t[o],l[o]=Math.min(s[1],l[o]),l[o]=Math.max(s[0],l[o]);var u=yP(r,1-o),c=(u[1]+u[0])/2,h=[c,c];return h[o]=l[o],{position:l,rotation:e.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}}}),mP={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:lP.makeLineShape([t,n[0]],[t,n[1]],vP(e))}},shadow:function(e,t,n){var i=e.getBandWidth(),a=n[1]-n[0];return{type:"Rect",shape:lP.makeRectShape([t-i/2,n[0]],[i,a],vP(e))}}};function vP(e){return e.isHorizontal()?0:1}function yP(e,t){var n=e.getRect();return[n[fP[t]],n[fP[t]]+n[pP[t]]]}wS.registerAxisPointerClass("SingleAxisPointer",gP),jx.extendComponentView({type:"single"});var _P=av.getDimensionTypeByAxis,xP=Po.groupData,bP=Fh.encodeHTML,wP=ag.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(e){wP.superApply(this,"init",arguments),this.legendVisualProvider=new hM(Fe.bind(this.getData,this),Fe.bind(this.getRawData,this))},fixData:function(e){var t=e.length,n=xP(e,(function(e){return e[2]})),i=[];n.buckets.each((function(e,t){i.push({name:t,dataList:e})}));for(var a=i.length,r=-1,o=-1,s=0;s<a;++s){var l=i[s].dataList.length;l>r&&(r=l,o=s)}for(var u=0;u<a;++u)if(u!==o)for(var c=i[u].name,h=0;h<r;++h){for(var d=i[o].dataList[h][0],f=i[u].dataList.length,p=-1,g=0;g<f;++g){if(i[u].dataList[g][0]===d){p=g;break}}-1===p&&(e[t]=[],e[t][0]=d,e[t][1]=0,e[t][2]=c,t++)}return e},getInitialData:function(e,t){for(var n=t.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),i=Fe.filter(e.data,(function(e){return void 0!==e[2]})),a=this.fixData(i||[]),r=[],o=this.nameMap=Fe.createHashMap(),s=0,l=0;l<a.length;++l)r.push(a[l][2]),o.get(a[l][2])||(o.set(a[l][2],s),s++);var u=Zv(a,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:_P(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),c=new Lv(u,this);return c.initData(a),c},getLayerSeries:function(){for(var e=this.getData(),t=e.count(),n=[],i=0;i<t;++i)n[i]=i;var a=e.mapDimension("single"),r=xP(n,(function(t){return e.get("name",t)})),o=[];return r.buckets.each((function(t,n){t.sort((function(t,n){return e.get(a,t)-e.get(a,n)})),o.push({name:n,indices:t})})),o},getAxisTooltipData:function(e,t,n){Fe.isArray(e)||(e=e?[e]:[]);for(var i,a=this.getData(),r=this.getLayerSeries(),o=[],s=r.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,c=-1,h=r[l].indices.length,d=0;d<h;++d){var f=a.get(e[0],r[l].indices[d]),p=Math.abs(f-t);p<=u&&(i=f,u=p,c=r[l].indices[d])}o.push(c)}return{dataIndices:o,nestestValue:i}},formatTooltip:function(e){var t=this.getData(),n=t.getName(e),i=t.get(t.mapDimension("value"),e);return(isNaN(i)||null==i)&&(i="-"),bP(n+" : "+i)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}}),SP=Rb.Polygon,MP=Fe.bind,TP=Fe.extend;function IP(e,t,n){if(e.count())for(var i,a=t.coordinateSystem,r=t.getLayerSeries(),o=e.mapDimension("single"),s=e.mapDimension("value"),l=Fe.map(r,(function(t){return Fe.map(t.indices,(function(t){var n=a.dataToPoint(e.get(o,t));return n[1]=e.get(s,t),n}))})),u=function(e){for(var t=e.length,n=e[0].length,i=[],a=[],r=0,o={},s=0;s<n;++s){for(var l=0,u=0;l<t;++l)u+=e[l][s][1];u>r&&(r=u),i.push(u)}for(var c=0;c<n;++c)a[c]=(r-i[c])/2;r=0;for(var h=0;h<n;++h){var d=i[h]+a[h];d>r&&(r=d)}return o.y0=a,o.max=r,o}(l),c=u.y0,h=n/u.max,d=r.length,f=r[0].indices.length,p=0;p<f;++p){i=c[p]*h,e.setItemLayout(r[0].indices[p],{layerIndex:0,x:l[0][p][0],y0:i,y:l[0][p][1]*h});for(var g=1;g<d;++g)i+=l[g-1][p][1]*h,e.setItemLayout(r[g].indices[p],{layerIndex:g,x:l[g][p][0],y0:i,y:l[g][p][1]*h})}}jx.extendChartView({type:"themeRiver",init:function(){this._layers=[]},render:function(e,t,n){var i=e.getData(),a=this.group,r=e.getLayerSeries(),o=i.getLayout("layoutInfo"),s=o.rect,l=o.boundaryGap;function u(e){return e.name}a.attr("position",[0,s.y+l[0]]);var c=new Jm(this._layersSeries||[],r,u,u),h={};function d(t,n,o){var s=this._layers;if("remove"!==t){for(var l,u,c,d=[],f=[],p=r[n].indices,g=0;g<p.length;g++){var m=i.getItemLayout(p[g]),v=m.x,y=m.y0,_=m.y;d.push([v,y]),f.push([v,y+_]),l=i.getItemVisual(p[g],"color")}var x=i.getItemLayout(p[0]),b=i.getItemModel(p[g-1]),w=b.getModel("label"),S=w.get("margin");if("add"===t){var M=h[n]=new Jc.Group;u=new SP({shape:{points:d,stackedOnPoints:f,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),c=new Jc.Text({style:{x:x.x-S,y:x.y0+x.y/2}}),M.add(u),M.add(c),a.add(M),u.setClipPath(function(e,t,n){var i=new Jc.Rect({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Jc.initProps(i,{shape:{width:e.width+20,height:e.height+20}},t,n),i}(u.getBoundingRect(),e,(function(){u.removeClipPath()})))}else{M=s[o];u=M.childAt(0),c=M.childAt(1),a.add(M),h[n]=M,Jc.updateProps(u,{shape:{points:d,stackedOnPoints:f}},e),Jc.updateProps(c,{style:{x:x.x-S,y:x.y0+x.y/2}},e)}var T=b.getModel("emphasis.itemStyle"),I=b.getModel("itemStyle");Jc.setTextStyle(c.style,w,{text:w.get("show")?e.getFormattedLabel(p[g-1],"normal")||i.getName(p[g-1]):null,textVerticalAlign:"middle"}),u.setStyle(TP({fill:l},I.getItemStyle(["color"]))),Jc.setHoverStyle(u,T.getItemStyle())}else a.remove(s[n])}c.add(MP(d,this,"add")).update(MP(d,this,"update")).remove(MP(d,this,"remove")).execute(),this._layersSeries=r,this._layers=h},dispose:function(){}});var AP=function(e,t){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),n=e.coordinateSystem,i={},a=n.getRect();i.rect=a;var r=e.get("boundaryGap"),o=n.getAxis();(i.boundaryGap=r,"horizontal"===o.orient)?(r[0]=Ch.parsePercent(r[0],a.height),r[1]=Ch.parsePercent(r[1],a.height),IP(t,e,a.height-r[0]-r[1])):(r[0]=Ch.parsePercent(r[0],a.width),r[1]=Ch.parsePercent(r[1],a.width),IP(t,e,a.width-r[0]-r[1]));t.setLayout("layoutInfo",i)}))},DP=Fe.createHashMap;var CP=function(e){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),n=e.getRawData(),i=e.get("color"),a=DP();t.each((function(e){a.set(t.getRawIndex(e),e)})),n.each((function(r){var o=n.getName(r),s=i[(e.nameMap.get(o)-1)%i.length];n.setItemVisual(r,"color",s);var l=a.get(r);null!=l&&t.setItemVisual(l,"color",s)}))}))};jx.registerLayout(AP),jx.registerVisual(CP),jx.registerProcessor(EM("themeRiver"));var OP=yA.wrapTreePathInfo;function kP(e){var t=0;Fe.each(e.children,(function(e){kP(e);var n=e.value;Fe.isArray(n)&&(n=n[0]),t+=n}));var n=e.value;Fe.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=t),n<0&&(n=0),Fe.isArray(e.value)?e.value[0]=n:e.value=n}ag.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(e,t){var n={name:e.name,children:e.data};kP(n);var i=e.levels||[],a={};return a.levels=i,BI.createTree(n,this,a).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(e){var t=ag.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=OP(n,this),t},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});var LP="none",EP="ancestor",NP="self";function PP(e,t,n){Jc.Group.call(this);var i=new Jc.Sector({z2:2});i.seriesIndex=t.seriesIndex;var a=new Jc.Text({z2:4,silent:e.getModel("label").get("silent")});function r(){a.ignore=a.hoverIgnore}function o(){a.ignore=a.normalIgnore}this.add(i),this.add(a),this.updateData(!0,e,"normal",t,n),this.on("emphasis",r).on("normal",o).on("mouseover",r).on("mouseout",o)}var RP=PP.prototype;RP.updateData=function(e,t,n,i,a){this.node=t,t.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var r=this.childAt(0);r.dataIndex=t.dataIndex;var o=t.getModel(),s=t.getLayout(),l=Fe.extend({},s);l.label=null;var u=function(e,t,n){var i=e.getVisual("color"),a=e.getVisual("visualMeta");a&&0!==a.length||(i=null);var r=e.getModel("itemStyle").get("color");if(r)return r;if(i)return i;if(0===e.depth)return n.option.color[0];var o=n.option.color.length;r=n.option.color[function(e){var t=e;for(;t.depth>1;)t=t.parentNode;var n=e.getAncestors()[0];return Fe.indexOf(n.children,t)}(e)%o];return r}(t,0,a);!function(e,t,n){var i=t.getData();i.setItemVisual(e.dataIndex,"color",n)}(t,i,u);var c,h=o.getModel("itemStyle").getItemStyle();if("normal"===n)c=h;else{var d=o.getModel(n+".itemStyle").getItemStyle();c=Fe.merge(d,h)}c=Fe.defaults({lineJoin:"bevel",fill:c.fill||u},c),e?(r.setShape(l),r.shape.r=s.r0,Jc.updateProps(r,{shape:{r:s.r}},i,t.dataIndex),r.useStyle(c)):"object"==typeof c.fill&&c.fill.type||"object"==typeof r.style.fill&&r.style.fill.type?(Jc.updateProps(r,{shape:l},i),r.useStyle(c)):Jc.updateProps(r,{shape:l,style:c},i),this._updateLabel(i,u,n);var f=o.getShallow("cursor");if(f&&r.attr("cursor",f),e){var p=i.getShallow("highlightPolicy");this._initEvents(r,t,i,p)}this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel,Jc.setHoverStyle(this)},RP.onEmphasis=function(e){var t=this;this.node.hostTree.root.eachNode((function(n){var i,a,r;n.piece&&(t.node===n?n.piece.updateData(!1,n,"emphasis"):(i=n,a=t.node,(r=e)!==LP&&(r===NP?i===a:r===EP?i===a||i.isAncestorOf(a):i===a||i.isDescendantOf(a))?n.piece.childAt(0).trigger("highlight"):e!==LP&&n.piece.childAt(0).trigger("downplay")))}))},RP.onNormal=function(){this.node.hostTree.root.eachNode((function(e){e.piece&&e.piece.updateData(!1,e,"normal")}))},RP.onHighlight=function(){this.updateData(!1,this.node,"highlight")},RP.onDownplay=function(){this.updateData(!1,this.node,"downplay")},RP._updateLabel=function(e,t,n){var i=this.node.getModel(),a=i.getModel("label"),r="normal"===n||"emphasis"===n?a:i.getModel(n+".label"),o=i.getModel("emphasis.label"),s=Fe.retrieve(e.getFormattedLabel(this.node.dataIndex,n,null,null,"label"),this.node.name);!1===S("show")&&(s="");var l=this.node.getLayout(),u=r.get("minAngle");null==u&&(u=a.get("minAngle")),u=u/180*Math.PI;var c=l.endAngle-l.startAngle;null!=u&&Math.abs(c)<u&&(s="");var h=this.childAt(1);Jc.setLabelStyle(h.style,h.hoverStyle||{},a,o,{defaultText:r.getShallow("show")?s:null,autoColor:t,useInsideStyle:!0});var d,f=(l.startAngle+l.endAngle)/2,p=Math.cos(f),g=Math.sin(f),m=S("position"),v=S("distance")||0,y=S("align");"outside"===m?(d=l.r+v,y=f>Math.PI/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,f>Math.PI/2&&(y="right")):"right"===y&&(d=l.r-v,f>Math.PI/2&&(y="left")):(d=(l.r+l.r0)/2,y="center"),h.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var _=d*p+l.cx,x=d*g+l.cy;h.attr("position",[_,x]);var b=S("rotate"),w=0;function S(e){var t=r.get(e);return null==t?a.get(e):t}"radial"===b?(w=-f)<-Math.PI/2&&(w+=Math.PI):"tangential"===b?(w=Math.PI/2-f)>Math.PI/2?w-=Math.PI:w<-Math.PI/2&&(w+=Math.PI):"number"==typeof b&&(w=b*Math.PI/180),h.attr("rotation",w)},RP._initEvents=function(e,t,n,i){e.off("mouseover").off("mouseout").off("emphasis").off("normal");var a=this,r=function(){a.onEmphasis(i)},o=function(){a.onNormal()};n.isAnimationEnabled()&&e.on("mouseover",r).on("mouseout",o).on("emphasis",r).on("normal",o).on("downplay",(function(){a.onDownplay()})).on("highlight",(function(){a.onHighlight()}))},Fe.inherits(PP,Jc.Group);var zP=PP,BP=Fh.windowOpen;bg.extend({type:"sunburst",init:function(){},render:function(e,t,n,i){var a=this;this.seriesModel=e,this.api=n,this.ecModel=t;var r=e.getData(),o=r.tree.root,s=e.getViewRoot(),l=this.group,u=e.get("renderLabelForZeroData"),c=[];s.eachNode((function(e){c.push(e)}));var h=this._oldChildren||[];if(function(n,i){if(0===n.length&&0===i.length)return;function a(e){return e.getId()}function s(a,s){!function(n,i){u||!n||n.getValue()||(n=null);if(n!==o&&i!==o)if(i&&i.piece)n?(i.piece.updateData(!1,n,"normal",e,t),r.setItemGraphicEl(n.dataIndex,i.piece)):function(e){if(!e)return;e.piece&&(l.remove(e.piece),e.piece=null)}(i);else if(n){var a=new zP(n,e,t);l.add(a),r.setItemGraphicEl(n.dataIndex,a)}}(null==a?null:n[a],null==s?null:i[s])}new Jm(i,n,a,a).add(s).update(s).remove(Fe.curry(s,null)).execute()}(c,h),function(n,i){if(i.depth>0){a.virtualPiece?a.virtualPiece.updateData(!1,n,"normal",e,t):(a.virtualPiece=new zP(n,e,t),l.add(a.virtualPiece)),i.piece._onclickEvent&&i.piece.off("click",i.piece._onclickEvent);var r=function(e){a._rootToNode(i.parentNode)};i.piece._onclickEvent=r,a.virtualPiece.on("click",r)}else a.virtualPiece&&(l.remove(a.virtualPiece),a.virtualPiece=null)}(o,s),i&&i.highlight&&i.highlight.piece){var d=e.getShallow("highlightPolicy");i.highlight.piece.onEmphasis(d)}else if(i&&i.unhighlight){var f=this.virtualPiece;!f&&o.children.length&&(f=o.children[0].piece),f&&f.onNormal()}this._initEvents(),this._oldChildren=c},dispose:function(){},_initEvents:function(){var e=this,t=function(t){var n=!1;e.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece.childAt(0)===t.target){var a=i.getModel().get("nodeClick");if("rootToNode"===a)e._rootToNode(i);else if("link"===a){var r=i.getModel(),o=r.get("link");if(o){var s=r.get("target",!0)||"_blank";BP(o,s)}}n=!0}}))};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},containPoint:function(e,t){var n=t.getData().getItemLayout(0);if(n){var i=e[0]-n.cx,a=e[1]-n.cy,r=Math.sqrt(i*i+a*a);return r<=n.r&&r>=n.r0}}});var VP="sunburstRootToNode";jx.registerAction({type:VP,update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,n){var i=yA.retrieveTargetInfo(e,[VP],t);if(i){var a=t.getViewRoot();a&&(e.direction=yA.aboveViewRoot(a,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}}))}));var HP="sunburstHighlight";jx.registerAction({type:HP,update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,n){var i=yA.retrieveTargetInfo(e,[HP],t);i&&(e.highlight=i.node)}))}));jx.registerAction({type:"sunburstUnhighlight",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,n){e.unhighlight=!0}))}));var YP=Ch.parsePercent,FP=Math.PI/180;function GP(e,t){var n=e.children||[];e.children=function(e,t){if("function"==typeof t)return e.sort(t);var n="asc"===t;return e.sort((function(e,t){var i=(e.getValue()-t.getValue())*(n?1:-1);return 0===i?(e.dataIndex-t.dataIndex)*(n?-1:1):i}))}(n,t),n.length&&Fe.each(e.children,(function(e){GP(e,t)}))}var WP=function(e,t,n,i){t.eachSeriesByType(e,(function(e){var t=e.get("center"),i=e.get("radius");Fe.isArray(i)||(i=[0,i]),Fe.isArray(t)||(t=[t,t]);var a=n.getWidth(),r=n.getHeight(),o=Math.min(a,r),s=YP(t[0],a),l=YP(t[1],r),u=YP(i[0],o/2),c=YP(i[1],o/2),h=-e.get("startAngle")*FP,d=e.get("minAngle")*FP,f=e.getData().tree.root,p=e.getViewRoot(),g=p.depth,m=e.get("sort");null!=m&&GP(p,m);var v=0;Fe.each(p.children,(function(e){!isNaN(e.getValue())&&v++}));var y=p.getValue(),_=Math.PI/(y||v)*2,x=p.depth>0,b=p.height-(x?-1:1),w=(c-u)/(b||1),S=e.get("clockwise"),M=e.get("stillShowZeroSum"),T=S?1:-1,I=function(e,t){if(e){var n=t;if(e!==f){var i=e.getValue(),a=0===y&&M?_:i*_;a<d&&(a=d),n=t+T*a;var r=e.depth-g-(x?-1:1),c=u+w*r,h=u+w*(r+1),p=e.getModel();null!=p.get("r0")&&(c=YP(p.get("r0"),o/2)),null!=p.get("r")&&(h=YP(p.get("r"),o/2)),e.setLayout({angle:a,startAngle:t,endAngle:n,clockwise:S,cx:s,cy:l,r0:c,r:h})}if(e.children&&e.children.length){var m=0;Fe.each(e.children,(function(e){m+=I(e,t+m)}))}return n-t}};if(x){var A=u,D=u+w,C=2*Math.PI;f.setLayout({angle:C,startAngle:h,endAngle:h+C,clockwise:S,cx:s,cy:l,r0:A,r:D})}I(p,h)}))};function jP(e,t){return t=t||[0,0],Fe.map(["x","y"],(function(n,i){var a=this.getAxis(n),r=t[i],o=e[i]/2;return"category"===a.type?a.getBandWidth():Math.abs(a.dataToCoord(r-o)-a.dataToCoord(r+o))}),this)}jx.registerVisual(Fe.curry(wM,"sunburst")),jx.registerLayout(Fe.curry(WP,"sunburst")),jx.registerProcessor(Fe.curry(EM,"sunburst"));var UP=function(e){var t=e.grid.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Fe.bind(jP,e)}}};function ZP(e,t){return t=t||[0,0],Fe.map([0,1],(function(n){var i=t[n],a=e[n]/2,r=[],o=[];return r[n]=i-a,o[n]=i+a,r[1-n]=o[1-n]=t[1-n],Math.abs(this.dataToPoint(r)[n]-this.dataToPoint(o)[n])}),this)}var XP=function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:Fe.bind(ZP,e)}}};function qP(e,t){var n=this.getAxis(),i=t instanceof Array?t[0]:t,a=(e instanceof Array?e[0]:e)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-a)-n.dataToCoord(i+a))}var KP=function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:Fe.bind(qP,e)}}};function $P(e,t){return Fe.map(["Radius","Angle"],(function(n,i){var a=this["get"+n+"Axis"](),r=t[i],o=e[i]/2,s="dataTo"+n,l="category"===a.type?a.getBandWidth():Math.abs(a[s](r-o)-a[s](r+o));return"Angle"===n&&(l=l*Math.PI/180),l}),this)}var QP=function(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),i=t.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:i[1],r0:i[0]},api:{coord:Fe.bind((function(i){var a=t.dataToRadius(i[0]),r=n.dataToAngle(i[1]),o=e.coordToPoint([a,r]);return o.push(a,r*Math.PI/180),o})),size:Fe.bind($P,e)}}};var JP=function(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}},eR=Xx.getDefaultLabel,tR=qy.getLayoutOnAxis,nR=Hb.createClipPath,iR=Jc.CACHED_LABEL_STYLE_PROPERTIES,aR=["itemStyle"],rR=["emphasis","itemStyle"],oR=["label"],sR=["emphasis","label"],lR={cartesian2d:UP,geo:XP,singleAxis:KP,polar:QP,calendar:JP};function uR(e,t,n,i,a){null==n[e]||a||(t[e]=n[e],n[e]=i[e])}function cR(e,t,n,i){var a=e.get("renderItem"),r=e.coordinateSystem,o={};r&&(o=r.prepareCustoms?r.prepareCustoms():lR[r.type](r));var s,l,u,c,h,d=Fe.defaults({getWidth:i.getWidth,getHeight:i.getHeight,getZr:i.getZr,getDevicePixelRatio:i.getDevicePixelRatio,value:function(e,n){return null==n&&(n=s),t.get(t.getDimension(e||0),n)},style:function(n,i){null==i&&(i=s),g(i);var a=l.getModel(aR).getItemStyle();null!=h&&(a.fill=h);var r=t.getItemVisual(i,"opacity");null!=r&&(a.opacity=r);var o=n?mR(n,u):u;return Jc.setTextStyle(a,o,null,{autoColor:h,isRectText:!0}),a.text=o.getShallow("show")?Fe.retrieve2(e.getFormattedLabel(i,"normal"),eR(t,i)):null,n&&vR(a,n),a},styleEmphasis:function(n,i){null==i&&(i=s),g(i);var a=l.getModel(rR).getItemStyle(),r=n?mR(n,c):c;return Jc.setTextStyle(a,r,null,{isRectText:!0},!0),a.text=r.getShallow("show")?Fe.retrieve3(e.getFormattedLabel(i,"emphasis"),e.getFormattedLabel(i,"normal"),eR(t,i)):null,n&&vR(a,n),a},visual:function(e,n){return null==n&&(n=s),t.getItemVisual(n,e)},barLayout:function(e){if(r.getBaseAxis){var t=r.getBaseAxis();return tR(Fe.defaults({axis:t},e),i)}},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(e){return Jc.getFont(e,n)}},o.api||{}),f={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:o.coordSys,dataInsideLength:t.count(),encode:hR(e.getData())},p=!0;return function(e,n){return s=e,p=!0,a&&a(Fe.defaults({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},f),d)};function g(e){null==e&&(e=s),p&&(l=t.getItemModel(e),u=l.getModel(oR),c=l.getModel(sR),h=t.getItemVisual(e,"color"),p=!1)}}function hR(e){var t={};return Fe.each(e.dimensions,(function(n,i){var a=e.getDimensionInfo(n);if(!a.isExtraCoord){var r=a.coordDim;(t[r]=t[r]||[])[a.coordDimIndex]=i}})),t}function dR(e,t,n,i,a,r){return(e=fR(e,t,n,i,a,r,!0))&&r.setItemGraphicEl(t,e),e}function fR(e,t,n,i,a,r,o){var s,l=!n,u=(n=n||{}).type,c=n.shape,h=n.style;if(e&&(l||null!=u&&u!==e.__customGraphicType||"path"===u&&((s=c)&&(s.hasOwnProperty("pathData")||s.hasOwnProperty("d")))&&_R(c)!==e.__customPathData||"image"===u&&xR(h,"image")&&h.image!==e.__customImagePath||"text"===u&&xR(c,"text")&&h.text!==e.__customText)&&(a.remove(e),e=null),!l){var d=!e;return!e&&(e=function(e){var t,n=e.type;if("path"===n){var i=e.shape,a=null!=i.width&&null!=i.height?{x:i.x||0,y:i.y||0,width:i.width,height:i.height}:null,r=_R(i);(t=Jc.makePath(r,null,a,i.layout||"center")).__customPathData=r}else if("image"===n)(t=new Jc.Image({})).__customImagePath=e.style.image;else if("text"===n)(t=new Jc.Text({})).__customText=e.style.text;else if("group"===n)t=new Jc.Group;else{if("compoundPath"===n)throw new Error('"compoundPath" is not supported yet.');t=new(Jc.getShapeClass(n))}return t.__customGraphicType=n,t.name=e.name,t}(n)),function(e,t,n,i,a,r,o){var s={},l=n.style||{};if(n.shape&&(s.shape=Fe.clone(n.shape)),n.position&&(s.position=n.position.slice()),n.scale&&(s.scale=n.scale.slice()),n.origin&&(s.origin=n.origin.slice()),n.rotation&&(s.rotation=n.rotation),"image"===e.type&&n.style){var u=s.style={};Fe.each(["x","y","width","height"],(function(t){uR(t,u,l,e.style,r)}))}"text"===e.type&&n.style&&(u=s.style={},Fe.each(["x","y"],(function(t){uR(t,u,l,e.style,r)})),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke));if("group"!==e.type&&(e.useStyle(l),r)){e.style.opacity=0;var c=l.opacity;null==c&&(c=1),Jc.initProps(e,{style:{opacity:c}},i,t)}r?e.attr(s):Jc.updateProps(e,s,i,t),n.hasOwnProperty("z2")&&e.attr("z2",n.z2||0),n.hasOwnProperty("silent")&&e.attr("silent",n.silent),n.hasOwnProperty("invisible")&&e.attr("invisible",n.invisible),n.hasOwnProperty("ignore")&&e.attr("ignore",n.ignore),n.hasOwnProperty("info")&&e.attr("info",n.info);var h=n.styleEmphasis;Jc.setElementHoverStyle(e,h),o&&Jc.setAsHighDownDispatcher(e,!1!==h)}(e,t,n,i,0,d,o),"group"===u&&function(e,t,n,i,a){var r=n.children,o=r?r.length:0,s=n.$mergeChildren,l="byName"===s||n.diffChildrenByName,u=!1===s;if(!o&&!l&&!u)return;if(l)return c={oldChildren:e.children()||[],newChildren:r||[],dataIndex:t,animatableModel:i,group:e,data:a},void new Jm(c.oldChildren,c.newChildren,pR,pR,c).add(gR).update(gR).remove(yR).execute();var c;u&&e.removeAll();for(var h=0;h<o;h++)r[h]&&fR(e.childAt(h),t,r[h],i,e,a)}(e,t,n,i,r),a.add(e),e}}function pR(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function gR(e,t){var n=this.context,i=null!=e?n.newChildren[e]:null;fR(null!=t?n.oldChildren[t]:null,n.dataIndex,i,n.animatableModel,n.group,n.data)}function mR(e,t){var n=new ph({},t);return Fe.each(iR,(function(t,i){e.hasOwnProperty(t)&&(n.option[i]=e[t])})),n}function vR(e,t){for(var n in t)!t.hasOwnProperty(n)&&iR.hasOwnProperty(n)||(e[n]=t[n])}function yR(e){var t=this.context,n=t.oldChildren[e];n&&t.group.remove(n)}function _R(e){return e&&(e.pathData||e.d)}function xR(e,t){return e&&e.hasOwnProperty(t)}ag.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(e,t){return hy(this.getSource(),this)},getDataParams:function(e,t,n){var i=ag.prototype.getDataParams.apply(this,arguments);return n&&(i.info=n.info),i}}),bg.extend({type:"custom",_data:null,render:function(e,t,n,i){var a=this._data,r=e.getData(),o=this.group,s=cR(e,r,t,n);r.diff(a).add((function(t){dR(null,t,s(t,i),e,o,r)})).update((function(t,n){dR(a.getItemGraphicEl(n),t,s(t,i),e,o,r)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&o.remove(t)})).execute();var l=e.get("clip",!0)?nR(e.coordinateSystem,!1,e):null;l?o.setClipPath(l):o.removeClipPath(),this._data=r},incrementalPrepareRender:function(e,t,n){this.group.removeAll(),this._data=null},incrementalRender:function(e,t,n,i,a){var r=t.getData(),o=cR(t,r,n,i);function s(e){e.isGroup||(e.incremental=!0,e.useHoverLayer=!0)}for(var l=e.start;l<e.end;l++){dR(null,l,o(l,a),t,this.group,r).traverse(s)}},dispose:Fe.noop,filterForExposedEvent:function(e,t,n,i){var a=t.element;if(null==a||n.name===a)return!0;for(;(n=n.parent)&&n!==this.group;)if(n.name===a)return!0;return!1}});var bR=Ch.parsePercent,wR=iy.isDimensionStacked;function SR(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function MR(e,t){return t.dim+e.model.componentIndex}var TR=function(e,t,n){var i={},a=function(e){var t={};Fe.each(e,(function(e,n){var i=e.getData(),a=e.coordinateSystem,r=a.getBaseAxis(),o=MR(a,r),s=r.getExtent(),l="category"===r.type?r.getBandWidth():Math.abs(s[1]-s[0])/i.count(),u=t[o]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=u.stacks;t[o]=u;var h=SR(e);c[h]||u.autoWidthCount++,c[h]=c[h]||{width:0,maxWidth:0};var d=bR(e.get("barWidth"),l),f=bR(e.get("barMaxWidth"),l),p=e.get("barGap"),g=e.get("barCategoryGap");d&&!c[h].width&&(d=Math.min(u.remainedWidth,d),c[h].width=d,u.remainedWidth-=d),f&&(c[h].maxWidth=f),null!=p&&(u.gap=p),null!=g&&(u.categoryGap=g)}));var n={};return Fe.each(t,(function(e,t){n[t]={};var i=e.stacks,a=e.bandWidth,r=bR(e.categoryGap,a),o=bR(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-r)/(l+(l-1)*o);u=Math.max(u,0),Fe.each(i,(function(e,t){var n=e.maxWidth;n&&n<u&&(n=Math.min(n,s),e.width&&(n=Math.min(n,e.width)),s-=n,e.width=n,l--)})),u=(s-r)/(l+(l-1)*o),u=Math.max(u,0);var c,h=0;Fe.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;Fe.each(i,(function(e,i){n[t][i]=n[t][i]||{offset:d,width:e.width},d+=e.width*(1+o)}))})),n}(Fe.filter(t.getSeriesByType(e),(function(e){return!t.isSeriesFiltered(e)&&e.coordinateSystem&&"polar"===e.coordinateSystem.type})));t.eachSeriesByType(e,(function(e){if("polar"===e.coordinateSystem.type){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),o=MR(n,r),s=SR(e),l=a[o][s],u=l.offset,c=l.width,h=n.getOtherAxis(r),d=e.coordinateSystem.cx,f=e.coordinateSystem.cy,p=e.get("barMinHeight")||0,g=e.get("barMinAngle")||0;i[s]=i[s]||[];for(var m=t.mapDimension(h.dim),v=t.mapDimension(r.dim),y=wR(t,m),_="radius"!==r.dim||!e.get("roundCap",!0),x=h.getExtent()[0],b=0,w=t.count();b<w;b++){var S,M,T,I,A=t.get(m,b),D=t.get(v,b),C=A>=0?"p":"n",O=x;if(y&&(i[s][D]||(i[s][D]={p:x,n:x}),O=i[s][D][C]),"radius"===h.dim){var k=h.dataToRadius(A)-x,L=r.dataToAngle(D);Math.abs(k)<p&&(k=(k<0?-1:1)*p),S=O,M=O+k,I=(T=L-u)-c,y&&(i[s][D][C]=M)}else{var E=h.dataToAngle(A,_)-x,N=r.dataToRadius(D);Math.abs(E)<g&&(E=(E<0?-1:1)*g),M=(S=N+u)+c,T=O,I=O+E,y&&(i[s][D][C]=I)}t.setItemLayout(b,{cx:d,cy:f,r0:S,r:M,startAngle:-T*Math.PI/180,endAngle:-I*Math.PI/180})}}}),this)},IR=TR;function AR(e,t){Ax.call(this,"radius",e,t),this.type="category"}AR.prototype={constructor:AR,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToRadius:Ax.prototype.dataToCoord,radiusToData:Ax.prototype.coordToData},Fe.inherits(AR,Ax);var DR=AR,CR=(0,Po.makeInner)();function OR(e,t){t=t||[0,360],Ax.call(this,"angle",e,t),this.type="category"}OR.prototype={constructor:OR,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToAngle:Ax.prototype.dataToCoord,angleToData:Ax.prototype.coordToData,calculateCategoryInterval:function(){var e=this,t=e.getLabelModel(),n=e.scale,i=n.getExtent(),a=n.count();if(i[1]-i[0]<1)return 0;var r=i[0],o=e.dataToCoord(r+1)-e.dataToCoord(r),s=Math.abs(o),l=Ga.getBoundingRect(r,t.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var c=Math.max(0,Math.floor(u)),h=CR(e.model),d=h.lastAutoInterval,f=h.lastTickCount;return null!=d&&null!=f&&Math.abs(d-c)<=1&&Math.abs(f-a)<=1&&d>c?c=d:(h.lastTickCount=a,h.lastAutoInterval=c),c}},Fe.inherits(OR,Ax);var kR=OR,LR=function(e){this.name=e||"",this.cx=0,this.cy=0,this._radiusAxis=new DR,this._angleAxis=new kR,this._radiusAxis.polar=this._angleAxis.polar=this};LR.prototype={type:"polar",axisPointerEnabled:!0,constructor:LR,dimensions:["radius","angle"],model:null,containPoint:function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},containData:function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},getAxis:function(e){return this["_"+e+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(e){var t=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&t.push(n),i.scale.type===e&&t.push(i),t},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},dataToPoint:function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},pointToData:function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},pointToCoord:function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),r=Math.min(a[0],a[1]),o=Math.max(a[0],a[1]);i.inverse?r=o-360:o=r+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var l=Math.atan2(-n,t)/Math.PI*180,u=l<r?1:-1;l<r||l>o;)l+=360*u;return[s,l]},coordToPoint:function(e){var t=e[0],n=e[1]/180*Math.PI;return[Math.cos(n)*t+this.cx,-Math.sin(n)*t+this.cy]},getArea:function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,i=t-this.cy,a=n*n+i*i,r=this.r,o=this.r0;return a<=r*r&&a>=o*o}}}};var ER=LR,NR=sd.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});Fe.merge(NR.prototype,O_);var PR={splitNumber:5};function RR(e,t){return t.type||(t.data?"category":"value")}bw("angle",NR,RR,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),bw("radius",NR,RR,PR),jx.extendComponentModel({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(e){var t;return this.ecModel.eachComponent(e,(function(e){e.getCoordSysModel()===this&&(t=e)}),this),t},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var zR=Ch.parsePercent,BR=D_.createScaleByModel,VR=D_.niceScaleExtent,HR=iy.getStackedDimension;function YR(e,t){var n=this,i=n.getAngleAxis(),a=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),e.eachSeries((function(e){if(e.coordinateSystem===n){var t=e.getData();Fe.each(t.mapDimension("radius",!0),(function(e){a.scale.unionExtentFromData(t,HR(t,e))})),Fe.each(t.mapDimension("angle",!0),(function(e){i.scale.unionExtentFromData(t,HR(t,e))}))}})),VR(i.scale,i.model),VR(a.scale,a.model),"category"===i.type&&!i.onBand){var r=i.getExtent(),o=360/i.scale.count();i.inverse?r[1]+=o:r[1]-=o,i.setExtent(r[0],r[1])}}function FR(e,t){if(e.type=t.get("type"),e.scale=BR(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),"angleAxis"===t.mainType){e.inverse^=t.get("clockwise");var n=t.get("startAngle");e.setExtent(n,n+(e.inverse?-360:360))}t.axis=e,e.model=t}var GR={dimensions:ER.prototype.dimensions,create:function(e,t){var n=[];return e.eachComponent("polar",(function(e,i){var a=new ER(i);a.update=YR;var r=a.getRadiusAxis(),o=a.getAngleAxis(),s=e.findAxisModel("radiusAxis"),l=e.findAxisModel("angleAxis");FR(r,s),FR(o,l),function(e,t,n){var i=t.get("center"),a=n.getWidth(),r=n.getHeight();e.cx=zR(i[0],a),e.cy=zR(i[1],r);var o=e.getRadiusAxis(),s=Math.min(a,r)/2,l=t.get("radius");null==l?l=[0,"100%"]:Fe.isArray(l)||(l=[0,l]),l=[zR(l[0],s),zR(l[1],s)],o.inverse?o.setExtent(l[1],l[0]):o.setExtent(l[0],l[1])}(a,e,t),n.push(a),e.coordinateSystem=a,a.model=e})),e.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var n=e.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=n.coordinateSystem}})),n}};Tf.register("polar",GR);var WR=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function jR(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var i=e.coordToPoint([t[0],n]),a=e.coordToPoint([t[1],n]);return{x1:i[0],y1:i[1],x2:a[0],y2:a[1]}}function UR(e){return e.getRadiusAxis().inverse?0:1}function ZR(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}wS.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,i=n.polar,a=i.getRadiusAxis().getExtent(),r=n.getTicksCoords(),o=n.getMinorTicksCoords(),s=Fe.map(n.getViewLabels(),(function(e){return(e=Fe.clone(e)).coord=n.dataToCoord(e.tickValue),e}));ZR(s),ZR(r),Fe.each(WR,(function(t){!e.get(t+".show")||n.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,i,r,o,a,s)}),this)}},_axisLine:function(e,t,n,i,a){var r,o=e.getModel("axisLine.lineStyle"),s=UR(t),l=s?0:1;(r=0===a[l]?new Jc.Circle({shape:{cx:t.cx,cy:t.cy,r:a[s]},style:o.getLineStyle(),z2:1,silent:!0}):new Jc.Ring({shape:{cx:t.cx,cy:t.cy,r:a[s],r0:a[l]},style:o.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(r)},_axisTick:function(e,t,n,i,a){var r=e.getModel("axisTick"),o=(r.get("inside")?-1:1)*r.get("length"),s=a[UR(t)],l=Fe.map(n,(function(e){return new Jc.Line({shape:jR(t,[s,s+o],e.coord)})}));this.group.add(Jc.mergePath(l,{style:Fe.defaults(r.getModel("lineStyle").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})}))},_minorTick:function(e,t,n,i,a){if(i.length){for(var r=e.getModel("axisTick"),o=e.getModel("minorTick"),s=(r.get("inside")?-1:1)*o.get("length"),l=a[UR(t)],u=[],c=0;c<i.length;c++)for(var h=0;h<i[c].length;h++)u.push(new Jc.Line({shape:jR(t,[l,l+s],i[c][h].coord)}));this.group.add(Jc.mergePath(u,{style:Fe.defaults(o.getModel("lineStyle").getLineStyle(),Fe.defaults(r.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(e,t,n,i,a,r){var o=e.getCategories(!0),s=e.getModel("axisLabel"),l=s.get("margin"),u=e.get("triggerEvent");Fe.each(r,(function(n,i){var r=s,c=n.tickValue,h=a[UR(t)],d=t.coordToPoint([h+l,n.coord]),f=t.cx,p=t.cy,g=Math.abs(d[0]-f)/h<.3?"center":d[0]>f?"left":"right",m=Math.abs(d[1]-p)/h<.3?"middle":d[1]>p?"top":"bottom";o&&o[c]&&o[c].textStyle&&(r=new ph(o[c].textStyle,s,s.ecModel));var v=new Jc.Text({silent:lS.isLabelSilent(e)});this.group.add(v),Jc.setTextStyle(v.style,r,{x:d[0],y:d[1],textFill:r.getTextColor()||e.get("axisLine.lineStyle.color"),text:n.formattedLabel,textAlign:g,textVerticalAlign:m}),u&&(v.eventData=lS.makeAxisEventDataBase(e),v.eventData.targetType="axisLabel",v.eventData.value=n.rawLabel)}),this)},_splitLine:function(e,t,n,i,a){var r=e.getModel("splitLine").getModel("lineStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=0;u<n.length;u++){var c=s++%o.length;l[c]=l[c]||[],l[c].push(new Jc.Line({shape:jR(t,a,n[u].coord)}))}for(u=0;u<l.length;u++)this.group.add(Jc.mergePath(l[u],{style:Fe.defaults({stroke:o[u%o.length]},r.getLineStyle()),silent:!0,z:e.get("z")}))},_minorSplitLine:function(e,t,n,i,a){if(i.length){for(var r=e.getModel("minorSplitLine").getModel("lineStyle"),o=[],s=0;s<i.length;s++)for(var l=0;l<i[s].length;l++)o.push(new Jc.Line({shape:jR(t,a,i[s][l].coord)}));this.group.add(Jc.mergePath(o,{style:r.getLineStyle(),silent:!0,z:e.get("z")}))}},_splitArea:function(e,t,n,i,a){if(n.length){var r=e.getModel("splitArea").getModel("areaStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=Math.PI/180,c=-n[0].coord*u,h=Math.min(a[0],a[1]),d=Math.max(a[0],a[1]),f=e.get("clockwise"),p=1;p<n.length;p++){var g=s++%o.length;l[g]=l[g]||[],l[g].push(new Jc.Sector({shape:{cx:t.cx,cy:t.cy,r0:h,r:d,startAngle:c,endAngle:-n[p].coord*u,clockwise:f},silent:!0})),c=-n[p].coord*u}for(p=0;p<l.length;p++)this.group.add(Jc.mergePath(l[p],{style:Fe.defaults({fill:o[p%o.length]},r.getAreaStyle()),silent:!0}))}}});var XR=["axisLine","axisTickLabel","axisName"],qR=["splitLine","splitArea","minorSplitLine"];wS.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,i=n.polar,a=i.getAngleAxis(),r=n.getTicksCoords(),o=n.getMinorTicksCoords(),s=a.getExtent()[0],l=n.getExtent(),u=function(e,t,n){return{position:[e.cx,e.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}(i,e,s),c=new lS(e,u);Fe.each(XR,c.add,c),this.group.add(c.getGroup()),Fe.each(qR,(function(t){e.get(t+".show")&&!n.scale.isBlank()&&this["_"+t](e,i,s,l,r,o)}),this)}},_splitLine:function(e,t,n,i,a){var r=e.getModel("splitLine").getModel("lineStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=0;u<a.length;u++){var c=s++%o.length;l[c]=l[c]||[],l[c].push(new Jc.Circle({shape:{cx:t.cx,cy:t.cy,r:a[u].coord}}))}for(u=0;u<l.length;u++)this.group.add(Jc.mergePath(l[u],{style:Fe.defaults({stroke:o[u%o.length],fill:null},r.getLineStyle()),silent:!0}))},_minorSplitLine:function(e,t,n,i,a,r){if(r.length){for(var o=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<r.length;l++)for(var u=0;u<r[l].length;u++)s.push(new Jc.Circle({shape:{cx:t.cx,cy:t.cy,r:r[l][u].coord}}));this.group.add(Jc.mergePath(s,{style:Fe.defaults({fill:null},o.getLineStyle()),silent:!0}))}},_splitArea:function(e,t,n,i,a){if(a.length){var r=e.getModel("splitArea").getModel("areaStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=a[0].coord,c=1;c<a.length;c++){var h=s++%o.length;l[h]=l[h]||[],l[h].push(new Jc.Sector({shape:{cx:t.cx,cy:t.cy,r0:u,r:a[c].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=a[c].coord}for(c=0;c<l.length;c++)this.group.add(Jc.mergePath(l[c],{style:Fe.defaults({fill:o[c%o.length]},r.getAreaStyle()),silent:!0}))}}});var KR=iP.extend({makeElOption:function(e,t,n,i,a){var r=n.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var o,s=r.polar,l=s.getOtherAxis(r).getExtent();o=r["dataTo"+Fh.capitalFirst(r.dim)](t);var u=i.get("type");if(u&&"none"!==u){var c=lP.buildElStyle(i),h=$R[u](r,s,o,l,c);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=function(e,t,n,i,a){var r=t.axis,o=r.dataToCoord(e),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,h=i.getRadiusAxis().getExtent();if("radius"===r.dim){var d=sn.create();sn.rotate(d,d,s),sn.translate(d,d,[i.cx,i.cy]),l=Jc.applyTransform([o,-a],d);var f=t.getModel("axisLabel").get("rotate")||0,p=lS.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,c=p.textVerticalAlign}else{var g=h[1];l=i.coordToPoint([g+a,o]);var m=i.cx,v=i.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",c=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(t,n,0,s,i.get("label.margin"));lP.buildLabelElOption(e,n,i,a,d)}});var $R={line:function(e,t,n,i,a){return"angle"===e.dim?{type:"Line",shape:lP.makeLineShape(t.coordToPoint([i[0],n]),t.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,i,a){var r=Math.max(1,e.getBandWidth()),o=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:lP.makeSectorShape(t.cx,t.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:lP.makeSectorShape(t.cx,t.cy,n-r/2,n+r/2,0,2*Math.PI)}}};wS.registerAxisPointerClass("PolarAxisPointer",KR),jx.registerLayout(Fe.curry(IR,"bar")),jx.extendComponentView({type:"polar"});var QR=sd.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(e){sd.prototype.init.apply(this,arguments),Po.defaultEmphasis(e,"label",["show"])},optionUpdated:function(){var e=this.option,t=this;e.regions=bI.getFilledRegions(e.regions,e.map,e.nameMap),this._optionModelMap=Fe.reduce(e.regions||[],(function(e,n){return n.name&&e.set(n.name,new ph(n,t)),e}),Fe.createHashMap()),this.updateSelectedMap(e.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(e){return this._optionModelMap.get(e)||new ph(null,this,this.ecModel)},getFormattedLabel:function(e,t){var n=this.getRegionModel(e).get("label"+("normal"===t?".":t+".")+"formatter"),i={name:e};return"function"==typeof n?(i.status=t,n(i)):"string"==typeof n?n.replace("{a}",null!=e?e:""):void 0},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e}});function JR(e,t){t.update="updateView",jx.registerAction(t,(function(t,n){var i={};return n.eachComponent({mainType:"geo",query:t},(function(n){n[e](t.name);var a=n.coordinateSystem;Fe.each(a.regions,(function(e){i[e.name]=n.isSelected(e.name)||!1}))})),{selected:i,name:t.name}}))}Fe.mixin(QR,cM),jx.extendComponentView({type:"geo",init:function(e,t){var n=new nI(t,!0);this._mapDraw=n,this.group.add(n.group)},render:function(e,t,n,i){if(!i||"geoToggleSelect"!==i.type||i.from!==this.uid){var a=this._mapDraw;e.get("show")?a.draw(e,t,n,this,i):this._mapDraw.group.removeAll(),this.group.silent=e.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),JR("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),JR("select",{type:"geoSelect",event:"geoselected"}),JR("unSelect",{type:"geoUnSelect",event:"geounselected"});var ez=864e5;function tz(e,t,n){this._model=e}function nz(e,t,n,i){var a=n.calendarModel,r=n.seriesModel,o=a?a.coordinateSystem:r?r.coordinateSystem:null;return o===this?o[e](i):null}tz.prototype={constructor:tz,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(e){var t=(e=Ch.parseDate(e)).getFullYear(),n=e.getMonth()+1;n=n<10?"0"+n:n;var i=e.getDate();i=i<10?"0"+i:i;var a=e.getDay();return{y:t,m:n,d:i,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:e.getTime(),formatedDate:t+"-"+n+"-"+i,date:e}},getNextNDay:function(e,t){return 0===(t=t||0)||(e=new Date(this.getDateInfo(e).time)).setDate(e.getDate()+t),this.getDateInfo(e)},update:function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),o="horizontal"===this._orient?[n,7]:[7,n];Fe.each([0,1],(function(e){u(a,e)&&(r[i[e]]=a[e]*o[e])}));var s={width:t.getWidth(),height:t.getHeight()},l=this._rect=td.getLayoutRect(r,s);function u(e,t){return null!=e[t]&&"auto"!==e[t]}Fe.each([0,1],(function(e){u(a,e)||(a[e]=l[i[e]]/o[e])})),this._sw=a[0],this._sh=a[1]},dataToPoint:function(e,t){Fe.isArray(e)&&(e=e[0]),null==t&&(t=!0);var n=this.getDateInfo(e),i=this._rangeInfo,a=n.formatedDate;if(t&&!(n.time>=i.start.time&&n.time<i.end.time+ez))return[NaN,NaN];var r=n.day,o=this._getRangeInfo([i.start.time,a]).nthWeek;return"vertical"===this._orient?[this._rect.x+r*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]:[this._rect.x+o*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]},pointToData:function(e){var t=this.pointToDate(e);return t&&t.time},dataToRect:function(e,t){var n=this.dataToPoint(e,t);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},pointToDate:function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,t-1,i):this._getDateByWeeksAndDay(t,n-1,i)},convertToPixel:Fe.curry(nz,"dataToPoint"),convertFromPixel:Fe.curry(nz,"pointToData"),_initRangeOption:function(){var e=this._model.get("range"),t=e;if(Fe.isArray(t)&&1===t.length&&(t=t[0]),/^\d{4}$/.test(t)&&(e=[t+"-01-01",t+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(t)){var n=this.getDateInfo(t),i=n.date;i.setMonth(i.getMonth()+1);var a=this.getNextNDay(i,-1);e=[n.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(t)&&(e=[t,t]);var r=this._getRangeInfo(e);return r.start.time>r.end.time&&e.reverse(),e},_getRangeInfo:function(e){var t;(e=[this.getDateInfo(e[0]),this.getDateInfo(e[1])])[0].time>e[1].time&&(t=!0,e.reverse());var n=Math.floor(e[1].time/ez)-Math.floor(e[0].time/ez)+1,i=new Date(e[0].time),a=i.getDate(),r=e[1].date.getDate();i.setDate(a+n-1);var o=i.getDate();if(o!==r)for(var s=i.getTime()-e[1].time>0?1:-1;(o=i.getDate())!==r&&(i.getTime()-e[1].time)*s>0;)n-=s,i.setDate(o-s);var l=Math.floor((n+e[0].day+6)/7),u=t?1-l:l-1;return t&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:n,weeks:l,nthWeek:u,fweek:e[0].day,lweek:e[1].day}},_getDateByWeeksAndDay:function(e,t,n){var i=this._getRangeInfo(n);if(e>i.weeks||0===e&&t<i.fweek||e===i.weeks&&t>i.lweek)return!1;var a=7*(e-1)-i.fweek+t,r=new Date(i.start.time);return r.setDate(i.start.d+a),this.getDateInfo(r)}},tz.dimensions=tz.prototype.dimensions,tz.getDimensionsInfo=tz.prototype.getDimensionsInfo,tz.create=function(e,t){var n=[];return e.eachComponent("calendar",(function(e){var t=new tz(e);n.push(t),e.coordinateSystem=t})),e.eachSeries((function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=n[e.get("calendarIndex")||0])})),n},Tf.register("calendar",tz);var iz=td.getLayoutParams,az=td.sizeCalculable,rz=td.mergeLayoutParam,oz=sd.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(e,t,n,i){var a=iz(e);oz.superApply(this,"init",arguments),sz(e,a)},mergeOption:function(e,t){oz.superApply(this,"mergeOption",arguments),sz(this.option,e)}});function sz(e,t){var n=e.cellSize;Fe.isArray(n)?1===n.length&&(n[1]=n[0]):n=e.cellSize=[n,n];var i=Fe.map([0,1],(function(e){return az(t,e)&&(n[e]="auto"),null!=n[e]&&"auto"!==n[e]}));rz(e,t,{type:"box",ignoreSize:i})}var lz={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},uz={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};jx.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(e,t,n){var i=this.group;i.removeAll();var a=e.coordinateSystem,r=a.getRangeInfo(),o=a.getOrient();this._renderDayRect(e,r,i),this._renderLines(e,r,o,i),this._renderYearText(e,r,o,i),this._renderMonthText(e,o,i),this._renderWeekText(e,r,o,i)},_renderDayRect:function(e,t,n){for(var i=e.coordinateSystem,a=e.getModel("itemStyle").getItemStyle(),r=i.getCellWidth(),o=i.getCellHeight(),s=t.start.time;s<=t.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new Jc.Rect({shape:{x:l[0],y:l[1],width:r,height:o},cursor:"default",style:a});n.add(u)}},_renderLines:function(e,t,n,i){var a=this,r=e.coordinateSystem,o=e.getModel("splitLine.lineStyle").getLineStyle(),s=e.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,c=0;u.time<=t.end.time;c++){d(u.formatedDate),0===c&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var h=u.date;h.setMonth(h.getMonth()+1),u=r.getDateInfo(h)}function d(t){a._firstDayOfMonth.push(r.getDateInfo(t)),a._firstDayPoints.push(r.dataToRect([t],!1).tl);var l=a._getLinePointsOfOneWeek(e,t,n);a._tlpoints.push(l[0]),a._blpoints.push(l[l.length-1]),s&&a._drawSplitline(l,o,i)}d(r.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,l,n),o,i),s&&this._drawSplitline(a._getEdgesPoints(a._blpoints,l,n),o,i)},_getEdgesPoints:function(e,t,n){var i=[e[0].slice(),e[e.length-1].slice()],a="horizontal"===n?0:1;return i[0][a]=i[0][a]-t/2,i[1][a]=i[1][a]+t/2,i},_drawSplitline:function(e,t,n){var i=new Jc.Polyline({z2:20,shape:{points:e},style:t});n.add(i)},_getLinePointsOfOneWeek:function(e,t,n){var i=e.coordinateSystem;t=i.getDateInfo(t);for(var a=[],r=0;r<7;r++){var o=i.getNextNDay(t.time,r),s=i.dataToRect([o.time],!1);a[2*o.day]=s.tl,a[2*o.day+1]=s["horizontal"===n?"bl":"tr"]}return a},_formatterLabel:function(e,t){return"string"==typeof e&&e?Fh.formatTplSimple(e,t):"function"==typeof e?e(t):t.nameMap},_yearTextPositionControl:function(e,t,n,i,a){t=t.slice();var r=["center","bottom"];"bottom"===i?(t[1]+=a,r=["center","top"]):"left"===i?t[0]-=a:"right"===i?(t[0]+=a,r=["center","top"]):t[1]-=a;var o=0;return"left"!==i&&"right"!==i||(o=Math.PI/2),{rotation:o,position:t,style:{textAlign:r[0],textVerticalAlign:r[1]}}},_renderYearText:function(e,t,n,i){var a=e.getModel("yearLabel");if(a.get("show")){var r=a.get("margin"),o=a.get("position");o||(o="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,h={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},d=t.start.y;+t.end.y>+t.start.y&&(d=d+"-"+t.end.y);var f=a.get("formatter"),p={start:t.start.y,end:t.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new Jc.Text({z2:30});Jc.setTextStyle(m.style,a,{text:g}),m.attr(this._yearTextPositionControl(m,h[o],n,o,r)),i.add(m)}},_monthTextPositionControl:function(e,t,n,i,a){var r="left",o="top",s=e[0],l=e[1];return"horizontal"===n?(l+=a,t&&(r="center"),"start"===i&&(o="bottom")):(s+=a,t&&(o="middle"),"start"===i&&(r="right")),{x:s,y:l,textAlign:r,textVerticalAlign:o}},_renderMonthText:function(e,t,n){var i=e.getModel("monthLabel");if(i.get("show")){var a=i.get("nameMap"),r=i.get("margin"),o=i.get("position"),s=i.get("align"),l=[this._tlpoints,this._blpoints];Fe.isString(a)&&(a=lz[a.toUpperCase()]||[]);var u="start"===o?0:1,c="horizontal"===t?0:1;r="start"===o?-r:r;for(var h="center"===s,d=0;d<l[u].length-1;d++){var f=l[u][d].slice(),p=this._firstDayOfMonth[d];if(h){var g=this._firstDayPoints[d];f[c]=(g[c]+l[0][d+1][c])/2}var m=i.get("formatter"),v=a[+p.m-1],y={yyyy:p.y,yy:(p.y+"").slice(2),MM:p.m,M:+p.m,nameMap:v},_=this._formatterLabel(m,y),x=new Jc.Text({z2:30});Fe.extend(Jc.setTextStyle(x.style,i,{text:_}),this._monthTextPositionControl(f,h,t,o,r)),n.add(x)}}},_weekTextPositionControl:function(e,t,n,i,a){var r="center",o="middle",s=e[0],l=e[1],u="start"===n;return"horizontal"===t?(s=s+i+(u?1:-1)*a[0]/2,r=u?"right":"left"):(l=l+i+(u?1:-1)*a[1]/2,o=u?"bottom":"top"),{x:s,y:l,textAlign:r,textVerticalAlign:o}},_renderWeekText:function(e,t,n,i){var a=e.getModel("dayLabel");if(a.get("show")){var r=e.coordinateSystem,o=a.get("position"),s=a.get("nameMap"),l=a.get("margin"),u=r.getFirstDayOfWeek();Fe.isString(s)&&(s=uz[s.toUpperCase()]||[]);var c=r.getNextNDay(t.end.time,7-t.lweek).time,h=[r.getCellWidth(),r.getCellHeight()];l=Ch.parsePercent(l,h["horizontal"===n?0:1]),"start"===o&&(c=r.getNextNDay(t.start.time,-(7+t.fweek)).time,l=-l);for(var d=0;d<7;d++){var f,p=r.getNextNDay(c,d),g=r.dataToRect([p.time],!1).center;f=Math.abs((d+u)%7);var m=new Jc.Text({z2:30});Fe.extend(Jc.setTextStyle(m.style,a,{text:s[f]}),this._weekTextPositionControl(g,n,o,l,h)),i.add(m)}}}});var cz=Ch.parsePercent,hz={path:null,compoundPath:null,group:Jc.Group,image:Jc.Image,text:Jc.Text};jx.registerPreprocessor((function(e){var t=e.graphic;Fe.isArray(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])}));var dz=jx.extendComponentModel({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(e){var t=this.option.elements;this.option.elements=null,dz.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(e,t){var n=this.option,i=(t?n:e).elements,a=n.elements=t?[]:n.elements,r=[];this._flatten(i,r);var o=Po.mappingToExists(a,r);Po.makeIdAndName(o);var s=this._elOptionsToUpdate=[];Fe.each(o,(function(e,t){var n=e.option;n&&(s.push(n),function(e,t){var n=e.exist;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),null==t.parentId){var i=t.parentOption;i?t.parentId=i.id:n&&(t.parentId=n.parentId)}t.parentOption=null}(e,n),function(e,t,n){var i=Fe.extend({},n),a=e[t],r=n.$action||"merge";"merge"===r?a?(Fe.merge(a,i,!0),td.mergeLayoutParam(a,i,{ignoreSize:!0}),td.copyLayoutParams(n,a)):e[t]=i:"replace"===r?e[t]=i:"remove"===r&&a&&(e[t]=null)}(a,t,n),function(e,t){if(!e)return;e.hv=t.hv=[gz(t,["left","right"]),gz(t,["top","bottom"])],"group"===e.type&&(null==e.width&&(e.width=t.width=0),null==e.height&&(e.height=t.height=0))}(a[t],n))}),this);for(var l=a.length-1;l>=0;l--)null==a[l]?a.splice(l,1):delete a[l].$action},_flatten:function(e,t,n){Fe.each(e,(function(e){if(e){n&&(e.parentOption=n),t.push(e);var i=e.children;"group"===e.type&&i&&this._flatten(i,t,e),delete e.children}}),this)},useElOptionsToUpdate:function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e}});function fz(e,t,n,i){var a=n.type,r=new(hz.hasOwnProperty(a)?hz[a]:Jc.getShapeClass(a))(n);t.add(r),i.set(e,r),r.__ecGraphicId=e}function pz(e,t){var n=e&&e.parent;n&&("group"===e.type&&e.traverse((function(e){pz(e,t)})),t.removeKey(e.__ecGraphicId),n.remove(e))}function gz(e,t){var n;return Fe.each(t,(function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)})),n}jx.extendComponentView({type:"graphic",init:function(e,t){this._elMap=Fe.createHashMap(),this._lastGraphicModel},render:function(e,t,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)},_updateElements:function(e){var t=e.useElOptionsToUpdate();if(t){var n=this._elMap,i=this.group;Fe.each(t,(function(t){var a=t.$action,r=t.id,o=n.get(r),s=t.parentId,l=null!=s?n.get(s):i,u=t.style;"text"===t.type&&u&&(t.hv&&t.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var c=function(e){return e=Fe.extend({},e),Fe.each(["id","parentId","$action","hv","bounding"].concat(td.LOCATION_PARAMS),(function(t){delete e[t]})),e}(t);a&&"merge"!==a?"replace"===a?(pz(o,n),fz(r,l,c,n)):"remove"===a&&pz(o,n):o?o.attr(c):fz(r,l,c,n);var h=n.get(r);h&&(h.__ecGraphicWidthOption=t.width,h.__ecGraphicHeightOption=t.height,function(e,t){var n=e.eventData;e.silent||e.ignore||n||(n=e.eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name});n&&(n.info=e.info)}(h,e))}))}},_relocate:function(e,t){for(var n=e.option.elements,i=this.group,a=this._elMap,r=t.getWidth(),o=t.getHeight(),s=0;s<n.length;s++){var l=n[s];if((c=a.get(l.id))&&c.isGroup){var u=(h=c.parent)===i;c.__ecGraphicWidth=cz(c.__ecGraphicWidthOption,u?r:h.__ecGraphicWidth)||0,c.__ecGraphicHeight=cz(c.__ecGraphicHeightOption,u?o:h.__ecGraphicHeight)||0}}for(s=n.length-1;s>=0;s--){var c;l=n[s];if(c=a.get(l.id)){var h,d=(h=c.parent)===i?{width:r,height:o}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight};td.positionElement(c,l,d,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var e=this._elMap;e.each((function(t){pz(t,e)})),this._elMap=Fe.createHashMap()},dispose:function(){this._clear()}});var mz={};var vz={register:function(e,t){mz[e]=t},get:function(e){return mz[e]}},yz=jx.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){yz.superApply(this,"optionUpdated",arguments),Fe.each(this.option.feature,(function(e,t){var n=vz.get(t);n&&Fe.merge(e,n.defaultOption)}))},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}}),_z=td.getLayoutRect,xz=td.box,bz=td.positionElement;var wz=function(e,t){var n=Fh.normalizeCssArray(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),e=new Jc.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})},Sz={layout:function(e,t,n){var i=t.getBoxLayoutParams(),a=t.get("padding"),r={width:n.getWidth(),height:n.getHeight()},o=_z(i,r,a);xz(t.get("orient"),e,t.get("itemGap"),o.width,o.height),bz(e,i,r,a)},makeBackground:wz};jx.extendComponentView({type:"toolbox",render:function(e,t,n,i){var a=this.group;if(a.removeAll(),e.get("show")){var r=+e.get("itemSize"),o=e.get("feature")||{},s=this._features||(this._features={}),l=[];Fe.each(o,(function(e,t){l.push(t)})),new Jm(this._featureNames||[],l).add(u).update(u).remove(Fe.curry(u,null)).execute(),this._featureNames=l,Sz.layout(a,e,n),a.add(Sz.makeBackground(a.getBoundingRect(),e)),a.eachChild((function(e){var t=e.__title,i=e.hoverStyle;if(i&&t){var o=Ga.getBoundingRect(t,Ga.makeFont(i)),s=e.position[0]+a.position[0],l=!1;e.position[1]+a.position[1]+r+o.height>n.getHeight()&&(i.textPosition="top",l=!0);var u=l?-5-o.height:r+8;s+o.width/2>n.getWidth()?(i.textPosition=["100%",u],i.textAlign="right"):s-o.width/2<0&&(i.textPosition=[0,u],i.textAlign="left")}}))}function u(u,c){var h,d=l[u],f=l[c],p=o[d],g=new ph(p,e,e.ecModel);if(i&&null!=i.newTitle&&i.featureName===d&&(p.title=i.newTitle),d&&!f){if(function(e){return 0===e.indexOf("my")}(d))h={model:g,onclick:g.option.onclick,featureName:d};else{var m=vz.get(d);if(!m)return;h=new m(g,t,n)}s[d]=h}else{if(!(h=s[f]))return;h.model=g,h.ecModel=t,h.api=n}d||!f?g.get("show")&&!h.unusable?(!function(i,o,s){var l=i.getModel("iconStyle"),u=i.getModel("emphasis.iconStyle"),c=o.getIcons?o.getIcons():i.get("icon"),h=i.get("title")||{};if("string"==typeof c){var d=c,f=h;h={},(c={})[s]=d,h[s]=f}var p=i.iconPaths={};Fe.each(c,(function(s,c){var d=Jc.createIcon(s,{},{x:-r/2,y:-r/2,width:r,height:r});d.setStyle(l.getItemStyle()),d.hoverStyle=u.getItemStyle(),d.setStyle({text:h[c],textAlign:u.get("textAlign"),textBorderRadius:u.get("textBorderRadius"),textPadding:u.get("textPadding"),textFill:null});var f=e.getModel("tooltip");f&&f.get("show")&&d.attr("tooltip",Fe.extend({content:h[c],formatter:f.get("formatter",!0)||function(){return h[c]},formatterParams:{componentType:"toolbox",name:c,title:h[c],$vars:["name","title"]},position:f.get("position",!0)||"bottom"},f.option)),Jc.setHoverStyle(d),e.get("showTitle")&&(d.__title=h[c],d.on("mouseover",(function(){var t=u.getItemStyle(),n="vertical"===e.get("orient")?null==e.get("right")?"right":"left":null==e.get("bottom")?"bottom":"top";d.setStyle({textFill:u.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:u.get("textBackgroundColor"),textPosition:u.get("textPosition")||n})})).on("mouseout",(function(){d.setStyle({textFill:null,textBackgroundColor:null})}))),d.trigger(i.get("iconStatus."+c)||"normal"),a.add(d),d.on("click",Fe.bind(o.onclick,o,t,n,c)),p[c]=d}))}(g,h,d),g.setIconStatus=function(e,t){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,i[e]&&i[e].trigger(t)},h.render&&h.render(g,t,n,i)):h.remove&&h.remove(t,n):h.dispose&&h.dispose(t,n)}},updateView:function(e,t,n,i){Fe.each(this._features,(function(e){e.updateView&&e.updateView(e.model,t,n,i)}))},remove:function(e,t){Fe.each(this._features,(function(n){n.remove&&n.remove(e,t)})),this.group.removeAll()},dispose:function(e,t){Fe.each(this._features,(function(n){n.dispose&&n.dispose(e,t)}))}});var Mz=Og.toolbox.saveAsImage;function Tz(e){this.model=e}Tz.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:Mz.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:Mz.lang.slice()},Tz.prototype.unusable=!re.canvasSupported,Tz.prototype.onclick=function(e,t){var n=this.model,i=n.get("name")||e.get("title.0.text")||"echarts",a="svg"===t.getZr().painter.getType()?"svg":n.get("type",!0)||"png",r=t.getConnectedDataURL({type:a,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||re.browser.ie||re.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var o=atob(r.split(",")[1]),s=o.length,l=new Uint8Array(s);s--;)l[s]=o.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,i+"."+a)}else{var c=n.get("lang"),h='<body style="margin:0;"><img src="'+r+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>';window.open().document.write(h)}else{var d=document.createElement("a");d.download=i+"."+a,d.target="_blank",d.href=r;var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(f)}},vz.register("saveAsImage",Tz);var Iz=Og.toolbox.magicType,Az="__ec_magicType_stack__";function Dz(e){this.model=e}Dz.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:Fe.clone(Iz.title),option:{},seriesIndex:{}};var Cz=Dz.prototype;Cz.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return Fe.each(e.get("type"),(function(e){t[e]&&(n[e]=t[e])})),n};var Oz={line:function(e,t,n,i){if("bar"===e)return Fe.merge({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.line")||{},!0)},bar:function(e,t,n,i){if("line"===e)return Fe.merge({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.bar")||{},!0)},stack:function(e,t,n,i){var a=n.get("stack")===Az;if("line"===e||"bar"===e)return i.setIconStatus("stack",a?"normal":"emphasis"),Fe.merge({id:t,stack:a?"":Az},i.get("option.stack")||{},!0)}},kz=[["line","bar"],["stack"]];Cz.onclick=function(e,t,n){var i=this.model,a=i.get("seriesIndex."+n);if(Oz[n]){var r,o={series:[]};if(Fe.each(kz,(function(e){Fe.indexOf(e,n)>=0&&Fe.each(e,(function(e){i.setIconStatus(e,"normal")}))})),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},(function(t){var a=t.subType,r=t.id,s=Oz[n](a,r,t,i);s&&(Fe.defaults(s,t.option),o.series.push(s));var l=t.coordinateSystem;if(l&&"cartesian2d"===l.type&&("line"===n||"bar"===n)){var u=l.getAxesByScale("ordinal")[0];if(u){var c=u.dim+"Axis",h=e.queryComponents({mainType:c,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;o[c]=o[c]||[];for(var d=0;d<=h;d++)o[c][h]=o[c][h]||{};o[c][h].boundaryGap="bar"===n}}})),"stack"===n)r=o.series&&o.series[0]&&o.series[0].stack===Az?Fe.merge({stack:Iz.title.tiled},Iz.title):Fe.clone(Iz.title);t.dispatchAction({type:"changeMagicType",currentType:n,newOption:o,newTitle:r,featureName:"magicType"})}},jx.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)})),vz.register("magicType",Dz);var Lz=Og.toolbox.dataView,Ez=new Array(60).join("-"),Nz="\t";function Pz(e){return Fe.map(e,(function(e){var t=e.getRawData(),n=[e.name],i=[];return t.each(t.dimensions,(function(){for(var e=arguments.length,a=arguments[e-1],r=t.getName(a),o=0;o<e-1;o++)i[o]=arguments[o];n.push((r?r+Nz:"")+i.join(Nz))})),n.join("\n")})).join("\n\n"+Ez+"\n\n")}function Rz(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var zz=new RegExp("[\t]+","g");function Bz(e,t){var n=e.split(new RegExp("\n*"+Ez+"\n*","g")),i={series:[]};return Fe.each(n,(function(e,n){if(function(e){if(e.slice(0,e.indexOf("\n")).indexOf(Nz)>=0)return!0}(e)){var a=function(e){for(var t=e.split(/\n+/g),n=Rz(t.shift()).split(zz),i=[],a=Fe.map(n,(function(e){return{name:e,data:[]}})),r=0;r<t.length;r++){var o=Rz(t[r]).split(zz);i.push(o.shift());for(var s=0;s<o.length;s++)a[s]&&(a[s].data[r]=o[s])}return{series:a,categories:i}}(e),r=t[n],o=r.axisDim+"Axis";r&&(i[o]=i[o]||[],i[o][r.axisIndex]={data:a.categories},i.series=i.series.concat(a.series))}else{a=function(e){for(var t=e.split(/\n+/g),n=Rz(t.shift()),i=[],a=0;a<t.length;a++){var r,o=Rz(t[a]).split(zz),s="",l=!1;isNaN(o[0])?(l=!0,s=o[0],o=o.slice(1),i[a]={name:s,value:[]},r=i[a].value):r=i[a]=[];for(var u=0;u<o.length;u++)r.push(+o[u]);1===r.length&&(l?i[a].value=r[0]:i[a]=r[0])}return{name:n,data:i}}(e);i.series.push(a)}})),i}function Vz(e){this._dom=null,this.model=e}function Hz(e,t){return Fe.map(e,(function(e,n){var i=t&&t[n];return Fe.isObject(i)&&!Fe.isArray(i)?(Fe.isObject(e)&&!Fe.isArray(e)&&(e=e.value),Fe.defaults({value:e},i)):e}))}Vz.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:Fe.clone(Lz.title),lang:Fe.clone(Lz.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},Vz.prototype.onclick=function(e,t){var n=t.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=i.get("backgroundColor")||"#fff";var r=document.createElement("h4"),o=i.get("lang")||[];r.innerHTML=o[0]||i.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=i.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=i.get("optionToContent"),c=i.get("contentToOption"),h=function(e){var t,n,i=function(e){var t={},n=[],i=[];return e.eachRawSeries((function(e){var a=e.coordinateSystem;if(!a||"cartesian2d"!==a.type&&"polar"!==a.type)n.push(e);else{var r=a.getBaseAxis();if("category"===r.type){var o=r.dim+"_"+r.index;t[o]||(t[o]={categoryAxis:r,valueAxis:a.getOtherAxis(r),series:[]},i.push({axisDim:r.dim,axisIndex:r.index})),t[o].series.push(e)}else n.push(e)}})),{seriesGroupByCategoryAxis:t,other:n,meta:i}}(e);return{value:Fe.filter([(t=i.seriesGroupByCategoryAxis,n=[],Fe.each(t,(function(e,t){var i=e.categoryAxis,a=e.valueAxis.dim,r=[" "].concat(Fe.map(e.series,(function(e){return e.name}))),o=[i.model.getCategories()];Fe.each(e.series,(function(e){o.push(e.getRawData().mapArray(a,(function(e){return e})))}));for(var s=[r.join(Nz)],l=0;l<o[0].length;l++){for(var u=[],c=0;c<o.length;c++)u.push(o[c][l]);s.push(u.join(Nz))}n.push(s.join("\n"))})),n.join("\n\n"+Ez+"\n\n")),Pz(i.other)],(function(e){return e.replace(/[\n\t\s]/g,"")})).join("\n\n"+Ez+"\n\n"),meta:i.meta}}(e);if("function"==typeof u){var d=u(t.getOption());"string"==typeof d?s.innerHTML=d:Fe.isDom(d)&&s.appendChild(d)}else s.appendChild(l),l.readOnly=i.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=i.get("textColor"),l.style.borderColor=i.get("textareaBorderColor"),l.style.backgroundColor=i.get("textareaColor"),l.value=h.value;var f=h.meta,p=document.createElement("div");p.style.cssText="position:absolute;bottom:0;left:0;right:0;";var g="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),v=document.createElement("div");g+=";background-color:"+i.get("buttonColor"),g+=";color:"+i.get("buttonTextColor");var y=this;function _(){n.removeChild(a),y._dom=null}Bt.addEventListener(m,"click",_),Bt.addEventListener(v,"click",(function(){var e;try{e="function"==typeof c?c(s,t.getOption()):Bz(l.value,f)}catch(e){throw _(),new Error("Data view format error "+e)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),_()})),m.innerHTML=o[1],v.innerHTML=o[2],v.style.cssText=g,m.style.cssText=g,!i.get("readOnly")&&p.appendChild(v),p.appendChild(m),a.appendChild(r),a.appendChild(s),a.appendChild(p),s.style.height=n.clientHeight-80+"px",n.appendChild(a),this._dom=a},Vz.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},Vz.prototype.dispose=function(e,t){this.remove(e,t)},vz.register("dataView",Vz),jx.registerAction({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(e,t){var n=[];Fe.each(e.newOption.series,(function(e){var i=t.getSeriesByName(e.name)[0];if(i){var a=i.get("data");n.push({name:e.name,data:Hz(e.data,a)})}else n.push(Fe.extend({type:"scatter"},e))})),t.mergeOption(Fe.defaults({series:n},e.newOption))}));var Yz=Fe.each,Fz=Fe.indexOf,Gz=Fe.curry,Wz=["dataToPoint","pointToData"],jz=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function Uz(e,t,n){var i=this._targetInfoList=[],a={},r=qz(t,e);Yz(Kz,(function(e,t){(!n||!n.include||Fz(n.include,t)>=0)&&e(r,i,a)}))}var Zz=Uz.prototype;function Xz(e){return e[0]>e[1]&&e.reverse(),e}function qz(e,t){return Po.parseFinder(e,t,{includeMainTypes:jz})}Zz.setOutputRanges=function(e,t){this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var i=Jz[e.brushType](0,n,t);e.__rangeOffset={offset:tB[e.brushType](i.values,e.range,[1,1]),xyMinMax:i.xyMinMax}}}))},Zz.matchOutputRanges=function(e,t,n){Yz(e,(function(e){var i=this.findTargetInfo(e,t);i&&!0!==i&&Fe.each(i.coordSyses,(function(i){var a=Jz[e.brushType](1,i,e.range);n(e,a.values,i,t)}))}),this)},Zz.setInputRanges=function(e,t){Yz(e,(function(e){var n,i,a,r,o,s=this.findTargetInfo(e,t);if(e.range=e.range||[],s&&!0!==s){e.panelId=s.panelId;var l=Jz[e.brushType](0,s.coordSys,e.coordRange),u=e.__rangeOffset;e.range=u?tB[e.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,a=iB(n),r=iB(i),o=[a[0]/r[0],a[1]/r[1]],isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o)):l.values}}),this)},Zz.makePanelOpts=function(e,t){return Fe.map(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t&&t(n),clipPath:Lk.makeRectPanelClipPath(i),isTargetByCursor:Lk.makeRectIsTargetByCursor(i,e,n.coordSysModel),getLinearBrushOtherExtent:Lk.makeLinearBrushOtherExtent(i)}}))},Zz.controlSeries=function(e,t,n){var i=this.findTargetInfo(e,n);return!0===i||i&&Fz(i.coordSyses,t.coordinateSystem)>=0},Zz.findTargetInfo=function(e,t){for(var n=this._targetInfoList,i=qz(t,e),a=0;a<n.length;a++){var r=n[a],o=e.panelId;if(o){if(r.panelId===o)return r}else for(a=0;a<$z.length;a++)if($z[a](i,r))return r}return!0};var Kz={grid:function(e,t){var n=e.xAxisModels,i=e.yAxisModels,a=e.gridModels,r=Fe.createHashMap(),o={},s={};(n||i||a)&&(Yz(n,(function(e){var t=e.axis.grid.model;r.set(t.id,t),o[t.id]=!0})),Yz(i,(function(e){var t=e.axis.grid.model;r.set(t.id,t),s[t.id]=!0})),Yz(a,(function(e){r.set(e.id,e),o[e.id]=!0,s[e.id]=!0})),r.each((function(e){var a=e.coordinateSystem,r=[];Yz(a.getCartesians(),(function(e,t){(Fz(n,e.getAxis("x").model)>=0||Fz(i,e.getAxis("y").model)>=0)&&r.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:r[0],coordSyses:r,getPanelRect:Qz.grid,xAxisDeclared:o[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){Yz(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:Qz.geo})}))}},$z=[function(e,t){var n=e.xAxisModel,i=e.yAxisModel,a=e.gridModel;return!a&&n&&(a=n.axis.grid.model),!a&&i&&(a=i.axis.grid.model),a&&a===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],Qz={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(Jc.getTransform(e)),t}},Jz={lineX:Gz(eB,0),lineY:Gz(eB,1),rect:function(e,t,n){var i=t[Wz[e]]([n[0][0],n[1][0]]),a=t[Wz[e]]([n[0][1],n[1][1]]),r=[Xz([i[0],a[0]]),Xz([i[1],a[1]])];return{values:r,xyMinMax:r}},polygon:function(e,t,n){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:Fe.map(n,(function(n){var a=t[Wz[e]](n);return i[0][0]=Math.min(i[0][0],a[0]),i[1][0]=Math.min(i[1][0],a[1]),i[0][1]=Math.max(i[0][1],a[0]),i[1][1]=Math.max(i[1][1],a[1]),a})),xyMinMax:i}}};function eB(e,t,n,i){var a=n.getAxis(["x","y"][e]),r=Xz(Fe.map([0,1],(function(e){return t?a.coordToData(a.toLocalCoord(i[e])):a.toGlobalCoord(a.dataToCoord(i[e]))}))),o=[];return o[e]=r,o[1-e]=[NaN,NaN],{values:r,xyMinMax:o}}var tB={lineX:Gz(nB,0),lineY:Gz(nB,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return Fe.map(e,(function(e,i){return[e[0]-n[0]*t[i][0],e[1]-n[1]*t[i][1]]}))}};function nB(e,t,n,i){return[t[0]-i[e]*n[0],t[1]-i[e]*n[1]]}function iB(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var aB=Uz,rB=Fe.each,oB="\0_ec_hist_store";function sB(e){var t=e[oB];return t||(t=e[oB]=[{}]),t}var lB=function(e,t){var n=sB(e);rB(t,(function(t,i){for(var a=n.length-1;a>=0;a--){if(n[a][i])break}if(a<0){var r=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(r){var o=r.getPercentRange();n[0][i]={dataZoomId:i,start:o[0],end:o[1]}}}})),n.push(t)},uB=function(e){var t=sB(e),n=t[t.length-1];t.length>1&&t.pop();var i={};return rB(n,(function(e,n){for(var a=t.length-1;a>=0;a--){if(e=t[a][n]){i[n]=e;break}}})),i},cB={push:lB,pop:uB,clear:function(e){e[oB]=null},count:function(e){return sB(e).length}};sd.registerSubTypeDefaulter("dataZoom",(function(){return"slider"}));var hB=["cartesian2d","polar","singleAxis"];function dB(e,t){e=e.slice();var n=Fe.map(e,Fh.capitalFirst);t=(t||[]).slice();var i=Fe.map(t,Fh.capitalFirst);return function(a,r){Fe.each(e,(function(e,o){for(var s={name:e,capital:n[o]},l=0;l<t.length;l++)s[t[l]]=e+i[l];a.call(r,s)}))}}var fB=dB(["x","y","z","radius","angle","single"],["axisIndex","axis","index","id"]);var pB={isCoordSupported:function(e){return Fe.indexOf(hB,e)>=0},createNameEach:dB,eachAxisDim:fB,createLinkedNodesFinder:function(e,t,n){return function(a){var r,o={nodes:[],records:{}};if(t((function(e){o.records[e.name]={}})),!a)return o;i(a,o);do{r=!1,e(s)}while(r);function s(e){!function(e,t){return Fe.indexOf(t.nodes,e)>=0}(e,o)&&function(e,i){var a=!1;return t((function(t){Fe.each(n(e,t)||[],(function(e){i.records[t.name][e]&&(a=!0)}))})),a}(e,o)&&(i(e,o),r=!0)}return o};function i(e,i){i.nodes.push(e),t((function(t){Fe.each(n(e,t)||[],(function(e){i.records[t.name][e]=!0}))}))}}},gB=Fe.each,mB=Ch.asc,vB=function(e,t,n,i){this._dimName=e,this._axisIndex=t,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=i,this._dataZoomModel=n};function yB(e,t){var n=e.getAxisModel(),i=e._percentWindow,a=e._valueWindow;if(i){var r=Ch.getPixelPrecision(a,[0,500]);r=Math.min(r,20);var o=t||0===i[0]&&100===i[1];n.setRange(o?null:+a[0].toFixed(r),o?null:+a[1].toFixed(r))}}vB.prototype={constructor:vB,hostedBy:function(e){return this._dataZoomModel===e},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var e=[],t=this.ecModel;return t.eachSeries((function(n){if(pB.isCoordSupported(n.get("coordinateSystem"))){var i=this._dimName,a=t.queryComponents({mainType:i+"Axis",index:n.get(i+"AxisIndex"),id:n.get(i+"AxisId")})[0];this._axisIndex===(a&&a.componentIndex)&&e.push(n)}}),this),e},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var e,t,n,i=this._dimName,a=this.ecModel,r=this.getAxisModel();return"x"===i||"y"===i?(t="gridIndex",e="x"===i?"y":"x"):(t="polarIndex",e="angle"===i?"radius":"angle"),a.eachComponent(e+"Axis",(function(e){(e.get(t)||0)===(r.get(t)||0)&&(n=e)})),n},getMinMaxSpan:function(){return Fe.clone(this._minMaxSpan)},calculateDataWindow:function(e){var t,n=this._dataExtent,i=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),r=[0,100],o=[],s=[];gB(["start","end"],(function(l,u){var c=e[l],h=e[l+"Value"];"percent"===a[u]?(null==c&&(c=r[u]),h=i.parse(Ch.linearMap(c,r,n))):(t=!0,h=null==h?n[u]:i.parse(h),c=Ch.linearMap(h,n,r)),s[u]=h,o[u]=c})),mB(s),mB(o);var l=this._minMaxSpan;function u(e,t,n,a,r){var o=r?"Span":"ValueSpan";IO(0,e,n,"all",l["min"+o],l["max"+o]);for(var s=0;s<2;s++)t[s]=Ch.linearMap(e[s],n,a,!0),r&&(t[s]=i.parse(t[s]))}return t?u(s,o,n,r,!1):u(o,s,r,n,!0),{valueWindow:s,percentWindow:o}},reset:function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var i=[1/0,-1/0];gB(n,(function(e){var n=e.getData();n&&gB(n.mapDimension(t,!0),(function(e){var t=n.getApproximateExtent(e);t[0]<i[0]&&(i[0]=t[0]),t[1]>i[1]&&(i[1]=t[1])}))})),i[1]<i[0]&&(i=[NaN,NaN]);return function(e,t){var n=e.getAxisModel(),i=n.getMin(!0),a="category"===n.get("type"),r=a&&n.getCategories().length;null!=i&&"dataMin"!==i&&"function"!=typeof i?t[0]=i:a&&(t[0]=r>0?0:NaN);var o=n.getMax(!0);null!=o&&"dataMax"!==o&&"function"!=typeof o?t[1]=o:a&&(t[1]=r>0?r-1:NaN);n.get("scale",!0)||(t[0]>0&&(t[0]=0),t[1]<0&&(t[1]=0))}(e,i),i}(this,this._dimName,t),function(e){var t=e._minMaxSpan={},n=e._dataZoomModel,i=e._dataExtent;gB(["min","max"],(function(a){var r=n.get(a+"Span"),o=n.get(a+"ValueSpan");null!=o&&(o=e.getAxisModel().axis.scale.parse(o)),null!=o?r=Ch.linearMap(i[0]+o,i,[0,100],!0):null!=r&&(o=Ch.linearMap(r,[0,100],i,!0)-i[0]),t[a+"Span"]=r,t[a+"ValueSpan"]=o}))}(this);var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,yB(this)}},restore:function(e){e===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,yB(this,!0))},filterData:function(e,t){if(e===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),a=e.get("filterMode"),r=this._valueWindow;"none"!==a&&gB(i,(function(e){var t=e.getData(),i=t.mapDimension(n,!0);i.length&&("weakFilter"===a?t.filterSelf((function(e){for(var n,a,o,s=0;s<i.length;s++){var l=t.get(i[s],e),u=!isNaN(l),c=l<r[0],h=l>r[1];if(u&&!c&&!h)return!0;u&&(o=!0),c&&(n=!0),h&&(a=!0)}return o&&n&&a})):gB(i,(function(n){if("empty"===a)e.setData(t=t.map(n,(function(e){return function(e){return e>=r[0]&&e<=r[1]}(e)?e:NaN})));else{var i={};i[n]=r,t.selectRange(i)}})),gB(i,(function(e){t.setApproximateExtent(r,e)})))}))}}};var _B=vB,xB=Fe.each,bB=pB.eachAxisDim,wB=jx.extendComponentModel({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(e,t,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=SB(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this.doInit(i)},mergeOption:function(e){var t=SB(e);Fe.merge(this.option,e,!0),Fe.merge(this.settledOption,t,!0),this.doInit(t)},doInit:function(e){var t=this.option;re.canvasSupported||(t.realtime=!1),this._setDefaultThrottle(e),MB(this,e);var n=this.settledOption;xB([["start","startValue"],["end","endValue"]],(function(e,i){"value"===this._rangePropMode[i]&&(t[e[0]]=n[e[0]]=null)}),this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var e=this._axisProxies;this.eachTargetAxis((function(t,n,i,a){var r=this.dependentModels[t.axis][n],o=r.__dzAxisProxy||(r.__dzAxisProxy=new _B(t.name,n,this,a));e[t.name+"_"+n]=o}),this)},_resetTarget:function(){var e=this.option,t=this._judgeAutoMode();bB((function(t){var n=t.axisIndex;e[n]=Po.normalizeToArray(e[n])}),this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,t=!1;bB((function(n){null!=e[n.axisIndex]&&(t=!0)}),this);var n=e.orient;return null==n&&t?"orient":t?void 0:(null==n&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var e=!0,t=this.get("orient",!0),n=this.option,i=this.dependentModels;if(e){var a="vertical"===t?"y":"x";i[a+"Axis"].length?(n[a+"AxisIndex"]=[0],e=!1):xB(i.singleAxis,(function(i){e&&i.get("orient",!0)===t&&(n.singleAxisIndex=[i.componentIndex],e=!1)}))}e&&bB((function(t){if(e){var i=[],a=this.dependentModels[t.axis];if(a.length&&!i.length)for(var r=0,o=a.length;r<o;r++)"category"===a[r].get("type")&&i.push(r);n[t.axisIndex]=i,i.length&&(e=!1)}}),this),e&&this.ecModel.eachSeries((function(e){this._isSeriesHasAllAxesTypeOf(e,"value")&&bB((function(t){var i=n[t.axisIndex],a=e.get(t.axisIndex),r=e.get(t.axisId);a=e.ecModel.queryComponents({mainType:t.axis,index:a,id:r})[0].componentIndex,Fe.indexOf(i,a)<0&&i.push(a)}))}),this)},_autoSetOrient:function(){var e;this.eachTargetAxis((function(t){!e&&(e=t.name)}),this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(e,t){var n=!0;return bB((function(i){var a=e.get(i.axisIndex),r=this.dependentModels[i.axis][a];r&&r.get("type")===t||(n=!1)}),this),n},_setDefaultThrottle:function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&t.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var e;return bB((function(t){if(null==e){var n=this.get(t.axisIndex);n.length&&(e=this.dependentModels[t.axis][n[0]])}}),this),e},eachTargetAxis:function(e,t){var n=this.ecModel;bB((function(i){xB(this.get(i.axisIndex),(function(a){e.call(t,i,a,this,n)}),this)}),this)},getAxisProxy:function(e,t){return this._axisProxies[e+"_"+t]},getAxisModel:function(e,t){var n=this.getAxisProxy(e,t);return n&&n.getAxisModel()},setRawRange:function(e){var t=this.option,n=this.settledOption;xB([["start","startValue"],["end","endValue"]],(function(i){null==e[i[0]]&&null==e[i[1]]||(t[i[0]]=n[i[0]]=e[i[0]],t[i[1]]=n[i[1]]=e[i[1]])}),this),MB(this,e)},setCalculatedRange:function(e){var t=this.option;xB(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},getPercentRange:function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},getValueRange:function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(e){if(e)return e.__dzAxisProxy;var t=this._axisProxies;for(var n in t)if(t.hasOwnProperty(n)&&t[n].hostedBy(this))return t[n];for(var n in t)if(t.hasOwnProperty(n)&&!t[n].hostedBy(this))return t[n]},getRangePropMode:function(){return this._rangePropMode.slice()}});function SB(e){var t={};return xB(["start","end","startValue","endValue","throttle"],(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function MB(e,t){var n=e._rangePropMode,i=e.get("rangeMode");xB([["start","startValue"],["end","endValue"]],(function(e,a){var r=null!=t[e[0]],o=null!=t[e[1]];r&&!o?n[a]="percent":!r&&o?n[a]="value":i?n[a]=i[a]:r&&(n[a]="percent")}))}var TB=wB,IB=sg.extend({type:"dataZoom",render:function(e,t,n,i){this.dataZoomModel=e,this.ecModel=t,this.api=n},getTargetCoordInfo:function(){var e=this.dataZoomModel,t=this.ecModel,n={};return e.eachTargetAxis((function(e,i){var a=t.getComponent(e.axis,i);if(a){var r=a.getCoordSysModel();r&&function(e,t,n,i){for(var a,r=0;r<n.length;r++)if(n[r].model===e){a=n[r];break}a||n.push(a={model:e,axisModels:[],coordIndex:i});a.axisModels.push(t)}(r,a,n[r.mainType]||(n[r.mainType]=[]),r.componentIndex)}}),this),n}}),AB=IB;TB.extend({type:"dataZoom.select"}),AB.extend({type:"dataZoom.select"});var DB=Fe.createHashMap,CB=Fe.each;jx.registerProcessor({getTargetSeries:function(e){var t=DB();return e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(e,n,i){var a=i.getAxisProxy(e.name,n);CB(a.getTargetSeriesModels(),(function(e){t.set(e.uid,e)}))}))})),t},modifyOutputEnd:!0,overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(e,n,i){i.getAxisProxy(e.name,n).reset(i,t)})),e.eachTargetAxis((function(e,n,i){i.getAxisProxy(e.name,n).filterData(i,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy(),n=t.getDataPercentWindow(),i=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}))}}),jx.registerAction("dataZoom",(function(e,t){var n=pB.createLinkedNodesFinder(Fe.bind(t.eachComponent,t,"dataZoom"),pB.eachAxisDim,(function(e,t){return e.get(t.axisIndex)})),i=[];t.eachComponent({mainType:"dataZoom",query:e},(function(e,t){i.push.apply(i,n(e).nodes)})),Fe.each(i,(function(t,n){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}));var OB=Og.toolbox.dataZoom,kB=Fe.each;function LB(e,t,n){(this._brushController=new Dk(n.getZr())).on("brush",Fe.bind(this._onBrush,this)).mount(),this._isZoomActive}LB.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:Fe.clone(OB.title)};var EB=LB.prototype;EB.render=function(e,t,n,i){this.model=e,this.ecModel=t,this.api=n,function(e,t,n,i,a){var r=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(r="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=r,e.setIconStatus("zoom",r?"emphasis":"normal");var o=new aB(PB(e.option),t,{include:["grid"]});n._brushController.setPanels(o.makePanelOpts(a,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}))).enableBrush(!!r&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(e,t,this,i,n),function(e,t){e.setIconStatus("back",cB.count(t)>1?"emphasis":"normal")}(e,t)},EB.onclick=function(e,t,n){NB[n].call(this)},EB.remove=function(e,t){this._brushController.unmount()},EB.dispose=function(e,t){this._brushController.dispose()};var NB={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(cB.pop(this.ecModel))}};function PB(e){var t={};return Fe.each(["xAxisIndex","yAxisIndex"],(function(n){t[n]=e[n],null==t[n]&&(t[n]="all"),(!1===t[n]||"none"===t[n])&&(t[n]=[])})),t}EB._onBrush=function(e,t){if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new aB(PB(this.model.option),i,{include:["grid"]}).matchOutputRanges(e,i,(function(e,t,n){if("cartesian2d"===n.type){var i=e.brushType;"rect"===i?(a("x",n,t[0]),a("y",n,t[1])):a({lineX:"x",lineY:"y"}[i],n,t)}})),cB.push(i,n),this._dispatchZoomAction(n)}function a(e,t,a){var r=t.getAxis(e),o=r.model,s=function(e,t,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(e,t.componentIndex)&&(i=n)})),i}(e,o,i),l=s.findRepresentativeAxisProxy(o).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(a=IO(0,a.slice(),r.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:a[0],endValue:a[1]})}},EB._dispatchZoomAction=function(e){var t=[];kB(e,(function(e,n){t.push(Fe.clone(e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},vz.register("dataZoom",LB),jx.registerPreprocessor((function(e){if(e){var t=e.dataZoom||(e.dataZoom=[]);Fe.isArray(t)||(e.dataZoom=t=[t]);var n=e.toolbox;if(n&&(Fe.isArray(n)&&(n=n[0]),n&&n.feature)){var i=n.feature.dataZoom;a("xAxis",i),a("yAxis",i)}}function a(n,i){if(i){var a=n+"Index",r=i[a];null==r||"all"===r||Fe.isArray(r)||(r=!1===r||"none"===r?[]:[r]),function(t,n){var i=e[t];Fe.isArray(i)||(i=i?[i]:[]);kB(i,n)}(n,(function(e,o){if(null==r||"all"===r||-1!==Fe.indexOf(r,o)){var s={type:"select",$fromToolbox:!0,filterMode:i.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+n+o};s[a]=o,t.push(s)}}))}}}));var RB=Og.toolbox.restore;function zB(e){this.model=e}zB.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:RB.title},zB.prototype.onclick=function(e,t,n){cB.clear(e),t.dispatchAction({type:"restore",from:this.uid})},vz.register("restore",zB),jx.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(e,t){t.resetOption("recreate")})),jx.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 BB=Fe.each,VB=Fh.toCamelCase,HB=["","-webkit-","-moz-","-o-"];function YB(e){var t,n,i,a=[],r=e.get("transitionDuration"),o=e.get("backgroundColor"),s=e.getModel("textStyle"),l=e.get("padding");return r&&a.push((i="left "+(t=r)+"s "+(n="cubic-bezier(0.23, 1, 0.32, 1)")+",top "+t+"s "+n,Fe.map(HB,(function(e){return e+"transition:"+i})).join(";"))),o&&(re.canvasSupported?a.push("background-Color:"+o):(a.push("background-Color:#"+Xn.toHex(o)),a.push("filter:alpha(opacity=70)"))),BB(["width","color","radius"],(function(t){var n="border-"+t,i=VB(n),r=e.get(i);null!=r&&a.push(n+":"+r+("color"===t?"":"px"))})),a.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"),BB(["decoration","align"],(function(n){var i=e.get(n);i&&t.push("text-"+n+":"+i)})),t.join(";")}(s)),null!=l&&a.push("padding:"+Fh.normalizeCssArray(l).join("px ")+"px"),a.join(";")+";"}function FB(e,t,n,i,a){var r=t&&t.painter;if(n){var o=r&&r.getViewportRoot();o&&Dt.transformLocalCoord(e,o,document.body,i,a)}else{e[0]=i,e[1]=a;var s=r&&r.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}}function GB(e,t,n){if(re.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var a=this._zr=t.getZr(),r=this._appendToBody=n&&n.appendToBody;this._styleCoord=[0,0],FB(this._styleCoord,a,r,t.getWidth()/2,t.getHeight()/2),r?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=a.handler,n=a.painter.getViewportRoot();Bt.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;"+YB(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;FB(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(Fe.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 WB=GB;function jB(e){this._zr=e.getZr(),this._show=!1,this._hideTimeout}jB.prototype={constructor:jB,_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={},a=e,r="{marker",o=a.indexOf(r);o>=0;){var s=a.indexOf("|}"),l=a.substr(o+7,s-o-7);l.indexOf("sub")>-1?i["marker"+l]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:t[l],textOffset:[3,0]}:i["marker"+l]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:t[l]},o=(a=a.substr(s+1)).indexOf("{marker")}this.el=new Fl({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 u=this;this.el.on("mouseover",(function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0})),this.el.on("mouseout",(function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._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(Fe.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 UB=jB,ZB=Po.getTooltipRenderMode,XB=Fe.bind,qB=Fe.each,KB=Ch.parsePercent,$B=new Jc.Rect({shape:{x:-1,y:-1,width:2,height:2}});function QB(e){for(var t=e.pop();e.length;){var n=e.pop();n&&(ph.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),t=new ph(n,t,t.ecModel))}return t}function JB(e,t){return e.dispatchAction||Fe.bind(t.dispatchAction,t)}function eV(e){return"center"===e||"middle"===e}jx.extendComponentView({type:"tooltip",init:function(e,t){if(!re.node){var n,i=e.getComponent("tooltip"),a=i.get("renderMode");this._renderMode=ZB(a),"html"===this._renderMode?(n=new WB(t.getDom(),t,{appendToBody:i.get("appendToBody",!0)}),this._newLine="<br/>"):(n=new UB(t),this._newLine="\n"),this._tooltipContent=n}},render:function(e,t,n){if(!re.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");UN.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&&!re.node){var a=JB(i,n);this._ticket="";var r=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var o=$B;o.position=[i.x,i.y],o.update(),o.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:o},a)}else if(r)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},a);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,i))return;var s=ON(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},a)}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},a))}},manuallyHideTip:function(e,t,n,i){var a=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(JB(i,n))},_manuallyAxisShowTip:function(e,t,n,i){var a=i.seriesIndex,r=i.dataIndex,o=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=a&&null!=r&&null!=o){var s=t.getSeriesByIndex(a);if(s)if("axis"===(e=QB([s.getData().getItemModel(r),s,(s.coordinateSystem||{}).model,e])).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:r,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=Fe.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,a=[t.offsetX,t.offsetY],r=[],o=[],s=QB([t.tooltipOption,i]),l=this._renderMode,u=this._newLine,c={};qB(e,(function(e){qB(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value,a=[];if(t&&null!=i){var s=lP.getValueLabel(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt);Fe.each(e.seriesDataIndices,(function(r){var u=n.getSeriesByIndex(r.seriesIndex),h=r.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=D_.getAxisRawValue(t.axis,i),d.axisValueLabel=s,d){o.push(d);var f,p=u.formatTooltip(h,!0,null,l);if(Fe.isObject(p)){f=p.html;var g=p.markers;Fe.merge(c,g)}else f=p;a.push(f)}}));var h=s;"html"!==l?r.push(a.join(u)):r.push((h?Fh.encodeHTML(h)+u:"")+a.join(u))}}))}),this),r.reverse(),r=r.join(this._newLine+this._newLine);var h=t.position;this._showOrMove(s,(function(){this._updateContentNotChangedOnAxis(e)?this._updatePosition(s,h,a[0],a[1],this._tooltipContent,o):this._showTooltipContent(s,r,o,Math.random(),a[0],a[1],h,void 0,c)}))},_showSeriesItemTooltip:function(e,t,n){var i=this._ecModel,a=t.seriesIndex,r=i.getSeriesByIndex(a),o=t.dataModel||r,s=t.dataIndex,l=t.dataType,u=o.getData(l),c=QB([u.getItemModel(s),o,r&&(r.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);Fe.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:a,from:this.uid})}},_showComponentItemTooltip:function(e,t,n){var i=t.tooltip;if("string"==typeof i){i={content:i,formatter:i}}var a=new ph(i,this._tooltipModel,this._ecModel),r=a.get("content"),o=Math.random();this._showOrMove(a,(function(){this._showTooltipContent(a,r,a.get("formatterParams")||{},o,e.offsetX,e.offsetY,e.position,t)})),n({type:"showTip",from:this.uid})},_showTooltipContent:function(e,t,n,i,a,r,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=Fh.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,a,r,u,n,s))}),this);this._ticket=i,h=c(n,i,d)}u.setContent(h,l,e),u.show(e),this._updatePosition(e,o,a,r,u,n,s)}},_updatePosition:function(e,t,n,i,a,r,o){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=a.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],r,a.el,d,{viewSize:[s,l],contentSize:u.slice()})),Fe.isArray(t))n=KB(t[0],s),i=KB(t[1],l);else if(Fe.isObject(t)){t.width=u[0],t.height=u[1];var f=td.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],a=n[1],r=5,o=0,s=0,l=t.width,u=t.height;switch(e){case"inside":o=t.x+l/2-i/2,s=t.y+u/2-a/2;break;case"top":o=t.x+l/2-i/2,s=t.y-a-r;break;case"bottom":o=t.x+l/2-i/2,s=t.y+u+r;break;case"left":o=t.x-i-r,s=t.y+u/2-a/2;break;case"right":o=t.x+l+r,s=t.y+u/2-a/2}return[o,s]}(t,d,u);n=p[0],i=p[1]}else{p=function(e,t,n,i,a,r,o){var s=n.getOuterSize(),l=s.width,u=s.height;null!=r&&(e+l+r>i?e-=l+r:e+=r);null!=o&&(t+u+o>a?t-=u+o:t+=o);return[e,t]}(n,i,a,s,l,c?null:20,h?null:20);n=p[0],i=p[1]}if(c&&(n-=eV(c)?u[0]/2:"right"===c?u[0]:0),h&&(i-=eV(h)?u[1]/2:"bottom"===h?u[1]:0),e.get("confine")){p=function(e,t,n,i,a){var r=n.getOuterSize(),o=r.width,s=r.height;return e=Math.min(e+o,i)-o,t=Math.min(t+s,a)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,i,a,s,l);n=p[0],i=p[1]}a.moveTo(n,i)},_updateContentNotChangedOnAxis:function(e){var t=this._lastDataByCoordSys,n=!!t&&t.length===e.length;return n&&qB(t,(function(t,i){var a=t.dataByAxis||{},r=(e[i]||{}).dataByAxis||[];(n&=a.length===r.length)&&qB(a,(function(e,t){var i=r[t]||{},a=e.seriesDataIndices||[],o=i.seriesDataIndices||[];(n&=e.value===i.value&&e.axisType===i.axisType&&e.axisId===i.axisId&&a.length===o.length)&&qB(a,(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){re.node||(this._tooltipContent.dispose(),UN.unregister("itemTooltip",t))}}),jx.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),jx.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var tV=["rect","polygon","keep","clear"];var nV=function(e,t){var n=e&&e.brush;if(Fe.isArray(n)||(n=n?[n]:[]),n.length){var i=[];Fe.each(n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(i=i.concat(t))}));var a=e&&e.toolbox;Fe.isArray(a)&&(a=a[0]),a||(a={feature:{}},e.toolbox=[a]);var r=a.feature||(a.feature={}),o=r.brush||(r.brush={}),s=o.type||(o.type=[]);s.push.apply(s,i),function(e){var t={};Fe.each(e,(function(e){t[e]=1})),e.length=0,Fe.each(t,(function(t,n){e.push(n)}))}(s),t&&!s.length&&s.push.apply(s,tV)}},iV=Fe.each;function aV(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}var rV=function(e,t,n){var i;Fe.each(n,(function(e){t.hasOwnProperty(e)&&aV(t[e])&&(i=!0)})),i&&Fe.each(n,(function(n){t.hasOwnProperty(n)&&aV(t[n])?e[n]=Fe.clone(t[n]):delete e[n]}))},oV=function(e,t,n,i,a,r){var o,s={};function l(e){return n.getItemVisual(o,e)}function u(e,t){n.setItemVisual(o,e,t)}function c(e,c){o=null==r?e:c;var h=n.getRawDataItem(o);if(!h||!1!==h.visualMap)for(var d=i.call(a,e),f=t[d],p=s[d],g=0,m=p.length;g<m;g++){var v=p[g];f[v]&&f[v].applyVisual(e,l,u)}}Fe.each(e,(function(e){var n=uD.prepareVisualTypes(t[e]);s[e]=n})),null==r?n.each(c):n.each([r],c)},sV=function(e,t,n,i){var a={};return Fe.each(e,(function(e){var n=uD.prepareVisualTypes(t[e]);a[e]=n})),{progress:function(e,r){function o(e){return r.getItemVisual(l,e)}function s(e,t){r.setItemVisual(l,e,t)}var l;for(null!=i&&(i=r.getDimension(i));null!=(l=e.next());){var u=r.getRawDataItem(l);if(!u||!1!==u.visualMap)for(var c=null!=i?r.get(i,l,!0):l,h=n(c),d=t[h],f=a[h],p=0,g=f.length;p<g;p++){var m=f[p];d[m]&&d[m].applyVisual(c,o,s)}}}}},lV={createVisualMappings:function(e,t,n){var i={};return iV(t,(function(t){var a,r=i[t]=((a=function(){}).prototype.__hidden=a.prototype,new a);iV(e[t],(function(e,i){if(uD.isValidType(i)){var a={type:i,visual:e};n&&n(a,t),r[i]=new uD(a),"opacity"===i&&((a=Fe.clone(a)).type="colorAlpha",r.__hidden.__alphaForOpacity=new uD(a))}}))})),i},replaceVisualOption:rV,applyVisual:oV,incrementalApplyVisual:sV},uV=Jc.linePolygonIntersect,cV={lineX:hV(0),lineY:hV(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&Q_.contain(n.range,e[0],e[1])},rect:function(e,t,n){var i=n.range;if(!e||i.length<=1)return!1;var a=e.x,r=e.y,o=e.width,s=e.height,l=i[0];return!!(Q_.contain(i,a,r)||Q_.contain(i,a+o,r)||Q_.contain(i,a,r+s)||Q_.contain(i,a+o,r+s)||Ni.create(e).contain(l[0],l[1])||uV(a,r,a+o,r,i)||uV(a,r,a,r+s,i)||uV(a+o,r,a+o,r+s,i)||uV(a,r+s,a+o,r+s,i))||void 0}}};function hV(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,i){if(t){var a=i.range;return dV(t[e],a)}},rect:function(i,a,r){if(i){var o=r.range,s=[i[t[e]],i[t[e]]+i[n[e]]];return s[1]<s[0]&&s.reverse(),dV(s[0],o)||dV(s[1],o)||dV(o[0],s)||dV(o[1],s)}}}}function dV(e,t){return t[0]<=e&&e<=t[1]}var fV=cV,pV=["inBrush","outOfBrush"],gV="__ecBrushSelect",mV="__ecInBrushSelectEvent",vV=jx.PRIORITY.VISUAL.BRUSH;function yV(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new aB(t.option,e)).setInputRanges(t.areas,e)}))}function _V(e,t){if(!e.isDisposed()){var n=e.getZr();n[mV]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[mV]=!1}}function xV(e,t,n,i){for(var a=0,r=t.length;a<r;a++){var o=t[a];if(e[o.brushType](i,n,o.selectors,o))return!0}}function bV(e){var t=e.brushSelector;if(Fe.isString(t)){var n=[];return Fe.each(fV,(function(e,i){n[i]=function(n,i,a,r){var o=i.getItemLayout(n);return e[t](o,a,r)}})),n}if(Fe.isFunction(t)){var i={};return Fe.each(fV,(function(e,n){i[n]=t})),i}return t}jx.registerLayout(vV,(function(e,t,n){e.eachComponent({mainType:"brush"},(function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})})),yV(e)})),jx.registerVisual(vV,(function(e,t,n){var i,a,r=[];e.eachComponent({mainType:"brush"},(function(t,n){var o={brushId:t.id,brushIndex:n,brushName:t.name,areas:Fe.clone(t.areas),selected:[]};r.push(o);var s=t.option,l=s.brushLink,u=[],c=[],h=[],d=0;n||(i=s.throttleType,a=s.throttleDelay);var f=Fe.map(t.areas,(function(e){return function(e){var t=e.selectors={};return Fe.each(fV[e.brushType],(function(n,i){t[i]=function(i){return n(i,t,e)}})),e}(Fe.defaults({boundingRect:wV[e.brushType](e)},e))})),p=lV.createVisualMappings(t.option,pV,(function(e){e.mappingMethod="fixed"}));function g(e){return"all"===l||u[e]}function m(e){return!!e.length}Fe.isArray(l)&&Fe.each(l,(function(e){u[e]=1})),e.eachSeries((function(n,i){var a=h[i]=[];"parallel"===n.subType?function(e,t){var n=e.coordinateSystem;d|=n.hasAxisBrushed(),g(t)&&n.eachActiveState(e.getData(),(function(e,t){"active"===e&&(c[t]=1)}))}(n,i):function(n,i,a){var r=bV(n);if(!r||function(e,t){var n=e.option.seriesIndex;return null!=n&&"all"!==n&&(Fe.isArray(n)?Fe.indexOf(n,t)<0:t!==n)}(t,i))return;if(Fe.each(f,(function(i){r[i.brushType]&&t.brushTargetManager.controlSeries(i,n,e)&&a.push(i),d|=m(a)})),g(i)&&m(a)){var o=n.getData();o.each((function(e){xV(r,a,o,e)&&(c[e]=1)}))}}(n,i,a)})),e.eachSeries((function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};o.selected.push(n);var i=bV(e),a=h[t],r=e.getData(),s=g(t)?function(e){return c[e]?(n.dataIndex.push(r.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(e){return xV(i,a,r,e)?(n.dataIndex.push(r.getRawIndex(e)),"inBrush"):"outOfBrush"};(g(t)?d:m(a))&&lV.applyVisual(pV,p,r,s)}))})),function(e,t,n,i,a){if(!a)return;var r=e.getZr();if(r[mV])return;r[gV]||(r[gV]=_V);var o=Ig.createOrUpdate(r,gV,n,t);o(e,i)}(t,i,a,r,n)}));var wV={lineX:Fe.noop,lineY:Fe.noop,rect:function(e){return SV(e.range)},polygon:function(e){for(var t,n=e.range,i=0,a=n.length;i<a;i++){t=t||[[1/0,-1/0],[1/0,-1/0]];var r=n[i];r[0]<t[0][0]&&(t[0][0]=r[0]),r[0]>t[0][1]&&(t[0][1]=r[0]),r[1]<t[1][0]&&(t[1][0]=r[1]),r[1]>t[1][1]&&(t[1][1]=r[1])}return t&&SV(t)}};function SV(e){return new Ni(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var MV={layoutCovers:yV},TV=["#ddd"];function IV(e,t){return Fe.merge({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new ph(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}jx.extendComponentModel({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(e,t){var n=this.option;!t&&lV.replaceVisualOption(n,e,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:TV},i.hasOwnProperty("liftZ")||(i.liftZ=5)},setAreas:function(e){e&&(this.areas=Fe.map(e,(function(e){return IV(this.option,e)}),this))},setBrushOption:function(e){this.brushOption=IV(this.option,e),this.brushType=this.brushOption.brushType}});var AV=MV.layoutCovers;function DV(e,t,n,i){(!i||i.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())}jx.extendComponentView({type:"brush",init:function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new Dk(t.getZr())).on("brush",Fe.bind(this._onBrush,this)).mount()},render:function(e){return this.model=e,DV.apply(this,arguments)},updateTransform:function(e,t){return AV(t),DV.apply(this,arguments)},updateView:DV,dispose:function(){this._brushController.dispose()},_onBrush:function(e,t){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(e,this.ecModel),(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:Fe.clone(e),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:Fe.clone(e),$from:n})}}),jx.registerAction({type:"brush",event:"brush"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),jx.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},(function(){})),jx.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},(function(){}));var CV=Og.toolbox.brush;function OV(e,t,n){this.model=e,this.ecModel=t,this.api=n,this._brushType,this._brushMode}OV.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:Fe.clone(CV.title)};var kV=OV.prototype;kV.render=kV.updateView=function(e,t,n){var i,a,r;t.eachComponent({mainType:"brush"},(function(e){i=e.brushType,a=e.brushOption.brushMode||"single",r|=e.areas.length})),this._brushType=i,this._brushMode=a,Fe.each(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===a:"clear"===t?r:t===i)?"emphasis":"normal")}))},kV.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return Fe.each(e.get("type",!0),(function(e){t[e]&&(n[e]=t[e])})),n},kV.onclick=function(e,t,n){var i=this._brushType,a=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===a?"single":"multiple":a}})},vz.register("brush",OV),jx.registerPreprocessor(nV);var LV=td.getLayoutRect,EV=Fh.windowOpen;function NV(e){var t=e.itemStyle||(e.itemStyle={}),n=t.emphasis||(t.emphasis={}),i=e.label||e.label||{},a=i.normal||(i.normal={}),r={normal:1,emphasis:1};Fe.each(i,(function(e,t){r[t]||PV(a,t)||(a[t]=e)})),n.label&&!PV(i,"emphasis")&&(i.emphasis=n.label,delete n.label)}function PV(e,t){return e.hasOwnProperty(t)}jx.extendComponentModel({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),jx.extendComponentView({type:"title",render:function(e,t,n){if(this.group.removeAll(),e.get("show")){var i=this.group,a=e.getModel("textStyle"),r=e.getModel("subtextStyle"),o=e.get("textAlign"),s=Fe.retrieve2(e.get("textBaseline"),e.get("textVerticalAlign")),l=new Jc.Text({style:Jc.setTextStyle({},a,{text:e.get("text"),textFill:a.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),h=new Jc.Text({style:Jc.setTextStyle({},r,{text:c,textFill:r.getTextColor(),y:u.height+e.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),f=e.get("sublink"),p=e.get("triggerEvent",!0);l.silent=!d&&!p,h.silent=!f&&!p,d&&l.on("click",(function(){EV(d,"_"+e.get("target"))})),f&&h.on("click",(function(){EV(d,"_"+e.get("subtarget"))})),l.eventData=h.eventData=p?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(l),c&&i.add(h);var g=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=LV(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));o||("middle"===(o=e.get("left")||e.get("right"))&&(o="center"),"right"===o?v.x+=v.width:"center"===o&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.attr("position",[v.x,v.y]);var y={textAlign:o,textVerticalAlign:s};l.setStyle(y),h.setStyle(y),g=i.getBoundingRect();var _=v.margin,x=e.getItemStyle(["color","opacity"]);x.fill=e.get("backgroundColor");var b=new Jc.Rect({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:e.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(b)}}});var RV=function(e){var t=e&&e.timeline;Fe.isArray(t)||(t=t?[t]:[]),Fe.each(t,(function(e){e&&function(e){var t=e.type,n={number:"value",time:"time"};n[t]&&(e.axisType=n[t],delete e.type);if(NV(e),PV(e,"controlPosition")){var i=e.controlStyle||(e.controlStyle={});PV(i,"position")||(i.position=e.controlPosition),"none"!==i.position||PV(i,"show")||(i.show=!1,delete i.position),delete e.controlPosition}Fe.each(e.data||[],(function(e){Fe.isObject(e)&&!Fe.isArray(e)&&(!PV(e,"value")&&PV(e,"name")&&(e.value=e.name),NV(e))}))}(e)}))};sd.registerSubTypeDefaulter("timeline",(function(){return"slider"})),jx.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(e,t){var n=t.getComponent("timeline");return n&&null!=e.currentIndex&&(n.setCurrentIndex(e.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.setPlayState(!1)),t.resetOption("timeline"),Fe.defaults({currentIndex:n.option.currentIndex},e)})),jx.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(e,t){var n=t.getComponent("timeline");n&&null!=e.playState&&n.setPlayState(e.playState)}));var zV=sd.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(e,t,n){this._data,this._names,this.mergeDefaultAndTheme(e,n),this._initData()},mergeOption:function(e){zV.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(e){this.option.autoPlay=!!e},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var e=this.option,t=e.data||[],n=e.axisType,i=this._names=[];if("category"===n){var a=[];Fe.each(t,(function(e,t){var n,r=Po.getDataItemValue(e);Fe.isObject(e)?(n=Fe.clone(e)).value=t:n=t,a.push(n),Fe.isString(r)||null!=r&&!isNaN(r)||(r=""),i.push(r+"")})),t=a}var r={category:"ordinal",time:"time"}[n]||"number";(this._data=new Lv([{name:"value",type:r}],this)).initData(t,i)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),BV=zV.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});Fe.mixin(BV,Lp);var VV=sg.extend({type:"timeline"}),HV=function(e,t,n,i){Ax.call(this,e,t,n),this.type=i||"value",this.model=null};HV.prototype={constructor:HV,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},Fe.inherits(HV,Ax);var YV=HV,FV=F_.createSymbol,GV=Fh.encodeHTML,WV=Fe.bind,jV=Fe.each,UV=Math.PI;function ZV(e,t,n,i,a,r){var o=t.get("color");if(a)a.setColor(o),n.add(a),r&&r.onUpdate(a);else{var s=e.get("symbol");(a=FV(s,-1,-1,2,2,o)).setStyle("strokeNoScale",!0),n.add(a),r&&r.onCreate(a)}var l=t.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(l),i=Fe.merge({rectHover:!0,z2:100},i,!0);var u=e.get("symbolSize");(u=u instanceof Array?u.slice():[+u,+u])[0]/=2,u[1]/=2,i.scale=u;var c=e.get("symbolOffset");if(c){var h=i.position=i.position||[0,0];h[0]+=Ch.parsePercent(c[0],u[0]),h[1]+=Ch.parsePercent(c[1],u[1])}var d=e.get("symbolRotate");return i.rotation=(d||0)*Math.PI/180||0,a.attr(i),a.updateTransform(),a}function XV(e,t,n,i,a){if(!e.dragging){var r=i.getModel("checkpointStyle"),o=n.dataToCoord(i.getData().get(["value"],t));a||!r.get("animation",!0)?e.attr({position:[o,0]}):(e.stopAnimation(!0),e.animateTo({position:[o,0]},r.get("animationDuration",!0),r.get("animationEasing",!0)))}}VV.extend({type:"timeline.slider",init:function(e,t){this.api=t,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,n,i){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var a=this._layout(e,n),r=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(a,e);e.formatTooltip=function(e){return GV(s.scale.getLabel(e))},jV(["AxisLine","AxisTick","Control","CurrentPointer"],(function(t){this["_render"+t](a,r,s,e)}),this),this._renderAxisLabel(a,o,s,e),this._position(a,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(e,t){var n=e.get("label.position"),i=e.get("orient"),a=function(e,t){return td.getLayoutRect(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}(e,t);null==n||"auto"===n?n="horizontal"===i?a.y+a.height/2<t.getHeight()/2?"-":"+":a.x+a.width/2<t.getWidth()/2?"+":"-":isNaN(n)&&(n={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][n]);var r,o,s,l,u={horizontal:"center",vertical:n>=0||"+"===n?"left":"right"},c={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:UV/2},d="vertical"===i?a.height:a.width,f=e.getModel("controlStyle"),p=f.get("show",!0),g=p?f.get("itemSize"):0,m=p?f.get("itemGap"):0,v=g+m,y=e.get("label.rotate")||0;y=y*UV/180;var _=f.get("position",!0),x=p&&f.get("showPlayBtn",!0),b=p&&f.get("showPrevBtn",!0),w=p&&f.get("showNextBtn",!0),S=0,M=d;return"left"===_||"bottom"===_?(x&&(r=[0,0],S+=v),b&&(o=[S,0],S+=v),w&&(s=[M-g,0],M-=v)):(x&&(r=[M-g,0],M-=v),b&&(o=[0,0],S+=v),w&&(s=[M-g,0],M-=v)),l=[S,M],e.get("inverse")&&l.reverse(),{viewRect:a,mainLength:d,orient:i,rotation:h[i],labelRotation:y,labelPosOpt:n,labelAlign:e.get("label.align")||u[i],labelBaseline:e.get("label.verticalAlign")||e.get("label.baseline")||c[i],playPosition:r,prevBtnPosition:o,nextBtnPosition:s,axisExtent:l,controlSize:g,controlGap:m}},_position:function(e,t){var n=this._mainGroup,i=this._labelGroup,a=e.viewRect;if("vertical"===e.orient){var r=sn.create(),o=a.x,s=a.y+a.height;sn.translate(r,r,[-o,-s]),sn.rotate(r,r,-UV/2),sn.translate(r,r,[o,s]),(a=a.clone()).applyTransform(r)}var l=m(a),u=m(n.getBoundingRect()),c=m(i.getBoundingRect()),h=n.position,d=i.position;d[0]=h[0]=l[0][0];var f,p=e.labelPosOpt;isNaN(p)?(v(h,u,l,1,f="+"===p?0:1),v(d,c,l,1,1-f)):(v(h,u,l,1,f=p>=0?0:1),d[1]=h[1]+p);function g(e){var t=e.position;e.origin=[l[0][0]-t[0],l[1][0]-t[1]]}function m(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function v(e,t,n,i,a){e[i]+=n[i][a]-t[i][a]}n.attr("position",h),i.attr("position",d),n.rotation=i.rotation=e.rotation,g(n),g(i)},_createAxis:function(e,t){var n=t.getData(),i=t.get("axisType"),a=D_.createScaleByModel(t,i);a.getTicks=function(){return n.mapArray(["value"],(function(e){return e}))};var r=n.getDataExtent("value");a.setExtent(r[0],r[1]),a.niceTicks();var o=new YV("value",a,e.axisExtent,i);return o.model=t,o},_createGroup:function(e){var t=this["_"+e]=new Jc.Group;return this.group.add(t),t},_renderAxisLine:function(e,t,n,i){var a=n.getExtent();i.get("lineStyle.show")&&t.add(new Jc.Line({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:Fe.extend({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(e,t,n,i){var a=i.getData(),r=n.scale.getTicks();jV(r,(function(e){var r=n.dataToCoord(e),o=a.getItemModel(e),s=o.getModel("itemStyle"),l=o.getModel("emphasis.itemStyle"),u={position:[r,0],onclick:WV(this._changeTimeline,this,e)},c=ZV(o,s,t,u);Jc.setHoverStyle(c,l.getItemStyle()),o.get("tooltip")?(c.dataIndex=e,c.dataModel=i):c.dataIndex=c.dataModel=null}),this)},_renderAxisLabel:function(e,t,n,i){if(n.getLabelModel().get("show")){var a=i.getData(),r=n.getViewLabels();jV(r,(function(i){var r=i.tickValue,o=a.getItemModel(r),s=o.getModel("label"),l=o.getModel("emphasis.label"),u=n.dataToCoord(i.tickValue),c=new Jc.Text({position:[u,0],rotation:e.labelRotation-e.rotation,onclick:WV(this._changeTimeline,this,r),silent:!1});Jc.setTextStyle(c.style,s,{text:i.formattedLabel,textAlign:e.labelAlign,textVerticalAlign:e.labelBaseline}),t.add(c),Jc.setHoverStyle(c,Jc.setTextStyle({},l))}),this)}},_renderControl:function(e,t,n,i){var a=e.controlSize,r=e.rotation,o=i.getModel("controlStyle").getItemStyle(),s=i.getModel("emphasis.controlStyle").getItemStyle(),l=[0,-a/2,a,a],u=i.getPlayState(),c=i.get("inverse",!0);function h(e,n,u,c){if(e){var h=function(e,t,n,i){var a=Jc.makePath(e.get(t).replace(/^path:\/\//,""),Fe.clone(i||{}),new Ni(n[0],n[1],n[2],n[3]),"center");return a}(i,n,l,{position:e,origin:[a/2,0],rotation:c?-r:0,rectHover:!0,style:o,onclick:u});t.add(h),Jc.setHoverStyle(h,s)}}h(e.nextBtnPosition,"controlStyle.nextIcon",WV(this._changeTimeline,this,c?"-":"+")),h(e.prevBtnPosition,"controlStyle.prevIcon",WV(this._changeTimeline,this,c?"+":"-")),h(e.playPosition,"controlStyle."+(u?"stopIcon":"playIcon"),WV(this._handlePlayClick,this,!u),!0)},_renderCurrentPointer:function(e,t,n,i){var a=i.getData(),r=i.getCurrentIndex(),o=a.getItemModel(r).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=WV(s._handlePointerDrag,s),e.ondragend=WV(s._handlePointerDragend,s),XV(e,r,n,i,!0)},onUpdate:function(e){XV(e,r,n,i)}};this._currentPointer=ZV(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},_handlePointerDrag:function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},_handlePointerDragend:function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},_pointerChangeTimeline:function(e,t){var n=this._toAxisCoord(e)[0],i=this._axis,a=Ch.asc(i.getExtent().slice());n>a[1]&&(n=a[1]),n<a[0]&&(n=a[0]),this._currentPointer.position[0]=n,this._currentPointer.dirty();var r=this._findNearestTick(n),o=this.model;(t||r!==o.getCurrentIndex()&&o.get("realtime"))&&this._changeTimeline(r)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(WV((function(){var e=this.model;this._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))}),this),this.model.get("playInterval")))},_toAxisCoord:function(e){var t=this._mainGroup.getLocalTransform();return Jc.applyTransform(e,t,!0)},_findNearestTick:function(e){var t,n=this.model.getData(),i=1/0,a=this._axis;return n.each(["value"],(function(n,r){var o=a.dataToCoord(n),s=Math.abs(o-e);s<i&&(i=s,t=r)})),t},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(e){var t=this.model.getCurrentIndex();"+"===e?e=t+1:"-"===e&&(e=t-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})}}),jx.registerPreprocessor(RV);var qV=Fh.addCommas,KV=Fh.encodeHTML;function $V(e){Po.defaultEmphasis(e,"label",["show"])}var QV=jx.extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},isAnimationEnabled:function(){if(re.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},mergeOption:function(e,t){this._mergeOption(e,t,!1,!1)},_mergeOption:function(e,t,n,i){var a=this.constructor,r=this.mainType+"Model";n||t.eachSeries((function(e){var n=e.get(this.mainType,!0),o=e[r];n&&n.data?(o?o._mergeOption(n,t,!0):(i&&$V(n),Fe.each(n.data,(function(e){e instanceof Array?($V(e[0]),$V(e[1])):$V(e)})),o=new a(n,this,t),Fe.extend(o,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),o.__hostSeries=e),e[r]=o):e[r]=null}),this)},formatTooltip:function(e){var t=this.getData(),n=this.getRawValue(e),i=Fe.isArray(n)?Fe.map(n,qV).join(", "):qV(n),a=t.getName(e),r=KV(this.name);return(null!=n||a)&&(r+="<br />"),a&&(r+=KV(a),null!=n&&(r+=" : ")),null!=n&&(r+=KV(i)),r},getData:function(){return this._data},setData:function(e){this._data=e}});Fe.mixin(QV,Lp);var JV=QV;JV.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var eH=iy.isDimensionStacked,tH=Fe.indexOf;function nH(e,t,n,i,a,r){var o=[],s=eH(t,i)?t.getCalculationInfo("stackResultDimension"):i,l=oH(t,s,e),u=t.indicesOfNearest(s,l)[0];o[a]=t.get(n,u),o[r]=t.get(s,u);var c=t.get(i,u),h=Ch.getPrecision(t.get(i,u));return(h=Math.min(h,20))>=0&&(o[r]=+o[r].toFixed(h)),[o,c]}var iH=Fe.curry,aH={min:iH(nH,"min"),max:iH(nH,"max"),average:iH(nH,"average")};function rH(e,t,n,i){var a={};return null!=e.valueIndex||null!=e.valueDim?(a.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,a.valueAxis=n.getAxis(function(e,t){var n=e.getData(),i=n.dimensions;t=n.getDimension(t);for(var a=0;a<i.length;a++){var r=n.getDimensionInfo(i[a]);if(r.name===t)return r.coordDim}}(i,a.valueDataDim)),a.baseAxis=n.getOtherAxis(a.valueAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim)):(a.baseAxis=i.getBaseAxis(),a.valueAxis=n.getOtherAxis(a.baseAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim),a.valueDataDim=t.mapDimension(a.valueAxis.dim)),a}function oH(e,t,n){if("average"===n){var i=0,a=0;return e.each(t,(function(e,t){isNaN(e)||(i+=e,a++)})),i/a}return"median"===n?e.getMedian(t):e.getDataExtent(t,!0)["max"===n?1:0]}var sH=function(e,t){var n=e.getData(),i=e.coordinateSystem;if(t&&!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!Fe.isArray(t.coord)&&i){var a=i.dimensions,r=rH(t,n,i,e);if((t=Fe.clone(t)).type&&aH[t.type]&&r.baseAxis&&r.valueAxis){var o=tH(a,r.baseAxis.dim),s=tH(a,r.valueAxis.dim),l=aH[t.type](n,r.baseDataDim,r.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else{for(var u=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis],c=0;c<2;c++)aH[u[c]]&&(u[c]=oH(n,n.mapDimension(a[c]),u[c]));t.coord=u}}return t},lH={dataTransform:sH,getAxisInfo:rH,dataFilter:function(e,t){return!(e&&e.containData&&t.coord&&!function(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}(t))||e.containData(t.coord)},dimValueGetter:function(e,t,n,i){return i<2?e.coord&&e.coord[i]:e.value},numCalculate:oH},uH=jx.extendComponentView({type:"marker",init:function(){this.markerGroupMap=Fe.createHashMap()},render:function(e,t,n){var i=this.markerGroupMap;i.each((function(e){e.__keep=!1}));var a=this.type+"Model";t.eachSeries((function(e){var i=e[a];i&&this.renderSeries(e,i,t,n)}),this),i.each((function(e){!e.__keep&&this.group.remove(e.group)}),this)},renderSeries:function(){}});function cH(e,t,n){var i=t.coordinateSystem;e.each((function(a){var r,o=e.getItemModel(a),s=Ch.parsePercent(o.get("x"),n.getWidth()),l=Ch.parsePercent(o.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)r=t.getMarkerPosition(e.getValues(e.dimensions,a));else if(i){var u=e.get(i.dimensions[0],a),c=e.get(i.dimensions[1],a);r=i.dataToPoint([u,c])}}else r=[s,l];isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),e.setItemLayout(a,r)}))}uH.extend({type:"markPoint",updateTransform:function(e,t,n){t.eachSeries((function(e){var t=e.markPointModel;t&&(cH(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout(t))}),this)},renderSeries:function(e,t,n,i){var a=e.coordinateSystem,r=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new gb),u=function(e,t,n){var i;i=e?Fe.map(e&&e.dimensions,(function(e){var n=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return Fe.defaults({name:e},n)})):[{name:"value",type:"float"}];var a=new Lv(i,n),r=Fe.map(n.get("data"),Fe.curry(lH.dataTransform,t));e&&(r=Fe.filter(r,Fe.curry(lH.dataFilter,e)));return a.initData(r,null,e?lH.dimValueGetter:function(e){return e.value}),a}(a,e,t);t.setData(u),cH(t.getData(),e,i),u.each((function(e){var n=u.getItemModel(e),i=n.getShallow("symbol"),a=n.getShallow("symbolSize"),r=Fe.isFunction(i),s=Fe.isFunction(a);if(r||s){var l=t.getRawValue(e),c=t.getDataParams(e);r&&(i=i(l,c)),s&&(a=a(l,c))}u.setItemVisual(e,{symbol:i,symbolSize:a,color:n.get("itemStyle.color")||o.getVisual("color")})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(e){e.traverse((function(e){e.dataModel=t}))})),l.__keep=!0,l.group.silent=t.get("silent")||e.get("silent")}}),jx.registerPreprocessor((function(e){e.markPoint=e.markPoint||{}})),JV.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var hH=iy.getStackedDimension,dH=function(e,t,n,i){var a=e.getData(),r=i.type;if(!Fe.isArray(i)&&("min"===r||"max"===r||"average"===r||"median"===r||null!=i.xAxis||null!=i.yAxis)){var o,s;if(null!=i.yAxis||null!=i.xAxis)o=t.getAxis(null!=i.yAxis?"y":"x"),s=Fe.retrieve(i.yAxis,i.xAxis);else{var l=lH.getAxisInfo(i,a,t,e);o=l.valueAxis;var u=hH(a,l.valueDataDim);s=lH.numCalculate(a,u,r)}var c="x"===o.dim?0:1,h=1-c,d=Fe.clone(i),f={};d.type=null,d.coord=[],f.coord=[],d.coord[h]=-1/0,f.coord[h]=1/0;var p=n.get("precision");p>=0&&"number"==typeof s&&(s=+s.toFixed(Math.min(p,20))),d.coord[c]=f.coord[c]=s,i=[d,f,{type:r,valueIndex:i.valueIndex,value:s}]}return(i=[lH.dataTransform(e,i[0]),lH.dataTransform(e,i[1]),Fe.extend({},i[2])])[2].type=i[2].type||"",Fe.merge(i[2],i[0]),Fe.merge(i[2],i[1]),i};function fH(e){return!isNaN(e)&&!isFinite(e)}function pH(e,t,n,i){var a=1-e,r=i.dimensions[e];return fH(t[a])&&fH(n[a])&&t[e]===n[e]&&i.getAxis(r).containData(t[e])}function gH(e,t){if("cartesian2d"===e.type){var n=t[0].coord,i=t[1].coord;if(n&&i&&(pH(1,n,i,e)||pH(0,n,i,e)))return!0}return lH.dataFilter(e,t[0])&&lH.dataFilter(e,t[1])}function mH(e,t,n,i,a){var r,o=i.coordinateSystem,s=e.getItemModel(t),l=Ch.parsePercent(s.get("x"),a.getWidth()),u=Ch.parsePercent(s.get("y"),a.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)r=i.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=o.dimensions,h=e.get(c[0],t),d=e.get(c[1],t);r=o.dataToPoint([h,d])}if("cartesian2d"===o.type){var f=o.getAxis("x"),p=o.getAxis("y");c=o.dimensions;fH(e.get(c[0],t))?r[0]=f.toGlobalCoord(f.getExtent()[n?0:1]):fH(e.get(c[1],t))&&(r[1]=p.toGlobalCoord(p.getExtent()[n?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];e.setItemLayout(t,r)}uH.extend({type:"markLine",updateTransform:function(e,t,n){t.eachSeries((function(e){var t=e.markLineModel;if(t){var i=t.getData(),a=t.__from,r=t.__to;a.each((function(t){mH(a,t,!0,e,n),mH(r,t,!1,e,n)})),i.each((function(e){i.setItemLayout(e,[a.getItemLayout(e),r.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},renderSeries:function(e,t,n,i){var a=e.coordinateSystem,r=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new uC);this.group.add(l.group);var u=function(e,t,n){var i;i=e?Fe.map(e&&e.dimensions,(function(e){var n=t.getData().getDimensionInfo(t.getData().mapDimension(e))||{};return Fe.defaults({name:e},n)})):[{name:"value",type:"float"}];var a=new Lv(i,n),r=new Lv(i,n),o=new Lv([],n),s=Fe.map(n.get("data"),Fe.curry(dH,t,e,n));e&&(s=Fe.filter(s,Fe.curry(gH,e)));var l=e?lH.dimValueGetter:function(e){return e.value};return a.initData(Fe.map(s,(function(e){return e[0]})),null,l),r.initData(Fe.map(s,(function(e){return e[1]})),null,l),o.initData(Fe.map(s,(function(e){return e[2]}))),o.hasItemOption=!0,{from:a,to:r,line:o}}(a,e,t),c=u.from,h=u.to,d=u.line;t.__from=c,t.__to=h,t.setData(d);var f=t.get("symbol"),p=t.get("symbolSize");function g(t,n,a){var r=t.getItemModel(n);mH(t,n,a,e,i),t.setItemVisual(n,{symbolSize:r.get("symbolSize")||p[a?0:1],symbol:r.get("symbol",!0)||f[a?0:1],color:r.get("itemStyle.color")||o.getVisual("color")})}Fe.isArray(f)||(f=[f,f]),"number"==typeof p&&(p=[p,p]),u.from.each((function(e){g(c,e,!0),g(h,e,!1)})),d.each((function(e){var t=d.getItemModel(e).get("lineStyle.color");d.setItemVisual(e,{color:t||c.getItemVisual(e,"color")}),d.setItemLayout(e,[c.getItemLayout(e),h.getItemLayout(e)]),d.setItemVisual(e,{fromSymbolSize:c.getItemVisual(e,"symbolSize"),fromSymbol:c.getItemVisual(e,"symbol"),toSymbolSize:h.getItemVisual(e,"symbolSize"),toSymbol:h.getItemVisual(e,"symbol")})})),l.updateData(d),u.line.eachItemGraphicEl((function(e,n){e.traverse((function(e){e.dataModel=t}))})),l.__keep=!0,l.group.silent=t.get("silent")||e.get("silent")}}),jx.registerPreprocessor((function(e){e.markLine=e.markLine||{}})),JV.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var vH=function(e,t,n,i){var a=lH.dataTransform(e,i[0]),r=lH.dataTransform(e,i[1]),o=Fe.retrieve,s=a.coord,l=r.coord;s[0]=o(s[0],-1/0),s[1]=o(s[1],-1/0),l[0]=o(l[0],1/0),l[1]=o(l[1],1/0);var u=Fe.mergeAll([{},a,r]);return u.coord=[a.coord,r.coord],u.x0=a.x,u.y0=a.y,u.x1=r.x,u.y1=r.y,u};function yH(e){return!isNaN(e)&&!isFinite(e)}function _H(e,t,n,i){var a=1-e;return yH(t[a])&&yH(n[a])}function xH(e,t){var n=t.coord[0],i=t.coord[1];return!("cartesian2d"!==e.type||!n||!i||!_H(1,n,i)&&!_H(0,n,i))||(lH.dataFilter(e,{coord:n,x:t.x0,y:t.y0})||lH.dataFilter(e,{coord:i,x:t.x1,y:t.y1}))}function bH(e,t,n,i,a){var r,o=i.coordinateSystem,s=e.getItemModel(t),l=Ch.parsePercent(s.get(n[0]),a.getWidth()),u=Ch.parsePercent(s.get(n[1]),a.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)r=i.getMarkerPosition(e.getValues(n,t));else{var c=[f=e.get(n[0],t),p=e.get(n[1],t)];o.clampData&&o.clampData(c,c),r=o.dataToPoint(c,!0)}if("cartesian2d"===o.type){var h=o.getAxis("x"),d=o.getAxis("y"),f=e.get(n[0],t),p=e.get(n[1],t);yH(f)?r[0]=h.toGlobalCoord(h.getExtent()["x0"===n[0]?0:1]):yH(p)&&(r[1]=d.toGlobalCoord(d.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];return r}var wH=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];uH.extend({type:"markArea",updateTransform:function(e,t,n){t.eachSeries((function(e){var t=e.markAreaModel;if(t){var i=t.getData();i.each((function(t){var a=Fe.map(wH,(function(a){return bH(i,t,a,e,n)}));i.setItemLayout(t,a),i.getItemGraphicEl(t).setShape("points",a)}))}}),this)},renderSeries:function(e,t,n,i){var a=e.coordinateSystem,r=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,{group:new Jc.Group});this.group.add(l.group),l.__keep=!0;var u=function(e,t,n){var i,a,r=["x0","y0","x1","y1"];e?(i=Fe.map(e&&e.dimensions,(function(e){var n=t.getData(),i=n.getDimensionInfo(n.mapDimension(e))||{};return Fe.defaults({name:e},i)})),a=new Lv(Fe.map(r,(function(e,t){return{name:e,type:i[t%2].type}})),n)):a=new Lv(i=[{name:"value",type:"float"}],n);var o=Fe.map(n.get("data"),Fe.curry(vH,t,e,n));e&&(o=Fe.filter(o,Fe.curry(xH,e)));var s=e?function(e,t,n,i){return e.coord[Math.floor(i/2)][i%2]}:function(e){return e.value};return a.initData(o,null,s),a.hasItemOption=!0,a}(a,e,t);t.setData(u),u.each((function(t){u.setItemLayout(t,Fe.map(wH,(function(n){return bH(u,t,n,e,i)}))),u.setItemVisual(t,{color:o.getVisual("color")})})),u.diff(l.__data).add((function(e){var t=new Jc.Polygon({shape:{points:u.getItemLayout(e)}});u.setItemGraphicEl(e,t),l.group.add(t)})).update((function(e,n){var i=l.__data.getItemGraphicEl(n);Jc.updateProps(i,{shape:{points:u.getItemLayout(e)}},t,e),l.group.add(i),u.setItemGraphicEl(e,i)})).remove((function(e){var t=l.__data.getItemGraphicEl(e);l.group.remove(t)})).execute(),u.eachItemGraphicEl((function(e,n){var i=u.getItemModel(n),a=i.getModel("label"),r=i.getModel("emphasis.label"),o=u.getItemVisual(n,"color");e.useStyle(Fe.defaults(i.getModel("itemStyle").getItemStyle(),{fill:Xn.modifyAlpha(o,.4),stroke:o})),e.hoverStyle=i.getModel("emphasis.itemStyle").getItemStyle(),Jc.setLabelStyle(e.style,e.hoverStyle,a,r,{labelFetcher:t,labelDataIndex:n,defaultText:u.getName(n)||"",isRectText:!0,autoColor:o}),Jc.setHoverStyle(e,{}),e.dataModel=t})),l.__data=u,l.group.silent=t.get("silent")||e.get("silent")}}),jx.registerPreprocessor((function(e){e.markArea=e.markArea||{}}));var SH=Po.isNameSpecified,MH=Og.legend.selector,TH={all:{type:"all",title:Fe.clone(MH.all)},inverse:{type:"inverse",title:Fe.clone(MH.inverse)}},IH=jx.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){IH.superCall(this,"mergeOption",e),this._updateSelector(e)},_updateSelector:function(e){var t=e.selector;!0===t&&(t=e.selector=["all","inverse"]),Fe.isArray(t)&&Fe.each(t,(function(e,n){Fe.isString(e)&&(e={type:e}),t[n]=Fe.merge(e,TH[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 a,r=i.name;if(n.push(r),i.legendVisualProvider){var o=i.legendVisualProvider.getAllNames();e.isSeriesFiltered(i)||(n=n.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&SH(i)&&t.push(i.name)})),this._availableNames=n;var i=this.get("data")||t,a=Fe.map(i,(function(e){return"string"!=typeof e&&"number"!=typeof e||(e={name:e}),new ph(e,this,this.ecModel)}),this);this._data=a},getData:function(){return this._data},select:function(e){var t=this.option.selected;if("single"===this.get("selectedMode")){var n=this._data;Fe.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;Fe.each(e,(function(e){t[e.get("name",!0)]=!0}))},inverseSelect:function(){var e=this._data,t=this.option.selected;Fe.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])&&Fe.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}}}),AH=IH;function DH(e,t,n){var i,a={},r="toggleSelected"===e;return n.eachComponent("legend",(function(n){r&&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();Fe.each(o,(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var i=n.isSelected(t);a.hasOwnProperty(t)?a[t]=a[t]&&i:a[t]=i}}))})),"allSelect"===e||"inverseSelect"===e?{selected:a}:{name:t.name,selected:a}}jx.registerAction("legendToggleSelect","legendselectchanged",Fe.curry(DH,"toggleSelected")),jx.registerAction("legendAllSelect","legendselectall",Fe.curry(DH,"allSelect")),jx.registerAction("legendInverseSelect","legendinverseselect",Fe.curry(DH,"inverseSelect")),jx.registerAction("legendSelect","legendselected",Fe.curry(DH,"select")),jx.registerAction("legendUnSelect","legendunselected",Fe.curry(DH,"unSelect"));var CH=F_.createSymbol,OH=Sz.makeBackground,kH=Fe.curry,LH=Fe.each,EH=Jc.Group,NH=jx.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new EH),this._backgroundEl,this.group.add(this._selectorGroup=new EH),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 a=e.get("align"),r=e.get("orient");a&&"auto"!==a||(a="right"===e.get("left")&&"vertical"===r?"right":"left");var o=e.get("selector",!0),s=e.get("selectorPosition",!0);!o||s&&"auto"!==s||(s="horizontal"===r?"end":"start"),this.renderInner(a,e,t,n,o,r,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),h=td.getLayoutRect(l,u,c),d=this.layoutInner(e,a,h,i,o,s),f=td.getLayoutRect(Fe.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=OH(d,e))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(e,t,n,i,a,r,o){var s=this.getContentGroup(),l=Fe.createHashMap(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),LH(t.getData(),(function(a,r){var o=a.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,r,a,t,g,m,e,f,p,u).on("click",kH(RH,o,null,i,c)).on("mouseover",kH(zH,h.name,null,i,c)).on("mouseout",kH(BH,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,r,a,t,"roundRect",null,e,d,f,u).on("click",kH(RH,null,o,i,c)).on("mouseover",kH(zH,null,o,i,c)).on("mouseout",kH(BH,null,o,i,c)),l.set(o,!0)}}),this)}else s.add(new EH({newline:!0}))}),this),a&&this._createSelector(a,t,i,r,o)},_createSelector:function(e,t,n,i,a){var r=this.getSelectorGroup();LH(e,(function(e){!function(e){var i=e.type,a=new Jc.Text({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});r.add(a);var o=t.getModel("selectorLabel"),s=t.getModel("emphasis.selectorLabel");Jc.setLabelStyle(a.style,a.hoverStyle={},o,s,{defaultText:e.title,isRectText:!1}),Jc.setHoverStyle(a)}(e)}))},_createItem:function(e,t,n,i,a,r,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 EH,y=n.getModel("textStyle"),_=n.get("icon"),x=n.getModel("tooltip"),b=x.parentModel,w=CH(a=_||a,0,0,c,h,m?s:d,null==p||p);if(v.add(PH(w,a,g,l,f,m)),!_&&r&&(r!==a||"none"===r)){var S=.8*h;"none"===r&&(r="circle");var M=CH(r,(c-S)/2,(h-S)/2,S,S,m?s:d,null==p||p);v.add(PH(M,r,g,l,f,m))}var T="left"===o?c+5:-5,I=o,A=i.get("formatter"),D=e;"string"==typeof A&&A?D=A.replace("{name}",null!=e?e:""):"function"==typeof A&&(D=A(e)),v.add(new Jc.Text({style:Jc.setTextStyle({},y,{text:D,x:T,y:h/2,textFill:m?y.getTextColor():d,textAlign:I,textVerticalAlign:"middle"})}));var C=new Jc.Rect({shape:v.getBoundingRect(),invisible:!0,tooltip:x.get("show")?Fe.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(C),v.eachChild((function(e){e.silent=!0})),C.silent=!u,this.getContentGroup().add(v),Jc.setHoverStyle(v),v.__legendDataIndex=t,v},layoutInner:function(e,t,n,i,a,r){var o=this.getContentGroup(),s=this.getSelectorGroup();td.box(e.get("orient"),o,e.get("itemGap"),n.width,n.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(a){td.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"===r?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}});function PH(e,t,n,i,a,r){var o;return"line"!==t&&t.indexOf("empty")<0?(o=n.getItemStyle(),e.style.stroke=i,r||(o.stroke=a)):o=n.getItemStyle(["borderWidth","borderColor"]),e.setStyle(o)}function RH(e,t,n,i){BH(e,t,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),zH(e,t,n,i)}function zH(e,t,n,i){var a=n.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:i})}function BH(e,t,n,i){var a=n.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:i})}var VH=NH;var HH=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}))};jx.registerProcessor(jx.PRIORITY.PROCESSOR.SERIES_FILTER,HH),sd.registerSubTypeDefaulter("legend",(function(){return"plain"}));var YH=td.mergeLayoutParam,FH=td.getLayoutParams,GH=AH.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 a=FH(e);GH.superCall(this,"init",e,t,n,i),WH(this,e,a)},mergeOption:function(e,t){GH.superCall(this,"mergeOption",e,t),WH(this,this.option,e)}});function WH(e,t,n){var i=[1,1];i[e.getOrient().index]=0,YH(t,n,{type:"box",ignoreSize:i})}var jH=Jc.Group,UH=["width","height"],ZH=["x","y"],XH=VH.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){XH.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new jH),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new jH),this._showController},resetInner:function(){XH.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(e,t,n,i,a,r,o){var s=this;XH.superCall(this,"renderInner",e,t,n,i,a,r,o);var l=this._controllerGroup,u=t.get("pageIconSize",!0);Fe.isArray(u)||(u=[u,u]),h("pagePrev",0);var c=t.getModel("pageTextStyle");function h(e,n){var a=e+"DataIndex",r=Jc.createIcon(t.get("pageIcons",!0)[t.getOrient().name][n],{onclick:Fe.bind(s._pageGo,s,a,t,i)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});r.name=e,l.add(r)}l.add(new Jc.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,a,r){var o=this.getSelectorGroup(),s=e.getOrient().index,l=UH[s],u=ZH[s],c=UH[1-s],h=ZH[1-s];a&&td.box("horizontal",o,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),f=o.getBoundingRect(),p=[-f.x,-f.y],g=Fe.clone(n);a&&(g[l]=n[l]-f[l]-d);var m=this._layoutContentAndController(e,i,g,s,l,c,h);if(a){if("end"===r)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,a,r,o){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;td.box(e.get("orient"),s,e.get("itemGap"),i?n.width:null,i?null:n.height),td.box("horizontal",u,e.get("pageButtonItemGap",!0));var c=s.getBoundingRect(),h=u.getBoundingRect(),d=this._showController=c[a]>n[a],f=[-c.x,-c.y];t||(f[i]=s.position[i]);var p=[0,0],g=[-h.x,-h.y],m=Fe.retrieve2(e.get("pageButtonGap",!0),e.get("itemGap",!0));d&&("end"===e.get("pageButtonPosition",!0)?g[i]+=n[a]-h[a]:p[i]+=h[a]+m);g[1-i]+=c[r]/2-h[r]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[a]=d?n[a]:c[a],v[r]=Math.max(c[r],h[r]),v[o]=Math.min(0,h[o]+g[1-i]),l.__rectSize=n[a],d){var y={x:0,y:0};y[a]=Math.max(n[a]-h[a]-m,0),y[r]=v[r],l.setClipPath(new Jc.Rect({shape:y})),l.__rectSize=y[a]}else u.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(e);return null!=_.pageIndex&&Jc.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;Fe.each(["pagePrev","pageNext"],(function(i){var a=null!=t[i+"DataIndex"],r=n.childOfName(i);r&&(r.setStyle("fill",a?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),r.cursor=a?"pointer":"default")}));var i=n.childOfName("pageText"),a=e.get("pageFormatter"),r=t.pageIndex,o=null!=r?r+1:0,s=t.pageCount;i&&a&&i.setStyle("text",Fe.isString(a)?a.replace("{current}",o).replace("{total}",s):a({current:o,total:s}))},_getPageInfo:function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,a=e.getOrient().index,r=UH[a],o=ZH[a],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[a]=-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[a];return{s:n,e:n+t[r],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,a){var r=i.__legendDataIndex;null==n&&null!=r&&(n=a),r===e&&(t=a)})),null!=t?t:n):0;var t,n}});jx.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)}))})),TB.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var qH=Jc.Rect,KH=Ch.linearMap,$H=Ch.asc,QH=Fe.bind,JH=Fe.each,eY="horizontal",tY="vertical",nY=["line","bar","candlestick","scatter"],iY=AB.extend({type:"dataZoom.slider",init:function(e,t){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=t},render:function(e,t,n,i){iY.superApply(this,"render",arguments),Ig.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=e.get("orient"),!1!==this.dataZoomModel.get("show")?(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){iY.superApply(this,"remove",arguments),Ig.clear(this,"_dispatchZoomAction")},dispose:function(){iY.superApply(this,"dispose",arguments),Ig.clear(this,"_dispatchZoomAction")},_buildView:function(){var e=this.group;e.removeAll(),this._resetLocation(),this._resetInterval();var t=this._displayables.barGroup=new Jc.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},_resetLocation:function(){var e=this.dataZoomModel,t=this.api,n=this._findCoordRect(),i={width:t.getWidth(),height:t.getHeight()},a=this._orient===eY?{right:i.width-n.x-n.width,top:i.height-30-7,width:n.width,height:30}:{right:7,top:n.y,width:30,height:n.height},r=td.getLayoutParams(e.option);Fe.each(["right","top","width","height"],(function(e){"ph"===r[e]&&(r[e]=a[e])}));var o=td.getLayoutRect(r,i,e.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],this._orient===tY&&this._size.reverse()},_positionGroup:function(){var e=this.group,t=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),a=i&&i.get("inverse"),r=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;r.attr(n!==eY||a?n===eY&&a?{scale:o?[-1,1]:[-1,-1]}:n!==tY||a?{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[1,1]:[1,-1]});var s=e.getBoundingRect([r]);e.attr("position",[t.x-s.x,t.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.barGroup;n.add(new qH({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40})),n.add(new qH({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:Fe.bind(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(e){var t=this._size,n=e.series,i=n.getRawData(),a=n.getShadowDim?n.getShadowDim():e.otherDim;if(null!=a){var r=i.getDataExtent(a),o=.3*(r[1]-r[0]);r=[r[0]-o,r[1]+o];var s,l=[0,t[1]],u=[0,t[0]],c=[[t[0],0],[0,0]],h=[],d=u[1]/(i.count()-1),f=0,p=Math.round(i.count()/t[0]);i.each([a],(function(e,t){if(p>0&&t%p)f+=d;else{var n=null==e||isNaN(e)||""===e,i=n?0:KH(e,r,l,!0);n&&!s&&t?(c.push([c[c.length-1][0],0]),h.push([h[h.length-1][0],0])):!n&&s&&(c.push([f,0]),h.push([f,0])),c.push([f,i]),h.push([f,i]),f+=d,s=n}}));var g=this.dataZoomModel;this._displayables.barGroup.add(new Jc.Polygon({shape:{points:c},style:Fe.defaults({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new Jc.Polyline({shape:{points:h},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,i=this.ecModel;return e.eachTargetAxis((function(a,r){var o=e.getAxisProxy(a.name,r).getTargetSeriesModels();Fe.each(o,(function(e){if(!(n||!0!==t&&Fe.indexOf(nY,e.get("type"))<0)){var o,s=i.getComponent(a.axis,r).axis,l=function(e){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[e]}(a.name),u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(o=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:a.name,otherDim:l,otherAxisInverse:o}}}),this)}),this),n}},_renderHandle:function(){var e=this._displayables,t=e.handles=[],n=e.handleLabels=[],i=this._displayables.barGroup,a=this._size,r=this.dataZoomModel;i.add(e.filler=new qH({draggable:!0,cursor:aY(this._orient),drift:QH(this._onDragMove,this,"all"),ondragstart:QH(this._showDataInfo,this,!0),ondragend:QH(this._onDragEnd,this),onmouseover:QH(this._showDataInfo,this,!0),onmouseout:QH(this._showDataInfo,this,!1),style:{fill:r.get("fillerColor"),textPosition:"inside"}})),i.add(new qH({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{stroke:r.get("dataBackgroundColor")||r.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),JH([0,1],(function(e){var a=Jc.createIcon(r.get("handleIcon"),{cursor:aY(this._orient),draggable:!0,drift:QH(this._onDragMove,this,e),ondragend:QH(this._onDragEnd,this),onmouseover:QH(this._showDataInfo,this,!0),onmouseout:QH(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),o=a.getBoundingRect();this._handleHeight=Ch.parsePercent(r.get("handleSize"),this._size[1]),this._handleWidth=o.width/o.height*this._handleHeight,a.setStyle(r.getModel("handleStyle").getItemStyle());var s=r.get("handleColor");null!=s&&(a.style.fill=s),i.add(t[e]=a);var l=r.textStyleModel;this.group.add(n[e]=new Jc.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))}),this)},_resetInterval:function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[KH(e[0],[0,100],t,!0),KH(e[1],[0,100],t,!0)]},_updateInterval:function(e,t){var n=this.dataZoomModel,i=this._handleEnds,a=this._getViewExtent(),r=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];IO(t,i,a,n.get("zoomLock")?"all":e,null!=r.minSpan?KH(r.minSpan,o,a,!0):null,null!=r.maxSpan?KH(r.maxSpan,o,a,!0):null);var s=this._range,l=this._range=$H([KH(i[0],a,o,!0),KH(i[1],a,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(e){var t=this._displayables,n=this._handleEnds,i=$H(n.slice()),a=this._size;JH([0,1],(function(e){var i=t.handles[e],r=this._handleHeight;i.attr({scale:[r/2,r/2],position:[n[e],a[1]/2-r/2]})}),this),t.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:a[1]}),this._updateDataInfo(e)},_updateDataInfo:function(e){var t=this.dataZoomModel,n=this._displayables,i=n.handleLabels,a=this._orient,r=["",""];if(t.get("showDetail")){var o=t.findRepresentativeAxisProxy();if(o){var s=o.getAxisModel().axis,l=this._range,u=e?o.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:o.getDataValueWindow();r=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=$H(this._handleEnds.slice());function h(e){var t=Jc.getTransform(n.handles[e].parent,this.group),o=Jc.transformDirection(0===e?"right":"left",t),s=this._handleWidth/2+5,l=Jc.applyTransform([c[e]+(0===e?-s:s),this._size[1]/2],t);i[e].setStyle({x:l[0],y:l[1],textVerticalAlign:a===eY?"middle":o,textAlign:a===eY?o:"center",text:r[e]})}h.call(this,0),h.call(this,1)},_formatLabel:function(e,t){var n=this.dataZoomModel,i=n.get("labelFormatter"),a=n.get("labelPrecision");null!=a&&"auto"!==a||(a=t.getPixelPrecision());var r=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel(Math.round(e)):e.toFixed(Math.min(a,20));return Fe.isFunction(i)?i(e,r):Fe.isString(i)?i.replace("{value}",r):r},_showDataInfo:function(e){e=this._dragging||e;var t=this._displayables.handleLabels;t[0].attr("invisible",!e),t[1].attr("invisible",!e)},_onDragMove:function(e,t,n,i){this._dragging=!0,Bt.stop(i.event);var a=this._displayables.barGroup.getLocalTransform(),r=Jc.applyTransform([t,n],a,!0),o=this._updateInterval(e,r[0]),s=this.dataZoomModel.get("realtime");this._updateView(!s),o&&s&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),!this.dataZoomModel.get("realtime")&&this._dispatchZoomAction()},_onClickPanelClick:function(e){var t=this._size,n=this._displayables.barGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var i=this._handleEnds,a=(i[0]+i[1])/2,r=this._updateInterval("all",n[0]-a);this._updateView(),r&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:e[0],end:e[1]})},_findCoordRect:function(){var e;if(JH(this.getTargetCoordInfo(),(function(t){if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}})),!e){var t=this.api.getWidth(),n=this.api.getHeight();e={x:.2*t,y:.2*n,width:.6*t,height:.6*n}}return e}});function aY(e){return"vertical"===e?"ns-resize":"ew-resize"}TB.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var rY="\0_ec_dataZoom_roams";function oY(e){var t=e.getZr();return t[rY]||(t[rY]={})}function sY(e){Fe.each(e,(function(t,n){t.count||(t.controller.dispose(),delete e[n])}))}function lY(e,t){e.dispatchAction({type:"dataZoom",batch:t})}var uY=function(e,t){var n=oY(e),i=t.dataZoomId,a=t.coordId;Fe.each(n,(function(e,n){var r=e.dataZoomInfos;r[i]&&Fe.indexOf(t.allCoordIds,a)<0&&(delete r[i],e.count--)})),sY(n);var r=n[a];r||((r=n[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(e,t){var n=new jT(e.getZr());return Fe.each(["pan","zoom","scrollMove"],(function(e){n.on(e,(function(n){var i=[];Fe.each(t.dataZoomInfos,(function(a){if(n.isAvailableBehavior(a.dataZoomModel.option)){var r=(a.getRange||{})[e],o=r&&r(t.controller,n);!a.dataZoomModel.get("disabled",!0)&&o&&i.push({dataZoomId:a.dataZoomId,start:o[0],end:o[1]})}})),i.length&&t.dispatchAction(i)}))})),n}(e,r),r.dispatchAction=Fe.curry(lY,e)),!r.dataZoomInfos[i]&&r.count++,r.dataZoomInfos[i]=t;var o,s,l,u,c,h=(o=r.dataZoomInfos,l="type_",u={type_true:2,type_move:1,type_false:0,type_undefined:-1},c=!0,Fe.each(o,(function(e){var t=e.dataZoomModel,n=!t.get("disabled",!0)&&(!t.get("zoomLock",!0)||"move");u[l+n]>u[l+s]&&(s=n),c&=t.get("preventDefaultMouseMove",!0)})),{controlType:s,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!c}});r.controller.enable(h.controlType,h.opt),r.controller.setPointerChecker(t.containsPoint),Ig.createOrUpdate(r,"dispatchAction",t.dataZoomModel.get("throttle",!0),"fixRate")},cY={register:uY,unregister:function(e,t){var n=oY(e);Fe.each(n,(function(e){e.controller.dispose();var n=e.dataZoomInfos;n[t]&&(delete n[t],e.count--)})),sY(n)},generateCoordId:function(e){return e.type+"\0_"+e.id}},hY=Fe.bind,dY=AB.extend({type:"dataZoom.inside",init:function(e,t){this._range},render:function(e,t,n,i){dY.superApply(this,"render",arguments),this._range=e.getPercentRange(),Fe.each(this.getTargetCoordInfo(),(function(t,i){var a=Fe.map(t,(function(e){return cY.generateCoordId(e.model)}));Fe.each(t,(function(t){var r=t.model,o={};Fe.each(["pan","zoom","scrollMove"],(function(e){o[e]=hY(fY[e],this,t,i)}),this),cY.register(n,{coordId:cY.generateCoordId(r),allCoordIds:a,containsPoint:function(e,t,n){return r.coordinateSystem.containPoint([t,n])},dataZoomId:e.id,dataZoomModel:e,getRange:o})}),this)}),this)},dispose:function(){cY.unregister(this.api,this.dataZoomModel.id),dY.superApply(this,"dispose",arguments),this._range=null}}),fY={zoom:function(e,t,n,i){var a=this._range,r=a.slice(),o=e.axisModels[0];if(o){var s=gY[t](null,[i.originX,i.originY],o,n,e),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(r[1]-r[0])+r[0],u=Math.max(1/i.scale,0);r[0]=(r[0]-l)*u+l,r[1]=(r[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return IO(0,r,[0,100],0,c.minSpan,c.maxSpan),this._range=r,a[0]!==r[0]||a[1]!==r[1]?r:void 0}},pan:pY((function(e,t,n,i,a,r){var o=gY[i]([r.oldX,r.oldY],[r.newX,r.newY],t,a,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength})),scrollMove:pY((function(e,t,n,i,a,r){return gY[i]([0,0],[r.scrollDelta,r.scrollDelta],t,a,n).signal*(e[1]-e[0])*r.scrollDelta}))};function pY(e){return function(t,n,i,a){var r=this._range,o=r.slice(),s=t.axisModels[0];if(s){var l=e(o,s,t,n,i,a);return IO(l,o,[0,100],"all"),this._range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}}}var gY={grid:function(e,t,n,i,a){var r=n.axis,o={},s=a.model.coordinateSystem.getRect();return e=e||[0,0],"x"===r.dim?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=r.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=r.inverse?-1:1),o},polar:function(e,t,n,i,a){var r=n.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=r.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=r.inverse?-1:1),o},singleAxis:function(e,t,n,i,a){var r=n.axis,o=a.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===r.orient?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=r.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=r.inverse?-1:1),s}},mY=Fe.each;function vY(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}var yY=function(e){var t=e&&e.visualMap;Fe.isArray(t)||(t=t?[t]:[]),mY(t,(function(e){if(e){vY(e,"splitList")&&!vY(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&Fe.isArray(t)&&mY(t,(function(e){Fe.isObject(e)&&(vY(e,"start")&&!vY(e,"min")&&(e.min=e.start),vY(e,"end")&&!vY(e,"max")&&(e.max=e.end))}))}}))};sd.registerSubTypeDefaulter("visualMap",(function(e){return e.categories||(e.pieces?e.pieces.length>0:e.splitNumber>0)&&!e.calculable?"piecewise":"continuous"}));var _Y=jx.PRIORITY.VISUAL.COMPONENT;function xY(e,t,n,i){for(var a=t.targetVisuals[i],r=uD.prepareVisualTypes(a),o={color:e.getData().getVisual("color")},s=0,l=r.length;s<l;s++){var u=r[s],c=a["opacity"===u?"__alphaForOpacity":u];c&&c.applyVisual(n,h,d)}return o.color;function h(e){return o[e]}function d(e,t){o[e]=t}}jx.registerVisual(_Y,{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent("visualMap",(function(t){var i=e.pipelineContext;!t.isTargetSeries(e)||i&&i.large||n.push(lV.incrementalApplyVisual(t.stateList,t.targetVisuals,Fe.bind(t.getValueState,t),t.getDataDimension(e.getData())))})),n}}),jx.registerVisual(_Y,{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),i=[];t.eachComponent("visualMap",(function(t){if(t.isTargetSeries(e)){var a=t.getVisualMeta(Fe.bind(xY,null,e,t))||{stops:[],outerColors:[]},r=t.getDataDimension(n),o=n.getDimensionInfo(r);null!=o&&(a.dimension=o.index,i.push(a))}})),e.getData().setVisual("visualMeta",i)}});var bY={get:function(e,t,n){var i=Fe.clone((wY[e]||{})[t]);return n&&Fe.isArray(i)?i[i.length-1]:i}},wY={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},SY=bY,MY=uD.mapVisual,TY=uD.eachVisual,IY=Fe.isArray,AY=Fe.each,DY=Ch.asc,CY=Ch.linearMap,OY=Fe.noop,kY=jx.extendComponentModel({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(e,t,n){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(e,n)},optionUpdated:function(e,t){var n=this.option;re.canvasSupported||(n.realtime=!1),!t&&lV.replaceVisualOption(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(e){var t=this.stateList;e=Fe.bind(e,this),this.controllerVisuals=lV.createVisualMappings(this.option.controller,t,e),this.targetVisuals=lV.createVisualMappings(this.option.target,t,e)},getTargetSeriesIndices:function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries((function(e,n){t.push(n)})):t=Po.normalizeToArray(e),t},eachTargetSeries:function(e,t){Fe.each(this.getTargetSeriesIndices(),(function(n){e.call(t,this.ecModel.getSeriesByIndex(n))}),this)},isTargetSeries:function(e){var t=!1;return this.eachTargetSeries((function(n){n===e&&(t=!0)})),t},formatValueText:function(e,t,n){var i,a,r=this.option,o=r.precision,s=this.dataBound,l=r.formatter;return n=n||["<",">"],Fe.isArray(e)&&(e=e.slice(),i=!0),a=t?e:i?[u(e[0]),u(e[1])]:u(e),Fe.isString(l)?l.replace("{value}",i?a[0]:a).replace("{value2}",i?a[1]:a):Fe.isFunction(l)?i?l(e[0],e[1]):l(e):i?e[0]===s[0]?n[0]+" "+a[1]:e[1]===s[1]?n[1]+" "+a[0]:a[0]+" - "+a[1]:a;function u(e){return e===s[0]?"min":e===s[1]?"max":(+e).toFixed(Math.min(o,20))}},resetExtent:function(){var e=this.option,t=DY([e.min,e.max]);this._dataExtent=t},getDataDimension:function(e){var t=this.option.dimension,n=e.dimensions;if(null!=t||n.length){if(null!=t)return e.getDimension(t);for(var i=e.dimensions,a=i.length-1;a>=0;a--){var r=i[a];if(!e.getDimensionInfo(r).isCalculationCoord)return r}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},i=t.target||(t.target={}),a=t.controller||(t.controller={});Fe.merge(i,n),Fe.merge(a,n);var r=this.isCategory();function o(n){IY(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")},AY(this.stateList,(function(e){var t=n[e];if(Fe.isString(t)){var i=SY.get(t,"active",r);i?(n[e]={},n[e][t]=i):delete n[e]}}),this)}o.call(this,i),o.call(this,a),function(e,t,n){var i=e[t],a=e[n];i&&!a&&(a=e[n]={},AY(i,(function(e,t){if(uD.isValidType(t)){var n=SY.get(t,"inactive",r);null!=n&&(a[t]=n,"color"!==t||a.hasOwnProperty("opacity")||a.hasOwnProperty("colorAlpha")||(a.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,i=this.get("inactiveColor");AY(this.stateList,(function(a){var o=this.itemSize,s=e[a];s||(s=e[a]={color:r?i:[i]}),null==s.symbol&&(s.symbol=t&&Fe.clone(t)||(r?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=n&&Fe.clone(n)||(r?o[0]:[o[0],o[0]])),s.symbol=MY(s.symbol,(function(e){return"none"===e||"square"===e?"roundRect":e}));var l=s.symbolSize;if(null!=l){var u=-1/0;TY(l,(function(e){e>u&&(u=e)})),s.symbolSize=MY(l,(function(e){return CY(e,[0,u],[0,o[0]],!0)}))}}),this)}.call(this,a)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:OY,getValueState:OY,getVisualMeta:OY}),LY=kY,EY=[20,140],NY=LY.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(e,t){NY.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){NY.superApply(this,"resetItemSize",arguments);var e=this.itemSize;"horizontal"===this._orient&&e.reverse(),(null==e[0]||isNaN(e[0]))&&(e[0]=EY[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=EY[1])},_resetRange:function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):Fe.isArray(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},completeVisualOption:function(){LY.prototype.completeVisualOption.apply(this,arguments),Fe.each(this.stateList,(function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=0)}),this)},setSelected:function(e){this.option.range=e.slice(),this._resetRange()},getSelected:function(){var e=this.getExtent(),t=Ch.asc((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},getValueState:function(e){var t=this.option.range,n=this.getExtent();return(t[0]<=n[0]||t[0]<=e)&&(t[1]>=n[1]||e<=t[1])?"inRange":"outOfRange"},findTargetDataIndices:function(e){var t=[];return this.eachTargetSeries((function(n){var i=[],a=n.getData();a.each(this.getDataDimension(a),(function(t,n){e[0]<=t&&t<=e[1]&&i.push(n)}),this),t.push({seriesId:n.id,dataIndex:i})}),this),t},getVisualMeta:function(e){var t=PY(this,"outOfRange",this.getExtent()),n=PY(this,"inRange",this.option.range.slice()),i=[];function a(t,n){i.push({value:t,color:e(t,n)})}for(var r=0,o=0,s=n.length,l=t.length;o<l&&(!n.length||t[o]<=n[0]);o++)t[o]<n[r]&&a(t[o],"outOfRange");for(var u=1;r<s;r++,u=0)u&&i.length&&a(n[r],"outOfRange"),a(n[r],"inRange");for(u=1;o<l;o++)(!n.length||n[n.length-1]<t[o])&&(u&&(i.length&&a(i[i.length-1].value,"outOfRange"),u=0),a(t[o],"outOfRange"));var c=i.length;return{stops:i,outerColors:[c?i[0].color:"transparent",c?i[c-1].color:"transparent"]}}});function PY(e,t,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,a=n[0],r=[],o=0;o<=200&&a<n[1];o++)r.push(a),a+=i;return r.push(n[1]),r}var RY=jx.extendComponentView({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(e,t){this.ecModel=e,this.api=t,this.visualMapModel},render:function(e,t,n,i){this.visualMapModel=e,!1!==e.get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(e){var t=this.visualMapModel,n=Fh.normalizeCssArray(t.get("padding")||0),i=e.getBoundingRect();e.add(new Jc.Rect({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},getControllerVisual:function(e,t,n){var i=(n=n||{}).forceState,a=this.visualMapModel,r={};if("symbol"===t&&(r.symbol=a.get("itemSymbol")),"color"===t){var o=a.get("contentColor");r.color=o}function s(e){return r[e]}function l(e,t){r[e]=t}var u=a.controllerVisuals[i||a.getValueState(e)],c=uD.prepareVisualTypes(u);return Fe.each(c,(function(i){var a=u[i];n.convertOpacityToAlpha&&"opacity"===i&&(i="colorAlpha",a=u.__alphaForOpacity),uD.dependsOn(i,t)&&a&&a.applyVisual(e,s,l)})),r[t]},positionGroup:function(e){var t=this.visualMapModel,n=this.api;td.positionElement(e,t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},doRender:Fe.noop}),zY=RY,BY=td.getLayoutRect;var VY=function(e,t,n){var i=e.option,a=i.align;if(null!=a&&"auto"!==a)return a;for(var r={width:t.getWidth(),height:t.getHeight()},o="horizontal"===i.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[o],u=[0,null,10],c={},h=0;h<3;h++)c[s[1-o][h]]=u[h],c[l[h]]=2===h?n[0]:i[l[h]];var d=[["x","width",3],["y","height",0]][o],f=BY(c,r,i.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*r[d[1]]?0:1]},HY={getItemAlign:VY,makeHighDownBatch:function(e,t){return Fe.each(e||[],(function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")})),e}},YY=Ch.linearMap,FY=Fe.each,GY=Math.min,WY=Math.max,jY=zY.extend({type:"visualMap.continuous",init:function(){jY.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(e,t,n,i){i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var n=e.get("text");this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},_renderEndsText:function(e,t,n){if(t){var i=t[1-n];i=null!=i?i+"":"";var a=this.visualMapModel,r=a.get("textGap"),o=a.itemSize,s=this._shapes.barGroup,l=this._applyTransform([o[0]/2,0===n?-r:o[1]+r],s),u=this._applyTransform(0===n?"bottom":"top",s),c=this._orient,h=this.visualMapModel.textStyleModel;this.group.add(new Jc.Text({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===c?"middle":u,textAlign:"horizontal"===c?u:"center",text:i,textFont:h.getFont(),textFill:h.getTextColor()}}))}},_renderBar:function(e){var t=this.visualMapModel,n=this._shapes,i=t.itemSize,a=this._orient,r=this._useHandle,o=HY.getItemAlign(t,this.api,i),s=n.barGroup=this._createBarGroup(o);s.add(n.outOfRange=UY()),s.add(n.inRange=UY(null,r?XY(this._orient):null,Fe.bind(this._dragHandle,this,"all",!1),Fe.bind(this._dragHandle,this,"all",!0)));var l=t.textStyleModel.getTextRect("国"),u=WY(l.width,l.height);r&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(s,0,i,u,a,o),this._createHandle(s,1,i,u,a,o)),this._createIndicator(s,i,u,a),e.add(s)},_createHandle:function(e,t,n,i,a){var r=Fe.bind(this._dragHandle,this,t,!1),o=Fe.bind(this._dragHandle,this,t,!0),s=UY(function(e,t){return 0===e?[[0,0],[t,0],[t,-t]]:[[0,0],[t,0],[t,t]]}(t,i),XY(this._orient),r,o);s.position[0]=n[0],e.add(s);var l=this.visualMapModel.textStyleModel,u=new Jc.Text({draggable:!0,drift:r,onmousemove:function(e){Bt.stop(e.event)},ondragend:o,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var c=["horizontal"===a?i/2:1.5*i,"horizontal"===a?0===t?-1.5*i:1.5*i:0===t?-i/2:i/2],h=this._shapes;h.handleThumbs[t]=s,h.handleLabelPoints[t]=c,h.handleLabels[t]=u},_createIndicator:function(e,t,n,i){var a=UY([[0,0]],"move");a.position[0]=t[0],a.attr({invisible:!0,silent:!0}),e.add(a);var r=this.visualMapModel.textStyleModel,o=new Jc.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:r.getFont(),textFill:r.getTextColor()}});this.group.add(o);var s=["horizontal"===i?n/2:9,0],l=this._shapes;l.indicator=a,l.indicatorLabel=o,l.indicatorLabelPoint=s},_dragHandle:function(e,t,n,i){if(this._useHandle){if(this._dragging=!t,!t){var a=this._applyTransform([n,i],this._shapes.barGroup,!0);this._updateInterval(e,a[1]),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?!this._hovering&&this._clearHoverLinkToSeries():ZY(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},_resetInterval:function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),i=[0,e.itemSize[1]];this._handleEnds=[YY(t[0],n,i,!0),YY(t[1],n,i,!0)]},_updateInterval:function(e,t){t=t||0;var n=this.visualMapModel,i=this._handleEnds,a=[0,n.itemSize[1]];IO(t,i,a,e,0);var r=n.getExtent();this._dataInterval=[YY(i[0],a,r,!0),YY(i[1],a,r,!0)]},_updateView:function(e){var t=this.visualMapModel,n=t.getExtent(),i=this._shapes,a=[0,t.itemSize[1]],r=e?a:this._handleEnds,o=this._createBarVisual(this._dataInterval,n,r,"inRange"),s=this._createBarVisual(n,n,a,"outOfRange");i.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),i.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(r,o)},_createBarVisual:function(e,t,n,i){var a={forceState:i,convertOpacityToAlpha:!0},r=this._makeColorGradient(e,a),o=[this.getControllerVisual(e[0],"symbolSize",a),this.getControllerVisual(e[1],"symbolSize",a)],s=this._createBarPoints(n,o);return{barColor:new Ru(0,0,0,1,r),barPoints:s,handlesColor:[r[0].color,r[r.length-1].color]}},_makeColorGradient:function(e,t){var n=[],i=(e[1]-e[0])/100;n.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var a=1;a<100;a++){var r=e[0]+i*a;if(r>e[1])break;n.push({color:this.getControllerVisual(r,"color",t),offset:a/100})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},_createBarPoints:function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},_createBarGroup:function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new Jc.Group("horizontal"!==t||n?"horizontal"===t&&n?{scale:"bottom"===e?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==t||n?{scale:"left"===e?[1,1]:[-1,1]}:{scale:"left"===e?[1,-1]:[-1,-1]}:{scale:"bottom"===e?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(e,t){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,a=n.handleThumbs,r=n.handleLabels;FY([0,1],(function(o){var s=a[o];s.setStyle("fill",t.handlesColor[o]),s.position[1]=e[o];var l=Jc.applyTransform(n.handleLabelPoints[o],Jc.getTransform(s,this.group));r[o].setStyle({x:l[0],y:l[1],text:i.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===o?"bottom":"top":"left",n.barGroup)})}),this)}},_showIndicator:function(e,t,n,i){var a=this.visualMapModel,r=a.getExtent(),o=a.itemSize,s=[0,o[1]],l=YY(e,r,s,!0),u=this._shapes,c=u.indicator;if(c){c.position[1]=l,c.attr("invisible",!1),c.setShape("points",function(e,t,n,i){return e?[[0,-GY(t,WY(n,0))],[6,0],[0,GY(t,WY(i-n,0))]]:[[0,0],[5,-5],[5,5]]}(!!n,i,l,o[1]));var h=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0});c.setStyle("fill",h);var d=Jc.applyTransform(u.indicatorLabelPoint,Jc.getTransform(c,this.group)),f=u.indicatorLabel;f.attr("invisible",!1);var p=this._applyTransform("left",u.barGroup),g=this._orient;f.setStyle({text:(n||"")+a.formatValueText(t),textVerticalAlign:"horizontal"===g?p:"middle",textAlign:"horizontal"===g?"center":p,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var e=this;this._shapes.barGroup.on("mousemove",(function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,i=e._applyTransform([t.offsetX,t.offsetY],e._shapes.barGroup,!0,!0);i[1]=GY(WY(0,i[1]),n[1]),e._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}})).on("mouseout",(function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()}))},_enableHoverLinkFromSeries:function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(e,t){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var a=[0,i[1]],r=n.getExtent();e=GY(WY(a[0],e),a[1]);var o=function(e,t,n){var i=6,a=e.get("hoverLinkDataSize");a&&(i=YY(a,t,n,!0)/2);return i}(n,r,a),s=[e-o,e+o],l=YY(e,a,r,!0),u=[YY(s[0],a,r,!0),YY(s[1],a,r,!0)];s[0]<a[0]&&(u[0]=-1/0),s[1]>a[1]&&(u[1]=1/0),t&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",o):u[1]===1/0?this._showIndicator(l,u[0],"> ",o):this._showIndicator(l,l,"≈ ",o));var c=this._hoverLinkDataIndices,h=[];(t||ZY(n))&&(h=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var d=Po.compressBatches(c,h);this._dispatchHighDown("downplay",HY.makeHighDownBatch(d[0],n)),this._dispatchHighDown("highlight",HY.makeHighDownBatch(d[1],n))}},_hoverLinkFromSeriesMouseOver:function(e){var t=e.target,n=this.visualMapModel;if(t&&null!=t.dataIndex){var i=this.ecModel.getSeriesByIndex(t.seriesIndex);if(n.isTargetSeries(i)){var a=i.getData(t.dataType),r=a.get(n.getDataDimension(a),t.dataIndex,!0);isNaN(r)||this._showIndicator(r,r)}}},_hideIndicator:function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",HY.makeHighDownBatch(e,this.visualMapModel)),e.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},_applyTransform:function(e,t,n,i){var a=Jc.getTransform(t,i?null:this.group);return Jc[Fe.isArray(e)?"applyTransform":"transformDirection"](e,a,n)},_dispatchHighDown:function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function UY(e,t,n,i){return new Jc.Polygon({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){Bt.stop(e.event)},ondragend:i})}function ZY(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function XY(e){return"vertical"===e?"ns-resize":"ew-resize"}jx.registerAction({type:"selectDataRange",event:"dataRangeSelected",update:"update"},(function(e,t){t.eachComponent({mainType:"visualMap",query:e},(function(t){t.setSelected(e.selected)}))})),jx.registerPreprocessor(yY);var qY=Ch.reformIntervals,KY=LY.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(e,t){KY.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();$Y[this._mode].call(this),this._resetSelected(e,t);var i=this.option.categories;this.resetVisual((function(e,t){"categories"===n?(e.mappingMethod="category",e.categories=Fe.clone(i)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=Fe.map(this._pieceList,(function(e){e=Fe.clone(e);return"inRange"!==t&&(e.visual=null),e})))}))},completeVisualOption:function(){var e=this.option,t={},n=uD.listVisualTypes(),i=this.isCategory();function a(e,t,n){return e&&e[t]&&(Fe.isObject(e[t])?e[t].hasOwnProperty(n):e[t]===n)}Fe.each(e.pieces,(function(e){Fe.each(n,(function(n){e.hasOwnProperty(n)&&(t[n]=1)}))})),Fe.each(t,(function(t,n){var r=0;Fe.each(this.stateList,(function(t){r|=a(e,t,n)||a(e.target,t,n)}),this),!r&&Fe.each(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=SY.get(n,"inRange"===t?"active":"inactive",i)}))}),this),LY.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(e,t){var n=this.option,i=this._pieceList,a=(t?n:e).selected||{};if(n.selected=a,Fe.each(i,(function(e,t){var n=this.getSelectedMapKey(e);a.hasOwnProperty(n)||(a[n]=!0)}),this),"single"===n.selectedMode){var r=!1;Fe.each(i,(function(e,t){var n=this.getSelectedMapKey(e);a[n]&&(r?a[n]=!1:r=!0)}),this)}},getSelectedMapKey:function(e){return"categories"===this._mode?e.value+"":e.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(e){this.option.selected=Fe.clone(e)},getValueState:function(e){var t=uD.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},findTargetDataIndices:function(e){var t=[];return this.eachTargetSeries((function(n){var i=[],a=n.getData();a.each(this.getDataDimension(a),(function(t,n){uD.findPieceIndex(t,this._pieceList)===e&&i.push(n)}),this),t.push({seriesId:n.id,dataIndex:i})}),this),t},getRepresentValue:function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},getVisualMeta:function(e){if(!this.isCategory()){var t=[],n=[],i=this,a=this._pieceList.slice();if(a.length){var r=a[0].interval[0];r!==-1/0&&a.unshift({interval:[-1/0,r]}),(r=a[a.length-1].interval[1])!==1/0&&a.push({interval:[r,1/0]})}else a.push({interval:[-1/0,1/0]});var o=-1/0;return Fe.each(a,(function(e){var t=e.interval;t&&(t[0]>o&&s([o,t[0]],"outOfRange"),s(t.slice()),o=t[1])}),this),{stops:t,outerColors:n}}function s(a,r){var o=i.getRepresentValue({interval:a});r||(r=i.getValueState(o));var s=e(o,r);a[0]===-1/0?n[0]=s:a[1]===1/0?n[1]=s:t.push({value:a[0],color:s},{value:a[1],color:s})}}}),$Y={splitNumber:function(){var e=this.option,t=this._pieceList,n=Math.min(e.precision,20),i=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var r=(i[1]-i[0])/a;+r.toFixed(n)!==r&&n<5;)n++;e.precision=n,r=+r.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var o=0,s=i[0];o<a;s+=r,o++){var l=o===a-1?i[1]:s+r;t.push({interval:[s,l],close:[1,1]})}e.maxOpen&&t.push({interval:[i[1],1/0],close:[0,0]}),qY(t),Fe.each(t,(function(e,t){e.index=t,e.text=this.formatValueText(e.interval)}),this)},categories:function(){var e=this.option;Fe.each(e.categories,(function(e){this._pieceList.push({text:this.formatValueText(e,!0),value:e})}),this),QY(e,this._pieceList)},pieces:function(){var e=this.option,t=this._pieceList;Fe.each(e.pieces,(function(e,n){Fe.isObject(e)||(e={value:e});var i={text:"",index:n};if(null!=e.label&&(i.text=e.label),e.hasOwnProperty("value")){var a=i.value=e.value;i.interval=[a,a],i.close=[1,1]}else{for(var r=i.interval=[],o=i.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],c=0;c<2;c++){for(var h=[["gte","gt","min"],["lte","lt","max"]][c],d=0;d<3&&null==r[c];d++)r[c]=e[h[d]],o[c]=s[d],u[c]=2===d;null==r[c]&&(r[c]=l[c])}u[0]&&r[1]===1/0&&(o[0]=0),u[1]&&r[0]===-1/0&&(o[1]=0),r[0]===r[1]&&o[0]&&o[1]&&(i.value=r[0])}i.visual=uD.retrieveVisuals(e),t.push(i)}),this),QY(e,t),qY(t),Fe.each(t,(function(e){var t=e.close,n=[["<","≤"][t[1]],[">","≥"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)}),this)}};function QY(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}var JY=F_.createSymbol;zY.extend({type:"visualMap.piecewise",doRender:function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),i=t.textStyleModel,a=i.getFont(),r=i.getTextColor(),o=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,c=Fe.retrieve(t.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],s,c,o),Fe.each(l.viewPieceList,(function(i){var l=i.piece,u=new Jc.Group;u.onclick=Fe.bind(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var h=t.getRepresentValue(l);if(this._createItemSymbol(u,h,[0,0,s[0],s[1]]),c){var d=this.visualMapModel.getValueState(h);u.add(new Jc.Text({style:{x:"right"===o?-n:s[0]+n,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:o,textFont:a,textFill:r,opacity:"outOfRange"===d?.5:1}}))}e.add(u)}),this),u&&this._renderEndsText(e,u[1],s,c,o),td.box(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(e,t){function n(e){var n=this.visualMapModel;n.option.hoverLink&&this.api.dispatchAction({type:e,batch:HY.makeHighDownBatch(n.findTargetDataIndices(t),n)})}e.on("mouseover",Fe.bind(n,this,"highlight")).on("mouseout",Fe.bind(n,this,"downplay"))},_getItemAlign:function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return HY.getItemAlign(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},_renderEndsText:function(e,t,n,i,a){if(t){var r=new Jc.Group,o=this.visualMapModel.textStyleModel;r.add(new Jc.Text({style:{x:i?"right"===a?n[0]:0:n[0]/2,y:n[1]/2,textVerticalAlign:"middle",textAlign:i?a:"center",text:t,textFont:o.getFont(),textFill:o.getTextColor()}})),e.add(r)}},_getViewData:function(){var e=this.visualMapModel,t=Fe.map(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),n=e.get("text"),i=e.get("orient"),a=e.get("inverse");return("horizontal"===i?a:!a)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}},_createItemSymbol:function(e,t,n){e.add(JY(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color")))},_onItemClick:function(e){var t=this.visualMapModel,n=t.option,i=Fe.clone(n.selected),a=t.getSelectedMapKey(e);"single"===n.selectedMode?(i[a]=!0,Fe.each(i,(function(e,t){i[t]=t===a}))):i[a]=!i[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}}),jx.registerPreprocessor(yY);var eF,tF="urn:schemas-microsoft-com:vml",nF="undefined"==typeof window?null:window,iF=!1,aF=nF&&nF.document;if(aF&&!re.canvasSupported)try{!aF.namespaces.zrvml&&aF.namespaces.add("zrvml",tF),eF=function(e){return aF.createElement("<zrvml:"+e+' class="zrvml">')}}catch(e){eF=function(e){return aF.createElement("<"+e+' xmlns="'+tF+'" class="zrvml">')}}var rF={doc:aF,createNode:function(e){return eF(e)},initVML:function(){if(!iF&&aF){iF=!0;var e=aF.styleSheets;e.length<31?aF.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):e[0].addRule(".zrvml","behavior:url(#default#VML)")}}},oF=ht.applyTransform,sF=qs.CMD,lF=Math.round,uF=Math.sqrt,cF=Math.abs,hF=Math.cos,dF=Math.sin,fF=Math.max;if(!re.canvasSupported){var pF=",",gF="progid:DXImageTransform.Microsoft",mF=21600,vF=mF/2,yF=function(e){e.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",e.coordsize=mF+","+mF,e.coordorigin="0,0"},_F=function(e,t,n){return"rgb("+[e,t,n].join(",")+")"},xF=function(e,t){t&&e&&t.parentNode!==e&&e.appendChild(t)},bF=function(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)},wF=function(e,t,n){return 1e5*(parseFloat(e)||0)+1e3*(parseFloat(t)||0)+n},SF=xr.parsePercent,MF=function(e,t,n){var i=Xn.parse(t);n=+n,isNaN(n)&&(n=1),i&&(e.color=_F(i[0],i[1],i[2]),e.opacity=n*i[3])},TF=function(e){var t=Xn.parse(e);return[_F(t[0],t[1],t[2]),t[3]]},IF=function(e,t,n,i){var a="fill"===t,r=e.getElementsByTagName(t)[0];null!=n[t]&&"none"!==n[t]&&(a||!a&&n.lineWidth)?(e[a?"filled":"stroked"]="true",n[t]instanceof Nu&&bF(e,r),r||(r=rF.createNode(t)),a?function(e,t,n){var i=t.fill;if(null!=i)if(i instanceof Nu){var a,r=0,o=[0,0],s=0,l=1,u=n.getBoundingRect(),c=u.width,h=u.height;if("linear"===i.type){a="gradient";var d=n.transform,f=[i.x*c,i.y*h],p=[i.x2*c,i.y2*h];d&&(oF(f,f,d),oF(p,p,d));var g=p[0]-f[0],m=p[1]-f[1];(r=180*Math.atan2(g,m)/Math.PI)<0&&(r+=360),r<1e-6&&(r=0)}else{a="gradientradial",f=[i.x*c,i.y*h],d=n.transform;var v=n.scale,y=c,_=h;o=[(f[0]-u.x)/y,(f[1]-u.y)/_],d&&oF(f,f,d),y/=v[0]*mF,_/=v[1]*mF;var x=fF(y,_);s=0/x,l=2*i.r/x-s}var b=i.colorStops.slice();b.sort((function(e,t){return e.offset-t.offset}));for(var w=b.length,S=[],M=[],T=0;T<w;T++){var I=b[T],A=TF(I.color);M.push(I.offset*l+s+" "+A[0]),0!==T&&T!==w-1||S.push(A)}if(w>=2){var D=S[0][0],C=S[1][0],O=S[0][1]*t.opacity,k=S[1][1]*t.opacity;e.type=a,e.method="none",e.focus="100%",e.angle=r,e.color=D,e.color2=C,e.colors=M.join(","),e.opacity=k,e.opacity2=O}"radial"===a&&(e.focusposition=o.join(","))}else MF(e,i,t.opacity)}(r,n,i):function(e,t){t.lineDash&&(e.dashstyle=t.lineDash.join(" ")),null==t.stroke||t.stroke instanceof Nu||MF(e,t.stroke,t.opacity)}(r,n),xF(e,r)):(e[a?"filled":"stroked"]="false",bF(e,r))},AF=[[],[],[]];xl.prototype.brushVML=function(e){var t=this.style,n=this._vmlEl;n||(n=rF.createNode("shape"),yF(n),this._vmlEl=n),IF(n,"fill",t,this),IF(n,"stroke",t,this);var i=this.transform,a=null!=i,r=n.getElementsByTagName("stroke")[0];if(r){var o=t.lineWidth;if(a&&!t.strokeNoScale){var s=i[0]*i[3]-i[1]*i[2];o*=uF(cF(s))}r.weight=o+"px"}var l=this.path||(this.path=new qs);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),n.path=function(e,t){var n,i,a,r,o,s,l=sF.M,u=sF.C,c=sF.L,h=sF.A,d=sF.Q,f=[],p=e.data,g=e.len();for(r=0;r<g;){switch(i="",n=0,a=p[r++]){case l:i=" m ",n=1,o=p[r++],s=p[r++],AF[0][0]=o,AF[0][1]=s;break;case c:i=" l ",n=1,o=p[r++],s=p[r++],AF[0][0]=o,AF[0][1]=s;break;case d:case u:i=" c ",n=3;var m,v,y=p[r++],_=p[r++],x=p[r++],b=p[r++];a===d?(m=x,v=b,x=(x+2*y)/3,b=(b+2*_)/3,y=(o+2*y)/3,_=(s+2*_)/3):(m=p[r++],v=p[r++]),AF[0][0]=y,AF[0][1]=_,AF[1][0]=x,AF[1][1]=b,AF[2][0]=m,AF[2][1]=v,o=m,s=v;break;case h:var w=0,S=0,M=1,T=1,I=0;t&&(w=t[4],S=t[5],M=uF(t[0]*t[0]+t[1]*t[1]),T=uF(t[2]*t[2]+t[3]*t[3]),I=Math.atan2(-t[1]/T,t[0]/M));var A=p[r++],D=p[r++],C=p[r++],O=p[r++],k=p[r++]+I,L=p[r++]+k+I;r++;var E=p[r++],N=A+hF(k)*C,P=D+dF(k)*O,R=(y=A+hF(L)*C,_=D+dF(L)*O,E?" wa ":" at ");Math.abs(N-y)<1e-4&&(Math.abs(L-k)>.01?E&&(N+=270/mF):Math.abs(P-D)<1e-4?E&&N<A||!E&&N>A?_-=270/mF:_+=270/mF:E&&P<D||!E&&P>D?y+=270/mF:y-=270/mF),f.push(R,lF(((A-C)*M+w)*mF-vF),pF,lF(((D-O)*T+S)*mF-vF),pF,lF(((A+C)*M+w)*mF-vF),pF,lF(((D+O)*T+S)*mF-vF),pF,lF((N*M+w)*mF-vF),pF,lF((P*T+S)*mF-vF),pF,lF((y*M+w)*mF-vF),pF,lF((_*T+S)*mF-vF)),o=y,s=_;break;case sF.R:var z=AF[0],B=AF[1];z[0]=p[r++],z[1]=p[r++],B[0]=z[0]+p[r++],B[1]=z[1]+p[r++],t&&(oF(z,z,t),oF(B,B,t)),z[0]=lF(z[0]*mF-vF),B[0]=lF(B[0]*mF-vF),z[1]=lF(z[1]*mF-vF),B[1]=lF(B[1]*mF-vF),f.push(" m ",z[0],pF,z[1]," l ",B[0],pF,z[1]," l ",B[0],pF,B[1]," l ",z[0],pF,B[1]);break;case sF.Z:f.push(" x ")}if(n>0){f.push(i);for(var V=0;V<n;V++){var H=AF[V];t&&oF(H,H,t),f.push(lF(H[0]*mF-vF),pF,lF(H[1]*mF-vF),V<n-1?pF:"")}}}return f.join("")}(l,this.transform),n.style.zIndex=wF(this.zlevel,this.z,this.z2),xF(e,n),null!=t.text?this.drawRectText(e,this.getBoundingRect()):this.removeRectText(e)},xl.prototype.onRemove=function(e){bF(e,this._vmlEl),this.removeRectText(e)},xl.prototype.onAdd=function(e){xF(e,this._vmlEl),this.appendRectText(e)};Dr.prototype.brushVML=function(e){var t,n,i,a=this.style,r=a.image;if("object"==typeof(i=r)&&i.tagName&&"IMG"===i.tagName.toUpperCase()){var o=r.src;if(o===this._imageSrc)t=this._imageWidth,n=this._imageHeight;else{var s=r.runtimeStyle,l=s.width,u=s.height;s.width="auto",s.height="auto",t=r.width,n=r.height,s.width=l,s.height=u,this._imageSrc=o,this._imageWidth=t,this._imageHeight=n}r=o}else r===this._imageSrc&&(t=this._imageWidth,n=this._imageHeight);if(r){var c=a.x||0,h=a.y||0,d=a.width,f=a.height,p=a.sWidth,g=a.sHeight,m=a.sx||0,v=a.sy||0,y=p&&g,_=this._vmlEl;_||(_=rF.doc.createElement("div"),yF(_),this._vmlEl=_);var x,b=_.style,w=!1,S=1,M=1;if(this.transform&&(x=this.transform,S=uF(x[0]*x[0]+x[1]*x[1]),M=uF(x[2]*x[2]+x[3]*x[3]),w=x[1]||x[2]),w){var T=[c,h],I=[c+d,h],A=[c,h+f],D=[c+d,h+f];oF(T,T,x),oF(I,I,x),oF(A,A,x),oF(D,D,x);var C=fF(T[0],I[0],A[0],D[0]),O=fF(T[1],I[1],A[1],D[1]),k=[];k.push("M11=",x[0]/S,pF,"M12=",x[2]/M,pF,"M21=",x[1]/S,pF,"M22=",x[3]/M,pF,"Dx=",lF(c*S+x[4]),pF,"Dy=",lF(h*M+x[5])),b.padding="0 "+lF(C)+"px "+lF(O)+"px 0",b.filter=gF+".Matrix("+k.join("")+", SizingMethod=clip)"}else x&&(c=c*S+x[4],h=h*M+x[5]),b.filter="",b.left=lF(c)+"px",b.top=lF(h)+"px";var L=this._imageEl,E=this._cropEl;L||(L=rF.doc.createElement("div"),this._imageEl=L);var N=L.style;if(y){if(t&&n)N.width=lF(S*t*d/p)+"px",N.height=lF(M*n*f/g)+"px";else{var P=new Image,R=this;P.onload=function(){P.onload=null,t=P.width,n=P.height,N.width=lF(S*t*d/p)+"px",N.height=lF(M*n*f/g)+"px",R._imageWidth=t,R._imageHeight=n,R._imageSrc=r},P.src=r}E||((E=rF.doc.createElement("div")).style.overflow="hidden",this._cropEl=E);var z=E.style;z.width=lF((d+m*d/p)*S),z.height=lF((f+v*f/g)*M),z.filter=gF+".Matrix(Dx="+-m*d/p*S+",Dy="+-v*f/g*M+")",E.parentNode||_.appendChild(E),L.parentNode!==E&&E.appendChild(L)}else N.width=lF(S*d)+"px",N.height=lF(M*f)+"px",_.appendChild(L),E&&E.parentNode&&(_.removeChild(E),this._cropEl=null);var B="",V=a.opacity;V<1&&(B+=".Alpha(opacity="+lF(100*V)+") "),B+=gF+".AlphaImageLoader(src="+r+", SizingMethod=scale)",N.filter=B,_.style.zIndex=wF(this.zlevel,this.z,this.z2),xF(e,_),null!=a.text&&this.drawRectText(e,this.getBoundingRect())}},Dr.prototype.onRemove=function(e){bF(e,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(e)},Dr.prototype.onAdd=function(e){xF(e,this._vmlEl),this.appendRectText(e)};var DF,CF="normal",OF={},kF=0,LF=document.createElement("div");Ga.$override("measureText",(function(e,t){var n=rF.doc;DF||((DF=n.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",rF.doc.body.appendChild(DF));try{DF.style.font=t}catch(e){}return DF.innerHTML="",DF.appendChild(n.createTextNode(e)),{width:DF.offsetWidth}}));for(var EF=new Ni,NF=function(e,t,n,i){var a=this.style;this.__dirty&&xr.normalizeTextStyle(a,!0);var r=a.text;if(null!=r&&(r+=""),r){if(a.rich){var o=Ga.parseRichText(r,a);r=[];for(var s=0;s<o.lines.length;s++){for(var l=o.lines[s].tokens,u=[],c=0;c<l.length;c++)u.push(l[c].text);r.push(u.join(""))}r=r.join("\n")}var h,d,f=a.textAlign,p=a.textVerticalAlign,g=function(e){var t=OF[e];if(!t){kF>100&&(kF=0,OF={});var n,i=LF.style;try{i.font=e,n=i.fontFamily.split(",")[0]}catch(e){}t={style:i.fontStyle||CF,variant:i.fontVariant||CF,weight:i.fontWeight||CF,size:0|parseFloat(i.fontSize||12),family:n||"Microsoft YaHei"},OF[e]=t,kF++}return t}(a.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';n=n||Ga.getBoundingRect(r,m,f,p,a.textPadding,a.textLineHeight);var v=this.transform;if(v&&!i&&(EF.copy(t),EF.applyTransform(v),t=EF),i)h=t.x,d=t.y;else{var y=a.textPosition;if(y instanceof Array)h=t.x+SF(y[0],t.width),d=t.y+SF(y[1],t.height),f=f||"left";else{var _=this.calculateTextPosition?this.calculateTextPosition({},a,t):Ga.calculateTextPosition({},a,t);h=_.x,d=_.y,f=f||_.textAlign,p=p||_.textVerticalAlign}}h=Ga.adjustTextX(h,n.width,f),d=Ga.adjustTextY(d,n.height,p),d+=n.height/2;var x,b,w,S=rF.createNode,M=this._textVmlEl;M?b=(x=(w=M.firstChild).nextSibling).nextSibling:(M=S("line"),x=S("path"),b=S("textpath"),w=S("skew"),b.style["v-text-align"]="left",yF(M),x.textpathok=!0,b.on=!0,M.from="0 0",M.to="1000 0.05",xF(M,w),xF(M,x),xF(M,b),this._textVmlEl=M);var T=[h,d],I=M.style;v&&i?(oF(T,T,v),w.on=!0,w.matrix=v[0].toFixed(3)+pF+v[2].toFixed(3)+pF+v[1].toFixed(3)+pF+v[3].toFixed(3)+",0,0",w.offset=(lF(T[0])||0)+","+(lF(T[1])||0),w.origin="0 0",I.left="0px",I.top="0px"):(w.on=!1,I.left=lF(h)+"px",I.top=lF(d)+"px"),b.string=String(r).replace(/&/g,"&amp;").replace(/"/g,"&quot;");try{b.style.font=m}catch(e){}IF(M,"fill",{fill:a.textFill,opacity:a.opacity},this),IF(M,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash||null},this),M.style.zIndex=wF(this.zlevel,this.z,this.z2),xF(e,M)}},PF=function(e){bF(e,this._textVmlEl),this._textVmlEl=null},RF=function(e){xF(e,this._textVmlEl)},zF=[Mr,Ir,Dr,xl,Fl],BF=0;BF<zF.length;BF++){var VF=zF[BF].prototype;VF.drawRectText=NF,VF.removeRectText=PF,VF.appendRectText=RF}Fl.prototype.brushVML=function(e){var t=this.style;null!=t.text?this.drawRectText(e,{x:t.x||0,y:t.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(e)},Fl.prototype.onRemove=function(e){this.removeRectText(e)},Fl.prototype.onAdd=function(e){this.appendRectText(e)}}var HF=Fe.each;function YF(e){return parseInt(e,10)}function FF(e,t){rF.initVML(),this.root=e,this.storage=t;var n=document.createElement("div"),i=document.createElement("div");n.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",i.style.cssText="position:absolute;left:0;top:0;",e.appendChild(n),this._vmlRoot=i,this._vmlViewport=n,this.resize();var a=t.delFromStorage,r=t.addToStorage;t.delFromStorage=function(e){a.call(t,e),e&&e.onRemove&&e.onRemove(i)},t.addToStorage=function(e){e.onAdd&&e.onAdd(i),r.call(t,e)},this._firstPaint=!0}FF.prototype={constructor:FF,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0,!0);this._paintList(e)},_paintList:function(e){for(var t=this._vmlRoot,n=0;n<e.length;n++){var i=e[n];i.invisible||i.ignore?(i.__alreadyNotVisible||i.onRemove(t),i.__alreadyNotVisible=!0):(i.__alreadyNotVisible&&i.onAdd(t),i.__alreadyNotVisible=!1,i.__dirty&&(i.beforeBrush&&i.beforeBrush(),(i.brushVML||i.brush).call(i,t),i.afterBrush&&i.afterBrush())),i.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(t),this._firstPaint=!1)},resize:function(e,t){e=null==e?this._getWidth():e,t=null==t?this._getHeight():t;if(this._width!==e||this._height!==t){this._width=e,this._height=t;var n=this._vmlViewport.style;n.width=e+"px",n.height=t+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var e=this.root,t=e.currentStyle;return(e.clientWidth||YF(t.width))-YF(t.paddingLeft)-YF(t.paddingRight)|0},_getHeight:function(){var e=this.root,t=e.currentStyle;return(e.clientHeight||YF(t.height))-YF(t.paddingTop)-YF(t.paddingBottom)|0}},HF(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(e){FF.prototype[e]=function(){}}));var GF=FF;(0,xo.registerPainter)("vml",GF);var WF={createElement:function(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}},jF=WF.createElement,UF=qs.CMD,ZF=Array.prototype.join,XF="none",qF=Math.round,KF=Math.sin,$F=Math.cos,QF=Math.PI,JF=2*Math.PI,eG=180/QF,tG=1e-4;function nG(e){return qF(1e4*e)/1e4}function iG(e){return e<tG&&e>-1e-4}function aG(e,t){t&&rG(e,"transform","matrix("+ZF.call(t,",")+")")}function rG(e,t,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&e.setAttribute(t,n)}function oG(e,t,n,i){if(function(e,t){var n=t?e.textFill:e.fill;return null!=n&&n!==XF}(t,n)){var a=n?t.textFill:t.fill;rG(e,"fill",a="transparent"===a?XF:a),rG(e,"fill-opacity",null!=t.fillOpacity?t.fillOpacity*t.opacity:t.opacity)}else rG(e,"fill",XF);if(function(e,t){var n=t?e.textStroke:e.stroke;return null!=n&&n!==XF}(t,n)){var r=n?t.textStroke:t.stroke;rG(e,"stroke",r="transparent"===r?XF:r),rG(e,"stroke-width",(n?t.textStrokeWidth:t.lineWidth)/(!n&&t.strokeNoScale?i.getLineScale():1)),rG(e,"paint-order",n?"stroke":"fill"),rG(e,"stroke-opacity",null!=t.strokeOpacity?t.strokeOpacity:t.opacity),t.lineDash?(rG(e,"stroke-dasharray",t.lineDash.join(",")),rG(e,"stroke-dashoffset",qF(t.lineDashOffset||0))):rG(e,"stroke-dasharray",""),t.lineCap&&rG(e,"stroke-linecap",t.lineCap),t.lineJoin&&rG(e,"stroke-linejoin",t.lineJoin),t.miterLimit&&rG(e,"stroke-miterlimit",t.miterLimit)}else rG(e,"stroke",XF)}var sG={};sG.brush=function(e){var t=e.style,n=e.__svgEl;n||(n=jF("path"),e.__svgEl=n),e.path||e.createPathProxy();var i=e.path;if(e.__dirtyPath){i.beginPath(),i.subPixelOptimize=!1,e.buildPath(i,e.shape),e.__dirtyPath=!1;var a=function(e){for(var t=[],n=e.data,i=e.len(),a=0;a<i;){var r="",o=0;switch(n[a++]){case UF.M:r="M",o=2;break;case UF.L:r="L",o=2;break;case UF.Q:r="Q",o=4;break;case UF.C:r="C",o=6;break;case UF.A:var s=n[a++],l=n[a++],u=n[a++],c=n[a++],h=n[a++],d=n[a++],f=n[a++],p=n[a++],g=Math.abs(d),m=iG(g-JF)||(p?d>=JF:-d>=JF),v=d>0?d%JF:d%JF+JF,y=!1;y=!!m||!iG(g)&&v>=QF==!!p;var _=nG(s+u*$F(h)),x=nG(l+c*KF(h));m&&(d=p?JF-1e-4:1e-4-JF,y=!0,9===a&&t.push("M",_,x));var b=nG(s+u*$F(h+d)),w=nG(l+c*KF(h+d));t.push("A",nG(u),nG(c),qF(f*eG),+y,+p,b,w);break;case UF.Z:r="Z";break;case UF.R:b=nG(n[a++]),w=nG(n[a++]);var S=nG(n[a++]),M=nG(n[a++]);t.push("M",b,w,"L",b+S,w,"L",b+S,w+M,"L",b,w+M,"L",b,w)}r&&t.push(r);for(var T=0;T<o;T++)t.push(nG(n[a++]))}return t.join(" ")}(i);a.indexOf("NaN")<0&&rG(n,"d",a)}oG(n,t,!1,e),aG(n,e.transform),null!=t.text?pG(e,e.getBoundingRect()):mG(e)};var lG={brush:function(e){var t=e.style,n=t.image;n instanceof HTMLImageElement&&(n=n.src);if(n){var i=t.x||0,a=t.y||0,r=t.width,o=t.height,s=e.__svgEl;s||(s=jF("image"),e.__svgEl=s),n!==e.__imageSrc&&(!function(e,t,n){e.setAttributeNS("http://www.w3.org/1999/xlink",t,n)}(s,"href",n),e.__imageSrc=n),rG(s,"width",r),rG(s,"height",o),rG(s,"x",i),rG(s,"y",a),aG(s,e.transform),null!=t.text?pG(e,e.getBoundingRect()):mG(e)}}},uG={},cG=new Ni,hG={},dG=[],fG={left:"start",right:"end",center:"middle",middle:"middle"},pG=function(e,t){var n=e.style,i=e.transform,a=e instanceof Fl||n.transformText;e.__dirty&&xr.normalizeTextStyle(n,!0);var r=n.text;if(null!=r&&(r+=""),xr.needDrawText(r,n)){null==r&&(r=""),!a&&i&&(cG.copy(t),cG.applyTransform(i),t=cG);var o=e.__textSvgEl;o||(o=jF("text"),e.__textSvgEl=o);var s=o.style,l=n.font||Ga.DEFAULT_FONT,u=o.__computedFont;l!==o.__styleFont&&(s.font=o.__styleFont=l,u=o.__computedFont=s.font);var c=n.textPadding,h=n.textLineHeight,d=e.__textCotentBlock;d&&!e.__dirtyText||(d=e.__textCotentBlock=Ga.parsePlainText(r,u,c,h,n.truncate));var f=d.outerHeight,p=d.lineHeight;xr.getBoxPosition(hG,e,n,t);var g=hG.baseX,m=hG.baseY,v=hG.textAlign||"left",y=hG.textVerticalAlign;!function(e,t,n,i,a,r,o){sn.identity(dG),t&&n&&sn.copy(dG,n);var s=i.textRotation;if(a&&s){var l=i.textOrigin;"center"===l?(r=a.width/2+a.x,o=a.height/2+a.y):l&&(r=l[0]+a.x,o=l[1]+a.y),dG[4]-=r,dG[5]-=o,sn.rotate(dG,dG,s),dG[4]+=r,dG[5]+=o}aG(e,dG)}(o,a,i,n,t,g,m);var _=g,x=Ga.adjustTextY(m,f,y);c&&(_=function(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}(g,v,c),x+=c[0]),x+=p/2,oG(o,n,!0,e);var b=d.canCacheByTextString,w=e.__tspanList||(e.__tspanList=[]),S=w.length;if(b&&e.__canCacheByTextString&&e.__text===r){if(e.__dirtyText&&S)for(var M=0;M<S;++M)gG(w[M],v,_,x+M*p)}else{e.__text=r,e.__canCacheByTextString=b;var T=d.lines,I=T.length;for(M=0;M<I;M++){var A=w[M],D=T[M];A?A.__zrText!==D&&(A.innerHTML="",A.appendChild(document.createTextNode(D))):(A=w[M]=jF("tspan"),o.appendChild(A),A.appendChild(document.createTextNode(D))),gG(A,v,_,x+M*p)}if(S>I){for(;M<S;M++)o.removeChild(w[M]);w.length=I}}}};function gG(e,t,n,i){rG(e,"dominant-baseline","middle"),rG(e,"text-anchor",fG[t]),rG(e,"x",n),rG(e,"y",i)}function mG(e){e&&e.__textSvgEl&&(e.__textSvgEl.parentNode&&e.__textSvgEl.parentNode.removeChild(e.__textSvgEl),e.__textSvgEl=null,e.__tspanList=[],e.__text=null)}uG.drawRectText=pG,uG.brush=function(e){null!=e.style.text?pG(e,!1):mG(e)};var vG={path:sG,image:lG,text:uG};function yG(){}function _G(e,t,n,i){for(var a=0,r=t.length,o=0,s=0;a<r;a++){var l=t[a];if(l.removed){for(u=[],c=s;c<s+l.count;c++)u.push(c);l.indices=u,s+=l.count}else{for(var u=[],c=o;c<o+l.count;c++)u.push(c);l.indices=u,o+=l.count,l.added||(s+=l.count)}}return t}function xG(e){return{newPos:e.newPos,components:e.components.slice(0)}}yG.prototype={diff:function(e,t,n){n||(n=function(e,t){return e===t}),this.equals=n;var i=this;e=e.slice();var a=(t=t.slice()).length,r=e.length,o=1,s=a+r,l=[{newPos:-1,components:[]}],u=this.extractCommon(l[0],t,e,0);if(l[0].newPos+1>=a&&u+1>=r){for(var c=[],h=0;h<t.length;h++)c.push(h);return[{indices:c,count:t.length}]}function d(){for(var n=-1*o;n<=o;n+=2){var s,u=l[n-1],c=l[n+1],h=(c?c.newPos:0)-n;u&&(l[n-1]=void 0);var d=u&&u.newPos+1<a,f=c&&0<=h&&h<r;if(d||f){if(!d||f&&u.newPos<c.newPos?(s=xG(c),i.pushComponent(s.components,void 0,!0)):((s=u).newPos++,i.pushComponent(s.components,!0,void 0)),h=i.extractCommon(s,t,e,n),s.newPos+1>=a&&h+1>=r)return _G(i,s.components);l[n]=s}else l[n]=void 0}o++}for(;o<=s;){var f=d();if(f)return f}},pushComponent:function(e,t,n){var i=e[e.length-1];i&&i.added===t&&i.removed===n?e[e.length-1]={count:i.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,i){for(var a=t.length,r=n.length,o=e.newPos,s=o-i,l=0;o+1<a&&s+1<r&&this.equals(t[o+1],n[s+1]);)o++,s++,l++;return l&&e.components.push({count:l}),e.newPos=o,s},tokenize:function(e){return e.slice()},join:function(e){return e.slice()}};var bG=new yG;var wG=function(e,t,n){return bG.diff(e,t,n)},SG=WF.createElement,MG=vG.path,TG=vG.image,IG=vG.text;function AG(e,t,n,i,a){this._zrId=e,this._svgRoot=t,this._tagNames="string"==typeof n?[n]:n,this._markLabel=i,this._domName=a||"_dom",this.nextId=0}AG.prototype.createElement=SG,AG.prototype.getDefs=function(e){var t=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");return 0===n.length?e?((n=t.insertBefore(this.createElement("defs"),t.firstChild)).contains||(n.contains=function(e){var t=n.children;if(!t)return!1;for(var i=t.length-1;i>=0;--i)if(t[i]===e)return!0;return!1}),n):null:n[0]},AG.prototype.update=function(e,t){if(e){var n=this.getDefs(!1);if(e[this._domName]&&n.contains(e[this._domName]))"function"==typeof t&&t(e);else{var i=this.add(e);i&&(e[this._domName]=i)}}},AG.prototype.addDom=function(e){this.getDefs(!0).appendChild(e)},AG.prototype.removeDom=function(e){var t=this.getDefs(!1);t&&e[this._domName]&&(t.removeChild(e[this._domName]),e[this._domName]=null)},AG.prototype.getDoms=function(){var e=this.getDefs(!1);if(!e)return[];var t=[];return Fe.each(this._tagNames,(function(n){var i=e.getElementsByTagName(n);t=t.concat([].slice.call(i))})),t},AG.prototype.markAllUnused=function(){var e=this.getDoms(),t=this;Fe.each(e,(function(e){e[t._markLabel]="0"}))},AG.prototype.markUsed=function(e){e&&(e[this._markLabel]="1")},AG.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),n=this;Fe.each(t,(function(t){"1"!==t[n._markLabel]&&e.removeChild(t)}))}},AG.prototype.getSvgProxy=function(e){return e instanceof xl?MG:e instanceof Dr?TG:e instanceof Fl?IG:MG},AG.prototype.getTextSvgElement=function(e){return e.__textSvgEl},AG.prototype.getSvgElement=function(e){return e.__svgEl};var DG=AG;function CG(e,t){DG.call(this,e,t,["linearGradient","radialGradient"],"__gradient_in_use__")}Fe.inherits(CG,DG),CG.prototype.addWithoutUpdate=function(e,t){if(t&&t.style){var n=this;Fe.each(["fill","stroke"],(function(i){if(t.style[i]&&("linear"===t.style[i].type||"radial"===t.style[i].type)){var a,r=t.style[i],o=n.getDefs(!0);r._dom?(a=r._dom,o.contains(r._dom)||n.addDom(a)):a=n.add(r),n.markUsed(t);var s=a.getAttribute("id");e.setAttribute(i,"url(#"+s+")")}}))}},CG.prototype.add=function(e){var t;if("linear"===e.type)t=this.createElement("linearGradient");else{if("radial"!==e.type)return null;t=this.createElement("radialGradient")}return e.id=e.id||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-gradient-"+e.id),this.updateDom(e,t),this.addDom(t),t},CG.prototype.update=function(e){var t=this;DG.prototype.update.call(this,e,(function(){var n=e.type,i=e._dom.tagName;"linear"===n&&"linearGradient"===i||"radial"===n&&"radialGradient"===i?t.updateDom(e,e._dom):(t.removeDom(e),t.add(e))}))},CG.prototype.updateDom=function(e,t){if("linear"===e.type)t.setAttribute("x1",e.x),t.setAttribute("y1",e.y),t.setAttribute("x2",e.x2),t.setAttribute("y2",e.y2);else{if("radial"!==e.type)return;t.setAttribute("cx",e.x),t.setAttribute("cy",e.y),t.setAttribute("r",e.r)}e.global?t.setAttribute("gradientUnits","userSpaceOnUse"):t.setAttribute("gradientUnits","objectBoundingBox"),t.innerHTML="";for(var n=e.colorStops,i=0,a=n.length;i<a;++i){var r=this.createElement("stop");r.setAttribute("offset",100*n[i].offset+"%");var o=n[i].color;if(o.indexOf(!1)){var s=Xn.parse(o)[3],l=Xn.toHex(o);r.setAttribute("stop-color","#"+l),r.setAttribute("stop-opacity",s)}else r.setAttribute("stop-color",n[i].color);t.appendChild(r)}e._dom=t},CG.prototype.markUsed=function(e){if(e.style){var t=e.style.fill;t&&t._dom&&DG.prototype.markUsed.call(this,t._dom),(t=e.style.stroke)&&t._dom&&DG.prototype.markUsed.call(this,t._dom)}};var OG=CG;function kG(e,t){DG.call(this,e,t,"clipPath","__clippath_in_use__")}Fe.inherits(kG,DG),kG.prototype.update=function(e){var t=this.getSvgElement(e);t&&this.updateDom(t,e.__clipPaths,!1);var n=this.getTextSvgElement(e);n&&this.updateDom(n,e.__clipPaths,!0),this.markUsed(e)},kG.prototype.updateDom=function(e,t,n){if(t&&t.length>0){var i,a,r=this.getDefs(!0),o=t[0],s=n?"_textDom":"_dom";o[s]?(a=o[s].getAttribute("id"),i=o[s],r.contains(i)||r.appendChild(i)):(a="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(i=this.createElement("clipPath")).setAttribute("id",a),r.appendChild(i),o[s]=i);var l=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!n){var u=Array.prototype.slice.call(o.transform);sn.mul(o.transform,o.parent.invTransform,o.transform),l.brush(o),o.transform=u}else l.brush(o);var c=this.getSvgElement(o);i.innerHTML="",i.appendChild(c.cloneNode()),e.setAttribute("clip-path","url(#"+a+")"),t.length>1&&this.updateDom(i,t.slice(1),n)}else e&&e.setAttribute("clip-path","none")},kG.prototype.markUsed=function(e){var t=this;e.__clipPaths&&Fe.each(e.__clipPaths,(function(e){e._dom&&DG.prototype.markUsed.call(t,e._dom),e._textDom&&DG.prototype.markUsed.call(t,e._textDom)}))};var LG=kG;function EG(e,t){DG.call(this,e,t,["filter"],"__filter_in_use__","_shadowDom")}function NG(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY||e.textShadowBlur||e.textShadowOffsetX||e.textShadowOffsetY)}Fe.inherits(EG,DG),EG.prototype.addWithoutUpdate=function(e,t){if(t&&NG(t.style)){var n;if(t._shadowDom)n=t._shadowDom,this.getDefs(!0).contains(t._shadowDom)||this.addDom(n);else n=this.add(t);this.markUsed(t);var i=n.getAttribute("id");e.style.filter="url(#"+i+")"}},EG.prototype.add=function(e){var t=this.createElement("filter");return e._shadowDomId=e._shadowDomId||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-shadow-"+e._shadowDomId),this.updateDom(e,t),this.addDom(t),t},EG.prototype.update=function(e,t){if(NG(t.style)){var n=this;DG.prototype.update.call(this,t,(function(){n.updateDom(t,t._shadowDom)}))}else this.remove(e,t)},EG.prototype.remove=function(e,t){null!=t._shadowDomId&&(this.removeDom(e),e.style.filter="")},EG.prototype.updateDom=function(e,t){var n=t.getElementsByTagName("feDropShadow");n=0===n.length?this.createElement("feDropShadow"):n[0];var i,a,r,o,s=e.style,l=e.scale&&e.scale[0]||1,u=e.scale&&e.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)i=s.shadowOffsetX||0,a=s.shadowOffsetY||0,r=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(t,s);i=s.textShadowOffsetX||0,a=s.textShadowOffsetY||0,r=s.textShadowBlur,o=s.textShadowColor}n.setAttribute("dx",i/l),n.setAttribute("dy",a/u),n.setAttribute("flood-color",o);var c=r/2/l+" "+r/2/u;n.setAttribute("stdDeviation",c),t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width",Math.ceil(r/2*200)+"%"),t.setAttribute("height",Math.ceil(r/2*200)+"%"),t.appendChild(n),e._shadowDom=t},EG.prototype.markUsed=function(e){e._shadowDom&&DG.prototype.markUsed.call(this,e._shadowDom)};var PG=EG,RG=WF.createElement,zG=vG.path,BG=vG.image,VG=vG.text;function HG(e){return parseInt(e,10)}function YG(e,t){return t&&e&&t.parentNode!==e}function FG(e,t,n){if(YG(e,t)&&n){var i=n.nextSibling;i?e.insertBefore(t,i):e.appendChild(t)}}function GG(e,t){if(YG(e,t)){var n=e.firstChild;n?e.insertBefore(t,n):e.appendChild(t)}}function WG(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)}function jG(e){return e.__textSvgEl}function UG(e){return e.__svgEl}var ZG=function(e,t,n,i){this.root=e,this.storage=t,this._opts=n=Fe.extend({},n||{});var a=RG("svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("version","1.1"),a.setAttribute("baseProfile","full"),a.style.cssText="user-select:none;position:absolute;left:0;top:0;";var r=RG("g");a.appendChild(r);var o=RG("g");a.appendChild(o),this.gradientManager=new OG(i,o),this.clipPathManager=new LG(i,o),this.shadowManager=new PG(i,o);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=a,this._svgRoot=o,this._backgroundRoot=r,this._viewport=s,e.appendChild(s),s.appendChild(a),this.resize(n.width,n.height),this._visibleList=[]};ZG.prototype={constructor:ZG,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0);this._paintList(e)},setBackgroundColor:function(e){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var t=RG("rect");t.setAttribute("width",this.getWidth()),t.setAttribute("height",this.getHeight()),t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("id",0),t.style.fill=e,this._backgroundRoot.appendChild(t),this._backgroundNode=t},_paintList:function(e){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var t,n,i=this._svgRoot,a=this._visibleList,r=e.length,o=[];for(t=0;t<r;t++){var s=e[t],l=(n=s)instanceof xl?zG:n instanceof Dr?BG:n instanceof Fl?VG:zG,u=UG(s)||jG(s);s.invisible||(s.__dirty&&(l&&l.brush(s),this.clipPathManager.update(s),s.style&&(this.gradientManager.update(s.style.fill),this.gradientManager.update(s.style.stroke),this.shadowManager.update(u,s)),s.__dirty=!1),o.push(s))}var c,h=wG(a,o);for(t=0;t<h.length;t++){if((p=h[t]).removed)for(var d=0;d<p.count;d++){u=UG(s=a[p.indices[d]]);var f=jG(s);WG(i,u),WG(i,f)}}for(t=0;t<h.length;t++){var p;if((p=h[t]).added)for(d=0;d<p.count;d++){u=UG(s=o[p.indices[d]]),f=jG(s);c?FG(i,u,c):GG(i,u),u?FG(i,f,u):c?FG(i,f,c):GG(i,f),FG(i,f,u),c=f||u||c,this.gradientManager.addWithoutUpdate(u||f,s),this.shadowManager.addWithoutUpdate(u||f,s),this.clipPathManager.markUsed(s)}else if(!p.removed)for(d=0;d<p.count;d++){u=UG(s=o[p.indices[d]]),f=jG(s),u=UG(s),f=jG(s);this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(u||f,s),this.shadowManager.markUsed(s),this.shadowManager.addWithoutUpdate(u||f,s),this.clipPathManager.markUsed(s),f&&FG(i,f,u),c=u||f||c}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=o},_getDefs:function(e){var t,n=this._svgDom;return 0===(t=n.getElementsByTagName("defs")).length?e?((t=n.insertBefore(RG("defs"),n.firstChild)).contains||(t.contains=function(e){var n=t.children;if(!n)return!1;for(var i=n.length-1;i>=0;--i)if(n[i]===e)return!0;return!1}),t):null:t[0]},resize:function(e,t){var n=this._viewport;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||this._height!==t){this._width=e,this._height=t;var a=n.style;a.width=e+"px",a.height=t+"px";var r=this._svgDom;r.setAttribute("width",e),r.setAttribute("height",t)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",e),this._backgroundNode.setAttribute("height",t))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],r=["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]||HG(s[n])||HG(o.style[n]))-(HG(s[a])||0)-(HG(s[r])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/></g,">\n\r<"))}},Fe.each(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],(function(e){ZG.prototype[e]=function(){}}));var XG=ZG;(0,xo.registerPainter)("svg",XG);var qG,KG,$G=ee(te((function(e,t){!function(){for(var e in jx){if(null==jx||!jx.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=jx[e]}}(),function(){for(var e in Wx){if(null==Wx||!Wx.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=Wx[e]}}()}))),QG=te((function(e,t){var n;n=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={exports:{},id:i,loaded:!1};return e[i].call(a.exports,a,a.exports,n),a.loaded=!0,a.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),a=n(3),r=n(4),o=n(22);function s(e){var t=new r(e),n=a(r.prototype.request,t);return i.extend(n,r.prototype,t),i.extend(n,t),n}var l=s(n(10));l.Axios=r,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),a=Object.prototype.toString;function r(e){return"[object Array]"===a.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===a.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}e.exports={isArray:r,isArrayBuffer:function(e){return"[object ArrayBuffer]"===a.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]"===a.call(e)},isFile:function(e){return"[object File]"===a.call(e)},isBlob:function(e){return"[object Blob]"===a.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,a=arguments.length;i<a;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,a=arguments.length;i<a;i++)u(arguments[i],n);return t},extend:function(e,t,n){return u(t,(function(t,a){e[a]=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),a=n(5),r=n(6),o=n(7),s=n(22);function l(e){this.defaults=e,this.interceptors={request:new r,response:new r}}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),a(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,a){return this.request(i.merge(a||{},{method:e,url:t,data:n}))}})),e.exports=l},function(e,t,n){var i=n(2);function a(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 r;if(n)r=n(t);else if(i.isURLSearchParams(t))r=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(a(t)+"="+a(e))})))})),r=o.join("&")}if(r){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}},function(e,t,n){var i=n(2);function a(){this.handlers=[]}a.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},a.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},a.prototype.forEach=function(e){i.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=a},function(e,t,n){var i=n(2),a=n(8),r=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=a(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=a(t.data,t.headers,e.transformResponse),t}),(function(t){return r(t)||(s(e),t&&t.response&&(t.response.data=a(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),a=n(11),r={"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 a(t,"Accept"),a(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(r)})),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),a=n(13),r=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(),r(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};a(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 a=n.config.validateStatus;!a||a(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,a,r){var o=new Error(e);return i(o,t,n,a,r)}},function(e,t){e.exports=function(e,t,n,i,a){return e.config=t,n&&(e.code=n),e.request=i,e.response=a,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),a=n(18);e.exports=function(e,t){return e&&!i(t)?a(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),a=["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,r,o={};return e?(i.forEach(e.split("\n"),(function(e){if(r=e.indexOf(":"),t=i.trim(e.substr(0,r)).toLowerCase(),n=i.trim(e.substr(r+1)),t){if(o[t]&&a.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 a(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=a(window.location.href),function(t){var n=i.isString(t)?a(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,a,r,o){var s=[];s.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),i.isString(a)&&s.push("path="+a),i.isString(r)&&s.push("domain="+r),!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={},a=["url","method","params","data"],r=["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(a,(function(e){void 0!==t[e]&&(n[e]=t[e])})),i.forEach(r,(function(a){i.isObject(t[a])?n[a]=i.deepMerge(e[a],t[a]):void 0!==t[a]?n[a]=t[a]:i.isObject(e[a])?n[a]=i.deepMerge(e[a]):void 0!==e[a]&&(n[a]=e[a])})),i.forEach(o,(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])}));var s=a.concat(r).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 a(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))}))}a.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},a.source=function(){var e;return{token:new a((function(t){e=t})),cancel:e}},e.exports=a},function(e,t){e.exports=function(e){return function(t){return e.apply(null,t)}}}])},e.exports=n()}));!function(e){e.DIMENSION="dimension",e.MAP="map",e.INDICATOR="indicator",e.DETAIL="detail"}(qG||(qG={})),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"}(KG||(KG={})),Object.freeze({[KG.TABLE]:Object.freeze({key:KG.TABLE,name:"表格",iconfont:"icon-table02",iconColor:"#2b9f7f",dataConfigMode:qG.DIMENSION}),[KG.PIE]:Object.freeze({key:KG.PIE,name:"饼图",iconfont:"icon-pie_chart",iconColor:"#11c5d4",dataConfigMode:qG.DIMENSION}),[KG.HISTOGRAM_LINE]:Object.freeze({key:KG.HISTOGRAM_LINE,name:"线图",iconfont:"icon-line_chart",iconColor:"#0091ff",dataConfigMode:qG.DIMENSION}),[KG.HISTOGRAM_BAR]:Object.freeze({key:KG.HISTOGRAM_BAR,name:"柱状图",iconfont:"icon-bar_chart",iconColor:"#ff822f",dataConfigMode:qG.DIMENSION}),[KG.INDICATOR_CARD]:Object.freeze({key:KG.INDICATOR_CARD,name:"指标卡",iconfont:"icon-indicator-card",iconColor:"#efce30",dataConfigMode:qG.INDICATOR}),[KG.BAR]:Object.freeze({key:KG.BAR,name:"条形图",iconfont:"icon-list",iconColor:"#ff5c31",dataConfigMode:qG.DIMENSION}),[KG.HISTOGRAM_MIX]:Object.freeze({key:KG.HISTOGRAM_MIX,name:"柱线混合图",iconfont:"icon-chart",iconColor:"#2b9f7f",dataConfigMode:qG.DIMENSION}),[KG.GAUGE]:Object.freeze({key:KG.GAUGE,name:"仪表盘",iconfont:"icon-dash-board",iconColor:"#5071f0",dataConfigMode:qG.DIMENSION}),[KG.MAP]:Object.freeze({key:KG.MAP,name:"地图",iconfont:"icon-thermal-map",iconColor:"#2b9f7f",dataConfigMode:qG.MAP}),[KG.DETAIL]:Object.freeze({key:KG.DETAIL,name:"明细表",iconfont:"icon-detail-list",iconColor:"#2b9f7f",dataConfigMode:qG.DETAIL})});var JG,eW,tW,nW=te((function(e,t){e.exports=function(){var t,n;function i(){return t.apply(null,arguments)}function a(e){t=e}function r(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function o(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function u(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,i=[];for(n=0;n<e.length;++n)i.push(t(e[n],n));return i}function f(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,i){return Xn(e,t,n,i,!0).utc()}function g(){return{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}}function m(e){return null==e._pf&&(e._pf=g()),e._pf}function v(e){if(null==e._isValid){var t=m(e),i=n.call(t.parsedDateParts,(function(e){return null!=e})),a=!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&&(a=a&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return a;e._isValid=a}return e._isValid}function y(e){var t=p(NaN);return null!=e?f(m(t),e):m(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 _=i.momentProperties=[],x=!1;function b(e,t){var n,i,a;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=m(t)),u(t._locale)||(e._locale=t._locale),_.length>0)for(n=0;n<_.length;n++)u(a=t[i=_[n]])||(e[i]=a);return e}function w(e){b(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===x&&(x=!0,i.updateOffset(this),x=!1)}function S(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function M(e){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function T(e,t){var n=!0;return f((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,e),n){var a,r,o,l=[];for(r=0;r<arguments.length;r++){if(a="","object"==typeof arguments[r]){for(o in a+="\n["+r+"] ",arguments[0])s(arguments[0],o)&&(a+=o+": "+arguments[0][o]+", ");a=a.slice(0,-2)}else a=arguments[r];l.push(a)}M(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var I,A={};function D(e,t){null!=i.deprecationHandler&&i.deprecationHandler(e,t),A[e]||(M(t),A[e]=!0)}function C(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function O(e){var t,n;for(n in e)s(e,n)&&(C(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)}function k(e,t){var n,i=f({},e);for(n in t)s(t,n)&&(o(e[n])&&o(t[n])?(i[n]={},f(i[n],e[n]),f(i[n],t[n])):null!=t[n]?i[n]=t[n]:delete i[n]);for(n in e)s(e,n)&&!s(t,n)&&o(e[n])&&(i[n]=f({},i[n]));return i}function L(e){null!=e&&this.set(e)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,I=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var E={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function N(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return C(i)?i.call(t,n):i}function P(e,t,n){var i=""+Math.abs(e),a=t-i.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+i}var R=/(\[[^\[]*\])|(\\)?([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,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,B={},V={};function H(e,t,n,i){var a=i;"string"==typeof i&&(a=function(){return this[i]()}),e&&(V[e]=a),t&&(V[t[0]]=function(){return P(a.apply(this,arguments),t[1],t[2])}),n&&(V[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function Y(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function F(e){var t,n,i=e.match(R);for(t=0,n=i.length;t<n;t++)V[i[t]]?i[t]=V[i[t]]:i[t]=Y(i[t]);return function(t){var a,r="";for(a=0;a<n;a++)r+=C(i[a])?i[a].call(t,e):i[a];return r}}function G(e,t){return e.isValid()?(t=W(t,e.localeData()),B[t]=B[t]||F(t),B[t](e)):e.localeData().invalidDate()}function W(e,t){var n=5;function i(e){return t.longDateFormat(e)||e}for(z.lastIndex=0;n>=0&&z.test(e);)e=e.replace(z,i),z.lastIndex=0,n-=1;return e}var j={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"};function U(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(R).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var Z="Invalid date";function X(){return this._invalidDate}var q="%d",K=/\d{1,2}/;function $(e){return this._ordinal.replace("%d",e)}var Q={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"};function J(e,t,n,i){var a=this._relativeTime[n];return C(a)?a(e,t,n,i):a.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return C(n)?n(t):n.replace(/%s/i,t)}var te={};function ie(e,t){var n=e.toLowerCase();te[n]=te[n+"s"]=te[t]=e}function ae(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function re(e){var t,n,i={};for(n in e)s(e,n)&&(t=ae(n))&&(i[t]=e[n]);return i}var oe={};function se(e,t){oe[e]=t}function le(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:oe[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function ue(e){return e%4==0&&e%100!=0||e%400==0}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function he(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ce(t)),n}function de(e,t){return function(n){return null!=n?(pe(this,e,n),i.updateOffset(this,t),this):fe(this,e)}}function fe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function pe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&ue(e.year())&&1===e.month()&&29===e.date()?(n=he(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),et(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function ge(e){return C(this[e=ae(e)])?this[e]():this}function me(e,t){if("object"==typeof e){var n,i=le(e=re(e));for(n=0;n<i.length;n++)this[i[n].unit](e[i[n].unit])}else if(C(this[e=ae(e)]))return this[e](t);return this}var ve,ye=/\d/,_e=/\d\d/,xe=/\d{3}/,be=/\d{4}/,we=/[+-]?\d{6}/,Se=/\d\d?/,Me=/\d\d\d\d?/,Te=/\d\d\d\d\d\d?/,Ie=/\d{1,3}/,Ae=/\d{1,4}/,De=/[+-]?\d{1,6}/,Ce=/\d+/,Oe=/[+-]?\d+/,ke=/Z|[+-]\d\d:?\d\d/gi,Le=/Z|[+-]\d\d(?::?\d\d)?/gi,Ee=/[+-]?\d+(\.\d{1,3})?/,Ne=/[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){ve[e]=C(t)?t:function(e,i){return e&&n?n:t}}function Re(e,t){return s(ve,e)?ve[e](t._strict,t._locale):new RegExp(ze(e))}function ze(e){return Be(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,i,a){return t||n||i||a})))}function Be(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}ve={};var Ve={};function He(e,t){var n,i=t;for("string"==typeof e&&(e=[e]),c(t)&&(i=function(e,n){n[t]=he(e)}),n=0;n<e.length;n++)Ve[e[n]]=i}function Ye(e,t){He(e,(function(e,n,i,a){i._w=i._w||{},t(e,i._w,i,a)}))}function Fe(e,t,n){null!=t&&s(Ve,e)&&Ve[e](t,n._a,n,e)}var Ge,We=0,je=1,Ue=2,Ze=3,Xe=4,qe=5,Ke=6,$e=7,Qe=8;function Je(e,t){return(e%t+t)%t}function et(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=Je(t,12);return e+=(t-n)/12,1===n?ue(e)?29:28:31-n%7%2}Ge=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},H("M",["MM",2],"Mo",(function(){return this.month()+1})),H("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),H("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ie("month","M"),se("month",8),Pe("M",Se),Pe("MM",Se,_e),Pe("MMM",(function(e,t){return t.monthsShortRegex(e)})),Pe("MMMM",(function(e,t){return t.monthsRegex(e)})),He(["M","MM"],(function(e,t){t[je]=he(e)-1})),He(["MMM","MMMM"],(function(e,t,n,i){var a=n._locale.monthsParse(e,i,n._strict);null!=a?t[je]=a:m(n).invalidMonth=e}));var tt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),nt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),it=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,at=Ne,rt=Ne;function ot(e,t){return e?r(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||it).test(t)?"format":"standalone"][e.month()]:r(this._months)?this._months:this._months.standalone}function st(e,t){return e?r(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[it.test(t)?"format":"standalone"][e.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function lt(e,t,n){var i,a,r,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)r=p([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(a=Ge.call(this._shortMonthsParse,o))?a:null:-1!==(a=Ge.call(this._longMonthsParse,o))?a:null:"MMM"===t?-1!==(a=Ge.call(this._shortMonthsParse,o))||-1!==(a=Ge.call(this._longMonthsParse,o))?a:null:-1!==(a=Ge.call(this._longMonthsParse,o))||-1!==(a=Ge.call(this._shortMonthsParse,o))?a:null}function ut(e,t,n){var i,a,r;if(this._monthsParseExact)return lt.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(a=p([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(r="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[i]=new RegExp(r.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}}function ct(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=he(t);else if(!c(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),et(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ht(e){return null!=e?(ct(this,e),i.updateOffset(this,!0),this):fe(this,"Month")}function dt(){return et(this.year(),this.month())}function ft(e){return this._monthsParseExact?(s(this,"_monthsRegex")||gt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=at),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function pt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||gt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=rt),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function gt(){function e(e,t){return t.length-e.length}var t,n,i=[],a=[],r=[];for(t=0;t<12;t++)n=p([2e3,t]),i.push(this.monthsShort(n,"")),a.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(i.sort(e),a.sort(e),r.sort(e),t=0;t<12;t++)i[t]=Be(i[t]),a[t]=Be(a[t]);for(t=0;t<24;t++)r[t]=Be(r[t]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function mt(e){return ue(e)?366:365}H("Y",0,0,(function(){var e=this.year();return e<=9999?P(e,4):"+"+e})),H(0,["YY",2],0,(function(){return this.year()%100})),H(0,["YYYY",4],0,"year"),H(0,["YYYYY",5],0,"year"),H(0,["YYYYYY",6,!0],0,"year"),ie("year","y"),se("year",1),Pe("Y",Oe),Pe("YY",Se,_e),Pe("YYYY",Ae,be),Pe("YYYYY",De,we),Pe("YYYYYY",De,we),He(["YYYYY","YYYYYY"],We),He("YYYY",(function(e,t){t[We]=2===e.length?i.parseTwoDigitYear(e):he(e)})),He("YY",(function(e,t){t[We]=i.parseTwoDigitYear(e)})),He("Y",(function(e,t){t[We]=parseInt(e,10)})),i.parseTwoDigitYear=function(e){return he(e)+(he(e)>68?1900:2e3)};var vt=de("FullYear",!0);function yt(){return ue(this.year())}function _t(e,t,n,i,a,r,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,i,a,r,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,i,a,r,o),s}function xt(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 bt(e,t,n){var i=7+t-n;return-(7+xt(e,0,i).getUTCDay()-t)%7+i-1}function wt(e,t,n,i,a){var r,o,s=1+7*(t-1)+(7+n-i)%7+bt(e,i,a);return s<=0?o=mt(r=e-1)+s:s>mt(e)?(r=e+1,o=s-mt(e)):(r=e,o=s),{year:r,dayOfYear:o}}function St(e,t,n){var i,a,r=bt(e.year(),t,n),o=Math.floor((e.dayOfYear()-r-1)/7)+1;return o<1?i=o+Mt(a=e.year()-1,t,n):o>Mt(e.year(),t,n)?(i=o-Mt(e.year(),t,n),a=e.year()+1):(a=e.year(),i=o),{week:i,year:a}}function Mt(e,t,n){var i=bt(e,t,n),a=bt(e+1,t,n);return(mt(e)-i+a)/7}function Tt(e){return St(e,this._week.dow,this._week.doy).week}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),ie("week","w"),ie("isoWeek","W"),se("week",5),se("isoWeek",5),Pe("w",Se),Pe("ww",Se,_e),Pe("W",Se),Pe("WW",Se,_e),Ye(["w","ww","W","WW"],(function(e,t,n,i){t[i.substr(0,1)]=he(e)}));var It={dow:0,doy:6};function At(){return this._week.dow}function Dt(){return this._week.doy}function Ct(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Ot(e){var t=St(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function kt(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Lt(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Et(e,t){return e.slice(t,7).concat(e.slice(0,t))}H("d",0,"do","day"),H("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),H("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),H("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),ie("day","d"),ie("weekday","e"),ie("isoWeekday","E"),se("day",11),se("weekday",11),se("isoWeekday",11),Pe("d",Se),Pe("e",Se),Pe("E",Se),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)})),Ye(["dd","ddd","dddd"],(function(e,t,n,i){var a=n._locale.weekdaysParse(e,i,n._strict);null!=a?t.d=a:m(n).invalidWeekday=e})),Ye(["d","e","E"],(function(e,t,n,i){t[i]=he(e)}));var Nt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Pt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Rt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zt=Ne,Bt=Ne,Vt=Ne;function Ht(e,t){var n=r(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Et(n,this._week.dow):e?n[e.day()]:n}function Yt(e){return!0===e?Et(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ft(e){return!0===e?Et(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Gt(e,t,n){var i,a,r,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=p([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(a=Ge.call(this._weekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Ge.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=Ge.call(this._minWeekdaysParse,o))?a:null:"dddd"===t?-1!==(a=Ge.call(this._weekdaysParse,o))||-1!==(a=Ge.call(this._shortWeekdaysParse,o))||-1!==(a=Ge.call(this._minWeekdaysParse,o))?a:null:"ddd"===t?-1!==(a=Ge.call(this._shortWeekdaysParse,o))||-1!==(a=Ge.call(this._weekdaysParse,o))||-1!==(a=Ge.call(this._minWeekdaysParse,o))?a:null:-1!==(a=Ge.call(this._minWeekdaysParse,o))||-1!==(a=Ge.call(this._weekdaysParse,o))||-1!==(a=Ge.call(this._shortWeekdaysParse,o))?a:null}function Wt(e,t,n){var i,a,r;if(this._weekdaysParseExact)return Gt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(a=p([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[i]=new RegExp(r.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}}function jt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=kt(e,this.localeData()),this.add(e-t,"d")):t}function Ut(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")}function Zt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Lt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Xt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=zt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function qt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Bt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Kt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Vt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $t(){function e(e,t){return t.length-e.length}var t,n,i,a,r,o=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),i=Be(this.weekdaysMin(n,"")),a=Be(this.weekdaysShort(n,"")),r=Be(this.weekdays(n,"")),o.push(i),s.push(a),l.push(r),u.push(i),u.push(a),u.push(r);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 Qt(){return this.hours()%12||12}function Jt(){return this.hours()||24}function en(e,t){H(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function tn(e,t){return t._meridiemParse}function nn(e){return"p"===(e+"").toLowerCase().charAt(0)}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,Qt),H("k",["kk",2],0,Jt),H("hmm",0,0,(function(){return""+Qt.apply(this)+P(this.minutes(),2)})),H("hmmss",0,0,(function(){return""+Qt.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)})),H("Hmm",0,0,(function(){return""+this.hours()+P(this.minutes(),2)})),H("Hmmss",0,0,(function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)})),en("a",!0),en("A",!1),ie("hour","h"),se("hour",13),Pe("a",tn),Pe("A",tn),Pe("H",Se),Pe("h",Se),Pe("k",Se),Pe("HH",Se,_e),Pe("hh",Se,_e),Pe("kk",Se,_e),Pe("hmm",Me),Pe("hmmss",Te),Pe("Hmm",Me),Pe("Hmmss",Te),He(["H","HH"],Ze),He(["k","kk"],(function(e,t,n){var i=he(e);t[Ze]=24===i?0:i})),He(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),He(["h","hh"],(function(e,t,n){t[Ze]=he(e),m(n).bigHour=!0})),He("hmm",(function(e,t,n){var i=e.length-2;t[Ze]=he(e.substr(0,i)),t[Xe]=he(e.substr(i)),m(n).bigHour=!0})),He("hmmss",(function(e,t,n){var i=e.length-4,a=e.length-2;t[Ze]=he(e.substr(0,i)),t[Xe]=he(e.substr(i,2)),t[qe]=he(e.substr(a)),m(n).bigHour=!0})),He("Hmm",(function(e,t,n){var i=e.length-2;t[Ze]=he(e.substr(0,i)),t[Xe]=he(e.substr(i))})),He("Hmmss",(function(e,t,n){var i=e.length-4,a=e.length-2;t[Ze]=he(e.substr(0,i)),t[Xe]=he(e.substr(i,2)),t[qe]=he(e.substr(a))}));var an=/[ap]\.?m?\.?/i,rn=de("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var sn,ln={calendar:E,longDateFormat:j,invalidDate:Z,ordinal:q,dayOfMonthOrdinalParse:K,relativeTime:Q,months:tt,monthsShort:nt,week:It,weekdays:Nt,weekdaysMin:Rt,weekdaysShort:Pt,meridiemParse:an},un={},cn={};function hn(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 dn(e){return e?e.toLowerCase().replace("_","-"):e}function fn(e){for(var t,n,i,a,r=0;r<e.length;){for(t=(a=dn(e[r]).split("-")).length,n=(n=dn(e[r+1]))?n.split("-"):null;t>0;){if(i=pn(a.slice(0,t).join("-")))return i;if(n&&n.length>=t&&hn(a,n)>=t-1)break;t--}r++}return sn}function pn(t){var n=null;if(void 0===un[t]&&e&&e.exports)try{n=sn._abbr,ne("./locale/"+t),gn(n)}catch(e){un[t]=null}return un[t]}function gn(e,t){var n;return e&&((n=u(t)?yn(e):mn(e,t))?sn=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),sn._abbr}function mn(e,t){if(null!==t){var n,i=ln;if(t.abbr=e,null!=un[e])D("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=un[e]._config;else if(null!=t.parentLocale)if(null!=un[t.parentLocale])i=un[t.parentLocale]._config;else{if(null==(n=pn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;i=n._config}return un[e]=new L(k(i,t)),cn[e]&&cn[e].forEach((function(e){mn(e.name,e.config)})),gn(e),un[e]}return delete un[e],null}function vn(e,t){if(null!=t){var n,i,a=ln;null!=un[e]&&null!=un[e].parentLocale?un[e].set(k(un[e]._config,t)):(null!=(i=pn(e))&&(a=i._config),t=k(a,t),null==i&&(t.abbr=e),(n=new L(t)).parentLocale=un[e],un[e]=n),gn(e)}else null!=un[e]&&(null!=un[e].parentLocale?(un[e]=un[e].parentLocale,e===gn()&&gn(e)):null!=un[e]&&delete un[e]);return un[e]}function yn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return sn;if(!r(e)){if(t=pn(e))return t;e=[e]}return fn(e)}function _n(){return I(un)}function xn(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[je]<0||n[je]>11?je:n[Ue]<1||n[Ue]>et(n[We],n[je])?Ue:n[Ze]<0||n[Ze]>24||24===n[Ze]&&(0!==n[Xe]||0!==n[qe]||0!==n[Ke])?Ze:n[Xe]<0||n[Xe]>59?Xe:n[qe]<0||n[qe]>59?qe:n[Ke]<0||n[Ke]>999?Ke:-1,m(e)._overflowDayOfYear&&(t<We||t>Ue)&&(t=Ue),m(e)._overflowWeeks&&-1===t&&(t=$e),m(e)._overflowWeekday&&-1===t&&(t=Qe),m(e).overflow=t),e}var bn=/^\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)?)?$/,wn=/^\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)?)?$/,Sn=/Z|[+-]\d\d(?::?\d\d)?/,Mn=[["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]],Tn=[["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/]],In=/^\/?Date\((-?\d+)/i,An=/^(?:(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}))$/,Dn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Cn(e){var t,n,i,a,r,o,s=e._i,l=bn.exec(s)||wn.exec(s);if(l){for(m(e).iso=!0,t=0,n=Mn.length;t<n;t++)if(Mn[t][1].exec(l[1])){a=Mn[t][0],i=!1!==Mn[t][2];break}if(null==a)return void(e._isValid=!1);if(l[3]){for(t=0,n=Tn.length;t<n;t++)if(Tn[t][1].exec(l[3])){r=(l[2]||" ")+Tn[t][0];break}if(null==r)return void(e._isValid=!1)}if(!i&&null!=r)return void(e._isValid=!1);if(l[4]){if(!Sn.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=a+(r||"")+(o||""),Yn(e)}else e._isValid=!1}function On(e,t,n,i,a,r){var o=[kn(e),nt.indexOf(t),parseInt(n,10),parseInt(i,10),parseInt(a,10)];return r&&o.push(parseInt(r,10)),o}function kn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Ln(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function En(e,t,n){return!e||Pt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Nn(e,t,n){if(e)return Dn[e];if(t)return 0;var i=parseInt(n,10),a=i%100;return(i-a)/100*60+a}function Pn(e){var t,n=An.exec(Ln(e._i));if(n){if(t=On(n[4],n[3],n[2],n[5],n[6],n[7]),!En(n[1],t,e))return;e._a=t,e._tzm=Nn(n[8],n[9],n[10]),e._d=xt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function Rn(e){var t=In.exec(e._i);null===t?(Cn(e),!1===e._isValid&&(delete e._isValid,Pn(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:i.createFromInputFallback(e)))):e._d=new Date(+t[1])}function zn(e,t,n){return null!=e?e:null!=t?t:n}function Bn(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Vn(e){var t,n,i,a,r,o=[];if(!e._d){for(i=Bn(e),e._w&&null==e._a[Ue]&&null==e._a[je]&&Hn(e),null!=e._dayOfYear&&(r=zn(e._a[We],i[We]),(e._dayOfYear>mt(r)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=xt(r,0,e._dayOfYear),e._a[je]=n.getUTCMonth(),e._a[Ue]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ze]&&0===e._a[Xe]&&0===e._a[qe]&&0===e._a[Ke]&&(e._nextDay=!0,e._a[Ze]=0),e._d=(e._useUTC?xt:_t).apply(null,o),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ze]=24),e._w&&void 0!==e._w.d&&e._w.d!==a&&(m(e).weekdayMismatch=!0)}}function Hn(e){var t,n,i,a,r,o,s,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(r=1,o=4,n=zn(t.GG,e._a[We],St(qn(),1,4).year),i=zn(t.W,1),((a=zn(t.E,1))<1||a>7)&&(l=!0)):(r=e._locale._week.dow,o=e._locale._week.doy,u=St(qn(),r,o),n=zn(t.gg,e._a[We],u.year),i=zn(t.w,u.week),null!=t.d?((a=t.d)<0||a>6)&&(l=!0):null!=t.e?(a=t.e+r,(t.e<0||t.e>6)&&(l=!0)):a=r),i<1||i>Mt(n,r,o)?m(e)._overflowWeeks=!0:null!=l?m(e)._overflowWeekday=!0:(s=wt(n,i,a,r,o),e._a[We]=s.year,e._dayOfYear=s.dayOfYear)}function Yn(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],m(e).empty=!0;var t,n,a,r,o,s,l=""+e._i,u=l.length,c=0;for(a=W(e._f,e._locale).match(R)||[],t=0;t<a.length;t++)r=a[t],(n=(l.match(Re(r,e))||[])[0])&&((o=l.substr(0,l.indexOf(n))).length>0&&m(e).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),c+=n.length),V[r]?(n?m(e).empty=!1:m(e).unusedTokens.push(r),Fe(r,n,e)):e._strict&&!n&&m(e).unusedTokens.push(r);m(e).charsLeftOver=u-c,l.length>0&&m(e).unusedInput.push(l),e._a[Ze]<=12&&!0===m(e).bigHour&&e._a[Ze]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[Ze]=Fn(e._locale,e._a[Ze],e._meridiem),null!==(s=m(e).era)&&(e._a[We]=e._locale.erasConvertYear(s,e._a[We])),Vn(e),xn(e)}else Pn(e);else Cn(e)}function Fn(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}function Gn(e){var t,n,i,a,r,o,s=!1;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;a<e._f.length;a++)r=0,o=!1,t=b({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[a],Yn(t),v(t)&&(o=!0),r+=m(t).charsLeftOver,r+=10*m(t).unusedTokens.length,m(t).score=r,s?r<i&&(i=r,n=t):(null==i||r<i||o)&&(i=r,n=t,o&&(s=!0));f(e,n||t)}function Wn(e){if(!e._d){var t=re(e._i),n=void 0===t.day?t.date:t.day;e._a=d([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Vn(e)}}function jn(e){var t=new w(xn(Un(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Un(e){var t=e._i,n=e._f;return e._locale=e._locale||yn(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),S(t)?new w(xn(t)):(h(t)?e._d=t:r(n)?Gn(e):n?Yn(e):Zn(e),v(e)||(e._d=null),e))}function Zn(e){var t=e._i;u(t)?e._d=new Date(i.now()):h(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Rn(e):r(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),Vn(e)):o(t)?Wn(e):c(t)?e._d=new Date(t):i.createFromInputFallback(e)}function Xn(e,t,n,i,a){var s={};return!0!==t&&!1!==t||(i=t,t=void 0),!0!==n&&!1!==n||(i=n,n=void 0),(o(e)&&l(e)||r(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=a,s._l=n,s._i=e,s._f=t,s._strict=i,jn(s)}function qn(e,t,n,i){return Xn(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 Kn=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=qn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()})),$n=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=qn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()}));function Qn(e,t){var n,i;if(1===t.length&&r(t[0])&&(t=t[0]),!t.length)return qn();for(n=t[0],i=1;i<t.length;++i)t[i].isValid()&&!t[i][e](n)||(n=t[i]);return n}function Jn(){return Qn("isBefore",[].slice.call(arguments,0))}function ei(){return Qn("isAfter",[].slice.call(arguments,0))}var ti=function(){return Date.now?Date.now():+new Date},ni=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ii(e){var t,n,i=!1;for(t in e)if(s(e,t)&&(-1===Ge.call(ni,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<ni.length;++n)if(e[ni[n]]){if(i)return!1;parseFloat(e[ni[n]])!==he(e[ni[n]])&&(i=!0)}return!0}function ai(){return this._isValid}function ri(){return Di(NaN)}function oi(e){var t=re(e),n=t.year||0,i=t.quarter||0,a=t.month||0,r=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=ii(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+o+7*r,this._months=+a+3*i+12*n,this._data={},this._locale=yn(),this._bubble()}function si(e){return e instanceof oi}function li(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function ui(e,t,n){var i,a=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),o=0;for(i=0;i<a;i++)(n&&e[i]!==t[i]||!n&&he(e[i])!==he(t[i]))&&o++;return o+r}function ci(e,t){H(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+P(~~(e/60),2)+t+P(~~e%60,2)}))}ci("Z",":"),ci("ZZ",""),Pe("Z",Le),Pe("ZZ",Le),He(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=di(Le,e)}));var hi=/([\+\-]|\d\d)/gi;function di(e,t){var n,i,a=(t||"").match(e);return null===a?null:0===(i=60*(n=((a[a.length-1]||[])+"").match(hi)||["-",0,0])[1]+he(n[2]))?0:"+"===n[0]?i:-i}function fi(e,t){var n,a;return t._isUTC?(n=t.clone(),a=(S(e)||h(e)?e.valueOf():qn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+a),i.updateOffset(n,!1),n):qn(e).local()}function pi(e){return-Math.round(e._d.getTimezoneOffset())}function gi(e,t,n){var a,r=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=di(Le,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(a=pi(this)),this._offset=e,this._isUTC=!0,null!=a&&this.add(a,"m"),r!==e&&(!t||this._changeInProgress?Ei(this,Di(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:pi(this)}function mi(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function vi(e){return this.utcOffset(0,e)}function yi(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(pi(this),"m")),this}function _i(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=di(ke,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function xi(e){return!!this.isValid()&&(e=e?qn(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function bi(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function wi(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return b(t,this),(t=Un(t))._a?(e=t._isUTC?p(t._a):qn(t._a),this._isDSTShifted=this.isValid()&&ui(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Si(){return!!this.isValid()&&!this._isUTC}function Mi(){return!!this.isValid()&&this._isUTC}function Ti(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Ii=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Ai=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Di(e,t){var n,i,a,r=e,o=null;return si(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(o=Ii.exec(e))?(n="-"===o[1]?-1:1,r={y:0,d:he(o[Ue])*n,h:he(o[Ze])*n,m:he(o[Xe])*n,s:he(o[qe])*n,ms:he(li(1e3*o[Ke]))*n}):(o=Ai.exec(e))?(n="-"===o[1]?-1:1,r={y:Ci(o[2],n),M:Ci(o[3],n),w:Ci(o[4],n),d:Ci(o[5],n),h:Ci(o[6],n),m:Ci(o[7],n),s:Ci(o[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(a=ki(qn(r.from),qn(r.to)),(r={}).ms=a.milliseconds,r.M=a.months),i=new oi(r),si(e)&&s(e,"_locale")&&(i._locale=e._locale),si(e)&&s(e,"_isValid")&&(i._isValid=e._isValid),i}function Ci(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Oi(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 ki(e,t){var n;return e.isValid()&&t.isValid()?(t=fi(t,e),e.isBefore(t)?n=Oi(e,t):((n=Oi(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Li(e,t){return function(n,i){var a;return null===i||isNaN(+i)||(D(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."),a=n,n=i,i=a),Ei(this,Di(n,i),e),this}}function Ei(e,t,n,a){var r=t._milliseconds,o=li(t._days),s=li(t._months);e.isValid()&&(a=null==a||a,s&&ct(e,fe(e,"Month")+s*n),o&&pe(e,"Date",fe(e,"Date")+o*n),r&&e._d.setTime(e._d.valueOf()+r*n),a&&i.updateOffset(e,o||s))}Di.fn=oi.prototype,Di.invalid=ri;var Ni=Li(1,"add"),Pi=Li(-1,"subtract");function Ri(e){return"string"==typeof e||e instanceof String}function zi(e){return S(e)||h(e)||Ri(e)||c(e)||Vi(e)||Bi(e)||null==e}function Bi(e){var t,n,i=o(e)&&!l(e),a=!1,r=["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<r.length;t+=1)n=r[t],a=a||s(e,n);return i&&a}function Vi(e){var t=r(e),n=!1;return t&&(n=0===e.filter((function(t){return!c(t)&&Ri(e)})).length),t&&n}function Hi(e){var t,n,i=o(e)&&!l(e),a=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<r.length;t+=1)n=r[t],a=a||s(e,n);return i&&a}function Yi(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"}function Fi(e,t){1===arguments.length&&(arguments[0]?zi(arguments[0])?(e=arguments[0],t=void 0):Hi(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||qn(),a=fi(n,this).startOf("day"),r=i.calendarFormat(this,a)||"sameElse",o=t&&(C(t[r])?t[r].call(this,n):t[r]);return this.format(o||this.localeData().calendar(r,this,qn(n)))}function Gi(){return new w(this)}function Wi(e,t){var n=S(e)?e:qn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ae(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function ji(e,t){var n=S(e)?e:qn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ae(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Ui(e,t,n,i){var a=S(e)?e:qn(e),r=S(t)?t:qn(t);return!!(this.isValid()&&a.isValid()&&r.isValid())&&("("===(i=i||"()")[0]?this.isAfter(a,n):!this.isBefore(a,n))&&(")"===i[1]?this.isBefore(r,n):!this.isAfter(r,n))}function Zi(e,t){var n,i=S(e)?e:qn(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=ae(t)||"millisecond")?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Xi(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function qi(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ki(e,t,n){var i,a,r;if(!this.isValid())return NaN;if(!(i=fi(e,this)).isValid())return NaN;switch(a=6e4*(i.utcOffset()-this.utcOffset()),t=ae(t)){case"year":r=$i(this,i)/12;break;case"month":r=$i(this,i);break;case"quarter":r=$i(this,i)/3;break;case"second":r=(this-i)/1e3;break;case"minute":r=(this-i)/6e4;break;case"hour":r=(this-i)/36e5;break;case"day":r=(this-i-a)/864e5;break;case"week":r=(this-i-a)/6048e5;break;default:r=this-i}return n?r:ce(r)}function $i(e,t){if(e.date()<t.date())return-$i(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 Qi(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ji(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?G(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",G(n,"Z")):G(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ea(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,i,a="moment",r="";return this.isLocal()||(a=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),e="["+a+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",i=r+'[")]',this.format(e+t+n+i)}function ta(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=G(this,e);return this.localeData().postformat(t)}function na(e,t){return this.isValid()&&(S(e)&&e.isValid()||qn(e).isValid())?Di({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ia(e){return this.from(qn(),e)}function aa(e,t){return this.isValid()&&(S(e)&&e.isValid()||qn(e).isValid())?Di({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ra(e){return this.to(qn(),e)}function oa(e){var t;return void 0===e?this._locale._abbr:(null!=(t=yn(e))&&(this._locale=t),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var sa=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 la(){return this._locale}var ua=1e3,ca=60*ua,ha=60*ca,da=3506328*ha;function fa(e,t){return(e%t+t)%t}function pa(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-da:new Date(e,t,n).valueOf()}function ga(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-da:Date.UTC(e,t,n)}function ma(e){var t,n;if(void 0===(e=ae(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?ga:pa,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-=fa(t+(this._isUTC?0:this.utcOffset()*ca),ha);break;case"minute":t=this._d.valueOf(),t-=fa(t,ca);break;case"second":t=this._d.valueOf(),t-=fa(t,ua)}return this._d.setTime(t),i.updateOffset(this,!0),this}function va(e){var t,n;if(void 0===(e=ae(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?ga:pa,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+=ha-fa(t+(this._isUTC?0:this.utcOffset()*ca),ha)-1;break;case"minute":t=this._d.valueOf(),t+=ca-fa(t,ca)-1;break;case"second":t=this._d.valueOf(),t+=ua-fa(t,ua)-1}return this._d.setTime(t),i.updateOffset(this,!0),this}function ya(){return this._d.valueOf()-6e4*(this._offset||0)}function _a(){return Math.floor(this.valueOf()/1e3)}function xa(){return new Date(this.valueOf())}function ba(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function wa(){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()}}function Sa(){return this.isValid()?this.toISOString():null}function Ma(){return v(this)}function Ta(){return f({},m(this))}function Ia(){return m(this).overflow}function Aa(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Da(e,t){var n,a,r,o=this._eras||yn("en")._eras;for(n=0,a=o.length;n<a;++n)switch("string"==typeof o[n].since&&(r=i(o[n].since).startOf("day"),o[n].since=r.valueOf()),typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":r=i(o[n].until).startOf("day").valueOf(),o[n].until=r.valueOf()}return o}function Ca(e,t,n){var i,a,r,o,s,l=this.eras();for(e=e.toUpperCase(),i=0,a=l.length;i<a;++i)if(r=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(r===e)return l[i];break;case"NNNNN":if(s===e)return l[i]}else if([r,o,s].indexOf(e)>=0)return l[i]}function Oa(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}function ka(){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""}function La(){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""}function Ea(){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""}function Na(){var e,t,n,a,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=r[e].since<=r[e].until?1:-1,a=this.clone().startOf("day").valueOf(),r[e].since<=a&&a<=r[e].until||r[e].until<=a&&a<=r[e].since)return(this.year()-i(r[e].since).year())*n+r[e].offset;return this.year()}function Pa(e){return s(this,"_erasNameRegex")||Fa.call(this),e?this._erasNameRegex:this._erasRegex}function Ra(e){return s(this,"_erasAbbrRegex")||Fa.call(this),e?this._erasAbbrRegex:this._erasRegex}function za(e){return s(this,"_erasNarrowRegex")||Fa.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ba(e,t){return t.erasAbbrRegex(e)}function Va(e,t){return t.erasNameRegex(e)}function Ha(e,t){return t.erasNarrowRegex(e)}function Ya(e,t){return t._eraYearOrdinalRegex||Ce}function Fa(){var e,t,n=[],i=[],a=[],r=[],o=this.eras();for(e=0,t=o.length;e<t;++e)i.push(Be(o[e].name)),n.push(Be(o[e].abbr)),a.push(Be(o[e].narrow)),r.push(Be(o[e].name)),r.push(Be(o[e].abbr)),r.push(Be(o[e].narrow));this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function Ga(e,t){H(0,[e,e.length],0,t)}function Wa(e){return Ka.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function ja(e){return Ka.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Ua(){return Mt(this.year(),1,4)}function Za(){return Mt(this.isoWeekYear(),1,4)}function Xa(){var e=this.localeData()._week;return Mt(this.year(),e.dow,e.doy)}function qa(){var e=this.localeData()._week;return Mt(this.weekYear(),e.dow,e.doy)}function Ka(e,t,n,i,a){var r;return null==e?St(this,i,a).year:(t>(r=Mt(e,i,a))&&(t=r),$a.call(this,e,t,n,i,a))}function $a(e,t,n,i,a){var r=wt(e,t,n,i,a),o=xt(r.year,0,r.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function Qa(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}H("N",0,0,"eraAbbr"),H("NN",0,0,"eraAbbr"),H("NNN",0,0,"eraAbbr"),H("NNNN",0,0,"eraName"),H("NNNNN",0,0,"eraNarrow"),H("y",["y",1],"yo","eraYear"),H("y",["yy",2],0,"eraYear"),H("y",["yyy",3],0,"eraYear"),H("y",["yyyy",4],0,"eraYear"),Pe("N",Ba),Pe("NN",Ba),Pe("NNN",Ba),Pe("NNNN",Va),Pe("NNNNN",Ha),He(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,i){var a=n._locale.erasParse(e,i,n._strict);a?m(n).era=a:m(n).invalidEra=e})),Pe("y",Ce),Pe("yy",Ce),Pe("yyy",Ce),Pe("yyyy",Ce),Pe("yo",Ya),He(["y","yy","yyy","yyyy"],We),He(["yo"],(function(e,t,n,i){var a;n._locale._eraYearOrdinalRegex&&(a=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[We]=n._locale.eraYearOrdinalParse(e,a):t[We]=parseInt(e,10)})),H(0,["gg",2],0,(function(){return this.weekYear()%100})),H(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Ga("gggg","weekYear"),Ga("ggggg","weekYear"),Ga("GGGG","isoWeekYear"),Ga("GGGGG","isoWeekYear"),ie("weekYear","gg"),ie("isoWeekYear","GG"),se("weekYear",1),se("isoWeekYear",1),Pe("G",Oe),Pe("g",Oe),Pe("GG",Se,_e),Pe("gg",Se,_e),Pe("GGGG",Ae,be),Pe("gggg",Ae,be),Pe("GGGGG",De,we),Pe("ggggg",De,we),Ye(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,i){t[i.substr(0,2)]=he(e)})),Ye(["gg","GG"],(function(e,t,n,a){t[a]=i.parseTwoDigitYear(e)})),H("Q",0,"Qo","quarter"),ie("quarter","Q"),se("quarter",7),Pe("Q",ye),He("Q",(function(e,t){t[je]=3*(he(e)-1)})),H("D",["DD",2],"Do","date"),ie("date","D"),se("date",9),Pe("D",Se),Pe("DD",Se,_e),Pe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),He(["D","DD"],Ue),He("Do",(function(e,t){t[Ue]=he(e.match(Se)[0])}));var Ja=de("Date",!0);function er(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}H("DDD",["DDDD",3],"DDDo","dayOfYear"),ie("dayOfYear","DDD"),se("dayOfYear",4),Pe("DDD",Ie),Pe("DDDD",xe),He(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=he(e)})),H("m",["mm",2],0,"minute"),ie("minute","m"),se("minute",14),Pe("m",Se),Pe("mm",Se,_e),He(["m","mm"],Xe);var tr=de("Minutes",!1);H("s",["ss",2],0,"second"),ie("second","s"),se("second",15),Pe("s",Se),Pe("ss",Se,_e),He(["s","ss"],qe);var nr,ir,ar=de("Seconds",!1);for(H("S",0,0,(function(){return~~(this.millisecond()/100)})),H(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),H(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),H(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),H(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),H(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),H(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ie("millisecond","ms"),se("millisecond",16),Pe("S",Ie,ye),Pe("SS",Ie,_e),Pe("SSS",Ie,xe),nr="SSSS";nr.length<=9;nr+="S")Pe(nr,Ce);function rr(e,t){t[Ke]=he(1e3*("0."+e))}for(nr="S";nr.length<=9;nr+="S")He(nr,rr);function or(){return this._isUTC?"UTC":""}function sr(){return this._isUTC?"Coordinated Universal Time":""}ir=de("Milliseconds",!1),H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var lr=w.prototype;function ur(e){return qn(1e3*e)}function cr(){return qn.apply(null,arguments).parseZone()}function hr(e){return e}lr.add=Ni,lr.calendar=Fi,lr.clone=Gi,lr.diff=Ki,lr.endOf=va,lr.format=ta,lr.from=na,lr.fromNow=ia,lr.to=aa,lr.toNow=ra,lr.get=ge,lr.invalidAt=Ia,lr.isAfter=Wi,lr.isBefore=ji,lr.isBetween=Ui,lr.isSame=Zi,lr.isSameOrAfter=Xi,lr.isSameOrBefore=qi,lr.isValid=Ma,lr.lang=sa,lr.locale=oa,lr.localeData=la,lr.max=$n,lr.min=Kn,lr.parsingFlags=Ta,lr.set=me,lr.startOf=ma,lr.subtract=Pi,lr.toArray=ba,lr.toObject=wa,lr.toDate=xa,lr.toISOString=Ji,lr.inspect=ea,"undefined"!=typeof Symbol&&null!=Symbol.for&&(lr[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),lr.toJSON=Sa,lr.toString=Qi,lr.unix=_a,lr.valueOf=ya,lr.creationData=Aa,lr.eraName=ka,lr.eraNarrow=La,lr.eraAbbr=Ea,lr.eraYear=Na,lr.year=vt,lr.isLeapYear=yt,lr.weekYear=Wa,lr.isoWeekYear=ja,lr.quarter=lr.quarters=Qa,lr.month=ht,lr.daysInMonth=dt,lr.week=lr.weeks=Ct,lr.isoWeek=lr.isoWeeks=Ot,lr.weeksInYear=Xa,lr.weeksInWeekYear=qa,lr.isoWeeksInYear=Ua,lr.isoWeeksInISOWeekYear=Za,lr.date=Ja,lr.day=lr.days=jt,lr.weekday=Ut,lr.isoWeekday=Zt,lr.dayOfYear=er,lr.hour=lr.hours=rn,lr.minute=lr.minutes=tr,lr.second=lr.seconds=ar,lr.millisecond=lr.milliseconds=ir,lr.utcOffset=gi,lr.utc=vi,lr.local=yi,lr.parseZone=_i,lr.hasAlignedHourOffset=xi,lr.isDST=bi,lr.isLocal=Si,lr.isUtcOffset=Mi,lr.isUtc=Ti,lr.isUTC=Ti,lr.zoneAbbr=or,lr.zoneName=sr,lr.dates=T("dates accessor is deprecated. Use date instead.",Ja),lr.months=T("months accessor is deprecated. Use month instead",ht),lr.years=T("years accessor is deprecated. Use year instead",vt),lr.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",mi),lr.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wi);var dr=L.prototype;function fr(e,t,n,i){var a=yn(),r=p().set(i,t);return a[n](r,e)}function pr(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return fr(e,t,n,"month");var i,a=[];for(i=0;i<12;i++)a[i]=fr(e,i,n,"month");return a}function gr(e,t,n,i){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var a,r=yn(),o=e?r._week.dow:0,s=[];if(null!=n)return fr(t,(n+o)%7,i,"day");for(a=0;a<7;a++)s[a]=fr(t,(a+o)%7,i,"day");return s}function mr(e,t){return pr(e,t,"months")}function vr(e,t){return pr(e,t,"monthsShort")}function yr(e,t,n){return gr(e,t,n,"weekdays")}function _r(e,t,n){return gr(e,t,n,"weekdaysShort")}function xr(e,t,n){return gr(e,t,n,"weekdaysMin")}dr.calendar=N,dr.longDateFormat=U,dr.invalidDate=X,dr.ordinal=$,dr.preparse=hr,dr.postformat=hr,dr.relativeTime=J,dr.pastFuture=ee,dr.set=O,dr.eras=Da,dr.erasParse=Ca,dr.erasConvertYear=Oa,dr.erasAbbrRegex=Ra,dr.erasNameRegex=Pa,dr.erasNarrowRegex=za,dr.months=ot,dr.monthsShort=st,dr.monthsParse=ut,dr.monthsRegex=pt,dr.monthsShortRegex=ft,dr.week=Tt,dr.firstDayOfYear=Dt,dr.firstDayOfWeek=At,dr.weekdays=Ht,dr.weekdaysMin=Ft,dr.weekdaysShort=Yt,dr.weekdaysParse=Wt,dr.weekdaysRegex=Xt,dr.weekdaysShortRegex=qt,dr.weekdaysMinRegex=Kt,dr.isPM=nn,dr.meridiem=on,gn("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===he(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.",gn),i.langData=T("moment.langData is deprecated. Use moment.localeData instead.",yn);var br=Math.abs;function wr(){var e=this._data;return this._milliseconds=br(this._milliseconds),this._days=br(this._days),this._months=br(this._months),e.milliseconds=br(e.milliseconds),e.seconds=br(e.seconds),e.minutes=br(e.minutes),e.hours=br(e.hours),e.months=br(e.months),e.years=br(e.years),this}function Sr(e,t,n,i){var a=Di(t,n);return e._milliseconds+=i*a._milliseconds,e._days+=i*a._days,e._months+=i*a._months,e._bubble()}function Mr(e,t){return Sr(this,e,t,1)}function Tr(e,t){return Sr(this,e,t,-1)}function Ir(e){return e<0?Math.floor(e):Math.ceil(e)}function Ar(){var e,t,n,i,a,r=this._milliseconds,o=this._days,s=this._months,l=this._data;return r>=0&&o>=0&&s>=0||r<=0&&o<=0&&s<=0||(r+=864e5*Ir(Cr(s)+o),o=0,s=0),l.milliseconds=r%1e3,e=ce(r/1e3),l.seconds=e%60,t=ce(e/60),l.minutes=t%60,n=ce(t/60),l.hours=n%24,o+=ce(n/24),s+=a=ce(Dr(o)),o-=Ir(Cr(a)),i=ce(s/12),s%=12,l.days=o,l.months=s,l.years=i,this}function Dr(e){return 4800*e/146097}function Cr(e){return 146097*e/4800}function Or(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=ae(e))||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,n=this._months+Dr(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Cr(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)}}function kr(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*he(this._months/12):NaN}function Lr(e){return function(){return this.as(e)}}var Er=Lr("ms"),Nr=Lr("s"),Pr=Lr("m"),Rr=Lr("h"),zr=Lr("d"),Br=Lr("w"),Vr=Lr("M"),Hr=Lr("Q"),Yr=Lr("y");function Fr(){return Di(this)}function Gr(e){return e=ae(e),this.isValid()?this[e+"s"]():NaN}function Wr(e){return function(){return this.isValid()?this._data[e]:NaN}}var jr=Wr("milliseconds"),Ur=Wr("seconds"),Zr=Wr("minutes"),Xr=Wr("hours"),qr=Wr("days"),Kr=Wr("months"),$r=Wr("years");function Qr(){return ce(this.days()/7)}var Jr=Math.round,eo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function to(e,t,n,i,a){return a.relativeTime(t||1,!!n,e,i)}function no(e,t,n,i){var a=Di(e).abs(),r=Jr(a.as("s")),o=Jr(a.as("m")),s=Jr(a.as("h")),l=Jr(a.as("d")),u=Jr(a.as("M")),c=Jr(a.as("w")),h=Jr(a.as("y")),d=r<=n.ss&&["s",r]||r<n.s&&["ss",r]||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,to.apply(null,d)}function io(e){return void 0===e?Jr:"function"==typeof e&&(Jr=e,!0)}function ao(e,t){return void 0!==eo[e]&&(void 0===t?eo[e]:(eo[e]=t,"s"===e&&(eo.ss=t-1),!0))}function ro(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,i,a=!1,r=eo;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(a=e),"object"==typeof t&&(r=Object.assign({},eo,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),i=no(this,!a,r,n=this.localeData()),a&&(i=n.pastFuture(+this,i)),n.postformat(i)}var oo=Math.abs;function so(e){return(e>0)-(e<0)||+e}function lo(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,i,a,r,o,s,l=oo(this._milliseconds)/1e3,u=oo(this._days),c=oo(this._months),h=this.asSeconds();return h?(e=ce(l/60),t=ce(e/60),l%=60,e%=60,n=ce(c/12),c%=12,i=l?l.toFixed(3).replace(/\.?0+$/,""):"",a=h<0?"-":"",r=so(this._months)!==so(h)?"-":"",o=so(this._days)!==so(h)?"-":"",s=so(this._milliseconds)!==so(h)?"-":"",a+"P"+(n?r+n+"Y":"")+(c?r+c+"M":"")+(u?o+u+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+i+"S":"")):"P0D"}var uo=oi.prototype;return uo.isValid=ai,uo.abs=wr,uo.add=Mr,uo.subtract=Tr,uo.as=Or,uo.asMilliseconds=Er,uo.asSeconds=Nr,uo.asMinutes=Pr,uo.asHours=Rr,uo.asDays=zr,uo.asWeeks=Br,uo.asMonths=Vr,uo.asQuarters=Hr,uo.asYears=Yr,uo.valueOf=kr,uo._bubble=Ar,uo.clone=Fr,uo.get=Gr,uo.milliseconds=jr,uo.seconds=Ur,uo.minutes=Zr,uo.hours=Xr,uo.days=qr,uo.weeks=Qr,uo.months=Kr,uo.years=$r,uo.humanize=ro,uo.toISOString=lo,uo.toString=lo,uo.toJSON=lo,uo.locale=oa,uo.localeData=la,uo.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",lo),uo.lang=sa,H("X",0,0,"unix"),H("x",0,0,"valueOf"),Pe("x",Oe),Pe("X",Ee),He("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),He("x",(function(e,t,n){n._d=new Date(he(e))})),
//! moment.js
i.version="2.29.1",a(qn),i.fn=lr,i.min=Jn,i.max=ei,i.now=ti,i.utc=p,i.unix=ur,i.months=mr,i.isDate=h,i.locale=gn,i.invalid=y,i.duration=Di,i.isMoment=S,i.weekdays=yr,i.parseZone=cr,i.localeData=yn,i.isDuration=si,i.monthsShort=vr,i.weekdaysMin=xr,i.defineLocale=mn,i.updateLocale=vn,i.locales=_n,i.weekdaysShort=_r,i.normalizeUnits=ae,i.relativeTimeRounding=io,i.relativeTimeThreshold=ao,i.calendarFormat=Yi,i.prototype=lr,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.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"}(JG||(JG={})),Object.freeze({[JG.CONTAIN]:Object.freeze({key:JG.CONTAIN,name:"包含"}),[JG.NOT_CONTAIN]:Object.freeze({key:JG.NOT_CONTAIN,name:"不包含"}),[JG.STARTWITH]:Object.freeze({key:JG.STARTWITH,name:"开头是"}),[JG.NOT_STARTWITH]:Object.freeze({key:JG.NOT_STARTWITH,name:"开头不是"}),[JG.ENDWITH]:Object.freeze({key:JG.ENDWITH,name:"结尾是"}),[JG.NOT_ENDWITH]:Object.freeze({key:JG.NOT_ENDWITH,name:"结尾不是"}),[JG.EQUAL]:Object.freeze({key:JG.EQUAL,name:"等于"}),[JG.NOT_EQUAL]:Object.freeze({key:JG.NOT_EQUAL,name:"不等于"}),[JG.NULL_STR]:Object.freeze({key:JG.NULL_STR,name:"内容为空"}),[JG.NOT_NULL_STR]:Object.freeze({key:JG.NOT_NULL_STR,name:"内容非空"}),[JG.NULL]:Object.freeze({key:JG.NULL,name:"为NULL"}),[JG.NOT_NULL]:Object.freeze({key:JG.NOT_NULL,name:"不为NULL"})}),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"}(eW||(eW={})),Object.freeze({[eW.EQUAL]:Object.freeze({key:eW.EQUAL,name:"等于"}),[eW.NOT_EQUAL]:Object.freeze({key:eW.NOT_EQUAL,name:"不等于"}),[eW.GREAT_THAN]:Object.freeze({key:eW.GREAT_THAN,name:"大于"}),[eW.GREAT_EQUAL]:Object.freeze({key:eW.GREAT_EQUAL,name:"大于等于"}),[eW.LESS_THAN]:Object.freeze({key:eW.LESS_THAN,name:"小于"}),[eW.LESS_EQUAL]:Object.freeze({key:eW.LESS_EQUAL,name:"小于等于"}),[eW.NULL]:Object.freeze({key:eW.NULL,name:"为NULL"}),[eW.NOT_NULL]:Object.freeze({key:eW.NOT_NULL,name:"不为NULL"})}),function(e){e.YEAR="year",e.MONTH="month",e.DAY="day",e.TIME="time"}(tW||(tW={}));const iW=Object.freeze({[tW.YEAR]:Object.freeze({key:tW.YEAR,name:"年",sqltype:"time-only_year",sqldformat:"only_year"}),[tW.MONTH]:Object.freeze({key:tW.MONTH,name:"月",sqltype:"time-only_month",sqldformat:"only_month"}),[tW.DAY]:Object.freeze({key:tW.DAY,name:"日",sqltype:"time-only_day",sqldformat:"only_day"}),[tW.TIME]:Object.freeze({key:tW.TIME,name:"时间",sqltype:"time-time",sqldformat:"only_time"})});var aW,rW;!function(e){e.STRING="string",e.TIME="time",e.INT="int",e.FLOAT="float",e.DOUBLE="double"}(aW||(aW={})),Object.freeze({[aW.STRING]:Object.freeze({key:aW.STRING,name:"文本",iconfont:"icon-word"}),[aW.TIME]:Object.freeze({key:aW.TIME,name:"时间",iconfont:"icon-calendar"}),[aW.INT]:Object.freeze({key:aW.INT,name:"数值",iconfont:"icon-number"}),[aW.FLOAT]:Object.freeze({key:aW.FLOAT,name:"小数",iconfont:"icon-decimal"}),[aW.DOUBLE]:Object.freeze({key:aW.DOUBLE,name:"小数",iconfont:"icon-decimal"})}),function(e){e.NONE="none",e.FIRST_TAG="first_tag"}(rW||(rW={}));const oW=Object.freeze({[rW.NONE]:Object.freeze({key:rW.NONE,name:"无",getDefault:()=>({type:rW.NONE})}),[rW.FIRST_TAG]:Object.freeze({key:rW.FIRST_TAG,name:"选中第一项",getDefault:()=>({type:rW.FIRST_TAG})})});var sW;!function(e){e.ALL="all",e.BEFORE="before",e.CUSTOM="custom"}(sW||(sW={}));const lW=Object.freeze({[sW.ALL]:Object.freeze({key:sW.ALL,name:"全选",getDefault:()=>({type:sW.ALL})}),[sW.BEFORE]:Object.freeze({key:sW.BEFORE,name:"选中前N项",getDefault:()=>({type:sW.BEFORE,index:1})}),[sW.CUSTOM]:Object.freeze({key:sW.CUSTOM,name:"自定义",getDefault:()=>({type:sW.CUSTOM,val:[]})})});var uW;!function(e){e.INPUT="input",e.SELECT="select",e.CONDITION="condition",e.TAG="tag",e.TREE="tree"}(uW||(uW={}));const cW=Object.freeze({[uW.INPUT]:Object.freeze({key:uW.INPUT,name:"输入框",getDefault:()=>({default:null})}),[uW.SELECT]:Object.freeze({key:uW.SELECT,name:"下拉框",searchMode:[JG.CONTAIN,JG.STARTWITH,JG.EQUAL],getDefault:({isMultiple:e=!1}={})=>({isMultiple:e,searchMode:JG.CONTAIN,default:e?[]:null})}),[uW.CONDITION]:Object.freeze({key:uW.CONDITION,name:"条件",getDefault:({searchMode:e=JG.CONTAIN,value:t=null}={})=>({default:{searchMode:e,val:t}})}),[uW.TAG]:Object.freeze({key:uW.TAG,name:"标签",showTagCount:[10,30,50],getDefault:({isMultiple:e=!1}={})=>{const t={isMultiple:e,showTagCount:30};return e?Object.assign({},t,{selectedTagCount:null,default:lW[sW.ALL].getDefault()}):Object.assign({},t,{default:oW[rW.NONE].getDefault()})}}),[uW.TREE]:Object.freeze({key:uW.TREE,name:"树",getDefault:()=>({isMultiple:!1,treeCheckStrictly:!1,defaultExpandLevel:1,default:[]})})});var hW,dW;!function(e){e.CONDITION="condition",e.RANGE="num_range"}(hW||(hW={})),Object.freeze({[hW.CONDITION]:Object.freeze({key:hW.CONDITION,name:"条件",getDefault:({searchMode:e=eW.EQUAL,value:t=null}={})=>({default:{searchMode:e,val:t}})}),[hW.RANGE]:Object.freeze({key:hW.RANGE,name:"范围",getDefault:()=>({default:[null,null]})})}),function(e){e.NONE="none",e.CURRENT="current",e.CUSTOM="custom"}(dW||(dW={}));const fW=Object.freeze({[dW.NONE]:Object.freeze({key:dW.NONE,name:"无",getDefault:()=>({type:dW.NONE})}),[dW.CURRENT]:Object.freeze({key:dW.CURRENT,name:"当前时间",getDefault:()=>({type:dW.CURRENT})}),[dW.CUSTOM]:Object.freeze({key:dW.CUSTOM,name:"自定义",getDefault:()=>({type:dW.CUSTOM,val:null})})});var pW;!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"}(pW||(pW={}));const gW=Object.freeze({[pW.NONE]:Object.freeze({key:pW.NONE,name:"无",getDefault:()=>({type:pW.NONE})}),[pW.TODAY]:Object.freeze({key:pW.TODAY,name:"当天",getDefault:()=>({type:pW.TODAY})}),[pW.YESTERDAY]:Object.freeze({key:pW.YESTERDAY,name:"昨天",getDefault:()=>({type:pW.YESTERDAY})}),[pW.THIS_WEEK]:Object.freeze({key:pW.THIS_WEEK,name:"本周",getDefault:()=>({type:pW.THIS_WEEK})}),[pW.LAST_WEEK]:Object.freeze({key:pW.LAST_WEEK,name:"上周",getDefault:()=>({type:pW.LAST_WEEK})}),[pW.THIS_MONTH]:Object.freeze({key:pW.THIS_MONTH,name:"本月",getDefault:()=>({type:pW.THIS_MONTH})}),[pW.LAST_MONTH]:Object.freeze({key:pW.LAST_MONTH,name:"上月",getDefault:()=>({type:pW.LAST_MONTH})}),[pW.THIS_QUARTER]:Object.freeze({key:pW.THIS_QUARTER,name:"本季度",getDefault:()=>({type:pW.THIS_QUARTER})}),[pW.LAST_QUARTER]:Object.freeze({key:pW.LAST_QUARTER,name:"上季度",getDefault:()=>({type:pW.LAST_QUARTER})}),[pW.THIS_YEAR]:Object.freeze({key:pW.THIS_YEAR,name:"今年",getDefault:()=>({type:pW.THIS_YEAR})}),[pW.LAST_YEAR]:Object.freeze({key:pW.LAST_YEAR,name:"去年",getDefault:()=>({type:pW.LAST_YEAR})}),[pW.NEARLY_A_WEEK]:Object.freeze({key:pW.NEARLY_A_WEEK,name:"最近一周",getDefault:()=>({type:pW.NEARLY_A_WEEK})}),[pW.NEARLY_A_MONTH]:Object.freeze({key:pW.NEARLY_A_MONTH,name:"最近一月",getDefault:()=>({type:pW.NEARLY_A_MONTH})}),[pW.NEARLY_A_YEAR]:Object.freeze({key:pW.NEARLY_A_YEAR,name:"最近一年",getDefault:()=>({type:pW.NEARLY_A_YEAR})}),[pW.CUSTOM]:Object.freeze({key:pW.CUSTOM,name:"自定义",getDefault:()=>({type:pW.CUSTOM,val:[null,null]})})});var mW,vW,yW,_W,xW,bW,wW,SW,MW,TW,IW,AW,DW,CW;function OW({dformat:e,tformat:t}){const n=[];return e&&e!==wW.DEFAULT?e!==wW.NONE&&n.push(e):n.push(wW.MIDDLE_DASH_YYYYMMDD),t&&t!==SW.DEFAULT?t!==wW.NONE&&n.push(t):n.push(SW.HMS),n.join(" ")}!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"}(mW||(mW={})),Object.freeze({[mW.DATE]:Object.freeze({key:mW.DATE,name:"日期选择",getDefault:()=>({default:fW[dW.NONE].getDefault()})}),[mW.DATE_RANGE]:Object.freeze({key:mW.DATE_RANGE,name:"日期范围",getDefault:()=>({default:gW[pW.NONE].getDefault()})}),[mW.DATETIME]:Object.freeze({key:mW.DATETIME,name:"日期时间选择",getDefault:()=>({default:fW[dW.NONE].getDefault()})}),[mW.DATETIME_RANGE]:Object.freeze({key:mW.DATETIME_RANGE,name:"日期时间范围",getDefault:()=>({default:gW[pW.NONE].getDefault()})}),[mW.TIME]:Object.freeze({key:mW.TIME,name:"时间选择",getDefault:()=>({default:fW[dW.NONE].getDefault()})}),[mW.TIME_RANGE]:Object.freeze({key:mW.TIME_RANGE,name:"时间范围",getDefault:()=>({default:gW[pW.NONE].getDefault()})}),[mW.YEAR]:Object.freeze({key:mW.YEAR,name:"年",getDefault:()=>({default:fW[dW.NONE].getDefault()})}),[mW.MONTH]:Object.freeze({key:mW.MONTH,name:"月",getDefault:()=>({default:fW[dW.NONE].getDefault()})}),[mW.DAY]:Object.freeze({key:mW.DAY,name:"日",getDefault:()=>({default:fW[dW.NONE].getDefault()})})}),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"}(vW||(vW={})),Object.freeze({[vW.NONE]:Object.freeze({key:vW.NONE,name:"不对比",label:"不对比"}),[vW.COMPAREWITH_YEAR]:Object.freeze({key:vW.COMPAREWITH_YEAR,name:"同比增长率",label:"同比增长率"}),[vW.COMPAREWITH]:Object.freeze({key:vW.COMPAREWITH,name:"环比增长率",label:"环比增长率"}),[vW.COMPAREWITH_YEAR_NUM]:Object.freeze({key:vW.COMPAREWITH_YEAR_NUM,name:"同比增长值",label:"同比增长值"}),[vW.COMPAREWITH_NUM]:Object.freeze({key:vW.COMPAREWITH_NUM,name:"环比增长值",label:"环比增长值"})}),function(e){e.NONE="none",e.DATA="data",e.TIME="time",e.PERCENT="percent"}(yW||(yW={})),Object.freeze({[yW.NONE]:Object.freeze({key:yW.NONE,label:"默认"}),[yW.DATA]:Object.freeze({key:yW.DATA,label:"数值"}),[yW.TIME]:Object.freeze({key:yW.TIME,label:"时间"}),[yW.PERCENT]:Object.freeze({key:yW.PERCENT,label:"百分比"})}),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"}(_W||(_W={})),Object.freeze({[_W.NONE]:Object.freeze({key:_W.NONE,label:"无",value:1}),[_W.CN_K]:Object.freeze({key:_W.CN_K,label:"千",value:Math.pow(10,3)}),[_W.CN_10K]:Object.freeze({key:_W.CN_10K,label:"万",value:Math.pow(10,4)}),[_W.CN_100K]:Object.freeze({key:_W.CN_100K,label:"十万",value:Math.pow(10,5)}),[_W.CN_M]:Object.freeze({key:_W.CN_M,label:"百万",value:Math.pow(10,6)}),[_W.CN_10M]:Object.freeze({key:_W.CN_10M,label:"千万",value:Math.pow(10,7)}),[_W.CN_100M]:Object.freeze({key:_W.CN_100M,label:"亿",value:Math.pow(10,8)}),[_W.EN_K]:Object.freeze({key:_W.EN_K,label:"K",value:Math.pow(10,3)}),[_W.EN_M]:Object.freeze({key:_W.EN_M,label:"M",value:Math.pow(10,6)}),[_W.EN_B]:Object.freeze({key:_W.EN_B,label:"B",value:Math.pow(10,9)})}),function(e){e.YEAR="year",e.MONTH="month",e.DAY="day",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second",e.MILLISECOND="millisecond"}(xW||(xW={})),Object.freeze({[xW.YEAR]:Object.freeze({key:xW.YEAR,label:"年",value:31536e6}),[xW.MONTH]:Object.freeze({key:xW.MONTH,label:"月",value:2592e6}),[xW.DAY]:Object.freeze({key:xW.DAY,label:"日",value:864e5}),[xW.HOUR]:Object.freeze({key:xW.HOUR,label:"小时",value:36e5}),[xW.MINUTE]:Object.freeze({key:xW.MINUTE,label:"分钟",value:6e4}),[xW.SECOND]:Object.freeze({key:xW.SECOND,label:"秒",value:1e3}),[xW.MILLISECOND]:Object.freeze({key:xW.MILLISECOND,label:"毫秒",value:1})}),function(e){e.ZERO="0",e.ONE="1",e.TWO="2",e.THREE="3",e.FOUR="4",e.FIVE="5",e.SIX="6"}(bW||(bW={})),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"}(wW||(wW={})),Object.freeze({[wW.DEFAULT]:Object.freeze({key:wW.DEFAULT,label:"默认"}),[wW.NONE]:Object.freeze({key:wW.NONE,label:"隐藏"}),[wW.CN_YYYYMMDD]:Object.freeze({key:wW.CN_YYYYMMDD,label:"2019年03月01日(yyyy年mm月dd日)"}),[wW.MIDDLE_DASH_YYYYMMDD]:Object.freeze({key:wW.MIDDLE_DASH_YYYYMMDD,label:"2019-03-01(yyyy-mm-dd)"}),[wW.SLASH_YYYYMMDD]:Object.freeze({key:wW.SLASH_YYYYMMDD,label:"19/03/01(yy/mm/dd)"}),[wW.CN_YYYYMM]:Object.freeze({key:wW.CN_YYYYMM,label:"2019年03月(yyyy年mm月)"}),[wW.MIDDLE_DASH_YYYYMM]:Object.freeze({key:wW.MIDDLE_DASH_YYYYMM,label:"2019-03(yyyy-mm)"}),[wW.SLASH_YYYYMM]:Object.freeze({key:wW.SLASH_YYYYMM,label:"2019/03(yyyy/mm)"}),[wW.CN_YYYY]:Object.freeze({key:wW.CN_YYYY,label:"2019年(yyyy年)"}),[wW.YYYY]:Object.freeze({key:wW.YYYY,label:"2019(yyyy)"}),[wW.CN_MM]:Object.freeze({key:wW.CN_MM,label:"03月(mm月)"}),[wW.MM]:Object.freeze({key:wW.MM,label:"03(mm)"}),[wW.CN_DD]:Object.freeze({key:wW.CN_DD,label:"01日(dd日)"}),[wW.DD]:Object.freeze({key:wW.DD,label:"01(dd)"})}),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"}(SW||(SW={})),Object.freeze({[SW.DEFAULT]:Object.freeze({key:SW.DEFAULT,label:"默认"}),[wW.NONE]:Object.freeze({key:wW.NONE,label:"隐藏"}),[SW.HMS]:Object.freeze({key:SW.HMS,label:"12:00:00"}),[SW.HM]:Object.freeze({key:SW.HM,label:"12:00"}),[SW.CN_HMS]:Object.freeze({key:SW.CN_HMS,label:"12时00分00秒"}),[SW.CN_HM]:Object.freeze({key:SW.CN_HM,label:"12时00"}),[SW.CN_H]:Object.freeze({key:SW.CN_H,label:"12时"}),[SW.RISP]:Object.freeze({key:SW.RISP,label:"12:00:00 AM"}),[SW.RIP]:Object.freeze({key:SW.RIP,label:"12:00 AM"})}),function(e){e.NONE="none",e.DRILL="drill",e.DETAIL="detail"}(MW||(MW={})),Object.freeze({[MW.NONE]:Object.freeze({key:MW.NONE,label:"无点击事件"}),[MW.DRILL]:Object.freeze({key:MW.DRILL,label:"下钻"}),[MW.DETAIL]:Object.freeze({key:MW.DETAIL,label:"显示详细表"})}),function(e){e.DIALOG="dialog"}(TW||(TW={})),Object.freeze({[TW.DIALOG]:Object.freeze({key:TW.DIALOG,label:"通过弹窗显示",getDefaultConfig:()=>({mode:TW.DIALOG,condition:{targetSetId:void 0,filter:[]}}),getDefaultFilerItem:()=>({sourceFieldId:null,sourceFieldScope:null,targetFieldId:null,targetFieldScope:null})})}),function(e){e.NONE="none",e.SUM="sum",e.COUNT="count",e.DISTINCT="count_distinct",e.AVG="avg",e.MAX="max",e.MIN="min"}(IW||(IW={})),Object.freeze({[IW.NONE]:Object.freeze({key:IW.NONE,name:"不计算",label:"不计算"}),[IW.SUM]:Object.freeze({key:IW.SUM,name:"求和",label:"求和"}),[IW.COUNT]:Object.freeze({key:IW.COUNT,name:"计次",label:"计次"}),[IW.DISTINCT]:Object.freeze({key:IW.DISTINCT,name:"计数",label:"计数"}),[IW.AVG]:Object.freeze({key:IW.AVG,name:"平均",label:"平均"}),[IW.MAX]:Object.freeze({key:IW.MAX,name:"最大值",label:"最大值"}),[IW.MIN]:Object.freeze({key:IW.MIN,name:"最小值",label:"最小值"})}),function(e){e.NONE="none",e.SHOW_NULL="null",e.SHOW_ZERO="zero",e.SHOW_STRIKETHROUGH="strikethrough"}(AW||(AW={})),Object.freeze({[AW.NONE]:Object.freeze({key:AW.NONE,label:"默认"}),[AW.SHOW_NULL]:Object.freeze({key:AW.SHOW_NULL,label:"显示为 null"}),[AW.SHOW_ZERO]:Object.freeze({key:AW.SHOW_ZERO,label:"显示为 0"}),[AW.SHOW_STRIKETHROUGH]:Object.freeze({key:AW.SHOW_STRIKETHROUGH,label:"显示为-"})}),function(e){e.NONE="none",e.ASC="asc",e.DESC="desc"}(DW||(DW={})),Object.freeze({[DW.NONE]:Object.freeze({key:DW.NONE,name:"默认",label:"默认"}),[DW.ASC]:Object.freeze({key:DW.ASC,name:"↑",label:"升序 ↑"}),[DW.DESC]:Object.freeze({key:DW.DESC,name:"↓",label:"降序 ↓"})}),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"}(CW||(CW={}));const kW=({value:e})=>0===e.length||e.findIndex((e=>e||0===e))<0,LW=({value:e,dateFormat:t})=>{switch(e.type){case dW.NONE:return null;case dW.CURRENT:return nW().format(t);case dW.CUSTOM:return e.val}},EW=({value:e,dateFormat:t})=>{switch(e.type){case pW.NONE:return[null,null];case pW.TODAY:const n=nW().startOf("d"),i=nW().endOf("d");return[n.format(t),i.format(t)];case pW.YESTERDAY:const a=nW().add(-1,"days").startOf("d"),r=nW().add(-1,"days").endOf("d");return[a.format(t),r.format(t)];case pW.THIS_WEEK:const o=nW().startOf("isoWeeks").startOf("d"),s=nW().endOf("isoWeeks").endOf("d");return[o.format(t),s.format(t)];case pW.LAST_WEEK:const l=nW().add(-7,"day").startOf("isoWeeks").startOf("d"),u=nW().add(-7,"day").endOf("isoWeeks").endOf("d");return[l.format(t),u.format(t)];case pW.THIS_MONTH:const c=nW().startOf("month").startOf("d"),h=nW().endOf("month").endOf("d");return[c.format(t),h.format(t)];case pW.LAST_MONTH:const d=nW().add(-1,"month").startOf("month").startOf("d"),f=nW().add(-1,"month").endOf("month").endOf("d");return[d.format(t),f.format(t)];case pW.THIS_QUARTER:const p=nW().startOf("quarter").startOf("d"),g=nW().endOf("quarter").endOf("d");return[p.format(t),g.format(t)];case pW.LAST_QUARTER:const m=nW().add(-1,"quarter").startOf("quarter").startOf("d"),v=nW().add(-1,"quarter").endOf("quarter").endOf("d");return[m.format(t),v.format(t)];case pW.THIS_YEAR:const y=nW().startOf("year").startOf("d"),_=nW().endOf("year").endOf("d");return[y.format(t),_.format(t)];case pW.LAST_YEAR:const x=nW().add(-1,"year").startOf("year").startOf("d"),b=nW().add(-1,"year").endOf("year").endOf("d");return[x.format(t),b.format(t)];case pW.NEARLY_A_WEEK:const w=nW().add(1,"day").add(-1,"week"),S=nW();return[w.format(t),S.format(t)];case pW.NEARLY_A_MONTH:const M=nW().add(1,"day").add(-1,"month"),T=nW();return[M.format(t),T.format(t)];case pW.NEARLY_A_YEAR:const I=nW().add(1,"day").add(-1,"year"),A=nW();return[I.format(t),A.format(t)];case pW.CUSTOM:return e.val||[null,null]}},NW={};function PW({shareId:e,criteria:t,getTableColumnValueFunc:n}){return u(this,void 0,void 0,(function*(){const i=Array.from({length:t.length});return yield Promise.all(t.map(((t,a)=>u(this,void 0,void 0,(function*(){const r={key:t.key,type:t.type,expr:t.expr},o=yield(({shareId:e,field:t,getTableColumnValueFunc:n})=>u(void 0,void 0,void 0,(function*(){if("string"==typeof t.filter)return{op:"=",value:[t.filter],options:[]};let i=null;const a=Reflect.has(t.filter.params,"value");switch(t.type){case aW.STRING:switch(t.filter.type){case uW.INPUT:i={op:"**",value:a?[t.filter.params.value]:[t.filter.params.default],options:[]};break;case uW.SELECT:let r=a?t.filter.params.value:t.filter.params.default;t.filter.params.isMultiple||(r=[r]),i={op:"=",value:[],options:r};break;case uW.CONDITION:let o,s,l;switch(a?(o=t.filter.params.value.val,l=t.filter.params.value.searchMode):(o=t.filter.params.default.val,l=t.filter.params.default.searchMode),l){case JG.CONTAIN:s="**";break;case JG.NOT_CONTAIN:s="!**";break;case JG.STARTWITH:s="*=";break;case JG.NOT_STARTWITH:s="!*=";break;case JG.ENDWITH:s="=*";break;case JG.NOT_ENDWITH:s="!=*";break;case JG.EQUAL:s="=";break;case JG.NOT_EQUAL:s="<>";break;case JG.NULL_STR:s="empty";break;case JG.NOT_NULL_STR:s="ne";break;case JG.NULL:s="null";break;case JG.NOT_NULL:s="nn"}i={op:s,value:[o],options:[]};break;case uW.TAG:let u,c="=";if(a)t.filter.params.isMultiple?(c=t.filter.params.value.exclude?"!=":"=",u=t.filter.params.value.val):u=[t.filter.params.value];else if(t.filter.params.isMultiple)switch(t.filter.params.default.type){case sW.ALL:u=[];break;case sW.BEFORE:let i=[];i=NW[t.key]?NW[t.key]:yield n({share_id:e,field:t.key,pp:Math.max(...cW[uW.TAG].showTagCount),pg:1}),u=i.slice(0,t.filter.params.default.index);break;case sW.CUSTOM:u=t.filter.params.default.val}else switch(t.filter.params.default.type){case rW.NONE:u=[];break;case rW.FIRST_TAG:let e=[];e=NW[t.key]?NW[t.key]:yield n({field:t.key,pp:Math.max(...cW[uW.TAG].showTagCount),pg:1}),u=e.length>0?[e[0]]:[]}i={op:c,value:[],options:u};break;case uW.TREE:r=t.filter.params.isMultiple?(a?t.filter.params.value:t.filter.params.default).map((e=>e.split(">",1)[0])):[(t.filter.params.value||t.filter.params.default).split(">",1)[0]],i={op:"=",value:[],options:r},t.filter.params.treeCheckStrictly&&(i.level="mutil")}break;case aW.TIME:switch(t.filter.type){case mW.DATE:let e;e=a?t.filter.params.value:LW({value:t.filter.params.default,dateFormat:"YYYY-MM-DD"}),i={op:"between",value:e?[e+" 00:00:00",e+" 23:59:59"]:[],options:[]};break;case mW.DATE_RANGE:let n;n=a?t.filter.params.value:EW({value:t.filter.params.default,dateFormat:"YYYY-MM-DD"}),i={op:"between",value:[n[0]&&n[0]+" 00:00:00",n[1]&&n[1]+" 23:59:59"],options:[]};break;case mW.DATETIME:let r;r=a?t.filter.params.value:LW({value:t.filter.params.default,dateFormat:"YYYY-MM-DD HH:mm:ss"}),i={op:"=",value:[r],options:[]};break;case mW.DATETIME_RANGE:let o;o=a?t.filter.params.value:EW({value:t.filter.params.default,dateFormat:"YYYY-MM-DD HH:mm:ss"}),i={op:"between",value:o,options:[]};break;case mW.TIME:let s;s=a?t.filter.params.value:LW({value:t.filter.params.default,dateFormat:"HH:mm:ss"}),i={op:"=",dformat:"only_time",value:[s],options:[]};break;case mW.TIME_RANGE:let l;l=a?t.filter.params.value:EW({value:t.filter.params.default,dateFormat:"HH:mm:ss"}),i={op:"between",dformat:"only_time",value:l,options:[]};break;case mW.YEAR:let u;u=a?t.filter.params.value:LW({value:t.filter.params.default,dateFormat:"YYYY"}),i={op:"@only_year",value:[],options:[u]};break;case mW.MONTH:let c;c=a?t.filter.params.value:LW({value:t.filter.params.default,dateFormat:"MM"}),i={op:"@only_month",value:[],options:[c]};break;case mW.DAY:let h;h=a?t.filter.params.value:LW({value:t.filter.params.default,dateFormat:"DD"}),i={op:"@only_day",value:[],options:[h]}}break;case aW.INT:case aW.FLOAT:case aW.DOUBLE:switch(t.filter.type){case hW.CONDITION:let e,n,r;switch(a?(e=t.filter.params.value.val,r=t.filter.params.value.searchMode):(e=t.filter.params.default.val,r=t.filter.params.default.searchMode),r){case eW.EQUAL:n="=";break;case eW.NOT_EQUAL:n="!=";break;case eW.GREAT_EQUAL:n=">=";break;case eW.GREAT_THAN:n=">";break;case eW.LESS_EQUAL:n="<=";break;case eW.LESS_THAN:n="<";break;case eW.NULL:n="null";break;case eW.NOT_NULL:n="nn"}i={op:n,value:[e],options:[]};break;case hW.RANGE:i={op:"between",value:a?t.filter.params.value:t.filter.params.default,options:[]}}}return i})))({shareId:e,field:t,getTableColumnValueFunc:n});o&&!(({filter:e})=>!["empty","null","nn","ne"].includes(e.op)&&kW({value:e.value})&&kW({value:e.options}))({filter:o})?(r.filter=[o],o.level&&(r.level=o.level)):r.filter=[],i[a]=r}))))),i}))}function RW({value:e}){return e.map((e=>{const t={alias:e.alias,key:e.key,type:e.type,expr:e.expr,orderBy:e.orderBy,compare:e.compare};if(e.type===aW.TIME)if(e.subtype){const n=iW[e.subtype];t.type=n.sqltype,t.dformat=n.sqldformat}else{const n=OW({dformat:e.dformat,tformat:e.tformat});n&&(t.dformat=n)}return t}))}function zW({customFields:e}){let t=[];return Object.values(e.calc).forEach((e=>{t=t.concat(e)})),t}function BW({shareId:e,setConfig:t,getTableColumnValueFunc:n}){return u(this,void 0,void 0,(function*(){const i=yield PW({shareId:e,criteria:t.data.criteria,getTableColumnValueFunc:n}),{group:a,drillDown:r}=(({drillDown:e,group:t})=>{const n={group:[],drillDown:[]};return n.group=t.map((e=>{const t={alias:e.alias,key:e.key,type:e.type,expr:e.expr,orderBy:e.orderBy,filter:[]};if(e.type===aW.TIME)if(e.subtype){const n=iW[e.subtype];t.type=n.sqltype,t.dformat=n.sqldformat}else{const n=OW({dformat:e.dformat,tformat:e.tformat});n&&(t.dformat=n)}return t})),Object.entries(e).forEach((([e,i])=>{if(!i.current)return;const a=t.find((t=>t.id===e));n.group.splice(a,1,{alias:i.current.alias,key:i.current.key,type:i.current.type,filter:[]});const r=[],o=[];i.path.forEach((e=>{r.push({alias:e.alias,key:e.key,type:e.type,filter:[]}),o.push(e.value)})),r.push({alias:i.current.alias,key:i.current.key,type:i.current.type,filter:[]}),n.drillDown.push({items:r,itemValues:o,currentItem:i.path.length+1,isDrill:!0})})),n})({drillDown:t.data.drillDown,group:t.data.group});return{criteria:i,group:a,value:RW({value:t.data.value}),drillDown:r,rule:zW({customFields:t.customFields})}}))}var VW,HW,YW,FW;function GW({timeRangeConfig:e}){let t=[null,null];switch(e.type){case YW.SHORTCUTS:const n=e.params,i=nW();switch(n.value){case VW.ALL:t=[null,null];break;case VW.TODAY:const e=i.format("YYYY-MM-DD");t=[`${e} 00:00:00`,`${e} 23:59:59`];break;case VW.YESTERDAY:const n=i.add(-1,"days").format("YYYY-MM-DD");t=[`${n} 00:00:00`,`${n} 23:59:59`];break;case VW.THIS_WEEK_TO_NOW:t=[nW().startOf("week").format("YYYY-MM-DD 00:00:00"),i.format("YYYY-MM-DD 23:59:59")];break;case VW.LAST_WEEK:t=[nW().add(-1,"week").startOf("week").format("YYYY-MM-DD 00:00:00"),i.format("YYYY-MM-DD 23:59:59")];break;case VW.THIS_MONTH_TO_NOW:t=[nW().startOf("month").format("YYYY-MM-DD 00:00:00"),i.format("YYYY-MM-DD 23:59:59")];break;case VW.LAST_MONTH:const a=nW().add(-1,"month").startOf("month").startOf("d"),r=nW().add(-1,"month").endOf("month").endOf("d");t=[a.format("YYYY-MM-DD 00:00:00"),r.format("YYYY-MM-DD 23:59:59")];break;case VW.THIS_QUARTER_TO_NOW:t=[i.startOf("quarter").format("YYYY-MM-DD 00:00:00"),i.format("YYYY-MM-DD 23:59:59")];break;case VW.LAST_QUARTER:const o=nW().add(-1,"quarter").startOf("quarter"),s=nW().add(-1,"quarter").endOf("quarter");t=[o.format("YYYY-MM-DD 00:00:00"),s.format("YYYY-MM-DD 23:59:59")];break;case VW.THIS_YEAR_TO_NOW:t=[nW().startOf("year").format("YYYY-MM-DD 00:00:00"),i.format("YYYY-MM-DD 23:59:59")];break;case VW.LAST_YEAR:const l=nW().add(-1,"year").startOf("year"),u=nW().add(-1,"year").endOf("year");t=[l.format("YYYY-MM-DD 00:00:00"),u.format("YYYY-MM-DD 23:59:59")]}break;case YW.CUSTOM_TIME:const a=e.params;t=[`${a.startDate} ${a.startTime.value}`,`${a.endDate} ${a.endTime.value}`];break;case YW.DYNAMIC_TIME:const r=e.params,o=nW(),s=nW();switch(r.type){case HW.SOME_DAY:s.add(0-r.value,"days");break;case HW.SOME_WEEK:s.add(0-r.value,"week");break;case HW.SOME_MONTH:s.add(0-r.value,"month");break;case HW.SOME_YEAR:s.add(0-r.value,"year")}t=[s.format("YYYY-MM-DD 00:00:00"),o.format("YYYY-MM-DD 23:59:59")]}return t}!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"}(VW||(VW={})),Object.freeze({[VW.ALL]:Object.freeze({key:VW.ALL,name:"全部"}),[VW.TODAY]:Object.freeze({key:VW.TODAY,name:"当天"}),[VW.YESTERDAY]:Object.freeze({key:VW.YESTERDAY,name:"昨天"}),[VW.THIS_WEEK_TO_NOW]:Object.freeze({key:VW.THIS_WEEK_TO_NOW,name:"本周至今"}),[VW.LAST_WEEK]:Object.freeze({key:VW.LAST_WEEK,name:"上周"}),[VW.THIS_MONTH_TO_NOW]:Object.freeze({key:VW.THIS_MONTH_TO_NOW,name:"本月至今"}),[VW.LAST_MONTH]:Object.freeze({key:VW.LAST_MONTH,name:"上月"}),[VW.THIS_QUARTER_TO_NOW]:Object.freeze({key:VW.THIS_QUARTER_TO_NOW,name:"本季度至今"}),[VW.LAST_QUARTER]:Object.freeze({key:VW.LAST_QUARTER,name:"上季度"}),[VW.THIS_YEAR_TO_NOW]:Object.freeze({key:VW.THIS_YEAR_TO_NOW,name:"本年至今"}),[VW.LAST_YEAR]:Object.freeze({key:VW.LAST_YEAR,name:"去年"})}),function(e){e.SOME_DAY="some_day",e.SOME_WEEK="some_week",e.SOME_MONTH="some_month",e.SOME_YEAR="some_year"}(HW||(HW={})),Object.freeze({[HW.SOME_DAY]:Object.freeze({key:HW.SOME_DAY,name:"前N天"}),[HW.SOME_WEEK]:Object.freeze({key:HW.SOME_WEEK,name:"前N周"}),[HW.SOME_MONTH]:Object.freeze({key:HW.SOME_MONTH,name:"前N月"}),[HW.SOME_YEAR]:Object.freeze({key:HW.SOME_YEAR,name:"前N年"})}),function(e){e.SHORTCUTS="shortcuts",e.CUSTOM_TIME="custom_time",e.DYNAMIC_TIME="dynamic_time"}(YW||(YW={})),Object.freeze({[YW.SHORTCUTS]:Object.freeze({key:YW.SHORTCUTS,name:"快捷选择",getDefault:()=>({value:VW.ALL})}),[YW.CUSTOM_TIME]:Object.freeze({key:YW.CUSTOM_TIME,name:"自定义时间",getDefault:()=>({startDate:null,startTime:{enable:!1,value:"00:00:00"},endDate:null,endTime:{enable:!1,value:"23:59:59"}})}),[YW.DYNAMIC_TIME]:Object.freeze({key:YW.DYNAMIC_TIME,name:"动态时间",getDefault:()=>({type:HW.SOME_DAY,value:null})})}),function(e){e.YEAR="year",e.QUARTER="quarter",e.MONTH="month",e.WEEK="week"}(FW||(FW={})),Object.freeze({[FW.YEAR]:Object.freeze({key:FW.YEAR,name:"年"}),[FW.QUARTER]:Object.freeze({key:FW.QUARTER,name:"季"}),[FW.MONTH]:Object.freeze({key:FW.MONTH,name:"月"}),[FW.WEEK]:Object.freeze({key:FW.WEEK,name:"周"})});function WW({shareId:e,setConfig:t,timeRange:n,getTableColumnValueFunc:i}){return u(this,void 0,void 0,(function*(){const a=yield PW({shareId:e,criteria:t.data.criteria,getTableColumnValueFunc:i}),r=t.data.group[0],o=yield(({groupField:e,timeRange:t})=>({id:e.id,alias:e.alias,key:e.key,compareIndex:1,type:e.type,filter:[{op:"between",value:t||GW({timeRangeConfig:e.timeRange}),options:[]}]}))({groupField:r,timeRange:n}),s=(({timeRange:e,groupField:t,value:n})=>{const i=[];return n.forEach((n=>{const a={id:n.id,alias:n.alias,key:n.key,type:n.type,expr:n.expr};if(i.push(a),t.compare.yoy_ratio.enable){const n=Object.assign({},a,{alias:`${a.alias}%%同比率`});switch(t.compare.yoy_ratio.dimension){case FW.WEEK:n.compare={type:"ratio",value:[nW(e[0]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss"),nW(e[1]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss")]};break;case FW.MONTH:n.compare={type:"ratio",value:[nW(e[0]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss"),nW(e[1]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss")]};break;case FW.QUARTER:n.compare={type:"ratio",value:[nW(e[0]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss"),nW(e[1]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss")]};break;case FW.YEAR:n.compare={type:"ratio",value:[nW(e[0]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss"),nW(e[1]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss")]}}i.push(n)}if(t.compare.yoy_value.enable){const n=Object.assign({},a,{alias:`${a.alias}%%同比值`});switch(t.compare.yoy_value.dimension){case FW.WEEK:n.compare={type:"num",value:[nW(e[0]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss"),nW(e[1]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss")]};break;case FW.MONTH:n.compare={type:"num",value:[nW(e[0]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss"),nW(e[1]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss")]};break;case FW.QUARTER:n.compare={type:"num",value:[nW(e[0]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss"),nW(e[1]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss")]};break;case FW.YEAR:n.compare={type:"num",value:[nW(e[0]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss"),nW(e[1]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss")]}}i.push(n)}if(t.compare.mom_ratio.enable){const t=Object.assign({},a,{alias:`${a.alias}%%环比率`}),n=nW(e[0]),r=nW(e[1]),o=n.diff(r)-1e3;t.compare={type:"ratio",value:[n.add(o,"ms").format("YYYY-MM-DD HH:mm:ss"),r.add(o,"ms").format("YYYY-MM-DD HH:mm:ss")]},i.push(t)}if(t.compare.mom_value.enable){const t=Object.assign({},a,{alias:`${a.alias}%%环比值`}),n=nW(e[0]),r=nW(e[1]),o=n.diff(r)-1e3;t.compare={type:"num",value:[n.add(o,"ms").format("YYYY-MM-DD HH:mm:ss"),r.add(o,"ms").format("YYYY-MM-DD HH:mm:ss")]},i.push(t)}})),i})({timeRange:o.filter[0].value,groupField:r,value:t.data.value});return{criteria:[o,...a],group:[],value:s,drillDown:[],rule:zW({customFields:t.customFields})}}))}function jW({shareId:e=null,setConfig:t,getTableColumnValueFunc:n}){return u(this,void 0,void 0,(function*(){let i={};const{data:a}=t;switch(t.render){case KG.TABLE:case KG.PIE:case KG.HISTOGRAM_LINE:case KG.HISTOGRAM_BAR:case KG.BAR:case KG.HISTOGRAM_MIX:i=yield BW({shareId:e,setConfig:t,getTableColumnValueFunc:n});break;case KG.GAUGE:break;case KG.INDICATOR_CARD:i=yield WW({shareId:e,setConfig:t,getTableColumnValueFunc:n});break;case KG.MAP:break;case KG.DETAIL:i=yield function({shareId:e,setConfig:t,getTableColumnValueFunc:n}){return u(this,void 0,void 0,(function*(){return{criteria:yield PW({shareId:e,criteria:t.data.criteria,getTableColumnValueFunc:n}),group:[],value:RW({value:t.data.value}),drillDown:[],rule:zW({customFields:t.customFields})}}))}({shareId:e,setConfig:t,getTableColumnValueFunc:n});break;default:throw new Error(`未知的图标渲染类型: ${a.render}`)}return i}))}var UW,ZW,XW,qW,KW,$W;!function(e){e.NORMAL="normal",e.CENTRAL_CONTROL="center-control",e.DOOR_PLATE="door-plate"}(UW||(UW={})),Object.freeze({[UW.NORMAL]:Object.freeze({key:UW.NORMAL,name:"普通模式"}),[UW.CENTRAL_CONTROL]:Object.freeze({key:UW.CENTRAL_CONTROL,name:"中控大屏"}),[UW.DOOR_PLATE]:Object.freeze({key:UW.DOOR_PLATE,name:"电子门牌"})}),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"}(ZW||(ZW={})),function(e){e.SIZE400="400",e.SIZE600="600"}(XW||(XW={})),Object.freeze({[XW.SIZE400]:Object.freeze({key:XW.SIZE400,name:"正常"}),[XW.SIZE600]:Object.freeze({key:XW.SIZE600,name:"加粗"})}),function(e){e.NORMAL="normal",e.ITALIC="italic"}(qW||(qW={})),Object.freeze({[qW.NORMAL]:Object.freeze({key:qW.NORMAL,name:"正常"}),[qW.ITALIC]:Object.freeze({key:qW.ITALIC,name:"斜体"})}),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(KW||(KW={})),Object.freeze({[KW.LEFT]:Object.freeze({key:KW.LEFT,iconfont:"icon-text_left",name:"左对齐"}),[KW.CENTER]:Object.freeze({key:KW.CENTER,iconfont:"icon-text_center",name:"居中对齐"}),[KW.RIGHT]:Object.freeze({key:KW.RIGHT,iconfont:"icon-text_right",name:"右对齐"})}),function(e){e.TOP="top",e.MIDDLE="middle",e.BOTTOM="bottom"}($W||($W={})),Object.freeze({[$W.TOP]:Object.freeze({key:$W.TOP,iconfont:"icon-top",name:"头部对齐"}),[$W.MIDDLE]:Object.freeze({key:$W.MIDDLE,iconfont:"icon-center",name:"居中对齐"}),[$W.BOTTOM]:Object.freeze({key:$W.BOTTOM,iconfont:"icon-bottom",name:"底部对齐"})});const QW=Object.freeze(["#4499fa","#59d4d9","#4cd964","#ff9500","#ff3b30","#c894f6","#8c6fde","#767aee","#52c41a","#ff2d55","#ffcc00","#5ac8fa","#f478b8","#fae34c","#59d9a4"]),JW="#2b9f7f";var ej;!function(e){e.PURE="pure",e.LINEAR="linear",e.RADIAL="radial"}(ej||(ej={}));const tj=Object.freeze({[ej.PURE]:Object.freeze({key:ej.PURE,name:"纯色",getDefault:(e=JW)=>({type:ej.PURE,color:e})}),[ej.LINEAR]:Object.freeze({key:ej.LINEAR,name:"线性渐变",getDefault:(e=JW)=>({type:ej.LINEAR,startColor:e,endColor:e})}),[ej.RADIAL]:Object.freeze({key:ej.RADIAL,name:"径向渐变",getDefault:(e=JW)=>({type:ej.RADIAL,startColor:e,endColor:e,radius:5})})});var nj;!function(e){e.CONTINUOUS="continuous",e.PIECEWISE="piecewise"}(nj||(nj={}));const ij=Object.freeze({[nj.CONTINUOUS]:Object.freeze({key:nj.CONTINUOUS,name:"连续渐变",getDefault:(e=JW)=>({type:nj.CONTINUOUS,startColor:e,endColor:e})}),[nj.PIECEWISE]:Object.freeze({key:nj.PIECEWISE,name:"区间渐变",getDefault:(e=JW)=>({type:nj.PIECEWISE,startColor:e,endColor:e,splitNumber:5})})});var aj,rj,oj,sj,lj,uj,cj;!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"}(aj||(aj={})),Object.freeze({[aj.TOP]:Object.freeze({key:aj.TOP,name:"上方"}),[aj.BOTTOM]:Object.freeze({key:aj.BOTTOM,name:"下方"}),[aj.LEFT]:Object.freeze({key:aj.LEFT,name:"左边"}),[aj.RIGHT]:Object.freeze({key:aj.RIGHT,name:"右边"}),[aj.INSIDE_CENTER]:Object.freeze({key:aj.INSIDE_CENTER,name:"内部居中"}),[aj.INSIDE_LEFT]:Object.freeze({key:aj.INSIDE_LEFT,name:"内部左边"}),[aj.INSIDE_RIGHT]:Object.freeze({key:aj.INSIDE_RIGHT,name:"内部右边"}),[aj.INSIDE_TOP]:Object.freeze({key:aj.INSIDE_TOP,name:"内部上方"}),[aj.INSIDE_BOTTOM]:Object.freeze({key:aj.INSIDE_BOTTOM,name:"内部下方"})}),function(e){e.GROUP="group",e.SERIES="series",e.VALUE="value",e.PERCENT="percent"}(rj||(rj={})),Object.freeze({[rj.GROUP]:Object.freeze({key:rj.GROUP,name:"维度项"}),[rj.SERIES]:Object.freeze({key:rj.SERIES,name:"数值标题"}),[rj.VALUE]:Object.freeze({key:rj.VALUE,name:"值"}),[rj.PERCENT]:Object.freeze({key:rj.PERCENT,name:"百分比"})}),function(e){e.PERCENT="percent",e.INDEX="index"}(oj||(oj={})),Object.freeze({[oj.PERCENT]:Object.freeze({key:oj.PERCENT,name:"%"}),[oj.INDEX]:Object.freeze({key:oj.INDEX,name:"项"})}),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"}(sj||(sj={})),Object.freeze({[sj.BT]:Object.freeze({key:sj.BT,name:"介于",getDefault:()=>({op:sj.BT,value:[null,null]})}),[sj.E]:Object.freeze({key:sj.E,name:"等于",getDefault:()=>({op:sj.E,value:null})}),[sj.NE]:Object.freeze({key:sj.NE,name:"不等于",getDefault:()=>({op:sj.NE,value:null})}),[sj.GT]:Object.freeze({key:sj.GT,name:"大于",getDefault:()=>({op:sj.GT,value:null})}),[sj.GE]:Object.freeze({key:sj.GE,name:"大于等于",getDefault:()=>({op:sj.GE,value:null})}),[sj.LT]:Object.freeze({key:sj.LT,name:"小于",getDefault:()=>({op:sj.LT,value:null})}),[sj.LE]:Object.freeze({key:sj.LE,name:"小于等于",getDefault:()=>({op:sj.LE,value:null})}),[sj.BEFORE]:Object.freeze({key:sj.BEFORE,name:"前",getDefault:()=>({op:sj.BEFORE,value:null,unit:oj.INDEX})}),[sj.AFTER]:Object.freeze({key:sj.AFTER,name:"后",getDefault:()=>({op:sj.AFTER,value:null,unit:oj.INDEX})}),[sj.INDEX]:Object.freeze({key:sj.INDEX,name:"第",getDefault:()=>({op:sj.INDEX,value:null})})}),function(e){e.SHOW="show",e.HIDDEN="hidden",e.DEFAULT="default"}(lj||(lj={})),Object.freeze({[lj.SHOW]:Object.freeze({key:lj.SHOW,name:"显示"}),[lj.HIDDEN]:Object.freeze({key:lj.HIDDEN,name:"隐藏"}),[lj.DEFAULT]:Object.freeze({key:lj.DEFAULT,name:"默认"})}),function(e){e.BAR="bar",e.LINE="line"}(uj||(uj={})),Object.freeze({[uj.BAR]:Object.freeze({key:uj.BAR,name:"柱"}),[uj.LINE]:Object.freeze({key:uj.LINE,name:"线"})}),function(e){e.ITEM_STYLE="itemStyle",e.VISUAL_MAP="visualMap"}(cj||(cj={}));const hj=Object.freeze({[cj.ITEM_STYLE]:Object.freeze({key:cj.ITEM_STYLE,name:"颜色填充",getDefaultConfig:()=>({type:cj.ITEM_STYLE,params:tj[ej.PURE].getDefault()})}),[cj.VISUAL_MAP]:Object.freeze({key:cj.VISUAL_MAP,name:"视觉映射",getDefaultConfig:()=>({type:cj.VISUAL_MAP,params:ij[nj.CONTINUOUS].getDefault()})})});function dj({seriesType:e,axisPosition:t,dataLabelPosition:n}){return{type:e,axisPosition:t,width:null,radius:0,colorFill:hj[cj.ITEM_STYLE].getDefaultConfig(),label:{show:!1,params:{position:n,fontSize:ZW.SIZE12,color:{enable:!1,value:JW},fontWeight:XW.SIZE400,showTooltip:Object.values(rj)}},conditionalFormatting:[]}}var fj,pj,gj,mj,vj;function yj({position:e}){return{name:"",position:e,unit:"",min:null,max:null,nameLocation:mj.START,nameGap:15,nameRotate:0,inverse:!1,nameTextStyle:{fontSize:ZW.SIZE12,color:"#333333",fontWeight:XW.SIZE400,fontStyle:qW.NORMAL,padding:[0,0,0,0]},axisLabel:{show:!1,params:{fontSize:ZW.SIZE14,color:"#333333",fontWeight:XW.SIZE400,fontStyle:qW.NORMAL,rotate:fj.NONE}},axisLine:{show:!1,params:{width:1,color:"#333333",type:pj.SOLID}},axisTick:{show:!1,params:{length:5,width:1,color:"#333333",type:pj.SOLID}},splitLine:{show:!1,params:{width:1,color:"#333333",type:pj.SOLID}}}}function _j(){return{show:!1,width:20,right:10,filterColor:JW,borderColor:JW}}function xj(){return{position:vj.NONE}}function bj({styleConfig:e,setConfig:t,dataLabelPosition:n,getSeriesTypeFunc:i,getAxisPositionFunc:a}){e.enable&&(function({stack:e,setConfig:t}){if(e.enable){const n=t.data.value.map((e=>e.id));e.params.forEach((e=>{e.fields=e.fields.filter((e=>n.includes(e)))})),e.params=e.params.filter((e=>e.fields.length>0))}}({stack:e.params.stack,setConfig:t}),function({seriesCustomConfig:e,setConfig:t,dataLabelPosition:n,getSeriesTypeFunc:i,getAxisPositionFunc:a}){Object.keys(e).forEach((n=>{t.data.value.find((e=>e.id===n))||delete e[n]})),t.data.value.forEach(((t,r)=>{e[t.id]||(e[t.id]=dj({seriesType:i({index:r}),axisPosition:a({index:r}),dataLabelPosition:n}))}))}({seriesCustomConfig:e.params.seriesCustom,setConfig:t,dataLabelPosition:n,getSeriesTypeFunc:i,getAxisPositionFunc:a}))}!function(e){e.NONE="0",e.Rotate30="30",e.Rotate45="45",e.Rotate60="60",e.Rotate90="90"}(fj||(fj={})),Object.freeze({[fj.NONE]:Object.freeze({key:fj.NONE,name:"默认"}),[fj.Rotate30]:Object.freeze({key:fj.Rotate30,name:"30"}),[fj.Rotate45]:Object.freeze({key:fj.Rotate45,name:"45"}),[fj.Rotate60]:Object.freeze({key:fj.Rotate60,name:"60"}),[fj.Rotate90]:Object.freeze({key:fj.Rotate90,name:"90"})}),function(e){e.SOLID="solid",e.DASHED="dashed",e.DOTTED="dotted"}(pj||(pj={})),Object.freeze({[pj.SOLID]:Object.freeze({key:pj.SOLID,name:"————"}),[pj.DASHED]:Object.freeze({key:pj.DASHED,name:"----"}),[pj.DOTTED]:Object.freeze({key:pj.DOTTED,name:"...."})}),function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"}(gj||(gj={})),Object.freeze({[gj.LEFT]:Object.freeze({key:gj.LEFT,name:"左"}),[gj.RIGHT]:Object.freeze({key:gj.RIGHT,name:"右"}),[gj.TOP]:Object.freeze({key:gj.TOP,name:"上"}),[gj.BOTTOM]:Object.freeze({key:gj.BOTTOM,name:"下"})}),function(e){e.START="start",e.CENTER="center",e.END="end"}(mj||(mj={})),Object.freeze({[mj.START]:Object.freeze({key:mj.START,name:"起始"}),[mj.CENTER]:Object.freeze({key:mj.CENTER,name:"中间"}),[mj.END]:Object.freeze({key:mj.END,name:"结尾"})}),function(e){e.NONE="none",e.LEFT="left",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom"}(vj||(vj={})),Object.freeze({[vj.NONE]:Object.freeze({key:vj.NONE,name:"无",iconfont:"icon-align_center"}),[vj.TOP]:Object.freeze({key:vj.TOP,name:"上",iconfont:"icon-align_top"}),[vj.BOTTOM]:Object.freeze({key:vj.BOTTOM,name:"下",iconfont:"icon-align_bottom"}),[vj.LEFT]:Object.freeze({key:vj.LEFT,name:"左",iconfont:"icon-align_left"}),[vj.RIGHT]:Object.freeze({key:vj.RIGHT,name:"右",iconfont:"icon-align_right"})});var wj,Sj=Object.freeze({__proto__:null,reactStyleConfig:function({styleConfig:e,setConfig:t}){bj({styleConfig:e,setConfig:t,dataLabelPosition:aj.RIGHT,getSeriesTypeFunc:()=>uj.BAR,getAxisPositionFunc:()=>gj.TOP})},getDefaultConfigParams:function({setConfig:e}){return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:xj(),dataZoom:_j(),stack:{enable:!1,params:[]},axisY:yj({position:gj.LEFT}),topAxis:yj({position:gj.TOP}),bottomAxis:yj({position:gj.BOTTOM}),seriesCustom:(()=>{const t={};return e.data.value.forEach((e=>{t[e.id]=dj({dataLabelPosition:aj.RIGHT,seriesType:uj.BAR,axisPosition:gj.TOP})})),t})()}}}),Mj=(()=>{const e={};return e[UW.NORMAL]=Sj,e})();!function(e){e.SIZE10="10",e.SIZE20="20",e.SIZE30="30",e.SIZE50="50"}(wj||(wj={}));function Tj({styleConfig:e,setConfig:t}){e.enable&&((({cell:e,setConfig:t})=>{const n=t.data.group.length+t.data.value.length;e.fixed.left>n&&(e.fixed.left=n),e.fixed.right>n&&(e.fixed.right=null)})({cell:e.params.cell,setConfig:t}),(({summary:e,setConfig:t})=>{if(e.show){const n={};t.data.value.forEach((t=>{n[t.id]=e.expr[t.id]||IW.NONE})),e.expr=n}})({summary:e.params.summary,setConfig:t}),(({stack:e,setConfig:t})=>{if(e.enable){const n=t.data.value.map((e=>e.id));e.params.forEach((e=>{e.fields=e.fields.filter((e=>n.includes(e)))})),e.params=e.params.filter((e=>e.fields.length>0))}})({stack:e.params.stack,setConfig:t}))}function Ij({hasMerged:e=!1}){const t={fixed:{left:null,right:null}};return e&&(t.merge=!1),t}function Aj(){return{pageSize:wj.SIZE20,showPageSize:!1,showTotal:!1,showTotalPage:!1}}function Dj(){return{bgColor:"#fafafa",fontSize:ZW.SIZE12,fontWeight:XW.SIZE400,color:"#606266",textAlign:KW.LEFT}}function Cj(){return{fontSize:ZW.SIZE12,fontWeight:XW.SIZE400,color:"#606266",textAlign:KW.LEFT,verticalAlign:$W.MIDDLE,oddColor:"#ffffff",evenColor:"#fafbfc"}}var Oj=Object.freeze({__proto__:null,getDefaultConfigParams:function(){return{dataRange:{start:null,end:null},cell:Ij({}),stack:{enable:!1,params:[]},summary:{show:!1,name:"",expr:{}},pagination:Aj(),showIndex:!0,header:Dj(),body:Cj(),border:{hasVerticalBorder:!1,hasHorizontalBorder:!0,borderColor:"#ebeef5"}}},reactStyleConfig:Tj}),kj=(()=>{const e={};return e[UW.NORMAL]=Oj,e})();var Lj=Object.freeze({__proto__:null,reactStyleConfig:function({styleConfig:e,setConfig:t}){bj({styleConfig:e,setConfig:t,dataLabelPosition:aj.TOP,getSeriesTypeFunc:()=>uj.BAR,getAxisPositionFunc:()=>gj.LEFT})},getDefaultConfigParams:function({setConfig:e}){return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:xj(),dataZoom:_j(),stack:{enable:!1,params:[]},axisX:yj({position:gj.BOTTOM}),leftAxis:yj({position:gj.LEFT}),rightAxis:yj({position:gj.RIGHT}),seriesCustom:(()=>{const t={};return e.data.value.forEach((e=>{t[e.id]=dj({dataLabelPosition:aj.TOP,seriesType:uj.BAR,axisPosition:gj.LEFT})})),t})()}}}),Ej=(()=>{const e={};return e[UW.NORMAL]=Lj,e})();var Nj=Object.freeze({__proto__:null,reactStyleConfig:function({styleConfig:e,setConfig:t}){bj({styleConfig:e,setConfig:t,dataLabelPosition:aj.TOP,getSeriesTypeFunc:()=>uj.BAR,getAxisPositionFunc:()=>gj.LEFT})},getDefaultConfigParams:function({setConfig:e}){return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:xj(),dataZoom:_j(),stack:{enable:!1,params:[]},axisX:yj({position:gj.BOTTOM}),leftAxis:yj({position:gj.LEFT}),rightAxis:yj({position:gj.RIGHT}),seriesCustom:(()=>{const t={};return e.data.value.forEach((e=>{t[e.id]=dj({dataLabelPosition:aj.TOP,seriesType:uj.LINE,axisPosition:gj.LEFT})})),t})()}}}),Pj=(()=>{const e={};return e[UW.NORMAL]=Nj,e})();var Rj,zj=Object.freeze({__proto__:null,reactStyleConfig:function({styleConfig:e,setConfig:t}){bj({styleConfig:e,setConfig:t,dataLabelPosition:aj.TOP,getSeriesTypeFunc:()=>uj.BAR,getAxisPositionFunc:()=>gj.LEFT})},getDefaultConfigParams:function({setConfig:e}){return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:xj(),dataZoom:_j(),stack:{enable:!1,params:[]},axisX:yj({position:gj.BOTTOM}),leftAxis:yj({position:gj.LEFT}),rightAxis:yj({position:gj.RIGHT}),seriesCustom:(()=>{const t={};return e.data.value.forEach(((e,n)=>{t[e.id]=dj({dataLabelPosition:aj.TOP,seriesType:n%2==0?uj.BAR:uj.LINE,axisPosition:gj.LEFT})})),t})()}}}),Bj=(()=>{const e={};return e[UW.NORMAL]=zj,e})();!function(e){e.ZERO="0",e.ONE="1",e.TWO="2",e.THREE="3",e.FOUR="4",e.FIVE="5",e.SIX="6"}(Rj||(Rj={}));var Vj,Hj=Object.freeze({__proto__:null,reactStyleConfig:function({styleConfig:e,setConfig:t}){},get PrecisionType(){return Rj},getDefaultConfigParams:function(){return{background:"#ffffff",title:{fontSize:ZW.SIZE12,color:"#333333"},value:{fontSize:ZW.SIZE12,color:"#333333"},compareValue:{positive:{precision:Rj.TWO,fontSize:ZW.SIZE12,color:"#333333"},negative:{precision:Rj.TWO,fontSize:ZW.SIZE12,color:"#333333"}}}}}),Yj=(()=>{const e={};return e[UW.NORMAL]=Hj,e})();!function(e){e.PERCENT="%",e.PX="px"}(Vj||(Vj={}));const Fj=Object.freeze({[Vj.PERCENT]:Object.freeze({key:Vj.PERCENT,name:"%"}),[Vj.PX]:Object.freeze({key:Vj.PX,name:"px"})});var Gj;!function(e){e.AREA="area",e.RADIUS="radius"}(Gj||(Gj={}));const Wj=Object.freeze({[Gj.AREA]:Object.freeze({key:Gj.AREA,name:"面积模式"}),[Gj.RADIUS]:Object.freeze({key:Gj.RADIUS,name:"半径模式"})});var jj;!function(e){e.INSIDE="inside",e.OUTSIDE="outside"}(jj||(jj={}));const Uj=Object.freeze({[jj.INSIDE]:Object.freeze({key:jj.INSIDE,name:"圈内"}),[jj.OUTSIDE]:Object.freeze({key:jj.OUTSIDE,name:"圈外"})});var Zj=Object.freeze({__proto__:null,reactStyleConfig:function({shareId:e,styleConfig:t,setConfig:n,getTableColumnValueFunc:i,getDataFunc:a}){return u(this,void 0,void 0,(function*(){if(t.enable){let r=[];if(i&&a){const o={config:yield jW({shareId:e,setConfig:n,getTableColumnValueFunc:i}),data_start:null!==t.params.dataRange.start?t.params.dataRange.start-1:0};null!==t.params.dataRange.end&&(o.data_count=t.params.dataRange.end-o.data_start);const[{data:s}]=yield a(o);s.length<100&&(r=s)}const o={},s=n.data.group[0];r.forEach(((e,n)=>{const i=e.group[s.alias];o[i]=t.params.customGroupValues[i]||tj[ej.PURE].getDefault(QW[n%QW.length])})),t.params.customGroupValues=o}}))},get ChartCenterUnitType(){return Vj},ChartCenterUnitTypeMesage:Fj,get RoseType(){return Gj},RoseTypeMesage:Wj,get LabelPosition(){return jj},LabelPositionMesage:Uj,getDefaultConfigParams:function({shareId:e,setConfig:t,getTableColumnValueFunc:n,getDataFunc:i}){return u(this,void 0,void 0,(function*(){let a=[];if(n&&i){const r={config:yield jW({shareId:e,setConfig:t,getTableColumnValueFunc:n})};if(t.style[KG.PIE][UW.NORMAL].enable){const e=t.style[KG.PIE][UW.NORMAL].params,n=e.dataRange.start||1;r.data_start=n,null!==e.dataRange.end&&(r.data_count=e.dataRange.end-r.data_start)}const[{data:o}]=yield i(r);a=o}return{dataRange:{start:null,end:null},legend:xj(),chart:{center:{x:{value:50,unit:Vj.PERCENT},y:{value:50,unit:Vj.PERCENT}},radius:{inner:0,outer:80},startAngle:90,clockwise:!0,minShowLabelAngle:null},customGroupValues:(()=>{const e={},n=t.data.group[0];return a.forEach(((t,i)=>{const a=t.group[n.alias];e[a]=tj[ej.PURE].getDefault(QW[i%QW.length])})),e})(),roseType:{enable:!1,type:Gj.AREA},label:{show:!1,params:{position:jj.INSIDE,fontSize:ZW.SIZE12,fontWeight:XW.SIZE400,color:{enable:!1,value:"#ffffff"},showTooltip:Object.values(rj)}},labelLine:{show:!1,params:{color:{enable:!1,value:"#ffffff"},length:4,length2:8}}}}))}}),Xj=(()=>{const e={};return e[UW.NORMAL]=Zj,e})();var qj=Object.freeze({__proto__:null,getDefaultConfigParams:function(){return{dataRange:{start:null,end:null},cell:Ij({hasMerged:!0}),stack:{enable:!1,params:[]},summary:{show:!1,name:"",expr:{}},pagination:Aj(),showIndex:!0,header:Dj(),body:Cj(),border:{hasVerticalBorder:!1,hasHorizontalBorder:!0,borderColor:"#ebeef5"}}},reactStyleConfig:Tj}),Kj=(()=>{const e={};return e[UW.NORMAL]=qj,e})(),$j=(()=>{const e={};return e[KG.BAR]=Mj,e[KG.DETAIL]=kj,e[KG.HISTOGRAM_BAR]=Ej,e[KG.HISTOGRAM_LINE]=Pj,e[KG.HISTOGRAM_MIX]=Bj,e[KG.INDICATOR_CARD]=Yj,e[KG.PIE]=Xj,e[KG.TABLE]=Kj,e})();let Qj=class extends s.Component{constructor(e){super(e),this.chartRef=s.createRef(),this.padding="10vh 4vh 4vh",this.total={},this.renderChart=()=>u(this,void 0,void 0,(function*(){const{base_url:e,set_id:t,deviceToken:n}=this.props.gpui.params;if(e&&t&&n){this.timer&&(clearTimeout(this.timer),this.timer=null);try{const{data:i}=yield QG.get(`${e}/set/${t}`,{headers:{"X-Gini-Token":n}}),a=JSON.parse(i.config),r=this.props.gpui.params["@theme"];let o;o=a.style.table[r].enable?a.style[a.render][r].params:yield function({api:e,chartType:t,themeMode:n,setConfig:i}){return u(this,void 0,void 0,(function*(){if($j[t]&&$j[t][n])return yield $j[t][n].getDefaultConfigParams({setConfig:i,api:e});throw new Error(`style.ts(getDefaultConfigParams): 请检查图表类型和主题风格: ${t}, ${n}`)}))}({chartType:a.render,themeMode:r,setConfig:a,api:null});const s=yield jW({shareId:i.shareId,setConfig:a,getTableColumnValueFunc:()=>{}}),{data:l}=yield QG.post(`${e}/sql`,{config:s,set_id:t,data_start:o.dataRange.start,data_count:o.dataRange.end},{headers:{"X-Gini-Token":n}});this.total=this.generateTotal(l[0].data),this.chart.setOption(this.generateChartOption(l[0].data),{notMerge:!0})}catch(e){console.error("@components:wall-iharbour/analysis-of-startup-use: 组件渲染时发生错误",e)}this.props.gpui.params.interval>0&&(this.timer=setTimeout(this.renderChart,this.props.gpui.params.interval))}})),this.generateTotal=e=>{let t=e.reduce(((e,t)=>e+parseFloat(t.data["使用时长"])),0);if(t/=3600,t>Math.pow(10,8)){return{value:(t/Math.pow(10,8)).toFixed(2),unit:"亿"}}if(t>Math.pow(10,4)){return{value:(t/Math.pow(10,4)).toFixed(2),unit:"万"}}if(t>Math.pow(10,3)){return{value:(t/Math.pow(10,3)).toFixed(2),unit:"千"}}return{value:t,unit:""}},this.generateChartOption=e=>({tooltip:{show:!0,formatter:({seriesName:e,data:t})=>`${e}<br/>${t.name}: ${t.value}`},color:["#4499fa","#59d4d9","#4cd964","#ff9500","#ff3b30","#c894f6","#8c6fde","#767aee","#52c41a","#ff2d55","#ffcc00","#5ac8fa","#f478b8","#fae34c","#59d9a4"],series:[{name:"服务机时",type:"pie",radius:["38%","48%"],center:["50%","50%"],startAngle:0,minAngle:5,data:e.map((e=>({name:e.group["使用类型"]||"其他",value:Math.round(100*e.data["使用时长"]/3600)/100}))),label:{normal:{alignTo:"labelLine",formatter:({data:e,percent:t})=>`${e.name} ${t.toFixed(1)}%`,color:"#cde0ff"}}}]}),n.reaction((()=>e.gpui.params.padding),(e=>{this.padding=e||"10vh 4vh 4vh"}),{fireImmediately:!0})}componentDidMount(){this.chart=this.chart||$G.init(this.chartRef.current),window.addEventListener("resize",(()=>{this.chart.resize()})),n.reaction((()=>({baseURL:this.props.gpui.params.base_url,setId:this.props.gpui.params.set_id,deviceToken:this.props.gpui.params.deviceToken,interval:this.props.gpui.params.interval})),(()=>{this.renderChart()}),{fireImmediately:!0})}render(){return s.createElement("div",{className:"g__index",style:{padding:this.padding}},s.createElement("div",{className:c},s.createElement("div",{ref:this.chartRef,className:h}),s.createElement("div",{className:d},s.createElement("span",{className:f},"总机时"),s.createElement("span",{className:p,"data-text":this.total},this.total.value,s.createElement("span",null,this.total.unit)))))}};return l([n.observable],Qj.prototype,"padding",void 0),l([n.observable],Qj.prototype,"total",void 0),Qj=l([function(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($&&e.$$typeof===$){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(D,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)?U(e):I(e)}],Qj),Qj}));
