From 83fe64b2b4e1d085536f28ca012a42319c9ee61e Mon Sep 17 00:00:00 2001 From: lang Date: Tue, 1 Nov 2016 13:03:38 +0800 Subject: [PATCH] Dump 3.2.0 --- build/zrender.js | 243 ++++++++++++++++++++++++++++++++++--------- build/zrender.min.js | 8 +- package.json | 2 +- src/zrender.js | 2 +- 4 files changed, 197 insertions(+), 58 deletions(-) diff --git a/build/zrender.js b/build/zrender.js index f8d87bc78..308044906 100644 --- a/build/zrender.js +++ b/build/zrender.js @@ -92,13 +92,12 @@ define('zrender/core/env',[],function () { if (firefox) browser.firefox = true, browser.version = firefox[1]; // if (safari && (ua.match(/Safari/) || !!os.ios)) browser.safari = true; // if (webview) browser.webview = true; - if (ie) { - browser.ie = true; browser.version = ie[1]; - } + if (ie) { browser.ie = true; browser.version = ie[1]; } + if (edge) { browser.edge = true; browser.version = edge[1]; @@ -1040,24 +1039,28 @@ define('zrender/Handler',['require','./core/util','./mixin/Draggable','./mixin/E var handlerNames = [ 'click', 'dblclick', 'mousewheel', 'mouseout', - 'mouseup', 'mousedown', 'mousemove' + 'mouseup', 'mousedown', 'mousemove', 'contextmenu' ]; /** * @alias module:zrender/Handler * @constructor * @extends module:zrender/mixin/Eventful - * @param {HTMLElement} root Main HTML element for painting. * @param {module:zrender/Storage} storage Storage instance. * @param {module:zrender/Painter} painter Painter instance. + * @param {module:zrender/dom/HandlerProxy} proxy HandlerProxy instance. + * @param {HTMLElement} painterRoot painter.root (not painter.getViewportRoot()). */ - var Handler = function(storage, painter, proxy) { + var Handler = function(storage, painter, proxy, painterRoot) { Eventful.call(this); this.storage = storage; this.painter = painter; + this.painterRoot = painterRoot; + proxy = proxy || new EmptyProxy(); + /** * Proxy of event. can be Dom, WebGLSurface, etc. */ @@ -1131,9 +1134,21 @@ define('zrender/Handler',['require','./core/util','./mixin/Draggable','./mixin/E mouseout: function (event) { this.dispatchToElement(this._hovered, 'mouseout', event); - this.trigger('globalout', { - event: event - }); + // There might be some doms created by upper layer application + // at the same level of painter.getViewportRoot() (e.g., tooltip + // dom created by echarts), where 'globalout' event should not + // be triggered when mouse enters these doms. (But 'mouseout' + // should be triggered at the original hovered element as usual). + var element = event.toElement || event.relatedTarget; + var innerDom; + do { + element = element && element.parentNode; + } + while (element && element.nodeType != 9 && !( + innerDom = element === this.painterRoot + )); + + !innerDom && this.trigger('globalout', {event: event}); }, /** @@ -1239,7 +1254,7 @@ define('zrender/Handler',['require','./core/util','./mixin/Draggable','./mixin/E }; // Common handlers - util.each(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick'], function (name) { + util.each(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick', 'contextmenu'], function (name) { Handler.prototype[name] = function (event) { // Find hover again to avoid click event is dispatched manually. Or click is triggered without mouseover var hovered = this.findHover(event.zrX, event.zrY, null); @@ -3380,6 +3395,10 @@ define('zrender/animation/Animator',['require','./Clip','../tool/color','../core when: function(time /* ms */, props) { var tracks = this._tracks; for (var propName in props) { + if (!props.hasOwnProperty(propName)) { + continue; + } + if (!tracks[propName]) { tracks[propName] = []; // Invalid value @@ -3448,6 +3467,9 @@ define('zrender/animation/Animator',['require','./Clip','../tool/color','../core var lastClip; for (var propName in this._tracks) { + if (!this._tracks.hasOwnProperty(propName)) { + continue; + } var clip = createTrackClip( this, easing, oneTrackDone, this._tracks[propName], propName @@ -3585,7 +3607,7 @@ define( return function(mes) { document.getElementById('wrong-message').innerHTML = mes + ' ' + (new Date() - 0) - + '
' + + '
' + document.getElementById('wrong-message').innerHTML; }; */ @@ -3816,6 +3838,10 @@ define('zrender/mixin/Animatable',['require','../animation/Animator','../core/ut var objShallow = {}; var propertyCount = 0; for (var name in target) { + if (!target.hasOwnProperty(name)) { + continue; + } + if (source[name] != null) { if (isObject(target[name]) && !util.isArrayLike(target[name])) { this._animateToShallow( @@ -4138,6 +4164,16 @@ define('zrender/core/BoundingRect',['require','./vector','./matrix'],function(re * @alias module:echarts/core/BoundingRect */ function BoundingRect(x, y, width, height) { + + if (width < 0) { + x = x + width; + width = -width; + } + if (height < 0) { + y = y + height; + height = -height; + } + /** * @type {number} */ @@ -4233,6 +4269,11 @@ define('zrender/core/BoundingRect',['require','./vector','./matrix'],function(re * @return {boolean} */ intersect: function (b) { + if (!(b instanceof BoundingRect)) { + // Normalize negative width/height. + b = BoundingRect.create(b); + } + var a = this; var ax0 = a.x; var ax1 = a.x + a.width; @@ -4270,9 +4311,30 @@ define('zrender/core/BoundingRect',['require','./vector','./matrix'],function(re this.y = other.y; this.width = other.width; this.height = other.height; + }, + + plain: function () { + return { + x: this.x, + y: this.y, + width: this.width, + height: this.height + }; } }; + /** + * @param {Object|module:zrender/core/BoundingRect} rect + * @param {number} rect.x + * @param {number} rect.y + * @param {number} rect.width + * @param {number} rect.height + * @return {module:zrender/core/BoundingRect} + */ + BoundingRect.create = function (rect) { + return new BoundingRect(rect.x, rect.y, rect.width, rect.height); + }; + return BoundingRect; }); /** @@ -4312,7 +4374,9 @@ define('zrender/container/Group',['require','../core/util','../Element','../core Element.call(this, opts); for (var key in opts) { - this[key] = opts[key]; + if (opts.hasOwnProperty(key)) { + this[key] = opts[key]; + } } this._children = []; @@ -5535,11 +5599,12 @@ define('zrender/Storage',['require','./core/util','./core/env','./container/Grou * @module zrender/core/event * @author Kener (@Kener-林峰, kener.linfeng@gmail.com) */ -define('zrender/core/event',['require','../mixin/Eventful'],function(require) { +define('zrender/core/event',['require','../mixin/Eventful','./env'],function(require) { var Eventful = require('../mixin/Eventful'); + var env = require('./env'); var isDomLevel2 = (typeof window !== 'undefined') && !!window.addEventListener; @@ -5549,12 +5614,51 @@ define('zrender/core/event',['require','../mixin/Eventful'],function(require) { } function clientToLocal(el, e, out) { - // clientX/clientY is according to view port. + // According to the W3C Working Draft, offsetX and offsetY should be relative + // to the padding edge of the target element. The only browser using this convention + // is IE. Webkit uses the border edge, Opera uses the content edge, and FireFox does + // not support the properties. + // (see http://www.jacklmoore.com/notes/mouse-position/) + // In zr painter.dom, padding edge equals to border edge. + + // FIXME + // When mousemove event triggered on ec tooltip, target is not zr painter.dom, and + // offsetX/Y is relative to e.target, where the calculation of zrX/Y via offsetX/Y + // is too complex. So css-transfrom dont support in this case temporarily. + + if (!e.currentTarget || el !== e.currentTarget) { + defaultGetZrXY(el, e, out); + } + // Caution: In FireFox, layerX/layerY Mouse position relative to the closest positioned + // ancestor element, so we should make sure el is positioned (e.g., not position:static). + // BTW1, Webkit don't return the same results as FF in non-simple cases (like add + // zoom-factor, overflow / opacity layers, transforms ...) + // BTW2, (ev.offsetY || ev.pageY - $(ev.target).offset().top) is not correct in preserve-3d. + // + // BTW3, In ff, offsetX/offsetY is always 0. + else if (env.browser.firefox && e.layerX != null && e.layerX !== e.offsetX) { + out.zrX = e.layerX; + out.zrY = e.layerY; + } + // For IE6+, chrome, safari, opera. (When will ff support offsetX?) + else if (e.offsetX != null) { + out.zrX = e.offsetX; + out.zrY = e.offsetY; + } + // For some other device, e.g., IOS safari. + else { + defaultGetZrXY(el, e, out); + } + + return out; + } + + function defaultGetZrXY(el, e, out) { + // This well-known method below does not support css transform. var box = getBoundingClientRect(el); out = out || {}; out.zrX = e.clientX - box.left; out.zrY = e.clientY - box.top; - return out; } /** @@ -6035,7 +6139,7 @@ define('zrender/dom/HandlerProxy',['require','../core/event','../core/util','../ var mouseHandlerNames = [ 'click', 'dblclick', 'mousewheel', 'mouseout', - 'mouseup', 'mousedown', 'mousemove' + 'mouseup', 'mousedown', 'mousemove', 'contextmenu' ]; var touchHandlerNames = [ @@ -6190,7 +6294,7 @@ define('zrender/dom/HandlerProxy',['require','../core/event','../core/util','../ }; // Common handlers - zrUtil.each(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick'], function (name) { + zrUtil.each(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick', 'contextmenu'], function (name) { domHandlers[name] = function (event) { event = normalizeEvent(this.dom, event); this.trigger(name, event); @@ -6691,6 +6795,9 @@ define('zrender/Layer',['require','./core/util','./config','./graphic/Style','./ domStyle['user-select'] = 'none'; domStyle['-webkit-touch-callout'] = 'none'; domStyle['-webkit-tap-highlight-color'] = 'rgba(0,0,0,0)'; + domStyle['padding'] = 0; + domStyle['margin'] = 0; + domStyle['border-width'] = 0; } this.domBack = null; @@ -7961,13 +8068,18 @@ define('zrender/graphic/Image',['require','./Displayable','../core/BoundingRect' function createRoot(width, height) { var domRoot = document.createElement('div'); - var domRootStyle = domRoot.style; // domRoot.onselectstart = returnFalse; // 避免页面选中的尴尬 - domRootStyle.position = 'relative'; - domRootStyle.overflow = 'hidden'; - domRootStyle.width = width + 'px'; - domRootStyle.height = height + 'px'; + domRoot.style.cssText = [ + 'position:relative', + 'overflow:hidden', + 'width:' + width + 'px', + 'height:' + height + 'px', + 'padding:0', + 'margin:0', + 'border-width:0' + ].join(';') + ';'; + return domRoot; } @@ -7983,7 +8095,7 @@ define('zrender/graphic/Image',['require','./Displayable','../core/BoundingRect' var singleCanvas = !root.nodeName // In node ? || root.nodeName.toUpperCase() === 'CANVAS'; - opts = opts || {}; + this._opts = opts = util.extend({}, opts || {}); /** * @type {number} @@ -8035,8 +8147,8 @@ define('zrender/graphic/Image',['require','./Displayable','../core/BoundingRect' this._layerConfig = {}; if (!singleCanvas) { - this._width = this._getWidth(); - this._height = this._getHeight(); + this._width = this._getSize(0); + this._height = this._getSize(1); var domRoot = this._domRoot = createRoot( this._width, this._height @@ -8741,8 +8853,13 @@ define('zrender/graphic/Image',['require','./Displayable','../core/BoundingRect' // FIXME Why ? domRoot.style.display = 'none'; - width = width || this._getWidth(); - height = height || this._getHeight(); + // Save input w/h + var opts = this._opts; + width != null && (opts.width = width); + height != null && (opts.height = height); + + width = this._getSize(0); + height = this._getSize(1); domRoot.style.display = ''; @@ -8752,8 +8869,13 @@ define('zrender/graphic/Image',['require','./Displayable','../core/BoundingRect' domRoot.style.height = height + 'px'; for (var id in this._layers) { - this._layers[id].resize(width, height); + if (this._layers.hasOwnProperty(id)) { + this._layers[id].resize(width, height); + } } + util.each(this._progressiveLayers, function (layer) { + layer.resize(width, height); + }); this.refresh(true); } @@ -8829,23 +8951,25 @@ define('zrender/graphic/Image',['require','./Displayable','../core/BoundingRect' return this._height; }, - _getWidth: function () { - var root = this.root; - var stl = document.defaultView.getComputedStyle(root); + _getSize: function (whIdx) { + var opts = this._opts; + var wh = ['width', 'height'][whIdx]; + var cwh = ['clientWidth', 'clientHeight'][whIdx]; + var plt = ['paddingLeft', 'paddingTop'][whIdx]; + var prb = ['paddingRight', 'paddingBottom'][whIdx]; - // FIXME Better way to get the width and height when element has not been append to the document - return ((root.clientWidth || parseInt10(stl.width) || parseInt10(root.style.width)) - - (parseInt10(stl.paddingLeft) || 0) - - (parseInt10(stl.paddingRight) || 0)) | 0; - }, + if (opts[wh] != null && opts[wh] !== 'auto') { + return parseFloat(opts[wh]); + } - _getHeight: function () { var root = this.root; var stl = document.defaultView.getComputedStyle(root); - return ((root.clientHeight || parseInt10(stl.height) || parseInt10(root.style.height)) - - (parseInt10(stl.paddingTop) || 0) - - (parseInt10(stl.paddingBottom) || 0)) | 0; + return ( + (root[cwh] || parseInt10(stl[wh]) || parseInt10(root.style[wh])) + - (parseInt10(stl[plt]) || 0) + - (parseInt10(stl[prb]) || 0) + ) | 0; }, _pathToImage: function (id, path, width, height, dpr) { @@ -8936,10 +9060,11 @@ define('zrender/zrender',['require','./core/guid','./core/env','./Handler','./St var instances = {}; // ZRender实例map索引 var zrender = {}; + /** * @type {string} */ - zrender.version = '3.1.3'; + zrender.version = '3.2.0'; /** * Initializing a zrender instance @@ -8947,6 +9072,8 @@ define('zrender/zrender',['require','./core/guid','./core/env','./Handler','./St * @param {Object} opts * @param {string} [opts.renderer='canvas'] 'canvas' or 'svg' * @param {number} [opts.devicePixelRatio] + * @param {number|string} [opts.width] Can be 'auto' (the same as null/undefined) + * @param {number|string} [opts.height] Can be 'auto' (the same as null/undefined) * @return {module:zrender/ZRender} */ zrender.init = function(dom, opts) { @@ -8965,7 +9092,9 @@ define('zrender/zrender',['require','./core/guid','./core/env','./Handler','./St } else { for (var key in instances) { - instances[key].dispose(); + if (instances.hasOwnProperty(key)) { + instances[key].dispose(); + } } instances = {}; } @@ -9001,6 +9130,8 @@ define('zrender/zrender',['require','./core/guid','./core/env','./Handler','./St * @param {Object} opts * @param {string} [opts.renderer='canvas'] 'canvas' or 'svg' * @param {number} [opts.devicePixelRatio] + * @param {number} [opts.width] Can be 'auto' (the same as null/undefined) + * @param {number} [opts.height] Can be 'auto' (the same as null/undefined) */ var ZRender = function(id, dom, opts) { @@ -9035,7 +9166,7 @@ define('zrender/zrender',['require','./core/guid','./core/env','./Handler','./St this.painter = painter; var handerProxy = !env.node ? new HandlerProxy(painter.getViewportRoot()) : null; - this.handler = new Handler(storage, painter, handerProxy); + this.handler = new Handler(storage, painter, handerProxy, painter.root); /** * @type {module:zrender/animation/Animation} @@ -9195,9 +9326,13 @@ define('zrender/zrender',['require','./core/guid','./core/env','./Handler','./St /** * Resize the canvas. * Should be invoked when container size is changed + * @param {Object} [opts] + * @param {number|string} [opts.width] Can be 'auto' (the same as null/undefined) + * @param {number|string} [opts.height] Can be 'auto' (the same as null/undefined) */ - resize: function() { - this.painter.resize(); + resize: function(opts) { + opts = opts || {}; + this.painter.resize(opts.width, opts.height); this.handler.resize(); }, @@ -11891,7 +12026,9 @@ define('zrender/graphic/Path',['require','./Displayable','../core/util','../core if (shape) { if (zrUtil.isObject(key)) { for (var name in key) { - shape[name] = key[name]; + if (key.hasOwnProperty(name)) { + shape[name] = key[name]; + } } } else { @@ -12228,7 +12365,7 @@ define('zrender/graphic/shape/Ring',['require','../Path'],function (require) { }); /** - * 水滴形状 + * 椭圆形状 * @module zrender/graphic/shape/Ellipse */ @@ -14303,11 +14440,11 @@ define('zrender/vml/Painter',['require','../core/log','./core'],function (requir } }, - resize: function () { - var width = this._getWidth(); - var height = this._getHeight(); + resize: function (width, height) { + var width = width == null ? this._getWidth() : width; + var height = height == null ? this._getHeight() : height; - if (this._width != width && this._height != height) { + if (this._width != width || this._height != height) { this._width = width; this._height = height; @@ -14334,7 +14471,9 @@ define('zrender/vml/Painter',['require','../core/log','./core'],function (requir }, clear: function () { - this.root.removeChild(this.vmlViewport); + if (this._vmlViewport) { + this.root.removeChild(this._vmlViewport); + } }, _getWidth: function () { diff --git a/build/zrender.min.js b/build/zrender.min.js index 1aed5bd7e..48bddbd69 100644 --- a/build/zrender.min.js +++ b/build/zrender.min.js @@ -1,4 +1,4 @@ -define("zrender/core/guid",[],function(){var t=2311;return function(){return t++}}),define("zrender/core/env",[],function(){function t(t){var e={},r={},i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge\/([\d.]+)/);return i&&(r.firefox=!0,r.version=i[1]),n&&(r.ie=!0,r.version=n[1]),n&&(r.ie=!0,r.version=n[1]),a&&(r.edge=!0,r.version=a[1]),{browser:r,os:e,node:!1,canvasSupported:document.createElement("canvas").getContext?!0:!1,touchEventsSupported:"ontouchstart"in window&&!r.ie&&!r.edge,pointerEventsSupported:"onpointerdown"in window&&(r.edge||r.ie&&r.version>=10)}}var e={};return e="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0}:t(navigator.userAgent)}),define("zrender/core/util",["require"],function(t){function e(t){if("object"==typeof t&&null!==t){var r=t;if(t instanceof Array){r=[];for(var i=0,n=t.length;n>i;i++)r[i]=e(t[i])}else if(!T(t)&&!P(t)){r={};for(var a in t)t.hasOwnProperty(a)&&(r[a]=e(t[a]))}return r}return t}function r(t,i,n){if(!w(i)||!w(t))return n?e(i):t;for(var a in i)if(i.hasOwnProperty(a)){var o=t[a],s=i[a];!w(s)||!w(o)||y(s)||y(o)||P(s)||P(o)||T(s)||T(o)?!n&&a in t||(t[a]=e(i[a],!0)):r(o,s,n)}return t}function i(t,e){for(var i=t[0],n=1,a=t.length;a>n;n++)i=r(i,t[n],e);return i}function n(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function a(t,e,r){for(var i in e)e.hasOwnProperty(i)&&(r?null!=e[i]:null==t[i])&&(t[i]=e[i]);return t}function o(){return document.createElement("canvas")}function s(){return C||(C=D.createCanvas().getContext("2d")),C}function h(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,i=t.length;i>r;r++)if(t[r]===e)return r}return-1}function l(t,e){function r(){}var i=t.prototype;r.prototype=e.prototype,t.prototype=new r;for(var n in i)t.prototype[n]=i[n];t.prototype.constructor=t,t.superClass=e}function c(t,e,r){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,a(t,e,r)}function u(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,r){if(t&&e)if(t.forEach&&t.forEach===A)t.forEach(e,r);else if(t.length===+t.length)for(var i=0,n=t.length;n>i;i++)e.call(r,t[i],i,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(r,t[a],a,t)}function d(t,e,r){if(t&&e){if(t.map&&t.map===B)return t.map(e,r);for(var i=[],n=0,a=t.length;a>n;n++)i.push(e.call(r,t[n],n,t));return i}}function v(t,e,r,i){if(t&&e){if(t.reduce&&t.reduce===I)return t.reduce(e,r,i);for(var n=0,a=t.length;a>n;n++)r=e.call(i,r,t[n],n,t);return r}}function p(t,e,r){if(t&&e){if(t.filter&&t.filter===q)return t.filter(e,r);for(var i=[],n=0,a=t.length;a>n;n++)e.call(r,t[n],n,t)&&i.push(t[n]);return i}}function g(t,e,r){if(t&&e)for(var i=0,n=t.length;n>i;i++)if(e.call(r,t[i],i,t))return t[i]}function m(t,e){var r=E.call(arguments,2);return function(){return t.apply(e,r.concat(E.call(arguments)))}}function _(t){var e=E.call(arguments,1);return function(){return t.apply(this,e.concat(E.call(arguments)))}}function y(t){return"[object Array]"===L.call(t)}function x(t){return"function"==typeof t}function b(t){return"[object String]"===L.call(t)}function w(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function T(t){return!!S[L.call(t)]}function P(t){return t&&1===t.nodeType&&"string"==typeof t.nodeName}function k(t){for(var e=0,r=arguments.length;r>e;e++)if(null!=arguments[e])return arguments[e]}function M(){return Function.call.apply(E,arguments)}function z(t,e){if(!t)throw new Error(e)}var C,S={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1},L=Object.prototype.toString,R=Array.prototype,A=R.forEach,q=R.filter,E=R.slice,B=R.map,I=R.reduce,D={inherits:l,mixin:c,clone:e,merge:r,mergeAll:i,extend:n,defaults:a,getContext:s,createCanvas:o,indexOf:h,slice:M,find:g,isArrayLike:u,each:f,map:d,reduce:v,filter:p,bind:m,curry:_,isArray:y,isString:b,isObject:w,isFunction:x,isBuildInObject:T,isDom:P,retrieve:k,assert:z,noop:function(){}};return D}),define("zrender/mixin/Draggable",["require"],function(t){function e(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}return e.prototype={constructor:e,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(e,"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var r=t.offsetX,i=t.offsetY,n=r-this._x,a=i-this._y;this._x=r,this._y=i,e.drift(n,a,t),this.dispatchToElement(e,"drag",t.event);var o=this.findHover(r,i,e),s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(s,"dragleave",t.event),o&&o!==s&&this.dispatchToElement(o,"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(e,"dragend",t.event),this._dropTarget&&this.dispatchToElement(this._dropTarget,"drop",t.event),this._draggingTarget=null,this._dropTarget=null}},e}),define("zrender/mixin/Eventful",["require"],function(t){var e=Array.prototype.slice,r=function(){this._$handlers={}};return r.prototype={constructor:r,one:function(t,e,r){var i=this._$handlers;if(!e||!t)return this;i[t]||(i[t]=[]);for(var n=0;nn;n++)r[t][n].h!=e&&i.push(r[t][n]);r[t]=i}r[t]&&0===r[t].length&&delete r[t]}else delete r[t];return this},trigger:function(t){if(this._$handlers[t]){var r=arguments,i=r.length;i>3&&(r=e.call(r,1));for(var n=this._$handlers[t],a=n.length,o=0;a>o;){switch(i){case 1:n[o].h.call(n[o].ctx);break;case 2:n[o].h.call(n[o].ctx,r[1]);break;case 3:n[o].h.call(n[o].ctx,r[1],r[2]);break;default:n[o].h.apply(n[o].ctx,r)}n[o].one?(n.splice(o,1),a--):o++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var r=arguments,i=r.length;i>4&&(r=e.call(r,1,r.length-1));for(var n=r[r.length-1],a=this._$handlers[t],o=a.length,s=0;o>s;){switch(i){case 1:a[s].h.call(n);break;case 2:a[s].h.call(n,r[1]);break;case 3:a[s].h.call(n,r[1],r[2]);break;default:a[s].h.apply(n,r)}a[s].one?(a.splice(s,1),o--):s++}}return this}},r}),define("zrender/Handler",["require","./core/util","./mixin/Draggable","./mixin/Eventful"],function(t){function e(t,e,r){return{type:t,event:r,target:e,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta}}function r(){}function i(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var i=t;i;){if(i.silent||i.clipPath&&!i.clipPath.contain(e,r))return!1;i=i.parent}return!0}return!1}var n=t("./core/util"),a=t("./mixin/Draggable"),o=t("./mixin/Eventful");r.prototype.dispose=function(){};var s=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove"],h=function(t,e,i){o.call(this),this.storage=t,this.painter=e,i=i||new r,this.proxy=i,i.handler=this,this._hovered,this._lastTouchMoment,this._lastX,this._lastY,a.call(this),n.each(s,function(t){i.on&&i.on(t,this[t],this)},this)};return h.prototype={constructor:h,mousemove:function(t){var e=t.zrX,r=t.zrY,i=this.findHover(e,r,null),n=this._hovered,a=this.proxy;this._hovered=i,a.setCursor&&a.setCursor(i?i.cursor:"default"),n&&i!==n&&n.__zr&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(i,"mousemove",t),i&&i!==n&&this.dispatchToElement(i,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t),this.trigger("globalout",{event:t})},resize:function(t){this._hovered=null},dispatch:function(t,e){var r=this[t];r&&r.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,r,i){for(var n="on"+r,a=e(r,t,i),o=t;o&&(o[n]&&(a.cancelBubble=o[n].call(o,a)),o.trigger(r,a),o=o.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(r,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[n]&&t[n].call(t,a),t.trigger&&t.trigger(r,a)}))},findHover:function(t,e,r){for(var n=this.storage.getDisplayList(),a=n.length-1;a>=0;a--)if(!n[a].silent&&n[a]!==r&&!n[a].ignore&&i(n[a],t,e))return n[a]}},n.each(["click","mousedown","mouseup","mousewheel","dblclick"],function(t){h.prototype[t]=function(e){var r=this.findHover(e.zrX,e.zrY,null);if("mousedown"===t)this._downel=r,this._upel=r;else if("mosueup"===t)this._upel=r;else if("click"===t&&this._downel!==this._upel)return;this.dispatchToElement(r,t,e)}}),n.mixin(h,o),n.mixin(h,a),h}),define("zrender/core/matrix",[],function(){var t="undefined"==typeof Float32Array?Array:Float32Array,e={create:function(){var r=new t(6);return e.identity(r),r},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},mul:function(t,e,r){var i=e[0]*r[0]+e[2]*r[1],n=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],h=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=i,t[1]=n,t[2]=a,t[3]=o,t[4]=s,t[5]=h,t},translate:function(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t},rotate:function(t,e,r){var i=e[0],n=e[2],a=e[4],o=e[1],s=e[3],h=e[5],l=Math.sin(r),c=Math.cos(r);return t[0]=i*c+o*l,t[1]=-i*l+o*c,t[2]=n*c+s*l,t[3]=-n*l+c*s,t[4]=c*a+l*h,t[5]=c*h-l*a,t},scale:function(t,e,r){var i=r[0],n=r[1];return t[0]=e[0]*i,t[1]=e[1]*n,t[2]=e[2]*i,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*n,t},invert:function(t,e){var r=e[0],i=e[2],n=e[4],a=e[1],o=e[3],s=e[5],h=r*o-a*i;return h?(h=1/h,t[0]=o*h,t[1]=-a*h,t[2]=-i*h,t[3]=r*h,t[4]=(i*s-o*n)*h,t[5]=(a*n-r*s)*h,t):null}};return e}),define("zrender/core/vector",[],function(){var t="undefined"==typeof Float32Array?Array:Float32Array,e={create:function(e,r){var i=new t(2);return null==e&&(e=0),null==r&&(r=0),i[0]=e,i[1]=r,i},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:function(e){var r=new t(2);return r[0]=e[0],r[1]=e[1],r},set:function(t,e,r){return t[0]=e,t[1]=r,t},add:function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t},scaleAndAdd:function(t,e,r,i){return t[0]=e[0]+r[0]*i,t[1]=e[1]+r[1]*i,t},sub:function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t},len:function(t){return Math.sqrt(this.lenSquare(t))},lenSquare:function(t){return t[0]*t[0]+t[1]*t[1]},mul:function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t},div:function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t},normalize:function(t,r){var i=e.len(r);return 0===i?(t[0]=0,t[1]=0):(t[0]=r[0]/i,t[1]=r[1]/i),t},distance:function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))},distanceSquare:function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])},negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:function(t,e,r,i){return t[0]=e[0]+i*(r[0]-e[0]),t[1]=e[1]+i*(r[1]-e[1]),t},applyTransform:function(t,e,r){var i=e[0],n=e[1];return t[0]=r[0]*i+r[2]*n+r[4],t[1]=r[1]*i+r[3]*n+r[5],t},min:function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t},max:function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}};return e.length=e.len,e.lengthSquare=e.lenSquare,e.dist=e.distance,e.distSquare=e.distanceSquare,e}),define("zrender/mixin/Transformable",["require","../core/matrix","../core/vector"],function(t){function e(t){return t>a||-a>t}var r=t("../core/matrix"),i=t("../core/vector"),n=r.identity,a=5e-5,o=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},s=o.prototype;s.transform=null,s.needLocalTransform=function(){return e(this.rotation)||e(this.position[0])||e(this.position[1])||e(this.scale[0]-1)||e(this.scale[1]-1)},s.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),a=this.transform;return i||e?(a=a||r.create(),i?this.getLocalTransform(a):n(a),e&&(i?r.mul(a,t.transform,a):r.copy(a,t.transform)),this.transform=a,this.invTransform=this.invTransform||r.create(),void r.invert(this.invTransform,a)):void(a&&n(a))},s.getLocalTransform=function(t){t=t||[],n(t);var e=this.origin,i=this.scale,a=this.rotation,o=this.position;return e&&(t[4]-=e[0],t[5]-=e[1]),r.scale(t,t,i),a&&r.rotate(t,t,a),e&&(t[4]+=e[0],t[5]+=e[1]),t[4]+=o[0],t[5]+=o[1],t},s.setTransform=function(t){var e=this.transform,r=t.dpr||1;e?t.setTransform(r*e[0],r*e[1],r*e[2],r*e[3],r*e[4],r*e[5]):t.setTransform(r,0,0,r,0,0)},s.restoreTransform=function(t){var e=(this.transform,t.dpr||1);t.setTransform(e,0,0,e,0,0)};var h=[];return s.decomposeTransform=function(){if(this.transform){var t=this.parent,i=this.transform;t&&t.transform&&(r.mul(h,t.invTransform,i),i=h);var n=i[0]*i[0]+i[1]*i[1],a=i[2]*i[2]+i[3]*i[3],o=this.position,s=this.scale;e(n-1)&&(n=Math.sqrt(n)),e(a-1)&&(a=Math.sqrt(a)),i[0]<0&&(n=-n),i[3]<0&&(a=-a),o[0]=i[4],o[1]=i[5],s[0]=n,s[1]=a,this.rotation=Math.atan2(-i[1]/a,i[0]/n)}},s.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),r=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(r=-r),[e,r]},s.transformCoordToLocal=function(t,e){var r=[t,e],n=this.invTransform;return n&&i.applyTransform(r,r,n),r},s.transformCoordToGlobal=function(t,e){var r=[t,e],n=this.transform;return n&&i.applyTransform(r,r,n),r},o}),define("zrender/animation/easing",[],function(){var t={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,i=.4;return 0===t?0:1===t?1:(!r||1>r?(r=1,e=i/4):e=i*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)))},elasticOut:function(t){var e,r=.1,i=.4;return 0===t?0:1===t?1:(!r||1>r?(r=1,e=i/4):e=i*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},elasticInOut:function(t){var e,r=.1,i=.4;return 0===t?0:1===t?1:(!r||1>r?(r=1,e=i/4):e=i*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(e){return 1-t.bounceOut(1-e)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(e){return.5>e?.5*t.bounceIn(2*e):.5*t.bounceOut(2*e-1)+.5}};return t}),define("zrender/animation/Clip",["require","./easing"],function(t){function e(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}var r=t("./easing");return e.prototype={constructor:e,step:function(t){this._initialized||(this._startTime=t+this._delay,this._initialized=!0);var e=(t-this._startTime)/this._life;if(!(0>e)){e=Math.min(e,1);var i=this.easing,n="string"==typeof i?r[i]:i,a="function"==typeof n?n(e):e;return this.fire("frame",a),1==e?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(t){var e=(t-this._startTime)%this._life;this._startTime=t-e+this.gap,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)}},e}),define("zrender/tool/color",["require"],function(t){function e(t){return t=Math.round(t),0>t?0:t>255?255:t}function r(t){return t=Math.round(t),0>t?0:t>360?360:t}function i(t){return 0>t?0:t>1?1:t}function n(t){return e(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function a(t){return i(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function o(t,e,r){return 0>r?r+=1:r>1&&(r-=1),1>6*r?t+(e-t)*r*6:1>2*r?e:2>3*r?t+(e-t)*(2/3-r)*6:t}function s(t,e,r){return t+(e-t)*r}function h(t){if(t){t+="";var e=t.replace(/ /g,"").toLowerCase();if(e in _)return _[e].slice();if("#"!==e.charAt(0)){var r=e.indexOf("("),i=e.indexOf(")");if(-1!==r&&i+1===e.length){var o=e.substr(0,r),s=e.substr(r+1,i-(r+1)).split(","),h=1;switch(o){case"rgba":if(4!==s.length)return;h=a(s.pop());case"rgb":if(3!==s.length)return;return[n(s[0]),n(s[1]),n(s[2]),h];case"hsla":if(4!==s.length)return;return s[3]=a(s[3]),l(s);case"hsl":if(3!==s.length)return;return l(s);default:return}}}else{if(4===e.length){var c=parseInt(e.substr(1),16);if(!(c>=0&&4095>=c))return;return[(3840&c)>>4|(3840&c)>>8,240&c|(240&c)>>4,15&c|(15&c)<<4,1]}if(7===e.length){var c=parseInt(e.substr(1),16);if(!(c>=0&&16777215>=c))return;return[(16711680&c)>>16,(65280&c)>>8,255&c,1]}}}}function l(t){var r=(parseFloat(t[0])%360+360)%360/360,i=a(t[1]),n=a(t[2]),s=.5>=n?n*(i+1):n+i-n*i,h=2*n-s,l=[e(255*o(h,s,r+1/3)),e(255*o(h,s,r)),e(255*o(h,s,r-1/3))];return 4===t.length&&(l[3]=t[3]),l}function c(t){if(t){var e,r,i=t[0]/255,n=t[1]/255,a=t[2]/255,o=Math.min(i,n,a),s=Math.max(i,n,a),h=s-o,l=(s+o)/2;if(0===h)e=0,r=0;else{r=.5>l?h/(s+o):h/(2-s-o);var c=((s-i)/6+h/2)/h,u=((s-n)/6+h/2)/h,f=((s-a)/6+h/2)/h;i===s?e=f-u:n===s?e=1/3+c-f:a===s&&(e=2/3+u-c),0>e&&(e+=1),e>1&&(e-=1)}var d=[360*e,r,l];return null!=t[3]&&d.push(t[3]),d}}function u(t,e){var r=h(t);if(r){for(var i=0;3>i;i++)0>e?r[i]=r[i]*(1-e)|0:r[i]=(255-r[i])*e+r[i]|0;return m(r,4===r.length?"rgba":"rgb")}}function f(t,e){var r=h(t);return r?((1<<24)+(r[0]<<16)+(r[1]<<8)+ +r[2]).toString(16).slice(1):void 0}function d(t,r,i){if(r&&r.length&&t>=0&&1>=t){i=i||[0,0,0,0];var n=t*(r.length-1),a=Math.floor(n),o=Math.ceil(n),h=r[a],l=r[o],c=n-a;return i[0]=e(s(h[0],l[0],c)),i[1]=e(s(h[1],l[1],c)),i[2]=e(s(h[2],l[2],c)),i[3]=e(s(h[3],l[3],c)),i}}function v(t,r,n){if(r&&r.length&&t>=0&&1>=t){var a=t*(r.length-1),o=Math.floor(a),l=Math.ceil(a),c=h(r[o]),u=h(r[l]),f=a-o,d=m([e(s(c[0],u[0],f)),e(s(c[1],u[1],f)),e(s(c[2],u[2],f)),i(s(c[3],u[3],f))],"rgba");return n?{color:d,leftIndex:o,rightIndex:l,value:a}:d}}function p(t,e,i,n){return t=h(t),t?(t=c(t),null!=e&&(t[0]=r(e)),null!=i&&(t[1]=a(i)),null!=n&&(t[2]=a(n)),m(l(t),"rgba")):void 0}function g(t,e){return t=h(t),t&&null!=e?(t[3]=i(e),m(t,"rgba")):void 0}function m(t,e){var r=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(r+=","+t[3]),e+"("+r+")"}var _={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]};return{parse:h,lift:u,toHex:f,fastMapToColor:d,mapToColor:v,modifyHSL:p,modifyAlpha:g,stringify:m}}),define("zrender/animation/Animator",["require","./Clip","../tool/color","../core/util"],function(t){function e(t,e){return t[e]}function r(t,e,r){t[e]=r}function i(t,e,r){return(e-t)*r+t}function n(t,e,r){return r>.5?e:t}function a(t,e,r,n,a){var o=t.length;if(1==a)for(var s=0;o>s;s++)n[s]=i(t[s],e[s],r);else for(var h=t[0].length,s=0;o>s;s++)for(var l=0;h>l;l++)n[s][l]=i(t[s][l],e[s][l],r)}function o(t,e,r){var i=t.length,n=e.length;if(i!==n){var a=i>n;if(a)t.length=n;else for(var o=i;n>o;o++)t.push(1===r?e[o]:m.call(e[o]))}for(var s=t[0]&&t[0].length,o=0;oh;h++)isNaN(t[o][h])&&(t[o][h]=e[o][h])}function s(t,e,r){if(t===e)return!0;var i=t.length;if(i!==e.length)return!1;if(1===r){for(var n=0;i>n;n++)if(t[n]!==e[n])return!1}else for(var a=t[0].length,n=0;i>n;n++)for(var o=0;a>o;o++)if(t[n][o]!==e[n][o])return!1;return!0}function h(t,e,r,i,n,a,o,s,h){var c=t.length;if(1==h)for(var u=0;c>u;u++)s[u]=l(t[u],e[u],r[u],i[u],n,a,o);else for(var f=t[0].length,u=0;c>u;u++)for(var d=0;f>d;d++)s[u][d]=l(t[u][d],e[u][d],r[u][d],i[u][d],n,a,o)}function l(t,e,r,i,n,a,o){var s=.5*(r-t),h=.5*(i-e);return(2*(e-r)+s+h)*o+(-3*(e-r)-2*s-h)*a+s*n+e}function c(t){if(g(t)){var e=t.length;if(g(t[0])){for(var r=[],i=0;e>i;i++)r.push(m.call(t[i]));return r}return m.call(t)}return t}function u(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function f(t,e,r,c,f){var p=t._getter,m=t._setter,_="spline"===e,y=c.length;if(y){var x,b=c[0].value,w=g(b),T=!1,P=!1,k=w&&g(b[0])?2:1;c.sort(function(t,e){return t.time-e.time}),x=c[y-1].time;for(var M=[],z=[],C=c[0].value,S=!0,L=0;y>L;L++){M.push(c[L].time/x);var R=c[L].value;if(w&&s(R,C,k)||!w&&R===C||(S=!1),C=R,"string"==typeof R){var A=v.parse(R);A?(R=A,T=!0):P=!0}z.push(R)}if(!S){for(var q=z[y-1],L=0;y-1>L;L++)w?o(z[L],q,k):!isNaN(z[L])||isNaN(q)||P||T||(z[L]=q);w&&o(p(t._target,f),q,k);var E,B,I,D,O,F,H=0,V=0;if(T)var N=[0,0,0,0];var j=function(t,e){var r;if(0>e)r=0;else if(V>e){for(E=Math.min(H+1,y-1),r=E;r>=0&&!(M[r]<=e);r--);r=Math.min(r,y-2)}else{for(r=H;y>r&&!(M[r]>e);r++);r=Math.min(r-1,y-2)}H=r,V=e;var o=M[r+1]-M[r];if(0!==o)if(B=(e-M[r])/o,_)if(D=z[r],I=z[0===r?r:r-1],O=z[r>y-2?y-1:r+1],F=z[r>y-3?y-1:r+2],w)h(I,D,O,F,B,B*B,B*B*B,p(t,f),k);else{var s;if(T)s=h(I,D,O,F,B,B*B,B*B*B,N,1),s=u(N);else{if(P)return n(D,O,B);s=l(I,D,O,F,B,B*B,B*B*B)}m(t,f,s)}else if(w)a(z[r],z[r+1],B,p(t,f),k);else{var s;if(T)a(z[r],z[r+1],B,N,1),s=u(N);else{if(P)return n(z[r],z[r+1],B);s=i(z[r],z[r+1],B)}m(t,f,s)}},W=new d({target:t._target,life:x,loop:t._loop,delay:t._delay,onframe:j,ondestroy:r});return e&&"spline"!==e&&(W.easing=e),W}}}var d=t("./Clip"),v=t("../tool/color"),p=t("../core/util"),g=p.isArrayLike,m=Array.prototype.slice,_=function(t,i,n,a){this._tracks={},this._target=t,this._loop=i||!1,this._getter=n||e,this._setter=a||r,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};return _.prototype={when:function(t,e){var r=this._tracks;for(var i in e){if(!r[i]){r[i]=[];var n=this._getter(this._target,i);if(null==n)continue;0!==t&&r[i].push({time:0,value:c(n)})}r[i].push({time:t,value:e[i]})}return this},during:function(t){return this._onframeList.push(t),this},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,r=0;e>r;r++)t[r].call(this)},start:function(t){var e,r=this,i=0,n=function(){i--,i||r._doneCallback()};for(var a in this._tracks){var o=f(this,t,n,this._tracks[a],a);o&&(this._clipList.push(o),i++,this.animation&&this.animation.addClip(o),e=o)}if(e){var s=e.onframe;e.onframe=function(t,e){s(t,e);for(var i=0;i1)for(var t in arguments)console.log(arguments[t])}}),define("zrender/mixin/Animatable",["require","../animation/Animator","../core/util","../core/log"],function(t){var e=t("../animation/Animator"),r=t("../core/util"),i=r.isString,n=r.isFunction,a=r.isObject,o=t("../core/log"),s=function(){this.animators=[]};return s.prototype={constructor:s,animate:function(t,i){var n,a=!1,s=this,h=this.__zr;if(t){var l=t.split("."),c=s;a="shape"===l[0];for(var u=0,f=l.length;f>u;u++)c&&(c=c[l[u]]);c&&(n=c)}else n=s;if(!n)return void o('Property "'+t+'" is not existed in element '+s.id);var d=s.animators,v=new e(n,i);return v.during(function(t){s.dirty(a)}).done(function(){d.splice(r.indexOf(d,v),1)}),d.push(v),h&&h.animation.addAnimator(v),v},stopAnimation:function(t){for(var e=this.animators,r=e.length,i=0;r>i;i++)e[i].stop(t);return e.length=0,this},animateTo:function(t,e,r,a,o){function s(){l--,l||o&&o()}i(r)?(o=a,a=r,r=0):n(a)?(o=a,a="linear",r=0):n(r)?(o=r,r=0):n(e)?(o=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,r,a,o);var h=this.animators.slice(),l=h.length;l||o&&o();for(var c=0;c0&&this.animate(t,!1).when(null==n?500:n,s).delay(o||0),this}},s}),define("zrender/Element",["require","./core/guid","./mixin/Eventful","./mixin/Transformable","./mixin/Animatable","./core/util"],function(t){var e=t("./core/guid"),r=t("./mixin/Eventful"),i=t("./mixin/Transformable"),n=t("./mixin/Animatable"),a=t("./core/util"),o=function(t){i.call(this,t),r.call(this,t),n.call(this,t),this.id=t.id||e()};return o.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=t,r[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var r=this[t];r||(r=this[t]=[]),r[0]=e[0],r[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(a.isObject(t))for(var r in t)t.hasOwnProperty(r)&&this.attrKV(r,t[r]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var r=0;ri||r>s||h>a||n>l)},contain:function(t,e){var r=this;return t>=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height},clone:function(){return new e(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height}},e}),define("zrender/container/Group",["require","../core/util","../Element","../core/BoundingRect"],function(t){var e=t("../core/util"),r=t("../Element"),i=t("../core/BoundingRect"),n=function(t){t=t||{},r.call(this,t);for(var e in t)this[e]=t[e];this._children=[],this.__storage=null,this.__dirty=!0};return n.prototype={constructor:n,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,r=0;r=0&&(r.splice(i,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,r=this.__zr;e&&e!==t.__storage&&(e.addToMap(t),t instanceof n&&t.addChildrenToStorage(e)),r&&r.refresh()},remove:function(t){var r=this.__zr,i=this.__storage,a=this._children,o=e.indexOf(a,t);return 0>o?this:(a.splice(o,1),t.parent=null,i&&(i.delFromMap(t.id),t instanceof n&&t.delChildrenFromStorage(i)),r&&r.refresh(),this)},removeAll:function(){var t,e,r=this._children,i=this.__storage;for(e=0;e=h;)e|=1&t,t>>=1;return t+e}function e(t,e,i,n){var a=e+1;if(a===i)return 1;if(n(t[a++],t[e])<0){for(;i>a&&n(t[a],t[a-1])<0;)a++;r(t,e,a)}else for(;i>a&&n(t[a],t[a-1])>=0;)a++;return a-e}function r(t,e,r){for(r--;r>e;){var i=t[e];t[e++]=t[r],t[r--]=i}}function i(t,e,r,i,n){for(i===e&&i++;r>i;i++){for(var a,o=t[i],s=e,h=i;h>s;)a=s+h>>>1,n(o,t[a])<0?h=a:s=a+1;var l=i-s;switch(l){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;l>0;)t[s+l]=t[s+l-1],l--}t[s]=o}}function n(t,e,r,i,n,a){var o=0,s=0,h=1;if(a(t,e[r+n])>0){for(s=i-n;s>h&&a(t,e[r+n+h])>0;)o=h,h=(h<<1)+1,0>=h&&(h=s);h>s&&(h=s),o+=n,h+=n}else{for(s=n+1;s>h&&a(t,e[r+n-h])<=0;)o=h,h=(h<<1)+1,0>=h&&(h=s);h>s&&(h=s);var l=o;o=n-h,h=n-l}for(o++;h>o;){var c=o+(h-o>>>1);a(t,e[r+c])>0?o=c+1:h=c}return h}function a(t,e,r,i,n,a){var o=0,s=0,h=1;if(a(t,e[r+n])<0){for(s=n+1;s>h&&a(t,e[r+n-h])<0;)o=h,h=(h<<1)+1,0>=h&&(h=s);h>s&&(h=s);var l=o;o=n-h,h=n-l}else{for(s=i-n;s>h&&a(t,e[r+n+h])>=0;)o=h,h=(h<<1)+1,0>=h&&(h=s);h>s&&(h=s),o+=n,h+=n}for(o++;h>o;){var c=o+(h-o>>>1);a(t,e[r+c])<0?h=c:o=c+1}return h}function o(t,e){function r(t,e){f[_]=t,d[_]=e,_+=1}function i(){for(;_>1;){var t=_-2;if(t>=1&&d[t-1]<=d[t]+d[t+1]||t>=2&&d[t-2]<=d[t]+d[t-1])d[t-1]d[t+1])break;s(t)}}function o(){for(;_>1;){var t=_-2;t>0&&d[t-1]=o?h(i,o,s,l):u(i,o,s,l)))}function h(r,i,o,s){var h=0;for(h=0;i>h;h++)y[h]=t[r+h];var c=0,u=o,f=r;if(t[f++]=t[u++],0!==--s){if(1===i){for(h=0;s>h;h++)t[f+h]=t[u+h];return void(t[f+s]=y[c])}for(var d,p,g,m=v;;){d=0,p=0,g=!1;do if(e(t[u],y[c])<0){if(t[f++]=t[u++],p++,d=0,0===--s){g=!0;break}}else if(t[f++]=y[c++],d++,p=0,1===--i){g=!0;break}while(m>(d|p));if(g)break;do{if(d=a(t[u],y,c,i,0,e),0!==d){for(h=0;d>h;h++)t[f+h]=y[c+h];if(f+=d,c+=d,i-=d,1>=i){g=!0;break}}if(t[f++]=t[u++],0===--s){g=!0;break}if(p=n(y[c],t,u,s,0,e),0!==p){for(h=0;p>h;h++)t[f+h]=t[u+h];if(f+=p,u+=p,s-=p,0===s){g=!0;break}}if(t[f++]=y[c++],1===--i){g=!0;break}m--}while(d>=l||p>=l);if(g)break;0>m&&(m=0),m+=2}if(v=m,1>v&&(v=1),1===i){for(h=0;s>h;h++)t[f+h]=t[u+h];t[f+s]=y[c]}else{if(0===i)throw new Error;for(h=0;i>h;h++)t[f+h]=y[c+h]}}else for(h=0;i>h;h++)t[f+h]=y[c+h]}function u(r,i,o,s){var h=0;for(h=0;s>h;h++)y[h]=t[o+h];var c=r+i-1,u=s-1,f=o+s-1,d=0,p=0;if(t[f--]=t[c--],0!==--i){if(1===s){for(f-=i,c-=i,p=f+1,d=c+1,h=i-1;h>=0;h--)t[p+h]=t[d+h];return void(t[f]=y[u])}for(var g=v;;){var m=0,_=0,x=!1;do if(e(y[u],t[c])<0){if(t[f--]=t[c--],m++,_=0,0===--i){x=!0;break}}else if(t[f--]=y[u--],_++,m=0,1===--s){x=!0;break}while(g>(m|_));if(x)break;do{if(m=i-a(y[u],t,r,i,i-1,e),0!==m){for(f-=m,c-=m,i-=m,p=f+1,d=c+1,h=m-1;h>=0;h--)t[p+h]=t[d+h];if(0===i){x=!0;break}}if(t[f--]=y[u--],1===--s){x=!0;break}if(_=s-n(t[c],y,0,s,s-1,e),0!==_){for(f-=_,u-=_,s-=_,p=f+1,d=u+1,h=0;_>h;h++)t[p+h]=y[d+h];if(1>=s){x=!0;break}}if(t[f--]=t[c--],0===--i){x=!0;break}g--}while(m>=l||_>=l);if(x)break;0>g&&(g=0),g+=2}if(v=g,1>v&&(v=1),1===s){for(f-=i,c-=i,p=f+1,d=c+1,h=i-1;h>=0;h--)t[p+h]=t[d+h];t[f]=y[u]}else{if(0===s)throw new Error;for(d=f-(s-1),h=0;s>h;h++)t[d+h]=y[h]}}else for(d=f-(s-1),h=0;s>h;h++)t[d+h]=y[h]}var f,d,v=l,p=0,g=c,m=0,_=0;p=t.length,2*c>p&&(g=p>>>1);var y=[];m=120>p?5:1542>p?10:119151>p?19:40,f=[],d=[],this.mergeRuns=i,this.forceMergeRuns=o,this.pushRun=r}function s(r,n,a,s){a||(a=0),s||(s=r.length);var l=s-a;if(!(2>l)){var c=0;if(h>l)return c=e(r,a,s,n),void i(r,a,s,a+c,n);var u=new o(r,n),f=t(l);do{if(c=e(r,a,s,n),f>c){var d=l;d>f&&(d=f),i(r,a,a+d,a+c,n),c=d}u.pushRun(a,c),u.mergeRuns(),l-=c,a+=c}while(0!==l);u.forceMergeRuns()}}var h=32,l=7,c=256;return s}),define("zrender/Storage",["require","./core/util","./core/env","./container/Group","./core/timsort"],function(t){function e(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var r=t("./core/util"),i=t("./core/env"),n=t("./container/Group"),a=t("./core/timsort"),o=function(){this._elements={},this._roots=[],this._displayList=[],this._displayListLen=0};return o.prototype={constructor:o,traverse:function(t,e){for(var r=0;ro;o++)this._updateAndAddDisplayable(r[o],null,t);n.length=this._displayListLen,i.canvasSupported&&a(n,e)},_updateAndAddDisplayable:function(t,e,r){if(!t.ignore||r){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var i=t.clipPath;if(i&&(i.parent=t,i.updateTransform(),e?(e=e.slice(),e.push(i)):e=[i]),t.isGroup){for(var n=t._children,a=0;ae;e++)this.delRoot(t[e]);else{var o;o="string"==typeof t?this._elements[t]:t;var s=r.indexOf(this._roots,o);s>=0&&(this.delFromMap(o.id),this._roots.splice(s,1),o instanceof n&&o.delChildrenFromStorage(this))}},addToMap:function(t){return t instanceof n&&(t.__storage=this),t.dirty(!1),this._elements[t.id]=t,this},get:function(t){return this._elements[t]},delFromMap:function(t){var e=this._elements,r=e[t];return r&&(delete e[t],r instanceof n&&(r.__storage=null)),this},dispose:function(){this._elements=this._renderList=this._roots=null},displayableSortFunc:e},o}),define("zrender/core/event",["require","../mixin/Eventful"],function(t){function e(t){return t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0}}function r(t,r,i){var n=e(t);return i=i||{},i.zrX=r.clientX-n.left,i.zrY=r.clientY-n.top,i}function i(t,e){if(e=e||window.event,null!=e.zrX)return e;var i=e.type,n=i&&i.indexOf("touch")>=0;if(n){var a="touchend"!=i?e.targetTouches[0]:e.changedTouches[0];a&&r(t,a,e)}else r(t,e,e),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;return e}function n(t,e,r){s?t.addEventListener(e,r):t.attachEvent("on"+e,r)}function a(t,e,r){s?t.removeEventListener(e,r):t.detachEvent("on"+e,r)}var o=t("../mixin/Eventful"),s="undefined"!=typeof window&&!!window.addEventListener,h=s?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};return{clientToLocal:r,normalizeEvent:i,addEventListener:n,removeEventListener:a,stop:h,Dispatcher:o}}),define("zrender/animation/requestAnimationFrame",["require"],function(t){return"undefined"!=typeof window&&(window.requestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)}}),define("zrender/animation/Animation",["require","../core/util","../core/event","./requestAnimationFrame","./Animator"],function(t){var e=t("../core/util"),r=t("../core/event").Dispatcher,i=t("./requestAnimationFrame"),n=t("./Animator"),a=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,r.call(this)};return a.prototype={constructor:a,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),r=0;r=0&&this._clips.splice(r,1)},removeAnimator:function(t){for(var e=t.getClips(),r=0;ro;o++){var s=r[o],h=s.step(t);h&&(n.push(h),a.push(s))}for(var o=0;i>o;)r[o]._needsRemove?(r[o]=r[i-1],r.pop(),i--):o++;i=n.length;for(var o=0;i>o;o++)a[o].fire(n[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(i(t),!e._paused&&e._update())}var e=this;this._running=!0,i(t)},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=[]},animate:function(t,e){e=e||{};var r=new n(t,e.loop,e.getter,e.setter);return r}},e.mixin(a,r),a}),define("zrender/core/GestureMgr",["require","./event"],function(t){function e(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}function r(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var i=t("./event"),n=function(){this._track=[]};n.prototype={constructor:n,recognize:function(t,e,r){return this._doTrack(t,e,r),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,r){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,s=n.length;s>o;o++){var h=n[o],l=i.clientToLocal(r,h);a.points.push([l.zrX,l.zrY]),a.touches.push(h)}this._track.push(a)}},_recognize:function(t){for(var e in a)if(a.hasOwnProperty(e)){var r=a[e](this._track,t);if(r)return r}}};var a={pinch:function(t,i){var n=t.length;if(n){var a=(t[n-1]||{}).points,o=(t[n-2]||{}).points||a;if(o&&o.length>1&&a&&a.length>1){var s=e(a)/e(o);!isFinite(s)&&(s=1),i.pinchScale=s;var h=r(a);return i.pinchX=h[0],i.pinchY=h[1],{type:"pinch",target:t[0].target,event:i}}}}};return n}),define("zrender/dom/HandlerProxy",["require","../core/event","../core/util","../mixin/Eventful","../core/env","../core/GestureMgr"],function(t){function e(t){return"mousewheel"===t&&c.browser.firefox?"DOMMouseScroll":t}function r(t,e,r){var i=t._gestureMgr;"start"===r&&i.clear();var n=i.recognize(e,t.handler.findHover(e.zrX,e.zrY,null),t.dom);if("end"===r&&i.clear(),n){var a=n.type;e.gestureEvent=a,t.handler.dispatchToElement(n.target,a,n.event)}}function i(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function n(){return c.touchEventsSupported}function a(t){function e(t,e){return function(){return e._touching?void 0:t.apply(e,arguments)}}for(var r=0;r0},extendFrom:function(t,e){if(t){var r=this;for(var i in t)!t.hasOwnProperty(i)||!e&&r.hasOwnProperty(i)||(r[i]=t[i])}},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,i,n){for(var a="radial"===i.type?r:e,o=a(t,i,n),s=i.colorStops,h=0;ha;a++)n=Math.max(f.measureText(i[a],e).width,n);return s>h&&(s=0,o={}),s++,o[r]=n,n}function r(t,r,i,n){var a=((t||"")+"").split("\n").length,o=e(t,r),s=e("国",r),h=a*s,l=new c(0,0,o,h);switch(l.lineHeight=s,n){case"bottom":case"alphabetic":l.y-=s;break;case"middle":l.y-=s/2}switch(i){case"end":case"right":l.x-=l.width;break;case"center":l.x-=l.width/2}return l}function i(t,e,r,i){var n=e.x,a=e.y,o=e.height,s=e.width,h=r.height,l=o/2-h/2,c="left";switch(t){case"left":n-=i,a+=l,c="right";break;case"right":n+=i+s,a+=l,c="left";break;case"top":n+=s/2,a-=i+h,c="center";break;case"bottom":n+=s/2,a+=o+i,c="center";break;case"inside":n+=s/2,a+=l,c="center";break;case"insideLeft":n+=i,a+=l,c="left";break;case"insideRight":n+=s-i,a+=l,c="right";break;case"insideTop":n+=s/2,a+=i,c="center";break;case"insideBottom":n+=s/2,a+=o-h-i,c="center";break;case"insideTopLeft":n+=i,a+=i,c="left";break;case"insideTopRight":n+=s-i,a+=i,c="right";break;case"insideBottomLeft":n+=i,a+=o-h-i;break;case"insideBottomRight":n+=s-i,a+=o-h-i,c="right"}return{x:n,y:a,textAlign:c,textBaseline:"top"}}function n(t,r,i,n,o){if(!r)return"";o=o||{},n=u(n,"...");for(var s=u(o.maxIterations,2),h=u(o.minChar,0),l=e("国",i),c=e("a",i),f=u(o.placeholder,""),d=r=Math.max(0,r-1),v=0;h>v&&d>=c;v++)d-=c;var p=e(n);p>d&&(n="",p=0),d=r-p;for(var g=(t+"").split("\n"),v=0,m=g.length;m>v;v++){var _=g[v],y=e(_,i);if(!(r>=y)){for(var x=0;;x++){if(d>=y||x>=s){_+=n;break}var b=0===x?a(_,d,c,l):y>0?Math.floor(_.length*d/y):0;_=_.substr(0,b),y=e(_,i)}""===_&&(_=f),g[v]=_}}return g.join("\n")}function a(t,e,r,i){for(var n=0,a=0,o=t.length;o>a&&e>n;a++){var s=t.charCodeAt(a);n+=s>=0&&127>=s?r:i}return a}var o={},s=0,h=5e3,l=t("../core/util"),c=t("../core/BoundingRect"),u=l.retrieve,f={getWidth:e,getBoundingRect:r,adjustTextPositionOnRect:i,truncateText:n,measureText:function(t,e){var r=l.getContext();return r.font=e||"12px sans-serif",r.measureText(t)}};return f}),define("zrender/graphic/mixin/RectText",["require","../../contain/text","../../core/BoundingRect"],function(t){function e(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}var r=t("../../contain/text"),i=t("../../core/BoundingRect"),n=new i,a=function(){};return a.prototype={constructor:a,drawRectText:function(t,i,a){var o=this.style,s=o.text;if(null!=s&&(s+=""),s){t.save();var h,l,c=o.textPosition,u=o.textDistance,f=o.textAlign,d=o.textFont||o.font,v=o.textBaseline,p=o.textVerticalAlign;a=a||r.getBoundingRect(s,d,f,v);var g=this.transform;if(o.textTransform?this.setTransform(t):g&&(n.copy(i),n.applyTransform(g),i=n),c instanceof Array){if(h=i.x+e(c[0],i.width),l=i.y+e(c[1],i.height),f=f||"left",v=v||"top",p){switch(p){case"middle":l-=a.height/2-a.lineHeight/2;break;case"bottom":l-=a.height-a.lineHeight/2;break;default:l+=a.lineHeight/2}v="middle"}}else{var m=r.adjustTextPositionOnRect(c,i,a,u);h=m.x,l=m.y,f=f||m.textAlign,v=v||m.textBaseline}t.textAlign=f||"left",t.textBaseline=v||"alphabetic";var _=o.textFill,y=o.textStroke;_&&(t.fillStyle=_),y&&(t.strokeStyle=y),t.font=d||"12px sans-serif",t.shadowBlur=o.textShadowBlur,t.shadowColor=o.textShadowColor||"transparent",t.shadowOffsetX=o.textShadowOffsetX,t.shadowOffsetY=o.textShadowOffsetY;var x=s.split("\n");o.textRotation&&(g&&t.translate(g[4],g[5]),t.rotate(o.textRotation),g&&t.translate(-g[4],-g[5]));for(var b=0;b=this._maxSize&&n>0){var a=r.head;r.remove(a),delete i[a.key]}var o=r.insert(e);o.key=t,i[t]=o}},a.get=function(t){var e=this._map[t],r=this._list;return null!=e?(e!==r.tail&&(r.remove(e),r.insertEntry(e)),e.value):void 0},a.clear=function(){this._list.clear(),this._map={}},n}),define("zrender/graphic/Image",["require","./Displayable","../core/BoundingRect","../core/util","../core/LRU"],function(t){function e(t){r.call(this,t)}var r=t("./Displayable"),i=t("../core/BoundingRect"),n=t("../core/util"),a=t("../core/LRU"),o=new a(50);return e.prototype={constructor:e,type:"image",brush:function(t,e){var r,i=this.style,n=i.image;if(i.bind(t,this,e),r="string"==typeof n?this._image:n,!r&&n){var a=o.get(n);if(!a)return r=new Image,r.onload=function(){r.onload=null;for(var t=0;t=0&&r.splice(i,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,r=0;rn;){var a=t[n],o=a.__from;o&&o.__zr?(n++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,r,!0,i))):(t.splice(n,1),o.__hoverMir=null,e--)}r.ctx.restore()}},_startProgessive:function(){function t(){r===e._progressiveToken&&e.storage&&(e._doPaintList(e.storage.getDisplayList()),e._furtherProgressive?(e._progress++,p(t)):e._progressiveToken=-1)}var e=this;if(e._furtherProgressive){var r=e._progressiveToken=+new Date;e._progress++,p(t)}},_clearProgressive:function(){this._progressiveToken=-1,this._progress=0,c.each(this._progressiveLayers,function(t){t.__dirty&&t.clear()})},_paintList:function(t,e){null==e&&(e=!1),this._updateLayerStatus(t),this._clearProgressive(),this.eachBuildinLayer(i),this._doPaintList(t,e),this.eachBuildinLayer(n)},_doPaintList:function(t,e){function r(t){var e=a.dpr||1;a.save(),a.globalAlpha=1,a.shadowBlur=0,i.__dirty=!0,a.setTransform(1,0,0,1,0,0),a.drawImage(t.dom,0,0,f*e,d*e),a.restore()}for(var i,n,a,o,s,h,l=0,f=this._width,d=this._height,v=this._progress,p=0,m=t.length;m>p;p++){var _=t[p],y=this._singleCanvas?0:_.zlevel,x=_.__frame;if(0>x&&s&&(r(s),s=null),n!==y&&(a&&a.restore(),o={},n=y,i=this.getLayer(n),i.isBuildin||u("ZLevel "+n+" has been used by unkown layer "+i.id),a=i.ctx,a.save(),i.__unusedCount=0,(i.__dirty||e)&&i.clear()),i.__dirty||e){if(x>=0){if(!s){if(s=this._progressiveLayers[Math.min(l++,g-1)],s.ctx.save(),s.renderScope={},s&&s.__progress>s.__maxProgress){p=s.__nextIdxNotProg-1;continue}h=s.__progress,s.__dirty||(v=h),s.__progress=v+1; -}x===v&&this._doPaintEl(_,s,!0,s.renderScope)}else this._doPaintEl(_,i,e,o);_.__dirty=!1}}s&&r(s),a&&a.restore(),this._furtherProgressive=!1,c.each(this._progressiveLayers,function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)},this)},_doPaintEl:function(t,e,r,i){var n=e.ctx,h=t.transform;if((e.__dirty||r)&&!t.invisible&&0!==t.style.opacity&&(!h||h[0]||h[3])&&(!t.culling||!a(t,this._width,this._height))){var l=t.__clipPaths;(i.prevClipLayer!==e||o(l,i.prevElClipPaths))&&(i.prevElClipPaths&&(i.prevClipLayer.ctx.restore(),i.prevClipLayer=i.prevElClipPaths=null,i.prevEl=null),l&&(n.save(),s(l,n),i.prevClipLayer=e,i.prevElClipPaths=l)),t.beforeBrush&&t.beforeBrush(n),t.brush(n,i.prevEl||null),i.prevEl=t,t.afterBrush&&t.afterBrush(n)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||(e=new v("zr_"+t,this,this.dpr),e.isBuildin=!0,this._layerConfig[t]&&c.merge(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,a=n.length,o=null,s=-1,h=this._domRoot;if(i[t])return void u("ZLevel "+t+" has been used already");if(!r(e))return void u("Layer of zlevel "+t+" is not valid");if(a>0&&t>n[0]){for(s=0;a-1>s&&!(n[s]t);s++);o=i[n[s]]}if(n.splice(s+1,0,t),o){var l=o.dom;l.nextSibling?h.insertBefore(e.dom,l.nextSibling):h.appendChild(e.dom)}else h.firstChild?h.insertBefore(e.dom,h.firstChild):h.appendChild(e.dom);i[t]=e},eachLayer:function(t,e){var r,i,n=this._zlevelList;for(i=0;il;l++){var f=t[l],d=this._singleCanvas?0:f.zlevel,p=e[d],m=f.progressive;if(p&&(p.elCount++,p.__dirty=p.__dirty||f.__dirty),m>=0){o!==m&&(o=m,h++);var _=f.__frame=h-1;if(!a){var y=Math.min(s,g-1);a=r[y],a||(a=r[y]=new v("progressive",this,this.dpr),a.initContext()),a.__maxProgress=0}a.__dirty=a.__dirty||f.__dirty,a.elCount++,a.__maxProgress=Math.max(a.__maxProgress,_),a.__maxProgress>=a.__progress&&(p.__dirty=!0)}else f.__frame=-1,a&&(a.__nextIdxNotProg=l,s++,a=null)}a&&(s++,a.__nextIdxNotProg=l),this.eachBuildinLayer(function(t,e){i[e]!==t.elCount&&(t.__dirty=!0)}),r.length=Math.min(s,g),c.each(r,function(t,e){n[e]!==t.elCount&&(f.__dirty=!0),t.__dirty&&(t.__progress=0)})},clear:function(){return this.eachBuildinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var r=this._layerConfig;r[t]?c.merge(r[t],e,!0):r[t]=e;var i=this._layers[t];i&&c.merge(i,r[t],!0)}},delLayer:function(t){var e=this._layers,r=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],r.splice(c.indexOf(r,t),1))},resize:function(t,e){var r=this._domRoot;if(r.style.display="none",t=t||this._getWidth(),e=e||this._getHeight(),r.style.display="",this._width!=t||e!=this._height){r.style.width=t+"px",r.style.height=e+"px";for(var i in this._layers)this._layers[i].resize(t,e);this.refresh(!0)}return this._width=t,this._height=e,this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas)return this._layers[0].dom;var e=new v("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clearColor=t.backgroundColor,e.clear();for(var r=this.storage.getDisplayList(!0),i={},n=0;n-x&&x>t}function r(t){return t>x||-x>t}function i(t,e,r,i,n){var a=1-n;return a*a*(a*t+3*n*e)+n*n*(n*i+3*a*r)}function n(t,e,r,i,n){var a=1-n;return 3*(((e-t)*a+2*(r-e)*n)*a+(i-r)*n*n)}function a(t,r,i,n,a,o){var s=n+3*(r-i)-t,h=3*(i-2*r+t),l=3*(r-t),c=t-a,u=h*h-3*s*l,f=h*l-9*s*c,d=l*l-3*h*c,v=0;if(e(u)&&e(f))if(e(h))o[0]=0;else{var p=-l/h;p>=0&&1>=p&&(o[v++]=p)}else{var g=f*f-4*u*d;if(e(g)){var m=f/u,p=-h/s+m,x=-m/2;p>=0&&1>=p&&(o[v++]=p),x>=0&&1>=x&&(o[v++]=x)}else if(g>0){var b=y(g),P=u*h+1.5*s*(-f+b),k=u*h+1.5*s*(-f-b);P=0>P?-_(-P,T):_(P,T),k=0>k?-_(-k,T):_(k,T);var p=(-h-(P+k))/(3*s);p>=0&&1>=p&&(o[v++]=p)}else{var M=(2*u*h-3*s*f)/(2*y(u*u*u)),z=Math.acos(M)/3,C=y(u),S=Math.cos(z),p=(-h-2*C*S)/(3*s),x=(-h+C*(S+w*Math.sin(z)))/(3*s),L=(-h+C*(S-w*Math.sin(z)))/(3*s);p>=0&&1>=p&&(o[v++]=p),x>=0&&1>=x&&(o[v++]=x),L>=0&&1>=L&&(o[v++]=L)}}return v}function o(t,i,n,a,o){var s=6*n-12*i+6*t,h=9*i+3*a-3*t-9*n,l=3*i-3*t,c=0;if(e(h)){if(r(s)){var u=-l/s;u>=0&&1>=u&&(o[c++]=u)}}else{var f=s*s-4*h*l;if(e(f))o[0]=-s/(2*h);else if(f>0){var d=y(f),u=(-s+d)/(2*h),v=(-s-d)/(2*h);u>=0&&1>=u&&(o[c++]=u),v>=0&&1>=v&&(o[c++]=v)}}return c}function s(t,e,r,i,n,a){var o=(e-t)*n+t,s=(r-e)*n+e,h=(i-r)*n+r,l=(s-o)*n+o,c=(h-s)*n+s,u=(c-l)*n+l;a[0]=t,a[1]=o,a[2]=l,a[3]=u,a[4]=u,a[5]=c,a[6]=h,a[7]=i}function h(t,e,r,n,a,o,s,h,l,c,u){var f,d,v,p,g,_=.005,x=1/0;P[0]=l,P[1]=c;for(var w=0;1>w;w+=.05)k[0]=i(t,r,a,s,w),k[1]=i(e,n,o,h,w),p=m(P,k),x>p&&(f=w,x=p);x=1/0;for(var T=0;32>T&&!(b>_);T++)d=f-_,v=f+_,k[0]=i(t,r,a,s,d),k[1]=i(e,n,o,h,d),p=m(k,P),d>=0&&x>p?(f=d,x=p):(M[0]=i(t,r,a,s,v),M[1]=i(e,n,o,h,v),g=m(M,P),1>=v&&x>g?(f=v,x=g):_*=.5);return u&&(u[0]=i(t,r,a,s,f),u[1]=i(e,n,o,h,f)),y(x)}function l(t,e,r,i){var n=1-i;return n*(n*t+2*i*e)+i*i*r}function c(t,e,r,i){return 2*((1-i)*(e-t)+i*(r-e))}function u(t,i,n,a,o){var s=t-2*i+n,h=2*(i-t),l=t-a,c=0;if(e(s)){if(r(h)){var u=-l/h;u>=0&&1>=u&&(o[c++]=u)}}else{var f=h*h-4*s*l;if(e(f)){var u=-h/(2*s);u>=0&&1>=u&&(o[c++]=u)}else if(f>0){var d=y(f),u=(-h+d)/(2*s),v=(-h-d)/(2*s);u>=0&&1>=u&&(o[c++]=u),v>=0&&1>=v&&(o[c++]=v)}}return c}function f(t,e,r){var i=t+r-2*e;return 0===i?.5:(t-e)/i}function d(t,e,r,i,n){var a=(e-t)*i+t,o=(r-e)*i+e,s=(o-a)*i+a;n[0]=t,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=r}function v(t,e,r,i,n,a,o,s,h){var c,u=.005,f=1/0;P[0]=o,P[1]=s;for(var d=0;1>d;d+=.05){k[0]=l(t,r,n,d),k[1]=l(e,i,a,d);var v=m(P,k);f>v&&(c=d,f=v)}f=1/0;for(var p=0;32>p&&!(b>u);p++){var g=c-u,_=c+u;k[0]=l(t,r,n,g),k[1]=l(e,i,a,g);var v=m(k,P);if(g>=0&&f>v)c=g,f=v;else{M[0]=l(t,r,n,_),M[1]=l(e,i,a,_);var x=m(M,P);1>=_&&f>x?(c=_,f=x):u*=.5}}return h&&(h[0]=l(t,r,n,c),h[1]=l(e,i,a,c)),y(f)}var p=t("./vector"),g=p.create,m=p.distSquare,_=Math.pow,y=Math.sqrt,x=1e-8,b=1e-4,w=y(3),T=1/3,P=g(),k=g(),M=g();return{cubicAt:i,cubicDerivativeAt:n,cubicRootAt:a,cubicExtrema:o,cubicSubdivide:s,cubicProjectPoint:h,quadraticAt:l,quadraticDerivativeAt:c,quadraticRootAt:u,quadraticExtremum:f,quadraticSubdivide:d,quadraticProjectPoint:v}}),define("zrender/core/bbox",["require","./vector","./curve"],function(t){var e=t("./vector"),r=t("./curve"),i={},n=Math.min,a=Math.max,o=Math.sin,s=Math.cos,h=e.create(),l=e.create(),c=e.create(),u=2*Math.PI;i.fromPoints=function(t,e,r){if(0!==t.length){var i,o=t[0],s=o[0],h=o[0],l=o[1],c=o[1];for(i=1;ip;p++){var y=m(t,i,s,l,f[p]);u[0]=n(y,u[0]),v[0]=a(y,v[0])}for(_=g(e,o,h,c,d),p=0;_>p;p++){var x=m(e,o,h,c,d[p]);u[1]=n(x,u[1]),v[1]=a(x,v[1])}u[0]=n(t,u[0]),v[0]=a(t,v[0]),u[0]=n(l,u[0]),v[0]=a(l,v[0]),u[1]=n(e,u[1]),v[1]=a(e,v[1]),u[1]=n(c,u[1]),v[1]=a(c,v[1])},i.fromQuadratic=function(t,e,i,o,s,h,l,c){var u=r.quadraticExtremum,f=r.quadraticAt,d=a(n(u(t,i,s),1),0),v=a(n(u(e,o,h),1),0),p=f(t,i,s,d),g=f(e,o,h,v);l[0]=n(t,s,p),l[1]=n(e,h,g),c[0]=a(t,s,p),c[1]=a(e,h,g)},i.fromArc=function(t,r,i,n,a,f,d,v,p){var g=e.min,m=e.max,_=Math.abs(a-f);if(1e-4>_%u&&_>1e-4)return v[0]=t-i,v[1]=r-n,p[0]=t+i,void(p[1]=r+n);if(h[0]=s(a)*i+t,h[1]=o(a)*n+r,l[0]=s(f)*i+t,l[1]=o(f)*n+r,g(v,h,l),m(p,h,l),a%=u,0>a&&(a+=u),f%=u,0>f&&(f+=u),a>f&&!d?f+=u:f>a&&d&&(a+=u),d){var y=f;f=a,a=y}for(var x=0;f>x;x+=Math.PI/2)x>a&&(c[0]=s(x)*i+t,c[1]=o(x)*n+r,g(v,c,v),m(p,c,p))},i}),define("zrender/core/PathProxy",["require","./curve","./vector","./bbox","./BoundingRect","../config"],function(t){var e=t("./curve"),r=t("./vector"),i=t("./bbox"),n=t("./BoundingRect"),a=t("../config").devicePixelRatio,o={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},s=[],h=[],l=[],c=[],u=Math.min,f=Math.max,d=Math.cos,v=Math.sin,p=Math.sqrt,g=Math.abs,m="undefined"!=typeof Float32Array,_=function(){this.data=[],this._len=0,this._ctx=null,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._ux=0,this._uy=0};return _.prototype={constructor:_,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=g(1/a/t)||0,this._uy=g(1/a/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._len=0,this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(o.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var r=g(t-this._xi)>this._ux||g(e-this._yi)>this._uy||this._len<5;return this.addData(o.L,t,e),this._ctx&&r&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),r&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,r,i,n,a){return this.addData(o.C,t,e,r,i,n,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,r,i,n,a):this._ctx.bezierCurveTo(t,e,r,i,n,a)),this._xi=n,this._yi=a,this},quadraticCurveTo:function(t,e,r,i){return this.addData(o.Q,t,e,r,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,r,i):this._ctx.quadraticCurveTo(t,e,r,i)),this._xi=r,this._yi=i,this},arc:function(t,e,r,i,n,a){return this.addData(o.A,t,e,r,r,i,n-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,r,i,n,a),this._xi=d(n)*r+t,this._xi=v(n)*r+t,this},arcTo:function(t,e,r,i,n){return this._ctx&&this._ctx.arcTo(t,e,r,i,n),this},rect:function(t,e,r,i){return this._ctx&&this._ctx.rect(t,e,r,i),this.addData(o.R,t,e,r,i),this},closePath:function(){this.addData(o.Z);var t=this._ctx,e=this._x0,r=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,r),t.closePath()),this._xi=e,this._yi=r,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,r=0;rr;r++)this.data[r]=t[r];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,r=0,i=this._len,n=0;e>n;n++)r+=t[n].len();m&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+r));for(var n=0;e>n;n++)for(var a=t[n].data,o=0;oe.length&&(this._expandData(),e=this.data);for(var r=0;ra&&(a=n+a),a%=n,g-=a*c,m-=a*d;c>0&&t>=g||0>c&&g>=t||0==c&&(d>0&&e>=m||0>d&&m>=e);)i=this._dashIdx,r=o[i],g+=c*r,m+=d*r,this._dashIdx=(i+1)%_,c>0&&h>g||0>c&&g>h||d>0&&l>m||0>d&&m>l||s[i%2?"moveTo":"lineTo"](c>=0?u(g,t):f(g,t),d>=0?u(m,e):f(m,e));c=g-t,d=m-e,this._dashOffset=-p(c*c+d*d)},_dashedBezierTo:function(t,r,i,n,a,o){var s,h,l,c,u,f=this._dashSum,d=this._dashOffset,v=this._lineDash,g=this._ctx,m=this._xi,_=this._yi,y=e.cubicAt,x=0,b=this._dashIdx,w=v.length,T=0;for(0>d&&(d=f+d),d%=f,s=0;1>s;s+=.1)h=y(m,t,i,a,s+.1)-y(m,t,i,a,s),l=y(_,r,n,o,s+.1)-y(_,r,n,o,s),x+=p(h*h+l*l);for(;w>b&&(T+=v[b],!(T>d));b++);for(s=(T-d)/x;1>=s;)c=y(m,t,i,a,s),u=y(_,r,n,o,s),b%2?g.moveTo(c,u):g.lineTo(c,u),s+=v[b]/x,b=(b+1)%w;b%2!==0&&g.lineTo(a,o),h=a-c,l=o-u,this._dashOffset=-p(h*h+l*l)},_dashedQuadraticTo:function(t,e,r,i){var n=r,a=i;r=(r+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,r,i,n,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,m&&(this.data=new Float32Array(t)))},getBoundingRect:function(){s[0]=s[1]=l[0]=l[1]=Number.MAX_VALUE,h[0]=h[1]=c[0]=c[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,a=0,u=0,f=0,p=0;pf;){var p=h[f++];switch(1==f&&(i=h[f],n=h[f+1],e=i,r=n),p){case o.M:e=i=h[f++],r=n=h[f++],t.moveTo(i,n);break;case o.L:a=h[f++],s=h[f++],(g(a-i)>l||g(s-n)>c||f===u-1)&&(t.lineTo(a,s),i=a,n=s);break;case o.C:t.bezierCurveTo(h[f++],h[f++],h[f++],h[f++],h[f++],h[f++]),i=h[f-2],n=h[f-1];break;case o.Q:t.quadraticCurveTo(h[f++],h[f++],h[f++],h[f++]),i=h[f-2],n=h[f-1];break;case o.A:var m=h[f++],_=h[f++],y=h[f++],x=h[f++],b=h[f++],w=h[f++],T=h[f++],P=h[f++],k=y>x?y:x,M=y>x?1:y/x,z=y>x?x/y:1,C=Math.abs(y-x)>.001,S=b+w;C?(t.translate(m,_),t.rotate(T),t.scale(M,z),t.arc(0,0,k,b,S,1-P),t.scale(1/M,1/z),t.rotate(-T),t.translate(-m,-_)):t.arc(m,_,k,b,S,1-P),1==f&&(e=d(b)*y+m,r=v(b)*x+_),i=d(S)*y+m,n=v(S)*x+_;break;case o.R:e=i=h[f],r=n=h[f+1],t.rect(h[f++],h[f++],h[f++],h[f++]);break;case o.Z:t.closePath(),i=e,n=r}}}},_.CMD=o,_}),define("zrender/contain/line",[],function(){return{containStroke:function(t,e,r,i,n,a,o){if(0===n)return!1;var s=n,h=0,l=t;if(o>e+s&&o>i+s||e-s>o&&i-s>o||a>t+s&&a>r+s||t-s>a&&r-s>a)return!1;if(t===r)return Math.abs(a-t)<=s/2;h=(e-i)/(t-r),l=(t*i-r*e)/(t-r);var c=h*a-o+l,u=c*c/(h*h+1);return s/2*s/2>=u}}}),define("zrender/contain/cubic",["require","../core/curve"],function(t){var e=t("../core/curve");return{containStroke:function(t,r,i,n,a,o,s,h,l,c,u){if(0===l)return!1;var f=l;if(u>r+f&&u>n+f&&u>o+f&&u>h+f||r-f>u&&n-f>u&&o-f>u&&h-f>u||c>t+f&&c>i+f&&c>a+f&&c>s+f||t-f>c&&i-f>c&&a-f>c&&s-f>c)return!1;var d=e.cubicProjectPoint(t,r,i,n,a,o,s,h,c,u,null);return f/2>=d}}}),define("zrender/contain/quadratic",["require","../core/curve"],function(t){var e=t("../core/curve");return{containStroke:function(t,r,i,n,a,o,s,h,l){if(0===s)return!1;var c=s;if(l>r+c&&l>n+c&&l>o+c||r-c>l&&n-c>l&&o-c>l||h>t+c&&h>i+c&&h>a+c||t-c>h&&i-c>h&&a-c>h)return!1;var u=e.quadraticProjectPoint(t,r,i,n,a,o,h,l,null);return c/2>=u}}}),define("zrender/contain/util",["require"],function(t){var e=2*Math.PI;return{normalizeRadian:function(t){return t%=e,0>t&&(t+=e),t}}}),define("zrender/contain/arc",["require","./util"],function(t){var e=t("./util").normalizeRadian,r=2*Math.PI;return{containStroke:function(t,i,n,a,o,s,h,l,c){if(0===h)return!1;var u=h;l-=t,c-=i;var f=Math.sqrt(l*l+c*c);if(f-u>n||n>f+u)return!1;if(Math.abs(a-o)%r<1e-4)return!0;if(s){var d=a;a=e(o),o=e(d)}else a=e(a),o=e(o);a>o&&(o+=r);var v=Math.atan2(c,l);return 0>v&&(v+=r),v>=a&&o>=v||v+r>=a&&o>=v+r}}}),define("zrender/contain/windingLine",[],function(){return function(t,e,r,i,n,a){if(a>e&&a>i||e>a&&i>a)return 0;if(i===e)return 0;var o=e>i?1:-1,s=(a-e)/(i-e);(1===s||0===s)&&(o=e>i?.5:-.5);var h=s*(r-t)+t;return h>n?o:0}}),define("zrender/contain/path",["require","../core/PathProxy","./line","./cubic","./quadratic","./arc","./util","../core/curve","./windingLine"],function(t){function e(t,e){return Math.abs(t-e)e&&c>n&&c>o&&c>h||e>c&&n>c&&o>c&&h>c)return 0;var u=d.cubicRootAt(e,n,o,h,c,_);if(0===u)return 0;for(var f,v,p=0,g=-1,m=0;u>m;m++){var x=_[m],b=0===x||1===x?.5:1,w=d.cubicAt(t,i,a,s,x);l>w||(0>g&&(g=d.cubicExtrema(e,n,o,h,y),y[1]1&&r(),f=d.cubicAt(e,n,o,h,y[0]),g>1&&(v=d.cubicAt(e,n,o,h,y[1]))),p+=2==g?xf?b:-b:xv?b:-b:v>h?b:-b:xf?b:-b:f>h?b:-b)}return p}function n(t,e,r,i,n,a,o,s){if(s>e&&s>i&&s>a||e>s&&i>s&&a>s)return 0;var h=d.quadraticRootAt(e,i,a,s,_);if(0===h)return 0;var l=d.quadraticExtremum(e,i,a);if(l>=0&&1>=l){for(var c=0,u=d.quadraticAt(e,i,a,l),f=0;h>f;f++){var v=0===_[f]||1===_[f]?.5:1,p=d.quadraticAt(t,r,n,_[f]);o>p||(c+=_[f]u?v:-v:u>a?v:-v)}return c}var v=0===_[0]||1===_[0]?.5:1,p=d.quadraticAt(t,r,n,_[0]);return o>p?0:e>a?v:-v}function a(t,e,r,i,n,a,o,s){if(s-=e,s>r||-r>s)return 0;var h=Math.sqrt(r*r-s*s);_[0]=-h,_[1]=h;var l=Math.abs(i-n);if(1e-4>l)return 0;if(1e-4>l%g){i=0,n=g;var c=a?1:-1;return o>=_[0]+t&&o<=_[1]+t?c:0}if(a){var h=i;i=f(n),n=f(h)}else i=f(i),n=f(n);i>n&&(n+=g);for(var u=0,d=0;2>d;d++){var v=_[d];if(v+t>o){var p=Math.atan2(s,v),c=a?1:-1;0>p&&(p=g+p),(p>=i&&n>=p||p+g>=i&&n>=p+g)&&(p>Math.PI/2&&p<1.5*Math.PI&&(c=-c),u+=c)}}return u}function o(t,r,o,h,f){for(var d=0,g=0,m=0,_=0,y=0,x=0;x1&&(o||(d+=v(g,m,_,y,h,f))),1==x&&(g=t[x],m=t[x+1],_=g,y=m),b){case s.M:_=t[x++],y=t[x++],g=_,m=y;break;case s.L:if(o){if(p(g,m,t[x],t[x+1],r,h,f))return!0}else d+=v(g,m,t[x],t[x+1],h,f)||0;g=t[x++],m=t[x++];break;case s.C:if(o){if(l.containStroke(g,m,t[x++],t[x++],t[x++],t[x++],t[x],t[x+1],r,h,f))return!0}else d+=i(g,m,t[x++],t[x++],t[x++],t[x++],t[x],t[x+1],h,f)||0;g=t[x++],m=t[x++];break;case s.Q:if(o){if(c.containStroke(g,m,t[x++],t[x++],t[x],t[x+1],r,h,f))return!0}else d+=n(g,m,t[x++],t[x++],t[x],t[x+1],h,f)||0;g=t[x++],m=t[x++];break;case s.A:var w=t[x++],T=t[x++],P=t[x++],k=t[x++],M=t[x++],z=t[x++],C=(t[x++],1-t[x++]),S=Math.cos(M)*P+w,L=Math.sin(M)*k+T;x>1?d+=v(g,m,S,L,h,f):(_=S,y=L);var R=(h-w)*k/P+w;if(o){if(u.containStroke(w,T,k,M,M+z,C,r,R,f))return!0}else d+=a(w,T,k,M,M+z,C,R,f);g=Math.cos(M+z)*P+w,m=Math.sin(M+z)*k+T;break;case s.R:_=g=t[x++],y=m=t[x++];var A=t[x++],q=t[x++],S=_+A,L=y+q;if(o){if(p(_,y,S,y,r,h,f)||p(S,y,S,L,r,h,f)||p(S,L,_,L,r,h,f)||p(_,L,_,y,r,h,f))return!0}else d+=v(S,y,S,L,h,f),d+=v(_,L,_,y,h,f);break;case s.Z:if(o){if(p(g,m,_,y,r,h,f))return!0}else d+=v(g,m,_,y,h,f);g=_,m=y}}return o||e(m,y)||(d+=v(g,m,_,y,h,f)||0),0!==d}var s=t("../core/PathProxy").CMD,h=t("./line"),l=t("./cubic"),c=t("./quadratic"),u=t("./arc"),f=t("./util").normalizeRadian,d=t("../core/curve"),v=t("./windingLine"),p=h.containStroke,g=2*Math.PI,m=1e-4,_=[-1,-1,-1],y=[-1,-1];return{contain:function(t,e,r){return o(t,0,!1,e,r)},containStroke:function(t,e,r,i){return o(t,e,!0,r,i)}}}),define("zrender/graphic/Path",["require","./Displayable","../core/util","../core/PathProxy","../contain/path","./Pattern"],function(t){function e(t){r.call(this,t),this.path=new n}var r=t("./Displayable"),i=t("../core/util"),n=t("../core/PathProxy"),a=t("../contain/path"),o=t("./Pattern"),s=o.prototype.getCanvasPattern,h=Math.abs;return e.prototype={constructor:e,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var r=this.style,i=this.path,n=r.hasStroke(),a=r.hasFill(),o=r.fill,h=r.stroke,l=a&&!!o.colorStops,c=n&&!!h.colorStops,u=a&&!!o.image,f=n&&!!h.image;if(r.bind(t,this,e),this.setTransform(t),this.__dirty){var d=this.getBoundingRect();l&&(this._fillGradient=r.getGradient(t,o,d)),c&&(this._strokeGradient=r.getGradient(t,h,d))}l?t.fillStyle=this._fillGradient:u&&(t.fillStyle=s.call(o,t)),c?t.strokeStyle=this._strokeGradient:f&&(t.strokeStyle=s.call(h,t));var v=r.lineDash,p=r.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();i.setScale(m[0],m[1]),this.__dirtyPath||v&&!g&&n?(i=this.path.beginPath(t),v&&!g&&(i.setLineDash(v),i.setLineDashOffset(p)),this.buildPath(i,this.shape,!1),this.__dirtyPath=!1):(t.beginPath(),this.path.rebuildPath(t)),a&&i.fill(t),v&&g&&(t.setLineDash(v),t.lineDashOffset=p),n&&i.stroke(t),v&&g&&t.setLineDash([]),this.restoreTransform(t),(r.text||0===r.text)&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(t,e,r){},getBoundingRect:function(){var t=this._rect,e=this.style,r=!t;if(r){var i=this.path;this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),t=i.getBoundingRect()}if(this._rect=t,e.hasStroke()){var n=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||r){n.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(n.width+=a/o,n.height+=a/o,n.x-=a/o/2,n.y-=a/o/2)}return n}return t},contain:function(t,e){var r=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),n=this.style;if(t=r[0],e=r[1],i.contain(t,e)){var o=this.path.data;if(n.hasStroke()){var s=n.lineWidth,h=n.strokeNoScale?this.getLineScale():1;if(h>1e-10&&(n.hasFill()||(s=Math.max(s,this.strokeContainThreshold)),a.containStroke(o,s/h,t,e)))return!0}if(n.hasFill())return a.contain(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):r.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var r=this.shape;if(r){if(i.isObject(t))for(var n in t)r[n]=t[n];else r[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&h(t[0]-1)>1e-10&&h(t[3]-1)>1e-10?Math.sqrt(h(t[0]*t[3]-t[2]*t[1])):1}},e.extend=function(t){var r=function(r){e.call(this,r),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var a in i)!n.hasOwnProperty(a)&&i.hasOwnProperty(a)&&(n[a]=i[a])}t.init&&t.init.call(this,r)};i.inherits(r,e);for(var n in t)"style"!==n&&"shape"!==n&&(r.prototype[n]=t[n]);return r},i.inherits(e,r),e}),define("zrender/graphic/shape/Rose",["require","../Path"],function(t){var e=Math.sin,r=Math.cos,i=Math.PI/180;return t("../Path").extend({type:"rose",shape:{cx:0,cy:0,r:[],k:0,n:1},style:{stroke:"#000",fill:null},buildPath:function(t,n){var a,o,s,h=n.r,l=n.k,c=n.n,u=n.cx,f=n.cy;t.moveTo(u,f);for(var d=0,v=h.length;v>d;d++){s=h[d];for(var p=0;360*c>=p;p++)a=s*e(l/c*p%360*i)*r(p*i)+u,o=s*e(l/c*p%360*i)*e(p*i)+f,t.lineTo(a,o)}}})}),define("zrender/graphic/shape/Trochoid",["require","../Path"],function(t){var e=Math.cos,r=Math.sin;return t("../Path").extend({type:"trochoid",shape:{cx:0,cy:0,r:0,r0:0,d:0,location:"out"},style:{stroke:"#000",fill:null},buildPath:function(t,i){var n,a,o,s,h=i.r,l=i.r0,c=i.d,u=i.cx,f=i.cy,d="out"==i.location?1:-1;if(!(i.location&&l>=h)){var v,p=0,g=1;n=(h+d*l)*e(0)-d*c*e(0)+u,a=(h+d*l)*r(0)-c*r(0)+f,t.moveTo(n,a);do p++;while(l*p%(h+d*l)!==0);do v=Math.PI/180*g,o=(h+d*l)*e(v)-d*c*e((h/l+d)*v)+u,s=(h+d*l)*r(v)-c*r((h/l+d)*v)+f,t.lineTo(o,s),g++;while(l*p/(h+d*l)*360>=g)}}})}),define("zrender/graphic/shape/Circle",["require","../Path"],function(t){return t("../Path").extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,r){r&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}})}),define("zrender/graphic/shape/Sector",["require","../Path"],function(t){return t("../Path").extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var r=e.cx,i=e.cy,n=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,h=e.clockwise,l=Math.cos(o),c=Math.sin(o);t.moveTo(l*n+r,c*n+i),t.lineTo(l*a+r,c*a+i),t.arc(r,i,a,o,s,!h),t.lineTo(Math.cos(s)*n+r,Math.sin(s)*n+i),0!==n&&t.arc(r,i,n,s,o,h),t.closePath()}})}),define("zrender/graphic/shape/Ring",["require","../Path"],function(t){return t("../Path").extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var r=e.cx,i=e.cy,n=2*Math.PI;t.moveTo(r+e.r,i),t.arc(r,i,e.r,0,n,!1),t.moveTo(r+e.r0,i),t.arc(r,i,e.r0,0,n,!0)}})}),define("zrender/graphic/shape/Ellipse",["require","../Path"],function(t){return t("../Path").extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var r=.5522848,i=e.cx,n=e.cy,a=e.rx,o=e.ry,s=a*r,h=o*r;t.moveTo(i-a,n),t.bezierCurveTo(i-a,n-h,i-s,n-o,i,n-o),t.bezierCurveTo(i+s,n-o,i+a,n-h,i+a,n),t.bezierCurveTo(i+a,n+h,i+s,n+o,i,n+o),t.bezierCurveTo(i-s,n+o,i-a,n+h,i-a,n),t.closePath()}})}),define("zrender/graphic/helper/roundRect",["require"],function(t){return{buildPath:function(t,e){var r,i,n,a,o=e.x,s=e.y,h=e.width,l=e.height,c=e.r;0>h&&(o+=h,h=-h),0>l&&(s+=l,l=-l),"number"==typeof c?r=i=n=a=c:c instanceof Array?1===c.length?r=i=n=a=c[0]:2===c.length?(r=n=c[0],i=a=c[1]):3===c.length?(r=c[0],i=a=c[1],n=c[2]):(r=c[0],i=c[1],n=c[2],a=c[3]):r=i=n=a=0;var u;r+i>h&&(u=r+i,r*=h/u,i*=h/u),n+a>h&&(u=n+a,n*=h/u,a*=h/u),i+n>l&&(u=i+n,i*=l/u,n*=l/u),r+a>l&&(u=r+a,r*=l/u,a*=l/u),t.moveTo(o+r,s),t.lineTo(o+h-i,s),0!==i&&t.quadraticCurveTo(o+h,s,o+h,s+i),t.lineTo(o+h,s+l-n),0!==n&&t.quadraticCurveTo(o+h,s+l,o+h-n,s+l),t.lineTo(o+a,s+l),0!==a&&t.quadraticCurveTo(o,s+l,o,s+l-a),t.lineTo(o,s+r),0!==r&&t.quadraticCurveTo(o,s,o+r,s)}}}),define("zrender/graphic/shape/Rect",["require","../helper/roundRect","../Path"],function(t){var e=t("../helper/roundRect");return t("../Path").extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,r){var i=r.x,n=r.y,a=r.width,o=r.height;r.r?e.buildPath(t,r):t.rect(i,n,a,o),t.closePath()}})}),define("zrender/graphic/shape/Heart",["require","../Path"],function(t){return t("../Path").extend({type:"heart",shape:{cx:0,cy:0,width:0,height:0 -},buildPath:function(t,e){var r=e.cx,i=e.cy,n=e.width,a=e.height;t.moveTo(r,i),t.bezierCurveTo(r+n/2,i-2*a/3,r+2*n,i+a/3,r,i+a),t.bezierCurveTo(r-2*n,i+a/3,r-n/2,i-2*a/3,r,i)}})}),define("zrender/graphic/shape/Droplet",["require","../Path"],function(t){return t("../Path").extend({type:"droplet",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,i=e.cy,n=e.width,a=e.height;t.moveTo(r,i+n),t.bezierCurveTo(r+n,i+n,r+3*n/2,i-n/3,r,i-a),t.bezierCurveTo(r-3*n/2,i-n/3,r-n,i+n,r,i+n),t.closePath()}})}),define("zrender/graphic/shape/Line",["require","../Path"],function(t){return t("../Path").extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.x1,i=e.y1,n=e.x2,a=e.y2,o=e.percent;0!==o&&(t.moveTo(r,i),1>o&&(n=r*(1-o)+n*o,a=i*(1-o)+a*o),t.lineTo(n,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}})}),define("zrender/graphic/shape/Star",["require","../Path"],function(t){var e=Math.PI,r=Math.cos,i=Math.sin;return t("../Path").extend({type:"star",shape:{cx:0,cy:0,n:3,r0:null,r:0},buildPath:function(t,n){var a=n.n;if(a&&!(2>a)){var o=n.cx,s=n.cy,h=n.r,l=n.r0;null==l&&(l=a>4?h*r(2*e/a)/r(e/a):h/3);var c=e/a,u=-e/2,f=o+h*r(u),d=s+h*i(u);u+=c,t.moveTo(f,d);for(var v,p=0,g=2*a-1;g>p;p++)v=p%2===0?l:h,t.lineTo(o+v*r(u),s+v*i(u)),u+=c;t.closePath()}}})}),define("zrender/graphic/shape/Isogon",["require","../Path"],function(t){var e=Math.PI,r=Math.sin,i=Math.cos;return t("../Path").extend({type:"isogon",shape:{x:0,y:0,r:0,n:0},buildPath:function(t,n){var a=n.n;if(a&&!(2>a)){var o=n.x,s=n.y,h=n.r,l=2*e/a,c=-e/2;t.moveTo(o+h*i(c),s+h*r(c));for(var u=0,f=a-1;f>u;u++)c+=l,t.lineTo(o+h*i(c),s+h*r(c));t.closePath()}}})}),define("zrender/graphic/shape/BezierCurve",["require","../../core/curve","../../core/vector","../Path"],function(t){function e(t,e,r){var i=t.cpx2,n=t.cpy2;return null===i||null===n?[(r?l:s)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?l:s)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?h:o)(t.x1,t.cpx1,t.x2,e),(r?h:o)(t.y1,t.cpy1,t.y2,e)]}var r=t("../../core/curve"),i=t("../../core/vector"),n=r.quadraticSubdivide,a=r.cubicSubdivide,o=r.quadraticAt,s=r.cubicAt,h=r.quadraticDerivativeAt,l=r.cubicDerivativeAt,c=[];return t("../Path").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(t,e){var r=e.x1,i=e.y1,o=e.x2,s=e.y2,h=e.cpx1,l=e.cpy1,u=e.cpx2,f=e.cpy2,d=e.percent;0!==d&&(t.moveTo(r,i),null==u||null==f?(1>d&&(n(r,h,o,d,c),h=c[1],o=c[2],n(i,l,s,d,c),l=c[1],s=c[2]),t.quadraticCurveTo(h,l,o,s)):(1>d&&(a(r,h,u,o,d,c),h=c[1],u=c[2],o=c[3],a(i,l,f,s,d,c),l=c[1],f=c[2],s=c[3]),t.bezierCurveTo(h,l,u,f,o,s)))},pointAt:function(t){return e(this.shape,t,!1)},tangentAt:function(t){var r=e(this.shape,t,!0);return i.normalize(r,r)}})}),define("zrender/graphic/helper/smoothSpline",["require","../../core/vector"],function(t){function e(t,e,r,i,n,a,o){var s=.5*(r-t),h=.5*(i-e);return(2*(e-r)+s+h)*o+(-3*(e-r)-2*s-h)*a+s*n+e}var r=t("../../core/vector");return function(t,i){for(var n=t.length,a=[],o=0,s=1;n>s;s++)o+=r.distance(t[s-1],t[s]);var h=o/2;h=n>h?n:h;for(var s=0;h>s;s++){var l,c,u,f=s/(h-1)*(i?n:n-1),d=Math.floor(f),v=f-d,p=t[d%n];i?(l=t[(d-1+n)%n],c=t[(d+1)%n],u=t[(d+2)%n]):(l=t[0===d?d:d-1],c=t[d>n-2?n-1:d+1],u=t[d>n-3?n-1:d+2]);var g=v*v,m=v*g;a.push([e(l[0],p[0],c[0],u[0],v,g,m),e(l[1],p[1],c[1],u[1],v,g,m)])}return a}}),define("zrender/graphic/helper/smoothBezier",["require","../../core/vector"],function(t){var e=t("../../core/vector"),r=e.min,i=e.max,n=e.scale,a=e.distance,o=e.add;return function(t,s,h,l){var c,u,f,d,v=[],p=[],g=[],m=[];if(l){f=[1/0,1/0],d=[-(1/0),-(1/0)];for(var _=0,y=t.length;y>_;_++)r(f,f,t[_]),i(d,d,t[_]);r(f,f,l[0]),i(d,d,l[1])}for(var _=0,y=t.length;y>_;_++){var x=t[_];if(h)c=t[_?_-1:y-1],u=t[(_+1)%y];else{if(0===_||_===y-1){v.push(e.clone(t[_]));continue}c=t[_-1],u=t[_+1]}e.sub(p,u,c),n(p,p,s);var b=a(x,c),w=a(x,u),T=b+w;0!==T&&(b/=T,w/=T),n(g,p,-b),n(m,p,w);var P=o([],x,g),k=o([],x,m);l&&(i(P,P,f),r(P,P,d),i(k,k,f),r(k,k,d)),v.push(P),v.push(k)}return h&&v.push(v.shift()),v}}),define("zrender/graphic/helper/poly",["require","./smoothSpline","./smoothBezier"],function(t){var e=t("./smoothSpline"),r=t("./smoothBezier");return{buildPath:function(t,i,n){var a=i.points,o=i.smooth;if(a&&a.length>=2){if(o&&"spline"!==o){var s=r(a,o,n,i.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var h=a.length,l=0;(n?h:h-1)>l;l++){var c=s[2*l],u=s[2*l+1],f=a[(l+1)%h];t.bezierCurveTo(c[0],c[1],u[0],u[1],f[0],f[1])}}else{"spline"===o&&(a=e(a,n)),t.moveTo(a[0][0],a[0][1]);for(var l=1,d=a.length;d>l;l++)t.lineTo(a[l][0],a[l][1])}n&&t.closePath()}}}}),define("zrender/graphic/shape/Polyline",["require","../helper/poly","../Path"],function(t){var e=t("../helper/poly");return t("../Path").extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,r){e.buildPath(t,r,!1)}})}),define("zrender/graphic/shape/Polygon",["require","../helper/poly","../Path"],function(t){var e=t("../helper/poly");return t("../Path").extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,r){e.buildPath(t,r,!0)}})}),define("zrender/graphic/Gradient",["require"],function(t){var e=function(t){this.colorStops=t||[]};return e.prototype={constructor:e,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}},e}),define("zrender/vml/core",["require","exports","module","../core/env"],function(t,e,r){if(!t("../core/env").canvasSupported){var i,n="urn:schemas-microsoft-com:vml",a=window,o=a.document,s=!1;try{!o.namespaces.zrvml&&o.namespaces.add("zrvml",n),i=function(t){return o.createElement("')}}catch(h){i=function(t){return o.createElement("<"+t+' xmlns="'+n+'" class="zrvml">')}}var l=function(){if(!s){s=!0;var t=o.styleSheets;t.length<31?o.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}};r.exports={doc:o,initVML:l,createNode:i}}}),define("zrender/vml/graphic",["require","../core/env","../core/vector","../core/BoundingRect","../core/PathProxy","../tool/color","../contain/text","../graphic/mixin/RectText","../graphic/Displayable","../graphic/Image","../graphic/Text","../graphic/Path","../graphic/Gradient","./core"],function(t){if(!t("../core/env").canvasSupported){var e=t("../core/vector"),r=t("../core/BoundingRect"),i=t("../core/PathProxy").CMD,n=t("../tool/color"),a=t("../contain/text"),o=t("../graphic/mixin/RectText"),s=t("../graphic/Displayable"),h=t("../graphic/Image"),l=t("../graphic/Text"),c=t("../graphic/Path"),u=t("../graphic/Gradient"),f=t("./core"),d=Math.round,v=Math.sqrt,p=Math.abs,g=Math.cos,m=Math.sin,_=Math.max,y=e.applyTransform,x=",",b="progid:DXImageTransform.Microsoft",w=21600,T=w/2,P=1e5,k=1e3,M=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=w+","+w,t.coordorigin="0,0"},z=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},C=function(t,e,r){return"rgb("+[t,e,r].join(",")+")"},S=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},L=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},R=function(t,e,r){return(parseFloat(t)||0)*P+(parseFloat(e)||0)*k+r},A=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},q=function(t,e,r){var i=n.parse(e);r=+r,isNaN(r)&&(r=1),i&&(t.color=C(i[0],i[1],i[2]),t.opacity=r*i[3])},E=function(t){var e=n.parse(t);return[C(e[0],e[1],e[2]),e[3]]},B=function(t,e,r){var i=e.fill;if(null!=i)if(i instanceof u){var n,a=0,o=[0,0],s=0,h=1,l=r.getBoundingRect(),c=l.width,f=l.height;if("linear"===i.type){n="gradient";var d=r.transform,v=[i.x*c,i.y*f],p=[i.x2*c,i.y2*f];d&&(y(v,v,d),y(p,p,d));var g=p[0]-v[0],m=p[1]-v[1];a=180*Math.atan2(g,m)/Math.PI,0>a&&(a+=360),1e-6>a&&(a=0)}else{n="gradientradial";var v=[i.x*c,i.y*f],d=r.transform,x=r.scale,b=c,T=f;o=[(v[0]-l.x)/b,(v[1]-l.y)/T],d&&y(v,v,d),b/=x[0]*w,T/=x[1]*w;var P=_(b,T);s=0/P,h=2*i.r/P-s}var k=i.colorStops.slice();k.sort(function(t,e){return t.offset-e.offset});for(var M=k.length,z=[],C=[],S=0;M>S;S++){var L=k[S],R=E(L.color);C.push(L.offset*h+s+" "+R[0]),(0===S||S===M-1)&&z.push(R)}if(M>=2){var A=z[0][0],B=z[1][0],I=z[0][1]*e.opacity,D=z[1][1]*e.opacity;t.type=n,t.method="none",t.focus="100%",t.angle=a,t.color=A,t.color2=B,t.colors=C.join(","),t.opacity=D,t.opacity2=I}"radial"===n&&(t.focusposition=o.join(","))}else q(t,i,e.opacity)},I=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof u||q(t,e.stroke,e.opacity)},D=function(t,e,r,i){var n="fill"==e,a=t.getElementsByTagName(e)[0];null!=r[e]&&"none"!==r[e]&&(n||!n&&r.lineWidth)?(t[n?"filled":"stroked"]="true",r[e]instanceof u&&L(t,a),a||(a=f.createNode(e)),n?B(a,r,i):I(a,r),S(t,a)):(t[n?"filled":"stroked"]="false",L(t,a))},O=[[],[],[]],F=function(t,e){var r,n,a,o,s,h,l=i.M,c=i.C,u=i.L,f=i.A,p=i.Q,_=[];for(o=0;o.01?V&&(N+=270/w):Math.abs(j-B)<1e-10?V&&E>N||!V&&N>E?M-=270/w:M+=270/w:V&&B>j||!V&&j>B?k+=270/w:k-=270/w),_.push(W,d(((E-I)*R+S)*w-T),x,d(((B-D)*A+L)*w-T),x,d(((E+I)*R+S)*w-T),x,d(((B+D)*A+L)*w-T),x,d((N*R+S)*w-T),x,d((j*A+L)*w-T),x,d((k*R+S)*w-T),x,d((M*A+L)*w-T)),s=k,h=M;break;case i.R:var G=O[0],X=O[1];G[0]=t[o++],G[1]=t[o++],X[0]=G[0]+t[o++],X[1]=G[1]+t[o++],e&&(y(G,G,e),y(X,X,e)),G[0]=d(G[0]*w-T),X[0]=d(X[0]*w-T),G[1]=d(G[1]*w-T),X[1]=d(X[1]*w-T),_.push(" m ",G[0],x,G[1]," l ",X[0],x,G[1]," l ",X[0],x,X[1]," l ",G[0],x,X[1]);break;case i.Z:_.push(" x ")}if(r>0){_.push(n);for(var Y=0;r>Y;Y++){var Z=O[Y];e&&y(Z,Z,e),_.push(d(Z[0]*w-T),x,d(Z[1]*w-T),r-1>Y?x:"")}}}return _.join("")};c.prototype.brushVML=function(t){var e=this.style,r=this._vmlEl;r||(r=f.createNode("shape"),M(r),this._vmlEl=r),D(r,"fill",e,this),D(r,"stroke",e,this);var i=this.transform,n=null!=i,a=r.getElementsByTagName("stroke")[0];if(a){var o=e.lineWidth;if(n&&!e.strokeNoScale){var s=i[0]*i[3]-i[1]*i[2];o*=v(p(s))}a.weight=o+"px"}var h=this.path;this.__dirtyPath&&(h.beginPath(),this.buildPath(h,this.shape),h.toStatic(),this.__dirtyPath=!1),r.path=F(h.data,this.transform),r.style.zIndex=R(this.zlevel,this.z,this.z2),S(t,r),e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},c.prototype.onRemove=function(t){L(t,this._vmlEl),this.removeRectText(t)},c.prototype.onAdd=function(t){S(t,this._vmlEl),this.appendRectText(t)};var H=function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()};h.prototype.brushVML=function(t){var e,r,i=this.style,n=i.image;if(H(n)){var a=n.src;if(a===this._imageSrc)e=this._imageWidth,r=this._imageHeight;else{var o=n.runtimeStyle,s=o.width,h=o.height;o.width="auto",o.height="auto",e=n.width,r=n.height,o.width=s,o.height=h,this._imageSrc=a,this._imageWidth=e,this._imageHeight=r}n=a}else n===this._imageSrc&&(e=this._imageWidth,r=this._imageHeight);if(n){var l=i.x||0,c=i.y||0,u=i.width,p=i.height,g=i.sWidth,m=i.sHeight,w=i.sx||0,T=i.sy||0,P=g&&m,k=this._vmlEl;k||(k=f.doc.createElement("div"),M(k),this._vmlEl=k);var z,C=k.style,L=!1,A=1,q=1;if(this.transform&&(z=this.transform,A=v(z[0]*z[0]+z[1]*z[1]),q=v(z[2]*z[2]+z[3]*z[3]),L=z[1]||z[2]),L){var E=[l,c],B=[l+u,c],I=[l,c+p],D=[l+u,c+p];y(E,E,z),y(B,B,z),y(I,I,z),y(D,D,z);var O=_(E[0],B[0],I[0],D[0]),F=_(E[1],B[1],I[1],D[1]),V=[];V.push("M11=",z[0]/A,x,"M12=",z[2]/q,x,"M21=",z[1]/A,x,"M22=",z[3]/q,x,"Dx=",d(l*A+z[4]),x,"Dy=",d(c*q+z[5])),C.padding="0 "+d(O)+"px "+d(F)+"px 0",C.filter=b+".Matrix("+V.join("")+", SizingMethod=clip)"}else z&&(l=l*A+z[4],c=c*q+z[5]),C.filter="",C.left=d(l)+"px",C.top=d(c)+"px";var N=this._imageEl,j=this._cropEl;N||(N=f.doc.createElement("div"),this._imageEl=N);var W=N.style;if(P){if(e&&r)W.width=d(A*e*u/g)+"px",W.height=d(q*r*p/m)+"px";else{var G=new Image,X=this;G.onload=function(){G.onload=null,e=G.width,r=G.height,W.width=d(A*e*u/g)+"px",W.height=d(q*r*p/m)+"px",X._imageWidth=e,X._imageHeight=r,X._imageSrc=n},G.src=n}j||(j=f.doc.createElement("div"),j.style.overflow="hidden",this._cropEl=j);var Y=j.style;Y.width=d((u+w*u/g)*A),Y.height=d((p+T*p/m)*q),Y.filter=b+".Matrix(Dx="+-w*u/g*A+",Dy="+-T*p/m*q+")",j.parentNode||k.appendChild(j),N.parentNode!=j&&j.appendChild(N)}else W.width=d(A*u)+"px",W.height=d(q*p)+"px",k.appendChild(N),j&&j.parentNode&&(k.removeChild(j),this._cropEl=null);var Z="",U=i.opacity;1>U&&(Z+=".Alpha(opacity="+d(100*U)+") "),Z+=b+".AlphaImageLoader(src="+n+", SizingMethod=scale)",W.filter=Z,k.style.zIndex=R(this.zlevel,this.z,this.z2),S(t,k),i.text&&this.drawRectText(t,this.getBoundingRect())}},h.prototype.onRemove=function(t){L(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},h.prototype.onAdd=function(t){S(t,this._vmlEl),this.appendRectText(t)};var V,N="normal",j={},W=0,G=100,X=document.createElement("div"),Y=function(t){var e=j[t];if(!e){W>G&&(W=0,j={});var r,i=X.style;try{i.font=t,r=i.fontFamily.split(",")[0]}catch(n){}e={style:i.fontStyle||N,variant:i.fontVariant||N,weight:i.fontWeight||N,size:0|parseFloat(i.fontSize||12),family:r||"Microsoft YaHei"},j[t]=e,W++}return e};a.measureText=function(t,e){var r=f.doc;V||(V=r.createElement("div"),V.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",f.doc.body.appendChild(V));try{V.style.font=e}catch(i){}return V.innerHTML="",V.appendChild(r.createTextNode(t)),{width:V.offsetWidth}};for(var Z=new r,U=function(t,e,r,i){var n=this.style,o=n.text;if(o){var s,h,l=n.textAlign,c=Y(n.textFont),u=c.style+" "+c.variant+" "+c.weight+" "+c.size+'px "'+c.family+'"',v=n.textBaseline,p=n.textVerticalAlign;r=r||a.getBoundingRect(o,u,l,v);var g=this.transform;if(g&&!i&&(Z.copy(e),Z.applyTransform(g),e=Z),i)s=e.x,h=e.y;else{var m=n.textPosition,_=n.textDistance;if(m instanceof Array)s=e.x+A(m[0],e.width),h=e.y+A(m[1],e.height),l=l||"left",v=v||"top";else{var b=a.adjustTextPositionOnRect(m,e,r,_);s=b.x,h=b.y,l=l||b.textAlign,v=v||b.textBaseline}}if(p){switch(p){case"middle":h-=r.height/2;break;case"bottom":h-=r.height}v="top"}var w=c.size;switch(v){case"hanging":case"top":h+=w/1.75;break;case"middle":break;default:h-=w/2.25}switch(l){case"left":break;case"center":s-=r.width/2;break;case"right":s-=r.width}var T,P,k,C=f.createNode,L=this._textVmlEl;L?(k=L.firstChild,T=k.nextSibling,P=T.nextSibling):(L=C("line"),T=C("path"),P=C("textpath"),k=C("skew"),P.style["v-text-align"]="left",M(L),T.textpathok=!0,P.on=!0,L.from="0 0",L.to="1000 0.05",S(L,k),S(L,T),S(L,P),this._textVmlEl=L);var q=[s,h],E=L.style;g&&i?(y(q,q,g),k.on=!0,k.matrix=g[0].toFixed(3)+x+g[2].toFixed(3)+x+g[1].toFixed(3)+x+g[3].toFixed(3)+",0,0",k.offset=(d(q[0])||0)+","+(d(q[1])||0),k.origin="0 0",E.left="0px",E.top="0px"):(k.on=!1,E.left=d(s)+"px",E.top=d(h)+"px"),P.string=z(o);try{P.style.font=u}catch(B){}D(L,"fill",{fill:i?n.fill:n.textFill,opacity:n.opacity},this),D(L,"stroke",{stroke:i?n.stroke:n.textStroke,opacity:n.opacity,lineDash:n.lineDash},this),L.style.zIndex=R(this.zlevel,this.z,this.z2),S(t,L)}},Q=function(t){L(t,this._textVmlEl),this._textVmlEl=null},$=function(t){S(t,this._textVmlEl)},K=[o,s,h,c,l],J=0;J=10)}}var e={};return e="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0}:t(navigator.userAgent)}),define("zrender/core/util",["require"],function(t){function e(t){if("object"==typeof t&&null!==t){var r=t;if(t instanceof Array){r=[];for(var i=0,n=t.length;n>i;i++)r[i]=e(t[i])}else if(!T(t)&&!P(t)){r={};for(var a in t)t.hasOwnProperty(a)&&(r[a]=e(t[a]))}return r}return t}function r(t,i,n){if(!w(i)||!w(t))return n?e(i):t;for(var a in i)if(i.hasOwnProperty(a)){var o=t[a],s=i[a];!w(s)||!w(o)||y(s)||y(o)||P(s)||P(o)||T(s)||T(o)?!n&&a in t||(t[a]=e(i[a],!0)):r(o,s,n)}return t}function i(t,e){for(var i=t[0],n=1,a=t.length;a>n;n++)i=r(i,t[n],e);return i}function n(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function a(t,e,r){for(var i in e)e.hasOwnProperty(i)&&(r?null!=e[i]:null==t[i])&&(t[i]=e[i]);return t}function o(){return document.createElement("canvas")}function s(){return S||(S=D.createCanvas().getContext("2d")),S}function h(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,i=t.length;i>r;r++)if(t[r]===e)return r}return-1}function l(t,e){function r(){}var i=t.prototype;r.prototype=e.prototype,t.prototype=new r;for(var n in i)t.prototype[n]=i[n];t.prototype.constructor=t,t.superClass=e}function c(t,e,r){t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,a(t,e,r)}function u(t){return t?"string"==typeof t?!1:"number"==typeof t.length:void 0}function f(t,e,r){if(t&&e)if(t.forEach&&t.forEach===A)t.forEach(e,r);else if(t.length===+t.length)for(var i=0,n=t.length;n>i;i++)e.call(r,t[i],i,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(r,t[a],a,t)}function d(t,e,r){if(t&&e){if(t.map&&t.map===B)return t.map(e,r);for(var i=[],n=0,a=t.length;a>n;n++)i.push(e.call(r,t[n],n,t));return i}}function p(t,e,r,i){if(t&&e){if(t.reduce&&t.reduce===I)return t.reduce(e,r,i);for(var n=0,a=t.length;a>n;n++)r=e.call(i,r,t[n],n,t);return r}}function v(t,e,r){if(t&&e){if(t.filter&&t.filter===q)return t.filter(e,r);for(var i=[],n=0,a=t.length;a>n;n++)e.call(r,t[n],n,t)&&i.push(t[n]);return i}}function g(t,e,r){if(t&&e)for(var i=0,n=t.length;n>i;i++)if(e.call(r,t[i],i,t))return t[i]}function m(t,e){var r=E.call(arguments,2);return function(){return t.apply(e,r.concat(E.call(arguments)))}}function _(t){var e=E.call(arguments,1);return function(){return t.apply(this,e.concat(E.call(arguments)))}}function y(t){return"[object Array]"===L.call(t)}function x(t){return"function"==typeof t}function b(t){return"[object String]"===L.call(t)}function w(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function T(t){return!!C[L.call(t)]}function P(t){return t&&1===t.nodeType&&"string"==typeof t.nodeName}function k(t){for(var e=0,r=arguments.length;r>e;e++)if(null!=arguments[e])return arguments[e]}function z(){return Function.call.apply(E,arguments)}function M(t,e){if(!t)throw new Error(e)}var S,C={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1},L=Object.prototype.toString,R=Array.prototype,A=R.forEach,q=R.filter,E=R.slice,B=R.map,I=R.reduce,D={inherits:l,mixin:c,clone:e,merge:r,mergeAll:i,extend:n,defaults:a,getContext:s,createCanvas:o,indexOf:h,slice:z,find:g,isArrayLike:u,each:f,map:d,reduce:p,filter:v,bind:m,curry:_,isArray:y,isString:b,isObject:w,isFunction:x,isBuildInObject:T,isDom:P,retrieve:k,assert:M,noop:function(){}};return D}),define("zrender/mixin/Draggable",["require"],function(t){function e(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}return e.prototype={constructor:e,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(e,"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var r=t.offsetX,i=t.offsetY,n=r-this._x,a=i-this._y;this._x=r,this._y=i,e.drift(n,a,t),this.dispatchToElement(e,"drag",t.event);var o=this.findHover(r,i,e),s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(s,"dragleave",t.event),o&&o!==s&&this.dispatchToElement(o,"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(e,"dragend",t.event),this._dropTarget&&this.dispatchToElement(this._dropTarget,"drop",t.event),this._draggingTarget=null,this._dropTarget=null}},e}),define("zrender/mixin/Eventful",["require"],function(t){var e=Array.prototype.slice,r=function(){this._$handlers={}};return r.prototype={constructor:r,one:function(t,e,r){var i=this._$handlers;if(!e||!t)return this;i[t]||(i[t]=[]);for(var n=0;nn;n++)r[t][n].h!=e&&i.push(r[t][n]);r[t]=i}r[t]&&0===r[t].length&&delete r[t]}else delete r[t];return this},trigger:function(t){if(this._$handlers[t]){var r=arguments,i=r.length;i>3&&(r=e.call(r,1));for(var n=this._$handlers[t],a=n.length,o=0;a>o;){switch(i){case 1:n[o].h.call(n[o].ctx);break;case 2:n[o].h.call(n[o].ctx,r[1]);break;case 3:n[o].h.call(n[o].ctx,r[1],r[2]);break;default:n[o].h.apply(n[o].ctx,r)}n[o].one?(n.splice(o,1),a--):o++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var r=arguments,i=r.length;i>4&&(r=e.call(r,1,r.length-1));for(var n=r[r.length-1],a=this._$handlers[t],o=a.length,s=0;o>s;){switch(i){case 1:a[s].h.call(n);break;case 2:a[s].h.call(n,r[1]);break;case 3:a[s].h.call(n,r[1],r[2]);break;default:a[s].h.apply(n,r)}a[s].one?(a.splice(s,1),o--):s++}}return this}},r}),define("zrender/Handler",["require","./core/util","./mixin/Draggable","./mixin/Eventful"],function(t){function e(t,e,r){return{type:t,event:r,target:e,cancelBubble:!1,offsetX:r.zrX,offsetY:r.zrY,gestureEvent:r.gestureEvent,pinchX:r.pinchX,pinchY:r.pinchY,pinchScale:r.pinchScale,wheelDelta:r.zrDelta}}function r(){}function i(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var i=t;i;){if(i.silent||i.clipPath&&!i.clipPath.contain(e,r))return!1;i=i.parent}return!0}return!1}var n=t("./core/util"),a=t("./mixin/Draggable"),o=t("./mixin/Eventful");r.prototype.dispose=function(){};var s=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],h=function(t,e,i,h){o.call(this),this.storage=t,this.painter=e,this.painterRoot=h,i=i||new r,this.proxy=i,i.handler=this,this._hovered,this._lastTouchMoment,this._lastX,this._lastY,a.call(this),n.each(s,function(t){i.on&&i.on(t,this[t],this)},this)};return h.prototype={constructor:h,mousemove:function(t){var e=t.zrX,r=t.zrY,i=this.findHover(e,r,null),n=this._hovered,a=this.proxy;this._hovered=i,a.setCursor&&a.setCursor(i?i.cursor:"default"),n&&i!==n&&n.__zr&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(i,"mousemove",t),i&&i!==n&&this.dispatchToElement(i,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,r=t.toElement||t.relatedTarget;do r=r&&r.parentNode;while(r&&9!=r.nodeType&&!(e=r===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(t){this._hovered=null},dispatch:function(t,e){var r=this[t];r&&r.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,r,i){for(var n="on"+r,a=e(r,t,i),o=t;o&&(o[n]&&(a.cancelBubble=o[n].call(o,a)),o.trigger(r,a),o=o.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(r,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[n]&&t[n].call(t,a),t.trigger&&t.trigger(r,a)}))},findHover:function(t,e,r){for(var n=this.storage.getDisplayList(),a=n.length-1;a>=0;a--)if(!n[a].silent&&n[a]!==r&&!n[a].ignore&&i(n[a],t,e))return n[a]}},n.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){h.prototype[t]=function(e){var r=this.findHover(e.zrX,e.zrY,null);if("mousedown"===t)this._downel=r,this._upel=r;else if("mosueup"===t)this._upel=r;else if("click"===t&&this._downel!==this._upel)return;this.dispatchToElement(r,t,e)}}),n.mixin(h,o),n.mixin(h,a),h}),define("zrender/core/matrix",[],function(){var t="undefined"==typeof Float32Array?Array:Float32Array,e={create:function(){var r=new t(6);return e.identity(r),r},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},mul:function(t,e,r){var i=e[0]*r[0]+e[2]*r[1],n=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],h=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=i,t[1]=n,t[2]=a,t[3]=o,t[4]=s,t[5]=h,t},translate:function(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t},rotate:function(t,e,r){var i=e[0],n=e[2],a=e[4],o=e[1],s=e[3],h=e[5],l=Math.sin(r),c=Math.cos(r);return t[0]=i*c+o*l,t[1]=-i*l+o*c,t[2]=n*c+s*l,t[3]=-n*l+c*s,t[4]=c*a+l*h,t[5]=c*h-l*a,t},scale:function(t,e,r){var i=r[0],n=r[1];return t[0]=e[0]*i,t[1]=e[1]*n,t[2]=e[2]*i,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*n,t},invert:function(t,e){var r=e[0],i=e[2],n=e[4],a=e[1],o=e[3],s=e[5],h=r*o-a*i;return h?(h=1/h,t[0]=o*h,t[1]=-a*h,t[2]=-i*h,t[3]=r*h,t[4]=(i*s-o*n)*h,t[5]=(a*n-r*s)*h,t):null}};return e}),define("zrender/core/vector",[],function(){var t="undefined"==typeof Float32Array?Array:Float32Array,e={create:function(e,r){var i=new t(2);return null==e&&(e=0),null==r&&(r=0),i[0]=e,i[1]=r,i},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:function(e){var r=new t(2);return r[0]=e[0],r[1]=e[1],r},set:function(t,e,r){return t[0]=e,t[1]=r,t},add:function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t},scaleAndAdd:function(t,e,r,i){return t[0]=e[0]+r[0]*i,t[1]=e[1]+r[1]*i,t},sub:function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t},len:function(t){return Math.sqrt(this.lenSquare(t))},lenSquare:function(t){return t[0]*t[0]+t[1]*t[1]},mul:function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t},div:function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t},normalize:function(t,r){var i=e.len(r);return 0===i?(t[0]=0,t[1]=0):(t[0]=r[0]/i,t[1]=r[1]/i),t},distance:function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))},distanceSquare:function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])},negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:function(t,e,r,i){return t[0]=e[0]+i*(r[0]-e[0]),t[1]=e[1]+i*(r[1]-e[1]),t},applyTransform:function(t,e,r){var i=e[0],n=e[1];return t[0]=r[0]*i+r[2]*n+r[4],t[1]=r[1]*i+r[3]*n+r[5],t},min:function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t},max:function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}};return e.length=e.len,e.lengthSquare=e.lenSquare,e.dist=e.distance,e.distSquare=e.distanceSquare,e}),define("zrender/mixin/Transformable",["require","../core/matrix","../core/vector"],function(t){function e(t){return t>a||-a>t}var r=t("../core/matrix"),i=t("../core/vector"),n=r.identity,a=5e-5,o=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},s=o.prototype;s.transform=null,s.needLocalTransform=function(){return e(this.rotation)||e(this.position[0])||e(this.position[1])||e(this.scale[0]-1)||e(this.scale[1]-1)},s.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),a=this.transform;return i||e?(a=a||r.create(),i?this.getLocalTransform(a):n(a),e&&(i?r.mul(a,t.transform,a):r.copy(a,t.transform)),this.transform=a,this.invTransform=this.invTransform||r.create(),void r.invert(this.invTransform,a)):void(a&&n(a))},s.getLocalTransform=function(t){t=t||[],n(t);var e=this.origin,i=this.scale,a=this.rotation,o=this.position;return e&&(t[4]-=e[0],t[5]-=e[1]),r.scale(t,t,i),a&&r.rotate(t,t,a),e&&(t[4]+=e[0],t[5]+=e[1]),t[4]+=o[0],t[5]+=o[1],t},s.setTransform=function(t){var e=this.transform,r=t.dpr||1;e?t.setTransform(r*e[0],r*e[1],r*e[2],r*e[3],r*e[4],r*e[5]):t.setTransform(r,0,0,r,0,0)},s.restoreTransform=function(t){var e=(this.transform,t.dpr||1);t.setTransform(e,0,0,e,0,0)};var h=[];return s.decomposeTransform=function(){if(this.transform){var t=this.parent,i=this.transform;t&&t.transform&&(r.mul(h,t.invTransform,i),i=h);var n=i[0]*i[0]+i[1]*i[1],a=i[2]*i[2]+i[3]*i[3],o=this.position,s=this.scale;e(n-1)&&(n=Math.sqrt(n)),e(a-1)&&(a=Math.sqrt(a)),i[0]<0&&(n=-n),i[3]<0&&(a=-a),o[0]=i[4],o[1]=i[5],s[0]=n,s[1]=a,this.rotation=Math.atan2(-i[1]/a,i[0]/n)}},s.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),r=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(r=-r),[e,r]},s.transformCoordToLocal=function(t,e){var r=[t,e],n=this.invTransform;return n&&i.applyTransform(r,r,n),r},s.transformCoordToGlobal=function(t,e){var r=[t,e],n=this.transform;return n&&i.applyTransform(r,r,n),r},o}),define("zrender/animation/easing",[],function(){var t={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,r=.1,i=.4;return 0===t?0:1===t?1:(!r||1>r?(r=1,e=i/4):e=i*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)))},elasticOut:function(t){var e,r=.1,i=.4;return 0===t?0:1===t?1:(!r||1>r?(r=1,e=i/4):e=i*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},elasticInOut:function(t){var e,r=.1,i=.4;return 0===t?0:1===t?1:(!r||1>r?(r=1,e=i/4):e=i*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?-.5*(r*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)):r*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*(t*t*((e+1)*t-e)):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(e){return 1-t.bounceOut(1-e)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(e){return.5>e?.5*t.bounceIn(2*e):.5*t.bounceOut(2*e-1)+.5}};return t}),define("zrender/animation/Clip",["require","./easing"],function(t){function e(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null==t.loop?!1:t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}var r=t("./easing");return e.prototype={constructor:e,step:function(t){this._initialized||(this._startTime=t+this._delay,this._initialized=!0);var e=(t-this._startTime)/this._life;if(!(0>e)){e=Math.min(e,1);var i=this.easing,n="string"==typeof i?r[i]:i,a="function"==typeof n?n(e):e;return this.fire("frame",a),1==e?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(t){var e=(t-this._startTime)%this._life;this._startTime=t-e+this.gap,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)}},e}),define("zrender/tool/color",["require"],function(t){function e(t){return t=Math.round(t),0>t?0:t>255?255:t}function r(t){return t=Math.round(t),0>t?0:t>360?360:t}function i(t){return 0>t?0:t>1?1:t}function n(t){return e(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function a(t){return i(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function o(t,e,r){return 0>r?r+=1:r>1&&(r-=1),1>6*r?t+(e-t)*r*6:1>2*r?e:2>3*r?t+(e-t)*(2/3-r)*6:t}function s(t,e,r){return t+(e-t)*r}function h(t){if(t){t+="";var e=t.replace(/ /g,"").toLowerCase();if(e in _)return _[e].slice();if("#"!==e.charAt(0)){var r=e.indexOf("("),i=e.indexOf(")");if(-1!==r&&i+1===e.length){var o=e.substr(0,r),s=e.substr(r+1,i-(r+1)).split(","),h=1;switch(o){case"rgba":if(4!==s.length)return;h=a(s.pop());case"rgb":if(3!==s.length)return;return[n(s[0]),n(s[1]),n(s[2]),h];case"hsla":if(4!==s.length)return;return s[3]=a(s[3]),l(s);case"hsl":if(3!==s.length)return;return l(s);default:return}}}else{if(4===e.length){var c=parseInt(e.substr(1),16);if(!(c>=0&&4095>=c))return;return[(3840&c)>>4|(3840&c)>>8,240&c|(240&c)>>4,15&c|(15&c)<<4,1]}if(7===e.length){var c=parseInt(e.substr(1),16);if(!(c>=0&&16777215>=c))return;return[(16711680&c)>>16,(65280&c)>>8,255&c,1]}}}}function l(t){var r=(parseFloat(t[0])%360+360)%360/360,i=a(t[1]),n=a(t[2]),s=.5>=n?n*(i+1):n+i-n*i,h=2*n-s,l=[e(255*o(h,s,r+1/3)),e(255*o(h,s,r)),e(255*o(h,s,r-1/3))];return 4===t.length&&(l[3]=t[3]),l}function c(t){if(t){var e,r,i=t[0]/255,n=t[1]/255,a=t[2]/255,o=Math.min(i,n,a),s=Math.max(i,n,a),h=s-o,l=(s+o)/2;if(0===h)e=0,r=0;else{r=.5>l?h/(s+o):h/(2-s-o);var c=((s-i)/6+h/2)/h,u=((s-n)/6+h/2)/h,f=((s-a)/6+h/2)/h;i===s?e=f-u:n===s?e=1/3+c-f:a===s&&(e=2/3+u-c),0>e&&(e+=1),e>1&&(e-=1)}var d=[360*e,r,l];return null!=t[3]&&d.push(t[3]),d}}function u(t,e){var r=h(t);if(r){for(var i=0;3>i;i++)0>e?r[i]=r[i]*(1-e)|0:r[i]=(255-r[i])*e+r[i]|0;return m(r,4===r.length?"rgba":"rgb")}}function f(t,e){var r=h(t);return r?((1<<24)+(r[0]<<16)+(r[1]<<8)+ +r[2]).toString(16).slice(1):void 0}function d(t,r,i){if(r&&r.length&&t>=0&&1>=t){i=i||[0,0,0,0];var n=t*(r.length-1),a=Math.floor(n),o=Math.ceil(n),h=r[a],l=r[o],c=n-a;return i[0]=e(s(h[0],l[0],c)),i[1]=e(s(h[1],l[1],c)),i[2]=e(s(h[2],l[2],c)),i[3]=e(s(h[3],l[3],c)),i}}function p(t,r,n){if(r&&r.length&&t>=0&&1>=t){var a=t*(r.length-1),o=Math.floor(a),l=Math.ceil(a),c=h(r[o]),u=h(r[l]),f=a-o,d=m([e(s(c[0],u[0],f)),e(s(c[1],u[1],f)),e(s(c[2],u[2],f)),i(s(c[3],u[3],f))],"rgba");return n?{color:d,leftIndex:o,rightIndex:l,value:a}:d}}function v(t,e,i,n){return t=h(t),t?(t=c(t),null!=e&&(t[0]=r(e)),null!=i&&(t[1]=a(i)),null!=n&&(t[2]=a(n)),m(l(t),"rgba")):void 0}function g(t,e){return t=h(t),t&&null!=e?(t[3]=i(e),m(t,"rgba")):void 0}function m(t,e){var r=t[0]+","+t[1]+","+t[2];return("rgba"===e||"hsva"===e||"hsla"===e)&&(r+=","+t[3]),e+"("+r+")"}var _={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]};return{parse:h,lift:u,toHex:f,fastMapToColor:d,mapToColor:p,modifyHSL:v,modifyAlpha:g,stringify:m}}),define("zrender/animation/Animator",["require","./Clip","../tool/color","../core/util"],function(t){function e(t,e){return t[e]}function r(t,e,r){t[e]=r}function i(t,e,r){return(e-t)*r+t}function n(t,e,r){return r>.5?e:t}function a(t,e,r,n,a){var o=t.length;if(1==a)for(var s=0;o>s;s++)n[s]=i(t[s],e[s],r);else for(var h=t[0].length,s=0;o>s;s++)for(var l=0;h>l;l++)n[s][l]=i(t[s][l],e[s][l],r)}function o(t,e,r){var i=t.length,n=e.length;if(i!==n){var a=i>n;if(a)t.length=n;else for(var o=i;n>o;o++)t.push(1===r?e[o]:m.call(e[o]))}for(var s=t[0]&&t[0].length,o=0;oh;h++)isNaN(t[o][h])&&(t[o][h]=e[o][h])}function s(t,e,r){if(t===e)return!0;var i=t.length;if(i!==e.length)return!1;if(1===r){for(var n=0;i>n;n++)if(t[n]!==e[n])return!1}else for(var a=t[0].length,n=0;i>n;n++)for(var o=0;a>o;o++)if(t[n][o]!==e[n][o])return!1;return!0}function h(t,e,r,i,n,a,o,s,h){var c=t.length;if(1==h)for(var u=0;c>u;u++)s[u]=l(t[u],e[u],r[u],i[u],n,a,o);else for(var f=t[0].length,u=0;c>u;u++)for(var d=0;f>d;d++)s[u][d]=l(t[u][d],e[u][d],r[u][d],i[u][d],n,a,o)}function l(t,e,r,i,n,a,o){var s=.5*(r-t),h=.5*(i-e);return(2*(e-r)+s+h)*o+(-3*(e-r)-2*s-h)*a+s*n+e}function c(t){if(g(t)){var e=t.length;if(g(t[0])){for(var r=[],i=0;e>i;i++)r.push(m.call(t[i]));return r}return m.call(t)}return t}function u(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function f(t,e,r,c,f){var v=t._getter,m=t._setter,_="spline"===e,y=c.length;if(y){var x,b=c[0].value,w=g(b),T=!1,P=!1,k=w&&g(b[0])?2:1;c.sort(function(t,e){return t.time-e.time}),x=c[y-1].time;for(var z=[],M=[],S=c[0].value,C=!0,L=0;y>L;L++){z.push(c[L].time/x);var R=c[L].value;if(w&&s(R,S,k)||!w&&R===S||(C=!1),S=R,"string"==typeof R){var A=p.parse(R);A?(R=A,T=!0):P=!0}M.push(R)}if(!C){for(var q=M[y-1],L=0;y-1>L;L++)w?o(M[L],q,k):!isNaN(M[L])||isNaN(q)||P||T||(M[L]=q);w&&o(v(t._target,f),q,k);var E,B,I,D,O,F,H=0,V=0;if(T)var N=[0,0,0,0];var j=function(t,e){var r;if(0>e)r=0;else if(V>e){for(E=Math.min(H+1,y-1),r=E;r>=0&&!(z[r]<=e);r--);r=Math.min(r,y-2)}else{for(r=H;y>r&&!(z[r]>e);r++);r=Math.min(r-1,y-2)}H=r,V=e;var o=z[r+1]-z[r];if(0!==o)if(B=(e-z[r])/o,_)if(D=M[r],I=M[0===r?r:r-1],O=M[r>y-2?y-1:r+1],F=M[r>y-3?y-1:r+2],w)h(I,D,O,F,B,B*B,B*B*B,v(t,f),k);else{var s;if(T)s=h(I,D,O,F,B,B*B,B*B*B,N,1),s=u(N);else{if(P)return n(D,O,B);s=l(I,D,O,F,B,B*B,B*B*B)}m(t,f,s)}else if(w)a(M[r],M[r+1],B,v(t,f),k);else{var s;if(T)a(M[r],M[r+1],B,N,1),s=u(N);else{if(P)return n(M[r],M[r+1],B);s=i(M[r],M[r+1],B)}m(t,f,s)}},X=new d({target:t._target,life:x,loop:t._loop,delay:t._delay,onframe:j,ondestroy:r});return e&&"spline"!==e&&(X.easing=e),X}}}var d=t("./Clip"),p=t("../tool/color"),v=t("../core/util"),g=v.isArrayLike,m=Array.prototype.slice,_=function(t,i,n,a){this._tracks={},this._target=t,this._loop=i||!1,this._getter=n||e,this._setter=a||r,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};return _.prototype={when:function(t,e){var r=this._tracks;for(var i in e)if(e.hasOwnProperty(i)){if(!r[i]){r[i]=[];var n=this._getter(this._target,i);if(null==n)continue;0!==t&&r[i].push({time:0,value:c(n)})}r[i].push({time:t,value:e[i]})}return this},during:function(t){return this._onframeList.push(t),this},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,r=0;e>r;r++)t[r].call(this)},start:function(t){var e,r=this,i=0,n=function(){i--,i||r._doneCallback()};for(var a in this._tracks)if(this._tracks.hasOwnProperty(a)){var o=f(this,t,n,this._tracks[a],a);o&&(this._clipList.push(o),i++,this.animation&&this.animation.addClip(o),e=o)}if(e){var s=e.onframe;e.onframe=function(t,e){s(t,e);for(var i=0;i1)for(var t in arguments)console.log(arguments[t])}}),define("zrender/mixin/Animatable",["require","../animation/Animator","../core/util","../core/log"],function(t){var e=t("../animation/Animator"),r=t("../core/util"),i=r.isString,n=r.isFunction,a=r.isObject,o=t("../core/log"),s=function(){this.animators=[]};return s.prototype={constructor:s,animate:function(t,i){var n,a=!1,s=this,h=this.__zr;if(t){var l=t.split("."),c=s;a="shape"===l[0];for(var u=0,f=l.length;f>u;u++)c&&(c=c[l[u]]);c&&(n=c)}else n=s;if(!n)return void o('Property "'+t+'" is not existed in element '+s.id);var d=s.animators,p=new e(n,i);return p.during(function(t){s.dirty(a)}).done(function(){d.splice(r.indexOf(d,p),1)}),d.push(p),h&&h.animation.addAnimator(p),p},stopAnimation:function(t){for(var e=this.animators,r=e.length,i=0;r>i;i++)e[i].stop(t);return e.length=0,this},animateTo:function(t,e,r,a,o){function s(){l--,l||o&&o()}i(r)?(o=a,a=r,r=0):n(a)?(o=a,a="linear",r=0):n(r)?(o=r,r=0):n(e)?(o=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,r,a,o);var h=this.animators.slice(),l=h.length;l||o&&o();for(var c=0;c0&&this.animate(t,!1).when(null==n?500:n,s).delay(o||0),this}},s}),define("zrender/Element",["require","./core/guid","./mixin/Eventful","./mixin/Transformable","./mixin/Animatable","./core/util"],function(t){var e=t("./core/guid"),r=t("./mixin/Eventful"),i=t("./mixin/Transformable"),n=t("./mixin/Animatable"),a=t("./core/util"),o=function(t){i.call(this,t),r.call(this,t),n.call(this,t),this.id=t.id||e()};return o.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=t,r[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var r=this[t];r||(r=this[t]=[]),r[0]=e[0],r[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(a.isObject(t))for(var r in t)t.hasOwnProperty(r)&&this.attrKV(r,t[r]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var r=0;rr&&(t+=r,r=-r),0>i&&(e+=i,i=-i),this.x=t,this.y=e,this.width=r,this.height=i}var r=t("./vector"),i=t("./matrix"),n=r.applyTransform,a=Math.min,o=Math.abs,s=Math.max;return e.prototype={constructor:e,union:function(t){var e=a(t.x,this.x),r=a(t.y,this.y);this.width=s(t.x+t.width,this.x+this.width)-e,this.height=s(t.y+t.height,this.y+this.height)-r,this.x=e,this.y=r},applyTransform:function(){var t=[],e=[];return function(r){r&&(t[0]=this.x,t[1]=this.y,e[0]=this.x+this.width,e[1]=this.y+this.height,n(t,t,r),n(e,e,r),this.x=a(t[0],e[0]),this.y=a(t[1],e[1]),this.width=o(e[0]-t[0]),this.height=o(e[1]-t[1]))}}(),calculateTransform:function(t){var e=this,r=t.width/e.width,n=t.height/e.height,a=i.create();return i.translate(a,a,[-e.x,-e.y]),i.scale(a,a,[r,n]),i.translate(a,a,[t.x,t.y]),a},intersect:function(t){t instanceof e||(t=e.create(t));var r=this,i=r.x,n=r.x+r.width,a=r.y,o=r.y+r.height,s=t.x,h=t.x+t.width,l=t.y,c=t.y+t.height;return!(s>n||i>h||l>o||a>c)},contain:function(t,e){var r=this;return t>=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height},clone:function(){return new e(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e}),define("zrender/container/Group",["require","../core/util","../Element","../core/BoundingRect"],function(t){var e=t("../core/util"),r=t("../Element"),i=t("../core/BoundingRect"),n=function(t){t=t||{},r.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};return n.prototype={constructor:n,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,r=0;r=0&&(r.splice(i,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,r=this.__zr;e&&e!==t.__storage&&(e.addToMap(t),t instanceof n&&t.addChildrenToStorage(e)),r&&r.refresh()},remove:function(t){var r=this.__zr,i=this.__storage,a=this._children,o=e.indexOf(a,t);return 0>o?this:(a.splice(o,1),t.parent=null,i&&(i.delFromMap(t.id),t instanceof n&&t.delChildrenFromStorage(i)),r&&r.refresh(),this)},removeAll:function(){var t,e,r=this._children,i=this.__storage;for(e=0;e=h;)e|=1&t,t>>=1;return t+e}function e(t,e,i,n){var a=e+1;if(a===i)return 1;if(n(t[a++],t[e])<0){for(;i>a&&n(t[a],t[a-1])<0;)a++;r(t,e,a)}else for(;i>a&&n(t[a],t[a-1])>=0;)a++;return a-e}function r(t,e,r){for(r--;r>e;){var i=t[e];t[e++]=t[r],t[r--]=i}}function i(t,e,r,i,n){for(i===e&&i++;r>i;i++){for(var a,o=t[i],s=e,h=i;h>s;)a=s+h>>>1,n(o,t[a])<0?h=a:s=a+1;var l=i-s;switch(l){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;l>0;)t[s+l]=t[s+l-1],l--}t[s]=o}}function n(t,e,r,i,n,a){var o=0,s=0,h=1;if(a(t,e[r+n])>0){for(s=i-n;s>h&&a(t,e[r+n+h])>0;)o=h,h=(h<<1)+1,0>=h&&(h=s);h>s&&(h=s),o+=n,h+=n}else{for(s=n+1;s>h&&a(t,e[r+n-h])<=0;)o=h,h=(h<<1)+1,0>=h&&(h=s);h>s&&(h=s);var l=o;o=n-h,h=n-l}for(o++;h>o;){var c=o+(h-o>>>1);a(t,e[r+c])>0?o=c+1:h=c}return h}function a(t,e,r,i,n,a){var o=0,s=0,h=1;if(a(t,e[r+n])<0){for(s=n+1;s>h&&a(t,e[r+n-h])<0;)o=h,h=(h<<1)+1,0>=h&&(h=s);h>s&&(h=s);var l=o;o=n-h,h=n-l}else{for(s=i-n;s>h&&a(t,e[r+n+h])>=0;)o=h,h=(h<<1)+1,0>=h&&(h=s);h>s&&(h=s),o+=n,h+=n}for(o++;h>o;){var c=o+(h-o>>>1);a(t,e[r+c])<0?h=c:o=c+1}return h}function o(t,e){function r(t,e){f[_]=t,d[_]=e,_+=1}function i(){for(;_>1;){var t=_-2;if(t>=1&&d[t-1]<=d[t]+d[t+1]||t>=2&&d[t-2]<=d[t]+d[t-1])d[t-1]d[t+1])break;s(t)}}function o(){for(;_>1;){var t=_-2;t>0&&d[t-1]=o?h(i,o,s,l):u(i,o,s,l)))}function h(r,i,o,s){var h=0;for(h=0;i>h;h++)y[h]=t[r+h];var c=0,u=o,f=r;if(t[f++]=t[u++],0!==--s){if(1===i){for(h=0;s>h;h++)t[f+h]=t[u+h];return void(t[f+s]=y[c])}for(var d,v,g,m=p;;){d=0,v=0,g=!1;do if(e(t[u],y[c])<0){if(t[f++]=t[u++],v++,d=0,0===--s){g=!0;break}}else if(t[f++]=y[c++],d++,v=0,1===--i){g=!0;break}while(m>(d|v));if(g)break;do{if(d=a(t[u],y,c,i,0,e),0!==d){for(h=0;d>h;h++)t[f+h]=y[c+h];if(f+=d,c+=d,i-=d,1>=i){g=!0;break}}if(t[f++]=t[u++],0===--s){g=!0;break}if(v=n(y[c],t,u,s,0,e),0!==v){for(h=0;v>h;h++)t[f+h]=t[u+h];if(f+=v,u+=v,s-=v,0===s){g=!0;break}}if(t[f++]=y[c++],1===--i){g=!0;break}m--}while(d>=l||v>=l);if(g)break;0>m&&(m=0),m+=2}if(p=m,1>p&&(p=1),1===i){for(h=0;s>h;h++)t[f+h]=t[u+h];t[f+s]=y[c]}else{if(0===i)throw new Error;for(h=0;i>h;h++)t[f+h]=y[c+h]}}else for(h=0;i>h;h++)t[f+h]=y[c+h]}function u(r,i,o,s){var h=0;for(h=0;s>h;h++)y[h]=t[o+h];var c=r+i-1,u=s-1,f=o+s-1,d=0,v=0;if(t[f--]=t[c--],0!==--i){if(1===s){for(f-=i,c-=i,v=f+1,d=c+1,h=i-1;h>=0;h--)t[v+h]=t[d+h];return void(t[f]=y[u])}for(var g=p;;){var m=0,_=0,x=!1;do if(e(y[u],t[c])<0){if(t[f--]=t[c--],m++,_=0,0===--i){x=!0;break}}else if(t[f--]=y[u--],_++,m=0,1===--s){x=!0;break}while(g>(m|_));if(x)break;do{if(m=i-a(y[u],t,r,i,i-1,e),0!==m){for(f-=m,c-=m,i-=m,v=f+1,d=c+1,h=m-1;h>=0;h--)t[v+h]=t[d+h];if(0===i){x=!0;break}}if(t[f--]=y[u--],1===--s){x=!0;break}if(_=s-n(t[c],y,0,s,s-1,e),0!==_){for(f-=_,u-=_,s-=_,v=f+1,d=u+1,h=0;_>h;h++)t[v+h]=y[d+h];if(1>=s){x=!0;break}}if(t[f--]=t[c--],0===--i){x=!0;break}g--}while(m>=l||_>=l);if(x)break;0>g&&(g=0),g+=2}if(p=g,1>p&&(p=1),1===s){for(f-=i,c-=i,v=f+1,d=c+1,h=i-1;h>=0;h--)t[v+h]=t[d+h];t[f]=y[u]}else{if(0===s)throw new Error;for(d=f-(s-1),h=0;s>h;h++)t[d+h]=y[h]}}else for(d=f-(s-1),h=0;s>h;h++)t[d+h]=y[h]}var f,d,p=l,v=0,g=c,m=0,_=0;v=t.length,2*c>v&&(g=v>>>1);var y=[];m=120>v?5:1542>v?10:119151>v?19:40,f=[],d=[],this.mergeRuns=i,this.forceMergeRuns=o,this.pushRun=r}function s(r,n,a,s){a||(a=0),s||(s=r.length);var l=s-a;if(!(2>l)){var c=0;if(h>l)return c=e(r,a,s,n),void i(r,a,s,a+c,n);var u=new o(r,n),f=t(l);do{if(c=e(r,a,s,n),f>c){var d=l;d>f&&(d=f),i(r,a,a+d,a+c,n),c=d}u.pushRun(a,c),u.mergeRuns(),l-=c,a+=c}while(0!==l);u.forceMergeRuns()}}var h=32,l=7,c=256;return s}),define("zrender/Storage",["require","./core/util","./core/env","./container/Group","./core/timsort"],function(t){function e(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var r=t("./core/util"),i=t("./core/env"),n=t("./container/Group"),a=t("./core/timsort"),o=function(){this._elements={},this._roots=[],this._displayList=[],this._displayListLen=0};return o.prototype={constructor:o,traverse:function(t,e){for(var r=0;ro;o++)this._updateAndAddDisplayable(r[o],null,t);n.length=this._displayListLen,i.canvasSupported&&a(n,e)},_updateAndAddDisplayable:function(t,e,r){if(!t.ignore||r){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var i=t.clipPath;if(i&&(i.parent=t,i.updateTransform(),e?(e=e.slice(),e.push(i)):e=[i]),t.isGroup){for(var n=t._children,a=0;ae;e++)this.delRoot(t[e]);else{var o;o="string"==typeof t?this._elements[t]:t;var s=r.indexOf(this._roots,o);s>=0&&(this.delFromMap(o.id),this._roots.splice(s,1),o instanceof n&&o.delChildrenFromStorage(this))}},addToMap:function(t){return t instanceof n&&(t.__storage=this),t.dirty(!1),this._elements[t.id]=t,this},get:function(t){return this._elements[t]},delFromMap:function(t){var e=this._elements,r=e[t];return r&&(delete e[t],r instanceof n&&(r.__storage=null)),this},dispose:function(){this._elements=this._renderList=this._roots=null},displayableSortFunc:e},o}),define("zrender/core/event",["require","../mixin/Eventful","./env"],function(t){function e(t){return t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0}}function r(t,e,r){return e.currentTarget&&t===e.currentTarget?h.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):null!=e.offsetX?(r.zrX=e.offsetX,r.zrY=e.offsetY):i(t,e,r):i(t,e,r),r}function i(t,r,i){var n=e(t);i=i||{},i.zrX=r.clientX-n.left,i.zrY=r.clientY-n.top}function n(t,e){if(e=e||window.event,null!=e.zrX)return e;var i=e.type,n=i&&i.indexOf("touch")>=0;if(n){var a="touchend"!=i?e.targetTouches[0]:e.changedTouches[0];a&&r(t,a,e)}else r(t,e,e),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;return e}function a(t,e,r){l?t.addEventListener(e,r):t.attachEvent("on"+e,r)}function o(t,e,r){l?t.removeEventListener(e,r):t.detachEvent("on"+e,r)}var s=t("../mixin/Eventful"),h=t("./env"),l="undefined"!=typeof window&&!!window.addEventListener,c=l?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};return{clientToLocal:r,normalizeEvent:n,addEventListener:a,removeEventListener:o,stop:c,Dispatcher:s}}),define("zrender/animation/requestAnimationFrame",["require"],function(t){return"undefined"!=typeof window&&(window.requestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)}}),define("zrender/animation/Animation",["require","../core/util","../core/event","./requestAnimationFrame","./Animator"],function(t){var e=t("../core/util"),r=t("../core/event").Dispatcher,i=t("./requestAnimationFrame"),n=t("./Animator"),a=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,r.call(this)};return a.prototype={constructor:a,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),r=0;r=0&&this._clips.splice(r,1)},removeAnimator:function(t){for(var e=t.getClips(),r=0;ro;o++){var s=r[o],h=s.step(t);h&&(n.push(h),a.push(s))}for(var o=0;i>o;)r[o]._needsRemove?(r[o]=r[i-1],r.pop(),i--):o++;i=n.length;for(var o=0;i>o;o++)a[o].fire(n[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(i(t),!e._paused&&e._update())}var e=this;this._running=!0,i(t)},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=[]},animate:function(t,e){e=e||{};var r=new n(t,e.loop,e.getter,e.setter);return r}},e.mixin(a,r),a}),define("zrender/core/GestureMgr",["require","./event"],function(t){function e(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}function r(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}var i=t("./event"),n=function(){this._track=[]};n.prototype={constructor:n,recognize:function(t,e,r){return this._doTrack(t,e,r),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,r){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,s=n.length;s>o;o++){var h=n[o],l=i.clientToLocal(r,h);a.points.push([l.zrX,l.zrY]),a.touches.push(h)}this._track.push(a)}},_recognize:function(t){for(var e in a)if(a.hasOwnProperty(e)){var r=a[e](this._track,t);if(r)return r}}};var a={pinch:function(t,i){var n=t.length;if(n){var a=(t[n-1]||{}).points,o=(t[n-2]||{}).points||a;if(o&&o.length>1&&a&&a.length>1){var s=e(a)/e(o);!isFinite(s)&&(s=1),i.pinchScale=s;var h=r(a);return i.pinchX=h[0],i.pinchY=h[1],{type:"pinch",target:t[0].target,event:i}}}}};return n}),define("zrender/dom/HandlerProxy",["require","../core/event","../core/util","../mixin/Eventful","../core/env","../core/GestureMgr"],function(t){function e(t){return"mousewheel"===t&&c.browser.firefox?"DOMMouseScroll":t}function r(t,e,r){var i=t._gestureMgr;"start"===r&&i.clear();var n=i.recognize(e,t.handler.findHover(e.zrX,e.zrY,null),t.dom);if("end"===r&&i.clear(),n){var a=n.type;e.gestureEvent=a,t.handler.dispatchToElement(n.target,a,n.event)}}function i(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}function n(){return c.touchEventsSupported}function a(t){function e(t,e){return function(){return e._touching?void 0:t.apply(e,arguments)}}for(var r=0;r0},extendFrom:function(t,e){if(t){var r=this;for(var i in t)!t.hasOwnProperty(i)||!e&&r.hasOwnProperty(i)||(r[i]=t[i])}},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,i,n){for(var a="radial"===i.type?r:e,o=a(t,i,n),s=i.colorStops,h=0;ha;a++)n=Math.max(f.measureText(i[a],e).width,n);return s>h&&(s=0,o={}),s++,o[r]=n,n}function r(t,r,i,n){var a=((t||"")+"").split("\n").length,o=e(t,r),s=e("国",r),h=a*s,l=new c(0,0,o,h);switch(l.lineHeight=s,n){case"bottom":case"alphabetic":l.y-=s;break;case"middle":l.y-=s/2}switch(i){case"end":case"right":l.x-=l.width;break;case"center":l.x-=l.width/2}return l}function i(t,e,r,i){var n=e.x,a=e.y,o=e.height,s=e.width,h=r.height,l=o/2-h/2,c="left";switch(t){case"left":n-=i,a+=l,c="right";break;case"right":n+=i+s,a+=l,c="left";break;case"top":n+=s/2,a-=i+h,c="center";break;case"bottom":n+=s/2,a+=o+i,c="center";break;case"inside":n+=s/2,a+=l,c="center";break;case"insideLeft":n+=i,a+=l,c="left";break;case"insideRight":n+=s-i,a+=l,c="right";break;case"insideTop":n+=s/2,a+=i,c="center";break;case"insideBottom":n+=s/2,a+=o-h-i,c="center";break;case"insideTopLeft":n+=i,a+=i,c="left";break;case"insideTopRight":n+=s-i,a+=i,c="right";break;case"insideBottomLeft":n+=i,a+=o-h-i;break;case"insideBottomRight":n+=s-i,a+=o-h-i,c="right"}return{x:n,y:a,textAlign:c,textBaseline:"top"}}function n(t,r,i,n,o){if(!r)return"";o=o||{},n=u(n,"...");for(var s=u(o.maxIterations,2),h=u(o.minChar,0),l=e("国",i),c=e("a",i),f=u(o.placeholder,""),d=r=Math.max(0,r-1),p=0;h>p&&d>=c;p++)d-=c;var v=e(n);v>d&&(n="",v=0),d=r-v;for(var g=(t+"").split("\n"),p=0,m=g.length;m>p;p++){var _=g[p],y=e(_,i);if(!(r>=y)){for(var x=0;;x++){if(d>=y||x>=s){_+=n;break}var b=0===x?a(_,d,c,l):y>0?Math.floor(_.length*d/y):0;_=_.substr(0,b),y=e(_,i)}""===_&&(_=f),g[p]=_}}return g.join("\n")}function a(t,e,r,i){for(var n=0,a=0,o=t.length;o>a&&e>n;a++){var s=t.charCodeAt(a);n+=s>=0&&127>=s?r:i}return a}var o={},s=0,h=5e3,l=t("../core/util"),c=t("../core/BoundingRect"),u=l.retrieve,f={getWidth:e,getBoundingRect:r,adjustTextPositionOnRect:i,truncateText:n,measureText:function(t,e){var r=l.getContext();return r.font=e||"12px sans-serif",r.measureText(t)}};return f}),define("zrender/graphic/mixin/RectText",["require","../../contain/text","../../core/BoundingRect"],function(t){function e(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}var r=t("../../contain/text"),i=t("../../core/BoundingRect"),n=new i,a=function(){};return a.prototype={constructor:a,drawRectText:function(t,i,a){var o=this.style,s=o.text;if(null!=s&&(s+=""),s){t.save();var h,l,c=o.textPosition,u=o.textDistance,f=o.textAlign,d=o.textFont||o.font,p=o.textBaseline,v=o.textVerticalAlign;a=a||r.getBoundingRect(s,d,f,p);var g=this.transform;if(o.textTransform?this.setTransform(t):g&&(n.copy(i),n.applyTransform(g),i=n),c instanceof Array){if(h=i.x+e(c[0],i.width),l=i.y+e(c[1],i.height),f=f||"left",p=p||"top",v){switch(v){case"middle":l-=a.height/2-a.lineHeight/2;break;case"bottom":l-=a.height-a.lineHeight/2;break;default:l+=a.lineHeight/2}p="middle"}}else{var m=r.adjustTextPositionOnRect(c,i,a,u);h=m.x,l=m.y,f=f||m.textAlign,p=p||m.textBaseline}t.textAlign=f||"left",t.textBaseline=p||"alphabetic";var _=o.textFill,y=o.textStroke;_&&(t.fillStyle=_),y&&(t.strokeStyle=y),t.font=d||"12px sans-serif",t.shadowBlur=o.textShadowBlur,t.shadowColor=o.textShadowColor||"transparent",t.shadowOffsetX=o.textShadowOffsetX,t.shadowOffsetY=o.textShadowOffsetY;var x=s.split("\n");o.textRotation&&(g&&t.translate(g[4],g[5]),t.rotate(o.textRotation),g&&t.translate(-g[4],-g[5]));for(var b=0;b=this._maxSize&&n>0){var a=r.head;r.remove(a),delete i[a.key]}var o=r.insert(e);o.key=t,i[t]=o}},a.get=function(t){var e=this._map[t],r=this._list;return null!=e?(e!==r.tail&&(r.remove(e),r.insertEntry(e)),e.value):void 0},a.clear=function(){this._list.clear(),this._map={}},n}),define("zrender/graphic/Image",["require","./Displayable","../core/BoundingRect","../core/util","../core/LRU"],function(t){function e(t){r.call(this,t)}var r=t("./Displayable"),i=t("../core/BoundingRect"),n=t("../core/util"),a=t("../core/LRU"),o=new a(50);return e.prototype={constructor:e,type:"image",brush:function(t,e){var r,i=this.style,n=i.image;if(i.bind(t,this,e),r="string"==typeof n?this._image:n,!r&&n){var a=o.get(n);if(!a)return r=new Image,r.onload=function(){r.onload=null;for(var t=0;t=0&&r.splice(i,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,r=0;rn;){var a=t[n],o=a.__from;o&&o.__zr?(n++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,r,!0,i))):(t.splice(n,1),o.__hoverMir=null,e--)}r.ctx.restore()}},_startProgessive:function(){function t(){r===e._progressiveToken&&e.storage&&(e._doPaintList(e.storage.getDisplayList()),e._furtherProgressive?(e._progress++,v(t)):e._progressiveToken=-1)}var e=this;if(e._furtherProgressive){var r=e._progressiveToken=+new Date;e._progress++,v(t)}},_clearProgressive:function(){this._progressiveToken=-1,this._progress=0,c.each(this._progressiveLayers,function(t){t.__dirty&&t.clear()})},_paintList:function(t,e){null==e&&(e=!1),this._updateLayerStatus(t),this._clearProgressive(),this.eachBuildinLayer(i),this._doPaintList(t,e),this.eachBuildinLayer(n); +},_doPaintList:function(t,e){function r(t){var e=a.dpr||1;a.save(),a.globalAlpha=1,a.shadowBlur=0,i.__dirty=!0,a.setTransform(1,0,0,1,0,0),a.drawImage(t.dom,0,0,f*e,d*e),a.restore()}for(var i,n,a,o,s,h,l=0,f=this._width,d=this._height,p=this._progress,v=0,m=t.length;m>v;v++){var _=t[v],y=this._singleCanvas?0:_.zlevel,x=_.__frame;if(0>x&&s&&(r(s),s=null),n!==y&&(a&&a.restore(),o={},n=y,i=this.getLayer(n),i.isBuildin||u("ZLevel "+n+" has been used by unkown layer "+i.id),a=i.ctx,a.save(),i.__unusedCount=0,(i.__dirty||e)&&i.clear()),i.__dirty||e){if(x>=0){if(!s){if(s=this._progressiveLayers[Math.min(l++,g-1)],s.ctx.save(),s.renderScope={},s&&s.__progress>s.__maxProgress){v=s.__nextIdxNotProg-1;continue}h=s.__progress,s.__dirty||(p=h),s.__progress=p+1}x===p&&this._doPaintEl(_,s,!0,s.renderScope)}else this._doPaintEl(_,i,e,o);_.__dirty=!1}}s&&r(s),a&&a.restore(),this._furtherProgressive=!1,c.each(this._progressiveLayers,function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)},this)},_doPaintEl:function(t,e,r,i){var n=e.ctx,h=t.transform;if((e.__dirty||r)&&!t.invisible&&0!==t.style.opacity&&(!h||h[0]||h[3])&&(!t.culling||!a(t,this._width,this._height))){var l=t.__clipPaths;(i.prevClipLayer!==e||o(l,i.prevElClipPaths))&&(i.prevElClipPaths&&(i.prevClipLayer.ctx.restore(),i.prevClipLayer=i.prevElClipPaths=null,i.prevEl=null),l&&(n.save(),s(l,n),i.prevClipLayer=e,i.prevElClipPaths=l)),t.beforeBrush&&t.beforeBrush(n),t.brush(n,i.prevEl||null),i.prevEl=t,t.afterBrush&&t.afterBrush(n)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||(e=new p("zr_"+t,this,this.dpr),e.isBuildin=!0,this._layerConfig[t]&&c.merge(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,a=n.length,o=null,s=-1,h=this._domRoot;if(i[t])return void u("ZLevel "+t+" has been used already");if(!r(e))return void u("Layer of zlevel "+t+" is not valid");if(a>0&&t>n[0]){for(s=0;a-1>s&&!(n[s]t);s++);o=i[n[s]]}if(n.splice(s+1,0,t),o){var l=o.dom;l.nextSibling?h.insertBefore(e.dom,l.nextSibling):h.appendChild(e.dom)}else h.firstChild?h.insertBefore(e.dom,h.firstChild):h.appendChild(e.dom);i[t]=e},eachLayer:function(t,e){var r,i,n=this._zlevelList;for(i=0;il;l++){var f=t[l],d=this._singleCanvas?0:f.zlevel,v=e[d],m=f.progressive;if(v&&(v.elCount++,v.__dirty=v.__dirty||f.__dirty),m>=0){o!==m&&(o=m,h++);var _=f.__frame=h-1;if(!a){var y=Math.min(s,g-1);a=r[y],a||(a=r[y]=new p("progressive",this,this.dpr),a.initContext()),a.__maxProgress=0}a.__dirty=a.__dirty||f.__dirty,a.elCount++,a.__maxProgress=Math.max(a.__maxProgress,_),a.__maxProgress>=a.__progress&&(v.__dirty=!0)}else f.__frame=-1,a&&(a.__nextIdxNotProg=l,s++,a=null)}a&&(s++,a.__nextIdxNotProg=l),this.eachBuildinLayer(function(t,e){i[e]!==t.elCount&&(t.__dirty=!0)}),r.length=Math.min(s,g),c.each(r,function(t,e){n[e]!==t.elCount&&(f.__dirty=!0),t.__dirty&&(t.__progress=0)})},clear:function(){return this.eachBuildinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var r=this._layerConfig;r[t]?c.merge(r[t],e,!0):r[t]=e;var i=this._layers[t];i&&c.merge(i,r[t],!0)}},delLayer:function(t){var e=this._layers,r=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],r.splice(c.indexOf(r,t),1))},resize:function(t,e){var r=this._domRoot;r.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),r.style.display="",this._width!=t||e!=this._height){r.style.width=t+"px",r.style.height=e+"px";for(var n in this._layers)this._layers.hasOwnProperty(n)&&this._layers[n].resize(t,e);c.each(this._progressiveLayers,function(r){r.resize(t,e)}),this.refresh(!0)}return this._width=t,this._height=e,this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas)return this._layers[0].dom;var e=new p("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clearColor=t.backgroundColor,e.clear();for(var r=this.storage.getDisplayList(!0),i={},n=0;n-x&&x>t}function r(t){return t>x||-x>t}function i(t,e,r,i,n){var a=1-n;return a*a*(a*t+3*n*e)+n*n*(n*i+3*a*r)}function n(t,e,r,i,n){var a=1-n;return 3*(((e-t)*a+2*(r-e)*n)*a+(i-r)*n*n)}function a(t,r,i,n,a,o){var s=n+3*(r-i)-t,h=3*(i-2*r+t),l=3*(r-t),c=t-a,u=h*h-3*s*l,f=h*l-9*s*c,d=l*l-3*h*c,p=0;if(e(u)&&e(f))if(e(h))o[0]=0;else{var v=-l/h;v>=0&&1>=v&&(o[p++]=v)}else{var g=f*f-4*u*d;if(e(g)){var m=f/u,v=-h/s+m,x=-m/2;v>=0&&1>=v&&(o[p++]=v),x>=0&&1>=x&&(o[p++]=x)}else if(g>0){var b=y(g),P=u*h+1.5*s*(-f+b),k=u*h+1.5*s*(-f-b);P=0>P?-_(-P,T):_(P,T),k=0>k?-_(-k,T):_(k,T);var v=(-h-(P+k))/(3*s);v>=0&&1>=v&&(o[p++]=v)}else{var z=(2*u*h-3*s*f)/(2*y(u*u*u)),M=Math.acos(z)/3,S=y(u),C=Math.cos(M),v=(-h-2*S*C)/(3*s),x=(-h+S*(C+w*Math.sin(M)))/(3*s),L=(-h+S*(C-w*Math.sin(M)))/(3*s);v>=0&&1>=v&&(o[p++]=v),x>=0&&1>=x&&(o[p++]=x),L>=0&&1>=L&&(o[p++]=L)}}return p}function o(t,i,n,a,o){var s=6*n-12*i+6*t,h=9*i+3*a-3*t-9*n,l=3*i-3*t,c=0;if(e(h)){if(r(s)){var u=-l/s;u>=0&&1>=u&&(o[c++]=u)}}else{var f=s*s-4*h*l;if(e(f))o[0]=-s/(2*h);else if(f>0){var d=y(f),u=(-s+d)/(2*h),p=(-s-d)/(2*h);u>=0&&1>=u&&(o[c++]=u),p>=0&&1>=p&&(o[c++]=p)}}return c}function s(t,e,r,i,n,a){var o=(e-t)*n+t,s=(r-e)*n+e,h=(i-r)*n+r,l=(s-o)*n+o,c=(h-s)*n+s,u=(c-l)*n+l;a[0]=t,a[1]=o,a[2]=l,a[3]=u,a[4]=u,a[5]=c,a[6]=h,a[7]=i}function h(t,e,r,n,a,o,s,h,l,c,u){var f,d,p,v,g,_=.005,x=1/0;P[0]=l,P[1]=c;for(var w=0;1>w;w+=.05)k[0]=i(t,r,a,s,w),k[1]=i(e,n,o,h,w),v=m(P,k),x>v&&(f=w,x=v);x=1/0;for(var T=0;32>T&&!(b>_);T++)d=f-_,p=f+_,k[0]=i(t,r,a,s,d),k[1]=i(e,n,o,h,d),v=m(k,P),d>=0&&x>v?(f=d,x=v):(z[0]=i(t,r,a,s,p),z[1]=i(e,n,o,h,p),g=m(z,P),1>=p&&x>g?(f=p,x=g):_*=.5);return u&&(u[0]=i(t,r,a,s,f),u[1]=i(e,n,o,h,f)),y(x)}function l(t,e,r,i){var n=1-i;return n*(n*t+2*i*e)+i*i*r}function c(t,e,r,i){return 2*((1-i)*(e-t)+i*(r-e))}function u(t,i,n,a,o){var s=t-2*i+n,h=2*(i-t),l=t-a,c=0;if(e(s)){if(r(h)){var u=-l/h;u>=0&&1>=u&&(o[c++]=u)}}else{var f=h*h-4*s*l;if(e(f)){var u=-h/(2*s);u>=0&&1>=u&&(o[c++]=u)}else if(f>0){var d=y(f),u=(-h+d)/(2*s),p=(-h-d)/(2*s);u>=0&&1>=u&&(o[c++]=u),p>=0&&1>=p&&(o[c++]=p)}}return c}function f(t,e,r){var i=t+r-2*e;return 0===i?.5:(t-e)/i}function d(t,e,r,i,n){var a=(e-t)*i+t,o=(r-e)*i+e,s=(o-a)*i+a;n[0]=t,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=r}function p(t,e,r,i,n,a,o,s,h){var c,u=.005,f=1/0;P[0]=o,P[1]=s;for(var d=0;1>d;d+=.05){k[0]=l(t,r,n,d),k[1]=l(e,i,a,d);var p=m(P,k);f>p&&(c=d,f=p)}f=1/0;for(var v=0;32>v&&!(b>u);v++){var g=c-u,_=c+u;k[0]=l(t,r,n,g),k[1]=l(e,i,a,g);var p=m(k,P);if(g>=0&&f>p)c=g,f=p;else{z[0]=l(t,r,n,_),z[1]=l(e,i,a,_);var x=m(z,P);1>=_&&f>x?(c=_,f=x):u*=.5}}return h&&(h[0]=l(t,r,n,c),h[1]=l(e,i,a,c)),y(f)}var v=t("./vector"),g=v.create,m=v.distSquare,_=Math.pow,y=Math.sqrt,x=1e-8,b=1e-4,w=y(3),T=1/3,P=g(),k=g(),z=g();return{cubicAt:i,cubicDerivativeAt:n,cubicRootAt:a,cubicExtrema:o,cubicSubdivide:s,cubicProjectPoint:h,quadraticAt:l,quadraticDerivativeAt:c,quadraticRootAt:u,quadraticExtremum:f,quadraticSubdivide:d,quadraticProjectPoint:p}}),define("zrender/core/bbox",["require","./vector","./curve"],function(t){var e=t("./vector"),r=t("./curve"),i={},n=Math.min,a=Math.max,o=Math.sin,s=Math.cos,h=e.create(),l=e.create(),c=e.create(),u=2*Math.PI;i.fromPoints=function(t,e,r){if(0!==t.length){var i,o=t[0],s=o[0],h=o[0],l=o[1],c=o[1];for(i=1;iv;v++){var y=m(t,i,s,l,f[v]);u[0]=n(y,u[0]),p[0]=a(y,p[0])}for(_=g(e,o,h,c,d),v=0;_>v;v++){var x=m(e,o,h,c,d[v]);u[1]=n(x,u[1]),p[1]=a(x,p[1])}u[0]=n(t,u[0]),p[0]=a(t,p[0]),u[0]=n(l,u[0]),p[0]=a(l,p[0]),u[1]=n(e,u[1]),p[1]=a(e,p[1]),u[1]=n(c,u[1]),p[1]=a(c,p[1])},i.fromQuadratic=function(t,e,i,o,s,h,l,c){var u=r.quadraticExtremum,f=r.quadraticAt,d=a(n(u(t,i,s),1),0),p=a(n(u(e,o,h),1),0),v=f(t,i,s,d),g=f(e,o,h,p);l[0]=n(t,s,v),l[1]=n(e,h,g),c[0]=a(t,s,v),c[1]=a(e,h,g)},i.fromArc=function(t,r,i,n,a,f,d,p,v){var g=e.min,m=e.max,_=Math.abs(a-f);if(1e-4>_%u&&_>1e-4)return p[0]=t-i,p[1]=r-n,v[0]=t+i,void(v[1]=r+n);if(h[0]=s(a)*i+t,h[1]=o(a)*n+r,l[0]=s(f)*i+t,l[1]=o(f)*n+r,g(p,h,l),m(v,h,l),a%=u,0>a&&(a+=u),f%=u,0>f&&(f+=u),a>f&&!d?f+=u:f>a&&d&&(a+=u),d){var y=f;f=a,a=y}for(var x=0;f>x;x+=Math.PI/2)x>a&&(c[0]=s(x)*i+t,c[1]=o(x)*n+r,g(p,c,p),m(v,c,v))},i}),define("zrender/core/PathProxy",["require","./curve","./vector","./bbox","./BoundingRect","../config"],function(t){var e=t("./curve"),r=t("./vector"),i=t("./bbox"),n=t("./BoundingRect"),a=t("../config").devicePixelRatio,o={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},s=[],h=[],l=[],c=[],u=Math.min,f=Math.max,d=Math.cos,p=Math.sin,v=Math.sqrt,g=Math.abs,m="undefined"!=typeof Float32Array,_=function(){this.data=[],this._len=0,this._ctx=null,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._ux=0,this._uy=0};return _.prototype={constructor:_,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=g(1/a/t)||0,this._uy=g(1/a/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._len=0,this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(o.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var r=g(t-this._xi)>this._ux||g(e-this._yi)>this._uy||this._len<5;return this.addData(o.L,t,e),this._ctx&&r&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),r&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,r,i,n,a){return this.addData(o.C,t,e,r,i,n,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,r,i,n,a):this._ctx.bezierCurveTo(t,e,r,i,n,a)),this._xi=n,this._yi=a,this},quadraticCurveTo:function(t,e,r,i){return this.addData(o.Q,t,e,r,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,r,i):this._ctx.quadraticCurveTo(t,e,r,i)),this._xi=r,this._yi=i,this},arc:function(t,e,r,i,n,a){return this.addData(o.A,t,e,r,r,i,n-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,r,i,n,a),this._xi=d(n)*r+t,this._xi=p(n)*r+t,this},arcTo:function(t,e,r,i,n){return this._ctx&&this._ctx.arcTo(t,e,r,i,n),this},rect:function(t,e,r,i){return this._ctx&&this._ctx.rect(t,e,r,i),this.addData(o.R,t,e,r,i),this},closePath:function(){this.addData(o.Z);var t=this._ctx,e=this._x0,r=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,r),t.closePath()),this._xi=e,this._yi=r,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,r=0;rr;r++)this.data[r]=t[r];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,r=0,i=this._len,n=0;e>n;n++)r+=t[n].len();m&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+r));for(var n=0;e>n;n++)for(var a=t[n].data,o=0;oe.length&&(this._expandData(),e=this.data);for(var r=0;ra&&(a=n+a),a%=n,g-=a*c,m-=a*d;c>0&&t>=g||0>c&&g>=t||0==c&&(d>0&&e>=m||0>d&&m>=e);)i=this._dashIdx,r=o[i],g+=c*r,m+=d*r,this._dashIdx=(i+1)%_,c>0&&h>g||0>c&&g>h||d>0&&l>m||0>d&&m>l||s[i%2?"moveTo":"lineTo"](c>=0?u(g,t):f(g,t),d>=0?u(m,e):f(m,e));c=g-t,d=m-e,this._dashOffset=-v(c*c+d*d)},_dashedBezierTo:function(t,r,i,n,a,o){var s,h,l,c,u,f=this._dashSum,d=this._dashOffset,p=this._lineDash,g=this._ctx,m=this._xi,_=this._yi,y=e.cubicAt,x=0,b=this._dashIdx,w=p.length,T=0;for(0>d&&(d=f+d),d%=f,s=0;1>s;s+=.1)h=y(m,t,i,a,s+.1)-y(m,t,i,a,s),l=y(_,r,n,o,s+.1)-y(_,r,n,o,s),x+=v(h*h+l*l);for(;w>b&&(T+=p[b],!(T>d));b++);for(s=(T-d)/x;1>=s;)c=y(m,t,i,a,s),u=y(_,r,n,o,s),b%2?g.moveTo(c,u):g.lineTo(c,u),s+=p[b]/x,b=(b+1)%w;b%2!==0&&g.lineTo(a,o),h=a-c,l=o-u,this._dashOffset=-v(h*h+l*l)},_dashedQuadraticTo:function(t,e,r,i){var n=r,a=i;r=(r+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,r,i,n,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,m&&(this.data=new Float32Array(t)))},getBoundingRect:function(){s[0]=s[1]=l[0]=l[1]=Number.MAX_VALUE,h[0]=h[1]=c[0]=c[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,a=0,u=0,f=0,v=0;vf;){var v=h[f++];switch(1==f&&(i=h[f],n=h[f+1],e=i,r=n),v){case o.M:e=i=h[f++],r=n=h[f++],t.moveTo(i,n);break;case o.L:a=h[f++],s=h[f++],(g(a-i)>l||g(s-n)>c||f===u-1)&&(t.lineTo(a,s),i=a,n=s);break;case o.C:t.bezierCurveTo(h[f++],h[f++],h[f++],h[f++],h[f++],h[f++]),i=h[f-2],n=h[f-1];break;case o.Q:t.quadraticCurveTo(h[f++],h[f++],h[f++],h[f++]),i=h[f-2],n=h[f-1];break;case o.A:var m=h[f++],_=h[f++],y=h[f++],x=h[f++],b=h[f++],w=h[f++],T=h[f++],P=h[f++],k=y>x?y:x,z=y>x?1:y/x,M=y>x?x/y:1,S=Math.abs(y-x)>.001,C=b+w;S?(t.translate(m,_),t.rotate(T),t.scale(z,M),t.arc(0,0,k,b,C,1-P),t.scale(1/z,1/M),t.rotate(-T),t.translate(-m,-_)):t.arc(m,_,k,b,C,1-P),1==f&&(e=d(b)*y+m,r=p(b)*x+_),i=d(C)*y+m,n=p(C)*x+_;break;case o.R:e=i=h[f],r=n=h[f+1],t.rect(h[f++],h[f++],h[f++],h[f++]);break;case o.Z:t.closePath(),i=e,n=r}}}},_.CMD=o,_}),define("zrender/contain/line",[],function(){return{containStroke:function(t,e,r,i,n,a,o){if(0===n)return!1;var s=n,h=0,l=t;if(o>e+s&&o>i+s||e-s>o&&i-s>o||a>t+s&&a>r+s||t-s>a&&r-s>a)return!1;if(t===r)return Math.abs(a-t)<=s/2;h=(e-i)/(t-r),l=(t*i-r*e)/(t-r);var c=h*a-o+l,u=c*c/(h*h+1);return s/2*s/2>=u}}}),define("zrender/contain/cubic",["require","../core/curve"],function(t){var e=t("../core/curve");return{containStroke:function(t,r,i,n,a,o,s,h,l,c,u){if(0===l)return!1;var f=l;if(u>r+f&&u>n+f&&u>o+f&&u>h+f||r-f>u&&n-f>u&&o-f>u&&h-f>u||c>t+f&&c>i+f&&c>a+f&&c>s+f||t-f>c&&i-f>c&&a-f>c&&s-f>c)return!1;var d=e.cubicProjectPoint(t,r,i,n,a,o,s,h,c,u,null);return f/2>=d}}}),define("zrender/contain/quadratic",["require","../core/curve"],function(t){var e=t("../core/curve");return{containStroke:function(t,r,i,n,a,o,s,h,l){if(0===s)return!1;var c=s;if(l>r+c&&l>n+c&&l>o+c||r-c>l&&n-c>l&&o-c>l||h>t+c&&h>i+c&&h>a+c||t-c>h&&i-c>h&&a-c>h)return!1;var u=e.quadraticProjectPoint(t,r,i,n,a,o,h,l,null);return c/2>=u}}}),define("zrender/contain/util",["require"],function(t){var e=2*Math.PI;return{normalizeRadian:function(t){return t%=e,0>t&&(t+=e),t}}}),define("zrender/contain/arc",["require","./util"],function(t){var e=t("./util").normalizeRadian,r=2*Math.PI;return{containStroke:function(t,i,n,a,o,s,h,l,c){if(0===h)return!1;var u=h;l-=t,c-=i;var f=Math.sqrt(l*l+c*c);if(f-u>n||n>f+u)return!1;if(Math.abs(a-o)%r<1e-4)return!0;if(s){var d=a;a=e(o),o=e(d)}else a=e(a),o=e(o);a>o&&(o+=r);var p=Math.atan2(c,l);return 0>p&&(p+=r),p>=a&&o>=p||p+r>=a&&o>=p+r}}}),define("zrender/contain/windingLine",[],function(){return function(t,e,r,i,n,a){if(a>e&&a>i||e>a&&i>a)return 0;if(i===e)return 0;var o=e>i?1:-1,s=(a-e)/(i-e);(1===s||0===s)&&(o=e>i?.5:-.5);var h=s*(r-t)+t;return h>n?o:0}}),define("zrender/contain/path",["require","../core/PathProxy","./line","./cubic","./quadratic","./arc","./util","../core/curve","./windingLine"],function(t){function e(t,e){return Math.abs(t-e)e&&c>n&&c>o&&c>h||e>c&&n>c&&o>c&&h>c)return 0;var u=d.cubicRootAt(e,n,o,h,c,_);if(0===u)return 0;for(var f,p,v=0,g=-1,m=0;u>m;m++){var x=_[m],b=0===x||1===x?.5:1,w=d.cubicAt(t,i,a,s,x);l>w||(0>g&&(g=d.cubicExtrema(e,n,o,h,y),y[1]1&&r(),f=d.cubicAt(e,n,o,h,y[0]),g>1&&(p=d.cubicAt(e,n,o,h,y[1]))),v+=2==g?xf?b:-b:xp?b:-b:p>h?b:-b:xf?b:-b:f>h?b:-b)}return v}function n(t,e,r,i,n,a,o,s){if(s>e&&s>i&&s>a||e>s&&i>s&&a>s)return 0;var h=d.quadraticRootAt(e,i,a,s,_);if(0===h)return 0;var l=d.quadraticExtremum(e,i,a);if(l>=0&&1>=l){for(var c=0,u=d.quadraticAt(e,i,a,l),f=0;h>f;f++){var p=0===_[f]||1===_[f]?.5:1,v=d.quadraticAt(t,r,n,_[f]);o>v||(c+=_[f]u?p:-p:u>a?p:-p)}return c}var p=0===_[0]||1===_[0]?.5:1,v=d.quadraticAt(t,r,n,_[0]);return o>v?0:e>a?p:-p}function a(t,e,r,i,n,a,o,s){if(s-=e,s>r||-r>s)return 0;var h=Math.sqrt(r*r-s*s);_[0]=-h,_[1]=h;var l=Math.abs(i-n);if(1e-4>l)return 0;if(1e-4>l%g){i=0,n=g;var c=a?1:-1;return o>=_[0]+t&&o<=_[1]+t?c:0}if(a){var h=i;i=f(n),n=f(h)}else i=f(i),n=f(n);i>n&&(n+=g);for(var u=0,d=0;2>d;d++){var p=_[d];if(p+t>o){var v=Math.atan2(s,p),c=a?1:-1;0>v&&(v=g+v),(v>=i&&n>=v||v+g>=i&&n>=v+g)&&(v>Math.PI/2&&v<1.5*Math.PI&&(c=-c),u+=c)}}return u}function o(t,r,o,h,f){for(var d=0,g=0,m=0,_=0,y=0,x=0;x1&&(o||(d+=p(g,m,_,y,h,f))),1==x&&(g=t[x],m=t[x+1],_=g,y=m),b){case s.M:_=t[x++],y=t[x++],g=_,m=y;break;case s.L:if(o){if(v(g,m,t[x],t[x+1],r,h,f))return!0}else d+=p(g,m,t[x],t[x+1],h,f)||0;g=t[x++],m=t[x++];break;case s.C:if(o){if(l.containStroke(g,m,t[x++],t[x++],t[x++],t[x++],t[x],t[x+1],r,h,f))return!0}else d+=i(g,m,t[x++],t[x++],t[x++],t[x++],t[x],t[x+1],h,f)||0;g=t[x++],m=t[x++];break;case s.Q:if(o){if(c.containStroke(g,m,t[x++],t[x++],t[x],t[x+1],r,h,f))return!0}else d+=n(g,m,t[x++],t[x++],t[x],t[x+1],h,f)||0;g=t[x++],m=t[x++];break;case s.A:var w=t[x++],T=t[x++],P=t[x++],k=t[x++],z=t[x++],M=t[x++],S=(t[x++],1-t[x++]),C=Math.cos(z)*P+w,L=Math.sin(z)*k+T;x>1?d+=p(g,m,C,L,h,f):(_=C,y=L);var R=(h-w)*k/P+w;if(o){if(u.containStroke(w,T,k,z,z+M,S,r,R,f))return!0}else d+=a(w,T,k,z,z+M,S,R,f);g=Math.cos(z+M)*P+w,m=Math.sin(z+M)*k+T;break;case s.R:_=g=t[x++],y=m=t[x++];var A=t[x++],q=t[x++],C=_+A,L=y+q;if(o){if(v(_,y,C,y,r,h,f)||v(C,y,C,L,r,h,f)||v(C,L,_,L,r,h,f)||v(_,L,_,y,r,h,f))return!0}else d+=p(C,y,C,L,h,f),d+=p(_,L,_,y,h,f);break;case s.Z:if(o){if(v(g,m,_,y,r,h,f))return!0}else d+=p(g,m,_,y,h,f);g=_,m=y}}return o||e(m,y)||(d+=p(g,m,_,y,h,f)||0),0!==d}var s=t("../core/PathProxy").CMD,h=t("./line"),l=t("./cubic"),c=t("./quadratic"),u=t("./arc"),f=t("./util").normalizeRadian,d=t("../core/curve"),p=t("./windingLine"),v=h.containStroke,g=2*Math.PI,m=1e-4,_=[-1,-1,-1],y=[-1,-1];return{contain:function(t,e,r){return o(t,0,!1,e,r)},containStroke:function(t,e,r,i){return o(t,e,!0,r,i)}}}),define("zrender/graphic/Path",["require","./Displayable","../core/util","../core/PathProxy","../contain/path","./Pattern"],function(t){function e(t){r.call(this,t),this.path=new n}var r=t("./Displayable"),i=t("../core/util"),n=t("../core/PathProxy"),a=t("../contain/path"),o=t("./Pattern"),s=o.prototype.getCanvasPattern,h=Math.abs;return e.prototype={constructor:e,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var r=this.style,i=this.path,n=r.hasStroke(),a=r.hasFill(),o=r.fill,h=r.stroke,l=a&&!!o.colorStops,c=n&&!!h.colorStops,u=a&&!!o.image,f=n&&!!h.image;if(r.bind(t,this,e),this.setTransform(t),this.__dirty){var d=this.getBoundingRect();l&&(this._fillGradient=r.getGradient(t,o,d)),c&&(this._strokeGradient=r.getGradient(t,h,d))}l?t.fillStyle=this._fillGradient:u&&(t.fillStyle=s.call(o,t)),c?t.strokeStyle=this._strokeGradient:f&&(t.strokeStyle=s.call(h,t));var p=r.lineDash,v=r.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();i.setScale(m[0],m[1]),this.__dirtyPath||p&&!g&&n?(i=this.path.beginPath(t),p&&!g&&(i.setLineDash(p),i.setLineDashOffset(v)),this.buildPath(i,this.shape,!1),this.__dirtyPath=!1):(t.beginPath(),this.path.rebuildPath(t)),a&&i.fill(t),p&&g&&(t.setLineDash(p),t.lineDashOffset=v),n&&i.stroke(t),p&&g&&t.setLineDash([]),this.restoreTransform(t),(r.text||0===r.text)&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(t,e,r){},getBoundingRect:function(){var t=this._rect,e=this.style,r=!t;if(r){var i=this.path;this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),t=i.getBoundingRect()}if(this._rect=t,e.hasStroke()){var n=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||r){n.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(n.width+=a/o,n.height+=a/o,n.x-=a/o/2,n.y-=a/o/2)}return n}return t},contain:function(t,e){var r=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),n=this.style;if(t=r[0],e=r[1],i.contain(t,e)){var o=this.path.data;if(n.hasStroke()){var s=n.lineWidth,h=n.strokeNoScale?this.getLineScale():1;if(h>1e-10&&(n.hasFill()||(s=Math.max(s,this.strokeContainThreshold)),a.containStroke(o,s/h,t,e)))return!0}if(n.hasFill())return a.contain(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):r.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var r=this.shape;if(r){if(i.isObject(t))for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);else r[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&h(t[0]-1)>1e-10&&h(t[3]-1)>1e-10?Math.sqrt(h(t[0]*t[3]-t[2]*t[1])):1}},e.extend=function(t){var r=function(r){e.call(this,r),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var a in i)!n.hasOwnProperty(a)&&i.hasOwnProperty(a)&&(n[a]=i[a])}t.init&&t.init.call(this,r)};i.inherits(r,e);for(var n in t)"style"!==n&&"shape"!==n&&(r.prototype[n]=t[n]);return r},i.inherits(e,r),e}),define("zrender/graphic/shape/Rose",["require","../Path"],function(t){var e=Math.sin,r=Math.cos,i=Math.PI/180;return t("../Path").extend({type:"rose",shape:{cx:0,cy:0,r:[],k:0,n:1},style:{stroke:"#000",fill:null},buildPath:function(t,n){var a,o,s,h=n.r,l=n.k,c=n.n,u=n.cx,f=n.cy;t.moveTo(u,f);for(var d=0,p=h.length;p>d;d++){s=h[d];for(var v=0;360*c>=v;v++)a=s*e(l/c*v%360*i)*r(v*i)+u,o=s*e(l/c*v%360*i)*e(v*i)+f,t.lineTo(a,o)}}})}),define("zrender/graphic/shape/Trochoid",["require","../Path"],function(t){var e=Math.cos,r=Math.sin;return t("../Path").extend({type:"trochoid",shape:{cx:0,cy:0,r:0,r0:0,d:0,location:"out"},style:{stroke:"#000",fill:null},buildPath:function(t,i){var n,a,o,s,h=i.r,l=i.r0,c=i.d,u=i.cx,f=i.cy,d="out"==i.location?1:-1;if(!(i.location&&l>=h)){var p,v=0,g=1;n=(h+d*l)*e(0)-d*c*e(0)+u,a=(h+d*l)*r(0)-c*r(0)+f,t.moveTo(n,a);do v++;while(l*v%(h+d*l)!==0);do p=Math.PI/180*g,o=(h+d*l)*e(p)-d*c*e((h/l+d)*p)+u,s=(h+d*l)*r(p)-c*r((h/l+d)*p)+f,t.lineTo(o,s),g++;while(l*v/(h+d*l)*360>=g)}}})}),define("zrender/graphic/shape/Circle",["require","../Path"],function(t){return t("../Path").extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,r){r&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}})}),define("zrender/graphic/shape/Sector",["require","../Path"],function(t){return t("../Path").extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var r=e.cx,i=e.cy,n=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,h=e.clockwise,l=Math.cos(o),c=Math.sin(o);t.moveTo(l*n+r,c*n+i),t.lineTo(l*a+r,c*a+i),t.arc(r,i,a,o,s,!h),t.lineTo(Math.cos(s)*n+r,Math.sin(s)*n+i),0!==n&&t.arc(r,i,n,s,o,h),t.closePath()}})}),define("zrender/graphic/shape/Ring",["require","../Path"],function(t){return t("../Path").extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var r=e.cx,i=e.cy,n=2*Math.PI;t.moveTo(r+e.r,i),t.arc(r,i,e.r,0,n,!1),t.moveTo(r+e.r0,i),t.arc(r,i,e.r0,0,n,!0)}})}),define("zrender/graphic/shape/Ellipse",["require","../Path"],function(t){return t("../Path").extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var r=.5522848,i=e.cx,n=e.cy,a=e.rx,o=e.ry,s=a*r,h=o*r;t.moveTo(i-a,n),t.bezierCurveTo(i-a,n-h,i-s,n-o,i,n-o),t.bezierCurveTo(i+s,n-o,i+a,n-h,i+a,n),t.bezierCurveTo(i+a,n+h,i+s,n+o,i,n+o),t.bezierCurveTo(i-s,n+o,i-a,n+h,i-a,n),t.closePath()}})}),define("zrender/graphic/helper/roundRect",["require"],function(t){return{buildPath:function(t,e){var r,i,n,a,o=e.x,s=e.y,h=e.width,l=e.height,c=e.r;0>h&&(o+=h,h=-h),0>l&&(s+=l,l=-l),"number"==typeof c?r=i=n=a=c:c instanceof Array?1===c.length?r=i=n=a=c[0]:2===c.length?(r=n=c[0], +i=a=c[1]):3===c.length?(r=c[0],i=a=c[1],n=c[2]):(r=c[0],i=c[1],n=c[2],a=c[3]):r=i=n=a=0;var u;r+i>h&&(u=r+i,r*=h/u,i*=h/u),n+a>h&&(u=n+a,n*=h/u,a*=h/u),i+n>l&&(u=i+n,i*=l/u,n*=l/u),r+a>l&&(u=r+a,r*=l/u,a*=l/u),t.moveTo(o+r,s),t.lineTo(o+h-i,s),0!==i&&t.quadraticCurveTo(o+h,s,o+h,s+i),t.lineTo(o+h,s+l-n),0!==n&&t.quadraticCurveTo(o+h,s+l,o+h-n,s+l),t.lineTo(o+a,s+l),0!==a&&t.quadraticCurveTo(o,s+l,o,s+l-a),t.lineTo(o,s+r),0!==r&&t.quadraticCurveTo(o,s,o+r,s)}}}),define("zrender/graphic/shape/Rect",["require","../helper/roundRect","../Path"],function(t){var e=t("../helper/roundRect");return t("../Path").extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,r){var i=r.x,n=r.y,a=r.width,o=r.height;r.r?e.buildPath(t,r):t.rect(i,n,a,o),t.closePath()}})}),define("zrender/graphic/shape/Heart",["require","../Path"],function(t){return t("../Path").extend({type:"heart",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,i=e.cy,n=e.width,a=e.height;t.moveTo(r,i),t.bezierCurveTo(r+n/2,i-2*a/3,r+2*n,i+a/3,r,i+a),t.bezierCurveTo(r-2*n,i+a/3,r-n/2,i-2*a/3,r,i)}})}),define("zrender/graphic/shape/Droplet",["require","../Path"],function(t){return t("../Path").extend({type:"droplet",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var r=e.cx,i=e.cy,n=e.width,a=e.height;t.moveTo(r,i+n),t.bezierCurveTo(r+n,i+n,r+3*n/2,i-n/3,r,i-a),t.bezierCurveTo(r-3*n/2,i-n/3,r-n,i+n,r,i+n),t.closePath()}})}),define("zrender/graphic/shape/Line",["require","../Path"],function(t){return t("../Path").extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var r=e.x1,i=e.y1,n=e.x2,a=e.y2,o=e.percent;0!==o&&(t.moveTo(r,i),1>o&&(n=r*(1-o)+n*o,a=i*(1-o)+a*o),t.lineTo(n,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}})}),define("zrender/graphic/shape/Star",["require","../Path"],function(t){var e=Math.PI,r=Math.cos,i=Math.sin;return t("../Path").extend({type:"star",shape:{cx:0,cy:0,n:3,r0:null,r:0},buildPath:function(t,n){var a=n.n;if(a&&!(2>a)){var o=n.cx,s=n.cy,h=n.r,l=n.r0;null==l&&(l=a>4?h*r(2*e/a)/r(e/a):h/3);var c=e/a,u=-e/2,f=o+h*r(u),d=s+h*i(u);u+=c,t.moveTo(f,d);for(var p,v=0,g=2*a-1;g>v;v++)p=v%2===0?l:h,t.lineTo(o+p*r(u),s+p*i(u)),u+=c;t.closePath()}}})}),define("zrender/graphic/shape/Isogon",["require","../Path"],function(t){var e=Math.PI,r=Math.sin,i=Math.cos;return t("../Path").extend({type:"isogon",shape:{x:0,y:0,r:0,n:0},buildPath:function(t,n){var a=n.n;if(a&&!(2>a)){var o=n.x,s=n.y,h=n.r,l=2*e/a,c=-e/2;t.moveTo(o+h*i(c),s+h*r(c));for(var u=0,f=a-1;f>u;u++)c+=l,t.lineTo(o+h*i(c),s+h*r(c));t.closePath()}}})}),define("zrender/graphic/shape/BezierCurve",["require","../../core/curve","../../core/vector","../Path"],function(t){function e(t,e,r){var i=t.cpx2,n=t.cpy2;return null===i||null===n?[(r?l:s)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?l:s)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?h:o)(t.x1,t.cpx1,t.x2,e),(r?h:o)(t.y1,t.cpy1,t.y2,e)]}var r=t("../../core/curve"),i=t("../../core/vector"),n=r.quadraticSubdivide,a=r.cubicSubdivide,o=r.quadraticAt,s=r.cubicAt,h=r.quadraticDerivativeAt,l=r.cubicDerivativeAt,c=[];return t("../Path").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(t,e){var r=e.x1,i=e.y1,o=e.x2,s=e.y2,h=e.cpx1,l=e.cpy1,u=e.cpx2,f=e.cpy2,d=e.percent;0!==d&&(t.moveTo(r,i),null==u||null==f?(1>d&&(n(r,h,o,d,c),h=c[1],o=c[2],n(i,l,s,d,c),l=c[1],s=c[2]),t.quadraticCurveTo(h,l,o,s)):(1>d&&(a(r,h,u,o,d,c),h=c[1],u=c[2],o=c[3],a(i,l,f,s,d,c),l=c[1],f=c[2],s=c[3]),t.bezierCurveTo(h,l,u,f,o,s)))},pointAt:function(t){return e(this.shape,t,!1)},tangentAt:function(t){var r=e(this.shape,t,!0);return i.normalize(r,r)}})}),define("zrender/graphic/helper/smoothSpline",["require","../../core/vector"],function(t){function e(t,e,r,i,n,a,o){var s=.5*(r-t),h=.5*(i-e);return(2*(e-r)+s+h)*o+(-3*(e-r)-2*s-h)*a+s*n+e}var r=t("../../core/vector");return function(t,i){for(var n=t.length,a=[],o=0,s=1;n>s;s++)o+=r.distance(t[s-1],t[s]);var h=o/2;h=n>h?n:h;for(var s=0;h>s;s++){var l,c,u,f=s/(h-1)*(i?n:n-1),d=Math.floor(f),p=f-d,v=t[d%n];i?(l=t[(d-1+n)%n],c=t[(d+1)%n],u=t[(d+2)%n]):(l=t[0===d?d:d-1],c=t[d>n-2?n-1:d+1],u=t[d>n-3?n-1:d+2]);var g=p*p,m=p*g;a.push([e(l[0],v[0],c[0],u[0],p,g,m),e(l[1],v[1],c[1],u[1],p,g,m)])}return a}}),define("zrender/graphic/helper/smoothBezier",["require","../../core/vector"],function(t){var e=t("../../core/vector"),r=e.min,i=e.max,n=e.scale,a=e.distance,o=e.add;return function(t,s,h,l){var c,u,f,d,p=[],v=[],g=[],m=[];if(l){f=[1/0,1/0],d=[-(1/0),-(1/0)];for(var _=0,y=t.length;y>_;_++)r(f,f,t[_]),i(d,d,t[_]);r(f,f,l[0]),i(d,d,l[1])}for(var _=0,y=t.length;y>_;_++){var x=t[_];if(h)c=t[_?_-1:y-1],u=t[(_+1)%y];else{if(0===_||_===y-1){p.push(e.clone(t[_]));continue}c=t[_-1],u=t[_+1]}e.sub(v,u,c),n(v,v,s);var b=a(x,c),w=a(x,u),T=b+w;0!==T&&(b/=T,w/=T),n(g,v,-b),n(m,v,w);var P=o([],x,g),k=o([],x,m);l&&(i(P,P,f),r(P,P,d),i(k,k,f),r(k,k,d)),p.push(P),p.push(k)}return h&&p.push(p.shift()),p}}),define("zrender/graphic/helper/poly",["require","./smoothSpline","./smoothBezier"],function(t){var e=t("./smoothSpline"),r=t("./smoothBezier");return{buildPath:function(t,i,n){var a=i.points,o=i.smooth;if(a&&a.length>=2){if(o&&"spline"!==o){var s=r(a,o,n,i.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var h=a.length,l=0;(n?h:h-1)>l;l++){var c=s[2*l],u=s[2*l+1],f=a[(l+1)%h];t.bezierCurveTo(c[0],c[1],u[0],u[1],f[0],f[1])}}else{"spline"===o&&(a=e(a,n)),t.moveTo(a[0][0],a[0][1]);for(var l=1,d=a.length;d>l;l++)t.lineTo(a[l][0],a[l][1])}n&&t.closePath()}}}}),define("zrender/graphic/shape/Polyline",["require","../helper/poly","../Path"],function(t){var e=t("../helper/poly");return t("../Path").extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,r){e.buildPath(t,r,!1)}})}),define("zrender/graphic/shape/Polygon",["require","../helper/poly","../Path"],function(t){var e=t("../helper/poly");return t("../Path").extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,r){e.buildPath(t,r,!0)}})}),define("zrender/graphic/Gradient",["require"],function(t){var e=function(t){this.colorStops=t||[]};return e.prototype={constructor:e,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}},e}),define("zrender/vml/core",["require","exports","module","../core/env"],function(t,e,r){if(!t("../core/env").canvasSupported){var i,n="urn:schemas-microsoft-com:vml",a=window,o=a.document,s=!1;try{!o.namespaces.zrvml&&o.namespaces.add("zrvml",n),i=function(t){return o.createElement("')}}catch(h){i=function(t){return o.createElement("<"+t+' xmlns="'+n+'" class="zrvml">')}}var l=function(){if(!s){s=!0;var t=o.styleSheets;t.length<31?o.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}};r.exports={doc:o,initVML:l,createNode:i}}}),define("zrender/vml/graphic",["require","../core/env","../core/vector","../core/BoundingRect","../core/PathProxy","../tool/color","../contain/text","../graphic/mixin/RectText","../graphic/Displayable","../graphic/Image","../graphic/Text","../graphic/Path","../graphic/Gradient","./core"],function(t){if(!t("../core/env").canvasSupported){var e=t("../core/vector"),r=t("../core/BoundingRect"),i=t("../core/PathProxy").CMD,n=t("../tool/color"),a=t("../contain/text"),o=t("../graphic/mixin/RectText"),s=t("../graphic/Displayable"),h=t("../graphic/Image"),l=t("../graphic/Text"),c=t("../graphic/Path"),u=t("../graphic/Gradient"),f=t("./core"),d=Math.round,p=Math.sqrt,v=Math.abs,g=Math.cos,m=Math.sin,_=Math.max,y=e.applyTransform,x=",",b="progid:DXImageTransform.Microsoft",w=21600,T=w/2,P=1e5,k=1e3,z=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=w+","+w,t.coordorigin="0,0"},M=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},S=function(t,e,r){return"rgb("+[t,e,r].join(",")+")"},C=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},L=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},R=function(t,e,r){return(parseFloat(t)||0)*P+(parseFloat(e)||0)*k+r},A=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},q=function(t,e,r){var i=n.parse(e);r=+r,isNaN(r)&&(r=1),i&&(t.color=S(i[0],i[1],i[2]),t.opacity=r*i[3])},E=function(t){var e=n.parse(t);return[S(e[0],e[1],e[2]),e[3]]},B=function(t,e,r){var i=e.fill;if(null!=i)if(i instanceof u){var n,a=0,o=[0,0],s=0,h=1,l=r.getBoundingRect(),c=l.width,f=l.height;if("linear"===i.type){n="gradient";var d=r.transform,p=[i.x*c,i.y*f],v=[i.x2*c,i.y2*f];d&&(y(p,p,d),y(v,v,d));var g=v[0]-p[0],m=v[1]-p[1];a=180*Math.atan2(g,m)/Math.PI,0>a&&(a+=360),1e-6>a&&(a=0)}else{n="gradientradial";var p=[i.x*c,i.y*f],d=r.transform,x=r.scale,b=c,T=f;o=[(p[0]-l.x)/b,(p[1]-l.y)/T],d&&y(p,p,d),b/=x[0]*w,T/=x[1]*w;var P=_(b,T);s=0/P,h=2*i.r/P-s}var k=i.colorStops.slice();k.sort(function(t,e){return t.offset-e.offset});for(var z=k.length,M=[],S=[],C=0;z>C;C++){var L=k[C],R=E(L.color);S.push(L.offset*h+s+" "+R[0]),(0===C||C===z-1)&&M.push(R)}if(z>=2){var A=M[0][0],B=M[1][0],I=M[0][1]*e.opacity,D=M[1][1]*e.opacity;t.type=n,t.method="none",t.focus="100%",t.angle=a,t.color=A,t.color2=B,t.colors=S.join(","),t.opacity=D,t.opacity2=I}"radial"===n&&(t.focusposition=o.join(","))}else q(t,i,e.opacity)},I=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof u||q(t,e.stroke,e.opacity)},D=function(t,e,r,i){var n="fill"==e,a=t.getElementsByTagName(e)[0];null!=r[e]&&"none"!==r[e]&&(n||!n&&r.lineWidth)?(t[n?"filled":"stroked"]="true",r[e]instanceof u&&L(t,a),a||(a=f.createNode(e)),n?B(a,r,i):I(a,r),C(t,a)):(t[n?"filled":"stroked"]="false",L(t,a))},O=[[],[],[]],F=function(t,e){var r,n,a,o,s,h,l=i.M,c=i.C,u=i.L,f=i.A,v=i.Q,_=[];for(o=0;o.01?V&&(N+=270/w):Math.abs(j-B)<1e-10?V&&E>N||!V&&N>E?z-=270/w:z+=270/w:V&&B>j||!V&&j>B?k+=270/w:k-=270/w),_.push(X,d(((E-I)*R+C)*w-T),x,d(((B-D)*A+L)*w-T),x,d(((E+I)*R+C)*w-T),x,d(((B+D)*A+L)*w-T),x,d((N*R+C)*w-T),x,d((j*A+L)*w-T),x,d((k*R+C)*w-T),x,d((z*A+L)*w-T)),s=k,h=z;break;case i.R:var G=O[0],W=O[1];G[0]=t[o++],G[1]=t[o++],W[0]=G[0]+t[o++],W[1]=G[1]+t[o++],e&&(y(G,G,e),y(W,W,e)),G[0]=d(G[0]*w-T),W[0]=d(W[0]*w-T),G[1]=d(G[1]*w-T),W[1]=d(W[1]*w-T),_.push(" m ",G[0],x,G[1]," l ",W[0],x,G[1]," l ",W[0],x,W[1]," l ",G[0],x,W[1]);break;case i.Z:_.push(" x ")}if(r>0){_.push(n);for(var Y=0;r>Y;Y++){var Z=O[Y];e&&y(Z,Z,e),_.push(d(Z[0]*w-T),x,d(Z[1]*w-T),r-1>Y?x:"")}}}return _.join("")};c.prototype.brushVML=function(t){var e=this.style,r=this._vmlEl;r||(r=f.createNode("shape"),z(r),this._vmlEl=r),D(r,"fill",e,this),D(r,"stroke",e,this);var i=this.transform,n=null!=i,a=r.getElementsByTagName("stroke")[0];if(a){var o=e.lineWidth;if(n&&!e.strokeNoScale){var s=i[0]*i[3]-i[1]*i[2];o*=p(v(s))}a.weight=o+"px"}var h=this.path;this.__dirtyPath&&(h.beginPath(),this.buildPath(h,this.shape),h.toStatic(),this.__dirtyPath=!1),r.path=F(h.data,this.transform),r.style.zIndex=R(this.zlevel,this.z,this.z2),C(t,r),e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},c.prototype.onRemove=function(t){L(t,this._vmlEl),this.removeRectText(t)},c.prototype.onAdd=function(t){C(t,this._vmlEl),this.appendRectText(t)};var H=function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()};h.prototype.brushVML=function(t){var e,r,i=this.style,n=i.image;if(H(n)){var a=n.src;if(a===this._imageSrc)e=this._imageWidth,r=this._imageHeight;else{var o=n.runtimeStyle,s=o.width,h=o.height;o.width="auto",o.height="auto",e=n.width,r=n.height,o.width=s,o.height=h,this._imageSrc=a,this._imageWidth=e,this._imageHeight=r}n=a}else n===this._imageSrc&&(e=this._imageWidth,r=this._imageHeight);if(n){var l=i.x||0,c=i.y||0,u=i.width,v=i.height,g=i.sWidth,m=i.sHeight,w=i.sx||0,T=i.sy||0,P=g&&m,k=this._vmlEl;k||(k=f.doc.createElement("div"),z(k),this._vmlEl=k);var M,S=k.style,L=!1,A=1,q=1;if(this.transform&&(M=this.transform,A=p(M[0]*M[0]+M[1]*M[1]),q=p(M[2]*M[2]+M[3]*M[3]),L=M[1]||M[2]),L){var E=[l,c],B=[l+u,c],I=[l,c+v],D=[l+u,c+v];y(E,E,M),y(B,B,M),y(I,I,M),y(D,D,M);var O=_(E[0],B[0],I[0],D[0]),F=_(E[1],B[1],I[1],D[1]),V=[];V.push("M11=",M[0]/A,x,"M12=",M[2]/q,x,"M21=",M[1]/A,x,"M22=",M[3]/q,x,"Dx=",d(l*A+M[4]),x,"Dy=",d(c*q+M[5])),S.padding="0 "+d(O)+"px "+d(F)+"px 0",S.filter=b+".Matrix("+V.join("")+", SizingMethod=clip)"}else M&&(l=l*A+M[4],c=c*q+M[5]),S.filter="",S.left=d(l)+"px",S.top=d(c)+"px";var N=this._imageEl,j=this._cropEl;N||(N=f.doc.createElement("div"),this._imageEl=N);var X=N.style;if(P){if(e&&r)X.width=d(A*e*u/g)+"px",X.height=d(q*r*v/m)+"px";else{var G=new Image,W=this;G.onload=function(){G.onload=null,e=G.width,r=G.height,X.width=d(A*e*u/g)+"px",X.height=d(q*r*v/m)+"px",W._imageWidth=e,W._imageHeight=r,W._imageSrc=n},G.src=n}j||(j=f.doc.createElement("div"),j.style.overflow="hidden",this._cropEl=j);var Y=j.style;Y.width=d((u+w*u/g)*A),Y.height=d((v+T*v/m)*q),Y.filter=b+".Matrix(Dx="+-w*u/g*A+",Dy="+-T*v/m*q+")",j.parentNode||k.appendChild(j),N.parentNode!=j&&j.appendChild(N)}else X.width=d(A*u)+"px",X.height=d(q*v)+"px",k.appendChild(N),j&&j.parentNode&&(k.removeChild(j),this._cropEl=null);var Z="",U=i.opacity;1>U&&(Z+=".Alpha(opacity="+d(100*U)+") "),Z+=b+".AlphaImageLoader(src="+n+", SizingMethod=scale)",X.filter=Z,k.style.zIndex=R(this.zlevel,this.z,this.z2),C(t,k),i.text&&this.drawRectText(t,this.getBoundingRect())}},h.prototype.onRemove=function(t){L(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},h.prototype.onAdd=function(t){C(t,this._vmlEl),this.appendRectText(t)};var V,N="normal",j={},X=0,G=100,W=document.createElement("div"),Y=function(t){var e=j[t];if(!e){X>G&&(X=0,j={});var r,i=W.style;try{i.font=t,r=i.fontFamily.split(",")[0]}catch(n){}e={style:i.fontStyle||N,variant:i.fontVariant||N,weight:i.fontWeight||N,size:0|parseFloat(i.fontSize||12),family:r||"Microsoft YaHei"},j[t]=e,X++}return e};a.measureText=function(t,e){var r=f.doc;V||(V=r.createElement("div"),V.style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",f.doc.body.appendChild(V));try{V.style.font=e}catch(i){}return V.innerHTML="",V.appendChild(r.createTextNode(t)),{width:V.offsetWidth}};for(var Z=new r,U=function(t,e,r,i){var n=this.style,o=n.text;if(o){var s,h,l=n.textAlign,c=Y(n.textFont),u=c.style+" "+c.variant+" "+c.weight+" "+c.size+'px "'+c.family+'"',p=n.textBaseline,v=n.textVerticalAlign;r=r||a.getBoundingRect(o,u,l,p);var g=this.transform;if(g&&!i&&(Z.copy(e),Z.applyTransform(g),e=Z),i)s=e.x,h=e.y;else{var m=n.textPosition,_=n.textDistance;if(m instanceof Array)s=e.x+A(m[0],e.width),h=e.y+A(m[1],e.height),l=l||"left",p=p||"top";else{var b=a.adjustTextPositionOnRect(m,e,r,_);s=b.x,h=b.y,l=l||b.textAlign,p=p||b.textBaseline}}if(v){switch(v){case"middle":h-=r.height/2;break;case"bottom":h-=r.height}p="top"}var w=c.size;switch(p){case"hanging":case"top":h+=w/1.75;break;case"middle":break;default:h-=w/2.25}switch(l){case"left":break;case"center":s-=r.width/2;break;case"right":s-=r.width}var T,P,k,S=f.createNode,L=this._textVmlEl;L?(k=L.firstChild,T=k.nextSibling,P=T.nextSibling):(L=S("line"),T=S("path"),P=S("textpath"),k=S("skew"),P.style["v-text-align"]="left",z(L),T.textpathok=!0,P.on=!0,L.from="0 0",L.to="1000 0.05",C(L,k),C(L,T),C(L,P),this._textVmlEl=L);var q=[s,h],E=L.style;g&&i?(y(q,q,g),k.on=!0,k.matrix=g[0].toFixed(3)+x+g[2].toFixed(3)+x+g[1].toFixed(3)+x+g[3].toFixed(3)+",0,0",k.offset=(d(q[0])||0)+","+(d(q[1])||0),k.origin="0 0",E.left="0px",E.top="0px"):(k.on=!1,E.left=d(s)+"px",E.top=d(h)+"px"),P.string=M(o);try{P.style.font=u}catch(B){}D(L,"fill",{fill:i?n.fill:n.textFill,opacity:n.opacity},this),D(L,"stroke",{stroke:i?n.stroke:n.textStroke,opacity:n.opacity,lineDash:n.lineDash},this),L.style.zIndex=R(this.zlevel,this.z,this.z2),C(t,L)}},Q=function(t){L(t,this._textVmlEl),this._textVmlEl=null},$=function(t){C(t,this._textVmlEl)},K=[o,s,h,c,l],J=0;J