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 r(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 a=i(e),o=i(t),s=r(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 r,a=arguments.length,o=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(o=(a<3?r(o):a>3?r(t,n,o):r(t,n))||o);return a>3&&o&&Object.defineProperty(t,n,o),o}function u(e,t,n,i){return new(n||(n=Promise))((function(r,a){function o(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((i=i.apply(e,t||[])).next())}))}a.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__yH-Un",h="index-module_chart__2lZaX";if(a.default(".index-module_main__yH-Un {\n  position: relative;\n  width: 100%;\n  height: 100%; }\n  .index-module_main__yH-Un .index-module_chart__2lZaX {\n    width: 100%;\n    height: 100%; }\n"),!t.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!n.spy)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");function d(){return d=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},d.apply(this,arguments)}function f(){var e=t.useState(0)[1];return t.useCallback((function(){e((function(e){return e+1}))}),[])}function p(e){return n.getDependencyTree(e)}var g,m=1e4,v=new Set;function y(){void 0===g&&(g=setTimeout(_,1e4))}function _(){g=void 0;var e=Date.now();v.forEach((function(t){var n=t.current;n&&e>=n.cleanAt&&(n.reaction.dispose(),t.current=null,v.delete(t))})),v.size>0&&y()}var x={};function b(e){return"observer"+e}function w(e,t,i){void 0===t&&(t="observed"),void 0===i&&(i=x);var r,a=(i.useForceUpdate||f)(),s=o.default.useRef(null);if(!s.current){var l=new n.Reaction(b(t),(function(){u.mounted?a():(l.dispose(),s.current=null)})),u=function(e){return{cleanAt:Date.now()+m,reaction:e}}(l);s.current=u,r=s,v.add(r),y()}var c,h,d=s.current.reaction;if(o.default.useDebugValue(d,p),o.default.useEffect((function(){var e;return e=s,v.delete(e),s.current?s.current.mounted=!0:(s.current={reaction:new n.Reaction(b(t),(function(){a()})),cleanAt:1/0},a()),function(){s.current.reaction.dispose(),s.current=null}}),[]),d.track((function(){try{c=e()}catch(e){h=e}})),h)throw h;return c}function T(e,n){var i,r=d({forwardRef:!1},n),a=e.displayName||e.name,o=function(t,n){return w((function(){return e(t,n)}),a)};return o.displayName=a,i=r.forwardRef?t.memo(t.forwardRef(o)):t.memo(o),function(e,t){Object.keys(e).forEach((function(n){S[n]||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}(e,i),i.displayName=a,i}var S={$$typeof:!0,render:!0,compare:!0,type:!0};function O(e){var t=e.children,n=e.render,i=t||n;return"function"!=typeof i?null:w(i)}function M(e,t,n,i,r){var a="children"===t?"render":"children",o="function"==typeof e[t],s="function"==typeof e[a];return o&&s?new Error("MobX Observer: Do not use children and render in the same time in`"+n):o||s?null:new Error("Invalid prop `"+r+"` of type `"+typeof e[t]+"` supplied to `"+n+"`, expected `function`.")}O.propTypes={children:M,render:M},O.displayName="Observer";var D=0;var A={};function k(e){return A[e]||(A[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var t="__$mobx-react "+e+" ("+D+")";return D++,t}(e)),A[e]}function I(e,t){if(C(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var r=0;r<n.length;r++)if(!Object.hasOwnProperty.call(t,n[r])||!C(e[n[r]],t[n[r]]))return!1;return!0}function C(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function E(e,t,n){Object.hasOwnProperty.call(e,t)?e[t]=n:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})}var N=k("patchMixins"),R=k("patchedDefinition");function L(e,t){for(var n=this,i=arguments.length,r=new Array(i>2?i-2:0),a=2;a<i;a++)r[a-2]=arguments[a];t.locks++;try{var o;return null!=e&&(o=e.apply(this,r)),o}finally{t.locks--,0===t.locks&&t.methods.forEach((function(e){e.apply(n,r)}))}}function P(e,t){return function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];L.call.apply(L,[this,e,t].concat(i))}}function z(e,t,n){var i=function(e,t){var n=e[N]=e[N]||{},i=n[t]=n[t]||{};return i.locks=i.locks||0,i.methods=i.methods||[],i}(e,t);i.methods.indexOf(n)<0&&i.methods.push(n);var r=Object.getOwnPropertyDescriptor(e,t);if(!r||!r[R]){var a=e[t],o=Y(e,t,r?r.enumerable:void 0,i,a);Object.defineProperty(e,t,o)}}function Y(e,t,n,i,r){var a,o=P(r,i);return(a={})[R]=!0,a.get=function(){return o},a.set=function(r){if(this===e)o=P(r,i);else{var a=Y(this,t,n,i,r);Object.defineProperty(this,t,a)}},a.configurable=!0,a.enumerable=n,a}var H=n.$mobx||"$mobx",F=k("isUnmounted"),B=k("skipRender"),j=k("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!==G)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else n.shouldComponentUpdate=G;V(n,"props"),V(n,"state");var i=n.render;return n.render=function(){return W.call(this,i)},z(n,"componentWillUnmount",(function(){this.render[H]&&this.render[H].dispose(),this[F]=!0})),e}function W(e){var i=this;E(this,B,!1),E(this,j,!1);var r,a=(r=this).displayName||r.name||r.constructor&&(r.constructor.displayName||r.constructor.name)||"<component>",o=e.bind(this),s=!1,l=new n.Reaction(a+".render()",(function(){if(!s&&(s=!0,!0!==i[F])){var e=!0;try{E(i,j,!0),i[B]||t.Component.prototype.forceUpdate.call(i),e=!1}finally{E(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[H]=l,this.render=u,u.call(this)}function G(e,t){return this.state!==t||!I(this.props,e)}function V(e,t){var i=k("reactProp_"+t+"_valueHolder"),r=k("reactProp_"+t+"_atomHolder");function a(){return this[r]||E(this,r,n.createAtom("reactive "+t)),this[r]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=!1;return n._allowStateReadsStart&&n._allowStateReadsEnd&&(e=n._allowStateReadsStart(!0)),a.call(this).reportObserved(),n._allowStateReadsStart&&n._allowStateReadsEnd&&n._allowStateReadsEnd(e),this[i]},set:function(e){this[j]||I(this[i],e)?E(this,i,e):(E(this,i,e),E(this,B,!0),a.call(this).reportChanged(),E(this,B,!1))}})}var q="function"==typeof Symbol&&Symbol.for,Z=q?Symbol.for("react.forward_ref"):"function"==typeof t.forwardRef&&t.forwardRef((function(e){return null})).$$typeof,X=q?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 K="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function $(e){var t={exports:{}};return e(t,t.exports),t.exports}function Q(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!==K&&K.__DEV__;var J=2311;var ee=function(){return J++};var te="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.]+)/),r=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(e);i&&(n.firefox=!0,n.version=i[1]);r&&(n.ie=!0,n.version=r[1]);a&&(n.edge=!0,n.version=a[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),ne={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},ie={"[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},re=Object.prototype.toString,ae=Array.prototype,oe=ae.forEach,se=ae.filter,le=ae.slice,ue=ae.map,ce=ae.reduce,he={};function de(e){if(null==e||"object"!=typeof e)return e;var t=e,n=re.call(e);if("[object Array]"===n){if(!Se(e)){t=[];for(var i=0,r=e.length;i<r;i++)t[i]=de(e[i])}}else if(ie[n]){if(!Se(e)){var a=e.constructor;if(e.constructor.from)t=a.from(e);else{t=new a(e.length);for(i=0,r=e.length;i<r;i++)t[i]=de(e[i])}}}else if(!ne[n]&&!Se(e)&&!we(e))for(var o in t={},e)e.hasOwnProperty(o)&&(t[o]=de(e[o]));return t}function fe(e,t,n){if(!xe(t)||!xe(e))return n?de(t):e;for(var i in t)if(t.hasOwnProperty(i)){var r=e[i],a=t[i];!xe(a)||!xe(r)||_e(a)||_e(r)||we(a)||we(r)||be(a)||be(r)||Se(a)||Se(r)?!n&&i in e||(e[i]=de(t[i])):fe(r,a,n)}return e}function pe(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 ge,me=function(){return he.createCanvas()};function ve(e,t,n){if(e&&t)if(e.forEach&&e.forEach===oe)e.forEach(t,n);else if(e.length===+e.length)for(var i=0,r=e.length;i<r;i++)t.call(n,e[i],i,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}function ye(e,t){var n=le.call(arguments,2);return function(){return e.apply(t,n.concat(le.call(arguments)))}}function _e(e){return"[object Array]"===re.call(e)}function xe(e){var t=typeof e;return"function"===t||!!e&&"object"===t}function be(e){return!!ne[re.call(e)]}function we(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}he.createCanvas=function(){return document.createElement("canvas")};var Te="__ec_primitive__";function Se(e){return e[Te]}function Oe(e){var t=_e(e);this.data={};var n=this;function i(e,i){t?n.set(e,i):n.set(i,e)}e instanceof Oe?e.each(i):e&&ve(e,i)}Oe.prototype={constructor:Oe,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=ye(e,t)),this.data)this.data.hasOwnProperty(n)&&e(this.data[n],n)},removeKey:function(e){delete this.data[e]}};var Me=function(e,t){for(var n=e[0],i=1,r=e.length;i<r;i++)n=fe(n,e[i],t);return n},De=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},Ae=function(e,t){var n=e.prototype;function i(){}for(var r in i.prototype=t.prototype,e.prototype=new i,n)n.hasOwnProperty(r)&&(e.prototype[r]=n[r]);e.prototype.constructor=e,e.superClass=t},ke=function(e,t,n){if(e&&t){if(e.map&&e.map===ue)return e.map(t,n);for(var i=[],r=0,a=e.length;r<a;r++)i.push(t.call(n,e[r],r,e));return i}},Ie=function(e,t,n,i){if(e&&t){if(e.reduce&&e.reduce===ce)return e.reduce(t,n,i);for(var r=0,a=e.length;r<a;r++)n=t.call(i,n,e[r],r,e);return n}},Ce=function(e,t,n){if(e&&t){if(e.filter&&e.filter===se)return e.filter(t,n);for(var i=[],r=0,a=e.length;r<a;r++)t.call(n,e[r],r,e)&&i.push(e[r]);return i}},Ee=function(e,t,n){if(e&&t)for(var i=0,r=e.length;i<r;i++)if(t.call(n,e[i],i,e))return e[i]},Ne=function(e){var t=le.call(arguments,1);return function(){return e.apply(this,t.concat(le.call(arguments)))}},Re=function(e){for(var t=0,n=arguments.length;t<n;t++)if(null!=arguments[t])return arguments[t]},Le=function(){return Function.call.apply(le,arguments)},Pe=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},ze=function(e,t){for(var n=new e.constructor(e.length+t.length),i=0;i<e.length;i++)n[i]=e[i];var r=e.length;for(i=0;i<t.length;i++)n[i+r]=t[i];return n},Ye={$override:function(e,t){"createCanvas"===e&&(ge=null),he[e]=t},clone:de,merge:fe,mergeAll:Me,extend:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},defaults:pe,createCanvas:me,getContext:function(){return ge||(ge=me().getContext("2d")),ge},indexOf:De,inherits:Ae,mixin:function(e,t,n){pe(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:ve,map:ke,reduce:Ie,filter:Ce,find:Ee,bind:ye,curry:Ne,isArray:_e,isFunction:function(e){return"function"==typeof e},isString:function(e){return"[object String]"===re.call(e)},isObject:xe,isBuiltInObject:be,isTypedArray:function(e){return!!ie[re.call(e)]},isDom:we,eqNaN:function(e){return e!=e},retrieve:Re,retrieve2:function(e,t){return null!=e?e:t},retrieve3:function(e,t,n){return null!=e?e:null!=t?t:n},slice:Le,normalizeCssArray:Pe,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[Te]=!0},isPrimitive:Se,createHashMap:function(e){return new Oe(e)},concatArray:ze,noop:function(){}},He="undefined"==typeof Float32Array?Array:Float32Array;function Fe(e){return Math.sqrt(Be(e))}function Be(e){return e[0]*e[0]+e[1]*e[1]}function je(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}function Ue(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var We=function(e,t){var n=new He(2);return null==e&&(e=0),null==t&&(t=0),n[0]=e,n[1]=t,n},Ge=function(e,t){return e[0]=t[0],e[1]=t[1],e},Ve=function(e){var t=new He(2);return t[0]=e[0],t[1]=e[1],t},qe=function(e,t,n){return e[0]=t,e[1]=n,e},Ze=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e},Xe=function(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e},Ke=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e},$e=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],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){return e[0]=t[0]*n,e[1]=t[1]*n,e},et=function(e,t){var n=Fe(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e},tt=function(e,t){return e[0]=-t[0],e[1]=-t[1],e},nt=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},it=function(e,t,n){var i=t[0],r=t[1];return e[0]=n[0]*i+n[2]*r+n[4],e[1]=n[1]*i+n[3]*r+n[5],e},rt=function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e},at=function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e},ot={create:We,copy:Ge,clone:Ve,set:qe,add:Ze,scaleAndAdd:Xe,sub:Ke,len:Fe,length:Fe,lenSquare:Be,lengthSquare:Be,mul:$e,div:Qe,dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},scale:Je,normalize:et,distance:je,dist:je,distanceSquare:Ue,distSquare:Ue,negate:tt,lerp:nt,applyTransform:it,min:rt,max:at};function st(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function lt(e,t){return{target:e,topTarget:t&&t.topTarget}}st.prototype={constructor:st,_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(lt(t,e),"dragstart",e.event))},_drag:function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,i=e.offsetY,r=n-this._x,a=i-this._y;this._x=n,this._y=i,t.drift(r,a,e),this.dispatchToElement(lt(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(lt(s,e),"dragleave",e.event),o&&o!==s&&this.dispatchToElement(lt(o,e),"dragenter",e.event))}},_dragEnd:function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.dispatchToElement(lt(t,e),"dragend",e.event),this._dropTarget&&this.dispatchToElement(lt(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null}};var ut=st,ct=Array.prototype.slice,ht=function(e){this._$handlers={},this._$eventProcessor=e};function dt(e,t,n,i,r,a){var o=e._$handlers;if("function"==typeof n&&(r=i,i=n,n=null),!i||!t)return e;n=function(e,t){var n=e._$eventProcessor;return null!=t&&n&&n.normalizeQuery&&(t=n.normalizeQuery(t)),t}(e,n),o[t]||(o[t]=[]);for(var s=0;s<o[t].length;s++)if(o[t][s].h===i)return e;var l={h:i,one:a,query:n,ctx:r||e,callAtLast:i.zrEventfulCallAtLast},u=o[t].length-1,c=o[t][u];return c&&c.callAtLast?o[t].splice(u,0,l):o[t].push(l),e}ht.prototype={constructor:ht,one:function(e,t,n,i){return dt(this,e,t,n,i,!0)},on:function(e,t,n,i){return dt(this,e,t,n,i,!1)},isSilent:function(e){var t=this._$handlers;return!t[e]||!t[e].length},off:function(e,t){var n=this._$handlers;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var i=[],r=0,a=n[e].length;r<a;r++)n[e][r].h!==t&&i.push(n[e][r]);n[e]=i}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},trigger:function(e){var t=this._$handlers[e],n=this._$eventProcessor;if(t){var i=arguments,r=i.length;r>3&&(i=ct.call(i,1));for(var a=t.length,o=0;o<a;){var s=t[o];if(n&&n.filter&&null!=s.query&&!n.filter(e,s.query))o++;else{switch(r){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,i[1]);break;case 3:s.h.call(s.ctx,i[1],i[2]);break;default:s.h.apply(s.ctx,i)}s.one?(t.splice(o,1),a--):o++}}}return n&&n.afterTrigger&&n.afterTrigger(e),this},triggerWithContext:function(e){var t=this._$handlers[e],n=this._$eventProcessor;if(t){var i=arguments,r=i.length;r>4&&(i=ct.call(i,1,i.length-1));for(var a=i[i.length-1],o=t.length,s=0;s<o;){var l=t[s];if(n&&n.filter&&null!=l.query&&!n.filter(e,l.query))s++;else{switch(r){case 1:l.h.call(a);break;case 2:l.h.call(a,i[1]);break;case 3:l.h.call(a,i[1],i[2]);break;default:l.h.apply(a,i)}l.one?(t.splice(s,1),o--):s++}}}return n&&n.afterTrigger&&n.afterTrigger(e),this}};var ft=ht,pt=Math.log(2);function gt(e,t,n,i,r,a){var o=i+"-"+r,s=e.length;if(a.hasOwnProperty(o))return a[o];if(1===t){var l=Math.round(Math.log((1<<s)-1&~r)/pt);return e[n][l]}for(var u=i|1<<n,c=n+1;i&1<<c;)c++;for(var h=0,d=0,f=0;d<s;d++){var p=1<<d;p&r||(h+=(f%2?-1:1)*e[n][d]*gt(e,t-1,c,u,r|p,a),f++)}return a[o]=h,h}var mt=function(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],i={},r=gt(n,8,0,0,0,i);if(0!==r){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)null==a[s]&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*gt(n,7,0===o?1:0,1<<o,1<<s,i)/r*t[o];return function(e,t,n){var i=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/i,e[1]=(t*a[3]+n*a[4]+a[5])/i}}},vt={buildTransformer:mt}.buildTransformer,yt="___zrEVENTSAVED",_t=[];function xt(e,t,n,i,r){if(t.getBoundingClientRect&&te.domSupported&&!bt(t)){var a=t[yt]||(t[yt]={}),o=function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var i=["left","right"],r=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=a%2,l=(a>>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",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),e.appendChild(o),n.push(o)}return n}(t,a),s=function(e,t,n){for(var i=n?"invTrans":"trans",r=t[i],a=t.srcCoords,o=!0,s=[],l=[],u=0;u<4;u++){var c=e[u].getBoundingClientRect(),h=2*u,d=c.left,f=c.top;s.push(d,f),o=o&&a&&d===a[h]&&f===a[h+1],l.push(e[u].offsetLeft,e[u].offsetTop)}return o&&r?r:(t.srcCoords=s,t[i]=n?vt(l,s):vt(s,l))}(o,a,r);if(s)return s(e,n,i),!0}return!1}function bt(e){return"CANVAS"===e.nodeName.toUpperCase()}var wt=function(e,t,n,i,r){return xt(_t,t,i,r,!0)&&xt(e,n,_t[0],_t[1])},Tt={transformLocalCoord:wt,transformCoordWithViewport:xt,isCanvasEl:bt},St=ft,Ot=Tt.isCanvasEl,Mt=Tt.transformCoordWithViewport,Dt="undefined"!=typeof window&&!!window.addEventListener,At=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,kt=[];function It(e,t,n,i){return n=n||{},i||!te.canvasSupported?Ct(e,t,n):te.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):Ct(e,t,n),n}function Ct(e,t,n){if(te.domSupported&&e.getBoundingClientRect){var i=t.clientX,r=t.clientY;if(Ot(e)){var a=e.getBoundingClientRect();return n.zrX=i-a.left,void(n.zrY=r-a.top)}if(Mt(kt,e,i,r))return n.zrX=kt[0],void(n.zrY=kt[1])}n.zrX=n.zrY=0}function Et(e){return e||window.event}var Nt={Dispatcher:St,clientToLocal:It,getNativeEvent:Et,normalizeEvent:function(e,t,n){if(null!=(t=Et(t)).zrX)return t;var i=t.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?t.targetTouches[0]:t.changedTouches[0];r&&It(e,r,t,n)}else It(e,t,t,n),t.zrDelta=t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3;var a=t.button;return null==t.which&&void 0!==a&&At.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t},addEventListener:function(e,t,n,i){Dt?e.addEventListener(t,n,i):e.attachEvent("on"+t,n)},removeEventListener:function(e,t,n,i){Dt?e.removeEventListener(t,n,i):e.detachEvent("on"+t,n)},stop:Dt?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}},Rt=function(){this._track=[]};function Lt(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}Rt.prototype={constructor:Rt,recognize:function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},clear:function(){return this._track.length=0,this},_doTrack:function(e,t,n){var i=e.touches;if(i){for(var r={points:[],touches:[],target:t,event:e},a=0,o=i.length;a<o;a++){var s=i[a],l=Nt.clientToLocal(n,s,{});r.points.push([l.zrX,l.zrY]),r.touches.push(s)}this._track.push(r)}},_recognize:function(e){for(var t in Pt)if(Pt.hasOwnProperty(t)){var n=Pt[t](this._track,e);if(n)return n}}};var Pt={pinch:function(e,t){var n=e.length;if(n){var i,r=(e[n-1]||{}).points,a=(e[n-2]||{}).points||r;if(a&&a.length>1&&r&&r.length>1){var o=Lt(r)/Lt(a);!isFinite(o)&&(o=1),t.pinchScale=o;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:e[0].target,event:t}}}}},zt=Rt,Yt="silent";function Ht(){Nt.stop(this.event)}function Ft(){}Ft.prototype.dispose=function(){};var Bt=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],jt=function(e,t,n,i){ft.call(this),this.storage=e,this.painter=t,this.painterRoot=i,n=n||new Ft,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,ut.call(this),this.setHandlerProxy(n)};function Ut(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var i,r=e;r;){if(r.clipPath&&!r.clipPath.contain(t,n))return!1;r.silent&&(i=!0),r=r.parent}return!i||Yt}return!1}function Wt(e,t,n){var i=e.painter;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}jt.prototype={constructor:jt,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(Ye.each(Bt,(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=Wt(this,t,n),r=this._hovered,a=r.target;a&&!a.__zr&&(a=(r=this.findHover(r.x,r.y)).target);var o=this._hovered=i?{x:t,y:n}:this.findHover(t,n),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(r,"mouseout",e),this.dispatchToElement(o,"mousemove",e),s&&s!==a&&this.dispatchToElement(o,"mouseover",e)},mouseout:function(e){var t=e.zrEventControl,n=e.zrIsToLocalDOM;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&!n&&this.trigger("globalout",{type:"globalout",event:e})},resize:function(e){this._hovered={}},dispatch:function(e,t){var n=this[e];n&&n.call(this,t)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},dispatchToElement:function(e,t,n){var i=(e=e||{}).target;if(!i||!i.silent){for(var r="on"+t,a=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Ht}}(t,e,n);i&&(i[r]&&(a.cancelBubble=i[r].call(i,a)),i.trigger(t,a),i=i.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer((function(e){"function"==typeof e[r]&&e[r].call(e,a),e.trigger&&e.trigger(t,a)})))}},findHover:function(e,t,n){for(var i=this.storage.getDisplayList(),r={x:e,y:t},a=i.length-1;a>=0;a--){var o;if(i[a]!==n&&!i[a].ignore&&(o=Ut(i[a],e,t))&&(!r.topTarget&&(r.topTarget=i[a]),o!==Yt)){r.target=i[a];break}}return r},processGesture:function(e,t){this._gestureMgr||(this._gestureMgr=new zt);var n=this._gestureMgr;"start"===t&&n.clear();var i=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),i){var r=i.type;e.gestureEvent=r,this.dispatchToElement({target:i.target},r,i.event)}}},Ye.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){jt.prototype[e]=function(t){var n,i,r=t.zrX,a=t.zrY,o=Wt(this,r,a);if("mouseup"===e&&o||(i=(n=this.findHover(r,a)).target),"mousedown"===e)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===e)this._upEl=i;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||ot.dist(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,e,t)}})),Ye.mixin(jt,ft),Ye.mixin(jt,ut);var Gt=jt,Vt="undefined"==typeof Float32Array?Array:Float32Array;function qt(){var e=new Vt(6);return Zt(e),e}function Zt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Xt(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 Kt=function(e,t,n){var i=t[0]*n[0]+t[2]*n[1],r=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=i,e[1]=r,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e},$t=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},Qt=function(e,t,n){var i=t[0],r=t[2],a=t[4],o=t[1],s=t[3],l=t[5],u=Math.sin(n),c=Math.cos(n);return e[0]=i*c+o*u,e[1]=-i*u+o*c,e[2]=r*c+s*u,e[3]=-r*u+c*s,e[4]=c*a+u*l,e[5]=c*l-u*a,e},Jt=function(e,t,n){var i=n[0],r=n[1];return e[0]=t[0]*i,e[1]=t[1]*r,e[2]=t[2]*i,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*r,e},en=function(e,t){var n=t[0],i=t[2],r=t[4],a=t[1],o=t[3],s=t[5],l=n*o-a*i;return l?(l=1/l,e[0]=o*l,e[1]=-a*l,e[2]=-i*l,e[3]=n*l,e[4]=(i*s-o*r)*l,e[5]=(a*r-n*s)*l,e):null},tn={create:qt,identity:Zt,copy:Xt,mul:Kt,translate:$t,rotate:Qt,scale:Jt,invert:en,clone:function(e){var t=qt();return Xt(t,e),t}},nn=tn.identity,rn=5e-5;function an(e){return e>rn||e<-5e-5}var on=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},sn=on.prototype;sn.transform=null,sn.needLocalTransform=function(){return an(this.rotation)||an(this.position[0])||an(this.position[1])||an(this.scale[0]-1)||an(this.scale[1]-1)};var ln=[];sn.updateTransform=function(){var e=this.parent,t=e&&e.transform,n=this.needLocalTransform(),i=this.transform;if(n||t){i=i||tn.create(),n?this.getLocalTransform(i):nn(i),t&&(n?tn.mul(i,e.transform,i):tn.copy(i,e.transform)),this.transform=i;var r=this.globalScaleRatio;if(null!=r&&1!==r){this.getGlobalScale(ln);var a=ln[0]<0?-1:1,o=ln[1]<0?-1:1,s=((ln[0]-a)*r+a)/ln[0]||0,l=((ln[1]-o)*r+o)/ln[1]||0;i[0]*=s,i[1]*=s,i[2]*=l,i[3]*=l}this.invTransform=this.invTransform||tn.create(),tn.invert(this.invTransform,i)}else i&&nn(i)},sn.getLocalTransform=function(e){return on.getLocalTransform(this,e)},sn.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)},sn.restoreTransform=function(e){var t=e.dpr||1;e.setTransform(t,0,0,t,0,0)};var un=[],cn=tn.create();sn.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=this.position,r=this.scale;an(t-1)&&(t=Math.sqrt(t)),an(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(t=-t),e[3]<0&&(n=-n),i[0]=e[4],i[1]=e[5],r[0]=t,r[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/t)}},sn.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(tn.mul(un,e.invTransform,t),t=un);var n=this.origin;n&&(n[0]||n[1])&&(cn[4]=n[0],cn[5]=n[1],tn.mul(un,t,cn),un[4]-=n[0],un[5]-=n[1],t=un),this.setLocalTransform(t)}},sn.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)},sn.transformCoordToLocal=function(e,t){var n=[e,t],i=this.invTransform;return i&&ot.applyTransform(n,n,i),n},sn.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&ot.applyTransform(n,n,i),n},on.getLocalTransform=function(e,t){nn(t=t||[]);var n=e.origin,i=e.scale||[1,1],r=e.rotation||0,a=e.position||[0,0];return n&&(t[4]-=n[0],t[5]-=n[1]),tn.scale(t,t,i),r&&tn.rotate(t,t,r),n&&(t[4]+=n[0],t[5]+=n[1]),t[4]+=a[0],t[5]+=a[1],t};var hn=on,dn={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-dn.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*dn.bounceIn(2*e):.5*dn.bounceOut(2*e-1)+.5}},fn=dn;function pn(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}pn.prototype={constructor:pn,step:function(e,t){if(this._initialized||(this._startTime=e+this._delay,this._initialized=!0),this._paused)this._pausedTime+=t;else{var n=(e-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,r="string"==typeof i?fn[i]:i,a="function"==typeof r?r(n):n;return this.fire("frame",a),1===n?this.loop?(this.restart(e),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(e){var t=(e-this._startTime-this._pausedTime)%this._life;this._startTime=e-t+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(e,t){this[e="on"+e]&&this[e](this._target,t)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var gn=pn,mn=function(){this.head=null,this.tail=null,this._len=0},vn=mn.prototype;vn.insert=function(e){var t=new yn(e);return this.insertEntry(t),t},vn.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++},vn.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--},vn.len=function(){return this._len},vn.clear=function(){this.head=this.tail=null,this._len=0};var yn=function(e){this.value=e,this.next,this.prev},_n=function(e){this._list=new mn,this._map={},this._maxSize=e||10,this._lastRemovedEntry=null},xn=_n.prototype;xn.put=function(e,t){var n=this._list,i=this._map,r=null;if(null==i[e]){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new yn(t),o.key=e,n.insertEntry(o),i[e]=o}return r},xn.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},xn.clear=function(){this._list.clear(),this._map={}};var bn=_n,wn={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 Tn(e){return(e=Math.round(e))<0?0:e>255?255:e}function Sn(e){return e<0?0:e>1?1:e}function On(e){return e.length&&"%"===e.charAt(e.length-1)?Tn(parseFloat(e)/100*255):Tn(parseInt(e,10))}function Mn(e){return e.length&&"%"===e.charAt(e.length-1)?Sn(parseFloat(e)/100):Sn(parseFloat(e))}function Dn(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 An(e,t,n){return e+(t-e)*n}function kn(e,t,n,i,r){return e[0]=t,e[1]=n,e[2]=i,e[3]=r,e}function In(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Cn=new bn(20),En=null;function Nn(e,t){En&&In(En,t),En=Cn.put(e,En||t.slice())}function Rn(e,t){if(e){t=t||[];var n=Cn.get(e);if(n)return In(t,n);var i,r=(e+="").replace(/ /g,"").toLowerCase();if(r in wn)return In(t,wn[r]),Nn(e,t),t;if("#"===r.charAt(0))return 4===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=4095?(kn(t,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),Nn(e,t),t):void kn(t,0,0,0,1):7===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=16777215?(kn(t,(16711680&i)>>16,(65280&i)>>8,255&i,1),Nn(e,t),t):void kn(t,0,0,0,1):void 0;var a=r.indexOf("("),o=r.indexOf(")");if(-1!==a&&o+1===r.length){var s=r.substr(0,a),l=r.substr(a+1,o-(a+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void kn(t,0,0,0,1);u=Mn(l.pop());case"rgb":return 3!==l.length?void kn(t,0,0,0,1):(kn(t,On(l[0]),On(l[1]),On(l[2]),u),Nn(e,t),t);case"hsla":return 4!==l.length?void kn(t,0,0,0,1):(l[3]=Mn(l[3]),Ln(l,t),Nn(e,t),t);case"hsl":return 3!==l.length?void kn(t,0,0,0,1):(Ln(l,t),Nn(e,t),t);default:return}}kn(t,0,0,0,1)}}function Ln(e,t){var n=(parseFloat(e[0])%360+360)%360/360,i=Mn(e[1]),r=Mn(e[2]),a=r<=.5?r*(i+1):r+i-r*i,o=2*r-a;return kn(t=t||[],Tn(255*Dn(o,a,n+1/3)),Tn(255*Dn(o,a,n)),Tn(255*Dn(o,a,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function Pn(e,t,n){if(t&&t.length&&e>=0&&e<=1){n=n||[];var i=e*(t.length-1),r=Math.floor(i),a=Math.ceil(i),o=t[r],s=t[a],l=i-r;return n[0]=Tn(An(o[0],s[0],l)),n[1]=Tn(An(o[1],s[1],l)),n[2]=Tn(An(o[2],s[2],l)),n[3]=Sn(An(o[3],s[3],l)),n}}function zn(e,t,n){if(t&&t.length&&e>=0&&e<=1){var i=e*(t.length-1),r=Math.floor(i),a=Math.ceil(i),o=Rn(t[r]),s=Rn(t[a]),l=i-r,u=Yn([Tn(An(o[0],s[0],l)),Tn(An(o[1],s[1],l)),Tn(An(o[2],s[2],l)),Sn(An(o[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:a,value:i}:u}}function Yn(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 Hn=function(e,t){var n=Rn(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 Yn(n,4===n.length?"rgba":"rgb")}},Fn=function(e){var t=Rn(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)},Bn=function(e,t,n,i){if(e=Rn(e))return e=function(e){if(e){var t,n,i=e[0]/255,r=e[1]/255,a=e[2]/255,o=Math.min(i,r,a),s=Math.max(i,r,a),l=s-o,u=(s+o)/2;if(0===l)t=0,n=0;else{n=u<.5?l/(s+o):l/(2-s-o);var c=((s-i)/6+l/2)/l,h=((s-r)/6+l/2)/l,d=((s-a)/6+l/2)/l;i===s?t=d-h:r===s?t=1/3+c-d:a===s&&(t=2/3+h-c),t<0&&(t+=1),t>1&&(t-=1)}var f=[360*t,n,u];return null!=e[3]&&f.push(e[3]),f}}(e),null!=t&&(e[0]=function(e){return(e=Math.round(e))<0?0:e>360?360:e}(t)),null!=n&&(e[1]=Mn(n)),null!=i&&(e[2]=Mn(i)),Yn(Ln(e),"rgba")},jn=function(e,t){if((e=Rn(e))&&null!=t)return e[3]=Sn(t),Yn(e,"rgba")},Un={parse:Rn,lift:Hn,toHex:Fn,fastLerp:Pn,fastMapToColor:Pn,lerp:zn,mapToColor:zn,modifyHSL:Bn,modifyAlpha:jn,stringify:Yn},Wn=Ye.isArrayLike,Gn=Array.prototype.slice;function Vn(e,t){return e[t]}function qn(e,t,n){e[t]=n}function Zn(e,t,n){return(t-e)*n+e}function Xn(e,t,n){return n>.5?t:e}function Kn(e,t,n,i,r){var a=e.length;if(1===r)for(var o=0;o<a;o++)i[o]=Zn(e[o],t[o],n);else{var s=a&&e[0].length;for(o=0;o<a;o++)for(var l=0;l<s;l++)i[o][l]=Zn(e[o][l],t[o][l],n)}}function $n(e,t,n){var i=e.length,r=t.length;if(i!==r)if(i>r)e.length=r;else for(var a=i;a<r;a++)e.push(1===n?t[a]:Gn.call(t[a]));var o=e[0]&&e[0].length;for(a=0;a<e.length;a++)if(1===n)isNaN(e[a])&&(e[a]=t[a]);else for(var s=0;s<o;s++)isNaN(e[a][s])&&(e[a][s]=t[a][s])}function Qn(e,t,n){if(e===t)return!0;var i=e.length;if(i!==t.length)return!1;if(1===n){for(var r=0;r<i;r++)if(e[r]!==t[r])return!1}else{var a=e[0].length;for(r=0;r<i;r++)for(var o=0;o<a;o++)if(e[r][o]!==t[r][o])return!1}return!0}function Jn(e,t,n,i,r,a,o,s,l){var u=e.length;if(1===l)for(var c=0;c<u;c++)s[c]=ei(e[c],t[c],n[c],i[c],r,a,o);else{var h=e[0].length;for(c=0;c<u;c++)for(var d=0;d<h;d++)s[c][d]=ei(e[c][d],t[c][d],n[c][d],i[c][d],r,a,o)}}function ei(e,t,n,i,r,a,o){var s=.5*(n-e),l=.5*(i-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*a+s*r+t}function ti(e){if(Wn(e)){var t=e.length;if(Wn(e[0])){for(var n=[],i=0;i<t;i++)n.push(Gn.call(e[i]));return n}return Gn.call(e)}return e}function ni(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}function ii(e,t,n,i,r,a){var o=e._getter,s=e._setter,l="spline"===t,u=i.length;if(u){var c,h=i[0].value,d=Wn(h),f=!1,p=!1,g=d?function(e){var t=e[e.length-1].value;return Wn(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&&Qn(b,y,g)||!d&&b===y||(_=!1),y=b,"string"==typeof b){var w=Un.parse(b);w?(b=w,f=!0):p=!0}v.push(b)}if(a||!_){var T=v[u-1];for(x=0;x<u-1;x++)d?$n(v[x],T,g):!isNaN(v[x])||isNaN(T)||p||f||(v[x]=T);d&&$n(o(e._target,r),T,g);var S,O,M,D,A,k=0,I=0;if(f)var C=[0,0,0,0];var E=new gn({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<I){for(n=Math.min(k+1,u-1);n>=0&&!(m[n]<=t);n--);n=Math.min(n,u-2)}else{for(n=k;n<u&&!(m[n]>t);n++);n=Math.min(n-1,u-2)}k=n,I=t;var i=m[n+1]-m[n];if(0!==i)if(S=(t-m[n])/i,l)if(M=v[n],O=v[0===n?n:n-1],D=v[n>u-2?u-1:n+1],A=v[n>u-3?u-1:n+2],d)Jn(O,M,D,A,S,S*S,S*S*S,o(e,r),g);else{if(f)a=Jn(O,M,D,A,S,S*S,S*S*S,C,1),a=ni(C);else{if(p)return Xn(M,D,S);a=ei(O,M,D,A,S,S*S,S*S*S)}s(e,r,a)}else if(d)Kn(v[n],v[n+1],S,o(e,r),g);else{var a;if(f)Kn(v[n],v[n+1],S,C,1),a=ni(C);else{if(p)return Xn(v[n],v[n+1],S);a=Zn(v[n],v[n+1],S)}s(e,r,a)}},ondestroy:n});return t&&"spline"!==t&&(E.easing=t),E}}}var ri=function(e,t,n,i){this._tracks={},this._target=e,this._loop=t||!1,this._getter=n||Vn,this._setter=i||qn,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};ri.prototype={when:function(e,t){var n=this._tracks;for(var i in t)if(t.hasOwnProperty(i)){if(!n[i]){n[i]=[];var r=this._getter(this._target,i);if(null==r)continue;0!==e&&n[i].push({time:0,value:ti(r)})}n[i].push({time:e,value:t[i]})}return this},during:function(e){return this._onframeList.push(e),this},pause:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].pause();this._paused=!0},resume:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var e=this._doneList,t=e.length,n=0;n<t;n++)e[n].call(this)},start:function(e,t){var n,i=this,r=0,a=function(){--r||i._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=ii(this,e,a,this._tracks[o],o,t);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(e,t){l(e,t);for(var n=0;n<i._onframeList.length;n++)i._onframeList[n](e,t)}}return r||this._doneCallback(),this},stop:function(e){for(var t=this._clipList,n=this.animation,i=0;i<t.length;i++){var r=t[i];e&&r.onframe(this._target,1),n&&n.removeClip(r)}t.length=0},delay:function(e){return this._delay=e,this},done:function(e){return e&&this._doneList.push(e),this},getClips:function(){return this._clipList}};var ai=ri,oi=1;"undefined"!=typeof window&&(oi=Math.max(window.devicePixelRatio||1,1));var si={debugMode:0,devicePixelRatio:oi},li=function(){},ui=Ye.isString,ci=Ye.isFunction,hi=Ye.isObject,di=Ye.isArrayLike,fi=Ye.indexOf,pi=function(){this.animators=[]};function gi(e,t,n,i,r,a,o,s){ui(i)?(a=r,r=i,i=0):ci(r)?(a=r,r="linear",i=0):ci(i)?(a=i,i=0):ci(n)?(a=n,n=500):n||(n=500),e.stopAnimation(),mi(e,"",e,t,n,i,s);var l=e.animators.slice(),u=l.length;function c(){--u||a&&a()}u||a&&a();for(var h=0;h<l.length;h++)l[h].done(c).start(r,o)}function mi(e,t,n,i,r,a,o){var s={},l=0;for(var u in i)i.hasOwnProperty(u)&&(null!=n[u]?hi(i[u])&&!di(i[u])?mi(e,t?t+"."+u:u,n[u],i[u],r,a,o):(o?(s[u]=n[u],vi(e,t,u,i[u])):s[u]=i[u],l++):null==i[u]||o||vi(e,t,u,i[u]));l>0&&e.animate(t,!1).when(null==r?500:r,s).delay(a||0)}function vi(e,t,n,i){if(t){var r={};r[t]={},r[t][n]=i,e.attr(r)}else e.attr(n,i)}pi.prototype={constructor:pi,animate:function(e,t){var n,i=!1,r=this,a=this.__zr;if(e){var o=e.split("."),s=r;i="shape"===o[0];for(var l=0,u=o.length;l<u;l++)s&&(s=s[o[l]]);s&&(n=s)}else n=r;if(n){var c=r.animators,h=new ai(n,t);return h.during((function(e){r.dirty(i)})).done((function(){c.splice(fi(c,h),1)})),c.push(h),a&&a.animation.addAnimator(h),h}li('Property "'+e+'" is not existed in element '+r.id)},stopAnimation:function(e){for(var t=this.animators,n=t.length,i=0;i<n;i++)t[i].stop(e);return t.length=0,this},animateTo:function(e,t,n,i,r,a){gi(this,e,t,n,i,r,a)},animateFrom:function(e,t,n,i,r,a){gi(this,e,t,n,i,r,a,!0)}};var yi=pi,_i=function(e){hn.call(this,e),ft.call(this,e),yi.call(this,e),this.id=e.id||ee()};_i.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(Ye.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)}},Ye.mixin(_i,yi),Ye.mixin(_i,hn),Ye.mixin(_i,ft);var xi,bi,wi,Ti,Si=_i,Oi=ot.applyTransform,Mi=Math.min,Di=Math.max;function Ai(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}Ai.prototype={constructor:Ai,union:function(e){var t=Mi(e.x,this.x),n=Mi(e.y,this.y);this.width=Di(e.x+e.width,this.x+this.width)-t,this.height=Di(e.y+e.height,this.y+this.height)-n,this.x=t,this.y=n},applyTransform:(xi=[],bi=[],wi=[],Ti=[],function(e){if(e){xi[0]=wi[0]=this.x,xi[1]=Ti[1]=this.y,bi[0]=Ti[0]=this.x+this.width,bi[1]=wi[1]=this.y+this.height,Oi(xi,xi,e),Oi(bi,bi,e),Oi(wi,wi,e),Oi(Ti,Ti,e),this.x=Mi(xi[0],bi[0],wi[0],Ti[0]),this.y=Mi(xi[1],bi[1],wi[1],Ti[1]);var t=Di(xi[0],bi[0],wi[0],Ti[0]),n=Di(xi[1],bi[1],wi[1],Ti[1]);this.width=t-this.x,this.height=n-this.y}}),calculateTransform:function(e){var t=this,n=e.width/t.width,i=e.height/t.height,r=tn.create();return tn.translate(r,r,[-t.x,-t.y]),tn.scale(r,r,[n,i]),tn.translate(r,r,[e.x,e.y]),r},intersect:function(e){if(!e)return!1;e instanceof Ai||(e=Ai.create(e));var t=this,n=t.x,i=t.x+t.width,r=t.y,a=t.y+t.height,o=e.x,s=e.x+e.width,l=e.y,u=e.y+e.height;return!(i<o||s<n||a<l||u<r)},contain:function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},clone:function(){return new Ai(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}}},Ai.create=function(e){return new Ai(e.x,e.y,e.width,e.height)};var ki=Ai,Ii=function(e){for(var t in e=e||{},Si.call(this,e),e)e.hasOwnProperty(t)&&(this[t]=e[t]);this._children=[],this.__storage=null,this.__dirty=!0};Ii.prototype={constructor:Ii,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 Ii&&e.addChildrenToStorage(t)),n&&n.refresh()},remove:function(e){var t=this.__zr,n=this.__storage,i=this._children,r=Ye.indexOf(i,e);return r<0||(i.splice(r,1),e.parent=null,n&&(n.delFromStorage(e),e instanceof Ii&&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 Ii&&e.delChildrenFromStorage(i)),e.parent=null;return n.length=0,this},eachChild:function(e,t){for(var n=this._children,i=0;i<n.length;i++){var r=n[i];e.call(t,r,i)}return this},traverse:function(e,t){for(var n=0;n<this._children.length;n++){var i=this._children[n];e.call(t,i),"group"===i.type&&i.traverse(e,t)}return this},addChildrenToStorage:function(e){for(var t=0;t<this._children.length;t++){var n=this._children[t];e.addToStorage(n),n instanceof Ii&&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 Ii&&n.delChildrenFromStorage(e)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(e){for(var t=null,n=new ki(0,0,0,0),i=e||this._children,r=[],a=0;a<i.length;a++){var o=i[a];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(r);l?(n.copy(s),n.applyTransform(l),(t=t||n.clone()).union(n)):(t=t||s.clone()).union(s)}}return t||n}},Ye.inherits(Ii,Si);var Ci=Ii;function Ei(e,t,n,i){var r=t+1;if(r===n)return 1;if(i(e[r++],e[t])<0){for(;r<n&&i(e[r],e[r-1])<0;)r++;!function(e,t,n){n--;for(;t<n;){var i=e[t];e[t++]=e[n],e[n--]=i}}(e,t,r)}else for(;r<n&&i(e[r],e[r-1])>=0;)r++;return r-t}function Ni(e,t,n,i,r){for(i===t&&i++;i<n;i++){for(var a,o=e[i],s=t,l=i;s<l;)r(o,e[a=s+l>>>1])<0?l=a:s=a+1;var u=i-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;u>0;)e[s+u]=e[s+u-1],u--}e[s]=o}}function Ri(e,t,n,i,r,a){var o=0,s=0,l=1;if(a(e,t[n+r])>0){for(s=i-r;l<s&&a(e,t[n+r+l])>0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}else{for(s=r+1;l<s&&a(e,t[n+r-l])<=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}for(o++;o<l;){var c=o+(l-o>>>1);a(e,t[n+c])>0?o=c+1:l=c}return l}function Li(e,t,n,i,r,a){var o=0,s=0,l=1;if(a(e,t[n+r])<0){for(s=r+1;l<s&&a(e,t[n+r-l])<0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var u=o;o=r-l,l=r-u}else{for(s=i-r;l<s&&a(e,t[n+r+l])>=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=r,l+=r}for(o++;o<l;){var c=o+(l-o>>>1);a(e,t[n+c])<0?l=c:o=c+1}return l}function Pi(e,t){var n,i,r=7,a=0;e.length;var o=[];function s(s){var l=n[s],u=i[s],c=n[s+1],h=i[s+1];i[s]=u+h,s===a-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),a--;var d=Li(e[c],e,l,u,0,t);l+=d,0!==(u-=d)&&0!==(h=Ri(e[l+u-1],e,c,h,h-1,t))&&(u<=h?function(n,i,a,s){var l=0;for(l=0;l<i;l++)o[l]=e[n+l];var u=0,c=a,h=n;if(e[h++]=e[c++],0==--s){for(l=0;l<i;l++)e[h+l]=o[u+l];return}if(1===i){for(l=0;l<s;l++)e[h+l]=e[c+l];return void(e[h+s]=o[u])}var d,f,p,g=r;for(;;){d=0,f=0,p=!1;do{if(t(e[c],o[u])<0){if(e[h++]=e[c++],f++,d=0,0==--s){p=!0;break}}else if(e[h++]=o[u++],d++,f=0,1==--i){p=!0;break}}while((d|f)<g);if(p)break;do{if(0!==(d=Li(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=Ri(o[u],e,c,s,0,t))){for(l=0;l<f;l++)e[h+l]=e[c+l];if(h+=f,c+=f,0===(s-=f)){p=!0;break}}if(e[h++]=o[u++],1==--i){p=!0;break}g--}while(d>=7||f>=7);if(p)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l<s;l++)e[h+l]=e[c+l];e[h+s]=o[u]}else{if(0===i)throw new Error;for(l=0;l<i;l++)e[h+l]=o[u+l]}}(l,u,c,h):function(n,i,a,s){var l=0;for(l=0;l<s;l++)o[l]=e[a+l];var u=n+i-1,c=s-1,h=a+s-1,d=0,f=0;if(e[h--]=e[u--],0==--i){for(d=h-(s-1),l=0;l<s;l++)e[d+l]=o[l];return}if(1===s){for(f=(h-=i)+1,d=(u-=i)+1,l=i-1;l>=0;l--)e[f+l]=e[d+l];return void(e[h]=o[c])}var p=r;for(;;){var g=0,m=0,v=!1;do{if(t(o[c],e[u])<0){if(e[h--]=e[u--],g++,m=0,0==--i){v=!0;break}}else if(e[h--]=o[c--],m++,g=0,1==--s){v=!0;break}}while((g|m)<p);if(v)break;do{if(0!==(g=i-Li(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-Ri(e[u],o,0,s,s-1,t))){for(s-=m,f=(h-=m)+1,d=(c-=m)+1,l=0;l<m;l++)e[f+l]=o[d+l];if(s<=1){v=!0;break}}if(e[h--]=e[u--],0==--i){v=!0;break}p--}while(g>=7||m>=7);if(v)break;p<0&&(p=0),p+=2}(r=p)<1&&(r=1);if(1===s){for(f=(h-=i)+1,d=(u-=i)+1,l=i-1;l>=0;l--)e[f+l]=e[d+l];e[h]=o[c]}else{if(0===s)throw new Error;for(d=h-(s-1),l=0;l<s;l++)e[d+l]=o[l]}}(l,u,c,h))}n=[],i=[],this.mergeRuns=function(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;s(e)}},this.forceMergeRuns=function(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,s(e)}},this.pushRun=function(e,t){n[a]=e,i[a]=t,a+=1}}var zi=function(e,t,n,i){n||(n=0),i||(i=e.length);var r=i-n;if(!(r<2)){var a=0;if(r<32)Ni(e,n,i,n+(a=Ei(e,n,i,t)),t);else{var o=new Pi(e,t),s=function(e){for(var t=0;e>=32;)t|=1&e,e>>=1;return e+t}(r);do{if((a=Ei(e,n,i,t))<s){var l=r;l>s&&(l=s),Ni(e,n,n+l,n+a,t),a=l}o.pushRun(n,a),o.mergeRuns(),r-=a,n+=a}while(0!==r);o.forceMergeRuns()}}};function Yi(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Hi=function(){this._roots=[],this._displayList=[],this._displayListLen=0};Hi.prototype={constructor:Hi,traverse:function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},getDisplayList:function(e,t){return t=t||!1,e&&this.updateDisplayList(t),this._displayList},updateDisplayList:function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,i=0,r=t.length;i<r;i++)this._updateAndAddDisplayable(t[i],null,e);n.length=this._displayListLen,te.canvasSupported&&zi(n,Yi)},_updateAndAddDisplayable:function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.__dirty&&e.update(),e.afterUpdate();var i=e.clipPath;if(i){t=t?t.slice():[];for(var r=i,a=e;r;)r.parent=a,r.updateTransform(),t.push(r),a=r,r=r.clipPath}if(e.isGroup){for(var o=e._children,s=0;s<o.length;s++){var l=o[s];e.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,t,n)}e.__dirty=!1}else e.__clipPaths=t,this._displayList[this._displayListLen++]=e}},addRoot:function(e){e.__storage!==this&&(e instanceof Ci&&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 Ci&&n.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(e instanceof Array){t=0;for(var i=e.length;t<i;t++)this.delRoot(e[t])}else{var r=Ye.indexOf(this._roots,e);r>=0&&(this.delFromStorage(e),this._roots.splice(r,1),e instanceof Ci&&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:Yi};var Fi=Hi,Bi={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1};var ji=function(e,t,n){return Bi.hasOwnProperty(t)?n*e.dpr:n},Ui={ContextCachedBy:{NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},WILL_BE_RESTORED:9},Wi=Ui.ContextCachedBy,Gi=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Vi=function(e){this.extendFrom(e,!1)};function qi(e,t,n){var i=null==t.x?0:t.x,r=null==t.x2?1:t.x2,a=null==t.y?0:t.y,o=null==t.y2?0:t.y2;return t.global||(i=i*n.width+n.x,r=r*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),i=isNaN(i)?0:i,r=isNaN(r)?1:r,a=isNaN(a)?0:a,o=isNaN(o)?0:o,e.createLinearGradient(i,a,r,o)}function Zi(e,t,n){var i=n.width,r=n.height,a=Math.min(i,r),o=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(o=o*i+n.x,s=s*r+n.y,l*=a),e.createRadialGradient(o,s,0,o,s,l)}Vi.prototype={constructor:Vi,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,r=n&&n.style,a=!r||e.__attrCachedBy!==Wi.STYLE_BIND;e.__attrCachedBy=Wi.STYLE_BIND;for(var o=0;o<Gi.length;o++){var s=Gi[o],l=s[0];(a||i[l]!==r[l])&&(e[l]=ji(e,l,i[l]||s[1]))}if((a||i.fill!==r.fill)&&(e.fillStyle=i.fill),(a||i.stroke!==r.stroke)&&(e.strokeStyle=i.stroke),(a||i.opacity!==r.opacity)&&(e.globalAlpha=null==i.opacity?1:i.opacity),(a||i.blend!==r.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?Zi:qi)(e,t,n),r=t.colorStops,a=0;a<r.length;a++)i.addColorStop(r[a].offset,r[a].color);return i}};for(var Xi=Vi.prototype,Ki=0;Ki<Gi.length;Ki++){var $i=Gi[Ki];$i[0]in Xi||(Xi[$i[0]]=$i[1])}Vi.getGradient=Xi.getGradient;var Qi=Vi,Ji=function(e,t){this.image=e,this.repeat=t,this.type="pattern"};Ji.prototype.getCanvasPattern=function(e){return e.createPattern(this.image,this.repeat||"repeat")};var er=Ji,tr=si.devicePixelRatio;function nr(){return!1}function ir(e,t,n){var i=Ye.createCanvas(),r=t.getWidth(),a=t.getHeight(),o=i.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=r+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",e)),i.width=r*n,i.height=a*n,i}var rr=function(e,t,n){var i;n=n||tr,"string"==typeof e?i=ir(e,t,n):Ye.isObject(e)&&(e=(i=e).id),this.id=e,this.dom=i;var r=i.style;r&&(i.onselectstart=nr,r["-webkit-user-select"]="none",r["user-select"]="none",r["-webkit-touch-callout"]="none",r["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",r.padding=0,r.margin=0,r["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=t,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=n};rr.prototype={constructor:rr,__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=ir("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},resize:function(e,t){var n=this.dpr,i=this.dom,r=i.style,a=this.domBack;r&&(r.width=e+"px",r.height=t+"px"),i.width=e*n,i.height=t*n,a&&(a.width=e*n,a.height=t*n,1!==n&&this.ctxBack.scale(n,n))},clear:function(e,t){var n,i=this.dom,r=this.ctx,a=i.width,o=i.height,s=(t=t||this.clearColor,this.motionBlur&&!e),l=this.lastFrameAlpha,u=this.dpr;(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,a/u,o/u)),r.clearRect(0,0,a,o),t&&"transparent"!==t)&&(t.colorStops?(n=t.__canvasGradient||Qi.getGradient(r,t,{x:0,y:0,width:a,height:o}),t.__canvasGradient=n):t.image&&(n=er.prototype.getCanvasPattern.call(t,r)),r.save(),r.fillStyle=n||t,r.fillRect(0,0,a,o),r.restore());if(s){var c=this.domBack;r.save(),r.globalAlpha=l,r.drawImage(c,0,0,a,o),r.restore()}}};var ar=rr,or="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){setTimeout(e,16)},sr=new bn(50);function lr(){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 ur(e){return e&&e.width&&e.height}var cr=function(e,t,n,i,r){if(e){if("string"==typeof e){if(t&&t.__zrImageSrc===e||!n)return t;var a=sr.get(e),o={hostEl:n,cb:i,cbPayload:r};return a?!ur(t=a.image)&&a.pending.push(o):((t=new Image).onload=t.onerror=lr,sr.put(e,t.__cachedImgObj={image:t,pending:[o]}),t.src=t.__zrImageSrc=e),t}return e}return t},hr={findExistImage:function(e){if("string"==typeof e){var t=sr.get(e);return t&&t.image}return e},createOrUpdateImage:cr,isImageReady:ur},dr=Ye.getContext,fr=Ye.extend,pr=Ye.retrieve2,gr=Ye.retrieve3,mr=Ye.trim,vr={},yr=0,_r=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,xr="12px sans-serif",br={};function wr(e,t){var n=e+":"+(t=t||xr);if(vr[n])return vr[n];for(var i=(e+"").split("\n"),r=0,a=0,o=i.length;a<o;a++)r=Math.max(Cr(i[a],t).width,r);return yr>5e3&&(yr=0,vr={}),yr++,vr[n]=r,r}function Tr(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function Sr(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function Or(e,t,n){var i=t.textPosition,r=t.textDistance,a=n.x,o=n.y;r=r||0;var s=n.height,l=n.width,u=s/2,c="left",h="top";switch(i){case"left":a-=r,o+=u,c="right",h="middle";break;case"right":a+=r+l,o+=u,h="middle";break;case"top":a+=l/2,o-=r,c="center",h="bottom";break;case"bottom":a+=l/2,o+=s+r,c="center";break;case"inside":a+=l/2,o+=u,c="center",h="middle";break;case"insideLeft":a+=r,o+=u,h="middle";break;case"insideRight":a+=l-r,o+=u,c="right",h="middle";break;case"insideTop":a+=l/2,o+=r,c="center";break;case"insideBottom":a+=l/2,o+=s-r,c="center",h="bottom";break;case"insideTopLeft":a+=r,o+=r;break;case"insideTopRight":a+=l-r,o+=r,c="right";break;case"insideBottomLeft":a+=r,o+=s-r,h="bottom";break;case"insideBottomRight":a+=l-r,o+=s-r,c="right",h="bottom"}return(e=e||{}).x=a,e.y=o,e.textAlign=c,e.textVerticalAlign=h,e}function Mr(e,t,n,i,r){if(!t)return"";var a=(e+"").split("\n");r=Dr(t,n,i,r);for(var o=0,s=a.length;o<s;o++)a[o]=Ar(a[o],r);return a.join("\n")}function Dr(e,t,n,i){(i=fr({},i)).font=t;n=pr(n,"...");i.maxIterations=pr(i.maxIterations,2);var r=i.minChar=pr(i.minChar,0);i.cnCharWidth=wr("国",t);var a=i.ascCharWidth=wr("a",t);i.placeholder=pr(i.placeholder,"");for(var o=e=Math.max(0,e-1),s=0;s<r&&o>=a;s++)o-=a;var l=wr(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 Ar(e,t){var n=t.containerWidth,i=t.font,r=t.contentWidth;if(!n)return"";var a=wr(e,i);if(a<=n)return e;for(var o=0;;o++){if(a<=r||o>=t.maxIterations){e+=t.ellipsis;break}var s=0===o?kr(e,r,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*r/a):0;a=wr(e=e.substr(0,s),i)}return""===e&&(e=t.placeholder),e}function kr(e,t,n,i){for(var r=0,a=0,o=e.length;a<o&&r<t;a++){var s=e.charCodeAt(a);r+=0<=s&&s<=127?n:i}return a}function Ir(e){return wr("国",e)}function Cr(e,t){return br.measureText(e,t)}function Er(e,t,n,i,r){null!=e&&(e+="");var a=pr(i,Ir(t)),o=e?e.split("\n"):[],s=o.length*a,l=s,u=!0;if(n&&(l+=n[0]+n[2]),e&&r){u=!1;var c=r.outerHeight,h=r.outerWidth;if(null!=c&&l>c)e="",o=[];else if(null!=h)for(var d=Dr(h-(n?n[1]+n[3]:0),t,r.ellipsis,{minChar:r.minChar,placeholder:r.placeholder}),f=0,p=o.length;f<p;f++)o[f]=Ar(o[f],d)}return{lines:o,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function Nr(e,t){var n={lines:[],width:0,height:0};if(null!=e&&(e+=""),!e)return n;for(var i,r=_r.lastIndex=0;null!=(i=_r.exec(e));){var a=i.index;a>r&&Rr(n,e.substring(r,a)),Rr(n,i[2],i[1]),r=_r.lastIndex}r<e.length&&Rr(n,e.substring(r,e.length));var o=n.lines,s=0,l=0,u=[],c=t.textPadding,h=t.truncate,d=h&&h.outerWidth,f=h&&h.outerHeight;c&&(null!=d&&(d-=c[1]+c[3]),null!=f&&(f-=c[0]+c[2]));for(var p=0;p<o.length;p++){for(var g=o[p],m=0,v=0,y=0;y<g.tokens.length;y++){var _=(k=g.tokens[y]).styleName&&t.rich[k.styleName]||{},x=k.textPadding=_.textPadding,b=k.font=_.font||t.font,w=k.textHeight=pr(_.textHeight,Ir(b));if(x&&(w+=x[0]+x[2]),k.height=w,k.lineHeight=gr(_.textLineHeight,t.textLineHeight,w),k.textAlign=_&&_.textAlign||t.textAlign,k.textVerticalAlign=_&&_.textVerticalAlign||"middle",null!=f&&s+k.lineHeight>f)return{lines:[],width:0,height:0};k.textWidth=wr(k.text,b);var T=_.textWidth,S=null==T||"auto"===T;if("string"==typeof T&&"%"===T.charAt(T.length-1))k.percentWidth=T,u.push(k),T=0;else{if(S){T=k.textWidth;var O=_.textBackgroundColor,M=O&&O.image;M&&(M=hr.findExistImage(M),hr.isImageReady(M)&&(T=Math.max(T,M.width*w/M.height)))}var D=x?x[1]+x[3]:0;T+=D;var A=null!=d?d-v:null;null!=A&&A<T&&(!S||A<D?(k.text="",k.textWidth=T=0):(k.text=Mr(k.text,A-D,b,h.ellipsis,{minChar:h.minChar}),k.textWidth=wr(k.text,b),T=k.textWidth+D))}v+=k.width=T,_&&(m=Math.max(m,k.lineHeight))}g.width=v,g.lineHeight=m,s+=m,l=Math.max(l,v)}n.outerWidth=n.width=pr(t.textWidth,l),n.outerHeight=n.height=pr(t.textHeight,s),c&&(n.outerWidth+=c[1]+c[3],n.outerHeight+=c[0]+c[2]);for(p=0;p<u.length;p++){var k,I=(k=u[p]).percentWidth;k.width=parseInt(I,10)/100*l}return n}function Rr(e,t,n){for(var i=""===t,r=t.split("\n"),a=e.lines,o=0;o<r.length;o++){var s=r[o],l={styleName:n,text:s,isLineHolder:!s&&!i};if(o)a.push({tokens:[l]});else{var u=(a[a.length-1]||(a[0]={tokens:[]})).tokens,c=u.length;1===c&&u[0].isLineHolder?u[0]=l:(s||!c||i)&&u.push(l)}}}br.measureText=function(e,t){var n=dr();return n.font=t||xr,n.measureText(e)};var Lr=function(e,t,n,i,r,a,o,s){return o?function(e,t,n,i,r,a,o,s){var l=Nr(e,{rich:o,truncate:s,font:t,textAlign:n,textPadding:r,textLineHeight:a}),u=l.outerWidth,c=l.outerHeight,h=Tr(0,u,n),d=Sr(0,c,i);return new ki(h,d,u,c)}(e,t,n,i,r,a,o,s):function(e,t,n,i,r,a,o){var s=Er(e,t,r,a,o),l=wr(e,t);r&&(l+=r[1]+r[3]);var u=s.outerHeight,c=Tr(0,l,n),h=Sr(0,u,i),d=new ki(c,h,l,u);return d.lineHeight=s.lineHeight,d}(e,t,n,i,r,a,s)},Pr=function(e,t,n){return Or({},{textPosition:e,textDistance:n},t)},zr=function(e){var t=(e.fontSize||e.fontFamily)&&[e.fontStyle,e.fontWeight,(e.fontSize||12)+"px",e.fontFamily||"sans-serif"].join(" ");return t&&mr(t)||e.textFont||e.font},Yr={DEFAULT_FONT:xr,$override:function(e,t){br[e]=t},getWidth:wr,getBoundingRect:Lr,adjustTextX:Tr,adjustTextY:Sr,calculateTextPosition:Or,adjustTextPositionOnRect:Pr,truncateText:Mr,getLineHeight:Ir,measureText:Cr,parsePlainText:Er,parseRichText:Nr,makeFont:zr};var Hr={buildPath:function(e,t){var n,i,r,a,o,s=t.x,l=t.y,u=t.width,c=t.height,h=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof h?n=i=r=a=h:h instanceof Array?1===h.length?n=i=r=a=h[0]:2===h.length?(n=r=h[0],i=a=h[1]):3===h.length?(n=h[0],i=a=h[1],r=h[2]):(n=h[0],i=h[1],r=h[2],a=h[3]):n=i=r=a=0,n+i>u&&(n*=u/(o=n+i),i*=u/o),r+a>u&&(r*=u/(o=r+a),a*=u/o),i+r>c&&(i*=c/(o=i+r),r*=c/o),n+a>c&&(n*=c/(o=n+a),a*=c/o),e.moveTo(s+n,l),e.lineTo(s+u-i,l),0!==i&&e.arc(s+u-i,l+i,i,-Math.PI/2,0),e.lineTo(s+u,l+c-r),0!==r&&e.arc(s+u-r,l+c-r,r,0,Math.PI/2),e.lineTo(s+a,l+c),0!==a&&e.arc(s+a,l+c-a,a,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}},Fr=Ye.retrieve2,Br=Ye.retrieve3,jr=Ye.each,Ur=Ye.normalizeCssArray,Wr=Ye.isString,Gr=Ye.isObject,Vr=Ui.ContextCachedBy,qr=Ui.WILL_BE_RESTORED,Zr=Yr.DEFAULT_FONT,Xr={left:1,right:1,center:1},Kr={top:1,bottom:1,middle:1},$r=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Qr={},Jr={};function ea(e){if(e){e.font=Yr.makeFont(e);var t=e.textAlign;"middle"===t&&(t="center"),e.textAlign=null==t||Xr[t]?t:"left";var n=e.textVerticalAlign||e.textBaseline;"center"===n&&(n="middle"),e.textVerticalAlign=null==n||Kr[n]?n:"top",e.textPadding&&(e.textPadding=Ur(e.textPadding))}}function ta(e,t,n,i,r){if(n&&t.textRotation){var a=t.textOrigin;"center"===a?(i=n.width/2+n.x,r=n.height/2+n.y):a&&(i=a[0]+n.x,r=a[1]+n.y),e.translate(i,r),e.rotate(-t.textRotation),e.translate(-i,-r)}}function na(e,t,n,i,r,a,o,s){var l=i.rich[n.styleName]||{};l.text=n.text;var u=n.textVerticalAlign,c=a+r/2;"top"===u?c=a+n.height/2:"bottom"===u&&(c=a+r-n.height/2),!n.isLineHolder&&ia(l)&&ra(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=ha(o,s,h),c-=n.height/2-h[2]-n.textHeight/2),sa(t,"shadowBlur",Br(l.textShadowBlur,i.textShadowBlur,0)),sa(t,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),sa(t,"shadowOffsetX",Br(l.textShadowOffsetX,i.textShadowOffsetX,0)),sa(t,"shadowOffsetY",Br(l.textShadowOffsetY,i.textShadowOffsetY,0)),sa(t,"textAlign",s),sa(t,"textBaseline","middle"),sa(t,"font",n.font||Zr);var d=la(l.textStroke||i.textStroke,p),f=ua(l.textFill||i.textFill),p=Fr(l.textStrokeWidth,i.textStrokeWidth);d&&(sa(t,"lineWidth",p),sa(t,"strokeStyle",d),t.strokeText(n.text,o,c)),f&&(sa(t,"fillStyle",f),t.fillText(n.text,o,c))}function ia(e){return!!(e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor)}function ra(e,t,n,i,r,a,o){var s=n.textBackgroundColor,l=n.textBorderWidth,u=n.textBorderColor,c=Wr(s);if(sa(t,"shadowBlur",n.textBoxShadowBlur||0),sa(t,"shadowColor",n.textBoxShadowColor||"transparent"),sa(t,"shadowOffsetX",n.textBoxShadowOffsetX||0),sa(t,"shadowOffsetY",n.textBoxShadowOffsetY||0),c||l&&u){t.beginPath();var h=n.textBorderRadius;h?Hr.buildPath(t,{x:i,y:r,width:a,height:o,r:h}):t.rect(i,r,a,o),t.closePath()}if(c)if(sa(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(Gr(s)){var f=s.image;(f=hr.createOrUpdateImage(f,null,e,aa,s))&&hr.isImageReady(f)&&t.drawImage(f,i,r,a,o)}if(l&&u)if(sa(t,"lineWidth",l),sa(t,"strokeStyle",u),null!=n.strokeOpacity){d=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,t.stroke(),t.globalAlpha=d}else t.stroke()}function aa(e,t){t.image=e}function oa(e,t,n,i){var r=n.x||0,a=n.y||0,o=n.textAlign,s=n.textVerticalAlign;if(i){var l=n.textPosition;if(l instanceof Array)r=i.x+ca(l[0],i.width),a=i.y+ca(l[1],i.height);else{var u=t&&t.calculateTextPosition?t.calculateTextPosition(Qr,n,i):Yr.calculateTextPosition(Qr,n,i);r=u.x,a=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var c=n.textOffset;c&&(r+=c[0],a+=c[1])}return(e=e||{}).baseX=r,e.baseY=a,e.textAlign=o,e.textVerticalAlign=s,e}function sa(e,t,n){return e[t]=ji(e,t,n),e[t]}function la(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function ua(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function ca(e,t){return"string"==typeof e?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function ha(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}var da=function(e){return ea(e),jr(e.rich,ea),e},fa=function(e,t,n,i,r,a){i.rich?function(e,t,n,i,r,a){a!==qr&&(t.__attrCachedBy=Vr.NONE);var o=e.__textCotentBlock;o&&!e.__dirtyText||(o=e.__textCotentBlock=Yr.parseRichText(n,i));!function(e,t,n,i,r){var a=n.width,o=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=oa(Jr,e,i,r),c=u.baseX,h=u.baseY,d=u.textAlign,f=u.textVerticalAlign;ta(t,i,r,c,h);var p=Yr.adjustTextX(c,o,d),g=Yr.adjustTextY(h,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;ia(i)&&ra(e,t,i,p,g,o,s);for(var _=0;_<n.lines.length;_++){for(var x,b=n.lines[_],w=b.tokens,T=w.length,S=b.lineHeight,O=b.width,M=0,D=m,A=y,k=T-1;M<T&&(!(x=w[M]).textAlign||"left"===x.textAlign);)na(e,t,x,i,S,v,D,"left"),O-=x.width,D+=x.width,M++;for(;k>=0&&"right"===(x=w[k]).textAlign;)na(e,t,x,i,S,v,A,"right"),O-=x.width,A-=x.width,k--;for(D+=(a-(D-m)-(y-A)-O)/2;M<=k;)na(e,t,x=w[M],i,S,v,D+x.width/2,"center"),D+=x.width,M++;v+=S}}(e,t,o,i,r)}(e,t,n,i,r,a):function(e,t,n,i,r,a){var o,s=ia(i),l=!1,u=t.__attrCachedBy===Vr.PLAIN_TEXT;a!==qr?(a&&(o=a.style,l=!s&&u&&o),t.__attrCachedBy=s?Vr.NONE:Vr.PLAIN_TEXT):u&&(t.__attrCachedBy=Vr.NONE);var c=i.font||Zr;l&&c===(o.font||Zr)||(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=Yr.parsePlainText(n,h,d,f,i.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=oa(Jr,e,i,r),_=y.baseX,x=y.baseY,b=y.textAlign||"left",w=y.textVerticalAlign;ta(t,i,r,_,x);var T=Yr.adjustTextY(x,g,w),S=_,O=T;if(s||d){var M=Yr.getWidth(n,h);d&&(M+=d[1]+d[3]);var D=Yr.adjustTextX(_,M,b);s&&ra(e,t,i,D,T,M,g),d&&(S=ha(_,b,d),O+=d[0])}t.textAlign=b,t.textBaseline="middle",t.globalAlpha=i.opacity||1;for(var A=0;A<$r.length;A++){var k=$r[A],I=k[0],C=k[1],E=i[I];l&&E===o[I]||(t[C]=ji(t,C,E||k[2]))}O+=v/2;var N=i.textStrokeWidth,R=l?o.textStrokeWidth:null,L=!l||N!==R,P=!l||L||i.textStroke!==o.textStroke,z=la(i.textStroke,N),Y=ua(i.textFill);z&&(L&&(t.lineWidth=N),P&&(t.strokeStyle=z));Y&&(l&&i.textFill===o.textFill||(t.fillStyle=Y));if(1===m.length)z&&t.strokeText(m[0],S,O),Y&&t.fillText(m[0],S,O);else for(A=0;A<m.length;A++)z&&t.strokeText(m[A],S,O),Y&&t.fillText(m[A],S,O),O+=v}(e,t,n,i,r,a)},pa=function(e,t){return null!=e&&(e||t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor||t.textPadding)},ga={normalizeTextStyle:da,renderText:fa,getBoxPosition:oa,getStroke:la,getFill:ua,parsePercent:ca,needDrawText:pa},ma=Ui.WILL_BE_RESTORED,va=new ki,ya=function(){};ya.prototype={constructor:ya,drawRectText:function(e,t){var n=this.style;t=n.textRect||t,this.__dirty&&ga.normalizeTextStyle(n,!0);var i=n.text;if(null!=i&&(i+=""),ga.needDrawText(i,n)){e.save();var r=this.transform;n.transformText?this.setTransform(e):r&&(va.copy(t),va.applyTransform(r),t=va),ga.renderText(this,e,i,n,t,ma),e.restore()}}};var _a=ya;function xa(e){for(var t in e=e||{},Si.call(this,e),e)e.hasOwnProperty(t)&&"style"!==t&&(this[t]=e[t]);this.style=new Qi(e.style),this._rect=null,this.__clipPaths=null}xa.prototype={constructor:xa,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?Si.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 Qi(e),this.dirty(!1),this},calculateTextPosition:null},Ye.inherits(xa,Si),Ye.mixin(xa,_a);var ba=xa;function wa(e){ba.call(this,e)}wa.prototype={constructor:wa,type:"image",brush:function(e,t){var n=this.style,i=n.image;n.bind(e,this,t);var r=this._image=hr.createOrUpdateImage(i,this._image,this,this.onload);if(r&&hr.isImageReady(r)){var a=n.x||0,o=n.y||0,s=n.width,l=n.height,u=r.width/r.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=r.width,l=r.height),this.setTransform(e),n.sWidth&&n.sHeight){var c=n.sx||0,h=n.sy||0;e.drawImage(r,c,h,n.sWidth,n.sHeight,a,o,s,l)}else if(n.sx&&n.sy){var d=s-(c=n.sx),f=l-(h=n.sy);e.drawImage(r,c,h,d,f,a,o,s,l)}else e.drawImage(r,a,o,s,l);null!=n.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))}},getBoundingRect:function(){var e=this.style;return this._rect||(this._rect=new ki(e.x||0,e.y||0,e.width||0,e.height||0)),this._rect}},Ye.inherits(wa,ba);var Ta=wa,Sa=si.devicePixelRatio,Oa=1e5,Ma=314159,Da=.01;function Aa(e){return parseInt(e,10)}var ka=new ki(0,0,0,0),Ia=new ki(0,0,0,0);var Ca=function(e,t,n){this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=Ye.extend({},n||{}),this.dpr=n.devicePixelRatio||Sa,this._singleCanvas=i,this.root=e;var r=e.style;r&&(r["-webkit-tap-highlight-color"]="transparent",r["-webkit-user-select"]=r["user-select"]=r["-webkit-touch-callout"]="none",e.innerHTML=""),this.storage=t;var a=this._zlevelList=[],o=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,i){var s=e.width,l=e.height;null!=n.width&&(s=n.width),null!=n.height&&(l=n.height),this.dpr=n.devicePixelRatio||1,e.width=s*this.dpr,e.height=l*this.dpr,this._width=s,this._height=l;var u=new ar(e,this,this.dpr);u.__builtin__=!0,u.initContext(),o[314159]=u,u.zlevel=Ma,a.push(Ma),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=[]};Ca.prototype={constructor:Ca,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(e){var t=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,e,this._redrawId);for(var i=0;i<n.length;i++){var r=n[i],a=this._layers[r];if(!a.__builtin__&&a.refresh){var o=0===i?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(e,t){if(!e.__hoverMir){var n=new e.constructor({style:e.style,shape:e.shape,z:e.z,z2:e.z2,silent:e.silent});return n.__from=e,e.__hoverMir=n,t&&n.setStyle(t),this._hoverElements.push(n),n}},removeHover:function(e){var t=e.__hoverMir,n=this._hoverElements,i=Ye.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){zi(e,this.storage.displayableSortFunc),n||(n=this._hoverlayer=this.getLayer(Oa));var i={};n.ctx.save();for(var r=0;r<t;){var a=e[r],o=a.__from;o&&o.__zr?(r++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,n,!0,i))):(e.splice(r,1),o.__hoverMir=null,t--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(Oa)},_paintList:function(e,t,n){if(this._redrawId===n){t=t||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),!i){var r=this;or((function(){r._paintList(e,t,n)}))}}},_compositeManually:function(){var e=this.getLayer(Ma).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer((function(i){i.virtual&&e.drawImage(i.dom,0,0,t,n)}))},_doPaintList:function(e,t){for(var n=[],i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];(s=this._layers[r]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||t)&&n.push(s)}for(var a=!0,o=0;o<n.length;o++){var s,l=(s=n[o]).ctx,u={};l.save();var c=t?s.__startIndex:s.__drawIndex,h=!t&&s.incremental&&Date.now,d=h&&Date.now(),f=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,f);else if(c===s.__startIndex){var p=e[c];p.incremental&&p.notClear&&!t||s.clear(!1,f)}-1===c&&(console.error("For some unknown reason. drawIndex is -1"),c=s.__startIndex);for(var g=c;g<s.__endIndex;g++){var m=e[g];if(this._doPaintEl(m,s,t,u),m.__dirty=m.__dirtyText=!1,h)if(Date.now()-d>15)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return te.wxa&&Ye.each(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),a},_doPaintEl:function(e,t,n,i){var r=t.ctx,a=e.transform;if((t.__dirty||n)&&!e.invisible&&0!==e.style.opacity&&(!a||a[0]||a[3])&&(!e.culling||!function(e,t,n){return ka.copy(e.getBoundingRect()),e.transform&&ka.applyTransform(e.transform),Ia.width=t,Ia.height=n,!ka.intersect(Ia)}(e,this._width,this._height))){var o=e.__clipPaths,s=i.prevElClipPaths;s&&!function(e,t){if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(o,s)||(s&&(r.restore(),i.prevElClipPaths=null,i.prevEl=null),o&&(r.save(),function(e,t){for(var n=0;n<e.length;n++){var i=e[n];i.setTransform(t),t.beginPath(),i.buildPath(t,i.shape),t.clip(),i.restoreTransform(t)}}(o,r),i.prevElClipPaths=o)),e.beforeBrush&&e.beforeBrush(r),e.brush(r,i.prevEl||null),i.prevEl=e,e.afterBrush&&e.afterBrush(r)}},getLayer:function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Ma);var n=this._layers[e];return n||((n=new ar("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Ye.merge(n,this._layerConfig[e],!0):this._layerConfig[e-Da]&&Ye.merge(n,this._layerConfig[e-Da],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},insertLayer:function(e,t){var n=this._layers,i=this._zlevelList,r=i.length,a=null,o=-1,s=this._domRoot;if(!n[e]&&function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(r>0&&e>i[0]){for(o=0;o<r-1&&!(i[o]<e&&i[o+1]>e);o++);a=n[i[o]]}if(i.splice(o+1,0,e),n[e]=t,!t.virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(t.dom,l.nextSibling):s.appendChild(t.dom)}else s.firstChild?s.insertBefore(t.dom,s.firstChild):s.appendChild(t.dom)}},eachLayer:function(e,t){var n,i,r=this._zlevelList;for(i=0;i<r.length;i++)n=r[i],e.call(t,this._layers[n],n)},eachBuiltinLayer:function(e,t){var n,i,r,a=this._zlevelList;for(r=0;r<a.length;r++)i=a[r],(n=this._layers[i]).__builtin__&&e.call(t,n,i)},eachOtherLayer:function(e,t){var n,i,r,a=this._zlevelList;for(r=0;r<a.length;r++)i=a[r],(n=this._layers[i]).__builtin__||e.call(t,n,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(e){function t(e){r&&(r.__endIndex!==e&&(r.__dirty=!0),r.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var n=1;n<e.length;n++){if((o=e[n]).zlevel!==e[n-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}}var i,r=null,a=0;for(n=0;n<e.length;n++){var o,s,l=(o=e[n]).zlevel;i!==l&&(i=l,a=0),o.incremental?((s=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):s=this.getLayer(l+(a>0?Da:0),this._needsManuallyCompositing),s.__builtin__||li("ZLevel "+l+" has been used by unkown layer "+s.id),s!==r&&(s.__used=!0,s.__startIndex!==n&&(s.__dirty=!0),s.__startIndex=n,s.incremental?s.__drawIndex=-1:s.__drawIndex=n,t(n),r=s),o.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=n))}t(n),this.eachBuiltinLayer((function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(e){e.clear()},setBackgroundColor:function(e){this._backgroundColor=e},configLayer:function(e,t){if(t){var n=this._layerConfig;n[e]?Ye.merge(n[e],t,!0):n[e]=t;for(var i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];if(r===e||r===e+Da){var a=this._layers[r];Ye.merge(a,n[e],!0)}}}},delLayer:function(e){var t=this._layers,n=this._zlevelList,i=t[e];i&&(i.dom.parentNode.removeChild(i.dom),delete t[e],n.splice(Ye.indexOf(n,e),1))},resize:function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts;if(null!=e&&(i.width=e),null!=t&&(i.height=t),e=this._getSize(0),t=this._getSize(1),n.style.display="",this._width!==e||t!==this._height){for(var r in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(r)&&this._layers[r].resize(e,t);Ye.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(Ma).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 ar("image",this,e.pixelRatio||this.dpr);if(t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor),e.pixelRatio<=this.dpr){this.refresh();var n=t.dom.width,i=t.dom.height,r=t.ctx;this.eachLayer((function(e){e.__builtin__?r.drawImage(e.dom,0,0,n,i):e.renderToCanvas&&(t.ctx.save(),e.renderToCanvas(t.ctx),t.ctx.restore())}))}else for(var a={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[s];this._doPaintEl(l,t,!0,a)}return t.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,n=["width","height"][e],i=["clientWidth","clientHeight"][e],r=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=t[n]&&"auto"!==t[n])return parseFloat(t[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[i]||Aa(s[n])||Aa(o.style[n]))-(Aa(s[r])||0)-(Aa(s[a])||0)|0},pathToImage:function(e,t){t=t||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),r=e.getBoundingRect(),a=e.style,o=a.shadowBlur*t,s=a.shadowOffsetX*t,l=a.shadowOffsetY*t,u=a.hasStroke()?a.lineWidth:0,c=Math.max(u/2,-s+o),h=Math.max(u/2,s+o),d=Math.max(u/2,-l+o),f=Math.max(u/2,l+o),p=r.width+c+h,g=r.height+d+f;n.width=p*t,n.height=g*t,i.scale(t,t),i.clearRect(0,0,p,g),i.dpr=t;var m={position:e.position,rotation:e.rotation,scale:e.scale};e.position=[c-r.x,d-r.y],e.rotation=0,e.scale=[1,1],e.updateTransform(),e&&e.brush(i);var v=new Ta({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 Ea=Ca,Na=Nt.Dispatcher,Ra=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,Na.call(this)};Ra.prototype={constructor:Ra,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=Ye.indexOf(this._clips,e);t>=0&&this._clips.splice(t,1)},removeAnimator:function(e){for(var t=e.getClips(),n=0;n<t.length;n++)this.removeClip(t[n]);e.animation=null},_update:function(){for(var e=(new Date).getTime()-this._pausedTime,t=e-this._time,n=this._clips,i=n.length,r=[],a=[],o=0;o<i;o++){var s=n[o],l=s.step(e,t);l&&(r.push(l),a.push(s))}for(o=0;o<i;)n[o]._needsRemove?(n[o]=n[i-1],n.pop(),i--):o++;i=r.length;for(o=0;o<i;o++)a[o].fire(r[o]);this._time=e,this.onframe(t),this.trigger("frame",t),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,or((function t(){e._running&&(or(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 ai(e,(t=t||{}).loop,t.getter,t.setter);return this.addAnimator(n),n}},Ye.mixin(Ra,Na);var La,Pa,za=Ra,Ya=Nt.addEventListener,Ha=Nt.removeEventListener,Fa=Nt.normalizeEvent,Ba=Nt.getNativeEvent,ja=te.domSupported,Ua=(Pa={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:La=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:Ye.map(La,(function(e){var t=e.replace("mouse","pointer");return Pa.hasOwnProperty(t)?t:e}))}),Wa=["mousemove","mouseup"],Ga=["pointermove","pointerup"];function Va(e){return"mousewheel"===e&&te.browser.firefox?"DOMMouseScroll":e}function qa(e){var t=e.pointerType;return"pen"===t||"touch"===t}function Za(e){e&&(e.zrByTouch=!0)}function Xa(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 Ka(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 $a=Ka.prototype;$a.stopPropagation=$a.stopImmediatePropagation=$a.preventDefault=Ye.noop;var Qa={mousedown:function(e){e=Fa(this.dom,e),this._mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Fa(this.dom,e);var t=this._mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||ro(this,!0),this.trigger("mousemove",e)},mouseup:function(e){e=Fa(this.dom,e),ro(this,!1),this.trigger("mouseup",e)},mouseout:function(e){e=Fa(this.dom,e),this._pointerCapturing&&(e.zrEventControl="no_globalout");var t=e.toElement||e.relatedTarget;e.zrIsToLocalDOM=Xa(this,t),this.trigger("mouseout",e)},touchstart:function(e){Za(e=Fa(this.dom,e)),this._lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Qa.mousemove.call(this,e),Qa.mousedown.call(this,e)},touchmove:function(e){Za(e=Fa(this.dom,e)),this.handler.processGesture(e,"change"),Qa.mousemove.call(this,e)},touchend:function(e){Za(e=Fa(this.dom,e)),this.handler.processGesture(e,"end"),Qa.mouseup.call(this,e),+new Date-this._lastTouchMoment<300&&Qa.click.call(this,e)},pointerdown:function(e){Qa.mousedown.call(this,e)},pointermove:function(e){qa(e)||Qa.mousemove.call(this,e)},pointerup:function(e){Qa.mouseup.call(this,e)},pointerout:function(e){qa(e)||Qa.mouseout.call(this,e)}};Ye.each(["click","mousewheel","dblclick","contextmenu"],(function(e){Qa[e]=function(t){t=Fa(this.dom,t),this.trigger(e,t)}}));var Ja={pointermove:function(e){qa(e)||Ja.mousemove.call(this,e)},pointerup:function(e){Ja.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this._pointerCapturing;ro(this,!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function eo(e,t){var n=t.domHandlers;te.pointerEventsSupported?Ye.each(Ua.pointer,(function(i){no(t,i,(function(t){n[i].call(e,t)}))})):(te.touchEventsSupported&&Ye.each(Ua.touch,(function(i){no(t,i,(function(r){n[i].call(e,r),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),Ye.each(Ua.mouse,(function(i){no(t,i,(function(r){r=Ba(r),t.touching||n[i].call(e,r)}))})))}function to(e,t){function n(n){no(t,n,(function(i){i=Ba(i),Xa(e,i.target)||(i=function(e,t){return Fa(e.dom,new Ka(e,t),!0)}(e,i),t.domHandlers[n].call(e,i))}),{capture:!0})}te.pointerEventsSupported?Ye.each(Ga,n):te.touchEventsSupported||Ye.each(Wa,n)}function no(e,t,n,i){e.mounted[t]=n,e.listenerOpts[t]=i,Ya(e.domTarget,Va(t),n,i)}function io(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&Ha(e.domTarget,Va(n),t[n],e.listenerOpts[n]);e.mounted={}}function ro(e,t){if(e._mayPointerCapture=null,ja&&e._pointerCapturing^t){e._pointerCapturing=t;var n=e._globalHandlerScope;t?to(e,n):io(n)}}function ao(e,t){this.domTarget=e,this.domHandlers=t,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function oo(e,t){ft.call(this),this.dom=e,this.painterRoot=t,this._localHandlerScope=new ao(e,Qa),ja&&(this._globalHandlerScope=new ao(document,Ja)),this._pointerCapturing=!1,this._mayPointerCapture=null,eo(this,this._localHandlerScope)}var so=oo.prototype;so.dispose=function(){io(this._localHandlerScope),ja&&io(this._globalHandlerScope)},so.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},Ye.mixin(oo,ft);var lo=oo,uo=!te.canvasSupported,co={canvas:Ea},ho={};var fo=function(e,t,n){n=n||{},this.dom=t,this.id=e;var i=this,r=new Fi,a=n.renderer;if(uo){if(!co.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&co[a]||(a="canvas");var o=new co[a](t,r,n,e);this.storage=r,this.painter=o;var s=te.node||te.worker?null:new lo(o.getViewportRoot(),o.root);this.handler=new Gt(r,o,s,o.root),this.animation=new za({stage:{update:Ye.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=r.delFromStorage,u=r.addToStorage;r.delFromStorage=function(e){l.call(r,e),e&&e.removeSelfFromZr(i)},r.addToStorage=function(e){u.call(r,e),e.addSelfToZr(i)}};fo.prototype={constructor:fo,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 ho[e]}};var po=function(e,t){var n=new fo(ee(),e,t);return ho[n.id]=n,n},go={version:"4.3.1",init:po,dispose:function(e){if(e)e.dispose();else{for(var t in ho)ho.hasOwnProperty(t)&&ho[t].dispose();ho={}}return this},getInstance:function(e){return ho[e]},registerPainter:function(e,t){co[e]=t}},mo=Ye.each,vo=Ye.isObject,yo=Ye.isArray,_o="series\0";function xo(e){return e instanceof Array?e:null==e?[]:[e]}function bo(e){return vo(e)&&e.id&&0===(e.id+"").indexOf("\0_ec_\0")}var wo=0;function To(e,t){return e&&e.hasOwnProperty(t)}var So=function(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var i=0,r=n.length;i<r;i++){var a=n[i];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}},Oo=function(e,t){t=(t||[]).slice();var n=Ye.map(e||[],(function(e,t){return{exist:e}}));return mo(t,(function(e,i){if(vo(e)){for(var r=0;r<n.length;r++)if(!n[r].option&&null!=e.id&&n[r].exist.id===e.id+"")return n[r].option=e,void(t[i]=null);for(r=0;r<n.length;r++){var a=n[r].exist;if(!(n[r].option||null!=a.id&&null!=e.id||null==e.name||bo(e)||bo(a)||a.name!==e.name+""))return n[r].option=e,void(t[i]=null)}}})),mo(t,(function(e,t){if(vo(e)){for(var i=0;i<n.length;i++){var r=n[i].exist;if(!n[i].option&&!bo(r)&&null==e.id){n[i].option=e;break}}i>=n.length&&n.push({option:e})}})),n},Mo=function(e,t){var n={},i={};return r(e||[],n),r(t||[],i,n),[a(n),a(i)];function r(e,t,n){for(var i=0,r=e.length;i<r;i++)for(var a=e[i].seriesId,o=xo(e[i].dataIndex),s=n&&n[a],l=0,u=o.length;l<u;l++){var c=o[l];s&&s[c]?s[c]=null:(t[a]||(t[a]={}))[c]=1}}function a(e,t){var n=[];for(var i in e)if(e.hasOwnProperty(i)&&null!=e[i])if(t)n.push(+i);else{var r=a(e[i],!0);r.length&&n.push({seriesId:i,dataIndex:r})}return n}},Do=function(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n},Ao=function(e,t){return e.getAttribute?e.getAttribute(t):e[t]},ko={normalizeToArray:xo,defaultEmphasis:So,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!vo(e)||yo(e)||e instanceof Date?e:e.value},isDataItemOption:function(e){return vo(e)&&!(e instanceof Array)},mappingToExists:Oo,makeIdAndName:function(e){var t=Ye.createHashMap();mo(e,(function(e,n){var i=e.exist;i&&t.set(i.id,e)})),mo(e,(function(e,n){var i=e.option;Ye.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={})})),mo(e,(function(e,n){var i=e.exist,r=e.option,a=e.keyInfo;if(vo(r)){if(a.name=null!=r.name?r.name+"":i?i.name:_o+n,i)a.id=i.id;else if(null!=r.id)a.id=r.id+"";else{var o=0;do{a.id="\0"+a.name+"\0"+o++}while(t.get(a.id))}t.set(a.id,e)}}))},isNameSpecified:function(e){var t=e.name;return!(!t||!t.indexOf(_o))},isIdInner:bo,compressBatches:Mo,queryDataIndex:function(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?Ye.isArray(t.dataIndex)?Ye.map(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?Ye.isArray(t.name)?Ye.map(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0},makeInner:function(){var e="__\0ec_inner_"+wo+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}},parseFinder:function(e,t,n){if(Ye.isString(t)){var i={};i[t+"Index"]=0,t=i}var r=n&&n.defaultMainType;!r||To(t,r+"Index")||To(t,r+"Id")||To(t,r+"Name")||(t[r+"Index"]=0);var a={};return mo(t,(function(i,r){i=t[r];if("dataIndex"!==r&&"dataIndexInside"!==r){var o=r.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==i||"index"===l&&"none"===i||n&&n.includeMainTypes&&Ye.indexOf(n.includeMainTypes,s)<0)){var u={mainType:s};"index"===l&&"all"===i||(u[l]=i);var c=e.queryComponents(u);a[s+"Models"]=c,a[s+"Model"]=c[0]}}else a[r]=i})),a},setAttribute:Do,getAttribute:Ao,getTooltipRenderMode:function(e){return"auto"===e?te.domSupported?"html":"richText":e||"html"},groupData:function(e,t){var n=Ye.createHashMap(),i=[];return Ye.each(e,(function(e){var r=t(e);(n.get(r)||(i.push(r),n.set(r,[]))).push(e)})),{keys:i,buckets:n}}},Io="___EC__COMPONENT__CONTAINER___";function Co(e){var t={main:"",sub:""};return e&&(e=e.split("."),t.main=e[0]||"",t.sub=e[1]||""),t}var Eo=0;function No(e,t){var n=Ye.slice(arguments,2);return this.superClass.prototype[t].apply(e,n)}function Ro(e,t,n){return this.superClass.prototype[t].apply(e,n)}var Lo=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 Ye.extend(n.prototype,e),n.extend=this.extend,n.superCall=No,n.superApply=Ro,Ye.inherits(n,this),n.superClass=t,n}},Po=function(e,t){t=t||{};var n={};if(e.registerClass=function(e,t){if(t)if(function(e){Ye.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}(t),(t=Co(t)).sub){if(t.sub!==Io){var i=function(e){var t=n[e.main];t&&t[Io]||((t=n[e.main]={})[Io]=!0);return t}(t);i[t.sub]=e}}else n[t.main]=e;return e},e.getClass=function(e,t,i){var r=n[e];if(r&&r[Io]&&(r=t?r[t]:null),i&&!r)throw new Error(t?"Component "+e+"."+(t||"")+" not exists. Load it first.":e+".type should be specified.");return r},e.getClassesByMainType=function(e){e=Co(e);var t=[],i=n[e.main];return i&&i[Io]?Ye.each(i,(function(e,n){n!==Io&&t.push(e)})):t.push(i),t},e.hasClass=function(e){return e=Co(e),!!n[e.main]},e.getAllClassMainTypes=function(){var e=[];return Ye.each(n,(function(t,n){e.push(n)})),e},e.hasSubTypes=function(e){e=Co(e);var t=n[e.main];return t&&t[Io]},e.parseClassType=Co,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},zo={parseClassType:Co,enableClassExtend:Lo,enableClassCheck:function(e){var t=["__\0is_clz",Eo++,Math.random().toFixed(3)].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}},enableClassManagement:Po,setReadOnly:function(e,t){}};var Yo=function(e){for(var t=0;t<e.length;t++)e[t][1]||(e[t][1]=e[t][0]);return function(t,n,i){for(var r={},a=0;a<e.length;a++){var o=e[a][1];if(!(n&&Ye.indexOf(n,o)>=0||i&&Ye.indexOf(i,o)<0)){var s=t.getShallow(o);null!=s&&(r[e[a][0]]=s)}}return r}},Ho=Yo([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Fo={getLineStyle:function(e){var t=Ho(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])}},Bo=Fo,jo=Yo([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Uo={getAreaStyle:function(e,t){return jo(this,e,t)}},Wo=ot.create,Go=ot.distSquare,Vo=Math.pow,qo=Math.sqrt,Zo=1e-8,Xo=1e-4,Ko=qo(3),$o=1/3,Qo=Wo(),Jo=Wo(),es=Wo();function ts(e){return e>-1e-8&&e<Zo}function ns(e){return e>Zo||e<-1e-8}function is(e,t,n,i,r){var a=1-r;return a*a*(a*e+3*r*t)+r*r*(r*i+3*a*n)}function rs(e,t,n,i){var r=1-i;return r*(r*e+2*i*t)+i*i*n}var as=function(e,t,n,i,r,a){var o=i+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-r,c=s*s-3*o*l,h=s*l-9*o*u,d=l*l-3*s*u,f=0;if(ts(c)&&ts(h)){if(ts(s))a[0]=0;else(S=-l/s)>=0&&S<=1&&(a[f++]=S)}else{var p=h*h-4*c*d;if(ts(p)){var g=h/c,m=-g/2;(S=-s/o+g)>=0&&S<=1&&(a[f++]=S),m>=0&&m<=1&&(a[f++]=m)}else if(p>0){var v=qo(p),y=c*s+1.5*o*(-h+v),_=c*s+1.5*o*(-h-v);(S=(-s-((y=y<0?-Vo(-y,$o):Vo(y,$o))+(_=_<0?-Vo(-_,$o):Vo(_,$o))))/(3*o))>=0&&S<=1&&(a[f++]=S)}else{var x=(2*c*s-3*o*h)/(2*qo(c*c*c)),b=Math.acos(x)/3,w=qo(c),T=Math.cos(b),S=(-s-2*w*T)/(3*o),O=(m=(-s+w*(T+Ko*Math.sin(b)))/(3*o),(-s+w*(T-Ko*Math.sin(b)))/(3*o));S>=0&&S<=1&&(a[f++]=S),m>=0&&m<=1&&(a[f++]=m),O>=0&&O<=1&&(a[f++]=O)}}return f},os=function(e,t,n,i,r){var a=6*n-12*t+6*e,o=9*t+3*i-3*e-9*n,s=3*t-3*e,l=0;if(ts(o)){if(ns(a))(c=-s/a)>=0&&c<=1&&(r[l++]=c)}else{var u=a*a-4*o*s;if(ts(u))r[0]=-a/(2*o);else if(u>0){var c,h=qo(u),d=(-a-h)/(2*o);(c=(-a+h)/(2*o))>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l},ss=function(e,t,n,i,r,a){var o=(t-e)*r+e,s=(n-t)*r+t,l=(i-n)*r+n,u=(s-o)*r+o,c=(l-s)*r+s,h=(c-u)*r+u;a[0]=e,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=c,a[6]=l,a[7]=i},ls=function(e,t,n,i,r,a,o,s,l,u,c){var h,d,f,p,g,m=.005,v=1/0;Qo[0]=l,Qo[1]=u;for(var y=0;y<1;y+=.05)Jo[0]=is(e,n,r,o,y),Jo[1]=is(t,i,a,s,y),(p=Go(Qo,Jo))<v&&(h=y,v=p);v=1/0;for(var _=0;_<32&&!(m<Xo);_++)d=h-m,f=h+m,Jo[0]=is(e,n,r,o,d),Jo[1]=is(t,i,a,s,d),p=Go(Jo,Qo),d>=0&&p<v?(h=d,v=p):(es[0]=is(e,n,r,o,f),es[1]=is(t,i,a,s,f),g=Go(es,Qo),f<=1&&g<v?(h=f,v=g):m*=.5);return c&&(c[0]=is(e,n,r,o,h),c[1]=is(t,i,a,s,h)),qo(v)},us=function(e,t,n,i,r){var a=e-2*t+n,o=2*(t-e),s=e-i,l=0;if(ts(a)){if(ns(o))(c=-s/o)>=0&&c<=1&&(r[l++]=c)}else{var u=o*o-4*a*s;if(ts(u))(c=-o/(2*a))>=0&&c<=1&&(r[l++]=c);else if(u>0){var c,h=qo(u),d=(-o-h)/(2*a);(c=(-o+h)/(2*a))>=0&&c<=1&&(r[l++]=c),d>=0&&d<=1&&(r[l++]=d)}}return l},cs=function(e,t,n,i,r){var a=(t-e)*i+e,o=(n-t)*i+t,s=(o-a)*i+a;r[0]=e,r[1]=a,r[2]=s,r[3]=s,r[4]=o,r[5]=n},hs=function(e,t,n,i,r,a,o,s,l){var u,c=.005,h=1/0;Qo[0]=o,Qo[1]=s;for(var d=0;d<1;d+=.05){Jo[0]=rs(e,n,r,d),Jo[1]=rs(t,i,a,d),(m=Go(Qo,Jo))<h&&(u=d,h=m)}h=1/0;for(var f=0;f<32&&!(c<Xo);f++){var p=u-c,g=u+c;Jo[0]=rs(e,n,r,p),Jo[1]=rs(t,i,a,p);var m=Go(Jo,Qo);if(p>=0&&m<h)u=p,h=m;else{es[0]=rs(e,n,r,g),es[1]=rs(t,i,a,g);var v=Go(es,Qo);g<=1&&v<h?(u=g,h=v):c*=.5}}return l&&(l[0]=rs(e,n,r,u),l[1]=rs(t,i,a,u)),qo(h)},ds={cubicAt:is,cubicDerivativeAt:function(e,t,n,i,r){var a=1-r;return 3*(((t-e)*a+2*(n-t)*r)*a+(i-n)*r*r)},cubicRootAt:as,cubicExtrema:os,cubicSubdivide:ss,cubicProjectPoint:ls,quadraticAt:rs,quadraticDerivativeAt:function(e,t,n,i){return 2*((1-i)*(t-e)+i*(n-t))},quadraticRootAt:us,quadraticExtremum:function(e,t,n){var i=e+n-2*t;return 0===i?.5:(e-t)/i},quadraticSubdivide:cs,quadraticProjectPoint:hs},fs=Math.min,ps=Math.max,gs=Math.sin,ms=Math.cos,vs=2*Math.PI,ys=ot.create(),_s=ot.create(),xs=ot.create();var bs=[],ws=[];var Ts=function(e,t,n){if(0!==e.length){var i,r=e[0],a=r[0],o=r[0],s=r[1],l=r[1];for(i=1;i<e.length;i++)r=e[i],a=fs(a,r[0]),o=ps(o,r[0]),s=fs(s,r[1]),l=ps(l,r[1]);t[0]=a,t[1]=s,n[0]=o,n[1]=l}},Ss=function(e,t,n,i,r,a){r[0]=fs(e,n),r[1]=fs(t,i),a[0]=ps(e,n),a[1]=ps(t,i)},Os=function(e,t,n,i,r,a,o,s,l,u){var c,h=ds.cubicExtrema,d=ds.cubicAt,f=h(e,n,r,o,bs);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,c=0;c<f;c++){var p=d(e,n,r,o,bs[c]);l[0]=fs(p,l[0]),u[0]=ps(p,u[0])}for(f=h(t,i,a,s,ws),c=0;c<f;c++){var g=d(t,i,a,s,ws[c]);l[1]=fs(g,l[1]),u[1]=ps(g,u[1])}l[0]=fs(e,l[0]),u[0]=ps(e,u[0]),l[0]=fs(o,l[0]),u[0]=ps(o,u[0]),l[1]=fs(t,l[1]),u[1]=ps(t,u[1]),l[1]=fs(s,l[1]),u[1]=ps(s,u[1])},Ms=function(e,t,n,i,r,a,o,s){var l=ds.quadraticExtremum,u=ds.quadraticAt,c=ps(fs(l(e,n,r),1),0),h=ps(fs(l(t,i,a),1),0),d=u(e,n,r,c),f=u(t,i,a,h);o[0]=fs(e,r,d),o[1]=fs(t,a,f),s[0]=ps(e,r,d),s[1]=ps(t,a,f)},Ds=function(e,t,n,i,r,a,o,s,l){var u=ot.min,c=ot.max,h=Math.abs(r-a);if(h%vs<1e-4&&h>1e-4)return s[0]=e-n,s[1]=t-i,l[0]=e+n,void(l[1]=t+i);if(ys[0]=ms(r)*n+e,ys[1]=gs(r)*i+t,_s[0]=ms(a)*n+e,_s[1]=gs(a)*i+t,u(s,ys,_s),c(l,ys,_s),(r%=vs)<0&&(r+=vs),(a%=vs)<0&&(a+=vs),r>a&&!o?a+=vs:r<a&&o&&(r+=vs),o){var d=a;a=r,r=d}for(var f=0;f<a;f+=Math.PI/2)f>r&&(xs[0]=ms(f)*n+e,xs[1]=gs(f)*i+t,u(s,xs,s),c(l,xs,l))},As={fromPoints:Ts,fromLine:Ss,fromCubic:Os,fromQuadratic:Ms,fromArc:Ds},ks=si.devicePixelRatio,Is={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Cs=[],Es=[],Ns=[],Rs=[],Ls=Math.min,Ps=Math.max,zs=Math.cos,Ys=Math.sin,Hs=Math.sqrt,Fs=Math.abs,Bs="undefined"!=typeof Float32Array,js=function(e){this._saveData=!e,this._saveData&&(this.data=[]),this._ctx=null};js.prototype={constructor:js,_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=Fs(n/ks/e)||0,this._uy=Fs(n/ks/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(Is.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=Fs(e-this._xi)>this._ux||Fs(t-this._yi)>this._uy||this._len<5;return this.addData(Is.L,e,t),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(e,t):this._ctx.lineTo(e,t)),n&&(this._xi=e,this._yi=t),this},bezierCurveTo:function(e,t,n,i,r,a){return this.addData(Is.C,e,t,n,i,r,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(e,t,n,i,r,a):this._ctx.bezierCurveTo(e,t,n,i,r,a)),this._xi=r,this._yi=a,this},quadraticCurveTo:function(e,t,n,i){return this.addData(Is.Q,e,t,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(e,t,n,i):this._ctx.quadraticCurveTo(e,t,n,i)),this._xi=n,this._yi=i,this},arc:function(e,t,n,i,r,a){return this.addData(Is.A,e,t,n,n,i,r-i,0,a?0:1),this._ctx&&this._ctx.arc(e,t,n,i,r,a),this._xi=zs(r)*n+e,this._yi=Ys(r)*n+t,this},arcTo:function(e,t,n,i,r){return this._ctx&&this._ctx.arcTo(e,t,n,i,r),this},rect:function(e,t,n,i){return this._ctx&&this._ctx.rect(e,t,n,i),this.addData(Is.R,e,t,n,i),this},closePath:function(){this.addData(Is.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||!Bs||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},appendPath:function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,i=this._len,r=0;r<t;r++)n+=e[r].len();Bs&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(r=0;r<t;r++)for(var a=e[r].data,o=0;o<a.length;o++)this.data[i++]=a[o];this._len=i},addData:function(e){if(this._saveData){var t=this.data;this._len+arguments.length>t.length&&(this._expandData(),t=this.data);for(var n=0;n<arguments.length;n++)t[this._len++]=arguments[n];this._prevCmd=e}},_expandData:function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(e,t){var n,i,r=this._dashSum,a=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,c=e-l,h=t-u,d=Hs(c*c+h*h),f=l,p=u,g=o.length;for(a<0&&(a=r+a),f-=(a%=r)*(c/=d),p-=a*(h/=d);c>0&&f<=e||c<0&&f>=e||0===c&&(h>0&&p<=t||h<0&&p>=t);)f+=c*(n=o[i=this._dashIdx]),p+=h*n,this._dashIdx=(i+1)%g,c>0&&f<l||c<0&&f>l||h>0&&p<u||h<0&&p>u||s[i%2?"moveTo":"lineTo"](c>=0?Ls(f,e):Ps(f,e),h>=0?Ls(p,t):Ps(p,t));c=f-e,h=p-t,this._dashOffset=-Hs(c*c+h*h)},_dashedBezierTo:function(e,t,n,i,r,a){var o,s,l,u,c,h=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=ds.cubicAt,y=0,_=this._dashIdx,x=f.length,b=0;for(d<0&&(d=h+d),d%=h,o=0;o<1;o+=.1)s=v(g,e,n,r,o+.1)-v(g,e,n,r,o),l=v(m,t,i,a,o+.1)-v(m,t,i,a,o),y+=Hs(s*s+l*l);for(;_<x&&!((b+=f[_])>d);_++);for(o=(b-d)/y;o<=1;)u=v(g,e,n,r,o),c=v(m,t,i,a,o),_%2?p.moveTo(u,c):p.lineTo(u,c),o+=f[_]/y,_=(_+1)%x;_%2!=0&&p.lineTo(r,a),s=r-u,l=a-c,this._dashOffset=-Hs(s*s+l*l)},_dashedQuadraticTo:function(e,t,n,i){var r=n,a=i;n=(n+2*e)/3,i=(i+2*t)/3,e=(this._xi+2*e)/3,t=(this._yi+2*t)/3,this._dashedBezierTo(e,t,n,i,r,a)},toStatic:function(){var e=this.data;e instanceof Array&&(e.length=this._len,Bs&&(this.data=new Float32Array(e)))},getBoundingRect:function(){Cs[0]=Cs[1]=Ns[0]=Ns[1]=Number.MAX_VALUE,Es[0]=Es[1]=Rs[0]=Rs[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,i=0,r=0,a=0;a<e.length;){var o=e[a++];switch(1===a&&(i=t=e[a],r=n=e[a+1]),o){case Is.M:t=i=e[a++],n=r=e[a++],Ns[0]=i,Ns[1]=r,Rs[0]=i,Rs[1]=r;break;case Is.L:As.fromLine(t,n,e[a],e[a+1],Ns,Rs),t=e[a++],n=e[a++];break;case Is.C:As.fromCubic(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],Ns,Rs),t=e[a++],n=e[a++];break;case Is.Q:As.fromQuadratic(t,n,e[a++],e[a++],e[a],e[a+1],Ns,Rs),t=e[a++],n=e[a++];break;case Is.A:var s=e[a++],l=e[a++],u=e[a++],c=e[a++],h=e[a++],d=e[a++]+h;a+=1;var f=1-e[a++];1===a&&(i=zs(h)*u+s,r=Ys(h)*c+l),As.fromArc(s,l,u,c,h,d,f,Ns,Rs),t=zs(d)*u+s,n=Ys(d)*c+l;break;case Is.R:i=t=e[a++],r=n=e[a++];var p=e[a++],g=e[a++];As.fromLine(i,r,i+p,r+g,Ns,Rs);break;case Is.Z:t=i,n=r}ot.min(Cs,Cs,Ns),ot.max(Es,Es,Rs)}return 0===a&&(Cs[0]=Cs[1]=Es[0]=Es[1]=0),new ki(Cs[0],Cs[1],Es[0]-Cs[0],Es[1]-Cs[1])},rebuildPath:function(e){for(var t,n,i,r,a,o,s=this.data,l=this._ux,u=this._uy,c=this._len,h=0;h<c;){var d=s[h++];switch(1===h&&(t=i=s[h],n=r=s[h+1]),d){case Is.M:t=i=s[h++],n=r=s[h++],e.moveTo(i,r);break;case Is.L:a=s[h++],o=s[h++],(Fs(a-i)>l||Fs(o-r)>u||h===c-1)&&(e.lineTo(a,o),i=a,r=o);break;case Is.C:e.bezierCurveTo(s[h++],s[h++],s[h++],s[h++],s[h++],s[h++]),i=s[h-2],r=s[h-1];break;case Is.Q:e.quadraticCurveTo(s[h++],s[h++],s[h++],s[h++]),i=s[h-2],r=s[h-1];break;case Is.A:var f=s[h++],p=s[h++],g=s[h++],m=s[h++],v=s[h++],y=s[h++],_=s[h++],x=s[h++],b=g>m?g:m,w=g>m?1:g/m,T=g>m?m/g:1,S=v+y;Math.abs(g-m)>.001?(e.translate(f,p),e.rotate(_),e.scale(w,T),e.arc(0,0,b,v,S,1-x),e.scale(1/w,1/T),e.rotate(-_),e.translate(-f,-p)):e.arc(f,p,b,v,S,1-x),1===h&&(t=zs(v)*g+f,n=Ys(v)*m+p),i=zs(S)*g+f,r=Ys(S)*m+p;break;case Is.R:t=i=s[h],n=r=s[h+1],e.rect(s[h++],s[h++],s[h++],s[h++]);break;case Is.Z:e.closePath(),i=t,r=n}}}},js.CMD=Is;var Us=js;var Ws={containStroke:function(e,t,n,i,r,a,o){if(0===r)return!1;var s=r,l=0;if(o>t+s&&o>i+s||o<t-s&&o<i-s||a>e+s&&a>n+s||a<e-s&&a<n-s)return!1;if(e===n)return Math.abs(a-e)<=s/2;var u=(l=(t-i)/(e-n))*a-o+(e*i-n*t)/(e-n);return u*u/(l*l+1)<=s/2*s/2}};var Gs={containStroke:function(e,t,n,i,r,a,o,s,l,u,c){if(0===l)return!1;var h=l;return!(c>t+h&&c>i+h&&c>a+h&&c>s+h||c<t-h&&c<i-h&&c<a-h&&c<s-h||u>e+h&&u>n+h&&u>r+h&&u>o+h||u<e-h&&u<n-h&&u<r-h&&u<o-h)&&ds.cubicProjectPoint(e,t,n,i,r,a,o,s,u,c,null)<=h/2}},Vs=ds.quadraticProjectPoint;var qs={containStroke:function(e,t,n,i,r,a,o,s,l){if(0===o)return!1;var u=o;return!(l>t+u&&l>i+u&&l>a+u||l<t-u&&l<i-u&&l<a-u||s>e+u&&s>n+u&&s>r+u||s<e-u&&s<n-u&&s<r-u)&&Vs(e,t,n,i,r,a,s,l,null)<=u/2}},Zs=2*Math.PI;var Xs={normalizeRadian:function(e){return(e%=Zs)<0&&(e+=Zs),e}},Ks=Xs.normalizeRadian,$s=2*Math.PI;var Qs={containStroke:function(e,t,n,i,r,a,o,s,l){if(0===o)return!1;var u=o;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(c-u>n||c+u<n)return!1;if(Math.abs(i-r)%$s<1e-4)return!0;if(a){var h=i;i=Ks(r),r=Ks(h)}else i=Ks(i),r=Ks(r);i>r&&(r+=$s);var d=Math.atan2(l,s);return d<0&&(d+=$s),d>=i&&d<=r||d+$s>=i&&d+$s<=r}};var Js=function(e,t,n,i,r,a){if(a>t&&a>i||a<t&&a<i)return 0;if(i===t)return 0;var o=i<t?1:-1,s=(a-t)/(i-t);1!==s&&0!==s||(o=i<t?.5:-.5);var l=s*(n-e)+e;return l===r?1/0:l>r?o:0},el=Xs.normalizeRadian,tl=Us.CMD,nl=2*Math.PI;var il=[-1,-1,-1],rl=[-1,-1];function al(e,t,n,i,r,a,o,s,l,u){if(u>t&&u>i&&u>a&&u>s||u<t&&u<i&&u<a&&u<s)return 0;var c,h=ds.cubicRootAt(t,i,a,s,u,il);if(0===h)return 0;for(var d,f,p=0,g=-1,m=0;m<h;m++){var v=il[m],y=0===v||1===v?.5:1;ds.cubicAt(e,n,r,o,v)<l||(g<0&&(g=ds.cubicExtrema(t,i,a,s,rl),rl[1]<rl[0]&&g>1&&(c=void 0,c=rl[0],rl[0]=rl[1],rl[1]=c),d=ds.cubicAt(t,i,a,s,rl[0]),g>1&&(f=ds.cubicAt(t,i,a,s,rl[1]))),2===g?v<rl[0]?p+=d<t?y:-y:v<rl[1]?p+=f<d?y:-y:p+=s<f?y:-y:v<rl[0]?p+=d<t?y:-y:p+=s<d?y:-y)}return p}function ol(e,t,n,i,r,a,o,s){if(s>t&&s>i&&s>a||s<t&&s<i&&s<a)return 0;var l=ds.quadraticRootAt(t,i,a,s,il);if(0===l)return 0;var u=ds.quadraticExtremum(t,i,a);if(u>=0&&u<=1){for(var c=0,h=ds.quadraticAt(t,i,a,u),d=0;d<l;d++){var f=0===il[d]||1===il[d]?.5:1;ds.quadraticAt(e,n,r,il[d])<o||(il[d]<u?c+=h<t?f:-f:c+=a<h?f:-f)}return c}f=0===il[0]||1===il[0]?.5:1;return ds.quadraticAt(e,n,r,il[0])<o?0:a<t?f:-f}function sl(e,t,n,i,r,a,o,s){if((s-=t)>n||s<-n)return 0;var l=Math.sqrt(n*n-s*s);il[0]=-l,il[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u%nl<1e-4){i=0,r=nl;var c=a?1:-1;return o>=il[0]+e&&o<=il[1]+e?c:0}if(a){l=i;i=el(r),r=el(l)}else i=el(i),r=el(r);i>r&&(r+=nl);for(var h=0,d=0;d<2;d++){var f=il[d];if(f+e>o){var p=Math.atan2(s,f);c=a?1:-1;p<0&&(p=nl+p),(p>=i&&p<=r||p+nl>=i&&p+nl<=r)&&(p>Math.PI/2&&p<1.5*Math.PI&&(c=-c),h+=c)}}return h}function ll(e,t,n,i,r){for(var a,o,s=0,l=0,u=0,c=0,h=0,d=0;d<e.length;){var f=e[d++];switch(f===tl.M&&d>1&&(n||(s+=Js(l,u,c,h,i,r))),1===d&&(c=l=e[d],h=u=e[d+1]),f){case tl.M:l=c=e[d++],u=h=e[d++];break;case tl.L:if(n){if(Ws.containStroke(l,u,e[d],e[d+1],t,i,r))return!0}else s+=Js(l,u,e[d],e[d+1],i,r)||0;l=e[d++],u=e[d++];break;case tl.C:if(n){if(Gs.containStroke(l,u,e[d++],e[d++],e[d++],e[d++],e[d],e[d+1],t,i,r))return!0}else s+=al(l,u,e[d++],e[d++],e[d++],e[d++],e[d],e[d+1],i,r)||0;l=e[d++],u=e[d++];break;case tl.Q:if(n){if(qs.containStroke(l,u,e[d++],e[d++],e[d],e[d+1],t,i,r))return!0}else s+=ol(l,u,e[d++],e[d++],e[d],e[d+1],i,r)||0;l=e[d++],u=e[d++];break;case tl.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+=Js(l,u,b,w,i,r):(c=b,h=w);var T=(i-p)*v/m+p;if(n){if(Qs.containStroke(p,g,v,y,y+_,x,t,T,r))return!0}else s+=sl(p,g,v,y,y+_,x,T,r);l=Math.cos(y+_)*m+p,u=Math.sin(y+_)*v+g;break;case tl.R:c=l=e[d++],h=u=e[d++];b=c+e[d++],w=h+e[d++];if(n){if(Ws.containStroke(c,h,b,h,t,i,r)||Ws.containStroke(b,h,b,w,t,i,r)||Ws.containStroke(b,w,c,w,t,i,r)||Ws.containStroke(c,w,c,h,t,i,r))return!0}else s+=Js(b,h,b,w,i,r),s+=Js(c,w,c,h,i,r);break;case tl.Z:if(n){if(Ws.containStroke(l,u,c,h,t,i,r))return!0}else s+=Js(l,u,c,h,i,r);l=c,u=h}}return n||(a=u,o=h,Math.abs(a-o)<1e-4)||(s+=Js(l,u,c,h,i,r)||0),0!==s}var ul={contain:function(e,t,n){return ll(e,0,!1,t,n)},containStroke:function(e,t,n,i){return ll(e,t,!0,n,i)}},cl=er.prototype.getCanvasPattern,hl=Math.abs,dl=new Us(!0);function fl(e){ba.call(this,e),this.path=null}fl.prototype={constructor:fl,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(e,t){var n,i=this.style,r=this.path||dl,a=i.hasStroke(),o=i.hasFill(),s=i.fill,l=i.stroke,u=o&&!!s.colorStops,c=a&&!!l.colorStops,h=o&&!!s.image,d=a&&!!l.image;(i.bind(e,this,t),this.setTransform(e),this.__dirty)&&(u&&(n=n||this.getBoundingRect(),this._fillGradient=i.getGradient(e,s,n)),c&&(n=n||this.getBoundingRect(),this._strokeGradient=i.getGradient(e,l,n)));u?e.fillStyle=this._fillGradient:h&&(e.fillStyle=cl.call(s,e)),c?e.strokeStyle=this._strokeGradient:d&&(e.strokeStyle=cl.call(l,e));var f=i.lineDash,p=i.lineDashOffset,g=!!e.setLineDash,m=this.getGlobalScale();if(r.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&a?(r.beginPath(e),f&&!g&&(r.setLineDash(f),r.setLineDashOffset(p)),this.buildPath(r,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(e.beginPath(),this.path.rebuildPath(e)),o)if(null!=i.fillOpacity){var v=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,r.fill(e),e.globalAlpha=v}else r.fill(e);if(f&&g&&(e.setLineDash(f),e.lineDashOffset=p),a)if(null!=i.strokeOpacity){v=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,r.stroke(e),e.globalAlpha=v}else r.stroke(e);f&&g&&e.setLineDash([]),null!=i.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))},buildPath:function(e,t,n){},createPathProxy:function(){this.path=new Us},getBoundingRect:function(){var e=this._rect,t=this.style,n=!e;if(n){var i=this.path;i||(i=this.path=new Us),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),e=i.getBoundingRect()}if(this._rect=e,t.hasStroke()){var r=this._rectWithStroke||(this._rectWithStroke=e.clone());if(this.__dirty||n){r.copy(e);var a=t.lineWidth,o=t.strokeNoScale?this.getLineScale():1;t.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(r.width+=a/o,r.height+=a/o,r.x-=a/o/2,r.y-=a/o/2)}return r}return e},contain:function(e,t){var n=this.transformCoordToLocal(e,t),i=this.getBoundingRect(),r=this.style;if(e=n[0],t=n[1],i.contain(e,t)){var a=this.path.data;if(r.hasStroke()){var o=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(r.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),ul.containStroke(a,o/s,e,t)))return!0}if(r.hasFill())return ul.contain(a,e,t)}return!1},dirty:function(e){null==e&&(e=!0),e&&(this.__dirtyPath=e,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(e){return this.animate("shape",e)},attrKV:function(e,t){"shape"===e?(this.setShape(t),this.__dirtyPath=!0,this._rect=null):ba.prototype.attrKV.call(this,e,t)},setShape:function(e,t){var n=this.shape;if(n){if(Ye.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&&hl(e[0]-1)>1e-10&&hl(e[3]-1)>1e-10?Math.sqrt(hl(e[0]*e[3]-e[2]*e[1])):1}},fl.extend=function(e){var t=function(t){fl.call(this,t),e.style&&this.style.extendFrom(e.style,!1);var n=e.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var r in n)!i.hasOwnProperty(r)&&n.hasOwnProperty(r)&&(i[r]=n[r])}e.init&&e.init.call(this,t)};for(var n in Ye.inherits(t,fl),e)"style"!==n&&"shape"!==n&&(t.prototype[n]=e[n]);return t},Ye.inherits(fl,ba);var pl=fl,gl=ot.applyTransform,ml=Us.CMD,vl=[[],[],[]],yl=Math.sqrt,_l=Math.atan2;var xl=function(e,t){var n,i,r,a,o,s=e.data,l=ml.M,u=ml.C,c=ml.L,h=ml.R,d=ml.A,f=ml.Q;for(r=0,a=0;r<s.length;){switch(n=s[r++],a=r,i=0,n){case l:case c:i=1;break;case u:i=3;break;case f:i=2;break;case d:var p=t[4],g=t[5],m=yl(t[0]*t[0]+t[1]*t[1]),v=yl(t[2]*t[2]+t[3]*t[3]),y=_l(-t[1]/v,t[0]/m);s[r]*=m,s[r++]+=p,s[r]*=v,s[r++]+=g,s[r++]*=m,s[r++]*=v,s[r++]+=y,s[r++]+=y,a=r+=2;break;case h:_[0]=s[r++],_[1]=s[r++],gl(_,_,t),s[a++]=_[0],s[a++]=_[1],_[0]+=s[r++],_[1]+=s[r++],gl(_,_,t),s[a++]=_[0],s[a++]=_[1]}for(o=0;o<i;o++){var _;(_=vl[o])[0]=s[r++],_[1]=s[r++],gl(_,_,t),s[a++]=_[0],s[a++]=_[1]}}},bl=Math.sqrt,wl=Math.sin,Tl=Math.cos,Sl=Math.PI,Ol=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},Ml=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(Ol(e)*Ol(t))},Dl=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Ml(e,t))};function Al(e,t,n,i,r,a,o,s,l,u,c){var h=l*(Sl/180),d=Tl(h)*(e-n)/2+wl(h)*(t-i)/2,f=-1*wl(h)*(e-n)/2+Tl(h)*(t-i)/2,p=d*d/(o*o)+f*f/(s*s);p>1&&(o*=bl(p),s*=bl(p));var g=(r===a?-1:1)*bl((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+Tl(h)*m-wl(h)*v,_=(t+i)/2+wl(h)*m+Tl(h)*v,x=Dl([1,0],[(d-m)/o,(f-v)/s]),b=[(d-m)/o,(f-v)/s],w=[(-1*d-m)/o,(-1*f-v)/s],T=Dl(b,w);Ml(b,w)<=-1&&(T=Sl),Ml(b,w)>=1&&(T=0),0===a&&T>0&&(T-=2*Sl),1===a&&T<0&&(T+=2*Sl),c.addData(u,y,_,o,s,x,T,h,a)}var kl=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Il=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Cl(e,t){var n=function(e){if(!e)return new Us;for(var t,n=0,i=0,r=n,a=i,o=new Us,s=Us.CMD,l=e.match(kl),u=0;u<l.length;u++){for(var c,h=l[u],d=h.charAt(0),f=h.match(Il)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var m=0;m<p;){var v,y,_,x,b,w,T,S=n,O=i;switch(d){case"l":n+=f[m++],i+=f[m++],c=s.L,o.addData(c,n,i);break;case"L":n=f[m++],i=f[m++],c=s.L,o.addData(c,n,i);break;case"m":n+=f[m++],i+=f[m++],c=s.M,o.addData(c,n,i),r=n,a=i,d="l";break;case"M":n=f[m++],i=f[m++],c=s.M,o.addData(c,n,i),r=n,a=i,d="L";break;case"h":n+=f[m++],c=s.L,o.addData(c,n,i);break;case"H":n=f[m++],c=s.L,o.addData(c,n,i);break;case"v":i+=f[m++],c=s.L,o.addData(c,n,i);break;case"V":i=f[m++],c=s.L,o.addData(c,n,i);break;case"C":c=s.C,o.addData(c,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),n=f[m-2],i=f[m-1];break;case"c":c=s.C,o.addData(c,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i),n+=f[m-2],i+=f[m-1];break;case"S":v=n,y=i;var M=o.len(),D=o.data;t===s.C&&(v+=n-D[M-4],y+=i-D[M-3]),c=s.C,S=f[m++],O=f[m++],n=f[m++],i=f[m++],o.addData(c,v,y,S,O,n,i);break;case"s":v=n,y=i,M=o.len(),D=o.data,t===s.C&&(v+=n-D[M-4],y+=i-D[M-3]),c=s.C,S=n+f[m++],O=i+f[m++],n+=f[m++],i+=f[m++],o.addData(c,v,y,S,O,n,i);break;case"Q":S=f[m++],O=f[m++],n=f[m++],i=f[m++],c=s.Q,o.addData(c,S,O,n,i);break;case"q":S=f[m++]+n,O=f[m++]+i,n+=f[m++],i+=f[m++],c=s.Q,o.addData(c,S,O,n,i);break;case"T":v=n,y=i,M=o.len(),D=o.data,t===s.Q&&(v+=n-D[M-4],y+=i-D[M-3]),n=f[m++],i=f[m++],c=s.Q,o.addData(c,v,y,n,i);break;case"t":v=n,y=i,M=o.len(),D=o.data,t===s.Q&&(v+=n-D[M-4],y+=i-D[M-3]),n+=f[m++],i+=f[m++],c=s.Q,o.addData(c,v,y,n,i);break;case"A":_=f[m++],x=f[m++],b=f[m++],w=f[m++],T=f[m++],Al(S=n,O=i,n=f[m++],i=f[m++],w,T,_,x,b,c=s.A,o);break;case"a":_=f[m++],x=f[m++],b=f[m++],w=f[m++],T=f[m++],Al(S=n,O=i,n+=f[m++],i+=f[m++],w,T,_,x,b,c=s.A,o)}}"z"!==d&&"Z"!==d||(c=s.Z,o.addData(c),n=r,i=a),t=c}return o.toStatic(),o}(e);return(t=t||{}).buildPath=function(e){if(e.setData){e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t)}else{var t=e;n.rebuildPath(t)}},t.applyTransform=function(e){xl(n,e),this.dirty(!0)},t}var El=function(e,t){for(var n=[],i=e.length,r=0;r<i;r++){var a=e[r];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),n.push(a.path)}var o=new pl(t);return o.createPathProxy(),o.buildPath=function(e){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t)},o},Nl={createFromString:function(e,t){return new pl(Cl(e,t))},extendFromString:function(e,t){return pl.extend(Cl(e,t))},mergePath:El},Rl=Ui.ContextCachedBy,Ll=function(e){ba.call(this,e)};Ll.prototype={constructor:Ll,type:"text",brush:function(e,t){var n=this.style;this.__dirty&&ga.normalizeTextStyle(n,!0),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;null!=i&&(i+=""),ga.needDrawText(i,n)?(this.setTransform(e),ga.renderText(this,e,i,n,null,t),this.restoreTransform(e)):e.__attrCachedBy=Rl.NONE},getBoundingRect:function(){var e=this.style;if(this.__dirty&&ga.normalizeTextStyle(e,!0),!this._rect){e.text;var t=Yr.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,ga.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}},Ye.inherits(Ll,ba);var Pl=Ll,zl=pl.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)}}),Yl=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];var Hl=function(e){return te.browser.ie&&te.browser.version>=11?function(){var t,n=this.__clipPaths,i=this.style;if(n)for(var r=0;r<n.length;r++){var a=n[r],o=a&&a.shape,s=a&&a.type;if(o&&("sector"===s&&o.startAngle===o.endAngle||"rect"===s&&(!o.width||!o.height))){for(var l=0;l<Yl.length;l++)Yl[l][2]=i[Yl[l][0]],i[Yl[l][0]]=Yl[l][1];t=!0;break}}if(e.apply(this,arguments),t)for(l=0;l<Yl.length;l++)i[Yl[l][0]]=Yl[l][2]}:e},Fl=pl.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Hl(pl.prototype.brush),buildPath:function(e,t){var n=t.cx,i=t.cy,r=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=t.startAngle,s=t.endAngle,l=t.clockwise,u=Math.cos(o),c=Math.sin(o);e.moveTo(u*r+n,c*r+i),e.lineTo(u*a+n,c*a+i),e.arc(n,i,a,o,s,!l),e.lineTo(Math.cos(s)*r+n,Math.sin(s)*r+i),0!==r&&e.arc(n,i,r,s,o,l),e.closePath()}}),Bl=pl.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(e,t){var n=t.cx,i=t.cy,r=2*Math.PI;e.moveTo(n+t.r,i),e.arc(n,i,t.r,0,r,!1),e.moveTo(n+t.r0,i),e.arc(n,i,t.r0,0,r,!0)}}),jl=Bl,Ul=ot.distance;function Wl(e,t,n,i,r,a,o){var s=.5*(n-e),l=.5*(i-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*a+s*r+t}var Gl=function(e,t){for(var n=e.length,i=[],r=0,a=1;a<n;a++)r+=Ul(e[a-1],e[a]);var o=r/2;for(o=o<n?n:o,a=0;a<o;a++){var s,l,u,c=a/(o-1)*(t?n:n-1),h=Math.floor(c),d=c-h,f=e[h%n];t?(s=e[(h-1+n)%n],l=e[(h+1)%n],u=e[(h+2)%n]):(s=e[0===h?h:h-1],l=e[h>n-2?n-1:h+1],u=e[h>n-3?n-1:h+2]);var p=d*d,g=d*p;i.push([Wl(s[0],f[0],l[0],u[0],d,p,g),Wl(s[1],f[1],l[1],u[1],d,p,g)])}return i},Vl=ot.min,ql=ot.max,Zl=ot.scale,Xl=ot.distance,Kl=ot.add,$l=ot.clone,Ql=ot.sub;var Jl=function(e,t,n,i){var r,a,o,s,l=[],u=[],c=[],h=[];if(i){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=e.length;d<f;d++)Vl(o,o,e[d]),ql(s,s,e[d]);Vl(o,o,i[0]),ql(s,s,i[1])}for(d=0,f=e.length;d<f;d++){var p=e[d];if(n)r=e[d?d-1:f-1],a=e[(d+1)%f];else{if(0===d||d===f-1){l.push($l(e[d]));continue}r=e[d-1],a=e[d+1]}Ql(u,a,r),Zl(u,u,t);var g=Xl(p,r),m=Xl(p,a),v=g+m;0!==v&&(g/=v,m/=v),Zl(c,u,-g),Zl(h,u,m);var y=Kl([],p,c),_=Kl([],p,h);i&&(ql(y,y,o),Vl(y,y,s),ql(_,_,o),Vl(_,_,s)),l.push(y),l.push(_)}return n&&l.push(l.shift()),l};var eu=function(e,t,n){var i=t.points,r=t.smooth;if(i&&i.length>=2){if(r&&"spline"!==r){var a=Jl(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var l=a[2*s],u=a[2*s+1],c=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{"spline"===r&&(i=Gl(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()}},tu={buildPath:eu},nu=pl.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(e,t){tu.buildPath(e,t,!0)}}),iu=pl.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(e,t){tu.buildPath(e,t,!1)}}),ru=Math.round;function au(e,t,n){if(!t)return e;var i=ru(2*e);return(i+ru(t))%2==0?i/2:(i+(n?1:-1))/2}var ou=function(e,t,n){if(t){var i=t.x1,r=t.x2,a=t.y1,o=t.y2;e.x1=i,e.x2=r,e.y1=a,e.y2=o;var s=n&&n.lineWidth;s&&(ru(2*i)===ru(2*r)&&(e.x1=e.x2=au(i,s,!0)),ru(2*a)===ru(2*o)&&(e.y1=e.y2=au(a,s,!0)))}},su=function(e,t,n){if(t){var i=t.x,r=t.y,a=t.width,o=t.height;e.x=i,e.y=r,e.width=a,e.height=o;var s=n&&n.lineWidth;s&&(e.x=au(i,s,!0),e.y=au(r,s,!0),e.width=Math.max(au(i+a,s,!1)-e.x,0===a?0:1),e.height=Math.max(au(r+o,s,!1)-e.y,0===o?0:1))}},lu={subPixelOptimizeLine:ou,subPixelOptimizeRect:su,subPixelOptimize:au},uu=lu.subPixelOptimizeRect,cu={},hu=pl.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(e,t){var n,i,r,a;this.subPixelOptimize?(uu(cu,t,this.style),n=cu.x,i=cu.y,r=cu.width,a=cu.height,cu.r=t.r,t=cu):(n=t.x,i=t.y,r=t.width,a=t.height),t.r?Hr.buildPath(e,t):e.rect(n,i,r,a),e.closePath()}}),du=lu.subPixelOptimizeLine,fu={},pu=pl.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n,i,r,a;this.subPixelOptimize?(du(fu,t,this.style),n=fu.x1,i=fu.y1,r=fu.x2,a=fu.y2):(n=t.x1,i=t.y1,r=t.x2,a=t.y2);var o=t.percent;0!==o&&(e.moveTo(n,i),o<1&&(r=n*(1-o)+r*o,a=i*(1-o)+a*o),e.lineTo(r,a))},pointAt:function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]}}),gu=ds.quadraticSubdivide,mu=ds.cubicSubdivide,vu=ds.quadraticAt,yu=ds.cubicAt,_u=ds.quadraticDerivativeAt,xu=ds.cubicDerivativeAt,bu=[];function wu(e,t,n){var i=e.cpx2,r=e.cpy2;return null===i||null===r?[(n?xu:yu)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?xu:yu)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?_u:vu)(e.x1,e.cpx1,e.x2,t),(n?_u:vu)(e.y1,e.cpy1,e.y2,t)]}var Tu=pl.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n=t.x1,i=t.y1,r=t.x2,a=t.y2,o=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(n,i),null==l||null==u?(c<1&&(gu(n,o,r,c,bu),o=bu[1],r=bu[2],gu(i,s,a,c,bu),s=bu[1],a=bu[2]),e.quadraticCurveTo(o,s,r,a)):(c<1&&(mu(n,o,l,r,c,bu),o=bu[1],l=bu[2],r=bu[3],mu(i,s,u,a,c,bu),s=bu[1],u=bu[2],a=bu[3]),e.bezierCurveTo(o,s,l,u,r,a)))},pointAt:function(e){return wu(this.shape,e,!1)},tangentAt:function(e){var t=wu(this.shape,e,!0);return ot.normalize(t,t)}}),Su=pl.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n=t.cx,i=t.cy,r=Math.max(t.r,0),a=t.startAngle,o=t.endAngle,s=t.clockwise,l=Math.cos(a),u=Math.sin(a);e.moveTo(l*r+n,u*r+i),e.arc(n,i,r,a,o,!s)}}),Ou=pl.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(),pl.prototype.getBoundingRect.call(this)}}),Mu=Ou,Du=function(e){this.colorStops=e||[]};Du.prototype={constructor:Du,addColorStop:function(e,t){this.colorStops.push({offset:e,color:t})}};var Au=Du,ku=function(e,t,n,i,r,a){this.x=null==e?0:e,this.y=null==t?0:t,this.x2=null==n?1:n,this.y2=null==i?0:i,this.type="linear",this.global=a||!1,Au.call(this,r)};ku.prototype={constructor:ku},Ye.inherits(ku,Au);var Iu=ku,Cu=function(e,t,n,i,r){this.x=null==e?.5:e,this.y=null==t?.5:t,this.r=null==n?.5:n,this.type="radial",this.global=r||!1,Au.call(this,i)};Cu.prototype={constructor:Cu},Ye.inherits(Cu,Au);var Eu=Cu,Nu=Ye.inherits;function Ru(e){ba.call(this,e),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}Ru.prototype.incremental=!0,Ru.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Ru.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.dirty()},Ru.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},Ru.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])},Ru.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}},Ru.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 Lu=[];Ru.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new ki(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(Lu)),e.union(i)}this._rect=e}return this._rect},Ru.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},Nu(Ru,ba);var Pu=Ta,zu=Ci,Yu=Pl,Hu=zl,Fu=Fl,Bu=jl,ju=nu,Uu=iu,Wu=hu,Gu=pu,Vu=Tu,qu=Su,Zu=Mu,Xu=Iu,Ku=Eu,$u=ki,Qu=Ru,Ju=Math.max,ec=Math.min,tc={},nc="emphasis",ic="normal",rc=1,ac={},oc={};function sc(e,t){oc[e]=t}function lc(e,t,n,i){var r=Nl.createFromString(e,t);return n&&("center"===i&&(n=uc(n,r.getBoundingRect())),hc(r,n)),r}function uc(e,t){var n,i=t.width/t.height,r=e.height*i;return n=r<=e.width?e.height:(r=e.width)/i,{x:e.x+e.width/2-r/2,y:e.y+e.height/2-n/2,width:r,height:n}}var cc=Nl.mergePath;function hc(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}var dc=lu.subPixelOptimize;function fc(e){return null!=e&&"none"!==e}var pc=Ye.createHashMap(),gc=0;function mc(e){var t=e.__hoverStl;if(t&&!e.__highlighted){var n=e.__zr,i=e.useHoverLayer&&n&&"canvas"===n.painter.type;if(e.__highlighted=i?"layer":"plain",!(e.isGroup||!n&&e.useHoverLayer)){var r=e,a=e.style;i&&(a=(r=n.addHover(e)).style),Ec(a),i||function(e){if(e.__hoverStlDirty){e.__hoverStlDirty=!1;var t=e.__hoverStl;if(t){var n=e.__cachedNormalStl={};e.__cachedNormalZ2=e.z2;var i=e.style;for(var r in t)null!=t[r]&&(n[r]=i[r]);n.fill=i.fill,n.stroke=i.stroke}else e.__cachedNormalStl=e.__cachedNormalZ2=null}}(r),a.extendFrom(t),vc(a,t,"fill"),vc(a,t,"stroke"),Cc(a),i||(e.dirty(!1),e.z2+=1)}}}function vc(e,t,n){!fc(t[n])&&fc(e[n])&&(e[n]=function(e){if("string"!=typeof e)return e;var t=pc.get(e);return t||(t=Un.lift(e,-.1),gc<1e4&&(pc.set(e,t),gc++)),t}(e[n]))}function yc(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&&(Ec(n),e.setStyle(i),Cc(n));var r=e.__cachedNormalZ2;null!=r&&e.z2-r==1&&(e.z2=r)}}function _c(e,t,n){var i,r=ic,a=ic;e.__highlighted&&(r=nc,i=!0),t(e,n),e.__highlighted&&(a=nc,i=!0),e.isGroup&&e.traverse((function(e){!e.isGroup&&t(e,n)})),i&&e.__highDownOnUpdate&&e.__highDownOnUpdate(r,a)}function xc(e,t){t=e.__hoverStl=!1!==t&&(e.hoverStyle||t||{}),e.__hoverStlDirty=!0,e.__highlighted&&(e.__cachedNormalStl=null,yc(e),mc(e))}function bc(e){!Oc(this,e)&&!this.__highByOuter&&_c(this,mc)}function wc(e){!Oc(this,e)&&!this.__highByOuter&&_c(this,yc)}function Tc(e){this.__highByOuter|=1<<(e||0),_c(this,mc)}function Sc(e){!(this.__highByOuter&=~(1<<(e||0)))&&_c(this,yc)}function Oc(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Mc(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",bc)[i]("mouseout",wc),e[i]("emphasis",Tc)[i]("normal",Sc),e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!n}}function Dc(e,t,n,i,r){return Ac(e,t,i,r),n&&Ye.extend(e,n),e}function Ac(e,t,n,i){if((n=n||tc).isRectText){var r;n.getTextPosition?r=n.getTextPosition(t,i):"outside"===(r=t.getShallow("position")||(i?null:"inside"))&&(r="top"),e.textPosition=r,e.textOffset=t.getShallow("offset");var a=t.getShallow("rotate");null!=a&&(a*=Math.PI/180),e.textRotation=a,e.textDistance=Ye.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||tc).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]);kc(o[c]={},h,l,n,i)}return e.rich=o,kc(e,t,l,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),e}function kc(e,t,n,i,r,a){n=!r&&n||tc,e.textFill=Ic(t.getShallow("color"),i)||n.color,e.textStroke=Ic(t.getShallow("textBorderColor"),i)||n.textBorderColor,e.textStrokeWidth=Ye.retrieve2(t.getShallow("textBorderWidth"),n.textBorderWidth),r||(a&&(e.insideRollbackOpt=i,Cc(e)),null==e.textFill&&(e.textFill=i.autoColor)),e.fontStyle=t.getShallow("fontStyle")||n.fontStyle,e.fontWeight=t.getShallow("fontWeight")||n.fontWeight,e.fontSize=t.getShallow("fontSize")||n.fontSize,e.fontFamily=t.getShallow("fontFamily")||n.fontFamily,e.textAlign=t.getShallow("align"),e.textVerticalAlign=t.getShallow("verticalAlign")||t.getShallow("baseline"),e.textLineHeight=t.getShallow("lineHeight"),e.textWidth=t.getShallow("width"),e.textHeight=t.getShallow("height"),e.textTag=t.getShallow("tag"),a&&i.disableBox||(e.textBackgroundColor=Ic(t.getShallow("backgroundColor"),i),e.textPadding=t.getShallow("padding"),e.textBorderColor=Ic(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 Ic(e,t){return"auto"!==e?e:t&&t.autoColor?t.autoColor:null}function Cc(e){var t,n=e.textPosition,i=e.insideRollbackOpt;if(i&&null==e.textFill){var r=i.autoColor,a=i.isRectText,o=i.useInsideStyle,s=!1!==o&&(!0===o||a&&n&&"string"==typeof n&&n.indexOf("inside")>=0),l=!s&&null!=r;(s||l)&&(t={textFill:e.textFill,textStroke:e.textStroke,textStrokeWidth:e.textStrokeWidth}),s&&(e.textFill="#fff",null==e.textStroke&&(e.textStroke=r,null==e.textStrokeWidth&&(e.textStrokeWidth=2))),l&&(e.textFill=r)}e.insideRollback=t}function Ec(e){var t=e.insideRollback;t&&(e.textFill=t.textFill,e.textStroke=t.textStroke,e.textStrokeWidth=t.textStrokeWidth,e.insideRollback=null)}function Nc(e,t,n,i,r,a){if("function"==typeof r&&(a=r,r=null),i&&i.isAnimationEnabled()){var o=e?"Update":"",s=i.getShallow("animationDuration"+o),l=i.getShallow("animationEasing"+o),u=i.getShallow("animationDelay"+o);"function"==typeof u&&(u=u(r,i.getAnimationDelayParams?i.getAnimationDelayParams(t,r):null)),"function"==typeof s&&(s=s(r)),s>0?t.animateTo(n,s,u||0,l,a,!!a):(t.stopAnimation(),t.attr(n),a&&a())}else t.stopAnimation(),t.attr(n),a&&a()}function Rc(e,t,n,i,r){Nc(!0,e,t,n,i,r)}function Lc(e,t,n){return t&&!Ye.isArrayLike(t)&&(t=hn.getLocalTransform(t)),n&&(t=tn.invert([],t)),ot.applyTransform([],e,t)}function Pc(e,t,n,i,r,a,o,s){var l,u=n-e,c=i-t,h=o-r,d=s-a,f=zc(h,d,u,c);if((l=f)<=1e-6&&l>=-1e-6)return!1;var p=e-r,g=t-a,m=zc(p,g,u,c)/f;if(m<0||m>1)return!1;var v=zc(p,g,h,d)/f;return!(v<0||v>1)}function zc(e,t,n,i){return e*i-n*t}sc("circle",zl),sc("sector",Fl),sc("ring",jl),sc("polygon",nu),sc("polyline",iu),sc("rect",hu),sc("line",pu),sc("bezierCurve",Tu),sc("arc",Su);var Yc=function(e,t,n){var i=new Ta({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var r={width:e.width,height:e.height};i.setStyle(uc(t,r))}}});return i},Hc=function(e){return lu.subPixelOptimizeLine(e.shape,e.shape,e.style),e},Fc=function(e){return lu.subPixelOptimizeRect(e.shape,e.shape,e.style),e},Bc=function(e,t,n){var i,r={isRectText:!0};!1===n?i=!0:r.autoColor=n,Ac(e,t,r,i)},jc=function(e,t,n){var i=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),r=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),a=["left"===e?-i:"right"===e?i:0,"top"===e?-r:"bottom"===e?r:0];return a=Lc(a,t,n),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},Uc=function(e,t){return Ye.map(e,(function(e){var n=e[0];n=Ju(n,t.x),n=ec(n,t.x+t.width);var i=e[1];return i=Ju(i,t.y),[n,i=ec(i,t.y+t.height)]}))},Wc=function(e,t,n){var i=(t=Ye.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),Ye.defaults(i,n),new Ta(t)):lc(e.replace("path://",""),t,n,"center")},Gc=function(e,t,n,i,r){for(var a=0,o=r[r.length-1];a<r.length;a++){var s=r[a];if(Pc(e,t,n,i,s[0],s[1],o[0],o[1]))return!0;o=s}},Vc={Image:Pu,Group:zu,Text:Yu,Circle:Hu,Sector:Fu,Ring:Bu,Polygon:ju,Polyline:Uu,Rect:Wu,Line:Gu,BezierCurve:Vu,Arc:qu,CompoundPath:Zu,LinearGradient:Xu,RadialGradient:Ku,BoundingRect:$u,IncrementalDisplayable:Qu,Z2_EMPHASIS_LIFT:1,CACHED_LABEL_STYLE_PROPERTIES:{color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},extendShape:function(e){return pl.extend(e)},extendPath:function(e,t){return Nl.extendFromString(e,t)},registerShape:sc,getShapeClass:function(e){if(oc.hasOwnProperty(e))return oc[e]},makePath:lc,makeImage:Yc,mergePath:cc,resizePath:hc,subPixelOptimizeLine:Hc,subPixelOptimizeRect:Fc,subPixelOptimize:dc,setElementHoverStyle:xc,setHoverStyle:function(e,t){Mc(e,!0),_c(e,xc,t)},setAsHighDownDispatcher:Mc,isHighDownDispatcher:function(e){return!(!e||!e.__highDownDispatcher)},getHighlightDigit:function(e){var t=ac[e];return null==t&&rc<=32&&(t=ac[e]=rc++),t},setLabelStyle:function(e,t,n,i,r,a,o){var s,l=(r=r||tc).labelFetcher,u=r.labelDataIndex,c=r.labelDimIndex,h=r.labelProp,d=n.getShallow("show"),f=i.getShallow("show");(d||f)&&(l&&(s=l.getFormattedLabel(u,"normal",null,c,h)),null==s&&(s=Ye.isFunction(r.defaultText)?r.defaultText(u,r):r.defaultText));var p=d?s:null,g=f?Ye.retrieve2(l?l.getFormattedLabel(u,"emphasis",null,c,h):null,s):null;null==p&&null==g||(Dc(e,n,a,r),Dc(t,i,o,r,!0)),e.text=p,t.text=g},modifyLabelStyle:function(e,t,n){var i=e.style;t&&(Ec(i),e.setStyle(t),Cc(i)),i=e.__hoverStl,n&&i&&(Ec(i),Ye.extend(i,n),Cc(i))},setTextStyle:Dc,setText:Bc,getFont:function(e,t){var n=t&&t.getModel("textStyle");return Ye.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:Rc,initProps:function(e,t,n,i,r){Nc(!1,e,t,n,i,r)},getTransform:function(e,t){for(var n=tn.identity([]);e&&e!==t;)tn.mul(n,e.getLocalTransform(),n),e=e.parent;return n},applyTransform:Lc,transformDirection:jc,groupTransition:function(e,t,n,i){if(e&&t){var r,a=(r={},e.traverse((function(e){!e.isGroup&&e.anid&&(r[e.anid]=e)})),r);t.traverse((function(e){if(!e.isGroup&&e.anid){var t=a[e.anid];if(t){var i=o(e);e.attr(o(t)),Rc(e,i,n,e.dataIndex)}}}))}function o(e){var t={position:ot.clone(e.position),rotation:e.rotation};return e.shape&&(t.shape=Ye.extend({},e.shape)),t}},clipPointsByRect:Uc,clipRectByRect:function(e,t){var n=Ju(e.x,t.x),i=ec(e.x+e.width,t.x+t.width),r=Ju(e.y,t.y),a=ec(e.y+e.height,t.y+t.height);if(i>=n&&a>=r)return{x:n,y:r,width:i-n,height:a-r}},createIcon:Wc,linePolygonIntersect:Gc,lineLineIntersect:Pc},qc=["textStyle","color"],Zc={getTextColor:function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(qc):null)},getFont:function(){return Vc.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(e){return Yr.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"))}},Xc=Zc,Kc=Yo([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),$c={getItemStyle:function(e,t){var n=Kc(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]}},Qc=$c,Jc=ko.makeInner,eh=zo.enableClassExtend,th=zo.enableClassCheck,nh=Ye.mixin,ih=Jc();function rh(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}function ah(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 oh(e,t){var n=ih(e).getParent;return n?n.call(e,t):e.parentModel}rh.prototype={constructor:rh,init:null,mergeOption:function(e){Ye.merge(this.option,e,!0)},get:function(e,t){return null==e?this.option:ah(this.option,this.parsePath(e),!t&&oh(this,e))},getShallow:function(e,t){var n=this.option,i=null==n?n:n[e],r=!t&&oh(this,e);return null==i&&r&&(i=r.getShallow(e)),i},getModel:function(e,t){var n;return new rh(null==e?this.option:ah(this.option,e=this.parsePath(e)),t=t||(n=oh(this,e))&&n.getModel(e),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(Ye.clone(this.option))},setReadOnly:function(e){},parsePath:function(e){return"string"==typeof e&&(e=e.split(".")),e},customizeGetParent:function(e){ih(this).getParent=e},isAnimationEnabled:function(){if(!te.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},eh(rh),th(rh),nh(rh,Bo),nh(rh,Uo),nh(rh,Xc),nh(rh,Qc);var sh=rh,lh=zo.parseClassType,uh=0;var ch={getUID:function(e){return[e||"",uh++,Math.random().toFixed(5)].join("_")},enableSubTypeDefaulter:function(e){var t={};return e.registerSubTypeDefaulter=function(e,n){e=lh(e),t[e.main]=n},e.determineSubType=function(n,i){var r=i.type;if(!r){var a=lh(n).main;e.hasSubTypes(n)&&t[a]&&(r=t[a](i))}return r},e},enableTopologicalTravel:function(e,t){function n(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}e.topologicalTravel=function(e,i,r,a){if(e.length){var o=function(e){var i={},r=[];return Ye.each(e,(function(a){var o=n(i,a),s=function(e,t){var n=[];return Ye.each(e,(function(e){Ye.indexOf(t,e)>=0&&n.push(e)})),n}(o.originalDeps=t(a),e);o.entryCount=s.length,0===o.entryCount&&r.push(a),Ye.each(s,(function(e){Ye.indexOf(o.predecessor,e)<0&&o.predecessor.push(e);var t=n(i,e);Ye.indexOf(t.successor,e)<0&&t.successor.push(a)}))})),{graph:i,noEntryList:r}}(i),s=o.graph,l=o.noEntryList,u={};for(Ye.each(e,(function(e){u[e]=!0}));l.length;){var c=l.pop(),h=s[c],d=!!u[c];d&&(r.call(a,c,h.originalDeps.slice()),delete u[c]),Ye.each(h.successor,d?p:f)}Ye.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)}}}},hh=1e-4;var dh=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function fh(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 ph=function(e,t,n,i){var r=t[1]-t[0],a=n[1]-n[0];if(0===r)return 0===a?n[0]:(n[0]+n[1])/2;if(i)if(r>0){if(e<=t[0])return n[0];if(e>=t[1])return n[1]}else{if(e>=t[0])return n[0];if(e<=t[1])return n[1]}else{if(e===t[0])return n[0];if(e===t[1])return n[1]}return(e-t[0])/r*a+n[0]},gh=function(e,t){var n=Math.log,i=Math.LN10,r=Math.floor(n(e[1]-e[0])/i),a=Math.round(n(Math.abs(t[1]-t[0]))/i),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20},mh=function(e,t,n){if(!e[t])return 0;var i=Ye.reduce(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===i)return 0;for(var r=Math.pow(10,n),a=Ye.map(e,(function(e){return(isNaN(e)?0:e)/i*r*100})),o=100*r,s=Ye.map(a,(function(e){return Math.floor(e)})),l=Ye.reduce(s,(function(e,t){return e+t}),0),u=Ye.map(a,(function(e,t){return e-s[t]}));l<o;){for(var c=Number.NEGATIVE_INFINITY,h=null,d=0,f=u.length;d<f;++d)u[d]>c&&(c=u[d],h=d);++s[h],u[h]=0,++l}return s[t]/r},vh=function(e,t){var n=fh(e),i=Math.pow(10,n),r=e/i;return e=(t?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+e.toFixed(n<0?-n:0):e},yh=function(e,t){var n=(e.length-1)*t+1,i=Math.floor(n),r=+e[i-1],a=n-i;return a?r+a*(e[i]-r):r},_h=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 r=e[i].interval,a=e[i].close,o=0;o<2;o++)r[o]<=t&&(r[o]=t,a[o]=o?1:1-n),t=r[o],n=a[o];r[0]===r[1]&&a[0]*a[1]!=1?e.splice(i,1):i++}return e;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))}},xh=function(e){return e-parseFloat(e)>=0},bh={linearMap:ph,parsePercent:function(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return"string"==typeof e?(n=e,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e;var n},round:function(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e},asc:function(e){return e.sort((function(e,t){return e-t})),e},getPrecision:function(e){if(e=+e,isNaN(e))return 0;for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n},getPrecisionSafe:function(e){var t=e.toString(),n=t.indexOf("e");if(n>0){var i=+t.slice(n+1);return i<0?-i:0}var r=t.indexOf(".");return r<0?0:t.length-1-r},getPixelPrecision:gh,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<hh},parseDate:function(e){if(e instanceof Date)return e;if("string"==typeof e){var t=dh.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,fh(e))},quantityExponent:fh,nice:vh,quantile:yh,reformIntervals:_h,isNumeric:xh};var wh=Ye.normalizeCssArray,Th=/([&<>"'])/g,Sh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Oh(e){return null==e?"":(e+"").replace(Th,(function(e,t){return Sh[t]}))}var Mh=["a","b","c","d","e","f","g"],Dh=function(e,t){return"{"+e+(null==t?"":t)+"}"};function Ah(e,t){return"0000".substr(0,t-(e+="").length)+e}var kh=function(e,t,n){Ye.isArray(t)||(t=[t]);var i=t.length;if(!i)return"";for(var r=t[0].$vars||[],a=0;a<r.length;a++){var o=Mh[a];e=e.replace(Dh(o),Dh(o,0))}for(var s=0;s<i;s++)for(var l=0;l<r.length;l++){var u=t[s][r[l]];e=e.replace(Dh(Mh[l],s),n?Oh(u):u)}return e},Ih=function(e,t,n){return Ye.each(t,(function(t,i){e=e.replace("{"+i+"}",n?Oh(t):t)})),e},Ch=function(e,t){var n=(e=Ye.isString(e)?{color:e,extraCssText:t}:e||{}).color,i=e.type,r=(t=e.extraCssText,e.renderMode||"html"),a=e.markerId||"X";return n?"html"===r?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Oh(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Oh(n)+";"+(t||"")+'"></span>':{renderMode:r,content:"{marker"+a+"|}  ",style:{color:n}}:""},Eh=function(e,t,n){"week"!==e&&"month"!==e&&"quarter"!==e&&"half-year"!==e&&"year"!==e||(e="MM-dd\nyyyy");var i=bh.parseDate(t),r=n?"UTC":"",a=i["get"+r+"FullYear"](),o=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),u=i["get"+r+"Minutes"](),c=i["get"+r+"Seconds"](),h=i["get"+r+"Milliseconds"]();return e=e.replace("MM",Ah(o,2)).replace("M",o).replace("yyyy",a).replace("yy",a%100).replace("dd",Ah(s,2)).replace("d",s).replace("hh",Ah(l,2)).replace("h",l).replace("mm",Ah(u,2)).replace("m",u).replace("ss",Ah(c,2)).replace("s",c).replace("SSS",Ah(h,3))},Nh=function(e,t,n,i,r,a,o,s){return Yr.getBoundingRect(e,t,n,i,r,s,a,o)},Rh={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:wh,encodeHTML:Oh,formatTpl:kh,formatTplSimple:Ih,getTooltipMarker:Ch,formatTime:Eh,capitalFirst:function(e){return e?e.charAt(0).toUpperCase()+e.substr(1):e},truncateText:Yr.truncateText,getTextBoundingRect:function(e){return Yr.getBoundingRect(e.text,e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich,e.truncate)},getTextRect:Nh,windowOpen:function(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location=e}else window.open(e,t)}},Lh=bh.parsePercent,Ph=Ye.each,zh=["left","right","top","bottom","width","height"],Yh=[["width","left","right"],["height","top","bottom"]];function Hh(e,t,n,i,r){var a=0,o=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;t.eachChild((function(l,u){var c,h,d=l.position,f=l.getBoundingRect(),p=t.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===e){var m=f.width+(g?-g.x+f.x:0);(c=a+m)>i||l.newline?(a=0,c=m,o+=s+n,s=f.height):s=Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(h=o+v)>r||l.newline?(a+=s+n,o=0,h=v,s=f.width):s=Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===e?a=c+n:o=h+n)}))}var Fh=Hh,Bh=Ye.curry(Hh,"vertical"),jh=Ye.curry(Hh,"horizontal");function Uh(e,t,n){n=Rh.normalizeCssArray(n||0);var i=t.width,r=t.height,a=Lh(e.left,i),o=Lh(e.top,r),s=Lh(e.right,i),l=Lh(e.bottom,r),u=Lh(e.width,i),c=Lh(e.height,r),h=n[2]+n[0],d=n[1]+n[3],f=e.aspect;switch(isNaN(u)&&(u=i-s-d-a),isNaN(c)&&(c=r-l-h-o),null!=f&&(isNaN(u)&&isNaN(c)&&(f>i/r?u=.8*i:c=.8*r),isNaN(u)&&(u=f*c),isNaN(c)&&(c=u/f)),isNaN(a)&&(a=i-s-u-d),isNaN(o)&&(o=r-l-c-h),e.left||e.right){case"center":a=i/2-u/2-n[3];break;case"right":a=i-u-d}switch(e.top||e.bottom){case"middle":case"center":o=r/2-c/2-n[0];break;case"bottom":o=r-c-h}a=a||0,o=o||0,isNaN(u)&&(u=i-d-a-(s||0)),isNaN(c)&&(c=r-h-o-(l||0));var p=new ki(a+n[3],o+n[0],u,c);return p.margin=n,p}function Wh(e,t){return t&&e&&Ph(zh,(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}var Gh=function(e,t,n,i,r){var a=!r||!r.hv||r.hv[0],o=!r||!r.hv||r.hv[1],s=r&&r.boundingMode||"all";if(a||o){var l;if("raw"===s)l="group"===e.type?new ki(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=Uh(Ye.defaults({width:l.width,height:l.height},t),n,i);var c=e.position,h=a?t.x-l.x:0,d=o?t.y-l.y:0;e.attr("position","raw"===s?[h,d]:[c[0]+h,c[1]+d])}},Vh=function(e,t,n){!Ye.isObject(n)&&(n={});var i=n.ignoreSize;!Ye.isArray(i)&&(i=[i,i]);var r=o(Yh[0],0),a=o(Yh[1],1);function o(n,r){var a={},o=0,u={},c=0;if(Ph(n,(function(t){u[t]=e[t]})),Ph(n,(function(e){s(t,e)&&(a[e]=u[e]=t[e]),l(a,e)&&o++,l(u,e)&&c++})),i[r])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&o){if(o>=2)return a;for(var h=0;h<n.length;h++){var d=n[h];if(!s(a,d)&&s(e,d)){a[d]=e[d];break}}return a}return u}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){Ph(e,(function(e){t[e]=n[e]}))}u(Yh[0],e,r),u(Yh[1],e,a)},qh={LOCATION_PARAMS:zh,HV_NAMES:Yh,box:Fh,vbox:Bh,hbox:jh,getAvailableSize:function(e,t,n){var i=t.width,r=t.height,a=Lh(e.x,i),o=Lh(e.y,r),s=Lh(e.x2,i),l=Lh(e.y2,r);return(isNaN(a)||isNaN(parseFloat(e.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(e.x2)))&&(s=i),(isNaN(o)||isNaN(parseFloat(e.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(e.y2)))&&(l=r),n=Rh.normalizeCssArray(n||0),{width:Math.max(s-a-n[1]-n[3],0),height:Math.max(l-o-n[0]-n[2],0)}},getLayoutRect:Uh,positionElement:Gh,sizeCalculable:function(e,t){return null!=e[Yh[t][0]]||null!=e[Yh[t][1]]&&null!=e[Yh[t][2]]},mergeLayoutParam:Vh,getLayoutParams:function(e){return Wh({},e)},copyLayoutParams:Wh},Zh={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")}}},Xh=zo.enableClassManagement,Kh=zo.parseClassType,$h=(0,ko.makeInner)(),Qh=sh.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(e,t,n,i){sh.call(this,e,t,n,i),this.uid=ch.getUID("ec_cpt_model")},init:function(e,t,n,i){this.mergeDefaultAndTheme(e,n)},mergeDefaultAndTheme:function(e,t){var n=this.layoutMode,i=n?qh.getLayoutParams(e):{},r=t.getTheme();Ye.merge(e,r.get(this.mainType)),Ye.merge(e,this.getDefaultOption()),n&&qh.mergeLayoutParam(e,i,n)},mergeOption:function(e,t){Ye.merge(this.option,e,!0);var n=this.layoutMode;n&&qh.mergeLayoutParam(this.option,e,n)},optionUpdated:function(e,t){},getDefaultOption:function(){var e=$h(this);if(!e.defaultOption){for(var t=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&t.push(i),n=n.superClass}for(var r={},a=t.length-1;a>=0;a--)r=Ye.merge(r,t[a],!0);e.defaultOption=r}return e.defaultOption},getReferringComponents:function(e){return this.ecModel.queryComponents({mainType:e,index:this.get(e+"Index",!0),id:this.get(e+"Id",!0)})}});Xh(Qh,{registerWhenExtend:!0}),ch.enableSubTypeDefaulter(Qh),ch.enableTopologicalTravel(Qh,(function(e){var t=[];Ye.each(Qh.getClassesByMainType(e),(function(e){t=t.concat(e.prototype.dependencies||[])})),t=Ye.map(t,(function(e){return Kh(e).main})),"dataset"!==e&&Ye.indexOf(t,"dataset")<=0&&t.unshift("dataset");return t})),Ye.mixin(Qh,Zh);var Jh=Qh,ed="";"undefined"!=typeof navigator&&(ed=navigator.platform||"");var td={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:ed.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},nd=ko.makeInner,id=ko.normalizeToArray,rd=nd();var ad={clearColorPalette:function(){rd(this).colorIdx=0,rd(this).colorNameMap={}},getColorFromPalette:function(e,t,n){var i=rd(t=t||this),r=i.colorIdx||0,a=i.colorNameMap=i.colorNameMap||{};if(a.hasOwnProperty(e))return a[e];var o=id(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?function(e,t){for(var n=e.length,i=0;i<n;i++)if(e[i].length>t)return e[i];return e[n-1]}(s,n):o;if((l=l||o)&&l.length){var u=l[r];return e&&(a[e]=u),i.colorIdx=(r+1)%l.length,u}}},od=ad,sd={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"},ld=Ye.createHashMap,ud=Ye.isTypedArray,cd=zo.enableClassCheck,hd=sd.SOURCE_FORMAT_ORIGINAL,dd=sd.SERIES_LAYOUT_BY_COLUMN,fd=sd.SOURCE_FORMAT_UNKNOWN,pd=sd.SOURCE_FORMAT_TYPED_ARRAY,gd=sd.SOURCE_FORMAT_KEYED_COLUMNS;function md(e){this.fromDataset=e.fromDataset,this.data=e.data||(e.sourceFormat===gd?{}:[]),this.sourceFormat=e.sourceFormat||fd,this.seriesLayoutBy=e.seriesLayoutBy||dd,this.dimensionsDefine=e.dimensionsDefine,this.encodeDefine=e.encodeDefine&&ld(e.encodeDefine),this.startIndex=e.startIndex||0,this.dimensionsDetectCount=e.dimensionsDetectCount}md.seriesDataToSource=function(e){return new md({data:e,sourceFormat:ud(e)?pd:hd,fromDataset:!1})},cd(md);var vd=md,yd=ko.makeInner,_d=ko.getDataItemValue,xd=Ye.createHashMap,bd=Ye.each,wd=Ye.map,Td=Ye.isArray,Sd=Ye.isString,Od=Ye.isObject,Md=Ye.isTypedArray,Dd=Ye.isArrayLike,Ad=Ye.extend,kd=sd.SOURCE_FORMAT_ORIGINAL,Id=sd.SOURCE_FORMAT_ARRAY_ROWS,Cd=sd.SOURCE_FORMAT_OBJECT_ROWS,Ed=sd.SOURCE_FORMAT_KEYED_COLUMNS,Nd=sd.SOURCE_FORMAT_UNKNOWN,Rd=sd.SOURCE_FORMAT_TYPED_ARRAY,Ld=sd.SERIES_LAYOUT_BY_ROW,Pd={Must:1,Might:2,Not:3},zd=yd();function Yd(e){if(e){var t=xd();return wd(e,(function(e,n){if(null==(e=Ad({},Od(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 Hd(e,t,n,i){if(null==i&&(i=1/0),t===Ld)for(var r=0;r<n.length&&r<i;r++)e(n[r]?n[r][0]:null,r);else{var a=n[0]||[];for(r=0;r<a.length&&r<i;r++)e(a[r],r)}}function Fd(e){var t=e.option;if(!t.data)return e.ecModel.getComponent("dataset",t.datasetIndex||0)}function Bd(e,t,n,i,r,a){var o,s,l;if(Md(e))return Pd.Not;if(i){var u=i[a];Od(u)?(s=u.name,l=u.type):Sd(u)&&(s=u)}if(null!=l)return"ordinal"===l?Pd.Must:Pd.Not;if(t===Id)if(n===Ld){for(var c=e[a],h=0;h<(c||[]).length&&h<5;h++)if(null!=(o=g(c[r+h])))return o}else for(h=0;h<e.length&&h<5;h++){var d=e[r+h];if(d&&null!=(o=g(d[a])))return o}else if(t===Cd){if(!s)return Pd.Not;for(h=0;h<e.length&&h<5;h++){if((f=e[h])&&null!=(o=g(f[s])))return o}}else if(t===Ed){if(!s)return Pd.Not;if(!(c=e[s])||Md(c))return Pd.Not;for(h=0;h<c.length&&h<5;h++)if(null!=(o=g(c[h])))return o}else if(t===kd)for(h=0;h<e.length&&h<5;h++){var f=e[h],p=_d(f);if(!Td(p))return Pd.Not;if(null!=(o=g(p[a])))return o}function g(e){var t=Sd(e);return null!=e&&isFinite(e)&&""!==e?t?Pd.Might:Pd.Not:t&&"-"!==e?Pd.Must:void 0}return Pd.Not}var jd=function(e){var t=e.option.source,n=Nd;if(Md(t))n=Rd;else if(Td(t)){0===t.length&&(n=Id);for(var i=0,r=t.length;i<r;i++){var a=t[i];if(null!=a){if(Td(a)){n=Id;break}if(Od(a)){n=Cd;break}}}}else if(Od(t)){for(var o in t)if(t.hasOwnProperty(o)&&Dd(t[o])){n=Ed;break}}else if(null!=t)throw new Error("Invalid data");zd(e).sourceFormat=n},Ud=function(e,t,n){var i={},r=Fd(t);if(!r||!e)return i;var a,o,s=[],l=[],u=t.ecModel,c=zd(u).datasetMap,h=r.uid+"_"+n.seriesLayoutBy;e=e.slice(),bd(e,(function(t,n){!Od(t)&&(e[n]={name:t}),"ordinal"===t.type&&null==a&&(a=n,o=p(e[n])),i[t.name]=[]}));var d=c.get(h)||c.set(h,{categoryWayDim:o,valueWayDim:0});function f(e,t,n){for(var i=0;i<n;i++)e.push(t+i)}function p(e){var t=e.dimsDef;return t?t.length:1}return bd(e,(function(e,t){var n=e.name,r=p(e);if(null==a){var o=d.valueWayDim;f(i[n],o,r),f(l,o,r),d.valueWayDim+=r}else if(a===t)f(i[n],0,r),f(s,0,r);else{o=d.categoryWayDim;f(i[n],o,r),f(l,o,r),d.categoryWayDim+=r}})),s.length&&(i.itemName=s),l.length&&(i.seriesName=l),i},Wd=function(e,t,n){var i={};if(!Fd(e))return i;var r,a=t.sourceFormat,o=t.dimensionsDefine;a!==Cd&&a!==Ed||bd(o,(function(e,t){"name"===(Od(e)?e.name:e)&&(r=t)}));var s=function(){for(var e={},i={},s=[],l=0,u=Math.min(5,n);l<u;l++){var c=Bd(t.data,a,t.seriesLayoutBy,o,t.startIndex,l);s.push(c);var h=c===Pd.Not;if(h&&null==e.v&&l!==r&&(e.v=l),(null==e.n||e.n===e.v||!h&&s[e.n]===Pd.Not)&&(e.n=l),d(e)&&s[e.n]!==Pd.Not)return e;h||(c===Pd.Might&&null==i.v&&l!==r&&(i.v=l),null!=i.n&&i.n!==i.v||(i.n=l))}function d(e){return null!=e.v&&null!=e.n}return d(e)?e:d(i)?i:null}();if(s){i.value=s.v;var l=null!=r?r:s.n;i.itemName=[l],i.seriesName=[l]}return i},Gd={BE_ORDINAL:Pd,detectSourceFormat:jd,getSource:function(e){return zd(e).source},resetSourceDefaulter:function(e){zd(e).datasetMap=xd()},prepareSource:function(e){var t=e.option,n=t.data,i=Md(n)?Rd:kd,r=!1,a=t.seriesLayoutBy,o=t.sourceHeader,s=t.dimensions,l=Fd(e);if(l){var u=l.option;n=u.source,i=zd(l).sourceFormat,r=!0,a=a||u.seriesLayoutBy,null==o&&(o=u.sourceHeader),s=s||u.dimensions}var c=function(e,t,n,i,r){if(!e)return{dimensionsDefine:Yd(r)};var a,o;if(t===Id)"auto"===i||null==i?Hd((function(e){null!=e&&"-"!==e&&(Sd(e)?null==o&&(o=1):o=0)}),n,e,10):o=i?1:0,r||1!==o||(r=[],Hd((function(e,t){r[t]=null!=e?e:""}),n,e)),a=r?r.length:n===Ld?e.length:e[0]?e[0].length:null;else if(t===Cd)r||(r=function(e){var t,n=0;for(;n<e.length&&!(t=e[n++]););if(t){var i=[];return bd(t,(function(e,t){i.push(t)})),i}}(e));else if(t===Ed)r||(r=[],bd(e,(function(e,t){r.push(t)})));else if(t===kd){var s=_d(e[0]);a=Td(s)&&s.length||1}return{startIndex:o,dimensionsDefine:Yd(r),dimensionsDetectCount:a}}(n,i,a,o,s);zd(e).source=new vd({data:n,fromDataset:r,seriesLayoutBy:a,sourceFormat:i,dimensionsDefine:c.dimensionsDefine,startIndex:c.startIndex,dimensionsDetectCount:c.dimensionsDetectCount,encodeDefine:t.encode})},makeSeriesEncodeForAxisCoordSys:Ud,makeSeriesEncodeForNameBased:Wd,guessOrdinal:function(e,t){return Bd(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}},Vd=Ye.each,qd=Ye.filter,Zd=Ye.map,Xd=Ye.isArray,Kd=Ye.indexOf,$d=Ye.isObject,Qd=Ye.isString,Jd=Ye.createHashMap,ef=Ye.assert,tf=Ye.clone,nf=Ye.merge,rf=Ye.extend,af=Ye.mixin,of=Gd.resetSourceDefaulter,sf="\0_ec_inner",lf=sh.extend({init:function(e,t,n,i){n=n||{},this.option=null,this._theme=new sh(n),this._optionManager=i},setOption:function(e,t){ef(!(sf 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)):uf.call(this,i),t=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var r=n.getTimelineOption(this);r&&(this.mergeOption(r),t=!0)}if(!e||"recreate"===e||"media"===e){var a=n.getMediaOption(this,this._api);a.length&&Vd(a,(function(e){this.mergeOption(e,t=!0)}),this)}return t},mergeOption:function(e){var t=this.option,n=this._componentsMap,i=[];of(this),Vd(e,(function(e,n){null!=e&&(Jh.hasClass(n)?n&&i.push(n):t[n]=null==t[n]?tf(e):nf(t[n],e,!0))})),Jh.topologicalTravel(i,Jh.getAllClassMainTypes(),(function(i,r){var a=ko.normalizeToArray(e[i]),o=ko.mappingToExists(n.get(i),a);ko.makeIdAndName(o),Vd(o,(function(e,t){var n=e.option;$d(n)&&(e.keyInfo.mainType=i,e.keyInfo.subType=function(e,t,n){var i=t.type?t.type:n?n.subType:Jh.determineSubType(e,t);return i}(i,n,e.exist))}));var s=function(e,t){Xd(t)||(t=t?[t]:[]);var n={};return Vd(t,(function(t){n[t]=(e.get(t)||[]).slice()})),n}(n,r);t[i]=[],n.set(i,[]),Vd(o,(function(e,r){var a=e.exist,o=e.option;if(ef($d(o)||a,"Empty component definition"),o){var l=Jh.getClass(i,e.keyInfo.subType,!0);if(a&&a.constructor===l)a.name=e.keyInfo.name,a.mergeOption(o,this),a.optionUpdated(o,!1);else{var u=rf({dependentModels:s,componentIndex:r},e.keyInfo);a=new l(o,this,this,u),rf(a,u),a.init(o,this,this,u),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);n.get(i)[r]=a,t[i][r]=a.option}),this),"series"===i&&cf(this,n.get("series"))}),this),this._seriesIndicesMap=Jd(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var e=tf(this.option);return Vd(e,(function(t,n){if(Jh.hasClass(n)){for(var i=(t=ko.normalizeToArray(t)).length-1;i>=0;i--)ko.isIdInner(t[i])&&t.splice(i,1);e[n]=t}})),delete e[sf],e},getTheme:function(){return this._theme},getComponent:function(e,t){var n=this._componentsMap.get(e);if(n)return n[t||0]},queryComponents:function(e){var t=e.mainType;if(!t)return[];var n,i=e.index,r=e.id,a=e.name,o=this._componentsMap.get(t);if(!o||!o.length)return[];if(null!=i)Xd(i)||(i=[i]),n=qd(Zd(i,(function(e){return o[e]})),(function(e){return!!e}));else if(null!=r){var s=Xd(r);n=qd(o,(function(e){return s&&Kd(r,e.id)>=0||!s&&e.id===r}))}else if(null!=a){var l=Xd(a);n=qd(o,(function(e){return l&&Kd(a,e.name)>=0||!l&&e.name===a}))}else n=o.slice();return hf(n,e)},findComponents:function(e){var t,n,i,r,a,o=e.query,s=e.mainType,l=(n=s+"Index",i=s+"Id",r=s+"Name",!(t=o)||null==t[n]&&null==t[i]&&null==t[r]?null:{mainType:s,index:t[n],id:t[i],name:t[r]}),u=l?this.queryComponents(l):this._componentsMap.get(s);return a=hf(u,e),e.filter?qd(a,e.filter):a},eachComponent:function(e,t,n){var i=this._componentsMap;if("function"==typeof e)n=t,t=e,i.each((function(e,i){Vd(e,(function(e,r){t.call(n,i,e,r)}))}));else if(Qd(e))Vd(i.get(e),t,n);else if($d(e)){var r=this.findComponents(e);Vd(r,t,n)}},getSeriesByName:function(e){var t=this._componentsMap.get("series");return qd(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 qd(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){Vd(this._seriesIndices,(function(n){var i=this._componentsMap.get("series")[n];e.call(t,i,n)}),this)},eachRawSeries:function(e,t){Vd(this._componentsMap.get("series"),e,t)},eachSeriesByType:function(e,t,n){Vd(this._seriesIndices,(function(i){var r=this._componentsMap.get("series")[i];r.subType===e&&t.call(n,r,i)}),this)},eachRawSeriesByType:function(e,t,n){return Vd(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){cf(this,qd(this._componentsMap.get("series"),e,t))},restoreData:function(e){var t=this._componentsMap;cf(this,t.get("series"));var n=[];t.each((function(e,t){n.push(t)})),Jh.topologicalTravel(n,Jh.getAllClassMainTypes(),(function(n,i){Vd(t.get(n),(function(t){("series"!==n||!function(e,t){if(t){var n=t.seiresIndex,i=t.seriesId,r=t.seriesName;return null!=n&&e.componentIndex!==n||null!=i&&e.id!==i||null!=r&&e.name!==r}}(t,e))&&t.restoreData()}))}))}});function uf(e){this.option={},this.option[sf]=1,this._componentsMap=Jd({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(e,t){var n=e.color&&!e.colorLayer;Vd(t,(function(t,i){"colorLayer"===i&&n||Jh.hasClass(i)||("object"==typeof t?e[i]=e[i]?nf(e[i],t,!1):tf(t):null==e[i]&&(e[i]=t))}))}(e,this._theme.option),nf(e,td,!1),this.mergeOption(e)}function cf(e,t){e._seriesIndicesMap=Jd(e._seriesIndices=Zd(t,(function(e){return e.componentIndex}))||[])}function hf(e,t){return t.hasOwnProperty("subType")?qd(e,(function(e){return e.subType===t.subType})):e}af(lf,od);var df=lf,ff=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var pf=function(e){Ye.each(ff,(function(t){this[t]=Ye.bind(e[t],e)}),this)},gf={};function mf(){this._coordinateSystems=[]}mf.prototype={constructor:mf,create:function(e,t){var n=[];Ye.each(gf,(function(i,r){var a=i.create(e,t);n=n.concat(a||[])})),this._coordinateSystems=n},update:function(e,t){Ye.each(this._coordinateSystems,(function(n){n.update&&n.update(e,t)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},mf.register=function(e,t){gf[e]=t},mf.get=function(e){return gf[e]};var vf=mf,yf=Ye.each,_f=Ye.clone,xf=Ye.map,bf=Ye.merge,wf=/^(min|max)?(.+)$/;function Tf(e){this._api=e,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Sf(e,t,n){var i,r,a=[],o=[],s=e.timeline;if(e.baseOption&&(r=e.baseOption),(s||e.options)&&(r=r||{},a=(e.options||[]).slice()),e.media){r=r||{};var l=e.media;yf(l,(function(e){e&&e.option&&(e.query?o.push(e):i||(i=e))}))}return r||(r=e),r.timeline||(r.timeline=s),yf([r].concat(a).concat(Ye.map(o,(function(e){return e.option}))),(function(e){yf(t,(function(t){t(e,n)}))})),{baseOption:r,timelineOptions:a,mediaDefault:i,mediaList:o}}function Of(e,t,n){var i={width:t,height:n,aspectratio:t/n},r=!0;return Ye.each(e,(function(e,t){var n=t.match(wf);if(n&&n[1]&&n[2]){var a=n[1],o=n[2].toLowerCase();(function(e,t,n){return"min"===n?e>=t:"max"===n?e<=t:e===t})(i[o],e,a)||(r=!1)}})),r}Tf.prototype={constructor:Tf,setOption:function(e,t){e&&Ye.each(ko.normalizeToArray(e.series),(function(e){e&&e.data&&Ye.isTypedArray(e.data)&&Ye.setAsPrimitive(e.data)})),e=_f(e);var n,i,r=this._optionBackup,a=Sf.call(this,e,t,!r);this._newBaseOption=a.baseOption,r?(n=r.baseOption,i=a.baseOption,yf(i=i||{},(function(e,t){if(null!=e){var i=n[t];if(Jh.hasClass(t)){e=ko.normalizeToArray(e),i=ko.normalizeToArray(i);var r=ko.mappingToExists(i,e);n[t]=xf(r,(function(e){return e.option&&e.exist?bf(e.exist,e.option,!0):e.exist||e.option}))}else n[t]=bf(i,e,!0)}})),a.timelineOptions.length&&(r.timelineOptions=a.timelineOptions),a.mediaList.length&&(r.mediaList=a.mediaList),a.mediaDefault&&(r.mediaDefault=a.mediaDefault)):this._optionBackup=a},mountOption:function(e){var t=this._optionBackup;return this._timelineOptions=xf(t.timelineOptions,_f),this._mediaList=xf(t.mediaList,_f),this._mediaDefault=_f(t.mediaDefault),this._currentMediaIndices=[],_f(e?t.baseOption:this._newBaseOption)},getTimelineOption:function(e){var t,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(t=_f(n[i.getCurrentIndex()],!0))}return t},getMediaOption:function(e){var t,n,i=this._api.getWidth(),r=this._api.getHeight(),a=this._mediaList,o=this._mediaDefault,s=[],l=[];if(!a.length&&!o)return l;for(var u=0,c=a.length;u<c;u++)Of(a[u].query,i,r)&&s.push(u);return!s.length&&o&&(s=[-1]),s.length&&(t=s,n=this._currentMediaIndices,t.join(",")!==n.join(","))&&(l=xf(s,(function(e){return _f(-1===e?o.option:a[e].option)}))),this._currentMediaIndices=s,l}};var Mf=Tf,Df=Ye.each,Af=Ye.isObject,kf=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function If(e){var t=e&&e.itemStyle;if(t)for(var n=0,i=kf.length;n<i;n++){var r=kf[n],a=t.normal,o=t.emphasis;a&&a[r]&&(e[r]=e[r]||{},e[r].normal?Ye.merge(e[r].normal,a[r]):e[r].normal=a[r],a[r]=null),o&&o[r]&&(e[r]=e[r]||{},e[r].emphasis?Ye.merge(e[r].emphasis,o[r]):e[r].emphasis=o[r],o[r]=null)}}function Cf(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var i=e[t].normal,r=e[t].emphasis;i&&(n?(e[t].normal=e[t].emphasis=null,Ye.defaults(e[t],i)):e[t]=i),r&&(e.emphasis=e.emphasis||{},e.emphasis[t]=r)}}function Ef(e){Cf(e,"itemStyle"),Cf(e,"lineStyle"),Cf(e,"areaStyle"),Cf(e,"label"),Cf(e,"labelLine"),Cf(e,"upperLabel"),Cf(e,"edgeLabel")}function Nf(e,t){var n=Af(e)&&e[t],i=Af(n)&&n.textStyle;if(i)for(var r=0,a=ko.TEXT_STYLE_OPTIONS.length;r<a;r++){t=ko.TEXT_STYLE_OPTIONS[r];i.hasOwnProperty(t)&&(n[t]=i[t])}}function Rf(e){e&&(Ef(e),Nf(e,"label"),e.emphasis&&Nf(e.emphasis,"label"))}function Lf(e){return Ye.isArray(e)?e:e?[e]:[]}function Pf(e){return(Ye.isArray(e)?e[0]:e)||{}}var zf=function(e,t){Df(Lf(e.series),(function(e){Af(e)&&function(e){if(Af(e)){If(e),Ef(e),Nf(e,"label"),Nf(e,"upperLabel"),Nf(e,"edgeLabel"),e.emphasis&&(Nf(e.emphasis,"label"),Nf(e.emphasis,"upperLabel"),Nf(e.emphasis,"edgeLabel")),(n=e.markPoint)&&(If(n),Rf(n)),(i=e.markLine)&&(If(i),Rf(i));var t=e.markArea;t&&Rf(t);var n,i,r=e.data;if("graph"===e.type){r=r||e.nodes;var a=e.links||e.edges;if(a&&!Ye.isTypedArray(a))for(var o=0;o<a.length;o++)Rf(a[o]);Ye.each(e.categories,(function(e){Ef(e)}))}if(r&&!Ye.isTypedArray(r))for(o=0;o<r.length;o++)Rf(r[o]);if((n=e.markPoint)&&n.data){var s=n.data;for(o=0;o<s.length;o++)Rf(s[o])}if((i=e.markLine)&&i.data){var l=i.data;for(o=0;o<l.length;o++)Ye.isArray(l[o])?(Rf(l[o][0]),Rf(l[o][1])):Rf(l[o])}"gauge"===e.type?(Nf(e,"axisLabel"),Nf(e,"title"),Nf(e,"detail")):"treemap"===e.type?(Cf(e.breadcrumb,"itemStyle"),Ye.each(e.levels,(function(e){Ef(e)}))):"tree"===e.type&&Ef(e.leaves)}}(e)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),Df(n,(function(t){Df(Lf(e[t]),(function(e){e&&(Nf(e,"axisLabel"),Nf(e.axisPointer,"label"))}))})),Df(Lf(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;Nf(t,"axisLabel"),Nf(t&&t.axisPointer,"label")})),Df(Lf(e.calendar),(function(e){Cf(e,"itemStyle"),Nf(e,"dayLabel"),Nf(e,"monthLabel"),Nf(e,"yearLabel")})),Df(Lf(e.radar),(function(e){Nf(e,"name")})),Df(Lf(e.geo),(function(e){Af(e)&&(Rf(e),Df(Lf(e.regions),(function(e){Rf(e)})))})),Df(Lf(e.timeline),(function(e){Rf(e),Cf(e,"label"),Cf(e,"itemStyle"),Cf(e,"controlStyle",!0);var t=e.data;Ye.isArray(t)&&Ye.each(t,(function(e){Ye.isObject(e)&&(Cf(e,"label"),Cf(e,"itemStyle"))}))})),Df(Lf(e.toolbox),(function(e){Cf(e,"iconStyle"),Df(e.feature,(function(e){Cf(e,"iconStyle")}))})),Nf(Pf(e.axisPointer),"label"),Nf(Pf(e.tooltip).axisPointer,"label")},Yf=Ye.each,Hf=Ye.isArray,Ff=Ye.isObject,Bf=ko.normalizeToArray;function jf(e){Yf(Uf,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var Uf=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Wf=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"];var Gf=function(e,t){zf(e,t),e.series=Bf(e.series),Yf(e.series,(function(e){if(Ff(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t)null!=e.clockWise&&(e.clockwise=e.clockWise);else if("gauge"===t){var n=function(e,t){t=t.split(",");for(var n=e,i=0;i<t.length&&null!=(n=n&&n[t[i]]);i++);return n}(e,"pointer.color");null!=n&&function(e,t,n,i){t=t.split(",");for(var r,a=e,o=0;o<t.length-1;o++)null==a[r=t[o]]&&(a[r]={}),a=a[r];(i||null==a[t[o]])&&(a[t[o]]=n)}(e,"itemStyle.color",n)}jf(e)}})),e.dataRange&&(e.visualMap=e.dataRange),Yf(Wf,(function(t){var n=e[t];n&&(Hf(n)||(n=[n]),Yf(n,(function(e){jf(e)})))}))},Vf=Ye.createHashMap,qf=Ye.each;function Zf(e){qf(e,(function(t,n){var i=[],r=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=o.map(a,(function(a,l,u){var c,h,d=o.get(t.stackedDimension,u);if(isNaN(d))return r;s?h=o.getRawIndex(u):c=o.get(t.stackedByDimension,u);for(var f=NaN,p=n-1;p>=0;p--){var g=e[p];if(s||(h=g.data.rawIndexOf(g.stackedByDimension,c)),h>=0){var m=g.data.getByRawIndex(g.stackResultDimension,h);if(d>=0&&m>0||d<=0&&m<0){d+=m,f=m;break}}}return i[0]=d,i[1]=f,i}));o.hostModel.setData(l),t.data=l}))}var Xf=function(e){var t=Vf();e.eachSeries((function(e){var n=e.get("stack");if(n){var i=t.get(n)||t.set(n,[]),r=e.getData(),a={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:e};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(a)}})),t.each(Zf)},Kf=Ye.extend,$f=Ye.each,Qf=Ye.isObject,Jf=ko.getDataItemValue,ep=ko.isDataItemOption,tp=bh.parseDate,np=sd.SOURCE_FORMAT_TYPED_ARRAY,ip=sd.SOURCE_FORMAT_ARRAY_ROWS,rp=sd.SOURCE_FORMAT_ORIGINAL,ap=sd.SOURCE_FORMAT_OBJECT_ROWS;function op(e,t){vd.isInstance(e)||(e=vd.seriesDataToSource(e)),this._source=e;var n=this._data=e.data,i=e.sourceFormat;i===np&&(this._offset=0,this._dimSize=t,this._data=n);var r=lp[i===ip?i+"_"+e.seriesLayoutBy:i];Kf(this,r)}var sp=op.prototype;sp.pure=!1,sp.persistent=!0,sp.getSource=function(){return this._source};var lp={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:hp},arrayRows_row:{pure:!0,count:function(){var e=this._data[0];return e?Math.max(0,e.length-this._source.startIndex):0},getItem:function(e){e+=this._source.startIndex;for(var t=[],n=this._data,i=0;i<n.length;i++){var r=n[i];t.push(r?r[e]:null)}return t},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:up,getItem:cp,appendData:hp},keyedColumns:{pure:!0,count:function(){var e=this._source.dimensionsDefine[0].name,t=this._data[e];return t?t.length:0},getItem:function(e){for(var t=[],n=this._source.dimensionsDefine,i=0;i<n.length;i++){var r=this._data[n[i].name];t.push(r?r[e]:null)}return t},appendData:function(e){var t=this._data;$f(e,(function(e,n){for(var i=t[n]||(t[n]=[]),r=0;r<(e||[]).length;r++)i.push(e[r])}))}},original:{count:up,getItem:cp,appendData:hp},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 up(){return this._data.length}function cp(e){return this._data[e]}function hp(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}var dp={arrayRows:fp,objectRows:function(e,t,n,i){return null!=n?e[i]:e},keyedColumns:fp,original:function(e,t,n,i){var r=Jf(e);return null!=n&&r instanceof Array?r[n]:r},typedArray:fp};function fp(e,t,n,i){return null!=n?e[n]:e}function pp(e,t,n,i){return gp(e[i],this._dimensionInfos[t])}function gp(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=+tp(e)),null==e||""===e?NaN:+e}var mp={DefaultDataProvider:op,defaultDimValueGetters:{arrayRows:pp,objectRows:function(e,t,n,i){return gp(e[t],this._dimensionInfos[t])},keyedColumns:pp,original:function(e,t,n,i){var r=e&&(null==e.value?e:e.value);return!this._rawData.pure&&ep(e)&&(this.hasItemOption=!0),gp(r instanceof Array?r[i]:r,this._dimensionInfos[t])},typedArray:function(e,t,n,i){return e[i]}},retrieveRawValue:function(e,t,n){if(e){var i=e.getRawDataItem(t);if(null!=i){var r,a,o=e.getProvider().getSource().sourceFormat,s=e.getDimensionInfo(n);return s&&(r=s.name,a=s.index),dp[o](i,t,a,r)}}},retrieveRawAttr:function(e,t,n){if(e){var i=e.getProvider().getSource().sourceFormat;if(i===rp||i===ap){var r=e.getRawDataItem(t);return i!==rp||Qf(r)||(r=null),r?r[n]:void 0}}}},vp=mp.retrieveRawValue,yp=Rh.getTooltipMarker,_p=Rh.formatTpl,xp=ko.getTooltipRenderMode,bp=/\{@(.+?)\}/g,wp={getDataParams:function(e,t){var n=this.getData(t),i=this.getRawValue(e,t),r=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,"color"),l=n.getItemVisual(e,"borderColor"),u=this.ecModel.getComponent("tooltip"),c=u&&u.get("renderMode"),h=xp(c),d=this.mainType,f="series"===d,p=n.userOutput;return{componentType:d,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:a,dataIndex:r,data:o,dataType:t,value:i,color:s,borderColor:l,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,marker:yp({color:s,renderMode:h}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(e,t,n,i,r){t=t||"normal";var a=this.getData(n),o=a.getItemModel(e),s=this.getDataParams(e,n);null!=i&&s.value instanceof Array&&(s.value=s.value[i]);var l=o.get("normal"===t?[r||"label","formatter"]:[t,r||"label","formatter"]);return"function"==typeof l?(s.status=t,s.dimensionIndex=i,l(s)):"string"==typeof l?_p(l,s).replace(bp,(function(t,n){var i=n.length;return"["===n.charAt(0)&&"]"===n.charAt(i-1)&&(n=+n.slice(1,i-1)),vp(a,e,n)})):void 0},getRawValue:function(e,t){return vp(this.getData(t),e)},formatTooltip:function(){}},Tp=wp,Sp=Ye.isArray;function Op(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 Mp=Op.prototype;Mp.perform=function(e){var t,n=this._upstream,i=e&&e.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(t=this._plan(this.context));var a,o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return!(e>=1)&&(e=1),e}o===l&&s===u||(t="reset"),(this._dirty||"reset"===t)&&(this._dirty=!1,a=function(e,t){var n,i;e._dueIndex=e._outputDueEnd=e._dueEnd=0,e._settedOutputEnd=null,!t&&e._reset&&((n=e._reset(e.context))&&n.progress&&(i=n.forceFirstProgress,n=n.progress),Sp(n)&&!n.length&&(n=null));e._progress=n,e._modBy=e._modDataCount=null;var r=e._downstream;return r&&r.dirty(),i}(this,i)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!i&&(a||d<f)){var p=this._progress;if(Sp(p))for(var g=0;g<p.length;g++)Ap(this,p[g],d,f,l,u);else Ap(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 Dp=function(){var e,t,n,i,r,a={reset:function(l,u,c,h){t=l,e=u,n=c,i=h,r=Math.ceil(i/n),a.next=n>1&&i>0?s:o}};return a;function o(){return t<e?t++:null}function s(){var a=t%r*n+Math.ceil(t/r),o=t>=e?null:a<i?a:t;return t++,o}}();function Ap(e,t,n,i,r,a){Dp.reset(n,i,r,a),e._callingProgress=t,e._callingProgress({start:n,end:i,count:i-n,next:Dp.next},e.context)}Mp.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},Mp.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},Mp.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},Mp.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},Mp.getUpstream=function(){return this._upstream},Mp.getDownstream=function(){return this._downstream},Mp.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e};var kp={createTask:function(e){return new Op(e)}},Ip=Rh.formatTime,Cp=Rh.encodeHTML,Ep=Rh.addCommas,Np=Rh.getTooltipMarker,Rp=qh.getLayoutParams,Lp=qh.mergeLayoutParam,Pp=kp.createTask,zp=Gd.prepareSource,Yp=Gd.getSource,Hp=mp.retrieveRawValue,Fp=ko.makeInner(),Bp=Jh.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=Pp({count:Up,reset:Wp}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),zp(this);var r=this.getInitialData(e,n);Vp(r,this),this.dataTask.context.data=r,Fp(this).dataBeforeProcessed=r,jp(this)},mergeDefaultAndTheme:function(e,t){var n=this.layoutMode,i=n?Rp(e):{},r=this.subType;Jh.hasClass(r)&&(r+="Series"),Ye.merge(e,t.getTheme().get(this.subType)),Ye.merge(e,this.getDefaultOption()),ko.defaultEmphasis(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Lp(e,i,n)},mergeOption:function(e,t){e=Ye.merge(this.option,e,!0),this.fillDataTextStyle(e.data);var n=this.layoutMode;n&&Lp(this.option,e,n),zp(this);var i=this.getInitialData(e,t);Vp(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Fp(this).dataBeforeProcessed=i,jp(this)},fillDataTextStyle:function(e){if(e&&!Ye.isTypedArray(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&ko.defaultEmphasis(e[n],"label",t)},getInitialData:function(){},appendData:function(e){this.getRawData().appendData(e.data)},getData:function(e){var t=Zp(this);if(t){var n=t.context.data;return null==e?n:n.getLinkedData(e)}return Fp(this).data},setData:function(e){var t=Zp(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)}Fp(this).data=e},getSource:function(){return Yp(this)},getRawData:function(){return Fp(this).dataBeforeProcessed},getBaseAxis:function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},formatTooltip:function(e,t,n,i){var r=this,a="html"===(i=i||"html")?"<br/>":"\n",o="richText"===i,s={},l=0;function u(e){return{renderMode:i,content:Cp(Ep(e)),style:s}}var c=this.getData(),h=c.mapDimension("defaultedTooltip",!0),d=h.length,f=this.getRawValue(e),p=Ye.isArray(f),g=c.getItemVisual(e,"color");Ye.isObject(g)&&g.colorStops&&(g=(g.colorStops[0]||{}).color),g=g||"transparent";var m=d>1||p&&!d?function(n){var a=Ye.reduce(n,(function(e,t,n){var i=c.getDimensionInfo(n);return e|(i&&!1!==i.tooltip&&null!=i.displayName)}),0),u=[];function d(e,n){var h=c.getDimensionInfo(n);if(h&&!1!==h.otherDims.tooltip){var d=h.type,f="sub"+r.seriesIndex+"at"+l,p=Np({color:g,type:"subItem",renderMode:i,markerId:f}),m="string"==typeof p?p:p.content,v=(a?m+Cp(h.displayName||"-")+": ":"")+Cp("ordinal"===d?e+"":"time"===d?t?"":Ip("yyyy/MM/dd hh:mm:ss",e):Ep(e));v&&u.push(v),o&&(s[f]=g,++l)}}h.length?Ye.each(h,(function(t){d(Hp(c,e,t),t)})):Ye.each(n,d);var f=a?o?"\n":"<br/>":"",p=f+u.join(f||", ");return{renderMode:i,content:p,style:s}}(f):u(d?Hp(c,e,h[0]):p?f[0]:f),v=m.content,y=r.seriesIndex+"at"+l,_=Np({color:g,type:"item",renderMode:i,markerId:y});s[y]=g,++l;var x=c.getName(e),b=this.name;ko.isNameSpecified(this)||(b=""),b=b?Cp(b)+(t?": ":a):"";var w="string"==typeof _?_:_.content;return{html:t?w+b+v:b+w+(x?Cp(x)+": "+v:v),markers:s}},isAnimationEnabled:function(){if(te.node)return!1;var e=this.getShallow("animation");return e&&this.getData().count()>this.getShallow("animationThreshold")&&(e=!1),e},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(e,t,n){var i=this.ecModel,r=od.getColorFromPalette.call(this,e,t,n);return r||(r=i.getColorFromPalette(e,t,n)),r},coordDimToDataDim:function(e){return this.getRawData().mapDimension(e,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function jp(e){var t=e.name;ko.isNameSpecified(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimension("seriesName",!0),i=[];return Ye.each(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&i.push(n.displayName)})),i.join(" ")}(e)||t)}function Up(e){return e.model.getRawData().count()}function Wp(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Gp}function Gp(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Vp(e,t){Ye.each(e.CHANGABLE_METHODS,(function(n){e.wrapMethod(n,Ye.curry(qp,t))}))}function qp(e){var t=Zp(e);t&&t.setOutputEnd(this.count())}function Zp(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(e.uid))}return i}}Ye.mixin(Bp,Tp),Ye.mixin(Bp,od);var Xp=Bp,Kp=function(){this.group=new Ci,this.uid=ch.getUID("viewComponent")},$p=Kp.prototype={constructor:Kp,init:function(e,t){},render:function(e,t,n,i){},dispose:function(){},filterForExposedEvent:null};$p.updateView=$p.updateLayout=$p.updateVisual=function(e,t,n,i){},zo.enableClassExtend(Kp),zo.enableClassManagement(Kp,{registerWhenExtend:!0});var Qp=Kp,Jp=ko.makeInner;var eg=function(){var e=Jp();return function(t){var n=e(t),i=t.pipelineContext,r=n.large,a=n.progressiveRender,o=n.large=i&&i.large,s=n.progressiveRender=i&&i.progressiveRender;return!!(r^o||a^s)&&"reset"}},tg=Ye.each,ng=kp.createTask,ig=ko.makeInner(),rg=eg();function ag(){this.group=new Ci,this.uid=ch.getUID("viewChart"),this.renderTask=ng({plan:ug,reset:cg}),this.renderTask.context={view:this}}ag.prototype={type:"chart",init:function(e,t){},render:function(e,t,n,i){},highlight:function(e,t,n,i){lg(e.getData(),i,"emphasis")},downplay:function(e,t,n,i){lg(e.getData(),i,"normal")},remove:function(e,t){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var og=ag.prototype;function sg(e,t,n){if(e&&(e.trigger(t,n),e.isGroup&&!Vc.isHighDownDispatcher(e)))for(var i=0,r=e.childCount();i<r;i++)sg(e.childAt(i),t,n)}function lg(e,t,n){var i=ko.queryDataIndex(e,t),r=t&&null!=t.highlightKey?Vc.getHighlightDigit(t.highlightKey):null;null!=i?tg(ko.normalizeToArray(i),(function(t){sg(e.getItemGraphicEl(t),n,r)})):e.eachItemGraphicEl((function(e){sg(e,n,r)}))}function ug(e){return rg(e.model)}function cg(e){var t=e.model,n=e.ecModel,i=e.api,r=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=r&&ig(r).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](t,n,i,r),hg[l]}og.updateView=og.updateLayout=og.updateVisual=function(e,t,n,i){this.render(e,t,n,i)},zo.enableClassExtend(ag,["dispose"]),zo.enableClassManagement(ag,{registerWhenExtend:!0}),ag.markUpdateMethod=function(e,t){ig(e).updateMethod=t};var hg={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)}}},dg=ag,fg="\0__throttleOriginMethod",pg="\0__throttleRate",gg="\0__throttleType";function mg(e,t,n){var i,r,a,o,s,l=0,u=0,c=null;function h(){u=(new Date).getTime(),c=null,e.apply(a,o||[])}t=t||0;var d=function(){i=(new Date).getTime(),a=this,o=arguments;var e=s||t,d=s||n;s=null,r=i-(d?l:u)-e,clearTimeout(c),d?c=setTimeout(h,e):r>=0?h():c=setTimeout(h,-r),l=i};return d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(e){s=e},d}var vg={throttle:mg,createOrUpdate:function(e,t,n,i){var r=e[t];if(r){var a=r[fg]||r,o=r[gg];if(r[pg]!==n||o!==i){if(null==n||!i)return e[t]=a;(r=e[t]=mg(a,n,"debounce"===i))[fg]=a,r[gg]=i,r[pg]=n}return r}},clear:function(e,t){var n=e[t];n&&n[fg]&&(e[t]=n[fg])}},yg=Ye.isFunction,_g={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=(e.visualColorAccessPath||"itemStyle.color").split("."),r=e.get(i),a=!yg(r)||r instanceof Au?null:r;r&&!a||(r=e.getColorFromPalette(e.name,null,t.getSeriesCount())),n.setVisual("color",r);var o=(e.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=e.get(o);if(n.setVisual("borderColor",s),!t.isSeriesFiltered(e)){a&&n.each((function(t){n.setItemVisual(t,"color",a(e.getDataParams(t)))}));return{dataEach:n.hasItemOption?function(e,t){var n=e.getItemModel(t),r=n.get(i,!0),a=n.get(o,!0);null!=r&&e.setItemVisual(t,"color",r),null!=a&&e.setItemVisual(t,"borderColor",a)}:null}}}},xg=_g,bg={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:""}}}},wg=mp.retrieveRawValue;var Tg=function(e,t){var n=t.getModel("aria");if(n.get("show"))if(n.get("description"))e.setAttribute("aria-label",n.get("description"));else{var i=0;t.eachSeries((function(e,t){++i}),this);var r,a=n.get("data.maxCount")||10,o=n.get("series.maxCount")||10,s=Math.min(i,o);if(!(i<1)){var l=function(){var e=t.getModel("title").option;e&&e.length&&(e=e[0]);return e&&e.text}();r=l?c(h("general.withTitle"),{title:l}):h("general.withoutTitle");var u=[];r+=c(h(i>1?"series.multiple.prefix":"series.single.prefix"),{seriesCount:i}),t.eachSeries((function(e,t){if(t<s){var n,r=e.get("name"),o="series."+(i>1?"multiple":"single")+".";n=c(n=h(r?o+"withName":o+"withoutName"),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(m=e.subType,bg.series.typeNames[m]||"自定义图")});var l=e.getData();window.data=l,l.count()>a?n+=c(h("data.partialData"),{displayCnt:a}):n+=h("data.allData");for(var d=[],f=0;f<l.count();f++)if(f<a){var p=l.getName(f),g=wg(l,f);d.push(c(h(p?"data.withName":"data.withoutName"),{name:p,value:g}))}n+=d.join(h("data.separator.middle"))+h("data.separator.end"),u.push(n)}var m})),r+=u.join(h("series.multiple.separator.middle"))+h("series.multiple.separator.end"),e.setAttribute("aria-label",r)}}function c(e,t){if("string"!=typeof e)return e;var n=e;return Ye.each(t,(function(e,t){n=n.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)})),n}function h(e){var t=n.get(e);if(null==t){for(var i=e.split("."),r=bg.aria,a=0;a<i.length;++a)r=r[i[a]];return r}return t}},Sg=Math.PI;var Og=function(e,t){t=t||{},Ye.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 Vc.Group,i=new Vc.Rect({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(i);var r=t.fontSize+" sans-serif",a=new Vc.Rect({style:{fill:"none",text:t.text,font:r,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});if(n.add(a),t.showSpinner){var o=new Vc.Arc({shape:{startAngle:-Sg/2,endAngle:-Sg/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*Sg/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*Sg/2}).delay(300).start("circularInOut"),n.add(o)}return n.resize=function(){var n=Yr.getWidth(t.text,r),s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner?0:n/2),u=e.getHeight()/2;t.showSpinner&&o.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n},Mg=Ye.each,Dg=Ye.map,Ag=Ye.isFunction,kg=Ye.createHashMap,Ig=Ye.noop,Cg=kp.createTask,Eg=ch.getUID,Ng=ko.normalizeToArray;function Rg(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=kg()}var Lg=Rg.prototype;function Pg(e,t,n,i,r){var a;function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}r=r||{},Mg(t,(function(t,s){if(!r.visualType||r.visualType===t.visualType){var l=e._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var h,d=c.agentStubMap;d.each((function(e){o(r,e)&&(e.dirty(),h=!0)})),h&&c.dirty(),zg(c,i);var f=e.getPerformArgs(c,r.block);d.each((function(e){e.perform(f)})),a|=c.perform(f)}else u&&u.each((function(s,l){o(r,s)&&s.dirty();var u=e.getPerformArgs(s,r.block);u.skip=!t.performRawSeries&&n.isSeriesFiltered(s.context.model),zg(s,i),a|=s.perform(u)}))}})),e.unfinished|=a}Lg.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},Lg.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,r=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=i&&i.modDataCount;return{step:r,modBy:null!=a?Math.ceil(a/r):null,modDataCount:a}}},Lg.getPipeline=function(e){return this._pipelineMap.get(e)},Lg.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),i=e.getData().count(),r=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,a=e.get("large")&&i>=e.get("largeThreshold"),o="mod"===e.get("progressiveChunkMode")?i:null;e.pipelineContext=n.context={progressiveRender:r,modDataCount:o,large:a}},Lg.restorePipelines=function(e){var t=this,n=t._pipelineMap=kg();e.eachSeries((function(e){var i=e.getProgressive(),r=e.uid;n.set(r,{id:r,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:i&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),qg(t,e,e.dataTask)}))},Lg.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.ecInstance.getModel(),n=this.api;Mg(this._allHandlers,(function(i){var r=e.get(i.uid)||e.set(i.uid,[]);i.reset&&function(e,t,n,i,r){var a=n.seriesTaskMap||(n.seriesTaskMap=kg()),o=t.seriesType,s=t.getTargetSeries;t.createOnAllSeries?i.eachRawSeries(l):o?i.eachRawSeriesByType(o,l):s&&s(i,r).each(l);function l(n){var o=n.uid,s=a.get(o)||a.set(o,Cg({plan:jg,reset:Ug,count:Vg}));s.context={model:n,ecModel:i,api:r,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:e},qg(e,n,s)}var u=e._pipelineMap;a.each((function(e,t){u.get(t)||(e.dispose(),a.removeKey(t))}))}(this,i,r,t,n),i.overallReset&&function(e,t,n,i,r){var a=n.overallTask=n.overallTask||Cg({reset:Yg});a.context={ecModel:i,api:r,overallReset:t.overallReset,scheduler:e};var o=a.agentStubMap=a.agentStubMap||kg(),s=t.seriesType,l=t.getTargetSeries,u=!0,c=t.modifyOutputEnd;s?i.eachRawSeriesByType(s,h):l?l(i,r).each(h):(u=!1,Mg(i.getSeries(),h));function h(t){var n=t.uid,i=o.get(n);i||(i=o.set(n,Cg({reset:Hg,onDirty:Bg})),a.dirty()),i.context={model:t,overallProgress:u,modifyOutputEnd:c},i.agent=a,i.__block=u,qg(e,t,i)}var d=e._pipelineMap;o.each((function(e,t){d.get(t)||(e.dispose(),a.dirty(),o.removeKey(t))}))}(this,i,r,t,n)}),this)},Lg.prepareView=function(e,t,n,i){var r=e.renderTask,a=r.context;a.model=t,a.ecModel=n,a.api=i,r.__block=!e.incrementalPrepareRender,qg(this,t,r)},Lg.performDataProcessorTasks=function(e,t){Pg(this,this._dataProcessorHandlers,e,t,{block:!0})},Lg.performVisualTasks=function(e,t,n){Pg(this,this._visualHandlers,e,t,n)},Lg.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t|=e.dataTask.perform()})),this.unfinished|=t},Lg.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 zg=Lg.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)};function Yg(e){e.overallReset(e.ecModel,e.api,e.payload)}function Hg(e,t){return e.overallProgress&&Fg}function Fg(){this.agent.dirty(),this.getDownstream().dirty()}function Bg(){this.agent&&this.agent.dirty()}function jg(e){return e.plan&&e.plan(e.model,e.ecModel,e.api,e.payload)}function Ug(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Ng(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?Dg(t,(function(e,t){return Gg(t)})):Wg}var Wg=Gg(0);function Gg(e){return function(t,n){var i=n.data,r=n.resetDefines[e];if(r&&r.dataEach)for(var a=t.start;a<t.end;a++)r.dataEach(i,a);else r&&r.progress&&r.progress(t,i)}}function Vg(e){return e.data.count()}function qg(e,t,n){var i=t.uid,r=e._pipelineMap.get(i);!r.head&&(r.head=n),r.tail&&r.tail.pipe(n),r.tail=n,n.__idxInPipeline=r.count++,n.__pipeline=r}function Zg(e){Xg=null;try{e(Kg,$g)}catch(e){}return Xg}Rg.wrapStageHandler=function(e,t){return Ag(e)&&(e={overallReset:e,seriesType:Zg(e)}),e.uid=Eg("stageHandler"),t&&(e.visualType=t),e};var Xg,Kg={},$g={};function Qg(e,t){for(var n in t.prototype)e[n]=Ig}Qg(Kg,df),Qg($g,pf),Kg.eachSeriesByType=Kg.eachRawSeriesByType=function(e){Xg=e},Kg.eachComponent=function(e){"series"===e.mainType&&e.subType&&(Xg=e.subType)};var Jg=Rg,em=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],tm={color:em,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],em]},nm="#eee",im=function(){return{axisLine:{lineStyle:{color:nm}},axisTick:{lineStyle:{color:nm}},axisLabel:{textStyle:{color:nm}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:nm}}}},rm=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],am={color:rm,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:nm},crossStyle:{color:nm},label:{color:"#000"}}},legend:{textStyle:{color:nm}},textStyle:{color:nm},title:{textStyle:{color:nm}},toolbox:{iconStyle:{normal:{borderColor:nm}}},dataZoom:{textStyle:{color:nm}},visualMap:{textStyle:{color:nm}},timeline:{lineStyle:{color:nm},itemStyle:{normal:{color:rm[1]}},label:{normal:{textStyle:{color:nm}}},controlStyle:{normal:{color:nm,borderColor:nm}}},timeAxis:im(),logAxis:im(),valueAxis:im(),categoryAxis:im(),line:{symbol:"circle"},graph:{color:rm},gauge:{title:{textStyle:{color:nm}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};am.categoryAxis.splitLine.show=!1;var om=am,sm=Gd.detectSourceFormat,lm=sd.SERIES_LAYOUT_BY_COLUMN;Jh.extend({type:"dataset",defaultOption:{seriesLayoutBy:lm,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){sm(this)}}),Qp.extend({type:"dataset"});var um=pl.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(e,t){var n=.5522848,i=t.cx,r=t.cy,a=t.rx,o=t.ry,s=a*n,l=o*n;e.moveTo(i-a,r),e.bezierCurveTo(i-a,r-l,i-s,r-o,i,r-o),e.bezierCurveTo(i+s,r-o,i+a,r-l,i+a,r),e.bezierCurveTo(i+a,r+l,i+s,r+o,i,r+o),e.bezierCurveTo(i-s,r+o,i-a,r+l,i-a,r),e.closePath()}}),cm=Nl.createFromString,hm=Ye.isString,dm=Ye.extend,fm=Ye.defaults,pm=Ye.trim,gm=Ye.each,mm=/[\s,]+/;function vm(e){hm(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 ym(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}ym.prototype.parse=function(e,t){t=t||{};var n=vm(e);if(!n)throw new Error("Illegal svg");var i=new Ci;this._root=i;var r=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||t.width),o=parseFloat(n.getAttribute("height")||t.height);isNaN(a)&&(a=null),isNaN(o)&&(o=null),Sm(n,i,null,!0);for(var s,l,u=n.firstChild;u;)this._parseNode(u,i),u=u.nextSibling;if(r){var c=pm(r).split(mm);c.length>=4&&(s={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(s&&null!=a&&null!=o&&(l=km(s,a,o),!t.ignoreViewBox)){var h=i;(i=new Ci).add(h),h.scale=l.scale.slice(),h.position=l.position.slice()}return t.ignoreRootClip||null==a||null==o||i.setClipPath(new hu({shape:{x:0,y:0,width:a,height:o}})),{root:i,width:a,height:o,viewBoxRect:s,viewBoxTransform:l}},ym.prototype._parseNode=function(e,t){var n,i,r=e.nodeName.toLowerCase();if("defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine){if(i=xm[r]){var a=i.call(this,e),o=e.getAttribute("id");o&&(this._defs[o]=a)}}else(i=_m[r])&&(n=i.call(this,e,t),t.add(n));for(var s=e.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},ym.prototype._parseText=function(e,t){if(1===e.nodeType){var n=e.getAttribute("dx")||0,i=e.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var r=new Pl({style:{text:e.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});bm(t,r),Sm(e,r,this._defs);var a=r.style.fontSize;a&&a<9&&(r.style.fontSize=9,r.scale=r.scale||[1,1],r.scale[0]*=a/9,r.scale[1]*=a/9);var o=r.getBoundingRect();return this._textX+=o.width,t.add(r),r};var _m={g:function(e,t){var n=new Ci;return bm(t,n),Sm(e,n,this._defs),n},rect:function(e,t){var n=new hu;return bm(t,n),Sm(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 zl;return bm(t,n),Sm(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 pu;return bm(t,n),Sm(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 um;return bm(t,n),Sm(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=wm(n));var i=new nu({shape:{points:n||[]}});return bm(t,i),Sm(e,i,this._defs),i},polyline:function(e,t){var n=new pl;bm(t,n),Sm(e,n,this._defs);var i=e.getAttribute("points");return i&&(i=wm(i)),new iu({shape:{points:i||[]}})},image:function(e,t){var n=new Ta;return bm(t,n),Sm(e,n,this._defs),n.setStyle({image:e.getAttribute("xlink:href"),x:e.getAttribute("x"),y:e.getAttribute("y"),width:e.getAttribute("width"),height:e.getAttribute("height")}),n},text:function(e,t){var n=e.getAttribute("x")||0,i=e.getAttribute("y")||0,r=e.getAttribute("dx")||0,a=e.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(a);var o=new Ci;return bm(t,o),Sm(e,o,this._defs),o},tspan:function(e,t){var n=e.getAttribute("x"),i=e.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=e.getAttribute("dx")||0,a=e.getAttribute("dy")||0,o=new Ci;return bm(t,o),Sm(e,o,this._defs),this._textX+=r,this._textY+=a,o},path:function(e,t){var n=e.getAttribute("d")||"",i=cm(n);return bm(t,i),Sm(e,i,this._defs),i}},xm={lineargradient:function(e){var t=parseInt(e.getAttribute("x1")||0,10),n=parseInt(e.getAttribute("y1")||0,10),i=parseInt(e.getAttribute("x2")||10,10),r=parseInt(e.getAttribute("y2")||0,10),a=new Iu(t,n,i,r);return function(e,t){var n=e.firstChild;for(;n;){if(1===n.nodeType){var i=n.getAttribute("offset");i=i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var r=n.getAttribute("stop-color")||"#000000";t.addColorStop(i,r)}n=n.nextSibling}}(e,a),a},radialgradient:function(e){}};function bm(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),fm(t.__inheritedStyle,e.__inheritedStyle))}function wm(e){for(var t=pm(e).split(mm),n=[],i=0;i<t.length;i+=2){var r=parseFloat(t[i]),a=parseFloat(t[i+1]);n.push([r,a])}return n}var Tm={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 Sm(e,t,n,i){var r=t.__inheritedStyle||{},a="text"===t.type;if(1===e.nodeType&&(function(e,t){var n=e.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=null,r=[];n.replace(Dm,(function(e,t,n){r.push(t,n)}));for(var a=r.length-1;a>0;a-=2){var o=r[a],s=r[a-1];switch(i=i||tn.create(),s){case"translate":o=pm(o).split(mm),tn.translate(i,i,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=pm(o).split(mm),tn.scale(i,i,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=pm(o).split(mm),tn.rotate(i,i,parseFloat(o[0]));break;case"skew":o=pm(o).split(mm),console.warn("Skew transform is not supported yet");break;case"matrix":o=pm(o).split(mm);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),dm(r,function(e){var t=e.getAttribute("style"),n={};if(!t)return n;var i,r={};Am.lastIndex=0;for(;null!=(i=Am.exec(t));)r[i[1]]=i[2];for(var a in Tm)Tm.hasOwnProperty(a)&&null!=r[a]&&(n[Tm[a]]=r[a]);return n}(e)),!i))for(var o in Tm)if(Tm.hasOwnProperty(o)){var s=e.getAttribute(o);null!=s&&(r[Tm[o]]=s)}var l=a?"textFill":"fill",u=a?"textStroke":"stroke";t.style=t.style||new Qi;var c=t.style;null!=r.fill&&c.set(l,Mm(r.fill,n)),null!=r.stroke&&c.set(u,Mm(r.stroke,n)),gm(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(e){var t="lineWidth"===e&&a?"textStrokeWidth":e;null!=r[e]&&c.set(t,parseFloat(r[e]))})),r.textBaseline&&"auto"!==r.textBaseline||(r.textBaseline="alphabetic"),"alphabetic"===r.textBaseline&&(r.textBaseline="bottom"),"start"===r.textAlign&&(r.textAlign="left"),"end"===r.textAlign&&(r.textAlign="right"),gm(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(e){null!=r[e]&&c.set(e,r[e])})),r.lineDash&&(t.style.lineDash=pm(r.lineDash).split(mm)),c[u]&&"none"!==c[u]&&(t[u]=!0),t.__inheritedStyle=r}var Om=/url\(\s*#(.*?)\)/;function Mm(e,t){var n=t&&e&&e.match(Om);return n?t[pm(n[1])]:e}var Dm=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var Am=/([^\s:;]+)\s*:\s*([^:;]+)/g;function km(e,t,n){var i=t/e.width,r=n/e.height,a=Math.min(i,r);return{scale:[a,a],position:[-(e.x+e.width/2)*a+t/2,-(e.y+e.height/2)*a+n/2]}}var Im={parseXML:vm,makeViewBoxTransform:km,parseSVG:function(e,t){return(new ym).parse(e,t)}},Cm=Ye.createHashMap,Em=Ye.isString,Nm=Ye.isArray,Rm=Ye.each,Lm=Im.parseXML,Pm=Cm(),zm={registerMap:function(e,t,n){var i;return Nm(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}]),Rm(i,(function(e){var t=e.type;"geoJson"===t&&(t=e.type="geoJSON"),(0,Ym[t])(e)})),Pm.set(e,i)},retrieveMap:function(e){return Pm.get(e)}},Ym={geoJSON:function(e){var t=e.source;e.geoJSON=Em(t)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(t):new Function("return ("+t+");")():t},svg:function(e){e.svgXML=Lm(e.source)}},Hm=zm;function Fm(e){return e}function Bm(e,t,n,i,r){this._old=e,this._new=t,this._oldKeyGetter=n||Fm,this._newKeyGetter=i||Fm,this.context=r}function jm(e,t,n,i,r){for(var a=0;a<e.length;a++){var o="_ec_"+r[i](e[a],a),s=t[o];null==s?(n.push(o),t[o]=a):(s.length||(t[o]=s=[s]),s.push(a))}}Bm.prototype={constructor:Bm,add:function(e){return this._add=e,this},update:function(e){return this._update=e,this},remove:function(e){return this._remove=e,this},execute:function(){var e=this._old,t=this._new,n={},i=[],r=[];for(jm(e,{},i,"_oldKeyGetter",this),jm(t,n,r,"_newKeyGetter",this),a=0;a<e.length;a++){if(null!=(s=n[o=i[a]]))(u=s.length)?(1===u&&(n[o]=null),s=s.shift()):n[o]=null,this._update&&this._update(s,a);else this._remove&&this._remove(a)}for(var a=0;a<r.length;a++){var o=r[a];if(n.hasOwnProperty(o)){var s;if(null==(s=n[o]))continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var Um=Bm,Wm=Ye.each,Gm=Ye.createHashMap,Vm=Gm(["tooltip","label","itemName","itemId","seriesName"]);function qm(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var Zm={OTHER_DIMENSIONS:Vm,summarizeDimensions:function(e){var t={},n=t.encode={},i=Gm(),r=[],a=[],o=t.userOutput={dimensionNames:e.dimensions.slice(),encode:{}};Wm(e.dimensions,(function(t){var s,l=e.getDimensionInfo(t),u=l.coordDim;if(u){var c=l.coordDimIndex;qm(n,u)[c]=t,l.isExtraCoord||(i.set(u,1),"ordinal"!==(s=l.type)&&"time"!==s&&(r[0]=t),qm(o.encode,u)[c]=l.index),l.defaultTooltip&&a.push(t)}Vm.each((function(e,t){var i=qm(n,t),r=l.otherDims[t];null!=r&&!1!==r&&(i[r]=l.name)}))}));var s=[],l={};i.each((function(e,t){var i=n[t];l[t]=i[0],s=s.concat(i)})),t.dataDimsOnCoord=s,t.encodeFirstDimNotExtra=l;var u=n.label;u&&u.length&&(r=u.slice());var c=n.tooltip;return c&&c.length?a=c.slice():a.length||(a=r.slice()),n.defaultedLabel=r,n.defaultedTooltip=a,t},getDimensionTypeByAxis:function(e){return"category"===e?"ordinal":"time"===e?"time":"float"}};var Xm=function(e){null!=e&&Ye.extend(this,e),this.otherDims={}},Km=mp.defaultDimValueGetters,$m=mp.DefaultDataProvider,Qm=Zm.summarizeDimensions,Jm=Ye.isObject,ev="undefined",tv={float:typeof Float64Array===ev?Array:Float64Array,int:typeof Int32Array===ev?Array:Int32Array,ordinal:Array,number:Array,time:Array},nv=typeof Uint32Array===ev?Array:Uint32Array,iv=typeof Int32Array===ev?Array:Int32Array,rv=typeof Uint16Array===ev?Array:Uint16Array;function av(e){return e._rawCount>65535?nv:rv}var ov=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],sv=["_extent","_approximateExtent","_rawExtent"];function lv(e,t){Ye.each(ov.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,Ye.each(sv,(function(n){e[n]=Ye.clone(t[n])})),e._calculationInfo=Ye.extend(t._calculationInfo)}var uv=function(e,t){e=e||["x","y"];for(var n={},i=[],r={},a=0;a<e.length;a++){var o=e[a];Ye.isString(o)?o=new Xm({name:o}):o instanceof Xm||(o=new Xm(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},i.push(s),n[s]=o,o.index=a,o.createInvertedIndices&&(r[s]=[])}this.dimensions=i,this._dimensionInfos=n,this.hostModel=t,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=Qm(this),this._invertedIndicesMap=r,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},cv=uv.prototype;function hv(e,t,n,i,r){var a=tv[t.type],o=i-1,s=t.name,l=e[s][o];if(l&&l.length<n){for(var u=new a(Math.min(r-o*n,n)),c=0;c<l.length;c++)u[c]=l[c];e[s][o]=u}for(var h=i*n;h<r;h+=n)e[s].push(new a(Math.min(r-h,n)))}function dv(e){var t=e._invertedIndicesMap;Ye.each(t,(function(n,i){var r=e._dimensionInfos[i].ordinalMeta;if(r){n=t[i]=new iv(r.categories.length);for(var a=0;a<n.length;a++)n[a]=-1;for(a=0;a<e._count;a++)n[e.get(i,a)]=a}}))}function fv(e,t,n){var i;if(null!=t){var r=e._chunkSize,a=Math.floor(n/r),o=n%r,s=e.dimensions[t],l=e._storage[s][a];if(l){i=l[o];var u=e._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(i=u.categories[i])}}return i}function pv(e){return e}function gv(e){return e<this._count&&e>=0?this._indices[e]:-1}function mv(e,t){var n=e._idList[t];return null==n&&(n=fv(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n}function vv(e){return Ye.isArray(e)||(e=[e]),e}function yv(e,t){var n=e.dimensions,i=new uv(Ye.map(n,e.getDimensionInfo,e),e.hostModel);lv(i,e);for(var r=i._storage={},a=e._storage,o=0;o<n.length;o++){var s=n[o];a[s]&&(Ye.indexOf(t,s)>=0?(r[s]=_v(a[s]),i._rawExtent[s]=xv(),i._extent[s]=null):r[s]=a[s])}return i}function _v(e){for(var t,n,i=new Array(e.length),r=0;r<e.length;r++)i[r]=(t=e[r],n=void 0,(n=t.constructor)===Array?t.slice():new n(t));return i}function xv(){return[1/0,-1/0]}cv.type="list",cv.hasItemOption=!0,cv.getDimension=function(e){return"number"!=typeof e&&(isNaN(e)||this._dimensionInfos.hasOwnProperty(e))||(e=this.dimensions[e]),e},cv.getDimensionInfo=function(e){return this._dimensionInfos[this.getDimension(e)]},cv.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},cv.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]},cv.initData=function(e,t,n){(vd.isInstance(e)||Ye.isArrayLike(e))&&(e=new $m(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=Km[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Km.arrayRows,this._rawExtent={},this._initDataFromProvider(0,e.count()),e.pure&&(this.hasItemOption=!1)},cv.getProvider=function(){return this._rawData},cv.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)},cv.appendValues=function(e,t){for(var n=this._chunkSize,i=this._storage,r=this.dimensions,a=r.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t?t.length:0),u=this._chunkCount,c=0;c<a;c++){o[v=r[c]]||(o[v]=xv()),i[v]||(i[v]=[]),hv(i,this._dimensionInfos[v],n,u,l),this._chunkCount=i[v].length}for(var h=new Array(a),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/n),g=d%n,m=0;m<a;m++){var v=r[m],y=this._dimValueGetterArrayRows(e[f]||h,v,f,m);i[v][p][g]=y;var _=o[v];y<_[0]&&(_[0]=y),y>_[1]&&(_[1]=y)}t&&(this._nameList[d]=t[f])}this._rawCount=this._count=l,this._extent={},dv(this)},cv._initDataFromProvider=function(e,t){if(!(e>=t)){for(var n,i=this._chunkSize,r=this._rawData,a=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,u=this._nameList,c=this._idList,h=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;p<s;p++){h[b=o[p]]||(h[b]=xv());var g=l[b];0===g.otherDims.itemName&&(n=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),a[b]||(a[b]=[]),hv(a,g,i,f,t),this._chunkCount=a[b].length}for(var m=new Array(s),v=e;v<t;v++){m=r.getItem(v,m);for(var y=Math.floor(v/i),_=v%i,x=0;x<s;x++){var b,w=a[b=o[x]][y],T=this._dimValueGetter(m,b,v,x);w[_]=T;var S=h[b];T<S[0]&&(S[0]=T),T>S[1]&&(S[1]=T)}if(!r.pure){var O=u[v];if(m&&null==O)if(null!=m.name)u[v]=O=m.name;else if(null!=n){var M=o[n],D=a[M][y];if(D){O=D[_];var A=l[M].ordinalMeta;A&&A.categories.length&&(O=A.categories[O])}}var k=null==m?null:m.id;null==k&&null!=O&&(d[O]=d[O]||0,k=O,d[O]>0&&(k+="__ec__"+d[O]),d[O]++),null!=k&&(c[v]=k)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent={},dv(this)}},cv.count=function(){return this._count},cv.getIndices=function(){var e=this._indices;if(e){var t=e.constructor,n=this._count;if(t===Array){r=new t(n);for(var i=0;i<n;i++)r[i]=e[i]}else r=new t(e.buffer,0,n)}else{var r=new(t=av(this))(this.count());for(i=0;i<r.length;i++)r[i]=i}return r},cv.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._storage;if(!n[e])return NaN;t=this.getRawIndex(t);var i=Math.floor(t/this._chunkSize),r=t%this._chunkSize;return n[e][i][r]},cv.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._storage[e];if(!n)return NaN;var i=Math.floor(t/this._chunkSize),r=t%this._chunkSize;return n[i][r]},cv._getFast=function(e,t){var n=Math.floor(t/this._chunkSize),i=t%this._chunkSize;return this._storage[e][n][i]},cv.getValues=function(e,t){var n=[];Ye.isArray(e)||(t=e,e=this.dimensions);for(var i=0,r=e.length;i<r;i++)n.push(this.get(e[i],t));return n},cv.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},cv.getDataExtent=function(e){e=this.getDimension(e);var t=this._storage[e],n=xv();if(!t)return n;var i,r=this.count();if(!this._indices)return this._rawExtent[e].slice();if(i=this._extent[e])return i.slice();for(var a=(i=n)[0],o=i[1],s=0;s<r;s++){var l=this._getFast(e,this.getRawIndex(s));l<a&&(a=l),l>o&&(o=l)}return i=[a,o],this._extent[e]=i,i},cv.getApproximateExtent=function(e){return e=this.getDimension(e),this._approximateExtent[e]||this.getDataExtent(e)},cv.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},cv.getCalculationInfo=function(e){return this._calculationInfo[e]},cv.setCalculationInfo=function(e,t){Jm(e)?Ye.extend(this._calculationInfo,e):this._calculationInfo[e]=t},cv.getSum=function(e){var t=0;if(this._storage[e])for(var n=0,i=this.count();n<i;n++){var r=this.get(e,n);isNaN(r)||(t+=r)}return t},cv.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},cv.rawIndexOf=function(e,t){var n=(e&&this._invertedIndicesMap[e])[t];return null==n||isNaN(n)?-1:n},cv.indexOfName=function(e){for(var t=0,n=this.count();t<n;t++)if(this.getName(t)===e)return t;return-1},cv.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var i=0,r=this._count-1;i<=r;){var a=(i+r)/2|0;if(t[a]<e)i=a+1;else{if(!(t[a]>e))return a;r=a-1}}return-1},cv.indicesOfNearest=function(e,t,n){var i=[];if(!this._storage[e])return i;null==n&&(n=1/0);for(var r=1/0,a=-1,o=0,s=0,l=this.count();s<l;s++){var u=t-this.get(e,s),c=Math.abs(u);c<=n&&((c<r||c===r&&u>=0&&a<0)&&(r=c,a=u,o=0),u===a&&(i[o++]=s))}return i.length=o,i},cv.getRawIndex=pv,cv.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},cv.getName=function(e){var t=this.getRawIndex(e);return this._nameList[t]||fv(this,this._nameDimIdx,t)||""},cv.getId=function(e){return mv(this,this.getRawIndex(e))},cv.each=function(e,t,n,i){if(this._count){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this;for(var r=(e=Ye.map(vv(e),this.getDimension,this)).length,a=0;a<this.count();a++)switch(r){case 0:t.call(n,a);break;case 1:t.call(n,this.get(e[0],a),a);break;case 2:t.call(n,this.get(e[0],a),this.get(e[1],a),a);break;default:for(var o=0,s=[];o<r;o++)s[o]=this.get(e[o],a);s[o]=a,t.apply(n,s)}}},cv.filterSelf=function(e,t,n,i){if(this._count){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this,e=Ye.map(vv(e),this.getDimension,this);for(var r=this.count(),a=new(av(this))(r),o=[],s=e.length,l=0,u=e[0],c=0;c<r;c++){var h,d=this.getRawIndex(c);if(0===s)h=t.call(n,c);else if(1===s){var f=this._getFast(u,d);h=t.call(n,f,c)}else{for(var p=0;p<s;p++)o[p]=this._getFast(u,d);o[p]=c,h=t.apply(n,o)}h&&(a[l++]=d)}return l<r&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?gv:pv,this}},cv.selectRange=function(e){if(this._count){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);var i=t.length;if(i){var r=this.count(),a=new(av(this))(r),o=0,s=t[0],l=e[s][0],u=e[s][1],c=!1;if(!this._indices){var h=0;if(1===i){for(var d=this._storage[t[0]],f=0;f<this._chunkCount;f++)for(var p=d[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){((b=p[m])>=l&&b<=u||isNaN(b))&&(a[o++]=h),h++}c=!0}else if(2===i){d=this._storage[s];var v=this._storage[t[1]],y=e[t[1]][0],_=e[t[1]][1];for(f=0;f<this._chunkCount;f++){p=d[f];var x=v[f];for(g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){var b=p[m],w=x[m];(b>=l&&b<=u||isNaN(b))&&(w>=y&&w<=_||isNaN(w))&&(a[o++]=h),h++}}c=!0}}if(!c)if(1===i)for(m=0;m<r;m++){var T=this.getRawIndex(m);((b=this._getFast(s,T))>=l&&b<=u||isNaN(b))&&(a[o++]=T)}else for(m=0;m<r;m++){var S=!0;for(T=this.getRawIndex(m),f=0;f<i;f++){var O=t[f];((b=this._getFast(n,T))<e[O][0]||b>e[O][1])&&(S=!1)}S&&(a[o++]=this.getRawIndex(m))}return o<r&&(this._indices=a),this._count=o,this._extent={},this.getRawIndex=this._indices?gv:pv,this}}},cv.mapArray=function(e,t,n,i){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this;var r=[];return this.each(e,(function(){r.push(t&&t.apply(this,arguments))}),n),r},cv.map=function(e,t,n,i){n=n||i||this;var r=yv(this,e=Ye.map(vv(e),this.getDimension,this));r._indices=this._indices,r.getRawIndex=r._indices?gv:pv;for(var a=r._storage,o=[],s=this._chunkSize,l=e.length,u=this.count(),c=[],h=r._rawExtent,d=0;d<u;d++){for(var f=0;f<l;f++)c[f]=this.get(e[f],d);c[l]=d;var p=t&&t.apply(n,c);if(null!=p){"object"!=typeof p&&(o[0]=p,p=o);for(var g=this.getRawIndex(d),m=Math.floor(g/s),v=g%s,y=0;y<p.length;y++){var _=e[y],x=p[y],b=h[_],w=a[_];w&&(w[m][v]=x),x<b[0]&&(b[0]=x),x>b[1]&&(b[1]=x)}}}return r},cv.downSample=function(e,t,n,i){for(var r=yv(this,[e]),a=r._storage,o=[],s=Math.floor(1/t),l=a[e],u=this.count(),c=this._chunkSize,h=r._rawExtent[e],d=new(av(this))(u),f=0,p=0;p<u;p+=s){s>u-p&&(s=u-p,o.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/c),y=m%c;o[g]=l[v][y]}var _=n(o),x=this.getRawIndex(Math.min(p+i(o,_)||0,u-1)),b=x%c;l[Math.floor(x/c)][b]=_,_<h[0]&&(h[0]=_),_>h[1]&&(h[1]=_),d[f++]=x}return r._count=f,r._indices=d,r.getRawIndex=gv,r},cv.getItemModel=function(e){var t=this.hostModel;return new sh(this.getRawDataItem(e),t,t&&t.ecModel)},cv.diff=function(e){var t=this;return new Um(e?e.getIndices():[],this.getIndices(),(function(t){return mv(e,t)}),(function(e){return mv(t,e)}))},cv.getVisual=function(e){var t=this._visual;return t&&t[e]},cv.setVisual=function(e,t){if(Jm(e))for(var n in e)e.hasOwnProperty(n)&&this.setVisual(n,e[n]);else this._visual=this._visual||{},this._visual[e]=t},cv.setLayout=function(e,t){if(Jm(e))for(var n in e)e.hasOwnProperty(n)&&this.setLayout(n,e[n]);else this._layout[e]=t},cv.getLayout=function(e){return this._layout[e]},cv.getItemLayout=function(e){return this._itemLayouts[e]},cv.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?Ye.extend(this._itemLayouts[e]||{},t):t},cv.clearItemLayouts=function(){this._itemLayouts.length=0},cv.getItemVisual=function(e,t,n){var i=this._itemVisuals[e],r=i&&i[t];return null!=r||n?r:this.getVisual(t)},cv.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{},r=this.hasItemVisual;if(this._itemVisuals[e]=i,Jm(t))for(var a in t)t.hasOwnProperty(a)&&(i[a]=t[a],r[a]=!0);else i[t]=n,r[t]=!0},cv.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var bv=function(e){e.seriesIndex=this.seriesIndex,e.dataIndex=this.dataIndex,e.dataType=this.dataType};cv.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(bv,t)),this._graphicEls[e]=t},cv.getItemGraphicEl=function(e){return this._graphicEls[e]},cv.eachItemGraphicEl=function(e,t){Ye.each(this._graphicEls,(function(n,i){n&&e&&e.call(t,n,i)}))},cv.cloneShallow=function(e){if(!e){var t=Ye.map(this.dimensions,this.getDimensionInfo,this);e=new uv(t,this.hostModel)}if(e._storage=this._storage,lv(e,this),this._indices){var n=this._indices.constructor;e._indices=new n(this._indices)}else e._indices=null;return e.getRawIndex=e._indices?gv:pv,e},cv.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(Ye.slice(arguments)))})},cv.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],cv.CHANGABLE_METHODS=["filterSelf","selectRange"];var wv=uv,Tv=Ye.createHashMap,Sv=Ye.each,Ov=Ye.isString,Mv=Ye.defaults,Dv=Ye.extend,Av=Ye.isObject,kv=Ye.clone,Iv=ko.normalizeToArray,Cv=Gd.guessOrdinal,Ev=Gd.BE_ORDINAL,Nv=Zm.OTHER_DIMENSIONS;function Rv(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 Lv=function(e,t,n){vd.isInstance(t)||(t=vd.seriesDataToSource(t)),n=n||{},e=(e||[]).slice();for(var i=(n.dimsDef||[]).slice(),r=Tv(),a=Tv(),o=[],s=function(e,t,n,i){var r=Math.max(e.dimensionsDetectCount||1,t.length,n.length,i||0);return Sv(t,(function(e){var t=e.dimsDef;t&&(r=Math.max(r,t.length))})),r}(t,e,i,n.dimCount),l=0;l<s;l++){var u=i[l]=Dv({},Av(i[l])?i[l]:{name:i[l]}),c=u.name,h=o[l]=new Xm;null!=c&&null==r.get(c)&&(h.name=h.displayName=c,r.set(c,l)),null!=u.type&&(h.type=u.type),null!=u.displayName&&(h.displayName=u.displayName)}var d=n.encodeDef;!d&&n.encodeDefaulter&&(d=n.encodeDefaulter(t,s)),(d=Tv(d)).each((function(e,t){if(1===(e=Iv(e).slice()).length&&!Ov(e[0])&&e[0]<0)d.set(t,!1);else{var n=d.set(t,[]);Sv(e,(function(e,i){Ov(e)&&(e=r.get(e)),null!=e&&e<s&&(n[i]=e,p(o[e],t,i))}))}}));var f=0;function p(e,t,n){null!=Nv.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,a.set(t,!0))}Sv(e,(function(e,t){var n,i,r;if(Ov(e))n=e,e={};else{n=e.name;var a=e.ordinalMeta;e.ordinalMeta=null,(e=kv(e)).ordinalMeta=a,i=e.dimsDef,r=e.otherDims,e.name=e.coordDim=e.coordDimIndex=e.dimsDef=e.otherDims=null}if(!1!==(s=d.get(n))){var s;if(!(s=Iv(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++)}Sv(s,(function(t,a){var s=o[t];if(p(Mv(s,e),n,a),null==s.name&&i){var l=i[a];!Av(l)&&(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}r&&Mv(s.otherDims,r)}))}}));var g=n.generateCoord,m=n.generateCoordCount,v=null!=m;m=g?m||1:0;for(var y=g||"value",_=0;_<s;_++){null==(h=o[_]=o[_]||new Xm).coordDim&&(h.coordDim=Rv(y,a,v),h.coordDimIndex=0,(!g||m<=0)&&(h.isExtraCoord=!0),m--),null==h.name&&(h.name=Rv(h.coordDim,r)),null!=h.type||Cv(t,_,h.name)!==Ev.Must&&(!h.isExtraCoord||null==h.otherDims.itemName&&null==h.otherDims.seriesName)||(h.type="ordinal")}return o},Pv=Lv;var zv=function(e,t){return Pv((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})},Yv=Ye.createHashMap,Hv=Ye.each;function Fv(e){this.coordSysName=e,this.coordSysDims=[],this.axisMap=Yv(),this.categoryAxisMap=Yv(),this.firstCategoryDimIndex=null}var Bv={cartesian2d:function(e,t,n,i){var r=e.getReferringComponents("xAxis")[0],a=e.getReferringComponents("yAxis")[0];t.coordSysDims=["x","y"],n.set("x",r),n.set("y",a),jv(r)&&(i.set("x",r),t.firstCategoryDimIndex=0),jv(a)&&(i.set("y",a),t.firstCategoryDimIndex,t.firstCategoryDimIndex=1)},singleAxis:function(e,t,n,i){var r=e.getReferringComponents("singleAxis")[0];t.coordSysDims=["single"],n.set("single",r),jv(r)&&(i.set("single",r),t.firstCategoryDimIndex=0)},polar:function(e,t,n,i){var r=e.getReferringComponents("polar")[0],a=r.findAxisModel("radiusAxis"),o=r.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",o),jv(a)&&(i.set("radius",a),t.firstCategoryDimIndex=0),jv(o)&&(i.set("angle",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,i){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,i){var r=e.ecModel,a=r.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();Hv(a.parallelAxisIndex,(function(e,a){var s=r.getComponent("parallelAxis",e),l=o[a];n.set(l,s),jv(s)&&null==t.firstCategoryDimIndex&&(i.set(l,s),t.firstCategoryDimIndex=a)}))}};function jv(e){return"category"===e.get("type")}var Uv={getCoordSysInfoBySeries:function(e){var t=e.get("coordinateSystem"),n=new Fv(t),i=Bv[t];if(i)return i(e,n,n.axisMap,n.categoryAxisMap),n}},Wv=Ye.each,Gv=Ye.isString;function Vv(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}var qv={enableDataStack:function(e,t,n){var i,r,a,o,s=(n=n||{}).byIndex,l=n.stackedCoordDimension,u=!(!e||!e.get("stack"));if(Wv(t,(function(e,n){Gv(e)&&(t[n]=e={name:e}),u&&!e.isExtraCoord&&(s||i||!e.ordinalMeta||(i=e),r||"ordinal"===e.type||"time"===e.type||l&&l!==e.coordDim||(r=e))})),!r||s||i||(s=!0),r){a="__\0ecstackresult",o="__\0ecstackedover",i&&(i.createInvertedIndices=!0);var c=r.coordDim,h=r.type,d=0;Wv(t,(function(e){e.coordDim===c&&d++})),t.push({name:a,coordDim:c,coordDimIndex:d,type:h,isExtraCoord:!0,isCalculationCoord:!0}),d++,t.push({name:o,coordDim:o,coordDimIndex:d,type:h,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:r&&r.name,stackedByDimension:i&&i.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:a}},isDimensionStacked:Vv,getStackedDimension:function(e,t){return Vv(e,t)?e.getCalculationInfo("stackResultDimension"):t}},Zv=sd.SOURCE_FORMAT_ORIGINAL,Xv=Zm.getDimensionTypeByAxis,Kv=ko.getDataItemValue,$v=Uv.getCoordSysInfoBySeries,Qv=qv.enableDataStack,Jv=Gd.makeSeriesEncodeForAxisCoordSys;var ey=function(e,t,n){n=n||{},vd.isInstance(e)||(e=vd.seriesDataToSource(e));var i,r=t.get("coordinateSystem"),a=vf.get(r),o=$v(t);o&&(i=Ye.map(o.coordSysDims,(function(e){var t={name:e},n=o.axisMap.get(e);if(n){var i=n.get("type");t.type=Xv(i)}return t}))),i||(i=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=zv(e,{coordDimensions:i,generateCoord:n.generateCoord,encodeDefaulter:n.useEncodeDefaulter?Ye.curry(Jv,i,t):null});o&&Ye.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=Qv(t,u),h=new wv(u,t);h.setCalculationInfo(c);var d=null!=s&&function(e){if(e.sourceFormat===Zv){var t=function(e){var t=0;for(;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[]);return null!=t&&!Ye.isArray(Kv(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},ty=ey;function ny(e){this._setting=e||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}ny.prototype.parse=function(e){return e},ny.prototype.getSetting=function(e){return this._setting[e]},ny.prototype.contain=function(e){var t=this._extent;return e>=t[0]&&e<=t[1]},ny.prototype.normalize=function(e){var t=this._extent;return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},ny.prototype.scale=function(e){var t=this._extent;return e*(t[1]-t[0])+t[0]},ny.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},ny.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},ny.prototype.getExtent=function(){return this._extent.slice()},ny.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},ny.prototype.isBlank=function(){return this._isBlank},ny.prototype.setBlank=function(e){this._isBlank=e},ny.prototype.getLabel=null,zo.enableClassExtend(ny),zo.enableClassManagement(ny,{registerWhenExtend:!0});var iy=ny,ry=Ye.createHashMap,ay=Ye.isObject,oy=Ye.map;function sy(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this._map}sy.createByAxisModel=function(e){var t=e.option,n=t.data,i=n&&oy(n,cy);return new sy({categories:i,needCollect:!i,deduplication:!1!==t.dedplication})};var ly=sy.prototype;function uy(e){return e._map||(e._map=ry(e.categories))}function cy(e){return ay(e)&&null!=e.value?e.value:e+""}ly.getOrdinal=function(e){return uy(this).get(e)},ly.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=uy(this);return null==(t=i.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,i.set(e,t)):t=NaN),t};var hy=sy,dy=iy.prototype,fy=iy.extend({type:"ordinal",init:function(e,t){e&&!Ye.isArray(e)||(e=new hy({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),dy.contain.call(this,e)&&null!=this._ordinalMeta.categories[e]},normalize:function(e){return dy.normalize.call(this,this.parse(e))},scale:function(e){return Math.round(dy.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:Ye.noop,niceExtent:Ye.noop});fy.create=function(){return new fy};var py=fy,gy=bh.round;function my(e){return bh.getPrecisionSafe(e)+2}function vy(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function yy(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),vy(e,0,t),vy(e,1,t),e[0]>e[1]&&(e[0]=e[1])}var _y={intervalScaleNiceTicks:function(e,t,n,i){var r={},a=e[1]-e[0],o=r.interval=bh.nice(a/t,!0);null!=n&&o<n&&(o=r.interval=n),null!=i&&o>i&&(o=r.interval=i);var s=r.intervalPrecision=my(o);return yy(r.niceTickExtent=[gy(Math.ceil(e[0]/o)*o,s),gy(Math.floor(e[1]/o)*o,s)],e),r},getIntervalPrecision:my,fixExtent:yy},xy=bh.round,by=iy.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]),by.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=_y.getIntervalPrecision(e)},getTicks:function(e){var t=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,a=[];if(!t)return a;n[0]<i[0]&&(e?a.push(xy(i[0]-t,r)):a.push(n[0]));for(var o=i[0];o<=i[1]&&(a.push(o),(o=xy(o+t,r))!==a[a.length-1]);)if(a.length>1e4)return[];var s=a.length?a[a.length-1]:i[1];return n[1]>s&&(e?a.push(xy(s+t,r)):a.push(n[1])),a},getMinorTicks:function(e){for(var t=this.getTicks(!0),n=[],i=this.getExtent(),r=1;r<t.length;r++){for(var a=t[r],o=t[r-1],s=0,l=[],u=(a-o)/e;s<e-1;){var c=bh.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=bh.getPrecisionSafe(e)||0:"auto"===n&&(n=this._intervalPrecision),e=xy(e,n,!0),Rh.addCommas(e)},niceTicks:function(e,t,n){e=e||5;var i=this._extent,r=i[1]-i[0];if(isFinite(r)){r<0&&(r=-r,i.reverse());var a=_y.intervalScaleNiceTicks(i,e,t,n);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var n=t[0];e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var i=t[1]-t[0];isFinite(i)||(t[0]=0,t[1]=1),this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var r=this._interval;e.fixMin||(t[0]=xy(Math.floor(t[0]/r)*r)),e.fixMax||(t[1]=xy(Math.ceil(t[1]/r)*r))}});by.create=function(){return new by};var wy=by,Ty=bh.parsePercent,Sy=qv.isDimensionStacked,Oy="__ec_stack_",My="undefined"!=typeof Float32Array?Float32Array:Array;function Dy(e){return e.get("stack")||Oy+e.seriesIndex}function Ay(e){return e.dim+e.index}function ky(e,t){var n=[];return t.eachSeriesByType(e,(function(e){Ry(e)&&!Ly(e)&&n.push(e)})),n}function Iy(e){var t=function(e){var t={};Ye.each(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=e.getData(),r=n.dim+"_"+n.index,a=i.mapDimension(n.dim),o=0,s=i.count();o<s;++o){var l=i.get(a,o);t[r]?t[r].push(l):t[r]=[l]}}));var n=[];for(var i in t)if(t.hasOwnProperty(i)){var r=t[i];if(r){r.sort((function(e,t){return e-t}));for(var a=null,o=1;o<r.length;++o){var s=r[o]-r[o-1];s>0&&(a=null===a?s:Math.min(a,s))}n[i]=a}}return n}(e),n=[];return Ye.each(e,(function(e){var i,r=e.coordinateSystem.getBaseAxis(),a=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var o=r.dim+"_"+r.index,s=t[o],l=Math.abs(a[1]-a[0]),u=r.scale.getExtent(),c=Math.abs(u[1]-u[0]);i=s?l/c*s:l}else{var h=e.getData();i=Math.abs(a[1]-a[0])/h.count()}var d=Ty(e.get("barWidth"),i),f=Ty(e.get("barMaxWidth"),i),p=Ty(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:Ay(r),stackId:Dy(e)})})),Cy(n)}function Cy(e){var t={};Ye.each(e,(function(e,n){var i=e.axisKey,r=e.bandWidth,a=t[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=a.stacks;t[i]=a;var s=e.stackId;o[s]||a.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(a.remainedWidth,l),a.remainedWidth-=l);var u=e.barMaxWidth;u&&(o[s].maxWidth=u);var c=e.barMinWidth;c&&(o[s].minWidth=c);var h=e.barGap;null!=h&&(a.gap=h);var d=e.barCategoryGap;null!=d&&(a.categoryGap=d)}));var n={};return Ye.each(t,(function(e,t){n[t]={};var i=e.stacks,r=e.bandWidth,a=Ty(e.categoryGap,r),o=Ty(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-a)/(l+(l-1)*o);u=Math.max(u,0),Ye.each(i,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){i=e.width;t&&(i=Math.min(i,t)),n&&(i=Math.max(i,n)),e.width=i,s-=i+o*i,l--}else{var i=u;t&&t<i&&(i=Math.min(t,s)),n&&n>i&&(i=n),i!==u&&(e.width=i,s-=i+o*i,l--)}})),u=(s-a)/(l+(l-1)*o),u=Math.max(u,0);var c,h=0;Ye.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;Ye.each(i,(function(e,i){n[t][i]=n[t][i]||{bandWidth:r,offset:d,width:e.width},d+=e.width*(1+o)}))})),n}function Ey(e,t,n){if(e&&t){var i=e[Ay(t)];return null!=i&&null!=n&&(i=i[Dy(n)]),i}}var Ny={seriesType:"bar",plan:eg(),reset:function(e){if(Ry(e)&&Ly(e)){var t=e.getData(),n=e.coordinateSystem,i=n.grid.getRect(),r=n.getBaseAxis(),a=n.getOtherAxis(r),o=t.mapDimension(a.dim),s=t.mapDimension(r.dim),l=a.isHorizontal(),u=l?0:1,c=Ey(Iy([e]),r,e).width;return c>.5||(c=.5),{progress:function(e,t){var h,d=e.count,f=new My(2*d),p=new My(2*d),g=new My(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:Py(r,a),backgroundStart:l?i.x:i.y,valueAxisHorizontal:l})}}}}};function Ry(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function Ly(e){return e.pipelineContext&&e.pipelineContext.large}function Py(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 r=n.getBandWidth(),a=0;a<e.count;a++)t.push(Ye.defaults({bandWidth:r,axisKey:i,stackId:Oy+a},e));var o=Cy(t),s=[];for(a=0;a<e.count;a++){var l=o[i][Oy+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}},Yy=function(e,t){var n=ky(e,t),i=Iy(n),r={};Ye.each(n,(function(e){var t=e.getData(),n=e.coordinateSystem,a=n.getBaseAxis(),o=Dy(e),s=i[Ay(a)][o],l=s.offset,u=s.width,c=n.getOtherAxis(a),h=e.get("barMinHeight")||0;r[o]=r[o]||[],t.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=t.mapDimension(c.dim),f=t.mapDimension(a.dim),p=Sy(t,d),g=c.isHorizontal(),m=Py(a,c),v=0,y=t.count();v<y;v++){var _,x,b,w,T,S=t.get(d,v),O=t.get(f,v),M=S>=0?"p":"n",D=m;if(p&&(r[o][O]||(r[o][O]={p:m,n:m}),D=r[o][O][M]),g)_=D,x=(T=n.dataToPoint([S,O]))[1]+l,b=T[0]-m,w=u,Math.abs(b)<h&&(b=(b<0?-1:1)*h),isNaN(b)||p&&(r[o][O][M]+=b);else _=(T=n.dataToPoint([O,S]))[0]+l,x=D,b=u,w=T[1]-m,Math.abs(w)<h&&(w=(w<=0?-1:1)*h),isNaN(w)||p&&(r[o][O][M]+=w);t.setItemLayout(v,{x:_,y:x,width:b,height:w})}}),this)},Hy={getLayoutOnAxis:zy,prepareLayoutBarSeries:ky,makeColumnLayout:Iy,retrieveColumnLayout:Ey,layout:Yy,largeLayout:Ny},Fy=wy.prototype,By=Math.ceil,jy=Math.floor,Uy=1e3,Wy=6e4,Gy=36e5,Vy=864e5,qy=wy.extend({type:"time",getLabel:function(e){var t=this._stepLvl,n=new Date(e);return Rh.formatTime(t[0],n,this.getSetting("useUTC"))},niceExtent:function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=Vy,t[1]+=Vy),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]-Vy}this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval;e.fixMin||(t[0]=bh.round(jy(t[0]/i)*i)),e.fixMax||(t[1]=bh.round(By(t[1]/i)*i))},niceTicks:function(e,t,n){e=e||10;var i=this._extent,r=i[1]-i[0],a=r/e;null!=t&&a<t&&(a=t),null!=n&&a>n&&(a=n);var o=Zy.length,s=function(e,t,n,i){for(;n<i;){var r=n+i>>>1;e[r][1]<t?n=r+1:i=r}return n}(Zy,a,0,o),l=Zy[Math.min(s,o-1)],u=l[1];if("year"===l[0]){var c=r/u;u*=bh.nice(c/e,!0)}var h=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,d=[Math.round(By((i[0]-h)/u)*u+h),Math.round(jy((i[1]-h)/u)*u+h)];_y.fixExtent(d,i),this._stepLvl=l,this._interval=u,this._niceExtent=d},parse:function(e){return+bh.parseDate(e)}});Ye.each(["contain","normalize"],(function(e){qy.prototype[e]=function(t){return Fy[e].call(this,this.parse(t))}}));var Zy=[["hh:mm:ss",Uy],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",Wy],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",Gy],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",Vy],["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]];qy.create=function(e){return new qy({useUTC:e.ecModel.get("useUTC")})};var Xy=iy.prototype,Ky=wy.prototype,$y=bh.getPrecisionSafe,Qy=bh.round,Jy=Math.floor,e_=Math.ceil,t_=Math.pow,n_=Math.log,i_=iy.extend({type:"log",base:10,$constructor:function(){iy.apply(this,arguments),this._originalScale=new wy},getTicks:function(e){var t=this._originalScale,n=this._extent,i=t.getExtent();return Ye.map(Ky.getTicks.call(this,e),(function(e){var r=bh.round(t_(this.base,e));return r=e===n[0]&&t.__fixMin?r_(r,i[0]):r,r=e===n[1]&&t.__fixMax?r_(r,i[1]):r}),this)},getMinorTicks:Ky.getMinorTicks,getLabel:Ky.getLabel,scale:function(e){return e=Xy.scale.call(this,e),t_(this.base,e)},setExtent:function(e,t){var n=this.base;e=n_(e)/n_(n),t=n_(t)/n_(n),Ky.setExtent.call(this,e,t)},getExtent:function(){var e=this.base,t=Xy.getExtent.call(this);t[0]=t_(e,t[0]),t[1]=t_(e,t[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(t[0]=r_(t[0],i[0])),n.__fixMax&&(t[1]=r_(t[1],i[1])),t},unionExtent:function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=n_(e[0])/n_(t),e[1]=n_(e[1])/n_(t),Xy.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=bh.quantity(n);for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[bh.round(e_(t[0]/i)*i),bh.round(Jy(t[1]/i)*i)];this._interval=i,this._niceExtent=r}},niceExtent:function(e){Ky.niceExtent.call(this,e);var t=this._originalScale;t.__fixMin=e.fixMin,t.__fixMax=e.fixMax}});function r_(e,t){return Qy(e,$y(t))}Ye.each(["contain","normalize"],(function(e){i_.prototype[e]=function(t){return t=n_(t)/n_(this.base),Xy[e].call(this,t)}})),i_.create=function(){return new i_};var a_=Hy.prepareLayoutBarSeries,o_=Hy.makeColumnLayout,s_=Hy.retrieveColumnLayout;function l_(e,t){var n,i,r,a=e.type,o=t.getMin(),s=t.getMax(),l=e.getExtent();"ordinal"===a?n=t.getCategories().length:(i=t.get("boundaryGap"),Ye.isArray(i)||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=bh.parsePercent(i[0],1),i[1]=bh.parsePercent(i[1],1),r=l[1]-l[0]||Math.abs(l[0])),"dataMin"===o?o=l[0]:"function"==typeof o&&(o=o({min:l[0],max:l[1]})),"dataMax"===s?s=l[1]:"function"==typeof s&&(s=s({min:l[0],max:l[1]}));var u=null!=o,c=null!=s;null==o&&(o="ordinal"===a?n?0:NaN:l[0]-i[0]*r),null==s&&(s="ordinal"===a?n?n-1:NaN:l[1]+i[1]*r),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN),e.setBlank(Ye.eqNaN(o)||Ye.eqNaN(s)||"ordinal"===a&&!e.getOrdinalMeta().categories.length),t.getNeedCrossZero()&&(o>0&&s>0&&!u&&(o=0),o<0&&s<0&&!c&&(s=0));var h=t.ecModel;if(h&&"time"===a){var d,f=a_("bar",h);if(Ye.each(f,(function(e){d|=e.getBaseAxis()===t.axis})),d){var p=o_(f),g=function(e,t,n,i){var r=n.axis.getExtent(),a=r[1]-r[0],o=s_(i,n.axis);if(void 0===o)return{min:e,max:t};var s=1/0;Ye.each(o,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;Ye.each(o,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,h=c/(1-(s+l)/a)-c;return 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 u_(e){var t,n=e.getLabelModel().get("formatter"),i="category"===e.type?e.scale.getExtent()[0]:null;return"string"==typeof n?(t=n,n=function(n){return n=e.scale.getLabel(n),t.replace("{value}",null!=n?n:"")}):"function"==typeof n?function(t,r){return null!=i&&(r=t-i),n(c_(e,t),r)}:function(t){return e.scale.getLabel(t)}}function c_(e,t){return"category"===e.type?e.scale.getLabel(t):t}function h_(e,t){var n=t*Math.PI/180,i=e.plain(),r=i.width,a=i.height,o=r*Math.cos(n)+a*Math.sin(n),s=r*Math.sin(n)+a*Math.cos(n);return new ki(i.x,i.y,o,s)}function d_(e){var t=e.get("interval");return null==t?"auto":t}var f_=function(e,t){var n=l_(e,t),i=n.extent,r=t.get("splitNumber");"log"===e.type&&(e.base=t.get("logBase"));var a=e.type;e.setExtent(i[0],i[1]),e.niceExtent({splitNumber:r,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===a||"time"===a?t.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?t.get("maxInterval"):null});var o=t.get("interval");null!=o&&e.setInterval&&e.setInterval(o)},p_=function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new py(e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),[1/0,-1/0]);case"value":return new wy;default:return(iy.getClass(t)||wy).create(e)}},g_=function(e){var t=e.scale.getExtent(),n=t[0],i=t[1];return!(n>0&&i>0||n<0&&i<0)},m_=function(e){var t=e.model,n=e.scale;if(t.get("axisLabel.show")&&!n.isBlank()){var i,r,a="category"===e.type,o=n.getExtent();r=a?n.count():(i=n.getTicks()).length;var s,l=e.getLabelModel(),u=u_(e),c=1;r>40&&(c=Math.ceil(r/40));for(var h=0;h<r;h+=c){var d=u(i?i[h]:o[0]+h),f=h_(l.getTextRect(d),l.get("rotate")||0);s?s.union(f):s=f}return s}},v_={getScaleExtent:l_,niceScaleExtent:f_,createScaleByModel:p_,ifAxisCrossZero:g_,makeLabelFormatter:u_,getAxisRawValue:c_,estimateLabelUnionRect:m_,getOptionCategoryInterval:d_,shouldShowAllLabels:function(e){return"category"===e.type&&0===d_(e.getLabelModel())}},y_={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&&!Ye.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&&!Ye.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:Ye.noop,setRange:function(e,t){this.option.rangeStart=e,this.option.rangeEnd=t},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},__=y_,x_=Yr.calculateTextPosition,b_=Vc.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,r=t.width/2,a=t.height/2;e.moveTo(n,i-a),e.lineTo(n+r,i+a),e.lineTo(n-r,i+a),e.closePath()}}),w_=Vc.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,r=t.width/2,a=t.height/2;e.moveTo(n,i-a),e.lineTo(n+r,i),e.lineTo(n,i+a),e.lineTo(n-r,i),e.closePath()}}),T_=Vc.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,i=t.y,r=t.width/5*3,a=Math.max(r,t.height),o=r/2,s=o*o/(a-o),l=i-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,h=Math.sin(u),d=Math.cos(u),f=.6*o,p=.7*o;e.moveTo(n-c,l+s),e.arc(n,l,o,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-h*f,l+s+d*f,n,i-p,n,i),e.bezierCurveTo(n,i-p,n-c+h*f,l+s+d*f,n-c,l+s),e.closePath()}}),S_=Vc.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,i=t.width,r=t.x,a=t.y,o=i/3*2;e.moveTo(r,a),e.lineTo(r+o,a+n),e.lineTo(r,a+n/4*3),e.lineTo(r-o,a+n),e.lineTo(r,a),e.closePath()}}),O_={line:Vc.Line,rect:Vc.Rect,roundRect:Vc.Rect,square:Vc.Rect,circle:Vc.Circle,diamond:w_,pin:T_,arrow:S_,triangle:b_},M_={line:function(e,t,n,i,r){r.x1=e,r.y1=t+i/2,r.x2=e+n,r.y2=t+i/2},rect:function(e,t,n,i,r){r.x=e,r.y=t,r.width=n,r.height=i},roundRect:function(e,t,n,i,r){r.x=e,r.y=t,r.width=n,r.height=i,r.r=Math.min(n,i)/4},square:function(e,t,n,i,r){var a=Math.min(n,i);r.x=e,r.y=t,r.width=a,r.height=a},circle:function(e,t,n,i,r){r.cx=e+n/2,r.cy=t+i/2,r.r=Math.min(n,i)/2},diamond:function(e,t,n,i,r){r.cx=e+n/2,r.cy=t+i/2,r.width=n,r.height=i},pin:function(e,t,n,i,r){r.x=e+n/2,r.y=t+i/2,r.width=n,r.height=i},arrow:function(e,t,n,i,r){r.x=e+n/2,r.y=t+i/2,r.width=n,r.height=i},triangle:function(e,t,n,i,r){r.cx=e+n/2,r.cy=t+i/2,r.width=n,r.height=i}},D_={};Ye.each(O_,(function(e,t){D_[t]=new e}));var A_=Vc.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var i=x_(e,t,n),r=this.shape;return r&&"pin"===r.symbolType&&"inside"===t.textPosition&&(i.y=n.y+.4*n.height),i},buildPath:function(e,t,n){var i=t.symbolType;if("none"!==i){var r=D_[i];r||(r=D_[i="rect"]),M_[i](t.x,t.y,t.width,t.height,r.shape),r.buildPath(e,r.shape,n)}}});function k_(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 I_=function(e,t,n,i,r,a,o){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?Vc.makeImage(e.slice(8),new ki(t,n,i,r),o?"center":"cover"):0===e.indexOf("path://")?Vc.makePath(e.slice(7),{},new ki(t,n,i,r),o?"center":"cover"):new A_({shape:{symbolType:e,x:t,y:n,width:i,height:r}})).__isEmptyBrush=l,s.setColor=k_,s.setColor(a),s},C_={createSymbol:I_};var E_=function(e,t){var n=t;sh.isInstance(t)||(n=new sh(t),Ye.mixin(n,__));var i=v_.createScaleByModel(n);return i.setExtent(e[0],e[1]),v_.niceScaleExtent(i,n),i},N_=function(e){Ye.mixin(e,__)},R_={getLayoutRect:qh.getLayoutRect,completeDimensions:Pv,createDimensions:zv,createSymbol:C_.createSymbol,createList:function(e){return ty(e.getSource(),e)},dataStack:{isDimensionStacked:qv.isDimensionStacked,enableDataStack:qv.enableDataStack,getStackedDimension:qv.getStackedDimension},createScale:E_,mixinAxisModelCommonMethods:N_};function L_(e,t){return Math.abs(e-t)<1e-8}var P_=function(e,t,n){var i=0,r=e[0];if(!r)return!1;for(var a=1;a<e.length;a++){var o=e[a];i+=Js(r[0],r[1],o[0],o[1],t,n),r=o}var s=e[0];return L_(r[0],s[0])&&L_(r[1],s[1])||(i+=Js(r[0],r[1],s[0],s[1],t,n)),0!==i},z_={contain:P_};function Y_(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}Y_.prototype={constructor:Y_,properties:null,getBoundingRect:function(){var e=this._rect;if(e)return e;for(var t=Number.MAX_VALUE,n=[t,t],i=[-t,-t],r=[],a=[],o=this.geometries,s=0;s<o.length;s++)if("polygon"===o[s].type){var l=o[s].exterior;As.fromPoints(l,r,a),ot.min(n,n,r),ot.max(i,i,a)}return 0===s&&(n[0]=n[1]=i[0]=i[1]=0),this._rect=new ki(n[0],n[1],i[0]-n[0],i[1]-n[1])},contain:function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var i=0,r=n.length;i<r;i++)if("polygon"===n[i].type){var a=n[i].exterior,o=n[i].interiors;if(z_.contain(a,e[0],e[1])){for(var s=0;s<(o?o.length:0);s++)if(z_.contain(o[s]))continue e;return!0}}return!1},transformTo:function(e,t,n,i){var r=this.getBoundingRect(),a=r.width/r.height;n?i||(i=n/a):n=a*i;for(var o=new ki(e,t,n,i),s=r.calculateTransform(o),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var c=l[u].exterior,h=l[u].interiors,d=0;d<c.length;d++)ot.applyTransform(c[d],c[d],s);for(var f=0;f<(h?h.length:0);f++)for(d=0;d<h[f].length;d++)ot.applyTransform(h[f][d],h[f][d],s)}(r=this._rect).copy(o),this.center=[r.x+r.width/2,r.y+r.height/2]},cloneShallow:function(e){null==e&&(e=this.name);var t=new Y_(e,this.geometries,this.center);return t._rect=this._rect,t.transformTo=null,t}};var H_=Y_;function F_(e,t,n){for(var i=[],r=t[0],a=t[1],o=0;o<e.length;o+=2){var s=e.charCodeAt(o)-64,l=e.charCodeAt(o+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),r=s+=r,a=l+=a,i.push([s/n,l/n])}return i}var B_=function(e,t){return function(e){if(!e.UTF8Encoding)return e;var t=e.UTF8Scale;null==t&&(t=1024);for(var n=e.features,i=0;i<n.length;i++)for(var r=n[i].geometry,a=r.coordinates,o=r.encodeOffsets,s=0;s<a.length;s++){var l=a[s];if("Polygon"===r.type)a[s]=F_(l,o[s],t);else if("MultiPolygon"===r.type)for(var u=0;u<l.length;u++){var c=l[u];l[u]=F_(c,o[s][u],t)}}e.UTF8Encoding=!1}(e),Ye.map(Ye.filter(e.features,(function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0})),(function(e){var n=e.properties,i=e.geometry,r=i.coordinates,a=[];"Polygon"===i.type&&a.push({type:"polygon",exterior:r[0],interiors:r.slice(1)}),"MultiPolygon"===i.type&&Ye.each(r,(function(e){e[0]&&a.push({type:"polygon",exterior:e[0],interiors:e.slice(1)})}));var o=new H_(n[t||"name"],a,n.cp);return o.properties=n,o}))},j_=ko.makeInner,U_=v_.makeLabelFormatter,W_=v_.getOptionCategoryInterval,G_=v_.shouldShowAllLabels,V_=j_();function q_(e,t){var n,i,r=Z_(e,"labels"),a=W_(t),o=X_(r,a);return o||(Ye.isFunction(a)?n=Q_(e,a):(i="auto"===a?function(e){var t=V_(e).autoInterval;return null!=t?t:V_(e).autoInterval=e.calculateCategoryInterval()}(e):a,n=$_(e,i)),K_(r,a,{labels:n,labelCategoryInterval:i}))}function Z_(e,t){return V_(e)[t]||(V_(e)[t]=[])}function X_(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function K_(e,t,n){return e.push({key:t,value:n}),n}function $_(e,t,n){var i=U_(e),r=e.scale,a=r.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],c=r.count();0!==u&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=G_(e),d=o.get("showMinLabel")||h,f=o.get("showMaxLabel")||h;d&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);function g(e){s.push(n?e:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:e})}return f&&p-l!==a[1]&&g(a[1]),s}function Q_(e,t,n){var i=e.scale,r=U_(e),a=[];return Ye.each(i.getTicks(),(function(e){var o=i.getLabel(e);t(e,o)&&a.push(n?e:{formattedLabel:r(e),rawLabel:o,tickValue:e})})),a}var J_={createAxisLabels:function(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=q_(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=U_(e);return{labels:Ye.map(t,(function(t,i){return{formattedLabel:n(t,i),rawLabel:e.scale.getLabel(t),tickValue:t}}))}}(e)},createAxisTicks:function(e,t){return"category"===e.type?function(e,t){var n,i,r=Z_(e,"ticks"),a=W_(t),o=X_(r,a);if(o)return o;t.get("show")&&!e.scale.isBlank()||(n=[]);if(Ye.isFunction(a))n=Q_(e,a,!0);else if("auto"===a){var s=q_(e,e.getLabelModel());i=s.labelCategoryInterval,n=Ye.map(s.labels,(function(e){return e.tickValue}))}else n=$_(e,i=a,!0);return K_(r,a,{ticks:n,tickCategoryInterval:i})}(e,t):{ticks:e.scale.getTicks()}},calculateCategoryInterval:function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=U_(e),i=(t.axisRotate-t.labelRotate)/180*Math.PI,r=e.scale,a=r.getExtent(),o=r.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(i)),h=Math.abs(u*Math.sin(i)),d=0,f=0;l<=a[1];l+=s){var p,g,m=Yr.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=V_(e.model),b=e.getExtent(),w=x.lastAutoInterval,T=x.lastTickCount;return null!=w&&null!=T&&Math.abs(w-_)<=1&&Math.abs(T-o)<=1&&w>_&&x.axisExtend0===b[0]&&x.axisExtend1===b[1]?_=w:(x.lastTickCount=o,x.lastAutoInterval=_,x.axisExtend0=b[0],x.axisExtend1=b[1]),_}},ex=Ye.each,tx=Ye.map,nx=bh.linearMap,ix=bh.getPixelPrecision,rx=bh.round,ax=J_.createAxisTicks,ox=J_.createAxisLabels,sx=J_.calculateCategoryInterval,lx=[0,1],ux=function(e,t,n){this.dim=e,this.scale=t,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};function cx(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}ux.prototype={constructor:ux,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 ix(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&&cx(n=n.slice(),i.count()),nx(e,lx,n,t)},coordToData:function(e,t){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&cx(n=n.slice(),i.count());var r=nx(e,n,lx,t);return this.scale.scale(r)},pointToData:function(e,t){},getTicksCoords:function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=ax(this,t).ticks,i=tx(n,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this);return function(e,t,n,i){var r=t.length;if(!e.onBand||n||!r)return;var a,o,s=e.getExtent();if(1===r)t[0].coord=s[0],a=t[1]={coord:s[0]};else{var l=t[r-1].tickValue-t[0].tickValue,u=(t[r-1].coord-t[0].coord)/l;ex(t,(function(e){e.coord-=u/2})),o=1+e.scale.getExtent()[1]-t[r-1].tickValue,a={coord:t[r-1].coord+u*o},t.push(a)}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],a.coord)&&(i?a.coord=s[1]:t.pop());i&&h(a.coord,s[1])&&t.push({coord:s[1]});function h(e,t){return e=rx(e),t=rx(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 tx(t,(function(e){return tx(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},getViewLabels:function(){return ox(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 hx=ux,dx=go,fx=tn,px=ot,gx=Un,mx=bh,vx=Rh,yx=vg.throttle,_x=R_,xx=B_,bx=wv,Tx=sh,Sx=hx,Ox=te,Mx=B_,Dx={};Ye.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(e){Dx[e]=Ye[e]}));var Ax={};Ye.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){Ax[e]=Vc[e]}));var kx={zrender:dx,matrix:fx,vector:px,color:gx,number:mx,format:vx,throttle:yx,helper:_x,parseGeoJSON:xx,List:bx,Model:Tx,Axis:Sx,env:Ox,parseGeoJson:Mx,util:Dx,graphic:Ax},Ix=$((function(e,t){var n=vg.throttle,i=Ye.assert,r=Ye.each,a=Ye.isFunction,o=Ye.isObject,s=Jh.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,r){t||!this._disposed?(n=n&&n.toLowerCase(),ft.prototype[e].call(this,n,i,r)):this.id}}function f(){ft.call(this)}function p(e,t,i){i=i||{},"string"==typeof t&&(t=Y[t]),this.id,this.group,this._dom=e;var r=this._zr=go.init(e,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=n(Ye.bind(r.flush,r),17),(t=Ye.clone(t))&&Gf(t,!0),this._theme=t,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new vf;var a,o,s=this._api=(o=(a=this)._coordSysMgr,Ye.extend(new pf(a),{getCoordinateSystems:Ye.bind(o.getCoordinateSystems,o),getComponentByElement:function(e){for(;e;){var t=e.__ecComponentInfo;if(null!=t)return a._model.getComponent(t.mainType,t.index);e=e.parent}}}));function l(e,t){return e.__prio-t.__prio}zi(z,l),zi(R,l),this._scheduler=new Jg(this,s,R,z),ft.call(this,this._ecEventProcessor=new C),this._messageCenter=new f,this._initEvents(),this.resize=Ye.bind(this.resize,this),this._pendingActions=[],r.animation.on("frame",this._onframe,this),function(e,t){e.on("rendered",(function(){t.trigger("rendered"),!e.animation.isFinished()||t[c]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))}(r,this),Ye.setAsPrimitive(this)}f.prototype.on=d("on",!0),f.prototype.off=d("off",!0),f.prototype.one=d("one",!0),Ye.mixin(f,ft);var g=p.prototype;function m(e,t,n){if(this._disposed)this.id;else{var i,r=this._model,a=this._coordSysMgr.getCoordinateSystems();t=ko.parseFinder(r,t);for(var o=0;o<a.length;o++){var s=a[o];if(s[e]&&null!=(i=s[e](r,t,n)))return i}}}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),T.call(this,t)}else if(e.unfinished){var n=1,i=this._model,r=this._api;e.unfinished=!1;do{var a=+new Date;e.performSeriesTasks(i),e.performDataProcessorTasks(i),x(this,i),e.performVisualTasks(i),D(this,this._model,r,"remain"),n-=+new Date-a}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 r=new Mf(this._api),a=this._theme,s=this._model=new df;s.scheduler=this._scheduler,s.init(null,null,a,r)}this._model.setOption(e,L),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),T.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(te.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(te.svgSupported){var e=this._zr,t=e.storage.getDisplayList();return Ye.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=[],a=this;r(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=a._componentsMap[e.__viewId];t.group.ignore||(i.push(t),t.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return r(i,(function(e){e.group.ignore=!1})),o}this.id},g.getConnectedDataURL=function(e){if(this._disposed)this.id;else if(te.canvasSupported){var t="svg"===e.type,n=this.group,i=Math.min,a=Math.max,o=1/0;if(B[n]){var s=o,l=o,u=-1/0,c=-1/0,h=[],d=e&&e.pixelRatio||1;Ye.each(F,(function(r,o){if(r.group===n){var d=t?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(Ye.clone(e)),f=r.getDom().getBoundingClientRect();s=i(f.left,s),l=i(f.top,l),u=a(f.right,u),c=a(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=Ye.createCanvas(),m=go.init(g,{renderer:t?"svg":"canvas"});if(m.resize({width:f,height:p}),t){var v="";return r(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 Vc.Rect({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),r(h,(function(e){var t=new Vc.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=Ye.curry(m,"convertToPixel"),g.convertFromPixel=Ye.curry(m,"convertFromPixel"),g.containPixel=function(e,t){if(!this._disposed){var n,i=this._model;return e=ko.parseFinder(i,e),Ye.each(e,(function(e,i){i.indexOf("Models")>=0&&Ye.each(e,(function(e){var r=e.coordinateSystem;if(r&&r.containPoint)n|=!!r.containPoint(t);else if("seriesModels"===i){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(n|=a.containPoint(t,e))}}),this)}),this),!!n}this.id},g.getVisual=function(e,t){var n=this._model,i=(e=ko.parseFinder(n,e,{defaultMainType:"series"})).seriesModel.getData(),r=e.hasOwnProperty("dataIndexInside")?e.dataIndexInside:e.hasOwnProperty("dataIndex")?i.indexOfRawIndex(e.dataIndex):null;return null!=r?i.getItemVisual(r,t):i.getVisual(t)},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,r=this._coordSysMgr,a=this._scheduler;if(t){a.restoreData(t,e),a.performSeriesTasks(t),r.create(t,n),a.performDataProcessorTasks(t,e),x(this,t),r.update(t,n),O(t),a.performVisualTasks(t,e),M(this,t,n,e);var o=t.get("backgroundColor")||"transparent";if(te.canvasSupported)i.setBackgroundColor(o);else{var s=Un.parse(o);o=Un.stringify(s,"rgb"),0===s[3]&&(o="transparent")}A(t,n)}},updateTransform:function(e){var t=this._model,n=this,i=this._api;if(t){var r=[];t.eachComponent((function(a,o){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,t,i,e);l&&l.update&&r.push(s)}else r.push(s)}));var a=Ye.createHashMap();t.eachSeries((function(r){var o=n._chartsMap[r.__viewId];if(o.updateTransform){var s=o.updateTransform(r,t,i,e);s&&s.update&&a.set(r.uid,1)}else a.set(r.uid,1)})),O(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0,dirtyMap:a}),D(n,t,i,e,a),A(t,this._api)}},updateView:function(e){var t=this._model;t&&(dg.markUpdateMethod(e,"updateView"),O(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0}),M(this,this._model,this._api,e),A(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(),S(e,"component",t,n),S(e,"chart",t,n),n.plan()}function _(e,t,n,i,a){var o=e._model;if(i){var s={};s[i+"Id"]=n[i+"Id"],s[i+"Index"]=n[i+"Index"],s[i+"Name"]=n[i+"Name"];var l={mainType:i,query:s};a&&(l.subType=a);var u=n.excludeSeriesId;null!=u&&(u=Ye.createHashMap(ko.normalizeToArray(u))),o&&o.eachComponent(l,(function(t){u&&null!=u.get(t.id)||c(e["series"===i?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else r(e._componentsViews.concat(e._chartsViews),c);function c(i){i&&i.__alive&&i[t]&&i[t](i.__model,o,e._api,n)}}function 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,a=E[n],o=a.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=Ye.map(e.batch,(function(t){return(t=Ye.defaults(Ye.extend({},t),e)).batch=null,t})));var p,g=[],m="highlight"===n||"downplay"===n;r(d,(function(e){(p=(p=a.action(e,this._model,this._api))||Ye.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 T(e){!e&&this.trigger("updated")}function S(e,t,n,i){for(var r="component"===t,a=r?e._componentsViews:e._chartsViews,o=r?e._componentsMap:e._chartsMap,l=e._zr,u=e._api,c=0;c<a.length;c++)a[c].__alive=!1;function h(e){var t="_ec_"+e.id+"_"+e.type,c=o[t];if(!c){var h=s(e.type);(c=new(r?Qp.getClass(h.main,h.sub):dg.getClass(h.sub))).init(n,u),o[t]=c,a.push(c),l.add(c.group)}e.__viewId=c.__id=t,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!r&&i.prepareView(c,e,n,u)}r?n.eachComponent((function(e,t){"series"!==e&&h(t)})):n.eachSeries(h);for(c=0;c<a.length;){var d=a[c];d.__alive?c++:(!r&&d.renderTask.dispose(),l.remove(d.group),d.dispose(n,u),a.splice(c,1),delete o[d.__id],d.__id=d.group.__ecComponentInfo=null)}}function O(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function M(e,t,n,i){!function(e,t,n,i,a){r(a||e._componentsViews,(function(e){var r=e.__model;e.render(r,t,n,i),I(r,e)}))}(e,t,n,i),r(e._chartsViews,(function(e){e.__alive=!1})),D(e,t,n,i),r(e._chartsViews,(function(e){e.__alive||e.remove(t,n)}))}function D(e,t,n,i,r){var a,o=e._scheduler;t.eachSeries((function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var s=n.renderTask;o.updatePayload(s,i),r&&r.get(t.uid)&&s.dirty(),a|=s.perform(o.getPerformArgs(s)),n.group.silent=!!t.get("silent"),I(t,n),function(e,t){var n=e.get("blendMode")||null;t.group.traverse((function(e){e.isGroup||e.style.blend!==n&&e.setStyle("blend",n),e.eachPendingDisplayable&&e.eachPendingDisplayable((function(e){e.setStyle("blend",n)}))}))}(t,n)})),o.unfinished|=a,function(e,t){var n=e._zr,i=n.storage,r=0;i.traverse((function(e){r++})),r>t.get("hoverLayerThreshold")&&!te.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),Tg(e._zr.dom,t)}function A(e,t){r(P,(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),T.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(),H[e]){var n=H[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=Ye.extend({},e);return t.type=N[e.type],t},g.dispatchAction=function(e,t){this._disposed?this.id:(o(t)||(t={silent:!!t}),E[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&&te.browser.weChat&&this._throttledZrFlush(),w.call(this,t.silent),T.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 k=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function I(e,t){var n=e.get("z"),i=e.get("zlevel");t.group.traverse((function(e){"group"!==e.type&&(null!=n&&(e.z=n),null!=i&&(e.zlevel=i))}))}function C(){this.eventInfo}g._initEvents=function(){r(k,(function(e){var t=function(t){var n,i=this.getModel(),r=t.target;if("globalout"===e)n={};else if(r&&null!=r.dataIndex){var a=r.dataModel||i.getSeriesByIndex(r.seriesIndex);n=a&&a.getDataParams(r.dataIndex,r.dataType,r)||{}}else r&&r.eventData&&(n=Ye.extend({},r.eventData));if(n){var o=n.componentType,s=n.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",s=n.seriesIndex);var l=o&&null!=s&&i.getComponent(o,s),u=l&&this["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=t,n.type=e,this._ecEventProcessor.eventInfo={targetEl:r,packedEvent:n,model:l,view:u},this.trigger(e,n)}};t.zrEventfulCallAtLast=!0,this._zr.on(e,t,this)}),this),r(N,(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,ko.setAttribute(this.getDom(),W,"");var e=this._api,t=this._model;r(this._componentsViews,(function(n){n.dispose(t,e)})),r(this._chartsViews,(function(n){n.dispose(t,e)})),this._zr.dispose(),delete F[this.id]}},Ye.mixin(p,ft),C.prototype={constructor:C,normalizeQuery:function(e){var t={},n={},i={};if(Ye.isString(e)){var r=s(e);t.mainType=r.main||null,t.subType=r.sub||null}else{var a=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};Ye.each(e,(function(e,r){for(var s=!1,l=0;l<a.length;l++){var u=a[l],c=r.lastIndexOf(u);if(c>0&&c===r.length-u.length){var h=r.slice(0,c);"data"!==h&&(t.mainType=h,t[u.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(r)&&(n[r]=e,s=!0),s||(i[r]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:i}},filter:function(e,t,n){var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,r,a));function c(e,t,n,i){return null==e[n]||t[i||n]===e[n]}},afterTrigger:function(){this.eventInfo=null}};var E={},N={},R=[],L=[],P=[],z=[],Y={},H={},F={},B={},j=new Date-0,U=new Date-0,W="_echarts_instance_";function G(e){B[e]=!1}var V=G;function q(e){return F[ko.getAttribute(e,W)]}function Z(e,t){Y[e]=t}function X(e){L.push(e)}function K(e,t){J(R,e,t,1e3)}function $(e,t,n){"function"==typeof t&&(n=t,t="");var r=o(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,i(h.test(r)&&h.test(t)),E[r]||(E[r]={action:n,actionInfo:e}),N[t]=r}function Q(e,t){J(z,e,t,3e3,"visual")}function J(e,t,n,i,r){(a(t)||o(t))&&(n=t,t=i);var s=Jg.wrapStageHandler(n,r);return s.__prio=t,s.__raw=n,e.push(s),s}function ee(e,t){H[e]=t}Q(2e3,xg),X(Gf),K(900,Xf),ee("default",Og),$({type:"highlight",event:"highlight",update:"highlight"},Ye.noop),$({type:"downplay",event:"downplay",update:"downplay"},Ye.noop),Z("light",tm),Z("dark",om);t.version="4.8.0",t.dependencies={zrender:"4.3.1"},t.PRIORITY=l,t.init=function(e,t,n){var i=q(e);if(i)return i;var a=new p(e,t,n);return a.id="ec_"+j++,F[a.id]=a,ko.setAttribute(e,W,a.id),function(e){var t="__connectUpdateStatus";function n(e,n){for(var i=0;i<e.length;i++)e[i][t]=n}r(N,(function(i,a){e._messageCenter.on(a,(function(i){if(B[e.group]&&0!==e[t]){if(i&&i.escapeConnect)return;var a=e.makeActionFromEvent(i),o=[];r(F,(function(t){t!==e&&t.group===e.group&&o.push(t)})),n(o,0),r(o,(function(e){1!==e[t]&&e.dispatchAction(a)})),n(o,2)}}))}))}(a),a},t.connect=function(e){if(Ye.isArray(e)){var t=e;e=null,r(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+U++,r(t,(function(t){t.group=e}))}return B[e]=!0,e},t.disConnect=G,t.disconnect=V,t.dispose=function(e){"string"==typeof e?e=F[e]:e instanceof p||(e=q(e)),e instanceof p&&!e.isDisposed()&&e.dispose()},t.getInstanceByDom=q,t.getInstanceById=function(e){return F[e]},t.registerTheme=Z,t.registerPreprocessor=X,t.registerProcessor=K,t.registerPostUpdate=function(e){P.push(e)},t.registerAction=$,t.registerCoordinateSystem=function(e,t){vf.register(e,t)},t.getCoordinateSystemDimensions=function(e){var t=vf.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 Jh.extend(e)},t.extendComponentView=function(e){return Qp.extend(e)},t.extendSeriesModel=function(e){return Xp.extend(e)},t.extendChartView=function(e){return dg.extend(e)},t.setCanvasCreator=function(e){Ye.$override("createCanvas",e)},t.registerMap=function(e,t,n){Hm.registerMap(e,t,n)},t.getMap=function(e){var t=Hm.retrieveMap(e);return t&&t[0]&&{geoJson:t[0].geoJSON,specialAreas:t[0].specialAreas}},t.dataTool={},function(){for(var e in kx)kx.hasOwnProperty(e)&&(t[e]=kx[e])}()}));Xp.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(e,t){return ty(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 Cx=mp.retrieveRawValue;var Ex=function(e,t){var n=e.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return Cx(e,t,n[0]);if(i){for(var r=[],a=0;a<n.length;a++){var o=Cx(e,t,n[a]);r.push(o)}return r.join(" ")}},Nx={getDefaultLabel:Ex},Rx=C_.createSymbol,Lx=bh.parsePercent,Px=Nx.getDefaultLabel;function zx(e,t,n){Vc.Group.call(this),this.updateData(e,t,n)}var Yx=zx.prototype,Hx=zx.getSymbolSize=function(e,t){var n=e.getItemVisual(t,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};function Fx(e){return[e[0]/2,e[1]/2]}function Bx(e,t){this.parent.drift(e,t)}Yx._createSymbol=function(e,t,n,i,r){this.removeAll();var a=t.getItemVisual(n,"color"),o=Rx(e,-1,-1,2,2,a,r);o.attr({z2:100,culling:!0,scale:Fx(i)}),o.drift=Bx,this._symbolType=e,this.add(o)},Yx.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(e)},Yx.getSymbolPath=function(){return this.childAt(0)},Yx.getScale=function(){return this.childAt(0).scale},Yx.highlight=function(){this.childAt(0).trigger("emphasis")},Yx.downplay=function(){this.childAt(0).trigger("normal")},Yx.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},Yx.setDraggable=function(e){var t=this.childAt(0);t.draggable=e,t.cursor=e?"move":t.cursor},Yx.updateData=function(e,t,n){this.silent=!1;var i=e.getItemVisual(t,"symbol")||"circle",r=e.hostModel,a=Hx(e,t),o=i!==this._symbolType;if(o){var s=e.getItemVisual(t,"symbolKeepAspect");this._createSymbol(i,e,t,a,s)}else{(l=this.childAt(0)).silent=!1,Vc.updateProps(l,{scale:Fx(a)},r,t)}if(this._updateCommon(e,t,a,n),o){var l=this.childAt(0),u=n&&n.fadeIn,c={scale:l.scale.slice()};u&&(c.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),Vc.initProps(l,c,r,t)}this._seriesModel=r};var jx=["itemStyle"],Ux=["emphasis","itemStyle"],Wx=["label"],Gx=["emphasis","label"];function Vx(e,t){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===t){var n=this.__symbolOriginalScale,i=n[1]/n[0],r={scale:[Math.max(1.1*n[0],n[0]+3),Math.max(1.1*n[1],n[1]+3*i)]};this.animateTo(r,400,"elasticOut")}else"normal"===t&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}Yx._updateCommon=function(e,t,n,i){var r=this.childAt(0),a=e.hostModel,o=e.getItemVisual(t,"color");"image"!==r.type?r.useStyle({strokeNoScale:!0}):r.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=i&&i.itemStyle,l=i&&i.hoverItemStyle,u=i&&i.symbolOffset,c=i&&i.labelModel,h=i&&i.hoverLabelModel,d=i&&i.hoverAnimation,f=i&&i.cursorStyle;if(!i||e.hasItemOption){var p=i&&i.itemModel?i.itemModel:e.getItemModel(t);s=p.getModel(jx).getItemStyle(["color"]),l=p.getModel(Ux).getItemStyle(),u=p.getShallow("symbolOffset"),c=p.getModel(Wx),h=p.getModel(Gx),d=p.getShallow("hoverAnimation"),f=p.getShallow("cursor")}else l=Ye.extend({},l);var g=r.style,m=e.getItemVisual(t,"symbolRotate");r.attr("rotation",(m||0)*Math.PI/180||0),u&&r.attr("position",[Lx(u[0],n[0]),Lx(u[1],n[1])]),f&&r.attr("cursor",f),r.setColor(o,i&&i.symbolInnerColor),r.setStyle(s);var v=e.getItemVisual(t,"opacity");null!=v&&(g.opacity=v);var y=e.getItemVisual(t,"liftZ"),_=r.__z2Origin;null!=y?null==_&&(r.__z2Origin=r.z2,r.z2+=y):null!=_&&(r.z2=_,r.__z2Origin=null);var x=i&&i.useNameLabel;Vc.setLabelStyle(g,l,c,h,{labelFetcher:a,labelDataIndex:t,defaultText:function(t,n){return x?e.getName(t):Px(e,t)},isRectText:!0,autoColor:o}),r.__symbolOriginalScale=Fx(n),r.hoverStyle=l,r.highDownOnUpdate=d&&a.isAnimationEnabled()?Vx:null,Vc.setHoverStyle(r)},Yx.fadeOut=function(e,t){var n=this.childAt(0);this.silent=n.silent=!0,(!t||!t.keepLabel)&&(n.style.text=null),Vc.updateProps(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,e)},Ye.inherits(zx,Vc.Group);var qx=zx,Zx=Ye.isObject;function Xx(e){this.group=new Vc.Group,this._symbolCtor=e||qx}var Kx=Xx.prototype;function $x(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 Qx(e){return null==e||Zx(e)||(e={isIgnore:e}),e||{}}function Jx(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")}}Kx.updateData=function(e,t){t=Qx(t);var n=this.group,i=e.hostModel,r=this._data,a=this._symbolCtor,o=Jx(e);r||n.removeAll(),e.diff(r).add((function(i){var r=e.getItemLayout(i);if($x(e,r,i,t)){var s=new a(e,i,o);s.attr("position",r),e.setItemGraphicEl(i,s),n.add(s)}})).update((function(s,l){var u=r.getItemGraphicEl(l),c=e.getItemLayout(s);$x(e,c,s,t)?(u?(u.updateData(e,s,o),Vc.updateProps(u,{position:c},i)):(u=new a(e,s)).attr("position",c),n.add(u),e.setItemGraphicEl(s,u)):n.remove(u)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}))})).execute(),this._data=e},Kx.isPersistent=function(){return!0},Kx.updateLayout=function(){var e=this._data;e&&e.eachItemGraphicEl((function(t,n){var i=e.getItemLayout(n);t.attr("position",i)}))},Kx.incrementalPrepareUpdate=function(e){this._seriesScope=Jx(e),this._data=null,this.group.removeAll()},Kx.incrementalUpdate=function(e,t,n){function i(e){e.isGroup||(e.incremental=e.useHoverLayer=!0)}n=Qx(n);for(var r=e.start;r<e.end;r++){var a=t.getItemLayout(r);if($x(t,a,r,n)){var o=new this._symbolCtor(t,r,this._seriesScope);o.traverse(i),o.attr("position",a),this.group.add(o),t.setItemGraphicEl(r,o)}}},Kx.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 eb=Xx,tb=qv.isDimensionStacked,nb=Ye.map;var ib={prepareDataCoordInfo:function(e,t,n){var i,r=e.getBaseAxis(),a=e.getOtherAxis(r),o=function(e,t){var n=0,i=e.scale.getExtent();"start"===t?n=i[0]:"end"===t?n=i[1]:i[0]>0?n=i[0]:i[1]<0&&(n=i[1]);return n}(a,n),s=r.dim,l=a.dim,u=t.mapDimension(l),c=t.mapDimension(s),h="x"===l||"radius"===l?1:0,d=nb(e.dimensions,(function(e){return t.mapDimension(e)})),f=t.getCalculationInfo("stackResultDimension");return(i|=tb(t,d[0]))&&(d[0]=f),(i|=tb(t,d[1]))&&(d[1]=f),{dataDimsForPoint:d,valueStart:o,valueAxisDim:l,baseAxisDim:s,stacked:!!i,valueDim:u,baseDim:c,baseDataOffset:h,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}},getStackedOnPoint:function(e,t,n,i){var r=NaN;e.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,i),o[1-a]=r,t.dataToPoint(o)}},rb=ib.prepareDataCoordInfo,ab=ib.getStackedOnPoint;var ob=function(e,t,n,i,r,a,o,s){for(var l=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),u=[],c=[],h=[],d=[],f=[],p=[],g=[],m=rb(r,t,o),v=rb(a,e,s),y=0;y<l.length;y++){var _=l[y],x=!0;switch(_.cmd){case"=":var b=e.getItemLayout(_.idx),w=t.getItemLayout(_.idx1);(isNaN(b[0])||isNaN(b[1]))&&(b=w.slice()),u.push(b),c.push(w),h.push(n[_.idx]),d.push(i[_.idx1]),g.push(t.getRawIndex(_.idx1));break;case"+":var T=_.idx;u.push(r.dataToPoint([t.get(m.dataDimsForPoint[0],T),t.get(m.dataDimsForPoint[1],T)])),c.push(t.getItemLayout(T).slice()),h.push(ab(m,r,t,T)),d.push(i[T]),g.push(t.getRawIndex(T));break;case"-":T=_.idx;var S=e.getRawIndex(T);S!==T?(u.push(e.getItemLayout(T)),c.push(a.dataToPoint([e.get(v.dataDimsForPoint[0],T),e.get(v.dataDimsForPoint[1],T)])),h.push(n[T]),d.push(ab(v,a,e,T)),g.push(S)):x=!1}x&&(f.push(_),p.push(p.length))}p.sort((function(e,t){return g[e]-g[t]}));var O=[],M=[],D=[],A=[],k=[];for(y=0;y<p.length;y++){T=p[y];O[y]=u[T],M[y]=c[T],D[y]=h[T],A[y]=d[T],k[y]=f[T]}return{current:O,next:M,stackedOnCurrent:D,stackedOnNext:A,status:k}},sb=ot.min,lb=ot.max,ub=ot.scaleAndAdd,cb=ot.copy,hb=[],db=[],fb=[];function pb(e){return isNaN(e[0])||isNaN(e[1])}function gb(e,t,n,i,r,a,o,s,l,u,c){return"none"!==u&&u?mb.apply(this,arguments):vb.apply(this,arguments)}function mb(e,t,n,i,r,a,o,s,l,u,c){for(var h=0,d=n,f=0;f<i;f++){var p=t[d];if(d>=r||d<0)break;if(pb(p)){if(c){d+=a;continue}break}if(d===n)e[a>0?"moveTo":"lineTo"](p[0],p[1]);else if(l>0){var g=t[h],m="y"===u?1:0,v=(p[m]-g[m])*l;cb(db,g),db[m]=g[m]+v,cb(fb,p),fb[m]=p[m]-v,e.bezierCurveTo(db[0],db[1],fb[0],fb[1],p[0],p[1])}else e.lineTo(p[0],p[1]);h=d,d+=a}return f}function vb(e,t,n,i,r,a,o,s,l,u,c){for(var h=0,d=n,f=0;f<i;f++){var p=t[d];if(d>=r||d<0)break;if(pb(p)){if(c){d+=a;continue}break}if(d===n)e[a>0?"moveTo":"lineTo"](p[0],p[1]),cb(db,p);else if(l>0){var g=d+a,m=t[g];if(c)for(;m&&pb(t[g]);)m=t[g+=a];var v=.5,y=t[h];if(!(m=t[g])||pb(m))cb(fb,p);else{var _,x;if(pb(m)&&!c&&(m=p),ot.sub(hb,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 _=ot.dist(p,y),x=ot.dist(p,m);ub(fb,p,hb,-l*(1-(v=x/(x+_))))}sb(db,db,s),lb(db,db,o),sb(fb,fb,s),lb(fb,fb,o),e.bezierCurveTo(db[0],db[1],fb[0],fb[1],p[0],p[1]),ub(db,p,hb,l*v)}else e.lineTo(p[0],p[1]);h=d,d+=a}return f}function yb(e,t){var n=[1/0,1/0],i=[-1/0,-1/0];if(t)for(var r=0;r<e.length;r++){var a=e[r];a[0]<n[0]&&(n[0]=a[0]),a[1]<n[1]&&(n[1]=a[1]),a[0]>i[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:t?n:i,max:t?i:n}}var _b=pl.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Hl(pl.prototype.brush),buildPath:function(e,t){var n=t.points,i=0,r=n.length,a=yb(n,t.smoothConstraint);if(t.connectNulls){for(;r>0&&pb(n[r-1]);r--);for(;i<r&&pb(n[i]);i++);}for(;i<r;)i+=gb(e,n,i,r,r,1,a.min,a.max,t.smooth,t.smoothMonotone,t.connectNulls)+1}}),xb=pl.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Hl(pl.prototype.brush),buildPath:function(e,t){var n=t.points,i=t.stackedOnPoints,r=0,a=n.length,o=t.smoothMonotone,s=yb(n,t.smoothConstraint),l=yb(i,t.smoothConstraint);if(t.connectNulls){for(;a>0&&pb(n[a-1]);a--);for(;r<a&&pb(n[r]);r++);}for(;r<a;){var u=gb(e,n,r,a,a,1,s.min,s.max,t.smooth,o,t.connectNulls);gb(e,i,r+u-1,u,a,-1,l.min,l.max,t.stackedOnSmooth,o,t.connectNulls),r+=u+1,e.closePath()}}}),bb={Polyline:_b,Polygon:xb},wb=bh.round;function Tb(e,t,n){var i=e.getArea(),r=e.getBaseAxis().isHorizontal(),a=i.x,o=i.y,s=i.width,l=i.height,u=n.get("lineStyle.width")||2;a-=u/2,o-=u/2,s+=u,l+=u,a=Math.floor(a),s=Math.round(s);var c=new Vc.Rect({shape:{x:a,y:o,width:s,height:l}});return t&&(c.shape[r?"width":"height"]=0,Vc.initProps(c,{shape:{width:s,height:l}},n)),c}function Sb(e,t,n){var i=e.getArea(),r=new Vc.Sector({shape:{cx:wb(e.cx,1),cy:wb(e.cy,1),r0:wb(i.r0,1),r:wb(i.r,1),startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return t&&(r.shape.endAngle=i.startAngle,Vc.initProps(r,{shape:{endAngle:i.endAngle}},n)),r}var Ob={createGridClipPath:Tb,createPolarClipPath:Sb,createClipPath:function(e,t,n){return e?"polar"===e.type?Sb(e,t,n):"cartesian2d"===e.type?Tb(e,t,n):null:null}},Mb=As.fromPoints,Db=bb.Polyline,Ab=bb.Polygon,kb=ib.prepareDataCoordInfo,Ib=ib.getStackedOnPoint,Cb=Ob.createGridClipPath,Eb=Ob.createPolarClipPath;function Nb(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++){var i=e[n],r=t[n];if(i[0]!==r[0]||i[1]!==r[1])return}return!0}}function Rb(e,t){var n=[],i=[],r=[],a=[];return Mb(e,n,i),Mb(t,r,a),Math.max(Math.abs(n[0]-r[0]),Math.abs(n[1]-r[1]),Math.abs(i[0]-a[0]),Math.abs(i[1]-a[1]))}function Lb(e){return"number"==typeof e?e:e?.5:0}function Pb(e,t,n){for(var i=t.getBaseAxis(),r="x"===i.dim||"radius"===i.dim?0:1,a=[],o=0;o<e.length-1;o++){var s=e[o+1],l=e[o];a.push(l);var u=[];switch(n){case"end":u[r]=s[r],u[1-r]=l[1-r],a.push(u);break;case"middle":var c=(l[r]+s[r])/2,h=[];u[r]=h[r]=c,u[1-r]=l[1-r],h[1-r]=s[1-r],a.push(u),a.push(h);break;default:u[r]=l[r],u[1-r]=s[1-r],a.push(u)}}return e[o]&&a.push(e[o]),a}function zb(e,t,n){var i=e.get("showAllSymbol"),r="auto"===i;if(!i||r){var a=n.getAxesByScale("ordinal")[0];if(a&&(!r||!function(e,t){var n=e.getExtent(),i=Math.abs(n[1]-n[0])/e.scale.count();isNaN(i)&&(i=0);for(var r=t.count(),a=Math.max(1,Math.round(r/5)),o=0;o<r;o+=a)if(1.5*qx.getSymbolSize(t,o)[e.isHorizontal()?1:0]>i)return!1;return!0}(a,t))){var o=t.mapDimension(a.dim),s={};return Ye.each(a.getViewLabels(),(function(e){s[e.tickValue]=1})),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function Yb(e,t,n){if("cartesian2d"===e.type){var i=e.getBaseAxis().isHorizontal(),r=Cb(e,t,n);if(!n.get("clip",!0)){var a=r.shape,o=Math.max(a.width,a.height);i?(a.y-=o,a.height+=2*o):(a.x-=o,a.width+=2*o)}return r}return Eb(e,t,n)}dg.extend({type:"line",init:function(){var e=new Vc.Group,t=new eb;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},render:function(e,t,n){var i=e.coordinateSystem,r=this.group,a=e.getData(),o=e.getModel("lineStyle"),s=e.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),u="polar"===i.type,c=this._coordSys,h=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=e.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(e,t,n){if(!n.valueDim)return[];for(var i=[],r=0,a=t.count();r<a;r++)i.push(Ib(n,e,t,r));return i}(i,a,kb(i,a,v)),_=e.get("showSymbol"),x=_&&!u&&zb(e,a,i),b=this._data;b&&b.eachItemGraphicEl((function(e,t){e.__temp&&(r.remove(e),b.setItemGraphicEl(t,null))})),_||h.remove(),r.add(p);var w,T=!u&&e.get("step");i&&i.getArea&&e.get("clip",!0)&&(null!=(w=i.getArea()).width?(w.x-=.1,w.y-=.1,w.width+=.2,w.height+=.2):w.r0&&(w.r0-=.5,w.r1+=.5)),this._clipShapeForSymbol=w,d&&c.type===i.type&&T===this._step?(m&&!f?f=this._newPolygon(l,y,i,g):f&&!m&&(p.remove(f),f=this._polygon=null),p.setClipPath(Yb(i,!1,e)),_&&h.updateData(a,{isIgnore:x,clipShape:w}),a.eachItemGraphicEl((function(e){e.stopAnimation(!0)})),Nb(this._stackedOnPoints,y)&&Nb(this._points,l)||(g?this._updateAnimation(a,y,i,n,T,v):(T&&(l=Pb(l,i,T),y=Pb(y,i,T)),d.setShape({points:l}),f&&f.setShape({points:l,stackedOnPoints:y})))):(_&&h.updateData(a,{isIgnore:x,clipShape:w}),T&&(l=Pb(l,i,T),y=Pb(y,i,T)),d=this._newPolyline(l,i,g),m&&(f=this._newPolygon(l,y,i,g)),p.setClipPath(Yb(i,!0,e)));var S=function(e,t){var n=e.getVisual("visualMeta");if(n&&n.length&&e.count()&&"cartesian2d"===t.type){for(var i,r,a=n.length-1;a>=0;a--){var o=n[a].dimension,s=e.dimensions[o],l=e.getDimensionInfo(s);if("x"===(i=l&&l.coordDim)||"y"===i){r=n[a];break}}if(r){var u=t.getAxis(i),c=Ye.map(r.stops,(function(e){return{coord:u.toGlobalCoord(u.dataToCoord(e.value)),color:e.color}})),h=c.length,d=r.outerColors.slice();h&&c[0].coord>c[h-1].coord&&(c.reverse(),d.reverse());var f=c[0].coord-10,p=c[h-1].coord+10,g=p-f;if(g<.001)return"transparent";Ye.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 Vc.LinearGradient(0,0,0,0,c,!0);return m[i]=f,m[i+"2"]=p,m}}}(a,i)||a.getVisual("color");d.useStyle(Ye.defaults(o.getLineStyle(),{fill:"none",stroke:S,lineJoin:"bevel"}));var O=e.get("smooth");if(O=Lb(e.get("smooth")),d.setShape({smooth:O,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")}),f){var M=a.getCalculationInfo("stackedOnSeries"),D=0;f.useStyle(Ye.defaults(s.getAreaStyle(),{fill:S,opacity:.7,lineJoin:"bevel"})),M&&(D=Lb(M.get("smooth"))),f.setShape({smooth:O,stackedOnSmooth:D,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")})}this._data=a,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=T,this._valueOrigin=v},dispose:function(){},highlight:function(e,t,n,i){var r=e.getData(),a=ko.queryDataIndex(r,i);if(!(a instanceof Array)&&null!=a&&a>=0){var o=r.getItemGraphicEl(a);if(!o){var s=r.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(o=new qx(r,a)).position=s,o.setZ(e.get("zlevel"),e.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,r.setItemGraphicEl(a,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else dg.prototype.highlight.call(this,e,t,n,i)},downplay:function(e,t,n,i){var r=e.getData(),a=ko.queryDataIndex(r,i);if(null!=a&&a>=0){var o=r.getItemGraphicEl(a);o&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else dg.prototype.downplay.call(this,e,t,n,i)},_newPolyline:function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new Db({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 Ab({shape:{points:e,stackedOnPoints:t},silent:!0}),this._lineGroup.add(n),this._polygon=n,n},_updateAnimation:function(e,t,n,i,r,a){var o=this._polyline,s=this._polygon,l=e.hostModel,u=ob(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),c=u.current,h=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;if(r&&(c=Pb(u.current,n,r),h=Pb(u.stackedOnCurrent,n,r),d=Pb(u.next,n,r),f=Pb(u.stackedOnNext,n,r)),Rb(c,d)>3e3||s&&Rb(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,Vc.updateProps(o,{shape:{points:d}},l),s&&(s.setShape({points:c,stackedOnPoints:h}),Vc.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 Hb=Ye.isFunction;var Fb=function(e,t,n){return{seriesType:e,performRawSeries:!0,reset:function(e,i,r){var a=e.getData(),o=e.get("symbol"),s=e.get("symbolSize"),l=e.get("symbolKeepAspect"),u=e.get("symbolRotate"),c=Hb(o),h=Hb(s),d=Hb(u),f=c||h||d,p=!c&&o?o:t,g=h?null:s;if(a.setVisual({legendSymbol:n||p,symbol:p,symbolSize:g,symbolKeepAspect:l,symbolRotate:u}),!i.isSeriesFiltered(e))return{dataEach:a.hasItemOption||f?function(t,n){if(f){var i=e.getRawValue(n),r=e.getDataParams(n);c&&t.setItemVisual(n,"symbol",o(i,r)),h&&t.setItemVisual(n,"symbolSize",s(i,r)),d&&t.setItemVisual(n,"symbolRotate",u(i,r))}if(t.hasItemOption){var a=t.getItemModel(n),l=a.getShallow("symbol",!0),p=a.getShallow("symbolSize",!0),g=a.getShallow("symbolRotate",!0),m=a.getShallow("symbolKeepAspect",!0);null!=l&&t.setItemVisual(n,"symbol",l),null!=p&&t.setItemVisual(n,"symbolSize",p),null!=g&&t.setItemVisual(n,"symbolRotate",g),null!=m&&t.setItemVisual(n,"symbolKeepAspect",m)}}:null}}}},Bb=Ye.map,jb=qv.isDimensionStacked;var Ub=function(e){return{seriesType:e,plan:eg(),reset:function(e){var t=e.getData(),n=e.coordinateSystem,i=e.pipelineContext.large;if(n){var r=Bb(n.dimensions,(function(e){return t.mapDimension(e)})).slice(0,2),a=r.length,o=t.getCalculationInfo("stackResultDimension");return jb(t,r[0])&&(r[0]=o),jb(t,r[1])&&(r[1]=o),a&&{progress:function(e,t){for(var o=e.end-e.start,s=i&&new Float32Array(o*a),l=e.start,u=0,c=[],h=[];l<e.end;l++){var d;if(1===a){var f=t.get(r[0],l);d=!isNaN(f)&&n.dataToPoint(f,null,h)}else{f=c[0]=t.get(r[0],l);var p=c[1]=t.get(r[1],l);d=!isNaN(f)&&!isNaN(p)&&n.dataToPoint(c,null,h)}i?(s[u++]=d?d[0]:NaN,s[u++]=d?d[1]:NaN):t.setItemLayout(l,d&&d.slice()||[NaN,NaN])}i&&t.setLayout("symbolPoints",s)}}}}}},Wb={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]}},Gb=function(e,t){return Math.round(e.length/2)};var Vb=function(e){return{seriesType:e,modifyOutputEnd:!0,reset:function(e,t,n){var i=e.getData(),r=e.get("sampling"),a=e.coordinateSystem;if("cartesian2d"===a.type&&r){var o,s=a.getBaseAxis(),l=a.getOtherAxis(s),u=s.getExtent(),c=u[1]-u[0],h=Math.round(i.count()/c);if(h>1)"string"==typeof r?o=Wb[r]:"function"==typeof r&&(o=r),o&&e.setData(i.downSample(i.mapDimension(l.dim),1/h,o,Gb))}}}};function qb(e){return this._axes[e]}var Zb=function(e){this._axes={},this._dimList=[],this.name=e||""};Zb.prototype={constructor:Zb,type:"cartesian",getAxis:function(e){return this._axes[e]},getAxes:function(){return Ye.map(this._dimList,qb,this)},getAxesByScale:function(e){return e=e.toLowerCase(),Ye.filter(this.getAxes(),(function(t){return t.scale.type===e}))},addAxis:function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},dataToCoord:function(e){return this._dataCoordConvert(e,"dataToCoord")},coordToData:function(e){return this._dataCoordConvert(e,"coordToData")},_dataCoordConvert:function(e,t){for(var n=this._dimList,i=e instanceof Array?[]:{},r=0;r<n.length;r++){var a=n[r],o=this._axes[a];i[a]=o[t](e[a])}return i}};var Xb=Zb;function Kb(e){Xb.call(this,e)}Kb.prototype={constructor:Kb,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},containData:function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},dataToPoint:function(e,t,n){var i=this.getAxis("x"),r=this.getAxis("y");return(n=n||[])[0]=i.toGlobalCoord(i.dataToCoord(e[0])),n[1]=r.toGlobalCoord(r.dataToCoord(e[1])),n},clampData:function(e,t){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),a=i.getExtent(),o=n.parse(e[0]),s=i.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),o),Math.max(r[0],r[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},pointToData:function(e,t){var n=this.getAxis("x"),i=this.getAxis("y");return(t=t||[])[0]=n.coordToData(n.toLocalCoord(e[0])),t[1]=i.coordToData(i.toLocalCoord(e[1])),t},getOtherAxis:function(e){return this.getAxis("x"===e.dim?"y":"x")},getArea:function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),n=Math.min(e[0],e[1]),i=Math.min(t[0],t[1]),r=Math.max(e[0],e[1])-n,a=Math.max(t[0],t[1])-i;return new ki(n,i,r,a)}},Ye.inherits(Kb,Xb);var $b=Kb,Qb=function(e,t,n,i,r){hx.call(this,e,t,n),this.type=i||"value",this.position=r||"bottom"};Qb.prototype={constructor:Qb,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},Ye.inherits(Qb,hx);var Jb=Qb,ew={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)"]}}},tw={};tw.categoryAxis=Ye.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},ew),tw.valueAxis=Ye.merge({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},ew),tw.timeAxis=Ye.defaults({scale:!0,min:"dataMin",max:"dataMax"},tw.valueAxis),tw.logAxis=Ye.defaults({scale:!0,logBase:10},tw.valueAxis);var nw=tw,iw=qh.getLayoutParams,rw=qh.mergeLayoutParam,aw=["value","category","time","log"];var ow=function(e,t,n,i){Ye.each(aw,(function(r){t.extend({type:e+"Axis."+r,mergeDefaultAndTheme:function(t,i){var a=this.layoutMode,o=a?iw(t):{},s=i.getTheme();Ye.merge(t,s.get(r+"Axis")),Ye.merge(t,this.getDefaultOption()),t.type=n(e,t),a&&rw(t,o,a)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=hy.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:Ye.mergeAll([{},nw[r+"Axis"],i],!0)})})),Jh.registerSubTypeDefaulter(e+"Axis",Ye.curry(n,e))},sw=Jh.extend({type:"cartesian2dAxis",axis:null,init:function(){sw.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){sw.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){sw.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function lw(e,t){return t.type||(t.data?"category":"value")}Ye.merge(sw.prototype,__);var uw={offset:0};ow("x",sw,lw,uw),ow("y",sw,lw,uw),Jh.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 cw=Ye.isObject,hw=Ye.each,dw=Ye.map,fw=Ye.indexOf,pw=qh.getLayoutRect,gw=v_.createScaleByModel,mw=v_.ifAxisCrossZero,vw=v_.niceScaleExtent,yw=v_.estimateLabelUnionRect,_w=qv.getStackedDimension;function xw(e,t,n){return e.getCoordSysModel()===t}function bw(e,t,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(e,t,n),this.model=e}var ww=bw.prototype;function Tw(e,t,n,i){n.getAxesOnZeroOf=function(){return r?[r]:[]};var r,a=e[t],o=n.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)Sw(a[l])&&(r=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&Sw(a[u])&&!i[c(a[u])]){r=a[u];break}r&&(i[c(r)]=!0)}function c(e){return e.dim+"_"+e.index}}function Sw(e){return e&&"category"!==e.type&&"time"!==e.type&&mw(e)}ww.type="grid",ww.axisPointerEnabled=!0,ww.getRect=function(){return this._rect},ww.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model),hw(n.x,(function(e){vw(e.scale,e.model)})),hw(n.y,(function(e){vw(e.scale,e.model)}));var i={};hw(n.x,(function(e){Tw(n,"y",e,i)})),hw(n.y,(function(e){Tw(n,"x",e,i)})),this.resize(this.model,t)},ww.resize=function(e,t,n){var i=pw(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});this._rect=i;var r=this._axesList;function a(){hw(r,(function(e){var t=e.isHorizontal(),n=t?[0,i.width]:[0,i.height],r=e.inverse?1:0;e.setExtent(n[r],n[1-r]),function(e,t){var n=e.getExtent(),i=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return i-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return i-e+t}}(e,t?i.x:i.y)}))}a(),!n&&e.get("containLabel")&&(hw(r,(function(e){if(!e.model.get("axisLabel.inside")){var t=yw(e);if(t){var n=e.isHorizontal()?"height":"width",r=e.model.get("axisLabel.margin");i[n]-=t[n]+r,"top"===e.position?i.y+=t.height+r:"left"===e.position&&(i.x+=t.width+r)}}})),a())},ww.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]}},ww.getAxes=function(){return this._axesList.slice()},ww.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}cw(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,r=this._coordsList;i<r.length;i++)if(r[i].getAxis("x").index===e||r[i].getAxis("y").index===t)return r[i]},ww.getCartesians=function(){return this._coordsList.slice()},ww.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},ww.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},ww._findConvertTarget=function(e,t){var n,i,r=t.seriesModel,a=t.xAxisModel||r&&r.getReferringComponents("xAxis")[0],o=t.yAxisModel||r&&r.getReferringComponents("yAxis")[0],s=t.gridModel,l=this._coordsList;if(r)n=r.coordinateSystem,fw(l,n)<0&&(n=null);else if(a&&o)n=this.getCartesian(a.componentIndex,o.componentIndex);else if(a)i=this.getAxis("x",a.componentIndex);else if(o)i=this.getAxis("y",o.componentIndex);else if(s){s.coordinateSystem===this&&(n=this._coordsList[0])}return{cartesian:n,axis:i}},ww.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},ww._initCartesian=function(e,t,n){var i={left:!1,right:!1,top:!1,bottom:!1},r={x:{},y:{}},a={x:0,y:0};if(t.eachComponent("xAxis",o("x"),this),t.eachComponent("yAxis",o("y"),this),!a.x||!a.y)return this._axesMap={},void(this._axesList=[]);function o(t){return function(n,o){if(xw(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 Jb(t,gw(n),[0,0],n.get("type"),s),u="category"===l.type;l.onBand=u&&n.get("boundaryGap"),l.inverse=n.get("inverse"),n.axis=l,l.model=n,l.grid=this,l.index=o,this._axesList.push(l),r[t][o]=l,a[t]++}}}this._axesMap=r,hw(r.x,(function(t,n){hw(r.y,(function(i,r){var a="x"+n+"y"+r,o=new $b(a);o.grid=this,o.model=e,this._coordsMap[a]=o,this._coordsList.push(o),o.addAxis(t),o.addAxis(i)}),this)}),this)},ww._updateScale=function(e,t){function n(e,t,n){hw(e.mapDimension(t.dim,!0),(function(n){t.scale.unionExtentFromData(e,_w(e,n))}))}hw(this._axesList,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeries((function(e){if(Dw(e)){var i=Mw(e),r=i[0],a=i[1];if(!xw(r,t)||!xw(a,t))return;var o=this.getCartesian(r.componentIndex,a.componentIndex),s=e.getData(),l=o.getAxis("x"),u=o.getAxis("y");"list"===s.type&&(n(s,l),n(s,u))}}),this)},ww.getTooltipAxes=function(e){var t=[],n=[];return hw(this.getCartesians(),(function(i){var r=null!=e&&"auto"!==e?i.getAxis(e):i.getBaseAxis(),a=i.getOtherAxis(r);fw(t,r)<0&&t.push(r),fw(n,a)<0&&n.push(a)})),{baseAxes:t,otherAxes:n}};var Ow=["xAxis","yAxis"];function Mw(e,t){return dw(Ow,(function(t){return e.getReferringComponents(t)[0]}))}function Dw(e){return"cartesian2d"===e.get("coordinateSystem")}bw.create=function(e,t){var n=[];return e.eachComponent("grid",(function(i,r){var a=new bw(i,e,t);a.name="grid_"+r,a.resize(i,t,!0),i.coordinateSystem=a,n.push(a)})),e.eachSeries((function(e){if(Dw(e)){var t=Mw(e),n=t[0],i=t[1],r=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=r.getCartesian(n.componentIndex,i.componentIndex)}})),n},bw.dimensions=bw.prototype.dimensions=$b.prototype.dimensions,vf.register("cartesian2d",bw);var Aw=Ye.retrieve,kw=Ye.defaults,Iw=Ye.extend,Cw=Ye.each,Ew=bh.isRadianAroundZero,Nw=bh.remRadian,Rw=C_.createSymbol,Lw=ot.applyTransform,Pw=v_.shouldShowAllLabels,zw=Math.PI,Yw=function(e,t){this.opt=t,this.axisModel=e,kw(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new Vc.Group;var n=new Vc.Group({position:t.position.slice(),rotation:t.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n};Yw.prototype={constructor:Yw,hasBuilder:function(e){return!!Hw[e]},add:function(e){Hw[e].call(this)},getGroup:function(){return this.group}};var Hw={axisLine:function(){var e=this.opt,t=this.axisModel;if(t.get("axisLine.show")){var n=this.axisModel.axis.getExtent(),i=this._transform,r=[n[0],0],a=[n[1],0];i&&(Lw(r,r,i),Lw(a,a,i));var o=Iw({lineCap:"round"},t.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new Vc.Line({anid:"line",subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:a[0],y2:a[1]},style:o,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1}));var s=t.get("axisLine.symbol"),l=t.get("axisLine.symbolSize"),u=t.get("axisLine.symbolOffset")||0;if("number"==typeof u&&(u=[u,u]),null!=s){"string"==typeof s&&(s=[s,s]),"string"!=typeof l&&"number"!=typeof l||(l=[l,l]);var c=l[0],h=l[1];Cw([{rotate:e.rotation+Math.PI/2,offset:u[0],r:0},{rotate:e.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((r[0]-a[0])*(r[0]-a[0])+(r[1]-a[1])*(r[1]-a[1]))}],(function(t,n){if("none"!==s[n]&&null!=s[n]){var i=Rw(s[n],-c/2,-h/2,c,h,o.stroke,!0),a=t.r+t.offset,l=[r[0]+a*Math.cos(e.rotation),r[1]-a*Math.sin(e.rotation)];i.attr({rotation:t.rotate,position:l,silent:!0,z2:11}),this.group.add(i)}}),this)}}},axisTickLabel:function(){var e=this.axisModel,t=this.opt,n=function(e,t,n){var i=t.axis,r=t.getModel("axisTick");if(!r.get("show")||i.scale.isBlank())return;for(var a=r.getModel("lineStyle"),o=n.tickDirection*r.get("length"),s=Vw(i.getTicksCoords(),e._transform,o,kw(a.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}),"ticks"),l=0;l<s.length;l++)e.group.add(s[l]);return s}(this,e,t),i=function(e,t,n){var i=t.axis,r=Aw(n.axisLabelShow,t.get("axisLabel.show"));if(!r||i.scale.isBlank())return;var a=t.getModel("axisLabel"),o=a.get("margin"),s=i.getViewLabels(),l=(Aw(n.labelRotate,a.get("rotate"))||0)*zw/180,u=Bw(n.rotation,l,n.labelDirection),c=t.getCategories&&t.getCategories(!0),h=[],d=jw(t),f=t.get("triggerEvent");return Cw(s,(function(r,s){var l=r.tickValue,p=r.formattedLabel,g=r.rawLabel,m=a;c&&c[l]&&c[l].textStyle&&(m=new sh(c[l].textStyle,a,t.ecModel));var v=m.getTextColor()||t.get("axisLine.lineStyle.color"),y=[i.dataToCoord(l),n.labelOffset+n.labelDirection*o],_=new Vc.Text({anid:"label_"+l,position:y,rotation:u.rotation,silent:d,z2:10});Vc.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=Fw(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(Pw(e.axis))return;var i=e.get("axisLabel.showMinLabel"),r=e.get("axisLabel.showMaxLabel");t=t||[],n=n||[];var a=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?(Uw(a),Uw(u)):Ww(a,o)&&(i?(Uw(o),Uw(c)):(Uw(a),Uw(u)));!1===r?(Uw(s),Uw(h)):Ww(l,s)&&(r?(Uw(l),Uw(d)):(Uw(s),Uw(h)))}(e,i,n),function(e,t,n){var i=t.axis,r=t.getModel("minorTick");if(!r.get("show")||i.scale.isBlank())return;var a=i.getMinorTicksCoords();if(!a.length)return;for(var o=r.getModel("lineStyle"),s=n.tickDirection*r.get("length"),l=kw(o.getLineStyle(),kw(t.getModel("axisTick").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})),u=0;u<a.length;u++)for(var c=Vw(a[u],e._transform,s,l,"minorticks_"+u),h=0;h<c.length;h++)e.group.add(c[h])}(this,e,t)},axisName:function(){var e=this.opt,t=this.axisModel,n=Aw(e.axisName,t.get("name"));if(n){var i,r,a=t.get("nameLocation"),o=e.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=this.axisModel.axis.getExtent(),c=u[0]>u[1]?-1:1,h=["start"===a?u[0]-c*l:"end"===a?u[1]+c*l:(u[0]+u[1])/2,Gw(a)?e.labelOffset+o*l:0],d=t.get("nameRotate");null!=d&&(d=d*zw/180),Gw(a)?i=Bw(e.rotation,null!=d?d:e.rotation,o):(i=function(e,t,n,i){var r,a,o=Nw(n-e.rotation),s=i[0]>i[1],l="start"===t&&!s||"start"!==t&&s;Ew(o-zw/2)?(a=l?"bottom":"top",r="center"):Ew(o-1.5*zw)?(a=l?"top":"bottom",r="center"):(a="middle",r=o<1.5*zw&&o>zw/2?l?"left":"right":l?"right":"left");return{rotation:o,textAlign:r,textVerticalAlign:a}}(e,a,d||0,u),null!=(r=e.axisNameAvailableWidth)&&(r=Math.abs(r/Math.sin(i.rotation)),!isFinite(r)&&(r=null)));var f=s.getFont(),p=t.get("nameTruncate",!0)||{},g=p.ellipsis,m=Aw(e.nameTruncateMaxWidth,p.maxWidth,r),v=null!=g&&null!=m?Rh.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 Vc.Text({anid:"name",__fullText:n,__truncatedText:v,position:h,rotation:i.rotation,silent:jw(t),z2:1,tooltip:y&&y.show?Iw({content:n,formatter:function(){return n},formatterParams:x},y):null});Vc.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=Fw(t),b.eventData.targetType="axisName",b.eventData.name=n),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},Fw=Yw.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},Bw=Yw.innerTextLayout=function(e,t,n){var i,r,a=Nw(t-e);return Ew(a)?(r=n>0?"top":"bottom",i="center"):Ew(a-zw)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=a>0&&a<zw?n>0?"right":"left":n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:r}};var jw=Yw.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)};function Uw(e){e&&(e.ignore=!0)}function Ww(e,t,n){var i=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(i&&r){var a=tn.identity([]);return tn.rotate(a,a,-e.rotation),i.applyTransform(tn.mul([],a,e.getLocalTransform())),r.applyTransform(tn.mul([],a,t.getLocalTransform())),i.intersect(r)}}function Gw(e){return"middle"===e||"center"===e}function Vw(e,t,n,i,r){for(var a=[],o=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=n,t&&(Lw(o,o,t),Lw(s,s,t));var c=new Vc.Line({anid:r+"_"+e[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:i,z2:2,silent:!0});a.push(c)}return a}var qw=Yw,Zw=Ye.each,Xw=Ye.curry;function Kw(e,t){return"all"===e||Ye.isArray(e)&&Ye.indexOf(e,t)>=0||e===t}function $w(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Jw(e)]}function Qw(e){return!!e.get("handle.show")}function Jw(e){return e.type+"||"+e.id}var eT=function(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var i=t.getComponent("tooltip"),r=t.getComponent("axisPointer"),a=r.get("link",!0)||[],o=[];Zw(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=Jw(n.model),l=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var u=n.model.getModel("tooltip",i);if(Zw(n.getAxes(),Xw(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)&&Zw(d.baseAxes,Xw(f,!h||"cross",c)),h&&Zw(d.otherAxes,Xw(f,"cross",!1))}}function f(i,s,c){var h=c.model.getModel("axisPointer",r),d=h.get("show");if(d&&("auto"!==d||i||Qw(h))){null==s&&(s=h.get("triggerTooltip")),h=i?function(e,t,n,i,r,a){var o=t.getModel("axisPointer"),s={};Zw(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=Ye.clone(o.get(e))})),s.snap="category"!==e.type&&!!a,"cross"===o.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===r){var u=o.get("label.show");if(l.show=null==u||u,!a){var c=s.lineStyle=o.get("crossStyle");c&&Ye.defaults(l,c.textStyle)}}return e.model.getModel("axisPointer",new sh(s,n,i))}(c,u,r,t,i,s):h;var f=h.get("snap"),p=Jw(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:Qw(h),seriesModels:[]};l[p]=m,e.seriesInvolved|=g;var v=function(e,t){for(var n=t.model,i=t.dim,r=0;r<e.length;r++){var a=e[r]||{};if(Kw(a[i+"AxisId"],n.id)||Kw(a[i+"AxisIndex"],n.componentIndex)||Kw(a[i+"AxisName"],n.name))return r}}(a,c);if(null!=v){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[p]=m,y.mapper=a[v].mapper,m.linkGroup=y}}}}))}(n,e,t),n.seriesInvolved&&function(e,t){t.eachSeries((function(t){var n=t.coordinateSystem,i=t.get("tooltip.trigger",!0),r=t.get("tooltip.show",!0);n&&"none"!==i&&!1!==i&&"item"!==i&&!1!==r&&!1!==t.get("axisPointer.show",!0)&&Zw(e.coordSysAxesInfo[Jw(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},tT=function(e){var t=$w(e);if(t){var n=t.axisPointerModel,i=t.axis.scale,r=n.option,a=n.get("status"),o=n.get("value");null!=o&&(o=i.parse(o));var s=Qw(n);null==a&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),r.value=o,s&&(r.status=t.axis.scale.isBlank()?"hide":"show")}},nT={collect:eT,fixValue:tT,getAxisInfo:$w,getAxisPointerModel:function(e){var t=$w(e);return t&&t.axisPointerModel},makeKey:Jw},iT=Ix.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(e,t,n,i){this.axisPointerClass&&nT.fixValue(e),iT.superApply(this,"render",arguments),rT(this,e,t,n,i,!0)},updateAxisPointer:function(e,t,n,i,r){rT(this,e,t,n,i,!1)},remove:function(e,t){var n=this._axisPointer;n&&n.remove(t),iT.superApply(this,"remove",arguments)},dispose:function(e,t){aT(this,t),iT.superApply(this,"dispose",arguments)}});function rT(e,t,n,i,r,a){var o=iT.getAxisPointerClass(e.axisPointerClass);if(o){var s=nT.getAxisPointerModel(t);s?(e._axisPointer||(e._axisPointer=new o)).render(t,s,i,a):aT(e,i)}}function aT(e,t,n){var i=e._axisPointer;i&&i.dispose(t,n),e._axisPointer=null}var oT=[];iT.registerAxisPointerClass=function(e,t){oT[e]=t},iT.getAxisPointerClass=function(e){return e&&oT[e]};var sT=iT;var lT=function(e,t,n){n=n||{};var i=e.coordinateSystem,r=t.axis,a={},o=r.getAxesOnZeroOf()[0],s=r.position,l=o?"onZero":s,u=r.dim,c=i.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=t.get("offset")||0,p="x"===u?[h[2]-f,h[3]+f]:[h[0]-f,h[1]+f];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=["y"===u?p[d[l]]:h[0],"x"===u?p[d[l]]:h[3]],a.rotation=Math.PI/2*("x"===u?0:1),a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],a.labelOffset=o?p[d[s]]-p[d.onZero]:0,t.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),Ye.retrieve(n.labelInside,t.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var m=t.get("axisLabel.rotate");return a.labelRotate="top"===l?-m:m,a.z2=1,a},uT={layout:lT};var cT=function(e,t,n,i){var r=n.axis;if(!r.scale.isBlank()){var a=n.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=i.coordinateSystem.getRect(),u=r.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var c=s.length,h=e.__splitAreaColors,d=Ye.createHashMap(),f=0;if(h)for(var p=0;p<u.length;p++){var g=h.get(u[p].tickValue);if(null!=g){f=(g+(c-1)*p)%c;break}}var m=r.toGlobalCoord(u[0].coord),v=o.getAreaStyle();s=Ye.isArray(s)?s:[s];for(p=1;p<u.length;p++){var y,_,x,b,w=r.toGlobalCoord(u[p].coord);r.isHorizontal()?(y=m,_=l.y,x=w-y,b=l.height,m=y+x):(y=l.x,_=m,x=l.width,m=_+(b=w-_));var T=u[p-1].tickValue;null!=T&&d.set(T,f),t.add(new Vc.Rect({anid:null!=T?"area_"+T:null,shape:{x:y,y:_,width:x,height:b},style:Ye.defaults({fill:s[f]},v),silent:!0})),f=(f+1)%c}e.__splitAreaColors=d}}},hT={rectCoordAxisBuildSplitArea:cT,rectCoordAxisHandleRemove:function(e){e.__splitAreaColors=null}},dT=hT.rectCoordAxisBuildSplitArea,fT=hT.rectCoordAxisHandleRemove,pT=["axisLine","axisTickLabel","axisName"],gT=["splitArea","splitLine","minorSplitLine"],mT=sT.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,n,i){this.group.removeAll();var r=this._axisGroup;if(this._axisGroup=new Vc.Group,this.group.add(this._axisGroup),e.get("show")){var a=e.getCoordSysModel(),o=uT.layout(a,e),s=new qw(e,o);Ye.each(pT,s.add,s),this._axisGroup.add(s.getGroup()),Ye.each(gT,(function(t){e.get(t+".show")&&this["_"+t](e,a)}),this),Vc.groupTransition(r,this._axisGroup,e),mT.superCall(this,"render",e,t,n,i)}},remove:function(){fT(this)},_splitLine:function(e,t){var n=e.axis;if(!n.scale.isBlank()){var i=e.getModel("splitLine"),r=i.getModel("lineStyle"),a=r.get("color");a=Ye.isArray(a)?a:[a];for(var o=t.coordinateSystem.getRect(),s=n.isHorizontal(),l=0,u=n.getTicksCoords({tickModel:i}),c=[],h=[],d=r.getLineStyle(),f=0;f<u.length;f++){var p=n.toGlobalCoord(u[f].coord);s?(c[0]=p,c[1]=o.y,h[0]=p,h[1]=o.y+o.height):(c[0]=o.x,c[1]=p,h[0]=o.x+o.width,h[1]=p);var g=l++%a.length,m=u[f].tickValue;this._axisGroup.add(new Vc.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:Ye.defaults({stroke:a[g]},d),silent:!0}))}}},_minorSplitLine:function(e,t){var n=e.axis,i=e.getModel("minorSplitLine").getModel("lineStyle"),r=t.coordinateSystem.getRect(),a=n.isHorizontal(),o=n.getMinorTicksCoords();if(o.length)for(var s=[],l=[],u=i.getLineStyle(),c=0;c<o.length;c++)for(var h=0;h<o[c].length;h++){var d=n.toGlobalCoord(o[c][h].coord);a?(s[0]=d,s[1]=r.y,l[0]=d,l[1]=r.y+r.height):(s[0]=r.x,s[1]=d,l[0]=r.x+r.width,l[1]=d),this._axisGroup.add(new Vc.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){dT(this,this._axisGroup,e,t)}});mT.extend({type:"xAxis"}),mT.extend({type:"yAxis"}),Ix.extendComponentView({type:"grid",render:function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new Vc.Rect({shape:e.coordinateSystem.getRect(),style:Ye.defaults({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))}}),Ix.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})),Ix.registerVisual(Fb("line","circle","line")),Ix.registerLayout(Ub("line")),Ix.registerProcessor(Ix.PRIORITY.PROCESSOR.STATISTIC,Vb("line"));var vT=function(e,t){var n,i=[],r=e.seriesIndex;if(null==r||!(n=t.getSeriesByIndex(r)))return{point:[]};var a=n.getData(),o=ko.queryDataIndex(a,e);if(null==o||o<0||Ye.isArray(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(a.getValues(Ye.map(l.dimensions,(function(e){return a.mapDimension(e)})),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),i=[u.x+u.width/2,u.y+u.height/2]}return{point:i,el:s}},yT=ko.makeInner,_T=Ye.each,xT=Ye.curry,bT=yT();function wT(e,t,n,i,r){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t))if(e.involveSeries){var o=function(e,t){var n=t.axis,i=n.dim,r=e,a=[],o=Number.MAX_VALUE,s=-1;return _T(t.seriesModels,(function(t,l){var u,c,h=t.getData().mapDimension(i,!0);if(t.getAxisTooltipData){var d=t.getAxisTooltipData(h,e,n);c=d.dataIndices,u=d.nestestValue}else{if(!(c=t.getData().indicesOfNearest(h[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(h[0],c[0])}if(null!=u&&isFinite(u)){var f=e-u,p=Math.abs(f);p<=o&&((p<o||f>=0&&s<0)&&(o=p,s=f,r=u,a.length=0),_T(c,(function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:a,snapToValue:r}}(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&null==r.seriesIndex&&Ye.extend(r,s[0]),!i&&e.snap&&a.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s,r),n.showTooltip(e,o,l)}else n.showPointer(e,t)}function TT(e,t,n,i){e[t.key]={value:n,payloadBatch:i}}function ST(e,t,n,i){var r=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&r.length){var l=t.coordSys.model,u=nT.makeKey(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:r.slice()})}}function OT(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 MT(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}var DT=function(e,t,n){var i=e.currTrigger,r=[e.x,e.y],a=e,o=e.dispatchAction||Ye.bind(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){MT(r)&&(r=vT({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=MT(r),u=a.axesInfo,c=s.axesInfo,h="leave"===i||MT(r),d={},f={},p={list:[],map:{}},g={showPointer:xT(TT,f),showTooltip:xT(ST,p)};_T(s.coordSysMap,(function(e,t){var n=l||e.containPoint(r);_T(s.coordSysAxesInfo[t],(function(e,t){var i=e.axis,a=function(e,t){for(var n=0;n<(e||[]).length;n++){var i=e[n];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}(u,e);if(!h&&n&&(!u||a)){var o=a&&a.value;null!=o||l||(o=i.pointToData(r)),null!=o&&wT(e,o,g,!1,d)}}))}));var m={};return _T(c,(function(e,t){var n=e.linkGroup;n&&!f[t]&&_T(n.axesInfo,(function(t,i){var r=f[i];if(t!==e&&r){var a=r.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,OT(t),OT(e)))),m[e.key]=a}}))})),_T(m,(function(e,t){wT(c[t],e,g,!0,d)})),function(e,t,n){var i=n.axesInfo=[];_T(t,(function(t,n){var r=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(r.status="show"),r.value=a.value,r.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:r.value})}))}(f,c,d),function(e,t,n,i){if(MT(t)||!e.list.length)return void i({type:"hideTip"});var r=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:e.list})}(p,r,e,o),function(e,t,n){var i=n.getZr(),r="axisPointerLastHighlights",a=bT(i)[r]||{},o=bT(i)[r]={};_T(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&_T(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;o[t]=e}))}));var s=[],l=[];Ye.each(a,(function(e,t){!o[t]&&l.push(e)})),Ye.each(o,(function(e,t){!a[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}};Ix.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 AT=(0,ko.makeInner)(),kT=Ye.each;function IT(e,t,n){e.handler("leave",null,n)}function CT(e,t,n,i){t.handler(e,n,i)}var ET={register:function(e,t,n){if(!te.node){var i=t.getZr();AT(i).records||(AT(i).records={}),function(e,t){if(AT(e).initialized)return;function n(n,i){e.on(n,(function(n){var r=function(e){var t={showTip:[],hideTip:[]},n=function(i){var r=t[i.type];r?r.push(i):(i.dispatchAction=n,e.dispatchAction(i))};return{dispatchAction:n,pendings:t}}(t);kT(AT(e).records,(function(e){e&&i(e,n,r.dispatchAction)})),function(e,t){var n,i=e.showTip.length,r=e.hideTip.length;i?n=e.showTip[i-1]:r&&(n=e.hideTip[r-1]);n&&(n.dispatchAction=null,t.dispatchAction(n))}(r.pendings,t)}))}AT(e).initialized=!0,n("click",Ye.curry(CT,"click")),n("mousemove",Ye.curry(CT,"mousemove")),n("globalout",IT)}(i,t),(AT(i).records[e]||(AT(i).records[e]={})).handler=n}},unregister:function(e,t){if(!te.node){var n=t.getZr();(AT(n).records||{})[e]&&(AT(n).records[e]=null)}}},NT=Ix.extendComponentView({type:"axisPointer",render:function(e,t,n){var i=t.getComponent("tooltip"),r=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";ET.register("axisPointer",n,(function(e,t,n){"none"!==r&&("leave"===e||r.indexOf(e)>=0)&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},remove:function(e,t){ET.unregister(t.getZr(),"axisPointer"),NT.superApply(this._model,"remove",arguments)},dispose:function(e,t){ET.unregister("axisPointer",t),NT.superApply(this._model,"dispose",arguments)}}),RT=(0,ko.makeInner)(),LT=Ye.clone,PT=Ye.bind;function zT(){}function YT(e,t,n,i){HT(RT(n).lastProp,i)||(RT(n).lastProp=i,t?Vc.updateProps(n,i,e):(n.stopAnimation(),n.attr(i)))}function HT(e,t){if(Ye.isObject(e)&&Ye.isObject(t)){var n=!0;return Ye.each(t,(function(t,i){n=n&&HT(e[i],t)})),!!n}return e===t}function FT(e,t){e[t.get("label.show")?"show":"hide"]()}function BT(e){return{position:e.position.slice(),rotation:e.rotation||0}}function jT(e,t,n){var i=t.get("z"),r=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=i&&(e.z=i),null!=r&&(e.zlevel=r),e.silent=n)}))}function UT(e,t,n,i,r){var a=WT(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=Rh.normalizeCssArray(o.get("padding")||0),l=o.getFont(),u=Yr.getBoundingRect(a,l),c=r.position,h=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=r.align;"right"===f&&(c[0]-=h),"center"===f&&(c[0]-=h/2);var p=r.verticalAlign;"bottom"===p&&(c[1]-=d),"middle"===p&&(c[1]-=d/2),function(e,t,n,i){var r=i.getWidth(),a=i.getHeight();e[0]=Math.min(e[0]+t,r)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,h,d,i);var g=o.get("backgroundColor");g&&"auto"!==g||(g=t.get("axisLine.lineStyle.color")),e.label={shape:{x:0,y:0,width:h,height:d,r:o.get("borderRadius")},position:c.slice(),style:{text:a,textFont:l,textFill:o.getTextColor(),textPosition:"inside",textPadding:s,fill:g,stroke:o.get("borderColor")||"transparent",lineWidth:o.get("borderWidth")||0,shadowBlur:o.get("shadowBlur"),shadowColor:o.get("shadowColor"),shadowOffsetX:o.get("shadowOffsetX"),shadowOffsetY:o.get("shadowOffsetY")},z2:10}}function WT(e,t,n,i,r){e=t.scale.parse(e);var a=t.scale.getLabel(e,{precision:r.precision}),o=r.formatter;if(o){var s={value:v_.getAxisRawValue(t,e),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};Ye.each(i,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),i=e.dataIndexInside,r=t&&t.getDataParams(i);r&&s.seriesData.push(r)})),Ye.isString(o)?a=o.replace("{value}",a):Ye.isFunction(o)&&(a=o(s))}return a}function GT(e,t,n){var i=tn.create();return tn.rotate(i,i,n.rotation),tn.translate(i,i,n.position),Vc.applyTransform([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}zT.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(e,t,n,i){var r=t.get("value"),a=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,i||this._lastValue!==r||this._lastStatus!==a){this._lastValue=r,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||"hide"===a)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,r,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(o){var h=Ye.curry(YT,t,c);this.updatePointerEl(o,l,h,t),this.updateLabelEl(o,l,h,t)}else o=this._group=new Vc.Group,this.createPointerEl(o,l,e,t),this.createLabelEl(o,l,e,t),n.getZr().add(o);jT(o,t,!0),this._renderHandle(r)}},remove:function(e){this.clear(e)},dispose:function(e){this.clear(e)},determineAnimation:function(e,t){var n=t.get("animation"),i=e.axis,r="category"===i.type,a=t.get("snap");if(!a&&!r)return!1;if("auto"===n||null==n){var o=this.animationThreshold;if(r&&i.getBandWidth()>o)return!0;if(a){var s=nT.getAxisInfo(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return!0===n},makeElOption:function(e,t,n,i,r){},createPointerEl:function(e,t,n,i){var r=t.pointer;if(r){var a=RT(e).pointerEl=new Vc[r.type](LT(t.pointer));e.add(a)}},createLabelEl:function(e,t,n,i){if(t.label){var r=RT(e).labelEl=new Vc.Rect(LT(t.label));e.add(r),FT(r,i)}},updatePointerEl:function(e,t,n){var i=RT(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},updateLabelEl:function(e,t,n,i){var r=RT(e).labelEl;r&&(r.setStyle(t.label.style),n(r,{shape:t.label.shape,position:t.label.position}),FT(r,i))},_renderHandle:function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,a=n.getModel("handle"),o=n.get("status");if(!a.get("show")||!o||"hide"===o)return r&&i.remove(r),void(this._handle=null);this._handle||(t=!0,r=this._handle=Vc.createIcon(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Nt.stop(e.event)},onmousedown:PT(this._onHandleDragMove,this,0,0),drift:PT(this._onHandleDragMove,this),ondragend:PT(this._onHandleDragEnd,this)}),i.add(r)),jT(r,n,!1);r.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");Ye.isArray(s)||(s=[s,s]),r.attr("scale",[s[0]/2,s[1]/2]),vg.createOrUpdate(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},_moveHandleToValue:function(e,t){YT(this._axisPointerModel,!t&&this._moveAnimation,this._handle,BT(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(BT(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(BT(i)),RT(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]}}},zT.prototype.constructor=zT,zo.enableClassExtend(zT);var VT=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},qT={buildElStyle:VT,buildLabelElOption:UT,getValueLabel:WT,getTransformedPosition:GT,buildCartesianSingleLabelElOption:function(e,t,n,i,r,a){var o=qw.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get("label.margin"),UT(t,i,r,a,{position:GT(i.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})},makeLineShape:function(e,t,n){return{x1:e[n=n||0],y1:e[1-n],x2:t[n],y2:t[1-n]}},makeRectShape:function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},makeSectorShape:function(e,t,n,i,r,a){return{cx:e,cy:t,r0:n,r:i,startAngle:r,endAngle:a,clockwise:!0}}},ZT=zT.extend({makeElOption:function(e,t,n,i,r){var a=n.axis,o=a.grid,s=i.get("type"),l=XT(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&"none"!==s){var c=qT.buildElStyle(i),h=KT[s](a,u,l);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=uT.layout(o.model,n);qT.buildCartesianSingleLabelElOption(t,e,d,n,i,r)},getHandleTransform:function(e,t,n){var i=uT.layout(t.axis.grid.model,t,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:qT.getTransformedPosition(t.axis,e,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,n,i){var r=n.axis,a=r.grid,o=r.getGlobalExtent(!0),s=XT(a,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=e.position;u[l]+=t[l],u[l]=Math.min(o[1],u[l]),u[l]=Math.max(o[0],u[l]);var c=(s[1]+s[0])/2,h=[c,c];h[l]=u[l];return{position:u,rotation:e.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function XT(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var KT={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:qT.makeLineShape([t,n[0]],[t,n[1]],$T(e))}},shadow:function(e,t,n){var i=Math.max(1,e.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:qT.makeRectShape([t-i/2,n[0]],[i,r],$T(e))}}};function $T(e){return"x"===e.dim?0:1}sT.registerAxisPointerClass("CartesianAxisPointer",ZT),Ix.registerPreprocessor((function(e){if(e){(!e.axisPointer||0===e.axisPointer.length)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!Ye.isArray(t)&&(e.axisPointer.link=[t])}})),Ix.registerProcessor(Ix.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=nT.collect(e,t)})),Ix.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},DT),Ix.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 QT=Ye.each,JT=Rh.toCamelCase,eS=["","-webkit-","-moz-","-o-"];function tS(e){var t,n,i,r=[],a=e.get("transitionDuration"),o=e.get("backgroundColor"),s=e.getModel("textStyle"),l=e.get("padding");return a&&r.push((i="left "+(t=a)+"s "+(n="cubic-bezier(0.23, 1, 0.32, 1)")+",top "+t+"s "+n,Ye.map(eS,(function(e){return e+"transition:"+i})).join(";"))),o&&(te.canvasSupported?r.push("background-Color:"+o):(r.push("background-Color:#"+Un.toHex(o)),r.push("filter:alpha(opacity=70)"))),QT(["width","color","radius"],(function(t){var n="border-"+t,i=JT(n),a=e.get(i);null!=a&&r.push(n+":"+a+("color"===t?"":"px"))})),r.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"),QT(["decoration","align"],(function(n){var i=e.get(n);i&&t.push("text-"+n+":"+i)})),t.join(";")}(s)),null!=l&&r.push("padding:"+Rh.normalizeCssArray(l).join("px ")+"px"),r.join(";")+";"}function nS(e,t,n,i,r){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Tt.transformLocalCoord(e,o,document.body,i,r)}else{e[0]=i,e[1]=r;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}}function iS(e,t,n){if(te.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=t.getZr(),a=this._appendToBody=n&&n.appendToBody;this._styleCoord=[0,0],nS(this._styleCoord,r,a,t.getWidth()/2,t.getHeight()/2),a?document.body.appendChild(i):e.appendChild(i),this._container=e,this._show=!1,this._hideTimeout;var o=this;i.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!o._enterable){var t=r.handler,n=r.painter.getViewportRoot();Nt.normalizeEvent(n,e,!0),t.dispatch("mousemove",e)}},i.onmouseleave=function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1}}iS.prototype={constructor:iS,_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;"+tS(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;nS(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(Ye.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 rS=iS;function aS(e){this._zr=e.getZr(),this._show=!1,this._hideTimeout}aS.prototype={constructor:aS,_enterable:!0,update:function(){},show:function(e){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(e,t,n){this.el&&this._zr.remove(this.el);for(var i={},r=e,a="{marker",o=r.indexOf(a);o>=0;){var s=r.indexOf("|}"),l=r.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=(r=r.substr(s+1)).indexOf("{marker")}this.el=new Pl({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(Ye.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 oS=aS,sS=ko.getTooltipRenderMode,lS=Ye.bind,uS=Ye.each,cS=bh.parsePercent,hS=new Vc.Rect({shape:{x:-1,y:-1,width:2,height:2}});function dS(e){for(var t=e.pop();e.length;){var n=e.pop();n&&(sh.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),t=new sh(n,t,t.ecModel))}return t}function fS(e,t){return e.dispatchAction||Ye.bind(t.dispatchAction,t)}function pS(e){return"center"===e||"middle"===e}Ix.extendComponentView({type:"tooltip",init:function(e,t){if(!te.node){var n,i=e.getComponent("tooltip"),r=i.get("renderMode");this._renderMode=sS(r),"html"===this._renderMode?(n=new rS(t.getDom(),t,{appendToBody:i.get("appendToBody",!0)}),this._newLine="<br/>"):(n=new oS(t),this._newLine="\n"),this._tooltipContent=n}},render:function(e,t,n){if(!te.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");ET.register("itemTooltip",this._api,lS((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&&!te.node){var r=fS(i,n);this._ticket="";var a=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var o=hS;o.position=[i.x,i.y],o.update(),o.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:o},r)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,i))return;var s=vT(i,t),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:i.position,target:s.el},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},manuallyHideTip:function(e,t,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(fS(i,n))},_manuallyAxisShowTip:function(e,t,n,i){var r=i.seriesIndex,a=i.dataIndex,o=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=t.getSeriesByIndex(r);if(s)if("axis"===(e=dS([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,e])).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:i.position}),!0}},_tryShow:function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var i=e.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,e):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(e,n,t)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(e,n,t)):(this._lastDataByCoordSys=null,this._hide(t))}},_showOrMove:function(e,t){var n=e.get("showDelay");t=Ye.bind(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},_showAxisTooltip:function(e,t){var n=this._ecModel,i=this._tooltipModel,r=[t.offsetX,t.offsetY],a=[],o=[],s=dS([t.tooltipOption,i]),l=this._renderMode,u=this._newLine,c={};uS(e,(function(e){uS(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value,r=[];if(t&&null!=i){var s=qT.getValueLabel(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt);Ye.each(e.seriesDataIndices,(function(a){var u=n.getSeriesByIndex(a.seriesIndex),h=a.dataIndexInside,d=u&&u.getDataParams(h);if(d.axisDim=e.axisDim,d.axisIndex=e.axisIndex,d.axisType=e.axisType,d.axisId=e.axisId,d.axisValue=v_.getAxisRawValue(t.axis,i),d.axisValueLabel=s,d){o.push(d);var f,p=u.formatTooltip(h,!0,null,l);if(Ye.isObject(p)){f=p.html;var g=p.markers;Ye.merge(c,g)}else f=p;r.push(f)}}));var h=s;"html"!==l?a.push(r.join(u)):a.push((h?Rh.encodeHTML(h)+u:"")+r.join(u))}}))}),this),a.reverse(),a=a.join(this._newLine+this._newLine);var h=t.position;this._showOrMove(s,(function(){this._updateContentNotChangedOnAxis(e)?this._updatePosition(s,h,r[0],r[1],this._tooltipContent,o):this._showTooltipContent(s,a,o,Math.random(),r[0],r[1],h,void 0,c)}))},_showSeriesItemTooltip:function(e,t,n){var i=this._ecModel,r=t.seriesIndex,a=i.getSeriesByIndex(r),o=t.dataModel||a,s=t.dataIndex,l=t.dataType,u=o.getData(l),c=dS([u.getItemModel(s),o,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),h=c.get("trigger");if(null==h||"item"===h){var d,f,p=o.getDataParams(s,l),g=o.formatTooltip(s,!1,l,this._renderMode);Ye.isObject(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+o.name+"_"+s;this._showOrMove(c,(function(){this._showTooltipContent(c,d,p,m,e.offsetX,e.offsetY,e.position,e.target,f)})),n({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:r,from:this.uid})}},_showComponentItemTooltip:function(e,t,n){var i=t.tooltip;if("string"==typeof i){i={content:i,formatter:i}}var r=new sh(i,this._tooltipModel,this._ecModel),a=r.get("content"),o=Math.random();this._showOrMove(r,(function(){this._showTooltipContent(r,a,r.get("formatterParams")||{},o,e.offsetX,e.offsetY,e.position,t)})),n({type:"showTip",from:this.uid})},_showTooltipContent:function(e,t,n,i,r,a,o,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent,c=e.get("formatter");o=o||e.get("position");var h=t;if(c&&"string"==typeof c)h=Rh.formatTpl(c,n,!0);else if("function"==typeof c){var d=lS((function(t,i){t===this._ticket&&(u.setContent(i,l,e),this._updatePosition(e,o,r,a,u,n,s))}),this);this._ticket=i,h=c(n,i,d)}u.setContent(h,l,e),u.show(e),this._updatePosition(e,o,r,a,u,n,s)}},_updatePosition:function(e,t,n,i,r,a,o){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=r.getSize(),c=e.get("align"),h=e.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof t&&(t=t([n,i],a,r.el,d,{viewSize:[s,l],contentSize:u.slice()})),Ye.isArray(t))n=cS(t[0],s),i=cS(t[1],l);else if(Ye.isObject(t)){t.width=u[0],t.height=u[1];var f=qh.getLayoutRect(t,{width:s,height:l});n=f.x,i=f.y,c=null,h=null}else if("string"==typeof t&&o){var p=function(e,t,n){var i=n[0],r=n[1],a=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-r/2;break;case"top":o=t.x+l/2-i/2,s=t.y-r-a;break;case"bottom":o=t.x+l/2-i/2,s=t.y+u+a;break;case"left":o=t.x-i-a,s=t.y+u/2-r/2;break;case"right":o=t.x+l+a,s=t.y+u/2-r/2}return[o,s]}(t,d,u);n=p[0],i=p[1]}else{p=function(e,t,n,i,r,a,o){var s=n.getOuterSize(),l=s.width,u=s.height;null!=a&&(e+l+a>i?e-=l+a:e+=a);null!=o&&(t+u+o>r?t-=u+o:t+=o);return[e,t]}(n,i,r,s,l,c?null:20,h?null:20);n=p[0],i=p[1]}if(c&&(n-=pS(c)?u[0]/2:"right"===c?u[0]:0),h&&(i-=pS(h)?u[1]/2:"bottom"===h?u[1]:0),e.get("confine")){p=function(e,t,n,i,r){var a=n.getOuterSize(),o=a.width,s=a.height;return e=Math.min(e+o,i)-o,t=Math.min(t+s,r)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}(n,i,r,s,l);n=p[0],i=p[1]}r.moveTo(n,i)},_updateContentNotChangedOnAxis:function(e){var t=this._lastDataByCoordSys,n=!!t&&t.length===e.length;return n&&uS(t,(function(t,i){var r=t.dataByAxis||{},a=(e[i]||{}).dataByAxis||[];(n&=r.length===a.length)&&uS(r,(function(e,t){var i=a[t]||{},r=e.seriesDataIndices||[],o=i.seriesDataIndices||[];(n&=e.value===i.value&&e.axisType===i.axisType&&e.axisId===i.axisId&&r.length===o.length)&&uS(r,(function(e,t){var i=o[t];n&=e.seriesIndex===i.seriesIndex&&e.dataIndex===i.dataIndex}))}))})),this._lastDataByCoordSys=e,!!n},_hide:function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},dispose:function(e,t){te.node||(this._tooltipContent.dispose(),ET.unregister("itemTooltip",t))}}),Ix.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),Ix.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var gS=ko.isNameSpecified,mS=bg.legend.selector,vS={all:{type:"all",title:Ye.clone(mS.all)},inverse:{type:"inverse",title:Ye.clone(mS.inverse)}},yS=Ix.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){yS.superCall(this,"mergeOption",e),this._updateSelector(e)},_updateSelector:function(e){var t=e.selector;!0===t&&(t=e.selector=["all","inverse"]),Ye.isArray(t)&&Ye.each(t,(function(e,n){Ye.isString(e)&&(e={type:e}),t[n]=Ye.merge(e,vS[e.type])}))},optionUpdated:function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var i=e[n].get("name");if(this.isSelected(i)){this.select(i),t=!0;break}}!t&&this.select(e[0].get("name"))}},_updateData:function(e){var t=[],n=[];e.eachRawSeries((function(i){var r,a=i.name;if(n.push(a),i.legendVisualProvider){var o=i.legendVisualProvider.getAllNames();e.isSeriesFiltered(i)||(n=n.concat(o)),o.length?t=t.concat(o):r=!0}else r=!0;r&&gS(i)&&t.push(i.name)})),this._availableNames=n;var i=this.get("data")||t,r=Ye.map(i,(function(e){return"string"!=typeof e&&"number"!=typeof e||(e={name:e}),new sh(e,this,this.ecModel)}),this);this._data=r},getData:function(){return this._data},select:function(e){var t=this.option.selected;if("single"===this.get("selectedMode")){var n=this._data;Ye.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;Ye.each(e,(function(e){t[e.get("name",!0)]=!0}))},inverseSelect:function(){var e=this._data,t=this.option.selected;Ye.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])&&Ye.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}}}),_S=yS;function xS(e,t,n){var i,r={},a="toggleSelected"===e;return n.eachComponent("legend",(function(n){a&&null!=i?n[i?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),i=n.isSelected(t.name));var o=n.getData();Ye.each(o,(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var i=n.isSelected(t);r.hasOwnProperty(t)?r[t]=r[t]&&i:r[t]=i}}))})),"allSelect"===e||"inverseSelect"===e?{selected:r}:{name:t.name,selected:r}}Ix.registerAction("legendToggleSelect","legendselectchanged",Ye.curry(xS,"toggleSelected")),Ix.registerAction("legendAllSelect","legendselectall",Ye.curry(xS,"allSelect")),Ix.registerAction("legendInverseSelect","legendinverseselect",Ye.curry(xS,"inverseSelect")),Ix.registerAction("legendSelect","legendselected",Ye.curry(xS,"select")),Ix.registerAction("legendUnSelect","legendunselected",Ye.curry(xS,"unSelect"));var bS=qh.getLayoutRect,wS=qh.box,TS=qh.positionElement;var SS=function(e,t){var n=Rh.normalizeCssArray(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),e=new Vc.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})},OS=C_.createSymbol,MS={layout:function(e,t,n){var i=t.getBoxLayoutParams(),r=t.get("padding"),a={width:n.getWidth(),height:n.getHeight()},o=bS(i,a,r);wS(t.get("orient"),e,t.get("itemGap"),o.width,o.height),TS(e,i,a,r)},makeBackground:SS}.makeBackground,DS=Ye.curry,AS=Ye.each,kS=Vc.Group,IS=Ix.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new kS),this._backgroundEl,this.group.add(this._selectorGroup=new kS),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(e,t,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var r=e.get("align"),a=e.get("orient");r&&"auto"!==r||(r="right"===e.get("left")&&"vertical"===a?"right":"left");var o=e.get("selector",!0),s=e.get("selectorPosition",!0);!o||s&&"auto"!==s||(s="horizontal"===a?"end":"start"),this.renderInner(r,e,t,n,o,a,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),h=qh.getLayoutRect(l,u,c),d=this.layoutInner(e,r,h,i,o,s),f=qh.getLayoutRect(Ye.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=MS(d,e))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(e,t,n,i,r,a,o){var s=this.getContentGroup(),l=Ye.createHashMap(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){!e.get("legendHoverLink")&&c.push(e.id)})),AS(t.getData(),(function(r,a){var o=r.get("name");if(this.newlineDisabled||""!==o&&"\n"!==o){var h=n.getSeriesByName(o)[0];if(!l.get(o))if(h){var d=h.getData(),f=d.getVisual("color"),p=d.getVisual("borderColor");"function"==typeof f&&(f=f(h.getDataParams(0))),"function"==typeof p&&(p=p(h.getDataParams(0)));var g=d.getVisual("legendSymbol")||"roundRect",m=d.getVisual("symbol");this._createItem(o,a,r,t,g,m,e,f,p,u).on("click",DS(ES,o,null,i,c)).on("mouseover",DS(NS,h.name,null,i,c)).on("mouseout",DS(RS,h.name,null,i,c)),l.set(o,!0)}else n.eachRawSeries((function(n){if(!l.get(o)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(o))return;var h=s.indexOfName(o),d=s.getItemVisual(h,"color"),f=s.getItemVisual(h,"borderColor");this._createItem(o,a,r,t,"roundRect",null,e,d,f,u).on("click",DS(ES,null,o,i,c)).on("mouseover",DS(NS,null,o,i,c)).on("mouseout",DS(RS,null,o,i,c)),l.set(o,!0)}}),this)}else s.add(new kS({newline:!0}))}),this),r&&this._createSelector(r,t,i,a,o)},_createSelector:function(e,t,n,i,r){var a=this.getSelectorGroup();AS(e,(function(e){!function(e){var i=e.type,r=new Vc.Text({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});a.add(r);var o=t.getModel("selectorLabel"),s=t.getModel("emphasis.selectorLabel");Vc.setLabelStyle(r.style,r.hoverStyle={},o,s,{defaultText:e.title,isRectText:!1}),Vc.setHoverStyle(r)}(e)}))},_createItem:function(e,t,n,i,r,a,o,s,l,u){var c=i.get("itemWidth"),h=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.get("inactiveBorderColor"),p=i.get("symbolKeepAspect"),g=i.getModel("itemStyle"),m=i.isSelected(e),v=new kS,y=n.getModel("textStyle"),_=n.get("icon"),x=n.getModel("tooltip"),b=x.parentModel,w=OS(r=_||r,0,0,c,h,m?s:d,null==p||p);if(v.add(CS(w,r,g,l,f,m)),!_&&a&&(a!==r||"none"===a)){var T=.8*h;"none"===a&&(a="circle");var S=OS(a,(c-T)/2,(h-T)/2,T,T,m?s:d,null==p||p);v.add(CS(S,a,g,l,f,m))}var O="left"===o?c+5:-5,M=o,D=i.get("formatter"),A=e;"string"==typeof D&&D?A=D.replace("{name}",null!=e?e:""):"function"==typeof D&&(A=D(e)),v.add(new Vc.Text({style:Vc.setTextStyle({},y,{text:A,x:O,y:h/2,textFill:m?y.getTextColor():d,textAlign:M,textVerticalAlign:"middle"})}));var k=new Vc.Rect({shape:v.getBoundingRect(),invisible:!0,tooltip:x.get("show")?Ye.extend({content:e,formatter:b.get("formatter",!0)||function(){return e},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:e,$vars:["name"]}},x.option):null});return v.add(k),v.eachChild((function(e){e.silent=!0})),k.silent=!u,this.getContentGroup().add(v),Vc.setHoverStyle(v),v.__legendDataIndex=t,v},layoutInner:function(e,t,n,i,r,a){var o=this.getContentGroup(),s=this.getSelectorGroup();qh.box(e.get("orient"),o,e.get("itemGap"),n.width,n.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(r){qh.box("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),h=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),f=e.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===a?h[f]+=l[p]+d:u[f]+=c[p]+d,h[1-f]+=l[g]/2-c[g]/2,s.attr("position",h),o.attr("position",u);var v={x:0,y:0};return v[p]=l[p]+d+c[p],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+h[1-f]),v}return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function CS(e,t,n,i,r,a){var o;return"line"!==t&&t.indexOf("empty")<0?(o=n.getItemStyle(),e.style.stroke=i,a||(o.stroke=r)):o=n.getItemStyle(["borderWidth","borderColor"]),e.setStyle(o)}function ES(e,t,n,i){RS(e,t,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),NS(e,t,n,i)}function NS(e,t,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:i})}function RS(e,t,n,i){var r=n.getZr().storage.getDisplayList()[0];r&&r.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:i})}var LS=IS;var PS=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}))};Ix.registerProcessor(Ix.PRIORITY.PROCESSOR.SERIES_FILTER,PS),Jh.registerSubTypeDefaulter("legend",(function(){return"plain"}));var zS=qh.mergeLayoutParam,YS=qh.getLayoutParams,HS=_S.extend({type:"legend.scroll",setScrollDataIndex:function(e){this.option.scrollDataIndex=e},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(e,t,n,i){var r=YS(e);HS.superCall(this,"init",e,t,n,i),FS(this,e,r)},mergeOption:function(e,t){HS.superCall(this,"mergeOption",e,t),FS(this,this.option,e)}});function FS(e,t,n){var i=[1,1];i[e.getOrient().index]=0,zS(t,n,{type:"box",ignoreSize:i})}var BS=Vc.Group,jS=["width","height"],US=["x","y"],WS=LS.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){WS.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new BS),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new BS),this._showController},resetInner:function(){WS.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(e,t,n,i,r,a,o){var s=this;WS.superCall(this,"renderInner",e,t,n,i,r,a,o);var l=this._controllerGroup,u=t.get("pageIconSize",!0);Ye.isArray(u)||(u=[u,u]),h("pagePrev",0);var c=t.getModel("pageTextStyle");function h(e,n){var r=e+"DataIndex",a=Vc.createIcon(t.get("pageIcons",!0)[t.getOrient().name][n],{onclick:Ye.bind(s._pageGo,s,r,t,i)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});a.name=e,l.add(a)}l.add(new Vc.Text({name:"pageText",style:{textFill:c.getTextColor(),font:c.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),h("pageNext",1)},layoutInner:function(e,t,n,i,r,a){var o=this.getSelectorGroup(),s=e.getOrient().index,l=jS[s],u=US[s],c=jS[1-s],h=US[1-s];r&&qh.box("horizontal",o,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),f=o.getBoundingRect(),p=[-f.x,-f.y],g=Ye.clone(n);r&&(g[l]=n[l]-f[l]-d);var m=this._layoutContentAndController(e,i,g,s,l,c,h);if(r){if("end"===a)p[s]+=m[l]+d;else{var v=f[l]+d;p[s]-=v,m[u]-=v}m[l]+=f[l]+d,p[1-s]+=m[h]+m[c]/2-f[c]/2,m[c]=Math.max(m[c],f[c]),m[h]=Math.min(m[h],f[h]+p[1-s]),o.attr("position",p)}return m},_layoutContentAndController:function(e,t,n,i,r,a,o){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;qh.box(e.get("orient"),s,e.get("itemGap"),i?n.width:null,i?null:n.height),qh.box("horizontal",u,e.get("pageButtonItemGap",!0));var c=s.getBoundingRect(),h=u.getBoundingRect(),d=this._showController=c[r]>n[r],f=[-c.x,-c.y];t||(f[i]=s.position[i]);var p=[0,0],g=[-h.x,-h.y],m=Ye.retrieve2(e.get("pageButtonGap",!0),e.get("itemGap",!0));d&&("end"===e.get("pageButtonPosition",!0)?g[i]+=n[r]-h[r]:p[i]+=h[r]+m);g[1-i]+=c[a]/2-h[a]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[r]=d?n[r]:c[r],v[a]=Math.max(c[a],h[a]),v[o]=Math.min(0,h[o]+g[1-i]),l.__rectSize=n[r],d){var y={x:0,y:0};y[r]=Math.max(n[r]-h[r]-m,0),y[a]=v[a],l.setClipPath(new Vc.Rect({shape:y})),l.__rectSize=y[r]}else u.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(e);return null!=_.pageIndex&&Vc.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;Ye.each(["pagePrev","pageNext"],(function(i){var r=null!=t[i+"DataIndex"],a=n.childOfName(i);a&&(a.setStyle("fill",r?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),a.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=e.get("pageFormatter"),a=t.pageIndex,o=null!=a?a+1:0,s=t.pageCount;i&&r&&i.setStyle("text",Ye.isString(r)?r.replace("{current}",o).replace("{total}",s):r({current:o,total:s}))},_getPageInfo:function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=e.getOrient().index,a=jS[r],o=US[r],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,h=c?1:0,d={contentPosition:n.position.slice(),pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[r]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=c;++p)(!(v=y(l[p]))&&m.e>g.s+i||v&&!_(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;p>=-1;--p)(v=y(l[p]))&&_(m,v.s)||!(g.i<m.i)||(m=g,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=v;return d;function y(e){if(e){var t=e.getBoundingRect(),n=t[o]+e.position[r];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function _(e,t){return e.e>=t&&e.s<=t+i}},_findTargetItemIndex:function(e){return this._showController?(this.getContentGroup().eachChild((function(i,r){var a=i.__legendDataIndex;null==n&&null!=a&&(n=r),a===e&&(t=r)})),null!=t?t:n):0;var t,n}});Ix.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}));var GS,VS,qS,ZS,XS,KS=$((function(e,t){var n;n=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){var i=n(2),r=n(3),a=n(4),o=n(22);function s(e){var t=new a(e),n=r(a.prototype.request,t);return i.extend(n,a.prototype,t),i.extend(n,t),n}var l=s(n(10));l.Axios=a,l.create=function(e){return s(o(l.defaults,e))},l.Cancel=n(23),l.CancelToken=n(24),l.isCancel=n(9),l.all=function(e){return Promise.all(e)},l.spread=n(25),e.exports=l,e.exports.default=l},function(e,t,n){var i=n(3),r=Object.prototype.toString;function a(e){return"[object Array]"===r.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function l(e){return"[object Function]"===r.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}e.exports={isArray:a,isArrayBuffer:function(e){return"[object ArrayBuffer]"===r.call(e)},isBuffer:function(e){return null!==e&&!o(e)&&null!==e.constructor&&!o(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isUndefined:o,isDate:function(e){return"[object Date]"===r.call(e)},isFile:function(e){return"[object File]"===r.call(e)},isBlob:function(e){return"[object Blob]"===r.call(e)},isFunction:l,isStream:function(e){return s(e)&&l(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:u,merge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]=n}for(var i=0,r=arguments.length;i<r;i++)u(arguments[i],n);return t},deepMerge:function e(){var t={};function n(n,i){"object"==typeof t[i]&&"object"==typeof n?t[i]=e(t[i],n):t[i]="object"==typeof n?e({},n):n}for(var i=0,r=arguments.length;i<r;i++)u(arguments[i],n);return t},extend:function(e,t,n){return u(t,(function(t,r){e[r]=n&&"function"==typeof t?i(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(e,t){e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];return e.apply(t,n)}}},function(e,t,n){var i=n(2),r=n(5),a=n(6),o=n(7),s=n(22);function l(e){this.defaults=e,this.interceptors={request:new a,response:new a}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[o,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach((function(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function(e){t.push(e.fulfilled,e.rejected)}));t.length;)n=n.then(t.shift(),t.shift());return n},l.prototype.getUri=function(e){return e=s(this.defaults,e),r(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},i.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}})),i.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}})),e.exports=l},function(e,t,n){var i=n(2);function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(i.isURLSearchParams(t))a=t.toString();else{var o=[];i.forEach(t,(function(e,t){null!=e&&(i.isArray(e)?t+="[]":e=[e],i.forEach(e,(function(e){i.isDate(e)?e=e.toISOString():i.isObject(e)&&(e=JSON.stringify(e)),o.push(r(t)+"="+r(e))})))})),a=o.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},function(e,t,n){var i=n(2);function r(){this.handlers=[]}r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){i.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=r},function(e,t,n){var i=n(2),r=n(8),a=n(9),o=n(10);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=r(e.data,e.headers,e.transformRequest),e.headers=i.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),i.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return s(e),t.data=r(t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(s(e),t&&t.response&&(t.response.data=r(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){var i=n(2);e.exports=function(e,t,n){return i.forEach(n,(function(n){e=n(e,t)})),e}},function(e,t){e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){var i=n(2),r=n(11),a={"Content-Type":"application/x-www-form-urlencoded"};function o(e,t){!i.isUndefined(e)&&i.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var s,l={adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(s=n(12)),s),transformRequest:[function(e,t){return r(t,"Accept"),r(t,"Content-Type"),i.isFormData(e)||i.isArrayBuffer(e)||i.isBuffer(e)||i.isStream(e)||i.isFile(e)||i.isBlob(e)?e:i.isArrayBufferView(e)?e.buffer:i.isURLSearchParams(e)?(o(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):i.isObject(e)?(o(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(e){l.headers[e]={}})),i.forEach(["post","put","patch"],(function(e){l.headers[e]=i.merge(a)})),e.exports=l},function(e,t,n){var i=n(2);e.exports=function(e,t){i.forEach(e,(function(n,i){i!==t&&i.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[i])}))}},function(e,t,n){var i=n(2),r=n(13),a=n(5),o=n(16),s=n(19),l=n(20),u=n(14);e.exports=function(e){return new Promise((function(t,c){var h=e.data,d=e.headers;i.isFormData(h)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var p=e.auth.username||"",g=e.auth.password||"";d.Authorization="Basic "+btoa(p+":"+g)}var m=o(e.baseURL,e.url);if(f.open(e.method.toUpperCase(),a(m,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?s(f.getAllResponseHeaders()):null,i={data:e.responseType&&"text"!==e.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:e,request:f};r(t,c,i),f=null}},f.onabort=function(){f&&(c(u("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(u("Network Error",e,null,f)),f=null},f.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),c(u(t,e,"ECONNABORTED",f)),f=null},i.isStandardBrowserEnv()){var v=n(21),y=(e.withCredentials||l(m))&&e.xsrfCookieName?v.read(e.xsrfCookieName):void 0;y&&(d[e.xsrfHeaderName]=y)}if("setRequestHeader"in f&&i.forEach(d,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete d[t]:f.setRequestHeader(t,e)})),i.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){f&&(f.abort(),c(e),f=null)})),void 0===h&&(h=null),f.send(h)}))}},function(e,t,n){var i=n(14);e.exports=function(e,t,n){var r=n.config.validateStatus;!r||r(n.status)?e(n):t(i("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){var i=n(15);e.exports=function(e,t,n,r,a){var o=new Error(e);return i(o,t,n,r,a)}},function(e,t){e.exports=function(e,t,n,i,r){return e.config=t,n&&(e.code=n),e.request=i,e.response=r,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){var i=n(17),r=n(18);e.exports=function(e,t){return e&&!i(t)?r(e,t):t}},function(e,t){e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){var i=n(2),r=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,o={};return e?(i.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=i.trim(e.substr(0,a)).toLowerCase(),n=i.trim(e.substr(a+1)),t){if(o[t]&&r.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},function(e,t,n){var i=n(2);e.exports=i.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var i=e;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=r(window.location.href),function(t){var n=i.isString(t)?r(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){var i=n(2);e.exports=i.isStandardBrowserEnv()?{write:function(e,t,n,r,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),i.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),i.isString(r)&&s.push("path="+r),i.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){var i=n(2);e.exports=function(e,t){t=t||{};var n={},r=["url","method","params","data"],a=["headers","auth","proxy"],o=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];i.forEach(r,(function(e){void 0!==t[e]&&(n[e]=t[e])})),i.forEach(a,(function(r){i.isObject(t[r])?n[r]=i.deepMerge(e[r],t[r]):void 0!==t[r]?n[r]=t[r]:i.isObject(e[r])?n[r]=i.deepMerge(e[r]):void 0!==e[r]&&(n[r]=e[r])})),i.forEach(o,(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])}));var s=r.concat(a).concat(o),l=Object.keys(t).filter((function(e){return-1===s.indexOf(e)}));return i.forEach(l,(function(i){void 0!==t[i]?n[i]=t[i]:void 0!==e[i]&&(n[i]=e[i])})),n}},function(e,t){function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){var i=n(23);function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new i(e),t(n.reason))}))}r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r((function(t){e=t})),cancel:e}},e.exports=r},function(e,t){e.exports=function(e){return function(t){return e.apply(null,t)}}}])},e.exports=n()})),$S=$((function(e,t){e.exports=function(){var t,n;function i(){return t.apply(null,arguments)}function r(e){t=e}function a(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 Zn(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})),r=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&i);if(e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return r;e._isValid=r}return e._isValid}function 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,r;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(r=t[i=_[n]])||(e[i]=r);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 T(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function S(e){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function O(e,t){var n=!0;return f((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,e),n){var r,a,o,l=[];for(a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(o in r+="\n["+a+"] ",arguments[0])s(arguments[0],o)&&(r+=o+": "+arguments[0][o]+", ");r=r.slice(0,-2)}else r=arguments[a];l.push(r)}S(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var M,D={};function A(e,t){null!=i.deprecationHandler&&i.deprecationHandler(e,t),D[e]||(S(t),D[e]=!0)}function k(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function I(e){var t,n;for(n in e)s(e,n)&&(k(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 C(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 E(e){null!=e&&this.set(e)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,M=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var N={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function R(e,t,n){var i=this._calendar[e]||this._calendar.sameElse;return k(i)?i.call(t,n):i}function L(e,t,n){var i=""+Math.abs(e),r=t-i.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var P=/(\[[^\[]*\])|(\\)?([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,Y={},H={};function F(e,t,n,i){var r=i;"string"==typeof i&&(r=function(){return this[i]()}),e&&(H[e]=r),t&&(H[t[0]]=function(){return L(r.apply(this,arguments),t[1],t[2])}),n&&(H[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function B(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function j(e){var t,n,i=e.match(P);for(t=0,n=i.length;t<n;t++)H[i[t]]?i[t]=H[i[t]]:i[t]=B(i[t]);return function(t){var r,a="";for(r=0;r<n;r++)a+=k(i[r])?i[r].call(t,e):i[r];return a}}function U(e,t){return e.isValid()?(t=W(t,e.localeData()),Y[t]=Y[t]||j(t),Y[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 G={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 V(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(P).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var q="Invalid date";function Z(){return this._invalidDate}var X="%d",K=/\d{1,2}/;function $(e){return this._ordinal.replace("%d",e)}var J={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 ee(e,t,n,i){var r=this._relativeTime[n];return k(r)?r(e,t,n,i):r.replace(/%d/i,e)}function te(e,t){var n=this._relativeTime[e>0?"future":"past"];return k(n)?n(t):n.replace(/%s/i,t)}var ne={};function ie(e,t){var n=e.toLowerCase();ne[n]=ne[n+"s"]=ne[t]=e}function re(e){return"string"==typeof e?ne[e]||ne[e.toLowerCase()]:void 0}function ae(e){var t,n,i={};for(n in e)s(e,n)&&(t=re(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 k(this[e=re(e)])?this[e]():this}function me(e,t){if("object"==typeof e){var n,i=le(e=ae(e));for(n=0;n<i.length;n++)this[i[n].unit](e[i[n].unit])}else if(k(this[e=re(e)]))return this[e](t);return this}var ve,ye=/\d/,_e=/\d\d/,xe=/\d{3}/,be=/\d{4}/,we=/[+-]?\d{6}/,Te=/\d\d?/,Se=/\d\d\d\d?/,Oe=/\d\d\d\d\d\d?/,Me=/\d{1,3}/,De=/\d{1,4}/,Ae=/[+-]?\d{1,6}/,ke=/\d+/,Ie=/[+-]?\d+/,Ce=/Z|[+-]\d\d:?\d\d/gi,Ee=/Z|[+-]\d\d(?::?\d\d)?/gi,Ne=/[+-]?\d+(\.\d{1,3})?/,Re=/[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 Le(e,t,n){ve[e]=k(t)?t:function(e,i){return e&&n?n:t}}function Pe(e,t){return s(ve,e)?ve[e](t._strict,t._locale):new RegExp(ze(e))}function ze(e){return Ye(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,i,r){return t||n||i||r})))}function Ye(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}ve={};var He={};function Fe(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++)He[e[n]]=i}function Be(e,t){Fe(e,(function(e,n,i,r){i._w=i._w||{},t(e,i._w,i,r)}))}function je(e,t,n){null!=t&&s(He,e)&&He[e](t,n._a,n,e)}var Ue,We=0,Ge=1,Ve=2,qe=3,Ze=4,Xe=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}Ue=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},F("M",["MM",2],"Mo",(function(){return this.month()+1})),F("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),F("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ie("month","M"),se("month",8),Le("M",Te),Le("MM",Te,_e),Le("MMM",(function(e,t){return t.monthsShortRegex(e)})),Le("MMMM",(function(e,t){return t.monthsRegex(e)})),Fe(["M","MM"],(function(e,t){t[Ge]=he(e)-1})),Fe(["MMM","MMMM"],(function(e,t,n,i){var r=n._locale.monthsParse(e,i,n._strict);null!=r?t[Ge]=r: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?/,rt=Re,at=Re;function ot(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||it).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone}function st(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[it.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function lt(e,t,n){var i,r,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)a=p([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(r=Ue.call(this._shortMonthsParse,o))?r:null:-1!==(r=Ue.call(this._longMonthsParse,o))?r:null:"MMM"===t?-1!==(r=Ue.call(this._shortMonthsParse,o))||-1!==(r=Ue.call(this._longMonthsParse,o))?r:null:-1!==(r=Ue.call(this._longMonthsParse,o))||-1!==(r=Ue.call(this._shortMonthsParse,o))?r:null}function ut(e,t,n){var i,r,a;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(r=p([2e3,i]),n&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),n||this._monthsParse[i]||(a="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[i].test(e))return i;if(n&&"MMM"===t&&this._shortMonthsParse[i].test(e))return i;if(!n&&this._monthsParse[i].test(e))return i}}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=rt),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=at),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function gt(){function e(e,t){return t.length-e.length}var t,n,i=[],r=[],a=[];for(t=0;t<12;t++)n=p([2e3,t]),i.push(this.monthsShort(n,"")),r.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(i.sort(e),r.sort(e),a.sort(e),t=0;t<12;t++)i[t]=Ye(i[t]),r[t]=Ye(r[t]);for(t=0;t<24;t++)a[t]=Ye(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function mt(e){return ue(e)?366:365}F("Y",0,0,(function(){var e=this.year();return e<=9999?L(e,4):"+"+e})),F(0,["YY",2],0,(function(){return this.year()%100})),F(0,["YYYY",4],0,"year"),F(0,["YYYYY",5],0,"year"),F(0,["YYYYYY",6,!0],0,"year"),ie("year","y"),se("year",1),Le("Y",Ie),Le("YY",Te,_e),Le("YYYY",De,be),Le("YYYYY",Ae,we),Le("YYYYYY",Ae,we),Fe(["YYYYY","YYYYYY"],We),Fe("YYYY",(function(e,t){t[We]=2===e.length?i.parseTwoDigitYear(e):he(e)})),Fe("YY",(function(e,t){t[We]=i.parseTwoDigitYear(e)})),Fe("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,r,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,i,r,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,i,r,a,o),s}function 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,r){var a,o,s=1+7*(t-1)+(7+n-i)%7+bt(e,i,r);return s<=0?o=mt(a=e-1)+s:s>mt(e)?(a=e+1,o=s-mt(e)):(a=e,o=s),{year:a,dayOfYear:o}}function Tt(e,t,n){var i,r,a=bt(e.year(),t,n),o=Math.floor((e.dayOfYear()-a-1)/7)+1;return o<1?i=o+St(r=e.year()-1,t,n):o>St(e.year(),t,n)?(i=o-St(e.year(),t,n),r=e.year()+1):(r=e.year(),i=o),{week:i,year:r}}function St(e,t,n){var i=bt(e,t,n),r=bt(e+1,t,n);return(mt(e)-i+r)/7}function Ot(e){return Tt(e,this._week.dow,this._week.doy).week}F("w",["ww",2],"wo","week"),F("W",["WW",2],"Wo","isoWeek"),ie("week","w"),ie("isoWeek","W"),se("week",5),se("isoWeek",5),Le("w",Te),Le("ww",Te,_e),Le("W",Te),Le("WW",Te,_e),Be(["w","ww","W","WW"],(function(e,t,n,i){t[i.substr(0,1)]=he(e)}));var Mt={dow:0,doy:6};function Dt(){return this._week.dow}function At(){return this._week.doy}function kt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function It(e){var t=Tt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Ct(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Et(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Nt(e,t){return e.slice(t,7).concat(e.slice(0,t))}F("d",0,"do","day"),F("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),F("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),F("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),F("e",0,0,"weekday"),F("E",0,0,"isoWeekday"),ie("day","d"),ie("weekday","e"),ie("isoWeekday","E"),se("day",11),se("weekday",11),se("isoWeekday",11),Le("d",Te),Le("e",Te),Le("E",Te),Le("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Le("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Le("dddd",(function(e,t){return t.weekdaysRegex(e)})),Be(["dd","ddd","dddd"],(function(e,t,n,i){var r=n._locale.weekdaysParse(e,i,n._strict);null!=r?t.d=r:m(n).invalidWeekday=e})),Be(["d","e","E"],(function(e,t,n,i){t[i]=he(e)}));var Rt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Lt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Pt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zt=Re,Yt=Re,Ht=Re;function Ft(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Nt(n,this._week.dow):e?n[e.day()]:n}function Bt(e){return!0===e?Nt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function jt(e){return!0===e?Nt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ut(e,t,n){var i,r,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)a=p([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(r=Ue.call(this._weekdaysParse,o))?r:null:"ddd"===t?-1!==(r=Ue.call(this._shortWeekdaysParse,o))?r:null:-1!==(r=Ue.call(this._minWeekdaysParse,o))?r:null:"dddd"===t?-1!==(r=Ue.call(this._weekdaysParse,o))||-1!==(r=Ue.call(this._shortWeekdaysParse,o))||-1!==(r=Ue.call(this._minWeekdaysParse,o))?r:null:"ddd"===t?-1!==(r=Ue.call(this._shortWeekdaysParse,o))||-1!==(r=Ue.call(this._weekdaysParse,o))||-1!==(r=Ue.call(this._minWeekdaysParse,o))?r:null:-1!==(r=Ue.call(this._minWeekdaysParse,o))||-1!==(r=Ue.call(this._weekdaysParse,o))||-1!==(r=Ue.call(this._shortWeekdaysParse,o))?r:null}function Wt(e,t,n){var i,r,a;if(this._weekdaysParseExact)return Ut.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=p([2e3,1]).day(i),n&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(a="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[i].test(e))return i;if(n&&"ddd"===t&&this._shortWeekdaysParse[i].test(e))return i;if(n&&"dd"===t&&this._minWeekdaysParse[i].test(e))return i;if(!n&&this._weekdaysParse[i].test(e))return i}}function Gt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Ct(e,this.localeData()),this.add(e-t,"d")):t}function Vt(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 qt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Et(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Zt(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 Xt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||$t.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Yt),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=Ht),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function $t(){function e(e,t){return t.length-e.length}var t,n,i,r,a,o=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),i=Ye(this.weekdaysMin(n,"")),r=Ye(this.weekdaysShort(n,"")),a=Ye(this.weekdays(n,"")),o.push(i),s.push(r),l.push(a),u.push(i),u.push(r),u.push(a);o.sort(e),s.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Qt(){return this.hours()%12||12}function Jt(){return this.hours()||24}function en(e,t){F(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)}F("H",["HH",2],0,"hour"),F("h",["hh",2],0,Qt),F("k",["kk",2],0,Jt),F("hmm",0,0,(function(){return""+Qt.apply(this)+L(this.minutes(),2)})),F("hmmss",0,0,(function(){return""+Qt.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)})),F("Hmm",0,0,(function(){return""+this.hours()+L(this.minutes(),2)})),F("Hmmss",0,0,(function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)})),en("a",!0),en("A",!1),ie("hour","h"),se("hour",13),Le("a",tn),Le("A",tn),Le("H",Te),Le("h",Te),Le("k",Te),Le("HH",Te,_e),Le("hh",Te,_e),Le("kk",Te,_e),Le("hmm",Se),Le("hmmss",Oe),Le("Hmm",Se),Le("Hmmss",Oe),Fe(["H","HH"],qe),Fe(["k","kk"],(function(e,t,n){var i=he(e);t[qe]=24===i?0:i})),Fe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),Fe(["h","hh"],(function(e,t,n){t[qe]=he(e),m(n).bigHour=!0})),Fe("hmm",(function(e,t,n){var i=e.length-2;t[qe]=he(e.substr(0,i)),t[Ze]=he(e.substr(i)),m(n).bigHour=!0})),Fe("hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[qe]=he(e.substr(0,i)),t[Ze]=he(e.substr(i,2)),t[Xe]=he(e.substr(r)),m(n).bigHour=!0})),Fe("Hmm",(function(e,t,n){var i=e.length-2;t[qe]=he(e.substr(0,i)),t[Ze]=he(e.substr(i))})),Fe("Hmmss",(function(e,t,n){var i=e.length-4,r=e.length-2;t[qe]=he(e.substr(0,i)),t[Ze]=he(e.substr(i,2)),t[Xe]=he(e.substr(r))}));var rn=/[ap]\.?m?\.?/i,an=de("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var sn,ln={calendar:N,longDateFormat:G,invalidDate:q,ordinal:X,dayOfMonthOrdinalParse:K,relativeTime:J,months:tt,monthsShort:nt,week:Mt,weekdays:Rt,weekdaysMin:Pt,weekdaysShort:Lt,meridiemParse:rn},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,r,a=0;a<e.length;){for(t=(r=dn(e[a]).split("-")).length,n=(n=dn(e[a+1]))?n.split("-"):null;t>0;){if(i=pn(r.slice(0,t).join("-")))return i;if(n&&n.length>=t&&hn(r,n)>=t-1)break;t--}a++}return sn}function pn(t){var n=null;if(void 0===un[t]&&e&&e.exports)try{n=sn._abbr,Q("./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])A("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 E(C(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,r=ln;null!=un[e]&&null!=un[e].parentLocale?un[e].set(C(un[e]._config,t)):(null!=(i=pn(e))&&(r=i._config),t=C(r,t),null==i&&(t.abbr=e),(n=new E(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(!a(e)){if(t=pn(e))return t;e=[e]}return fn(e)}function _n(){return M(un)}function xn(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[Ge]<0||n[Ge]>11?Ge:n[Ve]<1||n[Ve]>et(n[We],n[Ge])?Ve:n[qe]<0||n[qe]>24||24===n[qe]&&(0!==n[Ze]||0!==n[Xe]||0!==n[Ke])?qe:n[Ze]<0||n[Ze]>59?Ze:n[Xe]<0||n[Xe]>59?Xe:n[Ke]<0||n[Ke]>999?Ke:-1,m(e)._overflowDayOfYear&&(t<We||t>Ve)&&(t=Ve),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)?)?$/,Tn=/Z|[+-]\d\d(?::?\d\d)?/,Sn=[["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]],On=[["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/]],Mn=/^\/?Date\((-?\d+)/i,Dn=/^(?:(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}))$/,An={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function kn(e){var t,n,i,r,a,o,s=e._i,l=bn.exec(s)||wn.exec(s);if(l){for(m(e).iso=!0,t=0,n=Sn.length;t<n;t++)if(Sn[t][1].exec(l[1])){r=Sn[t][0],i=!1!==Sn[t][2];break}if(null==r)return void(e._isValid=!1);if(l[3]){for(t=0,n=On.length;t<n;t++)if(On[t][1].exec(l[3])){a=(l[2]||" ")+On[t][0];break}if(null==a)return void(e._isValid=!1)}if(!i&&null!=a)return void(e._isValid=!1);if(l[4]){if(!Tn.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=r+(a||"")+(o||""),Bn(e)}else e._isValid=!1}function In(e,t,n,i,r,a){var o=[Cn(e),nt.indexOf(t),parseInt(n,10),parseInt(i,10),parseInt(r,10)];return a&&o.push(parseInt(a,10)),o}function Cn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function En(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Nn(e,t,n){return!e||Lt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Rn(e,t,n){if(e)return An[e];if(t)return 0;var i=parseInt(n,10),r=i%100;return(i-r)/100*60+r}function Ln(e){var t,n=Dn.exec(En(e._i));if(n){if(t=In(n[4],n[3],n[2],n[5],n[6],n[7]),!Nn(n[1],t,e))return;e._a=t,e._tzm=Rn(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 Pn(e){var t=Mn.exec(e._i);null===t?(kn(e),!1===e._isValid&&(delete e._isValid,Ln(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 Yn(e){var t=new Date(i.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Hn(e){var t,n,i,r,a,o=[];if(!e._d){for(i=Yn(e),e._w&&null==e._a[Ve]&&null==e._a[Ge]&&Fn(e),null!=e._dayOfYear&&(a=zn(e._a[We],i[We]),(e._dayOfYear>mt(a)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=xt(a,0,e._dayOfYear),e._a[Ge]=n.getUTCMonth(),e._a[Ve]=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[qe]&&0===e._a[Ze]&&0===e._a[Xe]&&0===e._a[Ke]&&(e._nextDay=!0,e._a[qe]=0),e._d=(e._useUTC?xt:_t).apply(null,o),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[qe]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(m(e).weekdayMismatch=!0)}}function Fn(e){var t,n,i,r,a,o,s,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,o=4,n=zn(t.GG,e._a[We],Tt(Xn(),1,4).year),i=zn(t.W,1),((r=zn(t.E,1))<1||r>7)&&(l=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,u=Tt(Xn(),a,o),n=zn(t.gg,e._a[We],u.year),i=zn(t.w,u.week),null!=t.d?((r=t.d)<0||r>6)&&(l=!0):null!=t.e?(r=t.e+a,(t.e<0||t.e>6)&&(l=!0)):r=a),i<1||i>St(n,a,o)?m(e)._overflowWeeks=!0:null!=l?m(e)._overflowWeekday=!0:(s=wt(n,i,r,a,o),e._a[We]=s.year,e._dayOfYear=s.dayOfYear)}function Bn(e){if(e._f!==i.ISO_8601)if(e._f!==i.RFC_2822){e._a=[],m(e).empty=!0;var t,n,r,a,o,s,l=""+e._i,u=l.length,c=0;for(r=W(e._f,e._locale).match(P)||[],t=0;t<r.length;t++)a=r[t],(n=(l.match(Pe(a,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),H[a]?(n?m(e).empty=!1:m(e).unusedTokens.push(a),je(a,n,e)):e._strict&&!n&&m(e).unusedTokens.push(a);m(e).charsLeftOver=u-c,l.length>0&&m(e).unusedInput.push(l),e._a[qe]<=12&&!0===m(e).bigHour&&e._a[qe]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[qe]=jn(e._locale,e._a[qe],e._meridiem),null!==(s=m(e).era)&&(e._a[We]=e._locale.erasConvertYear(s,e._a[We])),Hn(e),xn(e)}else Ln(e);else kn(e)}function jn(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 Un(e){var t,n,i,r,a,o,s=!1;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(r=0;r<e._f.length;r++)a=0,o=!1,t=b({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[r],Bn(t),v(t)&&(o=!0),a+=m(t).charsLeftOver,a+=10*m(t).unusedTokens.length,m(t).score=a,s?a<i&&(i=a,n=t):(null==i||a<i||o)&&(i=a,n=t,o&&(s=!0));f(e,n||t)}function Wn(e){if(!e._d){var t=ae(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)})),Hn(e)}}function Gn(e){var t=new w(xn(Vn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Vn(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)),T(t)?new w(xn(t)):(h(t)?e._d=t:a(n)?Un(e):n?Bn(e):qn(e),v(e)||(e._d=null),e))}function qn(e){var t=e._i;u(t)?e._d=new Date(i.now()):h(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Pn(e):a(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),Hn(e)):o(t)?Wn(e):c(t)?e._d=new Date(t):i.createFromInputFallback(e)}function Zn(e,t,n,i,r){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)||a(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=r,s._l=n,s._i=e,s._f=t,s._strict=i,Gn(s)}function Xn(e,t,n,i){return Zn(e,t,n,i,!1)}i.createFromInputFallback=O("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=O("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Xn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()})),$n=O("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Xn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()}));function Qn(e,t){var n,i;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Xn();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===Ue.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 ri(){return this._isValid}function ai(){return Ai(NaN)}function oi(e){var t=ae(e),n=t.year||0,i=t.quarter||0,r=t.month||0,a=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*a,this._months=+r+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,r=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),o=0;for(i=0;i<r;i++)(n&&e[i]!==t[i]||!n&&he(e[i])!==he(t[i]))&&o++;return o+a}function ci(e,t){F(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+L(~~(e/60),2)+t+L(~~e%60,2)}))}ci("Z",":"),ci("ZZ",""),Le("Z",Ee),Le("ZZ",Ee),Fe(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=di(Ee,e)}));var hi=/([\+\-]|\d\d)/gi;function di(e,t){var n,i,r=(t||"").match(e);return null===r?null:0===(i=60*(n=((r[r.length-1]||[])+"").match(hi)||["-",0,0])[1]+he(n[2]))?0:"+"===n[0]?i:-i}function fi(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(T(e)||h(e)?e.valueOf():Xn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):Xn(e).local()}function pi(e){return-Math.round(e._d.getTimezoneOffset())}function gi(e,t,n){var r,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=di(Ee,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=pi(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==e&&(!t||this._changeInProgress?Ni(this,Ai(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a: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(Ce,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function xi(e){return!!this.isValid()&&(e=e?Xn(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=Vn(t))._a?(e=t._isUTC?p(t._a):Xn(t._a),this._isDSTShifted=this.isValid()&&ui(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Ti(){return!!this.isValid()&&!this._isUTC}function Si(){return!!this.isValid()&&this._isUTC}function Oi(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Mi=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Di=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ai(e,t){var n,i,r,a=e,o=null;return si(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(o=Mi.exec(e))?(n="-"===o[1]?-1:1,a={y:0,d:he(o[Ve])*n,h:he(o[qe])*n,m:he(o[Ze])*n,s:he(o[Xe])*n,ms:he(li(1e3*o[Ke]))*n}):(o=Di.exec(e))?(n="-"===o[1]?-1:1,a={y:ki(o[2],n),M:ki(o[3],n),w:ki(o[4],n),d:ki(o[5],n),h:ki(o[6],n),m:ki(o[7],n),s:ki(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(r=Ci(Xn(a.from),Xn(a.to)),(a={}).ms=r.milliseconds,a.M=r.months),i=new oi(a),si(e)&&s(e,"_locale")&&(i._locale=e._locale),si(e)&&s(e,"_isValid")&&(i._isValid=e._isValid),i}function ki(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ii(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 Ci(e,t){var n;return e.isValid()&&t.isValid()?(t=fi(t,e),e.isBefore(t)?n=Ii(e,t):((n=Ii(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Ei(e,t){return function(n,i){var r;return null===i||isNaN(+i)||(A(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=n,n=i,i=r),Ni(this,Ai(n,i),e),this}}function Ni(e,t,n,r){var a=t._milliseconds,o=li(t._days),s=li(t._months);e.isValid()&&(r=null==r||r,s&&ct(e,fe(e,"Month")+s*n),o&&pe(e,"Date",fe(e,"Date")+o*n),a&&e._d.setTime(e._d.valueOf()+a*n),r&&i.updateOffset(e,o||s))}Ai.fn=oi.prototype,Ai.invalid=ai;var Ri=Ei(1,"add"),Li=Ei(-1,"subtract");function Pi(e){return"string"==typeof e||e instanceof String}function zi(e){return T(e)||h(e)||Pi(e)||c(e)||Hi(e)||Yi(e)||null==e}function Yi(e){var t,n,i=o(e)&&!l(e),r=!1,a=["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<a.length;t+=1)n=a[t],r=r||s(e,n);return i&&r}function Hi(e){var t=a(e),n=!1;return t&&(n=0===e.filter((function(t){return!c(t)&&Pi(e)})).length),t&&n}function Fi(e){var t,n,i=o(e)&&!l(e),r=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<a.length;t+=1)n=a[t],r=r||s(e,n);return i&&r}function Bi(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 ji(e,t){1===arguments.length&&(arguments[0]?zi(arguments[0])?(e=arguments[0],t=void 0):Fi(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Xn(),r=fi(n,this).startOf("day"),a=i.calendarFormat(this,r)||"sameElse",o=t&&(k(t[a])?t[a].call(this,n):t[a]);return this.format(o||this.localeData().calendar(a,this,Xn(n)))}function Ui(){return new w(this)}function Wi(e,t){var n=T(e)?e:Xn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Gi(e,t){var n=T(e)?e:Xn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Vi(e,t,n,i){var r=T(e)?e:Xn(e),a=T(t)?t:Xn(t);return!!(this.isValid()&&r.isValid()&&a.isValid())&&("("===(i=i||"()")[0]?this.isAfter(r,n):!this.isBefore(r,n))&&(")"===i[1]?this.isBefore(a,n):!this.isAfter(a,n))}function qi(e,t){var n,i=T(e)?e:Xn(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()===i.valueOf():(n=i.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Zi(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Xi(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Ki(e,t,n){var i,r,a;if(!this.isValid())return NaN;if(!(i=fi(e,this)).isValid())return NaN;switch(r=6e4*(i.utcOffset()-this.utcOffset()),t=re(t)){case"year":a=$i(this,i)/12;break;case"month":a=$i(this,i);break;case"quarter":a=$i(this,i)/3;break;case"second":a=(this-i)/1e3;break;case"minute":a=(this-i)/6e4;break;case"hour":a=(this-i)/36e5;break;case"day":a=(this-i-r)/864e5;break;case"week":a=(this-i-r)/6048e5;break;default:a=this-i}return n?a:ce(a)}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?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):k(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(n,"Z")):U(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function er(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,i,r="moment",a="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",i=a+'[")]',this.format(e+t+n+i)}function tr(e){e||(e=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)}function nr(e,t){return this.isValid()&&(T(e)&&e.isValid()||Xn(e).isValid())?Ai({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ir(e){return this.from(Xn(),e)}function rr(e,t){return this.isValid()&&(T(e)&&e.isValid()||Xn(e).isValid())?Ai({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ar(e){return this.to(Xn(),e)}function or(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 sr=O("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 lr(){return this._locale}var ur=1e3,cr=60*ur,hr=60*cr,dr=3506328*hr;function fr(e,t){return(e%t+t)%t}function pr(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-dr:new Date(e,t,n).valueOf()}function gr(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-dr:Date.UTC(e,t,n)}function mr(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?gr:pr,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-=fr(t+(this._isUTC?0:this.utcOffset()*cr),hr);break;case"minute":t=this._d.valueOf(),t-=fr(t,cr);break;case"second":t=this._d.valueOf(),t-=fr(t,ur)}return this._d.setTime(t),i.updateOffset(this,!0),this}function vr(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?gr:pr,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+=hr-fr(t+(this._isUTC?0:this.utcOffset()*cr),hr)-1;break;case"minute":t=this._d.valueOf(),t+=cr-fr(t,cr)-1;break;case"second":t=this._d.valueOf(),t+=ur-fr(t,ur)-1}return this._d.setTime(t),i.updateOffset(this,!0),this}function yr(){return this._d.valueOf()-6e4*(this._offset||0)}function _r(){return Math.floor(this.valueOf()/1e3)}function xr(){return new Date(this.valueOf())}function br(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function wr(){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 Tr(){return this.isValid()?this.toISOString():null}function Sr(){return v(this)}function Or(){return f({},m(this))}function Mr(){return m(this).overflow}function Dr(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ar(e,t){var n,r,a,o=this._eras||yn("en")._eras;for(n=0,r=o.length;n<r;++n)switch("string"==typeof o[n].since&&(a=i(o[n].since).startOf("day"),o[n].since=a.valueOf()),typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":a=i(o[n].until).startOf("day").valueOf(),o[n].until=a.valueOf()}return o}function kr(e,t,n){var i,r,a,o,s,l=this.eras();for(e=e.toUpperCase(),i=0,r=l.length;i<r;++i)if(a=l[i].name.toUpperCase(),o=l[i].abbr.toUpperCase(),s=l[i].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(o===e)return l[i];break;case"NNNN":if(a===e)return l[i];break;case"NNNNN":if(s===e)return l[i]}else if([a,o,s].indexOf(e)>=0)return l[i]}function Ir(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 Cr(){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 Er(){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 Nr(){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 Rr(){var e,t,n,r,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,r=this.clone().startOf("day").valueOf(),a[e].since<=r&&r<=a[e].until||a[e].until<=r&&r<=a[e].since)return(this.year()-i(a[e].since).year())*n+a[e].offset;return this.year()}function Lr(e){return s(this,"_erasNameRegex")||jr.call(this),e?this._erasNameRegex:this._erasRegex}function Pr(e){return s(this,"_erasAbbrRegex")||jr.call(this),e?this._erasAbbrRegex:this._erasRegex}function zr(e){return s(this,"_erasNarrowRegex")||jr.call(this),e?this._erasNarrowRegex:this._erasRegex}function Yr(e,t){return t.erasAbbrRegex(e)}function Hr(e,t){return t.erasNameRegex(e)}function Fr(e,t){return t.erasNarrowRegex(e)}function Br(e,t){return t._eraYearOrdinalRegex||ke}function jr(){var e,t,n=[],i=[],r=[],a=[],o=this.eras();for(e=0,t=o.length;e<t;++e)i.push(Ye(o[e].name)),n.push(Ye(o[e].abbr)),r.push(Ye(o[e].narrow)),a.push(Ye(o[e].name)),a.push(Ye(o[e].abbr)),a.push(Ye(o[e].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}function Ur(e,t){F(0,[e,e.length],0,t)}function Wr(e){return Kr.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Gr(e){return Kr.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Vr(){return St(this.year(),1,4)}function qr(){return St(this.isoWeekYear(),1,4)}function Zr(){var e=this.localeData()._week;return St(this.year(),e.dow,e.doy)}function Xr(){var e=this.localeData()._week;return St(this.weekYear(),e.dow,e.doy)}function Kr(e,t,n,i,r){var a;return null==e?Tt(this,i,r).year:(t>(a=St(e,i,r))&&(t=a),$r.call(this,e,t,n,i,r))}function $r(e,t,n,i,r){var a=wt(e,t,n,i,r),o=xt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function Qr(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}F("N",0,0,"eraAbbr"),F("NN",0,0,"eraAbbr"),F("NNN",0,0,"eraAbbr"),F("NNNN",0,0,"eraName"),F("NNNNN",0,0,"eraNarrow"),F("y",["y",1],"yo","eraYear"),F("y",["yy",2],0,"eraYear"),F("y",["yyy",3],0,"eraYear"),F("y",["yyyy",4],0,"eraYear"),Le("N",Yr),Le("NN",Yr),Le("NNN",Yr),Le("NNNN",Hr),Le("NNNNN",Fr),Fe(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,i){var r=n._locale.erasParse(e,i,n._strict);r?m(n).era=r:m(n).invalidEra=e})),Le("y",ke),Le("yy",ke),Le("yyy",ke),Le("yyyy",ke),Le("yo",Br),Fe(["y","yy","yyy","yyyy"],We),Fe(["yo"],(function(e,t,n,i){var r;n._locale._eraYearOrdinalRegex&&(r=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[We]=n._locale.eraYearOrdinalParse(e,r):t[We]=parseInt(e,10)})),F(0,["gg",2],0,(function(){return this.weekYear()%100})),F(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Ur("gggg","weekYear"),Ur("ggggg","weekYear"),Ur("GGGG","isoWeekYear"),Ur("GGGGG","isoWeekYear"),ie("weekYear","gg"),ie("isoWeekYear","GG"),se("weekYear",1),se("isoWeekYear",1),Le("G",Ie),Le("g",Ie),Le("GG",Te,_e),Le("gg",Te,_e),Le("GGGG",De,be),Le("gggg",De,be),Le("GGGGG",Ae,we),Le("ggggg",Ae,we),Be(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,i){t[i.substr(0,2)]=he(e)})),Be(["gg","GG"],(function(e,t,n,r){t[r]=i.parseTwoDigitYear(e)})),F("Q",0,"Qo","quarter"),ie("quarter","Q"),se("quarter",7),Le("Q",ye),Fe("Q",(function(e,t){t[Ge]=3*(he(e)-1)})),F("D",["DD",2],"Do","date"),ie("date","D"),se("date",9),Le("D",Te),Le("DD",Te,_e),Le("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),Fe(["D","DD"],Ve),Fe("Do",(function(e,t){t[Ve]=he(e.match(Te)[0])}));var Jr=de("Date",!0);function ea(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}F("DDD",["DDDD",3],"DDDo","dayOfYear"),ie("dayOfYear","DDD"),se("dayOfYear",4),Le("DDD",Me),Le("DDDD",xe),Fe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=he(e)})),F("m",["mm",2],0,"minute"),ie("minute","m"),se("minute",14),Le("m",Te),Le("mm",Te,_e),Fe(["m","mm"],Ze);var ta=de("Minutes",!1);F("s",["ss",2],0,"second"),ie("second","s"),se("second",15),Le("s",Te),Le("ss",Te,_e),Fe(["s","ss"],Xe);var na,ia,ra=de("Seconds",!1);for(F("S",0,0,(function(){return~~(this.millisecond()/100)})),F(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),F(0,["SSS",3],0,"millisecond"),F(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),F(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),F(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),F(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),F(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),F(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ie("millisecond","ms"),se("millisecond",16),Le("S",Me,ye),Le("SS",Me,_e),Le("SSS",Me,xe),na="SSSS";na.length<=9;na+="S")Le(na,ke);function aa(e,t){t[Ke]=he(1e3*("0."+e))}for(na="S";na.length<=9;na+="S")Fe(na,aa);function oa(){return this._isUTC?"UTC":""}function sa(){return this._isUTC?"Coordinated Universal Time":""}ia=de("Milliseconds",!1),F("z",0,0,"zoneAbbr"),F("zz",0,0,"zoneName");var la=w.prototype;function ua(e){return Xn(1e3*e)}function ca(){return Xn.apply(null,arguments).parseZone()}function ha(e){return e}la.add=Ri,la.calendar=ji,la.clone=Ui,la.diff=Ki,la.endOf=vr,la.format=tr,la.from=nr,la.fromNow=ir,la.to=rr,la.toNow=ar,la.get=ge,la.invalidAt=Mr,la.isAfter=Wi,la.isBefore=Gi,la.isBetween=Vi,la.isSame=qi,la.isSameOrAfter=Zi,la.isSameOrBefore=Xi,la.isValid=Sr,la.lang=sr,la.locale=or,la.localeData=lr,la.max=$n,la.min=Kn,la.parsingFlags=Or,la.set=me,la.startOf=mr,la.subtract=Li,la.toArray=br,la.toObject=wr,la.toDate=xr,la.toISOString=Ji,la.inspect=er,"undefined"!=typeof Symbol&&null!=Symbol.for&&(la[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),la.toJSON=Tr,la.toString=Qi,la.unix=_r,la.valueOf=yr,la.creationData=Dr,la.eraName=Cr,la.eraNarrow=Er,la.eraAbbr=Nr,la.eraYear=Rr,la.year=vt,la.isLeapYear=yt,la.weekYear=Wr,la.isoWeekYear=Gr,la.quarter=la.quarters=Qr,la.month=ht,la.daysInMonth=dt,la.week=la.weeks=kt,la.isoWeek=la.isoWeeks=It,la.weeksInYear=Zr,la.weeksInWeekYear=Xr,la.isoWeeksInYear=Vr,la.isoWeeksInISOWeekYear=qr,la.date=Jr,la.day=la.days=Gt,la.weekday=Vt,la.isoWeekday=qt,la.dayOfYear=ea,la.hour=la.hours=an,la.minute=la.minutes=ta,la.second=la.seconds=ra,la.millisecond=la.milliseconds=ia,la.utcOffset=gi,la.utc=vi,la.local=yi,la.parseZone=_i,la.hasAlignedHourOffset=xi,la.isDST=bi,la.isLocal=Ti,la.isUtcOffset=Si,la.isUtc=Oi,la.isUTC=Oi,la.zoneAbbr=oa,la.zoneName=sa,la.dates=O("dates accessor is deprecated. Use date instead.",Jr),la.months=O("months accessor is deprecated. Use month instead",ht),la.years=O("years accessor is deprecated. Use year instead",vt),la.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",mi),la.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wi);var da=E.prototype;function fa(e,t,n,i){var r=yn(),a=p().set(i,t);return r[n](a,e)}function pa(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return fa(e,t,n,"month");var i,r=[];for(i=0;i<12;i++)r[i]=fa(e,i,n,"month");return r}function ga(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 r,a=yn(),o=e?a._week.dow:0,s=[];if(null!=n)return fa(t,(n+o)%7,i,"day");for(r=0;r<7;r++)s[r]=fa(t,(r+o)%7,i,"day");return s}function ma(e,t){return pa(e,t,"months")}function va(e,t){return pa(e,t,"monthsShort")}function ya(e,t,n){return ga(e,t,n,"weekdays")}function _a(e,t,n){return ga(e,t,n,"weekdaysShort")}function xa(e,t,n){return ga(e,t,n,"weekdaysMin")}da.calendar=R,da.longDateFormat=V,da.invalidDate=Z,da.ordinal=$,da.preparse=ha,da.postformat=ha,da.relativeTime=ee,da.pastFuture=te,da.set=I,da.eras=Ar,da.erasParse=kr,da.erasConvertYear=Ir,da.erasAbbrRegex=Pr,da.erasNameRegex=Lr,da.erasNarrowRegex=zr,da.months=ot,da.monthsShort=st,da.monthsParse=ut,da.monthsRegex=pt,da.monthsShortRegex=ft,da.week=Ot,da.firstDayOfYear=At,da.firstDayOfWeek=Dt,da.weekdays=Ft,da.weekdaysMin=jt,da.weekdaysShort=Bt,da.weekdaysParse=Wt,da.weekdaysRegex=Zt,da.weekdaysShortRegex=Xt,da.weekdaysMinRegex=Kt,da.isPM=nn,da.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=O("moment.lang is deprecated. Use moment.locale instead.",gn),i.langData=O("moment.langData is deprecated. Use moment.localeData instead.",yn);var ba=Math.abs;function wa(){var e=this._data;return this._milliseconds=ba(this._milliseconds),this._days=ba(this._days),this._months=ba(this._months),e.milliseconds=ba(e.milliseconds),e.seconds=ba(e.seconds),e.minutes=ba(e.minutes),e.hours=ba(e.hours),e.months=ba(e.months),e.years=ba(e.years),this}function Ta(e,t,n,i){var r=Ai(t,n);return e._milliseconds+=i*r._milliseconds,e._days+=i*r._days,e._months+=i*r._months,e._bubble()}function Sa(e,t){return Ta(this,e,t,1)}function Oa(e,t){return Ta(this,e,t,-1)}function Ma(e){return e<0?Math.floor(e):Math.ceil(e)}function Da(){var e,t,n,i,r,a=this._milliseconds,o=this._days,s=this._months,l=this._data;return a>=0&&o>=0&&s>=0||a<=0&&o<=0&&s<=0||(a+=864e5*Ma(ka(s)+o),o=0,s=0),l.milliseconds=a%1e3,e=ce(a/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+=r=ce(Aa(o)),o-=Ma(ka(r)),i=ce(s/12),s%=12,l.days=o,l.months=s,l.years=i,this}function Aa(e){return 4800*e/146097}function ka(e){return 146097*e/4800}function Ia(e){if(!this.isValid())return NaN;var t,n,i=this._milliseconds;if("month"===(e=re(e))||"quarter"===e||"year"===e)switch(t=this._days+i/864e5,n=this._months+Aa(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(ka(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 Ca(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*he(this._months/12):NaN}function Ea(e){return function(){return this.as(e)}}var Na=Ea("ms"),Ra=Ea("s"),La=Ea("m"),Pa=Ea("h"),za=Ea("d"),Ya=Ea("w"),Ha=Ea("M"),Fa=Ea("Q"),Ba=Ea("y");function ja(){return Ai(this)}function Ua(e){return e=re(e),this.isValid()?this[e+"s"]():NaN}function Wa(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ga=Wa("milliseconds"),Va=Wa("seconds"),qa=Wa("minutes"),Za=Wa("hours"),Xa=Wa("days"),Ka=Wa("months"),$a=Wa("years");function Qa(){return ce(this.days()/7)}var Ja=Math.round,eo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function to(e,t,n,i,r){return r.relativeTime(t||1,!!n,e,i)}function no(e,t,n,i){var r=Ai(e).abs(),a=Ja(r.as("s")),o=Ja(r.as("m")),s=Ja(r.as("h")),l=Ja(r.as("d")),u=Ja(r.as("M")),c=Ja(r.as("w")),h=Ja(r.as("y")),d=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||o<=1&&["m"]||o<n.m&&["mm",o]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(d=d||c<=1&&["w"]||c<n.w&&["ww",c]),(d=d||u<=1&&["M"]||u<n.M&&["MM",u]||h<=1&&["y"]||["yy",h])[2]=t,d[3]=+e>0,d[4]=i,to.apply(null,d)}function io(e){return void 0===e?Ja:"function"==typeof e&&(Ja=e,!0)}function ro(e,t){return void 0!==eo[e]&&(void 0===t?eo[e]:(eo[e]=t,"s"===e&&(eo.ss=t-1),!0))}function ao(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,i,r=!1,a=eo;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(r=e),"object"==typeof t&&(a=Object.assign({},eo,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),i=no(this,!r,a,n=this.localeData()),r&&(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,r,a,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+$/,""):"",r=h<0?"-":"",a=so(this._months)!==so(h)?"-":"",o=so(this._days)!==so(h)?"-":"",s=so(this._milliseconds)!==so(h)?"-":"",r+"P"+(n?a+n+"Y":"")+(c?a+c+"M":"")+(u?o+u+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+i+"S":"")):"P0D"}var uo=oi.prototype;return uo.isValid=ri,uo.abs=wa,uo.add=Sa,uo.subtract=Oa,uo.as=Ia,uo.asMilliseconds=Na,uo.asSeconds=Ra,uo.asMinutes=La,uo.asHours=Pa,uo.asDays=za,uo.asWeeks=Ya,uo.asMonths=Ha,uo.asQuarters=Fa,uo.asYears=Ba,uo.valueOf=Ca,uo._bubble=Da,uo.clone=ja,uo.get=Ua,uo.milliseconds=Ga,uo.seconds=Va,uo.minutes=qa,uo.hours=Za,uo.days=Xa,uo.weeks=Qa,uo.months=Ka,uo.years=$a,uo.humanize=ao,uo.toISOString=lo,uo.toString=lo,uo.toJSON=lo,uo.locale=or,uo.localeData=lr,uo.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",lo),uo.lang=sr,F("X",0,0,"unix"),F("x",0,0,"valueOf"),Le("x",Ie),Le("X",Ne),Fe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),Fe("x",(function(e,t,n){n._d=new Date(he(e))})),
//! moment.js
i.version="2.29.1",r(Xn),i.fn=la,i.min=Jn,i.max=ei,i.now=ti,i.utc=p,i.unix=ua,i.months=ma,i.isDate=h,i.locale=gn,i.invalid=y,i.duration=Ai,i.isMoment=T,i.weekdays=ya,i.parseZone=ca,i.localeData=yn,i.isDuration=si,i.monthsShort=va,i.weekdaysMin=xa,i.defineLocale=mn,i.updateLocale=vn,i.locales=_n,i.weekdaysShort=_a,i.normalizeUnits=re,i.relativeTimeRounding=io,i.relativeTimeThreshold=ro,i.calendarFormat=Bi,i.prototype=la,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}));!function(e){e.DIMENSION="dimension",e.MAP="map",e.INDICATOR="indicator",e.DETAIL="detail"}(GS||(GS={})),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"}(VS||(VS={})),Object.freeze({[VS.TABLE]:Object.freeze({key:VS.TABLE,name:"表格",iconfont:"icon-table02",iconColor:"#2b9f7f",dataConfigMode:GS.DIMENSION}),[VS.PIE]:Object.freeze({key:VS.PIE,name:"饼图",iconfont:"icon-pie_chart",iconColor:"#11c5d4",dataConfigMode:GS.DIMENSION}),[VS.HISTOGRAM_LINE]:Object.freeze({key:VS.HISTOGRAM_LINE,name:"线图",iconfont:"icon-line_chart",iconColor:"#0091ff",dataConfigMode:GS.DIMENSION}),[VS.HISTOGRAM_BAR]:Object.freeze({key:VS.HISTOGRAM_BAR,name:"柱状图",iconfont:"icon-bar_chart",iconColor:"#ff822f",dataConfigMode:GS.DIMENSION}),[VS.INDICATOR_CARD]:Object.freeze({key:VS.INDICATOR_CARD,name:"指标卡",iconfont:"icon-indicator-card",iconColor:"#efce30",dataConfigMode:GS.INDICATOR}),[VS.BAR]:Object.freeze({key:VS.BAR,name:"条形图",iconfont:"icon-list",iconColor:"#ff5c31",dataConfigMode:GS.DIMENSION}),[VS.HISTOGRAM_MIX]:Object.freeze({key:VS.HISTOGRAM_MIX,name:"柱线混合图",iconfont:"icon-chart",iconColor:"#2b9f7f",dataConfigMode:GS.DIMENSION}),[VS.GAUGE]:Object.freeze({key:VS.GAUGE,name:"仪表盘",iconfont:"icon-dash-board",iconColor:"#5071f0",dataConfigMode:GS.DIMENSION}),[VS.MAP]:Object.freeze({key:VS.MAP,name:"地图",iconfont:"icon-thermal-map",iconColor:"#2b9f7f",dataConfigMode:GS.MAP}),[VS.DETAIL]:Object.freeze({key:VS.DETAIL,name:"明细表",iconfont:"icon-detail-list",iconColor:"#2b9f7f",dataConfigMode:GS.DETAIL})}),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"}(qS||(qS={})),Object.freeze({[qS.CONTAIN]:Object.freeze({key:qS.CONTAIN,name:"包含"}),[qS.NOT_CONTAIN]:Object.freeze({key:qS.NOT_CONTAIN,name:"不包含"}),[qS.STARTWITH]:Object.freeze({key:qS.STARTWITH,name:"开头是"}),[qS.NOT_STARTWITH]:Object.freeze({key:qS.NOT_STARTWITH,name:"开头不是"}),[qS.ENDWITH]:Object.freeze({key:qS.ENDWITH,name:"结尾是"}),[qS.NOT_ENDWITH]:Object.freeze({key:qS.NOT_ENDWITH,name:"结尾不是"}),[qS.EQUAL]:Object.freeze({key:qS.EQUAL,name:"等于"}),[qS.NOT_EQUAL]:Object.freeze({key:qS.NOT_EQUAL,name:"不等于"}),[qS.NULL_STR]:Object.freeze({key:qS.NULL_STR,name:"内容为空"}),[qS.NOT_NULL_STR]:Object.freeze({key:qS.NOT_NULL_STR,name:"内容非空"}),[qS.NULL]:Object.freeze({key:qS.NULL,name:"为NULL"}),[qS.NOT_NULL]:Object.freeze({key:qS.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"}(ZS||(ZS={})),Object.freeze({[ZS.EQUAL]:Object.freeze({key:ZS.EQUAL,name:"等于"}),[ZS.NOT_EQUAL]:Object.freeze({key:ZS.NOT_EQUAL,name:"不等于"}),[ZS.GREAT_THAN]:Object.freeze({key:ZS.GREAT_THAN,name:"大于"}),[ZS.GREAT_EQUAL]:Object.freeze({key:ZS.GREAT_EQUAL,name:"大于等于"}),[ZS.LESS_THAN]:Object.freeze({key:ZS.LESS_THAN,name:"小于"}),[ZS.LESS_EQUAL]:Object.freeze({key:ZS.LESS_EQUAL,name:"小于等于"}),[ZS.NULL]:Object.freeze({key:ZS.NULL,name:"为NULL"}),[ZS.NOT_NULL]:Object.freeze({key:ZS.NOT_NULL,name:"不为NULL"})}),function(e){e.YEAR="year",e.MONTH="month",e.DAY="day",e.TIME="time"}(XS||(XS={}));const QS=Object.freeze({[XS.YEAR]:Object.freeze({key:XS.YEAR,name:"年",sqltype:"time-only_year",sqldformat:"only_year"}),[XS.MONTH]:Object.freeze({key:XS.MONTH,name:"月",sqltype:"time-only_month",sqldformat:"only_month"}),[XS.DAY]:Object.freeze({key:XS.DAY,name:"日",sqltype:"time-only_day",sqldformat:"only_day"}),[XS.TIME]:Object.freeze({key:XS.TIME,name:"时间",sqltype:"time-time",sqldformat:"only_time"})});var JS,eO;!function(e){e.STRING="string",e.TIME="time",e.INT="int",e.FLOAT="float",e.DOUBLE="double"}(JS||(JS={})),Object.freeze({[JS.STRING]:Object.freeze({key:JS.STRING,name:"文本",iconfont:"icon-word"}),[JS.TIME]:Object.freeze({key:JS.TIME,name:"时间",iconfont:"icon-calendar"}),[JS.INT]:Object.freeze({key:JS.INT,name:"数值",iconfont:"icon-number"}),[JS.FLOAT]:Object.freeze({key:JS.FLOAT,name:"小数",iconfont:"icon-decimal"}),[JS.DOUBLE]:Object.freeze({key:JS.DOUBLE,name:"小数",iconfont:"icon-decimal"})}),function(e){e.NONE="none",e.FIRST_TAG="first_tag"}(eO||(eO={}));const tO=Object.freeze({[eO.NONE]:Object.freeze({key:eO.NONE,name:"无",getDefault:()=>({type:eO.NONE})}),[eO.FIRST_TAG]:Object.freeze({key:eO.FIRST_TAG,name:"选中第一项",getDefault:()=>({type:eO.FIRST_TAG})})});var nO;!function(e){e.ALL="all",e.BEFORE="before",e.CUSTOM="custom"}(nO||(nO={}));const iO=Object.freeze({[nO.ALL]:Object.freeze({key:nO.ALL,name:"全选",getDefault:()=>({type:nO.ALL})}),[nO.BEFORE]:Object.freeze({key:nO.BEFORE,name:"选中前N项",getDefault:()=>({type:nO.BEFORE,index:1})}),[nO.CUSTOM]:Object.freeze({key:nO.CUSTOM,name:"自定义",getDefault:()=>({type:nO.CUSTOM,val:[]})})});var rO;!function(e){e.INPUT="input",e.SELECT="select",e.CONDITION="condition",e.TAG="tag",e.TREE="tree"}(rO||(rO={}));const aO=Object.freeze({[rO.INPUT]:Object.freeze({key:rO.INPUT,name:"输入框",getDefault:()=>({default:null})}),[rO.SELECT]:Object.freeze({key:rO.SELECT,name:"下拉框",searchMode:[qS.CONTAIN,qS.STARTWITH,qS.EQUAL],getDefault:({isMultiple:e=!1}={})=>({isMultiple:e,searchMode:qS.CONTAIN,default:e?[]:null})}),[rO.CONDITION]:Object.freeze({key:rO.CONDITION,name:"条件",getDefault:({searchMode:e=qS.CONTAIN,value:t=null}={})=>({default:{searchMode:e,val:t}})}),[rO.TAG]:Object.freeze({key:rO.TAG,name:"标签",showTagCount:[10,30,50],getDefault:({isMultiple:e=!1}={})=>{const t={isMultiple:e,showTagCount:30};return e?Object.assign({},t,{selectedTagCount:null,default:iO[nO.ALL].getDefault()}):Object.assign({},t,{default:tO[eO.NONE].getDefault()})}}),[rO.TREE]:Object.freeze({key:rO.TREE,name:"树",getDefault:()=>({isMultiple:!1,treeCheckStrictly:!1,defaultExpandLevel:1,default:[]})})});var oO,sO;!function(e){e.CONDITION="condition",e.RANGE="num_range"}(oO||(oO={})),Object.freeze({[oO.CONDITION]:Object.freeze({key:oO.CONDITION,name:"条件",getDefault:({searchMode:e=ZS.EQUAL,value:t=null}={})=>({default:{searchMode:e,val:t}})}),[oO.RANGE]:Object.freeze({key:oO.RANGE,name:"范围",getDefault:()=>({default:[null,null]})})}),function(e){e.NONE="none",e.CURRENT="current",e.CUSTOM="custom"}(sO||(sO={}));const lO=Object.freeze({[sO.NONE]:Object.freeze({key:sO.NONE,name:"无",getDefault:()=>({type:sO.NONE})}),[sO.CURRENT]:Object.freeze({key:sO.CURRENT,name:"当前时间",getDefault:()=>({type:sO.CURRENT})}),[sO.CUSTOM]:Object.freeze({key:sO.CUSTOM,name:"自定义",getDefault:()=>({type:sO.CUSTOM,val:null})})});var uO;!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"}(uO||(uO={}));const cO=Object.freeze({[uO.NONE]:Object.freeze({key:uO.NONE,name:"无",getDefault:()=>({type:uO.NONE})}),[uO.TODAY]:Object.freeze({key:uO.TODAY,name:"当天",getDefault:()=>({type:uO.TODAY})}),[uO.YESTERDAY]:Object.freeze({key:uO.YESTERDAY,name:"昨天",getDefault:()=>({type:uO.YESTERDAY})}),[uO.THIS_WEEK]:Object.freeze({key:uO.THIS_WEEK,name:"本周",getDefault:()=>({type:uO.THIS_WEEK})}),[uO.LAST_WEEK]:Object.freeze({key:uO.LAST_WEEK,name:"上周",getDefault:()=>({type:uO.LAST_WEEK})}),[uO.THIS_MONTH]:Object.freeze({key:uO.THIS_MONTH,name:"本月",getDefault:()=>({type:uO.THIS_MONTH})}),[uO.LAST_MONTH]:Object.freeze({key:uO.LAST_MONTH,name:"上月",getDefault:()=>({type:uO.LAST_MONTH})}),[uO.THIS_QUARTER]:Object.freeze({key:uO.THIS_QUARTER,name:"本季度",getDefault:()=>({type:uO.THIS_QUARTER})}),[uO.LAST_QUARTER]:Object.freeze({key:uO.LAST_QUARTER,name:"上季度",getDefault:()=>({type:uO.LAST_QUARTER})}),[uO.THIS_YEAR]:Object.freeze({key:uO.THIS_YEAR,name:"今年",getDefault:()=>({type:uO.THIS_YEAR})}),[uO.LAST_YEAR]:Object.freeze({key:uO.LAST_YEAR,name:"去年",getDefault:()=>({type:uO.LAST_YEAR})}),[uO.NEARLY_A_WEEK]:Object.freeze({key:uO.NEARLY_A_WEEK,name:"最近一周",getDefault:()=>({type:uO.NEARLY_A_WEEK})}),[uO.NEARLY_A_MONTH]:Object.freeze({key:uO.NEARLY_A_MONTH,name:"最近一月",getDefault:()=>({type:uO.NEARLY_A_MONTH})}),[uO.NEARLY_A_YEAR]:Object.freeze({key:uO.NEARLY_A_YEAR,name:"最近一年",getDefault:()=>({type:uO.NEARLY_A_YEAR})}),[uO.CUSTOM]:Object.freeze({key:uO.CUSTOM,name:"自定义",getDefault:()=>({type:uO.CUSTOM,val:[null,null]})})});var hO,dO,fO,pO,gO,mO,vO,yO,_O,xO,bO,wO,TO,SO;function OO({dformat:e,tformat:t}){const n=[];return e&&e!==vO.DEFAULT?e!==vO.NONE&&n.push(e):n.push(vO.MIDDLE_DASH_YYYYMMDD),t&&t!==yO.DEFAULT?t!==vO.NONE&&n.push(t):n.push(yO.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"}(hO||(hO={})),Object.freeze({[hO.DATE]:Object.freeze({key:hO.DATE,name:"日期选择",getDefault:()=>({default:lO[sO.NONE].getDefault()})}),[hO.DATE_RANGE]:Object.freeze({key:hO.DATE_RANGE,name:"日期范围",getDefault:()=>({default:cO[uO.NONE].getDefault()})}),[hO.DATETIME]:Object.freeze({key:hO.DATETIME,name:"日期时间选择",getDefault:()=>({default:lO[sO.NONE].getDefault()})}),[hO.DATETIME_RANGE]:Object.freeze({key:hO.DATETIME_RANGE,name:"日期时间范围",getDefault:()=>({default:cO[uO.NONE].getDefault()})}),[hO.TIME]:Object.freeze({key:hO.TIME,name:"时间选择",getDefault:()=>({default:lO[sO.NONE].getDefault()})}),[hO.TIME_RANGE]:Object.freeze({key:hO.TIME_RANGE,name:"时间范围",getDefault:()=>({default:cO[uO.NONE].getDefault()})}),[hO.YEAR]:Object.freeze({key:hO.YEAR,name:"年",getDefault:()=>({default:lO[sO.NONE].getDefault()})}),[hO.MONTH]:Object.freeze({key:hO.MONTH,name:"月",getDefault:()=>({default:lO[sO.NONE].getDefault()})}),[hO.DAY]:Object.freeze({key:hO.DAY,name:"日",getDefault:()=>({default:lO[sO.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"}(dO||(dO={})),Object.freeze({[dO.NONE]:Object.freeze({key:dO.NONE,name:"不对比",label:"不对比"}),[dO.COMPAREWITH_YEAR]:Object.freeze({key:dO.COMPAREWITH_YEAR,name:"同比增长率",label:"同比增长率"}),[dO.COMPAREWITH]:Object.freeze({key:dO.COMPAREWITH,name:"环比增长率",label:"环比增长率"}),[dO.COMPAREWITH_YEAR_NUM]:Object.freeze({key:dO.COMPAREWITH_YEAR_NUM,name:"同比增长值",label:"同比增长值"}),[dO.COMPAREWITH_NUM]:Object.freeze({key:dO.COMPAREWITH_NUM,name:"环比增长值",label:"环比增长值"})}),function(e){e.NONE="none",e.DATA="data",e.TIME="time",e.PERCENT="percent"}(fO||(fO={})),Object.freeze({[fO.NONE]:Object.freeze({key:fO.NONE,label:"默认"}),[fO.DATA]:Object.freeze({key:fO.DATA,label:"数值"}),[fO.TIME]:Object.freeze({key:fO.TIME,label:"时间"}),[fO.PERCENT]:Object.freeze({key:fO.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"}(pO||(pO={})),Object.freeze({[pO.NONE]:Object.freeze({key:pO.NONE,label:"无",value:1}),[pO.CN_K]:Object.freeze({key:pO.CN_K,label:"千",value:Math.pow(10,3)}),[pO.CN_10K]:Object.freeze({key:pO.CN_10K,label:"万",value:Math.pow(10,4)}),[pO.CN_100K]:Object.freeze({key:pO.CN_100K,label:"十万",value:Math.pow(10,5)}),[pO.CN_M]:Object.freeze({key:pO.CN_M,label:"百万",value:Math.pow(10,6)}),[pO.CN_10M]:Object.freeze({key:pO.CN_10M,label:"千万",value:Math.pow(10,7)}),[pO.CN_100M]:Object.freeze({key:pO.CN_100M,label:"亿",value:Math.pow(10,8)}),[pO.EN_K]:Object.freeze({key:pO.EN_K,label:"K",value:Math.pow(10,3)}),[pO.EN_M]:Object.freeze({key:pO.EN_M,label:"M",value:Math.pow(10,6)}),[pO.EN_B]:Object.freeze({key:pO.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"}(gO||(gO={})),Object.freeze({[gO.YEAR]:Object.freeze({key:gO.YEAR,label:"年",value:31536e6}),[gO.MONTH]:Object.freeze({key:gO.MONTH,label:"月",value:2592e6}),[gO.DAY]:Object.freeze({key:gO.DAY,label:"日",value:864e5}),[gO.HOUR]:Object.freeze({key:gO.HOUR,label:"小时",value:36e5}),[gO.MINUTE]:Object.freeze({key:gO.MINUTE,label:"分钟",value:6e4}),[gO.SECOND]:Object.freeze({key:gO.SECOND,label:"秒",value:1e3}),[gO.MILLISECOND]:Object.freeze({key:gO.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"}(mO||(mO={})),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"}(vO||(vO={})),Object.freeze({[vO.DEFAULT]:Object.freeze({key:vO.DEFAULT,label:"默认"}),[vO.NONE]:Object.freeze({key:vO.NONE,label:"隐藏"}),[vO.CN_YYYYMMDD]:Object.freeze({key:vO.CN_YYYYMMDD,label:"2019年03月01日(yyyy年mm月dd日)"}),[vO.MIDDLE_DASH_YYYYMMDD]:Object.freeze({key:vO.MIDDLE_DASH_YYYYMMDD,label:"2019-03-01(yyyy-mm-dd)"}),[vO.SLASH_YYYYMMDD]:Object.freeze({key:vO.SLASH_YYYYMMDD,label:"19/03/01(yy/mm/dd)"}),[vO.CN_YYYYMM]:Object.freeze({key:vO.CN_YYYYMM,label:"2019年03月(yyyy年mm月)"}),[vO.MIDDLE_DASH_YYYYMM]:Object.freeze({key:vO.MIDDLE_DASH_YYYYMM,label:"2019-03(yyyy-mm)"}),[vO.SLASH_YYYYMM]:Object.freeze({key:vO.SLASH_YYYYMM,label:"2019/03(yyyy/mm)"}),[vO.CN_YYYY]:Object.freeze({key:vO.CN_YYYY,label:"2019年(yyyy年)"}),[vO.YYYY]:Object.freeze({key:vO.YYYY,label:"2019(yyyy)"}),[vO.CN_MM]:Object.freeze({key:vO.CN_MM,label:"03月(mm月)"}),[vO.MM]:Object.freeze({key:vO.MM,label:"03(mm)"}),[vO.CN_DD]:Object.freeze({key:vO.CN_DD,label:"01日(dd日)"}),[vO.DD]:Object.freeze({key:vO.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"}(yO||(yO={})),Object.freeze({[yO.DEFAULT]:Object.freeze({key:yO.DEFAULT,label:"默认"}),[vO.NONE]:Object.freeze({key:vO.NONE,label:"隐藏"}),[yO.HMS]:Object.freeze({key:yO.HMS,label:"12:00:00"}),[yO.HM]:Object.freeze({key:yO.HM,label:"12:00"}),[yO.CN_HMS]:Object.freeze({key:yO.CN_HMS,label:"12时00分00秒"}),[yO.CN_HM]:Object.freeze({key:yO.CN_HM,label:"12时00"}),[yO.CN_H]:Object.freeze({key:yO.CN_H,label:"12时"}),[yO.RISP]:Object.freeze({key:yO.RISP,label:"12:00:00 AM"}),[yO.RIP]:Object.freeze({key:yO.RIP,label:"12:00 AM"})}),function(e){e.NONE="none",e.DRILL="drill",e.DETAIL="detail"}(_O||(_O={})),Object.freeze({[_O.NONE]:Object.freeze({key:_O.NONE,label:"无点击事件"}),[_O.DRILL]:Object.freeze({key:_O.DRILL,label:"下钻"}),[_O.DETAIL]:Object.freeze({key:_O.DETAIL,label:"显示详细表"})}),function(e){e.DIALOG="dialog"}(xO||(xO={})),Object.freeze({[xO.DIALOG]:Object.freeze({key:xO.DIALOG,label:"通过弹窗显示",getDefaultConfig:()=>({mode:xO.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"}(bO||(bO={})),Object.freeze({[bO.NONE]:Object.freeze({key:bO.NONE,name:"不计算",label:"不计算"}),[bO.SUM]:Object.freeze({key:bO.SUM,name:"求和",label:"求和"}),[bO.COUNT]:Object.freeze({key:bO.COUNT,name:"计次",label:"计次"}),[bO.DISTINCT]:Object.freeze({key:bO.DISTINCT,name:"计数",label:"计数"}),[bO.AVG]:Object.freeze({key:bO.AVG,name:"平均",label:"平均"}),[bO.MAX]:Object.freeze({key:bO.MAX,name:"最大值",label:"最大值"}),[bO.MIN]:Object.freeze({key:bO.MIN,name:"最小值",label:"最小值"})}),function(e){e.NONE="none",e.SHOW_NULL="null",e.SHOW_ZERO="zero",e.SHOW_STRIKETHROUGH="strikethrough"}(wO||(wO={})),Object.freeze({[wO.NONE]:Object.freeze({key:wO.NONE,label:"默认"}),[wO.SHOW_NULL]:Object.freeze({key:wO.SHOW_NULL,label:"显示为 null"}),[wO.SHOW_ZERO]:Object.freeze({key:wO.SHOW_ZERO,label:"显示为 0"}),[wO.SHOW_STRIKETHROUGH]:Object.freeze({key:wO.SHOW_STRIKETHROUGH,label:"显示为-"})}),function(e){e.NONE="none",e.ASC="asc",e.DESC="desc"}(TO||(TO={})),Object.freeze({[TO.NONE]:Object.freeze({key:TO.NONE,name:"默认",label:"默认"}),[TO.ASC]:Object.freeze({key:TO.ASC,name:"↑",label:"升序 ↑"}),[TO.DESC]:Object.freeze({key:TO.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"}(SO||(SO={}));const MO=({value:e})=>0===e.length||e.findIndex((e=>e||0===e))<0,DO=({value:e,dateFormat:t})=>{switch(e.type){case sO.NONE:return null;case sO.CURRENT:return $S().format(t);case sO.CUSTOM:return e.val}},AO=({value:e,dateFormat:t})=>{switch(e.type){case uO.NONE:return[null,null];case uO.TODAY:const n=$S().startOf("d"),i=$S().endOf("d");return[n.format(t),i.format(t)];case uO.YESTERDAY:const r=$S().add(-1,"days").startOf("d"),a=$S().add(-1,"days").endOf("d");return[r.format(t),a.format(t)];case uO.THIS_WEEK:const o=$S().startOf("isoWeeks").startOf("d"),s=$S().endOf("isoWeeks").endOf("d");return[o.format(t),s.format(t)];case uO.LAST_WEEK:const l=$S().add(-7,"day").startOf("isoWeeks").startOf("d"),u=$S().add(-7,"day").endOf("isoWeeks").endOf("d");return[l.format(t),u.format(t)];case uO.THIS_MONTH:const c=$S().startOf("month").startOf("d"),h=$S().endOf("month").endOf("d");return[c.format(t),h.format(t)];case uO.LAST_MONTH:const d=$S().add(-1,"month").startOf("month").startOf("d"),f=$S().add(-1,"month").endOf("month").endOf("d");return[d.format(t),f.format(t)];case uO.THIS_QUARTER:const p=$S().startOf("quarter").startOf("d"),g=$S().endOf("quarter").endOf("d");return[p.format(t),g.format(t)];case uO.LAST_QUARTER:const m=$S().add(-1,"quarter").startOf("quarter").startOf("d"),v=$S().add(-1,"quarter").endOf("quarter").endOf("d");return[m.format(t),v.format(t)];case uO.THIS_YEAR:const y=$S().startOf("year").startOf("d"),_=$S().endOf("year").endOf("d");return[y.format(t),_.format(t)];case uO.LAST_YEAR:const x=$S().add(-1,"year").startOf("year").startOf("d"),b=$S().add(-1,"year").endOf("year").endOf("d");return[x.format(t),b.format(t)];case uO.NEARLY_A_WEEK:const w=$S().add(1,"day").add(-1,"week"),T=$S();return[w.format(t),T.format(t)];case uO.NEARLY_A_MONTH:const S=$S().add(1,"day").add(-1,"month"),O=$S();return[S.format(t),O.format(t)];case uO.NEARLY_A_YEAR:const M=$S().add(1,"day").add(-1,"year"),D=$S();return[M.format(t),D.format(t)];case uO.CUSTOM:return e.val||[null,null]}},kO={};function IO({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,r)=>u(this,void 0,void 0,(function*(){const a={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 r=Reflect.has(t.filter.params,"value");switch(t.type){case JS.STRING:switch(t.filter.type){case rO.INPUT:i={op:"**",value:r?[t.filter.params.value]:[t.filter.params.default],options:[]};break;case rO.SELECT:let a=r?t.filter.params.value:t.filter.params.default;t.filter.params.isMultiple||(a=[a]),i={op:"=",value:[],options:a};break;case rO.CONDITION:let o,s,l;switch(r?(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 qS.CONTAIN:s="**";break;case qS.NOT_CONTAIN:s="!**";break;case qS.STARTWITH:s="*=";break;case qS.NOT_STARTWITH:s="!*=";break;case qS.ENDWITH:s="=*";break;case qS.NOT_ENDWITH:s="!=*";break;case qS.EQUAL:s="=";break;case qS.NOT_EQUAL:s="<>";break;case qS.NULL_STR:s="empty";break;case qS.NOT_NULL_STR:s="ne";break;case qS.NULL:s="null";break;case qS.NOT_NULL:s="nn"}i={op:s,value:[o],options:[]};break;case rO.TAG:let u,c="=";if(r)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 nO.ALL:u=[];break;case nO.BEFORE:let i=[];i=kO[t.key]?kO[t.key]:yield n({share_id:e,field:t.key,pp:Math.max(...aO[rO.TAG].showTagCount),pg:1}),u=i.slice(0,t.filter.params.default.index);break;case nO.CUSTOM:u=t.filter.params.default.val}else switch(t.filter.params.default.type){case eO.NONE:u=[];break;case eO.FIRST_TAG:let e=[];e=kO[t.key]?kO[t.key]:yield n({field:t.key,pp:Math.max(...aO[rO.TAG].showTagCount),pg:1}),u=e.length>0?[e[0]]:[]}i={op:c,value:[],options:u};break;case rO.TREE:a=t.filter.params.isMultiple?(r?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:a},t.filter.params.treeCheckStrictly&&(i.level="mutil")}break;case JS.TIME:switch(t.filter.type){case hO.DATE:let e;e=r?t.filter.params.value:DO({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 hO.DATE_RANGE:let n;n=r?t.filter.params.value:AO({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 hO.DATETIME:let a;a=r?t.filter.params.value:DO({value:t.filter.params.default,dateFormat:"YYYY-MM-DD HH:mm:ss"}),i={op:"=",value:[a],options:[]};break;case hO.DATETIME_RANGE:let o;o=r?t.filter.params.value:AO({value:t.filter.params.default,dateFormat:"YYYY-MM-DD HH:mm:ss"}),i={op:"between",value:o,options:[]};break;case hO.TIME:let s;s=r?t.filter.params.value:DO({value:t.filter.params.default,dateFormat:"HH:mm:ss"}),i={op:"=",dformat:"only_time",value:[s],options:[]};break;case hO.TIME_RANGE:let l;l=r?t.filter.params.value:AO({value:t.filter.params.default,dateFormat:"HH:mm:ss"}),i={op:"between",dformat:"only_time",value:l,options:[]};break;case hO.YEAR:let u;u=r?t.filter.params.value:DO({value:t.filter.params.default,dateFormat:"YYYY"}),i={op:"@only_year",value:[],options:[u]};break;case hO.MONTH:let c;c=r?t.filter.params.value:DO({value:t.filter.params.default,dateFormat:"MM"}),i={op:"@only_month",value:[],options:[c]};break;case hO.DAY:let h;h=r?t.filter.params.value:DO({value:t.filter.params.default,dateFormat:"DD"}),i={op:"@only_day",value:[],options:[h]}}break;case JS.INT:case JS.FLOAT:case JS.DOUBLE:switch(t.filter.type){case oO.CONDITION:let e,n,a;switch(r?(e=t.filter.params.value.val,a=t.filter.params.value.searchMode):(e=t.filter.params.default.val,a=t.filter.params.default.searchMode),a){case ZS.EQUAL:n="=";break;case ZS.NOT_EQUAL:n="!=";break;case ZS.GREAT_EQUAL:n=">=";break;case ZS.GREAT_THAN:n=">";break;case ZS.LESS_EQUAL:n="<=";break;case ZS.LESS_THAN:n="<";break;case ZS.NULL:n="null";break;case ZS.NOT_NULL:n="nn"}i={op:n,value:[e],options:[]};break;case oO.RANGE:i={op:"between",value:r?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)&&MO({value:e.value})&&MO({value:e.options}))({filter:o})?(a.filter=[o],o.level&&(a.level=o.level)):a.filter=[],i[r]=a}))))),i}))}function CO({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===JS.TIME)if(e.subtype){const n=QS[e.subtype];t.type=n.sqltype,t.dformat=n.sqldformat}else{const n=OO({dformat:e.dformat,tformat:e.tformat});n&&(t.dformat=n)}return t}))}function EO({customFields:e}){let t=[];return Object.values(e.calc).forEach((e=>{t=t.concat(e)})),t}function NO({shareId:e,setConfig:t,getTableColumnValueFunc:n}){return u(this,void 0,void 0,(function*(){const i=yield IO({shareId:e,criteria:t.data.criteria,getTableColumnValueFunc:n}),{group:r,drillDown:a}=(({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===JS.TIME)if(e.subtype){const n=QS[e.subtype];t.type=n.sqltype,t.dformat=n.sqldformat}else{const n=OO({dformat:e.dformat,tformat:e.tformat});n&&(t.dformat=n)}return t})),Object.entries(e).forEach((([e,i])=>{if(!i.current)return;const r=t.find((t=>t.id===e));n.group.splice(r,1,{alias:i.current.alias,key:i.current.key,type:i.current.type,filter:[]});const a=[],o=[];i.path.forEach((e=>{a.push({alias:e.alias,key:e.key,type:e.type,filter:[]}),o.push(e.value)})),a.push({alias:i.current.alias,key:i.current.key,type:i.current.type,filter:[]}),n.drillDown.push({items:a,itemValues:o,currentItem:i.path.length+1,isDrill:!0})})),n})({drillDown:t.data.drillDown,group:t.data.group});return{criteria:i,group:r,value:CO({value:t.data.value}),drillDown:a,rule:EO({customFields:t.customFields})}}))}var RO,LO,PO,zO;function YO({timeRangeConfig:e}){let t=[null,null];switch(e.type){case PO.SHORTCUTS:const n=e.params,i=$S();switch(n.value){case RO.ALL:t=[null,null];break;case RO.TODAY:const e=i.format("YYYY-MM-DD");t=[`${e} 00:00:00`,`${e} 23:59:59`];break;case RO.YESTERDAY:const n=i.add(-1,"days").format("YYYY-MM-DD");t=[`${n} 00:00:00`,`${n} 23:59:59`];break;case RO.THIS_WEEK_TO_NOW:t=[$S().startOf("week").format("YYYY-MM-DD 00:00:00"),i.format("YYYY-MM-DD 23:59:59")];break;case RO.LAST_WEEK:t=[$S().add(-1,"week").startOf("week").format("YYYY-MM-DD 00:00:00"),i.format("YYYY-MM-DD 23:59:59")];break;case RO.THIS_MONTH_TO_NOW:t=[$S().startOf("month").format("YYYY-MM-DD 00:00:00"),i.format("YYYY-MM-DD 23:59:59")];break;case RO.LAST_MONTH:const r=$S().add(-1,"month").startOf("month").startOf("d"),a=$S().add(-1,"month").endOf("month").endOf("d");t=[r.format("YYYY-MM-DD 00:00:00"),a.format("YYYY-MM-DD 23:59:59")];break;case RO.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 RO.LAST_QUARTER:const o=$S().add(-1,"quarter").startOf("quarter"),s=$S().add(-1,"quarter").endOf("quarter");t=[o.format("YYYY-MM-DD 00:00:00"),s.format("YYYY-MM-DD 23:59:59")];break;case RO.THIS_YEAR_TO_NOW:t=[$S().startOf("year").format("YYYY-MM-DD 00:00:00"),i.format("YYYY-MM-DD 23:59:59")];break;case RO.LAST_YEAR:const l=$S().add(-1,"year").startOf("year"),u=$S().add(-1,"year").endOf("year");t=[l.format("YYYY-MM-DD 00:00:00"),u.format("YYYY-MM-DD 23:59:59")]}break;case PO.CUSTOM_TIME:const r=e.params;t=[`${r.startDate} ${r.startTime.value}`,`${r.endDate} ${r.endTime.value}`];break;case PO.DYNAMIC_TIME:const a=e.params,o=$S(),s=$S();switch(a.type){case LO.SOME_DAY:s.add(0-a.value,"days");break;case LO.SOME_WEEK:s.add(0-a.value,"week");break;case LO.SOME_MONTH:s.add(0-a.value,"month");break;case LO.SOME_YEAR:s.add(0-a.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"}(RO||(RO={})),Object.freeze({[RO.ALL]:Object.freeze({key:RO.ALL,name:"全部"}),[RO.TODAY]:Object.freeze({key:RO.TODAY,name:"当天"}),[RO.YESTERDAY]:Object.freeze({key:RO.YESTERDAY,name:"昨天"}),[RO.THIS_WEEK_TO_NOW]:Object.freeze({key:RO.THIS_WEEK_TO_NOW,name:"本周至今"}),[RO.LAST_WEEK]:Object.freeze({key:RO.LAST_WEEK,name:"上周"}),[RO.THIS_MONTH_TO_NOW]:Object.freeze({key:RO.THIS_MONTH_TO_NOW,name:"本月至今"}),[RO.LAST_MONTH]:Object.freeze({key:RO.LAST_MONTH,name:"上月"}),[RO.THIS_QUARTER_TO_NOW]:Object.freeze({key:RO.THIS_QUARTER_TO_NOW,name:"本季度至今"}),[RO.LAST_QUARTER]:Object.freeze({key:RO.LAST_QUARTER,name:"上季度"}),[RO.THIS_YEAR_TO_NOW]:Object.freeze({key:RO.THIS_YEAR_TO_NOW,name:"本年至今"}),[RO.LAST_YEAR]:Object.freeze({key:RO.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"}(LO||(LO={})),Object.freeze({[LO.SOME_DAY]:Object.freeze({key:LO.SOME_DAY,name:"前N天"}),[LO.SOME_WEEK]:Object.freeze({key:LO.SOME_WEEK,name:"前N周"}),[LO.SOME_MONTH]:Object.freeze({key:LO.SOME_MONTH,name:"前N月"}),[LO.SOME_YEAR]:Object.freeze({key:LO.SOME_YEAR,name:"前N年"})}),function(e){e.SHORTCUTS="shortcuts",e.CUSTOM_TIME="custom_time",e.DYNAMIC_TIME="dynamic_time"}(PO||(PO={})),Object.freeze({[PO.SHORTCUTS]:Object.freeze({key:PO.SHORTCUTS,name:"快捷选择",getDefault:()=>({value:RO.ALL})}),[PO.CUSTOM_TIME]:Object.freeze({key:PO.CUSTOM_TIME,name:"自定义时间",getDefault:()=>({startDate:null,startTime:{enable:!1,value:"00:00:00"},endDate:null,endTime:{enable:!1,value:"23:59:59"}})}),[PO.DYNAMIC_TIME]:Object.freeze({key:PO.DYNAMIC_TIME,name:"动态时间",getDefault:()=>({type:LO.SOME_DAY,value:null})})}),function(e){e.YEAR="year",e.QUARTER="quarter",e.MONTH="month",e.WEEK="week"}(zO||(zO={})),Object.freeze({[zO.YEAR]:Object.freeze({key:zO.YEAR,name:"年"}),[zO.QUARTER]:Object.freeze({key:zO.QUARTER,name:"季"}),[zO.MONTH]:Object.freeze({key:zO.MONTH,name:"月"}),[zO.WEEK]:Object.freeze({key:zO.WEEK,name:"周"})});function HO({shareId:e,setConfig:t,timeRange:n,getTableColumnValueFunc:i}){return u(this,void 0,void 0,(function*(){const r=yield IO({shareId:e,criteria:t.data.criteria,getTableColumnValueFunc:i}),a=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||YO({timeRangeConfig:e.timeRange}),options:[]}]}))({groupField:a,timeRange:n}),s=(({timeRange:e,groupField:t,value:n})=>{const i=[];return n.forEach((n=>{const r={id:n.id,alias:n.alias,key:n.key,type:n.type,expr:n.expr};if(i.push(r),t.compare.yoy_ratio.enable){const n=Object.assign({},r,{alias:`${r.alias}%%同比率`});switch(t.compare.yoy_ratio.dimension){case zO.WEEK:n.compare={type:"ratio",value:[$S(e[0]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss"),$S(e[1]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss")]};break;case zO.MONTH:n.compare={type:"ratio",value:[$S(e[0]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss"),$S(e[1]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss")]};break;case zO.QUARTER:n.compare={type:"ratio",value:[$S(e[0]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss"),$S(e[1]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss")]};break;case zO.YEAR:n.compare={type:"ratio",value:[$S(e[0]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss"),$S(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({},r,{alias:`${r.alias}%%同比值`});switch(t.compare.yoy_value.dimension){case zO.WEEK:n.compare={type:"num",value:[$S(e[0]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss"),$S(e[1]).add(-1,"week").format("YYYY-MM-DD HH:mm:ss")]};break;case zO.MONTH:n.compare={type:"num",value:[$S(e[0]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss"),$S(e[1]).add(-1,"month").format("YYYY-MM-DD HH:mm:ss")]};break;case zO.QUARTER:n.compare={type:"num",value:[$S(e[0]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss"),$S(e[1]).add(-1,"quarter").format("YYYY-MM-DD HH:mm:ss")]};break;case zO.YEAR:n.compare={type:"num",value:[$S(e[0]).add(-1,"year").format("YYYY-MM-DD HH:mm:ss"),$S(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({},r,{alias:`${r.alias}%%环比率`}),n=$S(e[0]),a=$S(e[1]),o=n.diff(a)-1e3;t.compare={type:"ratio",value:[n.add(o,"ms").format("YYYY-MM-DD HH:mm:ss"),a.add(o,"ms").format("YYYY-MM-DD HH:mm:ss")]},i.push(t)}if(t.compare.mom_value.enable){const t=Object.assign({},r,{alias:`${r.alias}%%环比值`}),n=$S(e[0]),a=$S(e[1]),o=n.diff(a)-1e3;t.compare={type:"num",value:[n.add(o,"ms").format("YYYY-MM-DD HH:mm:ss"),a.add(o,"ms").format("YYYY-MM-DD HH:mm:ss")]},i.push(t)}})),i})({timeRange:o.filter[0].value,groupField:a,value:t.data.value});return{criteria:[o,...r],group:[],value:s,drillDown:[],rule:EO({customFields:t.customFields})}}))}function FO({shareId:e=null,setConfig:t,getTableColumnValueFunc:n}){return u(this,void 0,void 0,(function*(){let i={};const{data:r}=t;switch(t.render){case VS.TABLE:case VS.PIE:case VS.HISTOGRAM_LINE:case VS.HISTOGRAM_BAR:case VS.BAR:case VS.HISTOGRAM_MIX:i=yield NO({shareId:e,setConfig:t,getTableColumnValueFunc:n});break;case VS.GAUGE:break;case VS.INDICATOR_CARD:i=yield HO({shareId:e,setConfig:t,getTableColumnValueFunc:n});break;case VS.MAP:break;case VS.DETAIL:i=yield function({shareId:e,setConfig:t,getTableColumnValueFunc:n}){return u(this,void 0,void 0,(function*(){return{criteria:yield IO({shareId:e,criteria:t.data.criteria,getTableColumnValueFunc:n}),group:[],value:CO({value:t.data.value}),drillDown:[],rule:EO({customFields:t.customFields})}}))}({shareId:e,setConfig:t,getTableColumnValueFunc:n});break;default:throw new Error(`未知的图标渲染类型: ${r.render}`)}return i}))}var BO,jO,UO,WO,GO,VO;!function(e){e.NORMAL="normal",e.CENTRAL_CONTROL="center-control",e.DOOR_PLATE="door-plate"}(BO||(BO={})),Object.freeze({[BO.NORMAL]:Object.freeze({key:BO.NORMAL,name:"普通模式"}),[BO.CENTRAL_CONTROL]:Object.freeze({key:BO.CENTRAL_CONTROL,name:"中控大屏"}),[BO.DOOR_PLATE]:Object.freeze({key:BO.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"}(jO||(jO={})),function(e){e.SIZE400="400",e.SIZE600="600"}(UO||(UO={})),Object.freeze({[UO.SIZE400]:Object.freeze({key:UO.SIZE400,name:"正常"}),[UO.SIZE600]:Object.freeze({key:UO.SIZE600,name:"加粗"})}),function(e){e.NORMAL="normal",e.ITALIC="italic"}(WO||(WO={})),Object.freeze({[WO.NORMAL]:Object.freeze({key:WO.NORMAL,name:"正常"}),[WO.ITALIC]:Object.freeze({key:WO.ITALIC,name:"斜体"})}),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(GO||(GO={})),Object.freeze({[GO.LEFT]:Object.freeze({key:GO.LEFT,iconfont:"icon-text_left",name:"左对齐"}),[GO.CENTER]:Object.freeze({key:GO.CENTER,iconfont:"icon-text_center",name:"居中对齐"}),[GO.RIGHT]:Object.freeze({key:GO.RIGHT,iconfont:"icon-text_right",name:"右对齐"})}),function(e){e.TOP="top",e.MIDDLE="middle",e.BOTTOM="bottom"}(VO||(VO={})),Object.freeze({[VO.TOP]:Object.freeze({key:VO.TOP,iconfont:"icon-top",name:"头部对齐"}),[VO.MIDDLE]:Object.freeze({key:VO.MIDDLE,iconfont:"icon-center",name:"居中对齐"}),[VO.BOTTOM]:Object.freeze({key:VO.BOTTOM,iconfont:"icon-bottom",name:"底部对齐"})});const qO=Object.freeze(["#4499fa","#59d4d9","#4cd964","#ff9500","#ff3b30","#c894f6","#8c6fde","#767aee","#52c41a","#ff2d55","#ffcc00","#5ac8fa","#f478b8","#fae34c","#59d9a4"]),ZO="#2b9f7f";var XO;!function(e){e.PURE="pure",e.LINEAR="linear",e.RADIAL="radial"}(XO||(XO={}));const KO=Object.freeze({[XO.PURE]:Object.freeze({key:XO.PURE,name:"纯色",getDefault:(e=ZO)=>({type:XO.PURE,color:e})}),[XO.LINEAR]:Object.freeze({key:XO.LINEAR,name:"线性渐变",getDefault:(e=ZO)=>({type:XO.LINEAR,startColor:e,endColor:e})}),[XO.RADIAL]:Object.freeze({key:XO.RADIAL,name:"径向渐变",getDefault:(e=ZO)=>({type:XO.RADIAL,startColor:e,endColor:e,radius:5})})});var $O;!function(e){e.CONTINUOUS="continuous",e.PIECEWISE="piecewise"}($O||($O={}));const QO=Object.freeze({[$O.CONTINUOUS]:Object.freeze({key:$O.CONTINUOUS,name:"连续渐变",getDefault:(e=ZO)=>({type:$O.CONTINUOUS,startColor:e,endColor:e})}),[$O.PIECEWISE]:Object.freeze({key:$O.PIECEWISE,name:"区间渐变",getDefault:(e=ZO)=>({type:$O.PIECEWISE,startColor:e,endColor:e,splitNumber:5})})});var JO,eM,tM,nM,iM,rM,aM;!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"}(JO||(JO={})),Object.freeze({[JO.TOP]:Object.freeze({key:JO.TOP,name:"上方"}),[JO.BOTTOM]:Object.freeze({key:JO.BOTTOM,name:"下方"}),[JO.LEFT]:Object.freeze({key:JO.LEFT,name:"左边"}),[JO.RIGHT]:Object.freeze({key:JO.RIGHT,name:"右边"}),[JO.INSIDE_CENTER]:Object.freeze({key:JO.INSIDE_CENTER,name:"内部居中"}),[JO.INSIDE_LEFT]:Object.freeze({key:JO.INSIDE_LEFT,name:"内部左边"}),[JO.INSIDE_RIGHT]:Object.freeze({key:JO.INSIDE_RIGHT,name:"内部右边"}),[JO.INSIDE_TOP]:Object.freeze({key:JO.INSIDE_TOP,name:"内部上方"}),[JO.INSIDE_BOTTOM]:Object.freeze({key:JO.INSIDE_BOTTOM,name:"内部下方"})}),function(e){e.GROUP="group",e.SERIES="series",e.VALUE="value",e.PERCENT="percent"}(eM||(eM={})),Object.freeze({[eM.GROUP]:Object.freeze({key:eM.GROUP,name:"维度项"}),[eM.SERIES]:Object.freeze({key:eM.SERIES,name:"数值标题"}),[eM.VALUE]:Object.freeze({key:eM.VALUE,name:"值"}),[eM.PERCENT]:Object.freeze({key:eM.PERCENT,name:"百分比"})}),function(e){e.PERCENT="percent",e.INDEX="index"}(tM||(tM={})),Object.freeze({[tM.PERCENT]:Object.freeze({key:tM.PERCENT,name:"%"}),[tM.INDEX]:Object.freeze({key:tM.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"}(nM||(nM={})),Object.freeze({[nM.BT]:Object.freeze({key:nM.BT,name:"介于",getDefault:()=>({op:nM.BT,value:[null,null]})}),[nM.E]:Object.freeze({key:nM.E,name:"等于",getDefault:()=>({op:nM.E,value:null})}),[nM.NE]:Object.freeze({key:nM.NE,name:"不等于",getDefault:()=>({op:nM.NE,value:null})}),[nM.GT]:Object.freeze({key:nM.GT,name:"大于",getDefault:()=>({op:nM.GT,value:null})}),[nM.GE]:Object.freeze({key:nM.GE,name:"大于等于",getDefault:()=>({op:nM.GE,value:null})}),[nM.LT]:Object.freeze({key:nM.LT,name:"小于",getDefault:()=>({op:nM.LT,value:null})}),[nM.LE]:Object.freeze({key:nM.LE,name:"小于等于",getDefault:()=>({op:nM.LE,value:null})}),[nM.BEFORE]:Object.freeze({key:nM.BEFORE,name:"前",getDefault:()=>({op:nM.BEFORE,value:null,unit:tM.INDEX})}),[nM.AFTER]:Object.freeze({key:nM.AFTER,name:"后",getDefault:()=>({op:nM.AFTER,value:null,unit:tM.INDEX})}),[nM.INDEX]:Object.freeze({key:nM.INDEX,name:"第",getDefault:()=>({op:nM.INDEX,value:null})})}),function(e){e.SHOW="show",e.HIDDEN="hidden",e.DEFAULT="default"}(iM||(iM={})),Object.freeze({[iM.SHOW]:Object.freeze({key:iM.SHOW,name:"显示"}),[iM.HIDDEN]:Object.freeze({key:iM.HIDDEN,name:"隐藏"}),[iM.DEFAULT]:Object.freeze({key:iM.DEFAULT,name:"默认"})}),function(e){e.BAR="bar",e.LINE="line"}(rM||(rM={})),Object.freeze({[rM.BAR]:Object.freeze({key:rM.BAR,name:"柱"}),[rM.LINE]:Object.freeze({key:rM.LINE,name:"线"})}),function(e){e.ITEM_STYLE="itemStyle",e.VISUAL_MAP="visualMap"}(aM||(aM={}));const oM=Object.freeze({[aM.ITEM_STYLE]:Object.freeze({key:aM.ITEM_STYLE,name:"颜色填充",getDefaultConfig:()=>({type:aM.ITEM_STYLE,params:KO[XO.PURE].getDefault()})}),[aM.VISUAL_MAP]:Object.freeze({key:aM.VISUAL_MAP,name:"视觉映射",getDefaultConfig:()=>({type:aM.VISUAL_MAP,params:QO[$O.CONTINUOUS].getDefault()})})});function sM({seriesType:e,axisPosition:t,dataLabelPosition:n}){return{type:e,axisPosition:t,width:null,radius:0,colorFill:oM[aM.ITEM_STYLE].getDefaultConfig(),label:{show:!1,params:{position:n,fontSize:jO.SIZE12,color:{enable:!1,value:ZO},fontWeight:UO.SIZE400,showTooltip:Object.values(eM)}},conditionalFormatting:[]}}var lM,uM,cM,hM,dM;function fM({position:e}){return{name:"",position:e,unit:"",min:null,max:null,nameLocation:hM.START,nameGap:15,nameRotate:0,inverse:!1,nameTextStyle:{fontSize:jO.SIZE12,color:"#333333",fontWeight:UO.SIZE400,fontStyle:WO.NORMAL,padding:[0,0,0,0]},axisLabel:{show:!1,params:{fontSize:jO.SIZE14,color:"#333333",fontWeight:UO.SIZE400,fontStyle:WO.NORMAL,rotate:lM.NONE}},axisLine:{show:!1,params:{width:1,color:"#333333",type:uM.SOLID}},axisTick:{show:!1,params:{length:5,width:1,color:"#333333",type:uM.SOLID}},splitLine:{show:!1,params:{width:1,color:"#333333",type:uM.SOLID}}}}function pM(){return{show:!1,width:20,right:10,filterColor:ZO,borderColor:ZO}}function gM(){return{position:dM.NONE}}function mM({styleConfig:e,setConfig:t,dataLabelPosition:n,getSeriesTypeFunc:i,getAxisPositionFunc:r}){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:r}){Object.keys(e).forEach((n=>{t.data.value.find((e=>e.id===n))||delete e[n]})),t.data.value.forEach(((t,a)=>{e[t.id]||(e[t.id]=sM({seriesType:i({index:a}),axisPosition:r({index:a}),dataLabelPosition:n}))}))}({seriesCustomConfig:e.params.seriesCustom,setConfig:t,dataLabelPosition:n,getSeriesTypeFunc:i,getAxisPositionFunc:r}))}!function(e){e.NONE="0",e.Rotate30="30",e.Rotate45="45",e.Rotate60="60",e.Rotate90="90"}(lM||(lM={})),Object.freeze({[lM.NONE]:Object.freeze({key:lM.NONE,name:"默认"}),[lM.Rotate30]:Object.freeze({key:lM.Rotate30,name:"30"}),[lM.Rotate45]:Object.freeze({key:lM.Rotate45,name:"45"}),[lM.Rotate60]:Object.freeze({key:lM.Rotate60,name:"60"}),[lM.Rotate90]:Object.freeze({key:lM.Rotate90,name:"90"})}),function(e){e.SOLID="solid",e.DASHED="dashed",e.DOTTED="dotted"}(uM||(uM={})),Object.freeze({[uM.SOLID]:Object.freeze({key:uM.SOLID,name:"————"}),[uM.DASHED]:Object.freeze({key:uM.DASHED,name:"----"}),[uM.DOTTED]:Object.freeze({key:uM.DOTTED,name:"...."})}),function(e){e.LEFT="left",e.RIGHT="right",e.TOP="top",e.BOTTOM="bottom"}(cM||(cM={})),Object.freeze({[cM.LEFT]:Object.freeze({key:cM.LEFT,name:"左"}),[cM.RIGHT]:Object.freeze({key:cM.RIGHT,name:"右"}),[cM.TOP]:Object.freeze({key:cM.TOP,name:"上"}),[cM.BOTTOM]:Object.freeze({key:cM.BOTTOM,name:"下"})}),function(e){e.START="start",e.CENTER="center",e.END="end"}(hM||(hM={})),Object.freeze({[hM.START]:Object.freeze({key:hM.START,name:"起始"}),[hM.CENTER]:Object.freeze({key:hM.CENTER,name:"中间"}),[hM.END]:Object.freeze({key:hM.END,name:"结尾"})}),function(e){e.NONE="none",e.LEFT="left",e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom"}(dM||(dM={})),Object.freeze({[dM.NONE]:Object.freeze({key:dM.NONE,name:"无",iconfont:"icon-align_center"}),[dM.TOP]:Object.freeze({key:dM.TOP,name:"上",iconfont:"icon-align_top"}),[dM.BOTTOM]:Object.freeze({key:dM.BOTTOM,name:"下",iconfont:"icon-align_bottom"}),[dM.LEFT]:Object.freeze({key:dM.LEFT,name:"左",iconfont:"icon-align_left"}),[dM.RIGHT]:Object.freeze({key:dM.RIGHT,name:"右",iconfont:"icon-align_right"})});var vM,yM=Object.freeze({__proto__:null,reactStyleConfig:function({styleConfig:e,setConfig:t}){mM({styleConfig:e,setConfig:t,dataLabelPosition:JO.RIGHT,getSeriesTypeFunc:()=>rM.BAR,getAxisPositionFunc:()=>cM.TOP})},getDefaultConfigParams:function({setConfig:e}){return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:gM(),dataZoom:pM(),stack:{enable:!1,params:[]},axisY:fM({position:cM.LEFT}),topAxis:fM({position:cM.TOP}),bottomAxis:fM({position:cM.BOTTOM}),seriesCustom:(()=>{const t={};return e.data.value.forEach((e=>{t[e.id]=sM({dataLabelPosition:JO.RIGHT,seriesType:rM.BAR,axisPosition:cM.TOP})})),t})()}}}),_M=(()=>{const e={};return e[BO.NORMAL]=yM,e})();!function(e){e.SIZE10="10",e.SIZE20="20",e.SIZE30="30",e.SIZE50="50"}(vM||(vM={}));function xM({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]||bO.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 bM({hasMerged:e=!1}){const t={fixed:{left:null,right:null}};return e&&(t.merge=!1),t}function wM(){return{pageSize:vM.SIZE20,showPageSize:!1,showTotal:!1,showTotalPage:!1}}function TM(){return{bgColor:"#fafafa",fontSize:jO.SIZE12,fontWeight:UO.SIZE400,color:"#606266",textAlign:GO.LEFT}}function SM(){return{fontSize:jO.SIZE12,fontWeight:UO.SIZE400,color:"#606266",textAlign:GO.LEFT,verticalAlign:VO.MIDDLE,oddColor:"#ffffff",evenColor:"#fafbfc"}}var OM=Object.freeze({__proto__:null,getDefaultConfigParams:function(){return{dataRange:{start:null,end:null},cell:bM({}),stack:{enable:!1,params:[]},summary:{show:!1,name:"",expr:{}},pagination:wM(),showIndex:!0,header:TM(),body:SM(),border:{hasVerticalBorder:!1,hasHorizontalBorder:!0,borderColor:"#ebeef5"}}},reactStyleConfig:xM}),MM=(()=>{const e={};return e[BO.NORMAL]=OM,e})();var DM=Object.freeze({__proto__:null,reactStyleConfig:function({styleConfig:e,setConfig:t}){mM({styleConfig:e,setConfig:t,dataLabelPosition:JO.TOP,getSeriesTypeFunc:()=>rM.BAR,getAxisPositionFunc:()=>cM.LEFT})},getDefaultConfigParams:function({setConfig:e}){return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:gM(),dataZoom:pM(),stack:{enable:!1,params:[]},axisX:fM({position:cM.BOTTOM}),leftAxis:fM({position:cM.LEFT}),rightAxis:fM({position:cM.RIGHT}),seriesCustom:(()=>{const t={};return e.data.value.forEach((e=>{t[e.id]=sM({dataLabelPosition:JO.TOP,seriesType:rM.BAR,axisPosition:cM.LEFT})})),t})()}}}),AM=(()=>{const e={};return e[BO.NORMAL]=DM,e})();var kM=Object.freeze({__proto__:null,reactStyleConfig:function({styleConfig:e,setConfig:t}){mM({styleConfig:e,setConfig:t,dataLabelPosition:JO.TOP,getSeriesTypeFunc:()=>rM.BAR,getAxisPositionFunc:()=>cM.LEFT})},getDefaultConfigParams:function({setConfig:e}){return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:gM(),dataZoom:pM(),stack:{enable:!1,params:[]},axisX:fM({position:cM.BOTTOM}),leftAxis:fM({position:cM.LEFT}),rightAxis:fM({position:cM.RIGHT}),seriesCustom:(()=>{const t={};return e.data.value.forEach((e=>{t[e.id]=sM({dataLabelPosition:JO.TOP,seriesType:rM.LINE,axisPosition:cM.LEFT})})),t})()}}}),IM=(()=>{const e={};return e[BO.NORMAL]=kM,e})();var CM,EM=Object.freeze({__proto__:null,reactStyleConfig:function({styleConfig:e,setConfig:t}){mM({styleConfig:e,setConfig:t,dataLabelPosition:JO.TOP,getSeriesTypeFunc:()=>rM.BAR,getAxisPositionFunc:()=>cM.LEFT})},getDefaultConfigParams:function({setConfig:e}){return{dataRange:{start:null,end:null},grid:{top:50,bottom:30,left:70,right:50},legend:gM(),dataZoom:pM(),stack:{enable:!1,params:[]},axisX:fM({position:cM.BOTTOM}),leftAxis:fM({position:cM.LEFT}),rightAxis:fM({position:cM.RIGHT}),seriesCustom:(()=>{const t={};return e.data.value.forEach(((e,n)=>{t[e.id]=sM({dataLabelPosition:JO.TOP,seriesType:n%2==0?rM.BAR:rM.LINE,axisPosition:cM.LEFT})})),t})()}}}),NM=(()=>{const e={};return e[BO.NORMAL]=EM,e})();!function(e){e.ZERO="0",e.ONE="1",e.TWO="2",e.THREE="3",e.FOUR="4",e.FIVE="5",e.SIX="6"}(CM||(CM={}));var RM,LM=Object.freeze({__proto__:null,reactStyleConfig:function({styleConfig:e,setConfig:t}){},get PrecisionType(){return CM},getDefaultConfigParams:function(){return{background:"#ffffff",title:{fontSize:jO.SIZE12,color:"#333333"},value:{fontSize:jO.SIZE12,color:"#333333"},compareValue:{positive:{precision:CM.TWO,fontSize:jO.SIZE12,color:"#333333"},negative:{precision:CM.TWO,fontSize:jO.SIZE12,color:"#333333"}}}}}),PM=(()=>{const e={};return e[BO.NORMAL]=LM,e})();!function(e){e.PERCENT="%",e.PX="px"}(RM||(RM={}));const zM=Object.freeze({[RM.PERCENT]:Object.freeze({key:RM.PERCENT,name:"%"}),[RM.PX]:Object.freeze({key:RM.PX,name:"px"})});var YM;!function(e){e.AREA="area",e.RADIUS="radius"}(YM||(YM={}));const HM=Object.freeze({[YM.AREA]:Object.freeze({key:YM.AREA,name:"面积模式"}),[YM.RADIUS]:Object.freeze({key:YM.RADIUS,name:"半径模式"})});var FM;!function(e){e.INSIDE="inside",e.OUTSIDE="outside"}(FM||(FM={}));const BM=Object.freeze({[FM.INSIDE]:Object.freeze({key:FM.INSIDE,name:"圈内"}),[FM.OUTSIDE]:Object.freeze({key:FM.OUTSIDE,name:"圈外"})});var jM=Object.freeze({__proto__:null,reactStyleConfig:function({shareId:e,styleConfig:t,setConfig:n,getTableColumnValueFunc:i,getDataFunc:r}){return u(this,void 0,void 0,(function*(){if(t.enable){let a=[];if(i&&r){const o={config:yield FO({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 r(o);s.length<100&&(a=s)}const o={},s=n.data.group[0];a.forEach(((e,n)=>{const i=e.group[s.alias];o[i]=t.params.customGroupValues[i]||KO[XO.PURE].getDefault(qO[n%qO.length])})),t.params.customGroupValues=o}}))},get ChartCenterUnitType(){return RM},ChartCenterUnitTypeMesage:zM,get RoseType(){return YM},RoseTypeMesage:HM,get LabelPosition(){return FM},LabelPositionMesage:BM,getDefaultConfigParams:function({shareId:e,setConfig:t,getTableColumnValueFunc:n,getDataFunc:i}){return u(this,void 0,void 0,(function*(){let r=[];if(n&&i){const a={config:yield FO({shareId:e,setConfig:t,getTableColumnValueFunc:n})};if(t.style[VS.PIE][BO.NORMAL].enable){const e=t.style[VS.PIE][BO.NORMAL].params,n=e.dataRange.start||1;a.data_start=n,null!==e.dataRange.end&&(a.data_count=e.dataRange.end-a.data_start)}const[{data:o}]=yield i(a);r=o}return{dataRange:{start:null,end:null},legend:gM(),chart:{center:{x:{value:50,unit:RM.PERCENT},y:{value:50,unit:RM.PERCENT}},radius:{inner:0,outer:80},startAngle:90,clockwise:!0,minShowLabelAngle:null},customGroupValues:(()=>{const e={},n=t.data.group[0];return r.forEach(((t,i)=>{const r=t.group[n.alias];e[r]=KO[XO.PURE].getDefault(qO[i%qO.length])})),e})(),roseType:{enable:!1,type:YM.AREA},label:{show:!1,params:{position:FM.INSIDE,fontSize:jO.SIZE12,fontWeight:UO.SIZE400,color:{enable:!1,value:"#ffffff"},showTooltip:Object.values(eM)}},labelLine:{show:!1,params:{color:{enable:!1,value:"#ffffff"},length:4,length2:8}}}}))}}),UM=(()=>{const e={};return e[BO.NORMAL]=jM,e})();var WM=Object.freeze({__proto__:null,getDefaultConfigParams:function(){return{dataRange:{start:null,end:null},cell:bM({hasMerged:!0}),stack:{enable:!1,params:[]},summary:{show:!1,name:"",expr:{}},pagination:wM(),showIndex:!0,header:TM(),body:SM(),border:{hasVerticalBorder:!1,hasHorizontalBorder:!0,borderColor:"#ebeef5"}}},reactStyleConfig:xM}),GM=(()=>{const e={};return e[BO.NORMAL]=WM,e})(),VM=(()=>{const e={};return e[VS.BAR]=_M,e[VS.DETAIL]=MM,e[VS.HISTOGRAM_BAR]=AM,e[VS.HISTOGRAM_LINE]=IM,e[VS.HISTOGRAM_MIX]=NM,e[VS.INDICATOR_CARD]=PM,e[VS.PIE]=UM,e[VS.TABLE]=GM,e})();let qM=class extends s.Component{constructor(e){super(e),this.chartRef=s.createRef(),this.padding="7vh 2vh 2vh",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 KS.get(`${e}/set/${t}`,{headers:{"X-Gini-Token":n}}),r=JSON.parse(i.config),a=this.props.gpui.params["@theme"];let o;o=r.style.table[a].enable?r.style[r.render][a].params:yield function({api:e,chartType:t,themeMode:n,setConfig:i}){return u(this,void 0,void 0,(function*(){if(VM[t]&&VM[t][n])return yield VM[t][n].getDefaultConfigParams({setConfig:i,api:e});throw new Error(`style.ts(getDefaultConfigParams): 请检查图表类型和主题风格: ${t}, ${n}`)}))}({chartType:r.render,themeMode:a,setConfig:r,api:null});const s=yield FO({shareId:i.shareId,setConfig:r,getTableColumnValueFunc:()=>{}}),{data:l}=yield KS.post(`${e}/sql`,{config:s,set_id:t,data_start:o.dataRange.start,data_count:o.dataRange.end},{headers:{"X-Gini-Token":n}});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.generateChartOption=e=>{const t={};e.forEach((e=>{const n=e.group["仪器名称"],i=e.group["时间"];t[n]=t[n]||{},t[n][i]=Math.round(100*e.data["使用时长"]/3600)/100}));let n=[],i=$S();for(let e=0;e<12;e++)n.push(i.format("yyyy-MM")),i.add(-1,"month");n=n.reverse();const r={color:["#00A1FF","#0BE89C","#F1BE58","#EE8367","#B658F1","#66E8B5","#7A75E0","#51D0E2"],tooltip:{show:!0,formatter:({seriesName:e,name:t,data:n})=>`${e}<br/>${t}: ${n}`},legend:{type:"scroll",data:Object.keys(t),bottom:0,icon:"roundRect",textStyle:{color:"#CDE0FC"},pageIconColor:"#CDE0FC",pageTextStyle:{color:"#CDE0FC"}},xAxis:[{type:"category",data:n,axisLine:{show:!0,lineStyle:{color:"#2B3873"}},axisTick:{show:!1},axisLabel:{show:!0,color:"#CDE0FC"}}],yAxis:[{type:"value",axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!0,lineStyle:{color:"#2B3873",type:"dotted"}},axisLabel:{show:!0,color:"#CDE0FC"}}],series:Object.entries(t).map((([e,t],i)=>({name:e,type:"line",smooth:!0,data:n.map((e=>t[e]))})))};return r},n.reaction((()=>e.gpui.params.padding),(e=>{this.padding=e||"7vh 2vh 2vh"}),{fireImmediately:!0})}componentDidMount(){this.chart=this.chart||Ix.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})))}};return l([n.observable],qM.prototype,"padding",void 0),qM=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'"),X&&e.$$typeof===X)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(Z&&e.$$typeof===Z){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(O,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):T(e)}],qM),qM}));
